index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. <template>
  2. <el-container class="box-all" v-loading="loading">
  3. <el-header>
  4. <div class="flex-box" style="height: 60px;min-width: 1200px;">
  5. <div class="logo-box flex-box flex-center-center" @click="openHome()">
  6. <img src="./assets/image/logo.png" class="logo" />
  7. <div>功道云积分制</div>
  8. </div>
  9. <div class="flex-1 hea-right flex-box flex-v-ce" >
  10. <div class="name" style="min-width: 200px;">{{ info.name }}</div>
  11. <div class="flex-1 flex-box-ce font-flex-word" style="cursor: pointer;padding: 0 20px;">
  12. <template v-if="$supremeAuthority()=='dept_manager'||$supremeAuthority()=='employee'">
  13. <template v-if="information.name">
  14. <img src="./assets/image/tz.png" style="width: 18px;height: 18px;"/>
  15. <span style="max-width: 500px;padding-left: 10px;" class="font-flex-word" @click="$router.push({path:'inform'})">{{information.name}}</span>
  16. </template>
  17. </template>
  18. <div v-else class="flex-box-ce" >
  19. <img src="./assets/image/tz.png" style="width: 18px;height: 18px;"/>
  20. <template v-if="information.name">
  21. <span style="max-width: 500px;padding-left: 10px;" class="font-flex-word" @click="$router.push({path:'inform'})">{{information.name}}</span>
  22. </template>
  23. <span v-else style="padding: 0 10px;cursor: pointer;color: #606266;" @click="$router.push({path:'inform'})">暂无公告,点击此处添加公告</span>
  24. </div>
  25. </div>
  26. <div class="flex-box flex-v-ce">
  27. <el-popover placement="bottom" width="240" trigger="hover">
  28. <div class="popoverText">
  29. <div class="flex-box-ce"><span>当前使用版本:</span><i>{{ corpMessage.package_name|| '测试环境版本' }}</i></div>
  30. <div class="flex-box-ce"><span>到期时间:</span><i class="orange">{{ corpMessage.expire_time}}</i></div>
  31. <div class="flex-box-ce"><span>企业使用人数:</span><i class="blue">{{ corpMessage.user_count_max }}人</i></div>
  32. <div class="flex-box-end">
  33. <el-button size="small" @click="isTz = true" class="upgrade" type="primary" icon="el-icon-upload">续费升级</el-button>
  34. </div>
  35. </div>
  36. <div slot="reference" class="flex-box-ce megData" style="cursor: pointer;margin: 0 10px;">
  37. <div>{{ corpMessage.package_name|| '测试环境版本' }}</div>
  38. <div>{{ corpMessage.user_count_max }}人</div>
  39. </div>
  40. </el-popover>
  41. <el-popover
  42. v-if="!this.$authoritys('employee') && !this.$authoritys('dept_manager')"
  43. placement="bottom"
  44. class="popoverBox"
  45. width="60"
  46. v-model="visible"
  47. trigger="manual">
  48. <div style="text-align: center;">这里再次打开</div>
  49. <div slot="reference" @click="showWn" class="flex-box-ce btnWn">
  50. <i class="el-icon-tickets" style="font-size: 18px;margin-right: 5px;"></i>
  51. <!-- <img slot="reference" src="./assets/image/wn.png" class="wn"/> -->
  52. <span>新手引导</span>
  53. </div>
  54. </el-popover>
  55. <!-- <el-tooltip v-model="wn_show" class="item" effect="dark" content="设置向导" placement="bottom" v-if="!this.$authoritys('employee') && !this.$authoritys('dept_manager')">
  56. <img src="./assets/image/wn.png" class="wn" @click="showWn" />
  57. </el-tooltip> -->
  58. <userImage :user_name="userData.name" :img_url="userData.img_url" width="44px" height="44px"></userImage>
  59. </div>
  60. </div>
  61. </div>
  62. </el-header>
  63. <el-container class="main">
  64. <el-aside>
  65. <el-menu :default-active="defaultActive" class="el-menu-vertical-demo" :router="true" @select="activeRouter" :unique-opened="true">
  66. <template v-for="(item, index) in routers">
  67. <div v-if="item.children.length != 0" :key="index">
  68. <template v-if="item.children.length >= 1 && item.name != '首页'">
  69. <template v-if="item.name=='福利'">
  70. <el-submenu :index="index.toString()" :key="index" v-if="returnConfig">
  71. <template slot="title">
  72. <span class="iconfont titleIcon" :class="item.icon" style="font-size: 20px;"></span>
  73. <span style="margin-left: 5px;">{{ item.name }}</span>
  74. </template>
  75. <template v-for="(item2, index2) in item.children">
  76. <el-menu-item :index="returnIndex(index, index2)" :ref="item2.path" :route="item2.path" :key="index2" class="font-flex-word">
  77. <span slot="title" style="margin-left: 10px;width:120px">{{ item2.name }}</span>
  78. </el-menu-item>
  79. </template>
  80. </el-submenu>
  81. </template>
  82. <el-submenu :index="index.toString()" :key="index" v-else>
  83. <template slot="title">
  84. <span class="iconfont titleIcon" :class="item.icon" style="font-size: 20px;"></span>
  85. <span style="margin-left: 5px;">{{ item.name }}</span>
  86. </template>
  87. <template v-for="(item2, index2) in item.children">
  88. <el-menu-item :index="returnIndex(index, index2)" :ref="item2.path" :route="item2.path" :key="index2" class="font-flex-word">
  89. <span slot="title" style="margin-left: 10px;width:120px">{{ item2.name }}</span>
  90. </el-menu-item>
  91. </template>
  92. </el-submenu>
  93. </template>
  94. <el-menu-item :index="returnIndex(index, index)" :route="item.children[0].path" :ref="item.children[0].path" v-else>
  95. <span class="iconfont titleIcon" :class="item.icon" style="font-size: 20px;"></span>
  96. <span slot="title" style="margin-left: 5px;">{{ item.children[0].name }}</span>
  97. </el-menu-item>
  98. </div>
  99. </template>
  100. </el-menu>
  101. </el-aside>
  102. <el-main id="main">
  103. <router-view />
  104. <div class="fontColorC" style="text-align: center;margin: 10px 0;">Copyright © {{$moment().format('YYYY')}} 广东功道云数字科技有限公司</div>
  105. </el-main>
  106. </el-container>
  107. <!-- 续费升级 -->
  108. <el-dialog class="续费升级" :visible.sync="isTz" width="400px">
  109. <div style="border-radius: 15px;border: 1px solid #f1f1f1;padding: 10px; width: 276px;box-sizing: border-box;margin: 0 auto;">
  110. <img src="./assets/image/code.png" />
  111. </div>
  112. <div class="fontColorC" style="text-align: center;margin-top: 15px;font-size: 18px;">手机钉钉扫码,付费升级</div>
  113. </el-dialog>
  114. <el-dialog :close-on-click-modal="false" title="轻松四步落地积分制" :visible.sync="wn_show" width="680px">
  115. <el-row :gutter="0" class="set_role_div" style="border-top:1px solid rgb(234 234 234);">
  116. <el-col :span="8" style="padding:20px 0 20px 0;">
  117. <el-menu default-active="0" style="border: none">
  118. <el-menu-item
  119. :index="index.toString()"
  120. v-for="(item, index) in activeName"
  121. :key="index"
  122. @click="open_right(item)"
  123. style="margin-bottom:20px;position: relative;height:40px;line-height:40px;"
  124. >
  125. <b style="display: inline-block;font-size:16px;text-align:center;">{{ index + 1 }}&nbsp;&nbsp;</b>
  126. <span slot="title" style="padding-left: 10px;">{{ item.name }}</span>
  127. <span v-if="index < activeName.length - 1" style="width:1px;height:15px;border:1px solid rgb(224 224 224);position: absolute;bottom:-17px;left:23px;"></span>
  128. </el-menu-item>
  129. </el-menu>
  130. </el-col>
  131. <el-col :span="1" style="height:370px;border-right:1px solid rgb(234 234 234);"></el-col>
  132. <el-col :span="15" style="padding:20px 0 20px 0;">
  133. <div>
  134. <el-row>
  135. <div style="text-align:center;margin-top:25px;color: #35353a;font-size:16px;">{{ activeNameRig.name }}</div>
  136. <div
  137. v-if="activeNameRig.code == '0' || activeNameRig.code == '1'"
  138. :style="'display:flex;justify-content: space-around;margin:75px auto 0;width:' + usingwidth + 'px;flex-wrap:wrap;'"
  139. >
  140. <div v-for="(item, index) in activeNameRig.item" :key="index">
  141. <div style="text-align:center;display:flex;">
  142. <div @click="strategyClick(item.push)" style="cursor: pointer;">
  143. <img :src="item.image" alt="" style="width:50px;" />
  144. <p style="margin:0;padding:0;padding-top:10px;">{{ item.name }}</p>
  145. <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{ item.conf }}</p>
  146. </div>
  147. <i class="el-icon-right" :style="'font-size:30px;margin-top:57px;margin-left:' + usingmarginL + 'px;'"
  148. v-if="index < activeNameRig.item.length - 1" />
  149. </div>
  150. </div>
  151. </div>
  152. <div v-if="activeNameRig.code == '2'" :style="'display:flex;justify-content: space-around;margin:20px auto 0;width:' + usingwidth + 'px;flex-wrap:wrap;'">
  153. <el-col :span="14"
  154. style="display:flex;flex-wrap:wrap;justify-content: space-around;text-align:center;margin-left:20px;position: relative;"
  155. >
  156. <i class="el-icon-plus" style="font-size:30px;position: absolute;top:45%;" />
  157. <div v-for="(item, index) in activeNameRig.item" :key="index" style="width:49%;margin-top:60px;">
  158. <div style="cursor: pointer;" v-if="index != 2" @click="strategyClick(item.push)">
  159. <img :src="item.image" alt="" style="width:50px;" />
  160. <p style="margin:0;padding:0;padding-top:10px;">{{ item.name }}</p>
  161. <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{ item.conf }}</p>
  162. </div>
  163. </div>
  164. </el-col>
  165. <el-col :span="8" v-if="activeNameRig.code == '2'">
  166. <div v-for="(item, index) in activeNameRig.item" :key="index">
  167. <div style="text-align:center;display:flex;margin-top:60px;" v-if="index == 2">
  168. <i class="el-icon-right" style="font-size:30px;margin-top:57px;" />
  169. <div style="margin-left:25px;cursor: pointer;" @click="strategyClick(item.push)">
  170. <img :src="item.image" alt="" style="width:50px;" />
  171. <p style="margin:0;padding:0;padding-top:10px;">{{ item.name }}</p>
  172. <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{ item.conf }}</p>
  173. </div>
  174. </div>
  175. </div>
  176. </el-col>
  177. </div>
  178. <div v-if="activeNameRig.code == '3'" :style="'display:flex;justify-content: space-around;margin:20px auto 0;width:' + usingwidth + 'px;flex-wrap:wrap;'">
  179. <el-col :span="24"
  180. style="display:flex;flex-wrap:wrap;justify-content: space-around;text-align:center;margin-left:20px;position: relative;"
  181. >
  182. <i class="el-icon-plus" style="font-size:30px;position: absolute;top:45%;" />
  183. <div v-for="(item, index) in activeNameRig.item" :key="index" style="width:49%;margin-top:20px;">
  184. <div style="cursor: pointer;" v-if="index != 4" @click="strategyClick(item.push)">
  185. <img :src="item.image" alt="" style="width:50px;" />
  186. <p style="margin:0;padding:0;padding-top:10px;">{{ item.name }}</p>
  187. <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{ item.conf }}</p>
  188. </div>
  189. </div>
  190. </el-col>
  191. <el-col :span="8" v-if="activeNameRig.code == '2'">
  192. <div v-for="(item, index) in activeNameRig.item" :key="index">
  193. <div style="text-align:center;display:flex;margin-top:60px;" v-if="index == 4">
  194. <i class="el-icon-right" style="font-size:30px;margin-top:57px;" />
  195. <div style="margin-left:25px;cursor: pointer;" @click="strategyClick(item.push)">
  196. <img :src="item.image" alt="" style="width:50px;" />
  197. <p style="margin:0;padding:0;padding-top:10px;">{{ item.name }}</p>
  198. <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{ item.conf }}</p>
  199. </div>
  200. </div>
  201. </div>
  202. </el-col>
  203. </div>
  204. </el-row>
  205. </div>
  206. </el-col>
  207. </el-row>
  208. </el-dialog>
  209. </el-container>
  210. </template>
  211. <script>
  212. import { createSocket,sendWSPush,sendPing } from './api/websocket'
  213. import { removeCache } from './api/auth'
  214. export default {
  215. data() {
  216. return {
  217. loading: false,
  218. userData: {},
  219. routers: [],
  220. info: {},
  221. wn_show: false,
  222. defaultActive: '0-0',
  223. isTz: false,
  224. direction: 'rtl',
  225. corpMessage: {} ,//企业套餐信息
  226. information:{name:''},
  227. usingmarginL: '26',
  228. usingwidth: '220',
  229. activeNameRig: {
  230. name: '员工积极参与,管理者权责分明',
  231. code: '0',
  232. item: [
  233. { image: require('./assets/image/guild_dept_pic.png'), name: '组织架构', conf: '去配置', push: '/framework' },
  234. { image: require('./assets/image/role_manage.png'), name: '角色权限', conf: '去配置', push: '/jurisdiction' }
  235. ]
  236. },
  237. activeName: [
  238. { name: '完善部门人员信息及授权', code: '0' },
  239. { name: '建立积分奖扣制度', code: '1' },
  240. { name: '积分执行与实施', code: '2' },
  241. { name: '积分排名统计与分析', code: '3' }
  242. ],
  243. visible:false,
  244. };
  245. },
  246. watch: {
  247. wn_show(val){
  248. if(!val){
  249. this.visible=true;
  250. setTimeout(()=>{
  251. this.visible=false;
  252. },3000)
  253. }
  254. },
  255. $route(to, from) {
  256. var str = to.path;
  257. this.routers.map((item, index) => {
  258. if (item.children.length > 0) {
  259. item.children.map((item2, index2) => {
  260. if (item2.path == str) {
  261. this.defaultActive = index + '-' + index2;
  262. this.$setCache('path', index + '-' + index2);
  263. }
  264. });
  265. }
  266. });
  267. if(this.$getCache('inform')){
  268. this.getInform()
  269. removeCache('inform')
  270. }
  271. }
  272. },
  273. computed:{
  274. returnConfig(){
  275. return this.$store.getters.config.shop_status==1;
  276. }
  277. },
  278. created() {
  279. this.cheakAx();
  280. this.initRouter();
  281. this.getEmployee()//缓存人员列表
  282. this.getInform();
  283. },
  284. mounted() {
  285. this.$setCache('isUrl',false)//清楚代办进入
  286. this.getInfo();
  287. var url = window.location.href;
  288. var str = this.GetRequest(url).corpId || 'ding49b5c3bf0b205896bc961a6cb783455b';
  289. var corpId = str.split('#')[0];
  290. if (corpId) {
  291. this.getCorp(corpId);
  292. }
  293. this.$nextTick(function() {
  294. if (!this.$authoritys('employee') && !this.$authoritys('dept_manager')) {
  295. if (this.$getCache('wn_show')) {
  296. this.wn_show = false;
  297. } else {
  298. this.wn_show = true;
  299. this.$setCache('wn_show', 'true');
  300. }
  301. }
  302. });
  303. },
  304. methods: {
  305. strategyClick(item) {
  306. this.wn_show = false;
  307. this.$router.push({ path: item });
  308. },
  309. open_right(item) {
  310. if (item.code == '0') {
  311. this.usingmarginL = '26';
  312. this.usingwidth = '220';
  313. this.activeNameRig = {
  314. name: '员工积极参与,管理者权责分明',
  315. code: '0',
  316. item: [
  317. { image: require('./assets/image/guild_dept_pic.png'), name: '组织架构', conf: '去配置', push: '/framework' },
  318. { image: require('./assets/image/role_manage.png'), name: '角色权限', conf: '去配置', push: '/jurisdiction' }
  319. ]
  320. };
  321. } else if (item.code == '1') {
  322. this.usingmarginL = '14';
  323. this.usingwidth = '300';
  324. this.activeNameRig = {
  325. name: '健全企业规章制度,建立公平的奖扣分体系',
  326. code: '1',
  327. item: [
  328. { image: require('./assets/image/rule.png'), name: '积分规则', conf: '去配置', push: '/rule' },
  329. { image: require('./assets/image/length_point.png'), name: '系统配置', conf: '去配置', push: '/systemLayout' },
  330. { image: require('./assets/image/base_point.png'), name: '自动积分', conf: '去配置', push: '/voluntarilyPoint' }
  331. ]
  332. };
  333. } else if (item.code == '2') {
  334. this.usingwidth = '380';
  335. this.activeNameRig = {
  336. name: '员工积极挣分,管理者奖罚分明',
  337. code: '2',
  338. item: [
  339. { image: require('./assets/image/entry_list.png'), name: '奖分/扣分', conf: '去奖扣', push: '/award_punish' },
  340. { image: require('./assets/image/my_publish.png'), name: '任务', conf: '去发布', push: '/my_issue' },
  341. { image: require('./assets/image/att_review.png'), name: '审批打分', conf: '去审批', push: '/approval_list' }
  342. ]
  343. };
  344. } else if (item.code == '3') {
  345. this.usingwidth = '380';
  346. this.activeNameRig = {
  347. name: '提高管理执行力,让优秀员工不吃亏',
  348. code: '3',
  349. item: [
  350. { image: require('./assets/image/add_ticket.png'), name: '积分排名', conf: '去查看', push: '/dept_rank' },
  351. { image: require('./assets/image/role_manage.png'), name: '管理者执行力', conf: '去查看', push: '/manager_statistics' },
  352. { image: require('./assets/image/data_team.png'), name: '部门分析', conf: '去查看', push: '/department_statistics' },
  353. { image: require('./assets/image/length_point.png'), name: '个人分析', conf: '去查看', push: '/individual_statistics' }
  354. ]
  355. };
  356. }
  357. },
  358. openWebSocket(){
  359. // 接收消息
  360. const getsocketData = e => { // 创建接收消息函数
  361. const data = e && e.detail.data
  362. }
  363. // 注册监听事件
  364. window.addEventListener('onmessageWS', getsocketData)
  365. // 在需要的时候卸载监听事件,比如离开页面
  366. window.removeEventListener('onmessageWS', getsocketData)
  367. },
  368. getInform(){
  369. let params = {
  370. page: 1,
  371. page_size: 1
  372. };
  373. this.$axios('get', '/api/information/index', params).then(res => {
  374. if (res.data.code == 1) {
  375. let data= res.data.data;
  376. if(data[0]){
  377. this.information=data[0]
  378. }else{
  379. this.information={name:''};
  380. }
  381. }
  382. });
  383. },
  384. async cheakAx(name) {
  385. await this.$axios('get', '/api/integral/site/config').then(res => {
  386. this.$store.dispatch('setConfig', res.data.data);
  387. })
  388. },
  389. initRouter() {
  390. this.routers = [
  391. { name: '首页', children: this.returnRoutersArr('home'), icon: 'icon-shouye' },
  392. { name: 'A/B分', children: this.returnRoutersArr('abPoint'), icon: 'icon-PC_gongzuotai_ABfen' },
  393. { name: '任务', children: this.returnRoutersArr('task'), icon: 'icon-kaoqin_kaoqinyuebaobiao' },
  394. { name: '统计', children: this.returnRoutersArr('ranking'), icon: 'icon-dingdingPC_tongji1' },
  395. { name: '奖票', children: this.returnRoutersArr('award'), icon: 'icon-piao' },
  396. ];
  397. //this.$authoritys('权限名') 判断权限
  398. if (this.$authoritys('creator') || this.$authoritys('admin') || this.$authoritys('point_manager') || this.$authoritys('dept_manager')) {
  399. this.routers.splice(3, 0, { name: '审批', children: this.returnRoutersArr('workbench'), icon: 'icon-shezhi_jifenguize' });
  400. }
  401. if (this.$authoritys('creator') || this.$authoritys('admin') || this.$authoritys('point_manager')) {
  402. this.routers.push({ name: '福利', children: this.returnRoutersArr('welfare'), icon: 'icon-fulizhongxin'});
  403. this.routers.push({ name: '设置', children: this.returnRoutersArr('set'), icon: 'icon-dingdingPC_shezhi1' });
  404. }
  405. //this.returnRoutersArr('set',true) 加true表示不限制路由
  406. this.userData = this.$getUserData();
  407. if (this.$route.path != '/home') {
  408. //当刷新页面是控制左边导航栏的选中
  409. this.defaultActive = this.$getCache('path');
  410. }
  411. },
  412. openHome() {
  413. this.$router.push({ path: '/home' });
  414. },
  415. GetRequest(urlStr) {
  416. if (typeof urlStr == 'undefined') {
  417. var url = decodeURI(location.search); //获取url中"?"符后的字符串
  418. } else {
  419. var url = '?' + urlStr.split('?')[1];
  420. }
  421. var theRequest = new Object();
  422. var strs;
  423. if (url.indexOf('?') != -1) {
  424. var str = url.substr(1);
  425. strs = str.split('&');
  426. for (var i = 0; i < strs.length; i++) {
  427. theRequest[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
  428. }
  429. }
  430. return theRequest;
  431. },
  432. //获取套餐信息
  433. getCorp(corpId) {
  434. this.$axios('get', 'api/order/corp', { corp_id: corpId }).then(res => {
  435. this.corpMessage = res.data.data;
  436. });
  437. },
  438. //当刷新页面是控制左边导航栏的选中
  439. activeRouter(index, indexPath) {
  440. this.$setCache('path', indexPath[1] ? indexPath[1] : indexPath[0]);
  441. },
  442. routerAstrict(data) {
  443. //限制路由
  444. let obj = [];
  445. let supAuthority = this.$supremeAuthority(); //$supremeAuthority获取当前登录者的最高权限
  446. data.forEach(item => {
  447. if (!item.hidden) {
  448. if (!item.meta.jurisdiction) {
  449. obj.push(item);
  450. } else {
  451. if (item.meta.jurisdiction.indexOf(supAuthority) == -1) {
  452. obj.push(item);
  453. }
  454. }
  455. }
  456. });
  457. return obj;
  458. },
  459. returnRoutersArr(str, bool) {
  460. var routers = this.$router.options.routes[0].children;
  461. var routersArr = [];
  462. routers.forEach(item => {
  463. if (item.meta.groupCode == str&&!item.meta.noShow) {
  464. //获取对应模块的路由
  465. routersArr.push(item);
  466. }
  467. });
  468. if (bool) {
  469. return routersArr;
  470. }
  471. return this.routerAstrict(routersArr);
  472. },
  473. returnIndex(str, str2) {
  474. return str + '-' + str2;
  475. },
  476. showWn() {
  477. this.wn_show = true;
  478. },
  479. getInfo() {
  480. var that = this;
  481. this.$axios('get', '/api/site/info').then(res => {
  482. that.info = res.data.data;
  483. });
  484. },
  485. //获取员工列表
  486. getEmployee() {
  487. this.$axios('get', '/api/employee/index', { dept_id: 0, page: 1, page_size: 3000,is_official:1 }).then(res => {
  488. let map={};
  489. res.data.data.list.map(item=>{
  490. map[item.id]=item
  491. })
  492. this.$setCache("userList",map)
  493. })
  494. },
  495. },
  496. };
  497. </script>
  498. <style scoped="scoped" lang="scss">
  499. .popoverText span{
  500. width: 100px;
  501. display: block;
  502. }
  503. .popoverText{
  504. line-height: 30px;
  505. font-size: 14px;
  506. }
  507. .megData div:nth-child(1) {
  508. background-image: linear-gradient(to bottom, #5e6e9b 0%, #232d48 100%);
  509. text-align: center;
  510. color: #e1bf66;
  511. border-top-left-radius: 25px;
  512. border-bottom-left-radius: 25px;
  513. line-height: 35px;
  514. height: 35px;
  515. padding: 0 10px;
  516. }
  517. .megData div:nth-child(2) {
  518. background-image: linear-gradient(to bottom, #ffeab2 0%, #e1bf66 100%);
  519. text-align: center;
  520. color: #232d48;
  521. border-top-right-radius: 25px;
  522. border-bottom-right-radius: 25px;
  523. line-height: 35px;
  524. height: 35px;
  525. padding: 0 10px;
  526. }
  527. .wn-box {
  528. padding: 20px 0;
  529. }
  530. .wn-box .flex-1 {
  531. cursor: pointer;
  532. }
  533. .wn-box .flex-1 div:nth-child(1) {
  534. width: 55px;
  535. height: 55px;
  536. border-radius: 50%;
  537. text-align: center;
  538. line-height: 55px;
  539. background-color: #e0f2ff;
  540. color: #26a2ff;
  541. margin-bottom: 20px;
  542. }
  543. .wn-box .flex-1 div:nth-child(2) {
  544. width: 110px;
  545. border-radius: 25px;
  546. border: 1px solid #26a2ff;
  547. padding: 7px 10px;
  548. text-align: center;
  549. color: #26a2ff;
  550. }
  551. .wn-box .flex-1:hover div:nth-child(1) {
  552. color: #fff;
  553. background-color: #26a2ff;
  554. }
  555. .wn-box .flex-1:hover div:nth-child(2) {
  556. color: #fff;
  557. background-color: #26a2ff;
  558. }
  559. .el-menu-vertical-demo:not(.el-menu--collapse) {
  560. width: 180px;
  561. // min-height: 400px;
  562. }
  563. .el-header {
  564. background-color: #fff;
  565. // line-height: 60px;
  566. padding: 0 !important;
  567. border-bottom: 1px solid #f1f1f1;
  568. }
  569. .el-menu {
  570. overflow: hidden;
  571. border: none;
  572. }
  573. .el-aside {
  574. transition: width 0.28s;
  575. width: 180px !important;
  576. background-color: #fff;
  577. height: calc(100vh - 60px);
  578. }
  579. .el-aside::-webkit-scrollbar {
  580. width: 0px;
  581. background-color: #fff;
  582. }
  583. .el-aside::-webkit-scrollbar-thumb {
  584. background-color: #ccc;
  585. }
  586. .con_nav_left {
  587. background: #fff;
  588. overflow-y: scroll;
  589. }
  590. .box-all {
  591. height: 100%;
  592. overflow: hidden;
  593. }
  594. .el-main {
  595. background-color: #f4f6f9;
  596. height: calc(100vh - 60px);
  597. overflow-y: scroll;
  598. padding: 10px;
  599. min-width: 1000px;
  600. }
  601. .el-main::-webkit-scrollbar {
  602. width: 10px;
  603. height: 10px;
  604. background-color: #fff;
  605. }
  606. .el-main::-webkit-scrollbar-thumb {
  607. background-color: #ccc;
  608. }
  609. .logo-box {
  610. width: 180px;
  611. cursor: pointer;
  612. }
  613. .logo-box .logo {
  614. width: 30px;
  615. height: 30px;
  616. margin-right: 5px;
  617. border-radius: 6px;
  618. }
  619. .logo-box div {
  620. font-size: 16px;
  621. font-weight: 600;
  622. }
  623. .wn {
  624. height: 26px;
  625. width: 26px;
  626. margin-right: 5px;
  627. cursor: pointer;
  628. }
  629. .hea-right {
  630. padding: 0 20px;
  631. }
  632. .btnWn{
  633. cursor: pointer;
  634. border: 1px solid #ccc;
  635. border-radius: 4px;
  636. padding: 7px 10px;
  637. margin-right: 10px;
  638. background-color: #409eff;
  639. border-color: #409eff;
  640. color: #fff;
  641. }
  642. .upgrade {
  643. // margin-left: 10px;
  644. // margin-right: 10px;
  645. }
  646. ::v-deep .el-menu-item {
  647. padding-right: 10px !important;
  648. }
  649. ::v-deep .el-menu-item.is-active {
  650. color: #26a2ff;
  651. background-color: #ecf5ff;
  652. }
  653. .popoverBox {
  654. // background-color: #232d48;
  655. }
  656. </style>