修改分页

master
夜笙歌 2 years ago
parent 84fb843748
commit e5daf72519

@ -47,7 +47,7 @@
<el-table v-loading="loading" :data="postList" @row-click="rowClick"> <el-table v-loading="loading" :data="postList" @row-click="rowClick">
<el-table-column align="center" fixed type="selection" width="55"/> <el-table-column align="center" fixed type="selection" width="55"/>
<el-table-column align="center" label="序号" prop="internationalization1" <el-table-column align="center" label="序号" prop="internationalization1"
width="55" type='index'/> type='index' width="55"/>
<el-table-column align="center" label="外胎号" prop="outerTireNumber" <el-table-column align="center" label="外胎号" prop="outerTireNumber"
/> />
<el-table-column align="center" label="传感器ID" prop="sensorid" <el-table-column align="center" label="传感器ID" prop="sensorid"

@ -118,6 +118,14 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination
v-show="total1 > 0"
v-model:limit="queryParams1.pageSize"
v-model:page="queryParams1.pageNum"
:total="total1"
@pagination="bindSearch"
/>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" @click="bindOk">{{ t('option.ok') }}</el-button> <el-button type="primary" @click="bindOk">{{ t('option.ok') }}</el-button>
@ -217,6 +225,7 @@ const single = ref(true);
const multiple = ref(true); const multiple = ref(true);
// //
const total = ref(0); const total = ref(0);
const total1 = ref(0);
// //
const title = ref(""); const title = ref("");
// //
@ -234,6 +243,11 @@ const queryParams = ref({
pageSize: 10, pageSize: 10,
carLicense: undefined, carLicense: undefined,
}) })
//
const queryParams1 = ref({
pageNum: 1,
pageSize: 10,
})
// //
const rules = { const rules = {
@ -310,9 +324,10 @@ const bindHandleSelectionChange = (selection) => {
// //
const bindSearch = () => { const bindSearch = () => {
let params = {deviceId: bindInput.value} let params = {deviceId: bindInput.value,...queryParams1.value}
getBindList(params).then(response => { getBindList(params).then(response => {
bindList.value = response.rows; bindList.value = response.rows;
total1.value = response.total;
}) })
} }
// //
@ -362,6 +377,10 @@ function handleUpdate(row) {
function handleBang(row) { function handleBang(row) {
bangOpen.value = true; bangOpen.value = true;
waitBind.value = row waitBind.value = row
queryParams1.value = {
pageNum: 1,
pageSize: 10,
}
bindSearch() bindSearch()
} }

@ -34,9 +34,9 @@ export default defineConfig(({mode, command}) => {
// open: true, // open: true,
proxy: { proxy: {
'/dev-api': { '/dev-api': {
// target: 'https://ticptest.tercelo.com/dev-api', target: 'https://ticptest.tercelo.com/dev-api',
// target: 'http://47.94.93.46/dev-api', // target: 'http://47.94.93.46/dev-api',
target: 'http://10.11.41.249:8080', // target: 'http://10.11.41.249:8080',
// target: 'http://localhost:8080', // target: 'http://localhost:8080',
changeOrigin: true, changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '') rewrite: (p) => p.replace(/^\/dev-api/, '')

Loading…
Cancel
Save