index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  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')}} 广东功道云数字科技有限公司 All Rights Reserved</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. ];
  396. //this.$authoritys('权限名') 判断权限
  397. if (this.$authoritys('creator') || this.$authoritys('admin') || this.$authoritys('point_manager') || this.$authoritys('dept_manager')) {
  398. this.routers.splice(3, 0, { name: '审批', children: this.returnRoutersArr('workbench'), icon: 'icon-shezhi_jifenguize' });
  399. }
  400. if (this.$authoritys('creator') || this.$authoritys('admin') || this.$authoritys('point_manager')) {
  401. this.routers.push({ name: '福利', children: this.returnRoutersArr('welfare'), icon: 'icon-fulizhongxin'});
  402. this.routers.push({ name: '设置', children: this.returnRoutersArr('set'), icon: 'icon-dingdingPC_shezhi1' });
  403. }
  404. //this.returnRoutersArr('set',true) 加true表示不限制路由
  405. this.userData = this.$getUserData();
  406. if (this.$route.path != '/home') {
  407. //当刷新页面是控制左边导航栏的选中
  408. this.defaultActive = this.$getCache('path');
  409. }
  410. },
  411. openHome() {
  412. this.$router.push({ path: '/home' });
  413. },
  414. GetRequest(urlStr) {
  415. if (typeof urlStr == 'undefined') {
  416. var url = decodeURI(location.search); //获取url中"?"符后的字符串
  417. } else {
  418. var url = '?' + urlStr.split('?')[1];
  419. }
  420. var theRequest = new Object();
  421. var strs;
  422. if (url.indexOf('?') != -1) {
  423. var str = url.substr(1);
  424. strs = str.split('&');
  425. for (var i = 0; i < strs.length; i++) {
  426. theRequest[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
  427. }
  428. }
  429. return theRequest;
  430. },
  431. //获取套餐信息
  432. getCorp(corpId) {
  433. this.$axios('get', 'api/order/corp', { corp_id: corpId }).then(res => {
  434. this.corpMessage = res.data.data;
  435. });
  436. },
  437. //当刷新页面是控制左边导航栏的选中
  438. activeRouter(index, indexPath) {
  439. this.$setCache('path', indexPath[1] ? indexPath[1] : indexPath[0]);
  440. },
  441. routerAstrict(data) {
  442. //限制路由
  443. let obj = [];
  444. let supAuthority = this.$supremeAuthority(); //$supremeAuthority获取当前登录者的最高权限
  445. data.forEach(item => {
  446. if (!item.hidden) {
  447. if (!item.meta.jurisdiction) {
  448. obj.push(item);
  449. } else {
  450. if (item.meta.jurisdiction.indexOf(supAuthority) == -1) {
  451. obj.push(item);
  452. }
  453. }
  454. }
  455. });
  456. return obj;
  457. },
  458. returnRoutersArr(str, bool) {
  459. var routers = this.$router.options.routes[0].children;
  460. var routersArr = [];
  461. routers.forEach(item => {
  462. if (item.meta.groupCode == str&&!item.meta.noShow) {
  463. //获取对应模块的路由
  464. routersArr.push(item);
  465. }
  466. });
  467. if (bool) {
  468. return routersArr;
  469. }
  470. return this.routerAstrict(routersArr);
  471. },
  472. returnIndex(str, str2) {
  473. return str + '-' + str2;
  474. },
  475. showWn() {
  476. this.wn_show = true;
  477. },
  478. getInfo() {
  479. var that = this;
  480. this.$axios('get', '/api/site/info').then(res => {
  481. that.info = res.data.data;
  482. });
  483. },
  484. //获取员工列表
  485. getEmployee() {
  486. this.$axios('get', '/api/employee/index', { dept_id: 0, page: 1, page_size: 3000,is_official:1 }).then(res => {
  487. let map={};
  488. res.data.data.list.map(item=>{
  489. map[item.id]=item
  490. })
  491. this.$setCache("userList",map)
  492. })
  493. },
  494. },
  495. };
  496. </script>
  497. <style scoped="scoped" lang="scss">
  498. .popoverText span{
  499. width: 100px;
  500. display: block;
  501. }
  502. .popoverText{
  503. line-height: 30px;
  504. font-size: 14px;
  505. }
  506. .megData div:nth-child(1) {
  507. background-image: linear-gradient(to bottom, #5e6e9b 0%, #232d48 100%);
  508. text-align: center;
  509. color: #e1bf66;
  510. border-top-left-radius: 25px;
  511. border-bottom-left-radius: 25px;
  512. line-height: 35px;
  513. height: 35px;
  514. padding: 0 10px;
  515. }
  516. .megData div:nth-child(2) {
  517. background-image: linear-gradient(to bottom, #ffeab2 0%, #e1bf66 100%);
  518. text-align: center;
  519. color: #232d48;
  520. border-top-right-radius: 25px;
  521. border-bottom-right-radius: 25px;
  522. line-height: 35px;
  523. height: 35px;
  524. padding: 0 10px;
  525. }
  526. .wn-box {
  527. padding: 20px 0;
  528. }
  529. .wn-box .flex-1 {
  530. cursor: pointer;
  531. }
  532. .wn-box .flex-1 div:nth-child(1) {
  533. width: 55px;
  534. height: 55px;
  535. border-radius: 50%;
  536. text-align: center;
  537. line-height: 55px;
  538. background-color: #e0f2ff;
  539. color: #26a2ff;
  540. margin-bottom: 20px;
  541. }
  542. .wn-box .flex-1 div:nth-child(2) {
  543. width: 110px;
  544. border-radius: 25px;
  545. border: 1px solid #26a2ff;
  546. padding: 7px 10px;
  547. text-align: center;
  548. color: #26a2ff;
  549. }
  550. .wn-box .flex-1:hover div:nth-child(1) {
  551. color: #fff;
  552. background-color: #26a2ff;
  553. }
  554. .wn-box .flex-1:hover div:nth-child(2) {
  555. color: #fff;
  556. background-color: #26a2ff;
  557. }
  558. .el-menu-vertical-demo:not(.el-menu--collapse) {
  559. width: 180px;
  560. // min-height: 400px;
  561. }
  562. .el-header {
  563. background-color: #fff;
  564. // line-height: 60px;
  565. padding: 0 !important;
  566. border-bottom: 1px solid #f1f1f1;
  567. }
  568. .el-menu {
  569. overflow: hidden;
  570. border: none;
  571. }
  572. .el-aside {
  573. transition: width 0.28s;
  574. width: 180px !important;
  575. background-color: #fff;
  576. height: calc(100vh - 60px);
  577. }
  578. .el-aside::-webkit-scrollbar {
  579. width: 0px;
  580. background-color: #fff;
  581. }
  582. .el-aside::-webkit-scrollbar-thumb {
  583. background-color: #ccc;
  584. }
  585. .con_nav_left {
  586. background: #fff;
  587. overflow-y: scroll;
  588. }
  589. .box-all {
  590. height: 100%;
  591. overflow: hidden;
  592. }
  593. .el-main {
  594. background-color: #f4f6f9;
  595. height: calc(100vh - 60px);
  596. overflow-y: scroll;
  597. padding: 10px;
  598. min-width: 1000px;
  599. }
  600. .el-main::-webkit-scrollbar {
  601. width: 10px;
  602. height: 10px;
  603. background-color: #fff;
  604. }
  605. .el-main::-webkit-scrollbar-thumb {
  606. background-color: #ccc;
  607. }
  608. .logo-box {
  609. width: 180px;
  610. cursor: pointer;
  611. }
  612. .logo-box .logo {
  613. width: 30px;
  614. height: 30px;
  615. margin-right: 5px;
  616. border-radius: 6px;
  617. }
  618. .logo-box div {
  619. font-size: 16px;
  620. font-weight: 600;
  621. }
  622. .wn {
  623. height: 26px;
  624. width: 26px;
  625. margin-right: 5px;
  626. cursor: pointer;
  627. }
  628. .hea-right {
  629. padding: 0 20px;
  630. }
  631. .btnWn{
  632. cursor: pointer;
  633. border: 1px solid #ccc;
  634. border-radius: 4px;
  635. padding: 7px 10px;
  636. margin-right: 10px;
  637. background-color: #409eff;
  638. border-color: #409eff;
  639. color: #fff;
  640. }
  641. .upgrade {
  642. // margin-left: 10px;
  643. // margin-right: 10px;
  644. }
  645. ::v-deep .el-menu-item {
  646. padding-right: 10px !important;
  647. }
  648. ::v-deep .el-menu-item.is-active {
  649. color: #26a2ff;
  650. background-color: #ecf5ff;
  651. }
  652. .popoverBox {
  653. // background-color: #232d48;
  654. }
  655. </style>