Compare commits
2 Commits
0e6c8541b8
...
2f4933ad11
Author | SHA1 | Date |
---|---|---|
wuhongjian | 2f4933ad11 | |
wuhongjian | 44df056fb0 |
|
@ -2,7 +2,7 @@
|
||||||
* @Author: hisense.wuhongjian
|
* @Author: hisense.wuhongjian
|
||||||
* @Date: 2022-05-06 11:12:00
|
* @Date: 2022-05-06 11:12:00
|
||||||
* @LastEditors: hisense.wuhongjian
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-12-14 14:27:01
|
* @LastEditTime: 2022-12-29 17:12:43
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
@ -22,8 +22,9 @@
|
||||||
import { onBeforeUnmount, onMounted, watch, ref } from 'vue'
|
import { onBeforeUnmount, onMounted, watch, ref } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import mybus from '@/myplugins/mybus'
|
import mybus from '@/myplugins/mybus'
|
||||||
|
import { useStore } from 'vuex'
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const store = useStore()
|
||||||
const locale = zhCN
|
const locale = zhCN
|
||||||
const token = Cookies.get('ucsToken')
|
const token = Cookies.get('ucsToken')
|
||||||
const whoShow1 = ref(whoShow)
|
const whoShow1 = ref(whoShow)
|
||||||
|
@ -88,49 +89,50 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const waterMarkInit = (newValue) => {
|
const waterMarkInit = (newValue) => {
|
||||||
getUser().then((res) => {
|
// getUser().then((res) => {
|
||||||
if (res.data.code == 0) {
|
// if (res.data.code == 0) {
|
||||||
realName = res.data.data.realName
|
// realName = res.data.data.realName
|
||||||
}
|
// }
|
||||||
if (realName.length > 13) {
|
realName = store.getters['user/realName']
|
||||||
onWholeWaterMark(
|
if (realName.length > 13) {
|
||||||
[realName, moment().format('YYYY-MM-DD')],
|
onWholeWaterMark(
|
||||||
800,
|
[realName, moment().format('YYYY-MM-DD')],
|
||||||
200,
|
800,
|
||||||
24,
|
200,
|
||||||
40
|
24,
|
||||||
)
|
40
|
||||||
} else if (realName.length > 8) {
|
)
|
||||||
onWholeWaterMark(
|
} else if (realName.length > 8) {
|
||||||
[realName, moment().format('YYYY-MM-DD')],
|
onWholeWaterMark(
|
||||||
600,
|
[realName, moment().format('YYYY-MM-DD')],
|
||||||
200,
|
600,
|
||||||
24,
|
200,
|
||||||
40
|
24,
|
||||||
)
|
40
|
||||||
} else {
|
)
|
||||||
onWholeWaterMark(
|
} else {
|
||||||
[realName, moment().format('YYYY-MM-DD')],
|
onWholeWaterMark(
|
||||||
450,
|
[realName, moment().format('YYYY-MM-DD')],
|
||||||
200,
|
450,
|
||||||
24,
|
200,
|
||||||
40
|
24,
|
||||||
)
|
40
|
||||||
}
|
)
|
||||||
getCategoryTreePage({
|
}
|
||||||
page: 1,
|
getCategoryTreePage({
|
||||||
limit: 999,
|
page: 1,
|
||||||
dictTypeId: '1592357067014803457',
|
limit: 999,
|
||||||
}).then((res) => {
|
dictTypeId: '1592357067014803457',
|
||||||
arr.length = 0
|
}).then((res) => {
|
||||||
res.data.data.list.map((val) => {
|
arr.length = 0
|
||||||
arr.push(val.dictValue)
|
res.data.data.list.map((val) => {
|
||||||
})
|
arr.push(val.dictValue)
|
||||||
if (newValue) {
|
|
||||||
changeWaterMark(newValue)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
if (newValue) {
|
||||||
|
changeWaterMark(newValue)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
() => router.currentRoute.value.path,
|
() => router.currentRoute.value.path,
|
||||||
|
@ -142,16 +144,16 @@
|
||||||
realName,
|
realName,
|
||||||
realName.charCodeAt()
|
realName.charCodeAt()
|
||||||
)
|
)
|
||||||
// 如果刚登陆 初始化水印
|
// // 如果刚登陆 初始化水印
|
||||||
if (newValue == '/home') {
|
// if (newValue == '/home') {
|
||||||
waterMarkInit(newValue)
|
// waterMarkInit(newValue)
|
||||||
}
|
// }
|
||||||
changeWaterMark(newValue)
|
changeWaterMark(newValue)
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// waterMarkInit()
|
waterMarkInit()
|
||||||
})
|
})
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
// 4.卸载前, 关闭链接
|
// 4.卸载前, 关闭链接
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* @Author: hisense.wuhongjian
|
* @Author: hisense.wuhongjian
|
||||||
* @Date: 2022-03-29 17:48:03
|
* @Date: 2022-03-29 17:48:03
|
||||||
* @LastEditors: Light
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-10-25 09:37:05
|
* @LastEditTime: 2022-12-29 14:50:51
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
*/
|
*/
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
@ -62,3 +62,11 @@ export function register() {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取菜单
|
||||||
|
export function getNavList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/sys/menu/nav',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -2,12 +2,10 @@
|
||||||
* @Author: hisense.wuhongjian
|
* @Author: hisense.wuhongjian
|
||||||
* @Date: 2022-03-29 17:48:03
|
* @Date: 2022-03-29 17:48:03
|
||||||
* @LastEditors: hisense.wuhongjian
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-08-06 15:00:49
|
* @LastEditTime: 2022-12-29 10:30:38
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
*/
|
*/
|
||||||
import {
|
import { createApp } from 'vue'
|
||||||
createApp
|
|
||||||
} from 'vue'
|
|
||||||
import Antd from 'ant-design-vue'
|
import Antd from 'ant-design-vue'
|
||||||
import mitt from 'mitt'
|
import mitt from 'mitt'
|
||||||
import App from './App'
|
import App from './App'
|
||||||
|
@ -17,8 +15,8 @@ import store from './store'
|
||||||
import 'ant-design-vue/dist/antd.css'
|
import 'ant-design-vue/dist/antd.css'
|
||||||
import '@/vab'
|
import '@/vab'
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import * as moment from "moment"
|
import * as moment from 'moment'
|
||||||
import "dayjs/locale/zh-cn";
|
import 'dayjs/locale/zh-cn'
|
||||||
import vue3videoPlay from 'vue3-video-play-emiyagm' // 引入组件
|
import vue3videoPlay from 'vue3-video-play-emiyagm' // 引入组件
|
||||||
import 'vue3-video-play-emiyagm/dist/style.css' // 引入css
|
import 'vue3-video-play-emiyagm/dist/style.css' // 引入css
|
||||||
import ElementPlus from 'element-plus'
|
import ElementPlus from 'element-plus'
|
||||||
|
@ -27,38 +25,37 @@ import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
console.log(111, 'main')
|
console.log(111, 'main')
|
||||||
/**
|
/**
|
||||||
* @author chuzhixin 1204505056@qq.com
|
* @author chuzhixin 1204505056@qq.com
|
||||||
* @description 正式环境默认使用mock,正式项目记得注释后再打包
|
* @description 正式环境默认使用mock,正式项目记得注释后再打包
|
||||||
*/
|
*/
|
||||||
// if (process.env.NODE_ENV === 'production') {
|
// if (process.env.NODE_ENV === 'production') {
|
||||||
// const { mockXHR } = require('@/utils/static')
|
// const { mockXHR } = require('@/utils/static')
|
||||||
// mockXHR()
|
// mockXHR()
|
||||||
// }
|
// }
|
||||||
const emitter = mitt()
|
const emitter = mitt()
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
app.config.globalProperties.$emitter = emitter
|
app.config.globalProperties.$emitter = emitter
|
||||||
app
|
app
|
||||||
.use(store)
|
.use(store)
|
||||||
.use(ElementPlus)
|
.use(ElementPlus)
|
||||||
.use(router)
|
.use(router)
|
||||||
.use(echarts)
|
.use(echarts)
|
||||||
.use(vue3videoPlay)
|
.use(vue3videoPlay)
|
||||||
.use(moment)
|
.use(moment)
|
||||||
.use(Antd)
|
.use(Antd)
|
||||||
.use(ElementPlus)
|
.use(ElementPlus)
|
||||||
.mount('#app')
|
.mount('#app')
|
||||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||||
app.component(key, component)
|
app.component(key, component)
|
||||||
}
|
}
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
// console.log('跳转路由=========>', to, from, next)
|
// console.log('跳转路由=========>', to, from, next)
|
||||||
document.documentElement.scrollTop = 0
|
document.documentElement.scrollTop = 0
|
||||||
document.body.scrollTop = 0
|
document.body.scrollTop = 0
|
||||||
next()
|
next()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 判断浏览器
|
// 判断浏览器
|
||||||
// function judgeAgent() {
|
// function judgeAgent() {
|
||||||
// let userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
|
// let userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
|
||||||
|
|
|
@ -425,16 +425,16 @@ export const constantRoutes = [
|
||||||
icon: 'error-warning-line',
|
icon: 'error-warning-line',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// 资金报表
|
// 资金报表
|
||||||
{
|
{
|
||||||
path: '/assertReport',
|
path: '/assertReport',
|
||||||
name: 'assertReport',
|
name: 'assertReport',
|
||||||
component: () => import('@/views/assertReport'),
|
component: () => import('@/views/assertReport'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '能力云图',
|
title: '能力云图',
|
||||||
icon: 'error-warning-line',
|
icon: 'error-warning-line',
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
// 赋能案例详情
|
// 赋能案例详情
|
||||||
{
|
{
|
||||||
path: '/AssignCaseDetailPage',
|
path: '/AssignCaseDetailPage',
|
||||||
|
|
|
@ -21,6 +21,7 @@ const state = () => ({
|
||||||
avatar: '',
|
avatar: '',
|
||||||
role: 0, // 用户管理员权限
|
role: 0, // 用户管理员权限
|
||||||
roleList: [], // 用户管理员权限
|
roleList: [], // 用户管理员权限
|
||||||
|
navList: [],
|
||||||
})
|
})
|
||||||
const getters = {
|
const getters = {
|
||||||
accessToken: (state) => state.accessToken,
|
accessToken: (state) => state.accessToken,
|
||||||
|
@ -32,6 +33,7 @@ const getters = {
|
||||||
userId: (state) => state.userId,
|
userId: (state) => state.userId,
|
||||||
deptName: (state) => state.deptName,
|
deptName: (state) => state.deptName,
|
||||||
deptId: (state) => state.deptId,
|
deptId: (state) => state.deptId,
|
||||||
|
navList: (state) => state.navList,
|
||||||
}
|
}
|
||||||
const mutations = {
|
const mutations = {
|
||||||
/**
|
/**
|
||||||
|
@ -77,6 +79,11 @@ const mutations = {
|
||||||
setDeptName(state, name) {
|
setDeptName(state, name) {
|
||||||
state.deptName = name
|
state.deptName = name
|
||||||
},
|
},
|
||||||
|
// 设置门户导航
|
||||||
|
setNavList(state, nav) {
|
||||||
|
debugger
|
||||||
|
state.navList = nav
|
||||||
|
},
|
||||||
setDeptId(state, name) {
|
setDeptId(state, name) {
|
||||||
state.deptId = name
|
state.deptId = name
|
||||||
},
|
},
|
||||||
|
|
|
@ -61,6 +61,7 @@ const instance = axios.create({
|
||||||
timeout: requestTimeout,
|
timeout: requestTimeout,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': contentType,
|
'Content-Type': contentType,
|
||||||
|
'Accept-Language': 'zh-CN',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -92,9 +92,12 @@
|
||||||
<div class="bottom" @click="goToView()">查看更多</div>
|
<div class="bottom" @click="goToView()">查看更多</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<i class="img" @click="
|
<i
|
||||||
jumpPage({ name: '个人中心', key: 'personalCenter' }, 'headerClick')
|
class="img"
|
||||||
"></i>
|
@click="
|
||||||
|
jumpPage({ name: '个人中心', key: 'personalCenter' }, 'headerClick')
|
||||||
|
"
|
||||||
|
></i>
|
||||||
<a-tooltip placement="bottom">
|
<a-tooltip placement="bottom">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>{{ user.realName }}</span>
|
<span>{{ user.realName }}</span>
|
||||||
|
@ -131,6 +134,7 @@
|
||||||
import { mynotice } from '@/api/home'
|
import { mynotice } from '@/api/home'
|
||||||
import { useStore } from 'vuex'
|
import { useStore } from 'vuex'
|
||||||
import { getSgcTotal } from '@/api/home'
|
import { getSgcTotal } from '@/api/home'
|
||||||
|
|
||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
import mybus from '@/myplugins/mybus'
|
import mybus from '@/myplugins/mybus'
|
||||||
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
|
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
|
||||||
|
@ -149,7 +153,13 @@
|
||||||
const select = ref(router.currentRoute.value.name)
|
const select = ref(router.currentRoute.value.name)
|
||||||
const mynoticeFlag = ref(false)
|
const mynoticeFlag = ref(false)
|
||||||
const mynoticeData = ref([])
|
const mynoticeData = ref([])
|
||||||
const navList = ref(navListManagement.navList)
|
const navList = ref([])
|
||||||
|
const asyncNav = store.getters['user/navList']
|
||||||
|
if (asyncNav.length > 0) {
|
||||||
|
navList.value = asyncNav
|
||||||
|
} else {
|
||||||
|
navList.value = navListManagement.navList
|
||||||
|
}
|
||||||
const targetRouter = ref('')
|
const targetRouter = ref('')
|
||||||
const backFlag = ref(false)
|
const backFlag = ref(false)
|
||||||
getUserInfo().then((res) => {
|
getUserInfo().then((res) => {
|
||||||
|
@ -165,6 +175,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('navList------------>', navList)
|
console.log('navList------------>', navList)
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -422,7 +433,6 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
mybus.on('changeMenuStyle', (data) => {
|
mybus.on('changeMenuStyle', (data) => {
|
||||||
|
|
||||||
targetRouter.value = data
|
targetRouter.value = data
|
||||||
if (data.path == '/algorithmCompare') {
|
if (data.path == '/algorithmCompare') {
|
||||||
jumpPage(
|
jumpPage(
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: hisense.wuhongjian
|
* @Author: hisense.wuhongjian
|
||||||
* @Date: 2022-03-29 17:53:28
|
* @Date: 2022-03-29 17:53:28
|
||||||
* @LastEditors: hisense.wuhongjian
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-03-30 16:35:27
|
* @LastEditTime: 2022-12-29 15:12:28
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -53,7 +53,9 @@
|
||||||
import { Encrypt } from '@/utils/crypto'
|
import { Encrypt } from '@/utils/crypto'
|
||||||
import { UserOutlined, LockOutlined } from '@ant-design/icons-vue'
|
import { UserOutlined, LockOutlined } from '@ant-design/icons-vue'
|
||||||
import { message, Modal } from 'ant-design-vue'
|
import { message, Modal } from 'ant-design-vue'
|
||||||
|
import { getNavList } from '@/api/user'
|
||||||
|
import { useStore } from 'vuex'
|
||||||
|
// const store = useStore()
|
||||||
// 是否是西海岸
|
// 是否是西海岸
|
||||||
const isXiHaiAn = whoShow.itShowXiHaiAn
|
const isXiHaiAn = whoShow.itShowXiHaiAn
|
||||||
|
|
||||||
|
@ -74,6 +76,7 @@
|
||||||
devDependencies: devDependencies,
|
devDependencies: devDependencies,
|
||||||
is360: false,
|
is360: false,
|
||||||
isIE: false,
|
isIE: false,
|
||||||
|
store: useStore(),
|
||||||
canOpen: ['FF', 'Chrome'],
|
canOpen: ['FF', 'Chrome'],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -94,7 +97,6 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
this.form.username = ''
|
this.form.username = ''
|
||||||
this.form.password = ''
|
this.form.password = ''
|
||||||
|
|
||||||
if (!this.canOpen.includes(this.judgeAgent())) {
|
if (!this.canOpen.includes(this.judgeAgent())) {
|
||||||
Modal.warning({
|
Modal.warning({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
@ -106,6 +108,24 @@
|
||||||
...mapActions({
|
...mapActions({
|
||||||
login: 'user/login',
|
login: 'user/login',
|
||||||
}),
|
}),
|
||||||
|
getNavList() {
|
||||||
|
let navList = []
|
||||||
|
getNavList({
|
||||||
|
_t: new Date().getTime(),
|
||||||
|
}).then((res) => {
|
||||||
|
const nav = res.data.data.filter((item) => item.site === 1)
|
||||||
|
if (nav.length > 0) {
|
||||||
|
navList = nav.map((item) => {
|
||||||
|
item.key = item.url
|
||||||
|
item.innerKey = item.permissions
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log('后台获取到的站点', navList)
|
||||||
|
debugger
|
||||||
|
this.store.commit('user/setNavList', navList)
|
||||||
|
})
|
||||||
|
},
|
||||||
// 判断浏览器
|
// 判断浏览器
|
||||||
judgeAgent() {
|
judgeAgent() {
|
||||||
let userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
|
let userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
|
||||||
|
@ -159,6 +179,7 @@
|
||||||
})
|
})
|
||||||
// window.localStorage.setItem('tokenStartTime', new Date().getTime())
|
// window.localStorage.setItem('tokenStartTime', new Date().getTime())
|
||||||
window.sessionStorage.setItem('visits', JSON.stringify([]))
|
window.sessionStorage.setItem('visits', JSON.stringify([]))
|
||||||
|
this.getNavList()
|
||||||
// console.log(this.handleRoute())
|
// console.log(this.handleRoute())
|
||||||
// 西海岸特殊处理
|
// 西海岸特殊处理
|
||||||
if (isXiHaiAn) {
|
if (isXiHaiAn) {
|
||||||
|
|
Loading…
Reference in New Issue