Browse Source

修改医院信息医院内容回显

master
aBin 4 years ago
parent
commit
0c1297c13d
  1. 20
      src/components/RightPage/RightPage.vue

20
src/components/RightPage/RightPage.vue

@ -56,7 +56,7 @@
/>
</a-form-item>
<a-form-item label="医院等级">
<a-select placeholder="医院等级" allow-clear @change="changeProvince">
<a-select :value="levelId" placeholder="医院等级" allow-clear @change="changeProvince">
<a-select-option v-for="(item, index) in level" :value="item.levelId" :key="index"> {{ item.name }} </a-select-option>
</a-select>
</a-form-item>
@ -92,7 +92,7 @@ export default {
provinceId: '',
cityId: '',
countyId: '',
id: ''
id: '',
};
},
computed: { ...mapState('home', ['hospitalInfo', 'level', 'area']) },
@ -108,21 +108,15 @@ export default {
//
async queryHospitalById() {
try {
const params = {
param: {
id: this.hospitalInfo.id
},
};
const params = { param: { id: this.hospitalInfo.id } };
const res = await queryHospitalById(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.$message.success('查询成功');
this.areaId[0] = data.cityId;
this.areaId[1] = data.countyId;
this.cityId = data.cityId;
this.countyId = data.countyId;
this.levelId = data.levelId;
this.name = data.name;
this.hospitalName = data.name;
this.visible4 = true;
} else {
this.$message.warning(msg);
@ -151,9 +145,7 @@ export default {
this.$emit('getHosList');
this.visible4 = false;
this.cityId = '';
this.countyId = '',
this.levelId = '',
this.name = ''
(this.countyId = ''), (this.levelId = ''), (this.name = '');
} else {
this.$message.warning(msg);
}
@ -162,6 +154,8 @@ export default {
}
},
changeArea(e) {
console.log('e: ', e);
this.areaId = e;
this.cityId = e[0];
this.countyId = e[1];
},

Loading…
Cancel
Save