修改分页

master
夜笙歌 2 years ago
parent f7c2dee2c5
commit d08b504d08

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏--> <!-- 搜索栏-->
<el-form v-show="showSearch" ref="queryRef" :inline="true" :label-width=" locale ? '90px':'140px'" <el-form v-show="showSearch" ref="queryRef" :rules="rules" :inline="true" :label-width=" locale ? '90px':'140px'"
:model="queryParams"> :model="queryParams">
<el-form-item label="外胎号" prop="outerTireNumber"> <el-form-item label="外胎号" prop="outerTireNumber">
<el-input <el-input
@ -18,8 +18,8 @@
end-placeholder="结束日期" end-placeholder="结束日期"
range-separator="-" range-separator="-"
start-placeholder="开始日期" start-placeholder="开始日期"
type="daterange" type="datetimerange"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD HH:mm:ss"
/> />
</el-form-item> </el-form-item>
<el-form-item label=" "> <el-form-item label=" ">
@ -89,7 +89,7 @@ const {proxy} = getCurrentInstance();
// //
const postList = ref([]); const postList = ref([]);
// //
const loading = ref(true); const loading = ref(false);
// //
const showSearch = ref(true); const showSearch = ref(true);
// //
@ -100,6 +100,10 @@ const dialogTableVisible = ref(false)
const tempRef = ref(); const tempRef = ref();
const outerTireNumberNow = ref('') const outerTireNumberNow = ref('')
const rules = {
outerTireNumber: { required: true, message: '请输入外胎号', trigger: 'blur' },
}
// //
const queryParams = ref({ const queryParams = ref({
pageNum: 1, pageNum: 1,
@ -126,26 +130,30 @@ const dialogOpened = () => {
/** 查询岗位列表 */ /** 查询岗位列表 */
function getList() { function getList() {
loading.value = true; proxy.$refs["queryRef"].validate(valid => {
let str = queryParams.value.outerTireNumber || '' if (valid) {
str = str.replace(',', ' ') loading.value = true;
str = str.replace('', ' ') let str = queryParams.value.outerTireNumber || ''
str = str.replace('、', ' ') str = str.replace(',', ' ')
let dataRow = str.split(' ') str = str.replace('', ' ')
let data = dataRow?.filter(e => !!e) || [] str = str.replace('、', ' ')
let params = { let dataRow = str.split(' ')
outerTireNumbers: data?.toString(), let data = dataRow?.filter(e => !!e) || []
// params:{ let params = {
// beginTime:dateRange.value?.[0], outerTireNumbers: data?.toString(),
// endTime:dateRange.value?.[1], // params:{
// } // beginTime:dateRange.value?.[0],
} // endTime:dateRange.value?.[1],
listTest(proxy.addDateRange(params, dateRange.value)).then(response => { // }
postList.value = response.rows; }
total.value = response.total; listTest(proxy.addDateRange(params, dateRange.value)).then(response => {
}).finally(() => { postList.value = response.rows;
loading.value = false; total.value = response.total;
}); }).finally(() => {
loading.value = false;
});
}
})
} }
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -167,5 +175,5 @@ function handleExport() {
}, `post_${new Date().getTime()}.xlsx`); }, `post_${new Date().getTime()}.xlsx`);
} }
getList(); // getList();
</script> </script>

@ -609,7 +609,7 @@ export default {
const userStore = useUserStore() const userStore = useUserStore()
const getWebsocket = () => { const getWebsocket = () => {
let websocket = new WebSocket("https://ticptest.tercelo.com/dev-api/websocket/message/" + userStore.name) let websocket = new WebSocket("ws://10.11.41.249:8080/websocket/message/" + userStore.name)
websocket.onopen = function (event) { websocket.onopen = function (event) {
// console.log('onopen',event) // console.log('onopen',event)
}; };

Loading…
Cancel
Save