对接法规意见收集

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 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'))
}
})
}
}
}