精度丢失

This commit is contained in:
yyy 2025-05-27 09:37:59 +08:00
parent 38a0182e14
commit f5c1af34d9
4 changed files with 21 additions and 33 deletions

View File

@ -6,7 +6,7 @@ VITE_DEV=true
# 请求路径
# VITE_BASE_URL='http://192.168.0.66:48080'
# VITE_BASE_URL='http://192.168.0.189:48080'
VITE_BASE_URL='http://192.168.77.50:48080'
VITE_BASE_URL='http://10.10.5.5:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传仅支持S3服务
VITE_UPLOAD_TYPE=server

View File

@ -5,7 +5,8 @@ VITE_DEV=true
# 请求路径
# VITE_BASE_URL='http://192.168.77.50:48080'
VITE_BASE_URL='http://10.10.100.24:48080'
# VITE_BASE_URL='http://10.10.100.32:48080'
VITE_BASE_URL='http://10.10.5.5:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传,仅支持 S3 服务
VITE_UPLOAD_TYPE=server

View File

@ -5,6 +5,7 @@ import qs from 'qs'
import { config } from '@/config/axios/config'
import { getAccessToken, getRefreshToken, getTenantId, removeToken, setToken } from '@/utils/auth'
import errorCode from './errorCode'
import JSONBigInt from 'json-bigint'
import { resetRouter } from '@/router'
import { deleteUserCache } from '@/hooks/web/useCache'
@ -36,6 +37,16 @@ const service: AxiosInstance = axios.create({
paramsSerializer: (params) => {
return qs.stringify(params, { allowDots: true })
}
// transformResponse: [
// (data) => {
// try {
// // 使用 json-bigint 解析,大数字会转为字符串
// return JSONBigInt.parse(data)
// } catch (e) {
// return data
// }
// }
// ]
})
// request拦截器

View File

@ -346,22 +346,16 @@
</template>
<script setup>
import JSONBigInt from 'json-bigint'
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue'
defineOptions({ name: 'BoardCarBoard' })
import * as CarApi from '@/api/car/index'
// import { Swiper, SwiperSlide } from 'swiper/vue'
// API
import { onBeforeRouteLeave, onBeforeRouteUpdate } from 'vue-router'
const message = useMessage() //
// swiper
// import 'swiper/css/pagination' //
// import 'swiper/css/navigation' //
// import 'swiper/css/scrollbar' // 使import
// swiper
// import { Autoplay, Pagination, Navigation, Scrollbar } from 'swiper'
import createEditDialog from './createEditDialog.vue'
defineOptions({ name: 'BoardCarBoard' })
const message = useMessage() //
const route = useRoute() //
// import 'swiper/css'
const router = useRouter() //
const createEditDialogRef = ref(null)
const list = ref([])
@ -371,25 +365,7 @@ const queryParams = reactive({
robotNo: undefined,
robotStatisticsType: undefined //(:standby, :inTask, :doLock, 线:offline, :charge, :fault)
})
// const spaceBetween = ref(20)
// const navigation = ref({
// nextEl: '.swiper-button-next-custome',
// prevEl: '.swiper-button-prev-custome'
// })
// // modules使
// const modules = [Autoplay, Navigation, Scrollbar]
// // Pagination
// const prevEl = (item, index) => {
// // console.log('' + index + item)
// }
// const nextEl = () => {
// // console.log('')
// }
// // swiper
// const onSlideChange = (swiper) => {
// // swiperswiperactiveIndex
// console.log(swiper.activeIndex)
// }
const timerRef = ref(null)
//
const getCarList = async () => {
@ -401,8 +377,8 @@ const getCarList = async () => {
getCarList()
getRobotInformationStatistics()
}, 10000)
let res = await CarApi.getRobotInformationList(queryParams)
// console.log(res.list)
list.value = res.list
}
const carStatistics = ref({