|
@@ -9,7 +9,7 @@
|
|
|
<div class="value">
|
|
<div class="value">
|
|
|
<el-popover placement="bottom" width="180" trigger="focus" :close-delay="100">
|
|
<el-popover placement="bottom" width="180" trigger="focus" :close-delay="100">
|
|
|
<el-input
|
|
<el-input
|
|
|
- :class="{invalid: name && !zy_dise_id}"
|
|
|
|
|
|
|
+ :class="{invalid: name && (!zy_dise_id || invalid_dis)}"
|
|
|
:size="size"
|
|
:size="size"
|
|
|
slot="reference"
|
|
slot="reference"
|
|
|
:placeholder="key1?key1:'中医病名'"
|
|
:placeholder="key1?key1:'中医病名'"
|
|
@@ -43,7 +43,7 @@
|
|
|
<div class="value">
|
|
<div class="value">
|
|
|
<el-popover placement="bottom" width="180" trigger="focus" :close-delay="100">
|
|
<el-popover placement="bottom" width="180" trigger="focus" :close-delay="100">
|
|
|
<el-input
|
|
<el-input
|
|
|
- :size="size"
|
|
|
|
|
|
|
+ :size="size" :class="{invalid: syndrome && invalid_symptom}"
|
|
|
slot="reference"
|
|
slot="reference"
|
|
|
:placeholder="key2?key2:'中医证型'"
|
|
:placeholder="key2?key2:'中医证型'"
|
|
|
v-model="key2"
|
|
v-model="key2"
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
getXDiseaseName,
|
|
getXDiseaseName,
|
|
|
getCCardType
|
|
getCCardType
|
|
|
} from "@/api/knowledge.js";
|
|
} from "@/api/knowledge.js";
|
|
|
-import { addDiagnosisData } from "@/api/diagnosis.js";
|
|
|
|
|
|
|
+import {addDiagnosisData2} from '@/api/diagnosis.js';
|
|
|
import { addRecipeFrom } from "@/api/dataAnalysis.js";
|
|
import { addRecipeFrom } from "@/api/dataAnalysis.js";
|
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
|
export default {
|
|
export default {
|
|
@@ -113,6 +113,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ invalid_dis: false,
|
|
|
|
|
+ invalid_symptom: false,
|
|
|
|
|
+
|
|
|
name: "", // 病名
|
|
name: "", // 病名
|
|
|
zy_dise_id: "", // 病名id
|
|
zy_dise_id: "", // 病名id
|
|
|
|
|
|
|
@@ -153,6 +156,7 @@ export default {
|
|
|
key1: {
|
|
key1: {
|
|
|
handler: function() {
|
|
handler: function() {
|
|
|
if (this.key1 == "") {
|
|
if (this.key1 == "") {
|
|
|
|
|
+ this.invalid_dis = false;
|
|
|
this.zy_dise_id = "";
|
|
this.zy_dise_id = "";
|
|
|
this.name = "";
|
|
this.name = "";
|
|
|
}
|
|
}
|
|
@@ -161,6 +165,7 @@ export default {
|
|
|
key2: {
|
|
key2: {
|
|
|
handler: function() {
|
|
handler: function() {
|
|
|
if (this.key2 == "") {
|
|
if (this.key2 == "") {
|
|
|
|
|
+ this.invalid_symptom = false;
|
|
|
this.syndrome = "";
|
|
this.syndrome = "";
|
|
|
this.zhengxingid = "";
|
|
this.zhengxingid = "";
|
|
|
}
|
|
}
|
|
@@ -263,6 +268,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 病名选中
|
|
// 病名选中
|
|
|
handleBm(item) {
|
|
handleBm(item) {
|
|
|
|
|
+ this.invalid_dis = false
|
|
|
this.zy_dise_id = item.disid;
|
|
this.zy_dise_id = item.disid;
|
|
|
this.name = item.disname;
|
|
this.name = item.disname;
|
|
|
this.key1 = item.disname;
|
|
this.key1 = item.disname;
|
|
@@ -292,6 +298,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 证型选中\
|
|
// 证型选中\
|
|
|
handleZx(item) {
|
|
handleZx(item) {
|
|
|
|
|
+ this.invalid_dis = false
|
|
|
this.syndrome = item.symname;
|
|
this.syndrome = item.symname;
|
|
|
this.key2 = item.symname;
|
|
this.key2 = item.symname;
|
|
|
this.zhengxingid = item.symid;
|
|
this.zhengxingid = item.symid;
|
|
@@ -371,20 +378,25 @@ export default {
|
|
|
zhengxing: ""
|
|
zhengxing: ""
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
- let res = await addDiagnosisData(params).catch(() => ({ResultCode: -1}));
|
|
|
|
|
- if (+res.ResultCode === 0) {
|
|
|
|
|
- if (!this.name) {
|
|
|
|
|
- res.ResultCode = -1;
|
|
|
|
|
- res.ResultInfo = `请选择${this.title}病名`;
|
|
|
|
|
- } else if (!this.zy_dise_id) {
|
|
|
|
|
- res.ResultCode = -1;
|
|
|
|
|
- res.ResultInfo = `当前疾病编码与医保不匹配,请更换中医病名等诊断信息!`;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.addRecipeFrom().catch();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (!this.name) throw {message: `请选择${this.title}病名`};
|
|
|
|
|
+ if (!this.zy_dise_id) throw {message: `当前疾病编码与医保不匹配,请更换中医病名等诊断信息!`};
|
|
|
|
|
+ let {mainDiagnosis} = await addDiagnosisData2(params);
|
|
|
|
|
+
|
|
|
|
|
+ this.invalid_dis = !mainDiagnosis.disid;
|
|
|
|
|
+ this.invalid_symptom = !mainDiagnosis.symptomid;
|
|
|
|
|
+ const tips = [
|
|
|
|
|
+ this.invalid_dis ? `${this.title}病名` : '',
|
|
|
|
|
+ this.invalid_symptom ? `证型` : '',
|
|
|
|
|
+ ].filter(Boolean).join(',');
|
|
|
|
|
+ if (tips) throw {message: `当前${tips}与医保不匹配,请更换${tips}等诊断信息!`};
|
|
|
|
|
+
|
|
|
|
|
+ this.addRecipeFrom().catch();
|
|
|
|
|
+ return true
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ this.$message.error(e.message);
|
|
|
}
|
|
}
|
|
|
- if (+res.ResultCode !== 0 && res.ResultInfo) this.$message.error(res.ResultInfo)
|
|
|
|
|
- return +res.ResultCode === 0;
|
|
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|