|
@@ -64,6 +64,13 @@
|
|
<WangEditor ref="contentEditor" v-model="inputForm.content"/>
|
|
<WangEditor ref="contentEditor" v-model="inputForm.content"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="24" v-for="(item,index) in inputForm.klgBaseReplyDTOList">
|
|
|
|
+ <el-form-item :label="commonJS.isNotEmpty(item.replyName)?item.replyName+'回复:':'回复:'"
|
|
|
|
+ :prop="'content'+index"
|
|
|
|
+ >
|
|
|
|
+ <WangEditor ref="contentEditorList" v-model="item.content"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 附件-->
|
|
<!-- 附件-->
|
|
@@ -184,10 +191,12 @@
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.$refs.inputForm.resetFields()
|
|
this.$refs.inputForm.resetFields()
|
|
this.loading = true
|
|
this.loading = true
|
|
|
|
+ this.$refs.contentEditor.clear()
|
|
this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
|
|
this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
|
|
- this.$refs.contentEditor.clear()
|
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.status) && this.inputForm.status !== '1') {
|
|
|
|
|
|
+ if (this.status === 'audit') {
|
|
this.$refs.contentEditor.disable()
|
|
this.$refs.contentEditor.disable()
|
|
|
|
+ } else {
|
|
|
|
+ this.$refs.contentEditor.enable()
|
|
}
|
|
}
|
|
this.$refs.uploadComponent.clearUpload()
|
|
this.$refs.uploadComponent.clearUpload()
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
@@ -207,6 +216,23 @@
|
|
} else {
|
|
} else {
|
|
this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'klg_questions', null, null, true, JSON.parse(localStorage.getItem('user')).name)
|
|
this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'klg_questions', null, null, true, JSON.parse(localStorage.getItem('user')).name)
|
|
}
|
|
}
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.klgBaseReplyDTOList)) {
|
|
|
|
+ if (this.status === 'audit') {
|
|
|
|
+ this.inputForm.klgBaseReplyDTOList.push({content: ''})
|
|
|
|
+ }
|
|
|
|
+ this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
|
|
|
|
+ if (this.commonJS.isNotEmpty(item.content)) {
|
|
|
|
+ this.$refs.contentEditorList[index].init(item.content)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.inputForm.klgBaseReplyDTOList = []
|
|
|
|
+ if (this.status === 'audit') {
|
|
|
|
+ this.inputForm.klgBaseReplyDTOList.push({content: ''})
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -219,7 +245,7 @@
|
|
},
|
|
},
|
|
async agreeForm (callback) {
|
|
async agreeForm (callback) {
|
|
await this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
|
|
await this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
|
|
- if (data.status !== '2' || this.inputForm.procInsId !== data.procInsId) { // status的值不等于“审核中”,或者“procInsId”已经改变,就弹出提示
|
|
|
|
|
|
+ if (this.inputForm.procInsId !== data.procInsId) { // “procInsId”已经改变,就弹出提示
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
this.err = true
|
|
this.err = true
|
|
}
|
|
}
|
|
@@ -264,7 +290,12 @@
|
|
this.inputForm.status = '2'
|
|
this.inputForm.status = '2'
|
|
} else if (status === 'agree') {
|
|
} else if (status === 'agree') {
|
|
// 审核同意
|
|
// 审核同意
|
|
- this.inputForm.status = '5'
|
|
|
|
|
|
+ if (this.inputForm.status === '2') {
|
|
|
|
+ this.inputForm.status = '5'
|
|
|
|
+ }
|
|
|
|
+ if (this.inputForm.status === '5') {
|
|
|
|
+ this.inputForm.status = '9'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -273,6 +304,11 @@
|
|
this.loading = false
|
|
this.loading = false
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
|
|
|
|
+ if (this.commonJS.isEmpty(item.content)) {
|
|
|
|
+ this.inputForm.klgBaseReplyDTOList.splice(index, 1)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
|
|
this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
|
|
if (this.commonJS.isNotEmpty(this.inputForm.disposeBy)) {
|
|
if (this.commonJS.isNotEmpty(this.inputForm.disposeBy)) {
|
|
this.inputForm.klgBaseDisposeDTOList = []
|
|
this.inputForm.klgBaseDisposeDTOList = []
|
|
@@ -293,13 +329,13 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- async updateStatusById (type) {
|
|
|
|
|
|
+ async updateStatusById (type, callback) {
|
|
if (await this.$refs.uploadComponent.checkProgress()) {
|
|
if (await this.$refs.uploadComponent.checkProgress()) {
|
|
this.loading = false
|
|
this.loading = false
|
|
throw new Error()
|
|
throw new Error()
|
|
}
|
|
}
|
|
await this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
|
|
await this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
|
|
- if (data.status !== '2' || this.inputForm.procInsId !== data.procInsId) { // status的值不等于“审核中”,或者“procInsId”已经改变,就弹出提示
|
|
|
|
|
|
+ if (this.inputForm.procInsId !== data.procInsId) { // status的值不等于“审核中”,或者“procInsId”已经改变,就弹出提示
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
this.err = true
|
|
this.err = true
|
|
}
|
|
}
|
|
@@ -329,7 +365,17 @@
|
|
} else {
|
|
} else {
|
|
this.inputForm.klgBaseDisposeDTOList = []
|
|
this.inputForm.klgBaseDisposeDTOList = []
|
|
}
|
|
}
|
|
|
|
+ this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
|
|
|
|
+ if (this.commonJS.isEmpty(item.content)) {
|
|
|
|
+ this.inputForm.klgBaseReplyDTOList.splice(index, 1)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if (this.inputForm.status === '5') {
|
|
|
|
+ this.inputForm.status = '6'
|
|
|
|
+ }
|
|
this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
|
|
this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
|
|
|
|
+ this.inputForm.assignee = this.inputForm.disposeBy
|
|
|
|
+ callback(data.businessTable, data.businessId, this.inputForm)
|
|
this.loading = false
|
|
this.loading = false
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -338,8 +384,14 @@
|
|
}
|
|
}
|
|
if (type === 'reback') {
|
|
if (type === 'reback') {
|
|
// 撤回
|
|
// 撤回
|
|
- let param = {status: '3', id: this.inputForm.id}
|
|
|
|
- this.klgBaseQuestionsService.updateStatusById(param)
|
|
|
|
|
|
+ if (this.inputForm.status === '2') {
|
|
|
|
+ let param = {status: '3', id: this.inputForm.id}
|
|
|
|
+ this.klgBaseQuestionsService.updateStatusById(param)
|
|
|
|
+ }
|
|
|
|
+ if (this.inputForm.status === '6') {
|
|
|
|
+ let param = {status: '7', id: this.inputForm.id}
|
|
|
|
+ this.klgBaseQuestionsService.updateStatusById(param)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -361,6 +413,7 @@
|
|
}
|
|
}
|
|
this.$refs.uploadComponent.clearUpload()
|
|
this.$refs.uploadComponent.clearUpload()
|
|
this.$refs.inputForm.resetFields()
|
|
this.$refs.inputForm.resetFields()
|
|
|
|
+ this.$refs.contentEditor.enable()
|
|
},
|
|
},
|
|
openProgramPageForm () {
|
|
openProgramPageForm () {
|
|
this.$refs.programPageForm.init('1', false)
|
|
this.$refs.programPageForm.init('1', false)
|