[update] 企标制修订流程页面
This commit is contained in:
@@ -122,7 +122,25 @@ module.exports = {
|
||||
scorer: '评分人',
|
||||
reviewDate: '评审日期',
|
||||
judgingVenue: '评审地点',
|
||||
pleaseEnterAllMarkItem: '请填写所有评分项'
|
||||
pleaseEnterAllMarkItem: '请填写所有评分项',
|
||||
isOpenComment: '是否开启征求意见',
|
||||
departmentalLiaison: '部门联络人',
|
||||
deadlineForComments: '征求意见截止日期',
|
||||
workingGroup: '工作组',
|
||||
clauseNumber: '条款号',
|
||||
clauseName: '条款名称',
|
||||
contentOfRevisedOpinion: '修改意见内容(包括修改理由和依据)',
|
||||
departLiaisonLeader: '部门联络人主管级领导',
|
||||
proposer: '意见提出人',
|
||||
handlingSuggestion: '处理意见',
|
||||
reason: '理由',
|
||||
proofreader: '校对人(其他起草人)',
|
||||
approverLeader: '审批人(主管级领导)',
|
||||
approverStandardization: '审批人(标准化)',
|
||||
countersign: '会签(相关部门领导)',
|
||||
approverHeadEngineer: '审批(总工程师)',
|
||||
releaseDate: '发布日期',
|
||||
implementationDate: '实施日期'
|
||||
},
|
||||
// 流程配置
|
||||
processConfig: {
|
||||
|
||||
@@ -122,7 +122,25 @@ module.exports = {
|
||||
scorer: '评分人',
|
||||
reviewDate: '评审日期',
|
||||
judgingVenue: '评审地点',
|
||||
pleaseEnterAllMarkItem: '请填写所有评分项'
|
||||
pleaseEnterAllMarkItem: '请填写所有评分项',
|
||||
isOpenComment: '是否开启征求意见',
|
||||
departmentalLiaison: '部门联络人',
|
||||
deadlineForComments: '征求意见截止日期',
|
||||
workingGroup: '工作组',
|
||||
clauseNumber: '条款号',
|
||||
clauseName: '条款名称',
|
||||
contentOfRevisedOpinion: '修改意见内容(包括修改理由和依据)',
|
||||
departLiaisonLeader: '部门联络人主管级领导',
|
||||
proposer: '意见提出人',
|
||||
handlingSuggestion: '处理意见',
|
||||
reason: '理由',
|
||||
proofreader: '校对人(其他起草人)',
|
||||
approverLeader: '审批人(主管级领导)',
|
||||
approverStandardization: '审批人(标准化)',
|
||||
countersign: '会签(相关部门领导)',
|
||||
approverHeadEngineer: '审批(总工程师)',
|
||||
releaseDate: '发布日期',
|
||||
implementationDate: '实施日期'
|
||||
},
|
||||
// 流程配置
|
||||
processConfig: {
|
||||
|
||||
@@ -59,24 +59,34 @@
|
||||
<!-- 节点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>
|
||||
<main-drafter-collect-upload-minute-base-info v-if="currentNode === 3" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></main-drafter-collect-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、标准化确认是否开启征求意见 -->
|
||||
<confirm-whether-comment-base-info v-if="currentNode === 6" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></confirm-whether-comment-base-info>
|
||||
<!-- 节点7、部所联络人下发 -->
|
||||
<depart-liaison-issue-base-info v-if="currentNode === 7" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></depart-liaison-issue-base-info>
|
||||
<!-- 节点8、征求意见对象填写意见 -->
|
||||
<comment-object-enter-base-info v-if="currentNode === 8" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></comment-object-enter-base-info>
|
||||
<!-- 节点9、部所联络人汇总数据 -->
|
||||
<depart-liaison-collect-base-info v-if="currentNode === 9" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></depart-liaison-collect-base-info>
|
||||
<!-- 节点10、部所联络人主管级领导审批 -->
|
||||
<depart-liaison-leader-approve-base-info v-if="currentNode === 10" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></depart-liaison-leader-approve-base-info>
|
||||
<!-- 节点11、主起草人汇总 -->
|
||||
<main-drafter-collect-base-info v-if="currentNode === 11" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></main-drafter-collect-base-info>
|
||||
<!-- 节点12、主起草人上传会议纪要 -->
|
||||
<main-drafter-upload-minute-base-info v-if="currentNode === 12" :flowInitType="flowInitType" :disabled="disabled" 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)" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></other-drafter-proofread-base-info>
|
||||
<!-- 节点18、主起草人发布 -->
|
||||
<main-drafter-publish-base-info v-if="currentNode === 18" :flowInitType="flowInitType" :disabled="disabled" ref="baseInfoRef"></main-drafter-publish-base-info>
|
||||
|
||||
<!-- 流程审批信息 -->
|
||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||
@@ -149,9 +159,18 @@ 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'
|
||||
import ConfirmWhetherCommentBaseInfo from './modules/ConfirmWhetherCommentBaseInfo'
|
||||
import DepartLiaisonIssueBaseInfo from './modules/DepartLiaisonIssueBaseInfo'
|
||||
import CommentObjectEnterBaseInfo from './modules/CommentObjectEnterBaseInfo'
|
||||
import DepartLiaisonCollectBaseInfo from './modules/DepartLiaisonCollectBaseInfo'
|
||||
import DepartLiaisonLeaderApproveBaseInfo from './modules/DepartLiaisonLeaderApproveBaseInfo'
|
||||
import MainDrafterCollectBaseInfo from './modules/MainDrafterCollectBaseInfo'
|
||||
import MainDrafterCollectUploadMinuteBaseInfo from './modules/MainDrafterCollectUploadMinuteBaseInfo'
|
||||
import MainDrafterUploadMinuteBaseInfo from './modules/MainDrafterUploadMinuteBaseInfo'
|
||||
import OtherDrafterProofreadBaseInfo from './modules/OtherDrafterProofreadBaseInfo'
|
||||
import MainDrafterPublishBaseInfo from './modules/MainDrafterPublishBaseInfo'
|
||||
|
||||
const personData = [
|
||||
{
|
||||
@@ -271,9 +290,18 @@ const personData = [
|
||||
export default {
|
||||
name: 'EnterpriseStandardRevisionFlow',
|
||||
components: {
|
||||
MainDrafterPublishBaseInfo,
|
||||
OtherDrafterProofreadBaseInfo,
|
||||
MainDrafterUploadMinuteBaseInfo,
|
||||
MainDrafterCollectUploadMinuteBaseInfo,
|
||||
MainDrafterCollectBaseInfo,
|
||||
DepartLiaisonLeaderApproveBaseInfo,
|
||||
DepartLiaisonCollectBaseInfo,
|
||||
CommentObjectEnterBaseInfo,
|
||||
DepartLiaisonIssueBaseInfo,
|
||||
ConfirmWhetherCommentBaseInfo,
|
||||
ScorerMarkBaseInfo,
|
||||
StandardizationAuditBaseInfo,
|
||||
MainDrafterUploadMinuteBaseInfo,
|
||||
OtherDrafterUploadStandardBaseInfo,
|
||||
MainDrafterSentBaseInfo,
|
||||
InternalDetailPage,
|
||||
@@ -345,7 +373,7 @@ export default {
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
},
|
||||
currentNode: 5,
|
||||
currentNode: 18,
|
||||
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
|
||||
personnelInfoData: [], // 人员信息数据
|
||||
url: {
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:maskClosable="true"
|
||||
:width="500"
|
||||
:closable="true"
|
||||
@cancel="handleCancel"
|
||||
fullscreen
|
||||
@ok="handleOk"
|
||||
:visible="visible">
|
||||
<div class="content">
|
||||
<!-- 左侧文件预览 -->
|
||||
<div class="content-left">
|
||||
<iframe v-if="iframeSrc" :src="iframeSrc" width="100%" frameborder="0"></iframe>
|
||||
<a-empty class="empty-file" v-else description="当前文件类型暂不支持预览"></a-empty>
|
||||
</div>
|
||||
<!-- 右侧表单区域 -->
|
||||
<div class="content-right">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<!-- 条款号 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardRevision.clauseNumber')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.clauseNumber')"
|
||||
:maxLength="50"
|
||||
v-decorator.trim="[ 'clauseNumber', validatorRules.clauseNumber ]" />
|
||||
</a-form-item>
|
||||
<!-- 条款名称 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardRevision.clauseName')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.clauseName')"
|
||||
:maxLength="50"
|
||||
v-decorator.trim="[ 'clauseName', validatorRules.clauseName ]" />
|
||||
</a-form-item>
|
||||
<!-- 修改意见内容(包括修改理由和依据) -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardRevision.contentOfRevisedOpinion')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.contentOfRevisedOpinion')"
|
||||
:maxLength="50"
|
||||
v-decorator.trim="[ 'contentOfRevisedOpinion', validatorRules.contentOfRevisedOpinion ]" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import { getFileInfo } from '@/api/api'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
export default {
|
||||
name: 'CommentModal',
|
||||
data () {
|
||||
return {
|
||||
title: '',
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 10 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 12 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 条款号
|
||||
clauseNumber: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.clauseNumber') }
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 条款名称
|
||||
clauseName: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.clauseName') }
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 修改意见内容(包括修改理由和依据)
|
||||
contentOfRevisedOpinion: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion') }
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
},
|
||||
index: undefined, // 编辑的表格的下标
|
||||
iframeSrc: '' // 左侧预览的路径
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add (file) {
|
||||
this.getFileInfo(file).then(res => {
|
||||
this.handlePreview(res)
|
||||
})
|
||||
this.visible = true
|
||||
this.form.resetFields()
|
||||
},
|
||||
edit (file, record, index) {
|
||||
this.getFileInfo(file).then(res => {
|
||||
this.handlePreview(res)
|
||||
})
|
||||
this.visible = true
|
||||
this.index = index
|
||||
this.form.resetFields()
|
||||
this.model = Object.assign({}, record)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'clauseNumber', 'clauseName', 'contentOfRevisedOpinion'))
|
||||
})
|
||||
},
|
||||
getFileInfo (fileId) {
|
||||
return new Promise(resolve => {
|
||||
let fileInfo
|
||||
getFileInfo({ id: fileId }).then(res => {
|
||||
if (res.success) {
|
||||
fileInfo = res.result
|
||||
}
|
||||
}).finally(() => {
|
||||
resolve(fileInfo)
|
||||
})
|
||||
})
|
||||
},
|
||||
handlePreview (file) {
|
||||
const fileSuffix = file.fileName ? file.fileName.split('.')[file.fileName.split('.').length - 1].toLowerCase() : ''
|
||||
if (fileSuffix === 'pdf') {
|
||||
// pdf预览
|
||||
const url = previewPdf(file.id)
|
||||
this.iframeSrc = url
|
||||
} else if (fileSuffix === 'docx') {
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// word文件仍使用KKFile进行预览
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
this.iframeSrc = url
|
||||
}
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
this.model = {}
|
||||
this.index = undefined
|
||||
this.iframeSrc = ''
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
handleOk () {
|
||||
if (this.confirmLoading) return
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.confirmLoading = true
|
||||
const param = Object.assign({}, values)
|
||||
console.log(param)
|
||||
this.$emit('ok', param, this.index)
|
||||
this.close()
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.content-left {
|
||||
width: 60%;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
iframe {
|
||||
height: calc(100% - 20px) !important;
|
||||
}
|
||||
}
|
||||
.content-right {
|
||||
width: 40%;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-file {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
<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>
|
||||
<!-- 操作区域 -->
|
||||
<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>
|
||||
<comment-modal ref="commentModal" @ok="modalFormOk"></comment-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import CommentModal from './CommentModal'
|
||||
|
||||
export default {
|
||||
name: 'CommentObjectEnterBaseInfo',
|
||||
components: { CommentModal, BaseInfoForm, JTable },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{ // 条款号
|
||||
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clauseNumber',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 条款名称
|
||||
title: this.$t('workCenter.enStandardRevision.clauseName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clauseName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改意见内容(包括修改理由和依据)
|
||||
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
|
||||
align: 'center',
|
||||
width: 300,
|
||||
dataIndex: 'contentOfRevisedOpinion',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
],
|
||||
dataSource: []
|
||||
}
|
||||
},
|
||||
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 () {
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
return data
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 新增征求意见
|
||||
handleAdd () {
|
||||
// 不知道左侧要预览哪个文件
|
||||
const file = ''
|
||||
this.$refs.commentModal.title = this.$t('newlyAdded')
|
||||
this.$refs.commentModal.add(file)
|
||||
},
|
||||
// 征求意见的编辑
|
||||
handleEdit (record, index) {
|
||||
// 不知道左侧要预览哪个文件
|
||||
const file = ''
|
||||
this.$refs.commentModal.title = this.$t('edit')
|
||||
this.$refs.commentModal.edit(file, record, index)
|
||||
},
|
||||
// 征求意见的删除
|
||||
handleDelete (index) {
|
||||
this.dataSource.splice(index, 1)
|
||||
},
|
||||
// 征求意见新增编辑完成
|
||||
modalFormOk (value, index) {
|
||||
console.log(value, index)
|
||||
if (index || index === 0) {
|
||||
// 有下标,说明是编辑
|
||||
this.dataSource.splice(index, 1, value)
|
||||
} else {
|
||||
// 没有下标, 是新增
|
||||
this.dataSource.push(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</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%;
|
||||
}
|
||||
.ant-btn {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
<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">
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isOpenComment')">
|
||||
{{ $t('workCenter.enStandardRevision.isOpenComment') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="isOpenComment">
|
||||
<a-radio-group v-model="formInline.isOpenComment">
|
||||
<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 class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required" v-if="rules.departmentalLiaison[0].required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departmentalLiaison')">
|
||||
{{ $t('workCenter.enStandardRevision.departmentalLiaison') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="departmentalLiaison">
|
||||
<user-selection v-model="formInline.departmentalLiaison"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departmentalLiaison')"
|
||||
:disabled="disabled"
|
||||
filedName="departmentalLiaison"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.departmentalLiaison_dictText"
|
||||
type="checkbox"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
export default {
|
||||
name: 'ConfirmWhetherCommentBaseInfo',
|
||||
components: { BaseInfoForm, UserSelection },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
formInline: {},
|
||||
rules: {
|
||||
// 部门联络人
|
||||
departmentalLiaison: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.departmentalLiaison') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 是否开启征求意见
|
||||
'formInline.isOpenComment': {
|
||||
handler (val) {
|
||||
if (val && val === 1) {
|
||||
// 开启征求意见,部门联络人必填
|
||||
this.rules.departmentalLiaison[0].required = true
|
||||
} else {
|
||||
this.rules.departmentalLiaison[0].required = false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表单赋值,在线编辑不知道要怎么赋值?
|
||||
// this.formInline =
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.isCommentsFormInline = this.formInline
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate () {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = {}
|
||||
data.isCommentsFormInline = this.formInline
|
||||
return data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
this.formInline[fieldName + '_dictText'] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
</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%;
|
||||
}
|
||||
.ant-btn {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departLiaisonLeader')">
|
||||
{{ $t('workCenter.enStandardRevision.departLiaisonLeader') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="departLiaisonLeader">
|
||||
<user-selection v-model="formInline.departLiaisonLeader"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departLiaisonLeader')"
|
||||
:disabled="disabled"
|
||||
filedName="departLiaisonLeader"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.departLiaisonLeader_dictText"
|
||||
type="radio"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
<comment-modal ref="commentModal" @ok="modalFormOk"></comment-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import CommentModal from './CommentModal'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
|
||||
export default {
|
||||
name: 'DepartLiaisonCollectBaseInfo',
|
||||
components: { CommentModal, BaseInfoForm, JTable, UserSelection },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{ // 条款号
|
||||
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clauseNumber',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 条款名称
|
||||
title: this.$t('workCenter.enStandardRevision.clauseName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clauseName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改意见内容(包括修改理由和依据)
|
||||
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
|
||||
align: 'center',
|
||||
width: 300,
|
||||
dataIndex: 'contentOfRevisedOpinion',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 意见提出人
|
||||
title: this.$t('workCenter.enStandardRevision.proposer'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'proposer',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
formInline: {},
|
||||
rules: {
|
||||
// 部门联络人主管级领导
|
||||
departLiaisonLeader: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.departLiaisonLeader') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
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 () {
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
return data
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 征求意见的编辑
|
||||
handleEdit (record, index) {
|
||||
// 不知道左侧要预览哪个文件
|
||||
const file = ''
|
||||
this.$refs.commentModal.title = this.$t('edit')
|
||||
this.$refs.commentModal.edit(file, record, index)
|
||||
},
|
||||
// 征求意见的删除
|
||||
handleDelete (index) {
|
||||
this.dataSource.splice(index, 1)
|
||||
},
|
||||
// 征求意见新增编辑完成
|
||||
modalFormOk (value, index) {
|
||||
console.log(value, index)
|
||||
if (index || index === 0) {
|
||||
// 有下标,说明是编辑
|
||||
this.dataSource.splice(index, 1, value)
|
||||
} else {
|
||||
// 没有下标, 是新增
|
||||
this.dataSource.push(value)
|
||||
}
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
this.formInline[fieldName + '_dictText'] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
</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%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
<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="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.deadlineForComments')">
|
||||
{{ $t('workCenter.enStandardRevision.deadlineForComments') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="deadlineForComments">
|
||||
<a-date-picker
|
||||
v-model="formInline.deadlineForComments"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
</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.workingGroup')">
|
||||
{{ $t('workCenter.enStandardRevision.workingGroup') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="workingGroup">
|
||||
<user-select-by-work-group v-model="formInline.workingGroup"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.workingGroup')"
|
||||
:disabled="disabled"
|
||||
filedName="workingGroup"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.workingGroup_dictText"
|
||||
type="checkbox"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
import UserSelectByWorkGroup from '@/components/selection/UserSelectByWorkGroup'
|
||||
|
||||
export default {
|
||||
name: 'DepartLiaisonIssueBaseInfo',
|
||||
components: { BaseInfoForm, UserSelectByWorkGroup },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
formInline: {},
|
||||
rules: {
|
||||
// 征求意见截止日期
|
||||
deadlineForComments: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.deadlineForComments') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 工作组
|
||||
workingGroup: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.workingGroup') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表单赋值,在线编辑不知道要怎么赋值?
|
||||
// this.formInline =
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.issueFormInline = this.formInline
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate () {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = {}
|
||||
data.issueFormInline = this.formInline
|
||||
return data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
this.formInline[fieldName + '_dictText'] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
</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%;
|
||||
}
|
||||
.ant-btn {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.title-text-long {
|
||||
width: 200px !important;
|
||||
}
|
||||
</style>
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
<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>
|
||||
<!-- 操作区域 -->
|
||||
<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>
|
||||
<comment-modal ref="commentModal" @ok="modalFormOk"></comment-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import CommentModal from './CommentModal'
|
||||
|
||||
export default {
|
||||
name: 'DepartLiaisonLeaderApproveBaseInfo',
|
||||
components: { CommentModal, BaseInfoForm, JTable },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{ // 条款号
|
||||
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clauseNumber',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 条款名称
|
||||
title: this.$t('workCenter.enStandardRevision.clauseName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clauseName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改意见内容(包括修改理由和依据)
|
||||
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
|
||||
align: 'center',
|
||||
width: 300,
|
||||
dataIndex: 'contentOfRevisedOpinion',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 意见提出人
|
||||
title: this.$t('workCenter.enStandardRevision.proposer'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'proposer',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
],
|
||||
dataSource: []
|
||||
}
|
||||
},
|
||||
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 () {
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
return data
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 新增征求意见
|
||||
handleAdd () {
|
||||
// 不知道左侧要预览哪个文件
|
||||
const file = ''
|
||||
this.$refs.commentModal.title = this.$t('newlyAdded')
|
||||
this.$refs.commentModal.add(file)
|
||||
},
|
||||
// 征求意见的编辑
|
||||
handleEdit (record, index) {
|
||||
// 不知道左侧要预览哪个文件
|
||||
const file = ''
|
||||
this.$refs.commentModal.title = this.$t('edit')
|
||||
this.$refs.commentModal.edit(file, record, index)
|
||||
},
|
||||
// 征求意见的删除
|
||||
handleDelete (index) {
|
||||
this.dataSource.splice(index, 1)
|
||||
},
|
||||
// 征求意见新增编辑完成
|
||||
modalFormOk (value, index) {
|
||||
console.log(value, index)
|
||||
if (index || index === 0) {
|
||||
// 有下标,说明是编辑
|
||||
this.dataSource.splice(index, 1, value)
|
||||
} else {
|
||||
// 没有下标, 是新增
|
||||
this.dataSource.push(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</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%;
|
||||
}
|
||||
.ant-btn {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+233
@@ -0,0 +1,233 @@
|
||||
<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>
|
||||
<!-- 操作区域 -->
|
||||
<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">
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
<comment-modal ref="commentModal" @ok="modalFormOk"></comment-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import CommentModal from './CommentModal'
|
||||
|
||||
export default {
|
||||
name: 'MainDrafterCollectBaseInfo',
|
||||
components: { CommentModal, BaseInfoForm, JTable },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{ // 条款号
|
||||
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clauseNumber',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 条款名称
|
||||
title: this.$t('workCenter.enStandardRevision.clauseName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clauseName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 修改意见内容(包括修改理由和依据)
|
||||
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
|
||||
align: 'center',
|
||||
width: 300,
|
||||
dataIndex: 'contentOfRevisedOpinion',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 意见提出人
|
||||
title: this.$t('workCenter.enStandardRevision.proposer'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'proposer',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 处理意见
|
||||
title: this.$t('workCenter.enStandardRevision.handlingSuggestion'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'handlingSuggestion',
|
||||
customRender: (text, row, index) => {
|
||||
const obj = {
|
||||
children: <a-select v-model={this.dataSource[index].deductionScoreReason}
|
||||
placeholder={this.$t('pleaseSelect')} class={'handle-suggest-select'}
|
||||
options={this.handlingSuggestionOption}
|
||||
/>,
|
||||
attrs: {}
|
||||
}
|
||||
return obj
|
||||
}
|
||||
},
|
||||
{ // 理由
|
||||
title: this.$t('workCenter.enStandardRevision.reason'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'reason',
|
||||
customRender: (text, row, index) => {
|
||||
const obj = {
|
||||
children: <a-input v-model={this.dataSource[index].reason} maxLength={50}
|
||||
title={this.dataSource[index].reason} placeholder={this.$t('pleaseEnter')}
|
||||
onChange={ e => {
|
||||
e.target.value = e.target.value.trim()
|
||||
this.dataSource[index].reason = (e.target.value.replace(/[^0-9-]/g, '')).trim()
|
||||
} }
|
||||
/>,
|
||||
attrs: {}
|
||||
}
|
||||
return obj
|
||||
}
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
handlingSuggestionOption: [
|
||||
{ value: 1, label: '采纳' },
|
||||
{ value: 2, label: '部分采纳' },
|
||||
{ value: 3, label: '不采纳' }
|
||||
]
|
||||
}
|
||||
},
|
||||
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.handlingSuggestion === 2 || item.handlingSuggestion === 3) && !item.deductionScoreReason) {
|
||||
hasErr = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if (hasErr) {
|
||||
this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseEnterAllMarkItem'))
|
||||
return false
|
||||
} else {
|
||||
return this.dataSource
|
||||
}
|
||||
},
|
||||
// 新增征求意见
|
||||
handleAdd () {
|
||||
// 不知道左侧要预览哪个文件
|
||||
const file = ''
|
||||
this.$refs.commentModal.title = this.$t('newlyAdded')
|
||||
this.$refs.commentModal.add(file)
|
||||
},
|
||||
// 征求意见的编辑
|
||||
handleEdit (record, index) {
|
||||
// 不知道左侧要预览哪个文件
|
||||
const file = ''
|
||||
this.$refs.commentModal.title = this.$t('edit')
|
||||
this.$refs.commentModal.edit(file, record, index)
|
||||
},
|
||||
// 征求意见的删除
|
||||
handleDelete (index) {
|
||||
this.dataSource.splice(index, 1)
|
||||
},
|
||||
// 征求意见新增编辑完成
|
||||
modalFormOk (value, index) {
|
||||
console.log(value, index)
|
||||
if (index || index === 0) {
|
||||
// 有下标,说明是编辑
|
||||
this.dataSource.splice(index, 1, value)
|
||||
} else {
|
||||
// 没有下标, 是新增
|
||||
this.dataSource.push(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</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%;
|
||||
}
|
||||
.ant-btn {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.handle-suggest-select {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
+466
@@ -0,0 +1,466 @@
|
||||
<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="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>
|
||||
</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>
|
||||
</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: 'MainDrafterCollectUploadMinuteBaseInfo',
|
||||
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 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>
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
<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="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.releaseDate')">
|
||||
{{ $t('workCenter.enStandardRevision.releaseDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="releaseDate">
|
||||
<a-date-picker
|
||||
v-model="formInline.releaseDate"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
</a-date-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 实施日期 至少比发布日期大15天 -->
|
||||
<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.implementationDate')">
|
||||
{{ $t('workCenter.enStandardRevision.implementationDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="implementationDate">
|
||||
<a-date-picker
|
||||
v-model="formInline.implementationDate"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
</a-date-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 标准文本 -->
|
||||
<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>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
|
||||
export default {
|
||||
name: 'MainDrafterPublishBaseInfo',
|
||||
components: { BaseInfoForm },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
formInline: {},
|
||||
rules: {
|
||||
// 发布日期
|
||||
releaseDate: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.releaseDate') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 实施日期
|
||||
implementationDate: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.implementationDate') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表单赋值,在线编辑不知道要怎么赋值?
|
||||
// this.formInline =
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.publishFormInline = this.formInline
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate () {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = {}
|
||||
data.publishFormInline = this.formInline
|
||||
return data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+172
-305
@@ -1,46 +1,40 @@
|
||||
<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="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 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">
|
||||
<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" 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.enterpriseInitChangePlan.authorizationDepart')">
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="authorizationDepart">
|
||||
<j-select-depart v-model="formInline.authorizationDepart"
|
||||
:disabled="disabled"
|
||||
:backDepart="true" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 参会人员 -->
|
||||
@@ -61,135 +55,128 @@
|
||||
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 class="title-text-text" :title="$t('workCenter.enStandardRevision.proofreader')">
|
||||
{{ $t('workCenter.enStandardRevision.proofreader') }}
|
||||
</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 class="item-model" prop="proofreader">
|
||||
<user-selection v-model="formInline.proofreader"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.proofreader')"
|
||||
:disabled="disabled"
|
||||
filedName="proofreader"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.proofreader_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.compilationIllustration')">
|
||||
{{ $t('workCenter.enStandardRevision.compilationIllustration') }}
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.approverLeader')">
|
||||
{{ $t('workCenter.enStandardRevision.approverLeader') }}
|
||||
</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 class="item-model" prop="approverLeader">
|
||||
<user-selection v-model="formInline.approverLeader"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverLeader')"
|
||||
:disabled="disabled"
|
||||
filedName="approverLeader"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.approverLeader_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.isNeedAudit')">
|
||||
{{ $t('workCenter.enStandardRevision.isNeedAudit') }}
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.approverStandardization')">
|
||||
{{ $t('workCenter.enStandardRevision.approverStandardization') }}
|
||||
</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 class="item-model" prop="approverStandardization">
|
||||
<user-selection v-model="formInline.approverStandardization"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverStandardization')"
|
||||
:disabled="disabled"
|
||||
filedName="approverStandardization"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.approverStandardization_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.countersign')">
|
||||
{{ $t('workCenter.enStandardRevision.countersign') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="countersign">
|
||||
<user-selection v-model="formInline.countersign"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.countersign')"
|
||||
:disabled="disabled"
|
||||
filedName="countersign"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.countersign_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.approverHeadEngineer')">
|
||||
{{ $t('workCenter.enStandardRevision.approverHeadEngineer') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="approverHeadEngineer">
|
||||
<user-selection v-model="formInline.approverHeadEngineer"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverHeadEngineer')"
|
||||
:disabled="disabled"
|
||||
filedName="approverHeadEngineer"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.approverHeadEngineer_dictText"
|
||||
type="radio"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 标准文本 -->
|
||||
<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>
|
||||
</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>
|
||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :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',
|
||||
components: { BaseInfoForm, UserSelection, JTable, CheckContentModal, UploadFile },
|
||||
components: { BaseInfoForm, UserSelection, UploadFile },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
@@ -199,57 +186,8 @@ export default {
|
||||
},
|
||||
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: [
|
||||
{
|
||||
@@ -258,53 +196,70 @@ export default {
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 是否需要稽查
|
||||
isNeedAudit: [
|
||||
// 授权部门
|
||||
authorizationDepart: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.isNeedAudit') + this.$t('cannotEmpty'),
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.authorizationDepart') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 参会人员
|
||||
conferee: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 校对人(其他起草人)
|
||||
proofreader: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.proofreader') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 审批人(主管级领导)
|
||||
approverLeader: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.approverLeader') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 审批人(标准化)
|
||||
approverStandardization: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.approverStandardization') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 会签(相关部门领导)
|
||||
countersign: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.countersign') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 审批(总工程师)
|
||||
approverHeadEngineer: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.approverHeadEngineer') + 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(() => {
|
||||
@@ -315,7 +270,6 @@ export default {
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
data.uploadMinuteFormInline = this.formInline
|
||||
return data
|
||||
},
|
||||
@@ -323,61 +277,12 @@ export default {
|
||||
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
|
||||
}
|
||||
const data = {}
|
||||
data.uploadMinuteFormInline = this.formInline
|
||||
return data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看企标文本
|
||||
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') {
|
||||
@@ -400,34 +305,9 @@ export default {
|
||||
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)
|
||||
}
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
this.formInline[fieldName + '_dictText'] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -450,17 +330,4 @@ export default {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.base-info-inner-title {
|
||||
color: #1D2129;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.standard-file-div {
|
||||
display: flex;
|
||||
.download-a {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
export default {
|
||||
name: 'OtherDrafterProofreadBaseInfo',
|
||||
components: { BaseInfoForm },
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 在线编辑不知道要怎么赋值?
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.online-edit-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user