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