省市区

This commit is contained in:
徐哼唧L
2024-01-18 16:37:19 +08:00
parent ac20aa9c9a
commit ac5aa564b1
3 changed files with 144 additions and 157 deletions

View File

@@ -25,7 +25,8 @@
</el-table-column>
<el-table-column label="图片" align="center">
<template slot-scope="scope">
<img v-for="item in scope.row.imgList" :src="item.url" alt="" style="width:70px;height:100px;margin: 0 5px;" />
<img v-for="item in scope.row.imgList" :src="item.url" alt=""
style="width:70px;height:100px;margin: 0 5px;" />
</template>
</el-table-column>
<!-- <el-table-column label="内容" align="center" prop="content">
@@ -58,8 +59,8 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog :visible.sync="addOrUpdateVisible" :close-on-click-modal="false" :append-to-body="true" :title="titlesub" width="50%"
@close="cancleClose">
<el-dialog :visible.sync="addOrUpdateVisible" :close-on-click-modal="false" :append-to-body="true" :title="titlesub"
width="50%" @close="cancleClose">
<el-form :inline="true" :model="addForm" ref="addFormRef" :rules="addFormRule">
<el-row type="flex" justify="center">
<el-form-item label="姓名" prop="name">
@@ -243,7 +244,7 @@
this.cityEntity = []
console.log('addForm.provinceCode', this.addForm.provId);
this.$http({
url: this.$http.adornUrl(`/api/province/getCityList?provId=${this.addForm.provId}`),
url: this.$http.adornUrl(`/book/medicaldes/getCityByPro?provId=${this.addForm.provId}`),
method: 'post',
}).then(({
data
@@ -316,8 +317,8 @@
},
getprovinceEntity() {
this.$http({
url: this.$http.adornUrl('/api/province/getProvince'),
method: 'get',
url: this.$http.adornUrl('/book/medicaldes/getMedicaldesProList'),
method: 'post',
}).then(({
data
}) => {
@@ -426,7 +427,7 @@
for (var i = 0; i < this.provinceEntity.length; i++) {
for (var j = 0; j < this.provinceEntity[i].cityList.length; j++) {
if (this.provinceEntity[i].cityList[j].cityId == code) {
return this.provinceEntity[i].cityList[j].cityName
return this.provinceEntity[i].provName + ' - ' + this.provinceEntity[i].cityList[j].cityName
}
}
}