324 lines
9.4 KiB
Java
324 lines
9.4 KiB
Java
<template>
|
|
<div id="examineBox">
|
|
<headerProcess
|
|
:title="$t('theRequirementst')"
|
|
is-termination-process
|
|
is-submit
|
|
:isSendBack="isSendBack"
|
|
@terminationProcess="terminationProcess"
|
|
@submit="submit"
|
|
@sendBack="sendBack"
|
|
/>
|
|
<div class="detail-box">
|
|
<div class="detail-content">
|
|
<projectInformation
|
|
v-if="isDisplay"
|
|
:projectInformationList="projectInformationList"
|
|
:url="url"
|
|
:projectInformationId="this.queryBy.projectLibraryId"
|
|
/>
|
|
<standardContent
|
|
v-if="isDisplay"
|
|
:standardContentList="standardContentList"
|
|
:url="url"
|
|
:standardContentQuery="queryProject"
|
|
/>
|
|
<standardContentListTable
|
|
v-if="isDisplay"
|
|
:standardContentListQuery="queryProject"
|
|
:url="url
|
|
"/>
|
|
<examineInformation
|
|
:isFlag="isFlag"
|
|
v-if="isDisplay"
|
|
isViewUploadedFiles
|
|
isApprovalOpinion
|
|
ref="examineInformationRef"
|
|
:url="url"/>
|
|
<circulationHistory v-if="isDisplay"/>
|
|
</div>
|
|
</div>
|
|
<JLoading :loading="loading">{{textLoading}}</JLoading>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import headerProcess from '../../components/headerProcess'
|
|
import projectInformation from '../../components/projectInformation'
|
|
import standardContent from '../../components/standardContent'
|
|
import standardContentListTable from '../../components/standardContentList'
|
|
import examineInformation from '../../components/examineInformation'
|
|
import circulationHistory from '../../components/circulationHistory'
|
|
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
|
import { mapGetters } from 'vuex'
|
|
import moment from 'moment'
|
|
|
|
export default {
|
|
name: 'handshakeProcess',
|
|
components: {
|
|
headerProcess,
|
|
projectInformation,
|
|
standardContent,
|
|
standardContentListTable,
|
|
examineInformation,
|
|
circulationHistory
|
|
},
|
|
data() {
|
|
return {
|
|
projectInformationList: [
|
|
{
|
|
title: this.$t('entryName'),
|
|
value: 'projectName'
|
|
},
|
|
{
|
|
title: this.$t('targetMarket'),
|
|
value: 'targetMarket_dictText'
|
|
},
|
|
{
|
|
title: this.$t('projectStatus'),
|
|
value: 'projectStatus_dictText'
|
|
},
|
|
{
|
|
title: this.$t('StudioEngineer'),
|
|
value: 'studioEngineerName'
|
|
},
|
|
{
|
|
title: this.$t('certifiedEngineer'),
|
|
value: 'certificationEngineerName'
|
|
},
|
|
{},
|
|
{
|
|
title: this.$t('DigitalPlatform'),
|
|
value: 'digitalPlatform_dictText'
|
|
},
|
|
{
|
|
title: this.$t('ModelPlatform'),
|
|
value: 'vehiclePlatform_dictText'
|
|
},
|
|
{},
|
|
{
|
|
title: this.$t('IPDInformation'),
|
|
value: 'ipdInfo'
|
|
},
|
|
{
|
|
title: this.$t('certificationProgram'),
|
|
value: 'attestationPlan'
|
|
},
|
|
{
|
|
title: this.$t('dehicleDevelopmentPlan'),
|
|
value: 'vehicleDevelopmentPlan'
|
|
}
|
|
],
|
|
standardContentList: [
|
|
{
|
|
title: this.$t('standard'),
|
|
value: 'serialNumber'
|
|
},
|
|
{
|
|
title: this.$t('title'),
|
|
value: 'title'
|
|
},
|
|
{
|
|
title: this.$t('subtitle'),
|
|
value: 'subtitle'
|
|
},
|
|
{
|
|
title: this.$t('areaOfResponsibility'),
|
|
value: 'dutyTerritory_dictText'
|
|
},
|
|
{
|
|
title: this.$t('implementationCategory'),
|
|
value: 'implementType_dictText'
|
|
},
|
|
{
|
|
title: this.$t('correspondingStandard'),
|
|
value: 'correspondingStandard'
|
|
},
|
|
{
|
|
title: this.$t('engineeringInterfacePerson'),
|
|
value: 'engineeringInterfacePersonName'
|
|
},
|
|
{
|
|
title: this.$t('regulatoryEngineer'),
|
|
value: 'regulationOwnerName'
|
|
},
|
|
{
|
|
title: this.$t('certifiedEngineer'),
|
|
value: 'homologationEngineerName'
|
|
},
|
|
{
|
|
title: this.$t('remarks'),
|
|
value: 'remark'
|
|
}
|
|
],
|
|
url: {
|
|
urlFrom: 'project/projectLibraryBase/queryById',
|
|
queryProjectLawsInventoryInfoById: 'project/projectLawsInventoryEO/queryProjectLawsInventoryInfoById',
|
|
queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds'
|
|
},
|
|
queryBy: {},
|
|
isDisplay: false,
|
|
queryProject: {},
|
|
loading: false,
|
|
textLoading: this.$t('dataLoading')
|
|
}
|
|
},
|
|
mounted() {
|
|
let _this = this
|
|
this.isDisplay = false
|
|
this.queryTaskDetailByTask(function() {
|
|
_this.queryProjectLawsInventoryInfo()
|
|
})
|
|
},
|
|
computed: {
|
|
isSendBack() {
|
|
if (this.$route.query.taskDefinitionKey == 'zrrjsrw') {
|
|
return false
|
|
}
|
|
return true
|
|
},
|
|
isFlag() {
|
|
if (this.$route.query.taskDefinitionKey == 'dreqr') {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
},
|
|
methods: {
|
|
...mapGetters(['userInfo']),
|
|
terminationProcess(handlingTime) {
|
|
this.textLoading = this.$t('terminationProcessing')
|
|
this.loading = true
|
|
this.completeTask({ flag: 2 }, handlingTime)
|
|
},
|
|
submit(handlingTime) {
|
|
this.$refs.examineInformationRef.submit((res) => {
|
|
this.textLoading = this.$t('Submitting')
|
|
this.loading = true
|
|
if (!this.isFlag) {
|
|
res.flag = 0
|
|
}
|
|
this.completeTask(res, handlingTime)
|
|
})
|
|
},
|
|
sendBack(handlingTime) {
|
|
this.textLoading = this.$t('Returning')
|
|
this.loading = true
|
|
this.completeTask({ flag: 1 }, handlingTime)
|
|
},
|
|
queryTaskDetailByTask(callback) {
|
|
this.loading = true
|
|
getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.$route.query.taskIds }).then((res) => {
|
|
if (res instanceof String) {
|
|
this.queryBy = JSON.parse(res)
|
|
callback()
|
|
} else {
|
|
this.queryBy = res
|
|
callback()
|
|
}
|
|
})
|
|
},
|
|
completeTask(value, handlingTime) {
|
|
let json = Object.assign(this.queryBy, { handlingTime: handlingTime }, value)
|
|
let data = JSON.stringify(json).replace(/\"/g, '\'')
|
|
let query = {
|
|
userid: this.userInfo().id,
|
|
taskId: this.$route.query.taskId || this.$route.query.taskIds,
|
|
json: data
|
|
}
|
|
postAction('/workFlow/completeTask', query).then((res) => {
|
|
if (res.success) {
|
|
this.$message.success(this.$t('OperationSuccessful'))
|
|
this.loading = false
|
|
if (value.flag == 0) {
|
|
if (this.queryProject.verifyDeliverableType) {
|
|
this.startProcessDesign(this.queryBy, 4)
|
|
}
|
|
if (this.queryProject.prehomoDeliverableType) {
|
|
this.startProcessDesign(this.queryBy, 3)
|
|
}
|
|
if (this.queryProject.designDeliverableType) {
|
|
this.startProcessDesign(this.queryBy, 2)
|
|
}
|
|
} else {
|
|
this.$router.push({
|
|
path: '/ProcessCenter'
|
|
})
|
|
}
|
|
} else {
|
|
this.loading = false
|
|
this.$message.warning(this.$t('operationFailed'))
|
|
}
|
|
})
|
|
},
|
|
startProcessDesign(value, num) {
|
|
let query = {
|
|
type: num,
|
|
msg: JSON.stringify(value).replace(/\"/g, '\'')
|
|
}
|
|
postAction('/workFlow/startProcess', query).then((res) => {
|
|
if (res.success) {
|
|
this.completeTaskDesign(value, res.result)
|
|
}
|
|
})
|
|
},
|
|
|
|
completeTaskDesign(value, taskId) {
|
|
value.reviewResult = 'launch'
|
|
let operatorTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
|
value.operatorTime = operatorTime
|
|
let query = {
|
|
userid: this.userInfo().id,
|
|
taskId: taskId,
|
|
json: JSON.stringify(value).replace(/\"/g, '\'')
|
|
}
|
|
postAction('/workFlow/completeTask', query).then((res) => {
|
|
if (res.success) {
|
|
this.visible = false
|
|
this.$message.success(this.$t('OperationSuccessful'))
|
|
this.$router.push({
|
|
path: '/ProcessCenter'
|
|
})
|
|
} else {
|
|
this.$message.warning(this.$t('operationFailed'))
|
|
}
|
|
})
|
|
},
|
|
queryProjectLawsInventoryInfo() {
|
|
let query = {
|
|
id: this.queryBy.id,
|
|
operatorType: 'taskAffirmQuery'
|
|
}
|
|
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
|
|
if (res.success) {
|
|
this.queryProject = res.result[0] || {}
|
|
this.loading = false
|
|
this.isDisplay = true
|
|
} else {
|
|
this.queryProject = {}
|
|
this.loading = false
|
|
this.isDisplay = true
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" 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> |