[update 标准解读流程] 完善

This commit is contained in:
danshihao
2024-07-11 15:45:19 +08:00
parent 8cc3371698
commit 074deb26b7
8 changed files with 135 additions and 69 deletions
+9
View File
@@ -79,6 +79,12 @@ const interpretGetClauseList = (params) => getAction('/process/standardInterpret
const interpretFlowApproval = (params) => postAction('/process/standardInterpretFlow/flowApproval', params)
// 发起
const interpretFlowStart = (params) => postAction('/process/standardInterpretFlow/flowStart', params)
// 驳回
const interpretFlowReject = (params) => postAction('/process/standardInterpretFlow/flowReject', params)
// 保存
const interpretFlowSave = (params) => postAction('/process/standardInterpretFlow/flowSave', params)
// 保存
const interpretFlowTransfer = (params) => postAction('/process/standardInterpretFlow/flowTransfer', params)
// 获取详情
const interpretGetDetail = (params) => getAction('/process/standardInterpretFlow/queryDetail', params)
@@ -145,6 +151,9 @@ export {
interpretGetClauseList,
interpretFlowApproval,
interpretFlowStart,
interpretFlowReject,
interpretFlowSave,
interpretFlowTransfer,
interpretGetDetail,
compulsoryWithdrawal,
+5
View File
@@ -250,3 +250,8 @@ export const AddType = {
SELECT_STANDARD: { text: '选择标准', value: '1' },
MANUAL_ADD: { text: '手动新增', value: '2' }
}
export const IsDistribute = {
DISTRIBUTE: { text: '是', value: '1' },
NOT_DISTRIBUTE: { text: '否', value: '2' }
}
+7 -1
View File
@@ -172,8 +172,14 @@ export default {
@size: 48px;
.todo-card {
height: calc(100vh - 611px);
/deep/ .ant-spin-container,
/deep/ .ant-spin-nested-loading,
/deep/ .ant-card-body {
height: 100%;
}
}
.content-wrapper {
height: calc(100% - 30px - 12px);
margin-top: 10px;
overflow-y: auto;
@@ -224,7 +230,7 @@ export default {
height: calc(100vh - 424px);
}
.content-wrapper {
height: calc(100vh - 506px);
//height: calc(100vh - 506px);
.content-item {
font-size: 14px;
@@ -69,7 +69,7 @@
:current-node-id="currentNodeId"
:disabled="disabled" ref="businessComp"/>
<!-- 主解读人分发 -->
<interpretation-main-interpreter-distribute v-else-if="[StandardInterpretationNodes.standardInterpreterDistribution.value, StandardInterpretationNodes.standardInterpreterReDistribution.value].includes(currentNodeId)"
<interpretation-main-interpreter-distribute v-else-if="mainInterpreterDistributeNodes.includes(currentNodeId)"
:current-node-id="currentNodeId"
:disabled="disabled" ref="businessComp"/>
<!-- 解读人填写解读信息 -->
@@ -131,7 +131,12 @@ import {
} from '@/enums/commonEnums'
import {
interpretGetProjectId,
interpretGetDetail, interpretFlowStart, interpretFlowApproval
interpretGetDetail,
interpretFlowStart,
interpretFlowApproval,
interpretFlowSave,
interpretFlowReject,
interpretFlowTransfer
} from '@api/workCenter'
import InterpretationInitiate from '@views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate'
import UserSelectModal from '@comp/selection/UserSelectModal'
@@ -149,6 +154,11 @@ export default {
mixins: [WorkCenterMixin],
data () {
return {
// 主解读人分发节点
mainInterpreterDistributeNodes: [
StandardInterpretationNodes.standardInterpreterDistribution.value,
StandardInterpretationNodes.standardInterpreterReDistribution.value
],
StandardInterpretationNodes,
EN: 'en-us',
processKey: ProcessKey.STANDARD_INTERPRETATION_PROCESS.value,
@@ -378,23 +388,29 @@ export default {
standardId: compData.standardData[0] && compData.standardData[0].id,
projectId: this.projectId
})
// 条款列表
params.data.processStandardInterpretClauseList = compData.clauseData
} else if (this.currentNodeId === StandardInterpretationNodes.controlDepartLiaisonDistribution.value) {
// 联络人分发节点
params.data.processStandardInterpret = Object.assign({}, this.info.data.processStandardInterpret, compData.formData, {
projectId: this.projectId
})
// 条款列表
params.data.processStandardInterpretClauseList = compData.clauseData
} else if (this.currentNodeId === StandardInterpretationNodes.standardInterpreterDistribution.value) {
} else if (this.mainInterpreterDistributeNodes.includes(this.currentNodeId)) {
// 标准主解读人分发节点
// 联络人分发节点
params.data.processStandardInterpret = Object.assign({}, this.info.data.processStandardInterpret, compData.formData, {
projectId: this.projectId
})
// 条款列表
params.data.processStandardInterpretClauseList = compData.clauseData
// 条款列表(分发和不分发传入的字段不一样)
if (compData.isDistribute) {
params.data.processStandardInterpretClauseList = compData.clauseData
} else {
// 将条款的表格复制到完整的条款解读表,id需要处理
params.data.processStandardInterpretClauseSublistList = compData.clauseData.map(item => {
item.standardInterpretClauseId = item.id
delete item.id
return item
})
}
} else {
// 解读人填写节点 及 后续节点
params.data.processStandardInterpret = Object.assign({}, this.info.data.processStandardInterpret, compData.formData, {
@@ -418,26 +434,26 @@ export default {
},
// 转办
continueTurnTo (userId) {
// if (this.loading) return
// this.loading = true
// const params = {
// taskId: this.$route.query.taskId,
// userId
// }
// transferInspectPlan(params).then(res => {
// if (res.success) {
// this.$message.success(res.message)
// this.goBack()
// } else {
// this.$message.warn(res.message)
// }
// }).catch(() => {
// this.loading = false
// }).finally(() => {
// setTimeout(() => {
// this.loading = false
// }, 1000)
// })
if (this.loading) return
this.loading = true
const params = {
taskId: this.$route.query.taskId,
userId
}
interpretFlowTransfer(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warn(res.message)
}
}).catch(() => {
this.loading = false
}).finally(() => {
setTimeout(() => {
this.loading = false
}, 1000)
})
},
// 保存
handleSave () {
@@ -447,14 +463,14 @@ export default {
// 1待办 2草稿
res.saveSource = (this.$route.query.draftId || !this.$route.query.projectId) ? 2 : 1
console.log(res)
// return saveInspectPlan(res)
return interpretFlowSave(res)
}).then(res => {
// if (res.success) {
// this.$message.success(res.message)
// this.goBack()
// } else {
// this.$message.warn(res.message)
// }
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warn(res.message)
}
}).catch((err) => {
console.log(err)
this.loading = false
@@ -547,18 +563,22 @@ export default {
return
}
this.loading = true
this.getPageParams().then(res => {
this.getPageParams(false).then(res => {
res.map.pass = false
// 解读人分发节点点击驳回特殊处理
if (this.mainInterpreterDistributeNodes.includes(this.currentNodeId)) {
res.map.passFirst = 0
}
// 审批意见
res.processApprovalRecord.commitFlag = ApprovalOpinions.REJECT.value
// return rejectInspectPlan(res)
return interpretFlowReject(res)
}).then(res => {
// if (res.success) {
// this.$message.success(res.message)
// this.goBack()
// } else {
// this.$message.warn(res.message)
// }
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warn(res.message)
}
}).catch((err) => {
if (err && err.message && tabList.includes(err.message)) {
this.switchChange(err.message)
@@ -12,6 +12,10 @@
@change="handleImport">
<a-button type="primary" icon="download" ghost>{{ $t('import') }}</a-button>
</a-upload>
<!-- 批量编辑解读人填写 -->
<a-button type="primary" ghost @click="handleBatchEdit" v-if="showBatchEditBtn">
{{$t('workCenter.standardInterpretationProcess.batchEdit')}}
</a-button>
<!-- 导出 -->
<a-button icon="upload" type="primary" ghost @click="handleExport" v-if="showExportBtn">
{{ $t('export') }}
@@ -391,7 +395,11 @@ export default {
selectionRows: [],
url: {
// 导入
importExcelUrl: ''
importExcelUrl: '/process/standardInterpretFlow/importExcelByUnDistribute',
// 标准主解读人节点选择分发的导出
exportDistribute: '/process/standardInterpretFlow/exportExcelByDistribute',
// 标准主解读人节点选择不分发的导出
exportUnDistribute: '/process/standardInterpretFlow/exportExcelByUnDistribute'
}
}
},
@@ -468,6 +476,13 @@ export default {
...mainInterpreterDistributeNodes // 标准主解读人分发节点
].includes(this.currentNodeId)
},
// 显示批量编辑按钮
showBatchEditBtn () {
return [
StandardInterpretationNodes.interpreterFillInfoOne.value, // 解读人填写信息
StandardInterpretationNodes.interpreterFillInfoTwo.value // 解读人填写信息
].includes(this.currentNodeId)
},
// 是否显示编辑按钮
showEditBtn () {
// 标准主解读人分发节点 && 不分发 显示编辑按钮
@@ -558,13 +573,13 @@ export default {
}
// 前端存储,没有id的数据,前端加上uuid
const data = info.file.response.result || []
this.dataSource.push(...data.map((item, index) => {
this.dataSource = data.map(item => {
// 导入的时候生成前端id,不用索引防止禁用出错
item.id = randomUUID()
// 有该标识返回数据的时候把id给去掉,这里的id前端生成的
item[uuidFlag] = true
return item
}))
})
} else {
if (Array.isArray(info.file.response.result) && info.file.response.result.length > 0) {
this.messageLineFeed(this.$t('fileImportError'), info.file.response.result)
@@ -605,7 +620,11 @@ export default {
if (!fileName || typeof fileName !== 'string') {
fileName = '导出文件'
}
const param = {}
const param = {
projectId: this.$route.query.projectId,
nodeId: this.$route.query.nodeId,
taskId: this.$route.query.taskId
}
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param.selections = this.selectedRowKeys.join(',')
}
@@ -620,7 +639,12 @@ export default {
style: 'display: none'
}
})
const url = ''
let url = ''
// 解读人分发节点
if (this.isMainInterpreterDistribute) {
// 根据是否分发选择对应的接口
url = this.isDistribute ? this.url.exportDistribute : this.url.exportUnDistribute
}
downFile(url, param).then((data) => {
if (!data) {
this.$message.warning('文件下载失败')
@@ -693,7 +717,7 @@ export default {
const row = this.dataSource.find(item => item[this.rowKey] === formData[this.rowKey])
Object.assign(row, form)
} else {
this.selectedRows.forEach(item => {
this.selectionRows.forEach(item => {
Object.assign(item, form)
})
}
@@ -47,49 +47,49 @@
<a-form-item :label="$t('workCenter.standardInterpretationProcess.drawingTemplate')" :colon="false">
<a-input :max-length="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.drawingTemplate')"
v-decorator="['drawingTemplate']"/>
</a-form-item>
<!--技术协议模板-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.technicalAgreementTemplate')" :colon="false">
<a-input :max-length="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.technicalAgreementTemplate')"
v-decorator="['technicalAgreementTemplate']"/>
</a-form-item>
<!--校核报告模板/checklist-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.verificationReportTemplate')" :colon="false">
<a-input :max-length="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.verificationReportTemplate')"
v-decorator="['verificationReportTemplateChecklist']"/>
</a-form-item>
<!--DVP模板-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.dvpTemplate')" :colon="false">
<a-input :max-length="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.dvpTemplate')"
v-decorator="['dvpTemplate']"/>
</a-form-item>
<!--DFEMA-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.dfema')" :colon="false">
<a-input :max-length="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.dfema')"
v-decorator="['dfema']"/>
</a-form-item>
<!--特殊性清单模板-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.specialListTemplate')" :colon="false">
<a-input :max-length="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.specialListTemplate')"
v-decorator="['keyTechnologyDecompositionTable']"/>
</a-form-item>
<!--其他文件或模板-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.otherFilesOrTemplates')" :colon="false">
<a-input :max-length="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.otherFilesOrTemplates')"
v-decorator="['otherDocumentsTemplates']"/>
</a-form-item>
<!--排查阶段-->
@@ -103,14 +103,14 @@
<a-form-item :label="$t('workCenter.standardInterpretationProcess.pThree')" :colon="false">
<a-input :max-length="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.pThree')"
v-decorator="['p3']"/>
</a-form-item>
<!--P5证明符合性的交付物名称-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.pFive')" :colon="false">
<a-input :max-length="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.pFive')"
v-decorator="['p5']"/>
</a-form-item>
<!--备注-->
@@ -7,7 +7,7 @@
<a-form :form="form" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="isStandardInterpreterSummary">
<a-row>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.countersigningPerson')" :colon="false">
<!--会签人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.countersigningPerson')"
v-decorator="['countersignPersonIds', validatorRules.countersignPersonIds]"
@@ -19,7 +19,7 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.reviewersPerson')" :colon="false">
<!--审核人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.reviewersPerson')"
v-decorator="['uploader', validatorRules.uploader]"
@@ -30,7 +30,7 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.approvedPerson')" :colon="false">
<!--批准人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.approvedPerson')"
v-decorator="['approvePersonId', validatorRules.approvePersonId]"
@@ -39,7 +39,7 @@
<a-form :form="userForm" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.countersigningPerson')" :colon="false">
<!--会签人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.countersigningPerson')"
v-decorator="['countersignPersonIds', validatorRules.countersignPersonIds]"
@@ -51,7 +51,7 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.reviewersPerson')" :colon="false">
<!--审核人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.reviewersPerson')"
v-decorator="['uploader', validatorRules.uploader]"
@@ -62,7 +62,7 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.mainInterpreter')" :colon="false">
<a-form-item :label="$t('workCenter.standardInterpretationProcess.approvedPerson')" :colon="false">
<!--批准人员-->
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardInterpretationProcess.approvedPerson')"
v-decorator="['approvePersonId', validatorRules.approvePersonId]"
@@ -84,6 +84,7 @@
import UserSelection from '@comp/selection/UserSelection'
import InterpretationClauseTable
from '@views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable'
import { IsDistribute } from '@/enums/commonEnums'
export default {
name: 'InterpretationMainInterpreterDistribute',
components: { InterpretationClauseTable, UserSelection },
@@ -217,6 +218,7 @@ export default {
},
async getData (isValidate) {
const obj = {
isDistribute: this.isDistribute,
formData: {}, // 表单的数据
clauseData: [] // 条款的表格
}
@@ -268,13 +270,13 @@ export default {
this.formInline = data.data.processStandardInterpret
this.clauseDataSource = data.data.processStandardInterpretClauseList
// 是否下发
if (data.isDistribute === '1') {
if (data.data.processStandardInterpret.isDistribute === IsDistribute.DISTRIBUTE.value) {
this.isDistribute = true
} else if (data.isDistribute === '2') {
} else if (data.data.processStandardInterpret.isDistribute === IsDistribute.NOT_DISTRIBUTE.value) {
this.isDistribute = false
}
// 是否下发有值就自动带入下一步,并回显数据
if (data.isDistribute) {
if (data.data.processStandardInterpret.isDistribute) {
this.isNextStep = true
this.$nextTick(() => {
this.$refs.interpretationClauseTable.setData(this.clauseDataSource)
@@ -285,7 +287,7 @@ export default {
handleNextStep () {
this.form.validateFields((err, values) => {
if (!err) {
this.isDistribute = values.isDistribute === '1'
this.isDistribute = values.isDistribute === IsDistribute.DISTRIBUTE.value
this.isNextStep = true
this.$nextTick(() => {
this.$refs.interpretationClauseTable.setData(this.clauseDataSource)