Home.vue 58 KB

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