17 changed files with 416 additions and 844 deletions
After Width: | Height: | Size: 9.3 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 15 KiB |
@ -1,489 +0,0 @@ |
|||||
<template> |
|
||||
<div class=""> |
|
||||
<div v-if="pageType == 'add'"> |
|
||||
<el-card> |
|
||||
<h3>新增事件</h3> |
|
||||
<event-add ref="ref_add" |
|
||||
@changeName="changeName" |
|
||||
@changeMobile="changeMobile" |
|
||||
@changeUserId="changeUserId"></event-add> |
|
||||
</el-card> |
|
||||
|
|
||||
<div class="process-form"> |
|
||||
<el-card> |
|
||||
<h3>处理</h3> |
|
||||
<process-form ref="ref_processinfo_add" |
|
||||
:demandUserId="demandUserId" |
|
||||
:demandUserName="demandUserName" |
|
||||
:demandUserMobile="demandUserMobile"></process-form> |
|
||||
|
|
||||
<div class="div-btn "> |
|
||||
<el-button size="small" |
|
||||
@click="handleClose">关闭</el-button> |
|
||||
<el-button style="margin-left:20px" |
|
||||
type="primary" |
|
||||
size="small" |
|
||||
@click="handleComfirm">确定</el-button> |
|
||||
</div> |
|
||||
</el-card> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div v-if="pageType == 'dispose'||pageType == 'info'" |
|
||||
class="g-page"> |
|
||||
<div class="g-left"> |
|
||||
|
|
||||
<event-detail ref="ref_detail" |
|
||||
:eventId="eventId" |
|
||||
:eventDetailData="eventDetailData" |
|
||||
@handleClose="handleClose"></event-detail> |
|
||||
|
|
||||
<div v-if="!eventDetailData.operationId" |
|
||||
class="process-form"> |
|
||||
<el-card> |
|
||||
<h3>处理</h3> |
|
||||
<process-form ref="ref_processinfo_dispose" |
|
||||
:eventId="eventId" |
|
||||
:eventDetailData="eventDetailData"></process-form> |
|
||||
|
|
||||
<div class="div-btn "> |
|
||||
<el-button size="small" |
|
||||
@click="handleClose">关闭</el-button> |
|
||||
<el-button style="margin-left:20px" |
|
||||
type="primary" |
|
||||
size="small" |
|
||||
@click="handleComfirm">确定</el-button> |
|
||||
</div> |
|
||||
</el-card> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="g-right"> |
|
||||
<el-card class="m-card" |
|
||||
style="max-height: 90vh; overflow: auto"> |
|
||||
<h3>处理进展</h3> |
|
||||
<div class="m-process" |
|
||||
v-if="projectProcess.length>0"> |
|
||||
<div class="list"> |
|
||||
<div class="item" |
|
||||
:class="index === 0 ? 'z-on' : ''" |
|
||||
:key="item.processId" |
|
||||
v-for="(item, index) in projectProcess"> |
|
||||
<div class="item-row"> |
|
||||
<div class="name">{{ item.processName }}</div> |
|
||||
<div class="date"> |
|
||||
{{ item.processTime }} |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div v-if="item.type==='event'"> |
|
||||
<div class="detail"> |
|
||||
<div class="detail-field">回复人:</div> |
|
||||
<div class="detail-value">{{ item.publicReply }}</div> |
|
||||
</div> |
|
||||
<div class="detail"> |
|
||||
<div class="detail-field">回复内容:</div> |
|
||||
<div class="detail-value">{{ item.departmentName }}</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div v-if="item.type==='project'"> |
|
||||
<div v-if="item.processName==='回复'"> |
|
||||
<div class="detail"> |
|
||||
<div class="detail-field">回复人:</div> |
|
||||
<div class="detail-value">{{ item.publicReply }}</div> |
|
||||
</div> |
|
||||
<div class="detail"> |
|
||||
<div class="detail-field">回复内容:</div> |
|
||||
<div class="detail-value">{{ item.departmentName }}</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div v-else> |
|
||||
<div class="detail"> |
|
||||
<div class="detail-field">处理部门:</div> |
|
||||
<div class="detail-value">{{ item.departmentName }}</div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="detail" |
|
||||
v-if="item.processName == '处理响应' && item.assistanceUnitName"> |
|
||||
<div class="detail-field">协 办:</div> |
|
||||
<div class="detail-value"> |
|
||||
<fold-text :row="3">{{ item.assistanceUnitName }}</fold-text> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="detail" |
|
||||
v-if="item.processName != '转项目' && item.publicReply"> |
|
||||
<div class="detail-field">说 明:</div> |
|
||||
<div class="detail-value"> |
|
||||
<fold-text :row="3">{{ item.publicReply }}</fold-text> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="detail" |
|
||||
v-if="item.processName != '转项目' && item.internalRemark"> |
|
||||
<div class="detail-field">内部备注:</div> |
|
||||
<div class="detail-value"> |
|
||||
<fold-text :row="3">{{ item.internalRemark }}</fold-text> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div v-if="item.internalFile&&item.internalFile.length>0" |
|
||||
class="detail"> |
|
||||
<div class="attachement-list"> |
|
||||
<a :href="att.url" |
|
||||
target="_blank" |
|
||||
:key="att.url" |
|
||||
v-for="att in item.internalFile"> |
|
||||
<i class="el-icon-folder-opened"></i> |
|
||||
{{ att.name }} |
|
||||
</a> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div v-if="item.type==='demand'"> |
|
||||
<div v-if="item.processName==='回复'"> |
|
||||
<div class="detail"> |
|
||||
<div class="detail-field">回复人:</div> |
|
||||
<div class="detail-value">{{ item.publicReply }}</div> |
|
||||
</div> |
|
||||
<div class="detail"> |
|
||||
<div class="detail-field">回复内容:</div> |
|
||||
<div class="detail-value">{{ item.departmentName }}</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div v-if="item.processName==='需求完成'"> |
|
||||
<div class="detail"> |
|
||||
<div class="detail-field">服务方:</div> |
|
||||
<div class="detail-value">{{ item.serviceParty }}</div> |
|
||||
</div> |
|
||||
<div class="detail"> |
|
||||
<div class="detail-field">实际服务时间:</div> |
|
||||
<div class="detail-value">{{ item.actualServiceTime }}</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div v-if="item.processName==='转服务'"> |
|
||||
<div class="detail"> |
|
||||
<div class="detail-field">服务时间:</div> |
|
||||
<div class="detail-value">{{ item.serviceTime }}</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div v-else>暂无处理进展</div> |
|
||||
</el-card> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { requestPost } from "@/js/dai/request"; |
|
||||
import foldText from "@/views/components/foldText"; |
|
||||
|
|
||||
import eventInfo from "./event-info1"; |
|
||||
|
|
||||
import dateFormat from "dai-js/tools/dateFormat"; |
|
||||
|
|
||||
import eventAdd from "./add"; |
|
||||
import eventDetail from "./event-detail"; |
|
||||
import processForm from "./process-form"; |
|
||||
|
|
||||
function iniData () { |
|
||||
return { |
|
||||
formData: { |
|
||||
operationType: '', |
|
||||
|
|
||||
}, |
|
||||
eventInfoData: {}, |
|
||||
replayInfo: {}, |
|
||||
demand: {}, |
|
||||
project: {}, |
|
||||
|
|
||||
//新增 |
|
||||
demandUserId: '', |
|
||||
demandUserName: '', |
|
||||
demandUserMobile: '', |
|
||||
|
|
||||
eventDetailCopy: {}, |
|
||||
|
|
||||
projectProcess: [], |
|
||||
|
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
export default { |
|
||||
name: "projectInfo", |
|
||||
props: { |
|
||||
eventId: { |
|
||||
type: String, |
|
||||
default: "", |
|
||||
}, |
|
||||
pageType: { |
|
||||
type: String, |
|
||||
default: "", |
|
||||
}, |
|
||||
eventDetailData: { |
|
||||
type: Object, |
|
||||
default () { |
|
||||
return {} |
|
||||
} |
|
||||
}, |
|
||||
}, |
|
||||
|
|
||||
components: { |
|
||||
foldText, |
|
||||
eventInfo, |
|
||||
eventAdd, |
|
||||
eventDetail, |
|
||||
processForm, |
|
||||
}, |
|
||||
|
|
||||
data: iniData, |
|
||||
|
|
||||
computed: {}, |
|
||||
|
|
||||
watch: { |
|
||||
eventId () { |
|
||||
let data = iniData(); |
|
||||
Object.keys(data).forEach((k) => { |
|
||||
this[k] = data[k]; |
|
||||
}); |
|
||||
this.getApiData(); |
|
||||
}, |
|
||||
}, |
|
||||
|
|
||||
mounted () { |
|
||||
if (this.pageType === 'dispose') { |
|
||||
this.getProjectProcess() |
|
||||
} |
|
||||
|
|
||||
if (this.eventId) { |
|
||||
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
|
|
||||
|
|
||||
changeName (val) { |
|
||||
this.demandUserName = val |
|
||||
}, |
|
||||
changeMobile (val) { |
|
||||
|
|
||||
this.demandUserMobile = val |
|
||||
}, |
|
||||
changeUserId (val) { |
|
||||
|
|
||||
this.demandUserId = val |
|
||||
}, |
|
||||
|
|
||||
//加载组织数据 |
|
||||
async getProjectProcess () { |
|
||||
const url = "/gov/project/icEvent/process"; |
|
||||
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/process"; |
|
||||
|
|
||||
const { data, code, msg } = await requestPost(url, { |
|
||||
icEventId: this.eventId, |
|
||||
}); |
|
||||
|
|
||||
if (code === 0) { |
|
||||
this.projectProcess = data.map((item) => { |
|
||||
item.processTime = dateFormat( |
|
||||
new Date(item.processTime * 1000), |
|
||||
"yyyy-MM-dd hh:mm" |
|
||||
); |
|
||||
return item; |
|
||||
}); |
|
||||
} else { |
|
||||
this.$message.error(msg); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
getEventInfo () { |
|
||||
this.$refs.ref_add.getEventInfo() |
|
||||
if (this.$refs.ref_add.okflag) { |
|
||||
|
|
||||
this.eventInfoData = this.$refs.ref_add.formData |
|
||||
} else { |
|
||||
return false |
|
||||
} |
|
||||
|
|
||||
console.log('eventInfo', this.eventInfoData) |
|
||||
}, |
|
||||
|
|
||||
handleComfirm () { |
|
||||
if (this.pageType === 'add') { |
|
||||
this.handelAdd() |
|
||||
} |
|
||||
if (this.pageType === 'dispose') { |
|
||||
this.handelDispose() |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
handelAdd () { |
|
||||
if (this.pageType === 'add') { |
|
||||
this.$refs.ref_add.getEventInfo() |
|
||||
if (this.$refs.ref_add.okflag) { |
|
||||
|
|
||||
this.eventInfoData = this.$refs.ref_add.formData |
|
||||
} else { |
|
||||
return false |
|
||||
} |
|
||||
|
|
||||
console.log('eventInfo', this.eventInfoData) |
|
||||
} |
|
||||
|
|
||||
this.$refs.ref_processinfo_add.getProcessInfo() |
|
||||
if (this.$refs.ref_processinfo_add.okflag) { |
|
||||
|
|
||||
this.formData.operationType = this.$refs.ref_processinfo_add.operationType |
|
||||
this.eventInfoData.operationType = this.$refs.ref_processinfo_add.operationType |
|
||||
|
|
||||
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 |
|
||||
console.log('replayInfo', this.replayInfo) |
|
||||
//回复属性赋值 |
|
||||
this.eventInfoData.content = this.replayInfo.content |
|
||||
this.eventInfoData.status = this.replayInfo.status |
|
||||
|
|
||||
} else if (this.formData.operationType === '1') { |
|
||||
this.replayInfo = {} |
|
||||
this.demand = {} |
|
||||
this.project = this.$refs.ref_processinfo_add.project |
|
||||
//项目的属性同事件一样 |
|
||||
this.project.gridId = this.eventInfoData.gridId |
|
||||
console.log('projectInfo', this.project) |
|
||||
|
|
||||
} else if (this.formData.operationType === '2') { |
|
||||
this.replayInfo = {} |
|
||||
this.project = {} |
|
||||
this.demand = this.$refs.ref_processinfo_add.demand |
|
||||
//需求的属性同事件一样 |
|
||||
this.demand.gridId = this.eventInfoData.gridId |
|
||||
this.demand.reportUserName = this.eventInfoData.name//上报人姓名同需求上报人姓名 |
|
||||
this.demand.reportUserMobile = this.eventInfoData.mobile//上报人手机号同需求上报人手机号 |
|
||||
this.demand.reportTime = this.eventInfoData.happenTime//上报时间 |
|
||||
console.log('demond', this.demand) |
|
||||
} |
|
||||
|
|
||||
} else { |
|
||||
return false |
|
||||
} |
|
||||
|
|
||||
this.formData = { |
|
||||
...this.eventInfoData, |
|
||||
// replayInfo: this.replayInfo, |
|
||||
project: this.project, |
|
||||
demand: this.demand |
|
||||
} |
|
||||
|
|
||||
console.log('this.formData', this.formData) |
|
||||
this.submit() |
|
||||
}, |
|
||||
|
|
||||
async submit () { |
|
||||
const url = "/gov/project/icEvent/add"; |
|
||||
|
|
||||
const { formData } = this; |
|
||||
const { data, code, msg } = await requestPost(url, { |
|
||||
|
|
||||
...formData, |
|
||||
}); |
|
||||
if (code === 0) { |
|
||||
|
|
||||
this.$message.success("操作成功!"); |
|
||||
if (this.pageType === 'add') { |
|
||||
this.eventInfo = this.$refs.ref_add.resetData() |
|
||||
|
|
||||
} |
|
||||
this.$emit("handleOk"); |
|
||||
} else { |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
handelDispose () { |
|
||||
this.$refs.ref_processinfo_dispose.getProcessInfo() |
|
||||
if (this.$refs.ref_processinfo_dispose.okflag) { |
|
||||
|
|
||||
this.formData.operationType = this.$refs.ref_processinfo_dispose.operationType |
|
||||
|
|
||||
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) |
|
||||
//回复属性赋值 |
|
||||
let url = '/gov/project/icEvent/reply' |
|
||||
this.submitDispose(url, this.replayInfo) |
|
||||
|
|
||||
} else if (this.formData.operationType === '1') { |
|
||||
this.replayInfo = {} |
|
||||
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' |
|
||||
this.submitDispose(url, this.project) |
|
||||
|
|
||||
} else if (this.formData.operationType === '2') { |
|
||||
this.replayInfo = {} |
|
||||
this.project = {} |
|
||||
this.demand = this.$refs.ref_processinfo_dispose.demand |
|
||||
//需求的属性同事件一样 |
|
||||
this.demand.icEventId = this.eventId |
|
||||
console.log('demond', this.demand) |
|
||||
let url = '/gov/project/icEvent/icEventToDemand' |
|
||||
this.submitDispose(url, this.demand) |
|
||||
} |
|
||||
|
|
||||
} else { |
|
||||
return false |
|
||||
} |
|
||||
|
|
||||
}, |
|
||||
async submitDispose (url, params) { |
|
||||
|
|
||||
const { data, code, msg } = await requestPost(url, { |
|
||||
|
|
||||
...params, |
|
||||
}); |
|
||||
if (code === 0) { |
|
||||
|
|
||||
this.$message.success("操作成功!"); |
|
||||
|
|
||||
this.$emit("handleOk"); |
|
||||
} else { |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
handleClose () { |
|
||||
if (this.pageType === 'add') { |
|
||||
this.eventInfo = this.$refs.ref_add.resetData() |
|
||||
|
|
||||
} |
|
||||
|
|
||||
this.$emit("handleClose"); |
|
||||
} |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style |
|
||||
lang="scss" |
|
||||
src="@/assets/scss/modules/shequzhili/event-info.scss" |
|
||||
scoped |
|
||||
></style> |
|
@ -1,152 +0,0 @@ |
|||||
<template> |
|
||||
<div class=""> |
|
||||
<div class="g-page" v-show="pageType == 'info'"> |
|
||||
<div class="g-left"> |
|
||||
<el-card> |
|
||||
<h3>事件详情</h3> |
|
||||
|
|
||||
<div class="m-row"> |
|
||||
<div class="m-info"> |
|
||||
<div class="info-title">事件内容</div> |
|
||||
<div class="info-content">{{ info.eventContent }}</div> |
|
||||
<div class="info-pics"> |
|
||||
<img |
|
||||
:src="src" |
|
||||
:key="src" |
|
||||
v-for="src in info.eventImgs" |
|
||||
@click="watchImg(src)" |
|
||||
/> |
|
||||
</div> |
|
||||
<div class="info-prop"> |
|
||||
<span class="info-title-2">提交时间:</span> |
|
||||
<span>{{ info.eventTime }}</span> |
|
||||
</div> |
|
||||
<div class="info-prop"> |
|
||||
<span class="info-title-2">报事人:</span> |
|
||||
<span>{{ info.eventPeopleName }}</span> |
|
||||
</div> |
|
||||
<div class="info-prop"> |
|
||||
<span class="info-title-2">所属网格:</span> |
|
||||
<span>{{ info.gridName }}</span> |
|
||||
</div> |
|
||||
<div class="info-prop"> |
|
||||
<span class="info-title-2">提报给:</span> |
|
||||
<div> |
|
||||
<div>{{ info.eventPersonShow }}</div> |
|
||||
<div>{{ info.eventOrgShow }}</div> |
|
||||
</div> |
|
||||
|
|
||||
<!-- <span>{{ info.eventPerson.join("、") || "--" }}</span> --> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="m-btns" v-if="type == 'info'"> |
|
||||
<el-button size="" @click="handleClose">关闭</el-button> |
|
||||
</div> |
|
||||
</el-card> |
|
||||
</div> |
|
||||
<div class="g-right"></div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { requestPost } from "@/js/dai/request"; |
|
||||
import foldText from "@/views/components/foldText"; |
|
||||
import dateFormat from "dai-js/tools/dateFormat"; |
|
||||
|
|
||||
function iniData() { |
|
||||
return { |
|
||||
pageType: "info", |
|
||||
|
|
||||
eventInfo: { |
|
||||
eventTime: "", |
|
||||
eventContent: "", |
|
||||
eventAddress: "", |
|
||||
gridName: "", |
|
||||
isClosed: true, |
|
||||
isResolve: true, |
|
||||
isRollback: true, |
|
||||
eventImgs: [], |
|
||||
eventPerson: [], |
|
||||
eventOrg: [], |
|
||||
eventPeopleName: "", |
|
||||
projectInfo: { |
|
||||
projectId: "", |
|
||||
operationName: "", |
|
||||
operationTime: "", |
|
||||
projectDeclare: "", |
|
||||
}, |
|
||||
}, |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
export default { |
|
||||
name: "issueInfo", |
|
||||
props: { |
|
||||
eventId: { |
|
||||
type: String, |
|
||||
default: "64502a8f1048a7240295527a9b32e513", |
|
||||
}, |
|
||||
type: { |
|
||||
type: String, |
|
||||
default: "info", |
|
||||
}, |
|
||||
}, |
|
||||
|
|
||||
components: { |
|
||||
foldText, |
|
||||
}, |
|
||||
|
|
||||
data: iniData, |
|
||||
|
|
||||
computed: {}, |
|
||||
|
|
||||
watch: {}, |
|
||||
|
|
||||
mounted() { |
|
||||
this.getApiData(); |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
watchImg(src) { |
|
||||
window.open(src); |
|
||||
}, |
|
||||
|
|
||||
handleClose() { |
|
||||
this.$emit("close"); |
|
||||
}, |
|
||||
|
|
||||
async getApiData() { |
|
||||
this.getEventInfo(); |
|
||||
}, |
|
||||
//加载组织数据 |
|
||||
async getEventInfo() { |
|
||||
const url = "/gov/project/resievent/eventdetail-icdata"; |
|
||||
|
|
||||
const { data, code, msg } = await requestPost(url, { |
|
||||
resiEventId: this.projectInfo.originId, |
|
||||
}); |
|
||||
|
|
||||
if (code === 0) { |
|
||||
if (data.eventOrg && data.eventOrg.length > 0) { |
|
||||
data.eventOrgShow = data.eventOrg.join("、"); |
|
||||
} |
|
||||
if (data.eventPerson && data.eventPerson.length > 0) { |
|
||||
data.eventPersonShow = data.eventPerson.join("、"); |
|
||||
} |
|
||||
this.info = { ...data }; |
|
||||
} else { |
|
||||
this.$message.error(msg); |
|
||||
} |
|
||||
}, |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style |
|
||||
lang="scss" |
|
||||
src="@/assets/scss/modules/shequzhili/project-info.scss" |
|
||||
scoped |
|
||||
></style> |
|
Loading…
Reference in new issue