diff --git a/.env.development b/.env.development index e774d25..dc23e2f 100644 --- a/.env.development +++ b/.env.development @@ -1,10 +1,10 @@ VITE_APP_NAME=后台管理系统 VITE_SOCKET_URL=wss://server.gxwebsoft.com VITE_SERVER_URL=https://server.gxwebsoft.com/api -#VITE_API_URL=https://cms-api.websoft.top/api +VITE_API_URL=https://cms-api.websoft.top/api #VITE_SOCKET_URL=ws://127.0.0.1:9191 #VITE_SERVER_URL=http://127.0.0.1:8000/api -VITE_API_URL=http://127.0.0.1:9000/api +#VITE_API_URL=http://127.0.0.1:9000/api #/booking/bookingItem diff --git a/src/api/hjm/hjmCar/model/index.ts b/src/api/hjm/hjmCar/model/index.ts index 4ab9dcd..b0438eb 100644 --- a/src/api/hjm/hjmCar/model/index.ts +++ b/src/api/hjm/hjmCar/model/index.ts @@ -33,6 +33,8 @@ export interface HjmCar { fenceId?: number; // 电子围栏名称 fenceName?: string; + // 车辆是否在电子围栏内 + inFence?: boolean; // 电子围栏名称 fence?: HjmFence; // 位置 @@ -51,6 +53,8 @@ export interface HjmCar { organizationParentId?: number; // 用户ID userId?: number; + // 绑定用户 + toUser?: string; // 排序(数字越小越靠前) sortNumber?: number; // 备注 diff --git a/src/components/SelectFence/components/select-data.vue b/src/components/SelectFence/components/select-data.vue index 065050c..0f78932 100644 --- a/src/components/SelectFence/components/select-data.vue +++ b/src/components/SelectFence/components/select-data.vue @@ -98,15 +98,15 @@ title: '围栏名称', dataIndex: 'name' }, - { - title: '经纬度', - dataIndex: 'location', - key: 'location' - }, - { - title: '半径', - dataIndex: 'district' - }, + // { + // title: '经纬度', + // dataIndex: 'location', + // key: 'location' + // }, + // { + // title: '半径', + // dataIndex: 'district' + // }, { title: '操作', key: 'action', diff --git a/src/views/hjm/hjmBxLog/components/hjmBxLogEdit.vue b/src/views/hjm/hjmBxLog/components/hjmBxLogEdit.vue index 84fb76d..48c5723 100644 --- a/src/views/hjm/hjmBxLog/components/hjmBxLogEdit.vue +++ b/src/views/hjm/hjmBxLog/components/hjmBxLogEdit.vue @@ -30,7 +30,6 @@ name="image"> + name="image" v-if="isUpdate"> --> + + + ({ organizationId: undefined, organizationParentId: undefined, userId: undefined, + toUser: undefined, comments: undefined, status: 0, deleted: undefined, @@ -230,6 +238,14 @@ const rules = reactive({ trigger: 'blur' } ], + fenceName: [ + { + required: true, + type: 'string', + message: '请选择电子围栏', + trigger: 'blur' + } + ], insuranceStatus: [ { required: true, @@ -315,23 +331,16 @@ const getUsers = () => { }) } -const chooseDriverId = (index: number,item: User) => { - form.driver = item.realName; - form.driverId = item.userId; -} - const chooseImage = (data: FileRecord) => { images.value.push({ uid: data.id, url: data.path, status: 'done' }); - form.image = data.path; }; const onDeleteItem = (index: number) => { images.value.splice(index, 1); - form.image = ''; }; const {resetFields} = useForm(form, rules); @@ -346,7 +355,8 @@ const save = () => { .then(() => { loading.value = true; const formData = { - ...form + ...form, + image: JSON.stringify(images.value), }; const saveOrUpdate = isUpdate.value ? updateHjmCar : addHjmCar; saveOrUpdate(formData) @@ -392,19 +402,19 @@ watch( if (props.data) { assignObject(form, props.data); if (props.data.image) { - images.value.push({ - uid: uuid(), - url: props.data.image, - status: 'done' - }) + const arr = JSON.parse(props.data.image); + arr.map((item) => { + images.value.push({ + uid: uuid(), + url: item.url, + status: 'done' + }); + }); } if(props.data.organizationParentId){ organizationId.value = props.data.organizationParentId; getUsers() } - if(props.data.insuranceStatus == 1){ - form.insuranceStatus = 1; - } isUpdate.value = true; } else { isUpdate.value = false; diff --git a/src/views/hjm/hjmCar/index.vue b/src/views/hjm/hjmCar/index.vue index d0fb9ed..d1c7ff9 100644 --- a/src/views/hjm/hjmCar/index.vue +++ b/src/views/hjm/hjmCar/index.vue @@ -36,6 +36,11 @@ 在保 过保 + +