Commit 2d954743 by 周海峰

Merge branch 'master' of https://code.palacesun.com/wuchao/nse-ui

parents a2703847 cd775344
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1756343965592" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5343" width="128" height="128" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M877.704132 576.451765v315.331764a41.592471 41.592471 0 0 1-11.745883 29.816471 39.664941 39.664941 0 0 1-28.611764 12.047059h-243.651765v-252.084706h-163.538824V933.647059H186.805308a39.152941 39.152941 0 0 1-28.611764-12.047059 41.592471 41.592471 0 0 1-11.745883-29.816471V571.934118L512.075896 261.421176l365.628236 311.416471v3.614118z" fill="#303133" p-id="5344" data-spm-anchor-id="a313x.search_index.0.i1.3ddb3a81lBOGG3" class=""></path><path d="M1019.558249 530.974118l-39.454117 48.489411a24.847059 24.847059 0 0 1-13.552941 7.228236h-1.807059a22.196706 22.196706 0 0 1-13.552941-4.517647L512.075896 202.691765 72.659426 582.174118a23.853176 23.853176 0 0 1-15.058824 4.517647 24.847059 24.847059 0 0 1-13.552941-7.228236L4.593544 530.974118a23.009882 23.009882 0 0 1-4.517648-15.661177 18.281412 18.281412 0 0 1 7.228236-14.155294L463.586485 106.917647a79.239529 79.239529 0 0 1 96.978823 0L715.972367 240.941176V113.543529a19.124706 19.124706 0 0 1 19.877647-20.48h121.976471a18.070588 18.070588 0 0 1 14.45647 5.722353 20.751059 20.751059 0 0 1 5.421177 14.757647v268.649412l139.143529 119.868235a21.594353 21.594353 0 0 1 7.228235 14.155295 22.046118 22.046118 0 0 1-4.517647 14.757647z" fill="#303133" p-id="5345" data-spm-anchor-id="a313x.search_index.0.i0.3ddb3a81lBOGG3" class="selected"></path></svg>
\ No newline at end of file
...@@ -8,6 +8,7 @@ import { isRelogin } from '@/utils/request' ...@@ -8,6 +8,7 @@ import { isRelogin } from '@/utils/request'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import useSettingsStore from '@/store/modules/settings' import useSettingsStore from '@/store/modules/settings'
import usePermissionStore from '@/store/modules/permission' import usePermissionStore from '@/store/modules/permission'
import useAppStore from '@/store/modules/app'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
...@@ -20,6 +21,8 @@ const isWhiteList = (path) => { ...@@ -20,6 +21,8 @@ const isWhiteList = (path) => {
let isGeneratingRoutes = false let isGeneratingRoutes = false
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
changeMenu(to)
NProgress.start() NProgress.start()
if (getToken()) { if (getToken()) {
to.meta.title && useSettingsStore().setTitle(to.meta.title) to.meta.title && useSettingsStore().setTitle(to.meta.title)
...@@ -76,6 +79,23 @@ router.beforeEach((to, from, next) => { ...@@ -76,6 +79,23 @@ router.beforeEach((to, from, next) => {
} }
}) })
// 监听路由变化更换菜单
const changeMenu = (to) => {
const { path } = to;
const navList = JSON.parse(sessionStorage.getItem('navList')) || [];
if (navList.length === 0) return;
const menuObj = navList.find((item) => {
const itemPath = item.submenu.length > 0 ? `/${path.split('/').filter(Boolean)[0]}` : path;
return itemPath === item.url;
});
if (!menuObj || menuObj.type === '1') {
useAppStore().setNavStatus({ type: 'manage' });
} else if (menuObj.type === '2') {
useAppStore().setNavStatus({ type: 'project' });
}
}
router.afterEach(() => { router.afterEach(() => {
NProgress.done() NProgress.done()
}) })
...@@ -66,7 +66,7 @@ export const constantRoutes = [ ...@@ -66,7 +66,7 @@ export const constantRoutes = [
path: '/index', path: '/index',
component: () => import('@/views/index'), component: () => import('@/views/index'),
name: 'Index', name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true } meta: { title: '首页', icon: 'home', affix: true }
} }
] ]
}, },
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<el-table-column prop="comment" label="注释" min-width="150" show-overflow-tooltip /> <el-table-column prop="comment" label="注释" min-width="150" show-overflow-tooltip />
<el-table-column prop="dataareaname" label="数据域" min-width="120" /> <el-table-column prop="dataareaname" label="数据域" min-width="120" />
<el-table-column prop="rulename" label="脱敏算法" min-width="150" /> <el-table-column prop="rulename" label="脱敏算法" min-width="150" />
<el-table-column label="操作" width="120" align="center" fixed="right"> <el-table-column label="操作" width="120" align="center" fixed="right" v-if="dialogType !== 'detail'" >
<template #default="{ row }"> <template #default="{ row }">
<el-button link type="primary" size="small" @click="editField(row)"> <el-button link type="primary" size="small" @click="editField(row)">
设置 设置
...@@ -407,7 +407,7 @@ watch([currentNodeLevel, currentNodeData], async ([level, node]) => { ...@@ -407,7 +407,7 @@ watch([currentNodeLevel, currentNodeData], async ([level, node]) => {
} }
} }
console.log(123123) console.log(123123)
if(dialogType.value === 'edit'){ if(dialogType.value === 'edit' || dialogType.value === 'detail'){
console.log('infoTable.value',infoTable.value) console.log('infoTable.value',infoTable.value)
infoTable.value.forEach(item => { infoTable.value.forEach(item => {
...@@ -760,6 +760,10 @@ const handleNextStep = async () => { ...@@ -760,6 +760,10 @@ const handleNextStep = async () => {
const saveLoading = ref(false) const saveLoading = ref(false)
// 保存策略 // 保存策略
const saveStrategy = async () => { const saveStrategy = async () => {
if(dialogType.value !== 'detail') {
saveLoading.value = true saveLoading.value = true
try { try {
// 动态生成 mapStr 并构建完整对象 // 动态生成 mapStr 并构建完整对象
...@@ -793,6 +797,13 @@ const saveStrategy = async () => { ...@@ -793,6 +797,13 @@ const saveStrategy = async () => {
saveLoading.value = false saveLoading.value = false
ElMessage.error('保存失败'); ElMessage.error('保存失败');
} }
}else{
resetForm();
dialogVisible.value = false;
// emit('refresh');
}
} }
......
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="项目类型" prop="projectType"> <!-- <el-form-item label="项目类型" prop="projectType">
<el-radio-group v-model="formData.projectType"> <el-radio-group v-model="formData.projectType">
<el-radio label="normal">普通项目</el-radio> <el-radio label="normal">普通项目</el-radio>
<el-radio label="udf">UDF项目</el-radio> <el-radio label="udf">UDF项目</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
</div> </div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论