更新
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="comom-title">
|
||||
<div class="title">
|
||||
<span class="mr12 pointer nowrap" :style="{fontSize:activeIndex == idx ? '22px':'18px'} " v-for="(it,idx) in btns" :key="idx" @click="activeIndex = idx">{{ it }}</span>
|
||||
<span class="mr12 pointer nowrap" :style="{fontSize:activeIndex == idx ? '22px':'18px'} " v-for="(it,idx) in btns" :key="idx" @click="changeActive(idx)">{{ it }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comom-cnt" id="qcbk">
|
||||
<MyTable @changePage="changePage" customClass="zdy_bkcz_table" :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight" :key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" >
|
||||
<template #tp="{row}">
|
||||
<img width="30" src="@/assets/images/icon100.png" alt="">
|
||||
<img width="30" src="@/assets/images/icon100.png" alt="">
|
||||
</template>
|
||||
<template #czzt="{row}">
|
||||
<span style="color:#FDBC3A">{{ row.czzt }}</span>
|
||||
@ -73,11 +73,6 @@ const pageData = reactive({
|
||||
showIndex: false,
|
||||
stripe:true
|
||||
},
|
||||
total: 0,
|
||||
pageConfiger: {
|
||||
pageSize: 20,
|
||||
pageNum: 1
|
||||
}, //分页
|
||||
tableColumn: [
|
||||
{ label: "照片", prop: "tp", showSolt: true },
|
||||
{ label: "姓名", prop: "xm", showOverflowTooltip: true },
|
||||
@ -89,20 +84,50 @@ const pageData = reactive({
|
||||
{ label: "处置状态", prop: "czzt",showOverflowTooltip: true,showSolt: true },
|
||||
]
|
||||
});
|
||||
const page = ref(1);
|
||||
const total = ref(0);
|
||||
|
||||
onMounted(() => {
|
||||
tabHeightFn();
|
||||
});
|
||||
|
||||
const changeActive = (idx) =>{
|
||||
activeIndex.value = idx;
|
||||
page.value = 0;
|
||||
total.value = 0;
|
||||
switch(idx){
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
}
|
||||
pageData.keyCount++;
|
||||
changePage(idx)
|
||||
}
|
||||
const changePage = () => {
|
||||
pageData.tableConfiger.loading = true;
|
||||
let url = activeIndex.value == 0 ? '/mosty-gsxt/tbGsxtZdry/selectPage':'';
|
||||
let data = { pageSize:10,pageNum:page.value };
|
||||
qcckGet(data, url).then((res) => {
|
||||
pageData.tableData = res.records || [];
|
||||
total.value = res.total;
|
||||
pageData.tableConfiger.loading = false;
|
||||
}).catch(() => {
|
||||
pageData.tableConfiger.loading = false;
|
||||
});
|
||||
console.log('触底加载==========');
|
||||
};
|
||||
|
||||
// 获取数据
|
||||
const getData = () =>{
|
||||
|
||||
}
|
||||
|
||||
const tabHeightFn = () => {
|
||||
pageData.tableHeight = document.getElementById('qcbk').offsetHeight - 12;
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user