|
|
|
@ -270,6 +270,7 @@ const open = ref(false)
|
|
|
|
|
let map = null
|
|
|
|
|
const markers = ref(null)
|
|
|
|
|
const tyreInfo = ref({})
|
|
|
|
|
const childrenList = ref([])
|
|
|
|
|
|
|
|
|
|
const getTyreInfo = (e) => {
|
|
|
|
|
let id = tyreList.value.filter(val => val.tyrePositionS === e)?.[0]?.tyreId || ''
|
|
|
|
@ -314,7 +315,6 @@ proxy.$nextTick(async () => {
|
|
|
|
|
getList()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 总条数
|
|
|
|
|
const total = ref(0);
|
|
|
|
|
const getList = async () => {
|
|
|
|
@ -327,8 +327,17 @@ const getList = async () => {
|
|
|
|
|
})
|
|
|
|
|
total.value = tableData.value.length
|
|
|
|
|
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) => {
|
|
|
|
|
pageId.value = e.id
|
|
|
|
|
const {data: info} = await getCarGpsList({id: pageId.value})
|
|
|
|
@ -394,23 +403,7 @@ function reset() {
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
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;
|
|
|
|
|
// getList();
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
@ -431,7 +424,6 @@ const resetQuery = () => {
|
|
|
|
|
tableRef1.value.setCurrentRow()
|
|
|
|
|
}
|
|
|
|
|
const setMarker = (res) => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
let pathRow = [[res.longitude, res.latitude]]
|
|
|
|
|
markers.value && map.remove(markers.value)
|
|
|
|
|
AMap.convertFrom(pathRow, 'gps', function (status, result) {
|
|
|
|
|