209 lines
5.9 KiB
Java
209 lines
5.9 KiB
Java
<template>
|
|
<div id="examineBox">
|
|
<headerProcess
|
|
:title="title"
|
|
/>
|
|
<div class="detail-box">
|
|
<div class="detail-content" style="padding: 10px 0 0 0">
|
|
<standardContent
|
|
v-if="isDisplay"
|
|
:title="$t('essentialInformation')"
|
|
:standardContentList="standardContentList"
|
|
:url="url"
|
|
:standardContentQuery="queryProject"
|
|
/>
|
|
<feedbackInformation
|
|
v-if="isDisplay"
|
|
ref="feedbackInformationRef"
|
|
:feedbackDataList="feedbackDataList"
|
|
:title="$t('feedbackInformation')"
|
|
/>
|
|
<footerProcess
|
|
v-if="isDisplay"
|
|
isPreservation
|
|
:isSubmit="true"
|
|
@preservation="preservation"
|
|
@submit="submit"
|
|
/>
|
|
<circulationHistory v-if="isDisplay"/>
|
|
</div>
|
|
</div>
|
|
<JLoading :loading="loading">{{this.$t('pleaseWaitWhileRunning')}}</JLoading>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import headerProcess from '../../components/headerProcess'
|
|
import standardContent from '../../components/standardContent'
|
|
import circulationHistory from '../../components/regulatoryCirculationHistory'
|
|
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: 'evaluationProcess',
|
|
components: {
|
|
headerProcess,
|
|
standardContent,
|
|
circulationHistory,
|
|
footerProcess,
|
|
feedbackInformation
|
|
},
|
|
data() {
|
|
|
|
return {
|
|
title: this.$t('collectionOfRegulatoryOpinions'),
|
|
url: {
|
|
queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds',
|
|
list: '/lawsOpinionGather/lawsOpinionAssessmentResultEO/list'
|
|
},
|
|
loading: false,
|
|
isDisplay: true,
|
|
feedbackDataList: [],
|
|
queryProject: {},
|
|
standardContentList: [
|
|
{
|
|
title: this.$t('standard'),
|
|
value: 'serial_number'
|
|
},
|
|
{
|
|
title: this.$t('title'),
|
|
value: 'title'
|
|
},
|
|
{
|
|
title: this.$t('regulatoryEngineer'),
|
|
value: 'currentUserName'
|
|
},
|
|
{
|
|
title: this.$t('closingDate'),
|
|
value: 'endTime'
|
|
},
|
|
{
|
|
title: this.$t('enclosure'),
|
|
value: 'accessory_id',
|
|
type: 2
|
|
},
|
|
{},
|
|
{
|
|
title: this.$t('taskDescription'),
|
|
value: 'taskExplain'
|
|
}
|
|
// {
|
|
// title: this.$t('remarks'),
|
|
// value: 'remark'
|
|
// }
|
|
]
|
|
}
|
|
},
|
|
mounted() {
|
|
this.isDisplay = false
|
|
this.queryTaskDetailByTask(() => {
|
|
this.lawsOpinionAssessmentResult()
|
|
})
|
|
},
|
|
methods: {
|
|
...mapGetters(['userInfo']),
|
|
queryTaskDetailByTask(callback) {
|
|
this.loading = true
|
|
getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.$route.query.taskIds }).then((res) => {
|
|
if (res instanceof String) {
|
|
this.queryProject = JSON.parse(res) || {}
|
|
callback && callback()
|
|
} else {
|
|
this.queryProject = res || {}
|
|
callback && callback()
|
|
}
|
|
})
|
|
},
|
|
lawsOpinionAssessmentResult() {
|
|
getAction(this.url.list, {
|
|
lawsOpinionGatherId: this.queryProject.id,
|
|
actiProcInstId: this.$route.query.prcId
|
|
}).then((res) => {
|
|
if (res.success) {
|
|
this.feedbackDataList = res.result || []
|
|
this.loading = false
|
|
} else {
|
|
this.feedbackDataList = []
|
|
this.loading = false
|
|
}
|
|
this.isDisplay = true
|
|
})
|
|
},
|
|
preservation() {
|
|
this.loading = true
|
|
let dataList = this.$refs.feedbackInformationRef.dataList
|
|
this.insertBatch(dataList, 1)
|
|
},
|
|
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) {
|
|
if (num == 1) {
|
|
this.$message.success(this.$t('OperationSuccessful'))
|
|
this.$router.push({
|
|
path: '/collectionOfRegulatoryOpinions'
|
|
})
|
|
this.loading = false
|
|
} 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'))
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.detail-box {
|
|
padding: 67px 0 0 0;
|
|
background: #ffffff;
|
|
height: 100%;
|
|
overflow: auto;
|
|
}
|
|
|
|
#examineBox {
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: #fff;
|
|
position: relative;
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
}
|
|
</style> |