|
@@ -33,7 +33,7 @@
|
|
|
<!-- </el-tooltip>el-tooltip-->
|
|
<!-- </el-tooltip>el-tooltip-->
|
|
|
|
|
|
|
|
<el-select
|
|
<el-select
|
|
|
- v-if="!hidePharmacyControl"
|
|
|
|
|
|
|
+ v-if="!hidePharmacyControl || (onePharmacyHideControl && pharmacyList.length === 1)"
|
|
|
v-model="pharmacyId"
|
|
v-model="pharmacyId"
|
|
|
placeholder="请选择药房"
|
|
placeholder="请选择药房"
|
|
|
style="margin-right: 20px; width: 150px"
|
|
style="margin-right: 20px; width: 150px"
|
|
@@ -107,7 +107,8 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
pharmacyId: "",
|
|
pharmacyId: "",
|
|
|
- hidePharmacyControl: true,
|
|
|
|
|
|
|
+ hidePharmacyControl: false,
|
|
|
|
|
+ onePharmacyHideControl: true,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -116,11 +117,11 @@ export default {
|
|
|
this.pharmacyId = '';
|
|
this.pharmacyId = '';
|
|
|
} else {
|
|
} else {
|
|
|
let pharmacyId = window.localStorage.getItem("pharmacyId");
|
|
let pharmacyId = window.localStorage.getItem("pharmacyId");
|
|
|
- if (pharmacyId == null) {
|
|
|
|
|
|
|
+ if (this.pharmacyList.find(item => item.id == pharmacyId)) {
|
|
|
|
|
+ this.pharmacyId = Number(pharmacyId);
|
|
|
|
|
+ } else {
|
|
|
this.pharmacyId = this.pharmacyList[0].id;
|
|
this.pharmacyId = this.pharmacyList[0].id;
|
|
|
window.localStorage.setItem("pharmacyId", this.pharmacyId);
|
|
window.localStorage.setItem("pharmacyId", this.pharmacyId);
|
|
|
- } else {
|
|
|
|
|
- this.pharmacyId = Number(pharmacyId);
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|