diff --git a/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue b/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue index 67da54846..23a930be7 100644 --- a/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue +++ b/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue @@ -39,6 +39,8 @@ import footerProcess from '../../components/footerProcess' import feedbackInformation from '../../components/feedbackInformation' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' + import moment from 'moment' + import { mapGetters } from 'vuex' export default { name: 'index', @@ -59,6 +61,7 @@ }, loading: false, isDisplay: true, + feedbackDataList: [], queryProject: {}, standardContentList: [ { @@ -101,6 +104,7 @@ }) }, methods: { + ...mapGetters(['userInfo']), queryTaskDetailByTask(callback) { this.loading = true getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.$route.query.taskIds }).then((res) => { @@ -129,19 +133,59 @@ }) }, preservation() { - + this.loading = true + let dataList = this.$refs.feedbackInformationRef.dataList + this.insertBatch(dataList, 1) }, - insertBatch(list) { - postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', list).then((res) => { + insertBatch(list, num) { + list.forEach(res => { + res.lawsOpinionGatherId = this.queryProject.id + res.actiProcInstId = this.$route.query.prcId + }) + postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', { dataList:list }).then((res) => { if (res.success) { - - }else{ - + if (num == 1) { + this.$message.success(this.$t('OperationSuccessful')) + this.loading = false + this.$router.push({ + path: '/collectionOfRegulatoryOpinions' + }) + } else { + this.completeTask() + } + } else { + if (num == 1) { + this.loading = false + this.$message.warning(this.$t('operationFailed')) + } } }) }, submit() { - + let dataList = this.$refs.feedbackInformationRef.dataList + this.insertBatch(dataList, 2) + }, + completeTask() { + let query = { + userid: this.userInfo().id, + taskId: this.$route.query.taskIds, + json: JSON.stringify(this.queryProject).replace(/\"/g, '\'') + } + postAction('/workFlow/completeTask', query).then((res) => { + if (res.success) { + // setTimeout(() => { + // window.close() + // }, 1000) + this.$message.success(this.$t('OperationSuccessful')) + this.loading = false + this.$router.push({ + path: '/collectionOfRegulatoryOpinions' + }) + } else { + this.loading = false + this.$message.warning(this.$t('operationFailed')) + } + }) } } }