index.uvue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  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" >
  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 } 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 listMobileOrderScores(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. console.log("======" + badge)
  340. setTimeout(() => {
  341. uni.setAppBadgeNumber(badge);
  342. if(data.hasOwnProperty("title") && data["title"] != null
  343. && data.hasOwnProperty("desc") && data["desc"] != null){
  344. const title = data["title"] as string
  345. const desc = data["desc"] as string
  346. uni.createPushMessage({
  347. title: title,
  348. content: desc,
  349. when: Date.now() + 10000,
  350. icon: "/static/login/2.png",
  351. sound: "system",
  352. success: (res) => {
  353. console.log('创建推送消息成功', res);
  354. },
  355. fail: (err) => {
  356. console.error('创建推送消息失败', err);
  357. }
  358. });
  359. }
  360. }, 0);
  361. }
  362. }).catch((error) => {
  363. console.error('Promise 执行失败:', error)
  364. });
  365. }
  366. }
  367. }
  368. const handleKeepAlive = ()=>{
  369. var keep=new KeepLive()
  370. keep.setTitle("工效通")
  371. keep.setContent("工效通正在运行")
  372. // keep.setLargeIcon("icon");
  373. keep.setSmallIcon("icon"); //图标名字 图标放在 插件下面的 uni_modules\android-keeplive\utssdk\app-android\res 文件夹下
  374. keep.onAddBackgroundCallback(function(res:boolean){
  375. console.log("后台运行 "+res)
  376. })
  377. keep.onAddScrrenListenerCallback(function(res:boolean){
  378. console.log("屏幕开启状态 "+res)
  379. })
  380. keep.setWakeLock(1,"keeptag");// 设置唤醒类型
  381. keep.setAutoStartEnable(true)
  382. keep.doStartApplicationWithPackageName("uni.app.UNI1050C07");
  383. if(!keep.checkAppNotification()){
  384. keep.onOpenNotificationSetting(function(res:boolean){
  385. keep.register();
  386. var ignoring= keep.isIgnoringBatteryOptimizations();
  387. if(!ignoring){
  388. keep.requestIgnoreBatteryOptimizations();
  389. }
  390. })
  391. }else{
  392. keep.register();
  393. var ignoring= keep.isIgnoringBatteryOptimizations();
  394. if(!ignoring){
  395. keep.requestIgnoreBatteryOptimizations();
  396. }
  397. }
  398. // keep.wifilock();
  399. // 稳定定时器 需要的用户使用(默认定时器1 )
  400. keep.onStartCSystemTimer(10,function(){
  401. console.log("onStartCSystemTimer ");
  402. getNofiyMes();
  403. keep.acquire(1000);// 唤醒一秒钟
  404. });
  405. }
  406. // 辅助函数:从 any 类型提取属性
  407. const getWorkOrderProjectNo = (item: any | null): string | null => {
  408. if (item == null) return ''
  409. const orderInfoItem = item as UTSJSONObject
  410. return orderInfoItem['workOrderProjectNo'] as string != null ? orderInfoItem['workOrderProjectNo'] as string : ''
  411. }
  412. const getPcsDeviceName = (item: any | null): string | null=> {
  413. if (item == null) return ''
  414. const orderInfoItem = item as UTSJSONObject
  415. return orderInfoItem['pcsDeviceName'] as string != null ? orderInfoItem['pcsDeviceName'] as string : ''
  416. }
  417. const getStationName = (item: any | null): string | null=> {
  418. if (item == null) return ''
  419. const orderInfoItem = item as UTSJSONObject
  420. return orderInfoItem['pcsStationName'] as string != null ? orderInfoItem['pcsStationName'] as string : ''
  421. }
  422. const getCreateTime = (item: any | null): string|null => {
  423. if (item == null) return null
  424. const orderInfoItem = item as UTSJSONObject
  425. return orderInfoItem['createTime'] as string != null ? orderInfoItem['createTime'] as string : ''
  426. }
  427. const getRemark = (item: any | null): string|null => {
  428. if (item == null) return null
  429. const orderInfoItem = item as UTSJSONObject
  430. return orderInfoItem['remark'] as string != null ? orderInfoItem['remark'] as string : ''
  431. }
  432. // 根据剩余时间获取颜色类名
  433. const getRemarkClass = (item: any | null): string => {
  434. if (item == null) return ''
  435. const orderInfoItem = item as UTSJSONObject
  436. const remark = orderInfoItem['remark'] as string
  437. if (remark == null || remark.length === 0) return ''
  438. // 解析备注中的剩余时间(假设格式为包含数字和小时的字符串)
  439. // 例如:"剩余时间:5小时" 或 "还剩10小时"
  440. const timeMatch = remark.match(/(\d+(\.\d+)?)\s*(小时|时)/)
  441. if (timeMatch != null && timeMatch.length > 1 && timeMatch[1] != null) {
  442. const hours = parseFloat(timeMatch[1] as string)
  443. if (hours < 6) {
  444. return 'time-critical' // 红色
  445. } else if (hours < 12) {
  446. return 'time-warning' // 橙色
  447. } else if (hours < 24) {
  448. return 'time-notice' // 黄色
  449. }
  450. }
  451. return ''
  452. }
  453. // 辅助函数:从 any 类型提取属性
  454. const getOrderType = (item: any | null): string => {
  455. if (item == null) return ''
  456. const orderInfoItem = item as UTSJSONObject
  457. return orderInfoItem['orderType'] == 1?"维修工单":"维保工单";
  458. }
  459. const getInspectionType = (item: any | null): string | null => {
  460. if (item == null) return ''
  461. const orderInfoItem = item as UTSJSONObject
  462. const rawStatus = orderInfoItem['inspectionType']
  463. if (rawStatus==null) return ''
  464. // 如果字典尚未加载,返回原始值
  465. if (!dictLoaded.value) {
  466. return rawStatus
  467. }
  468. // 查找字典中对应的标签
  469. const dictItem = inspectionTypeList.value.find(dict => dict.dictValue == rawStatus)
  470. return dictItem!=null ? dictItem.dictLabel : rawStatus
  471. }
  472. // 即将超时工单点击事件
  473. const handleAlmostOverdueItemClick = (item: any, index: number): void => {
  474. if (item == null) return
  475. const orderItem = item as UTSJSONObject
  476. try {
  477. // 跳转到工单详情页
  478. uni.navigateTo({
  479. url: `/pages/order/detail/index?id=${orderItem['id']}&orderType=${orderItem['orderType']}`
  480. })
  481. } catch (e) {
  482. console.error('处理即将超时工单点击事件失败:', e)
  483. }
  484. }
  485. // 超时工单点击事件
  486. const handleOverdueItemClick = (item: any, index: number): void => {
  487. if (item == null) return
  488. const orderItem = item as UTSJSONObject
  489. try {
  490. // 跳转到工单详情页
  491. uni.navigateTo({
  492. url: `/pages/order/detail/acceptIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  493. })
  494. } catch (e) {
  495. console.error('处理超时工单点击事件失败:', e)
  496. }
  497. }
  498. // 初始化
  499. onMounted(() => {
  500. const userInfo = getUserInfo()
  501. if (userInfo != null) {
  502. const realName = userInfo['nickName'] as string | null
  503. userName.value = realName ?? '用户'
  504. const userId = userInfo['userId']?.toString()
  505. if(userId!=null){
  506. console.log("监听:"+userId)
  507. handleKeepAlive()
  508. }
  509. }
  510. // 加载待接单数量
  511. loadAssignedCount()
  512. // 加载待自评工单数量
  513. loadSelfScoreCount()
  514. // 加载超时工单数量
  515. loadOverdueCount()
  516. // 加载即将超时工单列表
  517. // loadAlmostOverdueList()
  518. // 加载超时工单列表
  519. loadOverdueList()
  520. // 监听工单状态更新事件
  521. uni.$on('refreshAssignedCount', () => {
  522. loadAssignedCount()
  523. })
  524. // 监听评分工单状态更新事件
  525. uni.$on('refreshSelfScoreCount', () => {
  526. loadSelfScoreCount()
  527. })
  528. // 监听超时工单状态更新事件
  529. uni.$on('refreshOverdueCount', () => {
  530. loadOverdueCount()
  531. })
  532. // 监听接单成功的事件,刷新列表
  533. uni.$on('refreshOrderList', () => {
  534. loadOverdueList()
  535. })
  536. })
  537. </script>
  538. <style lang="scss">
  539. .page-container {
  540. position: relative;
  541. flex: 1;
  542. padding-top: env(safe-area-inset-top);
  543. background-color: #e8f0f9;
  544. }
  545. .bg-image {
  546. position: absolute;
  547. top: 0;
  548. left: 0;
  549. width: 100%;
  550. height: 100%;
  551. z-index: 0;
  552. }
  553. .bg-color {
  554. position: absolute;
  555. top: 0;
  556. left: 0;
  557. width: 100%;
  558. height: 100%;
  559. z-index: -1;
  560. background: #71a6e4;
  561. }
  562. .page-content {
  563. position: relative;
  564. flex: 1;
  565. margin-bottom: 150rpx;
  566. padding: 20rpx;
  567. z-index: 10;
  568. }
  569. .header {
  570. flex-direction: row;
  571. height: 40px;
  572. &-title {
  573. font-size: 40rpx;
  574. color: #ffffff;
  575. font-weight: bold;
  576. margin-bottom: 15rpx;
  577. }
  578. &-greeting {
  579. font-size: 28rpx;
  580. color: rgba(255, 255, 255, 0.9);
  581. }
  582. }
  583. .section-title {
  584. font-size: 32rpx;
  585. color: #333333;
  586. font-weight: bold;
  587. // margin-bottom: 20rpx;
  588. }
  589. .section-title-container {
  590. padding: 20rpx 30rpx 10rpx 30rpx;
  591. }
  592. .section-header {
  593. flex-direction: row;
  594. justify-content: space-between;
  595. align-items: center;
  596. }
  597. .view-all {
  598. font-size: 28rpx;
  599. color: #165dff;
  600. }
  601. /* 图表区域 */
  602. .chart-section {
  603. padding: 30rpx;
  604. margin-bottom: 20rpx;
  605. background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.9) 100%);
  606. box-shadow: 0 0 16rpx 0 rgba(0, 0, 0, 0.1);
  607. border-radius: 16rpx;
  608. }
  609. .db-view{
  610. display: flex;
  611. flex-direction: row;
  612. // justify-content: space-between;
  613. justify-content: flex-start;
  614. margin-bottom: 10rpx;
  615. // gap: 20rpx;
  616. .db-box{
  617. background-color: #fff;
  618. width:200rpx;
  619. height: 200rpx;
  620. justify-content: center;
  621. align-items: center;
  622. margin-left: 28rpx;
  623. border-radius: 5px;
  624. .db-text{
  625. margin-top: 10rpx;
  626. font-size:10px;
  627. }
  628. .db-center-1{
  629. justify-content: center;
  630. align-items: center;
  631. background-color: #DBEAFE;
  632. border-radius: 200px;
  633. width:100rpx;
  634. height:100rpx;
  635. position: relative;
  636. }
  637. .db-center-2{
  638. justify-content: center;
  639. align-items: center;
  640. background-color: #DCFCE7;
  641. border-radius: 200px;
  642. width:100rpx;
  643. height:100rpx;
  644. position: relative;
  645. }
  646. .db-center-3{
  647. justify-content: center;
  648. align-items: center;
  649. background-color: #F3E8FF;
  650. border-radius: 200px;
  651. width:100rpx;
  652. height:100rpx;
  653. }
  654. }
  655. .db-image{
  656. width:20px;
  657. height:20px;
  658. }
  659. }
  660. .badge {
  661. z-index: 999;
  662. position: absolute;
  663. top: 35rpx;
  664. right: 35rpx;
  665. background-color: #ff4d4f;
  666. border-radius: 20rpx;
  667. width: 40rpx;
  668. height: 40rpx;
  669. }
  670. .count {
  671. line-height: 40rpx;
  672. font-size: 26rpx;
  673. text-align: center;
  674. color: #ffffff;
  675. }
  676. .list-item {
  677. margin: 0 30rpx 24rpx 30rpx;
  678. background-color: #ffffff;
  679. border-radius: 16rpx;
  680. }
  681. .item-container {
  682. padding: 30rpx;
  683. }
  684. .item-header {
  685. flex-direction: row;
  686. align-items: center;
  687. margin-bottom: 16rpx;
  688. .item-title {
  689. flex: 1;
  690. font-size: 32rpx;
  691. color: #333333;
  692. font-weight: bold;
  693. }
  694. .detail-link {
  695. font-size: 28rpx;
  696. color: #999999;
  697. }
  698. }
  699. .btn-primary {
  700. font-size: 14px;
  701. background-color: #165DFF;
  702. color: #ffffff;
  703. }
  704. .info-row {
  705. flex-direction: row;
  706. justify-content: space-between;
  707. align-items: center;
  708. .info-label {
  709. font-size: 26rpx;
  710. color: #666;
  711. }
  712. .info-value {
  713. font-size: 26rpx;
  714. }
  715. }
  716. .text-gray{
  717. font-size: 26rpx;
  718. color: #666;
  719. }
  720. /* 剩余时间颜色样式 */
  721. .time-critical {
  722. color: #ff4d4f; /* 红色 */
  723. }
  724. .time-warning {
  725. color: #fa8c16; /* 橙色 */
  726. }
  727. .time-notice {
  728. color: #faad14; /* 黄色 */
  729. }
  730. .status-tag {
  731. padding: 8rpx 20rpx;
  732. border-radius: 20rpx;
  733. font-size: 24rpx;
  734. white-space: nowrap;
  735. margin-left: 20rpx;
  736. border: 1rpx solid;
  737. }
  738. /* 已超时工单标题红色样式 */
  739. .overdue-title {
  740. margin-top: 16rpx;
  741. font-size: 26rpx;
  742. color: #ff4d4f;
  743. }
  744. /* 待接单 */
  745. .status-assigned {
  746. background-color: #ebf5ff;
  747. color: #409eff;
  748. border-color: #d8ebff;
  749. }
  750. /* 已挂起 */
  751. .status-suspended {
  752. background-color: #fff2f0;
  753. color: #ff4d4f;
  754. border-color: #ffccc7;
  755. }
  756. .empty-tips {
  757. padding: 30rpx;
  758. justify-content: center;
  759. align-items: center;
  760. .empty-text {
  761. font-size: 26rpx;
  762. color: #999999;
  763. }
  764. }
  765. </style>