update 文档拆分-导入拆分结果
This commit is contained in:
@@ -354,7 +354,7 @@ export default {
|
||||
break
|
||||
// 海外
|
||||
case StandardSource.OVERSEAS.value:
|
||||
path = ''
|
||||
path = '/standardRegulationLibrary/OverseasStandardDetail'
|
||||
break
|
||||
// 企标
|
||||
case StandardSource.ENTERPRISE.value:
|
||||
|
||||
@@ -72,6 +72,15 @@
|
||||
@change="handleTableChange"
|
||||
@operationClick="operationClick">
|
||||
|
||||
<!--跳转标准详情-->
|
||||
<template v-slot:detail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
@@ -92,7 +101,7 @@ import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import { releaseSplitStandard, changePermission, withdraw } from '@api/documentToolApi'
|
||||
import ImportSplitResultModal from './modules/ImportSplitResultModal.vue'
|
||||
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||
import { SplitStatus } from '@/enums/commonEnums'
|
||||
import { SplitStatus, StandardSource } from '@/enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'DocumentSplit',
|
||||
@@ -154,13 +163,15 @@ export default {
|
||||
{
|
||||
dataIndex: 'serialNumber',
|
||||
title: this.$t('standardSelect.standardNumber'),
|
||||
width: 150
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'detail' }
|
||||
},
|
||||
// 标准名称
|
||||
{
|
||||
dataIndex: 'title',
|
||||
title: this.$t('standardSelect.standardName'),
|
||||
width: 150
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'detail' }
|
||||
},
|
||||
// 文件状态
|
||||
{
|
||||
@@ -246,7 +257,7 @@ export default {
|
||||
})
|
||||
},
|
||||
/**
|
||||
* TODO 撤回
|
||||
* 撤回
|
||||
* @param id
|
||||
*/
|
||||
handleWithdraw ({ id }) {
|
||||
@@ -328,6 +339,39 @@ export default {
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 跳转标准详情
|
||||
* @param record
|
||||
*/
|
||||
toDetailPage ({ standardId, splitStandardSource }) {
|
||||
let path
|
||||
// 根据来源跳转不同的详情页
|
||||
switch (splitStandardSource) {
|
||||
// 国内
|
||||
case StandardSource.DOMESTIC.value:
|
||||
path = '/standardRegulationLibrary/DomesticStandardDetail'
|
||||
break
|
||||
// 海外
|
||||
case StandardSource.OVERSEAS.value:
|
||||
path = '/standardRegulationLibrary/OverseasStandardDetail'
|
||||
break
|
||||
// 企标
|
||||
case StandardSource.ENTERPRISE.value:
|
||||
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
if (!path) {
|
||||
return
|
||||
}
|
||||
const query = {
|
||||
id: standardId
|
||||
}
|
||||
this.$openPageNewSheet({
|
||||
path, query
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<a-input-search class="tree-search" v-model="searchValue" :placeholder="$t('nodeQuickLookup')" @search="onSearch" />
|
||||
<div class="page-tree-box page-tree-box-has-search">
|
||||
<a-spin :spinning="loading">
|
||||
<a-tree :show-line="true" :show-icon="true" :tree-data="treeData" :selected-keys="selectedKeys">
|
||||
<a-tree :show-line="true" :show-icon="true" :tree-data="treeData" :selected-keys="selectedKeys" :replaceFields="{key: 'id'}">
|
||||
<template #title="record">
|
||||
<div class="tree-operate-node"
|
||||
@mouseenter="handleTreeMouseover(record.id)"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<standard-selection :placeholder="$t('pleaseSelect') + $t('standardSelect.standardNumber')"
|
||||
type="radio"
|
||||
@nameChange="handleStandardNumberChange"
|
||||
v-decorator="['standardNumber', validatorRules.standardNumber]" />
|
||||
v-decorator="['serialNumber', validatorRules.serialNumber]" />
|
||||
</a-form-item>
|
||||
<!--标准名称-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardSelect.standardName')">
|
||||
@@ -26,13 +26,13 @@
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
disabled
|
||||
v-decorator="['standardName', validatorRules.standardName]" />
|
||||
v-decorator="['title', validatorRules.title]" />
|
||||
</a-form-item>
|
||||
<!--文本状态-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('docTool.comparison.textStatus')">
|
||||
<j-dict-select-tag
|
||||
class="box-input"
|
||||
v-decorator="['standardFileType', validatorRules.standardFileType]"
|
||||
v-decorator="['fileType', validatorRules.fileType]"
|
||||
:placeholder="$t('pleaseSelect') + $t('docTool.comparison.textStatus')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
@@ -41,7 +41,7 @@
|
||||
<!--拆分结果文件-->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('docTool.split.splitResultFile')">
|
||||
<div class="result-file-box">
|
||||
<j-upload v-decorator="['fileId', validatorRules.fileId]" return-id :number="1" class="line-btn" />
|
||||
<j-upload v-decorator="['splitFileId', validatorRules.splitFileId]" return-id :number="1" class="line-btn" />
|
||||
<a-button class="line-btn">{{ $t('templateDownload') }}</a-button>
|
||||
</div>
|
||||
</a-form-item>
|
||||
@@ -59,6 +59,7 @@
|
||||
<script>
|
||||
import StandardSelection from '../../../../components/selection/StandardSelection.vue'
|
||||
import { importSplitResult } from '@api/documentToolApi'
|
||||
import { getFileInfo } from '@api/api'
|
||||
|
||||
export default {
|
||||
name: 'ImportSplitResultModal',
|
||||
@@ -79,22 +80,22 @@ export default {
|
||||
},
|
||||
validatorRules: {
|
||||
// 标准号
|
||||
standardNumber: {
|
||||
serialNumber: {
|
||||
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('standardSelect.standardNumber') }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 标准名称
|
||||
standardName: {
|
||||
title: {
|
||||
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('standardSelect.standardName') }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 文本状态
|
||||
standardFileType: {
|
||||
fileType: {
|
||||
rules: [{ required: true, message: this.$t('pleaseSelect') + this.$t('docTool.comparison.textStatus') }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 拆分结果文件
|
||||
fileId: {
|
||||
splitFileId: {
|
||||
rules: [{ required: true, message: this.$t('uploadFile.pleaseUpload') + this.$t('docTool.split.splitResultFile') }],
|
||||
validateTrigger: 'change'
|
||||
}
|
||||
@@ -106,10 +107,14 @@ export default {
|
||||
this.visible = true
|
||||
},
|
||||
handleOk () {
|
||||
this.form.validateFields((errors, values) => {
|
||||
this.form.validateFields(async (errors, values) => {
|
||||
if (!errors) {
|
||||
this.confirmLoading = true
|
||||
const formData = values
|
||||
const fileInfo = await getFileInfo({ id: formData.splitFileId })
|
||||
if (fileInfo.success) {
|
||||
formData.fileName = fileInfo.result.fileName
|
||||
}
|
||||
importSplitResult(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -148,7 +153,7 @@ export default {
|
||||
})
|
||||
},
|
||||
handleStandardNumberChange (name) {
|
||||
this.form.setFieldsValue({ standardName: name })
|
||||
this.form.setFieldsValue({ title: name })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
v-model="formInline[item.dbFieldName]"
|
||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||
:type="'select'"
|
||||
:type="radioDictSelect.includes(item.dbFieldName)? 'radio' : 'select'"
|
||||
:triggerChange="false"
|
||||
:dictCode="item.dictField" />
|
||||
<!-- 11, 下拉多选(数据字典) -->
|
||||
@@ -230,6 +230,7 @@ export default {
|
||||
FieldType,
|
||||
TypeOfClauseItem,
|
||||
hiddenFieldList: ['item_content'], // 隐藏的字段
|
||||
radioDictSelect: ['is_long_effect'], // 使用radio样式的数据字典单选
|
||||
disabledFieldList: [], // 禁用的字段
|
||||
specialPlaceholder: {}, // 特殊的placeholder
|
||||
optionsData: {}, // 通过接口获取的下拉数据
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
v-model="formInline[item.dbFieldName]"
|
||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||
:type="'select'"
|
||||
:type="radioDictSelect.includes(item.dbFieldName)? 'radio' : 'select'"
|
||||
:triggerChange="false"
|
||||
:dictCode="item.dictField"/>
|
||||
<!-- 11, 下拉多选(数据字典) -->
|
||||
@@ -193,6 +193,7 @@ export default {
|
||||
uploadName: '',
|
||||
type: 'add',
|
||||
hiddenFieldList: ['item_num', 'item_title', 'item_content', 'interpretation_articles'], // 隐藏的字段
|
||||
radioDictSelect: ['is_long_effect'], // 使用radio样式的数据字典单选
|
||||
disabledFieldList: [], // 禁用的字段
|
||||
specialPlaceholder: {}, // 特殊的placeholder
|
||||
optionsData: {} // 通过接口获取的下拉数据
|
||||
|
||||
Reference in New Issue
Block a user