对接法规意见收集

This commit is contained in:
qq787203167
2022-07-06 16:41:51 +08:00
parent 094a0f31cb
commit 76f5443543
@@ -39,6 +39,8 @@
import footerProcess from '../../components/footerProcess' import footerProcess from '../../components/footerProcess'
import feedbackInformation from '../../components/feedbackInformation' import feedbackInformation from '../../components/feedbackInformation'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import moment from 'moment'
import { mapGetters } from 'vuex'
export default { export default {
name: 'index', name: 'index',
@@ -59,6 +61,7 @@
}, },
loading: false, loading: false,
isDisplay: true, isDisplay: true,
feedbackDataList: [],
queryProject: {}, queryProject: {},
standardContentList: [ standardContentList: [
{ {
@@ -101,6 +104,7 @@
}) })
}, },
methods: { methods: {
...mapGetters(['userInfo']),
queryTaskDetailByTask(callback) { queryTaskDetailByTask(callback) {
this.loading = true this.loading = true
getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.$route.query.taskIds }).then((res) => { getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.$route.query.taskIds }).then((res) => {
@@ -129,19 +133,59 @@
}) })
}, },
preservation() { preservation() {
this.loading = true
let dataList = this.$refs.feedbackInformationRef.dataList
this.insertBatch(dataList, 1)
}, },
insertBatch(list) { insertBatch(list, num) {
postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', list).then((res) => { 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) { if (res.success) {
if (num == 1) {
}else{ 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() { 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'))
}
})
} }
} }
} }