update 未符合项跟踪流程

This commit is contained in:
赵霄
2023-12-25 15:07:41 +08:00
parent ff5d1c0a62
commit 0b57d156e4
9 changed files with 417 additions and 173 deletions
+1
View File
@@ -28,6 +28,7 @@
"js-base64": "^3.6.0", "js-base64": "^3.6.0",
"js-cookie": "^2.2.0", "js-cookie": "^2.2.0",
"jsencrypt": "^3.0.0-rc.1", "jsencrypt": "^3.0.0-rc.1",
"lodash": "^4.17.21",
"lodash.get": "^4.4.2", "lodash.get": "^4.4.2",
"lodash.pick": "^4.4.0", "lodash.pick": "^4.4.0",
"md5": "^2.2.1", "md5": "^2.2.1",
+1 -1
View File
@@ -15,4 +15,4 @@ window._CONFIG.onlyOfficeUrl = 'http://127.0.0.1:8080'
// onlyOffice下载文件地址(暂时没用) // onlyOffice下载文件地址(暂时没用)
window._CONFIG.onlyOfficeDownloadFileUrl = 'http://localhost:8184/sys/common/download' window._CONFIG.onlyOfficeDownloadFileUrl = 'http://localhost:8184/sys/common/download'
// 管理员角色code,英文逗号拼接 // 管理员角色code,英文逗号拼接
window._CONFIG.adminRoleCode = 'admin' window._CONFIG.adminRoleCode = 'admin,BZGLY'
+25 -1
View File
@@ -381,6 +381,22 @@ const agreeProjectComplianceEvaluation = (params) => postAction('/process/projec
// 驳回 // 驳回
const rejectProjectComplianceEvaluation = (params) => postAction('/process/projectAssess/reject', params) const rejectProjectComplianceEvaluation = (params) => postAction('/process/projectAssess/reject', params)
/* 未符合项跟踪流程 */
// 按条件查询未符合项
const queryNoMatchItemByCondition = (params) => getAction('/process/projectNotMet/pageForProcess', params)
// 查询流程信息
const queryNoMatchTrackingProcess = (params) => getAction('/process/projectNotMet/queryProcessInfoVO', params)
// 发起流程
const initialNoMatchTrackingProcess = (params) => postAction('/process/projectNotMet/startProcess', params)
// 提交
const submitNoMatchTrackingProcess = (params) => postAction('/process/projectNotMet/submit', params)
// 同意
const agreeNoMatchTrackingProcess = (params) => postAction('/process/projectNotMet/agree', params)
// 驳回
const rejectNoMatchTrackingProcess = (params) => postAction('/process/projectNotMet/reject', params)
// 保存
const saveNoMatchTrackingProcess = (params) => postAction('/process/projectNotMet/saveToDraft', params)
export { export {
getProcessNodeList, getProcessNodeList,
@@ -572,5 +588,13 @@ export {
saveProjectComplianceEvaluation, saveProjectComplianceEvaluation,
queryProjectComplianceEvaluation, queryProjectComplianceEvaluation,
agreeProjectComplianceEvaluation, agreeProjectComplianceEvaluation,
rejectProjectComplianceEvaluation rejectProjectComplianceEvaluation,
queryNoMatchItemByCondition,
queryNoMatchTrackingProcess,
initialNoMatchTrackingProcess,
submitNoMatchTrackingProcess,
agreeNoMatchTrackingProcess,
rejectNoMatchTrackingProcess,
saveNoMatchTrackingProcess
} }
+1 -3
View File
@@ -15,9 +15,7 @@
@download="handleDownload" @download="handleDownload"
v-bind="$attrs" v-bind="$attrs"
v-on="childListeners" v-on="childListeners"
:showUploadList="showUploadList ? { :showUploadList="showUploadList ? {showDownloadIcon: isDownload} : false"
showDownloadIcon: isDownload
} : false"
:class="{'uploadty-disabled':disabled}"> :class="{'uploadty-disabled':disabled}">
<template> <template>
<slot name="customButton"> <slot name="customButton">
+5 -5
View File
@@ -191,7 +191,7 @@ export const ProcessKey = {
// 项目合规评估流程 // 项目合规评估流程
PROJECT_COMPLIANCE_EVALUATION: { text: 'project-assessment', value: 'project-assessment' }, PROJECT_COMPLIANCE_EVALUATION: { text: 'project-assessment', value: 'project-assessment' },
// 未符合项跟踪流程 // 未符合项跟踪流程
NO_MATCH_TRACKING: { text: '', value: '' }, 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: 'fb-standard-compliance-assessment', value: 'fb-standard-compliance-assessment' },
// 法规采购流程 // 法规采购流程
@@ -500,10 +500,10 @@ export const EsAnnulNodes = new EsEnums({
// 未符合项跟踪流程 // 未符合项跟踪流程
export const NoMatchTrackingNodes = new EsEnums({ export const NoMatchTrackingNodes = new EsEnums({
initial: { text: '法规工程师发起整改', value: '1', btn: ['save', 'submit'] }, initial: { text: '法规工程师发起整改', value: 'fggcsfqzg', btn: ['save', 'submit'] },
designEngineer: { text: '设计工程师上传整改材料', value: '2', btn: ['return', 'save', 'submit'] }, designEngineer: { text: '设计工程师上传整改材料', value: 'sjgcssczgcl', btn: ['return', 'save', 'submit'] },
directorLevelLeader: { text: '主管级领导审批', value: '3', btn: ['return', 'save', 'agree', 'reject'] }, directorLevelLeader: { text: '主管级领导审批', value: 'zgjldsp', btn: ['return', 'save', 'agree', 'reject'] },
regulatoryEngineer: { text: '法规工程师审批', value: '4', btn: ['return', 'save', 'agree', 'reject'] } regulatoryEngineer: { text: '法规工程师审批', value: 'fggcssp', btn: ['return', 'save', 'agree', 'reject'] }
}) })
// 企标封存流程 // 企标封存流程
@@ -39,7 +39,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-decorator="['processDueDate']" v-decorator="['processDueDate']"
:disabled="disabled" :disabled="disabledProcessInfo"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -50,7 +50,7 @@
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:maxLength="500" :maxLength="500"
type="textarea" type="textarea"
:disabled="disabled" :disabled="disabledProcessInfo"
v-decorator="['processDescription']" /> v-decorator="['processDescription']" />
</a-form-item> </a-form-item>
</a-form> </a-form>
@@ -65,34 +65,41 @@
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')" <a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:maxLength="50" :maxLength="50"
v-decorator="['standardNumberName', validatorRules.standardNumberName]" /> v-decorator="['standardNumberOrName', validatorRules.standardNumberOrName]" />
</a-form-item> </a-form-item>
</div> </div>
<!--项目名称--> <!--项目名称-->
<div class="form-flex-item custom-flex-form-item"> <div class="form-flex-item custom-flex-form-item">
<a-form-item :label="$t('projectLibrary.projectName')"> <a-form-item :label="$t('projectLibrary.projectName')">
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')" <a-select :placeholder="$t('pleaseSelect') + $t('project')"
@change="event => event.target.value = event.target.value.trim()" v-decorator="['projectId']"
:maxLength="50" show-search
v-decorator="['projectName']" /> allowClear
:filter-option="filterOption">
<a-select-option v-for="item in projectSelectOptions" :key="item.id">{{ item.projectName }}</a-select-option>
</a-select>
</a-form-item> </a-form-item>
</div> </div>
<!--设计工程师--> <!--设计工程师-->
<div class="form-flex-item custom-flex-form-item"> <div class="form-flex-item custom-flex-form-item">
<a-form-item :label="$t('workCenter.standardConsultationProcess.designEngineer')"> <a-form-item :label="$t('workCenter.standardConsultationProcess.designEngineer')">
<user-selection v-decorator="['designEngineer', validatorRules.designEngineer]" <user-selection v-decorator="['engineerId', validatorRules.engineerId]"
type="checkbox" :name-str="businessInfo.engineerId_dictText"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')" /> :placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
@nameChange="handleDesignEngineerNameChange" />
</a-form-item> </a-form-item>
</div> </div>
<!--按条件查询--> <!--按条件查询-->
<a-button type="primary" class="form-search-btn" @click="selectStandard">{{ $t('workCenter.noMatchTracking.queryByCondition') }}</a-button> <a-button type="primary" class="form-search-btn" @click="selectStandard">
{{ $t('workCenter.noMatchTracking.queryByCondition') }}
</a-button>
</div> </div>
</a-form> </a-form>
<component v-if="tableComponent" <component ref="expandTable"
v-if="tableComponent"
:is="tableComponent" :is="tableComponent"
:columns="columns" :columns="columns"
:data-source="dataSource" :data-source="dataSource"
@@ -162,7 +169,9 @@
</div> </div>
<!--按条件查询选择标准弹框--> <!--按条件查询选择标准弹框-->
<no-match-item-select-drawer ref="selectStandardDrawer" @listChange="handleStandardSelected" /> <no-match-item-select-drawer ref="selectStandardDrawer" @ok="handleStandardSelected" />
<!--转办选人-->
<user-select-modal type="radio" ref="userSelectModal" @change="continueTransfer" />
</internal-detail-page> </internal-detail-page>
</template> </template>
@@ -174,16 +183,24 @@ import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import { ProcessKey, NoMatchTrackingNodes } from '../../../enums/commonEnums' import { ProcessKey, NoMatchTrackingNodes } from '../../../enums/commonEnums'
import UserSelection from '../../../components/selection/UserSelection' import UserSelection from '../../../components/selection/UserSelection'
import NoMatchItemSelectDrawer from './modules/NoMatchItemSelectDrawer' import NoMatchItemSelectDrawer from './modules/NoMatchItemSelectDrawer'
import { getCarTypeProjectList } from '../../../api/projectLibraryApi'
import {
saveNoMatchTrackingProcess,
queryNoMatchTrackingProcess,
initialNoMatchTrackingProcess,
submitNoMatchTrackingProcess, processTransfer, agreeNoMatchTrackingProcess, rejectNoMatchTrackingProcess
} from '../../../api/workCenter'
import { cloneDeep } from 'lodash'
import UserSelectModal from '../../../components/selection/UserSelectModal'
export default { export default {
name: 'NoMatchTrackingProcess', name: 'NoMatchTrackingProcess',
components: { ProcessDetailList, InternalDetailPage, PersonnelInfo, UserSelection, NoMatchItemSelectDrawer }, components: { UserSelectModal, ProcessDetailList, InternalDetailPage, PersonnelInfo, UserSelection, NoMatchItemSelectDrawer },
mixins: [WorkCenterMixin], mixins: [WorkCenterMixin],
data () { data () {
return { return {
loading: false, loading: false,
btnList: [], btnList: [],
disabled: false,
// 流程信息表单 // 流程信息表单
processInfoForm: this.$form.createForm(this), processInfoForm: this.$form.createForm(this),
processInfo: {}, processInfo: {},
@@ -193,7 +210,7 @@ export default {
// 业务基本信息表单(发起时候的查询条件) // 业务基本信息表单(发起时候的查询条件)
businessInfoForm: this.$form.createForm(this), businessInfoForm: this.$form.createForm(this),
businessInfo: {}, businessInfo: {},
currentNode: '2', currentNode: null,
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 4 } sm: { span: 4 }
@@ -217,12 +234,15 @@ export default {
validateTrigger: 'blur' validateTrigger: 'blur'
}, },
// 标准编号/标准名称 // 标准编号/标准名称
standardNumberName: { standardNumberOrName: {
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('projectLibrary.vehicleItemLibrary.standardNumberStandardName') }], rules: [{
required: true,
message: this.$t('pleaseEnter') + this.$t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')
}],
validateTrigger: 'blur' validateTrigger: 'blur'
}, },
// 设计工程师 // 设计工程师
designEngineer: { engineerId: {
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardConsultationProcess.designEngineer') }], rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardConsultationProcess.designEngineer') }],
validateTrigger: 'change' validateTrigger: 'change'
} }
@@ -243,17 +263,9 @@ export default {
width: 150, width: 150,
scopedSlots: { customRender: 'detail' } scopedSlots: { customRender: 'detail' }
}, },
// 问题类型
{
dataIndex: '1',
title: this.$t('workCenter.noMatchTracking.problemTypes'),
width: 150,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 条款号 // 条款号
{ {
dataIndex: 'termNumber', dataIndex: 'termNum',
title: this.$t('workCenter.enStandardRevision.clauseNumber'), title: this.$t('workCenter.enStandardRevision.clauseNumber'),
width: 150, width: 150,
align: 'center', align: 'center',
@@ -267,11 +279,19 @@ export default {
align: 'center', align: 'center',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
// 问题类型
{
dataIndex: 'assessResults_dictText',
title: this.$t('workCenter.noMatchTracking.problemTypes'),
width: 150,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 相关项目 // 相关项目
{ {
title: this.$t('projectLibrary.noncoincidenceItem.relevantProject'), title: this.$t('projectLibrary.noncoincidenceItem.relevantProject'),
width: 150, width: 150,
dataIndex: '2', dataIndex: 'projectName',
align: 'center', align: 'center',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
@@ -285,7 +305,7 @@ export default {
}, },
// 设计工程师 // 设计工程师
{ {
dataIndex: 'engineerName', dataIndex: 'engineerId_dictText',
title: this.$t('workCenter.standardConsultationProcess.designEngineer'), title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
width: 120, width: 120,
align: 'center', align: 'center',
@@ -300,18 +320,18 @@ export default {
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
} }
], ],
dataSource: [{ id: 1, standardNumber: '124' }], dataSource: [],
// 展开表格的规则 // 展开表格的规则
extraForm: { extraForm: {
rules: { rules: {
// 依据描述 // 依据描述
basisDescription: { description: {
required: true, required: true,
message: this.$t('pleaseEnter') + this.$t('projectLibrary.specialProjectLibrary.basisDescription'), message: this.$t('pleaseEnter') + this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
trigger: 'blur' trigger: 'blur'
}, },
// 佐证材料 // 佐证材料
basisFile: { fileId: {
required: false, required: false,
message: this.$t('pleaseUpload') + this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'), message: this.$t('pleaseUpload') + this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
trigger: 'change' trigger: 'change'
@@ -321,20 +341,22 @@ export default {
{ {
fieldShowType: 1, fieldShowType: 1,
dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.basisDescription'), dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
dbFieldName: 'basisDescription' dbFieldName: 'description'
}, },
{ {
fieldShowType: 2, fieldShowType: 2,
dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'), dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
dbFieldName: 'basisFile' dbFieldName: 'fileId'
} }
] ]
} },
projectSelectOptions: [] // 项目下拉数据
} }
}, },
computed: { computed: {
pageTitle () { pageTitle () {
return `${this.$t('flowCenter')}${this.$route.meta.title}` const subTitle = this.$route.query.taskName || NoMatchTrackingNodes.initial.text
return `${this.$t('flowCenter')}${this.$route.meta.title}${subTitle}`
}, },
// 是否展示选择标准的表单 // 是否展示选择标准的表单
showSelectStandardForm () { showSelectStandardForm () {
@@ -350,27 +372,78 @@ export default {
// 展开表格是否禁用,设计工程师上传整改材料节点不禁用 // 展开表格是否禁用,设计工程师上传整改材料节点不禁用
expandTableDisabled () { expandTableDisabled () {
return this.currentNode !== NoMatchTrackingNodes.designEngineer.value return this.currentNode !== NoMatchTrackingNodes.designEngineer.value
},
// 禁用流程信息部分表单
disabledProcessInfo () {
return this.currentNode !== NoMatchTrackingNodes.initial.value
} }
}, },
created () { created () {
// if (this.$route.query.processInstanceId || this.$route.query.draftId) { this.initDict()
// this.currentNode = this.$route.query.nodeId if (this.$route.query.processInstanceId || this.$route.query.draftId) {
// this.initProcessInfo() this.currentNode = this.$route.query.nodeId || NoMatchTrackingNodes.initial.value
// } else { this.initProcessInfo()
// this.currentNode = NoMatchTrackingNodes.initial.value } else {
// } this.currentNode = NoMatchTrackingNodes.initial.value
}
// 如果节点不是固定节点,就默认显示审批节点的信息 // 如果节点不是固定节点,就默认显示审批节点的信息
this.btnList = NoMatchTrackingNodes.propertyOfValue('btn', this.currentNode) || NoMatchTrackingNodes.regulatoryEngineer.btn this.btnList = NoMatchTrackingNodes.propertyOfValue('btn', this.currentNode) || NoMatchTrackingNodes.regulatoryEngineer.btn
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value, () => { this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value, () => {
this.initPersonInfoData(this.current) this.initPersonInfoData(this.currentNode === NoMatchTrackingNodes.initial.value)
}) })
}, },
methods: { methods: {
/**
* 获取下拉数据
*/
initDict () {
getCarTypeProjectList().then(res => {
if (res.success) {
this.projectSelectOptions = res.result
} else {
this.$message.warning(res.message)
}
})
},
/** /**
* 获取流程信息 * 获取流程信息
*/ */
initProcessInfo () { initProcessInfo () {
this.loading = true
const params = {
taskId: this.$route.query.taskId
}
if (this.$route.query.draftId) {
params.draftId = this.$route.query.draftId
} else {
params.processInstanceId = this.$route.query.processInstanceId
}
queryNoMatchTrackingProcess(params).then(res => {
if (res.success) {
const { result = {} } = res
// 草稿从json里取得
if (this.$route.query.draftId) {
const draftResult = JSON.parse(result.infoJsonStr)
this.processInfo = draftResult.processInfo
this.businessInfo = draftResult.businessInfo
this.dataSource = draftResult.dataSource || []
this.approvalInfo = draftResult.approvalInfo
} else {
this.processInfo = result.basicProcessInfoDTO || {}
this.dataSource = result.businessInfoDTO.processProjectNotMetLinks || []
this.approvalInfo = result.basicTaskInfoDTO || {}
}
this.$nextTick(() => {
this.processInfoForm.setFieldsValue(this.processInfo)
this.businessInfoForm.setFieldsValue(this.businessInfo)
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
})
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}, },
/** /**
* 选择标准 * 选择标准
@@ -378,7 +451,8 @@ export default {
selectStandard () { selectStandard () {
this.businessInfoForm.validateFields((errors, values) => { this.businessInfoForm.validateFields((errors, values) => {
if (!errors) { if (!errors) {
this.$refs.selectStandardDrawer.open(values) const selectedNoMatchItemKeys = this.dataSource.map(item => item.id)
this.$refs.selectStandardDrawer.open(values, selectedNoMatchItemKeys)
} }
}) })
}, },
@@ -417,6 +491,182 @@ export default {
this.$openPageNewSheet({ this.$openPageNewSheet({
path, query path, query
}) })
},
filterOption (input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
)
},
/**
* 转办
*/
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
})
},
/**
* 保存
*/
handleSave () {
const processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
const businessInfo = Object.assign(this.businessInfo, this.businessInfoForm.getFieldsValue())
const approvalInfo = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
const checkValueArr = Object.values({ ...processInfo, ...businessInfo, ...approvalInfo })
if (!checkValueArr.some(tt => !tt) && this.dataSource.length === 0) {
// 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
const formData = { processInfo, businessInfo, approvalInfo, dataSource: this.dataSource }
this.loading = true
saveNoMatchTrackingProcess({ infoJsonStr: JSON.stringify(formData) }).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
/**
* 处理表单数据
*/
dealFormData () {
let flag = true, basicProcessInfoDTO = {}, basicTaskInfoDTO = {}, userInfoMap = {}
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)
basicTaskInfoDTO.taskId = this.$route.query.taskId
} else {
flag = false
}
})
// 发起节点表格无数据需要提示
if (this.currentNode === NoMatchTrackingNodes.initial.value && this.dataSource.length === 0) {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
flag = false
}
// 展示展开表格,且不被禁用,需要校验表格的表单
if (!this.showSelectStandardForm && !this.expandTableDisabled && !this.$refs.expandTable.submit()) {
this.$message.warning(this.$t('workCenter.checkTableRequired'))
flag = false
}
const basicFlag = flag
// 用户信息
const userInfo = this.$refs.personnelInfo.getDataObjVerify()
if (!userInfo) {
flag = false
} else {
userInfoMap = userInfo
}
if (!flag && !basicFlag) {
this.switchValue = 'base'
} else if (!flag && !userInfo) {
this.switchValue = 'user'
}
const formData = {
basicProcessInfoDTO,
basicTaskInfoDTO,
businessInfoDTO: {
processProjectNotMetLinks: cloneDeep(this.dataSource)
},
userInfoMap
}
return !flag ? false : formData
},
/**
* 提交
*/
handleSubmit () {
const formData = this.dealFormData()
if (!formData) {
return
}
this.loading = true
const submitFunc = this.currentNode === NoMatchTrackingNodes.initial.value ? initialNoMatchTrackingProcess : submitNoMatchTrackingProcess
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 () {
this.validatorRules.handleText.rules[0].required = false
if (!this.approvalInfoForm.getFieldValue('handleText')) {
this.approvalInfoForm.setFieldsValue({ handleText: '同意' })
}
const formData = this.dealFormData()
if (!formData) {
return
}
this.loading = true
agreeNoMatchTrackingProcess(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
/**
* 驳回
*/
handleReject () {
this.validatorRules.handleText.rules[0].required = true
const formData = this.dealFormData()
if (!formData) {
return
}
this.loading = true
rejectNoMatchTrackingProcess(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
handleDesignEngineerNameChange (name) {
this.businessInfo.engineerId_dictText = name
} }
} }
} }
@@ -9,36 +9,9 @@
:visible="visible" :visible="visible"
class="custom-drawer-style"> class="custom-drawer-style">
<div class="custom-drawer-style-scroll"> <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 <a-table
:columns="columns" :columns="columns"
rowKey="standardNumber" rowKey="id"
:scroll="{x: 900}" :scroll="{x: 900}"
:data-source="dataList" :data-source="dataList"
:pagination="ipagination" :pagination="ipagination"
@@ -52,6 +25,15 @@
</a-tooltip> </a-tooltip>
</template> </template>
<!--跳转标准详情-->
<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>
</a-table> </a-table>
</div> </div>
@@ -65,43 +47,17 @@
<script> <script>
import JDictSelectTag from '../../../../components/dict/JDictSelectTag' import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
import { StandardSource } from '../../../../enums/commonEnums' import { StandardSource } from '../../../../enums/commonEnums'
import { ajaxGetDictItems, getStandardList } from '../../../../api/api' import { ajaxGetDictItems } from '../../../../api/api'
import { queryNoMatchItemByCondition } from '../../../../api/workCenter'
export default { export default {
name: 'NoMatchItemSelectDrawer', name: 'NoMatchItemSelectDrawer',
components: { JDictSelectTag }, components: { JDictSelectTag },
props: { 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: {
type: String, type: String,
required: false, required: false,
default: 'checkbox' default: 'checkbox'
},
// 列表数据不包含的标准
excludeStandardNumbers: {
type: String,
required: false,
default: null
} }
}, },
data () { data () {
@@ -131,79 +87,66 @@ export default {
total: 0 total: 0
}, },
columns: [ columns: [
// 标准编号
{ {
title: this.$t('standardNumber'),
dataIndex: 'standardNumber', dataIndex: 'standardNumber',
ellipsis: true, title: this.$t('standardNumber'),
width: 150,
align: 'center', align: 'center',
width: 150 scopedSlots: { customRender: 'detail' }
}, },
// 标准名称
{ {
title: this.$t('standardName'),
dataIndex: 'standardName', dataIndex: 'standardName',
ellipsis: true, title: this.$t('standardName'),
width: 150,
align: 'center', align: 'center',
width: 150 scopedSlots: { customRender: 'detail' }
}, },
// 发布日期 // 条款号
{ {
title: this.$t('standardSelect.releaseDate'), dataIndex: 'termNum',
dataIndex: 'releaseDate', title: this.$t('workCenter.enStandardRevision.clauseNumber'),
align: 'center', width: 150,
width: 120, align: 'center'
scopedSlots: { customRender: 'text' }
}, },
// 条款名称
{ {
title: this.$t('standardSelect.textState'), title: this.$t('workCenter.enStandardRevision.clauseName'),
dataIndex: 'standardState_dictText', width: 150,
align: 'center', align: 'center',
width: 150 dataIndex: 'termName'
} }
], ],
dataList: [], dataList: [],
sourceOptions: [],
filters: {} filters: {}
} }
}, },
methods: { methods: {
open (filters) { open (filters, selectedRowKeys) {
this.visible = true this.visible = true
console.log(selectedRowKeys)
this.selectedRowKeys = selectedRowKeys
this.filters = Object.assign({}, filters) this.filters = Object.assign({}, filters)
this.queryParam = {} this.queryParam = {}
this.initDict()
this.$nextTick(() => { this.$nextTick(() => {
this.source ? this.queryParam.source = this.source : this.queryParam = {} this.replacePage(1)
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 () { replacePage (arg) {
const query = { const query = {
...this.queryParam, ...this.queryParam,
...this.filters, ...this.filters,
pageNo: this.ipagination.current, pageNo: arg ? 1 : this.ipagination.current,
pageSize: this.ipagination.pageSize, pageSize: this.ipagination.pageSize,
excludeStandardNumbers: this.excludeStandardNumbers excludeStandardNumbers: this.excludeStandardNumbers
} }
// 清空在可选范围内进行查询
if (!query.source && this.canSelectedSource.length < 3) {
query.source = this.canSelectedSource.join(',')
}
// this.selectedRowKeys = []
this.loading = true this.loading = true
getStandardList(query).then((res) => { queryNoMatchItemByCondition(query).then((res) => {
if (res.success) { if (res.success) {
this.dataList = res.result.records this.dataList = res.result.records
this.ipagination.total = res.result.total this.ipagination.total = res.result.total
this.selectedRowKeys = this.value.split(',')
} else { } else {
this.dataList = [] this.dataList = []
} }
@@ -211,18 +154,6 @@ export default {
this.loading = false this.loading = false
}) })
}, },
searchQuery () {
this.replacePage()
},
searchReset () {
// 如果禁用来源,就不重置来源
if (this.disabledSourceSearch) {
this.queryParam = { source: this.source }
} else {
this.queryParam = {}
}
this.replacePage()
},
// 表格选择改变 // 表格选择改变
onSelectChange (value, row) { onSelectChange (value, row) {
this.selectedRowKeys = value this.selectedRowKeys = value
@@ -240,20 +171,44 @@ export default {
const serialNumber = [] const serialNumber = []
const serialNameArr = [] const serialNameArr = []
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.selectedRowList.forEach(res => { this.$emit('ok', this.selectedRowList)
serialNumber.push(res.standardNumber)
serialNameArr.push(res.standardName)
})
this.$emit('change', serialNumber.join(','))
this.$emit('nameChange', serialNameArr.join(','))
this.$emit('listChange', this.selectedRowList)
this.visible = false this.visible = false
} else { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
} }
}, },
handleTypeChange () { /**
this.$forceUpdate() * 跳转标准详情
* @param record
*/
toDetailPage ({ standardId, 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: standardId
}
this.$openPageNewSheet({
path, query
})
} }
} }
} }
@@ -125,6 +125,10 @@ export default {
case '3': case '3':
path = '/workCenter/ProjectComplianceEvaluationProcess' path = '/workCenter/ProjectComplianceEvaluationProcess'
break break
// 未符合项跟踪流程
case '4':
path = '/workCenter/NoMatchTrackingProcess'
break
// 法规采购流程 // 法规采购流程
case '6': case '6':
path = '/workCenter/StandardProcurementProcess' path = '/workCenter/StandardProcurementProcess'
@@ -76,7 +76,7 @@ import {
enStandardEditTurnTo, enStandardEditTurnTo,
enStandardRecheckTurnTo, enStandardRecheckTurnTo,
enStandardSealSaveTurnTo, enStandardStartUseTurnTo, enStandardSealSaveTurnTo, enStandardStartUseTurnTo,
enterprisePlanApprovalTurnTo, enterprisePlanApprovalTurnTo, processTransfer,
standardizationInitTurnTo, standardizationInitTurnTo,
transferConsultationProcess, transferInspectPlan, transferConsultationProcess, transferInspectPlan,
transferProcurementProcess, transferProcurementProcess,
@@ -101,7 +101,7 @@ import {
FGEntryChangeProcessNode, FGEntryChangeProcessNode,
ConsultationProcess, ConsultationProcess,
ProjectComplianceEvaluationProcessNode, ProjectComplianceEvaluationProcessNode,
ProcurementProcessNodes, StandardPromotion ProcurementProcessNodes, StandardPromotion, NoMatchTrackingNodes
} from '@/enums/commonEnums' } from '@/enums/commonEnums'
export default { export default {
@@ -174,7 +174,7 @@ export default {
// 项目合规评估流程 // 项目合规评估流程
[ProcessType.PROJECT_COMPLIANCE_EVALUATION.value]: [ProjectComplianceEvaluationProcessNode.initiate.value], [ProcessType.PROJECT_COMPLIANCE_EVALUATION.value]: [ProjectComplianceEvaluationProcessNode.initiate.value],
// 未符合项跟踪流程 // 未符合项跟踪流程
[ProcessType.NO_MATCH_TRACKING.value]: [], [ProcessType.NO_MATCH_TRACKING.value]: [NoMatchTrackingNodes.initial.value],
// 法规合规评估流程 // 法规合规评估流程
[ProcessType.REGULATORY_COMPLIANCE_ASSESSMENT.value]: [], [ProcessType.REGULATORY_COMPLIANCE_ASSESSMENT.value]: [],
// 法规采购流程 // 法规采购流程
@@ -262,6 +262,10 @@ export default {
case '3': case '3':
path = '/workCenter/ProjectComplianceEvaluationProcess' path = '/workCenter/ProjectComplianceEvaluationProcess'
break break
// 未符合项跟踪流程
case '4':
path = '/workCenter/NoMatchTrackingProcess'
break
// 法规采购流程 // 法规采购流程
case '6': case '6':
path = '/workCenter/StandardProcurementProcess' path = '/workCenter/StandardProcurementProcess'
@@ -368,6 +372,14 @@ export default {
case '2': case '2':
func = transferConsultationProcess func = transferConsultationProcess
break break
// 项目合规评估流程
case '3':
// 未符合项跟踪流程
case '4':
// 法规合规评估
case '5':
func = processTransfer
break
// 法规采购流程 // 法规采购流程
case '6': case '6':
func = transferProcurementProcess func = transferProcurementProcess