随手拍调整无级网格
This commit is contained in:
@@ -45,14 +45,11 @@
|
||||
<i>*</i>
|
||||
<h2>所属网格</h2>
|
||||
</div>
|
||||
<picker :range="gridList" mode="multiSelector" range-key="girdName" @columnchange="onColumnChange"
|
||||
@change="onChange">
|
||||
<div class="form-item__right">
|
||||
<span v-if="form.girdName">{{ form.girdName }}</span>
|
||||
<i v-else>请选择</i>
|
||||
<u-icon name="arrow-right" color="#ddd"/>
|
||||
</div>
|
||||
</picker>
|
||||
<div class="form-item__right">
|
||||
<AiPagePicker type="gird" v-model="form.girdId" :params="{formType:2}" @select="handleSelectGrid" nodeKey="id">
|
||||
<AiMore v-model="form.girdName"/>
|
||||
</AiPagePicker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,7 +102,6 @@ export default {
|
||||
appName: "上报随手拍",
|
||||
data() {
|
||||
return {
|
||||
isShowType: false,
|
||||
form: {
|
||||
content: '',
|
||||
lat: '',
|
||||
@@ -120,8 +116,6 @@ export default {
|
||||
files: []
|
||||
},
|
||||
dictList: [],
|
||||
arr: [],
|
||||
gridList: [[], []],
|
||||
flag: false
|
||||
}
|
||||
},
|
||||
@@ -134,7 +128,6 @@ export default {
|
||||
this.getDict()
|
||||
this.form.phone = this.user.phone
|
||||
this.form.name = this.user.realName || ''
|
||||
this.getGirdList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -170,7 +163,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDict() {
|
||||
this.$instance.post(`/app/appclapeventgroup/list?current=1&size=100000`).then(res => {
|
||||
if (res.code == 0) {
|
||||
@@ -183,45 +175,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getGirdData(x) {
|
||||
if (x > -1) {
|
||||
this.$set(this.gridList, '1', this.arr[0].girdList[x].girdList)
|
||||
}
|
||||
},
|
||||
|
||||
getGirdList() {
|
||||
this.$instance.post(`/app/appgirdinfo/listAllByTop`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.arr = res.data
|
||||
this.gridList[0] = res.data[0].girdList
|
||||
this.gridList[1] = res.data[0].girdList[0].girdList
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onColumnChange(e) {
|
||||
|
||||
const column = e.detail.column
|
||||
const value = e.detail.value
|
||||
|
||||
if (column === 0) {
|
||||
this.getGirdData(value)
|
||||
}
|
||||
},
|
||||
|
||||
onChange(e) {
|
||||
const v = e.detail.value[1]
|
||||
if (this.gridList[1][v]) {
|
||||
this.form.girdName = this.gridList[1][v].girdName
|
||||
this.form.girdId = this.gridList[1][v].id
|
||||
} else {
|
||||
return this.$toast('所属网格必须选第三级网格')
|
||||
// this.form.girdName = this.gridList[e.detail.value[0].girdName
|
||||
// this.form.girdId = this.gridList[e.detail.value[0].id
|
||||
}
|
||||
},
|
||||
|
||||
submit() {
|
||||
if (!this.form.groupId) {
|
||||
return this.$toast('请选择事件类型')
|
||||
@@ -267,6 +220,9 @@ export default {
|
||||
}
|
||||
this.$hideLoading()
|
||||
})
|
||||
},
|
||||
handleSelectGrid(v) {
|
||||
this.form.girdName = v.girdName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user