index.uvue 23 KB

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