Home.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266
  1. <template>
  2. <el-row class="container">
  3. <v-tour name="myTour" :steps="steps" :options="myOptions" :callbacks="myCallbacks" v-if="tourFlg"></v-tour>
  4. <el-col :span="24" class="header">
  5. <div class="contentMask" v-if="vTourFlg"></div>
  6. <el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'" :style="collapsed?'padding:0':''">
  7. <img v-if="collapsed" class="headImg" src="../assets/image/head_logo.png" />
  8. <div v-else class="logo-sys">
  9. <img class="headImg" src="../assets/image/head_logo.png" />
  10. <!-- <span>{{$t('workingHoursHousekeeper')}}</span> -->
  11. <span>{{ themesType == 'dark' ? '临床工时通' : '工时管家' }}</span>
  12. </div>
  13. </el-col>
  14. <el-col :span="6">
  15. <div class="tools" style="position: relative;">
  16. <i class="fa fa-align-justify" @click.prevent="collapse" style="position: relative;z-index: 10;"></i>
  17. <div class="gongshimingz">
  18. {{user.companyName}}
  19. <i v-if="user.roleName == '超级管理员' && user.companyName != '成都明夷电子科技有限公司'" class="el-icon-edit" @click="editCompanyNamedialog=true,companyForm.name = user.companyName" style="position: relative;z-index: 15; margin-left: 5px;"></i>
  20. </div>
  21. </div>
  22. </el-col>
  23. <el-col :span="12" class="userinfo" style="display: flex;align-items: center;justify-content: flex-end;">
  24. <!-- 中英文切换入口 -->
  25. <!-- <el-dropdown trigger="click" @command="langChange" style="margin-right:30px;">
  26. <span class="el-dropdown-link userinfo-inner">
  27. {{language}} <i class="el-icon-caret-bottom"></i>
  28. </span>
  29. <el-dropdown-menu slot="dropdown">
  30. <el-dropdown-item divided command="zh">中文</el-dropdown-item>
  31. <el-dropdown-item divided command="en">English</el-dropdown-item>
  32. </el-dropdown-menu>
  33. </el-dropdown> -->
  34. <div style="margin-right: 10px;cursor: pointer;" @click="applicationMarket">
  35. <i class="el-icon-menu" style="font-size:18px" ></i>
  36. 应用市场
  37. </div>
  38. <el-dropdown trigger="hover" style="margin-right:30px;">
  39. <span class="el-dropdown-link userinfo-inner">
  40. <i class="el-icon-user" style="font-size:18px" ></i>
  41. <!-- {{$t('other.customerService')}} -->
  42. {{ $t('bangZhuZhongXin') }}
  43. </span>
  44. <el-dropdown-menu slot="dropdown">
  45. <el-dropdown-item >
  46. <div v-if="!isCorpWX">
  47. <!-- <div>{{$t('other.sweepWeChatYards')}}</div> -->
  48. <!-- <div>扫码添加企业微信客服</div> -->
  49. <div>{{ $t('ke-fu-wei-xin') }}</div>
  50. <img
  51. style="width: 120px; height: 120px"
  52. src="../assets/image/code.jpg" />
  53. </div>
  54. <div v-if="isCorpWX">
  55. <div>{{ $t('saoMaTianJiaQiYeWeiXinKeFu') }}</div>
  56. <img
  57. style="width: 153px; height: 153px"
  58. src="../assets/image/qwcode.png" />
  59. </div>
  60. <div>
  61. <div>
  62. <el-link type="primary" :underline="false" href="https://www.ttkuaiban.com/download/%E5%B7%A5%E6%97%B6%E7%AE%A1%E5%AE%B6%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E%E4%B9%A6.pdf">{{ $t('dianJiChaKanCaoZuoShouCe') }}</el-link>
  63. </div>
  64. </div>
  65. </el-dropdown-item>
  66. </el-dropdown-menu>
  67. </el-dropdown>
  68. {{$t('time.dueDate')}}:{{remainingTime}}
  69. <el-badge class="itemNew" :value="num" :hidden="num == 0">
  70. <i class="el-icon-message-solid" style="font-size:24px" v-popover:popover1 @click="drawer = true"></i>
  71. </el-badge>
  72. <el-drawer :title="$t('other.messageCenter')" :visible.sync="drawer" direction="rtl" :with-header="false" size="35%">
  73. <el-table :data="popoverData" :height="tableHeight" size="small">
  74. <el-table-column property="type" :label="$t('other.messageContent')" align="left">
  75. <template slot-scope="scope">
  76. <el-link type="primary" :underline="false" @click="locationHerf(scope.row.id, scope.row.content, scope.row.type, scope.row)">
  77. <span style="font-size:13px;">
  78. <span v-if="scope.row.msg == null">
  79. {{msgTypeTxt[scope.row.type]}}
  80. </span>
  81. <span v-else>
  82. <span v-if="user.userNameNeedTranslate != 1">
  83. {{scope.row.msg}}
  84. </span>
  85. <span v-if="user.userNameNeedTranslate == 1">
  86. {{scope.row.omg.textOne}}
  87. <TranslationOpenDataText v-if="user.corpwxUserid != null" type='userName' :openid='scope.row.omg.textTwo'></TranslationOpenDataText>
  88. <dt-open-data v-if="user.dingdingUserid != null" open-type='userName' :open-id='scope.row.omg.textTwo'></dt-open-data>
  89. {{scope.row.omg.textThree}}
  90. </span>
  91. </span>
  92. <!-- {{scope.row.msg==null?msgTypeTxt[scope.row.type]:scope.row.msg}} -->
  93. </span>
  94. </el-link>
  95. </template>
  96. </el-table-column>
  97. <el-table-column property="type" :label="$t('state.states')" align="center" width="60">
  98. <template slot-scope="scope">
  99. <span v-if="scope.row.checked == 0" style="color:red">{{$t('other.unread')}}</span>
  100. <span v-else style="color:green">{{$t('other.read')}}</span>
  101. </template>
  102. </el-table-column>
  103. <el-table-column property="time" :label="$t('time.times')" align="center" width="120"></el-table-column>
  104. </el-table>
  105. </el-drawer>
  106. <el-dropdown trigger="hover" style="margin-left:10px;">
  107. <span class="el-dropdown-link userinfo-inner">
  108. <img src="../assets/image/userHead.png" />
  109. <!-- <span v-if="user.userNameNeedTranslate == 1">
  110. <TranslationOpenDataText type='userName' :openid='sysUserName'></TranslationOpenDataText>
  111. </span>
  112. <span v-if="user.dingdingUserid">
  113. <dt-open-data open-type='userName' :open-id='user.dingdingUserid'></dt-open-data>
  114. </span>
  115. <span v-if="user.userNameNeedTranslate != 1">
  116. {{sysUserName}}
  117. </span> -->
  118. <TranslationOpenData :configurationItems="{ openType: 'userName', openId: sysUserName, renderIndex: 0 }" />
  119. <!-- {{sysUserName}} -->
  120. </span>
  121. <el-dropdown-menu slot="dropdown">
  122. <!-- <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-view" ></i>{{roleArray[user.role]}}</span></el-dropdown-item> -->
  123. <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-view" ></i>{{user.roleName}}</span></el-dropdown-item>
  124. <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-medal" v-if="user.jobNumber"></i>{{user.jobNumber}}</span></el-dropdown-item>
  125. <el-dropdown-item @click.native="reset" v-if="user.userNameNeedTranslate != 1">{{$t('other.changeThePassword')}}</el-dropdown-item>
  126. <!-- <el-dropdown-item @click.native="editInfoOpen">修改信息</el-dropdown-item> -->
  127. <el-dropdown-item divided @click.native="logout" v-if="!isCorpWX" >{{$t('other.launchTheLogin')}}</el-dropdown-item>
  128. </el-dropdown-menu>
  129. </el-dropdown>
  130. </el-col>
  131. </el-col>
  132. <el-col :span="24" class="main">
  133. <aside :class="collapsed?'menu-collapsed':'menu-expanded'">
  134. <el-scrollbar style="height:100%">
  135. <!--导航菜单-->
  136. <el-menu :default-active="$route.path" class="el-menu-vertical-demo" unique-opened router v-if="!collapsed" :default-openeds="['zhan']">
  137. <template v-for="(item, index) in $router.options.routes" v-if="!item.hidden">
  138. <!-- <el-submenu :index="index+''" v-if="!item.leaf"> -->
  139. <el-submenu :index="'zhan'" v-if="!item.leaf">
  140. <template slot="title">
  141. <i :class="item.iconCls"></i>
  142. <!-- <span class="itemName">{{item.name}}</span> -->
  143. <span class="itemName bosx" v-if="$t(item.meta.text).length < 16">{{$t(item.meta.text)}}</span>
  144. <el-tooltip class="itemName bosx" v-if="$t(item.meta.text).length > 16" effect="dark" :content="$t(item.meta.text)" placement="top">
  145. <span>{{$t(item.meta.text)}}</span>
  146. </el-tooltip>
  147. </template>
  148. <el-menu-item v-for="child in item.children" :index="child.path" :key="child.path" v-if="!child.hidden" :data-v-step="child.path"><i :class="child.iconCls"></i>
  149. <!-- {{child.name}} -->
  150. <span class="bosx" v-if="$t(child.meta.text).length < 16">{{$t(child.meta.text)}}</span>
  151. <el-tooltip class="bosx" v-if="$t(child.meta.text).length > 16" effect="dark" :content="$t(child.meta.text)" placement="top">
  152. <span>{{$t(child.meta.text)}}</span>
  153. </el-tooltip>
  154. </el-menu-item>
  155. </el-submenu>
  156. <el-menu-item v-if="item.leaf && item.children.length > 0" :index="item.children[0].path" :data-v-step="item.children[0].path">
  157. <i :class="item.iconCls"></i>
  158. <!-- {{item.children[0].name}} -->
  159. <span class="bosx" v-if="$t(item.meta.text).length <= 16">{{$t(item.meta.text)}}</span>
  160. <el-tooltip class="itemName bosx" v-if="$t(item.meta.text).length > 16" effect="dark" :content="$t(item.meta.text)" placement="top">
  161. <span>{{$t(item.meta.text)}}</span>
  162. </el-tooltip>
  163. <!-- {{$t('navigation.reports')}} -->
  164. <!-- this.$t('navigation.reports')  // js-->
  165. </el-menu-item>
  166. </template>
  167. </el-menu>
  168. <!--导航菜单-折叠后-->
  169. <ul class="el-menu el-menu-vertical-demo collapsed" v-if="collapsed" ref="menuCollapsed">
  170. <li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item" :style="{overflow:!item.leaf?'':'hidden'}">
  171. <template v-if="!item.leaf">
  172. <div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)">
  173. <i :class="item.iconCls"></i>
  174. </div>
  175. <ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)">
  176. <li v-for="child in item.children" v-if="!child.hidden" :key="child.path" class="el-menu-item" style="padding-left: 40px;" :class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)">
  177. {{child.name}}
  178. </li>
  179. </ul>
  180. </template>
  181. <template v-else>
  182. <li class="el-submenu">
  183. <div class="el-submenu__title el-menu-item" :class="$route.path==item.children[0].path?'is-active':''" @click="$router.push(item.children[0].path)"
  184. style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;">
  185. <i :class="item.iconCls"></i>
  186. </div>
  187. </li>
  188. </template>
  189. </li>
  190. </ul>
  191. </el-scrollbar>
  192. </aside>
  193. <section class="content-container">
  194. <div class="contentMask" v-if="vTourFlg"></div>
  195. <div class="grid-content h-full bg-purple-light">
  196. <el-col :span="24" class="content-wrapper h-full">
  197. <transition name="fade" mode="out-in">
  198. <router-view></router-view>
  199. </transition>
  200. </el-col>
  201. </div>
  202. <!--修改密码-->
  203. <el-dialog :title="$t('other.changeThePassword')" width='450px' v-if="editPassWord" :visible.sync="editPassWord" :close-on-click-modal="false" customClass="customWidth">
  204. <el-form :model="addForm" label-width="auto" :rules="passRule" ref="addForm">
  205. <el-form-item :label="$t('lable.originalPassword')" prop="originPassword">
  206. <el-input v-model="addForm.originPassword" autocomplete="off" :placeholder="$t('defaultText.pleaseEnterTheOldPassword')" show-password></el-input>
  207. </el-form-item>
  208. <el-form-item :label="$t('lable.newPassword')" prop="newPassword">
  209. <el-input v-model="addForm.newPassword" autocomplete="off" :placeholder="$t('defaultText.pleaseEnterTheNewPassword')" show-password></el-input>
  210. </el-form-item>
  211. </el-form>
  212. <div slot="footer" class="dialog-footer">
  213. <el-button @click.native="editPassWord = false">{{$t('btn.cancel')}}</el-button>
  214. <el-button type="primary" @click.native="resetPwd" :loading="editLoading">{{$t('btn.submit')}}</el-button>
  215. </div>
  216. </el-dialog>
  217. <!--修改信息-->
  218. <el-dialog :title="$t('title.modifyTheInformation')" width='450px' v-if="editInformation" :visible.sync="editInformation" :close-on-click-modal="false" customClass="customWidth">
  219. <el-form :model="editInfoForm" label-width="auto" :rules="passRule" ref="editInfoForm">
  220. <el-form-item :label="$t('lable.name')" prop="username">
  221. <el-input v-model="editInfoForm.username" autocomplete="off" :placeholder="$t('defaultText.PleaseEnterYourName')"></el-input>
  222. </el-form-item>
  223. </el-form>
  224. <el-form :model="editInfoForm" label-width="auto" :rules="passRule" ref="editInfoForm">
  225. <el-form-item :label="$t('lable.phone')" prop="mobile">
  226. <el-input v-model="editInfoForm.mobile" autocomplete="off" :placeholder="$t('defaultText.PleaseEnterYourPhone')" :disabled="true"></el-input>
  227. </el-form-item>
  228. </el-form>
  229. <div slot="footer" class="dialog-footer">
  230. <el-button @click.native="editInformation = false">{{$t('btn.cancel')}}</el-button>
  231. <el-button type="primary" @click.native="editInfo" :loading="editLoading2">{{$t('btn.submit')}}</el-button>
  232. </div>
  233. </el-dialog>
  234. <el-dialog
  235. :title="$t('xiuGaiGongSiMingCheng')"
  236. :visible.sync="editCompanyNamedialog"
  237. width="30%">
  238. <el-form :model="companyForm" :rules="rules" ref="companyForm" label-width="100px" class="demo-ruleForm">
  239. <el-form-item :label="$t('gongSiMingCheng')" prop="name">
  240. <el-input v-model.trim="companyForm.name"></el-input>
  241. </el-form-item>
  242. </el-form>
  243. <span slot="footer" class="dialog-footer">
  244. <el-button @click="editCompanyNamedialog = false">{{ $t('quXiao') }}</el-button>
  245. <el-button type="primary" @click="editCompanyName('companyForm')">{{ $t('queDing') }}</el-button>
  246. </span>
  247. </el-dialog>
  248. </section>
  249. </el-col>
  250. <!-- 完善工号弹窗 -->
  251. <el-dialog :title="$t('wanShanGongHao')" :visible.sync="perfectJobNumber" width="500px" :show-close="false">
  252. <el-form :model="perfectForm" :rules="rules" ref="perfectForm" label-width="80px" class="demo-ruleForm">
  253. <el-form-item :label="$t('Worknumber')" prop="jobNumber">
  254. <el-input v-model.trim="perfectForm.jobNumber"></el-input>
  255. </el-form-item>
  256. </el-form>
  257. <span slot="footer" class="dialog-footer">
  258. <el-button type="primary" @click="editPerfectJobNumber('perfectForm')">{{ $t('queDing') }}</el-button>
  259. </span>
  260. </el-dialog>
  261. <!-- 完善名称弹窗 -->
  262. <el-dialog :title="$t('wanShanXingMing')" :visible.sync="perfectName" width="500px" :show-close="false">
  263. <el-form :model="perfectFormName" :rules="rules" ref="perfectFormName" label-width="80px" class="demo-ruleForm">
  264. <el-form-item :label="$t('lable.name')" prop="userName">
  265. <el-input v-model.trim="perfectFormName.userName"></el-input>
  266. </el-form-item>
  267. </el-form>
  268. <span slot="footer" class="dialog-footer">
  269. <el-button type="primary" @click="editPerfectName('perfectFormName')">{{$t('queDing')}}</el-button>
  270. </span>
  271. </el-dialog>
  272. </el-row>
  273. </template>
  274. <script>
  275. import util from "../common/js/util";
  276. export default {
  277. // 引用 app.vue reloads 方法
  278. inject:['reloads'],
  279. data() {
  280. return {
  281. themesType: 'default',
  282. textLength: 16,
  283. companyForm:{
  284. name: '',
  285. },
  286. perfectForm:{
  287. jobNumber: '',
  288. },
  289. perfectFormName: {
  290. userName: '',
  291. },
  292. rules: {
  293. name: [
  294. { required: true, message: this.$t('qingShuRuGongSiMingCheng'), trigger: 'blur' },
  295. { min: 1, max: 20, message: this.$t('changDuWei_120GeZiFu'), trigger: 'blur' }
  296. ],
  297. jobNumber: [
  298. { required: true, message: this.$t('qingShuRuGongHao'), trigger: 'blur' }
  299. ],
  300. userName: [
  301. { required: true, message: this.$t('defaultText.PleaseEnterYourName'), trigger: 'blur' }
  302. ]
  303. },
  304. tourFlg: false,
  305. editCompanyNamedialog:false,
  306. firstTourFalse: localStorage.getItem('firstTourFalse') | true, // 是否需要新手指导
  307. steps: [
  308. {
  309. target: '[data-v-step="/timetype"]',
  310. content: `第一步,查看基础设置,按照企业情况进行调整`,
  311. params: {
  312. placement: 'right',
  313. highlight: true
  314. }
  315. },{
  316. target: '[data-v-step="/list"]',
  317. content: `第二步,创建项目和任务`,
  318. params: {
  319. placement: 'right',
  320. highlight: true
  321. }
  322. },{
  323. target: '[data-v-step="/daily"]',
  324. content: `第三步,填写每日工时报告`,
  325. params: {
  326. placement: 'right',
  327. highlight: true
  328. }
  329. },{
  330. target: '[data-v-step="/review"]',
  331. content: `第四步,项目报告审核`,
  332. params: {
  333. placement: 'right',
  334. highlight: true
  335. }
  336. },{
  337. target: '[data-v-step="/cost"]',
  338. content: `第五步,查看工时成本统计结果`,
  339. params: {
  340. placement: 'right',
  341. highlight: true
  342. }
  343. },{
  344. target: '[data-v-step="/finance"]',
  345. content: `第六步,导入薪资,校准成本并生成财务报表`,
  346. params: {
  347. placement: 'right',
  348. highlight: true
  349. }
  350. }
  351. ],
  352. myOptions:{
  353. useKeyboardNavigation: false, //不使用←、→和ESC键来导航tour
  354. startTimeout: 1000, //1秒后执行
  355. highlight: true,
  356. labels: {
  357. buttonSkip: this.$t('tiaoGuo'),
  358. buttonPrevious: this.$t('btn.previousstep'),
  359. buttonNext: this.$t('btn.nextStep'),
  360. buttonStop: this.$t('Shutdown')
  361. }
  362. },
  363. myCallbacks: {
  364. onSkip: this.onSkip, //在data中定义两个回调
  365. onFinish: this.onFinish
  366. },
  367. isCorpWX: false,
  368. // roleArray:["普通员工","超级管理员", "系统管理员", "公司高层","财务管理员", "项目管理员","公司领导"],
  369. roleArray:[this.$t('role.ordinaryEmployees'),this.$t('role.superAdministrator'),this.$t('role.systemAdministrator'),this.$t('role.companyTop'),this.$t('role.financialAdministrator'),this.$t('role.projectManager'),this.$t('role.companyLeadership')],
  370. helpImg: '../assets/image/userHead.png',
  371. user: sessionStorage.getItem("user"),
  372. collapsed: sessionStorage.collapsed!=null?(sessionStorage.collapsed=='true'?true:false):false,
  373. sysUserName: "",
  374. menu: [],
  375. // msgTypeTxt:["审批未通过","有新任务啦","任务有新进展","项目日报审核通过"],
  376. msgTypeTxt:[this.$t('state.notApproved'),this.$t('state.ThereIsAnewTask'),this.$t('state.TheresBeen'),this.$t('state.approvedProject')],
  377. editInformation: false,
  378. editPassWord: false,
  379. editLoading: false,
  380. editLoading2: false,
  381. addForm: {
  382. id: "",
  383. originPassword: "",
  384. newPassword: ""
  385. },
  386. editInfoForm: {
  387. id: "",
  388. username: "",
  389. mobile: "",
  390. companyName: ""
  391. },
  392. passRule: {
  393. originPassword: [{ required: true, message: this.$t('defaultText.pleaseEnterTheOldPassword'), trigger: "blur" }],
  394. newPassword: [{ required: true, message: this.$t('defaultText.pleaseEnterTheNewPassword'), trigger: "blur" }],
  395. username: [{ required: true, message: this.$t('defaultText.PleaseEnterYourName'), trigger: "blur" }]
  396. },
  397. //时间
  398. activeDate: new Date(),
  399. timer: null,
  400. remainingTime: '',
  401. drawer: false,
  402. tableHeight: 0,
  403. popoverData: [],
  404. num: 0,
  405. language: '',
  406. setTimeLoad: null,
  407. // 遮罩
  408. vTourFlg: false,
  409. perfectJobNumber: false, // 完善工号弹窗
  410. perfectName: false, // 完成名称弹窗
  411. jobNumberCheckCompanyId: [936], // 定制需求,需要完善工号的公司id
  412. };
  413. },
  414. created() {
  415. this.firstTourFalse = localStorage.getItem('firstTourFalse') || true
  416. console.log(this.firstTourFalse, '数据书数据')
  417. console.log(localStorage.getItem('firstTourFalse'))
  418. },
  419. methods: {
  420. applicationMarket() {
  421. window.location.href = 'https://www.ttkuaiban.com/appMarket.html'
  422. // window.open('https://www.ttkuaiban.com/appMarket.html', '_blank');
  423. },
  424. getSkipGuidance() {
  425. this.http.post('/user/skipGuidance', {},
  426. res => {
  427. if (res.code == "ok") {
  428. let users = JSON.parse(sessionStorage.getItem("user"))
  429. users.isFirstLogin == 0
  430. sessionStorage.setItem("user", JSON.stringify(users))
  431. }
  432. },
  433. error => {
  434. });
  435. },
  436. onSkip(currentStep) {
  437. console.log('看看')
  438. this.vTourFlg = false
  439. this.firstTourFalse = false
  440. localStorage.setItem('firstTourFalse', false)
  441. console.log(this.user, '用户信息')
  442. if(this.user.corpwxUserid != null) {
  443. this.getSkipGuidance()
  444. }
  445. },
  446. onFinish(currentStep) {
  447. console.log('数据')
  448. this.vTourFlg = false
  449. this.firstTourFalse = false
  450. localStorage.setItem('firstTourFalse', false)
  451. this.getSkipGuidance()
  452. if(this.user.corpwxUserid != null) {
  453. this.getSkipGuidance()
  454. }
  455. },
  456. // 中英文切换
  457. langChange(command) {
  458. let flg = this.language
  459. this.$i18n.locale = command
  460. localStorage.setItem("lang", command)
  461. if(command == 'en') {
  462. this.language = 'English'
  463. } else if (command == 'zh') {
  464. this.language = '中文'
  465. }
  466. if(flg != this.language) {
  467. this.reloads()
  468. }
  469. },
  470. //退出登录
  471. logout: function() {
  472. var _this = this;
  473. this.$confirm(this.$t('other.confirmExit') + '?', this.$t('other.prompts'), {
  474. //type: 'warning'
  475. confirmButtonText: this.$t('btn.submit'),
  476. cancelButtonText: this.$t('btn.cancel'),
  477. }).then(() => {
  478. sessionStorage.removeItem("user");
  479. location.reload();
  480. _this.$router.push("/login");
  481. });
  482. },
  483. //折叠导航栏
  484. collapse: function() {
  485. this.collapsed = !this.collapsed;
  486. sessionStorage.collapsed = this.collapsed;
  487. },
  488. showMenu(i, status) {
  489. this.$refs.menuCollapsed.getElementsByClassName(
  490. "submenu-hook-" + i
  491. )[0].style.display = status ? "block" : "none";
  492. },
  493. //打开编辑信息界面
  494. editInfoOpen() {
  495. this.editInformation = true;
  496. this.editInfoForm.id = JSON.parse(sessionStorage.getItem("user")).id;
  497. this.editInfoForm.username = JSON.parse(
  498. sessionStorage.getItem("user")
  499. ).username;
  500. this.editInfoForm.mobile = JSON.parse(
  501. sessionStorage.getItem("user")
  502. ).account;
  503. this.editInfoForm.companyName = JSON.parse(
  504. sessionStorage.getItem("user")
  505. ).companyName;
  506. },
  507. //编辑信息
  508. editInfo() {
  509. this.$refs.editInfoForm.validate(valid => {
  510. if (valid) {
  511. this.editLoading2 = true;
  512. this.http.post(
  513. this.port.pwd.resetPwd,
  514. { id: this.editInfoForm.id, username: this.editInfoForm.username },
  515. res => {
  516. this.editLoading2 = false;
  517. this.editInformation = false;
  518. if (res.code == "ok") {
  519. this.$message({
  520. message: this.$t('message.modifyTheSuccess'),
  521. type: "success"
  522. });
  523. //读取并覆盖session storage
  524. var userObject = JSON.parse(sessionStorage.getItem("user"));
  525. userObject.username = this.editInfoForm.username;
  526. sessionStorage.setItem("user", JSON.stringify(userObject));
  527. this.sysUserName = this.editInfoForm.username;
  528. } else {
  529. this.$message({
  530. message: res.msg,
  531. type: "error"
  532. });
  533. }
  534. },
  535. error => {
  536. this.editLoading2 = false;
  537. this.editInformation = false;
  538. this.$message({
  539. message: error,
  540. type: "error"
  541. });
  542. }
  543. );
  544. }
  545. });
  546. },
  547. //编辑公司名称
  548. editCompanyName(companyForm){
  549. this.$refs[companyForm].validate((valid) => {
  550. if (valid) {
  551. this.http.post("/company/editCompanyName", {name:this.companyForm.name},
  552. res => {
  553. if (res.code == "ok") {
  554. this.editCompanyNamedialog = false;
  555. let list = JSON.parse(sessionStorage.getItem("user") || '[]')
  556. sessionStorage.removeItem('user')
  557. this.user.companyName = this.companyForm.name
  558. list.companyName = this.companyForm.name
  559. sessionStorage.setItem("user",JSON.stringify(list))
  560. this.$message({
  561. message: res.msg,
  562. type: "success"
  563. });
  564. } else {
  565. this.$message({
  566. message: res.msg,
  567. type: "error"
  568. });
  569. }
  570. },
  571. error => {
  572. this.$message({
  573. message: error,
  574. type: "error"
  575. });
  576. });
  577. } else {
  578. return false;
  579. }
  580. });
  581. },
  582. reset() {
  583. this.editPassWord = true;
  584. this.addForm.id = JSON.parse(sessionStorage.getItem("user")).id;
  585. this.addForm.account = JSON.parse(sessionStorage.getItem("user")).account;
  586. },
  587. resetPwd() {
  588. this.$refs.addForm.validate(valid => {
  589. if (valid) {
  590. this.editLoading = true;
  591. this.http.post( this.port.manage.editPassword, this.addForm,
  592. res => {
  593. this.editLoading = false;
  594. this.editPassWord = false;
  595. if (res.code == "ok") {
  596. this.$message({
  597. // message: "修改成功,请重新登录",
  598. message: this.$t('message.logAganin'),
  599. type: "success"
  600. });
  601. this.$router.push("/login");
  602. } else {
  603. this.$message({
  604. message: res.msg,
  605. type: "error"
  606. });
  607. }
  608. },
  609. error => {
  610. this.editLoading = false;
  611. this.editPassWord = false;
  612. this.$message({
  613. message: error,
  614. type: "error"
  615. });
  616. });
  617. }
  618. });
  619. },
  620. setTime() {
  621. var d = util.formatDate.cdTime(new Date(new Date().getTime() + this.user.remainingTime), new Date(), 'd');
  622. var h = util.formatDate.cdTime(new Date(new Date().getTime() + this.user.remainingTime), new Date(), 'h');
  623. var m = util.formatDate.cdTime(new Date(new Date().getTime() + this.user.remainingTime), new Date(), 'm');
  624. var s = util.formatDate.cdTime(new Date(new Date().getTime() + this.user.remainingTime), new Date(), 's');
  625. this.remainingTime = d+this.$t('time.day')+h+this.$t('shi')+m+this.$t('fen')+s+this.$t('miao');
  626. },
  627. // 加载消息
  628. loadNotice() {
  629. this.http.post( this.port.manage.msgList, {},
  630. res => {
  631. if (res.code == "ok") {
  632. var list = res.data;
  633. if(this.user.userNameNeedTranslate == 1) {
  634. let msgArr = res.data
  635. for(var i in msgArr) {
  636. if(msgArr[i].msg) {
  637. let caozuo = JSON.parse(JSON.stringify(msgArr[i].msg))
  638. if(caozuo.indexOf('$userName=') != '-1') {
  639. let textOne = caozuo.split('$userName=')[0]
  640. let textTwo = caozuo.split('$userName=')[1].split('$')[0]
  641. let textThree = caozuo.split('$userName=')[1].split('$')[1]
  642. msgArr[i].omg = {
  643. textOne: textOne,
  644. textTwo: textTwo,
  645. textThree: textThree
  646. }
  647. } else {
  648. msgArr[i].omg = {
  649. textOne: msgArr[i].msg,
  650. textTwo: '',
  651. textThree: ''
  652. }
  653. }
  654. } else {
  655. msgArr[i].omg = {
  656. textOne: '',
  657. textTwo: '',
  658. textThree: ''
  659. }
  660. }
  661. }
  662. }
  663. this.popoverData = res.data;
  664. var num = 0;
  665. for(var i in list) {
  666. if(list[i].checked != 1) {
  667. num ++;
  668. }
  669. }
  670. this.num = num;
  671. } else {
  672. this.$message({
  673. message: res.msg,
  674. type: "error"
  675. });
  676. }
  677. },
  678. error => {
  679. this.$message({
  680. message: error,
  681. type: "error"
  682. });
  683. });
  684. },
  685. //点击消息的跳转
  686. locationHerf(id, date, type, row) {
  687. this.http.post( this.port.manage.check, { id: id },
  688. res => {
  689. if (res.code == "ok") {
  690. this.loadNotice();
  691. if (type == 0) {
  692. //审批未通过的消息, 也包括审批通过的通知
  693. sessionStorage.msg = date;
  694. sessionStorage.from = 1;
  695. //本页面再点的话强制转移一下
  696. var currentRoute = this.$route.path.split("/");
  697. if (currentRoute[1] == "daily") {
  698. this.$router.go(0);
  699. this.drawer = false;
  700. return false;
  701. }
  702. this.$router.push("/daily");
  703. this.drawer = false;
  704. } else if (type == 1) {
  705. //1- 有新任务待执行
  706. this.$router.push("/projectInside/"+date);
  707. this.drawer = false;
  708. } else if (type == 2) {
  709. //2- 任务有新进展
  710. this.$router.push("/projectInside/"+date);
  711. this.drawer = false;
  712. } else if (type == 3) {
  713. //3- 费用报销
  714. this.$router.push("/expense");
  715. this.drawer = false;
  716. } else if (type == 4) {
  717. //4- 请假消息
  718. this.$router.push("/leave");
  719. this.drawer = false;
  720. } else if (type == 5) {
  721. //5- 出差消息
  722. this.$router.push("/awayOffice");
  723. this.drawer = false;
  724. } else if (type == 6 || type == 7 || type == 8) {
  725. // 6、7 合同通过、驳回
  726. this.$router.push("/contract");
  727. this.drawer = false;
  728. } else if (type == 10) {
  729. // 10 预估工时审核 通过 驳回
  730. var action = '';
  731. //跳转进入项目的任务看板
  732. date = decodeURIComponent(date);
  733. if (date.includes('@adjustBudget-')) {
  734. //需要打开分组预估工时设置
  735. action = date.split('@')[1];
  736. date = date.split('@')[0];
  737. }
  738. sessionStorage.action = action
  739. this.$router.push("/projectInside/"+date);
  740. this.drawer = false;
  741. } else if(type == 11) {
  742. console.log(row, '<====== ganttData')
  743. const { taskId, ganttData, msg, jumpType } = row
  744. // if(msg.indexOf('取消') != -1 || msg.indexOf('驳回') != -1 || msg.indexOf('审核') != -1) {
  745. this.$router.push({
  746. path: '/task',
  747. // query: { doICreateIt: msg.indexOf('新的工作计划') != -1 ? 1 : msg.indexOf('审批') != -1 ? 3 : 2 }
  748. query: { doICreateIt: jumpType ? jumpType : 2 }
  749. })
  750. // } else {
  751. // this.$router.push({
  752. // path: '/list',
  753. // query: {
  754. // messageTaskId: taskId,
  755. // ganttData: JSON.stringify(ganttData || {})
  756. // }
  757. // });
  758. // }
  759. this.drawer = false;
  760. }
  761. } else {
  762. this.$message({
  763. message: res.msg,
  764. type: "error"
  765. });
  766. }
  767. },
  768. error => {
  769. this.$message({
  770. message: error,
  771. type: "error"
  772. });
  773. });
  774. },
  775. // 获取企业微信的参数
  776. agentConfig() {
  777. var isCorpWX = true
  778. var ua = navigator.userAgent.toLowerCase();
  779. if (ua.indexOf("wxwork") > 0) {
  780. isCorpWX = false;
  781. }
  782. var curUrl = location.href.split("#")[0];
  783. this.http.post("/wxcorp/getCorpWXConfig", {url: curUrl, token: this.user.id}, (res) => {
  784. if (res.code == "ok") {
  785. wx.config({
  786. beta: true,
  787. debug: isCorpWX, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  788. appId: res.data.appid, // 必填,公众号的唯一标识
  789. timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  790. nonceStr: res.data.noncestr, // 必填,生成签名的随机串
  791. signature: res.data.sign, // 必填,签名,见附录1
  792. jsApiList: ['chooseImage','previewImage','uploadImage','downloadImage','previewFile','getLocation','agentConfig', 'getLocalImgData']
  793. });
  794. var that = this;
  795. wx.ready(function(){
  796. // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
  797. that.http.post("/wxcorp/getCorpWXAgentConfig", {url: curUrl, token: that.user.id}, (res) => {
  798. if (res.code == "ok") {
  799. console.log()
  800. wx.agentConfig({
  801. corpid: res.data.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
  802. agentid: res.data.agentid, // 必填,企业微信的应用id (e.g. 1000247)
  803. timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  804. nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
  805. signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
  806. jsApiList: ['selectExternalContact', 'selectEnterpriseContact', 'openAppManage'], //必填,传入需要使用的接口名称
  807. success: function (result) {
  808. console.log(result, '请求微信成功')
  809. console.log(window, 'window')
  810. // wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
  811. if(window.WWOpenData) {
  812. window.WWOpenData.bind(document.querySelector('TranslationOpenDataText'))
  813. if (WWOpenData.initCanvas) {
  814. WWOpenData.initCanvas()
  815. console.log('我企业微信 canvas 应该执行了吧')
  816. }
  817. }
  818. },
  819. fail: function (res) {
  820. console.log('查看错误信息', res)
  821. if (res.errMsg.indexOf('function not exist') > -1) {
  822. alert(that.$t('banBenGuoDiQingShengJi'))
  823. }
  824. },
  825. })
  826. }
  827. }, (error) => {
  828. console.log('查看错误信息' + res)
  829. if (error.errMsg.indexOf('function not exist') > -1) {
  830. alert(that.$t('banBenGuoDiQingShengJi'))
  831. }
  832. })
  833. });
  834. }
  835. }, (error) => {
  836. console.log(error, '哦耶')
  837. })
  838. },
  839. // 完善工号
  840. editPerfectJobNumber(perfectForm) {
  841. this.$refs[perfectForm].validate((valid) => {
  842. if (valid) {
  843. const { id } = this.user
  844. this.http.post("/user/updateUserJobNumber", {
  845. jobNumber: this.perfectForm.jobNumber,
  846. userId: id
  847. },
  848. res => {
  849. if (res.code == "ok") {
  850. this.perfectJobNumber = false
  851. let nerUser = {
  852. ...this.user,
  853. jobNumber: this.perfectForm.jobNumber
  854. }
  855. sessionStorage.setItem('user', JSON.stringify(nerUser));
  856. this.$message({
  857. message: this.$t('operationissuccessful'),
  858. type: "success"
  859. });
  860. } else {
  861. this.$message({
  862. message: res.msg,
  863. type: "error"
  864. });
  865. }
  866. },
  867. error => {
  868. this.$message({
  869. message: error,
  870. type: "error"
  871. });
  872. });
  873. } else {
  874. return false;
  875. }
  876. });
  877. },
  878. // 完善姓名
  879. editPerfectName(perfectForm) {
  880. this.$refs[perfectForm].validate((valid) => {
  881. if (valid) {
  882. this.http.post("/user/userRename", {
  883. newName: this.perfectFormName.userName,
  884. },
  885. res => {
  886. if (res.code == "ok") {
  887. this.perfectName = false
  888. let nerUser = {
  889. ...this.user,
  890. name: this.perfectFormName.userName
  891. }
  892. sessionStorage.setItem('user', JSON.stringify(nerUser));
  893. this.$message({
  894. message: this.$t('operationissuccessful'),
  895. type: "success"
  896. });
  897. } else {
  898. this.$message({
  899. message: res.msg,
  900. type: "error"
  901. });
  902. }
  903. },
  904. error => {
  905. this.$message({
  906. message: error,
  907. type: "error"
  908. });
  909. });
  910. } else {
  911. return false;
  912. }
  913. });
  914. },
  915. setDDOpenData() {
  916. const ddUrl = new URL(window.location.href);
  917. const ddCorpid = ddUrl.searchParams.get("corpid") || ''
  918. let ddOpenDataInit = window.DTOpenData.init(ddCorpid)
  919. console.log(ddOpenDataInit, '<=== 钉钉执行 window.DTOpenData.init(ddCorpid) 的判断')
  920. if (ddOpenDataInit) {
  921. setTimeout(() => {
  922. console.log('<==== 执行 window.DTOpenData.update(document.querySelectorAll(dt-open-data))')
  923. window.DTOpenData.update(document.querySelectorAll('dt-open-data'));
  924. }, 300)
  925. }else {
  926. console.log('钉钉没有触发')
  927. }
  928. }
  929. },
  930. mounted() {
  931. var ua = navigator.userAgent.toLowerCase();
  932. this.themesType = localStorage.getItem('themes') || 'default';
  933. if (ua.indexOf("wxwork") > 0) {
  934. this.isCorpWX = true;
  935. }
  936. let langse = localStorage.getItem("lang") || 'zh'
  937. if(langse == 'en') {
  938. this.language = 'English'
  939. } else if (langse == 'zh') {
  940. this.language = '中文'
  941. }
  942. let height = window.innerHeight;
  943. this.tableHeight = height - 15;
  944. const that = this;
  945. window.onresize = function temp() {
  946. that.tableHeight = window.innerHeight - 15;
  947. };
  948. if (this.user) {
  949. var user = JSON.parse(this.user);
  950. this.user = user;
  951. this.sysUserName = user.name || "";
  952. this.loadNotice();
  953. if(this.user.remainingTime != "" && this.user.remainingTime != 0) {
  954. this.remainingTime = util.formatDate.format(new Date(new Date().getTime() + this.user.remainingTime), "yyyy-MM-dd")
  955. } else {
  956. this.remainingTime = this.$t('other.expired');
  957. clearInterval(this.timer);
  958. }
  959. } else {
  960. this.$router.push("/login");
  961. }
  962. // console.log('啊,我被触发了呀')
  963. // 获取企业微信参数
  964. if(this.user.userNameNeedTranslate == '1') {
  965. this.agentConfig()
  966. }
  967. // 判断是否为新用户
  968. if(this.user.isFirstLogin == 1 && this.user.roleName == this.$t('role.superAdministrator') && this.firstTourFalse != 'false' && this.user.createTime[0] > '2022') {
  969. var thats = this
  970. this.tourFlg = true
  971. setTimeout(() => {
  972. thats.$tours['myTour'].start()
  973. setTimeout(() => {
  974. thats.vTourFlg = true
  975. }, 1000)
  976. }, 200)
  977. }
  978. // 检查是否有工号
  979. const { jobNumber, companyId, userNameNeedTranslate, name, dingdingUserid } = this.user
  980. if(this.jobNumberCheckCompanyId.includes(companyId) && !jobNumber) {
  981. this.perfectJobNumber = true
  982. }
  983. // 检查是否需要完成姓名
  984. if(userNameNeedTranslate == 0 && (name == dingdingUserid)) {
  985. this.perfectName = true
  986. }
  987. if(this.user.dingdingUserid) {
  988. this.setDDOpenData()
  989. }
  990. // 中英文显示字符长度
  991. if(this.language == '中文') {
  992. this.textLength = 16
  993. } else {
  994. this.textLength = 17
  995. }
  996. },
  997. };
  998. </script>
  999. <style scoped lang="scss">
  1000. @import "../assets/scss/handle";
  1001. .contentMask {
  1002. width: 100%;
  1003. height: 100%;
  1004. position: absolute;
  1005. top: 0;
  1006. left: 0;
  1007. background: #000;
  1008. opacity: .4;
  1009. z-index: 99;
  1010. // box-shadow: 0 0 0 99999px rgba(0,0,0,.4) !important;
  1011. }
  1012. .gongshimingz {
  1013. width: 100%;
  1014. position: absolute;
  1015. left: 0px;
  1016. display: inline-block;
  1017. overflow: hidden;
  1018. white-space: nowrap;
  1019. text-overflow: ellipsis;
  1020. box-sizing: border-box;
  1021. padding-left: 60px;
  1022. }
  1023. .el-menu-vertical-demo i {
  1024. margin-right: 10px;
  1025. }
  1026. .container {
  1027. position: absolute;
  1028. top: 0px;
  1029. bottom: 0px;
  1030. width: 100%;
  1031. .header {
  1032. height: 60px;
  1033. line-height: 60px;
  1034. @include background_color("background_color");
  1035. color: #fff;
  1036. position: relative;
  1037. .userinfo {
  1038. text-align: right;
  1039. padding-right: 35px;
  1040. float: right;
  1041. .userinfo-inner {
  1042. cursor: pointer;
  1043. color: #fff;
  1044. img {
  1045. width: 40px;
  1046. height: 40px;
  1047. border-radius: 20px;
  1048. margin: 10px 10px 10px 10px;
  1049. float: left;
  1050. }
  1051. }
  1052. .itemNew {
  1053. height: 25px;
  1054. margin: 0 0 0 10px;
  1055. i {
  1056. vertical-align: top;
  1057. }
  1058. }
  1059. }
  1060. .logo {
  1061. height: 60px;
  1062. font-size: 21px;
  1063. padding-left: 20px;
  1064. padding-right: 20px;
  1065. border-color: rgba(238, 241, 146, 0.3);
  1066. border-right-width: 1px;
  1067. border-right-style: solid;
  1068. img {
  1069. width: 40px;
  1070. float: left;
  1071. margin: 10px 10px 10px 18px;
  1072. }
  1073. img.headImg {
  1074. margin: 0;
  1075. width: 40px;
  1076. height: 40px;
  1077. margin: 10px 0 0 10px;
  1078. }
  1079. .logo-sys {
  1080. height: 100%;
  1081. line-height: 100%;
  1082. img.headImg {
  1083. width: 40px;
  1084. height: 40px;
  1085. margin: 7.5px 0 0 10px;
  1086. vertical-align: middle;
  1087. }
  1088. span {
  1089. display: inline-block;
  1090. height: 100%;
  1091. line-height: 60px;
  1092. margin-left: 15px;
  1093. font-size: 18px;
  1094. // margin: 20px 0 0 15px;
  1095. vertical-align: middle;
  1096. }
  1097. }
  1098. .txt {
  1099. color: #fff;
  1100. }
  1101. }
  1102. .logo-width {
  1103. width: 200px;
  1104. }
  1105. .logo-collapse-width {
  1106. width: 60px;
  1107. }
  1108. .tools {
  1109. padding: 0px 23px;
  1110. // width: 14px;
  1111. height: 60px;
  1112. line-height: 60px;
  1113. cursor: pointer;
  1114. }
  1115. }
  1116. .main {
  1117. display: flex;
  1118. position: absolute;
  1119. top: 60px;
  1120. bottom: 0px;
  1121. overflow: hidden;
  1122. .h-full {
  1123. height: 100%;
  1124. }
  1125. aside {
  1126. flex: 0 0 230px;
  1127. width: 230px;
  1128. .el-menu {
  1129. height: 100%;
  1130. }
  1131. .collapsed {
  1132. width: 60px;
  1133. .item {
  1134. position: relative;
  1135. }
  1136. .submenu {
  1137. position: absolute;
  1138. top: 0px;
  1139. left: 60px;
  1140. z-index: 99999;
  1141. height: auto;
  1142. display: none;
  1143. box-shadow: 5px 5px 10px #ddd;
  1144. }
  1145. }
  1146. }
  1147. .menu-collapsed {
  1148. flex: 0 0 60px;
  1149. width: 60px;
  1150. }
  1151. .menu-expanded {
  1152. flex: 0 0 200px;
  1153. width: 200px;
  1154. }
  1155. .content-container {
  1156. flex: 1;
  1157. width: 80%;
  1158. overflow-y: auto;
  1159. overflow-x: hidden;
  1160. // position: relative;
  1161. .breadcrumb-container {
  1162. .title {
  1163. width: 200px;
  1164. float: left;
  1165. color: #475669;
  1166. }
  1167. .breadcrumb-inner {
  1168. float: right;
  1169. }
  1170. }
  1171. .content-wrapper {
  1172. background-color: #fff;
  1173. box-sizing: border-box;
  1174. // position: relative;
  1175. }
  1176. }
  1177. }
  1178. }
  1179. .popover-item {
  1180. padding: 10px;
  1181. border-bottom: 1px #eee solid;
  1182. }
  1183. .popover-item > div > p {
  1184. margin: 0;
  1185. line-height: 18px;
  1186. }
  1187. .popover-title {
  1188. // color: #409eff;
  1189. @include font_color("color");
  1190. padding-bottom: 8px;
  1191. }
  1192. .popover-type {
  1193. color: #aaa;
  1194. font-size: 8px;
  1195. float: right;
  1196. }
  1197. .popover-button {
  1198. font-weight: 900;
  1199. padding: 10px;
  1200. text-align: center;
  1201. cursor: pointer;
  1202. }
  1203. .isRead {
  1204. color: #999 !important;
  1205. }
  1206. .bosx {
  1207. width: 110px;
  1208. display: inline-block;
  1209. overflow: hidden;
  1210. white-space: nowrap;
  1211. text-overflow: ellipsis;
  1212. }
  1213. </style>