From 7c4b47852e921718259c3e27421f44f8d2edb7fc Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 26 Apr 2021 16:45:52 +0800
Subject: [PATCH] 冲突合并
---
src/views/system/cs.vue | 45 +++++++++++++++++++++++++++++++++++++--------
1 files changed, 37 insertions(+), 8 deletions(-)
diff --git a/src/views/system/cs.vue b/src/views/system/cs.vue
index ab34427..aa0c4b8 100644
--- a/src/views/system/cs.vue
+++ b/src/views/system/cs.vue
@@ -268,7 +268,7 @@
},
option: {
height: "auto",
- calcHeight: 80,
+ calcHeight: 54,
size: "mini",
tip: false,
searchShow: true,
@@ -384,24 +384,38 @@
labelWidth: "0",
className: "cityClass3",
},
- {
- label: "地址",
- prop: "map",
- hide: true,
- span: 24,
- component: "AvueMap",
- },
+ {
+ label: "地址",
+ prop: "address",
+ span:10,
+ // labelWidth: '60',
+ hide: true,
+ },
+ {
+ label: null,
+ prop: "map",
+ labelWidth: "0",
+ searchSpan:0,
+ maxlength:0,
+ hide: true,
+ span: 2,
+ // display:false,
+ component: "AvueMap"
+ },
{
label: "纬度",
hide: true,
addDisplay: false,
prop: "wd",
+ span:6
},
{
label: "经度",
+ labelWidth: "50",
hide: true,
addDisplay: false,
prop: "jd",
+ span:5
},
{
label: "账号额度",
@@ -720,8 +734,23 @@
// form是表单或者表格绑定的数据集,v-model='form'
handler(val) {
if (val) {
+ getDetail(this.form.id).then((res) => {
+ this.form = res.data.data;
+ })
this.form.wd = val.latitude;
this.form.jd = val.longitude;
+ //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始
+ var address = val.formattedAddress.toString();
+ if(address.search("县") != -1){
+ this.form.address = address.substring(address.indexOf("县")+1,address.length);
+ }
+ if(address.search("区") != -1){
+ this.form.address = address.substring(address.indexOf("区")+1,address.length);
+ }
+ //写入新的省市区
+ that.form.province = val.addressComponent.province;
+ that.form.city = val.addressComponent.city;
+ that.form.district = val.addressComponent.district;
}
},
immediate: true,
--
Gitblit v1.9.3