[update] 修改企标制修订流程
This commit is contained in:
@@ -66,19 +66,19 @@ const standardizationInitBatchReject = (params) => postAction('/process/es/annua
|
||||
|
||||
// 企标制修订流程
|
||||
// 保存
|
||||
const enStandardEditSave = (params) => postAction('', params)
|
||||
const enStandardEditSave = (params) => postAction('/process/es/revision/save', params)
|
||||
// 发起
|
||||
const enStandardEditApproval = (params) => postAction('', params)
|
||||
const enStandardEditApproval = (params) => postAction('/process/es/revision/start', params)
|
||||
// 转办
|
||||
const enStandardEditTurnTo = (params) => postAction('', params)
|
||||
const enStandardEditTurnTo = (params) => postAction('/process/es/revision/transfer', params)
|
||||
// 同意
|
||||
const enStandardEditAgree = (params) => postAction('', params)
|
||||
const enStandardEditAgree = (params) => postAction('/process/es/revision/agree', params)
|
||||
// 拒绝
|
||||
const enStandardEditReject = (params) => postAction('', params)
|
||||
const enStandardEditReject = (params) => postAction('/process/es/revision/reject', params)
|
||||
// 根据id查流程数据
|
||||
const enStandardEditGetDataById = (taskId, params) => getAction(`/${taskId}`, params)
|
||||
const enStandardEditGetDataById = (taskId, params) => getAction(`/process/es/revision/handle/${taskId}`, params)
|
||||
// 草稿的办理回显数据
|
||||
const enStandardEditGetDataDraft = (params) => getAction('', params)
|
||||
const enStandardEditGetDataDraft = (params) => getAction('/process/es/revision/draftHandle', params)
|
||||
|
||||
// 企标更改流程
|
||||
// 保存
|
||||
|
||||
@@ -151,7 +151,8 @@ module.exports = {
|
||||
countersign: '会签(相关部门领导)',
|
||||
approverHeadEngineer: '审批(总工程师)',
|
||||
releaseDate: '发布日期',
|
||||
implementationDate: '实施日期'
|
||||
implementationDate: '实施日期',
|
||||
esPlan: '企标计划'
|
||||
},
|
||||
// 企标更改流程
|
||||
enStandardChange: {
|
||||
|
||||
@@ -403,6 +403,7 @@ export default {
|
||||
this.formInline.grade_classification === StandardGradeClassify.TWO_LEVEL.value) {
|
||||
// 标准等级分类是1级或者2级需要,把主起草单位追加到授权部门
|
||||
let authDeptArr = (this.formInline.auth_dept || '').split(',')
|
||||
// 把旧的主起草部门刨出去,否则每换一次主起草单位都会累计到授权部门
|
||||
authDeptArr = authDeptArr.filter(item => item !== this.oldMainDraftingUnit)
|
||||
authDeptArr.push(val)
|
||||
this.formInline.auth_dept = authDeptArr.join(',')
|
||||
|
||||
+33
-27
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<internal-detail-page :title="pageTitle" :content-padding="0">
|
||||
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
|
||||
<!-- 标题右侧tab -->
|
||||
<template v-slot:titleRightCustom>
|
||||
<div class="table-operator-tab">
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<!-- 基础信息 -->
|
||||
<div v-if="switchValue === 'base'" class="detail-page-scroll-content">
|
||||
<div v-show="switchValue === 'base'" class="detail-page-scroll-content">
|
||||
<!-- 流程信息 -->
|
||||
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
||||
<a-form :form="processInfoForm">
|
||||
@@ -55,38 +55,38 @@
|
||||
<!-- 业务基本信息 -->
|
||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||
<!-- 节点1、主起草人起草分发 -->
|
||||
<main-drafter-sent-base-info v-if="currentNode === 1" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></main-drafter-sent-base-info>
|
||||
<main-drafter-sent-base-info v-if="currentNode === 1" :flowInitType="flowInitType" ref="baseInfoRef" @processNameChange="processNameChange"></main-drafter-sent-base-info>
|
||||
<!-- 节点2、其他起草人上传企标 -->
|
||||
<other-drafter-upload-standard-base-info v-if="currentNode === 2" :disabled="disabled" ref="baseInfoRef"></other-drafter-upload-standard-base-info>
|
||||
<other-drafter-upload-standard-base-info v-if="currentNode === 2" ref="baseInfoRef"></other-drafter-upload-standard-base-info>
|
||||
<!-- 节点3、主起草人汇总上传会议纪要 -->
|
||||
<main-drafter-collect-upload-minute-base-info v-if="currentNode === 3" :disabled="disabled" ref="baseInfoRef"></main-drafter-collect-upload-minute-base-info>
|
||||
<main-drafter-collect-upload-minute-base-info v-if="currentNode === 3" ref="baseInfoRef"></main-drafter-collect-upload-minute-base-info>
|
||||
<!-- 节点4、标准化审核 -->
|
||||
<standardization-audit-base-info v-if="currentNode === 4" :disabled="disabled" ref="baseInfoRef" @standardizationAuditIsMeeting="standardizationAuditIsMeeting"></standardization-audit-base-info>
|
||||
<standardization-audit-base-info v-if="currentNode === 4" ref="baseInfoRef" @standardizationAuditIsMeeting="standardizationAuditIsMeeting"></standardization-audit-base-info>
|
||||
<!-- 节点5、评分人打分 -->
|
||||
<scorer-mark-base-info v-if="currentNode === 5" :disabled="disabled" ref="baseInfoRef"></scorer-mark-base-info>
|
||||
<scorer-mark-base-info v-if="currentNode === 5" ref="baseInfoRef"></scorer-mark-base-info>
|
||||
<!-- 节点6、标准化确认是否开启征求意见 -->
|
||||
<confirm-whether-comment-base-info v-if="currentNode === 6" :disabled="disabled" ref="baseInfoRef"></confirm-whether-comment-base-info>
|
||||
<confirm-whether-comment-base-info v-if="currentNode === 6" ref="baseInfoRef"></confirm-whether-comment-base-info>
|
||||
<!-- 节点7、部所联络人下发 -->
|
||||
<depart-liaison-issue-base-info v-if="currentNode === 7" :disabled="disabled" ref="baseInfoRef"></depart-liaison-issue-base-info>
|
||||
<depart-liaison-issue-base-info v-if="currentNode === 7" ref="baseInfoRef"></depart-liaison-issue-base-info>
|
||||
<!-- 节点8、征求意见对象填写意见 -->
|
||||
<comment-object-enter-base-info v-if="currentNode === 8" :disabled="disabled" ref="baseInfoRef"></comment-object-enter-base-info>
|
||||
<comment-object-enter-base-info v-if="currentNode === 8" ref="baseInfoRef"></comment-object-enter-base-info>
|
||||
<!-- 节点9、部所联络人汇总数据 -->
|
||||
<depart-liaison-collect-base-info v-if="currentNode === 9" :disabled="disabled" ref="baseInfoRef"></depart-liaison-collect-base-info>
|
||||
<depart-liaison-collect-base-info v-if="currentNode === 9" ref="baseInfoRef"></depart-liaison-collect-base-info>
|
||||
<!-- 节点10、部所联络人主管级领导审批 -->
|
||||
<depart-liaison-leader-approve-base-info v-if="currentNode === 10" :disabled="disabled" ref="baseInfoRef"></depart-liaison-leader-approve-base-info>
|
||||
<depart-liaison-leader-approve-base-info v-if="currentNode === 10" ref="baseInfoRef"></depart-liaison-leader-approve-base-info>
|
||||
<!-- 节点11、主起草人汇总 -->
|
||||
<main-drafter-collect-base-info v-if="currentNode === 11" :disabled="disabled" ref="baseInfoRef"></main-drafter-collect-base-info>
|
||||
<main-drafter-collect-base-info v-if="currentNode === 11" ref="baseInfoRef"></main-drafter-collect-base-info>
|
||||
<!-- 节点12、主起草人上传会议纪要 -->
|
||||
<main-drafter-upload-minute-base-info v-if="currentNode === 12" :disabled="disabled" ref="baseInfoRef"></main-drafter-upload-minute-base-info>
|
||||
<main-drafter-upload-minute-base-info v-if="currentNode === 12" ref="baseInfoRef"></main-drafter-upload-minute-base-info>
|
||||
<!-- 节点13、其他起草人校对 -->
|
||||
<!-- 节点14、主管级领导审批 -->
|
||||
<!-- 节点15、标准化审批 -->
|
||||
<!-- 节点16、相关部门领导会签 -->
|
||||
<!-- 节点17、总工程师审批 -->
|
||||
<!-- 只有标准文本 -->
|
||||
<other-drafter-proofread-base-info v-if="[13, 14, 15, 16, 17].includes(currentNode)" :disabled="disabled" ref="baseInfoRef"></other-drafter-proofread-base-info>
|
||||
<other-drafter-proofread-base-info v-if="[13, 14, 15, 16, 17].includes(currentNode)" ref="baseInfoRef"></other-drafter-proofread-base-info>
|
||||
<!-- 节点18、主起草人发布 -->
|
||||
<main-drafter-publish-base-info v-if="currentNode === 18" :disabled="disabled" ref="baseInfoRef"></main-drafter-publish-base-info>
|
||||
<main-drafter-publish-base-info v-if="currentNode === 18" ref="baseInfoRef"></main-drafter-publish-base-info>
|
||||
|
||||
<!-- 流程审批信息 -->
|
||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||
@@ -106,9 +106,9 @@
|
||||
</div>
|
||||
|
||||
<!-- 人员信息 -->
|
||||
<div v-if="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||
<process-detail-list :processKey="ProcessKey.ES_EDIT.value">
|
||||
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
|
||||
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNodeName" :notPermissField="['adviceUserList']"></personnel-info>
|
||||
</process-detail-list>
|
||||
</div>
|
||||
|
||||
@@ -382,13 +382,14 @@ export default {
|
||||
this.model = res.result
|
||||
this.$nextTick(() => {
|
||||
// 初始化流程信息
|
||||
this.processInfoForm.setFieldsValue(pick(this.model[0], 'prcName', 'dueTime', 'prcMes'))
|
||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
||||
// 初始化流程审批信息,草稿进来的才回显审批信息
|
||||
if (type === 'draft') {
|
||||
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
|
||||
}
|
||||
// 初始化业务基本信息中组件内容
|
||||
this.$refs.baseInfoRef.initData(this.model.data)
|
||||
})
|
||||
// 初始化业务基本信息中组件内容
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
@@ -397,6 +398,13 @@ export default {
|
||||
switchChange (value) {
|
||||
this.switchValue = value
|
||||
},
|
||||
// 流程名称改变
|
||||
processNameChange (value) {
|
||||
const param = { prcName: value }
|
||||
this.$nextTick(() => {
|
||||
this.processInfoForm.setFieldsValue(pick(param, 'prcName'))
|
||||
})
|
||||
},
|
||||
// 标准化审核节点是否可进行评审会修改,需要修改备注的是否必填和同意、驳回按钮是否可用
|
||||
standardizationAuditIsMeeting (value) {
|
||||
// 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击
|
||||
@@ -487,13 +495,11 @@ export default {
|
||||
const param = {} // 需要传给后端的数据
|
||||
param.common = { ...values, ...approvalValues }
|
||||
param.flowUser = personnelObj
|
||||
if (data.dataSource && data.dataSource.length > 0) {
|
||||
param.dataList = data.dataSource.map(item => {
|
||||
return { ...item, ...data.formInline }
|
||||
})
|
||||
} else {
|
||||
param.dataList = [data.formInline]
|
||||
}
|
||||
// 业务基本信息部分表单
|
||||
param.data = {}
|
||||
param.data.businessJson = JSON.stringify(data.formInline)
|
||||
// 其他起草人表格数据
|
||||
param.data.otherDraftUserVOS = data.dataSource
|
||||
let func
|
||||
if (this.$route.query.taskId) {
|
||||
// 有taskId说明是驳回的提交
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<a-col :span="24">
|
||||
<!-- 起草单位 todo:数据来源起草单位还不知道对接过来的起草部门是什么形式,没做处理 -->
|
||||
<a-form-item :label="$t('workCenter.enStandardRevision.draftingUnit')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-select-depart v-decorator="['draftingUnit', validatorRules.draftingUnit]"
|
||||
<j-select-depart v-decorator="['dept', validatorRules.dept]"
|
||||
@back="draftingUnitBack"
|
||||
:backDepart="true" />
|
||||
</a-form-item>
|
||||
@@ -24,27 +24,27 @@
|
||||
<!-- 起草人 todo: 选人应该在起草单位的基础上选,还没处理 -->
|
||||
<a-form-item :label="$t('workCenter.enStandardRevision.drafter')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.drafter')"
|
||||
v-decorator="['drafter', validatorRules.drafter]"
|
||||
filedName="drafter"
|
||||
v-decorator="['user', validatorRules.user]"
|
||||
filedName="user"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="model.drafter_dictText"
|
||||
:nameStr="model.user_dictText"
|
||||
type="radio" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<!-- 起草范围 -->
|
||||
<a-form-item :label="$t('workCenter.enStandardRevision.draftingScope')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.standardDetail.standardNumber')"
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.draftingScope')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
v-decorator="['draftingScope', validatorRules.draftingScope]" />
|
||||
v-decorator="['scope', validatorRules.scope]" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<!-- 截止日期 -->
|
||||
<a-form-item :label="$t('expirationDate')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
||||
v-decorator="['expirationDate', validatorRules.expirationDate]"
|
||||
v-decorator="['deadline', validatorRules.deadline]"
|
||||
value-format="YYYY-MM-DD"
|
||||
:showTime="false"
|
||||
style="width: 100%" />
|
||||
@@ -86,19 +86,19 @@ export default {
|
||||
sm: { span: 20 }
|
||||
},
|
||||
validatorRules: {
|
||||
draftingUnit: {
|
||||
dept: {
|
||||
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.enStandardRevision.draftingUnit') }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
drafter: {
|
||||
user: {
|
||||
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.enStandardRevision.drafter') }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
draftingScope: {
|
||||
scope: {
|
||||
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.draftingScope') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
expirationDate: {
|
||||
deadline: {
|
||||
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('expirationDate') }],
|
||||
validateTrigger: 'change'
|
||||
}
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
this.form.resetFields()
|
||||
this.model = Object.assign({}, record)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'draftingUnit', 'drafter', 'draftingScope', 'expirationDate'))
|
||||
this.form.setFieldsValue(pick(this.model, 'dept', 'user', 'scope', 'deadline'))
|
||||
})
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
// 起草单位回调
|
||||
draftingUnitBack (value) {
|
||||
console.log(value)
|
||||
this.model.draftingUnit_dictText = value.map(item => item.text).join(',')
|
||||
this.model.dept_dictText = value.map(item => item.text).join(',')
|
||||
},
|
||||
handleOk () {
|
||||
if (this.confirmLoading) return
|
||||
|
||||
@@ -28,11 +28,12 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="applicationCategory">
|
||||
<a-form-model-item class="item-model" prop="espId">
|
||||
<enterprise-plan-selection type="radio"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')"
|
||||
v-model="formInline.standardPlanId"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.esPlan')"
|
||||
v-model="formInline.espId"
|
||||
:standard-number="formInline.standard_number"
|
||||
:searchParam="{projectStatus: 1}"
|
||||
@listChange="listChange"
|
||||
:disabled="disabled"/>
|
||||
</a-form-model-item>
|
||||
@@ -48,11 +49,9 @@
|
||||
<div :key="index" class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required" v-if="item.fieldMustInput === '1'">*</span>
|
||||
<span class="title-text-text" :title="item.dbFieldTxt">
|
||||
{{ item.dbFieldTxt }}
|
||||
</span>
|
||||
<span class="title-text-text" :title="item.dbFieldTxt">{{ item.dbFieldTxt }}</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="applicationCategory">
|
||||
<a-form-model-item class="item-model" :prop="item.dbFieldName">
|
||||
<!-- 1, 日期单选 -->
|
||||
<a-date-picker v-if="item.fieldShowType === FieldType.DATE_SINGLE.value"
|
||||
class="box-input"
|
||||
@@ -99,6 +98,8 @@
|
||||
v-model="formInline[item.dbFieldName]"
|
||||
:multi="true"
|
||||
:backDepart="true"
|
||||
:disabled="disabled || innerDisabledField.includes(item.dbFieldName)"
|
||||
:selectRange="item.dbFieldName === 'auth_dept' ? departSelectRange : []"
|
||||
:treeOpera="true" />
|
||||
<!-- 8, 上传文件 -->
|
||||
<a-button v-else-if="item.fieldShowType === FieldType.FILE_UP.value" type="primary" class="button-text"
|
||||
@@ -186,9 +187,10 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getEnterpriseStandardAddForm
|
||||
getEnterpriseStandardAddForm,
|
||||
getStandardGradeClassification
|
||||
} from '@/api/enterpriseStandardLibraryApi'
|
||||
import { StandardSource, FieldType, ApplicationCategory, IsTrial } from '@/enums/commonEnums'
|
||||
import { StandardSource, FieldType, ApplicationCategory, IsTrial, StandardGradeClassify } from '@/enums/commonEnums'
|
||||
import { getAction } from '@/api/manage'
|
||||
import { getFormDictTreeList } from '@/api/api'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
@@ -217,9 +219,97 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 标准等级分类改变后授权部门需要自动带出
|
||||
'formInline.grade_classification' (val) {
|
||||
if (val && !this.isEditSetData) {
|
||||
if (val === StandardGradeClassify.ZERO_LEVEL.value) {
|
||||
// 选的是0级,授权部门带出不可编辑
|
||||
this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '0').deptIds
|
||||
if (!this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField.push('auth_dept')
|
||||
}
|
||||
} else if (val === StandardGradeClassify.ONE_LEVEL.value) {
|
||||
// 选的是1级
|
||||
// // 带出3级的部门:起草部门
|
||||
// this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
|
||||
// 带出主起草单位
|
||||
this.formInline.auth_dept = this.formInline.main_drafting_unit
|
||||
// 设置可选择项
|
||||
this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '1').deptIds.split(',')
|
||||
this.formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
// 设置授权部门可编辑
|
||||
if (this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'auth_dept')
|
||||
}
|
||||
} else if (val === StandardGradeClassify.TWO_LEVEL.value) {
|
||||
// 选的是2级
|
||||
// 带出主起草单位
|
||||
this.formInline.auth_dept = this.formInline.main_drafting_unit
|
||||
// 设置可选择项
|
||||
this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '2').deptIds.split(',')
|
||||
this.formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
// 设置授权部门可编辑
|
||||
if (this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'auth_dept')
|
||||
}
|
||||
} else if (val === StandardGradeClassify.THREE_LEVEL.value) {
|
||||
// 选的是3级,带出主起草单位,不可编辑
|
||||
this.formInline.auth_dept = this.formInline.main_drafting_unit
|
||||
if (!this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField.push('auth_dept')
|
||||
}
|
||||
}
|
||||
} else if (val && this.isEditSetData) {
|
||||
if (val === StandardGradeClassify.ZERO_LEVEL.value) {
|
||||
// 选的是0级,授权部门带出不可编辑
|
||||
if (!this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField.push('auth_dept')
|
||||
}
|
||||
} else if (val === StandardGradeClassify.ONE_LEVEL.value) {
|
||||
// 选的是1级
|
||||
// 设置可选择项
|
||||
this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '1').deptIds.split(',')
|
||||
// 设置授权部门可编辑
|
||||
if (this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'auth_dept')
|
||||
}
|
||||
} else if (val === StandardGradeClassify.TWO_LEVEL.value) {
|
||||
// 选的是2级
|
||||
// 设置可选择项
|
||||
this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '2').deptIds.split(',')
|
||||
// 设置授权部门可编辑
|
||||
if (this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'auth_dept')
|
||||
}
|
||||
} else if (val === StandardGradeClassify.THREE_LEVEL.value) {
|
||||
// 选的是3级,授权部门带出不可编辑
|
||||
if (!this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField.push('auth_dept')
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 主起草单位改变后,需要将选中的主起草单位增加到授权部门
|
||||
'formInline.main_drafting_unit' (val) {
|
||||
if (val) {
|
||||
if (this.formInline.grade_classification === StandardGradeClassify.ONE_LEVEL.value ||
|
||||
this.formInline.grade_classification === StandardGradeClassify.TWO_LEVEL.value) {
|
||||
// 标准等级分类是1级或者2级需要,把主起草单位追加到授权部门
|
||||
let authDeptArr = (this.formInline.auth_dept || '').split(',')
|
||||
// 把旧的主起草部门刨出去,否则每换一次企标编号都会把其主起草单位累计
|
||||
authDeptArr = authDeptArr.filter(item => item !== this.oldMainDraftingUnit)
|
||||
authDeptArr.push(val)
|
||||
this.formInline.auth_dept = authDeptArr.join(',')
|
||||
} else if (this.formInline.grade_classification === StandardGradeClassify.THREE_LEVEL.value) {
|
||||
// 标准等级分类是3级,把授权部门替换成主起草单位
|
||||
this.formInline.auth_dept = val
|
||||
}
|
||||
this.oldMainDraftingUnit = val
|
||||
}
|
||||
},
|
||||
// 企标是否试行改变,试行周期必填校验也跟着变
|
||||
'formInline.try_flag' (val) {
|
||||
if (val && this.flag === StandardSource.ENTERPRISE.value) {
|
||||
if (val) {
|
||||
if (val === IsTrial.YES.value) {
|
||||
// 试行周期给默认值24
|
||||
this.formInline.trial_period = '24'
|
||||
@@ -233,6 +323,12 @@ export default {
|
||||
this.rules.trial_period[0].required = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 企标名称
|
||||
'formInline.standard_name' (val) {
|
||||
// 设置流程名称
|
||||
const processName = (this.formInline.standard_number || '') + '-' + (val || '') + '-' + (this.formInline.typeOfRevision_dictText || '')
|
||||
this.$emit('processNameChange', processName)
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -245,21 +341,61 @@ export default {
|
||||
isFormInline: false, // 是否展示表单
|
||||
disabledFieldList: ['standard_number'], // 不可修改字段
|
||||
formInline: {},
|
||||
rules: {},
|
||||
rules: {
|
||||
// 制修订类型校验
|
||||
typeOfRevision: [{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.typeOfRevision') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}],
|
||||
// 企标计划选择
|
||||
espId: [{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.esPlan') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}]
|
||||
},
|
||||
disabled: false,
|
||||
optionsData: {} // 标签管理中维护字段的下拉框数据
|
||||
optionsData: {}, // 标签管理中维护字段的下拉框数据
|
||||
isEditSetData: false, // 是否正在初始化设置值,为了不执行某些watch
|
||||
innerDisabledField: [], // 不可更改的字段
|
||||
departSelectRange: [], // 授权部门的可选范围
|
||||
standardGradeClassification: [], // 企标级别映射数据,用于标准等级分类和授权部门的对应
|
||||
oldMainDraftingUnit: '' // 上一次的主起草单位
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getForm()
|
||||
this.getStandardGradeClassificationArr()
|
||||
},
|
||||
methods: {
|
||||
initData (data) {
|
||||
this.isEditSetData = true
|
||||
this.formInline = JSON.parse(data.businessJson)
|
||||
this.formInline.standard_system = this.formInline.standard_system ? this.formInline.standard_system.split(',').map(item => {
|
||||
return { value: item }
|
||||
}) : []
|
||||
this.isEditSetData = false
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
async getDataValidate () {
|
||||
let data = {}
|
||||
console.log(this.rules)
|
||||
await this.$refs.ruleForm.validate(valid => {
|
||||
console.log(valid)
|
||||
if (valid) {
|
||||
data.formInline = this.formInline
|
||||
const formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] instanceof Array) {
|
||||
if (formInline[res][0] instanceof Object) {
|
||||
// 说明是树选择
|
||||
formInline[res] = formInline[res].map(item => item.value).join(',')
|
||||
} else {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
}
|
||||
})
|
||||
data.formInline = formInline
|
||||
} else {
|
||||
data = false
|
||||
}
|
||||
@@ -343,7 +479,7 @@ export default {
|
||||
rules[res.dbFieldName] = rule
|
||||
}
|
||||
})
|
||||
this.rules = rules
|
||||
this.rules = { ...this.rules, ...rules }
|
||||
this.isFormInline = true
|
||||
this.confirmLoading = false
|
||||
},
|
||||
@@ -371,6 +507,13 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getStandardGradeClassificationArr () {
|
||||
getStandardGradeClassification().then(res => {
|
||||
if (res.success) {
|
||||
this.standardGradeClassification = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
// 4、从企标计划选择企标编号的话,把其他字段也回显
|
||||
listChange (value) {
|
||||
console.log(value)
|
||||
@@ -378,6 +521,14 @@ export default {
|
||||
this.formInline.standard_number = value[0].newEnStandardNo
|
||||
// 回显制修订类型
|
||||
this.formInline.typeOfRevision = value[0].applicationCategory
|
||||
this.formInline.typeOfRevision_dictText = value[0].applicationCategory_dictText
|
||||
this.$refs.ruleForm.clearValidate('typeOfRevision')
|
||||
// 设置主起草单位,改变标准等级分类的时候设置授权部门有时会需要主起草单位
|
||||
this.formInline.main_drafting_unit = value[0].mainDraftingUnit
|
||||
// 设置流程名称
|
||||
const processName = this.formInline.standard_number + '-' + (this.formInline.standard_name || '') + '-' + this.formInline.typeOfRevision_dictText
|
||||
this.$emit('processNameChange', processName)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 点击点击上传按钮
|
||||
clickButtonToUpload (item) {
|
||||
|
||||
+93
-104
@@ -17,7 +17,7 @@
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="standard-file-div">
|
||||
<a class="link-a" @click="handleLookUploadStandard(record)">{{ record.standardFile_dictText }}</a>
|
||||
<a class="link-a" @click="handleLookUploadStandard(record)">{{ record.fileId_dictText }}</a>
|
||||
<a class="download-a" @click="handleDownloadUploadStandard(record)">{{ $t('download') }}</a>
|
||||
</div>
|
||||
</a-tooltip>
|
||||
@@ -26,103 +26,82 @@
|
||||
</j-table>
|
||||
</div>
|
||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||
<div class="collapsible-panel-form">
|
||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<div class="form-flex-box">
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
||||
{{ $t('workCenter.enStandardRevision.standardText') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<!-- todo: 还不确定这里展示的是什么 -->
|
||||
<p>企业标准</p>
|
||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 参会人员 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.conferee')">
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<!-- todo: 还不确定这里展示的是什么 -->
|
||||
<p>企业标准</p>
|
||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 参会人员 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.conferee')">
|
||||
{{ $t('workCenter.enStandardRevision.conferee') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="conferee">
|
||||
<user-selection v-model="formInline.conferee"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.conferee')"
|
||||
:disabled="disabled"
|
||||
filedName="conferee"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.conferee_dictText"
|
||||
type="checkbox"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 会议纪要 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.meetingSummary')">
|
||||
<a-form-model-item class="item-model" prop="meetingUsers">
|
||||
<user-selection v-model="formInline.meetingUsers"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.conferee')"
|
||||
:disabled="disabled"
|
||||
filedName="meetingUsers"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.meetingUsers_dictText"
|
||||
type="checkbox"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 会议纪要 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.meetingSummary')">
|
||||
{{ $t('workCenter.enStandardRevision.meetingSummary') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="meetingSummary">
|
||||
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('meetingSummary')">
|
||||
{{
|
||||
(formInline.meetingSummary === 'null' || formInline.meetingSummary === ''
|
||||
|| formInline.meetingSummary === null || formInline.meetingSummary === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 编制说明 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.compilationIllustration')">
|
||||
{{ $t('workCenter.enStandardRevision.compilationIllustration') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="comp_illustration">
|
||||
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('comp_illustration')">
|
||||
{{
|
||||
(formInline.comp_illustration === 'null' || formInline.comp_illustration === ''
|
||||
|| formInline.comp_illustration === null || formInline.comp_illustration === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 是否需要稽查 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isNeedAudit')">
|
||||
<a-form-model-item class="item-model" prop="meetingSummary">
|
||||
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('meetingSummary')">
|
||||
{{
|
||||
(formInline.meetingSummary === 'null' || formInline.meetingSummary === ''
|
||||
|| formInline.meetingSummary === null || formInline.meetingSummary === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 是否需要稽查 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isNeedAudit')">
|
||||
{{ $t('workCenter.enStandardRevision.isNeedAudit') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="isNeedAudit">
|
||||
<a-radio-group v-model="formInline.isNeedAudit">
|
||||
<a-radio :value="1">
|
||||
{{ $t('yes') }}
|
||||
</a-radio>
|
||||
<a-radio :value="2">
|
||||
{{ $t('not') }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="inspectFlag">
|
||||
<a-radio-group v-model="formInline.inspectFlag">
|
||||
<a-radio :value="1">
|
||||
{{ $t('yes') }}
|
||||
</a-radio>
|
||||
<a-radio :value="0">
|
||||
{{ $t('not') }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
<!-- 是否需要稽查选择是,需要填写稽查内容,否则隐藏稽查内容区域 -->
|
||||
<template v-if="formInline.isNeedAudit === 1">
|
||||
<template v-if="formInline.inspectFlag === 1">
|
||||
<!-- 稽查内容 -->
|
||||
<p class="base-info-inner-title">{{ $t('enterpriseStandardLibrary.standard.auditContent') }}</p>
|
||||
|
||||
@@ -205,32 +184,32 @@ export default {
|
||||
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'draftingUnit_dictText',
|
||||
dataIndex: 'dept_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 起草人
|
||||
title: this.$t('workCenter.enStandardRevision.drafter'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'drafter_dictText',
|
||||
dataIndex: 'user_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 起草范围
|
||||
title: this.$t('workCenter.enStandardRevision.draftingScope'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'draftingScope',
|
||||
dataIndex: 'scope',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 截止日期
|
||||
title: this.$t('expirationDate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'expirationDate',
|
||||
dataIndex: 'deadline',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 企标文本
|
||||
dataIndex: 'standardFile_dictText',
|
||||
dataIndex: 'fileId_dictText',
|
||||
title: this.$t('workCenter.enStandardRevision.enterpriseStandardText'),
|
||||
scopedSlots: { customRender: 'standardFile' },
|
||||
align: 'center',
|
||||
@@ -238,12 +217,12 @@ export default {
|
||||
}
|
||||
],
|
||||
// 起草人表格数据
|
||||
drafterDataSource: [{id: 1, standardFile: '1715299701232504833', standardFile_dictText: '测试上传excel测试测试测试测试.xls'}],
|
||||
drafterDataSource: [],
|
||||
drafterLoading: false,
|
||||
formInline: {},
|
||||
rules: {
|
||||
// 参会人员
|
||||
conferee: [
|
||||
meetingUsers: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'),
|
||||
@@ -259,7 +238,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 是否需要稽查
|
||||
isNeedAudit: [
|
||||
inspectFlag: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.isNeedAudit') + this.$t('cannotEmpty'),
|
||||
@@ -269,25 +248,35 @@ export default {
|
||||
},
|
||||
// 稽查内容表格列
|
||||
columns: [
|
||||
{
|
||||
{ // 条款
|
||||
title: this.$t('enterpriseStandardLibrary.standard.subjectToClause'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clause',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
{ // 标准内容和要求
|
||||
title: this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'requirement',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 整改部门
|
||||
title: this.$t('enterpriseStandardLibrary.standard.rectificationDepartment'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'rectificationDepartment',
|
||||
customRender: (value, row, index) => {
|
||||
return <j-select-depart v-model={this.dataSource[index].rectificationDepartment}
|
||||
backDepart={true} />
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'center',
|
||||
width: 200
|
||||
width: 150
|
||||
}
|
||||
],
|
||||
// 稽查内容表格数据
|
||||
@@ -302,13 +291,13 @@ export default {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
// this.drafterDataSource =
|
||||
this.drafterDataSource = data.otherDraftUserVOS
|
||||
// this.dataSource =
|
||||
// this.formInline =
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
this.$nextTick(() => {
|
||||
this.$refs.baseInfoForm.initData(data)
|
||||
})
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
@@ -340,7 +329,7 @@ export default {
|
||||
// 查看企标文本
|
||||
handleLookUploadStandard (record) {
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = record.standardFile_dictText ? record.standardFile_dictText.split('.')[record.standardFile_dictText.split('.').length - 1].toLowerCase() : ''
|
||||
const fileSuffix = record.fileId_dictText ? record.fileId_dictText.split('.')[record.fileId_dictText.split('.').length - 1].toLowerCase() : ''
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
|
||||
// 判断是否为可预览格式的文件
|
||||
if (!canPreview) {
|
||||
@@ -349,10 +338,10 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.standardFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.standardFile_dictText}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.fileId}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.fileId_dictText}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
this.imageUrl = getFileAccessHttpUrl(record.standardFile)
|
||||
this.imageUrl = getFileAccessHttpUrl(record.fileId)
|
||||
// 获取viewer实例
|
||||
const viewer = this.$el.querySelector('.image').$viewer
|
||||
// 调用show方法进行显示预览图
|
||||
@@ -362,7 +351,7 @@ export default {
|
||||
}
|
||||
// pdf预览
|
||||
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
|
||||
const url = previewPdf(record.standardFile)
|
||||
const url = previewPdf(record.fileId)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
@@ -373,7 +362,7 @@ export default {
|
||||
// 下载企标文本
|
||||
handleDownloadUploadStandard (record) {
|
||||
// 下载文件
|
||||
downloadFile(`/sys/common/download/${record.standardFile}`, record.standardFile_dictText)
|
||||
downloadFile(`/sys/common/download/${record.fileId}`, record.fileId_dictText)
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
@@ -436,9 +425,9 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
.collapsible-content-no-head {
|
||||
border-top: 1px solid #E5E6EB;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
|
||||
.form-add {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.online-edit-wrapper {
|
||||
|
||||
+16
-13
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" :disabled="disabled"></base-info-form>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" :disabled="disabled" @processNameChange="processNameChange"></base-info-form>
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
@@ -73,28 +73,28 @@ export default {
|
||||
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'draftingUnit_dictText',
|
||||
dataIndex: 'dept_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 起草人
|
||||
title: this.$t('workCenter.enStandardRevision.drafter'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'drafter_dictText',
|
||||
dataIndex: 'user_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 起草范围
|
||||
title: this.$t('workCenter.enStandardRevision.draftingScope'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'draftingScope',
|
||||
dataIndex: 'scope',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 截止日期
|
||||
title: this.$t('expirationDate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'expirationDate',
|
||||
dataIndex: 'deadline',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 操作
|
||||
@@ -114,11 +114,11 @@ export default {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
// this.dataSource =
|
||||
this.dataSource = data.otherDraftUserVOS
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
this.$nextTick(() => {
|
||||
this.$refs.baseInfoForm.initData(data)
|
||||
})
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
@@ -129,19 +129,22 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate () {
|
||||
const formData = this.$refs.baseInfoForm.getDataValidate()
|
||||
if (formData && this.dataSource && this.dataSource.length > 0) {
|
||||
async getDataValidate () {
|
||||
const formData = await this.$refs.baseInfoForm.getDataValidate()
|
||||
console.log(formData)
|
||||
if (formData) {
|
||||
// 有数据可以抛出
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
data.formInline = formData.formInline
|
||||
return data
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
return false
|
||||
}
|
||||
},
|
||||
processNameChange (value) {
|
||||
this.$emit('processNameChange', value)
|
||||
},
|
||||
handleAdd () {
|
||||
this.modalType = 'add'
|
||||
this.$refs.addEditDrafterDrawer.add()
|
||||
|
||||
+5
-11
@@ -88,13 +88,7 @@ export default {
|
||||
width: 200
|
||||
}
|
||||
],
|
||||
dataSource: [
|
||||
{
|
||||
id: 1,
|
||||
expirationDate: '2023-10-08',
|
||||
drafter: 'e9ca23d68d884d4ebb19d07889727dae'
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
loading: false,
|
||||
userInfo: {}, // 当前登录人信息
|
||||
currentDate: '',
|
||||
@@ -109,11 +103,11 @@ export default {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
// this.dataSource =
|
||||
this.dataSource = data.otherDraftUserVOS
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
this.$nextTick(() => {
|
||||
this.$refs.baseInfoForm.initData(data)
|
||||
})
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
|
||||
Reference in New Issue
Block a user