修改分页

master
夜笙歌 2 years ago
parent 321b23a863
commit f7c2dee2c5

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

@ -270,6 +270,7 @@ const open = ref(false)
let map = null let map = null
const markers = ref(null) const markers = ref(null)
const tyreInfo = ref({}) const tyreInfo = ref({})
const childrenList = ref([])
const getTyreInfo = (e) => { const getTyreInfo = (e) => {
let id = tyreList.value.filter(val => val.tyrePositionS === e)?.[0]?.tyreId || '' let id = tyreList.value.filter(val => val.tyrePositionS === e)?.[0]?.tyreId || ''
@ -314,7 +315,6 @@ proxy.$nextTick(async () => {
getList() getList()
} }
}) })
// //
const total = ref(0); const total = ref(0);
const getList = async () => { const getList = async () => {
@ -327,8 +327,17 @@ const getList = async () => {
}) })
total.value = tableData.value.length total.value = tableData.value.length
tableRef1.value.setCurrentRow(tableData.value[0]) tableRef1.value.setCurrentRow(tableData.value[0])
console.log(tableData.value)
} }
const setChildrenList =async (e) => {
const {rows: list} = await listBaseCar({
pageNum: 1,
pageSize: 10,
carLicense: '',
})
}
const tableChange = async (e) => { const tableChange = async (e) => {
pageId.value = e.id pageId.value = e.id
const {data: info} = await getCarGpsList({id: pageId.value}) const {data: info} = await getCarGpsList({id: pageId.value})
@ -394,23 +403,7 @@ function reset() {
/** 提交按钮 */ /** 提交按钮 */
function submitForm() { function submitForm() {
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (tyreInfo.value.id != undefined) {
// updateBaseDevice(tyreInfo.value).then(response => {
// proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
open.value = false;
// getList();
// });
} else {
// addBaseDevice(tyreInfo.value).then(response => {
// proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
open.value = false; open.value = false;
// getList();
// });
}
}
});
} }
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -431,7 +424,6 @@ const resetQuery = () => {
tableRef1.value.setCurrentRow() tableRef1.value.setCurrentRow()
} }
const setMarker = (res) => { const setMarker = (res) => {
console.log(res)
let pathRow = [[res.longitude, res.latitude]] let pathRow = [[res.longitude, res.latitude]]
markers.value && map.remove(markers.value) markers.value && map.remove(markers.value)
AMap.convertFrom(pathRow, 'gps', function (status, result) { AMap.convertFrom(pathRow, 'gps', function (status, result) {

@ -110,7 +110,7 @@ AMapLoader.load({
}).catch(e => { }).catch(e => {
}) })
listBasetyre().then(e => { listBasetyre({trailerNum:0}).then(e => {
let res = JSON.stringify(e.rows) let res = JSON.stringify(e.rows)
let newObj = JSON.parse(res.replace(/"carLicense":/g, '"title":')) let newObj = JSON.parse(res.replace(/"carLicense":/g, '"title":'))
treeData.value = newObj treeData.value = newObj

Loading…
Cancel
Save