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/public/index.html b/front/public/index.html index 21f8b3f2..12346e19 100644 --- a/front/public/index.html +++ b/front/public/index.html @@ -1,8 +1,8 @@ @@ -46,7 +46,7 @@ // window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/'; // window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin'; // 开发 - window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797'; + 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'; diff --git a/front/src/utils/request.js b/front/src/utils/request.js index 0f02346e..b51e88b3 100644 --- a/front/src/utils/request.js +++ b/front/src/utils/request.js @@ -74,8 +74,7 @@ instance.interceptors.request.use( (config) => { debugger const token = getAccessToken() - if (token) - config.headers[tokenName] = token + if (token) config.headers[tokenName] = token if ( config.data && config.headers['Content-Type'] === @@ -105,7 +104,7 @@ instance.interceptors.response.use( response['Access-Control-Expose-Headers'] = 'redirect' const { code, message } = response.data debugger - if (code=='0' && response.headers.token) { + if (code == '0' && response.headers.token) { setAccessToken(response.headers.token) } else { const token = getAccessToken() diff --git a/front/src/vab/plugins/permissions.js b/front/src/vab/plugins/permissions.js index 6139bd4b..f52e9f30 100644 --- a/front/src/vab/plugins/permissions.js +++ b/front/src/vab/plugins/permissions.js @@ -2,65 +2,65 @@ * @Author: hisense.wuhongjian * @Date: 2022-04-01 17:23:11 * @LastEditors: hisense.wuhongjian - * @LastEditTime: 2022-07-11 16:39:36 + * @LastEditTime: 2022-07-16 10:57:59 * @Description: 告诉大家这是什么 */ /** * @author chuzhixin 1204505056@qq.com * @description 路由守卫,目前两种模式:all模式与intelligence模式 */ - import router from '@/router' - import store from '@/store' - import getPageTitle from '@/utils/pageTitle' - import { getUserInfo } from '@/api/user' - import { - // authentication, - loginInterception, - // recordRoute, - routesWhiteList, - } from '@/config' - import { setAccessToken, getAccessToken } from '@/utils/accessToken' - router.beforeEach(async (to, from, next) => { - // debugger - // const SSOTOKEN = to.query.SSOToken - // if (SSOTOKEN) { - // setAccessToken(SSOTOKEN) - // } - const token = getAccessToken() - console.log('token', token) - let hasToken = token || store.getters['user/accessToken'] - // debugger - if (!loginInterception) hasToken = true - console.log('hasToken存在巨大问题', hasToken) - if (hasToken) { +import router from '@/router' +import store from '@/store' +import getPageTitle from '@/utils/pageTitle' +import { getUserInfo } from '@/api/user' +import { + // authentication, + loginInterception, + // recordRoute, + routesWhiteList, +} from '@/config' +import { setAccessToken, getAccessToken } from '@/utils/accessToken' +router.beforeEach(async (to, from, next) => { + // debugger + // const SSOTOKEN = to.query.SSOToken + // if (SSOTOKEN) { + // setAccessToken(SSOTOKEN) + // } + const token = getAccessToken() + console.log('token', token) + let hasToken = token || store.getters['user/accessToken'] + // debugger + if (!loginInterception) hasToken = true + console.log('hasToken存在巨大问题', hasToken) + if (hasToken) { // setAccessToken(hasToken) - await store.dispatch('user/getUserInfo') - debugger - next() - } else { - let accessRoutes = [] - accessRoutes = await store.dispatch('routes/setRoutes') - accessRoutes.forEach((item) => { - router.addRoute(item) - }) - if (routesWhiteList.indexOf(to.path) !== -1) { - next() - } else { + await store.dispatch('user/getUserInfo') + debugger + next() + } else { + let accessRoutes = [] + accessRoutes = await store.dispatch('routes/setRoutes') + accessRoutes.forEach((item) => { + router.addRoute(item) + }) + if (routesWhiteList.indexOf(to.path) !== -1) { + next() + } else { // 这里是一个单点登录的入口 - getUserInfo().then(res=>{ + 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 }) + // 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') - } - } - }) - router.afterEach((to) => { - document.title = getPageTitle(to.meta.title) - }) + // window.open('http://www.baidu.com', '_self') + } + } +}) +router.afterEach((to) => { + document.title = getPageTitle(to.meta.title) +}) 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" >