[update 标准解读流程] 测试
This commit is contained in:
@@ -68,6 +68,20 @@ const marketListReleaseGetDataById = (taskId, params) => getAction(`/process/es/
|
|||||||
// 草稿的办理回显数据
|
// 草稿的办理回显数据
|
||||||
const marketListReleaseGetDataDraft = (params) => getAction('/process/es/archive/draftHandle', params)
|
const marketListReleaseGetDataDraft = (params) => getAction('/process/es/archive/draftHandle', params)
|
||||||
|
|
||||||
|
// 标准解读流程
|
||||||
|
// 获取项目id
|
||||||
|
const interpretGetProjectId = (params) => getAction('/process/standardInterpretFlow/getProjectId', params)
|
||||||
|
// 通过标准id获取文件
|
||||||
|
const interpretGetFileByStandardId = (params) => getAction('/process/standardInterpretFlow/getFileByStandardId', params)
|
||||||
|
// 获取条款列表
|
||||||
|
const interpretGetClauseList = (params) => getAction('/process/standardInterpretFlow/getClauseList', params)
|
||||||
|
// 审批
|
||||||
|
const interpretFlowApproval = (params) => postAction('/process/standardInterpretFlow/flowApproval', params)
|
||||||
|
// 发起
|
||||||
|
const interpretFlowStart = (params) => postAction('/process/standardInterpretFlow/flowStart', params)
|
||||||
|
// 获取详情
|
||||||
|
const interpretGetDetail = (params) => postAction('/process/standardInterpretFlow/queryDetail', params)
|
||||||
|
|
||||||
// 流程中心
|
// 流程中心
|
||||||
// 已发-强制撤回
|
// 已发-强制撤回
|
||||||
const compulsoryWithdrawal = (params) => postAction('/workCenter/forcedWithdrawal', params)
|
const compulsoryWithdrawal = (params) => postAction('/workCenter/forcedWithdrawal', params)
|
||||||
@@ -120,6 +134,13 @@ export {
|
|||||||
marketListReleaseGetDataById,
|
marketListReleaseGetDataById,
|
||||||
marketListReleaseGetDataDraft,
|
marketListReleaseGetDataDraft,
|
||||||
|
|
||||||
|
interpretGetProjectId,
|
||||||
|
interpretGetFileByStandardId,
|
||||||
|
interpretGetClauseList,
|
||||||
|
interpretFlowApproval,
|
||||||
|
interpretFlowStart,
|
||||||
|
interpretGetDetail,
|
||||||
|
|
||||||
compulsoryWithdrawal,
|
compulsoryWithdrawal,
|
||||||
|
|
||||||
processTransfer,
|
processTransfer,
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ module.exports = {
|
|||||||
standardState: 'Standard state',
|
standardState: 'Standard state',
|
||||||
newProductionVehicleImplementationDate: 'New production vehicle implementation date',
|
newProductionVehicleImplementationDate: 'New production vehicle implementation date',
|
||||||
newCertifiedVehicleImplementationDate: 'New certified vehicle implementation date',
|
newCertifiedVehicleImplementationDate: 'New certified vehicle implementation date',
|
||||||
|
implementationDate: 'Implementation date',
|
||||||
generate: 'Generate',
|
generate: 'Generate',
|
||||||
vehicleType: 'Vehicle type',
|
vehicleType: 'Vehicle type',
|
||||||
modelStatus: 'Model status',
|
modelStatus: 'Model status',
|
||||||
@@ -625,11 +626,11 @@ module.exports = {
|
|||||||
noFileMsg: 'Please select a file'
|
noFileMsg: 'Please select a file'
|
||||||
},
|
},
|
||||||
// 属性标识管理
|
// 属性标识管理
|
||||||
attributeIdentification:{
|
attributeIdentification: {
|
||||||
labelName:'Label Name',
|
labelName: 'Label Name',
|
||||||
firstLabel:'First Label',
|
firstLabel: 'First Label',
|
||||||
secondLabel:'Second Label',
|
secondLabel: 'Second Label',
|
||||||
thirdLabel:'Third Label',
|
thirdLabel: 'Third Label'
|
||||||
},
|
},
|
||||||
// 系统管理
|
// 系统管理
|
||||||
system,
|
system,
|
||||||
@@ -648,5 +649,5 @@ module.exports = {
|
|||||||
// 工作中心
|
// 工作中心
|
||||||
workCenter,
|
workCenter,
|
||||||
// 法规符合性评估库
|
// 法规符合性评估库
|
||||||
regulatoryComplianceAssessmentDatabase,
|
regulatoryComplianceAssessmentDatabase
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,9 +63,16 @@ module.exports = {
|
|||||||
masterControlDepartmentProfessionalModule: 'Master control department professional module',
|
masterControlDepartmentProfessionalModule: 'Master control department professional module',
|
||||||
relatedDepartment: 'Related department',
|
relatedDepartment: 'Related department',
|
||||||
associateDepartmentSpecializedModules: 'Associate department specialized modules',
|
associateDepartmentSpecializedModules: 'Associate department specialized modules',
|
||||||
requirementType: 'Requirement type',
|
requirementType: 'Requirement type'
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// 标准解读流程
|
||||||
|
standardInterpretationProcess: {
|
||||||
|
decompositionOrderSource: 'Source of decomposition order',
|
||||||
|
addStandard: 'Add standards',
|
||||||
|
selectStandard: 'Choice of Law Clause',
|
||||||
|
pleaseAddStandard: 'Please add a standard'
|
||||||
|
},
|
||||||
// 流程配置
|
// 流程配置
|
||||||
processConfig: {
|
processConfig: {
|
||||||
processType: '流程类型',
|
processType: '流程类型',
|
||||||
|
|||||||
@@ -63,9 +63,16 @@ module.exports = {
|
|||||||
masterControlDepartmentProfessionalModule: '主控部门专业模块',
|
masterControlDepartmentProfessionalModule: '主控部门专业模块',
|
||||||
relatedDepartment: '关联部门',
|
relatedDepartment: '关联部门',
|
||||||
associateDepartmentSpecializedModules: '关联部门专业模块',
|
associateDepartmentSpecializedModules: '关联部门专业模块',
|
||||||
requirementType: '要求类型',
|
requirementType: '要求类型'
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// 标准解读流程
|
||||||
|
standardInterpretationProcess: {
|
||||||
|
decompositionOrderSource: '分解单来源',
|
||||||
|
addStandard: '添加标准',
|
||||||
|
selectStandard: '选择条款',
|
||||||
|
pleaseAddStandard: '请添加一条标准'
|
||||||
|
},
|
||||||
// 流程配置
|
// 流程配置
|
||||||
processConfig: {
|
processConfig: {
|
||||||
processType: '流程类型',
|
processType: '流程类型',
|
||||||
|
|||||||
@@ -214,6 +214,7 @@ module.exports = {
|
|||||||
standardState: '标准状态',
|
standardState: '标准状态',
|
||||||
newProductionVehicleImplementationDate: '新生产车实施日期',
|
newProductionVehicleImplementationDate: '新生产车实施日期',
|
||||||
newCertifiedVehicleImplementationDate: '新认证车实施日期',
|
newCertifiedVehicleImplementationDate: '新认证车实施日期',
|
||||||
|
implementationDate: '实施日期',
|
||||||
generate: '生成',
|
generate: '生成',
|
||||||
vehicleType: '车型',
|
vehicleType: '车型',
|
||||||
modelStatus: '车型状态',
|
modelStatus: '车型状态',
|
||||||
@@ -598,7 +599,7 @@ module.exports = {
|
|||||||
textStatus: '文本状态',
|
textStatus: '文本状态',
|
||||||
conversionResults: '转换结果',
|
conversionResults: '转换结果',
|
||||||
timeConsuming: '消耗时间(秒)',
|
timeConsuming: '消耗时间(秒)',
|
||||||
file: '文件',
|
file: '文件'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 业务支持
|
// 业务支持
|
||||||
@@ -702,7 +703,7 @@ module.exports = {
|
|||||||
fileFormatIncorrect: '文件格式不正确',
|
fileFormatIncorrect: '文件格式不正确',
|
||||||
uploadSuccessful: '上传成功',
|
uploadSuccessful: '上传成功',
|
||||||
uploadMaximumATime: '一次最多上传二十张图片',
|
uploadMaximumATime: '一次最多上传二十张图片',
|
||||||
deletedSuccessfully: '删除成功',
|
deletedSuccessfully: '删除成功'
|
||||||
},
|
},
|
||||||
importWithTemplate: {
|
importWithTemplate: {
|
||||||
chooseFile: '选择文件',
|
chooseFile: '选择文件',
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-select-title {
|
&-select-title {
|
||||||
background: #9F5258;
|
background: @primary-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-content {
|
&-content {
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ export const ProcessKey = {
|
|||||||
// 新法规导入流程
|
// 新法规导入流程
|
||||||
NEW_REGULATIONS_IMPORT: { text: '', value: '' },
|
NEW_REGULATIONS_IMPORT: { text: '', value: '' },
|
||||||
// 标准解读流程
|
// 标准解读流程
|
||||||
|
STANDARD_INTERPRETATION_PROCESS: { text: 'standard_interpret', value: 'standard_interpret' },
|
||||||
// 法规符合性排查流程
|
// 法规符合性排查流程
|
||||||
REGULATORY_COMPLIANCE_CHECK: { text: '', value: '' },
|
REGULATORY_COMPLIANCE_CHECK: { text: '', value: '' },
|
||||||
// 市场清单发布流程
|
// 市场清单发布流程
|
||||||
@@ -192,6 +193,21 @@ export const MarketListReleaseNodes = new EsEnums({
|
|||||||
directorSApproval: { text: '总监批准', value: '' }
|
directorSApproval: { text: '总监批准', value: '' }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 标准解读流程节点
|
||||||
|
export const StandardInterpretationNodes = new EsEnums({
|
||||||
|
initiated: { text: '法规工程师发起', value: 'regulatory_engineer_start' },
|
||||||
|
controlDepartLiaisonDistribution: { text: '主控部门联络人分发', value: 'contact_person_distribute' },
|
||||||
|
standardInterpreterDistribution: { text: '标准主解读人分发', value: 'master_interpret_distribute' },
|
||||||
|
interpreterFillInfo: { text: '解读人填写信息', value: 'master_interpret_fillout' },
|
||||||
|
standardInterpreterSummary: { text: '标准主解读人汇总', value: 'master_interpret_summary' },
|
||||||
|
countersignOne: { text: '会签', value: 'jointly_sign_1' },
|
||||||
|
countersignTwo: { text: '会签', value: 'jointly_sign_2' },
|
||||||
|
departManagerReviewOne: { text: '各涉及部门科室经理审核', value: 'department_manager_approve_1' },
|
||||||
|
departManagerReviewTwo: { text: '各涉及部门科室经理审核', value: 'department_manager_approve_2' },
|
||||||
|
manageOrTechnicalOfficerApprovalOne: { text: '主控部门高级经理/法规认证技术官批准', value: 'technical_officer_approval_1' },
|
||||||
|
manageOrTechnicalOfficerApprovalTwo: { text: '主控部门高级经理/法规认证技术官批准', value: 'technical_officer_approval_2' }
|
||||||
|
})
|
||||||
|
|
||||||
// 条款使用范围
|
// 条款使用范围
|
||||||
export const ClauseUsableRange = new EsEnums({
|
export const ClauseUsableRange = new EsEnums({
|
||||||
DOMESTIC: { text: '外来标准', value: '1' },
|
DOMESTIC: { text: '外来标准', value: '1' },
|
||||||
|
|||||||
@@ -0,0 +1,738 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
|
||||||
|
<!-- 标题右侧tab -->
|
||||||
|
<template v-slot:titleRightCustom>
|
||||||
|
<div class="table-operator-tab">
|
||||||
|
<a :class="(switchValue === 'base' ? 'table-operator-tab-active' : '') + ' ' + ($i18n.locale === EN ? 'switch-item-en' : 'switch-item')"
|
||||||
|
@click="switchChange('base')">{{ $t('basicInformation') }}
|
||||||
|
</a>
|
||||||
|
<a :class="(switchValue === 'user' ? 'table-operator-tab-active' : '') + ' ' + ($i18n.locale === EN ? 'switch-item-en' : 'switch-item')"
|
||||||
|
@click="switchChange('user')">{{ $t('personalInformation') }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<!-- 基础信息 -->
|
||||||
|
<div v-show="switchValue === 'base'" class="detail-page-scroll-content">
|
||||||
|
<!-- 流程信息 -->
|
||||||
|
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
||||||
|
<a-form :form="processInfoForm">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="12">
|
||||||
|
<!-- 流程名称 自动生成规则:标准编号-标准名称-法规符合性排查 -->
|
||||||
|
<a-form-item
|
||||||
|
:labelCol="$i18n.locale === EN ? labelColEn : labelCol"
|
||||||
|
:wrapperCol="$i18n.locale === EN ? wrapperColEn : wrapperCol"
|
||||||
|
:label="$t('processName')"
|
||||||
|
:colon="formItemColon">
|
||||||
|
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
||||||
|
disabled
|
||||||
|
:maxLength="50"
|
||||||
|
v-decorator="['prcName']" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<!-- 截止日期 -->
|
||||||
|
<a-form-item
|
||||||
|
:labelCol="$i18n.locale === EN ? labelColEn : labelCol"
|
||||||
|
:wrapperCol="$i18n.locale === EN ? wrapperColEn : wrapperCol"
|
||||||
|
:label="$t('expirationDate')"
|
||||||
|
:colon="formItemColon">
|
||||||
|
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="disabled"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
v-decorator="['dueTime']" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<!-- 流程说明 -->
|
||||||
|
<a-form-item
|
||||||
|
:labelCol="$i18n.locale === EN ? longLabelColEn : longLabelCol"
|
||||||
|
:wrapperCol="$i18n.locale === EN ? longWrapperColEn : longWrapperCol"
|
||||||
|
:label="$t('processExplain')"
|
||||||
|
:colon="formItemColon">
|
||||||
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
||||||
|
:maxLength="500"
|
||||||
|
:rows="4"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-decorator="['prcMes']" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col v-if="[2, 3, 4, 5, 6, 7, 8, 9].includes(currentNode)" :span="24">
|
||||||
|
<!-- 标准编号/标准名称 -->
|
||||||
|
<a-form-item
|
||||||
|
:labelCol="$i18n.locale === EN ? longLabelColEn : longLabelCol"
|
||||||
|
:wrapperCol="$i18n.locale === EN ? longWrapperColEn : longWrapperCol"
|
||||||
|
:label="$t('standardNumber') + '/' + $t('standardName')"
|
||||||
|
:colon="formItemColon">
|
||||||
|
<a-input :placeholder="$t('pleaseEnter') + $t('standardNumber') + '/' + $t('standardName')"
|
||||||
|
disabled
|
||||||
|
v-decorator="['standardNumberName']" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col v-if="[2, 3, 4, 6, 7, 8, 9].includes(currentNode)" :span="24">
|
||||||
|
<!-- 适用市场 -->
|
||||||
|
<a-form-item
|
||||||
|
:labelCol="$i18n.locale === EN ? longLabelColEn : longLabelCol"
|
||||||
|
:wrapperCol="$i18n.locale === EN ? longWrapperColEn : longWrapperCol"
|
||||||
|
:label="$t('applicableMarket')"
|
||||||
|
:colon="formItemColon">
|
||||||
|
<a-input :placeholder="$t('pleaseEnter') + $t('applicableMarket')"
|
||||||
|
disabled
|
||||||
|
v-decorator="['applicableMarket']" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
|
||||||
|
<!-- 业务基本信息 -->
|
||||||
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||||
|
<div v-if="!disabled" class="table-operator">
|
||||||
|
<!-- 添加标准 -->
|
||||||
|
<a-button icon="plus" type="primary" @click="handleAddStandard">
|
||||||
|
{{$t('workCenter.standardInterpretationProcess.addStandard')}}
|
||||||
|
</a-button>
|
||||||
|
<!-- 选择条款 -->
|
||||||
|
<a-button icon="plus" type="primary" @click="handleSelectClause">
|
||||||
|
{{$t('workCenter.standardInterpretationProcess.selectStandard')}}
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
<div class="table-container">
|
||||||
|
<j-table
|
||||||
|
:can-drag="true"
|
||||||
|
:scroll="{x: '100%'}"
|
||||||
|
ref="table"
|
||||||
|
rowKey="id"
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="false"
|
||||||
|
:loading="loading">
|
||||||
|
<template v-slot:decompositionSource="{text, record}">
|
||||||
|
<a-select v-model="record.decompositionSource"
|
||||||
|
@change="handleChangeDecompositionSource"
|
||||||
|
:placeholder="$t('pleaseSelect') + $t('workCenter.standardInterpretationProcess.decompositionOrderSource')"
|
||||||
|
style="width: 100%;">
|
||||||
|
<a-select-option v-for="item in decompositionSourceList"
|
||||||
|
:disabled="item.isDisabled === '1'"
|
||||||
|
:key="item.value" :value="item.value">
|
||||||
|
{{ item.text || item.title }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</template>
|
||||||
|
</j-table>
|
||||||
|
</div>
|
||||||
|
<template v-if="showClauseTable">
|
||||||
|
<div v-if="!disabled" class="table-operator">
|
||||||
|
<!-- 批量删除条款 -->
|
||||||
|
<a-button icon="delete" type="danger" ghost @click="handleClauseBatchDel">
|
||||||
|
{{ $t('batchDelete') }}
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
<j-table
|
||||||
|
:can-drag="true"
|
||||||
|
:scroll="{x: '100%'}"
|
||||||
|
ref="table"
|
||||||
|
rowKey="uuid"
|
||||||
|
:columns="clauseColumns"
|
||||||
|
:dataSource="clauseDataSource"
|
||||||
|
:pagination="clauseIpagination"
|
||||||
|
:row-selection="{ selectedRowKeys: selectedClauseRowKeys, onChange: onSelectClauseChange }"
|
||||||
|
:loading="loading">
|
||||||
|
<!--条文内容-->
|
||||||
|
<template slot="item_content" slot-scope="{text, record}">
|
||||||
|
<div class="table-text" style="cursor: pointer" v-if="text || text === 0" @click="showContent('item_content', text,record)">
|
||||||
|
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
|
||||||
|
</div>
|
||||||
|
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:action="{text, record}">
|
||||||
|
<a @click="handleClauseDelete(record.uuid)" class="table-ope-btn">{{ $t('delete') }}</a>
|
||||||
|
</template>
|
||||||
|
</j-table>
|
||||||
|
</template>
|
||||||
|
<!-- 流程审批信息 -->
|
||||||
|
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||||
|
<a-form :form="approvalInfoForm">
|
||||||
|
<!--备注-->
|
||||||
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')" :colon="formItemColon">
|
||||||
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||||
|
:maxLength="500"
|
||||||
|
:rows="4"
|
||||||
|
v-decorator="['commitText', validatorRules.commitText]" />
|
||||||
|
</a-form-item>
|
||||||
|
<!--附件-->
|
||||||
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('attach')" :colon="formItemColon">
|
||||||
|
<j-upload v-decorator="['commitFile']" return-id multiple />
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!-- 人员信息 -->
|
||||||
|
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||||
|
<process-detail-list :processKey="processKey">
|
||||||
|
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNodeId"></personnel-info>
|
||||||
|
</process-detail-list>
|
||||||
|
</div>
|
||||||
|
<!-- 操作按钮 -->
|
||||||
|
<div class="detail-page-bottom-operate-box">
|
||||||
|
<!-- 转办 -->
|
||||||
|
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
|
||||||
|
<!-- 保存 -->
|
||||||
|
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
|
||||||
|
<!-- 同意 -->
|
||||||
|
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
|
||||||
|
<!-- 提交 -->
|
||||||
|
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
|
||||||
|
<!-- 驳回 -->
|
||||||
|
<a-button type="primary" :loading="loading" @click="handleReject" icon="close-circle">{{ $t('reject') }}</a-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--条文内容-->
|
||||||
|
<split-clause-detail ref="splitClauseDetail" />
|
||||||
|
<!-- 添加标准弹框-只选择已拆分的数据 -->
|
||||||
|
<standard-selection-modal ref="selectStandardRef"
|
||||||
|
type="radio"
|
||||||
|
@listChange="handleAddStandardCallback"
|
||||||
|
:canSelectedSource="[StandardSource.FOREIGN.value]"
|
||||||
|
disabledSourceSearch/>
|
||||||
|
</internal-detail-page>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ProcessDetailList from '@comp/ProcessDetailList'
|
||||||
|
import InternalDetailPage from '@comp/InternalDetailPage'
|
||||||
|
import PersonnelInfo from '@comp/PersonnelInfo'
|
||||||
|
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||||
|
import { ProcessKey, StandardInterpretationNodes, StandardSource } from '@/enums/commonEnums'
|
||||||
|
import StandardSelectionModal from '@comp/selection/StandardSelectionModal'
|
||||||
|
import {
|
||||||
|
interpretGetFileByStandardId,
|
||||||
|
interpretGetClauseList,
|
||||||
|
interpretGetProjectId,
|
||||||
|
interpretGetDetail, interpretFlowStart
|
||||||
|
} from '@api/workCenter'
|
||||||
|
import { randomUUID } from '@/utils/util'
|
||||||
|
import SplitClauseDetail from '@views/documentTool/documentSplit/modules/SplitClauseDetail'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StandardInterpretationProcess',
|
||||||
|
components: { SplitClauseDetail, StandardSelectionModal, PersonnelInfo, InternalDetailPage, ProcessDetailList },
|
||||||
|
mixins: [WorkCenterMixin],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
EN: 'en-us',
|
||||||
|
processKey: ProcessKey.STANDARD_INTERPRETATION_PROCESS.value,
|
||||||
|
StandardSource,
|
||||||
|
loading: false,
|
||||||
|
switchValue: 'base', // 头部tab选中值
|
||||||
|
disabled: false,
|
||||||
|
// 项目id
|
||||||
|
projectId: '',
|
||||||
|
currentNode: 1, // 当前节点
|
||||||
|
currentNodeName: '',
|
||||||
|
currentNodeId: StandardInterpretationNodes.initiated.value, // 当前节点id
|
||||||
|
model: {},
|
||||||
|
approvalInfoForm: this.$form.createForm(this),
|
||||||
|
processInfoForm: this.$form.createForm(this),
|
||||||
|
// region 表单宽调整
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 4 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 20 }
|
||||||
|
},
|
||||||
|
longLabelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 2 }
|
||||||
|
},
|
||||||
|
longWrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 22 }
|
||||||
|
},
|
||||||
|
labelColEn: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 8 }
|
||||||
|
},
|
||||||
|
wrapperColEn: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 16 }
|
||||||
|
},
|
||||||
|
longLabelColEn: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 4 }
|
||||||
|
},
|
||||||
|
longWrapperColEn: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 20 }
|
||||||
|
},
|
||||||
|
// endregion
|
||||||
|
validatorRules: {
|
||||||
|
// 流程名称
|
||||||
|
prcName: {
|
||||||
|
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
commitText: {
|
||||||
|
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// region 标准表格
|
||||||
|
columns: [
|
||||||
|
{ // 标准编号
|
||||||
|
title: this.$t('standardNumber'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'standardNumber',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 标准名称
|
||||||
|
title: this.$t('standardName'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'standardName',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 标准状态
|
||||||
|
title: this.$t('standardState'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'standardState_dictText',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 分解单来源
|
||||||
|
title: this.$t('workCenter.standardInterpretationProcess.decompositionOrderSource'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'decompositionSource_dictText',
|
||||||
|
scopedSlots: { customRender: 'decompositionSource' }
|
||||||
|
},
|
||||||
|
{ // 实施日期
|
||||||
|
title: this.$t('implementationDate'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'implementationDate',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 新生产车实施日期
|
||||||
|
title: this.$t('newProductionVehicleImplementationDate'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'newProductionImplementation',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 新认证车实施日期
|
||||||
|
title: this.$t('newCertifiedVehicleImplementationDate'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'newCerImplementDate',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dataSource: [],
|
||||||
|
decompositionSourceList: [], // 标准分解单下拉
|
||||||
|
showClauseTable: false,
|
||||||
|
clauseColumns: [
|
||||||
|
{ // 标准编号/条款号
|
||||||
|
title: this.$t('standardNumber') + '/' + this.$t('clauseNo'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'itemNum',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 标准名称/条款标题
|
||||||
|
title: this.$t('standardName') + '/' + this.$t('clauseTitle'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'itemTitle',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 条款内容
|
||||||
|
title: this.$t('clauseContent'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'itemContent',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 操作
|
||||||
|
title: this.$t('operation'),
|
||||||
|
fixed: 'right',
|
||||||
|
width: 150,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
clauseDataSource: [],
|
||||||
|
/* 分页参数 */
|
||||||
|
clauseIpagination: {
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
|
||||||
|
showTotal: (total, range) => {
|
||||||
|
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
|
||||||
|
},
|
||||||
|
showQuickJumper: true,
|
||||||
|
showSizeChanger: true,
|
||||||
|
total: 0
|
||||||
|
},
|
||||||
|
selectedClauseRowKeys: [],
|
||||||
|
// endregion
|
||||||
|
info: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 是否发起节点
|
||||||
|
isInitiate () {
|
||||||
|
return this.currentNode === StandardInterpretationNodes.initiated.value
|
||||||
|
},
|
||||||
|
// 页面标题
|
||||||
|
pageTitle () {
|
||||||
|
return this.$t('flowCenter') + this.$route.meta.title + '(' + this.currentNodeName + ')'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
const { projectId, nodeId, taskName } = this.$route.query
|
||||||
|
// 发起、草稿进来没有nodeId,就默认发起节点
|
||||||
|
this.currentNode = nodeId || StandardInterpretationNodes.initiated.value
|
||||||
|
this.currentNodeName = taskName || StandardInterpretationNodes.initiated.text
|
||||||
|
this.projectId = projectId || ''
|
||||||
|
// this.btn = StandardInterpretationNodes.propertyOfValue('btn', this.currentNode) || []
|
||||||
|
// 查询人员信息
|
||||||
|
this.getPersonInfoStructure(this.processKey, () => {
|
||||||
|
this.initPersonInfoData(this.isInitiate)
|
||||||
|
})
|
||||||
|
// 如果是待办或草稿进来,就获取详情数据
|
||||||
|
if (this.$route.query.projectId) {
|
||||||
|
this.loadPage()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 如果是新建进来,就获取项目id
|
||||||
|
interpretGetProjectId().then(id => { this.projectId = (id + '') })
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取页面详情
|
||||||
|
*/
|
||||||
|
loadPage () {
|
||||||
|
const { projectId, taskId, draftId } = this.$route.query
|
||||||
|
this.loading = true
|
||||||
|
interpretGetDetail({
|
||||||
|
projectId,
|
||||||
|
taskId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
const data = res.result || {}
|
||||||
|
const processAll = data.processAll || {}
|
||||||
|
const processApprovalRecord = data.processApprovalRecord || {}
|
||||||
|
this.info = data
|
||||||
|
// 页面回显
|
||||||
|
this.processInfoForm && this.processInfoForm.setFieldsValue({
|
||||||
|
prcName: processAll.prcName,
|
||||||
|
dueTime: processAll.dueTime,
|
||||||
|
prcMes: processAll.prcMes
|
||||||
|
})
|
||||||
|
this.approvalInfoForm && this.approvalInfoForm.setFieldsValue({
|
||||||
|
commitText: processApprovalRecord.commitText,
|
||||||
|
commitFile: processApprovalRecord.commitFile
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取人员信息
|
||||||
|
getPersonInfo (isValidate = true) {
|
||||||
|
let personnelObj = {}
|
||||||
|
const funName = isValidate ? 'getDataObjVerify' : 'getDataObj'
|
||||||
|
// 节点1:所有的人员信息
|
||||||
|
if (this.isInitiate) {
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
personnelObj = this.$refs.personnelInfo[funName]()
|
||||||
|
if (!personnelObj) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// List拆成数组
|
||||||
|
for (const key in personnelObj) {
|
||||||
|
if (personnelObj[key] && key.includes('List')) {
|
||||||
|
personnelObj[key] = personnelObj[key].split(',')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return personnelObj
|
||||||
|
},
|
||||||
|
// 获取页面参数
|
||||||
|
async getPageParams (isValidate = true) {
|
||||||
|
// 去除备注必填
|
||||||
|
// this.validatorRules.remarks.rules[0].required = false
|
||||||
|
// 报错标记(base基本信息校验失败,user人员信息校验失败)
|
||||||
|
let flag = ''
|
||||||
|
const base = 'base'
|
||||||
|
const user = 'user'
|
||||||
|
if (isValidate && this.dataSource.length === 0) {
|
||||||
|
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||||
|
if (!flag) {
|
||||||
|
flag = base
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const params = {}
|
||||||
|
// 收集所有表单信息
|
||||||
|
let formDataList = []
|
||||||
|
if (isValidate) {
|
||||||
|
formDataList = await this.validateFormList(this.processInfoForm, this.approvalInfoForm).catch(() => {
|
||||||
|
if (!flag) {
|
||||||
|
flag = base
|
||||||
|
}
|
||||||
|
// 空数组防止后续操作报错
|
||||||
|
return []
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
formDataList = [
|
||||||
|
this.processInfoForm.getFieldsValue(),
|
||||||
|
this.approvalInfoForm.getFieldsValue()
|
||||||
|
]
|
||||||
|
// 保存清空校验
|
||||||
|
this.approvalInfoForm.validateFields(['commitText'], { force: true }, () => {})
|
||||||
|
}
|
||||||
|
// 收集人员信息
|
||||||
|
const personInfo = this.getPersonInfo(isValidate && !flag)
|
||||||
|
if (!personInfo) {
|
||||||
|
flag = user
|
||||||
|
}
|
||||||
|
|
||||||
|
// 开始处理信息
|
||||||
|
// 流程信息
|
||||||
|
params.processAll = Object.assign({}, this.info.processAll, formDataList[0], {
|
||||||
|
projectId: this.projectId,
|
||||||
|
nodeId: this.$route.query.nodeId,
|
||||||
|
taskId: this.$route.query.taskId,
|
||||||
|
prcType: 2
|
||||||
|
})
|
||||||
|
|
||||||
|
// 处理其他参数
|
||||||
|
params.map = Object.assign({}, personInfo)
|
||||||
|
// 流程审批信息
|
||||||
|
params.processApprovalRecord = Object.assign({}, this.info.processApprovalRecord, formDataList[1], {
|
||||||
|
projectId: this.projectId
|
||||||
|
})
|
||||||
|
|
||||||
|
// 发起保存草稿信息
|
||||||
|
// if (this.isInitiate) {
|
||||||
|
// params.infoJsonStr = JSON.stringify({
|
||||||
|
// // 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了)
|
||||||
|
// personInfo: this.$refs.personnelInfo.getDataObj(),
|
||||||
|
// // 业务表格数据,用于强制撤回后回显
|
||||||
|
// draftData: params.processEsInspectPlanList
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
params.data = {
|
||||||
|
processStandardInterpret: {
|
||||||
|
projectId: this.projectId,
|
||||||
|
standardId: this.dataSource[0].id,
|
||||||
|
// 主解读人
|
||||||
|
masterInterpretId: params.map.masterInterpret,
|
||||||
|
decompositionSource: this.decompositionSource
|
||||||
|
},
|
||||||
|
processStandardInterpretClauseList: this.clauseDataSource
|
||||||
|
}
|
||||||
|
// 如果有校验失败的,那就报错
|
||||||
|
if (flag) {
|
||||||
|
throw new Error(flag)
|
||||||
|
}
|
||||||
|
return params
|
||||||
|
},
|
||||||
|
// 转办
|
||||||
|
handleTurnTo () {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 保存
|
||||||
|
handleSave () {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 同意
|
||||||
|
handleAgree () {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 提交
|
||||||
|
handleSubmit () {
|
||||||
|
if (this.loading) return
|
||||||
|
// 有taskId说明已经发起过,调审批接口,否则调发起接口
|
||||||
|
if (this.$route.query.taskId) {
|
||||||
|
this.handleAgree(true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
this.getPageParams().then(res => {
|
||||||
|
console.log(res)
|
||||||
|
return interpretFlowStart(res)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
if (err && err.message) {
|
||||||
|
this.switchChange(err.message)
|
||||||
|
}
|
||||||
|
this.loading = false
|
||||||
|
}).finally(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.loading = false
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 驳回
|
||||||
|
handleReject () {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 添加标准
|
||||||
|
handleAddStandard () {
|
||||||
|
this.$refs.selectStandardRef.open()
|
||||||
|
},
|
||||||
|
// 选择条款
|
||||||
|
handleSelectClause () {
|
||||||
|
// 请添加一条标准
|
||||||
|
if (!this.dataSource.length) {
|
||||||
|
this.$message.warning(this.$t('workCenter.standardInterpretationProcess.pleaseAddStandard'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 请选择分解单来源
|
||||||
|
if (!this.dataSource[0].decompositionSource) {
|
||||||
|
this.$message.warning(this.$t('pleaseSelect') + this.$t('workCenter.standardInterpretationProcess.decompositionOrderSource'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.showClauseTable = true
|
||||||
|
this.loading = true
|
||||||
|
interpretGetClauseList({
|
||||||
|
standardId: this.dataSource[0].id,
|
||||||
|
fileType: this.dataSource[0].decompositionSource
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.clauseDataSource = (res.result || []).map(item => {
|
||||||
|
item.uuid = randomUUID()
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 选择完标准回调
|
||||||
|
handleAddStandardCallback (list) {
|
||||||
|
console.log(list)
|
||||||
|
this.dataSource = list || []
|
||||||
|
if (this.dataSource.length) {
|
||||||
|
interpretGetFileByStandardId({ standardId: this.dataSource[0].id }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.decompositionSourceList = res.result || []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 修改分解单来源
|
||||||
|
handleChangeDecompositionSource (val) {
|
||||||
|
this.decompositionSource = val
|
||||||
|
const find = this.decompositionSourceList.find(item => item.value === val)
|
||||||
|
if (find) {
|
||||||
|
this.dataSource.decompositionSource_dictText = find.text || find.title
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 条款批量删除
|
||||||
|
handleClauseBatchDel () {
|
||||||
|
if (this.selectedClauseRowKeys.length <= 0) {
|
||||||
|
this.$message.warning(this.$t('selectARecord'))
|
||||||
|
} else {
|
||||||
|
const that = this
|
||||||
|
this.$confirm({
|
||||||
|
title: this.$t('confirmBatchDeletion'),
|
||||||
|
content: this.$t('deleteAData'),
|
||||||
|
onOk: () => {
|
||||||
|
this.clauseDataSource = this.clauseDataSource.filter(item => !this.selectedClauseRowKeys.includes(item.uuid))
|
||||||
|
this.selectedClauseRowKeys = []
|
||||||
|
// 重新计算分页问题
|
||||||
|
that.handleClauseReCalculatePage(that.selectedClauseRowKeys.length)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 条款删除
|
||||||
|
handleClauseDelete (id) {
|
||||||
|
const that = this
|
||||||
|
this.$confirm({
|
||||||
|
title: this.$t('confirmDeletion'),
|
||||||
|
content: this.$t('areYouSure'),
|
||||||
|
onOk: () => {
|
||||||
|
const index = this.clauseDataSource.findIndex(item => item.uuid === id)
|
||||||
|
if (index !== -1) {
|
||||||
|
this.clauseDataSource.splice(index, 1)
|
||||||
|
}
|
||||||
|
if (that.clauseIpagination.current > 1 && ((that.clauseIpagination.current - 1) * that.clauseIpagination.pageSize) + 1 === that.clauseIpagination.total) {
|
||||||
|
that.clauseIpagination.current -= 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除后计算分页
|
||||||
|
handleClauseReCalculatePage (count) {
|
||||||
|
// 总数量-count
|
||||||
|
const total = this.clauseIpagination.total - count
|
||||||
|
// 获取删除后的分页数
|
||||||
|
const currentIndex = Math.ceil(total / this.clauseIpagination.pageSize)
|
||||||
|
// 删除后的分页数<所在当前页
|
||||||
|
if (currentIndex < this.clauseIpagination.current) {
|
||||||
|
this.clauseIpagination.current = currentIndex
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 勾选条款
|
||||||
|
onSelectClauseChange (keys) {
|
||||||
|
this.selectedClauseRowKeys = keys
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 显示条款内容、条文解读弹框
|
||||||
|
* @param fieldName
|
||||||
|
* @param val
|
||||||
|
*/
|
||||||
|
showContent (fieldName, val) {
|
||||||
|
const title = (this.columns.find(tt => tt.dbFieldName === fieldName) || {}).dbFieldTxt
|
||||||
|
if (title) {
|
||||||
|
this.$refs.splitClauseDetail.title = title
|
||||||
|
}
|
||||||
|
this.$refs.splitClauseDetail.open(val)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 验证所有表单
|
||||||
|
* @param formList - 多个需要校验的表单实例
|
||||||
|
*/
|
||||||
|
validateFormList (...formList) {
|
||||||
|
const promiseList = []
|
||||||
|
for (const form of formList) {
|
||||||
|
promiseList.push(
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
|
form.validateFields({ force: true }, (err, val) => {
|
||||||
|
if (!err) {
|
||||||
|
resolve(val)
|
||||||
|
} else {
|
||||||
|
reject(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return Promise.all(promiseList).catch(() => {
|
||||||
|
throw new Error('base')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
.table-container {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user