Commit 2fb1b556 authored by xinzhedeai's avatar xinzhedeai

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

parent cacaeafc
......@@ -217,4 +217,23 @@ select:disabled {
select:disabled {
color: #333 !important;
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 @@
<!-- 新增字段 -->
<div class="form-item">
<span class="form-label">所属社区</span>
<span class="form-label">隶属网格</span>
<div class="form-input-wrap">
<select
<!-- <select
class="selector"
v-model="formData.community"
:disabled="flag=='XQ'"
......@@ -119,10 +120,26 @@
:label="item.label"
:value="item.label"
></option>
</select>
</select> -->
<div style="font-size: 15px;color: #666;">
{{formData.gridName}}
</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
class="form-item"
v-if="flag=='XQ'"
......
......@@ -6,6 +6,7 @@ window.addEventListener('load', function () {
el: '#app',
data() {
return {
// showCommunityModal:true,
previewUrl: BASE_URL,
loading: false,
finished: false,
......@@ -54,7 +55,7 @@ window.addEventListener('load', function () {
dict4fangwuType: [],
dict4fangwuyongtuType: [],
dict4businessType: [],
dict4community: [],
// dict4community: [],
dict4industryType: [],
consumerSuggestList: [],
}
......@@ -74,7 +75,7 @@ window.addEventListener('load', function () {
this.getDict4fangwuType()
this.getDict4fangwuyongtuType()
this.getDict4businessType()
this.getDict4community()
// this.getDict4community()
this.getDict4industryType()
// this.getDict4changhsuoType()
......@@ -93,6 +94,11 @@ window.addEventListener('load', function () {
}
},
methods: {
handleCommunityChange(value) {
// value是选中的路径数组,如 ['1', '1-1', '1-1-1']
// 根据需求决定存储完整路径还是最后一级值
this.formData.community = value[value.length - 1]; // 存储最后一级值
},
reset(){
this.page = 0
this.size = 9999
......@@ -319,35 +325,35 @@ window.addEventListener('load', function () {
}
})
},
getDict4community() {
http2.post({
serviceId: API_KEY_MAP["no-page"]['id'],
interfacePublicKey: API_KEY_MAP["no-page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["no-page"]["privateKey"],
reqParams: {
sign: 22,
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
// this.getDict4community()
}, 0);
return
}
if (res) {
console.log('接口回调数据=所属社区', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4community = result.data
// getDict4community() {
// http2.post({
// serviceId: API_KEY_MAP["no-page"]['id'],
// interfacePublicKey: API_KEY_MAP["no-page"]["publicKey"],
// interfacePrivateKey: API_KEY_MAP["no-page"]["privateKey"],
// reqParams: {
// sign: 22,
// }
// }, (res) => {
// if (!res) { // 中台返回为undefined 重新请求
// vant.Toast.clear()
// setTimeout(() => {
// // this.getDict4community()
// }, 0);
// return
// }
// if (res) {
// console.log('接口回调数据=所属社区', JSON.parse(res))
// setTimeout(() => {
// this.$nextTick(() => {
// vant.Toast.clear()
// })
// }, 0);
// var result = JSON.parse(res)
// this.dict4community = result.data
}
})
},
// }
// })
// },
getDict4businessType() {
http2.post({
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