能力申请页面 console注释

This commit is contained in:
a0049873 2022-06-29 09:56:01 +08:00
parent 4540430fa6
commit 7cfebcfef8
6 changed files with 78 additions and 104 deletions

View File

@ -87,9 +87,9 @@ instance.interceptors.request.use(
*/ */
instance.interceptors.response.use( instance.interceptors.response.use(
(response) => { (response) => {
console.log('接口返回', response) // console.log('', response)
console.log('接口返回headers', response.headers) // console.log('headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect) // console.log('REDIRECT', response.headers.redirect)
if (response.headers.redirect === '/#/login') { if (response.headers.redirect === '/#/login') {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g) var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
@ -109,7 +109,7 @@ instance.interceptors.response.use(
new Date(0).toUTCString() // .kevis.com new Date(0).toUTCString() // .kevis.com
} }
} }
console.log('已清除') // console.log('')
setTimeout(() => { setTimeout(() => {
location.reload() location.reload()
}, 1000) }, 1000)
@ -147,13 +147,13 @@ instance.interceptors.response.use(
// } // }
}, },
(error) => { (error) => {
console.log('接口error', error) // console.log('error', error)
if (loadingInstance) loadingInstance.close() if (loadingInstance) loadingInstance.close()
const { response, message } = error const { response, message } = error
if (error.response && error.response.data) { if (error.response && error.response.data) {
console.log('接口返回', response) // console.log('', response)
console.log('接口返回headers', response.headers) // console.log('headers', response.headers)
console.log('接口返回REDIRECT1111', response.headers.redirect) // console.log('REDIRECT1111', response.headers.redirect)
if (response.headers.redirect === '/#/login') { if (response.headers.redirect === '/#/login') {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g) var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
if (keys) { if (keys) {
@ -172,7 +172,7 @@ instance.interceptors.response.use(
new Date(0).toUTCString() // .kevis.com new Date(0).toUTCString() // .kevis.com
} }
} }
console.log('已清除') // console.log('')
setTimeout(() => { setTimeout(() => {
location.reload() location.reload()
}, 1000) }, 1000)

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-01 17:23:11 * @Date: 2022-04-01 17:23:11
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-04 16:32:38 * @LastEditTime: 2022-06-29 09:54:19
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
/** /**
@ -26,11 +26,11 @@ router.beforeEach(async (to, from, next) => {
// setAccessToken(SSOTOKEN) // setAccessToken(SSOTOKEN)
// } // }
const token = getAccessToken() const token = getAccessToken()
console.log('token', token) // console.log('token', token)
let hasToken = token || store.getters['user/accessToken'] let hasToken = token || store.getters['user/accessToken']
// debugger // debugger
if (!loginInterception) hasToken = true if (!loginInterception) hasToken = true
console.log('hasToken存在巨大问题', hasToken) // console.log('hasToken', hasToken)
if (hasToken) { if (hasToken) {
setAccessToken(hasToken) setAccessToken(hasToken)
await store.dispatch('user/getUserInfo') await store.dispatch('user/getUserInfo')

View File

@ -47,17 +47,12 @@
}) })
// //
const removeFunction = (data) => { const removeFunction = (data) => {
props.dataList.map((item, index) => { dataForm.value.map((val) => {
if (item.name == data.name) { val.children = val.children.filter(
arr.splice(arr.indexOf(data.name), 1) (item) => item.resourceId !== data.resourceId
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 = dataForm.value.filter((val) => val.children.length !== 0)
} }
</script> </script>

View File

@ -281,28 +281,7 @@
}) })
}) })
const list = ref(JSON.parse(localStorage.getItem('applyList'))) const list = ref(JSON.parse(localStorage.getItem('applyList')))
console.log('本地存储====================》', list.value) // 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)
// })
// })
const businessKey = ref(router.currentRoute.value.query.id) const businessKey = ref(router.currentRoute.value.query.id)
const taskId = ref(router.currentRoute.value.query.taskId) const taskId = ref(router.currentRoute.value.query.taskId)
if (businessKey.value) { if (businessKey.value) {
@ -312,11 +291,11 @@
formName.scene = res.data.data.scene formName.scene = res.data.data.scene
formName.basis = res.data.data.basis formName.basis = res.data.data.basis
formName.enclosure = res.data.data.enclosure 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 formRef = ref()
const applySuccess = ref(true) const applySuccess = ref(true)
// const rootObj = null // const rootObj = null
@ -348,7 +327,7 @@
if (upres.data.code == 0) { if (upres.data.code == 0) {
relaunch({ data: obj.value, taskId: taskId.value }).then( relaunch({ data: obj.value, taskId: taskId.value }).then(
(res) => { (res) => {
console.log('驳回================>', res) // console.log('================>', res)
if (res.data.code == 0) { if (res.data.code == 0) {
message.success('重新发起流程成功!') message.success('重新发起流程成功!')
window.setTimeout(() => { window.setTimeout(() => {
@ -504,7 +483,7 @@
const handleChange = (info) => { const handleChange = (info) => {
if (info.file.status !== 'uploading') { if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList) // console.log(info.file, info.fileList)
} }
if (info.file.status === 'done') { if (info.file.status === 'done') {

View File

@ -139,7 +139,7 @@
// //
getUser().then((res) => { getUser().then((res) => {
user.value = res.data.data user.value = res.data.data
console.log('user===============>', user.value) // console.log('user===============>', user.value)
}) })
// 退 // 退
const logout = async () => { const logout = async () => {
@ -154,7 +154,7 @@
} }
// //
const jumpPage = (item) => { const jumpPage = (item) => {
console.log(item) // console.log(item)
select.value = item.key select.value = item.key
switch (item.name) { switch (item.name) {
case '个人中心': case '个人中心':
@ -221,7 +221,7 @@
mybus.on('getSgcNum', () => { mybus.on('getSgcNum', () => {
getSgcTotal().then((res) => { getSgcTotal().then((res) => {
sgcNum.value = res.data.data.count sgcNum.value = res.data.data.count
console.log('申购车总数========================>', res.data.data.count) // console.log('========================>', res.data.data.count)
}) })
}) })
@ -234,7 +234,7 @@
// //
const getMynotice = () => { const getMynotice = () => {
mynotice({ page: 1, limit: 3, readStatus: 0 }).then((res) => { 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 mynoticeNum.value = res.data.data.total
mynoticeData.value = res.data.data.list mynoticeData.value = res.data.data.list
}) })
@ -252,7 +252,7 @@
// } // }
onMounted(() => { onMounted(() => {
getSgcTotal().then((res) => { getSgcTotal().then((res) => {
console.log('初始化========================>', res.data.data.count) // console.log('========================>', res.data.data.count)
sgcNum.value = res.data.data.count sgcNum.value = res.data.data.count
}) })
getMynotice() getMynotice()
@ -281,7 +281,7 @@
mybus.on('getSgcNum', () => { mybus.on('getSgcNum', () => {
getSgcTotal().then((res) => { getSgcTotal().then((res) => {
sgcNum.value = res.data.data.count sgcNum.value = res.data.data.count
console.log('申购车总数========================>', res.data.data.count) // console.log('========================>', res.data.data.count)
}) })
}) })
mybus.on('getMynotice', () => { mybus.on('getMynotice', () => {

View File

@ -220,12 +220,12 @@
}) })
// //
const collection = () => { const collection = () => {
console.log( // console.log(
'收藏=================》', // '=================',
checkedList.value, // checkedList.value,
list.value, // list.value,
scInsert // scInsert
) // )
let scArr = [] let scArr = []
if (checkedList.value.length === 0) { if (checkedList.value.length === 0) {
message.error('请选择需要收藏的数据') message.error('请选择需要收藏的数据')
@ -285,14 +285,14 @@
handleChild(val) handleChild(val)
} }
}) })
console.log(checkAll.value, checkedList.value) // console.log(checkAll.value, checkedList.value)
} }
} }
// child // child
const handleChild = (val) => { const handleChild = (val) => {
if (val.children.length > 0) { if (val.children.length > 0) {
val.children.map((item) => { val.children.map((item) => {
console.log('child=============>', checkedListAbility.value, item) // console.log('child=============>', checkedListAbility.value, item)
if (checkedListAbility.value.indexOf(item.resourceId) > -1) { if (checkedListAbility.value.indexOf(item.resourceId) > -1) {
item.checked = false item.checked = false
checkedListAbility.value.splice( checkedListAbility.value.splice(
@ -307,12 +307,12 @@
// //
const reverseSelectionFalg = ref(false) const reverseSelectionFalg = ref(false)
const reverseSelection = () => { const reverseSelection = () => {
console.log( // console.log(
'点击反选==============>', // '==============>',
checkedList.value, // checkedList.value,
checkAll.value, // checkAll.value,
list.value // list.value
) // )
reverseSelectionFalg.value = !reverseSelectionFalg.value reverseSelectionFalg.value = !reverseSelectionFalg.value
if (checkAll.value) { if (checkAll.value) {
checkAll.value = false checkAll.value = false
@ -407,7 +407,7 @@
if (load.value < Number(pageNum.value)) { if (load.value < Number(pageNum.value)) {
load.value = Number(pageNum.value) load.value = Number(pageNum.value)
} }
console.log('整体页面加载次数===============>', load.value) // console.log('===============>', load.value)
list.value = res.data.data.list list.value = res.data.data.list
total.value = res.data.data.deptCount total.value = res.data.data.deptCount
showKey.value++ showKey.value++
@ -424,11 +424,11 @@
pageSize: item.pageSize, pageSize: item.pageSize,
deptId: item.deptId, deptId: item.deptId,
}).then((res) => { }).then((res) => {
console.log( // console.log(
'根据部门查询=============>', // '=============>',
item, // item,
checkedListAbility.value // checkedListAbility.value
) // )
res.data.data.map((val) => { res.data.data.map((val) => {
if ( if (
(!item.load || item.load < Number(item.pageNum)) && (!item.load || item.load < Number(item.pageNum)) &&
@ -448,11 +448,11 @@
val.checked = false val.checked = false
} }
} else { } else {
console.log( // console.log(
'第二次加载++++++++++++++', // '++++++++++++++',
checkedListAbility.value, // checkedListAbility.value,
val.resourceId // val.resourceId
) // )
if ( if (
checkedListAbility.value.indexOf(val.resourceId) > -1 || checkedListAbility.value.indexOf(val.resourceId) > -1 ||
(item.load < Number(item.pageNum) && (item.load < Number(item.pageNum) &&
@ -471,7 +471,7 @@
if (item.load < Number(item.pageNum)) { if (item.load < Number(item.pageNum)) {
item.load = Number(item.pageNum) item.load = Number(item.pageNum)
} }
console.log('加载次数==============>>', item.load) // console.log('==============>>', item.load)
item.children = res.data.data item.children = res.data.data
item.show = true item.show = true
item.initLoading = false item.initLoading = false
@ -497,12 +497,12 @@
} }
// //
const checkedDept = (item) => { const checkedDept = (item) => {
console.log( // console.log(
'点击部门多选框==================>', // '==================>',
item, // item,
checkedList.value, // checkedList.value,
checkAll.value // checkAll.value
) // )
item.checked = !item.checked item.checked = !item.checked
if (item.checked) { if (item.checked) {
if (item.children.length > 0) { if (item.children.length > 0) {
@ -547,13 +547,13 @@
} }
// //
const judgeAll = (item, val) => { const judgeAll = (item, val) => {
console.log( // console.log(
'判断是否全选============>', // '============>',
item, // item,
val, // val,
list.value, // list.value,
checkedList.value // checkedList.value
) // )
if (!val) { if (!val) {
let all = true let all = true
list.value.map((val) => { list.value.map((val) => {
@ -582,7 +582,7 @@
} }
// //
const checkedItem = (val, item) => { const checkedItem = (val, item) => {
console.log('点击能力===========>', val, item, checkedListAbility.value) // console.log('===========>', val, item, checkedListAbility.value)
item.checked = !item.checked item.checked = !item.checked
if (item.checked) { if (item.checked) {
checkNum.value++ checkNum.value++
@ -598,16 +598,16 @@
) )
val.checkedList.splice(val.checkedList.indexOf(item.resourceId), 1) 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) { if (val.checkedList.length == val.count) {
val.checked = true val.checked = true
checkedList.value.push(val.deptId) checkedList.value.push(val.deptId)
checkedListAll.value.push(val.deptId) checkedListAll.value.push(val.deptId)
console.log( // console.log(
'全选===========================>', // '===========================>',
checkedList.value, // checkedList.value,
list.value // list.value
) // )
if (checkedList.value.length == list.value.length) { if (checkedList.value.length == list.value.length) {
checkAll.value = true checkAll.value = true
} }
@ -631,7 +631,7 @@
}).then((res) => { }).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
message.success('删除成功') message.success('删除成功')
console.log('删除申购车列表================>', res) // console.log('================>', res)
mybus.emit('getSgcNum') mybus.emit('getSgcNum')
clean() clean()
} }
@ -639,7 +639,7 @@
} }
} }
const cancel = (e) => { const cancel = (e) => {
console.log(e) // console.log(e)
} }
// //
const showItem = (id, type, delFlag) => { const showItem = (id, type, delFlag) => {
@ -668,7 +668,7 @@
if (checkedList.value.length == 0) { if (checkedList.value.length == 0) {
message.error('请先选择需要申请的数据!') message.error('请先选择需要申请的数据!')
} else { } else {
console.log('一键申请===================>', list.value) // console.log('===================>', list.value)
localStorage.setItem('applyList', JSON.stringify(list.value)) localStorage.setItem('applyList', JSON.stringify(list.value))
router.push({ router.push({
path: '/apply', path: '/apply',