update 法规合规评估流程

This commit is contained in:
赵霄
2024-01-18 17:14:13 +08:00
parent 72dab95b9d
commit a6e8d5e66a
13 changed files with 1236 additions and 202 deletions
+29 -2
View File
@@ -3,7 +3,7 @@ import { getAction, postAction } from './manage.js'
// 查询定义流程列表
const getProcessNodeList = (params) => getAction('/activiti/getNodeList', params)
// 催办
const urgeProcessNode = (params) =>postAction('/workCenter/urging', params)
const urgeProcessNode = (params) => postAction('/workCenter/urging', params)
// 流程配置-部署
const deployWorkFlow = (params) => getAction('/activitiModel/deploy', params)
@@ -403,6 +403,24 @@ const rejectNoMatchTrackingProcess = (params) => postAction('/process/projectNot
// 保存
const saveNoMatchTrackingProcess = (params) => postAction('/process/projectNotMet/saveToDraft', params)
/* 法规合规评估流程 */
// 获取标准列表(带分解单来源的信息)
const getStandardListCarryDecompositionSingleSource = (params) => getAction('/process/projectStandard/quaryStandard', params)
// 通过标准及分解单来源获取条款
const getClauseByStandard = (params) => postAction('/process/projectStandard/processProjectStandardGetList', params)
// 保存
const saveStandardCompliance = (params) => postAction('/process/projectStandard/saveToDraft', params)
// 发起
const initStandardCompliance = (params) => postAction('/process/projectStandard/startProcess', params)
// 提交
const submitStandardCompliance = (params) => postAction('/process/projectStandard/submit', params)
// 同意
const agreeStandardCompliance = (params) => postAction('/process/projectStandard/agree', params)
// 驳回
const rejectStandardCompliance = (params) => postAction('/process/projectStandard/reject', params)
// 查询流程信息
const queryStandardCompliance = (params) => getAction('/process/projectStandard/queryProcessInfoVO', params)
export {
getProcessNodeList,
urgeProcessNode,
@@ -605,5 +623,14 @@ export {
submitNoMatchTrackingProcess,
agreeNoMatchTrackingProcess,
rejectNoMatchTrackingProcess,
saveNoMatchTrackingProcess
saveNoMatchTrackingProcess,
getStandardListCarryDecompositionSingleSource,
getClauseByStandard,
saveStandardCompliance,
initStandardCompliance,
submitStandardCompliance,
agreeStandardCompliance,
rejectStandardCompliance,
queryStandardCompliance
}
+13 -18
View File
@@ -409,27 +409,22 @@ module.exports = {
// 未符合项跟踪流程
noMatchTracking: {
queryByCondition: '按条件查询',
problemTypes:
'问题类型'
problemTypes: '问题类型'
},
// 法规合规评估流程
standardCompliance: {
addStandard: '添加标准',
responsibleUnitContactPerson:
'责任单位联络人',
pleaseSelectDeleteData:
'请选择要删除的数据',
moduleOwner:
'模块责任人',
projectAppraisal:
'项目评估',
stronglyRelatedVehicleType:
'是否与车型强关联',
doesNotFitModel:
'不符合车型系列',
projectApproval:
'项目审批',
projectFiling:
'项目归档'
responsibleUnitContactPerson: '责任单位联络人',
pleaseSelectDeleteData: '请选择要删除的数据',
moduleOwner: '模块责任人',
projectAppraisal: '项目评估',
stronglyRelatedVehicleType: '是否与车型强关联',
doesNotFitModel: '不符合车型系列',
projectApproval: '项目审批',
projectFiling: '项目归档',
pleaseAddStandard: '请添加标准',
pleaseSelectResponsibleUnitContactPerson: '请选择责任单位联络人',
atLeastOneData:'至少需要保留一条数据',
pleaseSelectDesignEngineer: '请选择设计工程师',
}
}
+9 -9
View File
@@ -193,7 +193,7 @@ export const ProcessKey = {
// 未符合项跟踪流程
NO_MATCH_TRACKING: { text: 'project-not-met', value: 'project-not-met' },
// 法规合规评估流程
REGULATORY_COMPLIANCE_ASSESSMENT: { text: 'fb-standard-compliance-assessment', value: 'fb-standard-compliance-assessment' },
REGULATORY_COMPLIANCE_ASSESSMENT: { text: 'standard-assessment', value: 'standard-assessment' },
// 法规采购流程
LEGAL_PROCUREMENT: { text: 'fb-standard-purchase', value: 'fb-standard-purchase' },
// 企标稽查计划
@@ -520,14 +520,14 @@ export const EsStartUseNodes = new EsEnums({
// 法规合规流程节点
export const StandardComplianceNodes = new EsEnums({
initial: { text: '法规工程师发起', value: '1', btn: ['save', 'submit'] },
departLeaderIssue: { text: '部所主管级领导下发', value: '2', btn: ['return', 'save', 'submit'] },
moduleOwnerIssue: { text: '模块责任人分发', value: '3', btn: ['return', 'save', 'submit'] },
designEngineerAssess: { text: '设计工程师评估', value: '4', btn: ['return', 'save', 'submit'] },
moduleOwnerReview: { text: '模块责任人审批', value: '5', btn: ['return', 'save', 'agree', 'reject'] },
departLeaderApprove: { text: '部所主管级领导审批', value: '6', btn: ['return', 'save', 'agree', 'reject'] },
regulatoryEngineerApprove: { text: '法规工程师审批', value: '7', btn: ['return', 'save', 'agree', 'reject'] },
designEngineerWriteProject: { text: '设计工程师补充立项项目号', value: '8', btn: ['submit'] }
initial: { text: '法规工程师发起', value: 'fggcsfq', btn: ['save', 'submit'] },
departLeaderIssue: { text: '部所主管级领导下发', value: 'bszgjldxf', btn: ['return', 'save', 'submit'] },
moduleOwnerIssue: { text: '模块责任人分发', value: 'mkzrrff', btn: ['return', 'save', 'submit'] },
designEngineerAssess: { text: '设计工程师评估', value: 'sjgcspg', btn: ['return', 'save', 'submit'] },
moduleOwnerReview: { text: '模块责任人审批', value: 'mkzrrsp', btn: ['return', 'save', 'agree', 'reject'] },
departLeaderApprove: { text: '部所主管级领导审批', value: 'bszgjldsp', btn: ['return', 'save', 'agree', 'reject'] },
regulatoryEngineerApprove: { text: '法规工程师审批', value: 'fggcssp', btn: ['return', 'save', 'agree', 'reject'] },
designEngineerWriteProject: { text: '设计工程师补充立项项目号', value: 'sjgcsbcgzlbh', btn: ['submit'] }
})
// 项目合规评估流程状态
@@ -130,6 +130,10 @@ export default {
case '4':
path = '/workCenter/NoMatchTrackingProcess'
break
// 法规合规评估流程
case '5':
path = '/workCenter/StandardComplianceProcess'
break
// 法规采购流程
case '6':
path = '/workCenter/StandardProcurementProcess'
@@ -85,7 +85,9 @@ import {
transferInspectExtension,
transferInspectPlan,
transferInspectProcess,
transferInspectRectify, transferPermissionApply, transferPostMeetingManage,
transferInspectRectify,
transferPermissionApply,
transferPostMeetingManage,
transferProcurementProcess,
turnToStandardECProcess
} from '../../../../api/workCenter'
@@ -108,7 +110,10 @@ import {
FGEntryChangeProcessNode,
ConsultationProcess,
ProjectComplianceEvaluationProcessNode,
ProcurementProcessNodes, StandardPromotion, NoMatchTrackingNodes
ProcurementProcessNodes,
StandardPromotion,
NoMatchTrackingNodes,
StandardComplianceNodes
} from '@/enums/commonEnums'
export default {
@@ -188,7 +193,9 @@ export default {
// 未符合项跟踪流程
[ProcessType.NO_MATCH_TRACKING.value]: [NoMatchTrackingNodes.initial.value],
// 法规合规评估流程
[ProcessType.REGULATORY_COMPLIANCE_ASSESSMENT.value]: [],
[ProcessType.REGULATORY_COMPLIANCE_ASSESSMENT.value]: [
StandardComplianceNodes.initial.value, StandardComplianceNodes.designEngineerWriteProject.value
],
// 法规采购流程
[ProcessType.LEGAL_PROCUREMENT.value]: [ProcurementProcessNodes.initiate.value, ProcurementProcessNodes.regulatoryEngineerConfirmation.value],
// 企标立项/变更计划
@@ -287,6 +294,10 @@ export default {
case '4':
path = '/workCenter/NoMatchTrackingProcess'
break
// 法规合规评估流程
case '5':
path = '/workCenter/StandardComplianceProcess'
break
// 法规采购流程
case '6':
path = '/workCenter/StandardProcurementProcess'
@@ -39,7 +39,7 @@
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
v-decorator="['processDueDate']"
:disabled="disabled"
:disabled="!isInitial"
style="width: 100%" />
</a-form-item>
</a-col>
@@ -50,14 +50,15 @@
@change="event => event.target.value = event.target.value.trim()"
:maxLength="500"
type="textarea"
:disabled="disabled"
:disabled="!isInitial"
v-decorator="['processDescription']" />
</a-form-item>
<!--标准编号/标准名称-->
<div class="standard-info" v-if="!isInitial">
<label class="standard-info-label">{{ $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName') }}</label>
<div class="standard-info-text">
<div class="standard-info-text" @click="toStandardDetail">{{ selectedStandard.standardNumber }} {{
selectedStandard.standardName
}}
</div>
</div>
@@ -66,19 +67,25 @@
<!--发起节点-->
<template v-if="isInitial">
<!--业务基本信息选择标准-->
<initial-basic-service-info @source:change="handleSourceChange" @standard:change="handleStandardChange" />
<initial-basic-service-info ref="standardList"
:selected-standard="selectedStandard"
@source:change="handleSourceChange"
@standard:change="handleStandardChange" />
<!--业务分派信息-->
<initial-assign-table :selected-source="selectedSource" :selected-standard="selectedStandard" />
<initial-assign-table ref="termList"
:selected-spilt-info-id="selectedSpiltInfoId"
:selected-standard="selectedStandard"
:display-data-source="dispathDataSource" />
</template>
<!--部所主管级领导下发-->
<depart-leader-issue-table v-if="isDepartLeaderIssue" />
<depart-leader-issue-table v-if="isDepartLeaderIssue" ref="termList" :display-data-source="dispathDataSource" />
<!--模块责任人分发-->
<module-owner-issue-table v-if="isModuleOwnerIssue" />
<module-owner-issue-table v-if="isModuleOwnerIssue" ref="termList" :display-data-source="dispathDataSource" />
<!--设计工程师评估-->
<design-engineer-assess v-if="isDesignEngineerAssess" />
<design-engineer-assess v-if="isDesignEngineerAssess" ref="termList" :display-data-source="dispathDataSource"/>
<!--模块负责人评审-->
<module-owner-approve-table v-if="isModuleOwnerApprove" />
@@ -112,9 +119,12 @@
<!--人员信息-->
<div class="detail-page-scroll-content p-0" v-show="switchValue === 'user'">
<process-detail-list>
<process-detail-list :process-key="ProcessKey.REGULATORY_COMPLIANCE_ASSESSMENT.value">
<template #personnelInfo>
<personnel-info ref="personnelInfo" :data="personnelInfoData" />
<personnel-info ref="personnelInfo"
:data="personnelInfoData"
:current-node="currentNode"
:special-process-node-prefix="currentNodePrefix" />
</template>
</process-detail-list>
</div>
@@ -142,6 +152,9 @@
{{ $t('reject') }}
</a-button>
</div>
<!--选人-->
<user-select-modal type="radio" ref="userSelectModal" @change="continueTransfer" />
</internal-detail-page>
</template>
@@ -150,7 +163,7 @@ import PersonnelInfo from '../../../components/PersonnelInfo'
import InternalDetailPage from '../../../components/InternalDetailPage'
import ProcessDetailList from '../../../components/ProcessDetailList'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import { ProcessKey, StandardComplianceNodes } from '../../../enums/commonEnums'
import { ProcessKey, StandardComplianceNodes, StandardSource } from '../../../enums/commonEnums'
import InitialBasicServiceInfo from './components/InitialBasicServiceInfo'
import InitialAssignTable from './components/InitialAssignTable'
import DepartLeaderIssueTable from './components/DepartLeaderIssueTable'
@@ -160,10 +173,19 @@ import ModuleOwnerApproveTable from './components/ModuleOwnerApproveTable'
import DepartLeaderApproveTable from './components/DepartLeaderApproveTable'
import RegulatoryEngineerApproval from './components/RegulatoryEngineerApproval'
import DesignEngineerWriteProject from './components/DesignEngineerWriteProject'
import {
saveStandardCompliance,
initStandardCompliance,
submitStandardCompliance,
queryStandardCompliance,
processTransfer
} from '../../../api/workCenter'
import UserSelectModal from '../../../components/selection/UserSelectModal'
export default {
name: 'StandardComplianceProcess',
components: {
UserSelectModal,
ProcessDetailList,
InternalDetailPage,
PersonnelInfo,
@@ -180,9 +202,9 @@ export default {
mixins: [WorkCenterMixin],
data () {
return {
ProcessKey,
loading: false,
btnList: [],
disabled: false,
// 流程信息表单
processInfoForm: this.$form.createForm(this),
processInfo: {},
@@ -214,64 +236,102 @@ export default {
}
},
selectedStandard: {}, // 发起节点,选中的标准
selectedSource: null // 发起节点,选中标准的分解单来源
selectedSpiltInfoId: null, // 发起节点,选中标准的分解单拆分id
businessId: null,
dispathDataSource: [], // 业务分派信息的数据
currentNodePrefix: null
}
},
computed: {
pageTitle () {
return `${this.$t('flowCenter')}${this.$route.meta.title}`
const subTitle = this.$route.query.taskName || StandardComplianceNodes.initial.text
return `${this.$t('flowCenter')}${this.$route.meta.title}${subTitle}`
},
// 是否发起节点,发起节点展示业务基本信息、业务分派信息
isInitial () {
return this.currentNode === StandardComplianceNodes.initial.value
return this.currentNode && this.currentNode.indexOf(StandardComplianceNodes.initial.value) === 0
},
// 是否部所主管级领导下发节点
isDepartLeaderIssue () {
return this.currentNode === StandardComplianceNodes.departLeaderIssue.value
return this.currentNode && this.currentNode.indexOf(StandardComplianceNodes.departLeaderIssue.value) === 0
},
// 是否模块负责人分发
isModuleOwnerIssue () {
return this.currentNode === StandardComplianceNodes.moduleOwnerIssue.value
return this.currentNode && this.currentNode.indexOf(StandardComplianceNodes.moduleOwnerIssue.value) === 0
},
// 是否设计工程师评估节点
isDesignEngineerAssess () {
return this.currentNode === StandardComplianceNodes.designEngineerAssess.value
return this.currentNode && this.currentNode.indexOf(StandardComplianceNodes.designEngineerAssess.value) === 0
},
// 是否模块责任人评审节点
isModuleOwnerApprove () {
return this.currentNode === StandardComplianceNodes.moduleOwnerReview.value
return this.currentNode && this.currentNode.indexOf(StandardComplianceNodes.moduleOwnerReview.value) === 0
},
// 是否部所主管级领导审批
isDepartLeaderApprove () {
return this.currentNode === StandardComplianceNodes.departLeaderApprove.value
return this.currentNode && this.currentNode.indexOf(StandardComplianceNodes.departLeaderApprove.value) === 0
},
// 是否法规工程师审批
isRegulatoryEngineerApproval () {
return this.currentNode === StandardComplianceNodes.regulatoryEngineerApprove.value
return this.currentNode && this.currentNode.indexOf(StandardComplianceNodes.regulatoryEngineerApprove.value) === 0
},
// 是否设计工程师补充立项项目号
isDesignEngineerWriteProject () {
return this.currentNode === StandardComplianceNodes.designEngineerWriteProject.value
return this.currentNode && this.currentNode.indexOf(StandardComplianceNodes.designEngineerWriteProject.value) === 0
}
},
created () {
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId
} else {
this.currentNode = StandardComplianceNodes.initial.value
}
this.btnList = StandardComplianceNodes.propertyOfValue('btn', this.currentNode)
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value, () => {
this.getPersonInfoStructure(ProcessKey.REGULATORY_COMPLIANCE_ASSESSMENT.value, () => {
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || StandardComplianceNodes.initial.value
this.initProcessData()
} else {
this.currentNode = StandardComplianceNodes.initial.value
}
const key = StandardComplianceNodes.keyOfValueByLike(this.currentNode)
this.btnList = StandardComplianceNodes[key].btn || []
this.currentNodePrefix = StandardComplianceNodes[key].value
this.initPersonInfoData()
})
},
methods: {
initProcessData () {
this.loading = true
const params = {
taskId: this.$route.query.taskId,
processInstanceId: this.$route.query.processInstanceId,
draftId: this.$route.query.draftId
}
queryStandardCompliance(params).then(res => {
if (res.success) {
let { result = {} } = res
if (result.infoJsonStr) {
result = JSON.parse(result.infoJsonStr)
}
this.businessId = result.businessId
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {}, { taskId: this.$route.query.taskId })
this.selectedStandard = Object.assign({}, result.businessInfoDTO.processProjectStandard || {})
console.log(this.selectedStandard)
this.dispathDataSource = result.businessInfoDTO.processProjectStandardTermList || []
this.$nextTick(() => {
this.processInfoForm.setFieldsValue(this.processInfo)
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
})
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
/**
* 分解单来源变化
* @param source
*/
handleSourceChange (source) {
this.selectedSource = source
handleSourceChange (spiltInfoId) {
this.selectedSpiltInfoId = spiltInfoId
},
/**
* 选择的标准变化
@@ -279,21 +339,208 @@ export default {
*/
handleStandardChange (standard) {
this.selectedStandard = Object.assign({}, standard)
this.generateProcessName()
},
generateProcessName () {
// 处理自动生成流程名称
let processName
if (this.selectedStandard.id) {
processName = `${this.selectedStandard.standardNumber}-${this.selectedStandard.standardName}-法规合规评估`
}
this.processInfoForm.setFieldsValue({ processName })
},
/**
* 转办
*/
handleTurnTo () {
this.$refs.userSelectModal.open()
},
continueTransfer (userId) {
const params = {
taskId: this.$route.query.taskId,
userId
}
this.loading = true
processTransfer(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
/**
* 处理保存的数据,保存不需要进行表单校验
*/
dealSaveFormData () {
// 流程信息
const basicProcessInfoDTO = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
// 流程审批信息
const basicTaskInfoDTO = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
// 业务基本信息(发起节点的标准列表)
let processProjectStandard = {}
if (this.$refs.standardList) {
processProjectStandard = this.$refs.standardList.submit(false)
} else {
processProjectStandard = { ...this.selectedStandard }
}
// 条款列表
let processProjectStandardTermList = []
if (this.$refs.termList) {
processProjectStandardTermList = this.$refs.termList.submit(false)
}
// 校验是否至少填了一项
const checkValueArr = Object.values({ ...basicProcessInfoDTO, ...basicTaskInfoDTO, ...processProjectStandard })
if (checkValueArr.every(tt => !tt) && (!processProjectStandardTermList || processProjectStandardTermList.length === 0)) {
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return false
}
return {
basicProcessInfoDTO,
basicTaskInfoDTO,
businessId: this.businessId,
draftId: this.$route.query.draftId,
businessInfoDTO: {
processProjectStandard,
processProjectStandardTermList
}
}
},
/**
* 处理提交表单数据
*/
dealSubmitFormData () {
let basicProcessInfoDTO = {}, basicTaskInfoDTO = {}, flag = true
this.processInfoForm.validateFields((errors, values) => {
if (!errors) {
basicProcessInfoDTO = Object.assign(this.processInfo, values)
} else {
flag = false
}
})
this.approvalInfoForm.validateFields((errors, values) => {
if (!errors) {
basicTaskInfoDTO = Object.assign(this.approvalInfo, values)
} else {
flag = false
}
})
// 业务基本信息(发起节点的标准列表)
let processProjectStandard
if (this.$refs.standardList) {
processProjectStandard = this.$refs.standardList.submit(true, true)
} else {
processProjectStandard = { ...this.selectedStandard }
}
flag = !!processProjectStandard
// 条款列表
let processProjectStandardTermList
if (this.$refs.termList) {
const needRemind = this.$refs.standardList ? processProjectStandard && processProjectStandard.id : true
processProjectStandardTermList = this.$refs.termList.submit(true, needRemind)
}
flag = !!processProjectStandardTermList
if (!flag) {
this.switchValue = 'base'
return false
}
return {
basicProcessInfoDTO,
basicTaskInfoDTO,
businessId: this.businessId,
businessInfoDTO: {
processProjectStandard,
processProjectStandardTermList
}
}
},
/**
* 保存
*/
handleSave () {
const formData = this.dealSaveFormData()
if (!formData) {
return
}
formData.infoJsonStr = JSON.stringify(formData)
this.loading = true
saveStandardCompliance(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
/**
* 提交
*/
handleSubmit () {
const formData = this.dealSubmitFormData()
if (!formData) {
return
}
let submitFunc
if (this.currentNode.indexOf(StandardComplianceNodes.initial.value) === 0) {
submitFunc = initStandardCompliance
const saveFormData = this.dealSaveFormData()
if (saveFormData) {
formData.infoJsonStr = JSON.stringify(saveFormData)
}
} else {
submitFunc = submitStandardCompliance
}
this.loading = true
submitFunc(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
handleAgree () {
},
handleReject () {
},
toStandardDetail () {
const { source, standardId } = this.selectedStandard
let path
// 根据来源跳转不同的详情页
switch (source) {
// 国内
case StandardSource.DOMESTIC.value:
path = '/standardRegulationLibrary/DomesticStandardDetail'
break
// 海外
case StandardSource.OVERSEAS.value:
path = '/standardRegulationLibrary/OverseasStandardDetail'
break
// 企标
case StandardSource.ENTERPRISE.value:
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
break
default:
break
}
if (!path) {
return
}
const query = { standardId }
this.$openPageNewSheet({
path, query
})
}
}
}
@@ -13,25 +13,37 @@
:columns="columns"
:data-source="dataSource"
:scroll="{x: '100%'}"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
:pagination="ipagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange">
<!--选择模块负责人-->
<template v-slot:moduleOwner="{text,record,index}">
<user-selection :show-btn="false"
:value="record.contact"
:name-str="record.contact_dictText"
v-if="!record.uninvolved"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.moduleOwner')" />
:value="record.moduleOwner"
:name-str="record.moduleOwner_dictText"
v-if="!record.notInvolved"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.moduleOwner')"
@listChange="list => handleUserChange(list, index)" />
<div v-else>{{ global.emptyLine }}</div>
</template>
<!--条文内容-->
<template v-slot:clauseContent="{text}">
<div class="table-text" style="cursor: pointer" @click="showContent(text)" v-if="text">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</template>
<!--操作-->
<template v-slot:action="{text,record,index}">
<div class="action-span-cell">
<a @click="handleUninvolved(record, index)">{{
!record.uninvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
}}</a>
<a @click="handleUninvolved(record, index)">
{{
!record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
}}
</a>
</div>
</template>
</j-table>
@@ -41,6 +53,8 @@
<user-select-modal ref="userSelectModal" @listChange="handleBatchSelected" />
<!--不涉及原因-->
<uninvolved-modal ref="uninvolvedModal" @ok="handleUninvolvedOk" />
<!--条文内容-->
<split-clause-detail ref="clauseDetail" />
</div>
</template>
@@ -49,48 +63,83 @@ import UserSelection from '../../../../components/selection/UserSelection'
import JTable from '../../../../components/jero/JTable'
import UserSelectModal from '../../../../components/selection/UserSelectModal'
import UninvolvedModal from '../modules/UninvolvedModal'
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
export default {
name: 'DepartLeaderIssueTable',
components: { JTable, UserSelection, UserSelectModal, UninvolvedModal },
components: { SplitClauseDetail, JTable, UserSelection, UserSelectModal, UninvolvedModal },
props: {
// 回显的数据
displayDataSource: {
type: Array,
required: false,
default: () => {
return []
}
}
},
data () {
return {
columns: [
// 标准编号/条款号
{
dataIndex: 'workNumber',
dataIndex: 'termNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
width: 150
},
// 标准名称/条款名称
{
dataIndex: 'projectName',
dataIndex: 'termName',
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
width: 160
},
// 标准状态
{
title: this.$t('standardSelect.textState'),
dataIndex: 'standardState_dictText',
width: 150
},
// 条款内容
{
dataIndex: 'termText',
title: this.$t('workCenter.projectComplianceEvaluationProcess.terms'),
width: 250,
scopedSlots: { customRender: 'clauseContent' }
},
// 模块责任人
{
title: this.$t('workCenter.standardCompliance.moduleOwner'),
dataIndex: 'contact',
width: 150,
width: 250,
scopedSlots: { customRender: 'moduleOwner' }
},
// 操作
{
title: this.$t('operation'),
fixed: 'right',
width: 150,
scopedSlots: { customRender: 'action' }
}
],
dataSource: [{ id: 1 }],
selectedRowKeys: []
dataSource: [],
selectedRowKeys: [],
/* 分页参数 */
ipagination: {
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
}
}
},
watch: {
displayDataSource: {
handler (value) {
this.dataSource = []
if (value) {
this.dataSource = value
}
},
deep: true,
immediate: true
}
},
methods: {
@@ -109,9 +158,9 @@ export default {
const data = JSON.parse(JSON.stringify(this.dataSource))
this.dataSource = data.map(item => {
// 选中且没有填写不涉及理由
if (this.selectedRowKeys.includes(item.id) && !item.uninvolved) {
item.contact = list.map(tt => tt.id).join(',')
item.contact_dictText = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
if (this.selectedRowKeys.includes(item.id) && !item.notInvolved) {
item.moduleOwner = list.map(tt => tt.id).join(',')
item.moduleOwner_dictText = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
}
return item
})
@@ -125,11 +174,43 @@ export default {
this.$refs.uninvolvedModal.open(record, index)
},
handleUninvolvedOk (record, index) {
// 如果写了不涉及原因,就清除模块负责人信息
if (record.notInvolved) {
record.moduleOwner = null
record.moduleOwner_dictText = null
}
this.$set(this.dataSource, index, record)
},
onSelectChange (selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys
}
},
showContent (text) {
this.$refs.clauseDetail.open(text)
},
handleUserChange (list, index) {
this.dataSource[index].moduleOwner = list.map(item => item.id).join(',')
this.dataSource[index].moduleOwner_dictText = list.map(item => item.realname + '(' + item.username + ')').join(',')
},
/**
* 提交数据
* @param needValidator
* @param needRemind
*/
submit (needValidator, needRemind) {
if (!needValidator) {
return this.dataSource
}
if (this.dataSource.length === 0 || this.dataSource.some(tt => !tt.moduleOwner && !tt.notInvolved)) {
if (needRemind) {
this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.pleaseSelectModuleOwner'))
}
return false
}
return this.dataSource
},
handleTableChange (pagination) {
this.ipagination = pagination
},
}
}
</script>
@@ -144,4 +225,4 @@ export default {
/deep/ .user-input {
width: 100% !important;
}
</style>
</style>
@@ -6,9 +6,7 @@
<!--上一节点处理人-->
<div class="info-form-item">
<label class="info-form-item-label">{{ $t('workCenter.projectComplianceEvaluationProcess.preNodePeople') }}</label>
<div class="info-form-item-text">
</div>
<div class="info-form-item-text"></div>
</div>
<div>
@@ -29,15 +27,23 @@
<template v-slot:evaluationResult="text,record,index">
<j-dict-select-tag dict-code="assess_results"
style="width: 100%"
:value="record.evaluationResult"
:value="record.assessResults"
@change="value => handleEvaluationResultChange(value, record, index)" />
</template>
<!--条文内容-->
<template v-slot:clauseContent="{text}">
<div class="table-text" style="cursor: pointer" @click="showContent(text)" v-if="text">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</template>
<!--展开的部分-->
<template v-slot:expandedRowRender="record,index">
<a-form-model :model="record" :rules="record.evaluationResult === inconformity ? rules : null" :ref="`ruleForm${index}`">
<a-form-model :model="record" :rules="record.assessResults === inconformity ? rules : null" :ref="`ruleForm${index}`">
<!--不符合-->
<template v-if="record.evaluationResult === inconformity">
<template v-if="record.assessResults === inconformity">
<!--是否与车型强关联-->
<a-form-model-item :label="$t('workCenter.standardCompliance.stronglyRelatedVehicleType')"
:labelCol="{span: 4}"
@@ -48,13 +54,13 @@
type="radio" />
</a-form-model-item>
<!--不符合车型系列-->
<a-form-model-item :label="$t('workCenter.standardCompliance.doesNotFitModel')"
<a-form-model-item :label="$t('workCenter.standardCompliance.modelSeries')"
:labelCol="{span: 4}"
:wrapperCol="{span: 18}"
prop="doesNotFitModel"
v-if="record.stronglyRelatedVehicleType === yesValue">
prop="modelSeries"
v-if="record.modelSeries === yesValue">
<a-select :placeholder="$t('pleaseSelect') + $t('project')"
v-model="record.doesNotFitModel"
v-model="record.modelSeries"
mode="multiple"
show-search
:filter-option="filterOption">
@@ -62,7 +68,7 @@
</a-select>
</a-form-model-item>
</template>
<template v-if="record.evaluationResult === inconformity || record.evaluationResult === accordWith">
<template v-if="record.assessResults === inconformity || record.assessResults === accordWith">
<!--依据描述-->
<a-form-model-item :label="$t('projectLibrary.specialProjectLibrary.basisDescription')"
:labelCol="{span: 4}"
@@ -85,61 +91,72 @@
</a-table>
</div>
<a-button @click="handleCheck">校验</a-button>
<!--条文内容-->
<split-clause-detail ref="clauseDetail" />
</div>
</template>
<script>
import { EvaluationResultType, YesOrNoEnum } from '../../../../enums/commonEnums'
import { getCarTypeProjectList } from '../../../../api/projectLibraryApi'
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
export default {
name: 'DesignEngineerAssess',
components: { SplitClauseDetail },
props: {
// 回显的数据
displayDataSource: {
type: Array,
required: false,
default: () => {
return []
}
}
},
data () {
return {
columns: [
// 标准编号/条款号
{
dataIndex: 'workNumber',
dataIndex: 'termNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
width: 150,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 标准名称/条款名称
{
dataIndex: 'projectName',
dataIndex: 'termName',
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
width: 160,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 标准状态
{
title: this.$t('standardSelect.textState'),
dataIndex: 'standardState_dictText',
width: 150,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 条款内容
{
dataIndex: 'termText',
title: this.$t('workCenter.projectComplianceEvaluationProcess.terms'),
width: 250,
align: 'center',
scopedSlots: { customRender: 'clauseContent' }
},
// 实施日期
{
title: this.$t('dashboard.advancedSearch.materialDate'),
align: 'center',
width: 180,
dataIndex: 'implementation_date',
dataIndex: 'implementationDate',
scopedSlots: { customRender: 'text' }
},
// 评估结果
{
dataIndex: 'evaluationResults_dictText',
dataIndex: 'assessResults_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.evaluationResult'),
width: 120,
align: 'center',
scopedSlots: { customRender: 'evaluationResult' }
}
],
dataSource: [{ id: '1' }],
dataSource: [],
form: {},
rules: {
// 依据描述
@@ -155,15 +172,27 @@ export default {
trigger: 'change'
},
// 不符合车型系列
doesNotFitModel: {
modelSeries: {
required: true,
message: this.$t('pleaseSelect') + this.$t('workCenter.standardCompliance.doesNotFitModel'),
message: this.$t('pleaseSelect') + this.$t('workCenter.standardCompliance.modelSeries'),
trigger: 'change'
}
},
carTypeList: [] // 车型下拉数据
}
},
watch: {
displayDataSource: {
handler (value) {
this.dataSource = []
if (value) {
this.dataSource = value
}
},
deep: true,
immediate: true
}
},
computed: {
accordWith () {
return EvaluationResultType.accordWith.value
@@ -192,7 +221,7 @@ export default {
},
handleEvaluationResultChange (value, record, index) {
const data = JSON.parse(JSON.stringify(this.dataSource))
data[index].evaluationResult = value
data[index].assessResults = value
this.dataSource.splice(0, this.dataSource.length, ...data)
},
handleCheck () {
@@ -203,7 +232,10 @@ export default {
filterOption (input, option) {
const text = option.componentOptions.children[0].text || option.componentOptions.children[0].data.attrs.title
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
},
showContent (text) {
this.$refs.clauseDetail.open(text)
},
}
}
</script>
@@ -13,32 +13,46 @@
</a-button>
</div>
<div>
<j-table rowKey="id"
<j-table rowKey="rowKey"
:columns="columns"
:data-source="dataSource"
:scroll="{x: '100%'}"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
:pagination="ipagination"
:loading="loading"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange">
<!--选择责任单位联络人-->
<template v-slot:contact="{text,record,index}">
<user-selection :show-btn="false"
:value="record.contact"
:name-str="record.contact_dictText"
type="checkbox"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.responsibleUnitContactPerson')" />
<user-selection
:show-btn="false"
:value="record.responsibleUnitLeader"
:name-str="record.responsibleUnitLeader_dictText"
type="checkbox"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.responsibleUnitContactPerson')"
@listChange="list => handleContactChange(list, index)" />
</template>
<!--条文内容-->
<template v-slot:clauseContent="{text}">
<div class="table-text" style="cursor: pointer" @click="showContent(text)" v-if="text">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</template>
<!--操作-->
<template v-slot:action="{text,record,index}">
<div class="action-span-cell">
<a :disabled="index === 0 && dataSource.length === 1" @click="handleDelete(record.id)">{{ $t('delete') }}</a>
<a :disabled="index === 0 && dataSource.length === 1" @click="handleDelete(record.rowKey)">{{ $t('delete') }}</a>
</div>
</template>
</j-table>
</div>
<user-select-modal ref="userSelectModal" type="checkbox" @listChange="handleBatchSelected" />
<!--条文内容-->
<split-clause-detail ref="clauseDetail" />
</div>
</template>
@@ -46,10 +60,13 @@
import JTable from '../../../../components/jero/JTable'
import UserSelection from '../../../../components/selection/UserSelection'
import UserSelectModal from '../../../../components/selection/UserSelectModal'
import { getClauseByStandard } from '../../../../api/workCenter'
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
import { randomUUID } from '../../../../utils/util'
export default {
name: 'InitialAssignTable',
components: { UserSelection, JTable, UserSelectModal },
components: { SplitClauseDetail, UserSelection, JTable, UserSelectModal },
props: {
// 选中的标准
selectedStandard: {
@@ -60,29 +77,72 @@ export default {
}
},
// 分解单来源
selectedSource: {
selectedSpiltInfoId: {
type: String,
required: false,
default: false
},
// 回显的数据
displayDataSource: {
type: Array,
required: false,
default: () => {
return []
}
}
},
watch: {
// 选中标准变化,清除表格数据
// 选中标准变化
selectedStandard: {
handler () {
this.dataSource = []
// 如果没有选中分解单id,那么就直接将标准带入
if (this.selectedStandard.id && !this.selectedSpiltInfoId) {
this.dataSource = [{
...this.selectedStandard,
rowKey: randomUUID(),
standardId: this.selectedStandard.id,
termNumber: this.selectedStandard.standardNumber,
termName: this.selectedStandard.standardName
}]
} else if (!this.selectedStandard.id) {
this.dataSource = []
}
},
deep: true
},
// 选中的分解单来源变化
selectedSource (value) {
if (value && this.selectedStandard.id) {
// todo 获取条款号的数据
selectedSpiltInfoId (value) {
console.log('分解单change')
this.dataSource = []
if (value && value !== '0' && this.selectedStandard.id) {
this.initClauseList()
} else if (this.selectedStandard.id) {
// 不带入直接处理数据就好
this.dataSource = [{
...this.selectedStandard,
rowKey: randomUUID(),
standardId: this.selectedStandard.id,
termNumber: this.selectedStandard.standardNumber,
termName: this.selectedStandard.standardName
}]
}
},
displayDataSource: {
handler (value) {
if (value && value.length > 0) {
this.dataSource = value
} else {
this.dataSource = []
}
},
deep: true,
immediate: true
}
},
data () {
return {
loading: false,
columns: [
// 序号
{
@@ -96,32 +156,27 @@ export default {
},
// 标准编号/条款号
{
dataIndex: 'workNumber',
dataIndex: 'termNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
width: 150
},
// 标准名称/条款名称
{
dataIndex: 'projectName',
dataIndex: 'termName',
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
width: 160
},
// 条款内容
{
dataIndex: 'projectSource_dictText',
dataIndex: 'termText',
title: this.$t('workCenter.projectComplianceEvaluationProcess.terms'),
width: 150
},
// 标准状态
{
title: this.$t('standardSelect.textState'),
dataIndex: 'standardState_dictText',
width: 150
width: 150,
scopedSlots: { customRender: 'clauseContent' }
},
// 责任单位联络人
{
title: this.$t('workCenter.standardCompliance.responsibleUnitContactPerson'),
dataIndex: 'contact',
dataIndex: 'responsibleUnitLeader_dictText',
width: 150,
scopedSlots: { customRender: 'contact' }
},
@@ -134,7 +189,19 @@ export default {
}
],
dataSource: [],
selectedRowKeys: []
selectedRowKeys: [],
/* 分页参数 */
ipagination: {
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
}
}
},
methods: {
@@ -152,19 +219,19 @@ export default {
handleBatchSelected (list) {
const data = JSON.parse(JSON.stringify(this.dataSource))
this.dataSource = data.map(item => {
if (this.selectedRowKeys.includes(item.id)) {
item.contact = list.map(tt => tt.id).join(',')
item.contact_dictText = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
if (this.selectedRowKeys.includes(item.rowKey)) {
item.responsibleUnitLeader = list.map(tt => tt.id).join(',')
item.responsibleUnitLeader_dictText = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
}
return item
})
},
handleDelete (id) {
handleDelete (rowKey) {
this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
const index = this.dataSource.findIndex(tt => tt.id === id)
const index = this.dataSource.findIndex(tt => tt.rowKey === rowKey)
this.dataSource[index] = null
this.dataSource = this.dataSource.filter(tt => !!tt)
this.selectedRowKeys = []
@@ -172,16 +239,22 @@ export default {
})
},
batchDelete () {
// 至少选择一条数据
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
this.$message.warning(this.$t('workCenter.standardCompliance.pleaseSelectDeleteData'))
return
}
// 至少保留一条数据
if (this.selectedRowKeys.length === this.dataSource.length) {
this.$message.warning(this.$t('workCenter.standardCompliance.atLeastOneData'))
return
}
this.$confirm({
title: this.$t('confirmBatchDeletion'),
content: this.$t('deleteAData'),
onOk: () => {
const data = this.dataSource.map(item => {
if (this.selectedRowKeys.includes(item.id)) {
if (this.selectedRowKeys.includes(item.rowKey)) {
return null
}
return item
@@ -193,6 +266,55 @@ export default {
},
onSelectChange (selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys
},
/**
* 获取条款列表
*/
initClauseList () {
this.loading = true
const params = {
sarFileSplitInfoId: this.selectedSpiltInfoId,
standardId: this.selectedStandard.id
}
getClauseByStandard(params).then(res => {
if (res.success) {
const data = res.result || []
this.dataSource = data.map(item => {
return { ...item, rowKey: randomUUID() }
})
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
showContent (text) {
this.$refs.clauseDetail.open(text)
},
handleTableChange (pagination) {
this.ipagination = pagination
},
handleContactChange (list, recordIndex) {
this.dataSource[recordIndex].responsibleUnitLeader = list.map(item => item.id).join(',')
this.dataSource[recordIndex].responsibleUnitLeader_dictText = list.map(item => item.realname + '(' + item.username + ')').join(',')
},
/**
* 提交数据
* @param needValidator 是否需要校验
* @param needRemind 是否需要提醒
*/
submit (needValidator, needRemind) {
if (!needValidator) {
return this.dataSource
}
if (this.dataSource.length === 0 || this.dataSource.some(tt => !tt.responsibleUnitLeader)) {
if (needRemind) {
this.$message.warning(this.$t('workCenter.standardCompliance.pleaseSelectResponsibleUnitContactPerson'))
}
return false
}
return this.dataSource
}
}
}
@@ -208,4 +330,4 @@ export default {
/deep/ .user-input {
width: 100% !important;
}
</style>
</style>
@@ -14,26 +14,68 @@
</div>
<div>
<j-table :columns="columns" :data-source="dataSource" :pagination="false" :scroll="{x: '100%'}">
<!--跳转标准详情-->
<template v-slot:detail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<!--分解单来源-->
<template v-slot:salvageListSource="{text, record, index}">
<j-dict-select-tag style="width: 100%"
:value="record.salvageSource"
dict-code="process_manuscript"
@change="value => handleSourceChange(value, record, index)" />
<a-select :placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.salvageListSource')"
:value="record.decompositionOrderSource"
style="width: 100%"
@change="value => handleSourceChange(value, record, index)">
<a-select-option v-for="item in record.decompositionOrderSourceVOList"
:key="item.value"
:value="item.value"
:disabled="item.value !== '0' && !item.sarFileSplitInfoId">
{{ item.text }}
</a-select-option>
</a-select>
</template>
</j-table>
</div>
<standard-selection-modal ref="standardSelectModal" type="radio" @listChange="handleSelectedStandard" />
<select-standard-drawer ref="standardSelectModal" type="radio" @listChange="handleSelectedStandard" />
</div>
</template>
<script>
import StandardSelectionModal from '../../../../components/selection/StandardSelectionModal'
import JTable from '../../../../components/jero/JTable'
import SelectStandardDrawer from '../modules/SelectStandardDrawer'
import { StandardSource } from '../../../../enums/commonEnums'
export default {
name: 'InitialBasicServiceInfo',
components: { JTable, StandardSelectionModal },
components: { JTable, SelectStandardDrawer },
props: {
// 选中的标准
selectedStandard: {
type: Object,
required: false,
default: () => {
return {}
}
}
},
watch: {
selectedStandard: {
handler (val) {
if (val.id) {
this.dataSource = [{ ...val }]
} else {
this.dataSource = []
}
},
deep: true,
immediate: true
}
},
data () {
return {
columns: [
@@ -47,7 +89,8 @@ export default {
{
title: this.$t('standardName'),
dataIndex: 'standardName',
width: 150
width: 150,
scopedSlots: { customRender: 'detail' }
},
// 标准状态
{
@@ -86,19 +129,83 @@ export default {
},
methods: {
handleDelete () {
this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
this.dataSource = []
this.$emit('standard:change', this.dataSource[0])
}
})
},
handleAdd () {
this.$refs.standardSelectModal.open()
},
handleSelectedStandard (list) {
this.dataSource = list
this.$emit('standard:change', list[0])
this.dataSource = []
if (list.length > 0) {
const data = {
...list[0],
standardId: list[0].id,
decompositionOrderSource: '0'
}
this.$set(this.dataSource, 0, data)
}
this.$emit('standard:change', this.dataSource[0])
},
handleSourceChange (value, record, index) {
record.salvageSource = value
record.decompositionOrderSource = value
this.$set(this.dataSource, index, record)
this.$emit('source:change', value)
const splitInfoId = record.decompositionOrderSourceVOList.find(tt => tt.value === value).sarFileSplitInfoId
this.$emit('source:change', splitInfoId)
},
/**
* 返回数据
* @param needValidator 是否需要校验
* @param needRemind 是否需要提示
*/
submit (needValidator, needRemind) {
if (!needValidator) {
return this.dataSource[0] || {}
}
if (!this.dataSource || this.dataSource.length === 0) {
if (needRemind) {
this.$message.warning(this.$t('workCenter.standardCompliance.pleaseAddStandard'))
}
return false
}
return this.dataSource[0]
},
/**
* 跳转标准详情
* @param record
*/
toDetailPage ({ id, source }) {
let path
// 根据来源跳转不同的详情页
switch (source) {
// 国内
case StandardSource.DOMESTIC.value:
path = '/standardRegulationLibrary/DomesticStandardDetail'
break
// 海外
case StandardSource.OVERSEAS.value:
path = '/standardRegulationLibrary/OverseasStandardDetail'
break
// 企标
case StandardSource.ENTERPRISE.value:
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
break
default:
break
}
if (!path) {
return
}
const query = { id }
this.$openPageNewSheet({
path, query
})
}
}
}
@@ -107,4 +214,4 @@ export default {
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
</style>
@@ -13,25 +13,35 @@
:columns="columns"
:data-source="dataSource"
:scroll="{x: '100%'}"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
:pagination="ipagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange">
<!--选择责任单位联络人-->
<!--选择设计工程师-->
<template v-slot:moduleOwner="{text,record,index}">
<user-selection :show-btn="false"
:value="record.contact"
:name-str="record.contact_dictText"
v-if="!record.uninvolved"
:value="record.designEngineer"
:name-str="record.designEngineer_dictText"
v-if="!record.notInvolved"
type="checkbox"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')" />
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
@listChange="list => handleUserChange(list, index)" />
<div v-else>{{ global.emptyLine }}</div>
</template>
<!--条文内容-->
<template v-slot:clauseContent="{text}">
<div class="table-text" style="cursor: pointer" @click="showContent(text)" v-if="text">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</template>
<!--操作-->
<template v-slot:action="{text,record,index}">
<div class="action-span-cell">
<a @click="handleUninvolved(record, index)">{{
!record.uninvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
!record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
}}</a>
</div>
</template>
@@ -42,6 +52,8 @@
<user-select-modal ref="userSelectModal" type="checkbox" @listChange="handleBatchSelected" />
<!--不涉及原因-->
<uninvolved-modal ref="uninvolvedModal" @ok="handleUninvolvedOk" />
<!--条文内容-->
<split-clause-detail ref="clauseDetail" />
</div>
</template>
@@ -50,31 +62,43 @@ import UserSelection from '../../../../components/selection/UserSelection'
import UserSelectModal from '../../../../components/selection/UserSelectModal'
import UninvolvedModal from '../modules/UninvolvedModal'
import JTable from '../../../../components/jero/JTable'
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
export default {
name: 'ModuleOwnerIssueTable',
components: { JTable, UninvolvedModal, UserSelectModal, UserSelection },
components: { SplitClauseDetail, JTable, UninvolvedModal, UserSelectModal, UserSelection },
props: {
// 回显的数据
displayDataSource: {
type: Array,
required: false,
default: () => {
return []
}
}
},
data () {
return {
columns: [
// 标准编号/条款号
{
dataIndex: 'workNumber',
dataIndex: 'termNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumberClauseNumber'),
width: 150
},
// 标准名称/条款名称
{
dataIndex: 'projectName',
dataIndex: 'termName',
title: this.$t('workCenter.projectComplianceEvaluationProcess.standardNameClauseName'),
width: 160
},
// 标准状态
{
title: this.$t('standardSelect.textState'),
dataIndex: 'standardState_dictText',
width: 150
},
// 条款内容
{
dataIndex: 'termText',
title: this.$t('workCenter.projectComplianceEvaluationProcess.terms'),
width: 250,
scopedSlots: { customRender: 'clauseContent' }
},
// 设计工程师
{
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
@@ -85,13 +109,36 @@ export default {
// 操作
{
title: this.$t('operation'),
fixed: 'right',
width: 150,
scopedSlots: { customRender: 'action' }
}
],
dataSource: [{ id: 1 }],
selectedRowKeys: []
dataSource: [],
selectedRowKeys: [],
/* 分页参数 */
ipagination: {
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
}
}
},
watch: {
displayDataSource: {
handler (value) {
this.dataSource = []
if (value) {
this.dataSource = value
}
},
deep: true,
immediate: true
}
},
methods: {
@@ -110,9 +157,9 @@ export default {
const data = JSON.parse(JSON.stringify(this.dataSource))
this.dataSource = data.map(item => {
// 选中且没有填写不涉及理由
if (this.selectedRowKeys.includes(item.id) && !item.uninvolved) {
item.contact = list.map(tt => tt.id).join(',')
item.contact_dictText = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
if (this.selectedRowKeys.includes(item.id) && !item.notInvolved) {
item.designEngineer = list.map(tt => tt.id).join(',')
item.designEngineer_dictText = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
}
return item
})
@@ -130,6 +177,33 @@ export default {
},
onSelectChange (selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys
},
showContent (text) {
this.$refs.clauseDetail.open(text)
},
handleUserChange (list, index) {
this.dataSource[index].designEngineer = list.map(item => item.id).join(',')
this.dataSource[index].designEngineer_dictText = list.map(item => item.realname + '(' + item.username + ')').join(',')
},
/**
* 提交数据
* @param needValidator
* @param needRemind
*/
submit (needValidator, needRemind) {
if (!needValidator) {
return this.dataSource
}
if (this.dataSource.length === 0 || this.dataSource.some(tt => !tt.designEngineer && !tt.notInvolved)) {
if (needRemind) {
this.$message.warning(this.$t('workCenter.standardCompliance.pleaseSelectDesignEngineer'))
}
return false
}
return this.dataSource
},
handleTableChange (pagination) {
this.ipagination = pagination
}
}
}
@@ -145,4 +219,4 @@ export default {
/deep/ .user-input {
width: 100% !important
}
</style>
</style>
@@ -0,0 +1,333 @@
<template>
<a-drawer
:title="$t('standardSelect.standardSelection')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
class="custom-drawer-style">
<div class="custom-drawer-style-scroll">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :sm="8">
<a-form-item :label="$t('standardSelect.source')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag style="width: 100%" v-model="queryParam.source"
:disabled="disabledSourceSearch"
:placeholder="$t('pleaseSelect')+$t('standardSelect.source')"
:triggerChange="false"
:options="sourceOptions"
@change="handleTypeChange" />
</a-form-item>
</a-col>
<a-col :sm="8">
<a-form-item :label="$t('standardSelect.standardNumOrName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('standardSelect.standardNumOrName')"
v-model="queryParam.standardNumberOrName"></a-input>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;margin-right: 41px;margin-bottom: 20px"
class="table-page-search-submitButtons">
<a-button style="margin-left: 8px" type="primary" icon="search" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button style="margin-left: 8px" type="primary" ghost icon="reload" @click="searchReset">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<a-table
:columns="columns"
rowKey="standardNumber"
:scroll="{x: 900}"
:data-source="dataList"
:pagination="ipagination"
:row-selection="{ type: type, selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:loading="loading"
@change="handleTableChange">
<template slot="text" slot-scope="text">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 企标编号/企标名称 -->
<template v-slot:toDetail="text, record">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 标准状态 -->
<template slot="standardState" slot-scope="text, record">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{
record.source === '3' ? (record.esStandardState_dictText || global.emptyLine) : (record.standardState_dictText || global.emptyLine)
}}
</template>
<div class="table-text">{{
record.source === '3' ? (record.esStandardState_dictText || global.emptyLine) : (record.standardState_dictText || global.emptyLine)
}}
</div>
</a-tooltip>
</template>
</a-table>
</div>
<div class="custom-drawer-style-bottom-btn">
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
</div>
</a-drawer>
</template>
<script>
import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
import { StandardSource } from '../../../../enums/commonEnums'
import { ajaxGetDictItems } from '../../../../api/api'
import { getStandardListCarryDecompositionSingleSource } from '../../../../api/workCenter'
export default {
name: 'SelectStandardDrawer',
components: { JDictSelectTag },
props: {
source: {
type: [String, Number],
default: '1'
},
// 查询条件可以选择的类型
canSelectedSource: {
type: [String, Array],
required: false,
default: () => {
return [StandardSource.DOMESTIC.value, StandardSource.OVERSEAS.value, StandardSource.ENTERPRISE.value]
}
},
value: {
type: String,
default: ''
},
// 搜索条件中的来源是否不可更改
disabledSourceSearch: {
type: Boolean,
default: false
},
type: {
type: String,
required: false,
default: 'checkbox'
},
// 列表数据不包含的标准
excludeStandardNumbers: {
type: String,
required: false,
default: null
},
// 过滤条件
filters: {
type: Object,
required: false,
default: () => {
return {}
}
}
},
data () {
return {
visible: false,
confirmLoading: false,
labelCol: {
sm: 8
},
wrapperCol: {
sm: 14
},
selectedRowKeys: [],
selectedRowList: [],
loading: false,
queryParam: {},
/* 分页参数 */
ipagination: {
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
},
columns: [
{
title: this.$t('standardNumber'),
dataIndex: 'standardNumber',
ellipsis: true,
align: 'center',
width: 150,
scopedSlots: { customRender: 'toDetail' }
},
{
title: this.$t('standardName'),
dataIndex: 'standardName',
ellipsis: true,
align: 'center',
width: 150,
scopedSlots: { customRender: 'toDetail' }
},
// 发布日期
{
title: this.$t('standardSelect.releaseDate'),
dataIndex: 'releaseDate',
align: 'center',
width: 120,
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('standardSelect.textState'),
dataIndex: 'standardState_dictText',
align: 'center',
width: 150,
scopedSlots: { customRender: 'standardState' }
}
],
dataList: [],
sourceOptions: []
}
},
methods: {
open () {
this.visible = true
this.queryParam = {}
this.initDict()
this.$nextTick(() => {
this.source ? this.queryParam.source = this.source : this.queryParam = {}
this.replacePage()
})
},
initDict () {
ajaxGetDictItems('standard_source').then(res => {
if (res.success) {
const canSelectedArr = typeof this.canSelectedSource === 'string' ? this.canSelectedSource.split(',') : this.canSelectedSource
this.sourceOptions = res.result.filter(tt => canSelectedArr.includes(tt.value))
}
})
},
// 获取表格数据
replacePage (arg) {
if (arg === 1) {
this.ipagination.current = 1
}
const query = {
...this.queryParam,
...this.filters,
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize,
excludeStandardNumbers: this.excludeStandardNumbers
}
// 清空在可选范围内进行查询
if (!query.source && this.canSelectedSource.length < 3) {
query.source = this.canSelectedSource.join(',')
}
// this.selectedRowKeys = []
this.loading = true
getStandardListCarryDecompositionSingleSource(query).then((res) => {
if (res.success) {
this.dataList = res.result.records
this.ipagination.total = res.result.total
this.selectedRowKeys = this.value ? this.value.split(',') : []
} else {
this.dataList = []
}
}).finally(() => {
this.loading = false
})
},
searchQuery () {
this.replacePage(1)
},
searchReset () {
// 如果禁用来源,就不重置来源
if (this.disabledSourceSearch) {
this.queryParam = { source: this.source }
} else {
this.queryParam = {}
}
this.replacePage(1)
},
// 表格选择改变
onSelectChange (value, row) {
this.selectedRowKeys = value
this.selectedRowList = row
},
handleTableChange (pagination) {
// 分页、排序、筛选变化时触发
this.ipagination = pagination
this.replacePage()
},
handleCancel () {
this.close()
},
handleSubmit () {
const serialNumber = []
const serialNameArr = []
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.selectedRowList.forEach(res => {
serialNumber.push(res.standardNumber)
serialNameArr.push(res.standardName)
})
this.$emit('change', serialNumber.join(','))
this.$emit('nameChange', serialNameArr.join(','))
this.$emit('listChange', this.selectedRowList)
this.close()
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
close () {
this.visible = false
this.ipagination = {
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
}
},
handleTypeChange () {
this.$forceUpdate()
},
// 点击跳转标准详情
handleGoDetail (record) {
let path = ''
// 需要先判断是哪种标准
if (record.source === '1') {
path = '/standardRegulationLibrary/DomesticStandardDetail'
} else if (record.source === '2') {
path = '/standardRegulationLibrary/OverseasStandardDetail'
} else if (record.source === '3') {
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
}
this.$openPageNewSheet({
path: path,
query: {
id: record.id
}
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -17,7 +17,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')"
type="textarea"
:maxLength="500"
v-decorator="['uninvolved', validatorRules.uninvolved]" />
v-decorator="['notInvolved', validatorRules.notInvolved]" />
</a-form-item>
</a-form>
@@ -49,7 +49,7 @@ export default {
},
validatorRules: {
// 不涉及原因
uninvolved: {
notInvolved: {
rules: [{
required: true,
message: this.$t('pleaseEnter') + this.$t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
@@ -63,6 +63,7 @@ export default {
},
methods: {
open (record, index) {
this.validatorRules.notInvolved.rules[0].required = true
this.visible = true
this.model = Object.assign({}, record)
this.dataIndex = index
@@ -71,9 +72,9 @@ export default {
})
},
handleOk (flag) {
this.validatorRules.uninvolved.rules[0].required = flag
this.validatorRules.notInvolved.rules[0].required = flag
if (!flag) {
this.form.setFieldsValue({ uninvolved: null })
this.form.setFieldsValue({ notInvolved: null })
}
this.form.validateFields((errors, values) => {
if (!errors) {
@@ -97,4 +98,4 @@ export default {
<style scoped lang="less">
</style>
</style>