[add] 文档拆分模块
This commit is contained in:
@@ -4,15 +4,36 @@
|
||||
<search ref="searchRef" :flag="'1'" :url="url"/>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleBatchDel" type="primary" icon="delete">{{ $t('batchDelete') }}</a-button>
|
||||
<a-button @click="handleExportXls" type="primary" icon="export">{{ $t('dataExport') }}</a-button>
|
||||
<a-button @click="handleFileExport" type="primary" icon="mail">{{ $t('exportWithFile') }}</a-button>
|
||||
<a-button @click="handleCompare" type="primary" icon="share-alt">{{ $t('share') }}</a-button>
|
||||
<a-button @click="downTemplate" type="primary" icon="download">{{ $t('templateDownload') }}</a-button>
|
||||
<div class="operator-text" @click="handleBatchDel">
|
||||
<a-icon type="delete"/>
|
||||
{{ $t('batchDelete') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleExportXls">
|
||||
<a-icon type="export"/>
|
||||
{{ $t('dataExport') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleFileExport">
|
||||
<a-icon type="mail"/>
|
||||
{{ $t('exportWithFile') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleCompare">
|
||||
<a-icon type="share-alt"/>
|
||||
{{ $t('share') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="downTemplate">
|
||||
<a-icon type="download"/>
|
||||
{{ $t('templateDownload') }}
|
||||
</div>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImport">
|
||||
<a-button type="primary" icon="import">{{ $t('import') }}</a-button>
|
||||
<div class="operator-text">
|
||||
<a-icon type="import"/>
|
||||
{{ $t('import') }}
|
||||
</div>
|
||||
</a-upload>
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">{{ $t('newlyAdded') }}</a-button>
|
||||
<div class="operator-text" @click="handleAdd">
|
||||
<a-icon type="plus"/>
|
||||
{{ $t('newlyAdded') }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<!--
|
||||
@@ -22,7 +43,7 @@
|
||||
editTable再传操作按钮的同时把事件定义名称也传过去
|
||||
-->
|
||||
<table-data
|
||||
ref="tableDataRef"
|
||||
ref="tableData"
|
||||
:flag="'1'"
|
||||
:operationList="operationList"
|
||||
@editTable="editTable"
|
||||
@@ -62,6 +83,7 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { downFile, downloadFile, getAction } from '@/api/manage'
|
||||
import Modal from 'ant-design-vue'
|
||||
import store from '@/store'
|
||||
import eventBus from '@/common/event'
|
||||
|
||||
export default {
|
||||
name: 'DocumentLibrary',
|
||||
@@ -136,7 +158,7 @@ export default {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.idList = []
|
||||
this.$emit('searchGetData')
|
||||
this.$refs.tableData.$emit('searchGetData')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -181,7 +203,7 @@ export default {
|
||||
getAction(this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.$emit('searchGetData')
|
||||
this.$refs.tableData.$emit('searchGetData')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -204,7 +226,7 @@ export default {
|
||||
getAction(url, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.$emit('searchGetData')
|
||||
this.$refs.tableData.$emit('searchGetData')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -226,7 +248,7 @@ export default {
|
||||
getAction(url, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$emit('searchGetData')
|
||||
this.$refs.tableData.$emit('searchGetData')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -369,7 +391,7 @@ export default {
|
||||
)
|
||||
})
|
||||
} else {
|
||||
this.$emit('searchGetData')
|
||||
this.$refs.tableData.$emit('searchGetData')
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
}
|
||||
this.spinning = false
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<div class="splitting">
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<search flag="3" :url="url"/>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<!-- v-has="'split:sarFileSplitInfo:splitFile'"-->
|
||||
<div class="operator-text" @click="handleModule">
|
||||
<a-icon type="plus"/>
|
||||
{{ $t('docTool.split.splitText') }}
|
||||
</div>
|
||||
<!-- v-has="'split:sarFileSplitInfo:splitResult'"-->
|
||||
<div class="operator-text" @click="handleExport">
|
||||
<a-icon type="import" :rotate="-90"/>
|
||||
{{ $t('docTool.split.importResults') }}
|
||||
</div>
|
||||
<!-- v-has="'split:sarFileSplitInfo:deleteBatch'"-->
|
||||
<div class="operator-text" @click="handleDel">
|
||||
<a-icon type="delete"/>
|
||||
{{ $t('batchDelete') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="splitting-table">
|
||||
<table-data
|
||||
:url="url"
|
||||
:flag="'3'"
|
||||
:operationList="operationList"
|
||||
showAction
|
||||
ref="tableData"
|
||||
@onSelectChange="onSelectChange"
|
||||
@backDocument="backDocument"
|
||||
@deleteDetail="deleteDetail"
|
||||
@detailClick="detailClick"
|
||||
></table-data>
|
||||
</div>
|
||||
<split-text ref="splitText" @visible="splitTextVisible"></split-text>
|
||||
<import-result ref="importResult" @visible="importResultVisible"></import-result>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Search from '@/components/customField/Search'
|
||||
import TableData from '@/components/customField/TableData'
|
||||
// 拆分已入库文本弹框
|
||||
import SplitText from './modules/SplitText'
|
||||
// 导入拆分结果弹框
|
||||
import ImportResult from './modules/ImportResult'
|
||||
import { httpAction, getAction } from '../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'DocumentSplit',
|
||||
components: { Search, TableData, SplitText, ImportResult },
|
||||
data () {
|
||||
return {
|
||||
selectedRowKeys: [],
|
||||
operationList: [
|
||||
// 回传至文档库
|
||||
{
|
||||
text: this.$t('docTool.split.backDocument'),
|
||||
clickEvent: 'backDocument'
|
||||
},
|
||||
// 查看
|
||||
{
|
||||
text: this.$t('view'),
|
||||
ClickEvent: 'detailClick'
|
||||
},
|
||||
// 删除
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
ClickEvent: 'deleteDetail'
|
||||
}
|
||||
],
|
||||
url: {
|
||||
tableHeader: 'split/sarFileSplitInfo/getHeader', // 表格头部字段
|
||||
searchList: 'split/sarFileSplitInfo/queryCondition', // 搜索字段
|
||||
tableList: 'split/sarFileSplitInfo/page', // 表格数据
|
||||
deleteBatch: '', // 批量删除
|
||||
deleteUrl: '',
|
||||
backDocument: '' // 回传至文档库
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 拆分已入库文本按钮点击
|
||||
handleModule () {
|
||||
this.$refs.splitText.open()
|
||||
},
|
||||
// 导入拆分结果
|
||||
handleExport () {
|
||||
this.$refs.importResult.open()
|
||||
},
|
||||
// 批量删除
|
||||
handleDel () {
|
||||
const params = {
|
||||
ids: this.selectedRowKeys.join(',')
|
||||
}
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.$confirm({
|
||||
title: this.$t('confirmDeletion'),
|
||||
content: '',
|
||||
onOk: () => {
|
||||
httpAction(this.url.deleteBatch, params, 'post').then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.selectedRowKeys = []
|
||||
this.$refs.tableData.$emit('searchGetData')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
// 表格操作列的删除
|
||||
deleteDetail (val) {
|
||||
this.$confirm({
|
||||
content: this.$t('confirmDeletion'),
|
||||
onOk:
|
||||
async () => {
|
||||
getAction(this.url.deleteUrl, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.$refs.tableData.$emit('searchGetData')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 表格选中的回调
|
||||
onSelectChange (selKeys) {
|
||||
this.selectedRowKeys = selKeys
|
||||
},
|
||||
// 表格操作列-回传至文档库
|
||||
backDocument (val) {
|
||||
this.$confirm({
|
||||
content: this.$t('backDocument'),
|
||||
onOk: () => {
|
||||
const params = {
|
||||
id: val.id,
|
||||
fileName: val.fileName,
|
||||
connectId: val.connectId
|
||||
}
|
||||
getAction(this.url.backDocument, params).then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.$refs.tableData.$emit('searchGetData')
|
||||
} else {
|
||||
this.$message.warning(res.data.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表格操作列的查看
|
||||
detailClick (val) {
|
||||
this.$router.push({
|
||||
path: '/docManage/splitting/splitDetail',
|
||||
query: {
|
||||
infoId: val.id,
|
||||
infoNumber: val.serialNumber,
|
||||
createBy: val.createBy
|
||||
}
|
||||
})
|
||||
},
|
||||
splitTextVisible (val, num) {
|
||||
if (num === 1) {
|
||||
this.$refs.tableData.$emit('searchGetData')
|
||||
}
|
||||
},
|
||||
importResultVisible (val, num) {
|
||||
if (num === 1) {
|
||||
this.$refs.tableData.$emit('searchGetData')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@@ -1,13 +0,0 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DocumentSplite'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="$t('importResults')"
|
||||
placement="right"
|
||||
:visible="visible"
|
||||
@close="onClose"
|
||||
width="1100"
|
||||
>
|
||||
<div class="table-page-search-wrapper">
|
||||
<search :url="url" :flag="'condition'"></search>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text">
|
||||
<!-- 拆分文件 -->
|
||||
<split-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></split-upload>
|
||||
</div>
|
||||
<div class="operator-text" @click="downLoadTemplate">
|
||||
<a-icon type="download"/>
|
||||
{{$t('templateDownload')}}
|
||||
</div>
|
||||
</div>
|
||||
<tableData
|
||||
:flag="'header'"
|
||||
:url="url"
|
||||
:type="type"
|
||||
selectionType="radio"
|
||||
:showAction="false"
|
||||
:operationList="operationList"
|
||||
@onSelectChange="onSelectChange"
|
||||
/>
|
||||
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button style="margin-right: 15px" @click="cancelImports">{{$t('cancel')}}</a-button>
|
||||
<a-button type="primary" @click="handleSubmit" :loading="loading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
|
||||
<a-modal
|
||||
:title="titleItem"
|
||||
class="split-error"
|
||||
:visible="preErrVisible"
|
||||
@cancel="handleErrCancel"
|
||||
:footer="false"
|
||||
>
|
||||
<div class="err-value" v-html="errValue"></div>
|
||||
</a-modal>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { downloadFile, httpAction } from '@/api/manage'
|
||||
import Search from '@/components/customField/Search'
|
||||
import TableData from '@/components/customField/TableData'
|
||||
import SplitUpload from '@/components/splitUpload/SplitUpload'
|
||||
|
||||
export default {
|
||||
name: 'ImportResult',
|
||||
components: { Search, TableData, SplitUpload },
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
visible: false,
|
||||
disabled: false,
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
type: 'pdfdoc',
|
||||
form: {},
|
||||
url: {
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', // 表格头部字段
|
||||
searchList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', // 搜索字段
|
||||
tableList: 'split/sarFileSplitInfo/splitResultPageInfo', // 表格数据
|
||||
downloadTemplate: '',
|
||||
submit: ''
|
||||
},
|
||||
operationList: [],
|
||||
accept: 'application/x-zip-compressed,application/zip',
|
||||
preErrVisible: false,
|
||||
errValue: '',
|
||||
titleItem: '' // 错误标题
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
},
|
||||
onClose () {
|
||||
this.visible = false
|
||||
this.$emit('visible', false)
|
||||
},
|
||||
onSelectChange (keys, rows) {
|
||||
this.selectedRowKeys = keys
|
||||
this.selectedRows = rows
|
||||
},
|
||||
cancelImports () {
|
||||
this.$emit('visible', false)
|
||||
},
|
||||
// 上传文件
|
||||
uploadSuccess (data) {
|
||||
const attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
})
|
||||
}
|
||||
// 赋值给当前对应的表单文件
|
||||
this.form.file = attIdList.join(',')
|
||||
},
|
||||
// 模板下载
|
||||
downLoadTemplate () {
|
||||
const name = this.$t('documentSplitTemplate') + '.xlsx'
|
||||
downloadFile(this.url.downloadTemplate, name, {})
|
||||
},
|
||||
// 保存
|
||||
handleSubmit () {
|
||||
if (this.loading) {
|
||||
return
|
||||
}
|
||||
if (this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('pleaseSelectOne'))
|
||||
} else if (!this.form.file) {
|
||||
this.$message.warning(this.$t('pleaseUploadSplitFile'))
|
||||
} else if (this.selectedRowKeys && this.selectedRowKeys.length === 1) {
|
||||
const row = this.selectedRows[0]
|
||||
const params = {
|
||||
connectId: row.connect_id,
|
||||
splitFileId: this.form.file,
|
||||
fileName: row.file_name,
|
||||
serialNumber: row.serial_number,
|
||||
title: row.title,
|
||||
titleEn: row.title_en,
|
||||
fileType: row.text_info_id
|
||||
}
|
||||
if (this.form.file) {
|
||||
this.loading = true
|
||||
httpAction(this.url.submit, params, 'post').then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('visible', false, 1)
|
||||
} else {
|
||||
if (res.data.code === 1) {
|
||||
this.$message.error(res.data.message)
|
||||
} else {
|
||||
this.titleItem = '失败'
|
||||
this.preErrVisible = true
|
||||
this.errValue = res.data.message
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
handleErrCancel () {
|
||||
this.preErrVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
.table-operator {
|
||||
margin-bottom: 29px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="$t('docTool.split.splitText')"
|
||||
placement="right"
|
||||
:visible="visible"
|
||||
@close="onClose"
|
||||
width="1100"
|
||||
>
|
||||
<div class="table-page-search-wrapper">
|
||||
<search :url="url" flag="condition" :minLength="2"></search>
|
||||
</div>
|
||||
<div class="operator-select">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('docTool.split.fileType')">
|
||||
<span><i class="required">*</i>{{ $t('docTool.split.fileType') }}</span>
|
||||
</div>
|
||||
<a-select v-model="fileGroup" :placeholder="$t('pleaseSelect') + $t('docTool.split.fileType')"
|
||||
class="box-input">
|
||||
<a-select-option value="GSO" key="GSO" :title="$t('docTool.split.gso')">
|
||||
{{$t('docTool.split.gso')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="KMVSS_Table" key="KMVSS_Table" :title="$t('docTool.split.kmvssTable')">
|
||||
{{$t('docTool.split.kmvssTable')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="KMVSS_Article" key="KMVSS_Article" :title="$t('docTool.split.kmvssArticle')">
|
||||
{{$t('docTool.split.kmvssArticle')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="CFR" key="CFR" :title="$t('docTool.split.cfr')">
|
||||
{{$t('docTool.split.cfr')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="UNECE" key="UNECE" :title="$t('docTool.split.unece')">
|
||||
{{$t('docTool.split.unece')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="JPN_Attachment" key="JPN_Attachment" :title="$t('docTool.split.jpnAttachment')">
|
||||
{{$t('docTool.split.jpnAttachment')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="JPN_Article" key="JPN_Article" :title="$t('docTool.split.jpnArticle')">
|
||||
{{$t('docTool.split.jpnArticle')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="GB" key="GB" :title="$t('docTool.split.gb')">
|
||||
{{$t('docTool.split.gb')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="GBT" key="GBT" :title="$t('docTool.split.gbt')">
|
||||
{{$t('docTool.split.gbt')}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<table-data
|
||||
flag="header"
|
||||
selectionType="radio"
|
||||
:url="url"
|
||||
:type="type"
|
||||
:operationList="operationList"
|
||||
@onSelectChange="onSelectChange"
|
||||
/>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="cancelSplit" style='margin-right: 15px'>{{$t('cancel')}}</a-button>
|
||||
<a-button type="primary" :loading="loading" @click="submitSplit">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Search from '@/components/customField/Search'
|
||||
import TableData from '@/components/customField/TableData'
|
||||
import { httpAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'SplitText',
|
||||
components: { Search, TableData },
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
fileGroup: '',
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
url: {
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', // 表格头部字段
|
||||
searchList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', // 搜索字段
|
||||
tableList: 'split/sarFileSplitInfo/splitFilePageInfo', // 表格数据
|
||||
addSplit: ''
|
||||
},
|
||||
type: 'pdfdoc',
|
||||
operationList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
},
|
||||
// 抽屉关闭
|
||||
onClose () {
|
||||
this.visible = false
|
||||
this.$emit('visible', false)
|
||||
},
|
||||
// 表格选中改变
|
||||
onSelectChange (keys, rows) {
|
||||
this.selectedRowKeys = keys
|
||||
this.selectedRows = rows
|
||||
},
|
||||
// 取消
|
||||
cancelSplit () {
|
||||
this.visible = false
|
||||
this.$emit('visible', false)
|
||||
},
|
||||
// 拆分
|
||||
submitSplit () {
|
||||
if (this.loading) {
|
||||
return
|
||||
}
|
||||
if (!this.fileGroup) {
|
||||
this.$message.warning(this.$t('docTool.split.selectFileType'))
|
||||
} else if (this.selectedRowKeys === undefined || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectOne'))
|
||||
} else if (this.selectedRowKeys && this.selectedRowKeys.length === 1) {
|
||||
const file = this.selectedRows[0]
|
||||
if (file.file_name) {
|
||||
const name = file.file_name.split('.')
|
||||
const nameSuffix = name[name.length - 1]
|
||||
if (this.fileGroup === 'GSO') {
|
||||
if (nameSuffix.toLowerCase() === 'doc' || nameSuffix.toLowerCase() === 'docx' || nameSuffix.toLowerCase() === 'pdf') {
|
||||
const params = {
|
||||
attId: file.id,
|
||||
title: file.title,
|
||||
titleEn: file.title_en,
|
||||
fileName: file.file_name,
|
||||
serialNumber: file.serial_number,
|
||||
connectId: file.connect_id,
|
||||
fileGroup: this.fileGroup,
|
||||
fileType: file.text_info_id
|
||||
}
|
||||
this.loading = true
|
||||
httpAction(this.url.addSplit, params, 'post').then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('visible', false, 1)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('docTool.split.onlyWord'))
|
||||
}
|
||||
} else {
|
||||
const params = {
|
||||
attId: file.id,
|
||||
title: file.title,
|
||||
fileName: file.file_name,
|
||||
titleEn: file.title_en,
|
||||
serialNumber: file.serial_number,
|
||||
connectId: file.connect_id,
|
||||
fileGroup: this.fileGroup,
|
||||
fileType: file.text_info_id
|
||||
}
|
||||
this.loading = true
|
||||
httpAction(this.url.addSplit, params, 'post').then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('visible', false, 1)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
.operator-select {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.title-text {
|
||||
width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
/*min-width: 200px;*/
|
||||
display: inline-block;
|
||||
width: calc(100% - 116px);
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
|
||||
/deep/ .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
/deep/ .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user