|
|
@@ -126,12 +126,20 @@
|
|
|
</el-table>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <!-- 不建议使用复选框 -->
|
|
|
- <el-form-item label="不建议使用" label-width="120px">
|
|
|
- <el-checkbox v-model="formData.notRecommendUse" :disabled="readonly">不建议使用</el-checkbox>
|
|
|
- </el-form-item>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="不建议使用" label-width="90px">
|
|
|
+ <el-checkbox v-model="formData.notRecommendUse" :disabled="readonly" @change="handleNotRecommendChange">不建议使用</el-checkbox>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="" label-width="60px">
|
|
|
+ <el-checkbox v-model="formData.foodAsMedicine" :disabled="readonly" @change="handleFoodAsMedicineChange">完成</el-checkbox>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
- <!-- 医生及药师信息(紧凑三列) -->
|
|
|
+ <!-- 医生及药师信息 -->
|
|
|
<el-divider content-position="left">医生及药师信息</el-divider>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
@@ -204,7 +212,8 @@ export default {
|
|
|
foodAndExerciseGuidance: '',
|
|
|
healingList: [],
|
|
|
noteTaboos: '',
|
|
|
- notRecommendUse: false
|
|
|
+ notRecommendUse: false,
|
|
|
+ foodAsMedicine: false
|
|
|
},
|
|
|
formRules: {
|
|
|
diagnose: [{ required: true, message: '请输入诊断', trigger: 'blur' }],
|
|
|
@@ -280,13 +289,25 @@ export default {
|
|
|
foodAndExerciseGuidance: '',
|
|
|
healingList: [],
|
|
|
noteTaboos: '',
|
|
|
- notRecommendUse: false
|
|
|
+ notRecommendUse: false,
|
|
|
+ foodAsMedicine: false
|
|
|
};
|
|
|
if (!this.readonly) this.addHealingRow();
|
|
|
this.$nextTick(() => {
|
|
|
if (this.$refs.adviceForm) this.$refs.adviceForm.clearValidate();
|
|
|
});
|
|
|
},
|
|
|
+ handleNotRecommendChange(val) {
|
|
|
+ if (val) {
|
|
|
+ this.formData.foodAsMedicine = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ handleFoodAsMedicineChange(val) {
|
|
|
+ if (val) {
|
|
|
+ this.formData.notRecommendUse = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
addHealingRow() {
|
|
|
this.formData.healingList.push({ diagnosisContent: '', suggestTreatment: '' });
|
|
|
},
|
|
|
@@ -361,6 +382,7 @@ export default {
|
|
|
this.formData.foodAndExerciseGuidance = data.foodAndExerciseGuidance || '';
|
|
|
this.formData.noteTaboos = data.noteTaboos || '';
|
|
|
this.formData.notRecommendUse = data.notRecommendUse || false;
|
|
|
+ this.formData.foodAsMedicine = data.foodAsMedicine || false;
|
|
|
if (data.healingAreaJson) {
|
|
|
try {
|
|
|
const list = JSON.parse(data.healingAreaJson);
|
|
|
@@ -392,13 +414,17 @@ export default {
|
|
|
foodAndExerciseGuidance: this.formData.foodAndExerciseGuidance,
|
|
|
healingAreaJson: healingAreaJson,
|
|
|
noteTaboos: this.formData.noteTaboos,
|
|
|
- notRecommendUse: this.formData.notRecommendUse
|
|
|
+ notRecommendUse: this.formData.notRecommendUse,
|
|
|
+ foodAsMedicine: this.formData.foodAsMedicine,
|
|
|
};
|
|
|
this.submitLoading = true;
|
|
|
submitDoctorAdvice(params).then(() => {
|
|
|
this.$message.success('处方建议提交成功');
|
|
|
this.dialogVisible = false;
|
|
|
- this.$emit('success', { notRecommendUse: this.formData.notRecommendUse });
|
|
|
+ this.$emit('success', {
|
|
|
+ notRecommendUse: this.formData.notRecommendUse,
|
|
|
+ foodAsMedicine: this.formData.foodAsMedicine
|
|
|
+ });
|
|
|
}).catch(error => {
|
|
|
console.error('提交失败', error);
|
|
|
this.$message.error('提交失败,请重试');
|