|
@@ -61,17 +61,43 @@
|
|
|
<el-input size="mini" v-model="form.provenance" placeholder="请输入" :disabled="type=='find'"></el-input>
|
|
<el-input size="mini" v-model="form.provenance" placeholder="请输入" :disabled="type=='find'"></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="item flex-vertical-center-l" v-if="showPurposeType">
|
|
|
|
|
- <span></span>
|
|
|
|
|
- <div class="name"></div>
|
|
|
|
|
- <div class="input">
|
|
|
|
|
- <el-checkbox size="mini" :value="form.purposeType === '1'" @change="form.purposeType = $event ? '1' : '0'">统建处方</el-checkbox>
|
|
|
|
|
|
|
+ <template v-if="showPurposeType">
|
|
|
|
|
+ <div class="item flex-vertical-center-l">
|
|
|
|
|
+ <span></span>
|
|
|
|
|
+ <div class="name"></div>
|
|
|
|
|
+ <div class="input">
|
|
|
|
|
+ <el-checkbox size="mini" :value="isPurposeType" :disabled="!!medicineLength"
|
|
|
|
|
+ @change="form.purposeType = $event ? '1' : '0';isPurposeType && getHospitalCategory();"
|
|
|
|
|
+ >统建处方</el-checkbox>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ <template v-if="isPurposeType">
|
|
|
|
|
+ <div class="item flex-vertical-center-l">
|
|
|
|
|
+ <span></span>
|
|
|
|
|
+ <div class="name">医派:</div>
|
|
|
|
|
+ <div class="input">
|
|
|
|
|
+ <el-select v-model="form.sectCategory" @change="getHospitalDepartment(form.sectCategory)"
|
|
|
|
|
+ placeholder="请选择" size="mini" clearable>
|
|
|
|
|
+ <el-option v-for="item in hospitalCategory" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="item flex-vertical-center-l">
|
|
|
|
|
+ <span></span>
|
|
|
|
|
+ <div class="name">科室:</div>
|
|
|
|
|
+ <div class="input">
|
|
|
|
|
+ <el-select v-model="form.sectDept"
|
|
|
|
|
+ placeholder="请选择" size="small" clearable>
|
|
|
|
|
+ <el-option v-for="item in hospitalDepartment" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="bottom">
|
|
<div class="bottom">
|
|
|
- <MedicineAccord></MedicineAccord>
|
|
|
|
|
|
|
+ <MedicineAccord @length="medicineLength = $event"></MedicineAccord>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="topForm flex-vertical-center-l">
|
|
<div class="topForm flex-vertical-center-l">
|
|
|
<div class="item flex-vertical-center-l">
|
|
<div class="item flex-vertical-center-l">
|
|
@@ -198,7 +224,7 @@ import {
|
|
|
customerQuery
|
|
customerQuery
|
|
|
} from "@/api/diagnosis.js";
|
|
} from "@/api/diagnosis.js";
|
|
|
import MedicineAccord from "../../components/MedicineAccord.vue";
|
|
import MedicineAccord from "../../components/MedicineAccord.vue";
|
|
|
-import { getSelectType } from "@/api/city.js";
|
|
|
|
|
|
|
+import {getHospitalCategory, getHospitalDepartment, getSelectType} from "@/api/city.js";
|
|
|
export default {
|
|
export default {
|
|
|
props: {
|
|
props: {
|
|
|
showBtn: {
|
|
showBtn: {
|
|
@@ -211,12 +237,20 @@ export default {
|
|
|
TCMDiagnosis
|
|
TCMDiagnosis
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
|
|
+ isPurposeType() {
|
|
|
|
|
+ return this.form.purposeType === '1';
|
|
|
|
|
+ },
|
|
|
showPurposeType() {
|
|
showPurposeType() {
|
|
|
return this.showBtn
|
|
return this.showBtn
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ hospitalCategory: [],
|
|
|
|
|
+ hospitalDepartment: [],
|
|
|
|
|
+
|
|
|
|
|
+ medicineLength: 0,
|
|
|
|
|
+
|
|
|
shareSelect: [], // 共享至选择器
|
|
shareSelect: [], // 共享至选择器
|
|
|
doseTypeList: [], // 剂型选择器
|
|
doseTypeList: [], // 剂型选择器
|
|
|
recipeUseList: [], // 处方用法
|
|
recipeUseList: [], // 处方用法
|
|
@@ -242,6 +276,8 @@ export default {
|
|
|
efficacy: "", // 功效
|
|
efficacy: "", // 功效
|
|
|
provenance: "", // 处方出处
|
|
provenance: "", // 处方出处
|
|
|
purposeType: "0", // 用途类型 1 八病九方
|
|
purposeType: "0", // 用途类型 1 八病九方
|
|
|
|
|
+ sectCategory: '', // 医派
|
|
|
|
|
+ sectDept: '', // 科室
|
|
|
|
|
|
|
|
times: "", // 频次
|
|
times: "", // 频次
|
|
|
recipeUse: "", // 处方用法
|
|
recipeUse: "", // 处方用法
|
|
@@ -299,10 +335,20 @@ export default {
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
if (this.$route.query.pid) {
|
|
if (this.$route.query.pid) {
|
|
|
- this.getAccordDetail();
|
|
|
|
|
|
|
+ this.getAccordDetail().then(() => {
|
|
|
|
|
+ if (this.isPurposeType) this.getHospitalCategory().then(() => this.getHospitalDepartment());
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ async getHospitalCategory() {
|
|
|
|
|
+ this.hospitalCategory = await getHospitalCategory();
|
|
|
|
|
+ },
|
|
|
|
|
+ async getHospitalDepartment() {
|
|
|
|
|
+ this.hospitalDepartment = await getHospitalDepartment({hospital: this.form.sectCategory || ''});
|
|
|
|
|
+
|
|
|
|
|
+ if (!this.hospitalDepartment.find(item => item.id === this.form.sectDept)) this.form.sectDept = '';
|
|
|
|
|
+ },
|
|
|
// 保存按钮点击
|
|
// 保存按钮点击
|
|
|
save() {
|
|
save() {
|
|
|
if (this.form.name == "") {
|
|
if (this.form.name == "") {
|
|
@@ -630,6 +676,8 @@ export default {
|
|
|
effect: this.form.efficacy,
|
|
effect: this.form.efficacy,
|
|
|
provenance: this.showPurposeType ? this.form.provenance : '0',
|
|
provenance: this.showPurposeType ? this.form.provenance : '0',
|
|
|
purposeType: this.form.purposeType,
|
|
purposeType: this.form.purposeType,
|
|
|
|
|
+ sectCategory: this.form.sectCategory,
|
|
|
|
|
+ sectDept: this.form.sectDept,
|
|
|
frequency: this.form.times,
|
|
frequency: this.form.times,
|
|
|
name: this.form.name,
|
|
name: this.form.name,
|
|
|
pinyincode: this.form.pinyin,
|
|
pinyincode: this.form.pinyin,
|
|
@@ -701,6 +749,8 @@ export default {
|
|
|
efficacy: res.Data.effect, // 功效
|
|
efficacy: res.Data.effect, // 功效
|
|
|
provenance: res.Data.provenance, // 处方出处
|
|
provenance: res.Data.provenance, // 处方出处
|
|
|
purposeType: res.Data.purposeType, // 用途类型 1 八病九方
|
|
purposeType: res.Data.purposeType, // 用途类型 1 八病九方
|
|
|
|
|
+ sectCategory: res.Data.sectCategory,
|
|
|
|
|
+ sectDept: res.Data.sectDept,
|
|
|
// wubi: res.Data.wubicode, // 五笔
|
|
// wubi: res.Data.wubicode, // 五笔
|
|
|
// pinyin: res.Data.pinyincode, // 拼音
|
|
// pinyin: res.Data.pinyincode, // 拼音
|
|
|
times: res.Data.frequency, // 频次
|
|
times: res.Data.frequency, // 频次
|