home.vue 27 KB

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