安虹睿
1 year ago
10 changed files with 569 additions and 209 deletions
@ -0,0 +1,212 @@ |
|||||
|
|
||||
|
<template> |
||||
|
<div class="page-box" v-loading="Loading.appMainLoading"> |
||||
|
<tablePagination |
||||
|
v-if="apiColumns_Table" |
||||
|
:currenButtonData="currenButtonData" |
||||
|
:tableData="tableData" |
||||
|
:tableLoading="Loading.tableLoading" |
||||
|
:tableColumns="apiColumns_Table" |
||||
|
@rowDrop="rowDrop" |
||||
|
:totalCount="totalCount" |
||||
|
:multipleSelection="multipleSelection" |
||||
|
:MaxResultCount="PageListParams.MaxResultCount" |
||||
|
@topbutton="topbutton" |
||||
|
@inlineDialog="inlineDialog" |
||||
|
@sortChange="sortChange" |
||||
|
@alertoldSkipCount="alertoldSkipCount" |
||||
|
@alterResultCount="alterResultCount" |
||||
|
@handleSelectionChange="handleSelectionChange" |
||||
|
@buttonOperationClick_left="buttonOperationClick_left" |
||||
|
:currentPageProps="oldSkipCount" |
||||
|
:quicklySearchOption="quicklySearchOption" |
||||
|
@quicklySearchClick="quicklySearchClick" |
||||
|
@quicklySearchClear="quicklySearchClear" |
||||
|
:primarySearchOption="primarySearchOption" |
||||
|
@overallSearchFormClick="overallSearchFormClick" |
||||
|
:httpOverallSearchData="httpOverallSearchData" |
||||
|
:buttonOperationList_left="operationButtonsTable" |
||||
|
> |
||||
|
<!-- <div slot="tableTopSlot"> |
||||
|
上方按钮插槽位置预留 |
||||
|
</div> |
||||
|
<div slot="searchPrimarySlot"> |
||||
|
普通初级搜索插槽位置预留 |
||||
|
</div> --> |
||||
|
<!-- <template>表格内容插槽位置预留</template> --> |
||||
|
</tablePagination> |
||||
|
<!-- 新增与编辑 --> |
||||
|
<newAndEdiDialog |
||||
|
:loading="Loading.newAndEdiLoading" |
||||
|
:active="active" |
||||
|
:pageStatus="pageStatus" |
||||
|
:formReveal="formReveal" |
||||
|
:formTitle="formTitle" |
||||
|
:displayDialog="editDialog" |
||||
|
:FormData="formReveal ? CreateFormData : editFormData" |
||||
|
:Form="formReveal ? CreateForm : editForm" |
||||
|
:Options="editOptions" |
||||
|
:Handle="editHandle" |
||||
|
:Rules="formReveal ? editRules.cerateRule : editRules.editRule" |
||||
|
@FormSubmit="FormSubmit" |
||||
|
@close="FormClose" |
||||
|
@goBack="goBack" |
||||
|
></newAndEdiDialog> |
||||
|
<!-- 搜索按钮——窗体组件 --> |
||||
|
<searchPage |
||||
|
ref="searchTable" |
||||
|
:tableLoading="Loading.autoTableLoading" |
||||
|
:advancedFilter="advancedFilter()" |
||||
|
:filterPageListParams="filterPageListParams" |
||||
|
:formTitle="searchTitle" |
||||
|
:displayDialog="displayDialog.AddNewDialog" |
||||
|
:searchTableData="searchData" |
||||
|
:searchTableColumns="searchColumns" |
||||
|
:searchTotalCount="searchTotalCount" |
||||
|
:supplierItemPage="searchPageListParams" |
||||
|
@handleSelectionChange="prepareFormData" |
||||
|
@SizeChange="searchAlterResultCount($event, searchPageListParams)" |
||||
|
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" |
||||
|
@tableButtonClick="searchSubmit(arguments)" |
||||
|
></searchPage> |
||||
|
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用--> |
||||
|
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 --> |
||||
|
<importFile |
||||
|
:loading="Loading.importLoading" |
||||
|
:show="displayDialog.importDialog" |
||||
|
:disabledMethod = {method1:false,method2:false,method3:false} |
||||
|
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false} |
||||
|
isAllowPartImportValue="1" |
||||
|
@importClick="postImportMergeClick(arguments)" |
||||
|
@postImportDown="importDown" |
||||
|
></importFile> |
||||
|
<!--抽屉--> |
||||
|
<curren-Drawer |
||||
|
ref="currenDrawer_Ref" |
||||
|
:title="apiColumns_DesTions" |
||||
|
@rowDrop="rowDrop" |
||||
|
:tableColumns="apiColumns_DetailsTable" |
||||
|
:tabsDesTions="apiColumns_DesTions" |
||||
|
:DrawerLoading="Loading.DrawerLoading" |
||||
|
:drawer="displayDialog.detailsDialog" |
||||
|
:propsData="propsData" |
||||
|
:dropdownData="dropdownData" |
||||
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
||||
|
@drawerbutton="drawerbutton" |
||||
|
@handleCommand="drawerHandle" |
||||
|
@close-value="closeValue" |
||||
|
:firstTabs="firstTabs" |
||||
|
:totalCount="totalCountDetails" |
||||
|
:currentPage="oldSkipCountDetails" |
||||
|
:MaxResultCount="MaxResultCountDetails" |
||||
|
@alterResultCountDetails="alterResultCountDetails" |
||||
|
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
||||
|
:buttonOperationList_left="operationButtonsDetail" |
||||
|
></curren-Drawer> |
||||
|
<!-- <curren-Drawer |
||||
|
:title="apiColumns_DesTions" |
||||
|
:tableColumns="apiColumns_DetailsTable" |
||||
|
:tabsDesTions="apiColumns_DesTions" |
||||
|
:DrawerLoading="Loading.DrawerLoading" |
||||
|
:drawer="displayDialog.detailsDialog" |
||||
|
:dropdownData="dropdownData" |
||||
|
:propsData="propsData" |
||||
|
:tableLoading="tableLoading" |
||||
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
||||
|
@drawerbutton="drawerbutton" |
||||
|
@handleCommand="drawerHandle" |
||||
|
@close-value="closeValue" |
||||
|
:firstTabs="firstTabs" |
||||
|
></curren-Drawer> --> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { tableMixins } from "@/mixins/TableMixins" |
||||
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
||||
|
import { drawerMixins } from "@/mixins/drawerMixins" |
||||
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins" |
||||
|
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins" |
||||
|
import { mixins } from "@/mixins/mixins" |
||||
|
import { filterSelectMixins } from '@/mixins/filter-Select' |
||||
|
import { initFromApiColumnsLable } from '@/utils/index' |
||||
|
|
||||
|
// import { getExportConfigList } from '@/api/wms-interface' |
||||
|
|
||||
|
export default { |
||||
|
name: "ExportCustomUserSetting", |
||||
|
mixins: [ |
||||
|
tableMixins, |
||||
|
LoadingMixins, |
||||
|
drawerMixins, |
||||
|
TableHeaderMixins, |
||||
|
mixins, |
||||
|
filterSelectMixins, |
||||
|
newAndEdiDialogMixins |
||||
|
], |
||||
|
computed: { |
||||
|
editDialog: { |
||||
|
get: function () { |
||||
|
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
data () { |
||||
|
const userInfo=this.$store.getters.currentUserInfo |
||||
|
return { |
||||
|
tableLoading:false, |
||||
|
//常用按钮数据 |
||||
|
currenButtonData: [ |
||||
|
this.defaultAddBtn(),//新增 |
||||
|
this.defaultFieldSettingBtn(),//字段设置 |
||||
|
this.defaultFreshBtn(),//刷新 |
||||
|
this.defaultFilterBtn(),//筛选 |
||||
|
], |
||||
|
//新增 |
||||
|
CreateFormData: { |
||||
|
customUserSetting: null, |
||||
|
exportUserName: userInfo.name, |
||||
|
exportUserId: userInfo.id, |
||||
|
exportColumnName: null, |
||||
|
exportTableName: null, |
||||
|
}, |
||||
|
//编辑 |
||||
|
editFormData: { |
||||
|
customUserSetting: null, |
||||
|
exportUserName: userInfo.name, |
||||
|
exportUserId: userInfo.id, |
||||
|
exportColumnName: null, |
||||
|
exportTableName: null, |
||||
|
}, |
||||
|
editOptions: {}, |
||||
|
CreateForm: [ |
||||
|
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", colSpan: 12 }, |
||||
|
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnName", colSpan: 12 }, |
||||
|
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", colSpan: 12 }, |
||||
|
], |
||||
|
editForm: [ |
||||
|
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", colSpan: 12 }, |
||||
|
{ type: "input", label:initFromApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnName", colSpan: 12 }, |
||||
|
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", colSpan: 12 }, |
||||
|
], |
||||
|
editRules: { |
||||
|
cerateRule: { |
||||
|
customUserSetting: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
exportColumnName: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
exportTableName: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
}, |
||||
|
editRule: { |
||||
|
customUserSetting: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
exportColumnName: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
exportTableName: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
} |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
mounted () { |
||||
|
this.paging(); |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/styles/basicData.scss"; |
||||
|
</style> |
@ -1,212 +1,290 @@ |
|||||
|
|
||||
<template> |
<template> |
||||
<div class="page-box" v-loading="Loading.appMainLoading"> |
<div class="page-box" v-loading="Loading.appMainLoading"> |
||||
<tablePagination |
<tablePagination |
||||
v-if="apiColumns_Table" |
v-if="apiColumns_Table" |
||||
:currenButtonData="currenButtonData" |
:currenButtonData="currenButtonData" |
||||
:tableData="tableData" |
:tableData="tableData" |
||||
:tableLoading="Loading.tableLoading" |
:tableLoading="Loading.tableLoading" |
||||
:tableColumns="apiColumns_Table" |
:tableColumns="apiColumns_Table" |
||||
@rowDrop="rowDrop" |
@rowDrop="rowDrop" |
||||
:totalCount="totalCount" |
:totalCount="totalCount" |
||||
:multipleSelection="multipleSelection" |
:multipleSelection="multipleSelection" |
||||
:MaxResultCount="PageListParams.MaxResultCount" |
:MaxResultCount="PageListParams.MaxResultCount" |
||||
@topbutton="topbutton" |
@topbutton="topbutton" |
||||
@inlineDialog="inlineDialog" |
@inlineDialog="inlineDialog" |
||||
@sortChange="sortChange" |
@sortChange="sortChange" |
||||
@alertoldSkipCount="alertoldSkipCount" |
@alertoldSkipCount="alertoldSkipCount" |
||||
@alterResultCount="alterResultCount" |
@alterResultCount="alterResultCount" |
||||
@handleSelectionChange="handleSelectionChange" |
@handleSelectionChange="handleSelectionChange" |
||||
@buttonOperationClick_left="buttonOperationClick_left" |
@buttonOperationClick_left="buttonOperationClick_left" |
||||
:currentPageProps="oldSkipCount" |
:currentPageProps="oldSkipCount" |
||||
:quicklySearchOption="quicklySearchOption" |
:quicklySearchOption="quicklySearchOption" |
||||
@quicklySearchClick="quicklySearchClick" |
@quicklySearchClick="quicklySearchClick" |
||||
@quicklySearchClear="quicklySearchClear" |
@quicklySearchClear="quicklySearchClear" |
||||
:primarySearchOption="primarySearchOption" |
:primarySearchOption="primarySearchOption" |
||||
@overallSearchFormClick="overallSearchFormClick" |
@overallSearchFormClick="overallSearchFormClick" |
||||
:httpOverallSearchData="httpOverallSearchData" |
:httpOverallSearchData="httpOverallSearchData" |
||||
:buttonOperationList_left="operationButtonsTable" |
:buttonOperationList_left="operationButtonsTable" |
||||
> |
:buttonOperationList_right="buttonOperationList_rightBase" |
||||
<!-- <div slot="tableTopSlot"> |
@buttonOperationClick_right="buttonOperationClick_right" |
||||
上方按钮插槽位置预留 |
> |
||||
</div> |
<!-- <div slot="tableTopSlot"> |
||||
<div slot="searchPrimarySlot"> |
上方按钮插槽位置预留 |
||||
普通初级搜索插槽位置预留 |
</div> --> |
||||
</div> --> |
<!-- <div slot="searchPrimarySlot"> |
||||
<!-- <template>表格内容插槽位置预留</template> --> |
普通初级搜索插槽位置预留 |
||||
</tablePagination> |
</div> --> |
||||
<!-- 新增与编辑 --> |
<!-- <template>表格内容插槽位置预留</template> --> |
||||
<newAndEdiDialog |
</tablePagination> |
||||
:loading="Loading.newAndEdiLoading" |
<!-- 新增与编辑 --> |
||||
:active="active" |
<newAndEdiDialog |
||||
:pageStatus="pageStatus" |
:loading="Loading.newAndEdiLoading" |
||||
:formReveal="formReveal" |
:active="active" |
||||
:formTitle="formTitle" |
:pageStatus="pageStatus" |
||||
:displayDialog="editDialog" |
:formReveal="formReveal" |
||||
:FormData="formReveal ? CreateFormData : editFormData" |
:formTitle="formTitle" |
||||
:Form="formReveal ? CreateForm : editForm" |
:displayDialog="editDialog" |
||||
:Options="editOptions" |
:FormData="formReveal ? CreateFormData : editFormData" |
||||
:Handle="editHandle" |
:Form="formReveal ? CreateForm : editForm" |
||||
:Rules="formReveal ? editRules.cerateRule : editRules.editRule" |
:Options="editOptions" |
||||
@FormSubmit="FormSubmit" |
:Handle="editHandle" |
||||
@close="FormClose" |
:Rules="formReveal ? editRules.cerateRule : editRules.editRule" |
||||
@goBack="goBack" |
@FormSubmit="FormSubmit" |
||||
></newAndEdiDialog> |
@close="FormClose" |
||||
<!-- 搜索按钮——窗体组件 --> |
@goBack="goBack" |
||||
<searchPage |
@changeSelect="changeSelect" |
||||
ref="searchTable" |
></newAndEdiDialog> |
||||
:tableLoading="Loading.autoTableLoading" |
<!-- 搜索按钮——窗体组件 --> |
||||
:advancedFilter="advancedFilter()" |
<searchPage |
||||
:filterPageListParams="filterPageListParams" |
ref="searchTable" |
||||
:formTitle="searchTitle" |
:tableLoading="Loading.autoTableLoading" |
||||
:displayDialog="displayDialog.AddNewDialog" |
:advancedFilter="advancedFilter()" |
||||
:searchTableData="searchData" |
:filterPageListParams="filterPageListParams" |
||||
:searchTableColumns="searchColumns" |
:formTitle="searchTitle" |
||||
:searchTotalCount="searchTotalCount" |
:displayDialog="displayDialog.AddNewDialog" |
||||
:supplierItemPage="searchPageListParams" |
:searchTableData="searchData" |
||||
@handleSelectionChange="prepareFormData" |
:searchTableColumns="searchColumns" |
||||
@SizeChange="searchAlterResultCount($event, searchPageListParams)" |
:searchTotalCount="searchTotalCount" |
||||
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" |
:supplierItemPage="searchPageListParams" |
||||
@tableButtonClick="searchSubmit(arguments)" |
@handleSelectionChange="prepareFormData" |
||||
></searchPage> |
@SizeChange="searchAlterResultCount($event, searchPageListParams)" |
||||
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用--> |
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" |
||||
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 --> |
@tableButtonClick="searchSubmit(arguments)" |
||||
<importFile |
></searchPage> |
||||
:loading="Loading.importLoading" |
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用--> |
||||
:show="displayDialog.importDialog" |
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 --> |
||||
:disabledMethod = {method1:false,method2:false,method3:false} |
<importFile |
||||
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false} |
:loading="Loading.importLoading" |
||||
isAllowPartImportValue="1" |
:show="displayDialog.importDialog" |
||||
@importClick="postImportMergeClick(arguments)" |
:disabledMethod = {method1:false,method2:false,method3:false} |
||||
@postImportDown="importDown" |
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false} |
||||
></importFile> |
isAllowPartImportValue="1" |
||||
<!--抽屉--> |
@importClick="postImportMergeClick(arguments)" |
||||
<curren-Drawer |
@postImportDown="importDown" |
||||
ref="currenDrawer_Ref" |
></importFile> |
||||
:title="apiColumns_DesTions" |
<!--抽屉--> |
||||
@rowDrop="rowDrop" |
<curren-Drawer |
||||
:tableColumns="apiColumns_DetailsTable" |
ref="currenDrawer_Ref" |
||||
:tabsDesTions="apiColumns_DesTions" |
:title="apiColumns_DesTions" |
||||
:DrawerLoading="Loading.DrawerLoading" |
@rowDrop="rowDrop" |
||||
:drawer="displayDialog.detailsDialog" |
:tableColumns="apiColumns_DetailsTable" |
||||
:propsData="propsData" |
:tabsDesTions="apiColumns_DesTions" |
||||
:dropdownData="dropdownData" |
:DrawerLoading="Loading.DrawerLoading" |
||||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
:drawer="displayDialog.detailsDialog" |
||||
@drawerbutton="drawerbutton" |
:Butttondata="[]" |
||||
@handleCommand="drawerHandle" |
:propsData="propsData" |
||||
@close-value="closeValue" |
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
||||
:firstTabs="firstTabs" |
@drawerbutton="drawerbutton" |
||||
:totalCount="totalCountDetails" |
@handleCommand="drawerHandle" |
||||
:currentPage="oldSkipCountDetails" |
@close-value="closeValue" |
||||
:MaxResultCount="MaxResultCountDetails" |
:firstTabs="firstTabs" |
||||
@alterResultCountDetails="alterResultCountDetails" |
:totalCount="totalCountDetails" |
||||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
:currentPage="oldSkipCountDetails" |
||||
:buttonOperationList_left="operationButtonsDetail" |
:MaxResultCount="MaxResultCountDetails" |
||||
></curren-Drawer> |
@alterResultCountDetails="alterResultCountDetails" |
||||
<!-- <curren-Drawer |
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
||||
:title="apiColumns_DesTions" |
:buttonOperationList_left="operationButtonsDetail" |
||||
:tableColumns="apiColumns_DetailsTable" |
></curren-Drawer> |
||||
:tabsDesTions="apiColumns_DesTions" |
<!-- <curren-Drawer |
||||
:DrawerLoading="Loading.DrawerLoading" |
:title="apiColumns_DesTions" |
||||
:drawer="displayDialog.detailsDialog" |
:tableColumns="apiColumns_DetailsTable" |
||||
:dropdownData="dropdownData" |
:tabsDesTions="apiColumns_DesTions" |
||||
:propsData="propsData" |
:DrawerLoading="Loading.DrawerLoading" |
||||
:tableLoading="tableLoading" |
:drawer="displayDialog.detailsDialog" |
||||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
:dropdownData="dropdownData" |
||||
@drawerbutton="drawerbutton" |
:propsData="propsData" |
||||
@handleCommand="drawerHandle" |
:tableLoading="tableLoading" |
||||
@close-value="closeValue" |
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
||||
:firstTabs="firstTabs" |
@drawerbutton="drawerbutton" |
||||
></curren-Drawer> --> |
@handleCommand="drawerHandle" |
||||
</div> |
@close-value="closeValue" |
||||
</template> |
:firstTabs="firstTabs" |
||||
<script> |
></curren-Drawer> --> |
||||
import { tableMixins } from "@/mixins/TableMixins" |
</div> |
||||
import { LoadingMixins } from "@/mixins/LoadingMixins" |
</template> |
||||
import { drawerMixins } from "@/mixins/drawerMixins" |
<script> |
||||
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins" |
import { tableMixins } from "@/mixins/TableMixins" |
||||
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins" |
import { LoadingMixins } from "@/mixins/LoadingMixins" |
||||
import { mixins } from "@/mixins/mixins" |
import { drawerMixins } from "@/mixins/drawerMixins" |
||||
import { filterSelectMixins } from '@/mixins/filter-Select' |
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins" |
||||
import { initFromApiColumnsLable } from '@/utils/index' |
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins" |
||||
|
import { mixins } from "@/mixins/mixins" |
||||
|
import { filterSelectMixins } from '@/mixins/filter-Select' |
||||
|
import { initFromApiColumnsLable,firstWordSizeChange } from '@/utils/index' |
||||
|
import { getPageList } from '@/api/wms-api' |
||||
|
|
||||
// import { getExportConfigList } from '@/api/wms-interface' |
// import { getExportConfigList } from '@/api/wms-interface' |
||||
|
|
||||
export default { |
export default { |
||||
name: "ExportCustomUserSetting", |
name: "ExportCustomUserSetting", |
||||
mixins: [ |
mixins: [ |
||||
tableMixins, |
tableMixins, |
||||
LoadingMixins, |
LoadingMixins, |
||||
drawerMixins, |
drawerMixins, |
||||
TableHeaderMixins, |
TableHeaderMixins, |
||||
mixins, |
mixins, |
||||
filterSelectMixins, |
filterSelectMixins, |
||||
newAndEdiDialogMixins |
newAndEdiDialogMixins |
||||
], |
], |
||||
computed: { |
computed: { |
||||
editDialog: { |
editDialog: { |
||||
get: function () { |
get: function () { |
||||
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
// 转义导出列 |
||||
}, |
if(this.formReveal){ |
||||
|
if(this.CreateFormData.exportColumnName)this.CreateFormData.exportColumnNameArr = this.CreateFormData.exportColumnName.split(" ") |
||||
|
}else{ |
||||
|
if(this.editFormData.exportColumnName)this.editFormData.exportColumnNameArr = this.editFormData.exportColumnName.split(" ") |
||||
|
if(this.editFormData.exportTableName){this.getColumList()} |
||||
|
} |
||||
|
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
||||
}, |
}, |
||||
}, |
}, |
||||
data () { |
}, |
||||
const userInfo=this.$store.getters.currentUserInfo |
data () { |
||||
return { |
const userInfo=this.$store.getters.currentUserInfo |
||||
tableLoading:false, |
return { |
||||
//常用按钮数据 |
tableLoading:false, |
||||
currenButtonData: [ |
//常用按钮数据 |
||||
this.defaultAddBtn(),//新增 |
currenButtonData: [ |
||||
this.defaultFieldSettingBtn(),//字段设置 |
this.defaultAddBtn(),//新增 |
||||
this.defaultFreshBtn(),//刷新 |
this.defaultFieldSettingBtn(),//字段设置 |
||||
this.defaultFilterBtn(),//筛选 |
this.defaultFreshBtn(),//刷新 |
||||
], |
this.defaultFilterBtn(),//筛选 |
||||
//新增 |
], |
||||
CreateFormData: { |
//新增 |
||||
customUserSetting: null, |
CreateFormData: { |
||||
exportUserName: userInfo.name, |
customUserSetting: null, |
||||
exportUserId: userInfo.id, |
exportUserName: userInfo.name, |
||||
exportColumnName: null, |
exportUserId: userInfo.id, |
||||
exportTableName: null, |
exportColumnNameArr:null, |
||||
}, |
exportColumnName: null, |
||||
//编辑 |
exportTableName: null, |
||||
editFormData: { |
}, |
||||
customUserSetting: null, |
//编辑 |
||||
exportUserName: userInfo.name, |
editFormData: { |
||||
exportUserId: userInfo.id, |
id:null, |
||||
exportColumnName: null, |
customUserSetting: null, |
||||
exportTableName: null, |
exportUserName: userInfo.name, |
||||
}, |
exportUserId: userInfo.id, |
||||
editOptions: {}, |
exportColumnNameArr:null, |
||||
CreateForm: [ |
exportColumnName: null, |
||||
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", colSpan: 12 }, |
exportTableName: null, |
||||
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnName", colSpan: 12 }, |
}, |
||||
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", colSpan: 12 }, |
editOptions: {}, |
||||
], |
CreateForm: [ |
||||
editForm: [ |
// { type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", colSpan: 12 }, |
||||
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", colSpan: 12 }, |
// { type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnName", colSpan: 12 }, |
||||
{ type: "input", label:initFromApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnName", colSpan: 12 }, |
// { type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", colSpan: 12 }, |
||||
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", colSpan: 12 }, |
{ type: "select", label: initFromApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", options: "whetherOrNotForNum", colSpan: 12 }, |
||||
], |
{ type: "select", label: initFromApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", userOptions: this.initTablesName(), colSpan: 12 }, |
||||
editRules: { |
{ type: "select", disabled:true, multiple:true, label: initFromApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnNameArr", userOptions:null, colSpan: 12 }, |
||||
cerateRule: { |
], |
||||
customUserSetting: [{ required: true, trigger: "blur", message: "不可为空" }], |
editForm: [ |
||||
exportColumnName: [{ required: true, trigger: "blur", message: "不可为空" }], |
{ type: "select", label: initFromApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", options: "whetherOrNotForNum", colSpan: 12 }, |
||||
exportTableName: [{ required: true, trigger: "blur", message: "不可为空" }], |
{ type: "select", label: initFromApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", userOptions: this.initTablesName(), colSpan: 12 }, |
||||
}, |
{ type: "select", multiple:true, label: initFromApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnNameArr", userOptions:null, colSpan: 12 }, |
||||
editRule: { |
], |
||||
customUserSetting: [{ required: true, trigger: "blur", message: "不可为空" }], |
editRules: { |
||||
exportColumnName: [{ required: true, trigger: "blur", message: "不可为空" }], |
cerateRule: { |
||||
exportTableName: [{ required: true, trigger: "blur", message: "不可为空" }], |
customUserSetting: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
} |
exportColumnNameArr: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
exportTableName: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
}, |
}, |
||||
}; |
editRule: { |
||||
|
customUserSetting: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
exportColumnNameArr: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
exportTableName: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
} |
||||
|
}, |
||||
|
columsList:[], |
||||
|
}; |
||||
|
}, |
||||
|
mounted () { |
||||
|
this.paging(); |
||||
|
}, |
||||
|
methods:{ |
||||
|
// 新增/编辑的导出表下拉 |
||||
|
initTablesName(){ |
||||
|
let _names = this.$store.getters.tablesName |
||||
|
let tablesList = [] |
||||
|
_names.forEach(item=>{ |
||||
|
let _item = { |
||||
|
// label:initFromApiColumnsLable(item), |
||||
|
label:item, |
||||
|
value:item |
||||
|
} |
||||
|
tablesList.push(_item) |
||||
|
}) |
||||
|
return tablesList |
||||
}, |
}, |
||||
mounted () { |
changeSelect(prop,val){ |
||||
this.paging(); |
// 获取对应表的表头 |
||||
|
if(prop=='exportTableName'){ |
||||
|
if(this.formReveal){ |
||||
|
this.CreateForm[2].disabled = false |
||||
|
this.CreateFormData.exportColumnNameArr = [] |
||||
|
}else{ |
||||
|
this.editForm[2].disabled = false |
||||
|
this.editFormData.exportColumnNameArr = [] |
||||
|
} |
||||
|
this.getColumList() |
||||
|
} |
||||
|
// 转义导出列值 |
||||
|
if(prop == 'exportColumnNameArr'){ |
||||
|
let _val = val.join(' ') |
||||
|
if(this.formReveal){ |
||||
|
this.CreateFormData.exportColumnName = _val |
||||
|
}else{ |
||||
|
this.editFormData.exportColumnName = _val |
||||
|
} |
||||
|
} |
||||
}, |
}, |
||||
}; |
getColumList(){ |
||||
</script> |
let val = this.formReveal ? this.CreateFormData.exportTableName : this.editFormData.exportTableName |
||||
<style lang="scss" scoped> |
getPageList(this.PageListParams, val+'/base').then(res=>{ |
||||
@import "@/styles/basicData.scss"; |
let _column = res.items[0] |
||||
</style> |
this.columsList = [] |
||||
|
for(let item in _column){ |
||||
|
if(item != 'detail' || item != 'details'){ |
||||
|
let _item = { |
||||
|
// label:initFromApiColumnsLable(val+firstWordSizeChange(item,'Upper')), |
||||
|
label:item, |
||||
|
value:item |
||||
|
} |
||||
|
this.columsList.push(_item) |
||||
|
} |
||||
|
} |
||||
|
if(this.formReveal){ |
||||
|
this.CreateForm[2].userOptions = this.columsList |
||||
|
}else{ |
||||
|
this.editForm[2].userOptions = this.columsList |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/styles/basicData.scss"; |
||||
|
</style> |
Loading…
Reference in new issue