[update] 修改/sys/common/view接口的token字段名改为at
This commit is contained in:
@@ -296,7 +296,7 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||||
// 图片预览,使用自己添加的组件
|
// 图片预览,使用自己添加的组件
|
||||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item :label="$t('businessSupport.questionAnswer.classify')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('businessSupport.questionAnswer.classify')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<j-dict-select-tag
|
<j-dict-select-tag
|
||||||
:placeholder="$t('pleaseEnter')+$t('businessSupport.questionAnswer.classify')"
|
:placeholder="$t('pleaseSelect')+$t('businessSupport.questionAnswer.classify')"
|
||||||
dict-code="problem_library_type"
|
dict-code="problem_library_type"
|
||||||
v-model="queryParam.type">
|
v-model="queryParam.type">
|
||||||
</j-dict-select-tag>
|
</j-dict-select-tag>
|
||||||
@@ -128,6 +128,8 @@ import { kkFilePreview } from '@/utils/kkFilePreview'
|
|||||||
|
|
||||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||||
const FILE_TYPE_PDF = 'pdf'
|
const FILE_TYPE_PDF = 'pdf'
|
||||||
|
// 支持预览的文件后缀
|
||||||
|
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'QuestionAnswerList',
|
name: 'QuestionAnswerList',
|
||||||
@@ -223,7 +225,15 @@ export default {
|
|||||||
handleAttachClick (record) {
|
handleAttachClick (record) {
|
||||||
// 截取文件后缀名
|
// 截取文件后缀名
|
||||||
const fileSuffix = record.declareFileName ? record.declareFileName.split('.')[record.declareFileName.split('.').length - 1] : ''
|
const fileSuffix = record.declareFileName ? record.declareFileName.split('.')[record.declareFileName.split('.').length - 1] : ''
|
||||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}`
|
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}`
|
||||||
|
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix === tt)
|
||||||
|
// 判断是否为可预览格式的文件
|
||||||
|
if (!canPreview) {
|
||||||
|
this.$message.loading(this.$t('uploadFile.cannotPreview')).then(() => {
|
||||||
|
this.handleDownload(record.declareFile, record.declareFileName)
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
// 图片预览,使用自己添加的组件
|
// 图片预览,使用自己添加的组件
|
||||||
if (FILE_TYPE_IMGS.includes(fileSuffix)) {
|
if (FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||||
this.imageUrl = getFileAccessHttpUrl(record.declareFile)
|
this.imageUrl = getFileAccessHttpUrl(record.declareFile)
|
||||||
@@ -240,13 +250,12 @@ export default {
|
|||||||
window.open(url)
|
window.open(url)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// word用KKfile预览
|
// 其余可预览文件仍使用KKFile进行预览
|
||||||
if (fileSuffix === 'doc' || fileSuffix === 'docx') {
|
kkFilePreview(fileFullUrl)
|
||||||
kkFilePreview(fileFullUrl)
|
},
|
||||||
return
|
handleDownload (id, name) {
|
||||||
}
|
// 下载文件
|
||||||
// 如果都不能预览就下载
|
downloadFile(`/sys/common/download/${id}`, name)
|
||||||
downloadFile(`/sys/common/download/${record.declareFile}`, record.declareFileName)
|
|
||||||
},
|
},
|
||||||
// 查看
|
// 查看
|
||||||
handleDetail (record) {
|
handleDetail (record) {
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||||
// 图片预览,使用自己添加的组件
|
// 图片预览,使用自己添加的组件
|
||||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||||
// 图片预览,使用自己添加的组件
|
// 图片预览,使用自己添加的组件
|
||||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||||
// 图片预览,使用自己添加的组件
|
// 图片预览,使用自己添加的组件
|
||||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default {
|
|||||||
const url = previewPdf(file.id)
|
const url = previewPdf(file.id)
|
||||||
this.iframeSrc = url
|
this.iframeSrc = url
|
||||||
} else if (fileSuffix === 'docx') {
|
} else if (fileSuffix === 'docx') {
|
||||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||||
// word文件仍使用KKFile进行预览
|
// word文件仍使用KKFile进行预览
|
||||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||||
this.iframeSrc = url
|
this.iframeSrc = url
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ export default {
|
|||||||
const url = previewPdf(file.id)
|
const url = previewPdf(file.id)
|
||||||
this.iframeSrc = url
|
this.iframeSrc = url
|
||||||
} else if (fileSuffix === 'docx') {
|
} else if (fileSuffix === 'docx') {
|
||||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||||
// word文件仍使用KKFile进行预览
|
// word文件仍使用KKFile进行预览
|
||||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||||
this.iframeSrc = url
|
this.iframeSrc = url
|
||||||
|
|||||||
+149
-127
@@ -17,7 +17,7 @@
|
|||||||
<a-tooltip overlay-class-name="tooltip-style">
|
<a-tooltip overlay-class-name="tooltip-style">
|
||||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||||
<div class="standard-file-div">
|
<div class="standard-file-div">
|
||||||
<a class="link-a" @click="handleLookUploadStandard(record)">{{ record.standardFile_dictText }}</a>
|
<a class="link-a" @click="handleLookUploadStandard(record)">{{ record.fileId_dictText }}</a>
|
||||||
<a class="download-a" @click="handleDownloadUploadStandard(record)">{{ $t('download') }}</a>
|
<a class="download-a" @click="handleDownloadUploadStandard(record)">{{ $t('download') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
@@ -26,106 +26,103 @@
|
|||||||
</j-table>
|
</j-table>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||||
<div class="collapsible-panel-form">
|
<div class="form-flex-box">
|
||||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
<!-- 标准文本 -->
|
||||||
<!-- 标准文本 -->
|
<div class="box-title-text form-flex-item">
|
||||||
<div class="box-title-text form-flex-item">
|
<div class="title-text">
|
||||||
<div class="title-text">
|
|
||||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
||||||
{{ $t('workCenter.enStandardRevision.standardText') }}
|
{{ $t('workCenter.enStandardRevision.standardText') }}
|
||||||
</span>
|
</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>
|
||||||
<!-- 参会人员 -->
|
<a-form-model-item class="item-model">
|
||||||
<div class="box-title-text form-flex-item">
|
<div class="online-edit-wrapper">
|
||||||
<div class="title-text">
|
<!-- todo: 还不确定这里展示的是什么 -->
|
||||||
<span class="required">*</span>
|
<p>企业标准</p>
|
||||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.conferee')">
|
<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') }}
|
{{ $t('workCenter.enStandardRevision.conferee') }}
|
||||||
</span>
|
</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>
|
||||||
<!-- 会议纪要 -->
|
<a-form-model-item class="item-model" prop="meetingUsers">
|
||||||
<div class="box-title-text form-flex-item">
|
<user-selection v-model="formInline.meetingUsers"
|
||||||
<div class="title-text">
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.conferee')"
|
||||||
<span class="required">*</span>
|
:disabled="disabled"
|
||||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.meetingSummary')">
|
filedName="meetingUsers"
|
||||||
|
@nameChange="userSelectNameChange"
|
||||||
|
:nameStr="formInline.meetingUsers_dictText"
|
||||||
|
type="checkbox"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
<!-- 会议纪要 -->
|
||||||
|
<div class="box-title-text form-flex-item">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.meetingSummary')">
|
||||||
{{ $t('workCenter.enStandardRevision.meetingSummary') }}
|
{{ $t('workCenter.enStandardRevision.meetingSummary') }}
|
||||||
</span>
|
</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>
|
||||||
<!-- 编制说明 -->
|
<a-form-model-item class="item-model" prop="meetingSummary">
|
||||||
<div class="box-title-text form-flex-item">
|
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('meetingSummary')">
|
||||||
<div class="title-text">
|
{{
|
||||||
<span class="required">*</span>
|
(formInline.meetingSummary === 'null' || formInline.meetingSummary === ''
|
||||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.compilationIllustration')">
|
|| 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') }}
|
{{ $t('workCenter.enStandardRevision.compilationIllustration') }}
|
||||||
</span>
|
</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>
|
||||||
<!-- 是否需要稽查 -->
|
<a-form-model-item class="item-model" prop="compIllustration">
|
||||||
<div class="box-title-text form-flex-item">
|
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('compIllustration')">
|
||||||
<div class="title-text">
|
{{
|
||||||
<span class="required">*</span>
|
(formInline.compIllustration === 'null' || formInline.compIllustration === ''
|
||||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isNeedAudit')">
|
|| formInline.compIllustration === null || formInline.compIllustration === undefined)
|
||||||
|
? $t('uploadFile.clickUpload')
|
||||||
|
: $t('uploadFile.viewUploadedFiles')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
<!-- 稽查内容 -->
|
||||||
|
<p class="base-info-inner-title">{{ $t('enterpriseStandardLibrary.standard.auditContent') }}</p>
|
||||||
|
<!-- 是否需要稽查 -->
|
||||||
|
<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') }}
|
{{ $t('workCenter.enStandardRevision.isNeedAudit') }}
|
||||||
</span>
|
</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 class="item-model" prop="inspectFlag">
|
||||||
|
<a-radio-group v-model="formInline.inspectFlag">
|
||||||
|
<a-radio value="1">
|
||||||
|
{{ $t('yes') }}
|
||||||
|
</a-radio>
|
||||||
|
<a-radio value="0">
|
||||||
|
{{ $t('not') }}
|
||||||
|
</a-radio>
|
||||||
|
</a-radio-group>
|
||||||
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
<!-- 是否需要稽查选择是,需要填写稽查内容,否则隐藏稽查内容区域 -->
|
<!-- 是否需要稽查选择是,需要填写稽查内容,否则隐藏稽查内容区域 -->
|
||||||
<template v-if="formInline.isNeedAudit === 1">
|
<template v-if="formInline.inspectFlag === '1'">
|
||||||
<!-- 稽查内容 -->
|
|
||||||
<p class="base-info-inner-title">{{ $t('enterpriseStandardLibrary.standard.auditContent') }}</p>
|
|
||||||
|
|
||||||
<!-- 操作区域 -->
|
<!-- 操作区域 -->
|
||||||
<div v-if="!disabled" class="table-operator">
|
<div v-if="!disabled" class="table-operator">
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
@@ -149,7 +146,7 @@
|
|||||||
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
|
<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 @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
<a @click="handleDelete(index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</j-table>
|
</j-table>
|
||||||
@@ -204,32 +201,32 @@ export default {
|
|||||||
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
|
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'draftingUnit_dictText',
|
dataIndex: 'dept_dictText',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{ // 起草人
|
{ // 起草人
|
||||||
title: this.$t('workCenter.enStandardRevision.drafter'),
|
title: this.$t('workCenter.enStandardRevision.drafter'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'drafter_dictText',
|
dataIndex: 'user_dictText',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{ // 起草范围
|
{ // 起草范围
|
||||||
title: this.$t('workCenter.enStandardRevision.draftingScope'),
|
title: this.$t('workCenter.enStandardRevision.draftingScope'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'draftingScope',
|
dataIndex: 'scope',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{ // 截止日期
|
{ // 截止日期
|
||||||
title: this.$t('expirationDate'),
|
title: this.$t('expirationDate'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'expirationDate',
|
dataIndex: 'deadline',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{ // 企标文本
|
{ // 企标文本
|
||||||
dataIndex: 'standardFile_dictText',
|
dataIndex: 'fileId_dictText',
|
||||||
title: this.$t('workCenter.enStandardRevision.enterpriseStandardText'),
|
title: this.$t('workCenter.enStandardRevision.enterpriseStandardText'),
|
||||||
scopedSlots: { customRender: 'standardFile' },
|
scopedSlots: { customRender: 'standardFile' },
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@@ -237,12 +234,12 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 起草人表格数据
|
// 起草人表格数据
|
||||||
drafterDataSource: [{id: 1, standardFile: '1715299701232504833', standardFile_dictText: '测试上传excel测试测试测试测试.xls'}],
|
drafterDataSource: [],
|
||||||
drafterLoading: false,
|
drafterLoading: false,
|
||||||
formInline: {},
|
formInline: {},
|
||||||
rules: {
|
rules: {
|
||||||
// 参会人员
|
// 参会人员
|
||||||
conferee: [
|
meetingUsers: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'),
|
message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'),
|
||||||
@@ -257,8 +254,16 @@ export default {
|
|||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
// 编制说明
|
||||||
|
compIllustration: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('workCenter.enStandardRevision.compilationIllustration') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
// 是否需要稽查
|
// 是否需要稽查
|
||||||
isNeedAudit: [
|
inspectFlag: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('workCenter.enStandardRevision.isNeedAudit') + this.$t('cannotEmpty'),
|
message: this.$t('workCenter.enStandardRevision.isNeedAudit') + this.$t('cannotEmpty'),
|
||||||
@@ -268,25 +273,35 @@ export default {
|
|||||||
},
|
},
|
||||||
// 稽查内容表格列
|
// 稽查内容表格列
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{ // 条款
|
||||||
title: this.$t('enterpriseStandardLibrary.standard.subjectToClause'),
|
title: this.$t('enterpriseStandardLibrary.standard.subjectToClause'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'clause',
|
dataIndex: 'clause',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{ // 标准内容和要求
|
||||||
title: this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements'),
|
title: this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'requirement',
|
dataIndex: 'requirement',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
|
{ // 整改部门
|
||||||
|
title: this.$t('enterpriseStandardLibrary.standard.rectificationDepartment'),
|
||||||
|
align: 'center',
|
||||||
|
width: 200,
|
||||||
|
dataIndex: 'rectificationDepartment',
|
||||||
|
customRender: (value, row, index) => {
|
||||||
|
return <j-select-depart v-model={this.dataSource[index].rectificationDepartment}
|
||||||
|
backDepart={true} />
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
scopedSlots: { customRender: 'action' },
|
scopedSlots: { customRender: 'action' },
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 150
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 稽查内容表格数据
|
// 稽查内容表格数据
|
||||||
@@ -294,27 +309,27 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
fileMaxSize: undefined,
|
fileMaxSize: undefined,
|
||||||
image: false,
|
image: false,
|
||||||
imageUrl: ''
|
imageUrl: '',
|
||||||
|
uploadName: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
initData (data) {
|
initData (data) {
|
||||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||||
// this.drafterDataSource =
|
this.drafterDataSource = data.otherDraftUserVOS
|
||||||
// this.dataSource =
|
this.dataSource = data.inspectContents || []
|
||||||
// this.formInline =
|
this.formInline = Object.assign({}, data)
|
||||||
// 给表单赋值
|
// 给表单赋值
|
||||||
// this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// this.$refs.baseInfoForm.formInline =
|
this.$refs.baseInfoForm.initData(data)
|
||||||
// })
|
})
|
||||||
},
|
},
|
||||||
// 外层要获取数据
|
// 外层要获取数据
|
||||||
getData () {
|
getData () {
|
||||||
// 把数据抛出,在线编辑不知道要不要抛
|
// 把数据抛出,在线编辑不知道要不要抛
|
||||||
const data = {}
|
const data = Object.assign({}, this.formInline)
|
||||||
data.dataSource = this.dataSource
|
data.inspectContents = this.dataSource || []
|
||||||
data.formInline = this.formInline
|
|
||||||
return data
|
return data
|
||||||
},
|
},
|
||||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
@@ -322,10 +337,19 @@ export default {
|
|||||||
let data = {}
|
let data = {}
|
||||||
await this.$refs.ruleForm.validate(valid => {
|
await this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.dataSource && this.dataSource.length > 0) {
|
if (this.formInline.inspectFlag === '1' && this.dataSource && this.dataSource.length > 0) {
|
||||||
|
if (this.dataSource.map(item => item.rectificationDepartment).every(item => !!item)) {
|
||||||
|
// 每一个的整改部门都填了
|
||||||
|
// 有数据可以抛出
|
||||||
|
data = Object.assign({}, this.formInline)
|
||||||
|
data.inspectContents = this.dataSource || []
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
|
||||||
|
data = false
|
||||||
|
}
|
||||||
|
} else if (this.formInline.inspectFlag === '0') {
|
||||||
// 有数据可以抛出
|
// 有数据可以抛出
|
||||||
data.dataSource = this.dataSource
|
data = Object.assign({}, this.formInline)
|
||||||
data.formInline = this.formInline
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||||
data = false
|
data = false
|
||||||
@@ -339,7 +363,7 @@ export default {
|
|||||||
// 查看企标文本
|
// 查看企标文本
|
||||||
handleLookUploadStandard (record) {
|
handleLookUploadStandard (record) {
|
||||||
// 截取文件后缀名
|
// 截取文件后缀名
|
||||||
const fileSuffix = record.standardFile_dictText ? record.standardFile_dictText.split('.')[record.standardFile_dictText.split('.').length - 1].toLowerCase() : ''
|
const fileSuffix = record.fileId_dictText ? record.fileId_dictText.split('.')[record.fileId_dictText.split('.').length - 1].toLowerCase() : ''
|
||||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
|
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
|
||||||
// 判断是否为可预览格式的文件
|
// 判断是否为可预览格式的文件
|
||||||
if (!canPreview) {
|
if (!canPreview) {
|
||||||
@@ -348,10 +372,10 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.standardFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.standardFile_dictText}`
|
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.fileId}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.fileId_dictText}`
|
||||||
// 图片预览,使用自己添加的组件
|
// 图片预览,使用自己添加的组件
|
||||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) {
|
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||||
this.imageUrl = getFileAccessHttpUrl(record.standardFile)
|
this.imageUrl = getFileAccessHttpUrl(record.fileId)
|
||||||
// 获取viewer实例
|
// 获取viewer实例
|
||||||
const viewer = this.$el.querySelector('.image').$viewer
|
const viewer = this.$el.querySelector('.image').$viewer
|
||||||
// 调用show方法进行显示预览图
|
// 调用show方法进行显示预览图
|
||||||
@@ -361,22 +385,17 @@ export default {
|
|||||||
}
|
}
|
||||||
// pdf预览
|
// pdf预览
|
||||||
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
|
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
|
||||||
const url = previewPdf(record.standardFile)
|
const url = previewPdf(record.fileId)
|
||||||
window.open(url)
|
window.open(url)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// word用KKfile预览
|
// 其余可预览文件仍使用KKFile进行预览
|
||||||
if (canPreview && (fileSuffix === 'doc' || fileSuffix === 'docx')) {
|
kkFilePreview(fileFullUrl)
|
||||||
kkFilePreview(fileFullUrl)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 如果都不能预览就下载
|
|
||||||
downloadFile(`/sys/common/download/${record.standardFile}`, record.standardFile_dictText)
|
|
||||||
},
|
},
|
||||||
// 下载企标文本
|
// 下载企标文本
|
||||||
handleDownloadUploadStandard (record) {
|
handleDownloadUploadStandard (record) {
|
||||||
// 下载文件
|
// 下载文件
|
||||||
downloadFile(`/sys/common/download/${record.standardFile}`, record.standardFile_dictText)
|
downloadFile(`/sys/common/download/${record.fileId}`, record.fileId_dictText)
|
||||||
},
|
},
|
||||||
// 选择用户得到用户名
|
// 选择用户得到用户名
|
||||||
userSelectNameChange (value, fieldName) {
|
userSelectNameChange (value, fieldName) {
|
||||||
@@ -384,11 +403,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点击文件上传
|
// 点击文件上传
|
||||||
clickButtonToUpload (fieldName) {
|
clickButtonToUpload (fieldName) {
|
||||||
if (fieldName === 'uploadAttachment') {
|
|
||||||
this.fileMaxSize = 10
|
|
||||||
} else {
|
|
||||||
this.fileMaxSize = undefined
|
|
||||||
}
|
|
||||||
this.$refs.uploadFile.open(this.formInline[fieldName])
|
this.$refs.uploadFile.open(this.formInline[fieldName])
|
||||||
this.uploadName = fieldName
|
this.uploadName = fieldName
|
||||||
},
|
},
|
||||||
@@ -420,7 +434,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 稽查内容的删除
|
// 稽查内容的删除
|
||||||
handleDelete (index) {
|
handleDelete (index) {
|
||||||
this.dataSource.splice(index, 1)
|
this.$confirm({
|
||||||
|
title: this.$t('confirmDeletion'),
|
||||||
|
content: this.$t('areYouSure'),
|
||||||
|
onOk: () => {
|
||||||
|
this.dataSource.splice(index, 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 稽查内容新增编辑完成
|
// 稽查内容新增编辑完成
|
||||||
checkContentOk (value, index) {
|
checkContentOk (value, index) {
|
||||||
@@ -439,9 +459,10 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
.collapsible-content-no-head {
|
|
||||||
border-top: 1px solid #E5E6EB;
|
.form-add {
|
||||||
border-radius: 8px 8px 8px 8px;
|
margin-top: 30px;
|
||||||
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.online-edit-wrapper {
|
.online-edit-wrapper {
|
||||||
@@ -456,6 +477,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.base-info-inner-title {
|
.base-info-inner-title {
|
||||||
|
width: 100%;
|
||||||
color: #1D2129;
|
color: #1D2129;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
Reference in New Issue
Block a user