|
@@ -4,7 +4,7 @@
|
|
|
:append-to-body="true"
|
|
:append-to-body="true"
|
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
|
custom-class="ele-dialog-form"
|
|
custom-class="ele-dialog-form"
|
|
|
- title="添加事项"
|
|
|
|
|
|
|
+ :title="title"
|
|
|
@update:visible="updateVisible"
|
|
@update:visible="updateVisible"
|
|
|
:maxable="true"
|
|
:maxable="true"
|
|
|
:before-close="handleClose"
|
|
:before-close="handleClose"
|
|
@@ -185,7 +185,9 @@
|
|
|
rulesName: '',
|
|
rulesName: '',
|
|
|
// 任务id
|
|
// 任务id
|
|
|
taskId: null,
|
|
taskId: null,
|
|
|
- itemTaskName: ''
|
|
|
|
|
|
|
+ itemTaskName: '',
|
|
|
|
|
+ // 是否执行中
|
|
|
|
|
+ isUsing: 0
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
@@ -222,7 +224,8 @@
|
|
|
executeMethodOptions: [],
|
|
executeMethodOptions: [],
|
|
|
// 记录规则事项类型,参考字典项:record_rules_item_type
|
|
// 记录规则事项类型,参考字典项:record_rules_item_type
|
|
|
itemTypeOptions: [],
|
|
itemTypeOptions: [],
|
|
|
- dialogLoading: false
|
|
|
|
|
|
|
+ dialogLoading: false,
|
|
|
|
|
+ title: '新增事项'
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -236,9 +239,11 @@
|
|
|
},
|
|
},
|
|
|
openAdd() {
|
|
openAdd() {
|
|
|
this.type = 'add';
|
|
this.type = 'add';
|
|
|
|
|
+ this.title = '新增事项';
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
},
|
|
},
|
|
|
openEdit(row) {
|
|
openEdit(row) {
|
|
|
|
|
+ this.title = '编辑事项';
|
|
|
console.log('row', row);
|
|
console.log('row', row);
|
|
|
this.type = 'edit';
|
|
this.type = 'edit';
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
@@ -267,6 +272,12 @@
|
|
|
},
|
|
},
|
|
|
confirm() {
|
|
confirm() {
|
|
|
console.log('this.formData', this.formData);
|
|
console.log('this.formData', this.formData);
|
|
|
|
|
+
|
|
|
|
|
+ if (this.formData.isUsing) {
|
|
|
|
|
+ this.$message.warning('当前事项正在执行中,无法修改');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 验证表单
|
|
// 验证表单
|
|
|
this.$refs.formRef.validate((valid) => {
|
|
this.$refs.formRef.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -287,11 +298,9 @@
|
|
|
},
|
|
},
|
|
|
// 关闭清空formData
|
|
// 关闭清空formData
|
|
|
handleClose() {
|
|
handleClose() {
|
|
|
- this.visible = false;
|
|
|
|
|
this.formData = JSON.parse(JSON.stringify(this.formBaseData));
|
|
this.formData = JSON.parse(JSON.stringify(this.formBaseData));
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$refs.formRef.clearValidate();
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.$refs.formRef?.clearValidate();
|
|
|
|
|
+ this.visible = false;
|
|
|
},
|
|
},
|
|
|
// 去选择记录规则
|
|
// 去选择记录规则
|
|
|
selectReleaseId() {
|
|
selectReleaseId() {
|