update style
This commit is contained in:
@@ -6,61 +6,89 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="list-view-with-head">
|
||||
<!-- <head-form :form-config="headFormConfig" @headBtnClick="btnClick" /> -->
|
||||
<BaseSearchForm :head-config="headConfig" @btn-click="handleBtnClick" />
|
||||
<!-- TODO: delete these demo links -->
|
||||
<ul>
|
||||
<li><a href="#ongoing">ongoing</a></li>
|
||||
<li><a href="#pending">pending</a></li>
|
||||
<li><a href="#finished">finished</a></li>
|
||||
</ul>
|
||||
|
||||
<BaseListTable
|
||||
key="confirmed"
|
||||
v-loading="tableLoading"
|
||||
:table-config="null"
|
||||
:column-config="tableConfigs.ongoingTable"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
@load-sub="handleLoadSub"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
<BaseListTable
|
||||
key="ended"
|
||||
v-loading="tableLoading"
|
||||
:table-config="null"
|
||||
:column-config="tableConfigs.finishedTable"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
@load-sub="handleLoadSub"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
<section class="ongoing-order" id="ongoing">
|
||||
<BaseSearchForm :head-config="{ fields: headConfigs.ongoingTableSearch }" @btn-click="handleBtnClick('ongoing', $event)" />
|
||||
<BaseListTable
|
||||
key="confirmed"
|
||||
v-loading="tableLoading"
|
||||
:table-config="null"
|
||||
:column-config="tableConfigs.ongoingTable"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
@load-sub="handleLoadSub"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
|
||||
<BaseListTable
|
||||
key="unconfirmed"
|
||||
v-loading="tableLoading"
|
||||
:table-config="null"
|
||||
:column-config="tableConfigs.pendingTable"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
@load-sub="handleLoadSub"
|
||||
: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"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
</section>
|
||||
|
||||
<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"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
<!-- :current-page.sync="currentPage"
|
||||
<section class="pending-order" id="pending">
|
||||
<BaseSearchForm :head-config="{ fields: headConfigs.pendingTableSearch }" @btn-click="handleBtnClick('pending', $event)" />
|
||||
<BaseListTable
|
||||
key="unconfirmed"
|
||||
v-loading="tableLoading"
|
||||
:table-config="null"
|
||||
:column-config="tableConfigs.pendingTable"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
@load-sub="handleLoadSub"
|
||||
: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"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
</section>
|
||||
|
||||
<section class="finished-order" id="finished">
|
||||
<BaseSearchForm :head-config="{ fields: headConfigs.finishedTableSearch }" @btn-click="handleBtnClick('finished', $event)" />
|
||||
<BaseListTable
|
||||
key="ended"
|
||||
v-loading="tableLoading"
|
||||
:table-config="null"
|
||||
:column-config="tableConfigs.finishedTable"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
@load-sub="handleLoadSub"
|
||||
: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"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
<!-- :current-page.sync="currentPage"
|
||||
:page-size.sync="pageSize" -->
|
||||
</section>
|
||||
|
||||
<!-- <DialogWithMenu
|
||||
ref="edit-dialog"
|
||||
@@ -96,14 +124,18 @@ export default {
|
||||
tableConfigs: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
ongoingTable: null,
|
||||
finishedTable: null,
|
||||
pendingTable: null
|
||||
})
|
||||
ongoingTable: null,
|
||||
finishedTable: null,
|
||||
pendingTable: null,
|
||||
}),
|
||||
},
|
||||
headConfig: {
|
||||
headConfigs: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
default: () => ({
|
||||
ongoingTableSearch: null,
|
||||
pendingTableSearch: null,
|
||||
finishedTableSearch: null,
|
||||
}),
|
||||
},
|
||||
/** 请求page接口的时候有些字段是必填的,没有会报500,把相关字段名传入这个prop: */
|
||||
listQueryExtra: {
|
||||
@@ -211,46 +243,48 @@ export default {
|
||||
},
|
||||
inject: ["urls"],
|
||||
mounted() {
|
||||
this.getConfirmedList()
|
||||
this.getConfirmedList();
|
||||
console.log("[list view with head]", this.headConfigs);
|
||||
},
|
||||
activated() {
|
||||
this.refreshLayoutKey = this.layoutTable();
|
||||
},
|
||||
methods: {
|
||||
// get confirmed list
|
||||
getConfirmedList(){
|
||||
this.$http.post(this.urls.confirmedOrder, {
|
||||
bomId: "0",
|
||||
cate: "1",
|
||||
code: "39999",
|
||||
startTime: '2022-02-05T22:00:00',
|
||||
endTime: '2022-02-06T22:00:00',
|
||||
id: "0",
|
||||
limit: 10,
|
||||
page: 1,
|
||||
shapeId: "1",
|
||||
techId: "0",
|
||||
types: 1 // 0 等待 , 1 确认 , 2 生产, 3 暂停, 4 结束, 5 接受, 6 拒绝
|
||||
}).then(({data: res}) => {
|
||||
if (res.code === 0) {
|
||||
console.log('[get confirmed list]', res)
|
||||
} else {
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
type: 'error',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
})
|
||||
getConfirmedList() {
|
||||
this.$http
|
||||
.post(this.urls.confirmedOrder, {
|
||||
bomId: "0",
|
||||
cate: "1",
|
||||
code: "39999",
|
||||
startTime: "2022-02-05T22:00:00",
|
||||
endTime: "2022-02-06T22:00:00",
|
||||
id: "0",
|
||||
limit: 10,
|
||||
page: 1,
|
||||
shapeId: "1",
|
||||
techId: "0",
|
||||
types: 1, // 0 等待 , 1 确认 , 2 生产, 3 暂停, 4 结束, 5 接受, 6 拒绝
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log("[get confirmed list]", res);
|
||||
} else {
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// get unconfirmed list
|
||||
getUnConfirmedList(){},
|
||||
getUnConfirmedList() {},
|
||||
// get ended list
|
||||
getEndedList(){
|
||||
getEndedList() {
|
||||
// 只有查看详情
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
|
||||
handleLoadSub({ tree, treeNode, resolve }) {
|
||||
// console.log("tree, treeNOde, resovle is:", tree, treeNode, resolve);
|
||||
this.$http.get(`${this.urls.tree}?rootId=${tree.id}`).then(({ data: res }) => {
|
||||
@@ -430,7 +464,16 @@ export default {
|
||||
/* height: 100%; */
|
||||
min-height: inherit;
|
||||
border-radius: 6px;
|
||||
padding: 16px;
|
||||
box-shadow: 0 0 1.125px 0.125px rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
|
||||
section {
|
||||
padding: 16px;
|
||||
padding-bottom: 3.125rem;
|
||||
}
|
||||
|
||||
section:not(:last-of-type) {
|
||||
/* margin-bottom: 1rem; */
|
||||
border-bottom: 1px solid #f1e3d5;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user