| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- <html>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
- <meta name="renderer" content="webkit" />
- <link rel="icon" type="image/png" sizes="16x16" href="@service{name: 'sys.getSysIcon'}@">
- <link rel="stylesheet" type="text/css" href="/css/general.css" />
- <title>工作台 - ${curWebSiteObj.seoTitle}</title>
- <script src="/js/space.console.js" type="text/javascript" charset="utf-8"></script>
- </head>
- <body>
- <div id="space-content" style="background-color: transparent">
- <div id="container">
- <el-container id="el-main" class="space-container" v-cloak>
- <!--头部-->
- <el-header class="header">
- <!--左边Logo-->
- <div class="header-logo">
- <img src="@service{name: 'sys.getUnitLogo'}@" />
- </div>
- <!--中间图标-->
- <div class="header-middle">
- <a href="javascript:;" title="个人首页" class="header-icon-home" @click="myInfo">
- <i class="spaceicon icon-home3"></i>
- </a>
- <div class="divider"></div>
- <a href="javascript:;" title="常用菜单">
- <i class="spaceicon icon-menu2"></i>
- </a>
- </div>
- <!--右边信息-->
- <div class="header-right">
- <!--个人信息-->
- <el-popover placement="bottom" width="270" trigger="hover" popper-class="hearder-settings-popper" :visible-arrow="false">
- <div class="header-settings-list">
- <el-row>
- <el-col :span="8">
- <div class="header-settings-grid" onclick='@service{ name:`personnel.person_info`, page:`personnel.person.person_info`, params:`{personid: "${appUser.userId}"}`, show:`true` }@'>
- <i title="个人信息" class="el-icon-user"></i>
- <p>个人信息</p>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="header-settings-grid" onclick='@service{ page:"user_tool.update_icon", show:"true" }@'>
- <i title="更换头像" class="el-icon-picture-outline-round"></i>
- <p>更换头像</p>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="header-settings-grid" onclick='@service{ page:"user_tool.update_password", show:"true" }@'>
- <i title="修改密码" class="el-icon-lock"></i>
- <p>修改密码</p>
- </div>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <div class="header-settings-grid" onclick='@service{ name: "wechat_binding_qrcode", page:"wechat.binding_wechat_ercode", show:"true" }@'>
- <i title="绑定微信" class="spaceicon icon-wechat1"></i>
- <p>绑定微信</p>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="header-settings-grid" onclick='@service{ name: "personnel.personCustomPhrase_list", page:"personnel.custom_phrase.custom_phrase_list", show:"true" }@'>
- <i title="常用语" class="spaceicon icon-commonLanguage"></i>
- <p>常用语</p>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="header-settings-grid">
- <i title="系统设置" class="spaceicon icon-setting"></i>
- <p>系统设置</p>
- </div>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <div class="header-settings-grid" onclick='@service{ name:`personnel.person_login_log_list`, page:`personnel.person.person_login_log_list`, params:`{personid: "${appUser.userId}"}`, show: `true` }@'>
- <i title="登录日志" class="el-icon-date"></i>
- <p>登录日志</p>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="header-settings-grid" onclick='@service{ page:"user_tool.flush_cache", show:"true" }@'>
- <i title="清空缓存" class="el-icon-magic-stick"></i>
- <p>清空缓存</p>
- </div>
- </el-col>
- <el-col :span="8">
- <a href="/main/dist/ApiHelp/html/index/index.php" target="_blank" rel="noreferrer">
- <div class="header-settings-grid">
- <i title="系统帮助" class="el-icon-reading"></i>
- <p>系统帮助</p>
- </div>
- </a>
- </el-col>
- </el-row>
- </div>
- <div class="header-settings-bottom" onclick="location.href='/apps/loginout/'">
- <el-row>
- <el-col :span="24">
- 退出管理控制台
- </el-col>
- </el-row>
- </div>
- <div class="header-user" slot="reference">
- <el-avatar :size="36" class="header-user-icon" src="${appUser.iconPath}">
- ${appUser.name}
- </el-avatar>
- <span class="header-user-email">
- ${appUser.name}
- </span>
- <i class="el-icon-caret-bottom"></i>
- </div>
- </el-popover>
- </div>
- </el-header>
- <!--主体-->
- <el-container class="content">
- <!--左侧导航-->
- <el-aside class="content-left" :width="contentLeftW">
- <!--一级导航-->
- <el-menu default-active="" class="el-menu-level1" @select="level1Select" background-color="#3a3f52" text-color="#fff"
- active-text-color="#409EFF" :collapse="true">
- <el-menu-item :index="index" v-for="(item,index) in moudulesData" :key="item.index" :title="item.name">
- <i :class="item.icon"></i>
- <!-- <span slot="title">{{item.name}}</span> -->
- <i class="menu-collapse-left el-icon-caret-left" v-if="showLevel2[index]" @click.stop="level2Collapse(index)"></i>
- <i class="menu-collapse-left menu-collapse-left-small el-icon-caret-left" v-if="showLevel2[index]" @click.stop="level2Collapse(index)"></i>
- </el-menu-item>
- </el-menu>
- <!--二级导航-->
- <!--对应一级栏目的每一个-->
- <el-menu default-active="-1" class="el-menu-level2" @select="level2Select" @open="" @close="" v-show="showLevel2[index]"
- v-for="(item,index) in moudulesData" :key="index" background-color="#3a3f52" text-color="#fff"
- active-text-color="#fff">
- <div class="level1-column">
- <p>
- {{item.name}}
- </p>
- </div>
- <el-menu-item :index="menuListItem.url" v-for="(menuListItem,menuListIndex) in item.menuList" :key="menuListIndex">
- <i :class="menuListItem.icon"></i>
- <span slot="title">{{menuListItem.name}}</span>
- </el-menu-item>
- <!-- 右侧收起二级栏目按钮 -->
- <div class="fold-level2" @click="level2Collapse(index,6)">
- <i class="spaceicon icon-left" style="margin-left: -1px;font-size: 12px;"></i>
- </div>
- </el-menu>
- <!--对应一级栏目的第二个-->
- </el-aside>
- <!--右侧iframe-->
- <el-main class="content-right" v-loading="v_loading" element-loading-text="正在加载,请稍后">
- <iframe :src="windowSRC"></iframe>
- </el-main>
- </el-container>
- </el-container>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- var moudulesData = ${moudulesData};
- var myInfoUrl = "@service{ page:'appPersonalHome' }@";
- var cmsUrl = "@service{ name:'cmsSubmit' }@";
- var spaceVue = new Vue({
- el: space.appContent,
- data: function() {
- return {
- showLevel2: [], //[false, false], 二级栏目的显示
- contentLeftWMin: 64,
- contentLeftWMax: 284,
- contentLeftW: "64px", //侧边导航的宽度
- transitionName: "level2-slide-fade", //二级栏目的动画名称
- moudulesData: moudulesData, //侧边栏栏目数据
- windowSRC: myInfoUrl,
- v_loading: false
- }
- },
- created: function() {
- //设置显示二级栏目的数组为false,收起状态为false,显示状态为true
- this.showLevel2.length = this.moudulesData.length;
- for (var i = 0; i < this.showLevel2.length; i++) {
- Vue.set(this.showLevel2, i, false);
- };
- //导入模块的图标
- this.moudulesData.forEach(function(item, index) {
- item.icon = item.icon;
- });
- },
- methods: {
- //一级菜单点击事件
- level1Select: function(key, keyPath) {
- for (var i = 0; i < this.showLevel2.length; i++) {
- Vue.set(this.showLevel2, i, false);
- }
- Vue.set(this.showLevel2, key, true);
- if (this.contentLeftW == this.contentLeftWMax + "px") {
- this.transitionName = "";
- } else {
- this.transitionName = "level2-slide-fade";
- };
- var _this = this;
- // var timer = setInterval(function () {
- // _this.contentLeftW = parseInt(_this.contentLeftW) + 10 + "px";
- // if (parseInt(_this.contentLeftW) >= _this.contentLeftWMax) {
- // window.clearInterval(timer);
- // _this.contentLeftW = _this.contentLeftWMax + "px"
- // }
- // }, 6)
- _this.contentLeftW = _this.contentLeftWMax + "px"
- // myInfo事件,双击过快,再点击一级栏目来不及切换颜色,所以再手动添加颜色
- $(".el-menu-level1 .el-menu-item.is-active").css("color", "#409EFF");
- },
- //点击一级栏目的小三角形,折叠二级
- level2Collapse: function(index) {
- Vue.set(this.showLevel2, index, !this.showLevel2[index]);
- if (this.contentLeftW !== this.contentLeftWMin + "px") {
- var _this = this;
- // var timer = setInterval(function () {
- // _this.contentLeftW = parseInt(_this.contentLeftW) - 10 + "px";
- // if (parseInt(_this.contentLeftW) <= _this.contentLeftWMin) {
- // window.clearInterval(timer);
- // _this.contentLeftW = _this.contentLeftWMin + "px"
- // }
- // }, 6)
- _this.contentLeftW = _this.contentLeftWMin + "px"
- }
- },
- //二级菜单点击事件,改变iframe的URL
- level2Select: function(key, keyPath) {
- spaceIndex.loadLayer();
- this.windowSRC = key + "&rn=" + space.utils.random(6);
- },
- myInfo: function() {
- this.windowSRC = myInfoUrl + "&rn=" + space.utils.random(6);
- // 重置右侧菜单
- for (var i = 0; i < this.showLevel2.length; i++) {
- Vue.set(this.showLevel2, i, false);
- }
- this.contentLeftW = this.contentLeftWMin + "px"
- // 如果用removeClass("is-active"),双击过快,再点击一级栏目会来不及添加回is-active
- $(".el-menu-level1 .el-menu-item.is-active").css("color", "#909399");
- $(".el-menu-level2 .el-menu-item").removeClass("is-active");
- }
- }
- })
- </script>
- <script>
- layui.data('586537', {
- key: 'x',
- value: space.utils.compileStr("${appUser.loginName}")
- });
- layui.data('586537', {
- key: 'y',
- value: space.utils.compileStr("${appUser.name}")
- });
- layui.data('586537', {
- key: 'z',
- value: space.utils.compileStr("${appUser.iconPath}")
- });
- $(function() {
- $(".el-menu-level2 .el-menu-item").click(function() {
- $(".el-menu-level2 .el-menu-item").removeClass("is-active");
- $(this).addClass("is-active");
- });
- })
- </script>
- </html>
|