|
|
|
@ -147,6 +147,12 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="所属类别:" prop="categoryIds" v-if="categoryVisible"> |
|
|
|
<div class="block"> |
|
|
|
<el-cascader v-model="categoryIds" placeholder="试试搜索:城市管理" :props="{ checkStrictly: true }" :options="categoryOptions" filterable></el-cascader> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item v-if="!hideResident" label="回复居民意见:" prop="outHandleAdvice"> |
|
|
|
<el-input v-model="postDataForm.outHandleAdvice" |
|
|
|
type="textarea" |
|
|
|
@ -332,7 +338,8 @@ export default { |
|
|
|
handleImagesPC: [], |
|
|
|
outHandleImagesPC: [], |
|
|
|
handleImages: [], |
|
|
|
outHandleImages: [] |
|
|
|
outHandleImages: [], |
|
|
|
categoryId: '' |
|
|
|
}, |
|
|
|
deptResultDTOSVisible: false, |
|
|
|
evaluateDeptDTOSVisible: false, |
|
|
|
@ -345,7 +352,10 @@ export default { |
|
|
|
hideUploadIn: false, |
|
|
|
dialogImageUrl: '', |
|
|
|
dialogVisible: false, |
|
|
|
hideResident: false |
|
|
|
hideResident: false, |
|
|
|
categoryVisible: false, |
|
|
|
categoryIds: [], |
|
|
|
categoryOptions: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
@ -360,7 +370,7 @@ export default { |
|
|
|
return '吹哨' |
|
|
|
} else if (item.state === 0 && item.itemDeptDTOS && item.itemDeptDTOS.length === 0) { |
|
|
|
return '办理' |
|
|
|
} else if (item.state === 12) { |
|
|
|
} else if (item.state === 12 || item.state === 1001) { |
|
|
|
return '响应拟办' |
|
|
|
} else if (item.state === 13) { |
|
|
|
return '直接办理' |
|
|
|
@ -430,6 +440,9 @@ export default { |
|
|
|
], |
|
|
|
handlerDeptIdRule: [ |
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
|
], |
|
|
|
categoryIds: [ |
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
@ -461,12 +474,36 @@ export default { |
|
|
|
this.evaluateDeptDTOSVisible = false |
|
|
|
this.deptResultDTOSVisible = false |
|
|
|
} |
|
|
|
if (val === 12 || val === 13) { |
|
|
|
this.categoryVisible = true |
|
|
|
} else { |
|
|
|
this.categoryVisible = false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
created: function () { |
|
|
|
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/uploadImg?token=${Cookies.get('token')}` |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getCategoryList () { |
|
|
|
return this.$http.get('/events/category/list').then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
var data = res.data |
|
|
|
this.getSelectedNode(data, data) |
|
|
|
this.categoryOptions = data |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
getSelectedNode (nodeData, parent) { |
|
|
|
nodeData.forEach(item => { |
|
|
|
if ('children' in item && item.children.length === 0) { |
|
|
|
delete item.children |
|
|
|
} else if ('children' in item && item.children.length) { |
|
|
|
this.getSelectedNode(item.children, item) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
beforeAvatarUpload (file) { |
|
|
|
if (this.postDataForm.outHandleImagesPC.length === 3) { |
|
|
|
this.$message.error('最多上传3张图片!') |
|
|
|
@ -626,6 +663,7 @@ export default { |
|
|
|
this.postDataForm.evaluateDeptDTOS = [] |
|
|
|
this.getInfo() |
|
|
|
this.getCommentList() |
|
|
|
this.getCategoryList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -725,6 +763,7 @@ export default { |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
|
this.postDataForm.categoryId = this.categoryIds[this.categoryIds.length - 1] |
|
|
|
this.postDataForm.deptResultDTOS = [] |
|
|
|
for (let i = 0; i < this.deptResult.length; i++) { |
|
|
|
for (let j = 0; j < this.dataForm.deptResultDTOS.length; j++) { |
|
|
|
@ -745,6 +784,11 @@ export default { |
|
|
|
} else { |
|
|
|
this.postDataForm.deptResultDTOS = [] |
|
|
|
} |
|
|
|
if (this.categoryVisible) { |
|
|
|
if (this.postDataForm.categoryId === undefined || this.postDataForm.categoryId === '') { |
|
|
|
return this.$message.error('请选择所属类别') |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.postDataForm.outHandleAdvice === '' && this.postDataForm.handleCategory !== 11) { |
|
|
|
return this.$message.error('回复居民意见不能为空') |
|
|
|
} |
|
|
|
|