|
|
@ -8,21 +8,23 @@ |
|
|
|
style="display: inline-block !important"> |
|
|
|
{{item.handleType === 'project' ? '项目': item.handleType === 'issue' || item.handleType === 'issue-project' ? '议题' : item.handleType === 'event' || item.handleType === 'event-issue' ? '事件' : ''}} |
|
|
|
</div> |
|
|
|
<span v-if="item.handleType != 'event'" style="padding-left: 36px; font-weight: bold; color: rgb(96, 98, 102);">[ {{item | formatState}} ]</span> |
|
|
|
<span style="padding-left: 36px; font-weight: bold; color: rgb(96, 98, 102);">[ {{item | formatState}} ]</span> |
|
|
|
<span v-if="item.handleType != 'event'" style="padding-left: 36px">处理部门: {{item.handlerDept}}</span> |
|
|
|
<span v-if="item.handleType === 'event'" style="padding-left: 36px">议题内容: {{item.eventContent}}</span> |
|
|
|
<span v-if="item.handleType === 'event'" style="padding-left: 36px">事件内容: {{item.eventContent}}</span> |
|
|
|
</div> |
|
|
|
<el-form-item label="操作时间"> |
|
|
|
<el-date-picker v-model="item.createdTime" |
|
|
|
type="datetime" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
format="yyyy-MM-dd HH:mm:ss" |
|
|
|
:clearable="false" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="item.handleType === 'project' || item.handleType === 'issue-project' ? '项目处理意见' : '意见'"> |
|
|
|
<el-input v-model="item.advice"></el-input> |
|
|
|
<el-input v-model="item.advice" maxlength="500" show-word-limit></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="item.handleType === 'project' || item.handleType === 'issue-project' ? '项目处理图片' : '图片'" |
|
|
|
v-if="item.handleType != 'event'"> |
|
|
|
<el-form-item :label="item.handleType === 'project' || item.handleType === 'issue-project' ? '项目处理图片' : '图片'" v-if="item.handleType != 'event'"> |
|
|
|
<el-upload list-type="picture-card" |
|
|
|
:limit=3 |
|
|
|
:action="uploadUrl" |
|
|
@ -34,7 +36,7 @@ |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="回复居民意见" v-if="item.handleType != 'event' && item.handleType != 'event-issue' && item.handleType != 'issue'"> |
|
|
|
<el-input v-model="item.outAdvice"></el-input> |
|
|
|
<el-input v-model="item.outAdvice" maxlength="500" show-word-limit></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="回复居民图片" v-if="item.handleType != 'event' && item.handleType != 'event-issue' && item.handleType != 'issue'"> |
|
|
|
<el-upload list-type="picture-card" |
|
|
@ -51,7 +53,7 @@ |
|
|
|
</div> |
|
|
|
<template slot="footer"> |
|
|
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
|
|
|
<el-button type="primary" :disabled = "isDisabled" :loading="isLoading" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
|
|
|
<el-button type="primary" :disabled = "isDisabled" :loading="isLoading" @click="validateTime()">{{ $t('confirm') }}</el-button> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
</template> |
|
|
@ -80,26 +82,38 @@ export default { |
|
|
|
formatState (item) { |
|
|
|
if (item.handleType === 'project') { |
|
|
|
if (item.state === 0 && item.itemDeptDTOS && item.itemDeptDTOS.length > 0) { |
|
|
|
item.stateName = '吹哨' |
|
|
|
return '吹哨' |
|
|
|
} else if (item.state === 0 && item.itemDeptDTOS && item.itemDeptDTOS.length === 0) { |
|
|
|
item.stateName = '回应' |
|
|
|
return '回应' |
|
|
|
} else if (item.state === 5) { |
|
|
|
item.stateName = '关闭' |
|
|
|
return '关闭' |
|
|
|
} else if (item.state === 10) { |
|
|
|
item.stateName = '结案' |
|
|
|
return '结案' |
|
|
|
} |
|
|
|
} else if (item.handleType === 'issue' || item.handleType === 'event-issue') { |
|
|
|
if (item.state === 0) { |
|
|
|
item.stateName = '审核通过' |
|
|
|
return '审核通过' |
|
|
|
} else if (item.state === 1) { |
|
|
|
item.stateName = '回应' |
|
|
|
return '回应' |
|
|
|
} else if (item.state === 2) { |
|
|
|
item.stateName = '关闭' |
|
|
|
return '关闭' |
|
|
|
} else if (item.state === 3) { |
|
|
|
item.stateName = '转议题' |
|
|
|
return '转议题' |
|
|
|
} |
|
|
|
} else if (item.handleType === 'issue-project') { |
|
|
|
item.stateName = '转项目' |
|
|
|
return '转项目' |
|
|
|
} else if (item.handleType === 'event') { |
|
|
|
item.stateName = '事件发起' |
|
|
|
return '事件发起' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -116,6 +130,18 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
validateTime () { |
|
|
|
var flag = true |
|
|
|
this.processProgress.forEach((item, index, arr) => { |
|
|
|
if (index < arr.length - 1 && arr[index].createdTime < arr[index + 1].createdTime) { |
|
|
|
flag = false |
|
|
|
return this.$message.error(' [' + arr[index].stateName + '] 的操作时间应在 [' + arr[index + 1].stateName + '] 的操作时间之后') |
|
|
|
} |
|
|
|
}) |
|
|
|
if (flag) { |
|
|
|
this.dataFormSubmitHandle() |
|
|
|
} |
|
|
|
}, |
|
|
|
getInfo () { |
|
|
|
this.$http.get(`/events/item/getProcessProgress/${this.dataForm.id}`).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
@ -129,16 +155,16 @@ export default { |
|
|
|
let image = {} |
|
|
|
image.name = Math.round(Math.random() * 5) |
|
|
|
image.url = res.data.url |
|
|
|
if ('outImage' == imgType) { |
|
|
|
if (imgType === 'outImage') { |
|
|
|
this.processProgress[index].outImages.push(image) |
|
|
|
} else if ('image' == imgType) { |
|
|
|
} else if (imgType === 'image') { |
|
|
|
this.processProgress[index].images.push(image) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleRemove (file, fileList, index, imgType) { |
|
|
|
if ('outImage' == imgType) { |
|
|
|
if (imgType === 'outImage') { |
|
|
|
this.processProgress[index].outImages = fileList |
|
|
|
} else if ('image' == imgType) { |
|
|
|
} else if (imgType === 'image') { |
|
|
|
this.processProgress[index].images = fileList |
|
|
|
} |
|
|
|
}, |
|
|
@ -150,30 +176,25 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
|
// this.$refs['dataForm'].validate((valid) => { |
|
|
|
// if (!valid) { |
|
|
|
// return false |
|
|
|
// } |
|
|
|
this.isLoading = true |
|
|
|
this.isDisabled = true |
|
|
|
this.$http['post']('/events/item/editProcessProgressList/', this.processProgress).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
// 确定按钮 防点击 |
|
|
|
this.isDisabled = false |
|
|
|
this.isLoading = false |
|
|
|
return this.$message.error(res.msg) |
|
|
|
this.isLoading = true |
|
|
|
this.isDisabled = true |
|
|
|
this.$http['post']('/events/item/editProcessProgressList/', this.processProgress).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
// 确定按钮 防点击 |
|
|
|
this.isDisabled = false |
|
|
|
this.isLoading = false |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.visible = false |
|
|
|
this.$emit('refreshDataList') |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.visible = false |
|
|
|
this.$emit('refreshDataList') |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
// }) |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}, 1000, { 'leading': true, 'trailing': false }) |
|
|
|
} |
|
|
|
} |
|
|
|