From 4b724f55603f8236ad887cef87993b220ee637f9 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Wed, 6 Mar 2024 09:26:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=90=A5=E8=BD=A6=E8=BE=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- src/assets/js/operation_vehicle.js | 8 +- src/request/data_dictionary.js | 39 +++++++- src/request/operation_vehicle.js | 8 ++ .../operation_vehicle/add.vue | 38 +++++--- .../operation_vehicle/edit.vue | 40 ++++---- .../operation_vehicle/index.vue | 93 +++++++------------ .../operation_vehicle/view.vue | 46 +++++---- 8 files changed, 150 insertions(+), 124 deletions(-) diff --git a/.env b/.env index 6862a98..44897f6 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -VITE_BASE_URL=http://192.168.0.49:8093/ +VITE_BASE_URL=http://192.168.0.62:8093/ VITE_PROXY=/api/ VITE_FILE_URL=https://file.zcloudchina.com/YTHFile VITE_TEMPLATE_URL=https://qaaq.qhdsafety.com/file/ diff --git a/src/assets/js/operation_vehicle.js b/src/assets/js/operation_vehicle.js index 72f79a8..27f68ed 100644 --- a/src/assets/js/operation_vehicle.js +++ b/src/assets/js/operation_vehicle.js @@ -1,6 +1,6 @@ import { getActiveSafety, getBelongingDepartment, - getDynamicSupervision, getEmissionStandard, getFnGetFuelType, getLicenseStatus, + getDynamicSupervision, getEmissionStandard, getFnGetFuelType, getLicenseStatus, getMobileUnit, getNetworkStatus, getTransportationEnterprise, getTransportCategory, getVehicleColor, getVehicleType @@ -20,6 +20,12 @@ export const layoutFnGetTransportationEnterprise = async () => { }); return ref(resData.list); }; +export const layoutFnGetMobileUnit = async () => { + const resData = await getMobileUnit({ + DICTIONARIES_ID: "1e5d02ab69604aeeabfe91458245f7e1", + }); + return ref(resData.list); +}; export const layoutFnGetNetworkStatus = async () => { const resData = await getNetworkStatus({ diff --git a/src/request/data_dictionary.js b/src/request/data_dictionary.js index e2cf046..9bafe7c 100644 --- a/src/request/data_dictionary.js +++ b/src/request/data_dictionary.js @@ -1,7 +1,9 @@ import { post } from "@/request/axios.js"; import { useUserStore } from "@/pinia/user.js"; import pinia from "@/pinia/index.js"; -import { layoutFnGetEveryProvinceHiddenDangerType } from "@/assets/js/data_dictionary.js"; +import { + layoutFnGetEveryProvinceHiddenDangerType +} from "@/assets/js/data_dictionary.js"; // 获取数据字典 export const getLevels = (params) => @@ -90,6 +92,41 @@ export const getHiddenDangerType = async () => { } } }; +export const getVehicleColor = (params) => + post("/dictionaries/getVehicleColor", { + loading: false, + ...params, + }); + +export const getTransportationEnterprise = (params) => + post("/dictionaries/getTransportationEnterprise", { + loading: false, + ...params, + }); + +export const getNetworkStatus = (params) => + post("/dictionaries/getNetworkStatus", { + loading: false, + ...params, + }); + +export const getDynamicSupervision = (params) => + post("/dictionaries/getDynamicSupervision", { + loading: false, + ...params, + }); + +export const getActiveSafety = (params) => + post("/dictionaries/getActiveSafety", { + loading: false, + ...params, + }); + +export const getLicenseStatus = (params) => + post("/dictionaries/getLicenseStatus", { + loading: false, + ...params, + }); // 获取数据字典-检查类别 export const getStandardLevels = () => diff --git a/src/request/operation_vehicle.js b/src/request/operation_vehicle.js index 5f8567a..4499c83 100644 --- a/src/request/operation_vehicle.js +++ b/src/request/operation_vehicle.js @@ -11,6 +11,11 @@ export const getTransportationEnterprise = (params) => loading: false, ...params, }); +export const getMobileUnit = (params) => + post("/dictionaries/getLevels", { + loading: false, + ...params, + }); export const getNetworkStatus = (params) => post("/dictionaries/getNetworkStatus", { @@ -69,6 +74,9 @@ export const getEmissionStandard = (params) => export const getOperationVehicleList = (params) => post("/operatingvehicles/list", params); // 运营车辆列表export const getOperationVehicleList = (params) => +export const setOperationVehicleDelete = (params) => + post("/operatingvehicles/delete", params); // 运营车辆列表export const getOperationVehicleList = (params) => + export const addOperatingVehicleInfo = (params) => upload("/operatingvehicles/add", params); // 资料课件维护添加 diff --git a/src/views/enterprise_management/basics_info_management/operation_vehicle/add.vue b/src/views/enterprise_management/basics_info_management/operation_vehicle/add.vue index d88ad4e..bfae142 100644 --- a/src/views/enterprise_management/basics_info_management/operation_vehicle/add.vue +++ b/src/views/enterprise_management/basics_info_management/operation_vehicle/add.vue @@ -150,15 +150,18 @@ - - + + + + - 检查内容 + 详细信息 @@ -225,7 +228,7 @@ 相关照片 - + - + - + - + @@ -45,18 +45,6 @@ - - - - - - - @@ -71,7 +59,7 @@ - + - - + + + + 检查内容 @@ -282,12 +273,12 @@ import { reactive, ref } from "vue"; import { layoutFnGetVehicleColor, - layoutFnGetTransportationEnterprise, layoutFnGetTransportCategory, layoutFnGetBelongingDepartment, layoutFnGetFuelType, layoutFnGetEmissionStandard, - layoutFnGetVehicleType + layoutFnGetVehicleType, + layoutFnGetMobileUnit, } from "@/assets/js/operation_vehicle.js"; import { findByIdOperatingVehicleInfo, @@ -310,7 +301,7 @@ const rules = { PLATE_NUMBER: [{ required: true, message: "车牌号不能为空", trigger: "blur" }], VEHICLE_COLOR: [{required: true, message: "车辆颜色不能为空", trigger: "change"}], FRAMES_NUMBER: [{required: true, message: "车架号不能为空", trigger: "change"}], - TRANSPORT_ENTERPRISES: [{required: true, message: "运输企业不能为空", trigger: "change"}], + OPERATING_CERTIFICATE: [{required: true, message: "营运证号不能为空", trigger: "blur"}], TRANSPORT_TYPE: [{ required: true, message: "运输类别不能为空", trigger: "change" }], VEHICLE_TYPE: [{ required: true, message: "车辆类型不能为空", trigger: "blur" }], VEHICLEOWNER: [{ required: true, message: "车主/业主不能为空", trigger: "blur" }], @@ -318,6 +309,7 @@ const rules = { CONTACT: [{required: true, message: "联系人不能为空", trigger: "blur"}], CONTACT_NUMBER: [{required: true, message: "联系电话不能为空", trigger: "blur"}], FIRSTSHOW_DATE: [{required: true, message: "初登日期不能为空", trigger: "blur"}], + VEHICLE_EQUIPMENT: [{required: true, message: "车载设备不能为空", trigger: "change"}], }; const formRef = ref(null); const data = reactive({ @@ -365,12 +357,12 @@ const data = reactive({ }, }); const getVehicleColorList = await layoutFnGetVehicleColor(); -const getTransportationEnterpriseList = await layoutFnGetTransportationEnterprise(); const getTransportCategoryList = await layoutFnGetTransportCategory(); const getBelongingDepartment = await layoutFnGetBelongingDepartment(); const getFuelTypeList = await layoutFnGetFuelType(); const getEmissionStandardList = await layoutFnGetEmissionStandard(); const getVehicleTypeList = await layoutFnGetVehicleType(); +const getMobileUnitList = await layoutFnGetMobileUnit(); const fnGetData = async () => { if(OPERATING_ID) { diff --git a/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue b/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue index 63fc256..132bf09 100644 --- a/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue +++ b/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue @@ -37,10 +37,10 @@ - + @@ -54,19 +54,6 @@ - - - - - - - - @@ -80,18 +67,6 @@ - - - - - - - @@ -105,20 +80,7 @@ - - - - - - - - - + 搜索 @@ -145,20 +107,17 @@ {{ serialNumber(pagination, $index) }} - + - - + + - - - - - + + + + diff --git a/src/views/enterprise_management/basics_info_management/operation_vehicle/view.vue b/src/views/enterprise_management/basics_info_management/operation_vehicle/view.vue index bd21f7b..6789d54 100644 --- a/src/views/enterprise_management/basics_info_management/operation_vehicle/view.vue +++ b/src/views/enterprise_management/basics_info_management/operation_vehicle/view.vue @@ -1,24 +1,33 @@