Compare commits

..

No commits in common. "2f4933ad11dee7143097b9e7ecf659278e43acc3" and "0e6c8541b83365096d4e0995c29dace03ddf056c" have entirely different histories.

9 changed files with 97 additions and 143 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-05-06 11:12:00
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-12-29 17:12:43
* @LastEditTime: 2022-12-14 14:27:01
* @Description: 告诉大家这是什么
-->
<template>
@ -22,9 +22,8 @@
import { onBeforeUnmount, onMounted, watch, ref } from 'vue'
import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus'
import { useStore } from 'vuex'
const router = useRouter()
const store = useStore()
const locale = zhCN
const token = Cookies.get('ucsToken')
const whoShow1 = ref(whoShow)
@ -89,50 +88,49 @@
}
}
const waterMarkInit = (newValue) => {
// getUser().then((res) => {
// if (res.data.code == 0) {
// realName = res.data.data.realName
// }
realName = store.getters['user/realName']
if (realName.length > 13) {
onWholeWaterMark(
[realName, moment().format('YYYY-MM-DD')],
800,
200,
24,
40
)
} else if (realName.length > 8) {
onWholeWaterMark(
[realName, moment().format('YYYY-MM-DD')],
600,
200,
24,
40
)
} else {
onWholeWaterMark(
[realName, moment().format('YYYY-MM-DD')],
450,
200,
24,
40
)
}
getCategoryTreePage({
page: 1,
limit: 999,
dictTypeId: '1592357067014803457',
}).then((res) => {
arr.length = 0
res.data.data.list.map((val) => {
arr.push(val.dictValue)
})
if (newValue) {
changeWaterMark(newValue)
getUser().then((res) => {
if (res.data.code == 0) {
realName = res.data.data.realName
}
if (realName.length > 13) {
onWholeWaterMark(
[realName, moment().format('YYYY-MM-DD')],
800,
200,
24,
40
)
} else if (realName.length > 8) {
onWholeWaterMark(
[realName, moment().format('YYYY-MM-DD')],
600,
200,
24,
40
)
} else {
onWholeWaterMark(
[realName, moment().format('YYYY-MM-DD')],
450,
200,
24,
40
)
}
getCategoryTreePage({
page: 1,
limit: 999,
dictTypeId: '1592357067014803457',
}).then((res) => {
arr.length = 0
res.data.data.list.map((val) => {
arr.push(val.dictValue)
})
if (newValue) {
changeWaterMark(newValue)
}
})
})
// })
}
watch(
() => router.currentRoute.value.path,
@ -144,16 +142,16 @@
realName,
realName.charCodeAt()
)
// //
// if (newValue == '/home') {
// waterMarkInit(newValue)
// }
//
if (newValue == '/home') {
waterMarkInit(newValue)
}
changeWaterMark(newValue)
},
{ immediate: true }
)
onMounted(() => {
waterMarkInit()
// waterMarkInit()
})
onBeforeUnmount(() => {
// 4.,

View File

@ -1,8 +1,8 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-03-29 17:48:03
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-12-29 14:50:51
* @LastEditors: Light
* @LastEditTime: 2022-10-25 09:37:05
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
@ -62,11 +62,3 @@ export function register() {
method: 'post',
})
}
//
export function getNavList(params) {
return request({
url: '/sys/menu/nav',
method: 'get',
params,
})
}

View File

@ -2,10 +2,12 @@
* @Author: hisense.wuhongjian
* @Date: 2022-03-29 17:48:03
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-12-29 10:30:38
* @LastEditTime: 2022-08-06 15:00:49
* @Description: 告诉大家这是什么
*/
import { createApp } from 'vue'
import {
createApp
} from 'vue'
import Antd from 'ant-design-vue'
import mitt from 'mitt'
import App from './App'
@ -15,8 +17,8 @@ import store from './store'
import 'ant-design-vue/dist/antd.css'
import '@/vab'
import * as echarts from 'echarts'
import * as moment from 'moment'
import 'dayjs/locale/zh-cn'
import * as moment from "moment"
import "dayjs/locale/zh-cn";
import vue3videoPlay from 'vue3-video-play-emiyagm' //
import 'vue3-video-play-emiyagm/dist/style.css' // css
import ElementPlus from 'element-plus'
@ -25,37 +27,38 @@ import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { ElMessage, ElMessageBox } from 'element-plus'
console.log(111, 'main')
/**
* @author chuzhixin 1204505056@qq.com
* @description 正式环境默认使用mock正式项目记得注释后再打包
*/
// if (process.env.NODE_ENV === 'production') {
// const { mockXHR } = require('@/utils/static')
// mockXHR()
// }
/**
* @author chuzhixin 1204505056@qq.com
* @description 正式环境默认使用mock正式项目记得注释后再打包
*/
// if (process.env.NODE_ENV === 'production') {
// const { mockXHR } = require('@/utils/static')
// mockXHR()
// }
const emitter = mitt()
const app = createApp(App)
app.config.globalProperties.$emitter = emitter
app
.use(store)
.use(ElementPlus)
.use(router)
.use(echarts)
.use(vue3videoPlay)
.use(moment)
.use(Antd)
.use(ElementPlus)
.mount('#app')
.use(store)
.use(ElementPlus)
.use(router)
.use(echarts)
.use(vue3videoPlay)
.use(moment)
.use(Antd)
.use(ElementPlus)
.mount('#app')
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component)
app.component(key, component)
}
router.beforeEach((to, from, next) => {
// console.log('=========>', to, from, next)
document.documentElement.scrollTop = 0
document.body.scrollTop = 0
next()
// console.log('=========>', to, from, next)
document.documentElement.scrollTop = 0
document.body.scrollTop = 0
next()
})
//
// function judgeAgent() {
// let userAgent = navigator.userAgent // userAgent

