|
@@ -19,7 +19,7 @@
|
|
|
:model.sync="form"
|
|
:model.sync="form"
|
|
|
:rules="rules"
|
|
:rules="rules"
|
|
|
class="config-form"
|
|
class="config-form"
|
|
|
- :class="readonly ? 'readonly-form' : ''"
|
|
|
|
|
|
|
+ :class="internalReadonly ? 'readonly-form' : ''"
|
|
|
@submit.native.prevent
|
|
@submit.native.prevent
|
|
|
>
|
|
>
|
|
|
<div v-if="loadCompleted" class="config-form-container">
|
|
<div v-if="loadCompleted" class="config-form-container">
|
|
@@ -29,16 +29,16 @@
|
|
|
:criterion="configData.criterion || ''"
|
|
:criterion="configData.criterion || ''"
|
|
|
:formulas="configData.formulas || []"
|
|
:formulas="configData.formulas || []"
|
|
|
:references="configData.references || []"
|
|
:references="configData.references || []"
|
|
|
- :readonly="readonly"
|
|
|
|
|
|
|
+ :readonly="internalReadonly"
|
|
|
/>
|
|
/>
|
|
|
- <basic-info :info="form" :readonly="readonly" />
|
|
|
|
|
- <reagent-info :info="form.reagentPoList" :readonly="readonly" />
|
|
|
|
|
|
|
+ <basic-info :info="form" :readonly="internalReadonly" />
|
|
|
|
|
+ <reagent-info :info="form.reagentPoList" :readonly="internalReadonly" />
|
|
|
<param-info
|
|
<param-info
|
|
|
v-if="$utils.isNotEmpty(configData && configData.params)"
|
|
v-if="$utils.isNotEmpty(configData && configData.params)"
|
|
|
:form-id="formId"
|
|
:form-id="formId"
|
|
|
:info="form.shiYanCanShu"
|
|
:info="form.shiYanCanShu"
|
|
|
:config-data="configData.params || []"
|
|
:config-data="configData.params || []"
|
|
|
- :readonly="readonly"
|
|
|
|
|
|
|
+ :readonly="internalReadonly"
|
|
|
@updateParams="handleUpdateParams"
|
|
@updateParams="handleUpdateParams"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
@@ -46,20 +46,20 @@
|
|
|
<experimental-data
|
|
<experimental-data
|
|
|
:exp="form.jiSuanJieGuo"
|
|
:exp="form.jiSuanJieGuo"
|
|
|
:form-id="formId"
|
|
:form-id="formId"
|
|
|
- :readonly="readonly"
|
|
|
|
|
|
|
+ :readonly="internalReadonly"
|
|
|
@export="handleExport"
|
|
@export="handleExport"
|
|
|
@import="handleImport"
|
|
@import="handleImport"
|
|
|
/>
|
|
/>
|
|
|
<precision
|
|
<precision
|
|
|
v-if="$utils.isNotEmpty(form.jiSuanJieGuo)"
|
|
v-if="$utils.isNotEmpty(form.jiSuanJieGuo)"
|
|
|
:info="form.jiSuanJieGuo"
|
|
:info="form.jiSuanJieGuo"
|
|
|
- :readonly="readonly"
|
|
|
|
|
|
|
+ :readonly="internalReadonly"
|
|
|
@recalculate="handleRecalculate"
|
|
@recalculate="handleRecalculate"
|
|
|
/>
|
|
/>
|
|
|
<conclusion
|
|
<conclusion
|
|
|
:result="form.shiYanJieLun"
|
|
:result="form.shiYanJieLun"
|
|
|
:files="form.fuJian"
|
|
:files="form.fuJian"
|
|
|
- :readonly="readonly"
|
|
|
|
|
|
|
+ :readonly="internalReadonly"
|
|
|
@updateData="handleUpdateData"
|
|
@updateData="handleUpdateData"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
@@ -224,6 +224,7 @@ export default {
|
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
|
flowDiagramVisible: false,
|
|
flowDiagramVisible: false,
|
|
|
approvalHistoryVisible: false,
|
|
approvalHistoryVisible: false,
|
|
|
|
|
+ internalReadonly: this.readonly,
|
|
|
pdf: 'pdf',
|
|
pdf: 'pdf',
|
|
|
formLabelWidth: '110px',
|
|
formLabelWidth: '110px',
|
|
|
configData: { methodName: '' },
|
|
configData: { methodName: '' },
|
|
@@ -332,6 +333,14 @@ export default {
|
|
|
visible: {
|
|
visible: {
|
|
|
handler(val) {
|
|
handler(val) {
|
|
|
this.localVisible = val;
|
|
this.localVisible = val;
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ immediate: true
|
|
|
|
|
+ },
|
|
|
|
|
+ //监听 readonly prop 的变化
|
|
|
|
|
+ readonly: {
|
|
|
|
|
+ handler(val) {
|
|
|
|
|
+ this.internalReadonly = val;
|
|
|
},
|
|
},
|
|
|
immediate: true
|
|
immediate: true
|
|
|
}
|
|
}
|
|
@@ -589,7 +598,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
this.$message.success('提交成功');
|
|
this.$message.success('提交成功');
|
|
|
- this.visible = false;
|
|
|
|
|
|
|
+ this.closeDialog();
|
|
|
const id = res.variables.bizKey || '';
|
|
const id = res.variables.bizKey || '';
|
|
|
return this.saveExperimentalData(id,'已编制')
|
|
return this.saveExperimentalData(id,'已编制')
|
|
|
})
|
|
})
|
|
@@ -766,7 +775,8 @@ export default {
|
|
|
exportTemplate({ id: this.formId }).then((res) => {
|
|
exportTemplate({ id: this.formId }).then((res) => {
|
|
|
ActionUtils.download(
|
|
ActionUtils.download(
|
|
|
res.data,
|
|
res.data,
|
|
|
- `${this.configData.methodName}-${this.form.shiYanXiangMu}.xlsx`
|
|
|
|
|
|
|
+ //`${this.configData.methodName}-${this.form.shiYanXiangMu}.xlsx`
|
|
|
|
|
+ `${this.configData.methodName}.xlsx`
|
|
|
)
|
|
)
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
@@ -887,7 +897,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
showToolBarsBtn(key) {
|
|
showToolBarsBtn(key) {
|
|
|
- if (this.readonly && this.params.action !== 'edit') {
|
|
|
|
|
|
|
+ if (this.internalReadonly && this.params.action !== 'edit') {
|
|
|
return !['flowChart','approvalHistory', 'pdf', 'cancel'].includes(key)
|
|
return !['flowChart','approvalHistory', 'pdf', 'cancel'].includes(key)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -899,13 +909,13 @@ export default {
|
|
|
|
|
|
|
|
if (status === '已编制' && this.params.action == 'edit') {
|
|
if (status === '已编制' && this.params.action == 'edit') {
|
|
|
//已编制状态不允许修改表单内容
|
|
//已编制状态不允许修改表单内容
|
|
|
- this.readonly = true
|
|
|
|
|
|
|
+ this.internalReadonly = true
|
|
|
return !['flowChart','approvalHistory', 'pdf', 'cancel', 'save', 'sendBack','doEndProcess', 'submit'].includes(key)
|
|
return !['flowChart','approvalHistory', 'pdf', 'cancel', 'save', 'sendBack','doEndProcess', 'submit'].includes(key)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (status === '已审核' && this.params.action == 'edit') {
|
|
if (status === '已审核' && this.params.action == 'edit') {
|
|
|
//已审核状态不允许修改表单内容
|
|
//已审核状态不允许修改表单内容
|
|
|
- this.readonly = true
|
|
|
|
|
|
|
+ this.internalReadonly = true
|
|
|
return !['flowChart','approvalHistory', 'pdf', 'cancel', 'save', 'sendBack','doEndProcess', 'submit'].includes(key)
|
|
return !['flowChart','approvalHistory', 'pdf', 'cancel', 'save', 'sendBack','doEndProcess', 'submit'].includes(key)
|
|
|
}
|
|
}
|
|
|
|
|
|