From c71784567c51e10ee98df40c7a53ab8a47346cc6 Mon Sep 17 00:00:00 2001 From: guoyue Date: Sat, 8 Oct 2022 16:00:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A5=BF=E6=B5=B7=E5=B2=B8-=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E8=BD=A6=E6=94=B6=E8=97=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/api/home.js | 3 +- front/src/views/home/infrastructurePage.vue | 32 ++++----- .../components/PurchaseVehicle.vue | 4 +- .../personalCenter/components/asideMenu.vue | 72 +++++++++---------- 4 files changed, 56 insertions(+), 55 deletions(-) diff --git a/front/src/api/home.js b/front/src/api/home.js index e29fce91..8071fe00 100644 --- a/front/src/api/home.js +++ b/front/src/api/home.js @@ -74,7 +74,8 @@ export function getHls(params) { // 加入申购车 export function sgcInsert(data) { return request({ - url: '/resourcecar/insert', + // url: '/resourcecar/insert', + url: '/resourcecar/batchInsert', // 西海岸-加入购物车相当于收藏功能 method: 'post', data, }) diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index caa2cf86..ac566f31 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -452,15 +452,6 @@ > 批量预览 - - { if (selectedList.value.length > 0) { - sgcInsert({ - delFlag: '0', - resourceId: '8888888880000000001', - note1: selectedList.value, - // userId: userId.value, - }).then((res) => { - console.log(res) + let _arr = [] + selectedList.value.map(v => { + _arr.push({ + delFlag: '0', + resourceId: v.idtCameraChannel, + note1: [v], + }) + }) + console.log('_arr------------>', _arr); + sgcInsert(_arr).then((res) => { + console.log('res------申购车------>', res); + if(res.data.code !== 0) { + return message.error(res.data.msg) + } message.success('添加申购车成功!') mybus.emit('getSgcNum') }) @@ -1958,7 +1956,7 @@ ]) // 西海岸--状态展示 if(isXiHaiAn) { - columns.value = columns.value.splice(2, 0, { + columns.value.splice(2, 0, { title: '状态', dataIndex: 'status', width: '10%', diff --git a/front/src/views/personalCenter/components/PurchaseVehicle.vue b/front/src/views/personalCenter/components/PurchaseVehicle.vue index 99b76346..28919b9e 100644 --- a/front/src/views/personalCenter/components/PurchaseVehicle.vue +++ b/front/src/views/personalCenter/components/PurchaseVehicle.vue @@ -498,6 +498,8 @@ pageSize: pageSize.value, name: name.value, }).then((res) => { + console.log('res-----selectResourceCarGroupByDept------->', res); + let statistics = 0 res.data.data.list.map((val) => { val.initLoading = true @@ -557,7 +559,7 @@ // 通过deptid查询列表 const getListByDeptId = (item) => { console.log(item, 'item') - if (item.children.length == 0) { + if (item.children && item.children.length == 0) { selectResourceListByDept({ pageNum: item.pageNum, pageSize: item.pageSize, diff --git a/front/src/views/personalCenter/components/asideMenu.vue b/front/src/views/personalCenter/components/asideMenu.vue index 63351538..8e64a0a8 100644 --- a/front/src/views/personalCenter/components/asideMenu.vue +++ b/front/src/views/personalCenter/components/asideMenu.vue @@ -40,42 +40,42 @@ imgActive: require('@/assets/personalCenter/demandactive.png'), key: 'PurchaseVehicle', }, - { - title: '我的发布', - img: require('@/assets/personalCenter/push.png'), - imgActive: require('@/assets/personalCenter/pushactive.png'), - key: 'push', - }, - { - title: '我的申请', - img: require('@/assets/personalCenter/apply.png'), - imgActive: require('@/assets/personalCenter/applyactive.png'), - key: 'apply', - }, - { - title: '我的收藏', - img: require('@/assets/personalCenter/collect.png'), - imgActive: require('@/assets/personalCenter/collectactive.png'), - key: 'collect', - }, - { - title: '我的浏览', - img: require('@/assets/personalCenter/recent.png'), - imgActive: require('@/assets/personalCenter/recentactive.png'), - key: 'recent', - }, - { - title: '我的需求', - img: require('@/assets/personalCenter/demand.png'), - imgActive: require('@/assets/personalCenter/demandactive.png'), - key: 'demand', - }, - { - title: '我的评论', - img: require('@/assets/personalCenter/remark.png'), - imgActive: require('@/assets/personalCenter/remarkactive.png'), - key: 'remark', - }, + // { + // title: '我的发布', + // img: require('@/assets/personalCenter/push.png'), + // imgActive: require('@/assets/personalCenter/pushactive.png'), + // key: 'push', + // }, + // { + // title: '我的申请', + // img: require('@/assets/personalCenter/apply.png'), + // imgActive: require('@/assets/personalCenter/applyactive.png'), + // key: 'apply', + // }, + // { + // title: '我的收藏', + // img: require('@/assets/personalCenter/collect.png'), + // imgActive: require('@/assets/personalCenter/collectactive.png'), + // key: 'collect', + // }, + // { + // title: '我的浏览', + // img: require('@/assets/personalCenter/recent.png'), + // imgActive: require('@/assets/personalCenter/recentactive.png'), + // key: 'recent', + // }, + // { + // title: '我的需求', + // img: require('@/assets/personalCenter/demand.png'), + // imgActive: require('@/assets/personalCenter/demandactive.png'), + // key: 'demand', + // }, + // { + // title: '我的评论', + // img: require('@/assets/personalCenter/remark.png'), + // imgActive: require('@/assets/personalCenter/remarkactive.png'), + // key: 'remark', + // }, ] const selectedKeys = ref(['PurchaseVehicle']) const type = JSON.parse(window.sessionStorage.getItem('type'))