1001110176_run.jsp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <%@ taglib uri="/WEB-INF/SpaceCoreApp.tld" prefix="app"%>
  4. <% pageContext.setAttribute(space.core.apps.common.ConstVars.MODULE_DM_KEY, "sys"); %>
  5. <!DOCTYPE html >
  6. <html>
  7. <head> <!-- HEAD -->
  8. <link rel="stylesheet" type="text/css" href="/css/reset.css">
  9. <link rel="stylesheet" type="text/css" href="/apps/space/plug-in/element-ui@2.13.0/index.css">
  10. <link rel="stylesheet" type="text/css" href="/apps/space/plug-in/layui/dist/css/layui.css">
  11. <link rel="stylesheet" type="text/css" href="/apps/space/css/SpaceIcon/iconfont.css">
  12. <link rel="stylesheet" type="text/css" href="/css/components.css">
  13. <link rel="stylesheet" href="/css/ckeditor.css">
  14. <script>var space = { vars: {} };</script>
  15. <script src="/js/jquery1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
  16. <script src="/apps/space/plug-in/element-resize-detector/element-resize-detector.min.js"></script>
  17. <script src="/apps/space/plug-in/vue/vue.min.js" type="text/javascript" charset="utf-8"></script>
  18. <script src="/apps/space/plug-in/element-ui@2.13.0/index.js" type="text/javascript" charset="utf-8"></script>
  19. <script src="/js/space.vue.pc.subassembly.js?v=20261111-image-center-source-v3"></script>
  20. <script src="/apps/space/plug-in/layui/dist/layui.all.js" type="text/javascript" charset="utf-8"></script>
  21. <script src="/js/space.recycle.js" type="text/javascript" charset="utf-8"></script>
  22. <script src="/js/space.display.js" type="text/javascript" charset="utf-8"></script>
  23. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  24. <meta name="renderer" content="webkit">
  25. <link rel="icon" type="image/png" sizes="16x16" href="${curWebSiteObj.seoIcon}">
  26. <link rel="stylesheet" type="text/css" href="/css/workbench.css">
  27. <title>工作台 - ${curWebSiteObj.seoTitle}</title>
  28. <style>
  29. .slide-enter-active,
  30. .slide-leave-active {
  31. position: relative;
  32. top: 0;
  33. left: 0;
  34. transition: left .15s;
  35. }
  36. .slide-enter,
  37. .slide-leave-to
  38. /* .slide-leave-active below version 2.1.8 */
  39. {
  40. left: -200px;
  41. }
  42. </style>
  43. <script src="/js/space.console.js" type="text/javascript" charset="utf-8"></script>
  44. </head>
  45. <body>
  46. <div v-cloak id="space-content">
  47. <el-container id="el-main">
  48. <!-- 头部 -->
  49. <el-header :style="{'background-color' : skinCurrent.headerBgColor}">
  50. <div class="header-logo" @click="myInfo">
  51. <img src="<app:token name='sys.getUnitLogo' />" />
  52. </div>
  53. <div class="header-nav">
  54. <ul class="clearfloat">
  55. <li v-for="item in moudulesData.slice(0,moudulesMaxLen)" :key="item.index"
  56. @click="moudulesClick(item.index)" :class="headerActive==item.index?'header-active':''"
  57. :style="{'background-color':headerActive==item.index?skinCurrent.headerCheckedBgColor:''}">
  58. <a href="javascript:;"
  59. :style="{'border-right-color' : skinCurrent.headerBgColor,'color':skinCurrent.headerTextColor}">
  60. <i :class="item.icon"></i>
  61. <span>
  62. {{item.name}}
  63. </span>
  64. </a>
  65. </li>
  66. <li v-if="moudulesData.length > moudulesMaxLen">
  67. <a href="javascript:;"
  68. :style="{'border-right-color' : skinCurrent.headerBgColor,'color':skinCurrent.headerTextColor}">
  69. <el-dropdown trigger="hover" placement="bottom" @command="moudulesClick"
  70. :style="{'color':skinCurrent.headerTextColor}">
  71. <span>
  72. 更多<i class="el-icon-arrow-down el-icon--right"></i>
  73. </span>
  74. <el-dropdown-menu slot="dropdown">
  75. <el-dropdown-item :command="item.index" :icon="item.icon"
  76. v-for="item in moudulesData.slice(moudulesMaxLen,moudulesData.length)"
  77. :key="item.index">
  78. {{item.name}}
  79. </el-dropdown-item>
  80. </el-dropdown-menu>
  81. </el-dropdown>
  82. </a>
  83. </li>
  84. </ul>
  85. </div>
  86. <!--右边信息-->
  87. <div class="header-right" :style="{'color':skinCurrent.headerTextColor}">
  88. <div class="header-icon">
  89. <!-- 兼任岗位 -->
  90. <!-- <el-dropdown trigger="click" placement="bottom">
  91. <a href="javascript:;">
  92. <i class="el-icon-user"></i>
  93. </a>
  94. <el-dropdown-menu slot="dropdown" style="margin-top: 0;">
  95. <el-dropdown-item icon="spaceicon icon-xiaoxi">
  96. 黄金糕
  97. <el-badge class="mark" :value="12"></el-badge>
  98. </el-dropdown-item>
  99. <el-dropdown-item icon="el-icon-circle-plus">
  100. 狮子头
  101. <el-badge class="mark" :value="3"></el-badge>
  102. </el-dropdown-item>
  103. <el-dropdown-item icon="el-icon-circle-plus-outline">螺蛳粉</el-dropdown-item>
  104. <el-dropdown-item icon="el-icon-check">双皮奶</el-dropdown-item>
  105. <el-dropdown-item icon="el-icon-circle-check">蚵仔煎2</el-dropdown-item>
  106. </el-dropdown-menu>
  107. </el-dropdown> -->
  108. <!-- 消息列表 -->
  109. <a href="javascript:;"
  110. onclick='<app:token name='sys.system_message_list' page='10583' params='{rowCountPerPage: "20"}' show='true' end='spaceVue.getMsgNotReadFlag' />'>
  111. <el-badge is-dot :hidden="isViewAll">
  112. <i class="el-icon-bell"></i>
  113. </el-badge>
  114. </a>
  115. </div>
  116. <!--个人信息-->
  117. <el-popover placement="bottom" width="270" trigger="hover" popper-class="hearder-settings-popper"
  118. :visible-arrow="false">
  119. <div class="header-settings-list">
  120. <el-row>
  121. <el-col :span="8">
  122. <div class="header-settings-grid"
  123. onclick='<app:token name='personnel.person_info' page='10019' params='{personid: "${appUser.userId}"}' show='true' />'>
  124. <i title="个人信息" class="el-icon-user"></i>
  125. <p>个人信息</p>
  126. </div>
  127. </el-col>
  128. <el-col :span="8">
  129. <div class="header-settings-grid"
  130. onclick='<app:token page='10133' show='true' />'>
  131. <i title="更换头像" class="el-icon-picture-outline-round"></i>
  132. <p>更换头像</p>
  133. </div>
  134. </el-col>
  135. <el-col :span="8">
  136. <div class="header-settings-grid" id="updatePassword"
  137. onclick='<app:token page='10134' show='true' />'>
  138. <i title="修改密码" class="el-icon-lock"></i>
  139. <p>修改密码</p>
  140. </div>
  141. </el-col>
  142. </el-row>
  143. <el-row>
  144. <el-col :span="8">
  145. <div class="header-settings-grid"
  146. onclick='<app:token name='sys.wechat_binding_qrcode' page='10056' show='true' />'>
  147. <i title="绑定微信" class="spaceicon icon-bindingWechat"></i>
  148. <p>绑定微信</p>
  149. </div>
  150. </el-col>
  151. <el-col :span="8">
  152. <div class="header-settings-grid"
  153. onclick='<app:token name='personnel.personCustomPhrase_list' page='10080' params='{personid: "${appUser.userId}"}' show='true' />'>
  154. <i title="常用语" class="el-icon-chat-line-square"></i>
  155. <p>常用语</p>
  156. </div>
  157. </el-col>
  158. <el-col :span="8">
  159. <div class="header-settings-grid"
  160. onclick='<app:token name='sys.sys_have_been_list' page='10335' show='true' />'>
  161. <i title="我的流程" class="el-icon-document-checked"></i>
  162. <p>我的流程</p>
  163. </div>
  164. </el-col>
  165. </el-row>
  166. <el-row>
  167. <el-col :span="8">
  168. <div class="header-settings-grid" @click="themeSettingOpen">
  169. <i title="系统设置" class="spaceicon icon-skinTheme2"></i>
  170. <p>主题设置</p>
  171. </div>
  172. </el-col>
  173. <el-col :span="8">
  174. <div class="header-settings-grid"
  175. onclick='<app:token name='personnel.person_login_log_list' page='10022' params='{personid: "${appUser.userId}"}' show='true' />'>
  176. <i title="登录日志" class="el-icon-date"></i>
  177. <p>登录日志</p>
  178. </div>
  179. </el-col>
  180. <el-col :span="8">
  181. <div class="header-settings-grid"
  182. onclick='<app:token page='10135' show='true' />'>
  183. <i title="清空缓存" class="el-icon-magic-stick"></i>
  184. <p>清空缓存</p>
  185. </div>
  186. </el-col>
  187. </el-row>
  188. </div>
  189. <div class="header-settings-bottom"
  190. onclick="layui.data('586537', null);location.href='/apps/loginout/'">
  191. <el-row>
  192. <el-col :span="24">
  193. 退出管理控制台
  194. </el-col>
  195. </el-row>
  196. </div>
  197. <div class="header-user" slot="reference">
  198. <el-avatar :size="36" shape="square" class="header-user-icon" src="${appUser.iconPath}">
  199. ${appUser.loginName}
  200. </el-avatar>
  201. <span class="header-user-email">
  202. ${appUser.loginName}
  203. </span>
  204. <i class="el-icon-caret-bottom"></i>
  205. </div>
  206. </el-popover>
  207. </div>
  208. </el-header>
  209. <!-- 主体 -->
  210. <el-container>
  211. <!-- 侧边 -->
  212. <transition name="slide">
  213. <el-aside width="200px" :style="{'background-color':skinCurrent.asideBgColor}">
  214. <h3 class="menu-title" :style="{'color':skinCurrent.asideTextColor}">
  215. {{moudulesData[headerActive].name}}
  216. </h3>
  217. <el-menu default-active="menuActive" @open="" @close="" @select="menuSelect"
  218. :style="{'background-color':skinCurrent.asideBgColor}">
  219. <!-- 一级导航 -->
  220. <!-- <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}">
  221. <i :class="item.icon"></i>
  222. <span slot="title">
  223. {{item.name}}
  224. </span>
  225. </el-menu-item> -->
  226. <!-- 导航组件 -->
  227. <submenu :list="moudulesData[headerActive].menuList" :lastsrc=lastSRC
  228. :skin-current=skinCurrent></submenu>
  229. <!-- -->
  230. </el-menu>
  231. </el-aside>
  232. </transition>
  233. <!-- 内容 -->
  234. <el-main v-loading="v_loading" element-loading-text="正在加载,请稍后">
  235. <iframe id="appFrame" :src="windowSRC"></iframe>
  236. </el-main>
  237. </el-container>
  238. </el-container>
  239. <!-- 主题设置,右抽屉 -->
  240. <el-drawer title="主题设置" :visible.sync="drawer" size="300px" @close="themeSettingclose">
  241. <div class="skin-wrap">
  242. <ul>
  243. <li v-for="(item,index) in themeList" :key="index" @click="skinClick(item.stid,item.tone)">
  244. <a href="javascript:;">
  245. <span :style="{'background-color': item.cover}">
  246. <i class="el-icon-check" v-if="userThemeType==10000&&skinStid==item.stid"
  247. :style="{'color':item.cover=='#fff'||item.cover=='#ffffff'?'#3a3f51':'#fff'}"></i>
  248. </span>
  249. <p>
  250. {{item.name}}
  251. </p>
  252. </a>
  253. </li>
  254. <li @click="customClick">
  255. <a href="javascript:;">
  256. <span style="background: linear-gradient(147deg,#8639af 0,#f11f2b 49%,#fcad44 100%);">
  257. <i class="el-icon-check" v-if="userThemeType==10010"></i>
  258. </span>
  259. <p>自定义</p>
  260. </a>
  261. </li>
  262. </ul>
  263. <div class="custom-picker" v-if="userThemeType==10010">
  264. <h3>
  265. 自定义调色板
  266. </h3>
  267. <el-row>
  268. <el-col :span="24">
  269. <span class="skin-picker-title">头部背景色</span>
  270. <el-color-picker v-model="skinCurrent.headerBgColor" @active-change="headerBgChange"
  271. @change=""></el-color-picker>
  272. {{skinCurrent.headerBgColor}}
  273. </el-col>
  274. <el-col :span="24">
  275. <span class="skin-picker-title">头部模块选中色</span>
  276. <el-color-picker v-model="skinCurrent.headerCheckedBgColor"
  277. @active-change="headerCheckedBgChange" @change=""></el-color-picker>
  278. {{skinCurrent.headerCheckedBgColor}}
  279. </el-col>
  280. <el-col :span="24">
  281. <span class="skin-picker-title">头部文字色</span>
  282. <el-color-picker v-model="skinCurrent.headerTextColor" @active-change="headerTextChange"
  283. @change=""></el-color-picker>
  284. {{skinCurrent.headerTextColor}}
  285. </el-col>
  286. <el-col :span="24">
  287. <span class="skin-picker-title">侧边栏背景色</span>
  288. <el-color-picker v-model="skinCurrent.asideBgColor" @active-change="asideBgChange"
  289. @change=""></el-color-picker>
  290. {{skinCurrent.asideBgColor}}
  291. </el-col>
  292. <el-col :span="24">
  293. <span class="skin-picker-title">侧边栏文字色</span>
  294. <el-color-picker v-model="skinCurrent.asideTextColor" @active-change="asideTextChange"
  295. @change=""></el-color-picker>
  296. {{skinCurrent.asideTextColor}}
  297. </el-col>
  298. <el-col :span="24">
  299. <span class="skin-picker-title">侧边栏选中色</span>
  300. <el-color-picker v-model="skinCurrent.asideCheckedBgColor"
  301. @active-change="asideCheckedBgChange" @change=""></el-color-picker>
  302. {{skinCurrent.asideCheckedBgColor}}
  303. </el-col>
  304. <el-col :span="24">
  305. <span class="skin-picker-title">侧边栏选中文字色</span>
  306. <el-color-picker v-model="skinCurrent.asideCheckedTextColor"
  307. @active-change="asideCheckedChange" @change=""></el-color-picker>
  308. {{skinCurrent.asideCheckedTextColor}}
  309. </el-col>
  310. </el-row>
  311. </div>
  312. </div>
  313. </el-drawer>
  314. <!-- 提供弹层中调用图片预览的元素 -->
  315. <div id="preview-el-img" class="preview-el-img">
  316. <el-image ref="previewElImg" style="width: 1px; height: 1px" :src="previewElImg.curImg"
  317. :preview-src-list="previewElImg.previewImgList">
  318. </el-image>
  319. </div>
  320. </div>
  321. </body>
  322. <script type="text/javascript">
  323. // 尽早解除 v-cloak,避免后续脚本异常导致整页白屏
  324. $("#space-content").removeAttr("v-cloak").css("display", "block");
  325. var moudulesData = '${moudulesData}';
  326. var myInfoUrl = "<app:token page='10153' />";
  327. var skinStid = '${appUser.theme.stid}'; // 当前用户所使用的主题ID
  328. var skinTone = '${appUser.theme.tone}';
  329. var skinName = '${appUser.theme.name}';
  330. var cmsUrl = "<app:token name='sys.cmsSubmit' />";
  331. function safeParseJSON(str, fallback) {
  332. if (str == null || String(str).trim() === '' || str === 'null' || str === 'undefined') {
  333. return fallback;
  334. }
  335. try {
  336. return JSON.parse(str);
  337. } catch (e) {
  338. console.error('safeParseJSON failed:', e, str);
  339. return fallback;
  340. }
  341. }
  342. // 导航组件、递归多级导航
  343. Vue.component('submenu', {
  344. data: function () {
  345. return {
  346. skinCurrent1: {},
  347. }
  348. },
  349. name: "submenu",
  350. props: {
  351. list: Array,
  352. lastsrc: String,
  353. skinCurrent: {
  354. type: Object,
  355. default: () => {
  356. return this.skinCurrent1
  357. }
  358. }
  359. },
  360. created: function () {
  361. var that = this;
  362. this.skinCurrent1 = safeParseJSON(skinTone, {});
  363. for (var key in that.skinCurrent1) {
  364. that.skinCurrent1[key] = decodeURIComponent(that.skinCurrent1[key]);
  365. }
  366. },
  367. template: `
  368. <div>
  369. <template v-for="(item,index) in list">
  370.     <!-- 有子栏目 -->
  371. <template v-if="item.children">
  372. <el-submenu :key="index" :index="item.url">
  373. <template :index="item.index" slot="title">
  374. <i :class="item.icon" :style="lastsrc==item.url?{'background-color':skinCurrent.asideCheckedBgColor,'color':skinCurrent.asideCheckedTextColor}:{'color':skinCurrent.asideTextColor}"></i>
  375. <span :style="lastsrc==item.url?{'background-color':skinCurrent.asideCheckedBgColor,'color':skinCurrent.asideCheckedTextColor}:{'color':skinCurrent.asideTextColor}">{{item.name}}</span>
  376. </template>
  377. <submenu :list="item.children" :lastsrc=lastsrc :skin-current=skinCurrent></submenu>
  378. </el-submenu>
  379. </template>
  380.     <!-- 没有子栏目 -->
  381. <template v-else>
  382. <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}">
  383. <i :class="item.icon"></i>
  384. <span>{{item.name}}</span>
  385. </el-menu-item>
  386. </template>
  387. </template>
  388. </div>
  389. `
  390. })
  391. var spaceVue = null;
  392. try {
  393. spaceVue = new Vue({
  394. el: space.appContent,
  395. data: function () {
  396. return {
  397. moudulesData: "", //栏目数据
  398. headerActive: 0,
  399. menuActive: "-1",
  400. windowSRC: myInfoUrl,
  401. v_loading: false,
  402. lastSRC: '',
  403. drawer: false, //主题抽屉
  404. themeList: [],
  405. userThemeType: 10000, //用户主题类型(系统、自定义)
  406. skinStid: skinStid, // 当前用户所使用的主题ID
  407. skinCurrent: {}, //当前主题
  408. moudulesMaxLen: 5, //模块最多显示个数
  409. previewElImg: {
  410. curImg: '', // 当前的图片
  411. previewImgList: [], // 图片列表
  412. },
  413. isViewAll: true, //消息是否全读
  414. }
  415. },
  416. created: function () {
  417. var that = this;
  418. var moduleHomeData = [{
  419. "icon": "spaceicon icon-home",
  420. "index": 0,
  421. "name": "首页",
  422. "menuList": [{
  423. "mouduleIndex": 0,
  424. "icon_ztyys": "#8fadf9",
  425. "icon": "spaceicon icon-file",
  426. "index": "0-1",
  427. "mid": "-1",
  428. "icon_bjs": "#5094f2",
  429. "jumpWay": "11",
  430. "url": "<app:token page='10153' />",
  431. "lbm": "100",
  432. "name": "个人首页",
  433. "icon_zts": "#5c89f7"
  434. },
  435. ]
  436. }];
  437. var _moudulesDataAry = safeParseJSON(moudulesData, []);
  438. if (!Array.isArray(_moudulesDataAry)) {
  439. _moudulesDataAry = [];
  440. }
  441. moduleHomeData.push.apply(moduleHomeData, _moudulesDataAry);
  442. this.moudulesData = moduleHomeData;
  443. this.lastSRC = this.moudulesData[0].menuList[0].url;
  444. this.skinCurrent = safeParseJSON(skinTone, {});
  445. for (var key in that.skinCurrent) {
  446. that.skinCurrent[key] = decodeURIComponent(that.skinCurrent[key]);
  447. }
  448. // 获取是否有未读的消息
  449. that.getMsgNotReadFlag();
  450. },
  451. mounted: function () {
  452. // 兜底:避免挂载异常时 v-cloak 一直隐藏整页
  453. $("#space-content").removeAttr("v-cloak").show();
  454. $('.header-nav').append("<style>.header-nav li:hover {background-color:" + this.skinCurrent
  455. .headerCheckedBgColor + "}</style>");
  456. $('.header-nav').append(
  457. "<style>.el-submenu__title:focus, .el-submenu__title:hover,.el-menu-item:focus, .el-menu-item:hover,.el-menu-item.last-active {background-color:" +
  458. this.skinCurrent.asideCheckedBgColor + "}.el-menu {background-color:" + this.skinCurrent
  459. .asideBgColor + "}.el-submenu .el-icon-arrow-down{color:" + this.skinCurrent
  460. .asideTextColor + "}</style>");
  461. layui.data(space.appDomains, null);
  462. // 修改密码
  463. if ("${appUser.defaultPasswordFlag}" == "true") {
  464. $("#updatePassword").click();
  465. }
  466. },
  467. methods: {
  468. //获取是否有未读的消息
  469. getMsgNotReadFlag: function () {
  470. var that = this;
  471. space.utils.ajax({
  472. url: '<app:token name='sys.system_message_not_read' />',
  473. dataType: 'json',
  474. loadLayer: false,
  475. callback: function (data) {
  476. if (data.code == "success") {
  477. that.isViewAll = !data.notReadFlag;
  478. } else {
  479. space.message.error("消息接口异常");
  480. }
  481. }
  482. });
  483. },
  484. moudulesClick: function (index) {
  485. this.headerActive = index;
  486. },
  487. myInfo: function () {
  488. layui.data(space.appDomains, null);
  489. this.v_loading = true;
  490. this.moudulesClick(0);
  491. setTimeout(() => {
  492. spaceVue.$data.lastSRC = this.moudulesData[0].menuList[0].url;
  493. spaceVue.$data.windowSRC = myInfoUrl + "&rn=" + space.utils.random(6);
  494. }, 500);
  495. },
  496. menuSelect: function (key, keyPath) {
  497. if (key.startsWith("http")) {
  498. window.open(key);
  499. return;
  500. }
  501. spaceIndex.loadLayer();
  502. layui.data(space.appDomains, null);
  503. this.windowSRC = key + "&rn=" + space.utils.random(6);
  504. this.lastSRC = key;
  505. },
  506. headerBgChange: function (color) {
  507. this.skinCurrent.headerBgColor = color;
  508. },
  509. headerCheckedBgChange: function (color) {
  510. this.skinCurrent.headerCheckedBgColor = color;
  511. },
  512. headerTextChange: function (color) {
  513. this.skinCurrent.headerTextColor = color;
  514. },
  515. asideBgChange: function (color) {
  516. this.skinCurrent.asideBgColor = color;
  517. // 解决子级栏目不能自动适应背景色
  518. $('.header-nav').append("<style>.el-menu {background-color:" + this.skinCurrent.asideBgColor +
  519. "}</style>");
  520. },
  521. asideTextChange: function (color) {
  522. this.skinCurrent.asideTextColor = color;
  523. // 解决子级栏目不能自动适应背景色
  524. $('.header-nav').append("<style>.el-submenu .el-icon-arrow-down{color:" + this.skinCurrent
  525. .asideTextColor + "}</style>");
  526. },
  527. asideCheckedBgChange: function (color) {
  528. this.skinCurrent.asideCheckedBgColor = color;
  529. },
  530. asideCheckedChange: function (color) {
  531. this.skinCurrent.asideCheckedTextColor = color;
  532. },
  533. skinClick: function (stid, tone) {
  534. this.userThemeType = 10000;
  535. this.skinStid = stid;
  536. this.skinCurrent = safeParseJSON(tone, {});
  537. // 解决子级栏目不能自动适应背景色
  538. $('.header-nav').append("<style>.el-menu {background-color:" + this.skinCurrent.asideBgColor +
  539. "}.el-submenu .el-icon-arrow-down{color:" + this.skinCurrent.asideTextColor +
  540. "}</style>");
  541. },
  542. customClick: function () {
  543. this.userThemeType = 10010;
  544. },
  545. themeSettingOpen: function () { //主题抽屉打开,系统主题列表
  546. var that = this;
  547. this.drawer = true;
  548. for (var key in that.skinCurrent) {
  549. that.skinCurrent[key] = decodeURIComponent(that.skinCurrent[key]);
  550. }
  551. space.utils.ajax({
  552. url: '/apps?ark=sys.systemTheme_list',
  553. callback: function (data) {
  554. data = decodeURIComponent(data);
  555. data = safeParseJSON(data, {});
  556. that.themeList = (data.data && data.data.themeList) ? data.data.themeList : [];
  557. that.userThemeType = (data.data && data.data.userThemeType) ? data.data.userThemeType : 10000;
  558. }
  559. });
  560. },
  561. themeSettingclose: function () { //主题抽屉关闭
  562. $('.header-nav').append("<style>.header-nav li:hover {background-color:" + this.skinCurrent
  563. .headerCheckedBgColor + "}</style>");
  564. $('.header-nav').append(
  565. "<style>.el-submenu__title:focus, .el-submenu__title:hover,.el-menu-item:focus, .el-menu-item:hover,.el-menu-item.last-active {background-color:" +
  566. this.skinCurrent.asideCheckedBgColor + "}.el-menu {background-color:" + this
  567. .skinCurrent.asideBgColor + "}.el-submenu .el-icon-arrow-down{color:" + this
  568. .skinCurrent.asideTextColor + "}</style>");
  569. var that = this;
  570. if (this.userThemeType == 10000) {
  571. space.utils.ajax({ //切换系统主题
  572. url: '/apps?ark=sys.personTheme_changeTheme&stid=' + this.skinStid + '',
  573. loadLayer: false,
  574. dataType: 'json'
  575. });
  576. } else {
  577. for (var key in that.skinCurrent) {
  578. that.skinCurrent[key] = encodeURIComponent(that.skinCurrent[key]);
  579. }
  580. space.utils.ajax({ //切换自定义主题
  581. url: '/apps?ark=sys.personTheme_addPersonDiyTheme',
  582. loadLayer: false,
  583. data: that.skinCurrent,
  584. dataType: 'json'
  585. });
  586. };
  587. for (var key in that.skinCurrent) {
  588. that.skinCurrent[key] = decodeURIComponent(that.skinCurrent[key]);
  589. }
  590. }
  591. }
  592. })
  593. } catch (e) {
  594. console.error('workbench Vue init failed:', e);
  595. $("#space-content").removeAttr("v-cloak").show();
  596. }
  597. </script>
  598. <script>
  599. layui.data('586537', {
  600. key: 'x',
  601. value: space.utils.compileStr("${appUser.loginName}")
  602. });
  603. layui.data('586537', {
  604. key: 'y',
  605. value: space.utils.compileStr("${appUser.loginName}")
  606. });
  607. layui.data('586537', {
  608. key: 'z',
  609. value: space.utils.compileStr("${appUser.iconPath}")
  610. });
  611. </script>
  612. <script type="text/javascript">space.vars.pageTypeCode = "10005";</script>
  613. <script type="text/javascript">space.vars.pageHashCode = "EWbP/xX1qqv8DzgDl1mRrg==";</script>
  614. <script type="text/javascript" >removeTokens("<app:token name='sys.removeToken' />", '<%= pageContext.getAttribute(space.core.apps.common.ConstVars.TOKEN_SESSION_LIST_KEY) %>')</script>
  615. </html>