|
@@ -33,6 +33,7 @@
|
|
|
<!-- </el-tooltip>el-tooltip-->
|
|
<!-- </el-tooltip>el-tooltip-->
|
|
|
|
|
|
|
|
<el-select
|
|
<el-select
|
|
|
|
|
+ v-if="!hidePharmacyControl"
|
|
|
v-model="pharmacyId"
|
|
v-model="pharmacyId"
|
|
|
placeholder="请选择药房"
|
|
placeholder="请选择药房"
|
|
|
style="margin-right: 20px; width: 150px"
|
|
style="margin-right: 20px; width: 150px"
|
|
@@ -106,16 +107,23 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
pharmacyId: "",
|
|
pharmacyId: "",
|
|
|
|
|
+ hidePharmacyControl: true,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- let pharmacyId = window.localStorage.getItem("pharmacyId");
|
|
|
|
|
- if (pharmacyId == null) {
|
|
|
|
|
- this.pharmacyId = this.pharmacyList[0].id;
|
|
|
|
|
- window.localStorage.setItem("pharmacyId", this.pharmacyId);
|
|
|
|
|
|
|
+ if (this.hidePharmacyControl) {
|
|
|
|
|
+ window.localStorage.removeItem("pharmacyId");
|
|
|
|
|
+ this.pharmacyId = '';
|
|
|
} else {
|
|
} else {
|
|
|
- this.pharmacyId = Number(pharmacyId);
|
|
|
|
|
|
|
+ let pharmacyId = window.localStorage.getItem("pharmacyId");
|
|
|
|
|
+ if (pharmacyId == null) {
|
|
|
|
|
+ this.pharmacyId = this.pharmacyList[0].id;
|
|
|
|
|
+ window.localStorage.setItem("pharmacyId", this.pharmacyId);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.pharmacyId = Number(pharmacyId);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters(["sidebar", "avatar", "name", "device", "pharmacyList"]),
|
|
...mapGetters(["sidebar", "avatar", "name", "device", "pharmacyList"]),
|