[add] 文档拆分模块

This commit is contained in:
lideqin
2023-08-15 18:20:08 +08:00
parent ff0570abd2
commit 74ac8c07d0
11 changed files with 929 additions and 132 deletions
+35 -13
View File
@@ -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