@@ -131,7 +130,7 @@
title="是否删除该记录?"
ok-text="是"
cancel-text="否"
- @confirm="delOne(item)"
+ @confirm="delOne(item, valIndex)"
@cancel="cancel"
>
{
+ const clean = (index) => {
name.value = ''
type.value = ''
pageNum.value = '1'
@@ -463,10 +462,10 @@
checkedListAll.value = []
checkAll.value = false
showKey.value++
- getList()
+ getList('', index)
}
// 获取信息
- const getList = (type) => {
+ const getList = (type, index) => {
if (type == 'init') {
pageNum.value = 1
pageSize.value = 99999
@@ -491,7 +490,7 @@
val.pageNum = '1'
val.pageSize = '99999'
})
- if (statistics == res.data.data.list.length) {
+ if (statistics != 0 && statistics == res.data.data.list.length) {
checkAll.value = true
}
if (list.value.length == 0) {
@@ -501,8 +500,31 @@
load.value = Number(pageNum.value)
}
// console.log('整体页面加载次数===============>', load.value)
+ // 判断是否有已打开项,如果有重新载入之后自动打开
+ debugger
list.value = res.data.data.list
+ if (index || index === 0) {
+ debugger
+ list.value[index].show = true
+ // console.log('1111', list.value[index])
+ showNew(list.value[index])
+ // showBottom()
+ }
+ // list.value = res.data.data.list
+ console.log(
+ '重新请求值',
+ index,
+ // res.data.data.list[index].show,
+ list.value
+ )
+
total.value = res.data.data.deptCount
+ console.log(
+ '重新请求值2',
+ index,
+ // res.data.data.list[index].show,
+ list.value
+ )
showKey.value++
if (type == 'init' || type == 'changePage') {
getListByDeptId(list.value[0])
@@ -573,11 +595,15 @@
}
// 显示资源信息
const showBottom = (item) => {
+ debugger
item.show = !item.show
if (item.show) {
getListByDeptId(item)
}
}
+ const showNew = (item) => {
+ getListByDeptId(item)
+ }
// 切换页数
const pageChange = (val) => {
checkAll.value = false
@@ -642,13 +668,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) => {
@@ -734,7 +760,7 @@
}
}
- const delOne = (item) => {
+ const delOne = (item, index) => {
// console.log(item)
sgcDel({
ids: [item.id],
@@ -743,7 +769,8 @@
message.success('删除成功')
// console.log('删除申购车列表================>', res)
mybus.emit('getSgcNum')
- clean()
+ clean(index)
+ // val.show = true
}
})
}
From c9cda03deb145b131d013245dc7b08c6f76b5a8c Mon Sep 17 00:00:00 2001
From: gaoyuanwei <2826352639@qq.com>
Date: Sat, 16 Jul 2022 15:25:49 +0800
Subject: [PATCH 31/34] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/modules/activiti/demo/comments.vue | 15 +-
.../components/AtlasResources.vue | 17 +-
.../components/PutOnTheShelf.vue | 540 ++++++++++--------
.../Algorithm/AlgorithmNavigation.vue | 10 +-
.../Business/BusinessNavigation.vue | 398 ++++++-------
.../Business/BusinessTopDetails.vue | 3 +
.../Developer/DeveloperNavigation.vue | 18 +-
.../components/Developer/DeveloperTrial.vue | 6 +-
.../LayerService/LayerServiceNavigation.vue | 10 +-
9 files changed, 552 insertions(+), 465 deletions(-)
diff --git a/back/src/views/modules/activiti/demo/comments.vue b/back/src/views/modules/activiti/demo/comments.vue
index dc18fb61..fe6f3ddd 100644
--- a/back/src/views/modules/activiti/demo/comments.vue
+++ b/back/src/views/modules/activiti/demo/comments.vue
@@ -72,16 +72,17 @@ export default {
})
},
getInfo (id) {
- this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => {
+ this.$http.get('/demandComment/' + id).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
- this.dataForm = res.data.resourceDTO
- if (this.dataForm.type != '应用资源') {
- this.shifoushizujian = false
- } else {
- this.shifoushizujian = true
- }
+ this.dataForm = res.data
+ // this.dataForm = res.data.resourceDTO
+ // if (this.dataForm.type != '应用资源') {
+ // this.shifoushizujian = false
+ // } else {
+ // this.shifoushizujian = true
+ // }
console.log('this.dataForm', this.dataForm)
})
}
diff --git a/front/src/views/abilityStatistics/components/AtlasResources.vue b/front/src/views/abilityStatistics/components/AtlasResources.vue
index 9d9afe04..29aa1ade 100644
--- a/front/src/views/abilityStatistics/components/AtlasResources.vue
+++ b/front/src/views/abilityStatistics/components/AtlasResources.vue
@@ -110,9 +110,24 @@
:pagination="false"
>
-
+
{{ text || 0 }}
+
+ --
+
diff --git a/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue b/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue
index 742dc973..b6ab9d1f 100644
--- a/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue
+++ b/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue
@@ -598,22 +598,47 @@
const mockData = ref([])
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
const titleName = ref('关联应用')
+ const targetKeys = ref([])
+ // 上一步关联数据
+ const targetKeysBack = ref([])
const sourceClick = () => {
mockData.value = []
visibleAssociatedApplication.value = true
- queryApplicationRelByResourceId({
- referenceId: 0,
- }).then((res) => {
- // console.log(res.data.data.notLinked)
- res.data.data.notLinked.forEach((val, index) => {
- // console.log(val, index)
- mockData.value.push({
- key: val.id,
- title: val.name,
- description: val.id,
+ props.dataFrom.infoList.forEach((val) => {
+ if (val.attrType === '来源应用' && val.attrValue != '') {
+ queryApplicationRelByResourceId({
+ referenceId: 0,
+ }).then((res) => {
+ // console.log(res.data.data.notLinked)
+ res.data.data.notLinked.forEach((val, index) => {
+ mockData.value.push({
+ key: val.id,
+ title: val.name,
+ description: val.id,
+ })
+ })
})
- })
+ targetKeys.value = []
+ val.attrValue.split(',').forEach((item) => {
+ targetKeys.value.push(item)
+ })
+ console.log(targetKeys.value)
+ // console.log('wowowo')
+ } else if (val.attrType === '来源应用' && val.attrValue == '') {
+ queryApplicationRelByResourceId({
+ referenceId: 0,
+ }).then((res) => {
+ // console.log(res.data.data.notLinked)
+ res.data.data.notLinked.forEach((val, index) => {
+ mockData.value.push({
+ key: val.id,
+ title: val.name,
+ description: val.id,
+ })
+ })
+ })
+ }
})
}
// 关联组件
@@ -622,23 +647,46 @@
titleName.value = '关联组件'
mockData.value = []
visibleAssociatedApplication.value = true
- queryResourceRelByKeyId({
- keyId: 0,
- type: '组件服务',
- referenceName: '',
- }).then((res) => {
- // console.log(res.data.data.notLinked)
- res.data.data.notLinked.forEach((val, index) => {
- // console.log(val, index)
- mockData.value.push({
- key: val.id,
- title: val.name,
- description: val.id,
+ props.dataFrom.infoList.forEach((val) => {
+ if (val.attrType === '关联组件信息' && val.attrValue != '') {
+ queryResourceRelByKeyId({
+ keyId: 0,
+ type: '组件服务',
+ referenceName: '',
+ }).then((res) => {
+ // console.log(res.data.data.notLinked)
+ res.data.data.notLinked.forEach((val, index) => {
+ mockData.value.push({
+ key: val.id,
+ title: val.name,
+ description: val.id,
+ })
+ })
})
- })
+ targetKeys.value = []
+ val.attrValue.split(',').forEach((item) => {
+ targetKeys.value.push(item)
+ })
+ console.log(targetKeys.value)
+ // console.log('wowowo')
+ } else if (val.attrType === '关联组件信息' && val.attrValue == '') {
+ queryResourceRelByKeyId({
+ keyId: 0,
+ type: '组件服务',
+ referenceName: '',
+ }).then((res) => {
+ // console.log(res.data.data.notLinked)
+ res.data.data.notLinked.forEach((val, index) => {
+ mockData.value.push({
+ key: val.id,
+ title: val.name,
+ description: val.id,
+ })
+ })
+ })
+ }
})
}
- const targetKeys = ref([])
const selectedKeys = ref([])
const handleChange = (nextTargetKeys, direction, moveKeys) => {
@@ -648,7 +696,7 @@
}
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
- console.log('targetSelectedKeys: ', targetSelectedKeys)
+ console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys)
}
const handleOk = (e) => {
@@ -724,253 +772,253 @@
diff --git a/front/src/views/detailsAll/components/Algorithm/AlgorithmNavigation.vue b/front/src/views/detailsAll/components/Algorithm/AlgorithmNavigation.vue
index fea7e325..7c1de008 100644
--- a/front/src/views/detailsAll/components/Algorithm/AlgorithmNavigation.vue
+++ b/front/src/views/detailsAll/components/Algorithm/AlgorithmNavigation.vue
@@ -126,10 +126,12 @@
'props.dataList.infoList==============>',
navList.value.filter((item) => item.name === list.value[0])
)
- if (navList.value.filter((item) => item.name === list.value[0])[0]) {
- select.value = navList.value.filter(
- (item) => (item.name === '关联应用') | (item.name === list.value[0])
- )[0].key
+ if (list.value.length > 0) {
+ if (navList.value.filter((item) => item.name === list.value[0])[0]) {
+ select.value = navList.value.filter(
+ (item) => (item.name === '关联应用') | (item.name === list.value[0])
+ )[0].key
+ }
}
console.log('11111111111111111111111111', list.value, navList.value)
}
diff --git a/front/src/views/detailsAll/components/Business/BusinessNavigation.vue b/front/src/views/detailsAll/components/Business/BusinessNavigation.vue
index b35ba162..46a57003 100644
--- a/front/src/views/detailsAll/components/Business/BusinessNavigation.vue
+++ b/front/src/views/detailsAll/components/Business/BusinessNavigation.vue
@@ -8,7 +8,12 @@
-
+
{{ nav.name }}
@@ -16,217 +21,216 @@
diff --git a/front/src/views/detailsAll/components/Business/BusinessTopDetails.vue b/front/src/views/detailsAll/components/Business/BusinessTopDetails.vue
index f3fe90f6..76974000 100644
--- a/front/src/views/detailsAll/components/Business/BusinessTopDetails.vue
+++ b/front/src/views/detailsAll/components/Business/BusinessTopDetails.vue
@@ -164,6 +164,9 @@
businessArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
+ let obj = props.dataList.infoList.filter(
+ (val) => val.attrType === '组件类型'
+ )[0]
if (
props.dataList.infoList.filter((val) => val.attrType === '部署位置')[0]
) {
diff --git a/front/src/views/detailsAll/components/Developer/DeveloperNavigation.vue b/front/src/views/detailsAll/components/Developer/DeveloperNavigation.vue
index 8717495d..0f3ee737 100644
--- a/front/src/views/detailsAll/components/Developer/DeveloperNavigation.vue
+++ b/front/src/views/detailsAll/components/Developer/DeveloperNavigation.vue
@@ -96,6 +96,8 @@
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
+ } else if (item.attrType === '是否支持试用' && item.attrValue === '是') {
+ list.value.push('组件试用')
}
})
list.value.unshift('关联应用')
@@ -111,9 +113,12 @@
// }
}
})
- select.value = navList.value.filter(
- (item) => item.name === list.value[0]
- )[0].key
+ if (navList.value.filter((item) => item.name === list.value[0])[0]) {
+ select.value = navList.value.filter(
+ (item) => (item.name === '关联应用') | (item.name === list.value[0])
+ // (item) => item.name === list.value[0]
+ )[0].key
+ }
console.log('11111111111111111111111111', list.value, navList.value)
}
watch(
@@ -137,10 +142,15 @@
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
+ } else if (
+ item.attrType === '是否支持试用' &&
+ item.attrValue === '是'
+ ) {
+ list.value.push('组件试用')
}
})
list.value.unshift('关联应用')
- list.value.push('组件试用')
+ // list.value.push('组件试用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
diff --git a/front/src/views/detailsAll/components/Developer/DeveloperTrial.vue b/front/src/views/detailsAll/components/Developer/DeveloperTrial.vue
index 78281255..50ebfd2c 100644
--- a/front/src/views/detailsAll/components/Developer/DeveloperTrial.vue
+++ b/front/src/views/detailsAll/components/Developer/DeveloperTrial.vue
@@ -49,7 +49,7 @@
})
if (props.dataList.infoList) {
let obj = props.dataList.infoList.filter(
- (item) => item.attrType === '试用地址'
+ (item) => item.attrType === '是否支持试用' && item.attrValue === '是'
)[0]
if (!obj) {
flag.value = false
@@ -94,7 +94,9 @@
() => props.dataList,
(val) => {
if (val) {
- let obj = val.infoList.filter((item) => item.attrType === '试用地址')[0]
+ let obj = val.infoList.filter(
+ (item) => item.attrType === '是否支持试用' && item.attrValue === '是'
+ )[0]
if (!obj) {
flag.value = false
} else {
diff --git a/front/src/views/detailsAll/components/LayerService/LayerServiceNavigation.vue b/front/src/views/detailsAll/components/LayerService/LayerServiceNavigation.vue
index b0585b8f..cc206f14 100644
--- a/front/src/views/detailsAll/components/LayerService/LayerServiceNavigation.vue
+++ b/front/src/views/detailsAll/components/LayerService/LayerServiceNavigation.vue
@@ -82,7 +82,6 @@
const select = ref('layer-service-associated-ability')
const selectNav = (key) => {
select.value = key
- console.log(key, select.value)
mybus.emit('flyToView', select.value)
}
if (props.dataList.infoList) {
@@ -145,9 +144,12 @@
item.show = true
}
})
- select.value = navList.value.filter(
- (item) => item.name === list.value[0]
- )[0].key
+ if (navList.value.filter((item) => item.name === list.value[0])[0]) {
+ select.value = navList.value.filter(
+ (item) => (item.name === '关联应用') | (item.name === list.value[0])
+ // (item) => item.name === list.value[0]
+ )[0].key
+ }
console.log('11111111111111111111111111', list.value, navList.value)
}
watch(
From 6062af489e3e0f841057e61b5987023e96925cb5 Mon Sep 17 00:00:00 2001
From: a0049873 <79py69t9wb@privaterelay.appleid.com>
Date: Sat, 16 Jul 2022 16:01:28 +0800
Subject: [PATCH 32/34] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9=20=20=E5=BA=94?=
=?UTF-8?q?=E7=94=A8=E8=B5=84=E6=BA=90=E6=96=B0=E5=A2=9E=20=E8=83=BD?=
=?UTF-8?q?=E5=8A=9B=E9=9B=86=E5=B8=82=E5=9B=BE=E6=A0=87=20=20=E5=92=8C?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=88=87=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/ren-process-detail.vue | 8 +-
front/public/index.html | 2 +-
.../Application/ApplicationPresentation.vue | 239 +++++++++++-------
.../home/components/searchResultList.vue | 20 +-
4 files changed, 168 insertions(+), 101 deletions(-)
diff --git a/back/src/components/ren-process-detail/src/ren-process-detail.vue b/back/src/components/ren-process-detail/src/ren-process-detail.vue
index a415516a..89bc0d45 100644
--- a/back/src/components/ren-process-detail/src/ren-process-detail.vue
+++ b/back/src/components/ren-process-detail/src/ren-process-detail.vue
@@ -1,15 +1,15 @@
- {{ $t('process.flowImage') }}
-
+
{{ $t('process.circulation') }}
diff --git a/front/public/index.html b/front/public/index.html
index 040ff813..21f8b3f2 100644
--- a/front/public/index.html
+++ b/front/public/index.html
@@ -49,7 +49,7 @@
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
- window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
+ window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 穿透版本
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
diff --git a/front/src/views/detailsAll/components/Application/ApplicationPresentation.vue b/front/src/views/detailsAll/components/Application/ApplicationPresentation.vue
index 52aaac54..48f9fad8 100644
--- a/front/src/views/detailsAll/components/Application/ApplicationPresentation.vue
+++ b/front/src/views/detailsAll/components/Application/ApplicationPresentation.vue
@@ -2,16 +2,37 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 15:25:33
* @LastEditors: hisense.liangjunhua
- * @LastEditTime: 2022-06-14 11:30:52
+ * @LastEditTime: 2022-07-16 15:59:09
* @Description: 应用展示 视频播放
-->
-
-
+
-
+
@@ -22,106 +43,134 @@
diff --git a/front/src/views/home/components/searchResultList.vue b/front/src/views/home/components/searchResultList.vue
index 14844329..8444e1a0 100644
--- a/front/src/views/home/components/searchResultList.vue
+++ b/front/src/views/home/components/searchResultList.vue
@@ -50,6 +50,24 @@
:key="item.index"
>
+
From c7f2e1f70ab596afee00927077b6a54943791ebe Mon Sep 17 00:00:00 2001
From: a0049873 <79py69t9wb@privaterelay.appleid.com>
Date: Sat, 16 Jul 2022 16:01:57 +0800
Subject: [PATCH 33/34] =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
front/public/index.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/front/public/index.html b/front/public/index.html
index 12346e19..d2dc40f3 100644
--- a/front/public/index.html
+++ b/front/public/index.html
@@ -1,8 +1,8 @@
@@ -49,7 +49,7 @@
window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
- window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
+ window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 穿透版本
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
From 15eb5dbd1373551151742a13d0ee5903e6a127f1 Mon Sep 17 00:00:00 2001
From: yuhan_jiang <1165121840@qq.com>
Date: Sat, 16 Jul 2022 16:16:38 +0800
Subject: [PATCH 34/34] =?UTF-8?q?=E3=80=90=E5=8D=95=E7=82=B9=E7=99=BB?=
=?UTF-8?q?=E5=BD=95=E3=80=91=E4=BF=AE=E5=A4=8D=E4=BA=91=E5=9B=BE=E9=9C=80?=
=?UTF-8?q?=E8=A6=81=E7=82=B9=E5=87=BB=E4=B8=A4=E6=AC=A1=E6=89=8D=E8=83=BD?=
=?UTF-8?q?=E5=8D=95=E7=82=B9=E6=88=90=E5=8A=9F=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
front/src/api/user.js | 6 ++-
front/src/utils/request.js | 46 ++++++++---------------
front/src/vab/plugins/permissions.js | 21 ++++-------
front/src/views/capabilityCloud/index.vue | 2 +-
4 files changed, 29 insertions(+), 46 deletions(-)
diff --git a/front/src/api/user.js b/front/src/api/user.js
index a39992be..a8e05e59 100644
--- a/front/src/api/user.js
+++ b/front/src/api/user.js
@@ -23,11 +23,15 @@ export async function socialLogin(data) {
})
}
-export function getUserInfo() {
+export function getUserInfo(redict) {
//此处为了兼容mock.js使用data传递accessToken,如果使用mock可以走headers
+ // debugger
return request({
url: '/sys/user/info',
method: 'get',
+ headers: {
+ REQUESTURI:redict
+ }
})
}
export function getDeptAll() {
diff --git a/front/src/utils/request.js b/front/src/utils/request.js
index 0f02346e..f605d9ae 100644
--- a/front/src/utils/request.js
+++ b/front/src/utils/request.js
@@ -23,24 +23,10 @@ let loadingInstance
* @param {*} msg
*/
const handleCode = (code, msg, res) => {
- debugger
+ // debugger
switch (code) {
case 401:
- // message.error(msg || '登录失效')
-
store.dispatch('user/resetAll').catch(() => {})
- debugger
- // if (res.token) {
- // console.log('存在token信息', res.token)
- // setAccessToken(res.token)
- // const token = getAccessToken()
- // console.log('验证token信息', token)
- // }
-
- // // location.reload()
- // if (redirect) {
- // window.location.href = res.redirect
- // }
break
case 403:
router.push({ path: '/401' }).catch(() => {})
@@ -72,7 +58,7 @@ const instance = axios.create({
*/
instance.interceptors.request.use(
(config) => {
- debugger
+ // debugger
const token = getAccessToken()
if (token)
config.headers[tokenName] = token
@@ -85,7 +71,10 @@ instance.interceptors.request.use(
if (debounce.some((item) => config.url.includes(item))) {
//这里写加载动画
}
- config.headers.REQUESTURI = window.location.href
+ if (!config.headers.REQUESTURI){
+ config.headers.REQUESTURI = window.location.href
+ }
+
return config
},
(error) => {
@@ -104,17 +93,12 @@ instance.interceptors.response.use(
console.log('接口返回REDIRECT', response.headers.redirect)
response['Access-Control-Expose-Headers'] = 'redirect'
const { code, message } = response.data
- debugger
- if (code=='0' && response.headers.token) {
+ if (response.headers.token) {
setAccessToken(response.headers.token)
- } else {
- const token = getAccessToken()
- if (response.headers.redirect && !token) {
- // window.location.href = response.headers.redirect
- window.location.replace(response.headers.redirect)
+ }
+ if (response.headers.redirect) {
+ window.location.replace(response.headers.redirect)
return
- // location.reload()
- }
}
if (response.headers.redirect === '/#/login') {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
@@ -159,7 +143,7 @@ instance.interceptors.response.use(
// }
},
(error) => {
- debugger
+ // debugger
console.log('接口error', error)
if (loadingInstance) loadingInstance.close()
@@ -168,12 +152,12 @@ instance.interceptors.response.use(
console.log('接口返回', response)
console.log('接口返回headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect)
- // if (response.headers.token) {
- // setAccessToken(response.headers.token)
- // }
+ if (response.headers.token) {
+ setAccessToken(response.headers.token)
+ }
if (response.headers.redirect) {
window.location.replace(response.headers.redirect)
- // return Promise.resolve()
+ return Promise.resolve()
}
const { status, data } = response
diff --git a/front/src/vab/plugins/permissions.js b/front/src/vab/plugins/permissions.js
index 6139bd4b..9a058ed2 100644
--- a/front/src/vab/plugins/permissions.js
+++ b/front/src/vab/plugins/permissions.js
@@ -26,16 +26,17 @@
// if (SSOTOKEN) {
// setAccessToken(SSOTOKEN)
// }
+
const token = getAccessToken()
console.log('token', token)
- let hasToken = token || store.getters['user/accessToken']
+ let hasToken = token
// debugger
if (!loginInterception) hasToken = true
console.log('hasToken存在巨大问题', hasToken)
if (hasToken) {
// setAccessToken(hasToken)
await store.dispatch('user/getUserInfo')
- debugger
+ // debugger
next()
} else {
let accessRoutes = []
@@ -47,17 +48,11 @@
next()
} else {
// 这里是一个单点登录的入口
- getUserInfo().then(res=>{
- console.log(res)
- router.replace('/home')
- })
- // await store.dispatch('user/getUserInfo')
- // next()
- // if (recordRoute)
- // next({ path: '/login', query: { redirect: to.path }, replace: true })
- // else next({ path: '/login', replace: true })
- // next()
- // window.open('http://www.baidu.com', '_self')
+ if (to.query.redict)
+ getUserInfo(to.query.redict)
+ else {
+ getUserInfo()
+ }
}
}
})
diff --git a/front/src/views/capabilityCloud/index.vue b/front/src/views/capabilityCloud/index.vue
index b1c7d442..04dd8dc9 100644
--- a/front/src/views/capabilityCloud/index.vue
+++ b/front/src/views/capabilityCloud/index.vue
@@ -32,7 +32,7 @@
import { useRouter } from 'vue-router'
const router = useRouter()
const goHome = () => {
- router.push('/home')
+ router.push({path: '/home', query:{redict: window.location.origin + '/#/home'}})
}