Navbar.vue 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482
  1. <template>
  2. <div>
  3. <div class="nav_background">
  4. <div class="nav_width">
  5. <el-menu class="navbar topnavbar" mode="horizontal" text-color="white" active-text-color="white" :default-active="activeIndex" >
  6. <div class="logo float-left">
  7. <span class="company_name" @click="$router.push({ path: '/' })">{{site_info.name}}</span>
  8. </div>
  9. <el-menu-item v-for="(item,index) in menu" :key="index" :index="item.meta.title">
  10. <router-link :to="{path: item.path }">{{item.meta.title}}</router-link>
  11. </el-menu-item>
  12. <div class="right-menu" style="color:#eee; cursor: pointer;">
  13. <span style="display: inline-block;margin-right:20px;" v-if="experience_data">
  14. <span style="color:#fff">切换角色</span>
  15. <el-select v-model="experiencevalue" placeholder="请选择" size="medium">
  16. <el-option
  17. v-for="item in experienceoptions"
  18. :key="item.value"
  19. :label="item.label"
  20. :value="item.value">
  21. </el-option>
  22. </el-select>
  23. </span>
  24. <div class="right-menu" style="color:#eee; cursor: pointer;">
  25. <!-- <i class="el-icon-tickets"></i> -->
  26. <span class="PCtutorials" v-if="!this.$authoritys('dept_manager') && !this.$authoritys('employee')" @click="strategys">
  27. <el-popover
  28. placement="bottom-start"
  29. width="200"
  30. trigger="manual"
  31. v-model="tutorialsvisible">
  32. <p>点击此图标可查看“使用帮助”</p>
  33. <div style="text-align: right; margin: 0">
  34. <el-button type="primary" size="mini" @click="tutorialsvisible = false">我知道了</el-button>
  35. </div>
  36. <svg-icon slot="reference" icon-class="PCtutorial" style="margin-bottom:8px;"/>
  37. </el-popover>
  38. </span>
  39. <userImage class="user_img" :id="profile.id" width="40px" height="40px" fontSize="14" :user_name="profile.name"
  40. :img_url="profile.img_url"></userImage>
  41. <!-- <el-dropdown @command="handleCommand">
  42. <span class="el-dropdown-link">
  43. <userImage class="user_img" :id="profile.id" width="40px" height="40px" fontSize="14" :user_name="profile.name"
  44. :img_url="profile.img_url"></userImage>
  45. </span>
  46. <el-dropdown-menu slot="dropdown">
  47. 切换公司或退出账号
  48. <el-dropdown-item v-for="(group,index) in companyList" :key="index" :label="group.label" :divided="group.id == 1"
  49. :class="{active:group.isSelect}" :command="group">
  50. {{group.name}}<i v-if="group.isSelect" class="el-icon-check" style="margin-left: 10px;"></i>
  51. </el-dropdown-item>
  52. </el-dropdown-menu>
  53. </el-dropdown> -->
  54. </div>
  55. </div>
  56. </el-menu>
  57. </div>
  58. </div>
  59. <!-- <el-dialog
  60. title="使用攻略"
  61. :visible.sync="usingTheStrategy"
  62. width="616px">
  63. <span style="color:#909399;font-size:14px">轻松5步,让你快速上手功道云</span>
  64. <div style="display:flex;flex-wrap:wrap;justify-content: space-between;">
  65. <div v-for="(item,index) in pushUsingTheStrategy" :key="index" class="strategyOfThe" @click="openPage(item.key)" style="">
  66. <p style="">
  67. <b style="">{{item.name}}</b><br>
  68. <span style="">{{item.value}}</span>
  69. </p>
  70. </div>
  71. </div>
  72. </el-dialog> -->
  73. <el-dialog title="设置向导" :visible.sync="usingTheStrategy" width="600px">
  74. <div v-for="(item,index) in routers_one" :key="index">
  75. <div class="wn-title fontColorF">{{item.name}}</div>
  76. <div class="flex-box flex-v-ce wn-box">
  77. <div v-for="(arr,att) in item.item" :key="att" class="flex-1 flex-box-v flex-v-ce" @click="usingTheStrategy= false;$router.push({ path: arr.push })">
  78. <!-- <div><span class="iconfont " :class="arr.icon"></span></div> -->
  79. <div><svg-icon slot="reference" :icon-class="arr.icon" /></div>
  80. <div>{{arr.name}}</div>
  81. </div>
  82. </div>
  83. </div>
  84. </el-dialog>
  85. <!-- 老-导航 -->
  86. <!-- <el-dialog
  87. title="轻松四步落地积分+绩效管理体系"
  88. :visible.sync="usingTheStrategy"
  89. width="680px">
  90. <el-row :gutter="0" class="set_role_div" style="border-top:1px solid rgb(234 234 234);">
  91. <el-col :span="8" style="padding:20px 0 20px 0;">
  92. <el-menu default-active="0" class="el-menu-vertical-demo" style="border: none">
  93. <el-menu-item :index="index.toString()" v-for="(item,index) in activeName" :key="index" @click="open_right(item)" style="margin-bottom:20px;position: relative;height:40px;line-height:40px;">
  94. <b style="display: inline-block;font-size:16px;text-align:center;">{{index+1}}&nbsp;&nbsp;</b>
  95. <span slot="title">{{item.name}}</span>
  96. <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>
  97. </el-menu-item>
  98. </el-menu>
  99. </el-col>
  100. <el-col :span="1" style="height:370px;border-right:1px solid rgb(234 234 234);">
  101. </el-col>
  102. <el-col :span="15" style="padding:20px 0 20px 0;">
  103. <div>
  104. <el-row>
  105. <div style="text-align:center;margin-top:25px;color: #35353a;font-size:16px;">{{activeNameRig.name}}</div>
  106. <div v-if="activeNameRig.code=='0'|| activeNameRig.code=='1'" :style="'display:flex;justify-content: space-around;margin:75px auto 0;width:'+usingwidth+'px;flex-wrap:wrap;'">
  107. <div v-for="(item,index) in activeNameRig.item" :key="index" >
  108. <div style="text-align:center;display:flex;">
  109. <div @click="strategyClick(item.push)" style="cursor: pointer;">
  110. <img :src="item.image" alt="" style="width:50px;">
  111. <p style="margin:0;padding:0;padding-top:10px;">{{item.name}}</p>
  112. <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{item.conf}}</p>
  113. </div>
  114. <svg-icon icon-class="rightArrows" :style="'font-size:30px;margin-top:57px;margin-left:'+usingmarginL+'px;'" v-if="index<activeNameRig.item.length-1"/>
  115. </div>
  116. </div>
  117. </div>
  118. <div v-if="activeNameRig.code=='2' || activeNameRig.code=='3'" :style="'display:flex;justify-content: space-around;margin:20px auto 0;width:'+usingwidth+'px;flex-wrap:wrap;'">
  119. <el-col :span="activeNameRig.code=='2'?14:24" style="display:flex;flex-wrap:wrap;justify-content: space-around;text-align:center;margin-left:20px;position: relative;">
  120. <svg-icon icon-class="add" style="font-size:30px;position: absolute;top:45%;" />
  121. <div v-for="(item,index) in activeNameRig.item" :key="index" style="width:49%;margin-top:20px;">
  122. <div style="cursor: pointer;" v-if="index!=4" @click="strategyClick(item.push)">
  123. <img :src="item.image" alt="" style="width:50px;">
  124. <p style="margin:0;padding:0;padding-top:10px;">{{item.name}}</p>
  125. <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{item.conf}}</p>
  126. </div>
  127. </div>
  128. </el-col>
  129. <el-col :span="8" v-if="activeNameRig.code=='2'">
  130. <div v-for="(item,index) in activeNameRig.item" :key="index">
  131. <div style="text-align:center;display:flex;margin-top:60px;" v-if="index==4">
  132. <svg-icon icon-class="rightArrows" style="font-size:30px;margin-top:57px;" />
  133. <div style="margin-left:25px;cursor: pointer;" @click="strategyClick(item.push)">
  134. <img :src="item.image" alt="" style="width:50px;">
  135. <p style="margin:0;padding:0;padding-top:10px;">{{item.name}}</p>
  136. <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{item.conf}}</p>
  137. </div>
  138. </div>
  139. </div>
  140. </el-col>
  141. </div>
  142. </el-row>
  143. </div>
  144. </el-col>
  145. </el-row>
  146. </el-dialog> -->
  147. <el-dialog
  148. title="创建新企业"
  149. :visible.sync="StartAnewBusiness"
  150. width="30%"
  151. :before-close="handleClose">
  152. <el-form :model="rejectForm" ref="rejectForm" label-width="80px" v-loading="rejectLoading">
  153. <el-form-item label="企业名称" prop="StartAnewBusinessName"
  154. :rules="[
  155. { required: true, message: '请输入企业名称', trigger: 'blur' },
  156. {
  157. min: 3,
  158. max: 30,
  159. message: '长度在 3 到 30 个字符',
  160. trigger: 'blur'
  161. }
  162. ]"
  163. >
  164. <el-input
  165. type="textarea"
  166. placeholder="公司名/组织名称"
  167. v-model="rejectForm.StartAnewBusinessName"
  168. maxlength="30"
  169. show-word-limit
  170. >
  171. </el-input>
  172. </el-form-item>
  173. <el-form-item label="企业规模" prop="remark">
  174. <el-select v-model="rejectForm.StartAnewBusinessVal" placeholder="请选择">
  175. <el-option
  176. v-for="item in StartAnewBusinessPeople"
  177. :key="item.value"
  178. :label="item.label"
  179. :value="item.value">
  180. </el-option>
  181. </el-select>
  182. </el-form-item>
  183. <el-form-item>
  184. <el-button @click="adoptClose">取 消</el-button>
  185. <el-button type="primary" @click="StartAnewBuY('rejectForm')">创建完成</el-button>
  186. </el-form-item>
  187. </el-form>
  188. </el-dialog>
  189. <el-dialog
  190. title="完善个人信息"
  191. :visible.sync="amendMessage "
  192. width="500px"
  193. :close-on-click-modal="false"
  194. :before-close="amendMessageClose">
  195. <el-form :model="changeInformation" ref="changeInformation" label-width="80px" style="margin-top:20px;" v-loading="amendMessageLoading">
  196. <el-form-item label="姓名" prop="name"
  197. :rules="[
  198. { required: true, message: '请填写真实姓名', trigger: 'blur' },
  199. {
  200. min: 0,
  201. max: 50,
  202. message: '长度不能大于 50 个字符',
  203. trigger: 'blur'
  204. }
  205. ]"
  206. >
  207. <el-input
  208. name="name"
  209. v-model="changeInformation.name"
  210. placeholder="请填写真实姓名"
  211. show-word-limit
  212. />
  213. </el-form-item>
  214. <el-form-item label="密码" prop="password"
  215. :rules="[
  216. { required: true, message: '请设置新密码(默认密码为手机号后六位)', trigger: 'blur' },
  217. {
  218. min: 6,
  219. max: 20,
  220. message: '长度在 6 到 20 个字符',
  221. trigger: 'blur'
  222. }
  223. ]">
  224. <el-input
  225. v-model="changeInformation.password"
  226. placeholder="请设置登录密码"
  227. />
  228. </el-form-item>
  229. <el-form-item>
  230. <div style="display: flex;justify-content: flex-end;margin:5px 10px 0 0">
  231. <!-- <el-button @click="adoptClose" style="margin-right:16px;">取 消</el-button> -->
  232. <el-button type="primary" @click="amendMessageAchieve('changeInformation')">完 成</el-button>
  233. </div>
  234. </el-form-item>
  235. </el-form>
  236. </el-dialog>
  237. </div>
  238. </template>
  239. <script>
  240. import qs from 'qs'
  241. import {
  242. mapGetters,
  243. mapState
  244. } from 'vuex'
  245. // import request from '@/utils/request'
  246. import request_user from '@/utils/request-user'
  247. import {
  248. setToken
  249. } from '@/utils/auth'
  250. export default {
  251. data() {
  252. let site_id = this.$store.getters.user_info.site_id
  253. // let companeyListMap = {}
  254. // companeyListMap[site_id.toString()] = ''
  255. return {
  256. routers_one: [
  257. {
  258. name: '三步轻松搭建积分管理体系:定人员、分责权、建制度',
  259. item: [
  260. {icon: 'employee_table_icon',name: '1、确定组织架构',push: '/employee_table'},
  261. {icon: 'set_role_icon',name: '2、分配角色权限',push: '/set_role'},
  262. {icon: 'rule_manage_icon',name: '3、建立积分规则',push: '/rule_manage'},
  263. ],
  264. },
  265. {
  266. name: '更有效地做好积分激励和认可,你还可以设置以下2项',
  267. item: [
  268. {icon: 'set_basics_icon',name: '基础设置',push: '/set_basics'},
  269. // {icon: '',name: '考勤积分',push: ''},
  270. {icon: 'fixed_integral_icon',name: '自动积分',push: '/fixed_integral'},
  271. ],
  272. }
  273. ],
  274. tutorialsvisible:false,
  275. usingmarginL:'26',
  276. usingwidth:'220',
  277. activeNameRig:{
  278. name:'员工积极参与,管理者权责分明',
  279. code:'0',
  280. item:[
  281. {image:'static/images/guild_dept_pic.png',name:'组织架构',conf:'去配置',push:'/employee_table'},
  282. {image:'static/images/role_manage.png',name:'角色权限',conf:'去配置',push:'/set_role'}
  283. ]
  284. },
  285. activeName: [{name:'完善部门人员信息及授权',code:'0',},{name:'建立积分奖扣制度',code:'1',},{name:'积分执行与实施',code:'2',},{name:'积分排名统计与分析',code:'3',}],
  286. rejectLoading:false,
  287. rejectForm:{
  288. StartAnewBusinessName:'',
  289. StartAnewBusinessVal:'1-10人',
  290. },
  291. StartAnewBusinessPeople: [{value:'1-10人',lable:0}, {value:'10-50人',lable:1}, {value:'50-200人',lable:2}, {value:'200-500人',lable:3}, {value:'500-1000人',lable:4}, {value:'1000人以上',lable:5}],
  292. StartAnewBusiness:false,
  293. experience_data:false,//是否体验账号
  294. experienceoptions: [{
  295. value: 1,
  296. label: '创始人'
  297. }, {
  298. value: 2,
  299. label: '管理员'
  300. }],
  301. experiencevalue: JSON.parse(localStorage.getItem("Experience_data"))?JSON.parse(localStorage.getItem("Experience_data")).name== "creator"?'创始人':'管理员':'',
  302. // deptManagerRoutersNav:false,
  303. usingTheStrategy:false,//使用攻略弹窗
  304. pushUsingTheStrategy:[//使用攻略数据
  305. {
  306. name:'第一步:完善企业与个人信息',
  307. value:'完善企业信息,做好使用第一步',
  308. key:1
  309. },
  310. {
  311. name:'第二步:完善基础设置',
  312. value:'在开始使用功道云前完善基础设置',
  313. key:2
  314. },
  315. {
  316. name:'第三步:完善组织架构',
  317. value:'建立部门再批量导入员工或逐个添加员工',
  318. key:3
  319. },
  320. {
  321. name:'第四步:完善积分规则',
  322. value:'积分规则类似于公司的规章制度',
  323. key:4
  324. },
  325. {
  326. name:'第五步:开始使用',
  327. value:'考勤用于日常打卡',
  328. key:5
  329. },
  330. ],
  331. // companyList: [],
  332. // companeyListMap: companeyListMap,
  333. totalScore: '',
  334. profile: this.$store.getters.user_info,
  335. company_info: {},
  336. cpmpanyId: this.$store.getters.user_info.site_id,
  337. firstId: 0,
  338. secrt_types: 0,
  339. manager_type: 4,
  340. secrt_type: [{
  341. id: 0,
  342. label: '新版'
  343. },
  344. {
  345. id: 1,
  346. label: '旧版'
  347. }
  348. ],
  349. rolelist: [{
  350. value: 0,
  351. label: '普通员工'
  352. },
  353. {
  354. value: 1,
  355. label: '部门管理者'
  356. },
  357. {
  358. value: 2,
  359. label: '公司管理员'
  360. },
  361. {
  362. value: 3,
  363. label: '积分专员'
  364. },
  365. {
  366. value: 4,
  367. label: '超级管理员'
  368. }
  369. ],
  370. concent: [{
  371. id: 2,
  372. name: '创建新企业'
  373. },{
  374. id: 1,
  375. name: '退出账号'
  376. }],
  377. logoImgUrl: 'static/images/logo.png',
  378. logoImgUrlMini: 'static/images/logo_icon.png',
  379. menu: [],
  380. activeIndex:'',//默认头部导航点击
  381. //权限
  382. dept_manager:false,//是否只是部门管理者
  383. creator:false,//是否是创始人
  384. user_infos:this.$store.getters.user_info.employee_detail.role_list,//当前登录账号的权限
  385. amendMessage:false,
  386. changeInformation : {
  387. password: '',
  388. name: ''
  389. },
  390. rawPassword:'',
  391. amendMessageLoading:false,
  392. authoritys:{},
  393. }
  394. },
  395. watch: {
  396. "$route"(val) {
  397. this.setDefaultRouter();
  398. },
  399. experiencevalue(val){
  400. this.experienceCompany(val)
  401. },
  402. },
  403. computed: {
  404. ...mapGetters(['sidebar', 'name', 'avatar']),
  405. ...mapState({
  406. site_info: state => state.user.site_info
  407. }),
  408. },
  409. created() {
  410. // let list = [0,1,1,1,0]
  411. // for(let i in list){
  412. // debugger
  413. // if(list[i] == 1){
  414. // list.splice(i,1)
  415. // }
  416. // }
  417. // console.log(list)
  418. // let arr = [{item:0},{item:1},{item:1},{item:1},{item:0}]
  419. // let list = [0,1,1,1,0]
  420. //现在我要删除等于1的
  421. // for(let i = 0 ; i < list.length ; i++){
  422. // debugger
  423. // if(list[i] == 1){
  424. // list.splice(i,1)
  425. // i--
  426. // }
  427. // }
  428. // list.forEach((item,index)=>{
  429. // debugger
  430. // if(item == 1){
  431. // list.splice(index,1)
  432. // index--
  433. // }
  434. // })
  435. // for(let i in list){
  436. // debugger
  437. // if(list[i] == 1){
  438. // list.splice(i,1)
  439. // i--
  440. // }
  441. // }
  442. // console.log(list)
  443. console.log(this.$authoritys('employee'))
  444. if(JSON.parse(localStorage.getItem("amendMessage_none"))){
  445. if(this.$route.query.user){
  446. if(window.atob(this.$route.query.user).split(",").length>1){
  447. if(window.atob(this.$route.query.user).split(",")[1]){
  448. setTimeout(()=>{this.amendMessage = true},500)
  449. this.rawPassword = window.atob(this.$route.query.user).split(",")[1]
  450. this.changeInformation.password = window.atob(this.$route.query.user).split(",")[1]
  451. }
  452. }else{}
  453. }
  454. window.location.href = this.removeURLParameter(window.location.href,'user')
  455. localStorage.setItem('amendMessage_none',false)
  456. }else{
  457. localStorage.setItem('amendMessage_none',false)
  458. }
  459. // for(let i in this.user_infos){
  460. // if(this.user_infos[i].name == "admin" || this.user_infos[i].name == "point_manager" || this.user_infos[i].name == "creator"){//是否只是部门管理者
  461. // this.dept_manager = true
  462. // }
  463. // if(this.user_infos[i].name == "creator"){//是否是创始人
  464. // this.creator = true
  465. // }
  466. // }
  467. // console.log(this.$supremeAuthority())
  468. const addRouters = [];
  469. let mo_list = []
  470. let permission_list = []
  471. // 动态添加router路由
  472. for (let i in mo_list) {
  473. permission_list.push(mo_list[i].code)
  474. }
  475. // console.log(permission_list)
  476. // console.log(this.$store.getters.addRouters)
  477. for (const item in this.$store.getters.addRouters) {
  478. let obj = [];
  479. for (const ritem in this.$store.getters.addRouters[item].children) {
  480. // if (
  481. // permission_list.indexOf(
  482. // this.$store.getters.addRouters[item].children[ritem].name
  483. // ) >= 0 ||
  484. // this.$store.getters.addRouters[item].children[ritem].hidden ===
  485. // true ||
  486. // this.$store.getters.addRouters[item].children[ritem].common === true
  487. // ) {
  488. // obj.push(this.$store.getters.addRouters[item].children[ritem]);
  489. // }
  490. obj.push(this.$store.getters.addRouters[item].children[ritem]);
  491. };
  492. // obj = this.filtration(obj)
  493. if (obj.length > 0) {
  494. const _R = this.$store.getters.addRouters[item];
  495. _R["children"] = obj;
  496. this.authoritys = _R
  497. this.returnRoutersArrs(this.authoritys)
  498. if(this.authoritys){
  499. addRouters.push(_R);
  500. }
  501. }
  502. }
  503. for(let i in addRouters){
  504. if(addRouters[i].redirect == '/award_punish'){
  505. if(this.$authoritys('employee')){
  506. addRouters[i].redirect = '/apply_list'
  507. addRouters[i].path = '/apply_list'
  508. }
  509. }
  510. }
  511. // if(this.creator){//是创始人权限,存localStorage在界面中隐藏或增加模块。VUEX有时会拿不到数据
  512. // localStorage.setItem("creatorJurisdiction", true);
  513. // }else{
  514. // localStorage.setItem("creatorJurisdiction", false);
  515. // }
  516. // if(this.dept_manager == false){//是部门管理者时,存localStorage在界面中隐藏或增加模块。VUEX有时会拿不到数据
  517. // let deptRouters = []
  518. // this.$store.getters.user_info.deptManagerRouters = false
  519. // localStorage.setItem("deptManagerRouters", false);
  520. // this.deptManagerRoutersNav = false
  521. // for(let i in addRouters){
  522. // if(addRouters[i].redirect != '/attendance_classnew' && addRouters[i].redirect != '/employee_table'){//隐藏主要的根路由
  523. // deptRouters.push(addRouters[i])
  524. // }
  525. // }
  526. // this.menu = deptRouters;
  527. // }else{
  528. // localStorage.setItem("deptManagerRouters", true);
  529. // this.$store.getters.user_info.deptManagerRouters = true
  530. // this.deptManagerRoutersNav = true
  531. // this.menu = addRouters
  532. // }
  533. this.menu = addRouters
  534. this.$nextTick(() => {
  535. try {
  536. this.$refs.xiu.open("", "");
  537. } catch (e) {}
  538. });
  539. },
  540. mounted() {
  541. if(JSON.parse(localStorage.getItem("Experience_data"))){
  542. if(JSON.parse(localStorage.getItem("Experience_data")).if){
  543. if(JSON.parse(localStorage.getItem("ExperienceOne_none"))){
  544. setTimeout(()=>{
  545. this.usingTheStrategy = true
  546. },500)
  547. }
  548. localStorage.setItem('ExperienceOne_none',false)
  549. }
  550. this.experience_data = JSON.parse(localStorage.getItem("Experience_data")).if
  551. }
  552. this.setDefaultRouter();//设置默认路由样式
  553. // this.getUserScore()
  554. // this.$nextTick(() => {
  555. // this.getCompany()
  556. // })
  557. },
  558. methods: {
  559. returnRoutersArrs(auth){//过滤路由
  560. // debugger
  561. let supAuthority = this.$supremeAuthority()
  562. if(auth.forEach){
  563. // auth.forEach((item,index)=>{
  564. // if(item.meta.jurisdiction){
  565. // if(item.meta.jurisdiction.indexOf(supAuthority)==-1){
  566. // if(item.children){this.returnRoutersArrs(item.children)}
  567. // }else{auth.splice(index,1,0)}
  568. // }else{if(item.children){this.returnRoutersArrs(item.children)}}
  569. // })
  570. for(let i=0;i<auth.length;i++){//用普通for循环是因为循环内部会更改下标i
  571. if(auth[i].meta.jurisdiction){
  572. if(auth[i].meta.jurisdiction.indexOf(supAuthority)==-1){
  573. if(auth[i].children){this.returnRoutersArrs(auth[i].children)}
  574. }else{auth.splice(i,1);i--}
  575. }else{if(auth[i].children){this.returnRoutersArrs(auth[i].children)}}
  576. }
  577. }else{
  578. if(auth.meta.jurisdiction){
  579. if(auth.meta.jurisdiction.indexOf(supAuthority)==-1){
  580. if(auth.children){this.returnRoutersArrs(auth.children)}
  581. }else{this.authoritys = null}
  582. }else{if(auth.children){this.returnRoutersArrs(auth.children)}}
  583. }
  584. },
  585. // returnRoutersArr(str,bool){
  586. // var routers = this.$router.options.routes[0].children;
  587. // var routersArr=[];
  588. // routers.forEach(item=>{
  589. // if(item.meta.groupCode==str){
  590. // routersArr.push(item);
  591. // }
  592. // })
  593. // if(bool){
  594. // return routersArr;
  595. // }
  596. // return this.routerAstrict(routersArr);
  597. // },
  598. removeURLParameter(url, parameter) {
  599. var urlparts = url.split('?');
  600. if(urlparts.length >= 2) {
  601. //参数名前缀
  602. var prefix = encodeURIComponent(parameter) + '=';
  603. var pars = urlparts[1].split(/[&;]/g);
  604. //循环查找匹配参数
  605. for(var i = pars.length; i-- > 0;) {
  606. if(pars[i].lastIndexOf(prefix, 0) !== -1) {
  607. //存在则删除
  608. pars.splice(i, 1);
  609. }
  610. }
  611. return urlparts[0] + (pars.length > 0 ? '?' + pars.join('&') : '');
  612. }
  613. return url;
  614. },
  615. strategys(){
  616. this.usingTheStrategy = true
  617. this.tutorialsvisible = false
  618. },
  619. amendMessageAchieve(formName){//修改信息确定
  620. this.$refs[formName].validate(valid => {
  621. if (valid) {
  622. this.amendMessageLoading = true
  623. this.performName()
  624. }
  625. })
  626. },
  627. performName(){
  628. this.$http_user({
  629. url: '/api/account/edit',
  630. method: 'post',
  631. data:{name:this.changeInformation.name}
  632. }).then((res)=>{
  633. if(res.data.code == 1){
  634. this.performPass()
  635. }
  636. }).catch(()=>{
  637. this.amendMessageLoading = false
  638. })
  639. },
  640. performPass(){
  641. let data = {
  642. old_password:this.rawPassword,
  643. password:this.changeInformation.password,
  644. password_confirmation:this.changeInformation.password,
  645. }
  646. this.$http_user({
  647. url: '/api/account/reset',
  648. method: 'post',
  649. data: data
  650. }).then((res)=>{
  651. if(res.data.code == 1){
  652. this.$message({
  653. message: '修改成功',
  654. type: 'success'
  655. });
  656. this.amendMessage = false
  657. setTimeout(()=>{
  658. this.tutorialsvisible = true
  659. this.amendMessageLoading = false
  660. },200)
  661. }
  662. }).catch(()=>{
  663. this.amendMessageLoading = false
  664. })
  665. },
  666. //关闭 修改个人信息 弹窗
  667. amendMessageClose(done) {
  668. done();
  669. this.tutorialsvisible = true
  670. },
  671. strategyClick(item){
  672. this.usingTheStrategy = false
  673. this.$router.push({ path: item })
  674. },
  675. open_right(item){
  676. if(item.code=='0'){
  677. this.usingmarginL = '26'
  678. this.usingwidth = '220'
  679. this.activeNameRig = {
  680. name:'员工积极参与,管理者权责分明',
  681. code:'0',
  682. item:[
  683. {image:'static/images/guild_dept_pic.png',name:'组织架构',conf:'去配置',push:'/employee_table'},
  684. {image:'static/images/role_manage.png',name:'角色权限',conf:'去配置',push:'/set_role'}
  685. ]
  686. }
  687. }else if(item.code=='1'){
  688. this.usingmarginL = '14'
  689. this.usingwidth = '300'
  690. this.activeNameRig = {
  691. name:'健全企业规章制度,建立公平的奖扣分体系',
  692. code:'1',
  693. item:[
  694. {image:'static/images/rule.png',name:'积分规则',conf:'去配置',push:'/rule_manage'},
  695. {image:'static/images/length_point.png',name:'基础设置',conf:'去配置',push:'/set_basics'},
  696. {image:'static/images/base_point.png',name:'自动积分',conf:'去配置',push:'/fixed_integral'},
  697. ]
  698. }
  699. }else if(item.code=='2'){
  700. this.usingwidth = '380'
  701. this.activeNameRig = {
  702. name:'员工积极挣分,管理者奖罚分明',
  703. code:'2',
  704. item:[
  705. {image:'static/images/entry_list.png',name:'奖分/扣分',conf:'去奖扣',push:'/award_punish'},
  706. {image:'static/images/my_publish.png',name:'任务',conf:'去发布',push:'/my_issue'},
  707. {image:'static/images/performance1.png',name:'绩效',conf:'去发布',push:'/team_performance'},
  708. {image:'static/images/attendance_application.png',name:'考勤 ',conf:'去配置',push:'/attendancenew'},
  709. {image:'static/images/att_review.png',name:'审批打分',conf:'去审批',push:'/approval_list'}
  710. ],
  711. }
  712. }else if(item.code=='3'){
  713. this.usingwidth = '380'
  714. this.activeNameRig = {
  715. name:'提高管理执行力,让优秀员工不吃亏',
  716. code:'3',
  717. item:[
  718. {image:'static/images/add_ticket.png',name:'积分排名',conf:'去查看',push:'/dept_rank'},
  719. {image:'static/images/role_manage.png',name:'管理者执行力',conf:'去查看',push:'/manager_statistics'},
  720. {image:'static/images/data_team.png',name:'部门分析',conf:'去查看',push:'/department_statistics'},
  721. {image:'static/images/length_point.png',name:'个人分析',conf:'去查看',push:'/individual_statistics'}
  722. ]
  723. }
  724. }
  725. },
  726. //-隐藏子路由 -
  727. filtration(obj){
  728. let data = []
  729. if(this.dept_manager == false){//只是部门管理者
  730. data = this.filtra(obj,["balanceA"])//部门管理者 --隐藏-- A分权限
  731. }else if(this.creator){//创始人 -
  732. data = this.filtra(obj,['apply_list','my_task','my_performance'])//创始人 --隐藏-- 我的申请、我的绩效、我的任务
  733. }else{
  734. data = obj
  735. }
  736. return data
  737. },
  738. filtra(obj,filtname){//待优化
  739. let child = []
  740. for(let n in filtname){
  741. for(let i in obj){
  742. if(obj[i].name!=filtname[n]){
  743. child.push(obj[i])
  744. }
  745. }
  746. for(let i in child){
  747. let datas = []
  748. for(let a in child[i].children){
  749. if(child[i].children[a].name != filtname[n]){
  750. datas.push(child[i].children[a])
  751. }
  752. }
  753. child[i].children = datas
  754. }
  755. obj = child
  756. }
  757. return Array.from(new Set(obj))
  758. },
  759. //攻略跳转
  760. // openPage(index) {
  761. // this.usingTheStrategy = false
  762. // switch (index) {
  763. // case 1:
  764. // this.$router.push({
  765. // path: '/company_info'
  766. // })
  767. // break;
  768. // case 2:
  769. // this.$router.push({
  770. // path: '/set_basics'
  771. // })
  772. // break;
  773. // case 3:
  774. // this.$router.push({
  775. // path: '/employee_table'
  776. // })
  777. // break;
  778. // case 4:
  779. // this.$router.push({
  780. // path: '/rule_manage'
  781. // })
  782. // break;
  783. // case 5:
  784. // this.$router.push({
  785. // path: '/attendance_classnew'
  786. // })
  787. // break;
  788. // }
  789. // },
  790. // traverse(obj){
  791. // for (var a in obj) {
  792. // if (obj[a].children) {
  793. // this.traverse(obj[a].children); //递归遍历
  794. // } else {
  795. // if(obj[a].name == 'apply_list'){
  796. // obj[a].meta.noCache=false
  797. // obj[a].meta.show=false
  798. // console.log(obj[a])
  799. // }
  800. // }
  801. // }
  802. // },
  803. setDefaultRouter(){
  804. var routerTitle=this.$route.meta.title;
  805. var routerMatched=this.$route.matched;
  806. if(routerTitle=="首页"||routerTitle=="工作台"||routerTitle=="考勤"||routerTitle=="统计"||routerTitle=="设置"){
  807. this.activeIndex=routerTitle;
  808. }else{
  809. this.activeIndex=routerMatched[0].meta.title
  810. }
  811. },
  812. handleCommand(item) {
  813. if (item.id !== 1 && item.id !== 2 && !item.isSelect) {
  814. this.cpmpanyId = item.id
  815. this.checkCompany()
  816. }else if(item.id == 1 && item.name == "退出账号"){
  817. this.logout()
  818. }else if(item.id == 2 && item.name == "创建新企业"){
  819. this.rejectForm = {
  820. StartAnewBusinessName:'',
  821. StartAnewBusinessVal:'1-10人',
  822. }
  823. this.StartAnewBusiness = true
  824. }
  825. },
  826. wacthCourse() {
  827. if (this.cpmpanyId == 0 || this.cpmpanyId == 1) {} else {
  828. this.firstId = this.cpmpanyId;
  829. }
  830. if (this.cpmpanyId == 0) {
  831. this.cpmpanyId = this.firstId;
  832. this.returnBack()
  833. } else if (this.cpmpanyId == 1) {
  834. this.cpmpanyId = this.firstId;
  835. this.logout()
  836. } else {
  837. this.checkCompany();
  838. }
  839. },
  840. returnBack() {
  841. if (this.manager_type == 4) {
  842. window.open("https://www.kancloud.cn/jian-18/mw-th/908166", '_blank')
  843. } else if (this.manager_type == 2 || this.manager_type == 3) {
  844. window.open("https://www.kancloud.cn/jian-18/mw-th2/891065", '_blank')
  845. } else if (this.manager_type == 1) {
  846. window.open("https://www.kancloud.cn/jian-18/mw-th5/892680", '_blank')
  847. } else if (this.manager_type == 0) {
  848. window.open("https://www.kancloud.cn/jian-18/mw-th4/892587", '_blank')
  849. }
  850. },
  851. // 切换体验角色
  852. experienceCompany(item) {
  853. let self = this
  854. let num = 112
  855. let jurisdiction = "creator"
  856. if(item==1){
  857. jurisdiction = "creator"
  858. }else{
  859. jurisdiction = 'dept_manager'
  860. }
  861. request_user({
  862. url: '/api/try/employees',
  863. method: 'get',
  864. params: {site_id: num}
  865. }).then((res) => {
  866. if (res.data.code == 1) {
  867. if (res.data.code == 1) {
  868. let login_index = ''
  869. for(let i in res.data.data){
  870. let role_list = res.data.data[i].role_list
  871. for (let j in role_list) {
  872. if (jurisdiction == role_list[j].name) {
  873. login_index = i
  874. }
  875. }
  876. }
  877. if (login_index != '') {
  878. setToken(res.data.data[login_index].token)
  879. if(jurisdiction == 'dept_manager'){
  880. localStorage.setItem('ExperienceOne_none',false)
  881. }else{
  882. localStorage.setItem('ExperienceOne_none',true)
  883. }
  884. localStorage.setItem('Experience_data',JSON.stringify({if:true,name:jurisdiction}))
  885. self.$store.commit('SET_TOKEN', res.data.data[login_index].token)
  886. // localStorage.setItem('site_list_temp', JSON.stringify(data.data.account_site))
  887. }
  888. self.$router.push({path: '/'})
  889. localStorage.removeItem('SET_EMPLOYEE_MAP')
  890. localStorage.removeItem('site_info')
  891. localStorage.removeItem('dept_tree')
  892. sessionStorage.removeItem('current_time');
  893. window.location.reload()
  894. } else {
  895. self.$message.error(res.data.data.msg)
  896. }
  897. }
  898. })
  899. },
  900. StartAnewBuY(formName){
  901. this.$refs[formName].validate(valid => {
  902. if (valid) {
  903. // let params = {
  904. // name:this.rejectForm.StartAnewBusinessName,
  905. // scale:this.rejectForm.StartAnewBusinessVal,
  906. // industry: '互联网',
  907. // tel: '',
  908. // employee_name: ''
  909. // }
  910. // request_user('post','/api/site/create',params,).then((res)=>{
  911. request_user({
  912. url: '/api/site/create',
  913. method: 'post',
  914. data: {
  915. name:this.rejectForm.StartAnewBusinessName,
  916. scale:this.rejectForm.StartAnewBusinessVal,
  917. industry: '互联网',
  918. tel: '',
  919. employee_name: ''
  920. },
  921. }).then((res)=>{
  922. this.cpmpanyId = res.data.data.id
  923. this.checkCompany()
  924. localStorage.setItem('Experience_data',JSON.stringify({if:false,name:''}))
  925. }).finally(()=>{
  926. this.StartAnewBusiness = false
  927. })
  928. }
  929. })
  930. },
  931. adoptClose(){
  932. this.StartAnewBusiness = false,
  933. setTimeout(()=>{
  934. this.rejectForm = {
  935. StartAnewBusinessName:'',
  936. StartAnewBusinessVal:'1-10人',
  937. }
  938. },200)
  939. },
  940. //关闭 创建新企业 弹窗
  941. handleClose(done) {
  942. done();
  943. this.rejectForm = {
  944. StartAnewBusinessName:'',
  945. StartAnewBusinessVal:'1-10人',
  946. }
  947. },
  948. // 切换公司
  949. checkCompany() {
  950. let self = this
  951. request_user({
  952. url: '/api/employee-login',
  953. method: 'post',
  954. data: {
  955. site_id: this.cpmpanyId
  956. }
  957. }).then((res) => {
  958. if (res.data.code == 1) {
  959. setToken(res.data.data.token)
  960. // let manager = res.data.data.user.employee_detail.role_list.findIndex((item) => {
  961. // return item.name == "creator" || item.name == "admin" || item.name == "point_manager" || item.name == "dept_manager"
  962. // })
  963. // if (parseInt(manager) < 0) {
  964. // self.$confirm('电脑版暂未开放【员工】的使用,请使用功道云APP', '提示', {
  965. // confirmButtonText: '确定',
  966. // type: 'warning'
  967. // }).then(() => {
  968. // self.logout()
  969. // }).catch(() => {
  970. // self.logout()
  971. // });
  972. // } else {
  973. self.$router.push({
  974. path: '/'
  975. })
  976. self.$store.commit('SET_TOKEN', res.data.data.token)
  977. localStorage.removeItem('overdueToken');
  978. localStorage.removeItem('SET_EMPLOYEE_MAP')
  979. localStorage.removeItem('site_info')
  980. localStorage.removeItem('dept_tree')
  981. sessionStorage.removeItem('current_time');
  982. window.location.reload()
  983. // }
  984. } else {
  985. self.$message.error(res.data.data.msg)
  986. }
  987. })
  988. },
  989. // 获取公司列表
  990. // getCompany() {
  991. // let self = this;
  992. // request_user({
  993. // url: '/api/account/site',
  994. // method: 'get'
  995. // }).then(res => {
  996. // if (res.data.code == 1) {
  997. // let site_list = []
  998. // let site_map = {}
  999. // if(res.data.data.list && res.data.data.list.length == 0){
  1000. // self.companyList = [...this.concent];
  1001. // }else{
  1002. // for (let i in res.data.data) {
  1003. // site_list.push({
  1004. // id: res.data.data[i].site.id,
  1005. // name: res.data.data[i].site.name,
  1006. // isSelect: res.data.data[i].site.id == this.site_info.id ? true : false
  1007. // })
  1008. // site_map[res.data.data[i].site.id] = res.data.data[i].site.name
  1009. // }
  1010. // self.companeyListMap = site_map;
  1011. // self.$nextTick(() => {
  1012. // self.companyList = [...site_list, ...this.concent];
  1013. // if(site_list.length == 0){
  1014. // self.companyList = [...this.concent];
  1015. // }
  1016. // self.cpmpanyId = self.profile.site_id
  1017. // self.firstId = self.cpmpanyId
  1018. // })
  1019. // }
  1020. // }
  1021. // })
  1022. // },
  1023. changerole() {
  1024. const self = this
  1025. this.$http('get','/integral.php/ajax_request_common/get_user_by_role.html?type=' + this.manager_type).then(ret => {
  1026. if (ret.status == 200) {
  1027. self.$router.replace({name: 'dashboard'})
  1028. if (ret.data.code == 1) {
  1029. setTimeout(() => {
  1030. window.location.reload()
  1031. }, 20)
  1032. } else {
  1033. self.$message.error('切换失败')
  1034. }
  1035. }
  1036. })
  1037. },
  1038. toggleSideBar() {
  1039. this.$store.dispatch('toggleSideBar')
  1040. },
  1041. logout() {
  1042. const self = this
  1043. self.$http_user({
  1044. url: '/api/logout',
  1045. method: 'post',
  1046. }).then((res) => {
  1047. if (res.data.code == 1 || res.data.code == 999) {
  1048. // 清除缓存在localStorage的相关数据
  1049. localStorage.removeItem('ExperienceOne_none')
  1050. localStorage.removeItem('Experience_data')
  1051. localStorage.removeItem('SET_EMPLOYEE_MAP')
  1052. localStorage.removeItem('site_list_temp')
  1053. localStorage.removeItem('site_info')
  1054. localStorage.removeItem('dept_tree')
  1055. localStorage.removeItem('user_token_temp')
  1056. self.$store.dispatch('LogOut');
  1057. sessionStorage.removeItem('current_time');
  1058. }
  1059. }).catch((e) => {
  1060. self.$message.error(e.data.msg)
  1061. }).finally(() => {
  1062. self.loading = false
  1063. })
  1064. },
  1065. getUserScore() {
  1066. return
  1067. this.$http('get','/integral.php/point_data/get_point_by_employee')
  1068. .then(res => {
  1069. if (res.status === 200) {
  1070. if (res.data.code === 1) {
  1071. this.totalScore = res.data.data.sum
  1072. } else {
  1073. this.$message.error('积分获取失败')
  1074. }
  1075. }
  1076. })
  1077. }
  1078. }
  1079. }
  1080. </script>
  1081. <style rel="stylesheet/scss" lang="scss" scoped>
  1082. /deep/ .el-dialog__body{
  1083. padding:10px 20px 30px;
  1084. }
  1085. .routerActive {
  1086. background-color: #199afb !important;
  1087. }
  1088. .active {
  1089. color: #26A2FF;
  1090. background-color: rgba(38, 162, 255, 0.1);
  1091. }
  1092. .totalScore {
  1093. padding-left: 25px;
  1094. background: url('static/images/totalScore.png') no-repeat left center;
  1095. background-size: 18px 17px;
  1096. }
  1097. .course {
  1098. padding-left: 25px;
  1099. background: url('static/images/book.png') no-repeat left center;
  1100. background-size: 20px 18px;
  1101. }
  1102. .navbar {
  1103. height: 60px;
  1104. line-height: 60px;
  1105. border-radius: 0px !important;
  1106. .hamburger-container {
  1107. line-height: 68px;
  1108. height: 60px;
  1109. float: left;
  1110. padding: 0 0px 0 20px;
  1111. }
  1112. .commit-comment-btn {
  1113. display: inline-block;
  1114. padding-left: 30px;
  1115. background-image: url(static/images/comment.png);
  1116. background-repeat: no-repeat;
  1117. background-position: left center;
  1118. color: #fff;
  1119. margin-right: 30px;
  1120. }
  1121. .logout-btn {
  1122. display: inline-block;
  1123. padding-left: 30px;
  1124. background-image: url(static/images/logout.png);
  1125. background-repeat: no-repeat;
  1126. background-position: left center;
  1127. color: #fff;
  1128. margin-right: 30px;
  1129. }
  1130. .breadcrumb-container {
  1131. float: left;
  1132. }
  1133. .errLog-container {
  1134. display: inline-block;
  1135. vertical-align: top;
  1136. }
  1137. .right-menu {
  1138. float: right;
  1139. height: 100%;
  1140. display:flex;
  1141. align-items: center;
  1142. &:focus {
  1143. outline: none;
  1144. }
  1145. .right-menu-item {
  1146. display: inline-block;
  1147. margin: 0 8px;
  1148. }
  1149. .screenfull {
  1150. height: 20px;
  1151. }
  1152. .international {
  1153. vertical-align: top;
  1154. }
  1155. .theme-switch {
  1156. vertical-align: 15px;
  1157. }
  1158. .avatar-container {
  1159. height: 60px;
  1160. margin-right: 30px;
  1161. .avatar-wrapper {
  1162. cursor: pointer;
  1163. margin-top: 5px;
  1164. position: relative;
  1165. .user-avatar {
  1166. width: 40px;
  1167. height: 40px;
  1168. border-radius: 10px;
  1169. }
  1170. .el-icon-caret-bottom {
  1171. position: absolute;
  1172. right: -20px;
  1173. top: 25px;
  1174. font-size: 12px;
  1175. }
  1176. }
  1177. }
  1178. }
  1179. }
  1180. .float-left {
  1181. float: left;
  1182. }
  1183. .topnavbar {
  1184. background-color: #26A2FF;
  1185. border-bottom: 0;
  1186. }
  1187. .logout-btn:hover {
  1188. color: #f1f1f1;
  1189. }
  1190. .commit-comment-btn:hover {
  1191. color: #f1f1f1;
  1192. }
  1193. .demotip {
  1194. color: #fff;
  1195. }
  1196. .demotip a {
  1197. color: #eab81e;
  1198. }
  1199. .demotip a:hover {
  1200. color: #F6FF00;
  1201. }
  1202. .nav_background {
  1203. background-color: #26A2FF;
  1204. border-bottom: solid 1px #e6e6e6;
  1205. z-index: 1000;
  1206. position: fixed;
  1207. left: 0;
  1208. right: 0;
  1209. top: 0;
  1210. }
  1211. .nav_width {
  1212. width: 1200px;
  1213. margin: 0 auto;
  1214. .el-menu-item a{
  1215. font-size:18px;
  1216. font-weight:bold;
  1217. }
  1218. .is-active{
  1219. background:#2785c7c9 !important;
  1220. }
  1221. .is-active a{
  1222. font-size:18px;
  1223. font-weight:bold;
  1224. }
  1225. // .el-menu-item:hover{
  1226. // background-color:#199afb !important;
  1227. // }
  1228. // .el-menu-item:active a{
  1229. // font-weight:bold;
  1230. // background-color:#199afb !important;
  1231. // }
  1232. }
  1233. .changeRole .el-icon-arrow-up:before {
  1234. content: "123";
  1235. width: 12px;
  1236. height: 12px;
  1237. background: url(static/images/angle.png) no-repeat center;
  1238. background-size: 12px;
  1239. color: rgba(0, 0, 0, 0)
  1240. }
  1241. .logo {
  1242. margin-right: 20px;
  1243. max-width: 400px;
  1244. min-width: 200px;
  1245. background-repeat: no-repeat;
  1246. background-position: center;
  1247. display: flex;
  1248. color: #fff;
  1249. .company_img {
  1250. height: 100%;
  1251. cursor: pointer;
  1252. }
  1253. .company_name {
  1254. overflow: hidden;
  1255. white-space: nowrap;
  1256. text-overflow: ellipsis;
  1257. // padding-left: 10px;
  1258. font-size: 20px;
  1259. }
  1260. }
  1261. .user_img {
  1262. display: inline-block;
  1263. vertical-align: sub;
  1264. padding: 0 5px;
  1265. padding-top: 11px;
  1266. height: 100%;
  1267. /deep/ img{
  1268. // border: 1px #fff solid;
  1269. }
  1270. /deep/ .user_img_bg{
  1271. border: 1px #fff solid;
  1272. }
  1273. }
  1274. .el-menu-item {
  1275. padding: 0;
  1276. a {
  1277. padding: 0 20px;
  1278. display: inline-block;
  1279. }
  1280. }
  1281. #dropdown-menu-3459 {
  1282. li {
  1283. color: #606266;
  1284. }
  1285. li:hover {
  1286. font-weight: bold;
  1287. background: none;
  1288. }
  1289. }
  1290. .el-dropdown{
  1291. height: 100%;
  1292. }
  1293. .company_name{
  1294. cursor:pointer
  1295. }
  1296. .PCtutorials{
  1297. height:40px;
  1298. width:40px;
  1299. display: inline-block;
  1300. border-radius:50%;
  1301. text-align:center;
  1302. // margin-bottom:10px;
  1303. margin-right:7px;
  1304. font-size: 20px;
  1305. -webkit-transition: all .3s;
  1306. -moz-transition: all .3s;
  1307. -ms-transition: all .3s;
  1308. -o-transition: all .3s;
  1309. transition: all .3s;
  1310. }
  1311. .PCtutorials:hover{
  1312. background-color:#50b3ff;
  1313. }
  1314. .strategyOfThe{
  1315. width:274px;
  1316. height:91px;
  1317. border:1px solid #DCDFE6;
  1318. margin-top:20px;
  1319. cursor:pointer;
  1320. -webkit-transition: all .3s;
  1321. -moz-transition: all .3s;
  1322. -ms-transition: all .3s;
  1323. -o-transition: all .3s;
  1324. transition: all .3s;
  1325. p{
  1326. margin:20px 0 0 20px;
  1327. b{
  1328. color:#303133;
  1329. font-size:16px;
  1330. transition: all .3s;
  1331. }
  1332. span{
  1333. color:#aaacb1;
  1334. font-size:12px;
  1335. padding-top:12px;
  1336. display: inline-block;
  1337. transition: all .3s;
  1338. }
  1339. }
  1340. }
  1341. .strategyOfThe:hover{
  1342. border:1px solid #73c1fc;
  1343. background-color: #fcfcfc;
  1344. box-shadow:1px 1px 5px #c1e4ff;
  1345. p{
  1346. b{
  1347. color: #58b7ff;
  1348. };
  1349. span{
  1350. color:rgb(98, 104, 121);
  1351. }
  1352. }
  1353. }
  1354. /deep/ .el-dialog__title{
  1355. padding-left:8px;
  1356. border-left:2px solid #3caaff;
  1357. }
  1358. .fontColorF {
  1359. color: #606266;
  1360. }
  1361. .wn-box{
  1362. padding: 20px 0;
  1363. }
  1364. .wn-box .flex-1{
  1365. cursor: pointer;
  1366. }
  1367. .wn-box .flex-1 div:nth-child(1){
  1368. width: 55px;
  1369. height: 55px;
  1370. border-radius: 50%;
  1371. text-align: center;
  1372. line-height: 55px;
  1373. background-color: #E0F2FF;
  1374. color: #26A2FF;
  1375. margin-bottom: 20px;
  1376. }
  1377. .wn-box .flex-1 div:nth-child(2){
  1378. width: 140px;
  1379. border-radius: 25px;
  1380. border: 1px solid #26A2FF;
  1381. padding:7px 10px;
  1382. text-align: center;
  1383. color: #26A2FF;
  1384. }
  1385. .wn-box .flex-1:hover div:nth-child(1){
  1386. color: #fff;
  1387. background-color: #26A2FF;
  1388. }
  1389. .wn-box .flex-1:hover div:nth-child(2){
  1390. color: #fff;
  1391. background-color: #26A2FF;
  1392. }
  1393. .wn-box .svg-icon{
  1394. font-size: 22px;
  1395. margin-top: 16px;
  1396. }
  1397. </style>