diff --git a/PC/InterFace.Dash/src/components/exportDrop/index.vue b/PC/InterFace.Dash/src/components/exportDrop/index.vue new file mode 100644 index 0000000..48e03c6 --- /dev/null +++ b/PC/InterFace.Dash/src/components/exportDrop/index.vue @@ -0,0 +1,89 @@ + + + + + 是否显示明细: + + 是 + 否 + + + + 是否冗余主表数据: + + 是 + 否 + + + + 本页导出 + 全部导出 + + + + + + + \ No newline at end of file diff --git a/PC/InterFace.Dash/src/mixins/LoadingMixins.js b/PC/InterFace.Dash/src/mixins/LoadingMixins.js index ef83937..efc9f06 100644 --- a/PC/InterFace.Dash/src/mixins/LoadingMixins.js +++ b/PC/InterFace.Dash/src/mixins/LoadingMixins.js @@ -18,7 +18,8 @@ export const LoadingMixins = { screenDialog: false, //筛选 AddNewDialog: false, //选择数据弹出框 scanningDialog: false, //扫描 - importDialog: false, //导出 + importDialog: false, //导入 + exportDialog: false, //导出 handleFromDialog: false, //执行生成 }, } diff --git a/PC/InterFace.Dash/src/mixins/TableHeaderMixins.js b/PC/InterFace.Dash/src/mixins/TableHeaderMixins.js index 370ca0a..6a1e19e 100644 --- a/PC/InterFace.Dash/src/mixins/TableHeaderMixins.js +++ b/PC/InterFace.Dash/src/mixins/TableHeaderMixins.js @@ -30,6 +30,32 @@ export const TableHeaderMixins = { } }, methods: { + // 关闭导出弹窗 + closeExportDrop(){ + this.displayDialog.exportDialog = false + }, + // 导出功能 + exportDropSubmit(type,form){ + const name = this.$route.meta.title + let _params = { + isRedundance:Boolean(form.isRedundance), + isDetailExport:Boolean(form.isDetail), + userId:JSON.parse(localStorage.getItem("currentUserInfo")).id + } + let _exportUrl = this.URLOption_export ? this.URLOption_export : this.URLOption_base; + let _special = this.URLOption_export ? true : false + let _data = JSON.parse(JSON.stringify(this.PageListParams)) + // 全部导出处理 + if(type && type == 'all'){ _data.MaxResultCount = this.totalCount} + this.closeExportDrop() + this.Loading.appMainLoading = true + postExport(_params,_data, _exportUrl, _special).then(res => { + this.blob(res, name)//使用前端导出名称 + this.Loading.appMainLoading = false + }).catch(err => { + this.Loading.appMainLoading = false + }) + }, // 点击常用按钮 topbutton(val,item) { // 更新 @@ -63,52 +89,7 @@ export const TableHeaderMixins = { // } // 导出 else if (val == 'export') { - const name = this.$route.meta.title - let _params = { - isRedundance:Boolean(item.isRedundance), - isDetailExport:Boolean(item.isDetailExport), - userId:JSON.parse(localStorage.getItem("currentUserInfo")).id - } - let _exportUrl = this.URLOption_export ? this.URLOption_export : this.URLOption_base; - let _special = this.URLOption_export ? true : false - this.$confirm('您将进行导出操作, 是否继续?', '提示', { - confirmButtonText: '本页导出', - cancelButtonText: '全部导出', - distinguishCancelAndClose: true, - closeOnClickModal: false, - closeOnPressEscape: false, - type: 'warning' - }).then(() => { - // 本页导出 - this.Loading.appMainLoading = true - // this.PageListParams.company = window.SITE_CONFIG['company'] - // this.PageListParams.function = name - //自定义导出url - // this.PageListParams.route = item.url ? item.url : this.URLOption_base + '/export'; - postExport(_params,this.PageListParams, _exportUrl, _special).then(res => { - this.blob(res, name)//使用前端导出名称 - this.Loading.appMainLoading = false - }).catch(err => { - this.Loading.appMainLoading = false - }) - }).catch((action) => { - if (action === 'cancel') { - // 全部导出 - this.Loading.appMainLoading = true - let params = JSON.parse(JSON.stringify(this.PageListParams)) - params.MaxResultCount = this.totalCount - this.Loading.appMainLoading = true - // params.company = window.SITE_CONFIG['company'] - // params.route = this.URLOption_base + '/export' - // params.function = name - postExport(_params,params, _exportUrl, _special).then(res => { - this.blob(res, name)//使用前端导出名称 - this.Loading.appMainLoading = false - }).catch(err => { - this.Loading.appMainLoading = false - }) - } - }); + this.displayDialog.exportDialog = true } // 导入 else if (val == 'import') { diff --git a/PC/InterFace.Dash/src/utils/utils.js b/PC/InterFace.Dash/src/utils/utils.js index 4555d89..5493136 100644 --- a/PC/InterFace.Dash/src/utils/utils.js +++ b/PC/InterFace.Dash/src/utils/utils.js @@ -54,7 +54,8 @@ import currenDrawer from "@/components/commonTabel-drawer"; //抽屉 import currenButton from "@/components/currenButton" //按钮 import currenTable from "@/components/currenTable" //table import tablePagination from "@/components/tablePagination"; //第一视图集成 -import importFile from "@/components/importFile" //导出 +import importFile from "@/components/importFile" //导入 +import exportDrop from "@/components/exportDrop" //导出 import pagination from "@/components/Pagination" //分页器 import conditionFilters from "@/components/conditionFilters" //高级筛选 import searchPage from '@/components/searchPage' //autocomplete拉取数据探弹窗 @@ -108,6 +109,7 @@ Vue.component('currenButton', currenButton) Vue.component('currenTable', currenTable) Vue.component('tablePagination', tablePagination) Vue.component('importFile', importFile) +Vue.component('exportDrop', exportDrop) Vue.component('pagination', pagination) Vue.component('conditionFilters', conditionFilters) Vue.component('searchPage', searchPage) diff --git a/PC/InterFace.Dash/src/views/interfaceBoard/AsnMstr.vue b/PC/InterFace.Dash/src/views/interfaceBoard/AsnMstr.vue index 8fbd0e0..382c8a9 100644 --- a/PC/InterFace.Dash/src/views/interfaceBoard/AsnMstr.vue +++ b/PC/InterFace.Dash/src/views/interfaceBoard/AsnMstr.vue @@ -50,6 +50,12 @@ :parentColumns="apiColumns_Table" @closeDialog="changeFilterForDetailShow" > + +