修改分页

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

@ -47,7 +47,7 @@
<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" 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="传感器ID" prop="sensorid"
@ -69,13 +69,13 @@
@pagination="getList"
/>
<el-dialog v-model="dialogTableVisible" @opened="dialogOpened">
<temp ref="tempRef" width='900px'/>
<temp ref="tempRef" width='900px'/>
</el-dialog>
</div>
</template>
<script name="Test" setup>
import {listTest,getChartData} from "@/api/GPS/tyre";
import {listTest, getChartData} from "@/api/GPS/tyre";
import Temp from '@/views/dashboard/Temp'
import {useI18n} from 'vue-i18n';
@ -115,9 +115,9 @@ const rowClick = (e) => {
outerTireNumberNow.value = e.outerTireNumber
dialogTableVisible.value = true
}
const dialogOpened = ()=>{
const dialogOpened = () => {
console.log(tempRef)
getChartData({outerTireNumber:outerTireNumberNow.value}).then(val=>{
getChartData({outerTireNumber: outerTireNumberNow.value}).then(val => {
console.log(val)
tempRef.value.setData(val.data);
})
@ -128,13 +128,13 @@ const dialogOpened = ()=>{
function getList() {
loading.value = true;
let str = queryParams.value.outerTireNumber || ''
str = str.replace(',',' ')
str = str.replace('',' ')
str = str.replace('、',' ')
str = str.replace(',', ' ')
str = str.replace('', ' ')
str = str.replace('、', ' ')
let dataRow = str.split(' ')
let data = dataRow?.filter(e=>!!e) || []
let params= {
outerTireNumbers:data?.toString(),
let data = dataRow?.filter(e => !!e) || []
let params = {
outerTireNumbers: data?.toString(),
// params:{
// beginTime:dateRange.value?.[0],
// endTime:dateRange.value?.[1],

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

@ -34,9 +34,9 @@ export default defineConfig(({mode, command}) => {
// open: true,
proxy: {
'/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://10.11.41.249:8080',
// target: 'http://10.11.41.249:8080',
// target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')

Loading…
Cancel
Save