5 changed files with 122 additions and 230 deletions
@ -1,177 +0,0 @@ |
|||||
<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" |
|
||||
:currentPageProps="oldSkipCount" |
|
||||
:quicklySearchOption="quicklySearchOption" |
|
||||
@quicklySearchClick="quicklySearchClick" |
|
||||
@quicklySearchClear="quicklySearchClear" |
|
||||
:primarySearchOption="primarySearchOption" |
|
||||
@overallSearchFormClick="overallSearchFormClick" |
|
||||
:httpOverallSearchData="httpOverallSearchData" |
|
||||
:buttonOperationList_left="buttonOperationClick_leftBase" |
|
||||
@buttonOperationClick_left="buttonOperationClick_left" |
|
||||
></tablePagination> |
|
||||
<curren-Drawer |
|
||||
:title="apiColumns_DesTions" |
|
||||
:tableColumns="apiColumns_DetailsTable" |
|
||||
:tabsDesTions="apiColumns_DesTions" |
|
||||
:DrawerLoading="Loading.DrawerLoading" |
|
||||
:drawer="displayDialog.detailsDialog" |
|
||||
:dropdownData="dropdownData" |
|
||||
:propsData="propsData" |
|
||||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|
||||
@drawerbutton="drawerbutton" |
|
||||
@handleCommand="drawerHandle" |
|
||||
@close-value="closeValue" |
|
||||
:totalCount="totalCountDetails" |
|
||||
:currentPage="oldSkipCountDetails" |
|
||||
:MaxResultCount="MaxResultCountDetails" |
|
||||
@alterResultCountDetails="alterResultCountDetails" |
|
||||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|
||||
></curren-Drawer> |
|
||||
<!-- 新增与编辑 --> |
|
||||
<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> |
|
||||
<filterForDetailPage |
|
||||
v-if="filterForDetailShow" |
|
||||
:listColumns="apiColumns_DetailsTable" |
|
||||
:parentColumns="apiColumns_Table" |
|
||||
@closeDialog="changeFilterForDetailShow" |
|
||||
></filterForDetailPage> |
|
||||
<!-- DeleteApi="TestSchoolDetailList_delete" --> |
|
||||
<!-- todo: 明细查询中的parentColumns 是否需要独立表头,现与列表页面一致--> |
|
||||
</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 { getToken } from '@/utils/auth' |
|
||||
import * as tableColumns_api from "@/utils/tableColumns_api/index" //全局从接口缓存的表头 |
|
||||
import * as tabsDesTions_api from "@/utils/tabsDesTions_api/index" //全局从接口缓存的详情 |
|
||||
import * as detailsTableColumns_api from "@/utils/detailsTableColumns_api/index" //全局从接口缓存的详情 |
|
||||
|
|
||||
|
|
||||
export default { |
|
||||
name: "demo_detail_addbase", |
|
||||
mixins: [ |
|
||||
tableMixins, |
|
||||
LoadingMixins, |
|
||||
drawerMixins, |
|
||||
TableHeaderMixins, |
|
||||
mixins, |
|
||||
filterSelectMixins, |
|
||||
newAndEdiDialogMixins |
|
||||
], |
|
||||
computed: { |
|
||||
editDialog: { |
|
||||
get: function () { |
|
||||
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
|
||||
}, |
|
||||
}, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
//常用按钮数据 |
|
||||
currenButtonData: [ |
|
||||
this.defaultAddBtn(),//新增 |
|
||||
this.defaultExportBtn({ |
|
||||
isRedundance:true, |
|
||||
isDetailExport:true |
|
||||
}),//导出 |
|
||||
this.defaultFieldSettingBtn(),//字段设置 |
|
||||
this.defaultFreshBtn(),//刷新 |
|
||||
this.defaultFilterBtn(),//筛选 |
|
||||
this.defaultFilterForDetailBtn()//明细查询按钮 |
|
||||
], |
|
||||
// 明细查询弹窗显示 |
|
||||
filterForDetailShow:false, |
|
||||
//新增数据 |
|
||||
CreateFormData: { |
|
||||
schoolName:null, |
|
||||
orderType:null, |
|
||||
details:null, |
|
||||
details: [ |
|
||||
{ |
|
||||
"lastModifierId": "ad731144-d789-f322-fede-327cac55dd36", |
|
||||
"creationTime": "1978-07-18T22:00:37.5Z", |
|
||||
"creatorId": "19e78d1b-6203-8d6d-b6e7-ae5b503c0824", |
|
||||
"id": "5926ec25-2132-ba25-6b93-e453c17f00e2", |
|
||||
"studentName": "张三0712", |
|
||||
"orderType": 712, |
|
||||
"masterId": "a044e2c6-3bc6-7cdd-55a6-f1a2a9682ccb", |
|
||||
"lastModificationTime": "1946-12-30T14:22:31.982Z" |
|
||||
}, |
|
||||
], |
|
||||
}, |
|
||||
//编辑数据 |
|
||||
editFormData: { |
|
||||
id:null, |
|
||||
schoolName:null, |
|
||||
orderType:null, |
|
||||
details:null, |
|
||||
}, |
|
||||
// 新增配置 |
|
||||
CreateForm: [ |
|
||||
{ type: "input", label: '名称', prop: 'schoolName', colSpan: 12 }, |
|
||||
{ type: "input", label: 'orderType', prop: 'orderType', colSpan: 12 }, |
|
||||
], |
|
||||
// 编辑配置 |
|
||||
editForm: [ |
|
||||
{ type: "input", label: '名称', prop: 'schoolName', colSpan: 12 }, |
|
||||
{ type: "input", label: 'orderType', prop: 'orderType', colSpan: 12 }, |
|
||||
], |
|
||||
editOptions: {}, |
|
||||
editRules: { |
|
||||
cerateRule: { |
|
||||
schoolName: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
||||
}, |
|
||||
editRule: { |
|
||||
schoolName: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
||||
} |
|
||||
}, |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.initApiColumns(tableColumns_api,tabsDesTions_api,detailsTableColumns_api) |
|
||||
this.paging(); |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
<style lang="scss" scoped> |
|
||||
@import "@/styles/basicData.scss"; |
|
||||
</style> |
|
@ -0,0 +1,113 @@ |
|||||
|
<template> |
||||
|
<div class="page-box" v-loading="Loading.appMainLoading"> |
||||
|
<!-- DEMO:带主子表查询 没有新增编辑删除 --> |
||||
|
<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" |
||||
|
:currentPageProps="oldSkipCount" |
||||
|
:quicklySearchOption="quicklySearchOption" |
||||
|
@quicklySearchClick="quicklySearchClick" |
||||
|
@quicklySearchClear="quicklySearchClear" |
||||
|
:primarySearchOption="primarySearchOption" |
||||
|
@overallSearchFormClick="overallSearchFormClick" |
||||
|
:httpOverallSearchData="httpOverallSearchData" |
||||
|
:buttonOperationList_left="buttonOperationClick_leftBase" |
||||
|
@buttonOperationClick_left="buttonOperationClick_left" |
||||
|
></tablePagination> |
||||
|
<curren-Drawer |
||||
|
ref="currenDrawer_Ref" |
||||
|
:title="apiColumns_DesTions" |
||||
|
@rowDrop="rowDrop" |
||||
|
:tableColumns="apiColumns_DetailsTable" |
||||
|
:tabsDesTions="apiColumns_DesTions" |
||||
|
:DrawerLoading="Loading.DrawerLoading" |
||||
|
:drawer="displayDialog.detailsDialog" |
||||
|
:propsData="propsData" |
||||
|
:Butttondata="[]" |
||||
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
||||
|
@drawerbutton="drawerbutton" |
||||
|
@handleCommand="drawerHandle" |
||||
|
@close-value="closeValue" |
||||
|
:totalCount="totalCountDetails" |
||||
|
:currentPage="oldSkipCountDetails" |
||||
|
:MaxResultCount="MaxResultCountDetails" |
||||
|
@alterResultCountDetails="alterResultCountDetails" |
||||
|
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
||||
|
:buttonOperationList_left="operationButtonsDetail" |
||||
|
></curren-Drawer> |
||||
|
<!-- 明细查询页面 --> |
||||
|
<filterForDetailPage |
||||
|
v-if="filterForDetailShow" |
||||
|
:parentColumns="apiColumns_Table" |
||||
|
@closeDialog="changeFilterForDetailShow" |
||||
|
></filterForDetailPage> |
||||
|
<!-- 导出弹窗 --> |
||||
|
<exportDrop |
||||
|
v-if="displayDialog.exportDialog" |
||||
|
@closeDialog="closeExportDrop" |
||||
|
@exportDropSubmit="exportDropSubmit" |
||||
|
></exportDrop> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { tableMixins } from "@/mixins/TableMixins"; |
||||
|
import { LoadingMixins } from "@/mixins/LoadingMixins"; |
||||
|
import { drawerMixins } from "@/mixins/drawerMixins" |
||||
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"; |
||||
|
import { mixins } from "@/mixins/mixins"; |
||||
|
import { filterSelectMixins } from '@/mixins/filter-Select' |
||||
|
import { getToken } from '@/utils/auth' |
||||
|
// import * as tableColumns_api from "@/utils/tableColumns_api/index" //全局从接口缓存的表头 |
||||
|
// import * as tabsDesTions_api from "@/utils/tabsDesTions_api/index" //全局从接口缓存的详情 |
||||
|
// import * as detailsTableColumns_api from "@/utils/detailsTableColumns_api/index" //全局从接口缓存的列表-明细 |
||||
|
// import * as detailsPageColumns_api from "@/utils/detailsPageColumns_api/index" //全局从接口缓存的明细列表 |
||||
|
|
||||
|
|
||||
|
export default { |
||||
|
name: "AsnMstr", |
||||
|
mixins: [ |
||||
|
tableMixins, |
||||
|
LoadingMixins, |
||||
|
drawerMixins, |
||||
|
TableHeaderMixins, |
||||
|
mixins, |
||||
|
filterSelectMixins, |
||||
|
], |
||||
|
data() { |
||||
|
return { |
||||
|
//常用按钮数据 |
||||
|
currenButtonData: [ |
||||
|
this.defaultExportBtn({ |
||||
|
isRedundance:true, |
||||
|
isDetailExport:true |
||||
|
}),//导出 |
||||
|
this.defaultFieldSettingBtn(),//字段设置 |
||||
|
this.defaultFreshBtn(),//刷新 |
||||
|
this.defaultFilterBtn(),//筛选 |
||||
|
this.defaultFilterForDetailBtn()//明细查询按钮 |
||||
|
], |
||||
|
}; |
||||
|
}, |
||||
|
mounted() { |
||||
|
// 如果使用动态api(全局进入时候获取情况) |
||||
|
// this.initApiColumns(tableColumns_api,tabsDesTions_api,detailsTableColumns_api,detailsPageColumns_api) |
||||
|
this.paging(); |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/styles/basicData.scss"; |
||||
|
</style> |
Loading…
Reference in new issue