diff --git a/env/.env.dev b/env/.env.dev index 9685b15..6d2769c 100644 --- a/env/.env.dev +++ b/env/.env.dev @@ -10,7 +10,7 @@ VITE_API_URL = '/proxyApi' VITE_proxyTarget = 'http://10.40.92.186:8080' # 赵福海 (登录) # VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型) -# VITE_proxyTarget = 'http://10.40.92.253:8080' # 牛 (个人中心 基础信息企业申请认证) +# VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证) diff --git a/src/components/uploadComponent/index.vue b/src/components/uploadComponent/index.vue index 4fd99dc..8c1605e 100644 --- a/src/components/uploadComponent/index.vue +++ b/src/components/uploadComponent/index.vue @@ -4,6 +4,7 @@
-
@@ -34,8 +34,14 @@ import { ref, nextTick } from 'vue' import { ElMessage } from 'element-plus' // import { Base64 } from 'js-base64' - const tmpUploadUrl = import.meta.env.VITE_API_URL +"/zlpt-file/file/cos/upload" - console.log("tmpUploadUrl",tmpUploadUrl) + const tmpUploadUrl = import.meta.env.VITE_API_URL + '/zlpt-file/file/cos/upload' + import { useStore } from 'store/main' + const store = useStore() + const headerInfo = reactive({ + Authorization: store.token + }) + + console.log('tmpUploadUrl', tmpUploadUrl) const actionUrl = ref(tmpUploadUrl) const props = defineProps({ // actionUrl: { @@ -132,9 +138,13 @@ type: Boolean, default: false }, - scuccesCallback:{ - type:Function, - default:()=>{} + scuccesCallback: { + type: Function, + default: () => {} + }, + successResultCallBack: { + type: Function, + default: () => {} } }) // office预览 @@ -150,12 +160,12 @@ // 上传图片 成功 const successUpload = (response: any, file: any) => { console.log('successUpload', response, file) - if (response.rt.status === 200) { + if (response.code === 200) { props.fileList.push({ url: response.data, name: file.name }) - + props.successResultCallBack(response) } else { ElMessage({ type: 'warning', @@ -169,8 +179,8 @@ message: '上传失败请重试!' }) } - const beforeUpload = (file:any) => { - console.log("file",file) + const beforeUpload = (file: any) => { + console.log('file', file) const { name = '', size } = file if (size > props.maxSize * 1024 * 1000) { ElMessage({ @@ -179,11 +189,11 @@ }) return false } - let names = name.split(".") - let currentName = names[names.length-1] - console.log("acceptTypeListacceptTypeList",props.acceptTypeList,currentName) - console.log("name.split().pop()",) - if (!props.acceptTypeList.includes( '.'+currentName) ) { + let names = name.split('.') + let currentName = names[names.length - 1] + console.log('acceptTypeListacceptTypeList', props.acceptTypeList, currentName) + console.log('name.split().pop()') + if (!props.acceptTypeList.includes('.' + currentName)) { ElMessage({ type: 'warning', message: `文件格式仅支持${props.acceptTypeList.join(',')}` @@ -191,7 +201,7 @@ return false } } - const handleExceed = (files:any, fileList:any) => { + const handleExceed = (files: any, fileList: any) => { ElMessage({ type: 'warning', message: `当前限制选择 10 个文件,本次选择了 ${files.length} 个文件,共选择了 ${ @@ -200,12 +210,12 @@ }) } // 移除文件 - const removeFile = (file:any, data:any) => { + const removeFile = (file: any, data: any) => { console.log(file, data) // props.fileList = data } // 预览 - const preview = (data:any) => { + const preview = (data: any) => { const { url, response = {} } = data || {} let name = data.name const downLoadTypeList = props.downLoadTypeList @@ -217,13 +227,12 @@ if (downLoadTypeList.includes(suffixFileType)) { //预览 'doc', 'docx', 'xlsx', 'xls', 'txt' 文件 name = name.replace(/&/g, '') // & 不兼容 - const target = encodeURIComponent( - // Base64.encode( - // `${location.origin}/api/abk/web/v1/resource/file?fileId=${ - // url || response.data - // }&fullfilename=${name}&sid=4AC67ADB4E264AB0A8B899A671072875` - // ) - ) + const target = encodeURIComponent() + // Base64.encode( + // `${location.origin}/api/abk/web/v1/resource/file?fileId=${ + // url || response.data + // }&fullfilename=${name}&sid=4AC67ADB4E264AB0A8B899A671072875` + // ) if (props.officePreviewFlag && officeType.includes(suffixFileType)) { // office预览的 const preveiewURL = officeOnlineAddress + target @@ -238,7 +247,7 @@ } } - const onProgressFn = (event:any, file:any, fileList:any) => { + const onProgressFn = (event: any, file: any, fileList: any) => { processFlag.value = true loadProcess.value = event.percent.toFixed(2) if (loadProcess.value >= 100) { @@ -248,7 +257,7 @@ }) } } - const changeFileFn =(ev:any)=>{ + const changeFileFn = (ev: any) => { props.scuccesCallback(ev) } diff --git a/src/http/api/equip.ts b/src/http/api/equip.ts index cae03dd..9d2036b 100644 --- a/src/http/api/equip.ts +++ b/src/http/api/equip.ts @@ -7,7 +7,7 @@ export const getList = (params = {}) => { //获取装备详情 export const getDetail = (id = '') => { - return get(`/zlpt-equip/dev/${id}`) + return get(`/zlpt-equip/dev/getInfo/${id}`) } //获取 推荐装备列表 @@ -25,9 +25,9 @@ export const apiSubmitLease = (params = {}) => { } //获取装备分类列表 (级联) export const apiGetEquipTypeList = (params = {}) => { - return post('/zlpt-equip/type/list',params) + return post('/zlpt-equip/type/list', params) } //获取省市区列表 (级联) export const apiGetAddressList = (params = {}) => { - return post('/zlpt-system/baseAddress/selectAddress',params) + return post('/zlpt-system/baseAddress/selectAddress', params) } diff --git a/src/http/api/register/index.ts b/src/http/api/register/index.ts new file mode 100644 index 0000000..1ed6b92 --- /dev/null +++ b/src/http/api/register/index.ts @@ -0,0 +1,15 @@ +// 个人中心 基础信息模块 + +import { get, post } from '../../index' + +// 获取验证码 +export const getCodeInfoApi = (phone) => { + return post(`/zlpt-system/sms/send?phone=${phone}&type=2`, {}) +} +// 立即注册按钮 +export const registerNowApi = (data) => { + return post('/zlpt-auth/register', data) +} + + + diff --git a/src/http/index.ts b/src/http/index.ts index a800b80..b0b0a82 100644 --- a/src/http/index.ts +++ b/src/http/index.ts @@ -37,7 +37,7 @@ service.interceptors.response.use( } else if (data.code == '403') { ElMessage.error('请重新登录') router.push('/login') - } else if( data.code == '401' ){ + } else if (data.code == '401') { ElMessage.error(data.msg) router.push('/login') } diff --git a/src/layout/header.vue b/src/layout/header.vue index 6fd9bbc..218c98e 100644 --- a/src/layout/header.vue +++ b/src/layout/header.vue @@ -1,8 +1,42 @@ diff --git a/src/views/user/baseInfo/index.vue b/src/views/user/baseInfo/index.vue index 301395c..6963e75 100644 --- a/src/views/user/baseInfo/index.vue +++ b/src/views/user/baseInfo/index.vue @@ -99,22 +99,22 @@ { v_name: '已提交', imgSrc: '../../../assets/img/home/2023_12_01_beijing2/fankuixinxi.png', - orderConunt: 1 + orderConunt: 0 }, { v_name: '进行中', imgSrc: '../../../assets/img/home/2023_12_01_beijing2/dingdanxinxi.png', - orderConunt: 1 + orderConunt: 0 }, { v_name: '已完成', imgSrc: '../../../assets/img/home/2023_12_01_beijing2/lishijishi.png', - orderConunt: 1 + orderConunt: 0 }, { v_name: '全部订单', imgSrc: '../../../assets/img/home/2023_12_01_beijing2/fuwuxiangmu.png', - orderConunt: 1 + orderConunt: 0 } ]) @@ -123,22 +123,22 @@ { v_name: '已上架', imgSrc: '../../../assets/img/home/2023_12_01_beijing2/fankuixinxi.png', - orderConunt: 1 + orderConunt: 0 }, { v_name: '已下架', imgSrc: '../../../assets/img/home/2023_12_01_beijing2/dingdanxinxi.png', - orderConunt: 1 + orderConunt: 0 }, { v_name: '已提交', imgSrc: '../../../assets/img/home/2023_12_01_beijing2/lishijishi.png', - orderConunt: 1 + orderConunt: 0 }, { v_name: '全部装备', imgSrc: '../../../assets/img/home/2023_12_01_beijing2/fuwuxiangmu.png', - orderConunt: 1 + orderConunt: 0 } ]) // 认证弹框关闭 diff --git a/src/views/user/goodsManagement/index.vue b/src/views/user/goodsManagement/index.vue index 60fc9d5..afeb636 100644 --- a/src/views/user/goodsManagement/index.vue +++ b/src/views/user/goodsManagement/index.vue @@ -62,17 +62,17 @@ // console.log(val, '省选择**') store.getmarketList(val.split(',')[0]) - AssemblyRegisterAddress[0] = val.split(',')[1] + // AssemblyRegisterAddress[0] = val.split(',')[1] } // 市级下拉框选中获取区级数据 const changeMarket = (val: any) => { store.getareaList(val.split(',')[0]) - AssemblyRegisterAddress[1] = val.split(',')[1] + // AssemblyRegisterAddress[1] = val.split(',')[1] } // 区级下拉框获取区级数据 const opeChangeArea = (val: any) => { - AssemblyRegisterAddress[2] = val.split(',')[1] + // AssemblyRegisterAddress[2] = val.split(',')[1] } // 设备类型大类 @@ -98,6 +98,13 @@ leaseScope: '', /* 设备所在地 */ location: '', + + /* 省 */ + provinceId: '', + /* 市 */ + cityId: '', + /* 区 */ + areaId: '', /* 设备所在地 省 */ addressEconomize: '', /* 设备所在地 市 */ @@ -134,7 +141,7 @@ jsDayPrice: '', /* 详细说明 */ description: '', - /* 设备图片 */ + /* 设备主图片 */ picUrl: '', /* 检测信息 ,保险信息*/ fileList: [ @@ -248,21 +255,22 @@ /* 检测信息 */ { id: '28', - url: 'https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/488bab245180ebf9f1f3d7db5301be4.png' + url: '' }, /* 保险信息 */ { id: '29', - utr: 'https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/488bab245180ebf9f1f3d7db5301be4.png' + utr: '' }, /* 设备图片 */ { id: '20', - utr: 'https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/DemoData/10/655f1724956e0b38bf6adb6087123f7e_b.jpg' + utr: '' } ], /* 设备状态 */ maStatus: 15 + /* 设备型号 */ } // 打开入驻弹框 dialogFormVisibleSettlein.value = true @@ -330,6 +338,28 @@ } ] }) + + /* 检测信息图片地址 */ + const successResultCallBackFnjc = (val: any) => { + equipmentDeploymentParams.fileList.push({ + id: '28', + url: val.msg + }) + } + /* 保险信息图片地址 */ + const successResultCallBackFnbs = (val: any) => { + equipmentDeploymentParams.fileList.push({ + id: '29', + url: val.msg + }) + } + /* 设备图片信息地址 */ + const successResultCallBackFnDevicePic = (val: any) => { + equipmentDeploymentParams.fileList.push({ + id: '20', + url: val.msg + }) + }