添加事件
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
import List from './List.vue'
|
||||
|
||||
export default {
|
||||
name: 'AppHandSnapshot',
|
||||
name: 'AppConflictMediation',
|
||||
appName: '矛盾调解',
|
||||
|
||||
data() {
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppHandSnapshot {
|
||||
.AppConflictMediation {
|
||||
height: 100%;
|
||||
}
|
||||
.tabs {
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
<!-- 事件列表 -->
|
||||
<div class="title">
|
||||
<div class="title-name">事件列表</div>
|
||||
<div class="title-type" @click="lookAllType">全部类型<u-icon name="arrow-down"></u-icon></div>
|
||||
<div class="title-type">{{ $dict.getLabel('clapEventStatusAll', groupName) }}<u-icon name="arrow-down"></u-icon></div>
|
||||
</div>
|
||||
|
||||
<template >
|
||||
<template>
|
||||
<AiCard v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)">
|
||||
<template #custom>
|
||||
<div class="card-top">
|
||||
@@ -50,6 +50,9 @@
|
||||
<AiEmpty v-if="!datas.length"></AiEmpty>
|
||||
</template>
|
||||
|
||||
<u-select v-model="showGird" :list="groupType" label-name="groupName" value-name="id"
|
||||
@confirm="changeType"/>
|
||||
|
||||
<div class="pad-b120" v-if="datas.length"></div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -62,27 +65,23 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
datas: [],
|
||||
tabList: [
|
||||
{
|
||||
name: '全部待办',
|
||||
},
|
||||
{
|
||||
name: '办件历史',
|
||||
},
|
||||
],
|
||||
currentTabs: 0,
|
||||
current: 1,
|
||||
pages: 0,
|
||||
show: false,
|
||||
myGirdList: [],
|
||||
girdId: '',
|
||||
groupName: '',
|
||||
girdNameText: '所属网格',
|
||||
showType: false,
|
||||
listType: [],
|
||||
eventStatus: '',
|
||||
eventStatusText: '办件状态',
|
||||
listTypeHistory: [],
|
||||
listTypeAll: []
|
||||
listTypeAll: [],
|
||||
groupType: [],
|
||||
showGird: false,
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -106,6 +105,8 @@ export default {
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
onShow() {
|
||||
document.title = '矛盾调解'
|
||||
},
|
||||
@@ -137,6 +138,16 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 切换类型
|
||||
changeType(e) {
|
||||
console.log(e)
|
||||
this.girdId = e[0].value
|
||||
this.groupType.map((item) => {
|
||||
if(item.id == this.form.girdId) {
|
||||
this.form.girdName = item.girdName
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 新增事件
|
||||
addEvent() {
|
||||
@@ -355,7 +366,7 @@ uni-page-body {
|
||||
|
||||
.pad-b120 {
|
||||
background-color: #f3f6f9;
|
||||
padding-bottom: 120px;
|
||||
padding-bottom: 140px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -58,13 +58,18 @@
|
||||
<i>*</i>
|
||||
<h2>上报网格</h2>
|
||||
</div>
|
||||
<picker :range="gridList" mode="multiSelector" range-key="girdName" @columnchange="onColumnChange" @change="onChange">
|
||||
<div class="form-item__right" @click="showSelect= true">
|
||||
<span v-if="form.girdName">{{ form.girdName }}</span>
|
||||
<i v-else>请选择</i>
|
||||
<u-icon name="arrow-right" color="#ddd" />
|
||||
</div>
|
||||
<!-- <picker :range="gridList" mode="multiSelector" range-key="form.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>
|
||||
</picker> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item form-flow">
|
||||
@@ -112,6 +117,8 @@
|
||||
</div>
|
||||
<div class="btn" @click="submit">上报</div>
|
||||
|
||||
<u-select v-model="showSelect" :list="girdList" label-name="girdName" value-name="id" @confirm="confirmSelect"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -140,8 +147,8 @@
|
||||
},
|
||||
dictList: [],
|
||||
arr: [],
|
||||
gridList: [[], []],
|
||||
|
||||
showSelect: false,
|
||||
girdList: [],
|
||||
}
|
||||
},
|
||||
|
||||
@@ -190,6 +197,16 @@
|
||||
})
|
||||
},
|
||||
|
||||
confirmSelect(e) {
|
||||
console.log(e)
|
||||
this.form.girdId = e[0].value
|
||||
this.girdList.map((item) => {
|
||||
if(item.id == this.form.girdId) {
|
||||
this.form.girdName = item.girdName
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDict () {
|
||||
this.$http.post(`/app/appclapeventgroup/list`).then(res => {
|
||||
console.log(res);
|
||||
@@ -211,11 +228,10 @@
|
||||
},
|
||||
|
||||
getGirdList () {
|
||||
this.$http.post(`/app/appgirdinfo/y`).then(res => {
|
||||
this.$http.post(`/app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser`).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
|
||||
this.girdList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -235,9 +251,7 @@
|
||||
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
|
||||
return this.$u.toast('所属网格必须选第三级网格')
|
||||
}
|
||||
},
|
||||
|
||||
@@ -248,16 +262,10 @@
|
||||
if (!this.form.groupId) {
|
||||
return this.$u.toast('请选择事件类型')
|
||||
}
|
||||
// if (!this.form.address) {
|
||||
// return this.$u.toast('请选择发生地点')
|
||||
// }
|
||||
if (!this.form.girdName) {
|
||||
return this.$u.toast('请选择上报网格')
|
||||
}
|
||||
// if (!this.form.flow) {
|
||||
// return this.$u.toast('请选择处理流程')
|
||||
// }
|
||||
if (this.form.opts == false) {
|
||||
if (this.form.opts == 0) {
|
||||
if (!this.form.result) {
|
||||
return this.$u.toast('请输入事件办理结果')
|
||||
}
|
||||
@@ -269,8 +277,6 @@
|
||||
this.$loading()
|
||||
this.$http.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 => {
|
||||
@@ -279,8 +285,8 @@
|
||||
if (res.code == 0) {
|
||||
uni.$emit('update')
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: './detail'
|
||||
uni.navigateTo({
|
||||
url: './List'
|
||||
})
|
||||
}, 400)
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<span class="label"><span class="tips"></span>{{ item.label }}</span>
|
||||
<div class="value" @click="selectTime(item.formDbName)">
|
||||
<span :class="form[item.formDbName] === '' ? 'color-999' : ''">{{
|
||||
$dateFormat(form[item.formDbName], 'YYYY-MM-DD HH:mm') || '请选择'
|
||||
$dateFormat(form[item.formDbName], 'YYYY-MM-DD') || '请选择'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user