|
|
@ -60,7 +60,9 @@ |
|
|
|
</div> |
|
|
|
<div class="project-progress"> |
|
|
|
<div class="project-progress-tip">处理进展</div> |
|
|
|
<el-timeline> |
|
|
|
<div class="refresh"><el-button type="text" @click="refreshProgress"> <i class="el-icon-refresh"></i></el-button></div> |
|
|
|
|
|
|
|
<el-timeline v-loading="timeloading" style="padding-top: 12px;"> |
|
|
|
<el-timeline-item v-for="(item, index) in timeLineList" |
|
|
|
:key="item.id" |
|
|
|
:color="item.type === 'init' ? 'red' : item.type === 'project' ? '#009688' : '#ffa546'"> |
|
|
@ -282,38 +284,39 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import BMap from 'BMap' |
|
|
|
import 'element-ui/lib/theme-chalk/timeline.css' |
|
|
|
import 'element-ui/lib/theme-chalk/timeline-item.css' |
|
|
|
import 'element-ui/lib/theme-chalk/image.css' |
|
|
|
import debounce from 'lodash/debounce' |
|
|
|
import Cookies from 'js-cookie' |
|
|
|
import 'quill/dist/quill.snow.css' |
|
|
|
import BMap from "BMap"; |
|
|
|
import "element-ui/lib/theme-chalk/timeline.css"; |
|
|
|
import "element-ui/lib/theme-chalk/timeline-item.css"; |
|
|
|
import "element-ui/lib/theme-chalk/image.css"; |
|
|
|
import debounce from "lodash/debounce"; |
|
|
|
import Cookies from "js-cookie"; |
|
|
|
import "quill/dist/quill.snow.css"; |
|
|
|
export default { |
|
|
|
name: 'itemDealDetailView', |
|
|
|
data () { |
|
|
|
name: "itemDealDetailView", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
map: '', |
|
|
|
timeloading:true, |
|
|
|
map: "", |
|
|
|
innerVisible: false, |
|
|
|
dataForm: { |
|
|
|
id: '', |
|
|
|
nickName: '', |
|
|
|
distributeTime: '', |
|
|
|
itemContent: '', |
|
|
|
id: "", |
|
|
|
nickName: "", |
|
|
|
distributeTime: "", |
|
|
|
itemContent: "", |
|
|
|
images: [], |
|
|
|
issueAddress: '', |
|
|
|
issueAddress: "", |
|
|
|
handleProgressResultDTOS: [], |
|
|
|
issueProgressResultDTOS: [], |
|
|
|
handleResultDTOS: [], |
|
|
|
deptResultDTOS: [], |
|
|
|
evaluateDeptDTOS: [], |
|
|
|
handleAdvice: '', |
|
|
|
outHandleAdvice: '', |
|
|
|
handleCategory: '', |
|
|
|
issueLatitude: '', |
|
|
|
issueLongitude: '', |
|
|
|
handlerDeptIdRule: '', |
|
|
|
voice: '' |
|
|
|
handleAdvice: "", |
|
|
|
outHandleAdvice: "", |
|
|
|
handleCategory: "", |
|
|
|
issueLatitude: "", |
|
|
|
issueLongitude: "", |
|
|
|
handlerDeptIdRule: "", |
|
|
|
voice: "", |
|
|
|
}, |
|
|
|
isAble: false, |
|
|
|
previewImgList: [], |
|
|
@ -323,16 +326,16 @@ export default { |
|
|
|
limitVal: 10, |
|
|
|
total: null, |
|
|
|
postDataForm: { |
|
|
|
id: '', |
|
|
|
handleAdvice: '', |
|
|
|
outHandleAdvice: '', |
|
|
|
handleCategory: '', |
|
|
|
id: "", |
|
|
|
handleAdvice: "", |
|
|
|
outHandleAdvice: "", |
|
|
|
handleCategory: "", |
|
|
|
deptResultDTOS: [], |
|
|
|
evaluateDeptDTOS: [], |
|
|
|
handleImagesPC: [], |
|
|
|
outHandleImagesPC: [], |
|
|
|
handleImages: [], |
|
|
|
outHandleImages: [] |
|
|
|
outHandleImages: [], |
|
|
|
}, |
|
|
|
deptResultDTOSVisible: false, |
|
|
|
evaluateDeptDTOSVisible: false, |
|
|
@ -340,465 +343,604 @@ export default { |
|
|
|
options: [], |
|
|
|
loading: false, |
|
|
|
loadingIn: false, |
|
|
|
uploadUrl: '', |
|
|
|
uploadUrl: "", |
|
|
|
hideUploadOut: false, |
|
|
|
hideUploadIn: false, |
|
|
|
dialogImageUrl: '', |
|
|
|
dialogImageUrl: "", |
|
|
|
dialogVisible: false, |
|
|
|
hideResident: false |
|
|
|
} |
|
|
|
hideResident: false, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
this.dataForm.id = this.$route.query.id |
|
|
|
this.getOptions() |
|
|
|
this.init() |
|
|
|
mounted() { |
|
|
|
this.dataForm.id = this.$route.query.id; |
|
|
|
this.getOptions(); |
|
|
|
this.init(); |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
formatState (item) { |
|
|
|
if (item.type === 'project') { |
|
|
|
if (item.state === 0 && item.itemDeptDTOS && item.itemDeptDTOS.length > 0) { |
|
|
|
return '吹哨' |
|
|
|
} else if (item.state === 0 && item.itemDeptDTOS && item.itemDeptDTOS.length === 0) { |
|
|
|
return '办理' |
|
|
|
formatState(item) { |
|
|
|
if (item.type === "project") { |
|
|
|
if ( |
|
|
|
item.state === 0 && |
|
|
|
item.itemDeptDTOS && |
|
|
|
item.itemDeptDTOS.length > 0 |
|
|
|
) { |
|
|
|
return "吹哨"; |
|
|
|
} else if ( |
|
|
|
item.state === 0 && |
|
|
|
item.itemDeptDTOS && |
|
|
|
item.itemDeptDTOS.length === 0 |
|
|
|
) { |
|
|
|
return "办理"; |
|
|
|
} else if (item.state === 12) { |
|
|
|
return '响应拟办' |
|
|
|
return "响应拟办"; |
|
|
|
} else if (item.state === 13) { |
|
|
|
return '直接办理' |
|
|
|
return "直接办理"; |
|
|
|
} else if (item.state === 5) { |
|
|
|
return '不予受理' |
|
|
|
return "不予受理"; |
|
|
|
} else if (item.state === 10) { |
|
|
|
return '结案' |
|
|
|
return "结案"; |
|
|
|
} else if (item.state === 11) { |
|
|
|
return '结案申请' |
|
|
|
return "结案申请"; |
|
|
|
} else if (item.state === 15) { |
|
|
|
return '上报网格化平台' |
|
|
|
return "上报网格化平台"; |
|
|
|
} else if (item.state === 20) { |
|
|
|
return '网格化平台-受理' |
|
|
|
return "网格化平台-受理"; |
|
|
|
} else if (item.state === 25) { |
|
|
|
return '网格化平台-立案' |
|
|
|
return "网格化平台-立案"; |
|
|
|
} else if (item.state === 30) { |
|
|
|
return '网格化平台-派遣' |
|
|
|
return "网格化平台-派遣"; |
|
|
|
} else if (item.state === 35) { |
|
|
|
return '网格化平台-中间再派' |
|
|
|
return "网格化平台-中间再派"; |
|
|
|
} else if (item.state === 40) { |
|
|
|
return '网格化平台-接单' |
|
|
|
return "网格化平台-接单"; |
|
|
|
} else if (item.state === 45) { |
|
|
|
return '网格化平台-处理' |
|
|
|
return "网格化平台-处理"; |
|
|
|
} else if (item.state === 50) { |
|
|
|
return '网格化平台-中间督办' |
|
|
|
return "网格化平台-中间督办"; |
|
|
|
} else if (item.state === 55) { |
|
|
|
return '网格化平台-催办' |
|
|
|
return "网格化平台-催办"; |
|
|
|
} else if (item.state === 60) { |
|
|
|
return '网格化平台-结案' |
|
|
|
return "网格化平台-结案"; |
|
|
|
} else if (item.state === 85) { |
|
|
|
return '项目延期-审核通过' |
|
|
|
return "项目延期-审核通过"; |
|
|
|
} else if (item.state === 90) { |
|
|
|
return '项目熔断-审核通过' |
|
|
|
return "项目熔断-审核通过"; |
|
|
|
} |
|
|
|
} else if (item.type === 'issue' || item.type === 'init') { |
|
|
|
} else if (item.type === "issue" || item.type === "init") { |
|
|
|
if (item.state === 0) { |
|
|
|
return '审核通过' |
|
|
|
return "审核通过"; |
|
|
|
} else if (item.state === 1) { |
|
|
|
return '回应' |
|
|
|
return "回应"; |
|
|
|
} else if (item.state === 2) { |
|
|
|
return '关闭' |
|
|
|
return "关闭"; |
|
|
|
} else if (item.state === 3) { |
|
|
|
return '转议题' |
|
|
|
} |
|
|
|
} else if (item.type === 'issue-project') { |
|
|
|
return '转项目' |
|
|
|
return "转议题"; |
|
|
|
} |
|
|
|
} else if (item.type === "issue-project") { |
|
|
|
return "转项目"; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
dataRule () { |
|
|
|
dataRule() { |
|
|
|
return { |
|
|
|
handleAdvice: [ |
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: this.$t("validate.required"), |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
outHandleAdvice: [ |
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: this.$t("validate.required"), |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
handleCategory: [ |
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: this.$t("validate.required"), |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
deptResultDTOS: [ |
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: this.$t("validate.required"), |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
evaluateDeptDTOS: [ |
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: this.$t("validate.required"), |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
handlerDeptIdRule: [ |
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: this.$t("validate.required"), |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
'postDataForm.handleAdvice': function (val) { |
|
|
|
this.dataForm.handleAdvice = val |
|
|
|
"postDataForm.handleAdvice": function(val) { |
|
|
|
this.dataForm.handleAdvice = val; |
|
|
|
}, |
|
|
|
'postDataForm.outHandleAdvice': function (val) { |
|
|
|
this.dataForm.outHandleAdvice = val |
|
|
|
"postDataForm.outHandleAdvice": function(val) { |
|
|
|
this.dataForm.outHandleAdvice = val; |
|
|
|
}, |
|
|
|
'postDataForm.handleCategory': function (val) { |
|
|
|
"postDataForm.handleCategory": function(val) { |
|
|
|
if (val === 1) { |
|
|
|
this.deptResultDTOSVisible = true |
|
|
|
this.evaluateDeptDTOSVisible = false |
|
|
|
for (let index = 0; index < this.dataForm.deptResultDTOS.length; index++) { |
|
|
|
const deptResultDTO = this.dataForm.deptResultDTOS[index] |
|
|
|
this.deptResultDTOSVisible = true; |
|
|
|
this.evaluateDeptDTOSVisible = false; |
|
|
|
for ( |
|
|
|
let index = 0; |
|
|
|
index < this.dataForm.deptResultDTOS.length; |
|
|
|
index++ |
|
|
|
) { |
|
|
|
const deptResultDTO = this.dataForm.deptResultDTOS[index]; |
|
|
|
if (deptResultDTO.selected === true) { |
|
|
|
// this.postDataForm.deptResultDTOS.push(deptResultDTO) |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (val === 10) { |
|
|
|
if (this.dataForm.evaluateDeptDTOS.length === 0) { |
|
|
|
return |
|
|
|
return; |
|
|
|
} |
|
|
|
this.evaluateDeptDTOSVisible = true |
|
|
|
this.deptResultDTOSVisible = false |
|
|
|
this.evaluateDeptDTOSVisible = true; |
|
|
|
this.deptResultDTOSVisible = false; |
|
|
|
} else { |
|
|
|
this.evaluateDeptDTOSVisible = false |
|
|
|
this.deptResultDTOSVisible = false |
|
|
|
} |
|
|
|
this.evaluateDeptDTOSVisible = false; |
|
|
|
this.deptResultDTOSVisible = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
created: function () { |
|
|
|
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/uploadImg?token=${Cookies.get('token')}` |
|
|
|
}, |
|
|
|
created: function() { |
|
|
|
this.uploadUrl = `${ |
|
|
|
window.SITE_CONFIG["apiURL"] |
|
|
|
}/oss/file/uploadImg?token=${Cookies.get("token")}`; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
beforeAvatarUpload (file) { |
|
|
|
//刷新 |
|
|
|
refreshProgress(){ |
|
|
|
this.timeloading = true; |
|
|
|
this.$http |
|
|
|
.get(`/events/platform/item/get/${this.dataForm.id}`) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.getInfo(); |
|
|
|
// console.log(res) |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
}, |
|
|
|
beforeAvatarUpload(file) { |
|
|
|
if (this.postDataForm.outHandleImagesPC.length === 3) { |
|
|
|
this.$message.error('最多上传3张图片!') |
|
|
|
return false |
|
|
|
this.$message.error("最多上传3张图片!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.loading = true |
|
|
|
this.isAble = true |
|
|
|
const isJPG = file.type === 'image/jpeg' |
|
|
|
const isPNG = file.type === 'image/png' |
|
|
|
this.loading = true; |
|
|
|
this.isAble = true; |
|
|
|
const isJPG = file.type === "image/jpeg"; |
|
|
|
const isPNG = file.type === "image/png"; |
|
|
|
// 判断是否符合格式要求 |
|
|
|
if (!isJPG && !isPNG) { |
|
|
|
this.$message.error('上传文件必须是jpg、png格式!') |
|
|
|
this.loading = false |
|
|
|
this.isAble = false |
|
|
|
return false |
|
|
|
this.$message.error("上传文件必须是jpg、png格式!"); |
|
|
|
this.loading = false; |
|
|
|
this.isAble = false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
}, |
|
|
|
handleAvatarSuccess (res, file) { |
|
|
|
this.loading = false |
|
|
|
this.isAble = false |
|
|
|
handleAvatarSuccess(res, file) { |
|
|
|
this.loading = false; |
|
|
|
this.isAble = false; |
|
|
|
if (res === null || res.data === null || res.data.imgUrl === null) { |
|
|
|
this.$message.error('文件上传失败!') |
|
|
|
return false |
|
|
|
} |
|
|
|
this.postDataForm.outHandleImagesPC.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 1, recordType: 1, fileName: res.data.fileName }) |
|
|
|
this.hideUploadOut = this.postDataForm.outHandleImagesPC.length >= 3 |
|
|
|
this.$message.error("文件上传失败!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.postDataForm.outHandleImagesPC.push({ |
|
|
|
url: res.data.imgUrl, |
|
|
|
thumbnail: res.data.thumbnail, |
|
|
|
fileType: 1, |
|
|
|
recordType: 1, |
|
|
|
fileName: res.data.fileName, |
|
|
|
}); |
|
|
|
this.hideUploadOut = this.postDataForm.outHandleImagesPC.length >= 3; |
|
|
|
}, |
|
|
|
handelError () { |
|
|
|
this.loading = false |
|
|
|
this.loadingIn = false |
|
|
|
this.isAble = false |
|
|
|
this.$message.error('上传文件失败!') |
|
|
|
handelError() { |
|
|
|
this.loading = false; |
|
|
|
this.loadingIn = false; |
|
|
|
this.isAble = false; |
|
|
|
this.$message.error("上传文件失败!"); |
|
|
|
}, |
|
|
|
handleRemove (file, fileList) { |
|
|
|
handleRemove(file, fileList) { |
|
|
|
for (var i = 0; i < this.postDataForm.outHandleImagesPC.length; i++) { |
|
|
|
let item = this.postDataForm.outHandleImagesPC[i] |
|
|
|
let item = this.postDataForm.outHandleImagesPC[i]; |
|
|
|
if (item.url === file.url) { |
|
|
|
this.postDataForm.outHandleImagesPC.splice(i, 1) |
|
|
|
this.postDataForm.outHandleImagesPC.splice(i, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
this.hideUploadOut = this.postDataForm.outHandleImagesPC.length >= 3 |
|
|
|
this.hideUploadOut = this.postDataForm.outHandleImagesPC.length >= 3; |
|
|
|
}, |
|
|
|
handlePictureCardPreview (file) { |
|
|
|
this.dialogImageUrl = file.url |
|
|
|
this.dialogVisible = true |
|
|
|
handlePictureCardPreview(file) { |
|
|
|
this.dialogImageUrl = file.url; |
|
|
|
this.dialogVisible = true; |
|
|
|
}, |
|
|
|
beforeAvatarUploadIn (file) { |
|
|
|
beforeAvatarUploadIn(file) { |
|
|
|
if (this.postDataForm.handleImagesPC.length === 3) { |
|
|
|
this.$message.error('最多上传3张图片!') |
|
|
|
return false |
|
|
|
this.$message.error("最多上传3张图片!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.loadingIn = true |
|
|
|
this.isAble = true |
|
|
|
const isJPG = file.type === 'image/jpeg' |
|
|
|
const isPNG = file.type === 'image/png' |
|
|
|
this.loadingIn = true; |
|
|
|
this.isAble = true; |
|
|
|
const isJPG = file.type === "image/jpeg"; |
|
|
|
const isPNG = file.type === "image/png"; |
|
|
|
// 判断是否符合格式要求 |
|
|
|
if (!isJPG && !isPNG) { |
|
|
|
this.$message.error('上传文件必须是jpg、png格式!') |
|
|
|
this.loadingIn = false |
|
|
|
this.isAble = false |
|
|
|
return false |
|
|
|
this.$message.error("上传文件必须是jpg、png格式!"); |
|
|
|
this.loadingIn = false; |
|
|
|
this.isAble = false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
}, |
|
|
|
handleAvatarSuccessIn (res, file) { |
|
|
|
this.loadingIn = false |
|
|
|
this.isAble = false |
|
|
|
handleAvatarSuccessIn(res, file) { |
|
|
|
this.loadingIn = false; |
|
|
|
this.isAble = false; |
|
|
|
if (res === null || res.data === null || res.data.imgUrl === null) { |
|
|
|
this.$message.error('文件上传失败!') |
|
|
|
return false |
|
|
|
} |
|
|
|
this.postDataForm.handleImagesPC.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 1, recordType: 1, fileName: res.data.fileName }) |
|
|
|
this.hideUploadIn = this.postDataForm.handleImagesPC.length >= 3 |
|
|
|
this.$message.error("文件上传失败!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.postDataForm.handleImagesPC.push({ |
|
|
|
url: res.data.imgUrl, |
|
|
|
thumbnail: res.data.thumbnail, |
|
|
|
fileType: 1, |
|
|
|
recordType: 1, |
|
|
|
fileName: res.data.fileName, |
|
|
|
}); |
|
|
|
this.hideUploadIn = this.postDataForm.handleImagesPC.length >= 3; |
|
|
|
}, |
|
|
|
handelErrorIn () { |
|
|
|
this.loading = false |
|
|
|
this.loadingIn = false |
|
|
|
this.isAble = false |
|
|
|
this.$message.error('上传文件失败!') |
|
|
|
handelErrorIn() { |
|
|
|
this.loading = false; |
|
|
|
this.loadingIn = false; |
|
|
|
this.isAble = false; |
|
|
|
this.$message.error("上传文件失败!"); |
|
|
|
}, |
|
|
|
handleRemoveIn (file, fileList) { |
|
|
|
handleRemoveIn(file, fileList) { |
|
|
|
for (var i = 0; i < this.postDataForm.handleImagesPC.length; i++) { |
|
|
|
let item = this.postDataForm.handleImagesPC[i] |
|
|
|
let item = this.postDataForm.handleImagesPC[i]; |
|
|
|
if (item.url === file.url) { |
|
|
|
this.postDataForm.handleImagesPC.splice(i, 1) |
|
|
|
this.postDataForm.handleImagesPC.splice(i, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
this.hideUploadIn = this.postDataForm.handleImagesPC.length >= 3 |
|
|
|
this.hideUploadIn = this.postDataForm.handleImagesPC.length >= 3; |
|
|
|
}, |
|
|
|
handlePictureCardPreviewIn (file) { |
|
|
|
this.dialogImageUrl = file.url |
|
|
|
this.dialogVisible = true |
|
|
|
handlePictureCardPreviewIn(file) { |
|
|
|
this.dialogImageUrl = file.url; |
|
|
|
this.dialogVisible = true; |
|
|
|
}, |
|
|
|
backToItemDeal () { |
|
|
|
this.$parent.selectComponent = 'ItemDeal' |
|
|
|
backToItemDeal() { |
|
|
|
this.$parent.selectComponent = "ItemDeal"; |
|
|
|
}, |
|
|
|
getOptions () { |
|
|
|
getOptions() { |
|
|
|
this.$http |
|
|
|
.get(`/sys/user/deptOptions/getDeptAuthByUser`) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.options = res.data.options |
|
|
|
this.options = res.data.options; |
|
|
|
}) |
|
|
|
.catch(() => {}) |
|
|
|
.catch(() => {}); |
|
|
|
}, |
|
|
|
visibleChange (val) { |
|
|
|
if (this.dataForm.handleResultDTOS.length === 0 && this.dataForm.handlerDeptIdRule === '' && val === true) { |
|
|
|
return this.$message.error('请先选择操作人部门!') |
|
|
|
visibleChange(val) { |
|
|
|
if ( |
|
|
|
this.dataForm.handleResultDTOS.length === 0 && |
|
|
|
this.dataForm.handlerDeptIdRule === "" && |
|
|
|
val === true |
|
|
|
) { |
|
|
|
return this.$message.error("请先选择操作人部门!"); |
|
|
|
} |
|
|
|
// 处理选择【结案申请】时,隐藏居民处理意见 |
|
|
|
if (this.postDataForm.handleCategory === 11) { |
|
|
|
this.hideResident = true |
|
|
|
this.hideResident = true; |
|
|
|
} else { |
|
|
|
this.hideResident = false |
|
|
|
this.hideResident = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
changeHandle (value, selectedData) { |
|
|
|
this.postDataForm.handlerDept = this.$refs['name'].getCheckedNodes()[0].label |
|
|
|
this.postDataForm.handlerDeptId = this.$refs['name'].getCheckedNodes()[0].value |
|
|
|
this.getHandleResultDTOS() |
|
|
|
changeHandle(value, selectedData) { |
|
|
|
this.postDataForm.handlerDept = this.$refs[ |
|
|
|
"name" |
|
|
|
].getCheckedNodes()[0].label; |
|
|
|
this.postDataForm.handlerDeptId = this.$refs[ |
|
|
|
"name" |
|
|
|
].getCheckedNodes()[0].value; |
|
|
|
this.getHandleResultDTOS(); |
|
|
|
}, |
|
|
|
// 获取处理项 |
|
|
|
getHandleResultDTOS () { |
|
|
|
this.dataForm.handleResultDTOS = [] |
|
|
|
this.dataForm.deptResultDTOS = [] |
|
|
|
this.dataForm.evaluateDeptDTOS = [] |
|
|
|
this.postDataForm.handleCategory = '' |
|
|
|
this.postDataForm.deptResultDTOS = [] |
|
|
|
this.postDataForm.evaluateDeptDTOS = [] |
|
|
|
this.deptResult = [] |
|
|
|
this.$http.post(`/events/item/getHandleResultDTOS`, { itemId: this.dataForm.id, deptId: this.postDataForm.handlerDeptId }).then(({ data: res }) => { |
|
|
|
getHandleResultDTOS() { |
|
|
|
this.dataForm.handleResultDTOS = []; |
|
|
|
this.dataForm.deptResultDTOS = []; |
|
|
|
this.dataForm.evaluateDeptDTOS = []; |
|
|
|
this.postDataForm.handleCategory = ""; |
|
|
|
this.postDataForm.deptResultDTOS = []; |
|
|
|
this.postDataForm.evaluateDeptDTOS = []; |
|
|
|
this.deptResult = []; |
|
|
|
this.$http |
|
|
|
.post(`/events/item/getHandleResultDTOS`, { |
|
|
|
itemId: this.dataForm.id, |
|
|
|
deptId: this.postDataForm.handlerDeptId, |
|
|
|
}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.dataForm.handleResultDTOS = res.data.handleResultDTOS |
|
|
|
this.dataForm.deptResultDTOS = res.data.deptResultDTOS |
|
|
|
this.dataForm.evaluateDeptDTOS = res.data.evaluateDeptDTOS |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
initBmap (latitude, longitude) { |
|
|
|
this.map = new BMap.Map('map') |
|
|
|
const point = new BMap.Point(longitude, latitude) |
|
|
|
var marker = new BMap.Marker(point) |
|
|
|
this.map.addOverlay(marker) |
|
|
|
this.map.centerAndZoom(point, 13) |
|
|
|
this.map.enableScrollWheelZoom(true) |
|
|
|
}, |
|
|
|
init () { |
|
|
|
this.isAble = false |
|
|
|
this.$nextTick(() => { |
|
|
|
if (this.dataForm.id) { |
|
|
|
this.postDataForm.handleAdvice = '' |
|
|
|
this.postDataForm.outHandleAdvice = '' |
|
|
|
this.postDataForm.handleCategory = '' |
|
|
|
this.postDataForm.deptResultDTOS = [] |
|
|
|
this.postDataForm.evaluateDeptDTOS = [] |
|
|
|
this.getInfo() |
|
|
|
this.getCommentList() |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.dataForm.handleResultDTOS = res.data.handleResultDTOS; |
|
|
|
this.dataForm.deptResultDTOS = res.data.deptResultDTOS; |
|
|
|
this.dataForm.evaluateDeptDTOS = res.data.evaluateDeptDTOS; |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
}, |
|
|
|
clickImg (url) { |
|
|
|
this.previewImgList = [] |
|
|
|
this.previewImgList.push(url) |
|
|
|
initBmap(latitude, longitude) { |
|
|
|
this.map = new BMap.Map("map"); |
|
|
|
const point = new BMap.Point(longitude, latitude); |
|
|
|
var marker = new BMap.Marker(point); |
|
|
|
this.map.addOverlay(marker); |
|
|
|
this.map.centerAndZoom(point, 13); |
|
|
|
this.map.enableScrollWheelZoom(true); |
|
|
|
}, |
|
|
|
init() { |
|
|
|
this.isAble = false; |
|
|
|
this.$nextTick(() => { |
|
|
|
if (this.dataForm.id) { |
|
|
|
this.postDataForm.handleAdvice = ""; |
|
|
|
this.postDataForm.outHandleAdvice = ""; |
|
|
|
this.postDataForm.handleCategory = ""; |
|
|
|
this.postDataForm.deptResultDTOS = []; |
|
|
|
this.postDataForm.evaluateDeptDTOS = []; |
|
|
|
this.getInfo(); |
|
|
|
this.getCommentList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
clickImg(url) { |
|
|
|
this.previewImgList = []; |
|
|
|
this.previewImgList.push(url); |
|
|
|
}, |
|
|
|
// 获取信息 |
|
|
|
getInfo () { |
|
|
|
this.$http.get(`/events/item/${this.dataForm.id}`).then(({ data: res }) => { |
|
|
|
getInfo() { |
|
|
|
this.$http |
|
|
|
.get(`/events/item/${this.dataForm.id}`) |
|
|
|
.then(({ data: res }) => { |
|
|
|
this.timeloading = false; |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.dataForm = { |
|
|
|
...this.dataForm, |
|
|
|
...res.data |
|
|
|
} |
|
|
|
...res.data, |
|
|
|
}; |
|
|
|
this.dataForm.handleProgressResultDTOS.forEach((item, index, arr) => { |
|
|
|
if (index === arr.length - 1) { |
|
|
|
item.type = 'issue-project' |
|
|
|
item.type = "issue-project"; |
|
|
|
} else { |
|
|
|
item.type = 'project' |
|
|
|
item.type = "project"; |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
this.dataForm.issueProgressResultDTOS.forEach((item, index, arr) => { |
|
|
|
if (index === arr.length - 1) { |
|
|
|
item.type = 'init' |
|
|
|
item.type = "init"; |
|
|
|
} else { |
|
|
|
item.type = 'issue' |
|
|
|
} |
|
|
|
}) |
|
|
|
this.timeLineList = [...this.dataForm.handleProgressResultDTOS, ...this.dataForm.issueProgressResultDTOS] |
|
|
|
item.type = "issue"; |
|
|
|
} |
|
|
|
}); |
|
|
|
this.timeLineList = [ |
|
|
|
...this.dataForm.handleProgressResultDTOS, |
|
|
|
...this.dataForm.issueProgressResultDTOS, |
|
|
|
]; |
|
|
|
console.log(this.timeLineList) |
|
|
|
this.$nextTick(() => { |
|
|
|
this.timeLineList.forEach((item, index) => { |
|
|
|
const oDiv = document.getElementById(`content${index}`) |
|
|
|
const oBorder = oDiv.parentNode.parentNode.parentNode.firstChild |
|
|
|
if (item.type === 'issue' || item.type === 'issue-project') { |
|
|
|
oBorder.style.borderLeft = '1px solid #ffa546' |
|
|
|
} else if (item.type === 'project') { |
|
|
|
oBorder.style.borderLeft = '1px solid #009688' |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.initBmap(this.dataForm.issueLatitude, this.dataForm.issueLongitude) |
|
|
|
for (let index = 0; index < res.data.handleResultDTOS.length; index++) { |
|
|
|
const handleResultDTO = res.data.handleResultDTOS[index] |
|
|
|
const oDiv = document.getElementById(`content${index}`); |
|
|
|
const oBorder = oDiv.parentNode.parentNode.parentNode.firstChild; |
|
|
|
if (item.type === "issue" || item.type === "issue-project") { |
|
|
|
oBorder.style.borderLeft = "1px solid #ffa546"; |
|
|
|
} else if (item.type === "project") { |
|
|
|
oBorder.style.borderLeft = "1px solid #009688"; |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.initBmap( |
|
|
|
this.dataForm.issueLatitude, |
|
|
|
this.dataForm.issueLongitude |
|
|
|
); |
|
|
|
for ( |
|
|
|
let index = 0; |
|
|
|
index < res.data.handleResultDTOS.length; |
|
|
|
index++ |
|
|
|
) { |
|
|
|
const handleResultDTO = res.data.handleResultDTOS[index]; |
|
|
|
if (handleResultDTO.select === true) { |
|
|
|
this.dataForm.handleCategory = handleResultDTO.processResult |
|
|
|
this.dataForm.handleCategory = handleResultDTO.processResult; |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(() => { }) |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
}, |
|
|
|
deleteComment (val) { |
|
|
|
this.$confirm('确定要屏蔽该评论吗?屏蔽后不可恢复。', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http['post']('/events/item/deleteComment', { commentIds: [val] }).then(({ data: res }) => { |
|
|
|
deleteComment(val) { |
|
|
|
this.$confirm("确定要屏蔽该评论吗?屏蔽后不可恢复。", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.$http["post"]("/events/item/deleteComment", { |
|
|
|
commentIds: [val], |
|
|
|
}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
message: this.$t("prompt.success"), |
|
|
|
type: "success", |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.getCommentList() |
|
|
|
} |
|
|
|
this.getCommentList(); |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}).catch(() => { }) |
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
.catch(() => {}); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
}, |
|
|
|
pageSizeChangeHandleNew (val) { |
|
|
|
this.pageIndex = 1 |
|
|
|
this.limitVal = val |
|
|
|
this.getCommentList() |
|
|
|
pageSizeChangeHandleNew(val) { |
|
|
|
this.pageIndex = 1; |
|
|
|
this.limitVal = val; |
|
|
|
this.getCommentList(); |
|
|
|
}, |
|
|
|
pageCurrentChangeHandleNew (val) { |
|
|
|
this.pageIndex = val |
|
|
|
this.getCommentList() |
|
|
|
pageCurrentChangeHandleNew(val) { |
|
|
|
this.pageIndex = val; |
|
|
|
this.getCommentList(); |
|
|
|
}, |
|
|
|
getCommentList () { |
|
|
|
this.$http.get('/events/item/comments', { params: { id: this.dataForm.id, order: this.order, orderField: this.orderField, page: this.pageIndex, limit: this.limitVal } |
|
|
|
}).then(({ data: res }) => { |
|
|
|
getCommentList() { |
|
|
|
this.$http |
|
|
|
.get("/events/item/comments", { |
|
|
|
params: { |
|
|
|
id: this.dataForm.id, |
|
|
|
order: this.order, |
|
|
|
orderField: this.orderField, |
|
|
|
page: this.pageIndex, |
|
|
|
limit: this.limitVal, |
|
|
|
}, |
|
|
|
}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
this.commentsDTOs = [] |
|
|
|
this.total = 0 |
|
|
|
return this.$message.error(res.msg) |
|
|
|
this.commentsDTOs = []; |
|
|
|
this.total = 0; |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.commentsDTOs = res.data.list |
|
|
|
this.total = res.data.total |
|
|
|
}).catch(() => { }) |
|
|
|
this.commentsDTOs = res.data.list; |
|
|
|
this.total = res.data.total; |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
|
this.postDataForm.deptResultDTOS = [] |
|
|
|
dataFormSubmitHandle: debounce( |
|
|
|
function() { |
|
|
|
this.postDataForm.deptResultDTOS = []; |
|
|
|
for (let i = 0; i < this.deptResult.length; i++) { |
|
|
|
for (let j = 0; j < this.dataForm.deptResultDTOS.length; j++) { |
|
|
|
if (this.deptResult[i] === this.dataForm.deptResultDTOS[j].deptId) { |
|
|
|
this.postDataForm.deptResultDTOS.push(this.dataForm.deptResultDTOS[j]) |
|
|
|
break |
|
|
|
this.postDataForm.deptResultDTOS.push( |
|
|
|
this.dataForm.deptResultDTOS[j] |
|
|
|
); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.postDataForm.id = this.dataForm.id |
|
|
|
if (this.postDataForm.handleCategory === '') { |
|
|
|
return this.$message.error('请选择处理选项') |
|
|
|
this.postDataForm.id = this.dataForm.id; |
|
|
|
if (this.postDataForm.handleCategory === "") { |
|
|
|
return this.$message.error("请选择处理选项"); |
|
|
|
} |
|
|
|
if (this.deptResultDTOSVisible) { |
|
|
|
if (this.postDataForm.deptResultDTOS === undefined || this.postDataForm.deptResultDTOS.length <= 0) { |
|
|
|
return this.$message.error('请选择流转对象') |
|
|
|
if ( |
|
|
|
this.postDataForm.deptResultDTOS === undefined || |
|
|
|
this.postDataForm.deptResultDTOS.length <= 0 |
|
|
|
) { |
|
|
|
return this.$message.error("请选择流转对象"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.postDataForm.deptResultDTOS = [] |
|
|
|
this.postDataForm.deptResultDTOS = []; |
|
|
|
} |
|
|
|
if (this.postDataForm.outHandleAdvice === '' && this.postDataForm.handleCategory !== '11') { |
|
|
|
return this.$message.error('回复居民意见不能为空') |
|
|
|
if ( |
|
|
|
this.postDataForm.outHandleAdvice === "" && |
|
|
|
this.postDataForm.handleCategory !== "11" |
|
|
|
) { |
|
|
|
return this.$message.error("回复居民意见不能为空"); |
|
|
|
} |
|
|
|
if (this.postDataForm.outHandleAdvice.length > 500 && this.postDataForm.handleCategory !== '11') { |
|
|
|
return this.$message.error('回复居民意见不能超过500字') |
|
|
|
if ( |
|
|
|
this.postDataForm.outHandleAdvice.length > 500 && |
|
|
|
this.postDataForm.handleCategory !== "11" |
|
|
|
) { |
|
|
|
return this.$message.error("回复居民意见不能超过500字"); |
|
|
|
} |
|
|
|
if (this.postDataForm.handleAdvice === '') { |
|
|
|
return this.$message.error('项目处理意见不能为空') |
|
|
|
if (this.postDataForm.handleAdvice === "") { |
|
|
|
return this.$message.error("项目处理意见不能为空"); |
|
|
|
} |
|
|
|
if (this.postDataForm.handleAdvice.length > 500) { |
|
|
|
return this.$message.error('项目处理意见不能超过500字') |
|
|
|
return this.$message.error("项目处理意见不能超过500字"); |
|
|
|
} |
|
|
|
if (this.evaluateDeptDTOSVisible) { |
|
|
|
this.postDataForm.evaluateDeptDTOS = this.dataForm.evaluateDeptDTOS |
|
|
|
if (this.postDataForm.evaluateDeptDTOS.length !== this.dataForm.evaluateDeptDTOS.length) { |
|
|
|
return this.$message.error('请完善满意度调查') |
|
|
|
this.postDataForm.evaluateDeptDTOS = this.dataForm.evaluateDeptDTOS; |
|
|
|
if ( |
|
|
|
this.postDataForm.evaluateDeptDTOS.length !== |
|
|
|
this.dataForm.evaluateDeptDTOS.length |
|
|
|
) { |
|
|
|
return this.$message.error("请完善满意度调查"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.postDataForm.evaluateDeptDTOS = [] |
|
|
|
this.postDataForm.evaluateDeptDTOS = []; |
|
|
|
} |
|
|
|
this.isAble = true |
|
|
|
this.isAble = true; |
|
|
|
// 将对象遍历成数组 |
|
|
|
for (let oimg = 0; oimg < this.postDataForm.outHandleImagesPC.length; oimg++) { |
|
|
|
this.postDataForm.outHandleImages[oimg] = this.postDataForm.outHandleImagesPC[oimg].url |
|
|
|
} |
|
|
|
for (let himg = 0; himg < this.postDataForm.handleImagesPC.length; himg++) { |
|
|
|
this.postDataForm.handleImages[himg] = this.postDataForm.handleImagesPC[himg].url |
|
|
|
} |
|
|
|
this.$http['post']( |
|
|
|
'/events/item/itemHandleSubmit', this.postDataForm).then(({ data: res }) => { |
|
|
|
for ( |
|
|
|
let oimg = 0; |
|
|
|
oimg < this.postDataForm.outHandleImagesPC.length; |
|
|
|
oimg++ |
|
|
|
) { |
|
|
|
this.postDataForm.outHandleImages[ |
|
|
|
oimg |
|
|
|
] = this.postDataForm.outHandleImagesPC[oimg].url; |
|
|
|
} |
|
|
|
for ( |
|
|
|
let himg = 0; |
|
|
|
himg < this.postDataForm.handleImagesPC.length; |
|
|
|
himg++ |
|
|
|
) { |
|
|
|
this.postDataForm.handleImages[ |
|
|
|
himg |
|
|
|
] = this.postDataForm.handleImagesPC[himg].url; |
|
|
|
} |
|
|
|
this.$http["post"]("/events/item/itemHandleSubmit", this.postDataForm) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
this.isAble = false |
|
|
|
return this.$message.error(res.msg) |
|
|
|
this.isAble = false; |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
message: this.$t("prompt.success"), |
|
|
|
type: "success", |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.visible = false |
|
|
|
this.$emit('refreshDataList') |
|
|
|
} |
|
|
|
this.visible = false; |
|
|
|
this.$emit("refreshDataList"); |
|
|
|
}, |
|
|
|
}); |
|
|
|
this.$parent.selectComponent = "ItemDeal"; |
|
|
|
}) |
|
|
|
this.$parent.selectComponent = 'ItemDeal' |
|
|
|
}).catch(() => { }) |
|
|
|
}, 1000, { 'leading': true, 'trailing': false }) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
.catch(() => {}); |
|
|
|
}, |
|
|
|
1000, |
|
|
|
{ leading: true, trailing: false } |
|
|
|
), |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<style> |
|
|
|
.hide .el-upload--picture-card { |
|
|
|
.hide .el-upload--picture-card { |
|
|
|
display: none; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
@ -912,6 +1054,19 @@ export default { |
|
|
|
border-radius: 10px; |
|
|
|
background: #ccc; |
|
|
|
} |
|
|
|
|
|
|
|
.refresh { |
|
|
|
position: absolute; |
|
|
|
top: -10px; |
|
|
|
right: 0; |
|
|
|
width: 35px; |
|
|
|
height: 30px; |
|
|
|
font-size: 23px; |
|
|
|
line-height: 30px; |
|
|
|
.el-icon-refresh{ |
|
|
|
font-size: 20px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.handle-operation { |
|
|
|
padding-top: 20px; |
|
|
|