Home.vue 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265
  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 } = 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 ? 3 : 2 }
  748. })
  749. // } else {
  750. // this.$router.push({
  751. // path: '/list',
  752. // query: {
  753. // messageTaskId: taskId,
  754. // ganttData: JSON.stringify(ganttData || {})
  755. // }
  756. // });
  757. // }
  758. this.drawer = false;
  759. }
  760. } else {
  761. this.$message({
  762. message: res.msg,
  763. type: "error"
  764. });
  765. }
  766. },
  767. error => {
  768. this.$message({
  769. message: error,
  770. type: "error"
  771. });
  772. });
  773. },
  774. // 获取企业微信的参数
  775. agentConfig() {
  776. var isCorpWX = true
  777. var ua = navigator.userAgent.toLowerCase();
  778. if (ua.indexOf("wxwork") > 0) {
  779. isCorpWX = false;
  780. }
  781. var curUrl = location.href.split("#")[0];
  782. this.http.post("/wxcorp/getCorpWXConfig", {url: curUrl, token: this.user.id}, (res) => {
  783. if (res.code == "ok") {
  784. wx.config({
  785. beta: true,
  786. debug: isCorpWX, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  787. appId: res.data.appid, // 必填,公众号的唯一标识
  788. timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  789. nonceStr: res.data.noncestr, // 必填,生成签名的随机串
  790. signature: res.data.sign, // 必填,签名,见附录1
  791. jsApiList: ['chooseImage','previewImage','uploadImage','downloadImage','previewFile','getLocation','agentConfig', 'getLocalImgData']
  792. });
  793. var that = this;
  794. wx.ready(function(){
  795. // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
  796. that.http.post("/wxcorp/getCorpWXAgentConfig", {url: curUrl, token: that.user.id}, (res) => {
  797. if (res.code == "ok") {
  798. console.log()
  799. wx.agentConfig({
  800. corpid: res.data.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
  801. agentid: res.data.agentid, // 必填,企业微信的应用id (e.g. 1000247)
  802. timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  803. nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
  804. signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
  805. jsApiList: ['selectExternalContact', 'selectEnterpriseContact', 'openAppManage'], //必填,传入需要使用的接口名称
  806. success: function (result) {
  807. console.log(result, '请求微信成功')
  808. console.log(window, 'window')
  809. // wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
  810. if(window.WWOpenData) {
  811. window.WWOpenData.bind(document.querySelector('TranslationOpenDataText'))
  812. if (WWOpenData.initCanvas) {
  813. WWOpenData.initCanvas()
  814. console.log('我企业微信 canvas 应该执行了吧')
  815. }
  816. }
  817. },
  818. fail: function (res) {
  819. console.log('查看错误信息', res)
  820. if (res.errMsg.indexOf('function not exist') > -1) {
  821. alert(that.$t('banBenGuoDiQingShengJi'))
  822. }
  823. },
  824. })
  825. }
  826. }, (error) => {
  827. console.log('查看错误信息' + res)
  828. if (error.errMsg.indexOf('function not exist') > -1) {
  829. alert(that.$t('banBenGuoDiQingShengJi'))
  830. }
  831. })
  832. });
  833. }
  834. }, (error) => {
  835. console.log(error, '哦耶')
  836. })
  837. },
  838. // 完善工号
  839. editPerfectJobNumber(perfectForm) {
  840. this.$refs[perfectForm].validate((valid) => {
  841. if (valid) {
  842. const { id } = this.user
  843. this.http.post("/user/updateUserJobNumber", {
  844. jobNumber: this.perfectForm.jobNumber,
  845. userId: id
  846. },
  847. res => {
  848. if (res.code == "ok") {
  849. this.perfectJobNumber = false
  850. let nerUser = {
  851. ...this.user,
  852. jobNumber: this.perfectForm.jobNumber
  853. }
  854. sessionStorage.setItem('user', JSON.stringify(nerUser));
  855. this.$message({
  856. message: this.$t('operationissuccessful'),
  857. type: "success"
  858. });
  859. } else {
  860. this.$message({
  861. message: res.msg,
  862. type: "error"
  863. });
  864. }
  865. },
  866. error => {
  867. this.$message({
  868. message: error,
  869. type: "error"
  870. });
  871. });
  872. } else {
  873. return false;
  874. }
  875. });
  876. },
  877. // 完善姓名
  878. editPerfectName(perfectForm) {
  879. this.$refs[perfectForm].validate((valid) => {
  880. if (valid) {
  881. this.http.post("/user/userRename", {
  882. newName: this.perfectFormName.userName,
  883. },
  884. res => {
  885. if (res.code == "ok") {
  886. this.perfectName = false
  887. let nerUser = {
  888. ...this.user,
  889. name: this.perfectFormName.userName
  890. }
  891. sessionStorage.setItem('user', JSON.stringify(nerUser));
  892. this.$message({
  893. message: this.$t('operationissuccessful'),
  894. type: "success"
  895. });
  896. } else {
  897. this.$message({
  898. message: res.msg,
  899. type: "error"
  900. });
  901. }
  902. },
  903. error => {
  904. this.$message({
  905. message: error,
  906. type: "error"
  907. });
  908. });
  909. } else {
  910. return false;
  911. }
  912. });
  913. },
  914. setDDOpenData() {
  915. const ddUrl = new URL(window.location.href);
  916. const ddCorpid = ddUrl.searchParams.get("corpid") || ''
  917. let ddOpenDataInit = window.DTOpenData.init(ddCorpid)
  918. console.log(ddOpenDataInit, '<=== 钉钉执行 window.DTOpenData.init(ddCorpid) 的判断')
  919. if (ddOpenDataInit) {
  920. setTimeout(() => {
  921. console.log('<==== 执行 window.DTOpenData.update(document.querySelectorAll(dt-open-data))')
  922. window.DTOpenData.update(document.querySelectorAll('dt-open-data'));
  923. }, 300)
  924. }else {
  925. console.log('钉钉没有触发')
  926. }
  927. }
  928. },
  929. mounted() {
  930. var ua = navigator.userAgent.toLowerCase();
  931. this.themesType = localStorage.getItem('themes') || 'default';
  932. if (ua.indexOf("wxwork") > 0) {
  933. this.isCorpWX = true;
  934. }
  935. let langse = localStorage.getItem("lang") || 'zh'
  936. if(langse == 'en') {
  937. this.language = 'English'
  938. } else if (langse == 'zh') {
  939. this.language = '中文'
  940. }
  941. let height = window.innerHeight;
  942. this.tableHeight = height - 15;
  943. const that = this;
  944. window.onresize = function temp() {
  945. that.tableHeight = window.innerHeight - 15;
  946. };
  947. if (this.user) {
  948. var user = JSON.parse(this.user);
  949. this.user = user;
  950. this.sysUserName = user.name || "";
  951. this.loadNotice();
  952. if(this.user.remainingTime != "" && this.user.remainingTime != 0) {
  953. this.remainingTime = util.formatDate.format(new Date(new Date().getTime() + this.user.remainingTime), "yyyy-MM-dd")
  954. } else {
  955. this.remainingTime = this.$t('other.expired');
  956. clearInterval(this.timer);
  957. }
  958. } else {
  959. this.$router.push("/login");
  960. }
  961. // console.log('啊,我被触发了呀')
  962. // 获取企业微信参数
  963. if(this.user.userNameNeedTranslate == '1') {
  964. this.agentConfig()
  965. }
  966. // 判断是否为新用户
  967. if(this.user.isFirstLogin == 1 && this.user.roleName == this.$t('role.superAdministrator') && this.firstTourFalse != 'false' && this.user.createTime[0] > '2022') {
  968. var thats = this
  969. this.tourFlg = true
  970. setTimeout(() => {
  971. thats.$tours['myTour'].start()
  972. setTimeout(() => {
  973. thats.vTourFlg = true
  974. }, 1000)
  975. }, 200)
  976. }
  977. // 检查是否有工号
  978. const { jobNumber, companyId, userNameNeedTranslate, name, dingdingUserid } = this.user
  979. if(this.jobNumberCheckCompanyId.includes(companyId) && !jobNumber) {
  980. this.perfectJobNumber = true
  981. }
  982. // 检查是否需要完成姓名
  983. if(userNameNeedTranslate == 0 && (name == dingdingUserid)) {
  984. this.perfectName = true
  985. }
  986. if(this.user.dingdingUserid) {
  987. this.setDDOpenData()
  988. }
  989. // 中英文显示字符长度
  990. if(this.language == '中文') {
  991. this.textLength = 16
  992. } else {
  993. this.textLength = 17
  994. }
  995. },
  996. };
  997. </script>
  998. <style scoped lang="scss">
  999. @import "../assets/scss/handle";
  1000. .contentMask {
  1001. width: 100%;
  1002. height: 100%;
  1003. position: absolute;
  1004. top: 0;
  1005. left: 0;
  1006. background: #000;
  1007. opacity: .4;
  1008. z-index: 99;
  1009. // box-shadow: 0 0 0 99999px rgba(0,0,0,.4) !important;
  1010. }
  1011. .gongshimingz {
  1012. width: 100%;
  1013. position: absolute;
  1014. left: 0px;
  1015. display: inline-block;
  1016. overflow: hidden;
  1017. white-space: nowrap;
  1018. text-overflow: ellipsis;
  1019. box-sizing: border-box;
  1020. padding-left: 60px;
  1021. }
  1022. .el-menu-vertical-demo i {
  1023. margin-right: 10px;
  1024. }
  1025. .container {
  1026. position: absolute;
  1027. top: 0px;
  1028. bottom: 0px;
  1029. width: 100%;
  1030. .header {
  1031. height: 60px;
  1032. line-height: 60px;
  1033. @include background_color("background_color");
  1034. color: #fff;
  1035. position: relative;
  1036. .userinfo {
  1037. text-align: right;
  1038. padding-right: 35px;
  1039. float: right;
  1040. .userinfo-inner {
  1041. cursor: pointer;
  1042. color: #fff;
  1043. img {
  1044. width: 40px;
  1045. height: 40px;
  1046. border-radius: 20px;
  1047. margin: 10px 10px 10px 10px;
  1048. float: left;
  1049. }
  1050. }
  1051. .itemNew {
  1052. height: 25px;
  1053. margin: 0 0 0 10px;
  1054. i {
  1055. vertical-align: top;
  1056. }
  1057. }
  1058. }
  1059. .logo {
  1060. height: 60px;
  1061. font-size: 21px;
  1062. padding-left: 20px;
  1063. padding-right: 20px;
  1064. border-color: rgba(238, 241, 146, 0.3);
  1065. border-right-width: 1px;
  1066. border-right-style: solid;
  1067. img {
  1068. width: 40px;
  1069. float: left;
  1070. margin: 10px 10px 10px 18px;
  1071. }
  1072. img.headImg {
  1073. margin: 0;
  1074. width: 40px;
  1075. height: 40px;
  1076. margin: 10px 0 0 10px;
  1077. }
  1078. .logo-sys {
  1079. height: 100%;
  1080. line-height: 100%;
  1081. img.headImg {
  1082. width: 40px;
  1083. height: 40px;
  1084. margin: 7.5px 0 0 10px;
  1085. vertical-align: middle;
  1086. }
  1087. span {
  1088. display: inline-block;
  1089. height: 100%;
  1090. line-height: 60px;
  1091. margin-left: 15px;
  1092. font-size: 18px;
  1093. // margin: 20px 0 0 15px;
  1094. vertical-align: middle;
  1095. }
  1096. }
  1097. .txt {
  1098. color: #fff;
  1099. }
  1100. }
  1101. .logo-width {
  1102. width: 200px;
  1103. }
  1104. .logo-collapse-width {
  1105. width: 60px;
  1106. }
  1107. .tools {
  1108. padding: 0px 23px;
  1109. // width: 14px;
  1110. height: 60px;
  1111. line-height: 60px;
  1112. cursor: pointer;
  1113. }
  1114. }
  1115. .main {
  1116. display: flex;
  1117. position: absolute;
  1118. top: 60px;
  1119. bottom: 0px;
  1120. overflow: hidden;
  1121. .h-full {
  1122. height: 100%;
  1123. }
  1124. aside {
  1125. flex: 0 0 230px;
  1126. width: 230px;
  1127. .el-menu {
  1128. height: 100%;
  1129. }
  1130. .collapsed {
  1131. width: 60px;
  1132. .item {
  1133. position: relative;
  1134. }
  1135. .submenu {
  1136. position: absolute;
  1137. top: 0px;
  1138. left: 60px;
  1139. z-index: 99999;
  1140. height: auto;
  1141. display: none;
  1142. box-shadow: 5px 5px 10px #ddd;
  1143. }
  1144. }
  1145. }
  1146. .menu-collapsed {
  1147. flex: 0 0 60px;
  1148. width: 60px;
  1149. }
  1150. .menu-expanded {
  1151. flex: 0 0 200px;
  1152. width: 200px;
  1153. }
  1154. .content-container {
  1155. flex: 1;
  1156. width: 80%;
  1157. overflow-y: auto;
  1158. overflow-x: hidden;
  1159. // position: relative;
  1160. .breadcrumb-container {
  1161. .title {
  1162. width: 200px;
  1163. float: left;
  1164. color: #475669;
  1165. }
  1166. .breadcrumb-inner {
  1167. float: right;
  1168. }
  1169. }
  1170. .content-wrapper {
  1171. background-color: #fff;
  1172. box-sizing: border-box;
  1173. // position: relative;
  1174. }
  1175. }
  1176. }
  1177. }
  1178. .popover-item {
  1179. padding: 10px;
  1180. border-bottom: 1px #eee solid;
  1181. }
  1182. .popover-item > div > p {
  1183. margin: 0;
  1184. line-height: 18px;
  1185. }
  1186. .popover-title {
  1187. // color: #409eff;
  1188. @include font_color("color");
  1189. padding-bottom: 8px;
  1190. }
  1191. .popover-type {
  1192. color: #aaa;
  1193. font-size: 8px;
  1194. float: right;
  1195. }
  1196. .popover-button {
  1197. font-weight: 900;
  1198. padding: 10px;
  1199. text-align: center;
  1200. cursor: pointer;
  1201. }
  1202. .isRead {
  1203. color: #999 !important;
  1204. }
  1205. .bosx {
  1206. width: 110px;
  1207. display: inline-block;
  1208. overflow: hidden;
  1209. white-space: nowrap;
  1210. text-overflow: ellipsis;
  1211. }
  1212. </style>