Commit 2fb1b556 authored by xinzhedeai's avatar xinzhedeai

add:商户详情隶属网格展示修改

parent cacaeafc
...@@ -217,4 +217,23 @@ select:disabled { ...@@ -217,4 +217,23 @@ select:disabled {
select:disabled { select:disabled {
color: #333 !important; color: #333 !important;
opacity: 1; opacity: 1;
} }
\ No newline at end of file
/* 移动端级联选择器适配 */
/* .community-cascader .van-cascader {
font-size: 0.3rem;
}
.community-cascader .van-picker__toolbar {
height: 0.88rem;
}
.community-cascader .van-picker__cancel,
.community-cascader .van-picker__confirm {
font-size: 0.32rem;
padding: 0 0.3rem;
}
.community-cascader .van-cascader__option {
padding: 0 0.3rem;
height: 0.88rem;
line-height: 0.88rem;
} */
\ No newline at end of file
...@@ -106,9 +106,10 @@ ...@@ -106,9 +106,10 @@
<!-- 新增字段 --> <!-- 新增字段 -->
<div class="form-item"> <div class="form-item">
<span class="form-label">所属社区</span> <span class="form-label">隶属网格</span>
<div class="form-input-wrap"> <div class="form-input-wrap">
<select
<!-- <select
class="selector" class="selector"
v-model="formData.community" v-model="formData.community"
:disabled="flag=='XQ'" :disabled="flag=='XQ'"
...@@ -119,10 +120,26 @@ ...@@ -119,10 +120,26 @@
:label="item.label" :label="item.label"
:value="item.label" :value="item.label"
></option> ></option>
</select> </select> -->
<div style="font-size: 15px;color: #666;">
{{formData.gridName}}
</div>
</div> </div>
</div> </div>
<!-- <van-popup v-model="showCommunityModal" round position="bottom">
<van-cascader
v-model="formData.community"
:options="dict4community"
:field-names="{ text: 'label', value: 'id', children: 'children' }"
@change="handleCommunityChange"
class="community-cascader"
/>
</van-popup> -->
<div <div
class="form-item" class="form-item"
v-if="flag=='XQ'" v-if="flag=='XQ'"
......
...@@ -6,6 +6,7 @@ window.addEventListener('load', function () { ...@@ -6,6 +6,7 @@ window.addEventListener('load', function () {
el: '#app', el: '#app',
data() { data() {
return { return {
// showCommunityModal:true,
previewUrl: BASE_URL, previewUrl: BASE_URL,
loading: false, loading: false,
finished: false, finished: false,
...@@ -54,7 +55,7 @@ window.addEventListener('load', function () { ...@@ -54,7 +55,7 @@ window.addEventListener('load', function () {
dict4fangwuType: [], dict4fangwuType: [],
dict4fangwuyongtuType: [], dict4fangwuyongtuType: [],
dict4businessType: [], dict4businessType: [],
dict4community: [], // dict4community: [],
dict4industryType: [], dict4industryType: [],
consumerSuggestList: [], consumerSuggestList: [],
} }
...@@ -74,7 +75,7 @@ window.addEventListener('load', function () { ...@@ -74,7 +75,7 @@ window.addEventListener('load', function () {
this.getDict4fangwuType() this.getDict4fangwuType()
this.getDict4fangwuyongtuType() this.getDict4fangwuyongtuType()
this.getDict4businessType() this.getDict4businessType()
this.getDict4community() // this.getDict4community()
this.getDict4industryType() this.getDict4industryType()
// this.getDict4changhsuoType() // this.getDict4changhsuoType()
...@@ -93,6 +94,11 @@ window.addEventListener('load', function () { ...@@ -93,6 +94,11 @@ window.addEventListener('load', function () {
} }
}, },
methods: { methods: {
handleCommunityChange(value) {
// value是选中的路径数组,如 ['1', '1-1', '1-1-1']
// 根据需求决定存储完整路径还是最后一级值
this.formData.community = value[value.length - 1]; // 存储最后一级值
},
reset(){ reset(){
this.page = 0 this.page = 0
this.size = 9999 this.size = 9999
...@@ -319,35 +325,35 @@ window.addEventListener('load', function () { ...@@ -319,35 +325,35 @@ window.addEventListener('load', function () {
} }
}) })
}, },
getDict4community() { // getDict4community() {
http2.post({ // http2.post({
serviceId: API_KEY_MAP["no-page"]['id'], // serviceId: API_KEY_MAP["no-page"]['id'],
interfacePublicKey: API_KEY_MAP["no-page"]["publicKey"], // interfacePublicKey: API_KEY_MAP["no-page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["no-page"]["privateKey"], // interfacePrivateKey: API_KEY_MAP["no-page"]["privateKey"],
reqParams: { // reqParams: {
sign: 22, // sign: 22,
} // }
}, (res) => { // }, (res) => {
if (!res) { // 中台返回为undefined 重新请求 // if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear() // vant.Toast.clear()
setTimeout(() => { // setTimeout(() => {
// this.getDict4community() // // this.getDict4community()
}, 0); // }, 0);
return // return
} // }
if (res) { // if (res) {
console.log('接口回调数据=所属社区', JSON.parse(res)) // console.log('接口回调数据=所属社区', JSON.parse(res))
setTimeout(() => { // setTimeout(() => {
this.$nextTick(() => { // this.$nextTick(() => {
vant.Toast.clear() // vant.Toast.clear()
}) // })
}, 0); // }, 0);
var result = JSON.parse(res) // var result = JSON.parse(res)
this.dict4community = result.data // this.dict4community = result.data
} // }
}) // })
}, // },
getDict4businessType() { getDict4businessType() {
http2.post({ http2.post({
serviceId: API_KEY_MAP["page"]['id'], serviceId: API_KEY_MAP["page"]['id'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment