From 7cfebcfef8246c384b7fff295e10f5574e25f96f Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Wed, 29 Jun 2022 09:56:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E7=94=B3=E8=AF=B7=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20=20=20=20console=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/utils/request.js | 18 ++-- front/src/vab/plugins/permissions.js | 8 +- front/src/views/home/AbilityToApplyFor.vue | 15 +-- front/src/views/home/apply.vue | 31 +----- front/src/views/home/components/header.vue | 12 +-- .../components/PurchaseVehicle.vue | 98 +++++++++---------- 6 files changed, 78 insertions(+), 104 deletions(-) diff --git a/front/src/utils/request.js b/front/src/utils/request.js index 0ab87260..021c203b 100644 --- a/front/src/utils/request.js +++ b/front/src/utils/request.js @@ -87,9 +87,9 @@ instance.interceptors.request.use( */ instance.interceptors.response.use( (response) => { - console.log('接口返回', response) - console.log('接口返回headers', response.headers) - console.log('接口返回REDIRECT', response.headers.redirect) + // console.log('接口返回', response) + // console.log('接口返回headers', response.headers) + // console.log('接口返回REDIRECT', response.headers.redirect) if (response.headers.redirect === '/#/login') { var keys = document.cookie.match(/[^ =;]+(?=\=)/g) @@ -109,7 +109,7 @@ instance.interceptors.response.use( new Date(0).toUTCString() //清除一级域名下的或指定的,例如 .kevis.com } } - console.log('已清除') + // console.log('已清除') setTimeout(() => { location.reload() }, 1000) @@ -147,13 +147,13 @@ instance.interceptors.response.use( // } }, (error) => { - console.log('接口error', error) + // console.log('接口error', error) if (loadingInstance) loadingInstance.close() const { response, message } = error if (error.response && error.response.data) { - console.log('接口返回', response) - console.log('接口返回headers', response.headers) - console.log('接口返回REDIRECT1111', response.headers.redirect) + // console.log('接口返回', response) + // console.log('接口返回headers', response.headers) + // console.log('接口返回REDIRECT1111', response.headers.redirect) if (response.headers.redirect === '/#/login') { var keys = document.cookie.match(/[^ =;]+(?=\=)/g) if (keys) { @@ -172,7 +172,7 @@ instance.interceptors.response.use( new Date(0).toUTCString() //清除一级域名下的或指定的,例如 .kevis.com } } - console.log('已清除') + // console.log('已清除') setTimeout(() => { location.reload() }, 1000) diff --git a/front/src/vab/plugins/permissions.js b/front/src/vab/plugins/permissions.js index 45489e96..f417ba89 100644 --- a/front/src/vab/plugins/permissions.js +++ b/front/src/vab/plugins/permissions.js @@ -1,8 +1,8 @@ /* * @Author: hisense.wuhongjian * @Date: 2022-04-01 17:23:11 - * @LastEditors: hisense.wuhongjian - * @LastEditTime: 2022-06-04 16:32:38 + * @LastEditors: hisense.liangjunhua + * @LastEditTime: 2022-06-29 09:54:19 * @Description: 告诉大家这是什么 */ /** @@ -26,11 +26,11 @@ router.beforeEach(async (to, from, next) => { // setAccessToken(SSOTOKEN) // } const token = getAccessToken() - console.log('token', token) + // console.log('token', token) let hasToken = token || store.getters['user/accessToken'] // debugger if (!loginInterception) hasToken = true - console.log('hasToken存在巨大问题', hasToken) + // console.log('hasToken存在巨大问题', hasToken) if (hasToken) { setAccessToken(hasToken) await store.dispatch('user/getUserInfo') diff --git a/front/src/views/home/AbilityToApplyFor.vue b/front/src/views/home/AbilityToApplyFor.vue index 8889a61a..36d26a83 100644 --- a/front/src/views/home/AbilityToApplyFor.vue +++ b/front/src/views/home/AbilityToApplyFor.vue @@ -47,17 +47,12 @@ }) //移除方法 const removeFunction = (data) => { - props.dataList.map((item, index) => { - if (item.name == data.name) { - arr.splice(arr.indexOf(data.name), 1) - dataResourceId.splice(dataResourceId.indexOf(data.id), 1) - depList.value.depID = dataResourceId - depList.value.Name = arr - dataForm.value.splice(index, 1) - mybus.emit('reomveOldData', depList.value) - console.log('depList.value', depList.value) - } + dataForm.value.map((val) => { + val.children = val.children.filter( + (item) => item.resourceId !== data.resourceId + ) }) + dataForm.value = dataForm.value.filter((val) => val.children.length !== 0) } diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue index 17b1c514..5bf6df4d 100644 --- a/front/src/views/home/apply.vue +++ b/front/src/views/home/apply.vue @@ -281,28 +281,7 @@ }) }) const list = ref(JSON.parse(localStorage.getItem('applyList'))) - console.log('本地存储====================》', list.value) - // console.log( - // 'router传参==================>', - // router.currentRoute.value.query.name - // ) - // let arr = - // router.currentRoute.value.query.name instanceof Array - // ? router.currentRoute.value.query.name - // : [router.currentRoute.value.query.name] - // const ids = router.currentRoute.value.query.ids - // console.log( - // 'ids==========================>', - // ids, - // router.currentRoute.value.query.ids - // ) - // let dataResourceId = router.currentRoute.value.query.resourceId - // dataResourceId.map((item) => { - // selectOne(item).then((res) => { - // dataList.value.push(res.data.data) - // console.log('dataResourceId', dataList.value) - // }) - // }) + // console.log('本地存储====================》', list.value) const businessKey = ref(router.currentRoute.value.query.id) const taskId = ref(router.currentRoute.value.query.taskId) if (businessKey.value) { @@ -312,11 +291,11 @@ formName.scene = res.data.data.scene formName.basis = res.data.data.basis formName.enclosure = res.data.data.enclosure - console.log('回填数据================>', res, formName.phone) + // console.log('回填数据================>', res, formName.phone) }) } - console.log(formName.system) + // console.log(formName.system) const formRef = ref() const applySuccess = ref(true) // const rootObj = null @@ -348,7 +327,7 @@ if (upres.data.code == 0) { relaunch({ data: obj.value, taskId: taskId.value }).then( (res) => { - console.log('驳回================>', res) + // console.log('驳回================>', res) if (res.data.code == 0) { message.success('重新发起流程成功!') window.setTimeout(() => { @@ -504,7 +483,7 @@ const handleChange = (info) => { if (info.file.status !== 'uploading') { - console.log(info.file, info.fileList) + // console.log(info.file, info.fileList) } if (info.file.status === 'done') { diff --git a/front/src/views/home/components/header.vue b/front/src/views/home/components/header.vue index 8d360247..46f6f7ae 100644 --- a/front/src/views/home/components/header.vue +++ b/front/src/views/home/components/header.vue @@ -139,7 +139,7 @@ // 获取用户信息 getUser().then((res) => { user.value = res.data.data - console.log('user===============>', user.value) + // console.log('user===============>', user.value) }) // 退出登录 const logout = async () => { @@ -154,7 +154,7 @@ } // 跳转页面 const jumpPage = (item) => { - console.log(item) + // console.log(item) select.value = item.key switch (item.name) { case '个人中心': @@ -221,7 +221,7 @@ mybus.on('getSgcNum', () => { getSgcTotal().then((res) => { sgcNum.value = res.data.data.count - console.log('申购车总数========================>', res.data.data.count) + // console.log('申购车总数========================>', res.data.data.count) }) }) @@ -234,7 +234,7 @@ // 我的消息 const getMynotice = () => { mynotice({ page: 1, limit: 3, readStatus: 0 }).then((res) => { - console.log('我的消息', res.data.data) + // console.log('我的消息', res.data.data) mynoticeNum.value = res.data.data.total mynoticeData.value = res.data.data.list }) @@ -252,7 +252,7 @@ // } onMounted(() => { getSgcTotal().then((res) => { - console.log('初始化========================>', res.data.data.count) + // console.log('初始化========================>', res.data.data.count) sgcNum.value = res.data.data.count }) getMynotice() @@ -281,7 +281,7 @@ mybus.on('getSgcNum', () => { getSgcTotal().then((res) => { sgcNum.value = res.data.data.count - console.log('申购车总数========================>', res.data.data.count) + // console.log('申购车总数========================>', res.data.data.count) }) }) mybus.on('getMynotice', () => { diff --git a/front/src/views/personalCenter/components/PurchaseVehicle.vue b/front/src/views/personalCenter/components/PurchaseVehicle.vue index 19869be9..3c3b92be 100644 --- a/front/src/views/personalCenter/components/PurchaseVehicle.vue +++ b/front/src/views/personalCenter/components/PurchaseVehicle.vue @@ -220,12 +220,12 @@ }) // 收藏 const collection = () => { - console.log( - '收藏=================》', - checkedList.value, - list.value, - scInsert - ) + // console.log( + // '收藏=================》', + // checkedList.value, + // list.value, + // scInsert + // ) let scArr = [] if (checkedList.value.length === 0) { message.error('请选择需要收藏的数据') @@ -285,14 +285,14 @@ handleChild(val) } }) - console.log(checkAll.value, checkedList.value) + // console.log(checkAll.value, checkedList.value) } } // 处理child const handleChild = (val) => { if (val.children.length > 0) { val.children.map((item) => { - console.log('child=============>', checkedListAbility.value, item) + // console.log('child=============>', checkedListAbility.value, item) if (checkedListAbility.value.indexOf(item.resourceId) > -1) { item.checked = false checkedListAbility.value.splice( @@ -307,12 +307,12 @@ // 反选 const reverseSelectionFalg = ref(false) const reverseSelection = () => { - console.log( - '点击反选==============>', - checkedList.value, - checkAll.value, - list.value - ) + // console.log( + // '点击反选==============>', + // checkedList.value, + // checkAll.value, + // list.value + // ) reverseSelectionFalg.value = !reverseSelectionFalg.value if (checkAll.value) { checkAll.value = false @@ -407,7 +407,7 @@ if (load.value < Number(pageNum.value)) { load.value = Number(pageNum.value) } - console.log('整体页面加载次数===============>', load.value) + // console.log('整体页面加载次数===============>', load.value) list.value = res.data.data.list total.value = res.data.data.deptCount showKey.value++ @@ -424,11 +424,11 @@ pageSize: item.pageSize, deptId: item.deptId, }).then((res) => { - console.log( - '根据部门查询=============>', - item, - checkedListAbility.value - ) + // console.log( + // '根据部门查询=============>', + // item, + // checkedListAbility.value + // ) res.data.data.map((val) => { if ( (!item.load || item.load < Number(item.pageNum)) && @@ -448,11 +448,11 @@ val.checked = false } } else { - console.log( - '第二次加载++++++++++++++', - checkedListAbility.value, - val.resourceId - ) + // console.log( + // '第二次加载++++++++++++++', + // checkedListAbility.value, + // val.resourceId + // ) if ( checkedListAbility.value.indexOf(val.resourceId) > -1 || (item.load < Number(item.pageNum) && @@ -471,7 +471,7 @@ if (item.load < Number(item.pageNum)) { item.load = Number(item.pageNum) } - console.log('加载次数==============>>', item.load) + // console.log('加载次数==============>>', item.load) item.children = res.data.data item.show = true item.initLoading = false @@ -497,12 +497,12 @@ } // 点击部门多选框 const checkedDept = (item) => { - console.log( - '点击部门多选框==================>', - item, - checkedList.value, - checkAll.value - ) + // console.log( + // '点击部门多选框==================>', + // item, + // checkedList.value, + // checkAll.value + // ) item.checked = !item.checked if (item.checked) { if (item.children.length > 0) { @@ -547,13 +547,13 @@ } // 判断是否全选 const judgeAll = (item, val) => { - console.log( - '判断是否全选============>', - item, - val, - list.value, - checkedList.value - ) + // console.log( + // '判断是否全选============>', + // item, + // val, + // list.value, + // checkedList.value + // ) if (!val) { let all = true list.value.map((val) => { @@ -582,7 +582,7 @@ } // 点击能力 const checkedItem = (val, item) => { - console.log('点击能力===========>', val, item, checkedListAbility.value) + // console.log('点击能力===========>', val, item, checkedListAbility.value) item.checked = !item.checked if (item.checked) { checkNum.value++ @@ -598,16 +598,16 @@ ) val.checkedList.splice(val.checkedList.indexOf(item.resourceId), 1) } - console.log('判断是否全选===============>', val, checkedListAll.value) + // console.log('判断是否全选===============>', val, checkedListAll.value) if (val.checkedList.length == val.count) { val.checked = true checkedList.value.push(val.deptId) checkedListAll.value.push(val.deptId) - console.log( - '全选===========================>', - checkedList.value, - list.value - ) + // console.log( + // '全选===========================>', + // checkedList.value, + // list.value + // ) if (checkedList.value.length == list.value.length) { checkAll.value = true } @@ -631,7 +631,7 @@ }).then((res) => { if (res.data.msg === 'success') { message.success('删除成功') - console.log('删除申购车列表================>', res) + // console.log('删除申购车列表================>', res) mybus.emit('getSgcNum') clean() } @@ -639,7 +639,7 @@ } } const cancel = (e) => { - console.log(e) + // console.log(e) } // 详情 const showItem = (id, type, delFlag) => { @@ -668,7 +668,7 @@ if (checkedList.value.length == 0) { message.error('请先选择需要申请的数据!') } else { - console.log('一键申请===================>', list.value) + // console.log('一键申请===================>', list.value) localStorage.setItem('applyList', JSON.stringify(list.value)) router.push({ path: '/apply',