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

View File

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

View File

@@ -7,7 +7,7 @@
</u-form-item> </u-form-item>
<u-form-item label="事件类型" prop="type" required :border-bottom="false" right-icon="arrow-right"> <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> <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> </u-form-item>
<div class="line"></div> <div class="line"></div>
<u-form-item label="所属网格" prop="girdName" :border-bottom="false"> <u-form-item label="所属网格" prop="girdName" :border-bottom="false">
@@ -62,7 +62,8 @@ export default {
show: false, show: false,
flList: [], flList: [],
id: '', id: '',
selectGird: {} selectGird: {},
typeList: []
} }
}, },
computed: { computed: {
@@ -70,9 +71,8 @@ export default {
}, },
onLoad(option) { onLoad(option) {
this.id = option.id this.id = option.id
this.$dict.load('xbotReportEventType').then(() => { this.getTypeList()
this.getDetail() this.getDetail()
})
}, },
onShow() { onShow() {
document.title = '事件编辑' document.title = '事件编辑'
@@ -82,6 +82,16 @@ export default {
}) })
}, },
methods: { 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() { getDetail() {
this.$http.post(`/app/appsessionarchivereportinfo/queryDetailById?id=${this.id}`).then((res) => { this.$http.post(`/app/appsessionarchivereportinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) { if (res?.data) {
@@ -92,12 +102,12 @@ export default {
address: res.data.address, address: res.data.address,
} }
this.forms.typeName = res.data.type this.forms.typeName = res.data.type
var list = this.$dict.getDict('xbotReportEventType') // var list = this.$dict.getDict('xbotReportEventType')
list.map((item) => { // this.typeList.map((item) => {
if(item.dictValue == res.data.type) { // if(item.dictValue == res.data.type) {
this.forms.typeName = item.dictName // this.forms.typeName = item.dictName
} // }
}) // })
this.selectGird = { girdId: res.data.girdId|| '', girdName: res.data.girdName || ''} this.selectGird = { girdId: res.data.girdId|| '', girdName: res.data.girdName || ''}
} }
}) })