From 7d2266c5c90c8eae23c781ad2600781f98c1017a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Mon, 27 Mar 2023 10:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=95=E8=BD=A6=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/realTimeMonitoring/carMonitoring.js | 1 + ruoyi-ui/src/lang/en.js | 2 +- ruoyi-ui/src/lang/zhCn.js | 2 +- .../carManagement/fleetManagement/index.vue | 55 ++++++++++++------- .../src/views/carManagement/info/index.vue | 2 +- .../src/views/carManagement/type/index.vue | 24 +++++--- .../src/views/deviceManagement/info/index.vue | 6 +- .../carMonitoring/index.vue | 1 - .../src/views/tireManagement/info/index.vue | 1 + .../views/tireManagement/install/index.vue | 41 +++++++++----- ruoyi-ui/vite.config.js | 4 +- 11 files changed, 89 insertions(+), 50 deletions(-) diff --git a/ruoyi-ui/src/api/realTimeMonitoring/carMonitoring.js b/ruoyi-ui/src/api/realTimeMonitoring/carMonitoring.js index 9c2e04a..d4b4765 100644 --- a/ruoyi-ui/src/api/realTimeMonitoring/carMonitoring.js +++ b/ruoyi-ui/src/api/realTimeMonitoring/carMonitoring.js @@ -27,3 +27,4 @@ export function getTyreList(query) { }) } + diff --git a/ruoyi-ui/src/lang/en.js b/ruoyi-ui/src/lang/en.js index 6185212..d011f4c 100644 --- a/ruoyi-ui/src/lang/en.js +++ b/ruoyi-ui/src/lang/en.js @@ -194,7 +194,7 @@ export default { tyreFacCode: 'Tire Factory Code', companyCode: 'Enterprise number', internetThingsNo: 'IoT Card Number', - simCode: 'sim Code', + simCode: 'phone', deviceType: 'Equipment Type', state: 'State', activeTime: 'Activation Time', diff --git a/ruoyi-ui/src/lang/zhCn.js b/ruoyi-ui/src/lang/zhCn.js index 9fae12f..b3118dd 100644 --- a/ruoyi-ui/src/lang/zhCn.js +++ b/ruoyi-ui/src/lang/zhCn.js @@ -194,7 +194,7 @@ export default { tyreFacCode: '轮胎厂编码', companyCode: '企业编码', internetThingsNo: '物联卡卡号', - simCode: 'sim卡识别码', + simCode: '手机号', deviceType: '设备类型', state: '状态', activeTime: '激活时间', diff --git a/ruoyi-ui/src/views/carManagement/fleetManagement/index.vue b/ruoyi-ui/src/views/carManagement/fleetManagement/index.vue index 168e031..1054e90 100644 --- a/ruoyi-ui/src/views/carManagement/fleetManagement/index.vue +++ b/ruoyi-ui/src/views/carManagement/fleetManagement/index.vue @@ -73,35 +73,50 @@ - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/carManagement/info/index.vue b/ruoyi-ui/src/views/carManagement/info/index.vue index 85c1044..752e45f 100644 --- a/ruoyi-ui/src/views/carManagement/info/index.vue +++ b/ruoyi-ui/src/views/carManagement/info/index.vue @@ -74,7 +74,7 @@ - + diff --git a/ruoyi-ui/src/views/deviceManagement/info/index.vue b/ruoyi-ui/src/views/deviceManagement/info/index.vue index 261b3b4..9ccdf4f 100644 --- a/ruoyi-ui/src/views/deviceManagement/info/index.vue +++ b/ruoyi-ui/src/views/deviceManagement/info/index.vue @@ -118,10 +118,12 @@ + - + diff --git a/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue index 83e95a2..ff0f7d9 100644 --- a/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue +++ b/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue @@ -298,7 +298,6 @@ const getTyreInfo = (e) => { if (!id) return open.value = true getTyreList(id).then(e => { - console.log(e.data) tyreInfo.value = e.data }) } diff --git a/ruoyi-ui/src/views/tireManagement/info/index.vue b/ruoyi-ui/src/views/tireManagement/info/index.vue index bdf408a..7a07e31 100644 --- a/ruoyi-ui/src/views/tireManagement/info/index.vue +++ b/ruoyi-ui/src/views/tireManagement/info/index.vue @@ -317,6 +317,7 @@ const form = ref({}); /** 查询岗位列表 */ function getList() { loading.value = true; + console.log(dateRange.value) listBasetyre(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => { postList.value = response.rows; total.value = response.total; diff --git a/ruoyi-ui/src/views/tireManagement/install/index.vue b/ruoyi-ui/src/views/tireManagement/install/index.vue index bafce17..31a3309 100644 --- a/ruoyi-ui/src/views/tireManagement/install/index.vue +++ b/ruoyi-ui/src/views/tireManagement/install/index.vue @@ -155,7 +155,7 @@ const form2 = ref({ }) const rules = { outerTireNumber: [ - {required: true, message: '请输入轮胎编号',trigger: 'change'}, + {required: true, message: '请输入轮胎编号', trigger: 'change'}, ] } const outerTireNumberOption = ref([ @@ -202,6 +202,7 @@ const tyreClick = (e, location) => { nowClick.value = e let data = tireList.value.filter(res => res.tyrePositionVal === e)?.[0] || {} form2.value = {...data, location} + console.log(data) } const getList = async () => { @@ -268,20 +269,31 @@ const outerTireNumberSearchClick = async () => { const {data} = await getTyreInfo({outerTireNumber: form2.value.outerTireNumber}) let list = nowClick.value?.split('-').map(e => parseFloat(e)) let num = 0 - for (let i = 0; i < list?.[0] - 1; i++) { - num += (tireArrangement.value[i] * 4) - } - if (list[1] === 1 && list[2] === 1) { - num += 4 - } - if (list[1] === 1 && list[2] === 2) { - num += 3 - } - if (list[1] === 2 && list[2] === 2) { + if (list[0] === 1) { + if (list[1] === 1 && list[2] === 1) { + num += 2 + } + if (list[1] === 2 && list[2] === 1) { + num += 1 + } + } else { num += 2 - } - if (list[1] === 2 && list[2] === 1) { - num += 1 + for (let i = 1; i < list?.[0] - 1; i++) { + num += (tireArrangement.value[i - 1] * 4) + } + if (list[1] === 1 && list[2] === 1) { + num += 4 + } + if (list[1] === 1 && list[2] === 2) { + num += 3 + } + if (list[1] === 2 && list[2] === 2) { + num += 2 + } + if (list[1] === 2 && list[2] === 1) { + num += 1 + } + } form2.value.brand = data.brand form2.value.size = data.size @@ -298,6 +310,7 @@ const installClick = (e) => { proxy.$refs["form22"].validate((valid) => { if (valid) { + console.log(form2.value) TyreInstall({ ...form2.value, carLicense: licenseNumberOption.value.filter(e => e.value === form.value.licenseNumber)?.[0].label, diff --git a/ruoyi-ui/vite.config.js b/ruoyi-ui/vite.config.js index 31d5c39..d3a8730 100644 --- a/ruoyi-ui/vite.config.js +++ b/ruoyi-ui/vite.config.js @@ -31,8 +31,8 @@ export default defineConfig(({mode, command}) => { proxy: { // https://cn.vitejs.dev/config/#server-proxy '/dev-api': { - target: 'http://10.11.41.249:8080', - // target: 'http://localhost:8080', + // target: 'http://10.11.41.249:8080', + target: 'http://localhost:8080', changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, '') }