提交 7d03c207 authored 作者: chenweiping's avatar chenweiping

11

上级 e1cb03ec
...@@ -201,6 +201,16 @@ ...@@ -201,6 +201,16 @@
<el-form-item label="标签" prop="lable"> <el-form-item label="标签" prop="lable">
<el-input v-model="form.lable" placeholder="请输入标签" />(多个用英文逗号隔开) <el-input v-model="form.lable" placeholder="请输入标签" />(多个用英文逗号隔开)
</el-form-item> </el-form-item>
<el-form-item label="省市区" >
<el-cascader
size="large"
:options="options"
v-model="selectedOptions"
ref="cascader"
@change="handleChange">
</el-cascader>
</el-form-item>
<el-form-item label="医院地址" prop="addr"> <el-form-item label="医院地址" prop="addr">
<el-input v-model="form.addr" placeholder="请输入医院地址" /> <el-input v-model="form.addr" placeholder="请输入医院地址" />
</el-form-item> </el-form-item>
...@@ -245,6 +255,7 @@ ...@@ -245,6 +255,7 @@
<script> <script>
import { listHospital, getHospital, delHospital, addHospital, updateHospital, exportHospital,statusOptions,changeStatus,dataTypeOptions } from "@/api/backstage/hospital"; import { listHospital, getHospital, delHospital, addHospital, updateHospital, exportHospital,statusOptions,changeStatus,dataTypeOptions } from "@/api/backstage/hospital";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { regionDataPlus } from 'element-china-area-data';
export default { export default {
name: "Hospital", name: "Hospital",
...@@ -282,6 +293,9 @@ export default { ...@@ -282,6 +293,9 @@ export default {
statusOptions: [], statusOptions: [],
//医院分类数据字典 //医院分类数据字典
dataTypeOptions: [], dataTypeOptions: [],
options: regionDataPlus,
selectedOptions: [],
selectedLabelOptions: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -354,6 +368,12 @@ export default { ...@@ -354,6 +368,12 @@ export default {
}); });
}, },
methods: { methods: {
handleChange (value) {
console.log(JSON.stringify(value));
console.log(this.$refs["cascader"].getCheckedNodes()[0].pathLabels);
this.selectedOptions=value;
this.selectedLabelOptions=this.$refs["cascader"].getCheckedNodes()[0].pathLabels;
},
/** 查询【请填写功能名称】列表 */ /** 查询【请填写功能名称】列表 */
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -455,6 +475,12 @@ export default { ...@@ -455,6 +475,12 @@ export default {
}) })
this.images1 = iList this.images1 = iList
} }
this.selectedOptions.push(this.form.provinceCode);
this.selectedOptions.push(this.form.cityNameCode);
this.selectedOptions.push(this.form.districtCode);
this.selectedLabelOptions.push(this.form.province);
this.selectedLabelOptions.push(this.form.cityName);
this.selectedLabelOptions.push(this.form.district);
this.open = true; this.open = true;
this.title = "修改医院信息"; this.title = "修改医院信息";
...@@ -509,6 +535,12 @@ export default { ...@@ -509,6 +535,12 @@ export default {
}) })
this.form.picture = urls; this.form.picture = urls;
} }
this.form.provinceCode=this.selectedOptions[0];
this.form.cityNameCode=this.selectedOptions[1];
this.form.districtCode=this.selectedOptions[2];
this.form.province=this.selectedLabelOptions[0];
this.form.cityName=this.selectedLabelOptions[1];
this.form.district=this.selectedLabelOptions[2];
if (this.form.id != null) { if (this.form.id != null) {
updateHospital(this.form).then(response => { updateHospital(this.form).then(response => {
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
<el-form-item label="套餐海报" prop="picture"> <el-form-item label="套餐海报" prop="picture">
<div> <div>
<el-upload <el-upload
:limit="1"
:action="upload.url" :action="upload.url"
list-type="picture-card" list-type="picture-card"
show-file-list show-file-list
......
...@@ -360,6 +360,12 @@ export default { ...@@ -360,6 +360,12 @@ export default {
this.loading = true; this.loading = true;
listPackage(this.queryParams).then(response => { listPackage(this.queryParams).then(response => {
this.packageList = response.rows; this.packageList = response.rows;
this.packageList.forEach(row=>{
if(row.picture){
let picture=row.picture.split(',');
row.picture=picture[0];
}
});
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论