View File

@ -425,16 +425,16 @@ export const constantRoutes = [
icon: 'error-warning-line',
},
},
//
{
path: '/assertReport',
name: 'assertReport',
component: () => import('@/views/assertReport'),
meta: {
title: '能力云图',
icon: 'error-warning-line',
//
{
path: '/assertReport',
name: 'assertReport',
component: () => import('@/views/assertReport'),
meta: {
title: '能力云图',
icon: 'error-warning-line',
},
},
},
//
{
path: '/AssignCaseDetailPage',

View File

@ -21,7 +21,6 @@ const state = () => ({
avatar: '',
role: 0, //
roleList: [], //
navList: [],
})
const getters = {
accessToken: (state) => state.accessToken,
@ -33,7 +32,6 @@ const getters = {
userId: (state) => state.userId,
deptName: (state) => state.deptName,
deptId: (state) => state.deptId,
navList: (state) => state.navList,
}
const mutations = {
/**
@ -79,11 +77,6 @@ const mutations = {
setDeptName(state, name) {
state.deptName = name
},
//
setNavList(state, nav) {
debugger
state.navList = nav
},
setDeptId(state, name) {
state.deptId = name
},

View File

@ -61,7 +61,6 @@ const instance = axios.create({
timeout: requestTimeout,
headers: {
'Content-Type': contentType,
'Accept-Language': 'zh-CN',
},
})

View File

@ -92,12 +92,9 @@
<div class="bottom" @click="goToView()">查看更多</div>
</div>
<div class="info">
<i
class="img"
@click="
jumpPage({ name: '个人中心', key: 'personalCenter' }, 'headerClick')
"
></i>
<i class="img" @click="
jumpPage({ name: '个人中心', key: 'personalCenter' }, 'headerClick')
"></i>
<a-tooltip placement="bottom">
<template #title>
<span>{{ user.realName }}</span>
@ -134,7 +131,6 @@
import { mynotice } from '@/api/home'
import { useStore } from 'vuex'
import { getSgcTotal } from '@/api/home'
import Cookies from 'js-cookie'
import mybus from '@/myplugins/mybus'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
@ -153,13 +149,7 @@
const select = ref(router.currentRoute.value.name)
const mynoticeFlag = ref(false)
const mynoticeData = ref([])
const navList = ref([])
const asyncNav = store.getters['user/navList']
if (asyncNav.length > 0) {
navList.value = asyncNav
} else {
navList.value = navListManagement.navList
}
const navList = ref(navListManagement.navList)
const targetRouter = ref('')
const backFlag = ref(false)
getUserInfo().then((res) => {
@ -175,7 +165,6 @@
})
}
})
console.log('navList------------>', navList)
const props = defineProps({
@ -433,6 +422,7 @@
})
mybus.on('changeMenuStyle', (data) => {
targetRouter.value = data
if (data.path == '/algorithmCompare') {
jumpPage(

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-03-29 17:53:28
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-12-29 15:12:28
* @LastEditTime: 2022-03-30 16:35:27
* @Description: 告诉大家这是什么
-->
<template>

View File

@ -53,9 +53,7 @@
import { Encrypt } from '@/utils/crypto'
import { UserOutlined, LockOutlined } from '@ant-design/icons-vue'
import { message, Modal } from 'ant-design-vue'
import { getNavList } from '@/api/user'
import { useStore } from 'vuex'
// const store = useStore()
// 西
const isXiHaiAn = whoShow.itShowXiHaiAn
@ -76,7 +74,6 @@
devDependencies: devDependencies,
is360: false,
isIE: false,
store: useStore(),
canOpen: ['FF', 'Chrome'],
}
},
@ -97,6 +94,7 @@
mounted() {
this.form.username = ''
this.form.password = ''
if (!this.canOpen.includes(this.judgeAgent())) {
Modal.warning({
title: '提示',
@ -108,24 +106,6 @@
...mapActions({
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() {
let userAgent = navigator.userAgent // userAgent
@ -179,7 +159,6 @@
})
// window.localStorage.setItem('tokenStartTime', new Date().getTime())
window.sessionStorage.setItem('visits', JSON.stringify([]))
this.getNavList()
// console.log(this.handleRoute())
// 西
if (isXiHaiAn) {