This commit is contained in:
liuye
2024-08-08 14:16:49 +08:00
parent 4997f2a564
commit f3a9d03516
3 changed files with 25 additions and 24 deletions

View File

@@ -4,7 +4,7 @@
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="事件类型" prop="groupName" required :border-bottom="false" right-icon="arrow-right">
<span @click="show = true" class="right-span" :style="forms.groupName ? '' : 'color:#999;'">{{ forms.groupName || '请选择事件类型' }}</span>
<u-select v-model="show" :list="myList" value-name="id" label-name="groupName" @confirm="selectStatus"></u-select>
<u-select v-model="show" :list="myList" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select>
</u-form-item>
<u-form-item label="事件描述" prop="content" required :border-bottom="false" label-position="top" class="contents">
<u-input v-model="forms.content" placeholder="请输入事件描述..." type="textarea" auto-height height="100" maxlength="500"/>
@@ -65,21 +65,23 @@ export default {
},
flag: false,
show: false,
myList: []
myList: [],
eventSource: ''
}
},
computed: {
...mapState(['user']),
},
onLoad() {
this.typeList()
onLoad(option) {
this.forms.girdId = this.user.girdId
this.forms.girdName = this.user.girdName
this.forms.girdMemberId = this.user.girdMemberId
this.forms.girdMemberName = this.user.name
this.eventSource = option.eventSource
this.typeList()
},
onShow() {
document.title = '巡查添加'
document.title = '添加上报'
this.forms.name = this.user.name
this.forms.phone = this.user.phone
uni.$on('chooseLat', res => {
@@ -88,13 +90,12 @@ export default {
},
methods: {
typeList() {
this.$http.post(`/app/apppatrolreportgroupv2/list`, null, {
params: {
size: 9999,
},
}).then((res) => {
this.$http.post(`/app/apppatrolreportinfov2/eventTypeList?eventSource=${this.eventSource}&size=9999`).then((res) => {
if (res.code == 0) {
this.myList = res.data.records
res.data.map((item) => {
var i = {dictName: item, dictValue: item}
this.myList.push(i)
})
this.$forceUpdate()
}
})

View File

@@ -9,7 +9,7 @@
<!-- <u-input v-model="forms.groupName" placeholder="请选择事件分类" /> -->
<span @click="show = true" class="right-span" :style="forms.groupName ? '' : 'color:#999;'">{{ forms.groupName || '请选择事件分类' }}</span>
<u-select v-model="show" :list="myList" value-name="id" label-name="groupName" @confirm="selectStatus"></u-select>
<u-select v-model="show" :list="myList" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select>
</u-form-item>
<u-form-item :label="status == 3 ? '办结意见' : status == 2 ? '拒绝受理意见' : '办理意见'" prop="content" required :border-bottom="false" label-position="top"
@@ -60,7 +60,8 @@ export default {
myList: [],
id: '',
selectUser: {},
titleList: ['', '转交事件', '拒绝受理', '我已办结']
titleList: ['', '转交事件', '拒绝受理', '我已办结'],
eventSource: ''
}
},
onLoad(option) {
@@ -68,6 +69,7 @@ export default {
this.id = option.id
this.forms.groupId = option.groupId
this.forms.groupName = option.groupName
this.eventSource = option.eventSource
this.typeList()
uni.$on('goback', (res) => {
this.selectUser = res
@@ -83,14 +85,12 @@ export default {
},
methods: {
typeList() {
this.$http.post(`/app/apppatrolreportgroupv2/list`, null, {
params: {
size: 9999,
},
})
.then((res) => {
this.$http.post(`/app/apppatrolreportinfov2/eventTypeList?eventSource=${this.eventSource}&size=9999`).then((res) => {
if (res.code == 0) {
this.myList = res.data.records
res.data.map((item) => {
var i = {dictName: item, dictValue: item}
this.myList.push(i)
})
this.$forceUpdate()
}
})

View File

@@ -54,7 +54,7 @@
<AiEmpty v-if="!datas.length"></AiEmpty>
</template>
<div class="pad-b120" v-if="datas.length"></div>
<AiAdd @add="add" v-if="isAdd"/>
<AiAdd @add="add" v-if="isAdd && [1, 2].includes(this.currentTabs)"/>
</div>
</template>
@@ -171,7 +171,7 @@ export default {
uni.navigateTo({url})
},
add() {
uni.navigateTo({url: './Add'})
uni.navigateTo({url: `./Add?eventSource=${this.tabList[this.currentTabs].value}`})
},
getIsAdd() {
@@ -184,10 +184,10 @@ export default {
getTypeList() {
this.typeList = []
this.instance.post(`/app/apppatrolreportinfov2/eventTypeList?eventSource=${this.tabs[this.currIndex].value}`).then(res => {
this.$http.post(`/app/apppatrolreportinfov2/eventTypeList?eventSource=${this.tabs[this.currIndex].value}`).then(res => {
if (res.code == 0) {
res.data.map((item) => {
var i = {distName: item, dictValue: item}
var i = {dictName: item, dictValue: item}
this.typeList.push(i)
})
}