From c97201645b0ef8b8dc137554651b3758409dd98b Mon Sep 17 00:00:00 2001 From: wuhongjian Date: Thu, 23 Jun 2022 17:56:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AD=BB=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8Ctoken=E5=A4=B1=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/public/static/config/location.js | 45 ++++++++++++++++++- front/src/utils/request.js | 9 +++- .../components/ResourceAggregation.vue | 2 +- front/src/views/home/DetailsPageconetent.vue | 1 - front/src/views/home/mapTest/index.vue | 32 +++++++++---- .../components/CapabilityConvergence.vue | 4 +- 6 files changed, 76 insertions(+), 17 deletions(-) diff --git a/front/public/static/config/location.js b/front/public/static/config/location.js index cf3fbae5..b8618151 100644 --- a/front/public/static/config/location.js +++ b/front/public/static/config/location.js @@ -1,8 +1,8 @@ /* * @Author: hisense.wuhongjian * @Date: 2020-07-07 16:03:23 - * @LastEditors: hisense.liangjunhua - * @LastEditTime: 2022-06-23 14:17:52 + * @LastEditors: hisense.wuhongjian + * @LastEditTime: 2022-06-23 17:55:06 * @Description: 数据资源参数配置 */ const newLocation = 'qingdao' @@ -14,6 +14,8 @@ const whoShow = {} const launchedDataNumObject = {} // 导航数据 const navListManagement = {} +// 区市站点数据 +const mapTestNum = {} // 底部数据 const footerDataList = {} // qingdao @@ -51,6 +53,45 @@ if (newLocation === 'qingdao') { }, ], } + mapTestNum.lsNum = [ + { + name: '基础设施', + key: 'lsjcss', + num: 20135, + }, + { + name: '数据资源', + key: 'lsjcss', + num: 857, + }, + { + name: '应用资源', + key: 'lsjcss', + num: 28, + }, + ] + mapTestNum.xhaNum = [ + { + name: '基础设施', + key: 'xhajcss', + num: 35282, + }, + { + name: '数据资源', + key: 'xhajcss', + num: 11, + }, + { + name: '应用资源', + key: 'xhajcss', + num: 23, + }, + { + name: '组件服务', + key: 'xhazjfw', + num: 8, + }, + ] } // baotou else if (newLocation === 'baotou') { diff --git a/front/src/utils/request.js b/front/src/utils/request.js index 3a642879..0ab87260 100644 --- a/front/src/utils/request.js +++ b/front/src/utils/request.js @@ -90,6 +90,7 @@ instance.interceptors.response.use( 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) if (keys) { @@ -109,7 +110,9 @@ instance.interceptors.response.use( } } console.log('已清除') - router.push({ path: '/login' }) + setTimeout(() => { + location.reload() + }, 1000) } response['Access-Control-Expose-Headers'] = 'redirect' const { code, message } = response.data @@ -170,7 +173,9 @@ instance.interceptors.response.use( } } console.log('已清除') - router.push({ path: '/login' }) + setTimeout(() => { + location.reload() + }, 1000) } if (response.headers.redirect) { window.location.href = response.headers.redirect diff --git a/front/src/views/abilityStatistics/components/ResourceAggregation.vue b/front/src/views/abilityStatistics/components/ResourceAggregation.vue index 12e7f225..3fdf4885 100644 --- a/front/src/views/abilityStatistics/components/ResourceAggregation.vue +++ b/front/src/views/abilityStatistics/components/ResourceAggregation.vue @@ -89,7 +89,7 @@ dataList.value.dataList = res.data.data res.data.data.map((item, index) => { if (dataList.value.dataList[index].type === '数据资源') { - dataList.value.dataList[index].amount = dataSourceNum.value || 10433 + dataList.value.dataList[index].amount = dataSourceNum.value || 0 } dataList.value.dataList[index].organization = '个' dataList.value.dataList[index].photo = photo.value[index] diff --git a/front/src/views/home/DetailsPageconetent.vue b/front/src/views/home/DetailsPageconetent.vue index 1c2d79ec..7d58846a 100644 --- a/front/src/views/home/DetailsPageconetent.vue +++ b/front/src/views/home/DetailsPageconetent.vue @@ -544,7 +544,6 @@ - -->
diff --git a/front/src/views/home/mapTest/index.vue b/front/src/views/home/mapTest/index.vue index c1352872..73300ce4 100644 --- a/front/src/views/home/mapTest/index.vue +++ b/front/src/views/home/mapTest/index.vue @@ -2,7 +2,7 @@
-
+
西海岸 @@ -11,12 +11,12 @@
-
- 基础设施 +
+ {{ item.name }} - 35282 + {{ item.num }}
-
+
-
+
崂山区 @@ -43,7 +43,12 @@
-
+
+ {{ item.name }} + + {{ item.num }} +
+
@@ -73,6 +78,15 @@ const echarts = require('echarts') const xhaFlag = ref(false) const lsqFlag = ref(false) + const lsList = ref([]) + const xhaList = ref([]) + // eslint-disable-next-line no-undef + const mapTestNum1 = mapTestNum + if (mapTestNum1) { + lsList.value = mapTestNum1.lsNum + xhaList.value = mapTestNum1.xhaNum + } + console.log('===============>', mapTestNum1) const areaMenuList = ref([ // 全市概况 // { diff --git a/front/src/views/newHome/components/CapabilityConvergence.vue b/front/src/views/newHome/components/CapabilityConvergence.vue index 1b5ecd85..ff34baec 100644 --- a/front/src/views/newHome/components/CapabilityConvergence.vue +++ b/front/src/views/newHome/components/CapabilityConvergence.vue @@ -104,7 +104,7 @@ const whoShow1 = ref(whoShow) const getAppResources = (type, obj) => { paramsGetResources.type = type - if (type === '数据资源') { + if (type === '数据资源' && !whoShow1.value.itShowBaoTou) { getDataResource({ serviceName: paramsGetResources.name, //资源名称 orderField: whoShow1.value.itShowQingDao ? 'fbrq' : 'createTime', //排序字段 @@ -138,7 +138,7 @@ }) } else { pageWithAttrs(paramsGetResources).then((res) => { - console.log('知识库查询列表============>', res.data.data.records) + // console.log('知识库查询列表============>', res.data.data.records) obj.value = res.data.data.records }) }