update 标准征求意见流程
This commit is contained in:
+31
-1
@@ -160,6 +160,26 @@ const agreeStandardECProcess = (params) => postAction('/process/fb/processFbEntr
|
||||
// 驳回
|
||||
const rejectStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/reject', params)
|
||||
|
||||
/*标准征求意见流程*/
|
||||
// 获取标准被拆分的列表
|
||||
const querySpitFileByStandardNumber = (params) => getAction('/laws/standard/common/getSplitsByStandardNumber', params)
|
||||
// 获取标准条款号
|
||||
const queryStandardClauseNumber = (params) => getAction('/laws/DocumentTool/documentSplit/queryTreeMenuByInfoId', params)
|
||||
// 保存
|
||||
const saveConsultationProcess = (params) => postAction('/process/fb/processFbStandardConsultation/saveToDraft', params)
|
||||
// 查询流程详情
|
||||
const queryConsultationProcessDetail = (params) => getAction('/process/fb/processFbStandardConsultation/queryProcessInfoVO', params)
|
||||
// 发起
|
||||
const initiateConsultationProcess = (params) => postAction('/process/fb/processFbStandardConsultation/startProcess', params)
|
||||
// 提交
|
||||
const submitConsultationProcess = (params) => postAction('/process/fb/processFbStandardConsultation/submit', params)
|
||||
// 转办
|
||||
const transferConsultationProcess = (params) => postAction('/process/fb/processFbStandardConsultation/transfer', params)
|
||||
// 同意
|
||||
const agreeConsultationProcess = (params) => postAction('/process/fb/processFbStandardConsultation/agree', params)
|
||||
// 驳回
|
||||
const rejectConsultationProcess = (params) => postAction('/process/fb/processFbStandardConsultation/reject', params)
|
||||
|
||||
export {
|
||||
getProcessNodeList,
|
||||
|
||||
@@ -240,5 +260,15 @@ export {
|
||||
queryStandardECProcessData,
|
||||
turnToStandardECProcess,
|
||||
agreeStandardECProcess,
|
||||
rejectStandardECProcess
|
||||
rejectStandardECProcess,
|
||||
|
||||
querySpitFileByStandardNumber,
|
||||
queryStandardClauseNumber,
|
||||
saveConsultationProcess,
|
||||
queryConsultationProcessDetail,
|
||||
initiateConsultationProcess,
|
||||
submitConsultationProcess,
|
||||
transferConsultationProcess,
|
||||
agreeConsultationProcess,
|
||||
rejectConsultationProcess
|
||||
}
|
||||
|
||||
@@ -238,7 +238,8 @@ module.exports = {
|
||||
moduleOwner: '模块负责人',
|
||||
designEngineer: '设计工程师',
|
||||
solicitationList: '征求意见列表',
|
||||
chapterName: '章节名称'
|
||||
chapterName: '章节名称',
|
||||
pleaseSelectCriteriaFirst: '请先选择标准',
|
||||
},
|
||||
// 企标稽查计划
|
||||
esInspectionPlan: {
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
<template v-else-if="form.fieldShowType === 2">
|
||||
<j-upload
|
||||
v-model="record[form.dbFieldName]"
|
||||
:disabled="form.isDisabled || false">
|
||||
:disabled="form.isDisabled || false"
|
||||
:file-type="form.fileType || canUploadType">
|
||||
</j-upload>
|
||||
</template>
|
||||
<template v-else-if="form.fieldShowType === 3">
|
||||
@@ -76,7 +77,8 @@
|
||||
<template v-else-if="form.fieldShowType === 2">
|
||||
<j-upload
|
||||
v-model="record[form.dbFieldName]"
|
||||
:disabled="form.isDisabled || false">
|
||||
:disabled="form.isDisabled || false"
|
||||
:file-type="form.fileType || canUploadType">
|
||||
</j-upload>
|
||||
</template>
|
||||
<template v-else-if="form.fieldShowType === 3">
|
||||
@@ -208,15 +210,17 @@ export default {
|
||||
},
|
||||
wrapperCol: {
|
||||
sm: 16
|
||||
}
|
||||
},
|
||||
// 本系统限制可以上传的文件格式
|
||||
canUploadType: 'pdf,docx,doc,xlsx,xls,ppt,pptx,rar,zip,jpg,jpeg,png,avi,wmv,mov,rm,mp4,cad'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submit () {
|
||||
const arr = []
|
||||
for (const i in this.dataSource) {
|
||||
if (this.$refs[`ruleForm${i}`]) {
|
||||
this.$refs[`ruleForm${i}`].validate(valid => {
|
||||
if (this.$refs[`ruleForm${i}`][0]) {
|
||||
this.$refs[`ruleForm${i}`][0].validate(valid => {
|
||||
arr[i] = valid
|
||||
})
|
||||
} else {
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
</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>
|
||||
<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>
|
||||
@@ -99,9 +99,17 @@ export default {
|
||||
},
|
||||
// 列表数据不包含的标准
|
||||
excludeStandardNumbers: {
|
||||
type:String,
|
||||
type: String,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
// 过滤条件
|
||||
filters: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -186,10 +194,15 @@ export default {
|
||||
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) => {
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ export default class EsEnum {
|
||||
}
|
||||
for (const i in this) {
|
||||
const e = this[i]
|
||||
if (e.value !== undefined && e.value !== null && e.value.toString() === value.toString()) {
|
||||
if (e.value !== undefined && e.value !== null && e.value.toString().indexOf(value.toString()) !== -1) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +228,10 @@ export const ConsultationProcess = new EsEnums({
|
||||
distribute: { text: '各部所主管级领导分发', value: 'depart_leader_start', btn: ['return', 'save', 'submit'] },
|
||||
moduleOwnerDistribution: { text: '模块负责人分发', value: '1', btn: ['return', 'save', 'submit'] },
|
||||
designEngineerFillIn: { text: '设计工程师填写', value: '2', btn: ['return', 'save', 'submit'] },
|
||||
audit: { text: '审批', value: '3', btn: ['return', 'save', 'agree', 'reject'] }
|
||||
moduleOwnerSummary: { text: '模块负责人汇总', value: '4', btn: ['return', 'save', 'submit'] },
|
||||
leaderApproval: { text: '各部所主管级领导审批', value: '5', btn: ['return', 'save', 'agree', 'reject'] },
|
||||
leaderSummary: { text: '各部所主管级领导汇总', value: '6', btn: ['return', 'save', 'submit'] },
|
||||
regulatoryEngineerApproval: { text: '法规工程师审批', value: '7', btn: ['return', 'save', 'agree', 'reject'] },
|
||||
})
|
||||
|
||||
// 下发人员类型
|
||||
@@ -243,4 +246,11 @@ export const EvaluationResultType = new EsEnums({
|
||||
inconformity: { text: '不符合', value: '2' },
|
||||
toBeVerified: { text: '待验证', value: '3' },
|
||||
uninvolved: { text: '不涉及', value: '4' }
|
||||
})
|
||||
})
|
||||
|
||||
// 征求意见流程-意见
|
||||
export const SolicitOpinions = {
|
||||
accept: { text: '采纳', value: '1' },
|
||||
partialAdoption: { text: '部分采纳', value: '2' },
|
||||
reject: { text: '不采纳', value: '3' }
|
||||
}
|
||||
@@ -64,7 +64,10 @@
|
||||
<a-form-item :label="$t('standardNumber')">
|
||||
<standard-selection v-decorator="['standardNumber', validatorRules.standardNumber]"
|
||||
:disabled="basicServiceInfoDisabled"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardNumber')" />
|
||||
:placeholder="$t('pleaseSelect') + $t('standardNumber')"
|
||||
:filters="{releaseSplitFlag: '1'}"
|
||||
:can-selected-source="[StandardSource.DOMESTIC.value]"
|
||||
@nameChange="handleStandardChange" />
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="form-flex-item custom-flex-form-item">
|
||||
@@ -74,22 +77,24 @@
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
disabled
|
||||
:disabled="basicServiceInfoDisabled"
|
||||
v-decorator="['standardName', validatorRules.standardName]" />
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="form-flex-item custom-flex-form-item">
|
||||
<!--标准文本-->
|
||||
<a-form-item :label="$t('workCenter.standardConsultationProcess.standardText')">
|
||||
<a-form-item :label="$t('workCenter.standardConsultationProcess.standardText')"
|
||||
:class="{'add-required': basicServiceInfoDisabled}">
|
||||
<div class="box-title-text">
|
||||
<a-input class="box-input"
|
||||
v-decorator="['standardText', validatorRules.standardText]"
|
||||
<a-input class="box-input disabled-white-input"
|
||||
v-decorator="['standardTextFileName', validatorRules.standardText]"
|
||||
readonly
|
||||
:disabled="basicServiceInfoDisabled"
|
||||
disabled
|
||||
v-if="!basicServiceInfoDisabled"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.standardText')" />
|
||||
<a-button type="primary" class="button-box" @click="chooseStandardText">
|
||||
<a-button type="primary" class="button-box" @click="chooseStandardText" v-if="!basicServiceInfoDisabled">
|
||||
{{ this.$t('workCenter.standardConsultationProcess.selectText') }}
|
||||
</a-button>
|
||||
<file-echo :file-ids="basicServiceInfo.standardText" v-if="basicServiceInfoDisabled" />
|
||||
</div>
|
||||
</a-form-item>
|
||||
</div>
|
||||
@@ -115,7 +120,7 @@
|
||||
<div class="process-part-title">{{ $t('workCenter.dispatchInformation') }}</div>
|
||||
<a-form :form="dispatchInfoForm">
|
||||
<div class="form-flex-box">
|
||||
<div class="form-flex-item custom-flex-form-item" v-if="currentNode === ConsultationProcess.distribute.value">
|
||||
<div class="form-flex-item custom-flex-form-item" v-if="currentNode.indexOf(ConsultationProcess.distribute.value) === 0">
|
||||
<!--下发人员类型-->
|
||||
<a-form-item :label="$t('workCenter.standardConsultationProcess.senderType')">
|
||||
<j-dict-select-tag v-decorator="['userType', validatorRules.userType]"
|
||||
@@ -137,7 +142,7 @@
|
||||
</div>
|
||||
<!--下发人员类型选了模块负责人或者模块负责人分发节点都显示这个选项-->
|
||||
<div class="form-flex-item custom-flex-form-item"
|
||||
v-if="senderType === SenderType.designEngineer.value || currentNode === ConsultationProcess.moduleOwnerDistribution.value">
|
||||
v-if="senderType === SenderType.designEngineer.value || currentNode.indexOf(ConsultationProcess.moduleOwnerDistribution.value)===0">
|
||||
<!--设计工程师-->
|
||||
<a-form-item :label="$t('workCenter.standardConsultationProcess.designEngineer')">
|
||||
<user-selection v-decorator="['designEngineerId', validatorRules.designEngineerId]"
|
||||
@@ -154,7 +159,7 @@
|
||||
<template v-if="showConsultationList">
|
||||
<div class="process-part-title">{{ $t('workCenter.standardConsultationProcess.solicitationList') }}</div>
|
||||
<!--设计工程师填写征求意见表格-->
|
||||
<template v-if="currentNode === ConsultationProcess.designEngineerFillIn.value">
|
||||
<template v-if="currentNode.indexOf(ConsultationProcess.designEngineerFillIn.value) === 0">
|
||||
<div class="table-operator">
|
||||
<!-- 新增-->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
|
||||
@@ -181,6 +186,33 @@
|
||||
</j-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--模块负责人汇总填写意见-->
|
||||
<template v-if="showAuditTable">
|
||||
<div class="table-operator">
|
||||
<!--批量操作,汇总节点才有的按钮-->
|
||||
<a-button type="primary" icon="delete" ghost @click="batchOperate" v-if="isSummaryNode">
|
||||
{{ $t('batchOperation') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<j-expand-table ref="expandTable"
|
||||
:columns="columns"
|
||||
:data-source="dataSource"
|
||||
bordered
|
||||
form-is-depend="isAdopt"
|
||||
:extra-form="collectExtraForm"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
||||
<!--意见,汇总节点才用插槽,用表头控制了-->
|
||||
<template v-slot:opinion="{text, record, index}">
|
||||
<j-dict-select-tag :value="record.isAdopt"
|
||||
:triggerChange="false"
|
||||
class="opinion-select"
|
||||
dict-code="consultation_opinion"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.opinion')"
|
||||
@change="value => {handleOpinionChange(value, index)}" />
|
||||
</template>
|
||||
</j-expand-table>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!--流程审批信息-->
|
||||
@@ -201,6 +233,15 @@
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<!--人员信息-->
|
||||
<div class="detail-page-scroll-content p-0" v-show="switchValue === 'user'">
|
||||
<process-detail-list>
|
||||
<template #personnelInfo>
|
||||
<personnel-info ref="personnelInfo" :data="personnelInfoData" />
|
||||
</template>
|
||||
</process-detail-list>
|
||||
</div>
|
||||
|
||||
<div class="detail-page-bottom-operate-box">
|
||||
<!--转办 审批节点存在-->
|
||||
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo">
|
||||
@@ -215,36 +256,73 @@
|
||||
{{ $t('submit') }}
|
||||
</a-button>
|
||||
<!--同意 审批节点存在-->
|
||||
<a-button type="primary" :loading="loading" icon="check-circle" v-if="btnList.includes('agree')" @click="handleSubmit">
|
||||
<a-button type="primary" :loading="loading" icon="check-circle" v-if="btnList.includes('agree')" @click="handleAgree">
|
||||
{{ $t('agree') }}
|
||||
</a-button>
|
||||
<!--驳回 审批节点存在-->
|
||||
<a-button type="primary" :loading="loading" icon="close-circle" v-if="btnList.includes('reject')" @click="handleSubmit">
|
||||
<a-button type="primary" :loading="loading" icon="close-circle" v-if="btnList.includes('reject')" @click="handleReject">
|
||||
{{ $t('reject') }}
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<!--新增、编辑征求意见列表弹框-->
|
||||
<consultation-modal ref="consultationModal" @ok="handleAddData" />
|
||||
<!--选择标准文本-->
|
||||
<select-standard-file-modal ref="selectStandardFileModal" @okItem="handleSelectedFile" />
|
||||
<!--批量填写意见-->
|
||||
<batch-write-opinion-modal ref="opinionModal" @ok="handleWriteOpinion" />
|
||||
<!--转办选人-->
|
||||
<user-select-modal ref="userSelectModal" check-required @change="continueTurnTo" />
|
||||
</internal-detail-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
||||
import StandardSelection from '../../../components/selection/StandardSelection.vue'
|
||||
import { ConsultationProcess, SenderType } from '../../../enums/commonEnums'
|
||||
import { ConsultationProcess, SenderType, ProcessKey, StandardSource } from '../../../enums/commonEnums'
|
||||
import UserSelection from '../../../components/selection/UserSelection'
|
||||
import JTable from '../../../components/jero/JTable'
|
||||
import ConsultationModal from './modules/ConsultationModal'
|
||||
import line from 'ant-design-vue/lib/progress/line'
|
||||
import ProcessDetailList from '../../../components/ProcessDetailList'
|
||||
import PersonnelInfo from '../../../components/PersonnelInfo'
|
||||
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
|
||||
import JExpandTable from '../../../components/JExpandTable'
|
||||
import SelectStandardFileModal from './modules/SelectStandardFileModal'
|
||||
import FileEcho from '../../../components/FileEcho'
|
||||
import BatchWriteOpinionModal from './modules/BatchWriteOpinionModal'
|
||||
import {
|
||||
saveConsultationProcess,
|
||||
queryConsultationProcessDetail,
|
||||
initiateConsultationProcess,
|
||||
submitConsultationProcess,
|
||||
transferConsultationProcess,
|
||||
agreeConsultationProcess,
|
||||
rejectConsultationProcess
|
||||
} from '../../../api/workCenter'
|
||||
import UserSelectModal from '../../../components/selection/UserSelectModal'
|
||||
|
||||
export default {
|
||||
name: 'StandardConsultationProcess',
|
||||
components: { JTable, UserSelection, InternalDetailPage, StandardSelection, ConsultationModal },
|
||||
components: {
|
||||
UserSelectModal,
|
||||
FileEcho,
|
||||
PersonnelInfo,
|
||||
ProcessDetailList,
|
||||
JTable,
|
||||
UserSelection,
|
||||
InternalDetailPage,
|
||||
StandardSelection,
|
||||
ConsultationModal,
|
||||
JExpandTable,
|
||||
SelectStandardFileModal,
|
||||
BatchWriteOpinionModal
|
||||
},
|
||||
mixins: [WorkCenterMixin],
|
||||
data () {
|
||||
return {
|
||||
SenderType,
|
||||
ConsultationProcess,
|
||||
StandardSource,
|
||||
switchValue: 'base',
|
||||
twoLabelCol: {
|
||||
xs: { span: 24 },
|
||||
@@ -337,10 +415,11 @@ export default {
|
||||
},
|
||||
btnList: [], // 显示的按钮
|
||||
loading: false,
|
||||
currentNode: '2',
|
||||
currentNode: '', // 当前节点
|
||||
nodeEnumsKey: null, // 当前节点对应枚举的key
|
||||
senderType: null,
|
||||
columns: [
|
||||
// 设计工程师填写表头
|
||||
designEngineerFillInColumns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
@@ -354,12 +433,16 @@ export default {
|
||||
{ // 章节编号
|
||||
title: this.$t('workCenter.esInspectionProcess.sectionNumber'),
|
||||
width: 180,
|
||||
dataIndex: 'chapterNumber'
|
||||
align: 'center',
|
||||
dataIndex: 'chapterNumber',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 章节名称
|
||||
title: this.$t('workCenter.standardConsultationProcess.chapterName'),
|
||||
width: 180,
|
||||
dataIndex: 'chapterName'
|
||||
align: 'center',
|
||||
dataIndex: 'chapterName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改意见内容
|
||||
title: this.$t('workCenter.enStandardChange.revisedOpinionContent'),
|
||||
@@ -394,8 +477,235 @@ export default {
|
||||
width: 200
|
||||
}
|
||||
],
|
||||
// 汇总表头
|
||||
collectColumns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{ // 章节编号
|
||||
title: this.$t('workCenter.esInspectionProcess.sectionNumber'),
|
||||
width: 180,
|
||||
align: 'center',
|
||||
dataIndex: 'chapterNumber',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 章节名称
|
||||
title: this.$t('workCenter.standardConsultationProcess.chapterName'),
|
||||
width: 180,
|
||||
align: 'center',
|
||||
dataIndex: 'chapterName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改意见内容
|
||||
title: this.$t('workCenter.enStandardChange.revisedOpinionContent'),
|
||||
children: [
|
||||
{ // 修改前
|
||||
title: this.$t('workCenter.enStandardChange.beforeUpdate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'modificationBefore',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改后
|
||||
title: this.$t('workCenter.enStandardChange.afterUpdate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'modificationAfter',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改理由
|
||||
title: this.$t('workCenter.enStandardChange.updateReason'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'modificationReason',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 设计工程师
|
||||
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
|
||||
width: 180,
|
||||
align: 'center',
|
||||
dataIndex: 'designEngineerId_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 意见
|
||||
title: this.$t('workCenter.esInspectionPlan.opinion'),
|
||||
width: 180,
|
||||
align: 'center',
|
||||
dataIndex: 'isAdopt_dictText',
|
||||
scopedSlots: { customRender: 'opinion' }
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
selectedRowKeys: []
|
||||
selectedRowKeys: [],
|
||||
// 汇总表格的表单校验
|
||||
collectExtraForm: {
|
||||
// 采纳
|
||||
'1': {
|
||||
rules: {
|
||||
// 依据描述
|
||||
basisDescription: {
|
||||
required: false,
|
||||
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'
|
||||
}
|
||||
]
|
||||
},
|
||||
// 部分采纳
|
||||
'2': {
|
||||
rules: {
|
||||
// 依据描述
|
||||
basisDescription: {
|
||||
required: false,
|
||||
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'
|
||||
}
|
||||
]
|
||||
},
|
||||
// 不采纳
|
||||
'3': {
|
||||
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'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
// 审批表头
|
||||
approvalColumns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{ // 章节编号
|
||||
title: this.$t('workCenter.esInspectionProcess.sectionNumber'),
|
||||
width: 180,
|
||||
align: 'center',
|
||||
dataIndex: 'chapterNumber',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 章节名称
|
||||
title: this.$t('workCenter.standardConsultationProcess.chapterName'),
|
||||
width: 180,
|
||||
align: 'center',
|
||||
dataIndex: 'chapterName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改意见内容
|
||||
title: this.$t('workCenter.enStandardChange.revisedOpinionContent'),
|
||||
children: [
|
||||
{ // 修改前
|
||||
title: this.$t('workCenter.enStandardChange.beforeUpdate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'modificationBefore',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改后
|
||||
title: this.$t('workCenter.enStandardChange.afterUpdate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'modificationAfter',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改理由
|
||||
title: this.$t('workCenter.enStandardChange.updateReason'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'modificationReason',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 设计工程师
|
||||
title: this.$t('workCenter.standardConsultationProcess.designEngineer'),
|
||||
width: 180,
|
||||
align: 'center',
|
||||
dataIndex: 'designEngineerId_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 意见
|
||||
title: this.$t('workCenter.standardConsultationProcess.moduleOwner') + this.$t('workCenter.esInspectionPlan.opinion'),
|
||||
width: 180,
|
||||
align: 'center',
|
||||
dataIndex: 'isAdopt_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -404,7 +714,8 @@ export default {
|
||||
},
|
||||
// 是否展示业务分派信息,各部所主管级领导分发、模块负责人分发显示
|
||||
showDispatchInformation () {
|
||||
return this.currentNode === ConsultationProcess.distribute.value || this.currentNode === ConsultationProcess.moduleOwnerDistribution.value
|
||||
const nodes = [ConsultationProcess.distribute.value, ConsultationProcess.moduleOwnerDistribution.value]
|
||||
return nodes.some(tt => this.currentNode.indexOf(tt) === 0)
|
||||
},
|
||||
// 流程信息禁用,非发起节点都禁用
|
||||
processInfoDisabled () {
|
||||
@@ -412,11 +723,39 @@ export default {
|
||||
},
|
||||
// 业务基本信息禁用,非发起节点都禁用
|
||||
basicServiceInfoDisabled () {
|
||||
return this.currentNode && this.currentNode !== ConsultationProcess.initiate.value
|
||||
return this.currentNode && this.currentNode.indexOf(ConsultationProcess.initiate.value) === -1
|
||||
},
|
||||
// 展示征求意见列表(设计工程师填写征求意见)
|
||||
// 展示征求意见列表(设计工程师填写征求意见、模块负责人/各部所主管级领导汇总、各部所主管级领导/法规工程师审批)
|
||||
showConsultationList () {
|
||||
return this.currentNode === ConsultationProcess.designEngineerFillIn.value
|
||||
const nodes = [ConsultationProcess.designEngineerFillIn.value, ConsultationProcess.moduleOwnerSummary.value, ConsultationProcess.leaderApproval.value, ConsultationProcess.leaderSummary.value, ConsultationProcess.regulatoryEngineerApproval.value]
|
||||
return nodes.some(tt => this.currentNode.indexOf(tt) === 0)
|
||||
},
|
||||
// 展示审批的表格
|
||||
showAuditTable () {
|
||||
const nodes = [ConsultationProcess.moduleOwnerSummary.value, ConsultationProcess.leaderSummary.value, ConsultationProcess.leaderApproval.value, ConsultationProcess.regulatoryEngineerApproval.value]
|
||||
return nodes.some(tt => this.currentNode.indexOf(tt) === 0) || this.nodeEnumsKey === 'regulatoryEngineerApproval'
|
||||
},
|
||||
// 是否汇总节点
|
||||
isSummaryNode () {
|
||||
const nodes = [ConsultationProcess.moduleOwnerSummary.value, ConsultationProcess.leaderSummary.value]
|
||||
return nodes.some(tt => this.currentNode.indexOf(tt) === 0)
|
||||
},
|
||||
columns () {
|
||||
// 设计工程师填写征求意见表头
|
||||
if (this.currentNode.indexOf(ConsultationProcess.designEngineerFillIn.value)) {
|
||||
return this.designEngineerFillInColumns
|
||||
}
|
||||
// 模块负责人汇总填写意见表头
|
||||
const summaryNodes = [ConsultationProcess.moduleOwnerSummary.value, ConsultationProcess.leaderSummary.value]
|
||||
if (summaryNodes.some(tt => this.currentNode.indexOf(tt) === 0)) {
|
||||
return this.collectColumns
|
||||
}
|
||||
// 审批节点表头
|
||||
const auditNodes = [ConsultationProcess.leaderApproval.value, ConsultationProcess.regulatoryEngineerApproval.value]
|
||||
if (auditNodes.some(tt => this.currentNode.indexOf(tt) === 0) || this.nodeEnumsKey === 'regulatoryEngineerApproval') {
|
||||
return this.approvalColumns
|
||||
}
|
||||
return []
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -424,19 +763,35 @@ export default {
|
||||
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||
|
||||
} else {
|
||||
this.nodeEnumsKey = ConsultationProcess.keyOfValue(this.currentNode) || 'audit'
|
||||
// 找不到这个节点默认使用审批节点页面及按钮,发起除外
|
||||
this.nodeEnumsKey = this.currentNode ? ConsultationProcess.keyOfValue(this.currentNode) || 'regulatoryEngineerApproval' : 'initiate'
|
||||
this.btnList = ConsultationProcess[this.nodeEnumsKey].btn
|
||||
}
|
||||
// 获取人员信息数据
|
||||
this.getPersonInfoStructure(ProcessKey.CONSULTATION.value)
|
||||
},
|
||||
methods: {
|
||||
switchChange (value) {
|
||||
this.switchValue = value
|
||||
},
|
||||
/**
|
||||
* 选择标准带出标准名称
|
||||
* @param name
|
||||
*/
|
||||
handleStandardChange (name) {
|
||||
this.basicServiceInfoForm.setFieldsValue({ standardName: name, standardTextFileName: null })
|
||||
delete this.basicServiceInfo.standardText
|
||||
},
|
||||
/**
|
||||
* 选择标准文本
|
||||
*/
|
||||
chooseStandardText () {
|
||||
|
||||
const selectedStandard = this.basicServiceInfoForm.getFieldValue('standardNumber')
|
||||
if (!selectedStandard) {
|
||||
this.$message.warning(this.$t('workCenter.standardConsultationProcess.pleaseSelectCriteriaFirst'))
|
||||
return
|
||||
}
|
||||
this.$refs.selectStandardFileModal.open(selectedStandard, this.basicServiceInfo.standardText)
|
||||
},
|
||||
/**
|
||||
* 下发人员类型修改
|
||||
@@ -450,7 +805,7 @@ export default {
|
||||
*/
|
||||
handleAdd () {
|
||||
const pdfId = '1723899113057075201'
|
||||
this.$refs.consultationModal.add(pdfId)
|
||||
this.$refs.consultationModal.add(pdfId, '1716698213217865729')
|
||||
},
|
||||
/**
|
||||
* 表单填写完成,新增数据
|
||||
@@ -466,7 +821,16 @@ export default {
|
||||
* 征求意见列表-删除
|
||||
*/
|
||||
batchDel () {
|
||||
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
return
|
||||
}
|
||||
const tableData = JSON.parse(JSON.stringify(this.dataSource))
|
||||
this.selectedRowKeys.forEach(index => {
|
||||
tableData[index] = null
|
||||
})
|
||||
this.dataSource = tableData.filter(tt => !!tt)
|
||||
this.selectedRowKeys = []
|
||||
},
|
||||
onSelectChange (selectedRowKeys) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
@@ -474,6 +838,224 @@ export default {
|
||||
handleEdit (record, index) {
|
||||
record.index = index
|
||||
this.$refs.consultationModal.edit(null, record)
|
||||
},
|
||||
/**
|
||||
* 处理页面数据
|
||||
*/
|
||||
dealFormData (isSave) {
|
||||
// 提交的表单数据,流程信息,流程审批信息,征求意见列表,业务分派信息,业务基本信息
|
||||
let formData = {}, processInfo = {}, approvalInfo = {}, consultationListData = [], dispatchInfo = {}, basicServiceInfo = {},
|
||||
flag = true
|
||||
// 保存,只需要有填写内容即可
|
||||
if (isSave) {
|
||||
// 流程信息
|
||||
processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
||||
// 业务基本信息
|
||||
basicServiceInfo = Object.assign(this.basicServiceInfo, this.basicServiceInfoForm.getFieldsValue())
|
||||
// 流程审批信息
|
||||
approvalInfo = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
|
||||
// 业务分派信息
|
||||
if (this.showDispatchInformation) {
|
||||
dispatchInfo = Object.assign(this.dispatchInfo, this.dispatchInfoForm.getFieldsValue())
|
||||
}
|
||||
const saveCheckObj = { ...processInfo, ...basicServiceInfo, ...approvalInfo, ...dispatchInfo }
|
||||
// 征求意见列表
|
||||
consultationListData = this.dataSource || []
|
||||
if (!(Object.values(saveCheckObj).some(tt => !!tt || tt === 0) || consultationListData.length > 0)) {
|
||||
// 提示至少填写一项
|
||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||
flag = false
|
||||
}
|
||||
} else {
|
||||
// 流程信息
|
||||
this.processInfoForm.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
processInfo = Object.assign(this.processInfo, values)
|
||||
} else {
|
||||
flag = false
|
||||
}
|
||||
})
|
||||
// 业务基本信息
|
||||
this.basicServiceInfoForm.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
basicServiceInfo = Object.assign(this.basicServiceInfo, values)
|
||||
} else {
|
||||
flag = false
|
||||
}
|
||||
})
|
||||
// 流程审批信息
|
||||
this.approvalInfoForm.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
approvalInfo = Object.assign(this.approvalInfo, values)
|
||||
} else {
|
||||
flag = false
|
||||
}
|
||||
})
|
||||
// 业务分派信息
|
||||
if (this.showDispatchInformation) {
|
||||
this.dispatchInfoForm.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
dispatchInfo = Object.assign(this.dispatchInfo, values)
|
||||
} else {
|
||||
flag = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
dispatchInfo = Object.assign({}, this.dispatchInfo)
|
||||
}
|
||||
// 征求意见列表
|
||||
if (this.showConsultationList && this.currentNode === ConsultationProcess.moduleOwnerSummary.value && !this.$refs.expandTable.submit()) {
|
||||
flag = false
|
||||
}
|
||||
consultationListData = this.dataSource || []
|
||||
}
|
||||
if (!flag) {
|
||||
return false
|
||||
}
|
||||
formData = {
|
||||
basicProcessInfoDTO: processInfo,
|
||||
basicTaskInfoDTO: approvalInfo,
|
||||
businessInfoDTO: {
|
||||
processFbStandardConsultation: basicServiceInfo,
|
||||
processFbConsultationUserLink: dispatchInfo,
|
||||
processFbConsultationLists: this.dataSource
|
||||
}
|
||||
}
|
||||
return formData
|
||||
},
|
||||
/**
|
||||
* 转办
|
||||
*/
|
||||
handleTurnTo () {
|
||||
this.$refs.userSelectModal.open()
|
||||
},
|
||||
continueTurnTo (userId) {
|
||||
const params = {
|
||||
taskId: this.$route.query.taskId,
|
||||
userId
|
||||
}
|
||||
this.loading = true
|
||||
transferConsultationProcess(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 formData = this.dealFormData(true)
|
||||
if (!formData) {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
saveConsultationProcess(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.dealFormData()
|
||||
if (!formData) {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
submitConsultationProcess(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 同意
|
||||
*/
|
||||
handleAgree () {
|
||||
const formData = this.dealFormData()
|
||||
if (!formData) {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
agreeConsultationProcess(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 驳回
|
||||
*/
|
||||
handleReject () {
|
||||
const formData = this.dealFormData()
|
||||
if (!formData) {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
rejectConsultationProcess(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 批量操作
|
||||
*/
|
||||
batchOperate () {
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
return
|
||||
}
|
||||
this.$refs.opinionModal.open()
|
||||
},
|
||||
handleWriteOpinion ({ isAdopt }) {
|
||||
this.selectedRowKeys.forEach(index => {
|
||||
this.$set(this.dataSource[index], 'isAdopt', isAdopt)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 选中标准文本
|
||||
* @param item
|
||||
*/
|
||||
handleSelectedFile (item) {
|
||||
this.basicServiceInfoForm.setFieldsValue({ standardTextFileName: item.fileName })
|
||||
this.basicServiceInfo.standardText = item.publishBeforeId
|
||||
},
|
||||
/**
|
||||
* 修改意见
|
||||
* @param value
|
||||
* @param index
|
||||
*/
|
||||
handleOpinionChange (value, index) {
|
||||
this.$set(this.dataSource[index], 'isAdopt', value)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -496,4 +1078,23 @@ export default {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.disabled-white-input[disabled] {
|
||||
background-color: white;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
|
||||
.opinion-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.add-required > ::v-deep.ant-form-item-label > label::before {
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
color: #f5222d;
|
||||
font-size: 14px;
|
||||
font-family: SimSun, sans-serif;
|
||||
line-height: 1;
|
||||
content: '*';
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:maskClosable="false"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<!--意见-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.esInspectionPlan.opinion')">
|
||||
<j-dict-select-tag :triggerChange="false"
|
||||
class="opinion-select"
|
||||
dict-code="consultation_opinion"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.opinion')"
|
||||
v-decorator="['isAdopt']" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'BatchWriteOpinionModal',
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('batchOperation'),
|
||||
width: 600,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
},
|
||||
handleOk () {
|
||||
this.form.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
this.$emit('ok', values)
|
||||
this.close()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
this.form.resetFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
@@ -17,10 +17,18 @@
|
||||
<a-form :form="form">
|
||||
<!--章节编号-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.esInspectionProcess.sectionNumber')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.sectionNumber')"
|
||||
:maxLength="50"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
v-decorator="['chapterNumber', validatorRules.chapterNumber]" />
|
||||
<a-tree-select
|
||||
v-decorator="['chapterId', validatorRules.chapterId]"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
style="width: 100%"
|
||||
:tree-data="chapterNumberTreeData"
|
||||
treeCheckStrictly
|
||||
:replace-fields="{key: 'id',label: 'name', value: 'id'}"
|
||||
:label-in-value="false"
|
||||
show-search
|
||||
:filterTreeNode="filterTreeOption"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionProcess.sectionNumber')"
|
||||
@change="handleNumberChange" />
|
||||
</a-form-item>
|
||||
<!--章节名称-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.standardConsultationProcess.chapterName')">
|
||||
@@ -69,6 +77,7 @@ import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '../../../../store/mutation-types'
|
||||
import { previewPdf } from '../../../../utils/previewPdf'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { queryStandardClauseNumber } from '../../../../api/workCenter'
|
||||
|
||||
export default {
|
||||
name: 'ConsultationModal',
|
||||
@@ -90,9 +99,9 @@ export default {
|
||||
},
|
||||
validatorRules: {
|
||||
// 章节编号
|
||||
chapterNumber: {
|
||||
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.sectionNumber') }],
|
||||
validateTrigger: 'blur'
|
||||
chapterId: {
|
||||
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.esInspectionProcess.sectionNumber') }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 章节名称
|
||||
chapterName: {
|
||||
@@ -114,13 +123,15 @@ export default {
|
||||
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardChange.updateReason') }],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
}
|
||||
},
|
||||
chapterNumberTreeData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async add (fileId) {
|
||||
async add (fileId, infoId) {
|
||||
this.title = this.$t('newlyAdded')
|
||||
this.visible = true
|
||||
this.getChapterNumberTreeData(infoId)
|
||||
if (!fileId) {
|
||||
return
|
||||
}
|
||||
@@ -191,6 +202,22 @@ export default {
|
||||
this.previewUrl = null
|
||||
this.model = {}
|
||||
this.form.resetFields()
|
||||
},
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
getChapterNumberTreeData (infoId) {
|
||||
queryStandardClauseNumber({ infoId }).then(res => {
|
||||
if (res.success) {
|
||||
this.chapterNumberTreeData = res.result || []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleNumberChange (value, label, extra) {
|
||||
const nodeData = extra.triggerNode.dataRef
|
||||
this.form.setFieldsValue({ chapterName: nodeData.itemName.trim() })
|
||||
this.model.chapterNumber = nodeData.name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+75
-2
@@ -8,18 +8,91 @@
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<!--文件类型-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('docTool.split.fileType')">
|
||||
<a-select
|
||||
:getPopupContainer="getPopupContainer"
|
||||
:placeholder="$t('pleaseSelect') + $t('docTool.split.fileType')"
|
||||
show-search
|
||||
:filter-option="filterOption"
|
||||
v-decorator="['fileType']">
|
||||
<a-select-option v-for="item in optionList" :key="item.publishBeforeId" :value="item.publishBeforeId">
|
||||
<div style="display: inline-block;width: 100%" :title=" item.fileType_dictText">
|
||||
{{ item.fileType_dictText }}
|
||||
</div>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { querySpitFileByStandardNumber } from '../../../../api/workCenter'
|
||||
|
||||
export default {
|
||||
name: 'SelectStandardFileModal',
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('workCenter.standardConsultationProcess.selectionStandardFile'),
|
||||
width: false,
|
||||
width: 600,
|
||||
visible: false,
|
||||
confirmLoading: false
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
optionList: [],
|
||||
getPopupContainer: (node) => node.parentNode
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (standardNumber, selectedValue) {
|
||||
this.visible = true
|
||||
this.confirmLoading = true
|
||||
querySpitFileByStandardNumber({ standardNumber }).then(res => {
|
||||
if (res.success) {
|
||||
console.log(res.reuslt)
|
||||
this.optionList = res.result || []
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({ fileType: selectedValue })
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
},
|
||||
handleOk () {
|
||||
this.form.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
this.$emit('ok', values.fileType)
|
||||
const item = values.fileType ? this.optionList.find(tt => tt.publishBeforeId === values.fileType) : {}
|
||||
this.$emit('okItem', item)
|
||||
}
|
||||
this.close()
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
this.form.resetFields()
|
||||
this.optionList = []
|
||||
},
|
||||
filterOption (input, option) {
|
||||
const text = option.componentOptions.children[0].text || option.componentOptions.children[0].data.attrs.title
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1065,11 +1065,6 @@ export default {
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
goBack () {
|
||||
let timer = setTimeout(() => {
|
||||
this.$router.go(-1)
|
||||
}, 700)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user