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. 33
      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",
info: {},
eventDetailCopy: {}
};
}
@ -86,6 +87,13 @@ export default {
type: String,
default: "info",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
components: {
@ -101,7 +109,11 @@ export default {
},
mounted () {
this.getApiData();
if (this.eventId) {
this.info = JSON.parse(JSON.stringify(this.eventDetailData));
}
// this.getApiData();
},
methods: {
@ -114,24 +126,9 @@ export default {
},
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>

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

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

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

@ -165,8 +165,8 @@ var geocoder // 新建一个正逆地址解析类
function iniFmData () {
return {
operationType: '1',//[0: 1: 1:]
IcEventId: '',//Id
operationType: '2',//[0: 1: 2:]
icEventId: '',//Id
gridId: '',//
categoryCode: '',//
parentCode: '',//
@ -215,7 +215,7 @@ export default {
formData: iniFmData(),
formDataTemp: {
IcEventId: "",
icEventId: "",
serviceLocation: "34534534",
categoryCode: "10030002",
content: "341231",
@ -224,7 +224,7 @@ export default {
demandUserName: "123123",
gridId: "",
operationType: "1",
operationType: "2",
parentCode: "1003",
reportTime: "",
reportType: "self_help",
@ -243,7 +243,7 @@ export default {
//
keyWords: '',
eventDetailCopy: {}
};
},
components: {},
@ -297,6 +297,13 @@ export default {
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
watch: {
demandUserName: function (val) {
@ -323,7 +330,13 @@ export default {
this.initMap()
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 {
this.formData.demandUserName = this.demandUserName
this.formData.demandUserMobile = this.demandUserMobile
@ -334,28 +347,7 @@ export default {
},
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 () {
const url = "/heart/icresidemanddict/demandoption"
let params = {}

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

@ -245,7 +245,7 @@ export default {
okflag: false,
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
eventDetailCopy: {}
};
},
@ -272,7 +272,15 @@ export default {
},
props: {},
props: {
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
watch: {
"formData.assistanceUnitIndex": function (val) {
@ -327,7 +335,7 @@ export default {
this.getTagList()
this.formData = { ...this.formDataTemp }
if (this.eventId) {
this.getEventInfo()
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
} else {
}
@ -409,22 +417,7 @@ export default {
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 () {
this.okflag = false
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 {
btnDisable: false,
formData: {
operationType: '0',//[0: 1: 1:]
content: '',
status: ''
},
status: false,
okflag: false
okflag: false,
eventDetailCopy: {}
};
},
@ -71,16 +72,25 @@ export default {
},
props: {},
props: {
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
watch: {},
async mounted () {
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}
},
methods: {
async getReplayInfo () {
this.okflag = false
this.$refs["ref_form1"].validate((valid, messageObj) => {

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

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

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

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

Loading…
Cancel
Save