对接设计符合性确认流程

This commit is contained in:
qq787203167
2022-05-09 18:06:09 +08:00
parent 600b7fcb98
commit 7086786f70
6 changed files with 113 additions and 38 deletions
@@ -67,6 +67,12 @@
export default { export default {
name: 'circulationHistory', name: 'circulationHistory',
props: {
url: {
type: String,
default: '/workFlow/get_list_by_instance'
}
},
data() { data() {
return { return {
dataSource: [], dataSource: [],
@@ -140,9 +146,10 @@
methods: { methods: {
getList() { getList() {
let query = { let query = {
prcNum: this.$route.query.prcNum prcNum: this.$route.query.prcNum,
prcId: this.$route.query.actiProcInstId
} }
getAction('/workFlow/get_list_by_instance', query).then((res) => { getAction(this.url, query).then((res) => {
this.dataSource = res this.dataSource = res
}) })
}, },
@@ -41,6 +41,7 @@
<span slot="operation" slot-scope="result"> <span slot="operation" slot-scope="result">
<a class="text" <a class="text"
v-if="$route.query.TaskKey == 'zrrclrw' || $route.query.TaskKey == 'dreDispose'" v-if="$route.query.TaskKey == 'zrrclrw' || $route.query.TaskKey == 'dreDispose'"
:disabled="!result.createUser"
@click="edit(result,$t('edit'))"> @click="edit(result,$t('edit'))">
{{$t('edit')}} {{$t('edit')}}
</a> </a>
@@ -55,6 +56,7 @@
</a> </a>
<a class="text" <a class="text"
v-if="$route.query.TaskKey == 'zrrclrw' || $route.query.TaskKey == 'dreDispose'" v-if="$route.query.TaskKey == 'zrrclrw' || $route.query.TaskKey == 'dreDispose'"
:disabled="!result.createUser"
@click="deleted(result)"> @click="deleted(result)">
{{$t('deleteLib')}} {{$t('deleteLib')}}
</a> </a>
@@ -52,6 +52,7 @@
<script> <script>
export default { export default {
name: 'reviewedByThePersonInCharge', name: 'reviewedByThePersonInCharge',
props: ['queryBy'],
data() { data() {
return { return {
formInline: {}, formInline: {},
@@ -75,6 +76,11 @@
} }
}, },
mounted() { mounted() {
if (this.queryBy) {
this.formInline.reviewResult = this.queryBy.reviewResult || undefined
this.formInline.approvalOpinion = this.queryBy.approvalOpinion || ''
this.formInline = { ...this.formInline }
}
}, },
methods: { methods: {
submit(callBack) { submit(callBack) {
@@ -12,30 +12,30 @@
<div class="detail-box"> <div class="detail-box">
<div class="detail-content"> <div class="detail-content">
<projectInformation <projectInformation
v-if="!loading" v-if="isDisplay"
:projectInformationList="projectInformationList" :projectInformationList="projectInformationList"
:url="url" :url="url"
:projectInformationId="this.queryBy.projectLibraryId" :projectInformationId="this.queryBy.projectLibraryId"
/> />
<standardContent <standardContent
v-if="!loading" v-if="isDisplay"
:standardContentList="standardContentList" :standardContentList="standardContentList"
:url="url" :url="url"
:standardContentQuery="queryProject" :standardContentQuery="queryProject"
/> />
<standardContentListTable <standardContentListTable
v-if="!loading" v-if="isDisplay"
:standardContentListQuery="queryProject" :standardContentListQuery="queryProject"
:url="url :url="url
"/> "/>
<examineInformation <examineInformation
:isFlag="isFlag" :isFlag="isFlag"
v-if="!loading" v-if="isDisplay"
isViewUploadedFiles isViewUploadedFiles
isApprovalOpinion isApprovalOpinion
ref="examineInformationRef" ref="examineInformationRef"
:url="url"/> :url="url"/>
<circulationHistory v-if="!loading" :url="url"/> <circulationHistory v-if="isDisplay"/>
</div> </div>
</div> </div>
<JLoading :loading="loading">{{textLoading}}</JLoading> <JLoading :loading="loading">{{textLoading}}</JLoading>
@@ -156,13 +156,15 @@
queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds' queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds'
}, },
queryBy: {}, queryBy: {},
isDisplay: false,
queryProject: {}, queryProject: {},
loading: false, loading: false,
textLoading:this.$t('dataLoading') textLoading: this.$t('dataLoading')
} }
}, },
mounted() { mounted() {
let _this = this let _this = this
this.isDisplay = false
this.queryTaskDetailByTask(function() { this.queryTaskDetailByTask(function() {
_this.queryProjectLawsInventoryInfo() _this.queryProjectLawsInventoryInfo()
}) })
@@ -243,11 +245,13 @@
} }
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => { getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
if (res.success) { if (res.success) {
this.queryProject = res.result || {} this.queryProject = res.result[0] || {}
this.loading = false this.loading = false
this.isDisplay = true
} else { } else {
this.queryProject = {} this.queryProject = {}
this.loading = false this.loading = false
this.isDisplay = true
} }
}) })
} }
@@ -14,25 +14,28 @@
<div class="detail-box"> <div class="detail-box">
<div class="detail-content"> <div class="detail-content">
<projectInformation <projectInformation
v-if="!loading" v-if="isDisplay"
:projectInformationList="projectInformationList" :projectInformationList="projectInformationList"
:url="url" :url="url"
:projectInformationId="this.queryBy.projectLibraryId" :projectInformationId="this.queryBy.projectLibraryId"
/> />
<standardContent <standardContent
v-if="!loading" v-if="isDisplay"
:standardContentList="standardContentList" :standardContentList="standardContentList"
:url="url" :url="url"
:standardContentQuery="queryProject" :standardContentQuery="queryProject"
/> />
<engineeringConfirmation <engineeringConfirmation
v-if="!loading" v-if="isDisplay"
/> />
<reviewedByThePersonInCharge <reviewedByThePersonInCharge
v-if="(!loading && $route.query.TaskKey == 'zrrclrw') || ref="reviewedByThePersonInChargeRef"
(!loading && $route.query.TaskKey == 'fqrsh')" :queryBy="queryBy"
v-if="(isDisplay && $route.query.TaskKey == 'zrrclrw') ||
(isDisplay && $route.query.TaskKey == 'fqrsh')"
/> />
<circulationHistory v-if="!loading" :url="url"/> <circulationHistory v-if="isDisplay"
:url="'/workFlow/queryProcessHistoryByPrcId'"/>
</div> </div>
</div> </div>
<JLoading :loading="loading">{{textLoading}}</JLoading> <JLoading :loading="loading">{{textLoading}}</JLoading>
@@ -71,6 +74,7 @@
queryBy: {}, queryBy: {},
queryProject: {}, queryProject: {},
loading: false, loading: false,
isDisplay: false,
textLoading: this.$t('dataLoading'), textLoading: this.$t('dataLoading'),
projectInformationList: [ projectInformationList: [
{ {
@@ -202,11 +206,13 @@
mounted() { mounted() {
let _this = this let _this = this
if (this.$route.query.taskIds) { if (this.$route.query.taskIds) {
this.isDisplay = false
this.queryTaskDetailByTask(function() { this.queryTaskDetailByTask(function() {
_this.queryProjectLawsInventoryInfo() _this.queryProjectLawsInventoryInfo()
}) })
} else { } else {
this.loading = true this.loading = true
this.isDisplay = false
this.queryBy.projectLibraryId = this.$route.query.projectLibraryId this.queryBy.projectLibraryId = this.$route.query.projectLibraryId
this.queryBy.id = this.$route.query.projectTaskInventoryId this.queryBy.id = this.$route.query.projectTaskInventoryId
this.queryProjectLawsInventoryInfo() this.queryProjectLawsInventoryInfo()
@@ -215,13 +221,50 @@
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
terminationProcess() { terminationProcess() {
this.textLoading = this.$t('terminationProcessing')
this.loading = true
this.completeTask({ flag: 2 })
}, },
adopt() { adopt() {
this.$refs.reviewedByThePersonInChargeRef.submit((res) => {
this.textLoading = this.$t('Submitting')
this.loading = true
this.completeTask(res)
})
}, },
sendBack() { sendBack() {
this.textLoading = this.$t('Returning')
this.loading = true
this.completeTask({ flag: 1 })
},
submit() {
this.$refs.reviewedByThePersonInChargeRef.submit((res) => {
this.textLoading = this.$t('Submitting')
this.loading = true
this.completeTask(res)
})
},
completeTask(value) {
let json = Object.assign(this.queryBy, 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
this.$router.push({
path: '/ProjectDetails',
query: this.$route.query
})
} else {
this.loading = false
this.$message.warning(this.$t('operationFailed'))
}
})
}, },
queryTaskDetailByTask(callback) { queryTaskDetailByTask(callback) {
this.loading = true this.loading = true
@@ -242,11 +285,13 @@
} }
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => { getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
if (res.success) { if (res.success) {
this.queryProject = res.result || {} this.queryProject = res.result[0] || {}
this.loading = false this.loading = false
this.isDisplay = true
} else { } else {
this.queryProject = {} this.queryProject = {}
this.loading = false this.loading = false
this.isDisplay = true
} }
}) })
} }
@@ -218,13 +218,17 @@
actiProcInstId: val.designPId, actiProcInstId: val.designPId,
projectTaskInventoryId: val.projectLawsInventoryId, projectTaskInventoryId: val.projectLawsInventoryId,
projectLibraryId: this.$route.query.id, projectLibraryId: this.$route.query.id,
id: this.$route.query.id,
studioEngineer:this.$route.query.studioEngineer,
serialNumber: val.serialNumber, serialNumber: val.serialNumber,
TaskKey:val.designTaskDefinitionKey, TaskKey: val.designTaskDefinitionKey,
flowType:2, flowType: 2,
Sponsor:'designInitiatorName', Sponsor: 'designInitiatorName',
personLiable:'designDutyName', personLiable: 'designDutyName',
typeOfDeliverables:'designDeliverableType_dictText', typeOfDeliverables: 'designDeliverableType_dictText',
deliverableTemplate:'designDeliverableTemplate', deliverableTemplate: 'designDeliverableTemplate',
projectName:this.$route.query.projectName,
projectNameId:this.$route.query.projectNameId,
} }
break break
case 2: case 2:
@@ -232,30 +236,37 @@
taskIds: val.prehomoTaskId, taskIds: val.prehomoTaskId,
actiProcInstId: val.prehomoPId, actiProcInstId: val.prehomoPId,
projectTaskInventoryId: val.projectLawsInventoryId, projectTaskInventoryId: val.projectLawsInventoryId,
studioEngineer:this.$route.query.studioEngineer,
projectLibraryId: this.$route.query.id, projectLibraryId: this.$route.query.id,
serialNumber: val.serialNumber, serialNumber: val.serialNumber,
TaskKey:val.prehomoTaskDefinitionKey, TaskKey: val.prehomoTaskDefinitionKey,
flowType:3, flowType: 3,
Sponsor:'prehomoInitiatorName', id: this.$route.query.id,
personLiable:'prehomoDutyName', Sponsor: 'prehomoInitiatorName',
typeOfDeliverables:'prehomoDeliverableType_dictText', personLiable: 'prehomoDutyName',
deliverableTemplate:'prehomoDeliverableTemplate', typeOfDeliverables: 'prehomoDeliverableType_dictText',
deliverableTemplate: 'prehomoDeliverableTemplate',
projectName:this.$route.query.projectName,
projectNameId:this.$route.query.projectNameId,
} }
break break
case 3: case 3:
query = { query = {
taskIds: val.verifyTaskId, taskIds: val.verifyTaskId,
actiProcInstId: val.verifyPId, actiProcInstId: val.verifyPId,
id: val.id, id: this.$route.query.id,
projectLibraryId: this.$route.query.id, projectLibraryId: this.$route.query.id,
studioEngineer:this.$route.query.studioEngineer,
serialNumber: val.serialNumber, serialNumber: val.serialNumber,
projectTaskInventoryId: val.projectLawsInventoryId, projectTaskInventoryId: val.projectLawsInventoryId,
TaskKey:val.verifyTaskDefinitionKey, TaskKey: val.verifyTaskDefinitionKey,
flowType:4, flowType: 4,
Sponsor:'verifyInitiatorName', Sponsor: 'verifyInitiatorName',
personLiable:'verifyDutyName', personLiable: 'verifyDutyName',
typeOfDeliverables:'verifyDeliverableType_dictText', typeOfDeliverables: 'verifyDeliverableType_dictText',
deliverableTemplate:'verifyDeliverableTemplate', deliverableTemplate: 'verifyDeliverableTemplate',
projectName:this.$route.query.projectName,
projectNameId:this.$route.query.projectNameId,
} }
break break
} }