| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612 |
- <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="${curWebSiteObj.seoIcon}">
- <link rel="stylesheet" type="text/css" href="/css/workbench.css" />
- <title>工作台 - ${curWebSiteObj.seoTitle}</title>
- <style>
- .slide-enter-active,
- .slide-leave-active {
- position: relative;
- top: 0;
- left: 0;
- transition: left .15s;
- }
- .slide-enter,
- .slide-leave-to
- /* .slide-leave-active below version 2.1.8 */
- {
- left: -200px;
- }
- </style>
- <script src="/js/space.console.js" type="text/javascript" charset="utf-8"></script>
- </head>
- <body>
- <div id="space-content" v-cloak>
- <el-container id="el-main">
- <!-- 头部 -->
- <el-header :style="{'background-color' : skinCurrent.headerBgColor}">
- <div class="header-logo" @click="myInfo">
- <img src="@service{name: 'sys.getUnitLogo'}@" />
- </div>
- <div class="header-nav">
- <ul class="clearfloat">
- <li v-for="item in moudulesData.slice(0,moudulesMaxLen)" :key="item.index"
- @click="moudulesClick(item.index)" :class="headerActive==item.index?'header-active':''"
- :style="{'background-color':headerActive==item.index?skinCurrent.headerCheckedBgColor:''}">
- <a href="javascript:;"
- :style="{'border-right-color' : skinCurrent.headerBgColor,'color':skinCurrent.headerTextColor}">
- <i :class="item.icon"></i>
- <span>
- {{item.name}}
- </span>
- </a>
- </li>
- <li v-if="moudulesData.length > moudulesMaxLen">
- <a href="javascript:;"
- :style="{'border-right-color' : skinCurrent.headerBgColor,'color':skinCurrent.headerTextColor}">
- <el-dropdown trigger="hover" placement="bottom" @command="moudulesClick"
- :style="{'color':skinCurrent.headerTextColor}">
- <span>
- 更多<i class="el-icon-arrow-down el-icon--right"></i>
- </span>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item :command="item.index" :icon="item.icon"
- v-for="item in moudulesData.slice(moudulesMaxLen,moudulesData.length)"
- :key="item.index">
- {{item.name}}
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </a>
- </li>
- </ul>
- </div>
- <!--右边信息-->
- <div class="header-right" :style="{'color':skinCurrent.headerTextColor}">
- <div class="header-icon">
- <!-- 兼任岗位 -->
- <!-- <el-dropdown trigger="click" placement="bottom">
- <a href="javascript:;">
- <i class="el-icon-user"></i>
- </a>
- <el-dropdown-menu slot="dropdown" style="margin-top: 0;">
- <el-dropdown-item icon="spaceicon icon-xiaoxi">
- 黄金糕
- <el-badge class="mark" :value="12"></el-badge>
- </el-dropdown-item>
- <el-dropdown-item icon="el-icon-circle-plus">
- 狮子头
- <el-badge class="mark" :value="3"></el-badge>
- </el-dropdown-item>
- <el-dropdown-item icon="el-icon-circle-plus-outline">螺蛳粉</el-dropdown-item>
- <el-dropdown-item icon="el-icon-check">双皮奶</el-dropdown-item>
- <el-dropdown-item icon="el-icon-circle-check">蚵仔煎2</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown> -->
- <!-- 消息列表 -->
- <a href="javascript:;"
- onclick='@service{ name:`system_message_list`, page:"sys_msg.msg_list", show:"true" , params:`{rowCountPerPage: "20"}`, end:"spaceVue.getMsgNotReadFlag"}@'>
- <el-badge is-dot :hidden="isViewAll">
- <i class="el-icon-bell"></i>
- </el-badge>
- </a>
- </div>
- <!--个人信息-->
- <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" id="updatePassword"
- 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-bindingWechat"></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", params:`{personid: "${appUser.userId}"}`, show:"true" }@'>
- <i title="常用语" class="el-icon-chat-line-square"></i>
- <p>常用语</p>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="header-settings-grid"
- onclick='@service{ name: "sys.sys_have_been_list", page:"sys.common_audit.my_process", show:"true" }@'>
- <i title="我的流程" class="el-icon-document-checked"></i>
- <p>我的流程</p>
- </div>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <div class="header-settings-grid" @click="themeSettingOpen">
- <i title="系统设置" class="spaceicon icon-skinTheme2"></i>
- <p>主题设置</p>
- </div>
- </el-col>
- <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-row>
- </div>
- <div class="header-settings-bottom"
- onclick="layui.data('586537', null);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" shape="square" 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>
- <!-- 侧边 -->
- <transition name="slide">
- <el-aside width="200px" :style="{'background-color':skinCurrent.asideBgColor}">
- <h3 class="menu-title" :style="{'color':skinCurrent.asideTextColor}">
- {{moudulesData[headerActive].name}}
- </h3>
- <el-menu default-active="menuActive" @open="" @close="" @select="menuSelect"
- :style="{'background-color':skinCurrent.asideBgColor}">
- <!-- 一级导航 -->
- <!-- <el-menu-item :index="item.url" v-for="item in moudulesData[headerActive-1].menuList" :key="item.index" :class="{'last-active':lastSRC==item.url}" :style="lastSRC==item.url?{'background-color':skinCurrent.asideCheckedBgColor,'color':skinCurrent.asideCheckedTextColor}:{'color':skinCurrent.asideTextColor}">
- <i :class="item.icon"></i>
- <span slot="title">
- {{item.name}}
- </span>
- </el-menu-item> -->
- <!-- 导航组件 -->
- <submenu :list="moudulesData[headerActive].menuList" :lastsrc=lastSRC
- :skin-current=skinCurrent></submenu>
- <!-- -->
- </el-menu>
- </el-aside>
- </transition>
- <!-- 内容 -->
- <el-main v-loading="v_loading" element-loading-text="正在加载,请稍后">
- <iframe id="appFrame" :src="windowSRC"></iframe>
- </el-main>
- </el-container>
- </el-container>
- <!-- 主题设置,右抽屉 -->
- <el-drawer title="主题设置" :visible.sync="drawer" size="300px" @close="themeSettingclose">
- <div class="skin-wrap">
- <ul>
- <li v-for="(item,index) in themeList" :key="index" @click="skinClick(item.stid,item.tone)">
- <a href="javascript:;">
- <span :style="{'background-color': item.cover}">
- <i class="el-icon-check" v-if="userThemeType==10000&&skinStid==item.stid"
- :style="{'color':item.cover=='#fff'||item.cover=='#ffffff'?'#3a3f51':'#fff'}"></i>
- </span>
- <p>
- {{item.name}}
- </p>
- </a>
- </li>
- <li @click="customClick">
- <a href="javascript:;">
- <span style="background: linear-gradient(147deg,#8639af 0,#f11f2b 49%,#fcad44 100%);">
- <i class="el-icon-check" v-if="userThemeType==10010"></i>
- </span>
- <p>自定义</p>
- </a>
- </li>
- </ul>
- <div class="custom-picker" v-if="userThemeType==10010">
- <h3>
- 自定义调色板
- </h3>
- <el-row>
- <el-col :span="24">
- <span class="skin-picker-title">头部背景色</span>
- <el-color-picker v-model="skinCurrent.headerBgColor" @active-change="headerBgChange"
- @change=""></el-color-picker>
- {{skinCurrent.headerBgColor}}
- </el-col>
- <el-col :span="24">
- <span class="skin-picker-title">头部模块选中色</span>
- <el-color-picker v-model="skinCurrent.headerCheckedBgColor"
- @active-change="headerCheckedBgChange" @change=""></el-color-picker>
- {{skinCurrent.headerCheckedBgColor}}
- </el-col>
- <el-col :span="24">
- <span class="skin-picker-title">头部文字色</span>
- <el-color-picker v-model="skinCurrent.headerTextColor" @active-change="headerTextChange"
- @change=""></el-color-picker>
- {{skinCurrent.headerTextColor}}
- </el-col>
- <el-col :span="24">
- <span class="skin-picker-title">侧边栏背景色</span>
- <el-color-picker v-model="skinCurrent.asideBgColor" @active-change="asideBgChange"
- @change=""></el-color-picker>
- {{skinCurrent.asideBgColor}}
- </el-col>
- <el-col :span="24">
- <span class="skin-picker-title">侧边栏文字色</span>
- <el-color-picker v-model="skinCurrent.asideTextColor" @active-change="asideTextChange"
- @change=""></el-color-picker>
- {{skinCurrent.asideTextColor}}
- </el-col>
- <el-col :span="24">
- <span class="skin-picker-title">侧边栏选中色</span>
- <el-color-picker v-model="skinCurrent.asideCheckedBgColor"
- @active-change="asideCheckedBgChange" @change=""></el-color-picker>
- {{skinCurrent.asideCheckedBgColor}}
- </el-col>
- <el-col :span="24">
- <span class="skin-picker-title">侧边栏选中文字色</span>
- <el-color-picker v-model="skinCurrent.asideCheckedTextColor"
- @active-change="asideCheckedChange" @change=""></el-color-picker>
- {{skinCurrent.asideCheckedTextColor}}
- </el-col>
- </el-row>
- </div>
- </div>
- </el-drawer>
- <!-- 提供弹层中调用图片预览的元素 -->
- <div id="preview-el-img" class="preview-el-img">
- <el-image ref="previewElImg" style="width: 1px; height: 1px" :src="previewElImg.curImg"
- :preview-src-list="previewElImg.previewImgList">
- </el-image>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- var moudulesData = '${moudulesData}';
- var myInfoUrl = "@service{ page:'website.website_monitoring.monitoring' }@";
- var skinStid = '${appUser.theme.stid}'; // 当前用户所使用的主题ID
- var skinTone = '${appUser.theme.tone}';
- var skinName = '${appUser.theme.name}';
- var cmsUrl = "@service{ name:'cmsSubmit' }@";
- // 导航组件、递归多级导航
- Vue.component('submenu', {
- data: function () {
- return {
- skinCurrent1: {},
- }
- },
- name: "submenu",
- props: {
- list: Array,
- lastsrc: String,
- skinCurrent: {
- type: Object,
- default: () => {
- return this.skinCurrent1
- }
- }
- },
- created: function () {
- var that = this;
- this.skinCurrent1 = JSON.parse(skinTone);
- for (var key in that.skinCurrent1) {
- that.skinCurrent1[key] = decodeURIComponent(that.skinCurrent1[key]);
- }
- },
- template: `
- <div>
- <template v-for="(item,index) in list">
- <!-- 有子栏目 -->
- <template v-if="item.children">
- <el-submenu :key="index" :index="item.url">
- <template :index="item.index" slot="title">
- <i :class="item.icon" :style="lastsrc==item.url?{'background-color':skinCurrent.asideCheckedBgColor,'color':skinCurrent.asideCheckedTextColor}:{'color':skinCurrent.asideTextColor}"></i>
- <span :style="lastsrc==item.url?{'background-color':skinCurrent.asideCheckedBgColor,'color':skinCurrent.asideCheckedTextColor}:{'color':skinCurrent.asideTextColor}">{{item.name}}</span>
- </template>
-
- <submenu :list="item.children" :lastsrc=lastsrc :skin-current=skinCurrent></submenu>
-
- </el-submenu>
- </template>
- <!-- 没有子栏目 -->
- <template v-else>
- <el-menu-item :key="index" :index="item.url" :class="{'last-active':lastsrc==item.url}" :style="lastsrc==item.url?{'background-color':skinCurrent.asideCheckedBgColor,'color':skinCurrent.asideCheckedTextColor}:{'color':skinCurrent.asideTextColor}">
- <i :class="item.icon"></i>
- <span>{{item.name}}</span>
- </el-menu-item>
- </template>
- </template>
- </div>
- `
- })
- var spaceVue = new Vue({
- el: space.appContent,
- data: function () {
- return {
- moudulesData: "", //栏目数据
- headerActive: 0,
- menuActive: "-1",
- windowSRC: myInfoUrl,
- v_loading: false,
- lastSRC: '',
- drawer: false, //主题抽屉
- themeList: [],
- userThemeType: 10000, //用户主题类型(系统、自定义)
- skinStid: skinStid, // 当前用户所使用的主题ID
- skinCurrent: {}, //当前主题
- moudulesMaxLen: 5, //模块最多显示个数
- previewElImg: {
- curImg: '', // 当前的图片
- previewImgList: [], // 图片列表
- },
- isViewAll: true, //消息是否全读
- }
- },
- created: function () {
- var that = this;
- var moduleHomeData = [{
- "icon": "spaceicon icon-home",
- "index": 0,
- "name": "首页",
- "menuList": [{
- "mouduleIndex": 0,
- "icon_ztyys": "#8fadf9",
- "icon": "spaceicon icon-file",
- "index": "0-1",
- "mid": "-1",
- "icon_bjs": "#5094f2",
- "jumpWay": "11",
- "url": "@service{ page: 'website.website_monitoring.monitoring' }@",
- "lbm": "100",
- "name": "个人首页",
- "icon_zts": "#5c89f7"
- },
- ]
- }];
- var _moudulesDataAry = JSON.parse(moudulesData);
- moduleHomeData.push.apply(moduleHomeData, _moudulesDataAry);
- this.moudulesData = moduleHomeData;
- this.lastSRC = this.moudulesData[0].menuList[0].url;
- this.skinCurrent = JSON.parse(skinTone);
- for (var key in that.skinCurrent) {
- that.skinCurrent[key] = decodeURIComponent(that.skinCurrent[key]);
- }
- // 获取是否有未读的消息
- that.getMsgNotReadFlag();
- },
- mounted: function () {
- $('.header-nav').append("<style>.header-nav li:hover {background-color:" + this.skinCurrent
- .headerCheckedBgColor + "}</style>");
- $('.header-nav').append(
- "<style>.el-submenu__title:focus, .el-submenu__title:hover,.el-menu-item:focus, .el-menu-item:hover,.el-menu-item.last-active {background-color:" +
- this.skinCurrent.asideCheckedBgColor + "}.el-menu {background-color:" + this.skinCurrent
- .asideBgColor + "}.el-submenu .el-icon-arrow-down{color:" + this.skinCurrent
- .asideTextColor + "}</style>");
- layui.data(space.appDomains, null);
- // 修改密码
- if ("${appUser.defaultPasswordFlag}" == "true") {
- $("#updatePassword").click();
- }
- },
- methods: {
- //获取是否有未读的消息
- getMsgNotReadFlag: function () {
- var that = this;
- space.utils.ajax({
- url: '@service{ name:`system_message_not_read` }@',
- dataType: 'json',
- loadLayer: false,
- callback: function (data) {
- if (data.code == "success") {
- that.isViewAll = !data.notReadFlag;
- } else {
- space.message.error("消息接口异常");
- }
- }
- });
- },
- moudulesClick: function (index) {
- this.headerActive = index;
- },
- myInfo: function () {
- layui.data(space.appDomains, null);
- this.v_loading = true;
- this.moudulesClick(0);
- setTimeout(() => {
- spaceVue.$data.lastSRC = this.moudulesData[0].menuList[0].url;
- spaceVue.$data.windowSRC = myInfoUrl + "&rn=" + space.utils.random(6);
- }, 500);
- },
- menuSelect: function (key, keyPath) {
- if (key.startsWith("http")) {
- window.open(key);
- return;
- }
- spaceIndex.loadLayer();
- layui.data(space.appDomains, null);
- this.windowSRC = key + "&rn=" + space.utils.random(6);
- this.lastSRC = key;
- },
- headerBgChange: function (color) {
- this.skinCurrent.headerBgColor = color;
- },
- headerCheckedBgChange: function (color) {
- this.skinCurrent.headerCheckedBgColor = color;
- },
- headerTextChange: function (color) {
- this.skinCurrent.headerTextColor = color;
- },
- asideBgChange: function (color) {
- this.skinCurrent.asideBgColor = color;
- // 解决子级栏目不能自动适应背景色
- $('.header-nav').append("<style>.el-menu {background-color:" + this.skinCurrent.asideBgColor +
- "}</style>");
- },
- asideTextChange: function (color) {
- this.skinCurrent.asideTextColor = color;
- // 解决子级栏目不能自动适应背景色
- $('.header-nav').append("<style>.el-submenu .el-icon-arrow-down{color:" + this.skinCurrent
- .asideTextColor + "}</style>");
- },
- asideCheckedBgChange: function (color) {
- this.skinCurrent.asideCheckedBgColor = color;
- },
- asideCheckedChange: function (color) {
- this.skinCurrent.asideCheckedTextColor = color;
- },
- skinClick: function (stid, tone) {
- this.userThemeType = 10000;
- this.skinStid = stid;
- this.skinCurrent = JSON.parse(tone);
- // 解决子级栏目不能自动适应背景色
- $('.header-nav').append("<style>.el-menu {background-color:" + this.skinCurrent.asideBgColor +
- "}.el-submenu .el-icon-arrow-down{color:" + this.skinCurrent.asideTextColor +
- "}</style>");
- },
- customClick: function () {
- this.userThemeType = 10010;
- },
- themeSettingOpen: function () { //主题抽屉打开,系统主题列表
- var that = this;
- this.drawer = true;
- for (var key in that.skinCurrent) {
- that.skinCurrent[key] = decodeURIComponent(that.skinCurrent[key]);
- }
- space.utils.ajax({
- url: '/apps?ark=sys.systemTheme_list',
- callback: function (data) {
- data = decodeURIComponent(data);
- data = JSON.parse(data);
- that.themeList = data.data.themeList;
- that.userThemeType = data.data.userThemeType;
- }
- });
- },
- themeSettingclose: function () { //主题抽屉关闭
- $('.header-nav').append("<style>.header-nav li:hover {background-color:" + this.skinCurrent
- .headerCheckedBgColor + "}</style>");
- $('.header-nav').append(
- "<style>.el-submenu__title:focus, .el-submenu__title:hover,.el-menu-item:focus, .el-menu-item:hover,.el-menu-item.last-active {background-color:" +
- this.skinCurrent.asideCheckedBgColor + "}.el-menu {background-color:" + this
- .skinCurrent.asideBgColor + "}.el-submenu .el-icon-arrow-down{color:" + this
- .skinCurrent.asideTextColor + "}</style>");
- var that = this;
- if (this.userThemeType == 10000) {
- space.utils.ajax({ //切换系统主题
- url: '/apps?ark=sys.personTheme_changeTheme&stid=' + this.skinStid + '',
- loadLayer: false,
- dataType: 'json'
- });
- } else {
- for (var key in that.skinCurrent) {
- that.skinCurrent[key] = encodeURIComponent(that.skinCurrent[key]);
- }
- space.utils.ajax({ //切换自定义主题
- url: '/apps?ark=sys.personTheme_addPersonDiyTheme',
- loadLayer: false,
- data: that.skinCurrent,
- dataType: 'json'
- });
- };
- for (var key in that.skinCurrent) {
- that.skinCurrent[key] = decodeURIComponent(that.skinCurrent[key]);
- }
- }
- }
- })
- </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}")
- });
- </script>
- </html>
|