27602
This commit is contained in:
@@ -3,12 +3,15 @@
|
||||
<div class="form-item__group">
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<div class="form-item__title" @click="showSel = true">
|
||||
<i>*</i>
|
||||
<h2>事件类型</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<ai-select :list="dictList" v-model="form.groupId"></ai-select>
|
||||
<!-- <ai-select :list="dictList" v-model="form.groupId"></ai-select>
|
||||
-->
|
||||
|
||||
<u-select v-model="showSel" value-name="value" label-name="label" :list="dictList"></u-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,8 +48,7 @@
|
||||
<i>*</i>
|
||||
<h2>所属网格</h2>
|
||||
</div>
|
||||
<picker :range="gridList" mode="multiSelector" range-key="girdName" @columnchange="onColumnChange"
|
||||
@change="onChange">
|
||||
<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>
|
||||
@@ -60,7 +62,7 @@
|
||||
<div class="form-item form-item__imgs">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<i style="opacity: 0;">*</i>
|
||||
<i style="opacity: 0">*</i>
|
||||
<h2>图片上传</h2>
|
||||
<span>(最多9张)</span>
|
||||
</div>
|
||||
@@ -118,17 +120,18 @@ export default {
|
||||
groupName: '',
|
||||
girdName: '',
|
||||
girdId: '',
|
||||
files: []
|
||||
files: [],
|
||||
},
|
||||
dictList: [],
|
||||
arr: [],
|
||||
gridList: [[], []],
|
||||
flag: false
|
||||
flag: false,
|
||||
showSel: false,
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
...mapState(['user']),
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
@@ -144,41 +147,44 @@ export default {
|
||||
scope: 'scope.userLocation',
|
||||
success: () => {
|
||||
uni.chooseLocation({
|
||||
success: res => {
|
||||
success: (res) => {
|
||||
this.form.address = res.address
|
||||
this.form.lat = res.latitude
|
||||
this.form.lng = res.longitude
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
this.$dialog.confirm({
|
||||
content: '您未授权定位权限,无法选择位置'
|
||||
}).then(() => {
|
||||
wx.openSetting({
|
||||
success: res => {
|
||||
if (!res.authSetting['scope.userLocation']) {
|
||||
this.$dialog.alert({
|
||||
content: '您未授权定位权限,无法选择位置'
|
||||
}).then(() => {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
content: '您未授权定位权限,无法选择位置',
|
||||
})
|
||||
.then(() => {
|
||||
wx.openSetting({
|
||||
success: (res) => {
|
||||
if (!res.authSetting['scope.userLocation']) {
|
||||
this.$dialog
|
||||
.alert({
|
||||
content: '您未授权定位权限,无法选择位置',
|
||||
})
|
||||
.then(() => {})
|
||||
} else {
|
||||
console.log('设置定位权限')
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
getDict() {
|
||||
this.$instance.post(`/app/appclapeventgroup/list?current=1&size=100000`).then(res => {
|
||||
this.$instance.post(`/app/appclapeventgroup/list?current=1&size=100000`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.dictList = res.data.records.map(v => {
|
||||
this.dictList = res.data.records.map((v) => {
|
||||
return {
|
||||
value: v.id,
|
||||
label: v.groupName
|
||||
label: v.groupName,
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -192,7 +198,7 @@ export default {
|
||||
},
|
||||
|
||||
getGirdList() {
|
||||
this.$instance.post(`/app/appgirdinfo/listAllByTop`).then(res => {
|
||||
this.$instance.post(`/app/appgirdinfo/listAllByTop`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.arr = res.data
|
||||
this.gridList[0] = res.data[0].girdList
|
||||
@@ -205,7 +211,6 @@ export default {
|
||||
const column = e.detail.column
|
||||
const value = e.detail.value
|
||||
|
||||
|
||||
if (column === column) {
|
||||
this.getGirdData(value)
|
||||
}
|
||||
@@ -251,27 +256,29 @@ export default {
|
||||
this.flag = true
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appclapeventinfo/addOrUpdate`, {
|
||||
this.$instance
|
||||
.post(`/app/appclapeventinfo/addOrUpdate`, {
|
||||
...this.form,
|
||||
openid: this.user.openid,
|
||||
portrait: this.user.avatarUrl,
|
||||
files: this.form.files,
|
||||
groupName: this.dictList.filter(v => v.value === this.form.groupId)[0].label
|
||||
}).then(res => {
|
||||
groupName: this.dictList.filter((v) => v.value === this.form.groupId)[0].label,
|
||||
})
|
||||
.then((res) => {
|
||||
this.$hideLoading()
|
||||
this.flag = false
|
||||
if (res.code == 0) {
|
||||
uni.$emit('update')
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: './PhotoResult?id=' + res.data.id
|
||||
url: './PhotoResult?id=' + res.data.id,
|
||||
})
|
||||
}, 400)
|
||||
}
|
||||
this.$hideLoading()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -293,7 +300,7 @@ export default {
|
||||
justify-content: space-between;
|
||||
height: 128px;
|
||||
padding-right: 28px;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
@@ -335,7 +342,7 @@ export default {
|
||||
|
||||
i {
|
||||
font-size: 32px;
|
||||
color: #FF4466;
|
||||
color: #ff4466;
|
||||
}
|
||||
|
||||
span {
|
||||
@@ -351,8 +358,8 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&.form-item__imgs, &.form-item__textarea {
|
||||
&.form-item__imgs,
|
||||
&.form-item__textarea {
|
||||
.form-item__wrapper {
|
||||
display: block;
|
||||
height: auto;
|
||||
|
||||
Reference in New Issue
Block a user