|
@@ -31,7 +31,7 @@
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="表单权限">
|
|
|
+ <el-form-item label="表单权限" v-if="processType === 'main'">
|
|
|
<el-table ref="multipleTableRef" :data="form.extendConfig.formConfig" style="width: 100%" border>
|
|
|
<el-table-column property="label" label="表单字段" align="center" />
|
|
|
<el-table-column align="center">
|
|
@@ -86,7 +86,7 @@ export default {
|
|
|
/*Plus() {
|
|
|
return Plus
|
|
|
},*/
|
|
|
- ...mapState(useFlowStore, ['processForm']) //映射函数,取出processForm
|
|
|
+ ...mapState(useFlowStore, ['processForm', 'processType']) //映射函数,取出processForm\processType
|
|
|
},
|
|
|
watch: {
|
|
|
modelValue() {
|
|
@@ -101,18 +101,20 @@ export default {
|
|
|
if (this.disabled) return
|
|
|
this.form = JSON.parse(JSON.stringify(this.nodeConfig))
|
|
|
/* 自定义表单权限 - 发起人*/
|
|
|
- const { formStructure } = JSON.parse(this.processForm)
|
|
|
- const formConfig = this.form.extendConfig?.formConfig || []
|
|
|
- const operateTable = (formStructure?.fields || []).map(item => {
|
|
|
- let opera = '1'
|
|
|
- formConfig.map(i => {
|
|
|
- if (item.id === i.id) {
|
|
|
- opera = i.opera
|
|
|
- }
|
|
|
+ if (this.processType === 'main') {
|
|
|
+ const { formStructure } = JSON.parse(this.processForm)
|
|
|
+ const formConfig = this.form.extendConfig?.formConfig || []
|
|
|
+ const operateTable = (formStructure?.fields || []).map(item => {
|
|
|
+ let opera = '1'
|
|
|
+ formConfig.map(i => {
|
|
|
+ if (item.id === i.id) {
|
|
|
+ opera = i.opera
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return { label: item.label, id: item.id, opera: opera }
|
|
|
})
|
|
|
- return { label: item.label, id: item.id, opera: opera }
|
|
|
- })
|
|
|
- this.form.extendConfig = { formConfig: operateTable }
|
|
|
+ this.form.extendConfig = { formConfig: operateTable }
|
|
|
+ }
|
|
|
/* 自定义表单权限 - 发起人*/
|
|
|
this.isEditTitle = false
|
|
|
this.drawer = true
|