Browse Source

事件管理

shibei_master
jiangyy 3 years ago
parent
commit
2f64b92459
  1. 31
      src/views/modules/shequzhili/event/cpts/event-detail.vue
  2. 52
      src/views/modules/shequzhili/event/cpts/event-info.vue
  3. 46
      src/views/modules/shequzhili/event/cpts/process-form-demand.vue
  4. 29
      src/views/modules/shequzhili/event/cpts/process-form-project.vue
  5. 20
      src/views/modules/shequzhili/event/cpts/process-form-replay.vue
  6. 77
      src/views/modules/shequzhili/event/cpts/process-form.vue
  7. 31
      src/views/modules/shequzhili/event/eventList.vue

31
src/views/modules/shequzhili/event/cpts/event-detail.vue

@ -72,6 +72,7 @@ function iniData () {
pageType: "info", pageType: "info",
info: {}, info: {},
eventDetailCopy: {}
}; };
} }
@ -86,6 +87,13 @@ export default {
type: String, type: String,
default: "info", default: "info",
}, },
eventDetailData: {
type: Object,
default () {
return {}
}
},
}, },
components: { components: {
@ -101,7 +109,11 @@ export default {
}, },
mounted () { mounted () {
this.getApiData(); if (this.eventId) {
this.info = JSON.parse(JSON.stringify(this.eventDetailData));
}
// this.getApiData();
}, },
methods: { methods: {
@ -114,24 +126,9 @@ export default {
}, },
async getApiData () { async getApiData () {
this.getEventInfo();
},
//
async getEventInfo () {
const url = "/gov/project/icEvent/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.info = { ...data };
} else {
this.$message.error(msg);
}
}, },
}, },
}; };
</script> </script>

52
src/views/modules/shequzhili/event/cpts/event-info.vue

