|
@@ -16,6 +16,7 @@
|
|
|
v-model="key1"
|
|
v-model="key1"
|
|
|
ref="zybm"
|
|
ref="zybm"
|
|
|
@input="getDiseaseList(key1)"
|
|
@input="getDiseaseList(key1)"
|
|
|
|
|
+ @focus="handleFocus('bm')"
|
|
|
@keydown.enter.native="handleEnter('bm')"
|
|
@keydown.enter.native="handleEnter('bm')"
|
|
|
>
|
|
>
|
|
|
<div slot="suffix" class="suffix">
|
|
<div slot="suffix" class="suffix">
|
|
@@ -28,7 +29,7 @@
|
|
|
v-for="item in diseaseList"
|
|
v-for="item in diseaseList"
|
|
|
:key="item.$uid"
|
|
:key="item.$uid"
|
|
|
:class="{
|
|
:class="{
|
|
|
- active: diseaseCode === item.$code
|
|
|
|
|
|
|
+ active: name === item.$name
|
|
|
}"
|
|
}"
|
|
|
@click="handleBm(item)"
|
|
@click="handleBm(item)"
|
|
|
>{{ item.$name }}</li>
|
|
>{{ item.$name }}</li>
|
|
@@ -51,6 +52,7 @@
|
|
|
v-model="key2"
|
|
v-model="key2"
|
|
|
ref="zhengxing"
|
|
ref="zhengxing"
|
|
|
@input="getSymptomList(key2)"
|
|
@input="getSymptomList(key2)"
|
|
|
|
|
+ @focus="handleFocus('zx')"
|
|
|
@keydown.enter.native="handleEnter('zx')"
|
|
@keydown.enter.native="handleEnter('zx')"
|
|
|
>
|
|
>
|
|
|
<div slot="suffix" class="suffix">
|
|
<div slot="suffix" class="suffix">
|
|
@@ -63,7 +65,7 @@
|
|
|
v-for="item in symptomList"
|
|
v-for="item in symptomList"
|
|
|
:key="item.$uid"
|
|
:key="item.$uid"
|
|
|
:class="{
|
|
:class="{
|
|
|
- active: zhengxingid === item.$code,
|
|
|
|
|
|
|
+ active: syndrome === item.$name,
|
|
|
matched: item.isMatched
|
|
matched: item.isMatched
|
|
|
}"
|
|
}"
|
|
|
@click="handleZx(item)"
|
|
@click="handleZx(item)"
|
|
@@ -82,11 +84,12 @@
|
|
|
<el-popover placement="bottom" width="180" trigger="focus" :close-delay="100" v-model="popoverZF">
|
|
<el-popover placement="bottom" width="180" trigger="focus" :close-delay="100" v-model="popoverZF">
|
|
|
<el-input
|
|
<el-input
|
|
|
:size="size" :class="{invalid: therapy && invalid_therapy}"
|
|
:size="size" :class="{invalid: therapy && invalid_therapy}"
|
|
|
- slot="reference" :readonly="therapySearchDisabled"
|
|
|
|
|
|
|
+ slot="reference"
|
|
|
:placeholder="key3?key3:'中医治法'"
|
|
:placeholder="key3?key3:'中医治法'"
|
|
|
v-model="key3"
|
|
v-model="key3"
|
|
|
ref="zhifa"
|
|
ref="zhifa"
|
|
|
@input="getTherapyList(key3)"
|
|
@input="getTherapyList(key3)"
|
|
|
|
|
+ @focus="handleFocus('zf')"
|
|
|
@keydown.enter.native="handleEnter('zf')"
|
|
@keydown.enter.native="handleEnter('zf')"
|
|
|
>
|
|
>
|
|
|
<div slot="suffix" class="suffix">
|
|
<div slot="suffix" class="suffix">
|
|
@@ -99,7 +102,8 @@
|
|
|
v-for="item in therapyList"
|
|
v-for="item in therapyList"
|
|
|
:key="item.$uid"
|
|
:key="item.$uid"
|
|
|
:class="{
|
|
:class="{
|
|
|
- active: therapy === item.$name
|
|
|
|
|
|
|
+ active: therapy === item.$name,
|
|
|
|
|
+ matched: item.isMatched
|
|
|
}"
|
|
}"
|
|
|
@click="handleZf(item)"
|
|
@click="handleZf(item)"
|
|
|
>{{ item.$name }}</li>
|
|
>{{ item.$name }}</li>
|
|
@@ -139,7 +143,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- therapySearchDisabled: false,
|
|
|
|
|
invalid_disease: false,
|
|
invalid_disease: false,
|
|
|
invalid_symptom: false,
|
|
invalid_symptom: false,
|
|
|
invalid_therapy: false,
|
|
invalid_therapy: false,
|
|
@@ -196,7 +199,7 @@ export default {
|
|
|
this.invalid_symptom = false;
|
|
this.invalid_symptom = false;
|
|
|
this.syndrome = "";
|
|
this.syndrome = "";
|
|
|
this.zhengxingid = "";
|
|
this.zhengxingid = "";
|
|
|
- } else if (this.therapySearchDisabled) this.getTherapiesBySymptom();
|
|
|
|
|
|
|
+ }
|
|
|
if (!value && oldVal) {
|
|
if (!value && oldVal) {
|
|
|
this.getSymptomList();
|
|
this.getSymptomList();
|
|
|
this.getTherapyList();
|
|
this.getTherapyList();
|
|
@@ -204,12 +207,15 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
key3: {
|
|
key3: {
|
|
|
- handler: function() {
|
|
|
|
|
|
|
+ handler: function(value, oldVal) {
|
|
|
if (this.key3 == "") {
|
|
if (this.key3 == "") {
|
|
|
this.invalid_therapy = false;
|
|
this.invalid_therapy = false;
|
|
|
this.therapy = "";
|
|
this.therapy = "";
|
|
|
this.therapyCode = "";
|
|
this.therapyCode = "";
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!value && oldVal) {
|
|
|
|
|
+ this.getTherapyList();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
patiensMsg: {
|
|
patiensMsg: {
|
|
@@ -243,6 +249,16 @@ export default {
|
|
|
...mapGetters(["getPatiensInfo", "getOutpatientDiagnosis"])
|
|
...mapGetters(["getPatiensInfo", "getOutpatientDiagnosis"])
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * focus 事件
|
|
|
|
|
+ * @param {'bm'|'zx'|'zf'} type
|
|
|
|
|
+ */
|
|
|
|
|
+ handleFocus(type) {
|
|
|
|
|
+ console.log(type);
|
|
|
|
|
+ if (type === 'bm' && this.diseaseList.length === 0) this.getDiseaseList(this.key1);
|
|
|
|
|
+ else if (type === 'zx' && this.symptomList.length === 0) this.getSymptomList(this.key2);
|
|
|
|
|
+ else if (type === 'zf' && this.therapyList.length === 0) this.getTherapyList(this.key3);
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* enter事件
|
|
* enter事件
|
|
|
* @param {'bm'|'zx'|'zf'} type
|
|
* @param {'bm'|'zx'|'zf'} type
|
|
@@ -296,9 +312,10 @@ export default {
|
|
|
setParams(data) {
|
|
setParams(data) {
|
|
|
this.name = data.namemedicine || "";
|
|
this.name = data.namemedicine || "";
|
|
|
this.zy_dise_id = data.disid || "";
|
|
this.zy_dise_id = data.disid || "";
|
|
|
|
|
+ this.diseaseCode = data.disCode || "";
|
|
|
this.zhengxingid = data.symptomid || "";
|
|
this.zhengxingid = data.symptomid || "";
|
|
|
- this.therapyCode = data.therapyCode || '';
|
|
|
|
|
this.syndrome = data.syndrometypes || "";
|
|
this.syndrome = data.syndrometypes || "";
|
|
|
|
|
+ this.therapyCode = data.therapyCode || '';
|
|
|
this.therapy = data.treatment || "";
|
|
this.therapy = data.treatment || "";
|
|
|
this.key1 = this.name || "";
|
|
this.key1 = this.name || "";
|
|
|
this.key2 = this.syndrome || "";
|
|
this.key2 = this.syndrome || "";
|
|
@@ -342,7 +359,6 @@ export default {
|
|
|
|
|
|
|
|
this.clearZf();
|
|
this.clearZf();
|
|
|
this.$refs.zhifa.focus();
|
|
this.$refs.zhifa.focus();
|
|
|
- await this.getTherapiesBySymptom();
|
|
|
|
|
await this.getTherapyList();
|
|
await this.getTherapyList();
|
|
|
},
|
|
},
|
|
|
handleZf(item) {
|
|
handleZf(item) {
|
|
@@ -381,7 +397,6 @@ export default {
|
|
|
disCode: this.diseaseCode,
|
|
disCode: this.diseaseCode,
|
|
|
})
|
|
})
|
|
|
this.symptomList = list;
|
|
this.symptomList = list;
|
|
|
- await this.getTherapiesBySymptom();
|
|
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 获取治法
|
|
* 获取治法
|
|
@@ -389,26 +404,14 @@ export default {
|
|
|
* @return {Promise<void>}
|
|
* @return {Promise<void>}
|
|
|
*/
|
|
*/
|
|
|
async getTherapyList(keyword) {
|
|
async getTherapyList(keyword) {
|
|
|
- if (this.therapySearchDisabled) {
|
|
|
|
|
- await this.getTherapiesBySymptom();
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
const {total, list} = await getTherapyListMethod(1, 9999, {
|
|
const {total, list} = await getTherapyListMethod(1, 9999, {
|
|
|
keyword,
|
|
keyword,
|
|
|
|
|
+ disCode: this.diseaseCode,
|
|
|
|
|
+ symptomCode: this.zhengxingid,
|
|
|
symid: this.zhengxingid,
|
|
symid: this.zhengxingid,
|
|
|
- }).catch(error => {
|
|
|
|
|
- if (error.isAxiosError && error.message === `Request failed with status code 404`) {
|
|
|
|
|
- this.therapySearchDisabled = true;
|
|
|
|
|
- this.getTherapiesBySymptom();
|
|
|
|
|
- }
|
|
|
|
|
- throw error;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
this.therapyList = list;
|
|
this.therapyList = list;
|
|
|
},
|
|
},
|
|
|
- async getTherapiesBySymptom() {
|
|
|
|
|
- const option = findArray(this.symptomList, ['$code', this.zhengxingid]);
|
|
|
|
|
- this.therapyList = option ? option.therapies : [];
|
|
|
|
|
- },
|
|
|
|
|
// 新增处方来源统计
|
|
// 新增处方来源统计
|
|
|
async addRecipeFrom() {
|
|
async addRecipeFrom() {
|
|
|
let res = await addRecipeFrom({
|
|
let res = await addRecipeFrom({
|