update order version of ListViewWithHead
Bu işleme şunda yer alıyor:
ebeveyn
77eab26048
işleme
70b2dd6f33
@ -21,22 +21,22 @@
|
||||
/>
|
||||
<BaseListTable
|
||||
key="confirmed"
|
||||
v-loading="tableLoading"
|
||||
v-loading="tableLoadings.ongoing"
|
||||
:table-config="null"
|
||||
:column-config="tableConfigs.ongoingTable"
|
||||
:table-data="dataLists.ongoing"
|
||||
@operate-event="handleOperate"
|
||||
@operate-event="handleOperate(type, $event)"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
|
||||
<el-pagination
|
||||
class="mt-5 flex justify-end"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handlePageChange"
|
||||
:current-page.sync="page"
|
||||
:page-sizes="[1, 5, 10, 20, 50, 100]"
|
||||
:page-size="size"
|
||||
:total="totalPage"
|
||||
@size-change="handleSizeChange('ongoing', $event)"
|
||||
@current-change="handlePageChange('ongoing', $event)"
|
||||
:current-page.sync="conditions.ongoing.page"
|
||||
:page-sizes="[1, 5, 10, 20]"
|
||||
:page-size="conditions.ongoing.limit"
|
||||
:total="totalPage.ongoing"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
</section>
|
||||
@ -49,21 +49,21 @@
|
||||
/>
|
||||
<BaseListTable
|
||||
key="unconfirmed"
|
||||
v-loading="tableLoading"
|
||||
v-loading="tableLoadings.pending"
|
||||
:table-config="null"
|
||||
:column-config="tableConfigs.pendingTable"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
:table-data="dataLists.pending"
|
||||
@operate-event="handleOperate(type, $event)"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
<el-pagination
|
||||
class="mt-5 flex justify-end"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handlePageChange"
|
||||
:current-page.sync="page"
|
||||
:page-sizes="[1, 5, 10, 20, 50, 100]"
|
||||
:page-size="size"
|
||||
:total="totalPage"
|
||||
@size-change="handleSizeChange('pending', $event)"
|
||||
@current-change="handlePageChange('pending', $event)"
|
||||
:current-page.sync="conditions.pending.page"
|
||||
:page-sizes="[1, 5, 10, 20]"
|
||||
:page-size="conditions.pending.limit"
|
||||
:total="totalPage.pending"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
</section>
|
||||
@ -76,26 +76,24 @@
|
||||
/>
|
||||
<BaseListTable
|
||||
key="ended"
|
||||
v-loading="tableLoading"
|
||||
v-loading="tableLoadings.finished"
|
||||
:table-config="null"
|
||||
:column-config="tableConfigs.finishedTable"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
:table-data="dataLists.finished"
|
||||
@operate-event="handleOperate(type, $event)"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
|
||||
<el-pagination
|
||||
class="mt-5 flex justify-end"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handlePageChange"
|
||||
:current-page.sync="page"
|
||||
:page-sizes="[1, 5, 10, 20, 50, 100]"
|
||||
:page-size="size"
|
||||
:total="totalPage"
|
||||
@size-change="handleSizeChange('finished', $event)"
|
||||
@current-change="handlePageChange('finished', $event)"
|
||||
:current-page.sync="conditions.finished.page"
|
||||
:page-sizes="[1, 5, 10, 20]"
|
||||
:page-size="conditions.finished.limit"
|
||||
:total="totalPage.finished"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
<!-- :current-page.sync="currentPage"
|
||||
:page-size.sync="pageSize" -->
|
||||
</section>
|
||||
|
||||
<!-- <DialogWithMenu
|
||||
@ -179,11 +177,11 @@ export default {
|
||||
DIALOG_JUST_FORM,
|
||||
dialogVisible: false,
|
||||
topBtnConfig: null,
|
||||
totalPage: 100,
|
||||
page: 1,
|
||||
size: 20, // 默认20
|
||||
dataList: [],
|
||||
tableLoading: false,
|
||||
tableLoadings: {
|
||||
ongoing: false,
|
||||
pending: false,
|
||||
finished: false,
|
||||
},
|
||||
subdialogVisible: false,
|
||||
subdialogConfigs: {
|
||||
form: {
|
||||
@ -277,6 +275,11 @@ export default {
|
||||
pending: [],
|
||||
finished: [],
|
||||
},
|
||||
totalPage: {
|
||||
ongoing: 0,
|
||||
pending: 0,
|
||||
finished: 0,
|
||||
},
|
||||
};
|
||||
},
|
||||
inject: ["urls"],
|
||||
@ -290,6 +293,7 @@ export default {
|
||||
methods: {
|
||||
// get confirmed list
|
||||
getSpecificList(type, payload) {
|
||||
this.tableLoadings[type] = true;
|
||||
let url = "#";
|
||||
switch (type) {
|
||||
case "ongoing":
|
||||
@ -306,17 +310,19 @@ export default {
|
||||
this.$http.post(url, payload).then(({ data: res }) => {
|
||||
if (res.code === 0 && res.data) {
|
||||
if ("list" in res.data) {
|
||||
console.log("list .............", res.data.list);
|
||||
this.dataLists[type] = res.data.list
|
||||
this.dataLists[type] = res.data.list;
|
||||
this.totalPage[type] = res.data.total;
|
||||
} else console.log("没有res.data.list属性");
|
||||
} else {
|
||||
this.dataLists[type].splice(0)
|
||||
this.dataLists[type].splice(0);
|
||||
this.totalPage[type] = 0;
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
}
|
||||
this.tableLoadings[type] = false;
|
||||
});
|
||||
},
|
||||
|
||||
@ -460,16 +466,16 @@ export default {
|
||||
},
|
||||
|
||||
/** 导航器的操作 */
|
||||
handleSizeChange(val) {
|
||||
handleSizeChange(type, newSize) {
|
||||
// val 是新值
|
||||
this.page = 1;
|
||||
this.size = val;
|
||||
this.getList();
|
||||
this.conditions[type].page = 1;
|
||||
this.conditions[type].limit = newSize;
|
||||
this.getSpecificList(type, this.conditions[type]);
|
||||
},
|
||||
|
||||
handlePageChange(val) {
|
||||
handlePageChange(type, newPage) {
|
||||
// val 是新值
|
||||
this.getList();
|
||||
this.getSpecificList(type, this.conditions[type]);
|
||||
},
|
||||
|
||||
/** 打开对话框 */
|
||||
|
Yükleniyor…
Yeni konuda referans
Bir kullanıcı engelle