add 未符合项跟踪流程页面

This commit is contained in:
赵霄
2023-11-24 15:24:14 +08:00
parent ad71a930e8
commit 66f693babf
5 changed files with 561 additions and 12 deletions
+5
View File
@@ -378,5 +378,10 @@ module.exports = {
preNodePeople: '上一节点处理人',
evaluationFeedback:'评估反馈',
ccPerson: '抄送人员'
},
// 未符合项跟踪流程
noMatchTracking: {
queryByCondition: '按条件查询',
problemTypes: '问题类型'
}
}
+8
View File
@@ -368,6 +368,14 @@ export const EsAnnulNodes = new EsEnums({
standardizationApproval: { text: '标准化审批', value: 'sid-9C90582D-F71F-4516-B54F-1E9F896C30D8' }
})
// 未符合项跟踪流程
export const NoMatchTrackingNodes = new EsEnums({
initial: { text: '法规工程师发起整改', value: '1', btn: ['save', 'submit'] },
designEngineer: { text: '设计工程师上传整改材料', value: '2', btn: ['return', 'save', 'submit'] },
directorLevelLeader: { text: '主管级领导审批', value: '3', btn: ['return', 'save', 'agree', 'reject'] },
regulatoryEngineer: { text: '法规工程师审批', value: '4', btn: ['return', 'save', 'agree', 'reject'] }
})
// 企标封存流程
export const EsSealSaveNodes = new EsEnums({
initiatorStart: { text: '发起人发起', value: 'sid-5F5FC475-64DE-4F98-A52D-5F6837C39B63' },
@@ -55,6 +55,61 @@
</a-form-item>
</a-form>
<!--业务基本信息-->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<a-form :form="businessInfoForm" v-if="showSelectStandardForm">
<div class="form-flex-box">
<!--标准编号/标准名称-->
<div class="form-flex-item custom-flex-form-item">
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')">
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="50"
v-decorator="['standardNumberName', validatorRules.standardNumberName]" />
</a-form-item>
</div>
<!--项目名称-->
<div class="form-flex-item custom-flex-form-item">
<a-form-item :label="$t('projectLibrary.projectName')">
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="50"
v-decorator="['projectName']" />
</a-form-item>
</div>
<!--设计工程师-->
<div class="form-flex-item custom-flex-form-item">
<a-form-item :label="$t('workCenter.standardConsultationProcess.designEngineer')">
<user-selection v-decorator="['designEngineer', validatorRules.designEngineer]"
type="checkbox"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')" />
</a-form-item>
</div>
<!--按条件查询-->
<a-button type="primary" class="form-search-btn" @click="selectStandard">{{ $t('workCenter.noMatchTracking.queryByCondition') }}</a-button>
</div>
</a-form>
<component v-if="tableComponent"
:is="tableComponent"
:columns="columns"
:data-source="dataSource"
:pagination="false"
:scroll="{x: '100%'}"
:extra-form="extraForm"
:all-disabled="expandTableDisabled">
<!--跳转标准详情-->
<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>
</component>
<!--流程审批信息-->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
<a-form :form="approvalInfoForm">
@@ -105,6 +160,9 @@
{{ $t('reject') }}
</a-button>
</div>
<!--按条件查询选择标准弹框-->
<no-match-item-select-drawer ref="selectStandardDrawer" @listChange="handleStandardSelected" />
</internal-detail-page>
</template>
@@ -113,17 +171,14 @@ import PersonnelInfo from '../../../components/PersonnelInfo'
import InternalDetailPage from '../../../components/InternalDetailPage'
import ProcessDetailList from '../../../components/ProcessDetailList'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import { ProcessKey } from '../../../enums/commonEnums'
import { ProcessKey, NoMatchTrackingNodes } from '../../../enums/commonEnums'
import UserSelection from '../../../components/selection/UserSelection'
import NoMatchItemSelectDrawer from './modules/NoMatchItemSelectDrawer'
export default {
name: 'NoMatchTrackingProcess',
components: { ProcessDetailList, InternalDetailPage, PersonnelInfo },
components: { ProcessDetailList, InternalDetailPage, PersonnelInfo, UserSelection, NoMatchItemSelectDrawer },
mixins: [WorkCenterMixin],
computed: {
pageTitle () {
return `${this.$t('flowCenter')}${this.$route.meta.title}`
}
},
data () {
return {
loading: false,
@@ -135,6 +190,10 @@ export default {
// 审批信息的表单
approvalInfoForm: this.$form.createForm(this),
approvalInfo: {},
// 业务基本信息表单(发起时候的查询条件)
businessInfoForm: this.$form.createForm(this),
businessInfo: {},
currentNode: '2',
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
@@ -156,12 +215,210 @@ export default {
handleText: {
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }],
validateTrigger: 'blur'
},
// 标准编号/标准名称
standardNumberName: {
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('projectLibrary.vehicleItemLibrary.standardNumberStandardName') }],
validateTrigger: 'blur'
},
// 设计工程师
designEngineer: {
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.standardConsultationProcess.designEngineer') }],
validateTrigger: 'change'
}
},
columns: [
// 标准编号
{
dataIndex: 'standardNumber',
title: this.$t('standardNumber'),
width: 150,
align: 'center',
scopedSlots: { customRender: 'detail' }
},
// 标准名称
{
dataIndex: 'standardName',
title: this.$t('standardName'),
width: 150,
scopedSlots: { customRender: 'detail' }
},
// 问题类型
{
dataIndex: '1',
title: this.$t('workCenter.noMatchTracking.problemTypes'),
width: 150,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 条款号
{
dataIndex: 'termNumber',
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
width: 150,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 条款名称
{
title: this.$t('workCenter.enStandardRevision.clauseName'),
width: 150,
dataIndex: 'termName',
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 相关项目
{
title: this.$t('projectLibrary.noncoincidenceItem.relevantProject'),
width: 150,
dataIndex: '2',
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 责任部门
{
dataIndex: 'departmentId_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
width: 120,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 设计工程师
{
dataIndex: 'engineerName',
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
width: 120,
align: 'center',
scopedSlots: { customRender: 'text' }
},
// 预计整改完成日期
{
dataIndex: 'expectedTime',
title: this.$t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification'),
width: 180,
align: 'center',
scopedSlots: { customRender: 'text' }
}
],
dataSource: [{ id: 1, standardNumber: '124' }],
// 展开表格的规则
extraForm: {
rules: {
// 依据描述
basisDescription: {
required: true,
message: this.$t('pleaseEnter') + this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
trigger: 'blur'
},
// 佐证材料
basisFile: {
required: false,
message: this.$t('pleaseUpload') + this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
trigger: 'change'
}
},
formArr: [
{
fieldShowType: 1,
dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
dbFieldName: 'basisDescription'
},
{
fieldShowType: 2,
dbFieldTxt: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
dbFieldName: 'basisFile',
fileType: 'pdf,doc,docx,pptx,ppt,jpg,jpeg,png,xls,xlsx,bmp'
}
]
}
}
},
computed: {
pageTitle () {
return `${this.$t('flowCenter')}${this.$route.meta.title}`
},
// 是否展示选择标准的表单
showSelectStandardForm () {
return this.currentNode === NoMatchTrackingNodes.initial.value
},
// 表格用哪个组件
tableComponent () {
if (this.showSelectStandardForm) {
return resolve => require(['../../../components/jero/JTable.vue'], resolve)
}
return resolve => require(['../../../components/JExpandTable.vue'], resolve)
},
// 展开表格是否禁用,设计工程师上传整改材料节点不禁用
expandTableDisabled () {
return this.currentNode !== NoMatchTrackingNodes.designEngineer.value
}
},
created () {
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value)
// if (this.$route.query.processInstanceId || this.$route.query.draftId) {
// this.currentNode = this.$route.query.nodeId
// this.initProcessInfo()
// } else {
// this.currentNode = NoMatchTrackingNodes.initial.value
// }
// 如果节点不是固定节点,就默认显示审批节点的信息
this.btnList = NoMatchTrackingNodes.propertyOfValue('btn', this.currentNode) || NoMatchTrackingNodes.regulatoryEngineer.btn
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value, () => {
this.initPersonInfoData(this.current)
})
},
methods: {
/**
* 获取流程信息
*/
initProcessInfo () {
},
/**
* 选择标准
*/
selectStandard () {
this.businessInfoForm.validateFields((errors, values) => {
if (!errors) {
this.$refs.selectStandardDrawer.open(values)
}
})
},
handleStandardSelected (list) {
this.dataSource = list
},
/**
* 跳转标准详情
* @param record
*/
toDetailPage ({ standardId, splitStandardSource }) {
let path
// 根据来源跳转不同的详情页
switch (splitStandardSource) {
// 国内
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
})
}
}
}
</script>
@@ -169,4 +426,19 @@ export default {
<style scoped lang="less">
@import '~@assets/less/common.less';
.box-title-text .title-text {
width: 9rem;
}
.form-flex-item {
width: calc((100% - 105px) / 3);
}
.form-flex-item:first-child {
padding-left: 0;
}
/deep/ .custom-flex-form-item .ant-form-item .ant-form-item-label {
width: 8.5rem;
}
</style>
@@ -0,0 +1,264 @@
<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>
</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, getStandardList } from '../../../../api/api'
export default {
name: 'NoMatchItemSelectDrawer',
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
}
},
data () {
return {
visible: false,
confirmLoading: false,
labelCol: {
sm: 8
},
wrapperCol: {
sm: 14
},
selectedRowKeys: [],
selectedRowList: [],
loading: false,
queryParam: {},
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
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
},
{
title: this.$t('standardName'),
dataIndex: 'standardName',
ellipsis: true,
align: 'center',
width: 150
},
// 发布日期
{
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
}
],
dataList: [],
sourceOptions: [],
filters: {}
}
},
methods: {
open (filters) {
this.visible = true
this.filters = Object.assign({}, filters)
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 () {
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
getStandardList(query).then((res) => {
if (res.success) {
this.dataList = res.result.records
this.ipagination.total = res.result.total
this.selectedRowKeys = this.value.split(',')
} else {
this.dataList = []
}
}).finally(() => {
this.loading = false
})
},
searchQuery () {
this.replacePage()
},
searchReset () {
// 如果禁用来源,就不重置来源
if (this.disabledSourceSearch) {
this.queryParam = { source: this.source }
} else {
this.queryParam = {}
}
this.replacePage()
},
// 表格选择改变
onSelectChange (value, row) {
this.selectedRowKeys = value
this.selectedRowList = row
},
handleTableChange (pagination) {
// 分页、排序、筛选变化时触发
this.ipagination = pagination
this.replacePage()
},
handleCancel () {
this.visible = false
},
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.visible = false
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
handleTypeChange () {
this.$forceUpdate()
}
}
}
</script>
<style scoped lang="less">
</style>
@@ -547,7 +547,7 @@ export default {
},
// 节点显示的按钮
btnList () {
let btnList = ProjectComplianceEvaluationProcessNode.propertyOfValue('btn', this.currentNode)
let btnList = ProjectComplianceEvaluationProcessNode.propertyOfValue('btn', this.currentNode) || ProjectComplianceEvaluationProcessNode.moduleOwnerApproval.btn
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
switch (this.currentStep) {
case 0:
@@ -677,9 +677,9 @@ export default {
}
])
}
// 设计工程师评估、模块负责人审批、各部门主管级领导审批、法规工程师归档
// 设计工程师评估、模块负责人审批、各部门主管级领导审批、法规工程师归档,及用户新增的审批节点都显示审批节点的表头
const showNode = [ProjectComplianceEvaluationProcessNode.designEngineerEvaluation.value, ProjectComplianceEvaluationProcessNode.moduleOwnerApproval.value, ProjectComplianceEvaluationProcessNode.departLeaderApproval.value, ProjectComplianceEvaluationProcessNode.regulatoryEngineerFiling.value]
if (showNode.includes(this.currentNode)) {
if (showNode.includes(this.currentNode) || !ProjectComplianceEvaluationProcessNode.keyOfValue(this.currentNode)) {
return this.basicColumns.concat([
// 上一节点处理人
{
@@ -709,7 +709,7 @@ export default {
showExpandTable () {
// 设计工程师评估及之后节点都是
const showNode = [ProjectComplianceEvaluationProcessNode.designEngineerEvaluation.value, ProjectComplianceEvaluationProcessNode.moduleOwnerApproval.value, ProjectComplianceEvaluationProcessNode.departLeaderApproval.value, ProjectComplianceEvaluationProcessNode.regulatoryEngineerFiling.value]
return showNode.includes(this.currentNode)
return showNode.includes(this.currentNode) || !ProjectComplianceEvaluationProcessNode.keyOfValue(this.currentNode)
},
// 展开表格的禁用
expandTableDisabled () {