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
1
Merge Requests
1
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
adfd4b15
Commit
adfd4b15
authored
Mar 18, 2026
by
董晓奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(1)工艺路线按照产品种类分,工艺路线上增加个字段,生产任务自动匹配
parent
21b17708
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
302 additions
and
237 deletions
+302
-237
xjrsoft-vue3/src/views/jcsj/gylx/components/Form.vue
+106
-34
xjrsoft-vue3/src/views/jcsj/gylx/components/GylxModal.vue
+19
-22
xjrsoft-vue3/src/views/jcsj/gylx/components/config.ts
+67
-3
xjrsoft-vue3/src/views/jcsj/gylx/index.vue
+78
-142
xjrsoft-vue3/src/views/scgl/scrw/components/Form.vue
+0
-0
xjrsoft-vue3/src/views/scgl/scrw/components/ScrwModal.vue
+17
-24
xjrsoft-vue3/src/views/scgl/scrw/components/config.ts
+15
-11
xjrsoft-vue3/src/views/scgl/scrw/components/workflowPermission.ts
+0
-1
xjrsoft-vue3/src/views/scgl/scrw/index.vue
+0
-0
No files found.
xjrsoft-vue3/src/views/jcsj/gylx/components/Form.vue
View file @
adfd4b15
<
template
>
<
template
>
<div
class=
"pt-4"
>
<div
class=
"pt-4"
>
<SimpleForm
<SimpleForm
ref=
"systemFormRef"
ref=
"systemFormRef"
:formProps=
"data.formDataProps"
:formProps=
"data.formDataProps"
:formModel=
"state.formModel"
:formModel=
"state.formModel"
:isWorkFlow=
"props.fromPage
!=
FromPageType.MENU"
:isWorkFlow=
"props.fromPage
!=
FromPageType.MENU"
:isCamelCase=
"true"
:isCamelCase=
"true"
@
model-change=
"handleChange"
@
model-change=
"handleChange"
/>
/>
...
@@ -21,7 +20,12 @@
...
@@ -21,7 +20,12 @@
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,}
from
'/@/hooks/web/useFormEvent'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,
}
from
'/@/hooks/web/useFormEvent'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
...
@@ -29,7 +33,7 @@
...
@@ -29,7 +33,7 @@
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
RowKey
=
'id'
;
const
RowKey
=
'id'
;
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
props
=
defineProps
({
const
props
=
defineProps
({
fromPage
:
{
fromPage
:
{
type
:
Number
,
type
:
Number
,
...
@@ -42,7 +46,7 @@
...
@@ -42,7 +46,7 @@
});
});
const
state
=
reactive
({
const
state
=
reactive
({
formModel
:
{},
formModel
:
{},
formInfo
:
{
formId
:
''
,
formName
:
''
}
formInfo
:
{
formId
:
''
,
formName
:
''
},
});
});
const
{
currentRoute
}
=
useRouter
();
const
{
currentRoute
}
=
useRouter
();
watch
(
watch
(
...
@@ -59,17 +63,35 @@
...
@@ -59,17 +63,35 @@
try
{
try
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
setMenuPermission
();
setMenuPermission
();
if
(
currentRoute
.
value
.
meta
){
if
(
currentRoute
.
value
.
meta
)
{
state
.
formInfo
.
formName
=
currentRoute
.
value
.
meta
.
title
&&
isString
(
currentRoute
.
value
.
meta
.
title
)?
currentRoute
.
value
.
meta
.
title
:
''
;
state
.
formInfo
.
formName
=
state
.
formInfo
.
formId
=
currentRoute
.
value
.
meta
.
formId
&&
isString
(
currentRoute
.
value
.
meta
.
formId
)?
currentRoute
.
value
.
meta
.
formId
:
''
;
currentRoute
.
value
.
meta
.
title
&&
isString
(
currentRoute
.
value
.
meta
.
title
)
?
currentRoute
.
value
.
meta
.
title
:
''
;
state
.
formInfo
.
formId
=
currentRoute
.
value
.
meta
.
formId
&&
isString
(
currentRoute
.
value
.
meta
.
formId
)
?
currentRoute
.
value
.
meta
.
formId
:
''
;
}
}
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
nextTick
();
await
nextTick
();
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
...
@@ -78,15 +100,28 @@
...
@@ -78,15 +100,28 @@
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
// 桌面设计 表单事件需要执行
// 桌面设计 表单事件需要执行
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
});
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function
setMenuPermission
()
{
function
setMenuPermission
()
{
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
...
@@ -107,19 +142,25 @@
...
@@ -107,19 +142,25 @@
}
}
return
values
;
return
values
;
}
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async
function
setFormDataFromId
(
rowId
)
{
async
function
setFormDataFromId
(
rowId
)
{
try
{
try
{
const
record
=
await
getRokeRouting
(
rowId
);
const
record
=
await
getRokeRouting
(
rowId
);
setFieldsValue
(
record
);
setFieldsValue
(
record
);
state
.
formModel
=
record
;
state
.
formModel
=
record
;
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:获取表单数据
formProps
.
schemas
,
}
catch
(
error
)
{
true
,
state
.
formInfo
.
formName
,
}
state
.
formInfo
.
formId
,
);
//表单事件:获取表单数据
}
catch
(
error
)
{}
}
}
// 辅助返回表单数据
// 辅助返回表单数据
async
function
getFieldsValue
()
{
async
function
getFieldsValue
()
{
let
values
=
[];
let
values
=
[];
...
@@ -135,45 +176,64 @@
...
@@ -135,45 +176,64 @@
}
}
return
values
;
return
values
;
}
}
// 辅助设置表单数据
// 辅助设置表单数据
function
setFieldsValue
(
record
)
{
function
setFieldsValue
(
record
)
{
systemFormRef
.
value
.
setFieldsValue
(
record
);
systemFormRef
.
value
.
setFieldsValue
(
record
);
}
}
// 重置表单数据
// 重置表单数据
async
function
resetFields
()
{
async
function
resetFields
()
{
await
systemFormRef
.
value
.
resetFields
();
await
systemFormRef
.
value
.
resetFields
();
}
}
// 设置表单数据全部为Disabled 【查看】
// 设置表单数据全部为Disabled 【查看】
async
function
setDisabledForm
(
)
{
async
function
setDisabledForm
()
{
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
}
}
// 获取行键值
// 获取行键值
function
getRowKey
()
{
function
getRowKey
()
{
return
RowKey
;
return
RowKey
;
}
}
// 更新api表单数据
// 更新api表单数据
async
function
update
({
values
,
rowId
})
{
async
function
update
({
values
,
rowId
})
{
try
{
try
{
values
[
RowKey
]
=
rowId
;
values
[
RowKey
]
=
rowId
;
state
.
formModel
=
values
;
state
.
formModel
=
values
;
let
saveVal
=
await
updateRokeRouting
(
values
);
let
saveVal
=
await
updateRokeRouting
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:提交表单
return
saveVal
;
return
saveVal
;
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
// 新增api表单数据
// 新增api表单数据
async
function
add
(
values
)
{
async
function
add
(
values
)
{
try
{
try
{
state
.
formModel
=
values
;
state
.
formModel
=
values
;
let
saveVal
=
await
addRokeRouting
(
values
);
let
saveVal
=
await
addRokeRouting
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:提交表单
return
saveVal
;
return
saveVal
;
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
try
{
try
{
...
@@ -189,16 +249,30 @@
...
@@ -189,16 +249,30 @@
state
.
formModel
=
formModels
;
state
.
formModel
=
formModels
;
setFieldsValue
(
formModels
);
setFieldsValue
(
formModels
);
}
catch
(
error
)
{}
}
catch
(
error
)
{}
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
}
function
handleChange
(
val
)
{
function
handleChange
(
val
)
{
emits
(
'update:value'
,
val
);
emits
(
'update:value'
,
val
);
}
}
async
function
sendMessageForAllIframe
()
{
async
function
sendMessageForAllIframe
()
{
try
{
try
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
...
@@ -206,6 +280,7 @@
...
@@ -206,6 +280,7 @@
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
defineExpose
({
defineExpose
({
setFieldsValue
,
setFieldsValue
,
resetFields
,
resetFields
,
...
@@ -218,8 +293,6 @@
...
@@ -218,8 +293,6 @@
setWorkFlowForm
,
setWorkFlowForm
,
getRowKey
,
getRowKey
,
getFieldsValue
,
getFieldsValue
,
sendMessageForAllIframe
sendMessageForAllIframe
,
});
});
</
script
>
</
script
>
\ No newline at end of file
xjrsoft-vue3/src/views/jcsj/gylx/components/GylxModal.vue
View file @
adfd4b15
<
template
>
<
template
>
<BasicModal
<BasicModal
:height=
"600"
:height=
"600"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
v-bind=
"$attrs"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
<template
#
footer
v-if=
"
!state.isView"
>
<template
#
footer
v-if=
"
!state.isView"
>
<template
v-for=
"(item, index) in sortBy(formButtons, 'index')"
:key=
"item.key"
>
<template
v-for=
"(item, index) in sortBy(formButtons, 'index')"
:key=
"item.key"
>
<template
v-if=
"item.isShow"
>
<template
v-if=
"item.isShow"
>
<CustomButtonModal
v-if=
"item.type == CustomButtonModalType.Modal"
:info=
"item"
/>
<CustomButtonModal
v-if=
"item.type == CustomButtonModalType.Modal"
:info=
"item"
/>
...
@@ -23,7 +24,6 @@
...
@@ -23,7 +24,6 @@
</template>
</template>
</template>
</template>
</BasicModal>
</BasicModal>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
import
{
formProps
,
formButtons
}
from
'./config'
;
import
{
formProps
,
formButtons
}
from
'./config'
;
import
ModalForm
from
'./Form.vue'
;
import
ModalForm
from
'./Form.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
const
{
notification
}
=
useMessage
();
const
{
notification
}
=
useMessage
();
const
formRef
=
ref
();
const
formRef
=
ref
();
const
isCopy
=
ref
<
boolean
>
(
false
)
const
isCopy
=
ref
<
boolean
>
(
false
)
;
const
state
=
reactive
({
const
state
=
reactive
({
formModel
:
{},
formModel
:
{},
isUpdate
:
true
,
isUpdate
:
true
,
...
@@ -58,10 +58,11 @@
...
@@ -58,10 +58,11 @@
await
handleInner
(
data
);
await
handleInner
(
data
);
});
});
const
getTitle
=
computed
(()
=>
(
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
));
const
getTitle
=
computed
(()
=>
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
,
);
async
function
handleInner
(
data
){
async
function
handleInner
(
data
)
{
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isView
=
!!
data
?.
isView
;
state
.
isView
=
!!
data
?.
isView
;
isCopy
.
value
=
!!
data
?.
isCopy
;
isCopy
.
value
=
!!
data
?.
isCopy
;
...
@@ -73,7 +74,8 @@
...
@@ -73,7 +74,8 @@
showOkBtn
:
false
,
showOkBtn
:
false
,
canFullscreen
:
true
,
canFullscreen
:
true
,
width
:
1200
,
width
:
1200
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
});
});
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
...
@@ -85,10 +87,9 @@
...
@@ -85,10 +87,9 @@
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
}
else
{
}
else
{
formRef
.
value
.
resetFields
();
formRef
.
value
.
resetFields
();
}
}
}
}
async
function
saveModal
()
{
async
function
saveModal
()
{
let
saveSuccess
=
false
;
let
saveSuccess
=
false
;
try
{
try
{
...
@@ -140,15 +141,14 @@
...
@@ -140,15 +141,14 @@
emit
(
'success'
);
emit
(
'success'
);
}
}
}
finally
{
}
finally
{
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
}
}
}
}
function
customClick
(
item
)
{
function
customClick
(
item
)
{
if
(
item
.
key
==
'confirm'
)
{
if
(
item
.
key
==
'confirm'
)
{
handleSubmit
();
handleSubmit
();
}
else
if
(
item
.
key
==
'cancel'
&&
props
.
formType
!==
'normal'
)
{
}
else
if
(
item
.
key
==
'cancel'
)
{
handleClose
();
handleClose
();
closeModal
();
closeModal
();
}
else
if
(
item
.
key
==
'reset'
)
{
}
else
if
(
item
.
key
==
'reset'
)
{
...
@@ -157,10 +157,8 @@
...
@@ -157,10 +157,8 @@
executeCurFormEvent
(
item
.
event
,
state
.
formModel
,
true
);
executeCurFormEvent
(
item
.
event
,
state
.
formModel
,
true
);
}
}
}
}
function
handleClose
()
{
function
handleClose
()
{
formRef
.
value
.
resetFields
();
formRef
.
value
.
resetFields
();
}
}
</
script
>
</
script
>
\ No newline at end of file
xjrsoft-vue3/src/views/jcsj/gylx/components/config.ts
View file @
adfd4b15
...
@@ -55,6 +55,18 @@ export const columns: BasicColumn[] = [
...
@@ -55,6 +55,18 @@ export const columns: BasicColumn[] = [
styleConfig
:
undefined
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
listStyle
:
undefined
,
},
},
{
resizable
:
true
,
dataIndex
:
'productType'
,
title
:
'产品类型'
,
componentType
:
'select'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
];
];
//表头合并配置
//表头合并配置
export
const
headerMergingData
=
[];
export
const
headerMergingData
=
[];
...
@@ -136,7 +148,7 @@ export const formProps: FormProps = {
...
@@ -136,7 +148,7 @@ export const formProps: FormProps = {
component
:
'Grid'
,
component
:
'Grid'
,
children
:
[
children
:
[
{
{
span
:
8
,
span
:
6
,
list
:
[
list
:
[
{
{
key
:
'536715321b4c49df8b63b2fcb7cc14ab'
,
key
:
'536715321b4c49df8b63b2fcb7cc14ab'
,
...
@@ -164,7 +176,7 @@ export const formProps: FormProps = {
...
@@ -164,7 +176,7 @@ export const formProps: FormProps = {
],
],
},
},
{
{
span
:
8
,
span
:
6
,
list
:
[
list
:
[
{
{
key
:
'8d9ef135306242729fb4673b9e2dd918'
,
key
:
'8d9ef135306242729fb4673b9e2dd918'
,
...
@@ -202,7 +214,7 @@ export const formProps: FormProps = {
...
@@ -202,7 +214,7 @@ export const formProps: FormProps = {
],
],
},
},
{
{
span
:
8
,
span
:
6
,
list
:
[
list
:
[
{
{
key
:
'6636f959cd3a4c239aeb3ab43505a27b'
,
key
:
'6636f959cd3a4c239aeb3ab43505a27b'
,
...
@@ -229,6 +241,58 @@ export const formProps: FormProps = {
...
@@ -229,6 +241,58 @@ export const formProps: FormProps = {
},
},
],
],
},
},
{
span
:
6
,
list
:
[
{
key
:
'2fbc5d1e99af41beb0232f448f39432f'
,
field
:
'productType'
,
label
:
'产品类型'
,
type
:
'select'
,
component
:
'XjrSelect'
,
colProps
:
{
span
:
24
},
componentProps
:
{
width
:
'100%'
,
span
:
7
,
placeholder
:
'请选择下拉选择'
,
showLabel
:
true
,
showSearch
:
false
,
isMultiple
:
false
,
clearable
:
false
,
disabled
:
false
,
staticOptions
:
[
{
key
:
1
,
label
:
'Option 1'
,
value
:
'Option 1'
},
{
key
:
2
,
label
:
'Option 2'
,
value
:
'Option 2'
},
{
key
:
3
,
label
:
'Option 3'
,
value
:
'Option 3'
},
],
defaultSelect
:
''
,
datasourceType
:
'api'
,
params
:
null
,
labelField
:
'label'
,
valueField
:
'value'
,
apiConfig
:
{
path
:
'/jcxx/cplx/getAllCPLX'
,
method
:
'GET'
,
apiId
:
'd0471a2c71d242ebbdc3ce88e00f8008'
,
apiParams
:
[
{
key
:
'1'
,
title
:
'Query Params'
,
tableInfo
:
[]
},
{
key
:
'2'
,
title
:
'Header'
,
tableInfo
:
[]
},
{
key
:
'3'
,
title
:
'Body'
},
],
script
:
"var sql='SELECT id as value, cm as label FROM mes_base_cplx WHERE delete_mark = 0 ORDER BY pid ASC, paixu ASC';
\
r
\
nreturn db.select(sql)"
,
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
],
],
componentProps
:
{
componentProps
:
{
gutter
:
16
,
gutter
:
16
,
...
...
xjrsoft-vue3/src/views/jcsj/gylx/index.vue
View file @
adfd4b15
This diff is collapsed.
Click to expand it.
xjrsoft-vue3/src/views/scgl/scrw/components/Form.vue
View file @
adfd4b15
This diff is collapsed.
Click to expand it.
xjrsoft-vue3/src/views/scgl/scrw/components/ScrwModal.vue
View file @
adfd4b15
<
template
>
<
template
>
<BasicModal
<BasicModal
:height=
"1080"
:height=
"1080"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
v-bind=
"$attrs"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
</BasicModal>
</BasicModal>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
...
@@ -20,14 +19,11 @@
...
@@ -20,14 +19,11 @@
import
{
formProps
}
from
'./config'
;
import
{
formProps
}
from
'./config'
;
import
ModalForm
from
'./Form.vue'
;
import
ModalForm
from
'./Form.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
notification
}
=
useMessage
();
const
{
notification
}
=
useMessage
();
const
formRef
=
ref
();
const
formRef
=
ref
();
const
isCopy
=
ref
<
boolean
>
(
false
)
const
isCopy
=
ref
<
boolean
>
(
false
)
;
const
state
=
reactive
({
const
state
=
reactive
({
formModel
:
{},
formModel
:
{},
isUpdate
:
true
,
isUpdate
:
true
,
...
@@ -41,10 +37,11 @@
...
@@ -41,10 +37,11 @@
await
handleInner
(
data
);
await
handleInner
(
data
);
});
});
const
getTitle
=
computed
(()
=>
(
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
));
const
getTitle
=
computed
(()
=>
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
,
);
async
function
handleInner
(
data
)
{
async
function
handleInner
(
data
){
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isView
=
!!
data
?.
isView
;
state
.
isView
=
!!
data
?.
isView
;
isCopy
.
value
=
!!
data
?.
isCopy
;
isCopy
.
value
=
!!
data
?.
isCopy
;
...
@@ -56,7 +53,8 @@
...
@@ -56,7 +53,8 @@
showOkBtn
:
!
state
.
isView
,
showOkBtn
:
!
state
.
isView
,
canFullscreen
:
true
,
canFullscreen
:
true
,
width
:
1920
,
width
:
1920
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
});
});
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
...
@@ -68,10 +66,9 @@
...
@@ -68,10 +66,9 @@
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
}
else
{
}
else
{
formRef
.
value
.
resetFields
();
formRef
.
value
.
resetFields
();
}
}
}
}
async
function
saveModal
()
{
async
function
saveModal
()
{
let
saveSuccess
=
false
;
let
saveSuccess
=
false
;
try
{
try
{
...
@@ -94,14 +91,14 @@
...
@@ -94,14 +91,14 @@
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
if
(
error
)
{
if
(
error
)
{
let
errorFields
=
error
[
"errorFields"
];
let
errorFields
=
error
[
'errorFields'
];
if
(
Array
.
isArray
(
errorFields
)
&&
errorFields
.
length
>
0
)
{
if
(
Array
.
isArray
(
errorFields
)
&&
errorFields
.
length
>
0
)
{
let
errorInfos
=
errorFields
[
0
][
"errors"
];
let
errorInfos
=
errorFields
[
0
][
'errors'
];
if
(
Array
.
isArray
(
errorInfos
)
&&
errorInfos
.
length
>
0
)
{
if
(
Array
.
isArray
(
errorInfos
)
&&
errorInfos
.
length
>
0
)
{
let
description
=
errorInfos
[
0
];
let
description
=
errorInfos
[
0
];
notification
.
error
({
notification
.
error
({
message
:
t
(
'提示'
),
message
:
t
(
'提示'
),
description
:
"物料清单列表"
+
description
,
description
:
'物料清单列表'
+
description
,
});
});
}
}
}
}
...
@@ -136,9 +133,7 @@
...
@@ -136,9 +133,7 @@
emit
(
'success'
);
emit
(
'success'
);
}
}
}
finally
{
}
finally
{
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
}
}
}
}
...
@@ -146,6 +141,4 @@
...
@@ -146,6 +141,4 @@
formRef
.
value
.
resetFields
();
formRef
.
value
.
resetFields
();
closeModal
();
closeModal
();
}
}
</
script
>
</
script
>
xjrsoft-vue3/src/views/scgl/scrw/components/config.ts
View file @
adfd4b15
import
{
FormProps
,
FormSchema
}
from
'/@/components/Form'
;
import
{
FormProps
,
FormSchema
}
from
'/@/components/Form'
;
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
uploadApi
}
from
"/@/api/sys/upload"
;
import
{
uploadApi
}
from
'/@/api/sys/upload'
;
export
const
searchFormSchema
:
FormSchema
[]
=
[
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
{
...
@@ -170,7 +170,7 @@ export const columns: BasicColumn[] = [
...
@@ -170,7 +170,7 @@ export const columns: BasicColumn[] = [
styleConfig
:
undefined
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
listStyle
:
undefined
,
}
}
,
];
];
//表头合并配置
//表头合并配置
export
const
headerMergingData
=
[];
export
const
headerMergingData
=
[];
...
@@ -610,7 +610,7 @@ export const formProps: FormProps = {
...
@@ -610,7 +610,7 @@ export const formProps: FormProps = {
{
{
span
:
6
,
span
:
6
,
list
:
[
list
:
[
/* {
/* {
key: 'eb29665fc1e3453d9ef8aa88f8dfac0c',
key: 'eb29665fc1e3453d9ef8aa88f8dfac0c',
field: 'zzl',
field: 'zzl',
label: '铸造量',
label: '铸造量',
...
@@ -791,7 +791,6 @@ export const formProps: FormProps = {
...
@@ -791,7 +791,6 @@ export const formProps: FormProps = {
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
},
},
],
],
},
},
{
{
...
@@ -891,14 +890,11 @@ export const formProps: FormProps = {
...
@@ -891,14 +890,11 @@ export const formProps: FormProps = {
style
:
{
width
:
'100%'
},
style
:
{
width
:
'100%'
},
},
},
},
},
],
],
},
},
{
{
span
:
6
,
span
:
6
,
list
:
[
list
:
[],
],
},
},
],
],
componentProps
:
{
componentProps
:
{
...
@@ -988,6 +984,14 @@ export const formProps: FormProps = {
...
@@ -988,6 +984,14 @@ export const formProps: FormProps = {
width
:
150
,
width
:
150
,
component
:
'6baebd752fae4267aa0ce0a684aa3a1c'
,
component
:
'6baebd752fae4267aa0ce0a684aa3a1c'
,
},
},
{
name
:
'routing_id'
,
tableTitle
:
'工艺路线'
,
bindField
:
'gylx'
,
show
:
true
,
width
:
150
,
component
:
'90df3bd996a3469789d4557edf80aca7'
,
},
],
],
},
},
dicOptions
:
[],
dicOptions
:
[],
...
@@ -1084,7 +1088,6 @@ export const formProps: FormProps = {
...
@@ -1084,7 +1088,6 @@ export const formProps: FormProps = {
},
},
],
],
},
},
],
],
componentProps
:
{
componentProps
:
{
gutter
:
16
,
gutter
:
16
,
...
@@ -1224,7 +1227,8 @@ export const formProps: FormProps = {
...
@@ -1224,7 +1227,8 @@ export const formProps: FormProps = {
},
},
],
],
},
},
{
span
:
6
,
{
span
:
6
,
list
:
[
list
:
[
{
{
key
:
'v2n5h0j9v1k1b5n6n7i2a1d8t8y4x8s7'
,
key
:
'v2n5h0j9v1k1b5n6n7i2a1d8t8y4x8s7'
,
...
@@ -1274,7 +1278,7 @@ export const formProps: FormProps = {
...
@@ -1274,7 +1278,7 @@ export const formProps: FormProps = {
style
:
{
width
:
'100%'
},
style
:
{
width
:
'100%'
},
},
},
},
},
]
]
,
},
},
{
span
:
6
,
list
:
[]
},
{
span
:
6
,
list
:
[]
},
],
],
...
...
xjrsoft-vue3/src/views/scgl/scrw/components/workflowPermission.ts
View file @
adfd4b15
export
const
permissionList
=
[
export
const
permissionList
=
[
{
{
required
:
false
,
required
:
false
,
view
:
true
,
view
:
true
,
...
...
xjrsoft-vue3/src/views/scgl/scrw/index.vue
View file @
adfd4b15
This diff is collapsed.
Click to expand it.
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