|
@@ -268,6 +268,12 @@
|
|
|
@close="(visible) => (importTableDialogVisible = visible)"
|
|
@close="(visible) => (importTableDialogVisible = visible)"
|
|
|
@action-event="handleImportTableActionEvent"
|
|
@action-event="handleImportTableActionEvent"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <import-zip
|
|
|
|
|
+ :visible="importZipDialogVisible"
|
|
|
|
|
+ title="导入"
|
|
|
|
|
+ @close="(visible) => (importZipDialogVisible = visible)"
|
|
|
|
|
+ @action-event="handleImportZipActionEvent"
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
<xlsxFile
|
|
<xlsxFile
|
|
|
v-if="xlsxFileVisible"
|
|
v-if="xlsxFileVisible"
|
|
@@ -322,7 +328,7 @@ import IbpsImportColumnsDialog from '../components/import-columns-dialog'
|
|
|
import CustomDataDisplayMixin from '@/business/platform/system/mixins/customDataDisplay'
|
|
import CustomDataDisplayMixin from '@/business/platform/system/mixins/customDataDisplay'
|
|
|
import FormPrintTemplate from '@/business/platform/form/form-print/template'
|
|
import FormPrintTemplate from '@/business/platform/form/form-print/template'
|
|
|
import importTable from '@/business/platform/form/formrender/dynamic-form/components/import-table'
|
|
import importTable from '@/business/platform/form/formrender/dynamic-form/components/import-table'
|
|
|
-
|
|
|
|
|
|
|
+import importZip from '@/business/platform/form/formrender/dynamic-form/components/import-zip.vue'
|
|
|
import JTemplate from '../utils/JTemplate' // 自定义脚本
|
|
import JTemplate from '../utils/JTemplate' // 自定义脚本
|
|
|
import JDialogTemplate from '../utils/JDialogTemplate' // 对话框自定义脚本
|
|
import JDialogTemplate from '../utils/JDialogTemplate' // 对话框自定义脚本
|
|
|
|
|
|
|
@@ -335,7 +341,7 @@ import Vue from 'vue'
|
|
|
Vue.component('ibps-data-template-render-dialog', () => import('@/business/platform/data/templaterender/preview/dialog.vue'))
|
|
Vue.component('ibps-data-template-render-dialog', () => import('@/business/platform/data/templaterender/preview/dialog.vue'))
|
|
|
import xlsxFile from '@/business/platform/data/templaterender/templates/compenent/xlsxFile.vue'
|
|
import xlsxFile from '@/business/platform/data/templaterender/templates/compenent/xlsxFile.vue'
|
|
|
import generalModules from '@/views/system/jbdScan/generalModules.vue'
|
|
import generalModules from '@/views/system/jbdScan/generalModules.vue'
|
|
|
-
|
|
|
|
|
|
|
+import { importZip as importzip } from '@/api/upload/zip'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'list',
|
|
name: 'list',
|
|
|
components: {
|
|
components: {
|
|
@@ -354,6 +360,7 @@ export default {
|
|
|
DictionaryFormat,
|
|
DictionaryFormat,
|
|
|
Scan,
|
|
Scan,
|
|
|
importTable,
|
|
importTable,
|
|
|
|
|
+ importZip,
|
|
|
Print: () => import('../components/print'),
|
|
Print: () => import('../components/print'),
|
|
|
LabelPrint: () => import('../components/labelPrint'),
|
|
LabelPrint: () => import('../components/labelPrint'),
|
|
|
xlsxFile,
|
|
xlsxFile,
|
|
@@ -468,6 +475,7 @@ export default {
|
|
|
printList: [],
|
|
printList: [],
|
|
|
|
|
|
|
|
importTableDialogVisible: false,
|
|
importTableDialogVisible: false,
|
|
|
|
|
+ importZipDialogVisible: false,
|
|
|
position: null,
|
|
position: null,
|
|
|
importList: [],
|
|
importList: [],
|
|
|
importValue: null,
|
|
importValue: null,
|
|
@@ -1812,10 +1820,19 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 自定义导入 小林
|
|
// 自定义导入 小林
|
|
|
- handleImport (data = []) {
|
|
|
|
|
- this.importList = data
|
|
|
|
|
- this.importValue = this.getKeys(this.importList)
|
|
|
|
|
- this.importTableDialogVisible = true
|
|
|
|
|
|
|
+ handleImport (data = [], type = 'excel') {
|
|
|
|
|
+ switch (type) {
|
|
|
|
|
+ case 'excel':
|
|
|
|
|
+ this.importList = data
|
|
|
|
|
+ this.importValue = this.getKeys(this.importList)
|
|
|
|
|
+ this.importTableDialogVisible = true
|
|
|
|
|
+ break
|
|
|
|
|
+ case 'zip':
|
|
|
|
|
+ this.importZipDialogVisible = true
|
|
|
|
|
+ break
|
|
|
|
|
+ default:
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
handleImportTableActionEvent (file, options) {
|
|
handleImportTableActionEvent (file, options) {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -1837,6 +1854,13 @@ export default {
|
|
|
// ActionUtils.success('导入成功')
|
|
// ActionUtils.success('导入成功')
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ async handleImportZipActionEvent (file, options) {
|
|
|
|
|
+ // 调用上传接口
|
|
|
|
|
+ await importzip(file)
|
|
|
|
|
+ this.importZipDialogVisible = false
|
|
|
|
|
+ this.search()
|
|
|
|
|
+ ActionUtils.success('导入成功')
|
|
|
|
|
+ },
|
|
|
setValue (data) {
|
|
setValue (data) {
|
|
|
return Object.values(data).reduce((obj, item) => {
|
|
return Object.values(data).reduce((obj, item) => {
|
|
|
obj[item] = ''
|
|
obj[item] = ''
|