[update] 企标制修订流程到评分人打分节点

This commit is contained in:
lideqin
2023-10-20 18:04:22 +08:00
parent 82e97946a5
commit 28201ba92c
12 changed files with 1377 additions and 57 deletions
@@ -55,11 +55,15 @@
<!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 节点1主起草人起草分发 -->
<main-drafter-sent-base-info v-if="currentNode === 1" :flowInitType="flowInitType" ref="baseInfoRef"></main-drafter-sent-base-info>
<main-drafter-sent-base-info v-if="currentNode === 1" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></main-drafter-sent-base-info>
<!-- 节点2其他起草人上传企标 -->
<other-drafter-upload-standard-base-info v-if="currentNode === 2" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></other-drafter-upload-standard-base-info>
<!-- 节点3主起草人汇总上传会议纪要 -->
<main-drafter-upload-minute-base-info v-if="currentNode === 3" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></main-drafter-upload-minute-base-info>
<!-- 节点4标准化审核 -->
<standardization-audit-base-info v-if="currentNode === 4" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef" @standardizationAuditIsMeeting="standardizationAuditIsMeeting"></standardization-audit-base-info>
<!-- 节点5评分人打分 -->
<scorer-mark-base-info v-if="currentNode === 5" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></scorer-mark-base-info>
<!-- 节点6标准化确认是否开启征求意见 -->
<!-- 节点7部所联络人下发 -->
<!-- 节点8征求意见对象填写意见 -->
@@ -94,7 +98,7 @@
<!-- 人员信息 -->
<div v-if="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list :url="url">
<personnel-info slot="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
</process-detail-list>
</div>
@@ -126,9 +130,9 @@
<!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 同意 -->
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle" :disabled="agreeBtnDisabled">{{ $t('agree') }}</a-button>
<!-- 驳回 -->
<a-button type="primary" :loading="loading" @click="handleReject" icon="close-circle">{{ $t('reject') }}</a-button>
<a-button type="primary" :loading="loading" @click="handleReject" icon="close-circle" :disabled="rejectBtnDisabled">{{ $t('reject') }}</a-button>
</template>
</div>
@@ -138,11 +142,16 @@
</template>
<script>
import pick from 'lodash.pick'
import InternalDetailPage from '@/components/InternalDetailPage'
import UserSelectModal from '@/components/selection/UserSelectModal'
import ProcessDetailList from '@/components/ProcessDetailList'
import PersonnelInfo from '@/components/PersonnelInfo'
import MainDrafterSentBaseInfo from './modules/MainDrafterSentBaseInfo'
import OtherDrafterUploadStandardBaseInfo from './modules/OtherDrafterUploadStandardBaseInfo'
import MainDrafterUploadMinuteBaseInfo from './modules/MainDrafterUploadMinuteBaseInfo'
import StandardizationAuditBaseInfo from './modules/StandardizationAuditBaseInfo'
import ScorerMarkBaseInfo from './modules/ScorerMarkBaseInfo'
const personData = [
{
@@ -262,6 +271,10 @@ const personData = [
export default {
name: 'EnterpriseStandardRevisionFlow',
components: {
ScorerMarkBaseInfo,
StandardizationAuditBaseInfo,
MainDrafterUploadMinuteBaseInfo,
OtherDrafterUploadStandardBaseInfo,
MainDrafterSentBaseInfo,
InternalDetailPage,
UserSelectModal,
@@ -332,19 +345,41 @@ export default {
validateTrigger: 'blur'
}
},
currentNode: 1,
currentNode: 5,
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
personnelInfoData: [], // 人员信息数据
url: {
list: '' // 人员信息右侧表的分页查询接口
},
flowInitType: 'newProcess' // 流程发起类型,是自动发起(auto)的还是从新建流程发起的(newProcess)
flowInitType: 'newProcess', // 流程发起类型,是自动发起(auto)的还是从新建流程发起的(newProcess)
rejectBtnDisabled: false, // 驳回按钮是否置灰
agreeBtnDisabled: false // 同意按钮是否置灰
}
},
methods: {
switchChange (value) {
this.switchValue = value
},
// 标准化审核节点是否可进行评审会修改
standardizationAuditIsMeeting (value) {
// 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击
if (value === 1) {
// 选了是
this.validatorRules.remarks.rules[0].required = false
this.rejectBtnDisabled = true
this.agreeBtnDisabled = false
} else {
// 选了否
this.validatorRules.remarks.rules[0].required = true
const obj = {}
obj.remarks = '驳回' + this.processInfoForm.getFieldValue('remarks')
this.$nextTick(() => {
this.processInfoForm.setFieldsValue(pick(obj, 'remarks'))
})
this.rejectBtnDisabled = false
this.agreeBtnDisabled = true
}
},
// 保存
handleSave () {
// 有任意一项填了即可
@@ -5,6 +5,7 @@
:width="width"
:visible="visible"
switchFullscreen
destroyOnClose
:confirm-loading="confirmLoading"
@ok="handleOk"
@cancel="handleCancel">
@@ -12,15 +13,22 @@
<a-form :form="form">
<a-row :gutter="24">
<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]"
@back="draftingUnitBack"
:backDepart="true" />
</a-form-item>
</a-col>
<a-col :span="24">
<!-- 起草人 -->
<!-- 起草人 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"
@nameChange="userSelectNameChange"
:nameStr="model.drafter_dictText"
type="radio" />
</a-form-item>
</a-col>
<a-col :span="24">
@@ -29,16 +37,16 @@
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.standardDetail.standardNumber')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="50"
disabled
v-decorator="['draftingScope', validatorRules.draftingScope]" />
</a-form-item>
</a-col>
<a-col :span="24">
<!-- 截止时间 -->
<a-form-item :label="$t('deadline')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-date-picker :placeholder="$t('pleaseSelect') + $t('deadline')"
v-decorator="['quizTime', validatorRules.quizTime]"
showTime
<!-- 截止日期 -->
<a-form-item :label="$t('expirationDate')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
v-decorator="['expirationDate', validatorRules.expirationDate]"
value-format="YYYY-MM-DD"
:showTime="false"
style="width: 100%" />
</a-form-item>
</a-col>
@@ -49,19 +57,21 @@
<script>
import pick from 'lodash.pick'
import UserSelection from '@/components/selection/UserSelection'
export default {
name: 'AddEditDrafterDrawer',
components: { UserSelection },
data () {
return {
width: 800,
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
modal: {},
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 8 }
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
@@ -77,19 +87,19 @@ export default {
},
validatorRules: {
draftingUnit: {
rules: [{ required: false, message: this.$t('pleaseSelect') + this.$t('project') }],
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.enStandardRevision.draftingUnit') }],
validateTrigger: 'change'
},
drafter: {
rules: [{ required: false, message: this.$t('pleaseSelect') + this.$t('project') }],
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.enStandardRevision.drafter') }],
validateTrigger: 'change'
},
draftingScope: {
rules: [{ required: false, message: this.$t('pleaseSelect') + this.$t('project') }],
validateTrigger: 'change'
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.draftingScope') }],
validateTrigger: 'blur'
},
deadline: {
rules: [{ required: false, message: this.$t('pleaseSelect') + this.$t('project') }],
expirationDate: {
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('expirationDate') }],
validateTrigger: 'change'
}
}
@@ -104,16 +114,27 @@ export default {
this.form.resetFields()
this.model = Object.assign({}, record)
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'draftingUnit', 'drafter', 'draftingScope', 'deadline'))
this.form.setFieldsValue(pick(this.model, 'draftingUnit', 'drafter', 'draftingScope', 'expirationDate'))
})
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.model[fieldName + '_dictText'] = value
},
// 起草单位回调
draftingUnitBack (value) {
console.log(value)
this.model.draftingUnit_dictText = value.map(item => item.text).join(',')
},
handleOk () {
if (this.confirmLoading) return
this.form.validateFields((err, values) => {
if (!err) {
const value = Object.assign({}, values, this.model)
this.confirmLoading = true
this.$emit('ok', values)
this.$emit('ok', value)
this.confirmLoading = false
this.close()
}
})
},
@@ -267,7 +267,7 @@ export default {
ruleList.forEach((res, index) => {
const rule = []
if (res.fieldMustInput === '1') {
if ([FieldType.TEXT_BOX.value, FieldType.TEXTAREA.value, FieldType.TEXT_LINK.value].includes(res.fieldShowType)) {
if ([FieldType.TEXT_BOX.value, FieldType.TEXTAREA.value].includes(res.fieldShowType)) {
rule.push({
required: true,
message: res.dbFieldTxt + this.$t('cannotEmpty'),
@@ -1,6 +1,6 @@
<template>
<div>
<base-info-form ref="baseInfoForm" :flowInitType="flowInitType"></base-info-form>
<base-info-form ref="baseInfoForm" v-bind="$attrs" :disabled="disabled"></base-info-form>
<!-- 标准文本 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
@@ -18,7 +18,7 @@
</div>
<!-- 其他起草人 -->
<!-- 添加其他起草人 -->
<p>{{ $t('workCenter.enStandardRevision.addOtherDrafter') }}</p>
<p class="base-info-inner-title">{{ $t('workCenter.enStandardRevision.addOtherDrafter') }}</p>
<!-- 操作区域 -->
<div v-if="!disabled" class="table-operator">
<!-- 新增 -->
@@ -36,8 +36,7 @@
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
:loading="loading">
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
@@ -48,28 +47,68 @@
</j-table>
</div>
<add-edit-drafter-drawer ref="addEditDrafterDrawer" @ok="modalFormOk"></add-edit-drafter-drawer>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
import BaseInfoForm from './BaseInfoForm'
import AddEditDrafterDrawer from './AddEditDrafterDrawer'
export default {
name: 'MainDrafterSentBaseInfo',
components: { BaseInfoForm, JTable },
components: { AddEditDrafterDrawer, BaseInfoForm, JTable },
props: {
// 流程发起类型,是自动发起(auto)的还是从新建流程发起的(newProcess)
flowInitType: {
type: String,
disabled: {
type: Boolean,
required: false,
default: ''
default: false
}
},
data () {
return {
disabled: false,
columns: [
{ // 起草单位
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
align: 'center',
width: 180,
dataIndex: 'draftingUnit_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草人
title: this.$t('workCenter.enStandardRevision.drafter'),
align: 'center',
width: 180,
dataIndex: 'drafter_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草范围
title: this.$t('workCenter.enStandardRevision.draftingScope'),
align: 'center',
width: 180,
dataIndex: 'draftingScope',
scopedSlots: { customRender: 'text' }
},
{ // 截止日期
title: this.$t('expirationDate'),
align: 'center',
width: 180,
dataIndex: 'expirationDate',
scopedSlots: { customRender: 'text' }
},
{ // 操作
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
dataSource: [],
loading: false,
data: {}, // 初始化获取的数据
modalType: undefined // 当前是新增还是编辑编辑的话是edit+编辑行的下标
}
},
methods: {
@@ -79,9 +118,9 @@ export default {
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
// 给表单赋值
this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
})
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
},
// 外层要获取数据
getData () {
@@ -104,7 +143,27 @@ export default {
return false
}
},
handleAdd () {}
handleAdd () {
this.modalType = 'add'
this.$refs.addEditDrafterDrawer.add()
},
// 编辑
handleEdit (record, index) {
this.modalType = 'edit' + index
this.$refs.addEditDrafterDrawer.edit(record)
},
// 删除
handleDelete (id, index) {
this.dataSource.splice(index, 1)
},
// 新增或编辑完成
modalFormOk (value) {
if (this.modalType === 'add') {
this.dataSource.push(value)
} else if (this.modalType && this.modalType.split(',')[0] === 'edit') {
this.dataSource.splice(Number(this.modalType.split(',')[1]), 1, value)
}
}
}
}
</script>
@@ -126,4 +185,10 @@ export default {
height: 100%;
}
}
.base-info-inner-title {
color: #1D2129;
font-size: 16px;
font-weight: 500;
}
</style>
@@ -1,29 +1,466 @@
<template>
<div>
<!-- 标准文本 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="drafterColumns"
:dataSource="drafterDataSource"
:pagination="false"
:loading="drafterLoading">
<!-- 企标文本 -->
<template v-slot:standardFile="{text, record}">
<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="download-a" @click="handleDownloadUploadStandard(record)">{{ $t('download') }}</a>
</div>
</a-tooltip>
</template>
</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">
<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 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')">
{{ $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')">
{{ $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>
</div>
</a-form-model-item>
</div>
</a-form-model>
<!-- 是否需要稽查选择是需要填写稽查内容否则隐藏稽查内容区域 -->
<template v-if="formInline.isNeedAudit === 1">
<!-- 稽查内容 -->
<p class="base-info-inner-title">{{ $t('enterpriseStandardLibrary.standard.auditContent') }}</p>
<!-- 操作区域 -->
<div v-if="!disabled" class="table-operator">
<!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
{{ $t('newlyAdded') }}
</a-button>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading">
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
</div>
</j-table>
</div>
</template>
<!-- 预览图片的容器 -->
<div id="images">
<div class="image" v-viewer="{movable: false}">
<img v-show="image" :src="imageUrl">
</div>
</div>
<!-- 稽查内容新增编辑弹框 -->
<check-content-modal ref="checkContentModal" @ok="checkContentOk"></check-content-modal>
<!-- 上传文件弹框 -->
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :fileMaxSize="fileMaxSize" :disabled="disabled"></upload-file>
</div>
</template>
<script>
import BaseInfoForm from './BaseInfoForm'
import UserSelection from '@/components/selection/UserSelection'
import JTable from '@/components/jero/JTable'
import CheckContentModal from '@/views/enterpriseStandardLibrary/standard/modules/CheckContentModal'
import UploadFile from '@/components/UploadFile'
import Vue from 'vue'
import { previewPdf } from '@/utils/previewPdf'
import { downloadFile, getFileAccessHttpUrl } from '@/api/manage'
import { ACCESS_TOKEN } from '@/store/mutation-types'
// 支持预览的文件后缀
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'raw', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'mp3', 'mp4', 'flv']
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
const FILE_TYPE_PDF = 'pdf'
const Base64 = require('js-base64').Base64
export default {
name: 'MainDrafterUploadMinuteBaseInfo'
name: 'MainDrafterUploadMinuteBaseInfo',
components: { BaseInfoForm, UserSelection, JTable, CheckContentModal, UploadFile },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
// 起草人表格列数据
drafterColumns: [
{ // 起草单位
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
align: 'center',
width: 180,
dataIndex: 'draftingUnit_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草人
title: this.$t('workCenter.enStandardRevision.drafter'),
align: 'center',
width: 180,
dataIndex: 'drafter_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草范围
title: this.$t('workCenter.enStandardRevision.draftingScope'),
align: 'center',
width: 180,
dataIndex: 'draftingScope',
scopedSlots: { customRender: 'text' }
},
{ // 截止日期
title: this.$t('expirationDate'),
align: 'center',
width: 180,
dataIndex: 'expirationDate',
scopedSlots: { customRender: 'text' }
},
{ // 企标文本
dataIndex: 'standardFile_dictText',
title: this.$t('workCenter.enStandardRevision.enterpriseStandardText'),
scopedSlots: { customRender: 'standardFile' },
align: 'center',
width: 200
}
],
// 起草人表格数据
drafterDataSource: [{id: 1, standardFile: '1715299701232504833', standardFile_dictText: '测试上传excel测试测试测试测试.xls'}],
drafterLoading: false,
formInline: {},
rules: {
// 参会人员
conferee: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 会议纪要
meetingSummary: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.meetingSummary') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 是否需要稽查
isNeedAudit: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.isNeedAudit') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
// 稽查内容表格列
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('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
width: 200
}
],
// 稽查内容表格数据
dataSource: [],
loading: false,
fileMaxSize: undefined,
image: false,
imageUrl: ''
}
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.drafterDataSource =
// this.dataSource =
// this.formInline =
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.dataSource = this.dataSource
data.uploadMinuteFormInline = this.formInline
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate () {
this.$refs.ruleForm.validate(valid => {
if (valid) {
if (this.dataSource && this.dataSource.length > 0) {
// 有数据可以抛出
const data = {}
data.dataSource = this.dataSource
data.uploadMinuteFormInline = this.formInline
return data
} else {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
return false
}
}
})
},
// 查看企标文本
handleLookUploadStandard (record) {
// 截取文件后缀名
const fileSuffix = record.standardFile_dictText ? record.standardFile_dictText.split('.')[record.standardFile_dictText.split('.').length - 1].toLowerCase() : ''
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
// 判断是否为可预览格式的文件
if (!canPreview) {
this.$message.loading('该文件类型不支持预览,正在为您准备下载...').then(() => {
this.handleDownloadUploadStandard(record)
})
return
}
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${record.standardFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.standardFile_dictText}`
// 图片预览,使用自己添加的组件
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) {
this.imageUrl = getFileAccessHttpUrl(record.standardFile)
// 获取viewer实例
const viewer = this.$el.querySelector('.image').$viewer
// 调用show方法进行显示预览图
viewer.show()
// this.$refs.imagePreviewModal.open(file)
return
}
// pdf预览
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
const url = previewPdf(record.standardFile)
window.open(url)
return
}
// 其余可预览文件仍使用KKFile进行预览
const url = window._CONFIG.onlinePreviewDomainURL + '?url=' + encodeURIComponent(Base64.encode(fileFullUrl))
window.open(url)
},
// 下载企标文本
handleDownloadUploadStandard (record) {
// 下载文件
downloadFile(`/sys/common/download/${record.standardFile}`, record.standardFile_dictText)
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 点击文件上传
clickButtonToUpload (fieldName) {
if (fieldName === 'uploadAttachment') {
this.fileMaxSize = 10
} else {
this.fileMaxSize = undefined
}
this.$refs.uploadFile.open(this.formInline[fieldName])
this.uploadName = fieldName
},
// 文件上传改变后的回调
uploadFileChange (data) {
const attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id)
})
}
/** 赋值给当前对应的表单文件 */
this.formInline[this.uploadName] = attIdList.join(',')
this.formInline = { ...this.formInline }
},
// 稽查内容的添加
handleAdd () {
// 新增左侧的预览文件,还不知道要赋值哪个文件 ??
const standardFile = ''
this.$refs.checkContentModal.title = this.$t('newlyAdded')
this.$refs.checkContentModal.add(standardFile)
},
// 稽查内容的编辑
handleEdit (record, index) {
// 编辑左侧的预览文件,还不知道要赋值哪个文件 ??
const standardFile = ''
this.$refs.checkContentModal.title = this.$t('edit')
this.$refs.checkContentModal.edit(standardFile, record, index)
},
// 稽查内容的删除
handleDelete (index) {
this.dataSource.splice(index, 1)
},
// 稽查内容新增编辑完成
checkContentOk (value, index) {
console.log(value, index)
if (index || index === 0) {
// 有下标,说明是编辑
this.dataSource.splice(index, 1, value)
} else {
// 没有下标, 是新增
this.dataSource.push(value)
}
}
}
}
</script>
<style scoped>
<style scoped lang="less">
@import '~@assets/less/common.less';
.collapsible-content-no-head {
border-top: 1px solid #E5E6EB;
border-radius: 8px 8px 8px 8px;
}
.online-edit-wrapper {
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
p {
margin-bottom: 0;
height: 100%;
}
}
.base-info-inner-title {
color: #1D2129;
font-size: 16px;
font-weight: 500;
}
.standard-file-div {
display: flex;
.download-a {
width: 50%;
}
}
</style>
@@ -0,0 +1,167 @@
<template>
<div>
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading">
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<!-- 上传企标 只能上传分配给自己的上传企标,到期未上传跳过该起草人操作列表显示- -->
<a v-if="record.drafter === userInfo.id && record.expirationDate < currentDate"
@click="handleUploadStandard(record, index)"
class="table-ope-btn"
:disabled="disabled"
>
{{ $t('workCenter.enStandardRevision.uploadStandard') }}
</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</div>
</j-table>
</div>
<!-- 上传文件弹框 -->
<upload-file ref="uploadFile" @change="uploadFileChange" :multiple="false" :number="1" :return-url="false" :disabled="disabled"></upload-file>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
import BaseInfoForm from './BaseInfoForm'
import UploadFile from '@/components/UploadFile'
import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
export default {
name: 'OtherDrafterUploadStandardBaseInfo',
components: { BaseInfoForm, JTable, UploadFile },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
columns: [
{ // 起草单位
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
align: 'center',
width: 180,
dataIndex: 'draftingUnit_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草人
title: this.$t('workCenter.enStandardRevision.drafter'),
align: 'center',
width: 180,
dataIndex: 'drafter_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草范围
title: this.$t('workCenter.enStandardRevision.draftingScope'),
align: 'center',
width: 180,
dataIndex: 'draftingScope',
scopedSlots: { customRender: 'text' }
},
{ // 截止日期
title: this.$t('expirationDate'),
align: 'center',
width: 180,
dataIndex: 'expirationDate',
scopedSlots: { customRender: 'text' }
},
{ // 操作
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
dataSource: [
{
id: 1,
expirationDate: '2023-10-08',
drafter: 'e9ca23d68d884d4ebb19d07889727dae'
}
],
loading: false,
data: {}, // 初始化获取的数据
userInfo: {}, // 当前登录人信息
currentDate: '',
uploadIndex: undefined // 正在上传企标的下标
}
},
mounted () {
this.userInfo = Vue.ls.get(USER_INFO)
this.currentDate = new Date().getFullYear() + '-' + new Date().getMonth() + '-' + new Date().getDate()
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
},
// 外层要获取数据
getData () {
// 把数据抛出
return this.dataSource
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate () {
if (this.dataSource && this.dataSource.length > 0) {
// 看能上传企标的行是否都上传了
let hasErr = false
for (const item of this.dataSource) {
if (item.drafter === this.userInfo.id && item.expirationDate < this.currentDate && !item.standardFile) {
// 需要上传企标,但是没有企标文件
hasErr = true
}
}
// 根据hasErr看有没有通过校验
if (hasErr) {
this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseUploadStandard'))
return false
} else {
return this.dataSource
}
}
},
// 上传企标
handleUploadStandard (record, index) {
this.$refs.uploadFile.open(record.standardFile)
this.uploadIndex = index
},
// 上传企标后的回调
uploadFileChange (data) {
const attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id)
})
}
/** 赋值给对应行的企标 */
this.dataSource[this.uploadIndex].standardFile = attIdList.join(',')
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,331 @@
<template>
<div>
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
<!-- 标准文本 -->
<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>
<a-table
bordered
:scroll="{x: '100%'}"
:columns="columns"
:dataSource="dataSource"
rowKey="id"
:pagination="false"
>
<template slot="text" slot-scope="text">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div>{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip>
</template>
</a-table>
</div>
</template>
<script>
import BaseInfoForm from './BaseInfoForm'
const fixDataSourse = [
{
id: 1,
project: '文本格式(15)',
desc: '评估标准文件的格式是否符合GB/T 1.1的要求,包括文件名、编号、版本号、' +
'发布日期、生效日期、引用文件章节、图表等内容是否齐全、准确、清晰。',
score: '一般',
scoreRange: '0~5'
},
{
id: 2,
score: '优秀',
scoreRange: '6~10'
},
{
id: 3,
score: '优秀',
scoreRange: '11~15'
},
{
id: 4,
project: '标准内容(45)',
desc: '评估标准文件的内容是否详细准确、内容详实、逻辑清晰、科学合理。包括术语定义、' +
'引用标准、技术要求、试验检测方法等各个方面是否符合/严于法律法规、国家标准、行业标准等要求。',
score: '一般',
scoreRange: '0~20'
},
{
id: 5,
score: '优秀',
scoreRange: '21~35'
},
{
id: 6,
score: '优秀',
scoreRange: '36~45'
},
{
id: 7,
project: '适用性 (10)',
desc: '评估标准文件的应用范围是否明确、适用,是否与研发工艺、质量、生产、采购等环节相符合。',
score: '一般',
scoreRange: '0~3'
},
{
id: 8,
score: '优秀',
scoreRange: '4~6'
},
{
id: 9,
score: '优秀',
scoreRange: '7~10'
},
{
id: 10,
project: '完整性 (15)',
desc: '评估标准文件所涉及的专业领域是否全面、系统,是否涵盖了所有相关模版' +
'(比如设计规范模版、释放规范模版、产品技术条件模版)所规定的要素和环节。',
score: '一般',
scoreRange: '0~5'
},
{
id: 11,
score: '优秀',
scoreRange: '6~10'
},
{
id: 12,
score: '优秀',
scoreRange: '11~15'
},
{
id: 13,
project: '可读性 (5)',
desc: '评估标准文件的可读性是否良好,是否有错别字,是否易于阅读和理解。',
score: '一般',
scoreRange: '0~2'
},
{
id: 14,
score: '优秀',
scoreRange: '3~4'
},
{
id: 15,
score: '优秀',
scoreRange: '5'
},
{
id: 16,
project: '权威性及可执行性(10)',
desc: '评估标准文件的权威性是否足够,是否得到了相关方的认可和信任,是否得到了有效的贯彻和执行。',
score: '一般',
scoreRange: '0~3'
},
{
id: 17,
score: '优秀',
scoreRange: '4~6'
},
{
id: 18,
score: '优秀',
scoreRange: '7~10'
}
]
export default {
name: 'ScorerMarkBaseInfo',
components: { BaseInfoForm },
data () {
return {
columns: [
{
title: this.$t('enterpriseStandardLibrary.reviewMeeting.project'),
align: 'center',
width: 100,
dataIndex: 'project',
customRender: (text, row, index) => {
const obj = {
children: text || this.global.emptyLine,
attrs: {}
}
if (index % 3 === 0) {
obj.attrs.rowSpan = 3
} else if (index % 3 !== 0 && index !== 19) {
obj.attrs.rowSpan = 0
}
if (index === 19) {
obj.attrs.colSpan = 6
}
return obj
}
},
{
title: this.$t('enterpriseStandardLibrary.reviewMeeting.desc'),
align: 'center',
// width: 100,
dataIndex: 'desc',
customRender: (text, row, index) => {
const obj = {
children: text || this.global.emptyLine,
attrs: {}
}
if (index % 3 === 0) {
obj.attrs.rowSpan = 3
} else if (index % 3 !== 0 && index !== 19) {
obj.attrs.rowSpan = 0
}
if (index === 19) {
obj.attrs.colSpan = 0
}
return obj
}
},
{
title: this.$t('enterpriseStandardLibrary.reviewMeeting.score'),
align: 'center',
width: 100,
dataIndex: 'score',
colSpan: 2,
customRender: (text, row, index) => {
const obj = {
children: text || this.global.emptyLine,
attrs: {}
}
if (index === 19) {
obj.attrs.colSpan = 0
}
return obj
}
},
{
title: this.$t('enterpriseStandardLibrary.reviewMeeting.score'),
align: 'center',
width: 100,
dataIndex: 'scoreRange',
colSpan: 0
},
{
title: this.$t('enterpriseStandardLibrary.reviewMeeting.grade'),
align: 'center',
width: 150,
dataIndex: 'evaluateScore',
customRender: (text, row, index) => {
const obj = {
children: <a-input v-model={this.dataSource[index].evaluateScore} maxLength={50}
title={this.dataSource[index].evaluateScore} placeholder={'请输入'}
onChange={ e => {
e.target.value = (e.target.value.replace(/[^0-9-]/g, '')).trim()
this.dataSource[index].evaluateScore = (e.target.value.replace(/[^0-9-]/g, '')).trim()
} }
/>,
attrs: {}
}
if (index === 19) {
obj.attrs.colSpan = 0
}
if (index % 3 === 0) {
obj.attrs.rowSpan = 3
} else {
obj.attrs.rowSpan = 0
}
return obj
}
},
{
title: this.$t('enterpriseStandardLibrary.reviewMeeting.groundsForDemerit'),
align: 'center',
width: 300,
dataIndex: 'deductionScoreReason',
customRender: (text, row, index) => {
const obj = {
children: <a-input v-model={this.dataSource[index].deductionScoreReason} maxLength={50}
title={this.dataSource[index].deductionScoreReason} placeholder={'请输入'}
onChange={ e => {
e.target.value = (e.target.value.replace(/[^0-9-]/g, '')).trim()
this.dataSource[index].deductionScoreReason = (e.target.value.replace(/[^0-9-]/g, '')).trim()
} }
/>,
attrs: {}
}
if (index === 19) {
obj.attrs.colSpan = 0
}
if (index % 3 === 0) {
obj.attrs.rowSpan = 3
} else {
obj.attrs.rowSpan = 0
}
return obj
}
}
],
dataSource: []
}
},
mounted () {
this.dataSource = fixDataSourse
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.dataSource = this.dataSource
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate () {
let hasErr = false
for (const item of this.dataSource) {
if (!item.evaluateScore || !item.deductionScoreReason) {
hasErr = true
break
}
}
if (hasErr) {
this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseEnterAllMarkItem'))
return false
} else {
return this.dataSource
}
},
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.online-edit-wrapper {
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
p {
margin-bottom: 0;
height: 100%;
}
}
</style>
@@ -0,0 +1,234 @@
<template>
<div>
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
<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">
<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 title-text-long">
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isCanAuditMeeting')">
{{ $t('workCenter.enStandardRevision.isCanAuditMeeting') }}
</span>
</div>
<a-form-model-item class="item-model" prop="isCanAuditMeeting">
<a-radio-group v-model="formInline.isCanAuditMeeting" @change="isCanAuditMeetingChange" :defaultValue="1">
<a-radio :value="1">
{{ $t('yes') }}
</a-radio>
<a-radio :value="2">
{{ $t('not') }}
</a-radio>
</a-radio-group>
</a-form-model-item>
</div>
<template v-if="formInline.isCanAuditMeeting === 1">
<!-- 评审人 -->
<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.assessor')">
{{ $t('workCenter.enStandardRevision.assessor') }}
</span>
</div>
<a-form-model-item class="item-model" prop="assessor">
<user-selection v-model="formInline.assessor"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.assessor')"
:disabled="disabled"
filedName="assessor"
@nameChange="userSelectNameChange"
:nameStr="formInline.assessor_dictText"
type="radio"/>
</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.scorer')">
{{ $t('workCenter.enStandardRevision.scorer') }}
</span>
</div>
<a-form-model-item class="item-model" prop="scorer">
<user-selection v-model="formInline.scorer"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.scorer')"
:disabled="disabled"
filedName="scorer"
@nameChange="userSelectNameChange"
:nameStr="formInline.scorer_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.reviewDate')">
{{ $t('workCenter.enStandardRevision.reviewDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="reviewDate">
<a-date-picker v-model="formInline.reviewDate"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.reviewDate')"
:showTime="false"
value-format="YYYY-MM-DD"
:disabled="disabled"></a-date-picker>
</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.judgingVenue')">
{{ $t('workCenter.enStandardRevision.judgingVenue') }}
</span>
</div>
<a-form-model-item class="item-model" prop="judgingVenue">
<a-input class="box-input"
v-model="formInline.judgingVenue"
:maxLength="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardRevision.judgingVenue')" />
</a-form-model-item>
</div>
</template>
</div>
</div>
</a-form-model>
</div>
</template>
<script>
import BaseInfoForm from './BaseInfoForm'
import UserSelection from '@/components/selection/UserSelection'
export default {
name: 'StandardizationAuditBaseInfo',
components: { BaseInfoForm, UserSelection },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
formInline: {},
rules: {
// 评审人
assessor: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.assessor') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 评分人
scorer: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.scorer') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 评审日期
reviewDate: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.reviewDate') + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
}
],
// 评审地点
judgingVenue: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.judgingVenue') + this.$t('cannotEmpty'),
trigger: 'blur'
}
]
}
}
},
mounted () {
const formInline = {}
formInline.isCanAuditMeeting = 1
this.formInline = Object.assign({}, formInline)
this.isCanAuditMeetingChange()
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.formInline =
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.standardAuditFormInline = this.formInline
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate () {
this.$refs.ruleForm.validate(valid => {
if (valid) {
const data = {}
data.standardAuditFormInline = this.formInline
return data
}
})
},
// 是否可进行评审会
isCanAuditMeetingChange () {
// 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击
this.$emit('standardizationAuditIsMeeting', this.formInline.isCanAuditMeeting)
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.collapsible-content-no-head {
border-top: 1px solid #E5E6EB;
border-radius: 8px 8px 8px 8px;
}
.online-edit-wrapper {
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
p {
margin-bottom: 0;
height: 100%;
}
}
.title-text-long {
width: 220px !important;
}
</style>