[update] 修改bug87442
This commit is contained in:
@@ -14,28 +14,28 @@ module.exports = {
|
|||||||
templateExport: 'Enterprise Standard Template',
|
templateExport: 'Enterprise Standard Template',
|
||||||
pleaseSelectLeastOneNode: 'Please select Level 2 and below system first',
|
pleaseSelectLeastOneNode: 'Please select Level 2 and below system first',
|
||||||
myCollectNotRemove: 'My collection system cannot be removed from the standard',
|
myCollectNotRemove: 'My collection system cannot be removed from the standard',
|
||||||
authorizationDepart: '授权部门',
|
authorizationDepart: 'Authorized department',
|
||||||
authorizationUser: '授权人员',
|
authorizationUser: 'Authorized officer',
|
||||||
maturityDate: '授权到期日期',
|
maturityDate: 'Authorization expiration date',
|
||||||
detailTitle: '企业标准详情页',
|
detailTitle: 'Enterprise Standards Details page',
|
||||||
evaluate: '企标评价',
|
evaluate: 'Evaluation of enterprise standard',
|
||||||
updateRecord: '更新记录',
|
updateRecord: 'Update record',
|
||||||
submitQuestion: '提交问题',
|
submitQuestion: 'Submit a question',
|
||||||
standardResolutionSheet: '标准分解单',
|
standardResolutionSheet: 'Standard resolution sheet',
|
||||||
nodeName: '节点名称',
|
nodeName: 'Node name',
|
||||||
subjectToClause: '章节条款',
|
subjectToClause: 'Section clause',
|
||||||
standardContentOrRequirements: '标准内容或要求',
|
standardContentOrRequirements: 'Standard content or requirements',
|
||||||
rectificationDepartment: '整改部门',
|
rectificationDepartment: 'Rectification department',
|
||||||
auditContent: '稽查内容',
|
auditContent: 'Monitoring content',
|
||||||
disabledBatchDel: '选中数据中存在没有操作权限的数据,请重新选择',
|
disabledBatchDel: 'If the selected data has no operation permission, select another data',
|
||||||
pleaseSelectUserOrDepart: '授权部门和授权人员至少需要选择一个',
|
pleaseSelectUserOrDepart: 'The authorized department and authorized person must select at least one',
|
||||||
youNot: '您没有',
|
youNot: "You didn't",
|
||||||
dataPremissReCheck: '数据权限,请重新选择',
|
dataPremissReCheck: 'Data permission, please re-select',
|
||||||
authorizationExpirationDate: '授权到期日期',
|
authorizationExpirationDate: 'Authorization expiration date',
|
||||||
cancelAuthor: '解除授权',
|
cancelAuthor: 'deauthorize',
|
||||||
authorizationDate: '授权日期',
|
authorizationDate: 'Authorization date',
|
||||||
authorizationStandard: '授权企标',
|
authorizationStandard: 'Authorized bid',
|
||||||
confirmCancelAuthor: '确认解除授权?'
|
confirmCancelAuthor: 'Confirm the deauthorization?'
|
||||||
},
|
},
|
||||||
// 评审会记录
|
// 评审会记录
|
||||||
reviewMeeting: {
|
reviewMeeting: {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ module.exports = {
|
|||||||
subjectToClause: '章节条款',
|
subjectToClause: '章节条款',
|
||||||
standardContentOrRequirements: '标准内容或要求',
|
standardContentOrRequirements: '标准内容或要求',
|
||||||
rectificationDepartment: '整改部门',
|
rectificationDepartment: '整改部门',
|
||||||
auditContent: '稽查内容',
|
auditContent: '监察内容',
|
||||||
disabledBatchDel: '选中数据中存在没有操作权限的数据,请重新选择',
|
disabledBatchDel: '选中数据中存在没有操作权限的数据,请重新选择',
|
||||||
pleaseSelectUserOrDepart: '授权部门和授权人员至少需要选择一个',
|
pleaseSelectUserOrDepart: '授权部门和授权人员至少需要选择一个',
|
||||||
youNot: '您没有',
|
youNot: '您没有',
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ export default {
|
|||||||
'formInline.try_flag' (val) {
|
'formInline.try_flag' (val) {
|
||||||
if (val && this.flag === StandardSource.ENTERPRISE.value && !this.isEditSetData) {
|
if (val && this.flag === StandardSource.ENTERPRISE.value && !this.isEditSetData) {
|
||||||
if (val === IsTrial.YES.value) {
|
if (val === IsTrial.YES.value) {
|
||||||
// 试行周期给默认值24
|
// 试行周期给默认值12
|
||||||
this.formInline.trial_period = '12'
|
this.formInline.trial_period = '12'
|
||||||
this.formInline = JSON.parse(JSON.stringify(this.formInline))
|
this.formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
// 试行,试行周期必填
|
// 试行,试行周期必填
|
||||||
|
|||||||
@@ -2,52 +2,43 @@
|
|||||||
<j-modal
|
<j-modal
|
||||||
:title="title"
|
:title="title"
|
||||||
:maskClosable="true"
|
:maskClosable="true"
|
||||||
:width="500"
|
:width="800"
|
||||||
:closable="true"
|
:closable="true"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
fullscreen
|
switchFullscreen
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
:visible="visible">
|
:visible="visible">
|
||||||
<div class="content">
|
<a-spin :spinning="confirmLoading">
|
||||||
<!-- 左侧文件预览 -->
|
<a-form :form="form">
|
||||||
<div class="content-left">
|
<!-- 章节条款 -->
|
||||||
<a-spin :spinning="leftLoading" class="left-spin">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('enterpriseStandardLibrary.standard.subjectToClause')">
|
||||||
<iframe v-if="iframeSrc" :src="iframeSrc" width="100%" frameborder="0"></iframe>
|
<a-input :placeholder="$t('pleaseEnter') + $t('enterpriseStandardLibrary.standard.subjectToClause')"
|
||||||
<a-empty class="empty-file" v-else :description="$t('noFileAvailableForPreview')"></a-empty>
|
:maxLength="50"
|
||||||
</a-spin>
|
v-decorator.trim="[ 'clause', validatorRules.clause ]" />
|
||||||
</div>
|
</a-form-item>
|
||||||
<!-- 右侧表单区域 -->
|
<!-- 整改部门 -->
|
||||||
<div class="content-right">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('enterpriseStandardLibrary.standard.rectificationDepartment')">
|
||||||
<a-spin :spinning="confirmLoading">
|
<j-select-depart :placeholder="$t('pleaseSelect') + $t('enterpriseStandardLibrary.standard.rectificationDepartment')"
|
||||||
<a-form :form="form">
|
v-decorator.trim="[ 'rectificationDepartment', validatorRules.rectificationDepartment ]"
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('enterpriseStandardLibrary.standard.subjectToClause')">
|
@back="rectificationDepartmentBack"
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('enterpriseStandardLibrary.standard.subjectToClause')"
|
backDepart />
|
||||||
:maxLength="50"
|
</a-form-item>
|
||||||
v-decorator.trim="[ 'clause', validatorRules.clause ]" />
|
<!-- 标准内容或要求 -->
|
||||||
</a-form-item>
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('enterpriseStandardLibrary.standard.standardContentOrRequirements')">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('enterpriseStandardLibrary.standard.standardContentOrRequirements')">
|
<a-input :placeholder="$t('pleaseEnter') + $t('enterpriseStandardLibrary.standard.standardContentOrRequirements')"
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('enterpriseStandardLibrary.standard.standardContentOrRequirements')"
|
:maxLength="500"
|
||||||
:maxLength="500"
|
:rows="4"
|
||||||
:rows="4"
|
type="textarea"
|
||||||
type="textarea"
|
v-decorator.trim="[ 'requirement', validatorRules.requirement ]" />
|
||||||
v-decorator.trim="[ 'requirement', validatorRules.requirement ]" />
|
</a-form-item>
|
||||||
</a-form-item>
|
</a-form>
|
||||||
</a-form>
|
</a-spin>
|
||||||
</a-spin>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import pick from 'lodash.pick'
|
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 {
|
export default {
|
||||||
name: 'CheckContentModal',
|
name: 'CheckContentModal',
|
||||||
@@ -56,7 +47,6 @@ export default {
|
|||||||
title: '',
|
title: '',
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
leftLoading: false,
|
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
model: {},
|
model: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
@@ -74,6 +64,12 @@ export default {
|
|||||||
],
|
],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
|
rectificationDepartment: {
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: this.$t('pleaseSelect') + this.$t('enterpriseStandardLibrary.standard.rectificationDepartment') }
|
||||||
|
],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
requirement: {
|
requirement: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements') }
|
{ required: true, message: this.$t('pleaseEnter') + this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements') }
|
||||||
@@ -81,28 +77,15 @@ export default {
|
|||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
index: undefined, // 编辑的表格的下标
|
index: undefined // 编辑的表格的下标
|
||||||
iframeSrc: '' // 左侧预览的路径
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add (fileId) {
|
add () {
|
||||||
this.leftLoading = true
|
|
||||||
this.getFileInfo(fileId).then(res => {
|
|
||||||
this.handlePreview(res)
|
|
||||||
}).finally(() => {
|
|
||||||
this.leftLoading = false
|
|
||||||
})
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
},
|
},
|
||||||
edit (fileId, record, index) {
|
edit (record, index) {
|
||||||
this.leftLoading = true
|
|
||||||
this.getFileInfo(fileId).then(res => {
|
|
||||||
this.handlePreview(res)
|
|
||||||
}).finally(() => {
|
|
||||||
this.leftLoading = false
|
|
||||||
})
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.index = index
|
this.index = index
|
||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
@@ -111,36 +94,14 @@ export default {
|
|||||||
this.form.setFieldsValue(pick(this.model, 'clause', 'requirement'))
|
this.form.setFieldsValue(pick(this.model, 'clause', 'requirement'))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getFileInfo (fileId) {
|
// 整改部门返回
|
||||||
return new Promise(resolve => {
|
rectificationDepartmentBack (val) {
|
||||||
let fileInfo
|
this.model.rectificationDepartment_dictText = val.map(item => item.text).join(',')
|
||||||
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' || fileSuffix === 'doc') {
|
|
||||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
|
||||||
// word文件仍使用KKFile进行预览
|
|
||||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
|
||||||
this.iframeSrc = url
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
close () {
|
close () {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.model = {}
|
this.model = {}
|
||||||
this.index = undefined
|
this.index = undefined
|
||||||
this.iframeSrc = ''
|
|
||||||
},
|
},
|
||||||
handleCancel () {
|
handleCancel () {
|
||||||
this.close()
|
this.close()
|
||||||
|
|||||||
@@ -124,11 +124,8 @@ export default {
|
|||||||
title: this.$t('enterpriseStandardLibrary.standard.rectificationDepartment'),
|
title: this.$t('enterpriseStandardLibrary.standard.rectificationDepartment'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200,
|
width: 200,
|
||||||
dataIndex: 'rectificationDepartment',
|
dataIndex: 'rectificationDepartment_dictText',
|
||||||
customRender: (value, row, index) => {
|
scopedSlots: { customRender: 'text' }
|
||||||
return <j-select-depart v-model={this.dataSource[index].rectificationDepartment}
|
|
||||||
backDepart={true} />
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
@@ -168,51 +165,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 稽查内容的添加
|
// 稽查内容的添加
|
||||||
handleAdd () {
|
handleAdd () {
|
||||||
const value = this.$refs.addForm.formInline
|
|
||||||
// 过程稿件id 发布稿>修改单>报批稿>送审稿>征求意见稿>草稿
|
|
||||||
const fieldArr = ['publish_of_original', 'modification_list', 'draft_for_review', 'draft_for_comment', 'draft']
|
|
||||||
const needSuffixArr = ['doc', 'docx', 'pdf']
|
|
||||||
let fileId = ''
|
|
||||||
for (const item of fieldArr) {
|
|
||||||
if (!fileId && value[item + '_dictText']) {
|
|
||||||
const fileNameArr = value[item + '_dictText'].split(',')
|
|
||||||
for (let i = 0; i < fileNameArr.length; i++) {
|
|
||||||
// 截取文件后缀名
|
|
||||||
const fileSuffix = (fileNameArr[i] ? fileNameArr[i].split('.')[fileNameArr[i].split('.').length - 1] : '').toLowerCase()
|
|
||||||
if (needSuffixArr.includes(fileSuffix)) {
|
|
||||||
// 说明是可以预览的文件格式
|
|
||||||
console.log('支持文件预览的文件', value[item].split(',')[i], value[item + '_dictText'].split(',')[i])
|
|
||||||
fileId = value[item].split(',')[i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.$refs.checkContentModal.title = this.$t('newlyAdded')
|
this.$refs.checkContentModal.title = this.$t('newlyAdded')
|
||||||
this.$refs.checkContentModal.add(fileId)
|
this.$refs.checkContentModal.add()
|
||||||
},
|
},
|
||||||
// 稽查内容的编辑
|
// 稽查内容的编辑
|
||||||
handleEdit (record, index) {
|
handleEdit (record, index) {
|
||||||
const value = this.$refs.addForm.formInline
|
|
||||||
// 过程稿件id 发布稿>修改单>报批稿>送审稿>征求意见稿>草稿
|
|
||||||
const fieldArr = ['publish_of_original', 'modification_list', 'draft_for_review', 'draft_for_comment', 'draft']
|
|
||||||
const needSuffixArr = ['doc', 'docx', 'pdf']
|
|
||||||
let fileId = ''
|
|
||||||
for (const item of fieldArr) {
|
|
||||||
if (!fileId && value[item + '_dictText']) {
|
|
||||||
const fileNameArr = value[item + '_dictText'].split(',')
|
|
||||||
for (let i = 0; i < fileNameArr.length; i++) {
|
|
||||||
// 截取文件后缀名
|
|
||||||
const fileSuffix = (fileNameArr[i] ? fileNameArr[i].split('.')[fileNameArr[i].split('.').length - 1] : '').toLowerCase()
|
|
||||||
if (needSuffixArr.includes(fileSuffix)) {
|
|
||||||
// 说明是支持文件预览的文件格式
|
|
||||||
console.log('支持文件预览的文件', value[item].split(',')[i], value[item + '_dictText'].split(',')[i])
|
|
||||||
fileId = value[item].split(',')[i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.$refs.checkContentModal.title = this.$t('edit')
|
this.$refs.checkContentModal.title = this.$t('edit')
|
||||||
this.$refs.checkContentModal.edit(fileId, record, index)
|
this.$refs.checkContentModal.edit(record, index)
|
||||||
},
|
},
|
||||||
// 稽查内容的删除
|
// 稽查内容的删除
|
||||||
handleDelete (index) {
|
handleDelete (index) {
|
||||||
|
|||||||
Reference in New Issue
Block a user