diff --git a/ruoyi-ui/src/api/carManagement/info.js b/ruoyi-ui/src/api/carManagement/info.js index ecf2a86..ae46602 100644 --- a/ruoyi-ui/src/api/carManagement/info.js +++ b/ruoyi-ui/src/api/carManagement/info.js @@ -58,4 +58,27 @@ export function getBindList(data) { method: 'post', data }) -} \ No newline at end of file +} +// 查询挂车 +export function getTrailerList(query) { + return request({ + url: '/basecar/car/list1', + method: 'get', + params: query + }) +} +// 删除挂车 +export function setTrailerRequest(data) { + return request({ + url: '/basecar/car/getDeviceList1', + method: 'post', + data + }) +} +// 删除挂车 +export function delTrailerRequest(id) { + return request({ + url: '/basecar/car/getDeviceLis1t' + id, + method: 'delete', + }) +} diff --git a/ruoyi-ui/src/lang/en.js b/ruoyi-ui/src/lang/en.js index 9b623ea..11d9c5b 100644 --- a/ruoyi-ui/src/lang/en.js +++ b/ruoyi-ui/src/lang/en.js @@ -1,222 +1,222 @@ export default { - login: { - title: 'RuoYi Login Form', - logIn: 'Log in', - username: 'Username', - password: 'Password', - verificationCode: 'Verification Code', - loggingIn: 'Logging In ...', - signUpNow: 'signUpNow', - yourAccount: 'Your Account', - yourPassword: 'Your Password', - rememberPassword: 'Remember Password' - }, - tagsView: { - refresh: 'Refresh', - close: 'Close', - closeOthers: 'Close Others', - closeLeft: 'close Left', - closeRight: 'close Right', - closeAll: 'Close All' - }, - navBar: { - layoutSize: 'Layout Size', - personalCenter: 'Personal Center', - layoutSettings: 'Layout Settings', - signOut: 'Sign Out', - exitSystem: 'Are you sure you want to log off and exit the system?' - }, - settings: { - styleSetting: 'Theme Style Settings', - title: 'Page style setting', - theme: 'Theme Color', - TopNav: 'Open TopNav', - tagsView: 'Open Tags-View', - fixedHeader: 'Fixed Header', - showLogo: 'Show Logo', - dynamicTitle: 'Dynamic Title', - saveConfiguration: 'Save Config', - resetConfiguration: 'Reset Config', - }, - profile: { - personalInfo: 'Personal Info', - userName: 'User Name', - phone: 'Phone', - email: 'Email', - department: 'Department', - role: 'Role', - creationDate: 'Creation Date', - basicInformation: 'Basic Information', - changePassword: 'Change Password' - }, - userInfo: { - username: 'username', - phone: 'phone', - email: 'email', - sex: 'sex', - male: 'male', - female: 'female' - }, - userAvatar: { - uploadAvatar: 'Click to upload avatar', - choose: 'Choose', - submit: 'Submit', - ModifyAvatar: 'Modify Avatar' - }, - resetPwd: { - oldPassword: 'Old Password', - newPassword: 'New Password', - confirmPassword: 'Confirm Password', - }, - sizeSelect:{ - large:'Large', - default:'Default', - small:'Small', - wait:'Please wait, setting layout size...', - }, - request:{ - repeatedSubmit:'The data is being processed, please do not submit repeatedly', - LoginStatusExpired:'The login status has expired, you can stay on this page, or log in again', - systemHint:'System hint', - reRegister:'Re-register', - cancel:'Cancel', - expired:'Invalid session, or session expired, please log in again.', - connectionException:'Abnormal backend interface connection', - timeout:'System interface request timed out', - interface:'System Interface ', - exception:' Exception', - download:'Downloading data, please wait', - downloadErr:'There was an error downloading the file, please contact the administrator!' - }, - option: { - refresh: 'refresh', - option: 'option', - edit: 'Edit', - remove: 'Remove', - add: 'Add', - export: 'Export', - search: 'Search', - reset: 'reset', - cancel: 'cancel', - ok: 'ok', - hint: 'hint', - save: 'save', - close: 'close', - confirmDeletion: 'Are you sure to delete the data item whose {key} is {value}?', - modificationSuccessful: 'Modification Successful', - addedSuccessfully: 'Added Successfully', - successfullyDeleted: 'Successfully Deleted' - }, - common: { - loadTitle:'Loading system resources, please be patient', - success: 'success', - show: 'show', - hide: 'hide', - pleaseEnter: 'please enter ', - PleaseSelect: 'Please select ', - state: 'State', - isRemove: 'Is it deleted', - creatorId: 'Creator ID', - creatorName: 'Creator name', - createTime: 'Create Time', - createBy: 'Creator', - editTime: 'Edit time', - editID: 'Editor\'s ID', - editAccount: 'Editor\'s account', - editName: 'Editor\'s name', - editBy: 'Editor', - startingTime:'starting Time', - startDate:'start Date', - endTime:'end Time', - endDate:'end Date' - }, - tireManagement: { - info: { - factory: 'factory', - tireNumber: 'tire Number', - brand:'brand', - pattern:'pattern', - tireSpecificationModel:'tire Specification Model', - sensorNumber:'sensor Number', - numberPlate:'number Plate', - creationTime:'creation Time' - } - }, - tireManagement1: { - tireFactoryCode: 'Tire Factory Code', - enterpriseCode: 'Enterprise Code', - plateNumber: 'Plate Number', - tireNo: 'Tire No', - wheelPosition: 'Wheel Position', - tireSensorID: 'Tire Sensor ID', - treadDepth: 'Tread Depth', - carId: 'Car ID', - tireModel: 'Tire Model', - tireModelId: 'Tire Model ID', - brandId: 'Brand ID', - addTitle: 'Add tire basic information', - editTitle: 'Modify tire basic information', - }, - baseCar: { - car: { - team:'Team', - model:'BelongingToTheModel', - companyCode: 'Enterprise number', - carQueueId: 'Fleet ID', - carTypeId: 'Model ID', - carLicense: 'Plate Number', - carLicenseIn: 'Internal Plate Number', - carLicenseParent: 'Head Car Plate Number', - carIdParent: 'Head Car ID', - userId: 'Driver ID', - userName: 'Driver Name', - deviceId: 'Sensor ID', - deviceBindTime: 'Sensor Binding Time', - firstChangeDate: 'First Replacement Date', - trailerNum: 'Trailer Num', - isHandDevice: 'Whether Or Not Manually maintain the sensor', - isHasDevice: 'Whether Or Not independent sensor', - longitude: 'Longitude', - latitude: 'Latitude', - tiresTotal: 'Tire Quantity', - addTitle: 'Add Vehicle Basic Information', - editTitle: 'Modify vehicle basic information', - }, - carType: { - tyreFacCode: 'Tire Factory Code', - companyCode: 'Enterprise number', - code: 'Code', - title: 'Title', - state: 'State', - axleTotal: 'Axle Number', - tyreTotal: 'Number Of Tires', - trailerNum: 'Trailer Num', - addTitle: 'Add Vehicle Type', - editTitle: 'Modify Vehicle Type', - }, - carQueue: { - tyreFacCode: 'Tire Factory Code', - companyCode: 'Enterprise number', - title: 'Title', - state: 'State', - groupTotal: 'Number Of Groups', - carTotal: 'Number Of Cars', - addTitle: 'Add Motorcade', - editTitle: 'Modify Motorcade', - } - }, + login: { + title: 'RuoYi Login Form', + logIn: 'Log in', + username: 'Username', + password: 'Password', + verificationCode: 'Verification Code', + loggingIn: 'Logging In ...', + signUpNow: 'signUpNow', + yourAccount: 'Your Account', + yourPassword: 'Your Password', + rememberPassword: 'Remember Password' + }, + tagsView: { + refresh: 'Refresh', + close: 'Close', + closeOthers: 'Close Others', + closeLeft: 'close Left', + closeRight: 'close Right', + closeAll: 'Close All' + }, + navBar: { + layoutSize: 'Layout Size', + personalCenter: 'Personal Center', + layoutSettings: 'Layout Settings', + signOut: 'Sign Out', + exitSystem: 'Are you sure you want to log off and exit the system?' + }, + settings: { + styleSetting: 'Theme Style Settings', + title: 'Page style setting', + theme: 'Theme Color', + TopNav: 'Open TopNav', + tagsView: 'Open Tags-View', + fixedHeader: 'Fixed Header', + showLogo: 'Show Logo', + dynamicTitle: 'Dynamic Title', + saveConfiguration: 'Save Config', + resetConfiguration: 'Reset Config', + }, + profile: { + personalInfo: 'Personal Info', + userName: 'User Name', + phone: 'Phone', + email: 'Email', + department: 'Department', + role: 'Role', + creationDate: 'Creation Date', + basicInformation: 'Basic Information', + changePassword: 'Change Password' + }, + userInfo: { + username: 'username', + phone: 'phone', + email: 'email', + sex: 'sex', + male: 'male', + female: 'female' + }, + userAvatar: { + uploadAvatar: 'Click to upload avatar', + choose: 'Choose', + submit: 'Submit', + ModifyAvatar: 'Modify Avatar' + }, + resetPwd: { + oldPassword: 'Old Password', + newPassword: 'New Password', + confirmPassword: 'Confirm Password', + }, + sizeSelect: { + large: 'Large', + default: 'Default', + small: 'Small', + wait: 'Please wait, setting layout size...', + }, + request: { + repeatedSubmit: 'The data is being processed, please do not submit repeatedly', + LoginStatusExpired: 'The login status has expired, you can stay on this page, or log in again', + systemHint: 'System hint', + reRegister: 'Re-register', + cancel: 'Cancel', + expired: 'Invalid session, or session expired, please log in again.', + connectionException: 'Abnormal backend interface connection', + timeout: 'System interface request timed out', + interface: 'System Interface ', + exception: ' Exception', + download: 'Downloading data, please wait', + downloadErr: 'There was an error downloading the file, please contact the administrator!' + }, + option: { + refresh: 'refresh', + option: 'option', + edit: 'Edit', + remove: 'Remove', + add: 'Add', + export: 'Export', + search: 'Search', + reset: 'reset', + cancel: 'cancel', + ok: 'ok', + hint: 'hint', + save: 'save', + close: 'close', + confirmDeletion: 'Are you sure to delete the data item whose {key} is {value}?', + modificationSuccessful: 'Modification Successful', + addedSuccessfully: 'Added Successfully', + successfullyDeleted: 'Successfully Deleted' + }, + common: { + loadTitle: 'Loading system resources, please be patient', + success: 'success', + show: 'show', + hide: 'hide', + pleaseEnter: 'please enter ', + PleaseSelect: 'Please select ', + state: 'State', + isRemove: 'Is it deleted', + creatorId: 'Creator ID', + creatorName: 'Creator name', + createTime: 'Create Time', + createBy: 'Creator', + editTime: 'Edit time', + editID: 'Editor\'s ID', + editAccount: 'Editor\'s account', + editName: 'Editor\'s name', + editBy: 'Editor', + startingTime: 'starting Time', + startDate: 'start Date', + endTime: 'end Time', + endDate: 'end Date' + }, + tireManagement: { + info: { + factory: 'factory', + tireNumber: 'tire Number', + brand: 'brand', + pattern: 'pattern', + tireSpecificationModel: 'tire Specification Model', + sensorNumber: 'sensor Number', + numberPlate: 'number Plate', + creationTime: 'creation Time' + } + }, + tireManagement1: { + tireFactoryCode: 'Tire Factory Code', + enterpriseCode: 'Enterprise Code', + plateNumber: 'Plate Number', + tireNo: 'Tire No', + wheelPosition: 'Wheel Position', + tireSensorID: 'Tire Sensor ID', + treadDepth: 'Tread Depth', + carId: 'Car ID', + tireModel: 'Tire Model', + tireModelId: 'Tire Model ID', + brandId: 'Brand ID', + addTitle: 'Add tire basic information', + editTitle: 'Modify tire basic information', + }, + baseCar: { + car: { + team: 'Team', + model: 'BelongingToTheModel', + companyCode: 'Enterprise number', + carQueueId: 'Fleet ID', + carTypeId: 'Model ID', + carLicense: 'Plate Number', + carLicenseIn: 'Internal Plate Number', + carLicenseParent: 'Head Car Plate Number', + carIdParent: 'Head Car ID', + userId: 'Driver ID', + userName: 'Driver Name', + deviceId: 'Sensor ID', + deviceBindTime: 'Sensor Binding Time', + firstChangeDate: 'First Replacement Date', + trailerNum: 'Trailer Num', + isHandDevice: 'Whether Or Not Manually maintain the sensor', + isHasDevice: 'Whether Or Not independent sensor', + longitude: 'Longitude', + latitude: 'Latitude', + tiresTotal: 'Tire Quantity', + addTitle: 'Add Vehicle Basic Information', + editTitle: 'Modify vehicle basic information', + }, + carType: { + tyreFacCode: 'Tire Factory Code', + companyCode: 'Enterprise number', + code: 'Code', + title: 'Title', + state: 'State', + axleTotal: 'Axle Number', + tyreTotal: 'Number Of Tires', + trailerNum: 'Trailer Num', + addTitle: 'Add Vehicle Type', + editTitle: 'Modify Vehicle Type', + }, + carQueue: { + tyreFacCode: 'Tire Factory Code', + companyCode: 'Enterprise number', + title: 'Title', + state: 'State', + groupTotal: 'Number Of Groups', + carTotal: 'Number Of Cars', + addTitle: 'Add Motorcade', + editTitle: 'Modify Motorcade', + } + }, + baseDevice: { baseDevice: { - baseDevice: { - tyreFacCode: 'Tire Factory Code', - companyCode: 'Enterprise number', - internetThingsNo: 'IoT Card Number', - simCode: 'phone', - deviceType: 'Equipment Type', - state: 'State', - activeTime: 'Activation Time', - lastRunTime: 'Last Run Time', - addTitle: 'Add Device Information', - editTitle: 'Modify Device Information', - } - }, + tyreFacCode: 'Tire Factory Code', + companyCode: 'Enterprise number', + internetThingsNo: 'IoT Card Number', + simCode: 'phone', + deviceType: 'Equipment Type', + state: 'State', + activeTime: 'Activation Time', + lastRunTime: 'Last Run Time', + addTitle: 'Add Device Information', + editTitle: 'Modify Device Information', + } + }, } diff --git a/ruoyi-ui/src/views/carManagement/info/index.vue b/ruoyi-ui/src/views/carManagement/info/index.vue index 7b03436..5158b23 100644 --- a/ruoyi-ui/src/views/carManagement/info/index.vue +++ b/ruoyi-ui/src/views/carManagement/info/index.vue @@ -69,15 +69,27 @@ - + + + + + width="200"> + @@ -144,7 +157,7 @@ @@ -159,7 +172,7 @@ @@ -179,6 +192,84 @@ + + + + + + + + + + + + + + + + + + + + {{ t('option.save') }} + {{ t('option.reset') }} + + + + + + + + + + + + + + + + + @@ -190,7 +281,7 @@ import { listBaseCar, updateBaseCar, getCarQueueList, - getBindList + getBindList, } from "@/api/carManagement/info"; import {useI18n} from 'vue-i18n'; @@ -236,7 +327,30 @@ const bindValue = ref('') const bindInput = ref('') // 接收器筛选 const bindList = ref([]) +// 设置挂车模态框是否显示 +const dialogOpen1 = ref(false); +const postList1 = ref([]) +const thisCarId = ref({}) +const SetTrailerForm = ref({ + carTypeId: '', + trailerNum: '', + carLicense: '' +}) +const option1 = [ + { + value: 1, + label: '挂1' + }, + { + value: 2, + label: '挂2' + }, + { + value: 3, + label: '挂3' + }, +] // 搜索参数 const queryParams = ref({ pageNum: 1, @@ -317,6 +431,47 @@ function handleSelectionChange(selection) { multiple.value = !selection.length; } +// 设置挂车模态框 +const SetTrailer = (e) => { + dialogOpen1.value = true + + getCarQueueList().then(response => { + carType.value = response.CarTypeList; + }).finally(() => { + loading.value = false; + }); + listBaseCar({carLicenseParent:e.carLicense}).then(val => { + postList1.value = val.rows + }) + thisCarId.value = e +} +const saveTrailer = () => { + addBaseCar({ + carLicenseParent: thisCarId.value.carLicense, + carQueueId: thisCarId.value.carQueueId, ...SetTrailerForm.value, + }).then(val => { + proxy.$modal.msgSuccess('保存成功'); + getList(); + listBaseCar({carLicenseParent:thisCarId.value.carLicense}).then(val => { + postList1.value = val.rows + }) + }) +} +const delTrailer = (e) => { + proxy.$modal.confirm(t('option.confirmDeletion', { + key: t('baseCar.car.carLicense'), value: msg.value + })).then(function () { + return delBaseCar(e); + }).then(() => { + getList(); + proxy.$modal.msgSuccess('删除成功'); + listBaseCar({carLicenseParent:thisCarId.value.carLicense}).then(val => { + postList1.value = val.rows + }) + }).catch(() => { + }); +} + // 绑定接收器单选 const bindHandleSelectionChange = (selection) => { bindValue.value = selection @@ -324,7 +479,7 @@ const bindHandleSelectionChange = (selection) => { // 搜索接收器 const bindSearch = () => { - let params = {deviceId: bindInput.value,...queryParams1.value} + let params = {deviceId: bindInput.value, ...queryParams1.value} getBindList(params).then(response => { bindList.value = response.rows; total1.value = response.total; @@ -396,7 +551,7 @@ function submitForm() { getList(); }); } else { - addBaseCar(form.value).then(response => { + addBaseCar({...form.value, trailerNum: 0,}).then(response => { proxy.$modal.msgSuccess(t('option.addedSuccessfully')); open.value = false; getList(); diff --git a/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue index 24c730a..5dafb45 100644 --- a/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue +++ b/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue @@ -40,15 +40,15 @@ @click="getTyreInfo(`${index+1}-1-1`)">
-
+
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-1`))[0].temperature }}
-
+
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-1`))[0].pressure }}
- +
@@ -58,15 +58,15 @@ @click="getTyreInfo(`${index+1}-1-2`)">
-
+
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-2`))[0].temperature }}
-
+
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-2`))[0].pressure }}
- +
@@ -78,15 +78,15 @@ @click="getTyreInfo(`${index+1}-2-2`)">
-
+
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-2`))[0].temperature }}
-
+
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-2`))[0].pressure }}
- +
@@ -96,15 +96,15 @@ @click="getTyreInfo(`${index+1}-2-1`)">
-
+
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-1`))[0].temperature }}
-
+
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-1`))[0].pressure }}
- +
@@ -180,7 +180,7 @@ - {{ tyreInfo.internationalization2 }} + {{ tyreInfo.sensorId }}