@@ -29,7 +29,7 @@ export default { | |||
}, | |||
watch: { | |||
$route(to) { | |||
console.log(to); | |||
this.currentKey = to.name; | |||
} | |||
} | |||
} | |||
@@ -131,49 +131,63 @@ const router = new Router({ | |||
// 探索者总后台 | |||
{ | |||
path: '/system', | |||
name: 'system', | |||
component: () => import('@/views/manage_system/index'), | |||
}, | |||
{ | |||
path: '/system/template', | |||
name: 'system_template', | |||
component: () => import('@/views/manage_system/template'), | |||
}, | |||
{ | |||
path: '/system/runmanage', | |||
name: 'system_runmanage', | |||
component: () => import('@/views/manage_system/runmanage'), | |||
}, | |||
{ | |||
path: '/system/template/matrix', | |||
name: 'system_template_matrix', | |||
component: () => import('@/views/manage_system/template/matrix'), | |||
}, | |||
{ | |||
path: '/system/template/mind', | |||
name: 'system_template_mind', | |||
component: () => import('@/views/manage_system/template/mind'), | |||
}, | |||
{ | |||
path: '/system/template/tempfile', | |||
name: 'system_template_file', | |||
component: () => import('@/views/manage_system/template_file'), | |||
}, | |||
{ | |||
path: '/system/appcenter', | |||
name: 'system_appcenter', | |||
component: () => import('@/views/manage_system/appcenter'), | |||
}, | |||
{ | |||
path: '/system/appinfo', | |||
name: 'system_appinfo', | |||
component: () => import('@/views/manage_system/appinfo'), | |||
}, | |||
{ | |||
path: '/system/setting', | |||
name: 'system_setting', | |||
component: () => import('@/views/manage_system/setting'), | |||
}, | |||
// name: 'system', | |||
component: () => import('@/views/manage_system'), | |||
redirect: { name: 'system_customer' }, | |||
children: [{ | |||
path: 'customer', | |||
name: 'system_customer', | |||
component: () => import('@/views/manage_system/customer'), | |||
},{ | |||
path: 'template', | |||
name: 'system_template', | |||
component: () => import('@/views/manage_system/template'), | |||
}, | |||
{ | |||
path: 'runmanage', | |||
name: 'system_runmanage', | |||
component: () => import('@/views/manage_system/runmanage'), | |||
}, | |||
{ | |||
path: 'template/matrix', | |||
name: 'system_template_matrix', | |||
component: () => import('@/views/manage_system/template/matrix'), | |||
}, | |||
{ | |||
path: 'template/mind', | |||
name: 'system_template_mind', | |||
component: () => import('@/views/manage_system/template/mind'), | |||
}, | |||
{ | |||
path: 'template/tempfile', | |||
name: 'system_template_file', | |||
component: () => import('@/views/manage_system/template_file'), | |||
}, | |||
{ | |||
path: 'appcenter', | |||
name: 'system_appcenter', | |||
component: () => import('@/views/manage_system/appcenter'), | |||
}, | |||
{ | |||
path: 'appinfo', | |||
name: 'system_appinfo', | |||
component: () => import('@/views/manage_system/appinfo'), | |||
}, | |||
{ | |||
path: 'setting', | |||
name: 'system_setting', | |||
component: () => import('@/views/manage_system/setting'), | |||
},{ | |||
path: '*', | |||
redirect: { name: 'system_customer' }, | |||
}] | |||
}, | |||
// { | |||
// path: '/system/template', | |||
// name: 'system_template', | |||
// component: () => import('@/views/manage_system/template'), | |||
// }, | |||
// 页面未找到时提示(这个页面要放在最后) | |||
{ | |||
path: '*', | |||
@@ -2120,61 +2120,61 @@ export default { | |||
this.isPage_manage_company = true; | |||
break; | |||
//总后台---------------------------- | |||
case "system": | |||
case "system_template": | |||
this.isPage_manage_system = true; | |||
this.isPage_manage_systemHead_first = true; | |||
this.isPage_manage_systemHead_second = false; | |||
this.isPage_manage_systemHead_third = false; | |||
break; | |||
case "system_runmanage": | |||
this.isPage_manage_system = true; | |||
this.isPage_manage_systemHead_first = true; | |||
this.isPage_manage_systemHead_second = false; | |||
this.isPage_manage_systemHead_third = false; | |||
break; | |||
case "system_appinfo": | |||
this.isPage_manage_system = true; | |||
this.isPage_manage_systemHead_first = true; | |||
this.isPage_manage_systemHead_second = false; | |||
this.isPage_manage_systemHead_third = false; | |||
break; | |||
case "system_appcenter": | |||
this.isPage_manage_system = true; | |||
this.isPage_manage_systemHead_first = true; | |||
this.isPage_manage_systemHead_second = false; | |||
this.isPage_manage_systemHead_third = false; | |||
break; | |||
case "system_setting": | |||
this.isPage_manage_system = true; | |||
this.isPage_manage_systemHead_first = true; | |||
this.isPage_manage_systemHead_second = false; | |||
this.isPage_manage_systemHead_third = false; | |||
break; | |||
case "system_template_mind": | |||
this.isPage_manage_system = true; | |||
this.isPage_manage_systemHead_first = false; | |||
this.isPage_manage_systemHead_second = true; | |||
this.isPage_manage_systemHead_third = false; | |||
this.tempName = this.$route.params.name; | |||
this.tempData = this.$route.params.data; | |||
break; | |||
case "system_template_file": | |||
this.isPage_manage_system = true; | |||
this.isPage_manage_systemHead_first = true; | |||
this.isPage_manage_systemHead_second = false; | |||
this.isPage_manage_systemHead_third = false; | |||
this.tempName = this.$route.params.name; | |||
this.tempData = this.$route.params.data; | |||
break; | |||
case "system_template_matrix": | |||
this.isPage_manage_system = true; | |||
this.isPage_manage_systemHead_first = false; | |||
this.isPage_manage_systemHead_second = false; | |||
this.isPage_manage_systemHead_third = true; | |||
this.tempName = this.$route.params.name; | |||
this.tempData = this.$route.params.data; | |||
break; | |||
// case "system": | |||
// case "system_template": | |||
// this.isPage_manage_system = true; | |||
// this.isPage_manage_systemHead_first = true; | |||
// this.isPage_manage_systemHead_second = false; | |||
// this.isPage_manage_systemHead_third = false; | |||
// break; | |||
// case "system_runmanage": | |||
// this.isPage_manage_system = true; | |||
// this.isPage_manage_systemHead_first = true; | |||
// this.isPage_manage_systemHead_second = false; | |||
// this.isPage_manage_systemHead_third = false; | |||
// break; | |||
// case "system_appinfo": | |||
// this.isPage_manage_system = true; | |||
// this.isPage_manage_systemHead_first = true; | |||
// this.isPage_manage_systemHead_second = false; | |||
// this.isPage_manage_systemHead_third = false; | |||
// break; | |||
// case "system_appcenter": | |||
// this.isPage_manage_system = true; | |||
// this.isPage_manage_systemHead_first = true; | |||
// this.isPage_manage_systemHead_second = false; | |||
// this.isPage_manage_systemHead_third = false; | |||
// break; | |||
// case "system_setting": | |||
// this.isPage_manage_system = true; | |||
// this.isPage_manage_systemHead_first = true; | |||
// this.isPage_manage_systemHead_second = false; | |||
// this.isPage_manage_systemHead_third = false; | |||
// break; | |||
// case "system_template_mind": | |||
// this.isPage_manage_system = true; | |||
// this.isPage_manage_systemHead_first = false; | |||
// this.isPage_manage_systemHead_second = true; | |||
// this.isPage_manage_systemHead_third = false; | |||
// this.tempName = this.$route.params.name; | |||
// this.tempData = this.$route.params.data; | |||
// break; | |||
// case "system_template_file": | |||
// this.isPage_manage_system = true; | |||
// this.isPage_manage_systemHead_first = true; | |||
// this.isPage_manage_systemHead_second = false; | |||
// this.isPage_manage_systemHead_third = false; | |||
// this.tempName = this.$route.params.name; | |||
// this.tempData = this.$route.params.data; | |||
// break; | |||
// case "system_template_matrix": | |||
// this.isPage_manage_system = true; | |||
// this.isPage_manage_systemHead_first = false; | |||
// this.isPage_manage_systemHead_second = false; | |||
// this.isPage_manage_systemHead_third = true; | |||
// this.tempName = this.$route.params.name; | |||
// this.tempData = this.$route.params.data; | |||
// break; | |||
default: | |||
break; | |||
} | |||
@@ -0,0 +1,74 @@ | |||
<template> | |||
<div> | |||
<app-header | |||
theme="white" | |||
v-show="showHeader" | |||
> | |||
<template #left>LOCKING</template> | |||
<template #right> | |||
<span class="header-logout" @click="tryToLogout">退出登录</span> | |||
</template> | |||
<template #center> | |||
<app-nav :list="navList" /> | |||
</template> | |||
</app-header> | |||
<router-view /> | |||
</div> | |||
</template> | |||
<script> | |||
import AppHeader from "@/components/app-header"; | |||
import AppNav from "@/components/app-header/components/nav"; | |||
const navItem = (pathName, label) => ({ key: pathName, label }); | |||
const navList = [ | |||
navItem("system_customer", "客户列表"), | |||
navItem("system_template", "流程模板"), | |||
navItem("system_runmanage", "应用管理"), | |||
navItem("system_template_matrix", "运行管理"), | |||
navItem("system_setting", "总体权限"), | |||
]; | |||
const hash = navList.reduce((h, item) => (h[item.key] = true, h), {}); | |||
const isInNavRange = name => hash[name]; | |||
export default { | |||
components: { | |||
AppHeader, | |||
AppNav, | |||
}, | |||
data() { | |||
return { | |||
showHeader: isInNavRange(this.$route.name), | |||
navList, | |||
}; | |||
}, | |||
methods: { | |||
/** | |||
* 退出登录提示 | |||
*/ | |||
tryToLogout: function () { | |||
var thisApp = this; | |||
this.$confirm("退出当前账户,是否继续?", "", { | |||
confirmButtonText: "确定", | |||
cancelButtonText: "取消", | |||
showClose: false, | |||
type: "warning", | |||
}).then(() => { | |||
// this.logout(); | |||
this.$store.logout(); | |||
this.$router.push({ path: '/' }); | |||
}); | |||
}, | |||
}, | |||
watch: { | |||
$route(to) { | |||
this.showHeader = isInNavRange(to.name); | |||
} | |||
} | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.header-logout { | |||
cursor: pointer; | |||
} | |||
</style> |
@@ -8,6 +8,12 @@ | |||
--> | |||
<template> | |||
<div class="layout_content template_mind"> | |||
<app-header | |||
showBackBtn | |||
theme="white" | |||
:title="tempName" | |||
backBtnTitle="退出思维导图查看器" | |||
/> | |||
<section class="yiyun_section"> | |||
<div> | |||
<div class="mlr-10"> | |||
@@ -49,6 +55,7 @@ | |||
<script> | |||
// require("!vue-style-loader!css-loader!../../../public/static/css/jsmind.css"); | |||
import * as services from "@/services/template"; | |||
import AppHeader from '@/components/app-header'; | |||
import TemplateTree from './components/template-tree'; | |||
import {notify} from '@/utils/tool'; | |||
const jsMind = window.jsMind; | |||
@@ -61,6 +68,7 @@ | |||
export default { | |||
components: { | |||
TemplateTree, | |||
AppHeader, | |||
}, | |||
data() { | |||
return { | |||