index.uvue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884
  1. <template>
  2. <uni-navbar-lite :showLeft=false title="首页"></uni-navbar-lite>
  3. <view class="page-container">
  4. <!-- 背景图 -->
  5. <!-- <image class="bg-image" src="/static/images/index/1.png" mode="widthFix"></image> -->
  6. <!-- <view class="bg-color"></view> -->
  7. <scroll-view class="page-content">
  8. <view class="db-view">
  9. <view class="db-box" @click="navigateToOverdueOrders" v-if="checkPermi(['gxt:app:overdue'])" >
  10. <view v-if="overdueCount > 0" class="badge"><text class="count">{{ overdueCount }}</text></view>
  11. <view class="db-block">
  12. <view class="db-center-3">
  13. <image class="db-image" src="/static/images/map/2.png"></image>
  14. </view>
  15. </view>
  16. <text class="db-text">超时工单</text>
  17. </view>
  18. <view class="db-box" @click="navigateToAssignedOrders">
  19. <view v-if="assignedCount > 0" class="badge"><text class="count">{{ assignedCount }}</text></view>
  20. <view class="db-block">
  21. <view class="db-center-1">
  22. <image class="db-image" src="/static/images/map/1.png"></image>
  23. </view>
  24. </view>
  25. <text class="db-text">待处理工单</text>
  26. </view>
  27. <view class="db-box" @click="navigateToScoreOrders" v-if="checkPermi(['gxt:app:toScore'])">
  28. <view v-if="selfScoreCount > 0" class="badge"><text class="count">{{ selfScoreCount }}</text></view>
  29. <view class="db-block">
  30. <view class="db-center-2">
  31. <image class="db-image" src="/static/images/map/2.png"></image>
  32. </view>
  33. </view>
  34. <text class="db-text">待评分工单</text>
  35. </view>
  36. </view>
  37. <!-- 支流出库流量图表 -->
  38. <!-- <view class="chart-section">
  39. <text class="section-title">支流出库流量 (m³/s)</text>
  40. <flow-chart />
  41. </view> -->
  42. <!-- <view>
  43. <button @click="handlePush">通知</button>
  44. </view> -->
  45. <!-- 即将超时工单列表 -->
  46. <!-- <view class="section-title-container" v-if="almostOverdueListData.length > 0">
  47. <view class="section-header">
  48. <text class="section-title">即将超时工单</text>
  49. <text class="view-all" @click="navigateToAlmostOverdueOrders">查看全部</text>
  50. </view>
  51. </view>
  52. <common-list
  53. v-if="almostOverdueListData.length > 0"
  54. :dataList="almostOverdueListData.slice(0, 2)"
  55. :loading="almostOverdueLoading"
  56. :hasMore="false"
  57. :refresherEnabled="false"
  58. :itemKey="'id'"
  59. @itemClick="handleAlmostOverdueItemClick"
  60. >
  61. <template #default="{ item }">
  62. <view class="list-item">
  63. <view class="item-container">
  64. <view class="item-header">
  65. <text class="item-title">{{ getPcsDeviceName(item) }}-{{ getStationName(item) }}</text>
  66. </view>
  67. <view class="info-row">
  68. <text class="text-gray">工单编码:{{ getWorkOrderProjectNo(item) }}</text>
  69. <text class="text-gray" :class="getRemarkClass(item)">{{ getRemark(item) }}</text>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <template #loadMore>
  75. <view></view>
  76. </template>
  77. </common-list> -->
  78. <!-- 超时工单列表 -->
  79. <view class="section-title-container">
  80. <view class="section-header">
  81. <text class="section-title">超时工单</text>
  82. <text class="view-all" @click="navigateToOverdueOrders" v-if="overdueListData.length > 0">查看全部</text>
  83. </view>
  84. </view>
  85. <template v-if="overdueListData.length > 0">
  86. <common-list
  87. :dataList="overdueListData.slice(0, 4)"
  88. :loading="overdueLoading"
  89. :hasMore="false"
  90. :refresherEnabled="false"
  91. :itemKey="'id'"
  92. @itemClick="handleOverdueItemClick"
  93. >
  94. <template #default="{ item }">
  95. <view class="list-item">
  96. <view class="item-container">
  97. <view class="item-header">
  98. <text class="item-title">{{ getPcsDeviceName(item) }}-{{ getStationName(item) }}</text>
  99. <!-- <text class="status-tag status-suspended">{{ getWorkOrderStatus(item) }}</text> -->
  100. </view>
  101. <view class="info-row">
  102. <text class="text-gray">工单编码:{{ getWorkOrderProjectNo(item) }}</text>
  103. <!-- <text class="text-gray overdue-title">{{ getRemark(item) }}</text> -->
  104. </view>
  105. <view class="info-row">
  106. <text class="overdue-title">{{ getRemark(item) }}</text>
  107. </view>
  108. </view>
  109. </view>
  110. </template>
  111. <template #loadMore>
  112. <view></view>
  113. </template>
  114. </common-list>
  115. </template>
  116. <template v-else>
  117. <view class="empty-tips">
  118. <text class="empty-text">暂无超时工单</text>
  119. </view>
  120. </template>
  121. </scroll-view>
  122. <!-- 底部 TabBar -->
  123. <custom-tabbar :current="0" />
  124. </view>
  125. </template>
  126. <script setup lang="uts">
  127. import { ref, onMounted } from 'vue'
  128. import { getUserInfo } from '../../utils/storage'
  129. import FlowChart from '../../components/index/flow-chart/flow-chart.uvue'
  130. import { getOrderList, almostOverdueList, overdueList, pendingList } from '../../api/order/list'
  131. import { listMyRate } from '../../api/score/index'
  132. import type { SysDictData } from '../../types/dict'
  133. import { getDictDataByType } from '../../api/dict/index'
  134. // import {startKeepAlive,stopKeepAlive} from '@/uni_modules/ygtx-keepService'
  135. // import { RequestOption } from '@/uni_modules/ygtx-keepService/utssdk/interface.uts';
  136. import { getBaseUrl } from '../../utils/request'
  137. import { KeepLive } from '@/uni_modules/android-keeplive'
  138. import { getMyNotify, registerServer} from '../../api/index/index'
  139. import {checkPermi} from '../../utils/storage'
  140. // const handleStartKeepAlive = (userId: string) => {
  141. // let notifyUrl = getBaseUrl() + "/mobile/notify";
  142. // console.log("通知地址:" + notifyUrl)
  143. // const requestOption:RequestOption = {
  144. // requestUrl: notifyUrl, // 你的接口地址(必填)
  145. // requestData: JSON.stringify({ method: "get", data: userId }), // 请求数据(字符串格式,必填)
  146. // task_interval: 10000 // 任务间隔(毫秒,必填)
  147. // };
  148. // startKeepAlive(requestOption,
  149. // (res:any)=>{
  150. // console.log(res)
  151. // });
  152. // };
  153. // 用户名
  154. const userName = ref<string>('用户')
  155. // 待接单数量
  156. const assignedCount = ref<number>(0)
  157. // 待自评工单数量
  158. const selfScoreCount = ref<number>(0)
  159. // 超时工单数量
  160. const overdueCount = ref<number>(0)
  161. // 即将超时工单列表
  162. const almostOverdueListData = ref<any[]>([])
  163. const almostOverdueLoading = ref<boolean>(false)
  164. // 超时工单列表
  165. const overdueListData = ref<any[]>([])
  166. const overdueLoading = ref<boolean>(false)
  167. // 维保类型字典列表
  168. const inspectionTypeList = ref<SysDictData[]>([])
  169. // 添加字典加载状态
  170. const dictLoaded = ref<boolean>(false)
  171. // 获取工单状态字典列表
  172. const loadStatusDictList = async (): Promise<void> => {
  173. try {
  174. const result = await getDictDataByType('gxt_inspection_type')
  175. const resultObj = result as UTSJSONObject
  176. if (resultObj['code'] == 200) {
  177. const data = resultObj['data'] as any[]
  178. const dictData: SysDictData[] = []
  179. if (data.length > 0) {
  180. for (let i = 0; i < data.length; i++) {
  181. const item = data[i] as UTSJSONObject
  182. // 只提取需要的字段
  183. const dictItem: SysDictData = {
  184. dictValue: item['dictValue'] as string | null,
  185. dictLabel: item['dictLabel'] as string | null,
  186. dictCode: null,
  187. dictSort: null,
  188. dictType: null,
  189. cssClass: null,
  190. listClass: null,
  191. isDefault: null,
  192. status: null,
  193. default: null,
  194. createTime: null,
  195. remark: null
  196. }
  197. dictData.push(dictItem)
  198. }
  199. }
  200. inspectionTypeList.value = dictData
  201. dictLoaded.value = true
  202. }
  203. } catch (e: any) {
  204. console.error('获取工单状态字典失败:', e.message)
  205. dictLoaded.value = true
  206. }
  207. }
  208. // 获取待接单数量
  209. const loadAssignedCount = async (): Promise<void> => {
  210. try {
  211. const result = await pendingList(1, 1, null)
  212. const resultObj = result as UTSJSONObject
  213. if (resultObj['code'] == 200) {
  214. const total = resultObj['total'] as number
  215. assignedCount.value = total
  216. }
  217. } catch (e: any) {
  218. console.error('获取待处理工单数量失败:', e.message)
  219. }
  220. }
  221. // 获取待自评工单数量
  222. const loadSelfScoreCount = async (): Promise<void> => {
  223. try {
  224. const params: UTSJSONObject = {
  225. pageNum: 1,
  226. pageSize: 1,
  227. scoringStatus: 'to_self,to_re,to_confirm,to_final'
  228. }
  229. const result = await listMyRate(params)
  230. const resultObj = result as UTSJSONObject
  231. if (resultObj['code'] == 200) {
  232. const total = resultObj['total'] as number
  233. selfScoreCount.value = total
  234. }
  235. } catch (e: any) {
  236. console.error('获取待自评工单数量失败:', e.message)
  237. }
  238. }
  239. // 获取超时工单数量
  240. const loadOverdueCount = async (): Promise<void> => {
  241. try {
  242. const result = await overdueList(1, 1, '') // 只需要获取总数,不需要具体数据
  243. const resultObj = result as UTSJSONObject
  244. if (resultObj['code'] == 200) {
  245. const total = resultObj['total'] as number
  246. overdueCount.value = total
  247. }
  248. } catch (e: any) {
  249. console.error('获取超时工单数量失败:', e.message)
  250. }
  251. }
  252. // 获取即将超时工单列表
  253. const loadAlmostOverdueList = async (): Promise<void> => {
  254. try {
  255. almostOverdueLoading.value = true
  256. const result = await almostOverdueList(1, 2, '') // 获取前2条
  257. const resultObj = result as UTSJSONObject
  258. if (resultObj['code'] == 200) {
  259. const rows = resultObj['rows'] as any[]
  260. almostOverdueListData.value = rows
  261. }
  262. } catch (e: any) {
  263. console.error('获取即将超时工单列表失败:', e.message)
  264. } finally {
  265. almostOverdueLoading.value = false
  266. }
  267. }
  268. // 获取超时工单列表
  269. const loadOverdueList = async (): Promise<void> => {
  270. try {
  271. overdueLoading.value = true
  272. const result = await overdueList(1, 4, '') // 获取前2条
  273. const resultObj = result as UTSJSONObject
  274. if (resultObj['code'] == 200) {
  275. const data = resultObj['rows'] as any[]
  276. overdueListData.value = data
  277. }
  278. } catch (e: any) {
  279. console.error('获取超时工单列表失败:', e.message)
  280. } finally {
  281. overdueLoading.value = false
  282. }
  283. }
  284. // 跳转到待接单列表
  285. const navigateToAssignedOrders = (): void => {
  286. // 使用 redirectTo 而不是 switchTab,因为工单页面不是 tabBar 页面
  287. // uni.redirectTo({
  288. // url: '/pages/order/index?isDeal=1'
  289. // })
  290. // 跳转到待处理工单页面
  291. uni.navigateTo({
  292. url: '/pages/order/pendingOrder'
  293. })
  294. // // 延迟设置状态,确保页面已加载
  295. // setTimeout(() => {
  296. // uni.$emit('switchOrderStatus', 'deal')
  297. // }, 500)
  298. }
  299. // 跳转到评分工单列表
  300. const navigateToScoreOrders = (): void => {
  301. // 跳转到待评分工单页面
  302. uni.navigateTo({
  303. url: '/pages/score/pending'
  304. })
  305. // uni.redirectTo({
  306. // url: '/pages/score/index'
  307. // })
  308. // 延迟设置状态,确保页面已加载
  309. // setTimeout(() => {
  310. // uni.$emit('switchScoreStatus', 'to_self')
  311. // }, 500)
  312. }
  313. // 跳转到超时工单列表
  314. const navigateToOverdueOrders = (): void => {
  315. // 跳转到超时工单页面
  316. uni.navigateTo({
  317. url: '/pages/order/overdue'
  318. })
  319. }
  320. // 跳转到即将超时工单列表
  321. const navigateToAlmostOverdueOrders = (): void => {
  322. // 跳转到即将超时工单页面
  323. uni.navigateTo({
  324. url: '/pages/order/almostOverdue'
  325. })
  326. }
  327. const getNofiyMes = (): void=>{
  328. const userInfo = getUserInfo()
  329. if (userInfo != null) {
  330. const userId = userInfo['userId']?.toString()
  331. if(userId!=null){
  332. getMyNotify(userId).then((result:any) => {
  333. const jsonData = JSON.stringify(result)
  334. const respData = JSON.parse(jsonData) as UTSJSONObject
  335. if (respData['code'] == 200 &&
  336. respData.hasOwnProperty('data') && respData['data'] != null) {
  337. const data = respData['data'] as UTSJSONObject
  338. const badge = data["num"] as number
  339. setTimeout(() => {
  340. console.log("============:" + badge)
  341. if(badge > -1){
  342. uni.setAppBadgeNumber(badge);
  343. }
  344. if(data.hasOwnProperty("title") && data["title"] != null
  345. && data.hasOwnProperty("desc") && data["desc"] != null){
  346. const title = data["title"] as string
  347. const desc = data["desc"] as string
  348. uni.createPushMessage({
  349. title: title,
  350. content: desc,
  351. when: Date.now() + 10000,
  352. icon: "/static/login/2.png",
  353. sound: "system",
  354. success: (res) => {
  355. console.log('创建推送消息成功', res);
  356. },
  357. fail: (err) => {
  358. console.error('创建推送消息失败', err);
  359. }
  360. });
  361. }
  362. }, 0);
  363. }
  364. }).catch((error) => {
  365. console.error('Promise 执行失败:', error)
  366. });
  367. }
  368. }
  369. }
  370. const handleKeepAlive = ()=>{
  371. var keep=new KeepLive()
  372. keep.setTitle("工效通")
  373. keep.setContent("工效通正在运行")
  374. // keep.setLargeIcon("icon");
  375. keep.setSmallIcon("icon"); //图标名字 图标放在 插件下面的 uni_modules\android-keeplive\utssdk\app-android\res 文件夹下
  376. keep.onAddBackgroundCallback(function(res:boolean){
  377. console.log("后台运行 "+res)
  378. })
  379. keep.onAddScrrenListenerCallback(function(res:boolean){
  380. console.log("屏幕开启状态 "+res)
  381. })
  382. keep.setWakeLock(1,"keeptag");// 设置唤醒类型
  383. keep.setAutoStartEnable(true)
  384. keep.doStartApplicationWithPackageName("uni.app.UNI1050C07");
  385. if(!keep.checkAppNotification()){
  386. keep.onOpenNotificationSetting(function(res:boolean){
  387. keep.register();
  388. var ignoring= keep.isIgnoringBatteryOptimizations();
  389. if(!ignoring){
  390. keep.requestIgnoreBatteryOptimizations();
  391. }
  392. })
  393. }else{
  394. keep.register();
  395. var ignoring= keep.isIgnoringBatteryOptimizations();
  396. if(!ignoring){
  397. keep.requestIgnoreBatteryOptimizations();
  398. }
  399. }
  400. // keep.wifilock();
  401. // 稳定定时器 需要的用户使用(默认定时器1 )
  402. if(!keep.isRunning()){
  403. console.log("启动定时器")
  404. keep.onStartCSystemTimer(10,function(){
  405. console.log("onStartCSystemTimer ");
  406. getNofiyMes();
  407. keep.acquire(1000);// 唤醒一秒钟
  408. });
  409. }
  410. }
  411. // 辅助函数:从 any 类型提取属性
  412. const getWorkOrderProjectNo = (item: any | null): string | null => {
  413. if (item == null) return ''
  414. const orderInfoItem = item as UTSJSONObject
  415. return orderInfoItem['workOrderProjectNo'] as string != null ? orderInfoItem['workOrderProjectNo'] as string : ''
  416. }
  417. const getPcsDeviceName = (item: any | null): string | null=> {
  418. if (item == null) return ''
  419. const orderInfoItem = item as UTSJSONObject
  420. return orderInfoItem['pcsDeviceName'] as string != null ? orderInfoItem['pcsDeviceName'] as string : ''
  421. }
  422. const getStationName = (item: any | null): string | null=> {
  423. if (item == null) return ''
  424. const orderInfoItem = item as UTSJSONObject
  425. return orderInfoItem['pcsStationName'] as string != null ? orderInfoItem['pcsStationName'] as string : ''
  426. }
  427. const getCreateTime = (item: any | null): string|null => {
  428. if (item == null) return null
  429. const orderInfoItem = item as UTSJSONObject
  430. return orderInfoItem['createTime'] as string != null ? orderInfoItem['createTime'] as string : ''
  431. }
  432. const getRemark = (item: any | null): string|null => {
  433. if (item == null) return null
  434. const orderInfoItem = item as UTSJSONObject
  435. return orderInfoItem['remark'] as string != null ? orderInfoItem['remark'] as string : ''
  436. }
  437. // 根据剩余时间获取颜色类名
  438. const getRemarkClass = (item: any | null): string => {
  439. if (item == null) return ''
  440. const orderInfoItem = item as UTSJSONObject
  441. const remark = orderInfoItem['remark'] as string
  442. if (remark == null || remark.length === 0) return ''
  443. // 解析备注中的剩余时间(假设格式为包含数字和小时的字符串)
  444. // 例如:"剩余时间:5小时" 或 "还剩10小时"
  445. const timeMatch = remark.match(/(\d+(\.\d+)?)\s*(小时|时)/)
  446. if (timeMatch != null && timeMatch.length > 1 && timeMatch[1] != null) {
  447. const hours = parseFloat(timeMatch[1] as string)
  448. if (hours < 6) {
  449. return 'time-critical' // 红色
  450. } else if (hours < 12) {
  451. return 'time-warning' // 橙色
  452. } else if (hours < 24) {
  453. return 'time-notice' // 黄色
  454. }
  455. }
  456. return ''
  457. }
  458. // 辅助函数:从 any 类型提取属性
  459. const getOrderType = (item: any | null): string => {
  460. if (item == null) return ''
  461. const orderInfoItem = item as UTSJSONObject
  462. return orderInfoItem['orderType'] == 1?"维修工单":"维保工单";
  463. }
  464. const getInspectionType = (item: any | null): string | null => {
  465. if (item == null) return ''
  466. const orderInfoItem = item as UTSJSONObject
  467. const rawStatus = orderInfoItem['inspectionType']
  468. if (rawStatus==null) return ''
  469. // 如果字典尚未加载,返回原始值
  470. if (!dictLoaded.value) {
  471. return rawStatus
  472. }
  473. // 查找字典中对应的标签
  474. const dictItem = inspectionTypeList.value.find(dict => dict.dictValue == rawStatus)
  475. return dictItem!=null ? dictItem.dictLabel : rawStatus
  476. }
  477. // 即将超时工单点击事件
  478. const handleAlmostOverdueItemClick = (item: any, index: number): void => {
  479. if (item == null) return
  480. const orderItem = item as UTSJSONObject
  481. try {
  482. // 跳转到工单详情页
  483. uni.navigateTo({
  484. url: `/pages/order/detail/index?id=${orderItem['id']}&orderType=${orderItem['orderType']}`
  485. })
  486. } catch (e) {
  487. console.error('处理即将超时工单点击事件失败:', e)
  488. }
  489. }
  490. // 超时工单点击事件
  491. const handleOverdueItemClick = (item: any, index: number): void => {
  492. if (item == null) return
  493. const orderItem = item as UTSJSONObject
  494. try {
  495. // 跳转到工单详情页
  496. uni.navigateTo({
  497. url: `/pages/order/detail/acceptIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  498. })
  499. } catch (e) {
  500. console.error('处理超时工单点击事件失败:', e)
  501. }
  502. }
  503. const registerPush =() =>{
  504. console.log("获取CID")
  505. uni.getPushClientId({
  506. success: (res) => {
  507. console.log(res.cid);
  508. registerServer(res.cid).then((result:any) => {
  509. console.log("注册成功");
  510. });
  511. },
  512. fail(err) {
  513. console.log(err)
  514. }
  515. })
  516. }
  517. // 初始化
  518. onMounted(() => {
  519. const userInfo = getUserInfo()
  520. if (userInfo != null) {
  521. const realName = userInfo['nickName'] as string | null
  522. userName.value = realName ?? '用户'
  523. const userId = userInfo['userId']?.toString()
  524. if(userId!=null){
  525. console.log("监听:"+userId)
  526. handleKeepAlive()
  527. registerPush();
  528. }
  529. }
  530. // 加载待接单数量
  531. loadAssignedCount()
  532. // 加载待自评工单数量
  533. loadSelfScoreCount()
  534. // 加载超时工单数量
  535. loadOverdueCount()
  536. // 加载即将超时工单列表
  537. // loadAlmostOverdueList()
  538. // 加载超时工单列表
  539. loadOverdueList()
  540. // 监听工单状态更新事件
  541. uni.$on('refreshAssignedCount', () => {
  542. loadAssignedCount()
  543. })
  544. // 监听评分工单状态更新事件
  545. uni.$on('refreshSelfScoreCount', () => {
  546. loadSelfScoreCount()
  547. })
  548. // 监听超时工单状态更新事件
  549. uni.$on('refreshOverdueCount', () => {
  550. loadOverdueCount()
  551. })
  552. // 监听接单成功的事件,刷新列表
  553. uni.$on('refreshOrderList', () => {
  554. loadOverdueList()
  555. })
  556. })
  557. </script>
  558. <style lang="scss">
  559. .page-container {
  560. position: relative;
  561. flex: 1;
  562. padding-top: env(safe-area-inset-top);
  563. background-color: #e8f0f9;
  564. }
  565. .bg-image {
  566. position: absolute;
  567. top: 0;
  568. left: 0;
  569. width: 100%;
  570. height: 100%;
  571. z-index: 0;
  572. }
  573. .bg-color {
  574. position: absolute;
  575. top: 0;
  576. left: 0;
  577. width: 100%;
  578. height: 100%;
  579. z-index: -1;
  580. background: #71a6e4;
  581. }
  582. .page-content {
  583. position: relative;
  584. flex: 1;
  585. margin-bottom: 150rpx;
  586. padding: 20rpx;
  587. z-index: 10;
  588. }
  589. .header {
  590. flex-direction: row;
  591. height: 40px;
  592. &-title {
  593. font-size: 40rpx;
  594. color: #ffffff;
  595. font-weight: bold;
  596. margin-bottom: 15rpx;
  597. }
  598. &-greeting {
  599. font-size: 28rpx;
  600. color: rgba(255, 255, 255, 0.9);
  601. }
  602. }
  603. .section-title {
  604. font-size: 32rpx;
  605. color: #333333;
  606. font-weight: bold;
  607. // margin-bottom: 20rpx;
  608. }
  609. .section-title-container {
  610. padding: 20rpx 30rpx 10rpx 30rpx;
  611. }
  612. .section-header {
  613. flex-direction: row;
  614. justify-content: space-between;
  615. align-items: center;
  616. }
  617. .view-all {
  618. font-size: 28rpx;
  619. color: #165dff;
  620. }
  621. /* 图表区域 */
  622. .chart-section {
  623. padding: 30rpx;
  624. margin-bottom: 20rpx;
  625. background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.9) 100%);
  626. box-shadow: 0 0 16rpx 0 rgba(0, 0, 0, 0.1);
  627. border-radius: 16rpx;
  628. }
  629. .db-view{
  630. display: flex;
  631. flex-direction: row;
  632. // justify-content: space-between;
  633. justify-content: flex-start;
  634. margin-bottom: 10rpx;
  635. // gap: 20rpx;
  636. .db-box{
  637. background-color: #fff;
  638. width:200rpx;
  639. height: 200rpx;
  640. justify-content: center;
  641. align-items: center;
  642. margin-left: 28rpx;
  643. border-radius: 5px;
  644. .db-text{
  645. margin-top: 10rpx;
  646. font-size:10px;
  647. }
  648. .db-center-1{
  649. justify-content: center;
  650. align-items: center;
  651. background-color: #DBEAFE;
  652. border-radius: 200px;
  653. width:100rpx;
  654. height:100rpx;
  655. position: relative;
  656. }
  657. .db-center-2{
  658. justify-content: center;
  659. align-items: center;
  660. background-color: #DCFCE7;
  661. border-radius: 200px;
  662. width:100rpx;
  663. height:100rpx;
  664. position: relative;
  665. }
  666. .db-center-3{
  667. justify-content: center;
  668. align-items: center;
  669. background-color: #F3E8FF;
  670. border-radius: 200px;
  671. width:100rpx;
  672. height:100rpx;
  673. }
  674. }
  675. .db-image{
  676. width:20px;
  677. height:20px;
  678. }
  679. }
  680. .badge {
  681. z-index: 999;
  682. position: absolute;
  683. top: 35rpx;
  684. right: 35rpx;
  685. background-color: #ff4d4f;
  686. border-radius: 20rpx;
  687. width: 40rpx;
  688. height: 40rpx;
  689. }
  690. .count {
  691. line-height: 40rpx;
  692. font-size: 26rpx;
  693. text-align: center;
  694. color: #ffffff;
  695. }
  696. .list-item {
  697. margin: 0 30rpx 24rpx 30rpx;
  698. background-color: #ffffff;
  699. border-radius: 16rpx;
  700. }
  701. .item-container {
  702. padding: 30rpx;
  703. }
  704. .item-header {
  705. flex-direction: row;
  706. align-items: center;
  707. margin-bottom: 16rpx;
  708. .item-title {
  709. flex: 1;
  710. font-size: 32rpx;
  711. color: #333333;
  712. font-weight: bold;
  713. }
  714. .detail-link {
  715. font-size: 28rpx;
  716. color: #999999;
  717. }
  718. }
  719. .btn-primary {
  720. font-size: 14px;
  721. background-color: #165DFF;
  722. color: #ffffff;
  723. }
  724. .info-row {
  725. flex-direction: row;
  726. justify-content: space-between;
  727. align-items: center;
  728. .info-label {
  729. font-size: 26rpx;
  730. color: #666;
  731. }
  732. .info-value {
  733. font-size: 26rpx;
  734. }
  735. }
  736. .text-gray{
  737. font-size: 26rpx;
  738. color: #666;
  739. }
  740. /* 剩余时间颜色样式 */
  741. .time-critical {
  742. color: #ff4d4f; /* 红色 */
  743. }
  744. .time-warning {
  745. color: #fa8c16; /* 橙色 */
  746. }
  747. .time-notice {
  748. color: #faad14; /* 黄色 */
  749. }
  750. .status-tag {
  751. padding: 8rpx 20rpx;
  752. border-radius: 20rpx;
  753. font-size: 24rpx;
  754. white-space: nowrap;
  755. margin-left: 20rpx;
  756. border: 1rpx solid;
  757. }
  758. /* 已超时工单标题红色样式 */
  759. .overdue-title {
  760. margin-top: 16rpx;
  761. font-size: 26rpx;
  762. color: #ff4d4f;
  763. }
  764. /* 待接单 */
  765. .status-assigned {
  766. background-color: #ebf5ff;
  767. color: #409eff;
  768. border-color: #d8ebff;
  769. }
  770. /* 已挂起 */
  771. .status-suspended {
  772. background-color: #fff2f0;
  773. color: #ff4d4f;
  774. border-color: #ffccc7;
  775. }
  776. .empty-tips {
  777. padding: 30rpx;
  778. justify-content: center;
  779. align-items: center;
  780. .empty-text {
  781. font-size: 26rpx;
  782. color: #999999;
  783. }
  784. }
  785. </style>