Home.vue 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234
  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. .contentMask {
  971. width: 100%;
  972. height: 100%;
  973. position: absolute;
  974. top: 0;
  975. left: 0;
  976. background: #000;
  977. opacity: .4;
  978. z-index: 99;
  979. // box-shadow: 0 0 0 99999px rgba(0,0,0,.4) !important;
  980. }
  981. .gongshimingz {
  982. width: 100%;
  983. position: absolute;
  984. left: 0px;
  985. display: inline-block;
  986. overflow: hidden;
  987. white-space: nowrap;
  988. text-overflow: ellipsis;
  989. box-sizing: border-box;
  990. padding-left: 60px;
  991. }
  992. .el-menu-vertical-demo i {
  993. margin-right: 10px;
  994. }
  995. .container {
  996. position: absolute;
  997. top: 0px;
  998. bottom: 0px;
  999. width: 100%;
  1000. .header {
  1001. height: 60px;
  1002. line-height: 60px;
  1003. background: #20a0ff;
  1004. color: #fff;
  1005. position: relative;
  1006. .userinfo {
  1007. text-align: right;
  1008. padding-right: 35px;
  1009. float: right;
  1010. .userinfo-inner {
  1011. cursor: pointer;
  1012. color: #fff;
  1013. img {
  1014. width: 40px;
  1015. height: 40px;
  1016. border-radius: 20px;
  1017. margin: 10px 10px 10px 10px;
  1018. float: left;
  1019. }
  1020. }
  1021. .itemNew {
  1022. height: 25px;
  1023. margin: 0 0 0 10px;
  1024. i {
  1025. vertical-align: top;
  1026. }
  1027. }
  1028. }
  1029. .logo {
  1030. height: 60px;
  1031. font-size: 21px;
  1032. padding-left: 20px;
  1033. padding-right: 20px;
  1034. border-color: rgba(238, 241, 146, 0.3);
  1035. border-right-width: 1px;
  1036. border-right-style: solid;
  1037. img {
  1038. width: 40px;
  1039. float: left;
  1040. margin: 10px 10px 10px 18px;
  1041. }
  1042. img.headImg {
  1043. margin: 0;
  1044. width: 40px;
  1045. height: 40px;
  1046. margin: 10px 0 0 10px;
  1047. }
  1048. .logo-sys {
  1049. height: 100%;
  1050. line-height: 100%;
  1051. img.headImg {
  1052. width: 40px;
  1053. height: 40px;
  1054. margin: 7.5px 0 0 10px;
  1055. vertical-align: middle;
  1056. }
  1057. span {
  1058. display: inline-block;
  1059. height: 100%;
  1060. line-height: 60px;
  1061. margin-left: 15px;
  1062. font-size: 18px;
  1063. // margin: 20px 0 0 15px;
  1064. vertical-align: middle;
  1065. }
  1066. }
  1067. .txt {
  1068. color: #fff;
  1069. }
  1070. }
  1071. .logo-width {
  1072. width: 200px;
  1073. }
  1074. .logo-collapse-width {
  1075. width: 60px;
  1076. }
  1077. .tools {
  1078. padding: 0px 23px;
  1079. // width: 14px;
  1080. height: 60px;
  1081. line-height: 60px;
  1082. cursor: pointer;
  1083. }
  1084. }
  1085. .main {
  1086. display: flex;
  1087. position: absolute;
  1088. top: 60px;
  1089. bottom: 0px;
  1090. overflow: hidden;
  1091. .h-full {
  1092. height: 100%;
  1093. }
  1094. aside {
  1095. flex: 0 0 230px;
  1096. width: 230px;
  1097. .el-menu {
  1098. height: 100%;
  1099. }
  1100. .collapsed {
  1101. width: 60px;
  1102. .item {
  1103. position: relative;
  1104. }
  1105. .submenu {
  1106. position: absolute;
  1107. top: 0px;
  1108. left: 60px;
  1109. z-index: 99999;
  1110. height: auto;
  1111. display: none;
  1112. box-shadow: 5px 5px 10px #ddd;
  1113. }
  1114. }
  1115. }
  1116. .menu-collapsed {
  1117. flex: 0 0 60px;
  1118. width: 60px;
  1119. }
  1120. .menu-expanded {
  1121. flex: 0 0 200px;
  1122. width: 200px;
  1123. }
  1124. .content-container {
  1125. flex: 1;
  1126. width: 80%;
  1127. overflow-y: auto;
  1128. overflow-x: hidden;
  1129. // position: relative;
  1130. .breadcrumb-container {
  1131. .title {
  1132. width: 200px;
  1133. float: left;
  1134. color: #475669;
  1135. }
  1136. .breadcrumb-inner {
  1137. float: right;
  1138. }
  1139. }
  1140. .content-wrapper {
  1141. background-color: #fff;
  1142. box-sizing: border-box;
  1143. // position: relative;
  1144. }
  1145. }
  1146. }
  1147. }
  1148. .popover-item {
  1149. padding: 10px;
  1150. border-bottom: 1px #eee solid;
  1151. }
  1152. .popover-item > div > p {
  1153. margin: 0;
  1154. line-height: 18px;
  1155. }
  1156. .popover-title {
  1157. color: #409eff;
  1158. padding-bottom: 8px;
  1159. }
  1160. .popover-type {
  1161. color: #aaa;
  1162. font-size: 8px;
  1163. float: right;
  1164. }
  1165. .popover-button {
  1166. font-weight: 900;
  1167. padding: 10px;
  1168. text-align: center;
  1169. cursor: pointer;
  1170. }
  1171. .isRead {
  1172. color: #999 !important;
  1173. }
  1174. .bosx {
  1175. width: 110px;
  1176. display: inline-block;
  1177. overflow: hidden;
  1178. white-space: nowrap;
  1179. text-overflow: ellipsis;
  1180. }
  1181. </style>