This commit is contained in:
liuye
2023-09-06 15:38:15 +08:00
parent bfa356e657
commit 863eba8c3f
3 changed files with 32 additions and 26 deletions

View File

@@ -12,7 +12,7 @@
<!-- <u-input v-model="forms.groupName" placeholder="请选择事件分类" /> -->
<span @click="show = true" class="right-span" :style="forms.typeName ? '' : 'color:#999;'">{{ forms.typeName || '请选择事件分类' }}</span>
<u-select v-model="show" :list="$dict.getDict('xbotReportEventType')" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select>
<u-select v-model="show" :list="typeList" 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"
@@ -64,14 +64,14 @@ export default {
flag: false,
show: false,
status: '', //1转交 2拒绝受理 3我已办结
myList: [],
id: '',
selectUser: {},
titleList: ['', '转交事件', '拒绝受理', '我已办结']
titleList: ['', '转交事件', '拒绝受理', '我已办结'],
typeList: []
}
},
onLoad(option) {
this.$dict.load('xbotReportEventType')
this.getTypeList()
this.status = option.status
this.id = option.id
this.forms.groupId = option.groupId
@@ -90,17 +90,13 @@ export default {
document.title = this.titleList[this.status]
},
methods: {
typeList() {
this.$http.post(`/app/appclapeventgroup/list`, null, {
params: {
size: 9999,
},
})
.then((res) => {
getTypeList() {
this.$http.post(`/app/appsessionarchivefeaturelibrary/eventTypeList`).then(res => {
if (res.code == 0) {
this.myList = res.data.records
this.$forceUpdate()
res.data.map((item) => {
var i = {dictName: item, dictValue: item}
this.typeList.push(i)
})
}
})
},

View File

@@ -18,7 +18,7 @@
<div class="card">
<span class="card-left">事件类型</span>
<span class="card-right">{{ $dict.getLabel('xbotReportEventType', data.type)}}</span>
<span class="card-right">{{ data.type }}</span>
</div>
<!-- <div class="card">

View File

@@ -7,7 +7,7 @@
</u-form-item>
<u-form-item label="事件类型" prop="type" required :border-bottom="false" right-icon="arrow-right">
<span @click="show = true" class="right-span" :style="forms.typeName ? '' : 'color:#999;'">{{ forms.typeName || '请选择事件类型' }}</span>
<u-select v-model="show" :list="$dict.getDict('xbotReportEventType')" value-name="dictValue" label-name="dictName" @confirm="selectFl"></u-select>
<u-select v-model="show" :list="typeList" value-name="dictValue" label-name="dictName" @confirm="selectFl"></u-select>
</u-form-item>
<div class="line"></div>
<u-form-item label="所属网格" prop="girdName" :border-bottom="false">
@@ -62,7 +62,8 @@ export default {
show: false,
flList: [],
id: '',
selectGird: {}
selectGird: {},
typeList: []
}
},
computed: {
@@ -70,9 +71,8 @@ export default {
},
onLoad(option) {
this.id = option.id
this.$dict.load('xbotReportEventType').then(() => {
this.getDetail()
})
this.getTypeList()
this.getDetail()
},
onShow() {
document.title = '事件编辑'
@@ -82,6 +82,16 @@ export default {
})
},
methods: {
getTypeList() {
this.$http.post(`/app/appsessionarchivefeaturelibrary/eventTypeList`).then(res => {
if (res.code == 0) {
res.data.map((item) => {
var i = {dictName: item, dictValue: item}
this.typeList.push(i)
})
}
})
},
getDetail() {
this.$http.post(`/app/appsessionarchivereportinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
@@ -92,12 +102,12 @@ export default {
address: res.data.address,
}
this.forms.typeName = res.data.type
var list = this.$dict.getDict('xbotReportEventType')
list.map((item) => {
if(item.dictValue == res.data.type) {
this.forms.typeName = item.dictName
}
})
// var list = this.$dict.getDict('xbotReportEventType')
// this.typeList.map((item) => {
// if(item.dictValue == res.data.type) {
// this.forms.typeName = item.dictName
// }
// })
this.selectGird = { girdId: res.data.girdId|| '', girdName: res.data.girdName || ''}
}
})