Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -9,8 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="activity-list">
|
<div class="activity-list">
|
||||||
<div class="item" hover-class="bg-hover" @click="$linkTo(`/village/villageActivity/ActivityDetail?id=${item.id}`)"
|
<div class="item" hover-class="bg-hover" @click="$linkTo(`./ActivityDetail?id=${item.id}`)" v-for="(item, index) in list" :key="index">
|
||||||
v-for="(item, index) in list" :key="index">
|
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<h2>{{ item.title }}</h2>
|
<h2>{{ item.title }}</h2>
|
||||||
<div class="left-info">
|
<div class="left-info">
|
||||||
@@ -23,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<span :class="'status' + item.status">{{ item.statusName }}</span>
|
<span :class="'status' + item.status">{{ item.statusName }}</span>
|
||||||
<image :src="item.url" mode="aspectFill"/>
|
<image :src="item.url" mode="aspectFill" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||||
@@ -33,15 +32,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "AppVillageActivity",
|
name: 'AppVillageActivity',
|
||||||
appName: "居民活动",
|
appName: '居民活动',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
pageShow: false,
|
pageShow: false,
|
||||||
current: 1,
|
current: 1,
|
||||||
total: 0,
|
total: 0,
|
||||||
isMore: false
|
isMore: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -56,29 +55,31 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
if (this.isMore) return
|
if (this.isMore) return
|
||||||
|
|
||||||
this.$instance.post(`/app/appvillageactivityinfo/listUp`, null, {
|
this.$instance
|
||||||
|
.post(`/app/appvillageactivityinfo/listUp`, null, {
|
||||||
params: {
|
params: {
|
||||||
current: this.current,
|
current: this.current,
|
||||||
size: 15,
|
size: 15,
|
||||||
areaId: uni.getStorageSync('areaId')
|
areaId: uni.getStorageSync('areaId'),
|
||||||
}
|
},
|
||||||
}).then(res => {
|
})
|
||||||
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.total = res.data.total
|
this.total = res.data.total
|
||||||
if (this.current > 1) {
|
if (this.current > 1) {
|
||||||
this.list = [...this.list, ...res.data.records].map(v => {
|
this.list = [...this.list, ...res.data.records].map((v) => {
|
||||||
return {
|
return {
|
||||||
...v,
|
...v,
|
||||||
statusName: this.$dict.getLabel('villageActivityStatus', v.status),
|
statusName: this.$dict.getLabel('villageActivityStatus', v.status),
|
||||||
url: v.url ? JSON.parse(v.url)[0].url : ''
|
url: v.url ? JSON.parse(v.url)[0].url : '',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.list = res.data.records.map(v => {
|
this.list = res.data.records.map((v) => {
|
||||||
return {
|
return {
|
||||||
...v,
|
...v,
|
||||||
statusName: this.$dict.getLabel('villageActivityStatus', v.status),
|
statusName: this.$dict.getLabel('villageActivityStatus', v.status),
|
||||||
url: v.url ? JSON.parse(v.url)[0].url : ''
|
url: v.url ? JSON.parse(v.url)[0].url : '',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -94,15 +95,16 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -133,7 +135,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
i {
|
i {
|
||||||
color: #4181FF;
|
color: #4181ff;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
}
|
}
|
||||||
@@ -173,7 +175,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
i {
|
i {
|
||||||
color: #4181FF;
|
color: #4181ff;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
}
|
}
|
||||||
@@ -207,15 +209,15 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.status0 {
|
.status0 {
|
||||||
background: #42D784;
|
background: #42d784;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status1 {
|
.status1 {
|
||||||
background: #1AAAFF;
|
background: #1aaaff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status2 {
|
.status2 {
|
||||||
background: #E4E4E4;
|
background: #e4e4e4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -35,7 +38,7 @@
|
|||||||
<div class="form-item__right" @click="chooseAddress">
|
<div class="form-item__right" @click="chooseAddress">
|
||||||
<span v-if="form.address">{{ form.address }}</span>
|
<span v-if="form.address">{{ form.address }}</span>
|
||||||
<i v-else>请选择</i>
|
<i v-else>请选择</i>
|
||||||
<u-icon name="arrow-right" color="#ddd"/>
|
<u-icon name="arrow-right" color="#ddd" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,12 +48,11 @@
|
|||||||
<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>
|
||||||
<u-icon name="arrow-right" color="#ddd"/>
|
<u-icon name="arrow-right" color="#ddd" />
|
||||||
</div>
|
</div>
|
||||||
</picker>
|
</picker>
|
||||||
</div>
|
</div>
|
||||||
@@ -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>
|
||||||
@@ -78,7 +80,7 @@
|
|||||||
<h2>姓名</h2>
|
<h2>姓名</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item__right">
|
<div class="form-item__right">
|
||||||
<input placeholder="请输入" v-model="form.name" :maxlength="20"/>
|
<input placeholder="请输入" v-model="form.name" :maxlength="20" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -89,7 +91,7 @@
|
|||||||
<h2>联系方式</h2>
|
<h2>联系方式</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item__right">
|
<div class="form-item__right">
|
||||||
<input placeholder="请输入" v-model="form.phone" :maxlength="20"/>
|
<input placeholder="请输入" v-model="form.phone" :maxlength="20" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -101,7 +103,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -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