| | |
| | | } |
| | | ], |
| | | }, |
| | | carrierType:{ |
| | | label: '驾驶员类型', |
| | | display: true, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/carrier_type', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "驾驶员类型不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | vehicleProviderId: { |
| | | label: '车辆服务商', |
| | | addDisplay: true, |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "车辆服务商不能为空", trigger: "blur" |
| | | message: "车辆服务商不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | type: 'table', suffixIcon: 'search', |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('vehicleProviderId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | vehicleProviderId: active.id, |
| | | vehicleProviderName: active.serviceShortName, |
| | | }); |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | |
| | | }, |
| | | licenseType: { |
| | | label: '准驾车型', |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/license_type', |
| | | addDisplay: true, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/before_license_type', |
| | | addDisplay: true,multiple:true, |
| | | editDisplay: true,minWidth:150, |
| | | viewDisplay: true, |
| | | hide: false, |
| | |
| | | } |
| | | } |
| | | }, |
| | | licenseAttachment: { |
| | | label: '驾驶证凭证链接', |
| | | //type: 'textarea', minRows: 3, maxRows: 5, |
| | | addDisplay: true,minWidth:150, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | |
| | | currentVehicleCode: { |
| | | label: '当前绑定车辆',minWidth:150, |
| | | addDisplay: true, |
| | |
| | | viewDisplay: true, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | licenseAttachment: { |
| | | label: '驾驶证凭证', |
| | | //type: 'textarea', minRows: 3, maxRows: 5, |
| | | addDisplay: true,minWidth:150, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | span: 24, |
| | | accept:'string',dataType: 'string', |
| | | type: 'upload', |
| | | action: '/common/upload2', |
| | | propsHttp:{ |
| | | home:'url', |
| | | name:'newFileName', |
| | | }, |
| | | }, |
| | | } |
| | | }, |
| | |
| | | licenseType: { |
| | | label: '准驾车型', |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/license_type', |
| | | display: false,minWidth:150, |
| | | display: false,minWidth:150,multiple:true, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | |
| | | |
| | | }, |
| | | }, |
| | | licenseAttachment: { |
| | | label: '驾驶证凭证链接',display: false,minWidth:150, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | // licenseAttachment: { |
| | | // label: '驾驶证凭证链接',display: false,minWidth:150, |
| | | // hide: false, |
| | | // search: false, |
| | | // }, |
| | | currentVehicleCode: { |
| | | label: '当前绑定车辆',minWidth:150, |
| | | display: false, |
| | |
| | | } |
| | | } |
| | | }) |
| | | onMounted(() => { |
| | | watch(() => form.value.vehicleProviderId, () => { |
| | | |
| | | if (!form.value.vehicleProviderId){ |
| | | return; |
| | | } |
| | | const table = crudRef.value?.getPropRef?.('vehicleProviderId')?.$refs?.temp; |
| | | if (!table) return; |
| | | |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | vehicleProviderId: active.id, |
| | | vehicleProviderName: active.serviceShortName, |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | </script> |