Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiqiao-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
金民
weiqiao-vue
Commits
b5c09c01
Commit
b5c09c01
authored
Dec 30, 2025
by
史雅文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划显示字段
parent
ac30f4d4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
67 deletions
+67
-67
xjrsoft-vue3/src/views/scgl/scjh/components/Form.vue
+67
-67
No files found.
xjrsoft-vue3/src/views/scgl/scjh/components/Form.vue
View file @
b5c09c01
...
...
@@ -12,40 +12,40 @@
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
ref
,
onMounted
,
nextTick
,
watch
}
from
'vue'
;
import
{
formProps
,
formEventConfigs
}
from
'./config'
;
import
SimpleForm
from
'/@/components/SimpleForm/src/SimpleForm.vue'
;
import
{
addMesProductionPlan
,
getMesProductionPlan
,
updateMesProductionPlan
}
from
'/@/api/scgl/scjh'
;
import
{
cloneDeep
,
isString
}
from
'lodash-es'
;
import
{
FormDataProps
}
from
'/@/components/Designer/src/types'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,}
from
'/@/hooks/web/useFormEvent'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
reactive
,
ref
,
onMounted
,
nextTick
,
watch
}
from
'vue'
;
import
{
formProps
,
formEventConfigs
}
from
'./config'
;
import
SimpleForm
from
'/@/components/SimpleForm/src/SimpleForm.vue'
;
import
{
addMesProductionPlan
,
getMesProductionPlan
,
updateMesProductionPlan
}
from
'/@/api/scgl/scjh'
;
import
{
cloneDeep
,
isString
}
from
'lodash-es'
;
import
{
FormDataProps
}
from
'/@/components/Designer/src/types'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,}
from
'/@/hooks/web/useFormEvent'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
useRouter
}
from
'vue-router'
;
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
RowKey
=
'id'
;
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
props
=
defineProps
({
const
RowKey
=
'id'
;
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
props
=
defineProps
({
fromPage
:
{
type
:
Number
,
default
:
FromPageType
.
MENU
,
},
});
const
systemFormRef
=
ref
();
const
data
:
{
formDataProps
:
FormDataProps
}
=
reactive
({
});
const
systemFormRef
=
ref
();
const
data
:
{
formDataProps
:
FormDataProps
}
=
reactive
({
formDataProps
:
cloneDeep
(
formProps
),
});
const
state
=
reactive
({
});
const
state
=
reactive
({
formModel
:
{},
formInfo
:{
formId
:
''
,
formName
:
''
}
});
const
{
currentRoute
}
=
useRouter
();
watch
(
});
const
{
currentRoute
}
=
useRouter
();
watch
(
()
=>
state
.
formModel
,
(
val
)
=>
{
emits
(
'update:value'
,
val
);
...
...
@@ -53,9 +53,9 @@
{
deep
:
true
,
},
);
);
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
try
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
setMenuPermission
();
...
...
@@ -86,14 +86,14 @@
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
}
}
catch
(
error
)
{}
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function
setMenuPermission
()
{
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function
setMenuPermission
()
{
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
}
}
// 校验form 通过返回表单数据
async
function
validate
()
{
// 校验form 通过返回表单数据
async
function
validate
()
{
let
values
=
[];
try
{
values
=
await
systemFormRef
.
value
?.
validate
();
...
...
@@ -106,9 +106,9 @@
}
finally
{
}
return
values
;
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async
function
setFormDataFromId
(
rowId
)
{
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async
function
setFormDataFromId
(
rowId
)
{
try
{
const
record
=
await
getMesProductionPlan
(
rowId
);
// 处理 mesProductionPlanProductList 字段映射
...
...
@@ -132,9 +132,9 @@
}
catch
(
error
)
{
}
}
// 辅助返回表单数据
async
function
getFieldsValue
()
{
}
// 辅助返回表单数据
async
function
getFieldsValue
()
{
let
values
=
[];
try
{
values
=
await
systemFormRef
.
value
?.
getFieldsValue
();
...
...
@@ -147,25 +147,25 @@
}
finally
{
}
return
values
;
}
// 辅助设置表单数据
function
setFieldsValue
(
record
)
{
}
// 辅助设置表单数据
function
setFieldsValue
(
record
)
{
systemFormRef
.
value
.
setFieldsValue
(
record
);
}
// 重置表单数据
async
function
resetFields
()
{
}
// 重置表单数据
async
function
resetFields
()
{
await
systemFormRef
.
value
.
resetFields
();
}
// 设置表单数据全部为Disabled 【查看】
async
function
setDisabledForm
(
)
{
}
// 设置表单数据全部为Disabled 【查看】
async
function
setDisabledForm
(
)
{
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
}
// 获取行键值
function
getRowKey
()
{
}
// 获取行键值
function
getRowKey
()
{
return
RowKey
;
}
// 更新api表单数据
async
function
update
({
values
,
rowId
})
{
}
// 更新api表单数据
async
function
update
({
values
,
rowId
})
{
try
{
values
[
RowKey
]
=
rowId
;
state
.
formModel
=
values
;
...
...
@@ -175,9 +175,9 @@
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
return
saveVal
;
}
catch
(
error
)
{}
}
// 新增api表单数据
async
function
add
(
values
)
{
}
// 新增api表单数据
async
function
add
(
values
)
{
try
{
state
.
formModel
=
values
;
let
saveVal
=
await
addMesProductionPlan
(
values
);
...
...
@@ -186,9 +186,9 @@
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
return
saveVal
;
}
catch
(
error
)
{}
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
try
{
if
(
obj
.
formId
)
state
.
formInfo
.
formId
=
obj
.
formId
;
if
(
obj
.
formName
)
state
.
formInfo
.
formName
=
obj
.
formName
;
...
...
@@ -208,18 +208,18 @@
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
}
function
handleChange
(
val
)
{
}
function
handleChange
(
val
)
{
emits
(
'update:value'
,
val
);
}
async
function
sendMessageForAllIframe
()
{
}
async
function
sendMessageForAllIframe
()
{
try
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
systemFormRef
.
value
.
sendMessageForAllIframe
();
}
}
catch
(
error
)
{}
}
defineExpose
({
}
defineExpose
({
setFieldsValue
,
resetFields
,
validate
,
...
...
@@ -232,6 +232,6 @@
getRowKey
,
getFieldsValue
,
sendMessageForAllIframe
});
});
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment