update waiting list

This commit is contained in:
lb 2024-02-19 11:27:23 +08:00
parent 66337f4aca
commit 874e36eb50
3 changed files with 32 additions and 8 deletions

View File

@ -135,6 +135,9 @@ export default {
this.$refs['search-bar'].resetForm(); this.$refs['search-bar'].resetForm();
this.resetQuery(); this.resetQuery();
break; break;
default:
this.searchBarClicked(btn);
break;
} }
}, },
handleEmitFun(val) { handleEmitFun(val) {

View File

@ -30,7 +30,11 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> --> </base-table> -->
<WaitingListTable :table-data="list" :page="queryParams.pageNo" :limit="queryParams.pageSize" /> <WaitingListTable
ref="waiting-list-table"
:table-data="list"
:page="queryParams.pageNo"
:limit="queryParams.pageSize" />
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination
@ -62,7 +66,6 @@
</el-row> </el-row>
</base-dialog> </base-dialog>
<!-- 编辑 --> <!-- 编辑 -->
<!-- <RecordDetail <!-- <RecordDetail
v-if="recordDetailVisible" v-if="recordDetailVisible"
@ -168,7 +171,7 @@ export default {
watch: { watch: {
selected(val) { selected(val) {
if (!this.outside) { if (!this.outside) {
console.log("emit row-selected...") console.log('emit row-selected...');
this.$emit('emitData', { this.$emit('emitData', {
action: 'row-selected', action: 'row-selected',
value: { value: {
@ -186,7 +189,7 @@ export default {
this.selected = !!((val._selection & 0b01) != 0); this.selected = !!((val._selection & 0b01) != 0);
this.$nextTick(() => { this.$nextTick(() => {
this.outside = false; this.outside = false;
}) });
}, },
}, },
}, },
@ -473,6 +476,24 @@ export default {
// } // }
}, },
methods: { methods: {
searchBarClicked(btn) {
console.log('searchBarClicked', btn);
switch (btn.btnName) {
case 'batchConfirm':
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
console.log(
'selectedPlan',
this.$refs['waiting-list-table'].selectedPlan
);
alert('no data...');
};
console.log(
'selectedPlan',
this.$refs['waiting-list-table'].selectedPlan
);
break;
}
},
handleSelectionChange(list) { handleSelectionChange(list) {
if (this.tobeConfirmedIdList.length) { if (this.tobeConfirmedIdList.length) {
this.tobeConfirmedIdList = []; this.tobeConfirmedIdList = [];

View File

@ -215,16 +215,16 @@ export default {
true, true,
true, true,
], ],
selectedPlan: [] selectedPlan: [],
}; };
}, },
computed: { computed: {
tableDataWithIndex() { tableDataWithIndex() {
return this.tableData.map((item, index) => ({ return this.tableData.map((item, index) => ({
...item, ...item,
_pageIndex: (this.page - 1) * this.limit + index + 1 _pageIndex: (this.page - 1) * this.limit + index + 1,
})) }));
} },
}, },
methods: { methods: {
handleSelectionChange(val) { handleSelectionChange(val) {