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