|
|
@ -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> |
|
|
@ -69,7 +69,7 @@ |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { mapState } from 'vuex'; |
|
|
|
import { queryHospitalInfo, editHospitalInfo, queryHospitalById} from 'config/api'; |
|
|
|
import { queryHospitalInfo, editHospitalInfo, queryHospitalById } from 'config/api'; |
|
|
|
import TreeNode from './TreeNode.vue'; |
|
|
|
|
|
|
|
export default { |
|
|
@ -92,10 +92,10 @@ export default { |
|
|
|
provinceId: '', |
|
|
|
cityId: '', |
|
|
|
countyId: '', |
|
|
|
id: '' |
|
|
|
id: '', |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { ...mapState('home', ['hospitalInfo','level','area']) }, |
|
|
|
computed: { ...mapState('home', ['hospitalInfo', 'level', 'area']) }, |
|
|
|
watch: { |
|
|
|
hospitalInfo() { |
|
|
|
this.getHospitalInfo(); |
|
|
@ -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]; |
|
|
|
}, |
|
|
|