@ -35,7 +35,8 @@
<el-card> <el-card>
<h3>事件详情</h3> <h3>事件详情</h3>
<event-detail ref="ref_detail" <event-detail ref="ref_detail"
:eventId="eventId"></event-detail> :eventId="eventId"
:eventDetailData="eventDetailData"></event-detail>
<div v-if="eventDetailData.operationId" <div v-if="eventDetailData.operationId"
class="div-btn "> class="div-btn ">
<el-button size="small" <el-button size="small"
@ -49,7 +50,8 @@
<el-card> <el-card>
<h3>处理</h3> <h3>处理</h3>
<process-form ref="ref_processinfo_dispose" <process-form ref="ref_processinfo_dispose"
:eventId="eventId"></process-form> :eventId="eventId"
:eventDetailData="eventDetailData"></process-form>
<div class="div-btn "> <div class="div-btn ">
<el-button size="small" <el-button size="small"
@ -203,7 +205,7 @@ function iniData () {
return { return {
formData: { formData: {
operationType: '', operationType: '',
categoryList: []
}, },
eventInfoData: {}, eventInfoData: {},
replayInfo: {}, replayInfo: {},
@ -215,7 +217,7 @@ function iniData () {
demandUserName: '', demandUserName: '',
demandUserMobile: '', demandUserMobile: '',
eventDetailData: {}, eventDetailCopy: {},
projectProcess: [], projectProcess: [],
@ -233,6 +235,12 @@ export default {
type: String, type: String,
default: "", default: "",
}, },
eventDetailData: {
type: Object,
default () {
return {}
}
},
}, },
components: { components: {
@ -263,29 +271,14 @@ export default {
} }
if (this.eventId) { if (this.eventId) {
this.getEventDetail() this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
} }
}, },
methods: { methods: {
//
async getEventDetail () {
const url = "/gov/project/icEvent/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
} else {
this.$message.error(msg);
}
},
changeName (val) { changeName (val) {
this.demandUserName = val this.demandUserName = val
}, },
changeMobile (val) { changeMobile (val) {
@ -330,6 +323,7 @@ export default {
console.log('eventInfo', this.eventInfoData) console.log('eventInfo', this.eventInfoData)
}, },
handleComfirm () { handleComfirm () {
if (this.pageType === 'add') { if (this.pageType === 'add') {
this.handelAdd() this.handelAdd()
@ -356,10 +350,11 @@ export default {
if (this.$refs.ref_processinfo_add.okflag) { if (this.$refs.ref_processinfo_add.okflag) {
this.formData.operationType = this.$refs.ref_processinfo_add.operationType this.formData.operationType = this.$refs.ref_processinfo_add.operationType
this.formData.categoryList = this.$refs.ref_processinfo_add.categoryList this.eventInfoData.operationType = this.$refs.ref_processinfo_add.operationType
if (this.formData.operationType === '0') { this.eventInfoData.categoryList = this.$refs.ref_processinfo_add.categoryList
if (this.formData.operationType === '0') {
this.project = {} this.project = {}
this.demand = {} this.demand = {}
this.replayInfo = this.$refs.ref_processinfo_add.replayInfo this.replayInfo = this.$refs.ref_processinfo_add.replayInfo
@ -367,8 +362,6 @@ export default {
// //
this.eventInfoData.content = this.replayInfo.content this.eventInfoData.content = this.replayInfo.content
this.eventInfoData.status = this.replayInfo.status this.eventInfoData.status = this.replayInfo.status
this.eventInfoData.categoryList = this.$refs.ref_processinfo_add.categoryList
} else if (this.formData.operationType === '1') { } else if (this.formData.operationType === '1') {
this.replayInfo = {} this.replayInfo = {}
@ -394,11 +387,6 @@ export default {
return false return false
} }
//
// this.demand.demandUserId//user.idic_resi_user.id
// this.demand.demandUserName//
// this.demand.demandUserMobile//
this.formData = { this.formData = {
...this.eventInfoData, ...this.eventInfoData,
// replayInfo: this.replayInfo, // replayInfo: this.replayInfo,
@ -409,6 +397,7 @@ export default {
console.log('this.formData', this.formData) console.log('this.formData', this.formData)
this.submit() this.submit()
}, },
async submit () { async submit () {
const url = "/gov/project/icEvent/add"; const url = "/gov/project/icEvent/add";
@ -434,13 +423,13 @@ export default {
if (this.$refs.ref_processinfo_dispose.okflag) { if (this.$refs.ref_processinfo_dispose.okflag) {
this.formData.operationType = this.$refs.ref_processinfo_dispose.operationType this.formData.operationType = this.$refs.ref_processinfo_dispose.operationType
this.formData.categoryList = this.$refs.ref_processinfo_dispose.categoryList
if (this.formData.operationType === '0') { if (this.formData.operationType === '0') {
this.project = {} this.project = {}
this.demand = {} this.demand = {}
this.replayInfo = this.$refs.ref_processinfo_dispose.replayInfo this.replayInfo = this.$refs.ref_processinfo_dispose.replayInfo
this.replayInfo.icEventId = this.eventId this.replayInfo.icEventId = this.eventId
console.log('replayInfo', this.replayInfo) console.log('replayInfo', this.replayInfo)
// //
@ -452,7 +441,6 @@ export default {
this.demand = {} this.demand = {}
this.project = this.$refs.ref_processinfo_dispose.project this.project = this.$refs.ref_processinfo_dispose.project
// //
this.project.icEventId = this.eventId this.project.icEventId = this.eventId
console.log('projectInfo', this.project) console.log('projectInfo', this.project)
let url = '/gov/project/icEvent/icEventToProject' let url = '/gov/project/icEvent/icEventToProject'
@ -463,7 +451,7 @@ export default {
this.project = {} this.project = {}
this.demand = this.$refs.ref_processinfo_dispose.demand this.demand = this.$refs.ref_processinfo_dispose.demand
// //
this.demand.IcEventId = this.eventId this.demand.icEventId = this.eventId
console.log('demond', this.demand) console.log('demond', this.demand)
let url = '/gov/project/icEvent/icEventToDemand' let url = '/gov/project/icEvent/icEventToDemand'
this.submitDispose(url, this.demand) this.submitDispose(url, this.demand)

46
src/views/modules/shequzhili/event/cpts/process-form-demand.vue

@ -165,8 +165,8 @@ var geocoder // 新建一个正逆地址解析类
function iniFmData () { function iniFmData () {
return { return {
operationType: '1',//[0: 1: 1:] operationType: '2',//[0: 1: 2:]
IcEventId: '',//Id icEventId: '',//Id
gridId: '',// gridId: '',//
categoryCode: '',// categoryCode: '',//
parentCode: '',// parentCode: '',//
@ -215,7 +215,7 @@ export default {
formData: iniFmData(), formData: iniFmData(),
formDataTemp: { formDataTemp: {
IcEventId: "", icEventId: "",
serviceLocation: "34534534", serviceLocation: "34534534",
categoryCode: "10030002", categoryCode: "10030002",
content: "341231", content: "341231",
@ -224,7 +224,7 @@ export default {
demandUserName: "123123", demandUserName: "123123",
gridId: "", gridId: "",
operationType: "1", operationType: "2",
parentCode: "1003", parentCode: "1003",
reportTime: "", reportTime: "",
reportType: "self_help", reportType: "self_help",
@ -243,7 +243,7 @@ export default {
// //
keyWords: '', keyWords: '',
eventDetailCopy: {}
}; };
}, },
components: {}, components: {},
@ -297,6 +297,13 @@ export default {
default: "", default: "",
}, },
eventDetailData: {
type: Object,
default () {
return {}
}
},
}, },
watch: { watch: {
demandUserName: function (val) { demandUserName: function (val) {
@ -323,7 +330,13 @@ export default {
this.initMap() this.initMap()
if (this.eventId) { if (this.eventId) {
this.getEventInfo() this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
this.formData.reportUserMobile = this.eventDetailCopy.mobile
this.formData.reportUserName = this.eventDetailCopy.name
this.formData.reportTime = this.eventDetailCopy.happenTime
this.formData.gridId = this.eventDetailCopy.gridId
} else { } else {
this.formData.demandUserName = this.demandUserName this.formData.demandUserName = this.demandUserName
this.formData.demandUserMobile = this.demandUserMobile this.formData.demandUserMobile = this.demandUserMobile
@ -334,28 +347,7 @@ export default {
}, },
methods: { methods: {
//
async getEventInfo () {
const url = "/gov/project/icEvent/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.formData.demandUserName = data.name
this.formData.demandUserMobile = data.mobile
this.formData.demandUserId = data.reportUserId
this.formData.reportTime = data.createdTime
this.formData.gridId = data.gridId
this.formData.reportUserMobile = data.name
this.formData.reportUserName = data.mobile
} else {
this.$message.error(msg);
}
},
async getDemandOptions () { async getDemandOptions () {
const url = "/heart/icresidemanddict/demandoption" const url = "/heart/icresidemanddict/demandoption"
let params = {} let params = {}

29
src/views/modules/shequzhili/event/cpts/process-form-project.vue

@ -245,7 +245,7 @@ export default {
okflag: false, okflag: false,
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2", uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
eventDetailCopy: {}
}; };
}, },
@ -272,7 +272,15 @@ export default {
}, },
props: {}, props: {
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
watch: { watch: {
"formData.assistanceUnitIndex": function (val) { "formData.assistanceUnitIndex": function (val) {
@ -327,7 +335,7 @@ export default {
this.getTagList() this.getTagList()
this.formData = { ...this.formDataTemp } this.formData = { ...this.formDataTemp }
if (this.eventId) { if (this.eventId) {
this.getEventInfo() this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
} else { } else {
} }
@ -409,22 +417,7 @@ export default {
this.visibleTagPanel = false; this.visibleTagPanel = false;
}, },
async getEventInfo () {
const url = "/gov/project/icEvent/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.formData.gridId = data.gridId
} else {
this.$message.error(msg);
}
},
async getProjectInfo () { async getProjectInfo () {
this.okflag = false this.okflag = false
this.$refs["ref_form"].validate((valid, messageObj) => { this.$refs["ref_form"].validate((valid, messageObj) => {

20
src/views/modules/shequzhili/event/cpts/process-form-replay.vue

@ -46,14 +46,15 @@ export default {
return { return {
btnDisable: false, btnDisable: false,
formData: { formData: {
operationType: '0',//[0: 1: 1:]
content: '', content: '',
status: '' status: ''
}, },
status: false, status: false,
okflag: false okflag: false,
eventDetailCopy: {}
}; };
}, },
@ -71,16 +72,25 @@ export default {
}, },
props: {}, props: {
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
watch: {}, watch: {},
async mounted () { async mounted () {
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}
}, },
methods: { methods: {
async getReplayInfo () { async getReplayInfo () {
this.okflag = false this.okflag = false
this.$refs["ref_form1"].validate((valid, messageObj) => { this.$refs["ref_form1"].validate((valid, messageObj) => {

77
src/views/modules/shequzhili/event/cpts/process-form.vue

@ -32,11 +32,13 @@
</el-form> </el-form>
<div v-if="operationType==='0'"> <div v-if="operationType==='0'">
<process-form-replay ref="ref_process_form_replay"></process-form-replay> <process-form-replay ref="ref_process_form_replay"
:eventDetailData="eventDetailData"></process-form-replay>
</div> </div>
<div v-if="operationType==='1'"> <div v-if="operationType==='1'">
<process-form-project ref="ref_process_form_project"></process-form-project> <process-form-project ref="ref_process_form_project"
:eventDetailData="eventDetailData"></process-form-project>
</div> </div>
<div v-if="operationType==='2'"> <div v-if="operationType==='2'">
@ -44,7 +46,8 @@
:eventId="eventId" :eventId="eventId"
:demandUserId="demandUserId" :demandUserId="demandUserId"
:demandUserName="demandUserName" :demandUserName="demandUserName"
:demandUserMobile="demandUserMobile"></process-form-demand> :demandUserMobile="demandUserMobile"
:eventDetailData="eventDetailData"></process-form-demand>
</div> </div>
@ -67,9 +70,7 @@ export default {
data () { data () {
return { return {
btnDisable: false,
gridList: [],//list--
categrayList: [],
casOptions: [], casOptions: [],
iscascaderShow: 0, iscascaderShow: 0,
selCategoryArray: [ selCategoryArray: [
@ -84,14 +85,15 @@ export default {
}, },
operationType: '1', operationType: '0',
categoryList: [], categoryList: [],
replayInfo: {}, replayInfo: {},
demand: {}, demand: {},
project: {}, project: {},
okflag: false okflag: false,
eventDetailCopy: {}
}; };
}, },
@ -132,6 +134,12 @@ export default {
type: String, type: String,
default: "", default: "",
}, },
eventDetailData: {
type: Object,
default () {
return {}
}
},
}, },
watch: { watch: {
@ -141,30 +149,28 @@ export default {
async mounted () { async mounted () {
const { user } = this.$store.state const { user } = this.$store.state
this.agencyId = user.agencyId this.agencyId = user.agencyId
this.loadGrid(); await this.getCategoryList()
this.getCategoryList() if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}, if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
this.selCategoryArray = []
methods: { this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
this.selCategoryArray.push(this.eventDetailCopy.categoryId)
this.selCateObj = {
name: this.eventDetailCopy.categoryName,
id: this.eventDetailCopy.categoryId
}
}
}
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params) },
if (code === 0) { methods: {
this.gridList = data
} else {
this.$message.error(msg)
}
},
async getCategoryList () { async getCategoryList () {
const url = "/gov/issue/issueprojectcategorydict/list" const url = "/gov/issue/issueprojectcategorydict/list"
@ -175,11 +181,11 @@ export default {
if (code === 0) { if (code === 0) {
let treeDataNew = this.filterTree(data) let treeDataNew = this.filterTree(data)
// this.categrayList = data
// //
++this.iscascaderShow ++this.iscascaderShow
this.casOptions = [] this.casOptions = []
this.selCategoryArray = ["1001", "1015"]
this.casOptions = treeDataNew this.casOptions = treeDataNew
@ -226,15 +232,17 @@ export default {
this.categoryList = [] this.categoryList = []
this.categoryList.push(this.selCategoryArray[1]) this.categoryList.push(this.selCategoryArray[1])
console.log(this.categoryList)
if (this.operationType === '0') { if (this.operationType === '0') {
this.$refs.ref_process_form_replay.getReplayInfo() this.$refs.ref_process_form_replay.getReplayInfo()
if (this.$refs.ref_process_form_replay.okflag) { if (this.$refs.ref_process_form_replay.okflag) {
this.replayInfo = this.$refs.ref_process_form_replay.formData this.replayInfo = this.$refs.ref_process_form_replay.formData
this.replayInfo.categoryId = this.selCateObj.id
this.replayInfo.categoryList = [] this.replayInfo.categoryId = this.categoryList[0]
this.replayInfo.categoryList.push(this.selCateObj) this.replayInfo.categoryList = this.categoryList
this.okflag = true this.okflag = true
} else { } else {
@ -245,10 +253,13 @@ export default {
} else if (this.operationType === '1') { } else if (this.operationType === '1') {
this.$refs.ref_process_form_project.getProjectInfo() this.$refs.ref_process_form_project.getProjectInfo()
if (this.$refs.ref_process_form_project.okflag) { if (this.$refs.ref_process_form_project.okflag) {
this.project = this.$refs.ref_process_form_project.formData this.project = this.$refs.ref_process_form_project.formData
this.project.categoryList = [] this.project.categoryList = []
this.project.categoryList.push(this.selCateObj) this.project.categoryList.push(this.selCateObj)
// //
this.okflag = true this.okflag = true

31
src/views/modules/shequzhili/event/eventList.vue

@ -153,6 +153,7 @@
<el-table-column prop="imageList" <el-table-column prop="imageList"
align="center" align="center"
width="80"
label="图片"> label="图片">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image v-if="scope.row.imageList&&scope.row.imageList.length>0" <el-image v-if="scope.row.imageList&&scope.row.imageList.length>0"
@ -165,6 +166,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="voiceList" <el-table-column prop="voiceList"
align="center" align="center"
width="80"
label="音频"> label="音频">
<template slot-scope="scope"> <template slot-scope="scope">
<img class="img-voice" <img class="img-voice"
@ -177,7 +179,7 @@
<el-table-column prop="sourceTypeName" <el-table-column prop="sourceTypeName"
align="center" align="center"
min-width="150" width="110"
label="上报渠道" label="上报渠道"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
</el-table-column> </el-table-column>
@ -196,13 +198,14 @@
<el-table-column prop="mobile" <el-table-column prop="mobile"
align="center" align="center"
width="100" width="110"
label="手机号" label="手机号"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
</el-table-column> </el-table-column>
<el-table-column prop="satisfactionName" <el-table-column prop="satisfactionName"
align="center" align="center"
width="100"
label="满意度" label="满意度"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
<!-- <template slot-scope="scope"> <!-- <template slot-scope="scope">
@ -213,12 +216,15 @@
<el-table-column prop="createdTime" <el-table-column prop="createdTime"
align="center" align="center"
width="140"
:show-overflow-tooltip="true"
label="上报时间"> label="上报时间">
</el-table-column> </el-table-column>
<el-table-column prop="status" <el-table-column prop="status"
align="center" align="center"
label="状态" label="状态"
width="80"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
@ -231,7 +237,7 @@
<el-table-column fixed="right" <el-table-column fixed="right"
label="操作" label="操作"
align="center" align="center"
width="160"> width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.status==='closed_case' && scope.row.satisfactionName" <el-button v-if="scope.row.status==='closed_case' && scope.row.satisfactionName"
@click="handleWatch(scope.row)" @click="handleWatch(scope.row)"
@ -275,6 +281,7 @@
<event-info ref="eleEditForm" <event-info ref="eleEditForm"
:pageType="pageType" :pageType="pageType"
:eventId="eventId" :eventId="eventId"
:eventDetailData="eventDetailData"
@handleClose="handleClose" @handleClose="handleClose"
@handleOk="handleOk" @handleOk="handleOk"
@dialogOk="handleEditSuccess" /> @dialogOk="handleEditSuccess" />
@ -369,6 +376,8 @@ export default {
}, },
eventId: '', eventId: '',
eventDetailData: {},
}; };
}, },
computed: { computed: {
@ -463,13 +472,27 @@ export default {
this.pageType = "info"; this.pageType = "info";
}, },
//
async handleDispose (row) { async handleDispose (row) {
this.eventId = row.icEventId this.eventId = row.icEventId
const url = "/gov/project/icEvent/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = "dispose"; this.pageType = "dispose";
} else {
this.$message.error(msg);
}
}, },
handleClose () { handleClose () {
this.pageType = "list"; this.pageType = "list";

Loading…
Cancel
Save