无等级网格版合并
This commit is contained in:
@@ -8,15 +8,9 @@
|
||||
<div class="area-select">
|
||||
<div class="select-content">
|
||||
<div class="area-content fill">
|
||||
<AiPagePicker type="gird" isMyGird @select="handleGridSelect">
|
||||
<AiPagePicker type="custom" @select="handleGridSelect" :ops="{url:'../AppGridManagement/SelectGird',label: 'girdName'}">
|
||||
<AiMore v-model="gridName" placeholder="选择网格"/>
|
||||
</AiPagePicker>
|
||||
<!-- <AiAreaPicker :areaId="user.areaId" v-model="areaId" @select="areaSelect" :name.sync="areaName">-->
|
||||
<!-- <img src="./img/local-icon.png" alt=""/>-->
|
||||
<!-- <span class="label" v-if="areaName">{{ areaName }}</span>-->
|
||||
<!-- <span v-else>请选择</span>-->
|
||||
<!-- <u-icon name="arrow-down" color="#666" size="24"/>-->
|
||||
<!-- </AiAreaPicker>-->
|
||||
</div>
|
||||
<div class="search-input" v-if="tabIndex">
|
||||
<img src="./img/search-icon.png" alt=""/>
|
||||
@@ -132,8 +126,8 @@ export default {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
handleGridSelect(e) {
|
||||
this.gridName = e?.[0]?.girdName
|
||||
this.search.girdId = e?.[0]?.id
|
||||
this.gridName = e?.girdName
|
||||
this.search.girdId = e?.id
|
||||
this.getDatas()
|
||||
},
|
||||
areaSelect(e) {
|
||||
@@ -149,13 +143,7 @@ export default {
|
||||
params: {...this.search, type: 0, range: 0}
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
for (let i in res.data) {
|
||||
let obj = {
|
||||
label: i,
|
||||
value: res.data[i],
|
||||
}
|
||||
this.statisticsList.push(obj)
|
||||
}
|
||||
this.statisticsList = Object.keys(res.data).map((label, i, arr) => ({label, value: res.data[label]}))
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -165,13 +153,7 @@ export default {
|
||||
params: {...this.search, type: 0, range: 1}
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
for (let i in res.data) {
|
||||
let obj = {
|
||||
label: i,
|
||||
value: res.data[i],
|
||||
}
|
||||
this.statisticsListMon.push(obj)
|
||||
}
|
||||
this.statisticsListMon = Object.keys(res.data).map((label, i, arr) => ({label, value: res.data[label]}))
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
<div class="item" v-else-if="item.type == 'gird'">
|
||||
<span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span>
|
||||
<div class="value" flex>
|
||||
<AiPagePicker type="gird" @select="v=>handleSelectGird(v,item)" isMyGird>
|
||||
<AiPagePicker type="custom" @select="v=>handleSelectGird(v,item)" :ops="{url:'../AppGridManagement/SelectGird',label: 'girdName'}">
|
||||
<AiMore v-model="formData[item.fieldDbName + '_name']" :placeholder="item.fieldTips"/>
|
||||
</AiPagePicker>
|
||||
</div>
|
||||
@@ -411,7 +411,7 @@ export default {
|
||||
}
|
||||
if (items.type == 'upload') { //附件 只传id
|
||||
let files = [];
|
||||
[form[items.fieldDbName]]?.flat()?.map(item => item?.url&&files.push(item.url))
|
||||
[form[items.fieldDbName]]?.flat()?.map(item => item?.url && files.push(item.url))
|
||||
form[items.fieldDbName] = files?.toString()
|
||||
}
|
||||
// if (items.type == 'onOff') { //开关
|
||||
@@ -441,11 +441,11 @@ export default {
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$u.toast('提交成功')
|
||||
uni.navigateBack({
|
||||
setTimeout(() => uni.navigateBack({
|
||||
success: () => {
|
||||
uni.$emit("selectType")
|
||||
}
|
||||
})
|
||||
}), 1500)
|
||||
} else this.$u.toast(res?.msg || "提交失败,请联系管理员")
|
||||
}).catch(err => {
|
||||
this.$u.toast(err || "提交失败,请联系管理员")
|
||||
@@ -462,7 +462,7 @@ export default {
|
||||
return obj?.toString() || "-"
|
||||
},
|
||||
handleSelectGird(gird, item) {
|
||||
let info = gird?.[0] || {}
|
||||
let info = gird || {}
|
||||
this.formData[item.fieldDbName] = [info.id, info.girdName].join("_")
|
||||
this.formData[item.fieldDbName + "_name"] = info.girdName
|
||||
this.$forceUpdate()
|
||||
|
||||
Reference in New Issue
Block a user