home.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  1. <!--
  2. * @Title:
  3. * @Description: 首页
  4. * @Author: swp
  5. * @Date: 2022-08-24 10:49:21
  6. * @LastEditors:
  7. * @LastEditTime: 2022-08-24 10:49:21
  8. -->
  9. <template>
  10. <view class="container">
  11. <!-- 导航栏 #3F9EFF-->
  12. <uni-nav-bar :fixed="true" backgroundColor="#3F9EFF" statusBar="false" height="75px">
  13. <block slot="left">
  14. <view class="view-flex-block-center">
  15. <image src="/static/images/logo_start.png" class="logo" mode="widthFix"></image>
  16. </view>
  17. </block>
  18. <view class="view-flex-block-center" style="width: 100%;">
  19. <view class="view-flex-inline-center">
  20. <text style="color: #ffffff; font-size: 1.2rem;font-family: Microsoft YaHei;">{{title}}</text>
  21. </view>
  22. </view>
  23. <block slot="right">
  24. <view style="margin-right:20rpx" @click="onNoticeMoreClick">
  25. <uni-badge class="uni-badge-left-margin" absolute="rightTop" :is-dot="noticeDot" :text="noticeValue"
  26. size="small">
  27. <uni-icons class="input-uni-icon" type="notification" size="24" color="#FFFFFF" />
  28. </uni-badge>
  29. </view>
  30. </block>
  31. </uni-nav-bar>
  32. <!-- 头部按钮 -->
  33. <view class="nav">
  34. <u-grid :col="4" :border="false">
  35. <u-grid-item v-if="navButtonIndex[index]" bg-color="transparent" v-for="(item, index) in navButton"
  36. :key="index">
  37. <navigator v-if="item.badge" :url="item.url" hover-class="none" class="nav-item"
  38. open-type="navigate">
  39. <uni-badge class="uni-badge-left-margin" absolute="rightTop" :text="item.value" size="small">
  40. <image :src="item.img" mode="widthFix" class="nav-item-img"></image>
  41. </uni-badge>
  42. <view style="font-size: 0.9rem;font-weight: bold;">{{ item.name }}</view>
  43. </navigator>
  44. <navigator v-else :url="item.url" hover-class="none" class="nav-item" open-type="navigate">
  45. <image :src="item.img" mode="widthFix" class="nav-item-img"></image>
  46. <view style="font-size: 0.9rem;font-weight: bold;">{{ item.name }}</view>
  47. </navigator>
  48. </u-grid-item>
  49. </u-grid>
  50. </view>
  51. <uni-card v-if="permission.orgAdmin || (permission.companyServciePerson && postName=='servicePerson')"
  52. title="快捷操作">
  53. <view class="view-flex-inline">
  54. <uni-icons class="input-uni-icon" type="phone" size="18" color="coral" />
  55. <text class="text-under-line" style="color: coral;font-size: 1rem;"
  56. @click="toShortcutCreateOrder">发起工单</text>
  57. </view>
  58. </uni-card>
  59. <!-- <uni-card v-if="permission.companyServciePerson && postName=='engineer'" title="新的工单">
  60. <view v-if="todoOrderCount>0">
  61. <uni-list>
  62. <uni-list-item v-for="item in todoOrderList" :key="item.id">
  63. <template v-slot:body>
  64. <view class="list-item-block">
  65. <view class="line">
  66. <uni-icons type="gear" size="18" color="lightblue" />
  67. <view v-if="item.orderType==1" class="text" style="width: 90%;color: gray;">
  68. 工单类型: <span style="margin-left: 5px;color: cornflowerblue;">维修工单</span>
  69. </view>
  70. <view v-else class="text" style="width: 90%;color: gray;">
  71. 工单类型: <span style="margin-left: 5px;color: cornflowerblue;">服务工单</span>
  72. </view>
  73. </view>
  74. <view class="line">
  75. <uni-icons type="personadd" size="18" color="lightblue" />
  76. <view class="text" style="width: 90%;color: gray;">
  77. 工单发起人: <span
  78. style="margin-left: 5px;color: cornflowerblue;">{{item.createOrderPersonName}}</span>
  79. </view>
  80. </view>
  81. <view class="line">
  82. <uni-icons type="calendar" size="18" color="lightblue" />
  83. <view class="text" style="width: 90%;color: gray;">
  84. 发起时间: <span
  85. style="margin-left: 5px;color: cornflowerblue;">{{item.createTime}}</span>
  86. </view>
  87. </view>
  88. <view class="line">
  89. <uni-icons type="help" size="18" color="lightblue" />
  90. <view class="text text-ellipsis" style="width: 90%;color: gray;">
  91. 问题描述: <span
  92. style="margin-left: 5px;color: cornflowerblue;">{{item.orderDesc}}</span>
  93. </view>
  94. </view>
  95. <view class="line">
  96. <view class="block">
  97. <uni-icons type="arrow-right" size="20" color="coral" />
  98. </view>
  99. <view class="text text-underline"
  100. style="color: coral;margin-left: 2px;font-size: 1rem;" @click="toDo(item)">
  101. 去处理
  102. </view>
  103. </view>
  104. </view>
  105. </template>
  106. </uni-list-item>
  107. </uni-list>
  108. </view>
  109. <view v-else class="view-flex-inline">
  110. <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
  111. </image>
  112. <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
  113. <text>暂无待处理工单</text>
  114. </view>
  115. </view>
  116. </uni-card>
  117. <uni-card v-if="permission.orgAdmin" title="待审批费用申请" >
  118. <view v-if="costsApproveOrderCount>0">
  119. <uni-list>
  120. <uni-list-item v-for="item in costsApproveOrderList" :key="item.id">
  121. <template v-slot:body>
  122. <view class="list-item-block">
  123. <view class="line">
  124. <uni-icons type="auth" size="18" color="lightblue" />
  125. <view class="text" style="width: 90%;color: gray;">
  126. 费用审批申请人:<span
  127. style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
  128. </view>
  129. </view>
  130. <view class="line">
  131. <uni-icons type="calendar" size="18" color="lightblue" />
  132. <view class="text" style="width: 90%;color: gray;">
  133. 申请时间:<span
  134. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
  135. </view>
  136. </view>
  137. <view class="line">
  138. <uni-icons type="info" size="18" color="lightblue" />
  139. <view class="text text-ellipsis" style="width: 90%;color: gray;">
  140. 费用说明:<span
  141. style="margin-left: 5px;color: cornflowerblue;">{{item.costsReportDesc}}</span>
  142. </view>
  143. </view>
  144. <view class="line">
  145. <view class="block">
  146. <uni-icons type="arrow-right" size="20" color="coral" />
  147. </view>
  148. <view class="text text-ellipsis text-underline"
  149. style="width: 90%;color: coral;font-size: 1rem;"
  150. @click="toOrderCostsApprove(item)">
  151. 去审批
  152. </view>
  153. </view>
  154. </view>
  155. </template>
  156. </uni-list-item>
  157. </uni-list>
  158. </view>
  159. <view v-else class="view-flex-inline">
  160. <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
  161. </image>
  162. <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
  163. <text>暂无待费用审批工单</text>
  164. </view>
  165. </view>
  166. </uni-card>
  167. <uni-card v-if="permission.companyServciePerson && postName=='engineer'" title="费用已审批工单">
  168. <view v-if="costsApproveOrderCount>0">
  169. <uni-list>
  170. <uni-list-item v-for="item in costsApproveOrderList" :key="item.id">
  171. <template v-slot:body>
  172. <view class="list-item-block">
  173. <view class="line">
  174. <uni-icons type="auth" size="18" color="lightblue" />
  175. <view class="text" style="width: 90%;color: gray;">
  176. 费用审批人:<span
  177. style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
  178. </view>
  179. </view>
  180. <view class="line">
  181. <uni-icons type="calendar" size="18" color="lightblue" />
  182. <view class="text" style="width: 90%;color: gray;">
  183. 审批时间:<span
  184. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
  185. </view>
  186. </view>
  187. <view class="line">
  188. <uni-icons type="info" size="18" color="lightblue" />
  189. <view class="text text-ellipsis" style="width: 90%;color: gray;">
  190. 审批意见:<span
  191. style="margin-left: 5px;color: cornflowerblue;">{{item.processDesc}}</span>
  192. </view>
  193. </view>
  194. <view class="line">
  195. <view class="block">
  196. <uni-icons type="arrow-right" size="20" color="coral" />
  197. </view>
  198. <view class="text text-ellipsis text-underline"
  199. style="width: 90%;color: coral;font-size: 1rem;"
  200. @click="toOrderProcess(item)">
  201. 去处理
  202. </view>
  203. </view>
  204. </view>
  205. </template>
  206. </uni-list-item>
  207. </uni-list>
  208. </view>
  209. <view v-else class="view-flex-inline">
  210. <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
  211. </image>
  212. <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
  213. <text>暂无费用已审批工单</text>
  214. </view>
  215. </view>
  216. </uni-card>
  217. <uni-card v-if="permission.orgAdmin" title="待完结审批工单">
  218. <view v-if="closeApproveOrderCount>0">
  219. <uni-list>
  220. <uni-list-item v-for="item in closeApproveOrderList" :key="item.id">
  221. <template v-slot:body>
  222. <view class="list-item-block">
  223. <view class="line">
  224. <uni-icons type="auth" size="18" color="lightblue" />
  225. <view class="text" style="width: 90%;color: gray;">
  226. 工单处理人:<span
  227. style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
  228. </view>
  229. </view>
  230. <view class="line">
  231. <uni-icons type="calendar" size="18" color="lightblue" />
  232. <view class="text" style="width: 90%;color: gray;">
  233. 处理时间:<span
  234. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
  235. </view>
  236. </view>
  237. <view class="line">
  238. <uni-icons type="info" size="18" color="lightblue" />
  239. <view class="text text-ellipsis" style="width: 90%;color: gray;">
  240. 解决措施说明:<span
  241. style="margin-left: 5px;color: cornflowerblue;">{{item.processDesc}}</span>
  242. </view>
  243. </view>
  244. <view class="line">
  245. <view class="block">
  246. <uni-icons type="arrow-right" size="20" color="coral" />
  247. </view>
  248. <view class="text text-ellipsis text-underline"
  249. style="width: 90%;color: coral;font-size: 1rem;"
  250. @click="toOrderCloseApprove(item)">
  251. 去审批
  252. </view>
  253. </view>
  254. </view>
  255. </template>
  256. </uni-list-item>
  257. </uni-list>
  258. </view>
  259. <view v-else class="view-flex-inline">
  260. <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
  261. </image>
  262. <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
  263. <text>暂无待完结审批工单</text>
  264. </view>
  265. </view>
  266. </uni-card> -->
  267. <uni-card title="待处理事件">
  268. <uni-section v-if="permission.companyServciePerson && postName=='engineer'" title="新的工单"
  269. ftitleFontSize="0.8rem" type="circle">
  270. <!-- <template v-slot:decoration>
  271. <view class="decoration"></view>
  272. </template> -->
  273. <view v-if="todoOrderCount>0">
  274. <uni-list>
  275. <uni-list-item v-for="item in todoOrderList" :key="item.id">
  276. <template v-slot:body>
  277. <view class="list-item-block">
  278. <view class="line">
  279. <uni-icons type="gear" size="18" color="lightblue" />
  280. <view v-if="item.orderType==1" class="text" style="width: 90%;color: gray;">
  281. 工单类型: <span style="margin-left: 5px;color: cornflowerblue;">维修工单</span>
  282. </view>
  283. <view v-else class="text" style="width: 90%;color: gray;">
  284. 工单类型: <span style="margin-left: 5px;color: cornflowerblue;">服务工单</span>
  285. </view>
  286. </view>
  287. <view class="line">
  288. <uni-icons type="personadd" size="18" color="lightblue" />
  289. <view class="text" style="width: 90%;color: gray;">
  290. 工单发起人: <span
  291. style="margin-left: 5px;color: cornflowerblue;">{{item.createOrderPersonName}}</span>
  292. </view>
  293. </view>
  294. <view class="line">
  295. <uni-icons type="calendar" size="18" color="lightblue" />
  296. <view class="text" style="width: 90%;color: gray;">
  297. 发起时间: <span
  298. style="margin-left: 5px;color: cornflowerblue;">{{item.createTime}}</span>
  299. </view>
  300. </view>
  301. <view class="line">
  302. <uni-icons type="help" size="18" color="lightblue" />
  303. <view class="text text-ellipsis" style="width: 90%;color: gray;">
  304. 问题描述: <span
  305. style="margin-left: 5px;color: cornflowerblue;">{{item.orderDesc}}</span>
  306. </view>
  307. </view>
  308. <view class="line">
  309. <view class="block">
  310. <uni-icons type="arrow-right" size="20" color="coral" />
  311. </view>
  312. <view class="text text-underline"
  313. style="color: coral;margin-left: 2px;font-size: 1rem;" @click="toDo(item)">
  314. 去处理
  315. </view>
  316. </view>
  317. </view>
  318. </template>
  319. </uni-list-item>
  320. </uni-list>
  321. </view>
  322. <view v-else class="view-flex-inline">
  323. <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
  324. </image>
  325. <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
  326. <text>暂无待处理工单</text>
  327. </view>
  328. </view>
  329. </uni-section>
  330. <uni-section v-if="permission.orgAdmin" title="待审批费用申请" ftitleFontSize="0.8rem" type="circle">
  331. <!-- <template v-slot:decoration>
  332. <view class="decoration"></view>
  333. </template> -->
  334. <view v-if="costsApproveOrderCount>0">
  335. <uni-list>
  336. <uni-list-item v-for="item in costsApproveOrderList" :key="item.id">
  337. <template v-slot:body>
  338. <view class="list-item-block">
  339. <view class="line">
  340. <uni-icons type="auth" size="18" color="lightblue" />
  341. <view class="text" style="width: 90%;color: gray;">
  342. 费用申请人:<span
  343. style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
  344. </view>
  345. </view>
  346. <view class="line">
  347. <uni-icons type="calendar" size="18" color="lightblue" />
  348. <view class="text" style="width: 90%;color: gray;">
  349. 申请时间:<span
  350. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
  351. </view>
  352. </view>
  353. <view class="line">
  354. <uni-icons type="info" size="18" color="lightblue" />
  355. <view class="text text-ellipsis" style="width: 90%;color: gray;">
  356. 费用说明:<span
  357. style="margin-left: 5px;color: cornflowerblue;">{{item.costsReportDesc}}</span>
  358. </view>
  359. </view>
  360. <view class="line">
  361. <view class="block">
  362. <uni-icons type="arrow-right" size="20" color="coral" />
  363. </view>
  364. <view class="text text-ellipsis text-underline"
  365. style="width: 90%;color: coral;font-size: 1rem;"
  366. @click="toOrderCostsApprove(item)">
  367. 去审批
  368. </view>
  369. </view>
  370. </view>
  371. </template>
  372. </uni-list-item>
  373. </uni-list>
  374. </view>
  375. <view v-else class="view-flex-inline">
  376. <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
  377. </image>
  378. <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
  379. <text>暂无待审批费用申请工单</text>
  380. </view>
  381. </view>
  382. </uni-section>
  383. <uni-section v-if="permission.companyServciePerson && postName=='engineer'" title="费用已审批工单"
  384. ftitleFontSize="0.8rem" type="circle">
  385. <!-- <template v-slot:decoration>
  386. <view class="decoration"></view>
  387. </template> -->
  388. <view v-if="costsApproveOrderCount>0">
  389. <uni-list>
  390. <uni-list-item v-for="item in costsApproveOrderList" :key="item.id">
  391. <template v-slot:body>
  392. <view class="list-item-block">
  393. <view class="line">
  394. <uni-icons type="auth" size="18" color="lightblue" />
  395. <view class="text" style="width: 90%;color: gray;">
  396. 费用审批人:<span
  397. style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
  398. </view>
  399. </view>
  400. <view class="line">
  401. <uni-icons type="calendar" size="18" color="lightblue" />
  402. <view class="text" style="width: 90%;color: gray;">
  403. 审批时间:<span
  404. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
  405. </view>
  406. </view>
  407. <view class="line">
  408. <uni-icons type="info" size="18" color="lightblue" />
  409. <view class="text text-ellipsis" style="width: 90%;color: gray;">
  410. 审批意见:<span
  411. style="margin-left: 5px;color: cornflowerblue;">{{item.processDesc}}</span>
  412. </view>
  413. </view>
  414. <view class="line">
  415. <view class="block">
  416. <uni-icons type="arrow-right" size="20" color="coral" />
  417. </view>
  418. <view class="text text-ellipsis text-underline"
  419. style="width: 90%;color: coral;font-size: 1rem;"
  420. @click="toOrderProcess(item)">
  421. 去处理
  422. </view>
  423. </view>
  424. </view>
  425. </template>
  426. </uni-list-item>
  427. </uni-list>
  428. </view>
  429. <view v-else class="view-flex-inline">
  430. <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
  431. </image>
  432. <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
  433. <text>暂无费用已审批工单</text>
  434. </view>
  435. </view>
  436. </uni-section>
  437. <uni-section v-if="permission.orgAdmin" title="待完结审批工单" ftitleFontSize="0.8rem" type="circle">
  438. <view v-if="closeApproveOrderCount>0">
  439. <uni-list>
  440. <uni-list-item v-for="item in closeApproveOrderList" :key="item.id">
  441. <template v-slot:body>
  442. <view class="list-item-block">
  443. <view class="line">
  444. <uni-icons type="auth" size="18" color="lightblue" />
  445. <view class="text" style="width: 90%;color: gray;">
  446. 工单处理人:<span
  447. style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
  448. </view>
  449. </view>
  450. <view class="line">
  451. <uni-icons type="calendar" size="18" color="lightblue" />
  452. <view class="text" style="width: 90%;color: gray;">
  453. 处理时间:<span
  454. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
  455. </view>
  456. </view>
  457. <view class="line">
  458. <uni-icons type="info" size="18" color="lightblue" />
  459. <view class="text text-ellipsis" style="width: 90%;color: gray;">
  460. 解决措施说明:<span
  461. style="margin-left: 5px;color: cornflowerblue;">{{item.processDesc}}</span>
  462. </view>
  463. </view>
  464. <view class="line">
  465. <view class="block">
  466. <uni-icons type="arrow-right" size="20" color="coral" />
  467. </view>
  468. <view class="text text-ellipsis text-underline"
  469. style="width: 90%;color: coral;font-size: 1rem;"
  470. @click="toOrderCloseApprove(item)">
  471. 去审批
  472. </view>
  473. </view>
  474. </view>
  475. </template>
  476. </uni-list-item>
  477. </uni-list>
  478. </view>
  479. <view v-else class="view-flex-inline">
  480. <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
  481. </image>
  482. <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
  483. <text>暂无待完结审批工单</text>
  484. </view>
  485. </view>
  486. </uni-section>
  487. </uni-card>
  488. <!-- <uni-card title="云监控">
  489. <uni-row>
  490. <uni-col :span="12">
  491. <view class="view-flex-inline">
  492. <uni-icons class="input-uni-icon" type="calendar" size="18" color="orangered" />
  493. <text>未关闭工单 {{realData.orderCount}}</text>
  494. </view>
  495. <view class="view-flex-inline">
  496. <uni-icons class="input-uni-icon" type="calendar" size="18" color="orangered" />
  497. <text>工单处理超时 {{realData.delayComfireOrders}}</text>
  498. </view>
  499. </uni-col>
  500. <uni-col :span="12">
  501. <view class="view-flex-inline">
  502. <uni-icons class="input-uni-icon" type="notification" size="18" color="orangered" />
  503. <text>设备异常 {{realData.warningRtus}}</text>
  504. </view>
  505. </uni-col>
  506. </uni-row>
  507. </uni-card> -->
  508. <!--
  509. <uni-card title="我的资源">
  510. <uni-row>
  511. <uni-col :span="12">
  512. <view class="view-flex-inline">
  513. <uni-icons class="input-uni-icon" type="home" size="18" color="orangered" />
  514. <text>运维机构数量</text>
  515. </view>
  516. </uni-col>
  517. <uni-col :span="12">
  518. <view class="view-flex-inline">
  519. <uni-icons class="input-uni-icon" type="folder-add" size="18" color="orangered" />
  520. <text>项目数量</text>
  521. </view>
  522. </uni-col>
  523. </uni-row>
  524. <uni-row>
  525. <uni-col :span="12">
  526. <view class="view-flex-inline">
  527. <uni-icons class="input-uni-icon" type="staff" size="18" color="orangered" />
  528. <text>运维人员数量</text>
  529. </view>
  530. </uni-col>
  531. <uni-col :span="12">
  532. <view class="view-flex-inline">
  533. <uni-icons class="input-uni-icon" type="videocam" size="18" color="orangered" />
  534. <text>设备数量 {{realData.rtus}}</text>
  535. </view>
  536. </uni-col>
  537. </uni-row>
  538. </uni-card> -->
  539. </view>
  540. </template>
  541. <script>
  542. import
  543. navBtns
  544. from "@/api/home.js";
  545. import {
  546. role
  547. } from "@/api/role.js";
  548. import {
  549. oss
  550. } from '@/common/setting';
  551. import http from '@/http/api.js';
  552. export default {
  553. components: {},
  554. data() {
  555. return {
  556. title: '泰山电教维护服务',
  557. permission: {
  558. 'admin': false,
  559. 'orgAdmin': false,
  560. 'companyAdmin': false,
  561. 'companyServciePerson': false,
  562. 'yjServicePerson': false,
  563. },
  564. postName: '',
  565. currentRole: '',
  566. current: 0,
  567. navButton: [],
  568. navButtonIndex: [],
  569. //more/loading/noMore
  570. loadMoreStatus: "noMore",
  571. timer: false,
  572. pageSize: 10,
  573. pageCurrent: 1,
  574. total: 0,
  575. noticeDot: false,
  576. noticeValue: 0,
  577. todoOrderCount: 0,
  578. todoOrderList: [],
  579. costsApproveOrderCount: 0,
  580. costsApproveOrderList: [],
  581. closeApproveOrderCount: 0,
  582. closeApproveOrderList: [],
  583. };
  584. },
  585. computed: {},
  586. onLoad() {
  587. //console.log(JSON.stringify(this.userInfo))
  588. this.permission.admin = false;
  589. this.permission.orgAdmin = false;
  590. this.permission.companyAdmin = false;
  591. this.permission.companyServciePerson = false;
  592. this.permission.yjServicePerson = false;
  593. this.navButton = navBtns.navButtons;
  594. if (this.userInfo.role_name === role.admin) {
  595. this.permission.admin = true;
  596. this.navButtonIndex = navBtns.sysAdminNavButton;
  597. this.currentRole = role.admin;
  598. } else if (this.userInfo.role_name === role.orgAdmin) {
  599. this.permission.orgAdmin = true;
  600. this.currentRole = role.orgAdmin;
  601. this.navButtonIndex = navBtns.orgAdminNavButton;
  602. } else if (this.userInfo.role_name === role.companyAdmin) {
  603. this.permission.companyAdmin = true;
  604. this.currentRole = role.companyAdmin;
  605. this.navButtonIndex = navBtns.companyAdminNavButton;
  606. } else if (this.userInfo.role_name === role.companyServciePerson) {
  607. this.permission.companyServciePerson = true;
  608. this.currentRole = role.companyServciePerson;
  609. this.navButtonIndex = navBtns.companyServicePersonNavButton;
  610. if (this.userInfo.post_id == '1706859505948098562') {
  611. this.postName = "engineer";
  612. } else if (this.userInfo.post_id == '1730535542909140993') {
  613. this.postName = "servicePerson";
  614. }
  615. }
  616. if (this.$u.func.checkLogin()) {
  617. console.log("timer start +++++++ ")
  618. this.timer = true;
  619. setTimeout(this.timeCall, 10);
  620. }
  621. },
  622. onUnload() {
  623. this.timer = false;
  624. },
  625. onReady() {
  626. if (this.$u.func.checkLogin()) {} else {
  627. this.$u.func.logout();
  628. }
  629. },
  630. onShow() {
  631. if (this.$u.func.checkLogin()) {
  632. if (this.userInfo.role_name !== this.currentRole) {
  633. this.permission.admin = false;
  634. this.permission.orgAdmin = false;
  635. this.permission.companyAdmin = false;
  636. this.permission.companyServciePerson = false;
  637. this.permission.yjServicePerson = false;
  638. this.navButton = navBtns.navButtons;
  639. if (this.userInfo.role_name === role.admin) {
  640. this.permission.admin = true;
  641. this.navButtonIndex = navBtns.sysAdminNavButton;
  642. this.currentRole = role.admin;
  643. } else if (this.userInfo.role_name === role.orgAdmin) {
  644. this.permission.orgAdmin = true;
  645. this.currentRole = role.orgAdmin;
  646. this.navButtonIndex = navBtns.orgAdminNavButton;
  647. } else if (this.userInfo.role_name === role.companyAdmin) {
  648. this.permission.companyAdmin = true;
  649. this.currentRole = role.companyAdmin;
  650. this.navButtonIndex = navBtns.companyAdminNavButton;
  651. } else if (this.userInfo.role_name === role.companyServciePerson) {
  652. this.permission.companyServciePerson = true;
  653. this.currentRole = role.companyServciePerson;
  654. this.navButtonIndex = navBtns.companyServicePersonNavButton;
  655. if (this.userInfo.post_id == '1706859505948098562') {
  656. this.postName = "engineer";
  657. } else if (this.userInfo.post_id == '1730535542909140993') {
  658. this.postName = "servicePerson";
  659. }
  660. }
  661. }
  662. if (this.timer == false) {
  663. this.timer = true;
  664. setTimeout(this.timeCall, 10);
  665. }
  666. } else {
  667. this.$u.func.logout();
  668. }
  669. },
  670. onHide() {
  671. this.timer = false;
  672. },
  673. methods: {
  674. toOss(path) {
  675. return oss + path;
  676. },
  677. timeCall() {
  678. if (this.timer == true) {
  679. this.getHomeInfo();
  680. setTimeout(this.timeCall, 10000);
  681. }
  682. },
  683. toDo(item) {
  684. var url = '/pages/check-order/orderconfirm?orderType=' + item.orderType + '&orderId=' + item.id;
  685. uni.navigateTo({
  686. url: url
  687. })
  688. },
  689. toOrderProcess(item) {
  690. var url = '/pages/check-order/orderprocessreport?skipPage=1&costsApprove=2&orderType=' + item.orderType +
  691. '&orderProcessId=' + item
  692. .orderProcessId + '&orderId=' + item.id;
  693. uni.navigateTo({
  694. url: url
  695. })
  696. },
  697. toOrderCostsApprove(item) {
  698. var url = '/pages/check-order/ordercostsapprove?orderType=' + item.orderType + '&orderId=' + item.id;
  699. uni.navigateTo({
  700. url: url
  701. })
  702. },
  703. toOrderCloseApprove(item) {
  704. console.log("toOrderCloseApprove")
  705. var url = '/pages/check-order/ordercloseapprove?orderType=' + item.orderType + '&orderId=' + item.id;
  706. uni.navigateTo({
  707. url: url
  708. })
  709. },
  710. toShortcutCreateOrder() {
  711. let url = '/pages/check-order/orderadd';
  712. uni.navigateTo({
  713. url: url
  714. })
  715. },
  716. onNoticeMoreClick() {
  717. uni.navigateTo({
  718. url: '/pages/news/noticelist'
  719. })
  720. },
  721. getHomeInfo() {
  722. this.getTodoOrderList();
  723. this.getTodoCostsApproveOrderList();
  724. this.getTodoCloseOrderList();
  725. },
  726. getTodoOrderList() {
  727. let that = this;
  728. let postData = {};
  729. http.request({
  730. url: '/galaxy-business/order/todo/list',
  731. method: 'GET',
  732. data: postData,
  733. }).then(res => {
  734. that.todoOrderCount = 0;
  735. if (res.data != null) {
  736. that.todoOrderCount = res.data.length;
  737. that.todoOrderList = res.data;
  738. }
  739. }).catch(err => {
  740. console.log(JOSN.stringify(err))
  741. })
  742. },
  743. getTodoCostsApproveOrderList() {
  744. let that = this;
  745. let postData = {};
  746. http.request({
  747. url: '/galaxy-business/order/todo/costsapprove/list',
  748. method: 'GET',
  749. data: postData,
  750. }).then(res => {
  751. that.costsApproveOrderCount = 0;
  752. if (res.data != null) {
  753. that.costsApproveOrderCount = res.data.length;
  754. that.costsApproveOrderList = res.data;
  755. }
  756. }).catch(err => {
  757. console.log(JOSN.stringify(err))
  758. })
  759. },
  760. getTodoCloseOrderList() {
  761. let that = this;
  762. let postData = {};
  763. http.request({
  764. url: '/galaxy-business/order/todo/closeapprove/list',
  765. method: 'GET',
  766. data: postData,
  767. }).then(res => {
  768. that.closeApproveOrderCount = 0;
  769. if (res.data != null) {
  770. that.closeApproveOrderCount = res.data.length;
  771. that.closeApproveOrderList = res.data;
  772. }
  773. }).catch(err => {
  774. console.log(JOSN.stringify(err))
  775. })
  776. },
  777. }
  778. };
  779. </script>
  780. <style lang="scss" scoped>
  781. $nav-height: 75px;
  782. .decoration {
  783. width: 6px;
  784. height: 6px;
  785. margin-right: 4px;
  786. border-radius: 50%;
  787. background-color: cadetblue;
  788. }
  789. .input-uni-icon {
  790. line-height: $nav-height;
  791. }
  792. .item-block {
  793. display: flex;
  794. flex-direction: column;
  795. justify-content: flex-start;
  796. width: 100%;
  797. }
  798. .line {
  799. display: flex;
  800. flex-direction: row;
  801. justify-content: flex-start;
  802. width: 100%;
  803. }
  804. .line .block {
  805. display: flex;
  806. flex-direction: column;
  807. justify-content: center;
  808. }
  809. .line-end {
  810. display: flex;
  811. flex-direction: row;
  812. justify-content: flex-end;
  813. width: 100%;
  814. }
  815. .line-end .block {
  816. display: flex;
  817. flex-direction: column;
  818. justify-content: center;
  819. }
  820. .line-center {
  821. display: flex;
  822. flex-direction: row;
  823. justify-content: center;
  824. width: 100%;
  825. height: 100%;
  826. }
  827. .line-center .block {
  828. display: flex;
  829. flex-direction: column;
  830. justify-content: center;
  831. }
  832. .rtu-name {
  833. margin-left: 5rpx;
  834. font-size: 0.7rem;
  835. font-weight: bold;
  836. }
  837. .rtu-code {
  838. margin-left: 5rpx;
  839. font-size: 0.6rem;
  840. color: gray;
  841. }
  842. .item-text-line {
  843. width: 100%;
  844. display: flex;
  845. flex-direction: row;
  846. align-items: flex-start;
  847. padding-left: 0px;
  848. padding-right: 0px;
  849. .block {
  850. height: 100%;
  851. display: flex;
  852. flex-direction: column;
  853. justify-content: center;
  854. align-items: center;
  855. }
  856. .item-title {
  857. font-size: 0.7rem;
  858. }
  859. .item-text {
  860. padding-left: 2px;
  861. padding-right: 5px;
  862. font-size: 0.7rem;
  863. }
  864. .item-text-ell {
  865. width: 100%;
  866. overflow: hidden;
  867. font-size: 0.7rem;
  868. white-space: nowrap;
  869. text-overflow: ellipsis;
  870. }
  871. .item-number {
  872. font-size: 0.7rem;
  873. margin-left: 2px;
  874. margin-right: 5px;
  875. }
  876. }
  877. .item-title-image {
  878. /* #ifndef APP-NVUE */
  879. display: block;
  880. /* #endif */
  881. margin-right: 5px;
  882. width: 20px;
  883. height: 20px;
  884. border-radius: 50%;
  885. }
  886. .uni-badge-left-margin {
  887. margin-left: 0px;
  888. }
  889. .logo {
  890. flex-shrink: 0;
  891. width: 80rpx;
  892. height: auto;
  893. }
  894. .container {
  895. background-color: #f7f7f7;
  896. min-height: 100vh;
  897. overflow: hidden;
  898. }
  899. .nav {
  900. margin: 0rpx 0;
  901. box-sizing: border-box;
  902. padding: 0 10rpx;
  903. &-item {
  904. width: 100%;
  905. box-sizing: border-box;
  906. display: flex;
  907. flex-direction: column;
  908. align-items: center;
  909. justify-content: space-between;
  910. height: 130rpx;
  911. &-img {
  912. width: 80rpx;
  913. height: 80rpx;
  914. }
  915. &-name {
  916. font-size: 0.7rem;
  917. font-family: PingFang SC;
  918. font-weight: 500;
  919. color: #585b61;
  920. }
  921. }
  922. }
  923. </style>