diff --git a/src/api/workCenter.js b/src/api/workCenter.js
index a6197ee6..d4f0381b 100644
--- a/src/api/workCenter.js
+++ b/src/api/workCenter.js
@@ -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
}
diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js
index 12d9c5df..f4c45307 100644
--- a/src/common/lang/workCenter/zh.js
+++ b/src/common/lang/workCenter/zh.js
@@ -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: '请选择设计工程师',
}
}
diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js
index 6680f69d..626c8fcc 100644
--- a/src/enums/commonEnums.js
+++ b/src/enums/commonEnums.js
@@ -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'] }
})
// 项目合规评估流程状态
diff --git a/src/views/workCenter/processCenter/table/DraftList.vue b/src/views/workCenter/processCenter/table/DraftList.vue
index 2dd4b58f..e7153650 100644
--- a/src/views/workCenter/processCenter/table/DraftList.vue
+++ b/src/views/workCenter/processCenter/table/DraftList.vue
@@ -130,6 +130,10 @@ export default {
case '4':
path = '/workCenter/NoMatchTrackingProcess'
break
+ // 法规合规评估流程
+ case '5':
+ path = '/workCenter/StandardComplianceProcess'
+ break
// 法规采购流程
case '6':
path = '/workCenter/StandardProcurementProcess'
diff --git a/src/views/workCenter/processCenter/table/TodoList.vue b/src/views/workCenter/processCenter/table/TodoList.vue
index e594f8ce..35ee3c80 100644
--- a/src/views/workCenter/processCenter/table/TodoList.vue
+++ b/src/views/workCenter/processCenter/table/TodoList.vue
@@ -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'
diff --git a/src/views/workCenter/standardComplianceProcess/StandardComplianceProcess.vue b/src/views/workCenter/standardComplianceProcess/StandardComplianceProcess.vue
index 5110e804..2d6b990a 100644
--- a/src/views/workCenter/standardComplianceProcess/StandardComplianceProcess.vue
+++ b/src/views/workCenter/standardComplianceProcess/StandardComplianceProcess.vue
@@ -39,7 +39,7 @@
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
v-decorator="['processDueDate']"
- :disabled="disabled"
+ :disabled="!isInitial"
style="width: 100%" />
@@ -50,14 +50,15 @@
@change="event => event.target.value = event.target.value.trim()"
:maxLength="500"
type="textarea"
- :disabled="disabled"
+ :disabled="!isInitial"
v-decorator="['processDescription']" />
-
-
+
{{ selectedStandard.standardNumber }} {{
+ selectedStandard.standardName
+ }}
@@ -66,19 +67,25 @@
-
+
-
+
-
+
-
+
-
+
@@ -112,9 +119,12 @@
@@ -142,6 +152,9 @@
{{ $t('reject') }}
+
+
+
@@ -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
+ })
}
}
}
diff --git a/src/views/workCenter/standardComplianceProcess/components/DepartLeaderIssueTable.vue b/src/views/workCenter/standardComplianceProcess/components/DepartLeaderIssueTable.vue
index e682b889..4d63696c 100644
--- a/src/views/workCenter/standardComplianceProcess/components/DepartLeaderIssueTable.vue
+++ b/src/views/workCenter/standardComplianceProcess/components/DepartLeaderIssueTable.vue
@@ -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">
+ :value="record.moduleOwner"
+ :name-str="record.moduleOwner_dictText"
+ v-if="!record.notInvolved"
+ :placeholder="$t('pleaseSelect') + $t('workCenter.standardCompliance.moduleOwner')"
+ @listChange="list => handleUserChange(list, index)" />
{{ global.emptyLine }}
+
+
+
+ {{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
+
+ {{ global.emptyLine }}
+
+
@@ -41,6 +53,8 @@
+
+
@@ -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
+ },
}
}
@@ -144,4 +225,4 @@ export default {
/deep/ .user-input {
width: 100% !important;
}
-
\ No newline at end of file
+
diff --git a/src/views/workCenter/standardComplianceProcess/components/DesignEngineerAssess.vue b/src/views/workCenter/standardComplianceProcess/components/DesignEngineerAssess.vue
index d9ac1407..faa95608 100644
--- a/src/views/workCenter/standardComplianceProcess/components/DesignEngineerAssess.vue
+++ b/src/views/workCenter/standardComplianceProcess/components/DesignEngineerAssess.vue
@@ -6,9 +6,7 @@
@@ -29,15 +27,23 @@
handleEvaluationResultChange(value, record, index)" />
+
+
+
+ {{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
+
+ {{ global.emptyLine }}
+
+
-
+
-
+
-
+ prop="modelSeries"
+ v-if="record.modelSeries === yesValue">
@@ -62,7 +68,7 @@
-
+
- 校验
+
+
diff --git a/src/views/workCenter/standardComplianceProcess/components/InitialAssignTable.vue b/src/views/workCenter/standardComplianceProcess/components/InitialAssignTable.vue
index 14e6308e..6af6d988 100644
--- a/src/views/workCenter/standardComplianceProcess/components/InitialAssignTable.vue
+++ b/src/views/workCenter/standardComplianceProcess/components/InitialAssignTable.vue
@@ -13,32 +13,46 @@
-
+ :pagination="ipagination"
+ :loading="loading"
+ :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+ @change="handleTableChange">
-
+ handleContactChange(list, index)" />
+
+
+
+
+
+ {{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
+
+ {{ global.emptyLine }}
+
+
@@ -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;
}
-
\ No newline at end of file
+
diff --git a/src/views/workCenter/standardComplianceProcess/components/InitialBasicServiceInfo.vue b/src/views/workCenter/standardComplianceProcess/components/InitialBasicServiceInfo.vue
index 365a796a..5afbdd19 100644
--- a/src/views/workCenter/standardComplianceProcess/components/InitialBasicServiceInfo.vue
+++ b/src/views/workCenter/standardComplianceProcess/components/InitialBasicServiceInfo.vue
@@ -14,26 +14,68 @@
+
+
+
+
+ {{ text || text === 0 ? text : global.emptyLine }}
+ {{ text }}
+ {{ global.emptyLine }}
+
+
+
+
- handleSourceChange(value, record, index)" />
+ handleSourceChange(value, record, index)">
+
+ {{ item.text }}
+
+
-
+
+
+
diff --git a/src/views/workCenter/standardComplianceProcess/modules/UninvolvedModal.vue b/src/views/workCenter/standardComplianceProcess/modules/UninvolvedModal.vue
index ee5e4dde..dcec722e 100644
--- a/src/views/workCenter/standardComplianceProcess/modules/UninvolvedModal.vue
+++ b/src/views/workCenter/standardComplianceProcess/modules/UninvolvedModal.vue
@@ -17,7 +17,7 @@
+ v-decorator="['notInvolved', validatorRules.notInvolved]" />
@@ -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 {
\ No newline at end of file
+