265 lines
8.1 KiB
Vue
265 lines
8.1 KiB
Vue
<template>
|
|
<a-card :bordered="false">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
<a-row :gutter="24">
|
|
<!--标准号/标准名称-->
|
|
<a-col :md="6" :sm="12">
|
|
<a-form-item :label="$t('standardSelect.standardNumOrName')">
|
|
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.projectName')" v-model="queryParam.projectName"></j-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
<!--拆分状态-->
|
|
<a-col :md="6" :sm="12">
|
|
<a-form-item :label="$t('docTool.split.splitState')">
|
|
<j-dict-select-tag
|
|
class="box-input"
|
|
v-model="queryParam.projectHealth"
|
|
:placeholder="$t('pleaseSelect') + $t('docTool.split.splitState')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
:dictCode="'project_health'" />
|
|
</a-form-item>
|
|
</a-col>
|
|
<!--编辑人-->
|
|
<a-col :md="6" :sm="12">
|
|
<a-form-item :label="$t('docTool.split.editor')">
|
|
<j-input :placeholder="$t('pleaseEnter') + $t('docTool.split.editor')" v-model="queryParam.projectName"></j-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :md="6" :sm="8">
|
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
|
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">
|
|
{{ $t('query') }}
|
|
</a-button>
|
|
</span>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form>
|
|
</div>
|
|
<div class="table-operator">
|
|
<!--拆分已入库文本-->
|
|
<a-button icon="plus" type="primary" @click="handleModule" v-has="'split:sarFileSplitInfo:splitFile'">{{ $t('docTool.split.splitText') }}
|
|
</a-button>
|
|
<!--导入拆分结果-->
|
|
<a-button icon="download" type="primary" ghost @click="handleExport" v-has="'split:sarFileSplitInfo:splitResult'">
|
|
{{ $t('docTool.split.importResults') }}
|
|
</a-button>
|
|
<!--批量删除-->
|
|
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'split:sarFileSplitInfo:deleteBatch'">{{ $t('batchDelete') }}</a-button>
|
|
</div>
|
|
<div>
|
|
<j-table
|
|
:columns="columns"
|
|
:dataSource="dataSource"
|
|
:can-drag="true"
|
|
rowKey="id"
|
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
:pagination="ipagination"
|
|
:scroll="{x: '100%'}"
|
|
:loading="loading"
|
|
@change="handleTableChange">
|
|
|
|
<template v-slot:operation="{text, record}">
|
|
<a @click="operationClick(operationList[0],record)">{{ operationList[0].text }}</a>
|
|
<a-divider type="vertical" />
|
|
<a-dropdown placement="bottomCenter">
|
|
<a-icon type="more" class="operate-icon-btn operate-icon-more" />
|
|
<a-menu slot="overlay">
|
|
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
|
|
<a @click="operationClick(operation,record)">
|
|
<div class="operate-btn">
|
|
<!-- 编辑图标-->
|
|
<i class="iconfont icon-bianji operate-btn-icon" v-if="operation.text === $t('edit')" />
|
|
<!-- 删除图标-->
|
|
<i class="iconfont icon-shanchu_ operate-btn-icon" v-if="operation.text === $t('delete')" />
|
|
{{ operation.text }}
|
|
</div>
|
|
</a>
|
|
</a-menu-item>
|
|
</a-menu>
|
|
</a-dropdown>
|
|
</template>
|
|
|
|
</j-table>
|
|
</div>
|
|
|
|
<!--拆分已入库文本弹框-->
|
|
<split-text ref="splitText" @visible="splitTextVisible"></split-text>
|
|
<!--导入拆分结果弹框-->
|
|
<import-result ref="importResult" @visible="importResultVisible"></import-result>
|
|
</a-card>
|
|
</template>
|
|
|
|
<script>
|
|
import '../../../assets/less/common.less'
|
|
import JTable from '../../../components/jero/JTable.vue'
|
|
// 拆分已入库文本弹框
|
|
import SplitText from '../modules/SplitText.vue'
|
|
// 导入拆分结果弹框
|
|
import ImportResult from '../modules/ImportResult.vue'
|
|
import { JeroListMixin } from '../../../mixins/JeroListMixin.js'
|
|
import { releaseSplitStandard } from '../../../api/documentToolApi.js'
|
|
|
|
export default {
|
|
name: 'DocumentSplit',
|
|
components: { JTable, SplitText, ImportResult },
|
|
mixins: [JeroListMixin],
|
|
data () {
|
|
return {
|
|
operationList: [
|
|
// 发布
|
|
{
|
|
text: this.$t('release'),
|
|
clickEvent: 'handleRelease',
|
|
has: ''
|
|
},
|
|
// 查看
|
|
{
|
|
text: this.$t('view'),
|
|
clickEvent: 'handleDetail',
|
|
has: ''
|
|
},
|
|
// 编辑
|
|
{
|
|
text: this.$t('edit'),
|
|
clickEvent: 'handleEdit',
|
|
has: ''
|
|
},
|
|
// 删除
|
|
{
|
|
text: this.$t('delete'),
|
|
clickEvent: 'handleDelete',
|
|
has: ''
|
|
}
|
|
],
|
|
columns: [
|
|
// 标准号
|
|
{
|
|
dataIndex: '1',
|
|
title: this.$t('standardSelect.standardNumber'),
|
|
width: 150
|
|
},
|
|
// 标准名称
|
|
{
|
|
dataIndex: '2',
|
|
title: this.$t('standardSelect.standardName'),
|
|
width: 150
|
|
},
|
|
// 文件状态
|
|
{
|
|
dataIndex: '3',
|
|
title: this.$t('docTool.split.fileStatus'),
|
|
width: 150
|
|
},
|
|
// 文件名称
|
|
{
|
|
dataIndex: '4',
|
|
title: this.$t('fileName'),
|
|
width: 150
|
|
},
|
|
// 拆分状态
|
|
{
|
|
dataIndex: '5',
|
|
title: this.$t('docTool.split.splitState'),
|
|
width: 150
|
|
},
|
|
// 编辑人
|
|
{
|
|
dataIndex: '6',
|
|
title: this.$t('docTool.split.editor'),
|
|
width: 150
|
|
},
|
|
// 拆分时间
|
|
{
|
|
dataIndex: '7',
|
|
title: this.$t('docTool.split.splitTime'),
|
|
width: 150
|
|
},
|
|
// 拆分结果
|
|
{
|
|
dataIndex: '91',
|
|
title: this.$t('docTool.split.splitResult'),
|
|
sorter: true,
|
|
width: 150
|
|
},
|
|
// 操作
|
|
{
|
|
title: this.$t('operation'),
|
|
fixed: 'right',
|
|
width: 150,
|
|
scopedSlots: { customRender: 'operation' }
|
|
}
|
|
],
|
|
url: {
|
|
list: '/split/sarFileSplitInfo/page', // 表格数据
|
|
deleteBatch: '', // 批量删除
|
|
deleteUrl: '',
|
|
backDocument: '' // 回传至文档库
|
|
},
|
|
dataSource: [
|
|
{ id: 1 }
|
|
]
|
|
}
|
|
},
|
|
methods: {
|
|
// 拆分已入库文本按钮点击
|
|
handleModule () {
|
|
this.$refs.splitText.open()
|
|
},
|
|
// 导入拆分结果
|
|
handleExport () {
|
|
this.$refs.importResult.open()
|
|
},
|
|
/**
|
|
* 发布
|
|
*/
|
|
handleRelease ({ id }) {
|
|
this.$confirm({
|
|
title: this.$t('confirmRelease'),
|
|
content: this.$t('confirmReleaseContent'),
|
|
onOk: () => {
|
|
this.loading = true
|
|
releaseSplitStandard({ id }).then(res => {
|
|
if (res.success) {
|
|
this.$message.success(res.message)
|
|
this.modalFormOk()
|
|
} else {
|
|
this.$message.warn(res.message)
|
|
}
|
|
}).finally(() => {
|
|
this.loading = false
|
|
})
|
|
}
|
|
})
|
|
},
|
|
// 表格操作列的查看
|
|
handleEdit (record) {
|
|
this.$router.push({
|
|
path: '/documentTool/DocumentSplitDetail',
|
|
query: {
|
|
infoId: record.id,
|
|
infoNumber: record.serialNumber,
|
|
createBy: record.createBy,
|
|
standardName: 'GB 7258-2020 机动车运行安全'
|
|
}
|
|
})
|
|
},
|
|
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>
|
|
</style>
|