表单权限

This commit is contained in:
Jam committed 2023-03-09 23:37:23 +08:00
1 parent 38835ffe0f
commit 05a125cfa1
2 files changed
+9 -6

No files matched your search

+5 -5
View File
@@ -11,7 +11,7 @@
dense single-line filled
label=""
v-model="formItem.answer"
:readonly="readonly"
:readonly="typeof readonly == 'boolean'? readonly: readonly.indexOf(formItem.id) > -1"
></v-text-field>
<!-- 单选 -->
@@ -21,7 +21,7 @@
:items="formItem.optionList"
dense single-line filled
:rules="validationRules.requireRules"
:readonly="readonly"
:readonly="typeof readonly == 'boolean'? readonly: readonly.indexOf(formItem.id) > -1"
></v-select>
<!-- 多选 -->
@@ -32,7 +32,7 @@
multiple
dense single-line filled
:rules="validationRules.requireRules"
:readonly="readonly"
:readonly="typeof readonly == 'boolean'? readonly: readonly.indexOf(formItem.id) > -1"
></v-select>
<!-- 文本框 -->
@@ -41,8 +41,8 @@
:rules="validationRules.requireRules"
class="jh-v-input" no-resize dense single-line filled
label="备注"
:readonly="readonly"
v-model="formItem.answer"
:readonly="typeof readonly == 'boolean'? readonly: false"
></v-textarea>
<!-- 时间选择 -->
@@ -70,7 +70,7 @@ Vue.component('form-item', {
},
},
readonly: {
type: Boolean,
type: [Array, Boolean],
default: false
}
},
+4 -1
View File
@@ -124,7 +124,7 @@
<!--抽屉表单-->
<v-row class="mt-0 px-4">
<v-col cols="12" sm="12" md="4" v-for="(formItem, index) in updateItem.taskFormInput.formList" :key="index">
<form-item :form-item="formItem" readonly></form-item>
<form-item :form-item="formItem" :readonly="updateItem.readonlyFormIdList"></form-item>
</v-col>
<v-col cols="12" sm="12" md="12">
<span class="jh-input-label">备注</span>
@@ -318,6 +318,9 @@
// ---------- 审核、查看 uiAction >>>>>>>>>>>> --------
async prepareUpdateFormData(funObj) {
this.updateItem = _.cloneDeep(funObj);
this.updateItem.workflowConfig = JSON.parse(funObj.workflowConfig);
this.updateItem.currentNode = this.updateItem.workflowConfig.nodeList.find(e => e.id === this.updateItem.taskConfigId);
this.updateItem.readonlyFormIdList = this.updateItem.taskFormInput.formList.map(form => form.id).filter(formId => this.updateItem.currentNode.formId.indexOf(formId) === -1);
this.updateItem.taskHistoryList = []; // 审核历史
this.updateItem.taskComment = ''; // 备注
this.lineTypeList = []; // 所有操作按钮