update 树节点修改,标准分解单样式调整
This commit is contained in:
@@ -1,238 +0,0 @@
|
||||
<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="searchQuery" @reset="searchReset"></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>
|
||||
<j-table
|
||||
v-if="columns && columns.length > 0"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
@change="tableOnChange">
|
||||
</j-table>
|
||||
<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 JTable from '@/components/jero/JTable'
|
||||
import { httpAction } from '@/api/manage'
|
||||
import { ConfigurableTableMixin } from '../../../mixins/ConfigurableTableMixin'
|
||||
|
||||
export default {
|
||||
name: 'SplitText',
|
||||
components: { Search, JTable },
|
||||
mixins: [ConfigurableTableMixin],
|
||||
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: [],
|
||||
showAction: false,
|
||||
flag: 'header'
|
||||
}
|
||||
},
|
||||
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