index.uvue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. <template>
  2. <uni-navbar-lite :showLeft=false title="工单"></uni-navbar-lite>
  3. <view class="list-page">
  4. <!-- 搜索栏 -->
  5. <view class="search-bar">
  6. <view class="search-box">
  7. <image class="search-icon" src="/static/images/workbench/list/1.png" mode="aspectFit"></image>
  8. <input class="search-input" type="text" placeholder="搜索工单编码、风机编号" v-model="keyword" @confirm="handleSearch" @blur="handleSearch" />
  9. <text v-if="keyword.length > 0" class="clear-icon" @click="clearSearch">✕</text>
  10. </view>
  11. </view>
  12. <view class="status-bar">
  13. <scroll-view class="scroll-view_H" direction="horizontal" show-scrollbar="false">
  14. <view class="scroll-view-item_H uni-bg-red"v-if="checkPermi(['gxt:order:all']) && !dealLoad">
  15. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'all'}" @click="switchStatus('all')">全部</text>
  16. </view>
  17. <view class="scroll-view-item_H uni-bg-green" v-if="checkPermi(['gxt:maintenance:order:accept','gxt:repairOrder:accept']) && !dealLoad">
  18. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'assigned'}" @click="switchStatus('assigned')">待接单</text>
  19. </view>
  20. <view class="scroll-view-item_H" v-if="checkPermi(['gxt:maintenance:order:suspend','gxt:repairOrder:suspend']) && !dealLoad">
  21. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'to_finish'}" @click="switchStatus('to_finish')">待结单</text>
  22. </view>
  23. <view class="scroll-view-item_H" v-if="checkPermi(['gxt:maintenance:order:approve','gxt:repairOrder:approve']) && !dealLoad">
  24. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'to_approve'}" @click="switchStatus('to_approve')">待审批</text>
  25. </view>
  26. <view class="scroll-view-item_H" v-if="checkPermi(['gxt:maintenance:order:resume','gxt:repairOrder:resume']) && !dealLoad">
  27. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'suspended'}" @click="switchStatus('suspended')">已挂起</text>
  28. </view>
  29. <view class="scroll-view-item_H" v-if="checkPermi(['gxt:maintenance:order:restart','gxt:repairOrder:restart']) && !dealLoad">
  30. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'completed'}" @click="switchStatus('completed')">已完成</text>
  31. </view>
  32. <view class="scroll-view-item_H" v-if="dealLoad">
  33. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'pending'}" @click="switchStatus('pending')">待处理</text>
  34. </view>
  35. </scroll-view>
  36. </view>
  37. <!-- 列表内容 -->
  38. <common-list
  39. :dataList="dataList"
  40. :loading="loading"
  41. :refreshing="refreshing"
  42. :hasMore="hasMore"
  43. @refresh="handleRefresh"
  44. @loadMore="loadMore"
  45. @itemClick="handleItemClick"
  46. >
  47. <template #default="{ item, index }">
  48. <view class="list-item">
  49. <view class="item-container">
  50. <view class="item-header">
  51. <!-- <image class="location-icon" src="/static/images/workbench/list/2.png" mode="aspectFit"></image>
  52. <text class="item-title">{{ getOrderType(item) }}</text>
  53. <text class="detail-link">类型 ›</text> -->
  54. <text class="item-title">{{ getWorkOrderProjectNo(item) }}-{{ getPcsDeviceName(item) }}{{ getOrderType(item) }}</text>
  55. <text class="status-tag" :class="getStatusClass(item)">{{ getWorkOrderStatus(item) }}</text>
  56. </view>
  57. <view class="info-row">
  58. <view class="info-label">
  59. <text class="text-gray">{{ getDisplayTime(item) }}</text>
  60. </view>
  61. <!-- <view class="info-value">
  62. <button
  63. v-if="currentStatus === 'assigned'"
  64. class="btn-primary info-value"
  65. @click.stop="acceptOrder(item)"
  66. >
  67. 接单
  68. </button>
  69. <button
  70. v-else-if="currentStatus === 'to_approve'"
  71. class="btn-primary info-value"
  72. @click="approveOrder(item)"
  73. >
  74. 审批
  75. </button>
  76. </view> -->
  77. </view>
  78. </view>
  79. </view>
  80. </template>
  81. </common-list>
  82. <custom-tabbar :current="1" />
  83. </view>
  84. </template>
  85. <script setup lang="uts">
  86. import { ref, onBeforeUnmount, onMounted } from 'vue'
  87. import type { acceptOrderInfo } from '../../types/order'
  88. import type { SysDictData, DictDataResponse } from '../../types/dict'
  89. import { getOrderList } from '../../api/order/list'
  90. import { getDictDataByType } from '../../api/dict/index'
  91. import {checkPermi} from '../../utils/storage'
  92. // 列表数据
  93. const dataList = ref<acceptOrderInfo[]>([])
  94. let keyword = ref<string>("")
  95. const page = ref<number>(1)
  96. const pageSize: number = 10
  97. const hasMore = ref<boolean>(true)
  98. const loading = ref<boolean>(false)
  99. const refreshing = ref<boolean>(false)
  100. const total = ref<number>(0)
  101. let currentStatus = ref<string>('') // 添加状态管理
  102. const statusDictList = ref<SysDictData[]>([]) // 工单状态字典列表
  103. // 添加字典加载状态
  104. const dictLoaded = ref<boolean>(false)
  105. // 待处理工单加载
  106. const dealLoad = ref<boolean>(false)
  107. type StatusItem = {
  108. key: string,
  109. permis: string[],
  110. condition: () => boolean
  111. }
  112. const statusConfig: StatusItem[] = [
  113. { key: 'all', permis: ['gxt:order:all'], condition: () => !dealLoad.value },
  114. { key: 'assigned', permis: ['gxt:maintenance:order:accept','gxt:repairOrder:accept'], condition: () => !dealLoad.value },
  115. { key: 'to_finish', permis: ['gxt:maintenance:order:suspend','gxt:repairOrder:suspend'], condition: () => !dealLoad.value },
  116. { key: 'to_approve', permis: ['gxt:maintenance:order:approve','gxt:repairOrder:approve'], condition: () => !dealLoad.value },
  117. { key: 'suspended', permis: ['gxt:maintenance:order:resume','gxt:repairOrder:resume'], condition: () => !dealLoad.value },
  118. { key: 'completed', permis: ['gxt:maintenance:order:restart','gxt:repairOrder:restart'], condition: () => !dealLoad.value }
  119. ]
  120. // 获取工单状态字典列表
  121. const loadStatusDictList = async (): Promise<void> => {
  122. try {
  123. const result = await getDictDataByType('gxt_work_order_status')
  124. const resultObj = result as UTSJSONObject
  125. if (resultObj['code'] == 200) {
  126. const data = resultObj['data'] as any[]
  127. const dictData: SysDictData[] = []
  128. if (data.length > 0) {
  129. for (let i = 0; i < data.length; i++) {
  130. const item = data[i] as UTSJSONObject
  131. // 只提取需要的字段
  132. const dictItem: SysDictData = {
  133. dictValue: item['dictValue'] as string | null,
  134. dictLabel: item['dictLabel'] as string | null,
  135. dictCode: null,
  136. dictSort: null,
  137. dictType: null,
  138. cssClass: null,
  139. listClass: null,
  140. isDefault: null,
  141. status: null,
  142. default: null,
  143. createTime: null,
  144. remark: null
  145. }
  146. dictData.push(dictItem)
  147. }
  148. }
  149. statusDictList.value = dictData
  150. dictLoaded.value = true
  151. }
  152. } catch (e: any) {
  153. console.error('获取工单状态字典失败:', e.message)
  154. dictLoaded.value = true
  155. }
  156. }
  157. const getFirstVisibleStatus = (): string => {
  158. for (const item of statusConfig) {
  159. const hasPerm = item.permis.length === 0 || checkPermi(item.permis)
  160. const meetsCondition = item.condition()
  161. if (hasPerm && meetsCondition) {
  162. // if (hasPerm) {
  163. return item.key as string
  164. }
  165. }
  166. return 'all' // fallback,理论上不会走到这里
  167. }
  168. // 加载列表数据
  169. const loadData = async (isRefresh: boolean | null): Promise<void> => {
  170. if (loading.value) {
  171. // 如果正在加载,直接重置刷新状态
  172. refreshing.value = false
  173. return
  174. }
  175. try {
  176. loading.value = true
  177. // 处理默认值
  178. const shouldRefresh = isRefresh != null ? isRefresh : false
  179. if (shouldRefresh) {
  180. page.value = 1
  181. }
  182. console.log("searchKeyword===" + keyword.value)
  183. // 调用 API,传递关键字参数
  184. const searchKeyword = keyword.value.length > 0 ? keyword.value : null
  185. const result = await getOrderList(page.value, pageSize, searchKeyword, currentStatus.value)
  186. // 提取响应数据
  187. const resultObj = result as UTSJSONObject
  188. const code = resultObj['code'] as number
  189. const responseData = resultObj['rows'] as any[]
  190. const responseTotal = resultObj['total'] as number
  191. if (code == 200) {
  192. // 将 any[] 转换为 acceptOrderInfo[]
  193. const newData: acceptOrderInfo[] = []
  194. for (let i = 0; i < responseData.length; i++) {
  195. const item = responseData[i] as UTSJSONObject
  196. const orderItem: acceptOrderInfo = {
  197. orderType: item['orderType'] as Number,
  198. id: item['id'] as Number,
  199. teamLeaderId: item['teamLeaderId'] != null ? (item['teamLeaderId'] as Number) : 0,
  200. acceptUserId: item['acceptUserId'] != null ? (item['acceptUserId'] as Number) : 0,
  201. teamLeaderName: item['teamLeaderName'] as string | null,
  202. acceptUserName: item['acceptUserName'] as string | null,
  203. acceptTime: item['acceptTime'] as string | null,
  204. assignTime: item['assignTime'] as string | null,
  205. assignUserName: item['assignUserName'] as string | null,
  206. status: (item['status']==null)?0:item['status'] as Number,
  207. workOrderProjectNo: item['workOrderProjectNo'] as string | null,
  208. workOrderStatus: item['workOrderStatus'] as string | null,
  209. gxtCenterId: item['gxtCenterId'] as Number | 0,
  210. gxtCenter: item['gxtCenter'] as string | null,
  211. pcsStationId: item['pcsStationId'] as Number | 0,
  212. pcsStationName: item['pcsStationName'] as string | null,
  213. pcsDeviceId: item['pcsDeviceId'] as Number | 0,
  214. pcsDeviceName: item['pcsDeviceName'] as string | null,
  215. brand: item['brand'] as string | null,
  216. model: item['model'] as string | null,
  217. createTime: item['createTime'] as string | null,
  218. suspendReason: item['suspendReason'] as string | null,
  219. rejectionReason: item['rejectionReason'] as string | null
  220. }
  221. newData.push(orderItem)
  222. }
  223. // 不再在前端过滤,直接使用API返回的数据
  224. if (shouldRefresh) {
  225. dataList.value = newData
  226. } else {
  227. dataList.value = [...dataList.value, ...newData]
  228. }
  229. total.value = responseTotal
  230. hasMore.value = dataList.value.length < responseTotal
  231. // 通知首页更新待接单数量
  232. if (currentStatus.value === 'assigned') {
  233. uni.$emit('refreshAssignedCount')
  234. }
  235. } else {
  236. const msg = resultObj['msg'] as string | null
  237. uni.showToast({
  238. title: msg ?? '加载失败',
  239. icon: 'none'
  240. })
  241. }
  242. } catch (e: any) {
  243. uni.showToast({
  244. title: e.message ?? '加载失败',
  245. icon: 'none'
  246. })
  247. } finally {
  248. loading.value = false
  249. // #ifdef WEB
  250. // Web 平台立即重置
  251. refreshing.value = false
  252. // #endif
  253. // #ifndef WEB
  254. // App 平台延迟重置刷新状态,确保 UI 更新
  255. setTimeout(() => {
  256. refreshing.value = false
  257. }, 100)
  258. // #endif
  259. }
  260. // #ifdef WEB
  261. // Web 平台额外确保重置
  262. refreshing.value = false
  263. // #endif
  264. }
  265. // 辅助函数:从 any 类型提取属性
  266. const getOrderType = (item: any | null): string => {
  267. if (item == null) return ''
  268. const orderInfoItem = item as acceptOrderInfo
  269. return orderInfoItem.orderType == 1?"维修工单":"维保工单";
  270. }
  271. const getWorkOrderProjectNo = (item: any | null): string | null => {
  272. if (item == null) return ''
  273. const orderInfoItem = item as acceptOrderInfo
  274. return orderInfoItem.workOrderProjectNo
  275. }
  276. const getPcsStationName = (item: any | null): string | null=> {
  277. if (item == null) return ''
  278. const orderInfoItem = item as acceptOrderInfo
  279. return orderInfoItem.pcsStationName
  280. }
  281. const getPcsDeviceName = (item: any | null): string | null=> {
  282. if (item == null) return ''
  283. const orderInfoItem = item as acceptOrderInfo
  284. return orderInfoItem.pcsDeviceName
  285. }
  286. const getAssignTime = (item: any | null): string|null => {
  287. if (item == null) return null
  288. const orderInfoItem = item as acceptOrderInfo
  289. return orderInfoItem.assignTime
  290. }
  291. const getAcceptTime = (item: any | null): string|null => {
  292. if (item == null) return null
  293. const orderInfoItem = item as acceptOrderInfo
  294. return orderInfoItem.acceptTime
  295. }
  296. const getCreateTime = (item: any | null): string|null => {
  297. if (item == null) return null
  298. const orderInfoItem = item as acceptOrderInfo
  299. return orderInfoItem.createTime
  300. }
  301. // 根据状态显示不同的时间
  302. const getDisplayTime = (item: any | null): string|null => {
  303. if (item == null) return null
  304. const orderInfoItem = item as acceptOrderInfo
  305. // 如果是"待接单"状态,显示派单时间
  306. if (orderInfoItem.workOrderStatus == 'assigned') {
  307. return '下发时间:' + orderInfoItem.assignTime
  308. } else if(orderInfoItem.workOrderStatus == 'to_finish') {
  309. return '接单时间:' + orderInfoItem.acceptTime
  310. // } else if(orderInfoItem.workOrderStatus == 'to_approve') {
  311. // return '申请挂起时间:'
  312. // } else if(orderInfoItem.workOrderStatus == 'suspended') {
  313. // return '审批通过时间:'
  314. }
  315. // 默认显示创建时间
  316. return '创建时间:' + orderInfoItem.createTime
  317. }
  318. const getWorkOrderStatus = (item: any | null): string | null => {
  319. if (item == null) return ''
  320. const orderInfoItem = item as acceptOrderInfo
  321. const rawStatus = orderInfoItem.workOrderStatus
  322. if (rawStatus==null) return ''
  323. // 如果字典尚未加载,返回原始值
  324. if (!dictLoaded.value) {
  325. return rawStatus
  326. }
  327. // 查找字典中对应的标签
  328. const dictItem = statusDictList.value.find(dict => dict.dictValue == rawStatus)
  329. return dictItem!=null ? dictItem.dictLabel : rawStatus
  330. }
  331. const getStatusClass = (item: any | null): string => {
  332. if (item == null) return ''
  333. const orderInfoItem = item as acceptOrderInfo
  334. const rawStatus = orderInfoItem.workOrderStatus
  335. if (rawStatus==null) return ''
  336. // const status = rawStatus
  337. // 返回对应的状态类名
  338. return `status-${rawStatus}`
  339. }
  340. // 切换状态
  341. const switchStatus = (status: string): void => {
  342. currentStatus.value = status
  343. page.value = 1
  344. loadData(true)
  345. }
  346. // 下拉刷新
  347. const handleRefresh = async (): Promise<void> => {
  348. refreshing.value = true
  349. await loadData(true as boolean | null)
  350. }
  351. // 加载更多
  352. const loadMore = (): void => {
  353. if (!hasMore.value || loading.value) {
  354. return
  355. }
  356. page.value++
  357. loadData(false as boolean | null)
  358. }
  359. // 搜索
  360. const handleSearch = (): void => {
  361. page.value = 1
  362. console.log("======搜索=====" + keyword.value)
  363. loadData(true as boolean | null)
  364. }
  365. const handleSearchOnBlur = (): void => {
  366. handleSearch()
  367. }
  368. // 点击列表项
  369. const handleItemClick = (item: any | null, index: number): void => {
  370. if (item == null) return
  371. const orderItem = item as acceptOrderInfo
  372. if(currentStatus.value === '' || currentStatus.value === 'completed' || currentStatus.value === 'all') {
  373. // 传递orderType参数以便详情页决定调用哪个API
  374. uni.navigateTo({
  375. url: `/pages/order/detail/index?id=${orderItem.id}&orderType=${orderItem.orderType}`
  376. })
  377. } else if(currentStatus.value === 'assigned') {
  378. // 跳转到接单页面
  379. uni.navigateTo({
  380. url: `/pages/order/detail/acceptIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  381. })
  382. } else if(currentStatus.value === 'to_finish') {
  383. // 跳转到待结单页面
  384. uni.navigateTo({
  385. url: `/pages/order/detail/suspendIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  386. })
  387. } else if(currentStatus.value === 'to_approve') {
  388. // 跳转到待审批页面
  389. uni.navigateTo({
  390. url: `/pages/order/detail/approveIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  391. })
  392. } else if(currentStatus.value === 'suspended') {
  393. // 跳转到恢复页面
  394. uni.navigateTo({
  395. url: `/pages/order/detail/resumeIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  396. })
  397. }
  398. }
  399. // 接单操作
  400. const acceptOrder = (item: any | null): void => {
  401. if (item == null) return
  402. const orderItem = item as acceptOrderInfo
  403. console.log('接单操作:', orderItem.id)
  404. // 跳转到接单页面
  405. uni.navigateTo({
  406. url: `/pages/order/detail/acceptIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  407. })
  408. }
  409. // 审批操作
  410. const approveOrder = (item: any | null): void => {
  411. if (item == null) return
  412. const orderItem = item as acceptOrderInfo
  413. console.log('审批操作:', orderItem.id)
  414. // 这里可以添加实际的审批逻辑
  415. uni.showToast({
  416. title: '审批成功',
  417. icon: 'success'
  418. })
  419. }
  420. // 查看工单详情
  421. const showWorkOrderDetail = (item: any | null): void => {
  422. if (item == null) return
  423. const orderItem = item as acceptOrderInfo
  424. uni.navigateTo({
  425. url: `/pages/workbench/detail/index?id=${orderItem.id}`
  426. })
  427. }
  428. // 清空搜索
  429. const clearSearch = (): void => {
  430. keyword.value = ""
  431. page.value = 1
  432. loadData(true)
  433. }
  434. // 初始化
  435. // onMounted(() => {
  436. onLoad((options: any) => {
  437. const params = options as UTSJSONObject
  438. const isDeal = params['isDeal'] as string | null
  439. if(isDeal != null) {
  440. dealLoad.value = true;
  441. }
  442. loadStatusDictList()
  443. // ✅ 自动选中第一个可显示的状态
  444. currentStatus.value = getFirstVisibleStatus()
  445. loadData(true as boolean | null)
  446. // 监听首页切换状态事件
  447. uni.$on('switchOrderStatus', (status: string) => {
  448. switchStatus(status)
  449. })
  450. // 监听接单成功的事件,刷新列表
  451. uni.$on('refreshOrderList', () => {
  452. page.value = 1
  453. loadData(true)
  454. })
  455. })
  456. // 组件卸载前清理事件监听
  457. onBeforeUnmount(() => {
  458. refreshing.value = false
  459. loading.value = false
  460. // 移除事件监听
  461. uni.$off('refreshOrderList',{})
  462. uni.$off('switchOrderStatus',{})
  463. })
  464. </script>
  465. <style lang="scss">
  466. .list-page {
  467. flex: 1;
  468. background-color: #e8f0f9;
  469. }
  470. .search-bar {
  471. padding: 20rpx 30rpx;
  472. background-color: #d7eafe;
  473. }
  474. .search-box {
  475. flex-direction: row;
  476. align-items: center;
  477. height: 72rpx;
  478. padding: 0 24rpx;
  479. background-color: #f5f5f5;
  480. border-radius: 36rpx;
  481. .search-icon {
  482. width: 32rpx;
  483. height: 32rpx;
  484. margin-right: 12rpx;
  485. }
  486. .search-input {
  487. flex: 1;
  488. font-size: 28rpx;
  489. color: #333333;
  490. }
  491. .clear-icon {
  492. margin-left: 12rpx;
  493. font-size: 28rpx;
  494. color: #999999;
  495. }
  496. }
  497. .status-bar{
  498. padding-bottom: 10px;
  499. padding-left:30rpx;
  500. background-color: #d7eafe;
  501. }
  502. .status-box {
  503. flex-direction: row;
  504. align-items: center;
  505. height: 72rpx;
  506. flex: 1;
  507. .status-txt{
  508. padding: 8px 12px;
  509. text-align: center;
  510. margin-right: 12rpx;
  511. border-radius: 36rpx;
  512. background-color: #fff;
  513. font-size: 28rpx;
  514. // cursor: pointer;
  515. }
  516. .stauts-sel{
  517. background-color: #007AFF;
  518. color: #fff;
  519. }
  520. }
  521. .list-item {
  522. margin: 24rpx 30rpx;
  523. background-color: #ffffff;
  524. border-radius: 16rpx;
  525. }
  526. .item-container {
  527. padding: 30rpx;
  528. }
  529. .item-header {
  530. flex-direction: row;
  531. align-items: center;
  532. margin-bottom: 16rpx;
  533. .location-icon {
  534. width: 32rpx;
  535. height: 32rpx;
  536. margin-right: 8rpx;
  537. }
  538. .item-title {
  539. flex: 1;
  540. font-size: 32rpx;
  541. color: #333333;
  542. font-weight: bold;
  543. }
  544. .detail-link {
  545. font-size: 28rpx;
  546. color: #999999;
  547. }
  548. }
  549. .item-address {
  550. font-size: 26rpx;
  551. color: #999999;
  552. margin-bottom: 20rpx;
  553. line-height: 40rpx;
  554. }
  555. .btn-primary {
  556. font-size: 14px;
  557. background-color: #165DFF;
  558. color: #ffffff;
  559. }
  560. .item-header {
  561. flex-direction: row;
  562. align-items: flex-start;
  563. margin-bottom: 16rpx;
  564. .item-title {
  565. font-size: 30rpx;
  566. color: #333333;
  567. font-weight: bold;
  568. flex-wrap: wrap;
  569. flex: 0 1 80%;
  570. min-width: 0;
  571. }
  572. .info-value {
  573. font-size: 28rpx;
  574. color: #999999;
  575. margin-left: auto;
  576. flex: 0 0 auto;
  577. white-space: nowrap;
  578. }
  579. }
  580. .info-row {
  581. flex-direction: row;
  582. justify-content: space-between;
  583. align-items: center;
  584. .info-label {
  585. font-size: 26rpx;
  586. color: #666;
  587. }
  588. .info-value {
  589. font-size: 26rpx;
  590. // color: #666;
  591. }
  592. }
  593. .text-gray{
  594. font-size: 26rpx;
  595. color: #666;
  596. }
  597. .status-tag {
  598. padding: 8rpx 20rpx;
  599. border-radius: 20rpx;
  600. font-size: 24rpx;
  601. // font-weight: 50rpx;
  602. white-space: nowrap;
  603. margin-left: 20rpx;
  604. border: 1rpx solid;
  605. }
  606. /* 待接单 */
  607. .status-assigned {
  608. background-color: #ebf5ff;
  609. color: #409eff;
  610. border-color: #d8ebff;
  611. }
  612. /* 待结单 */
  613. .status-to_finish {
  614. background-color: #fff7e6;
  615. color: #fa8c16;
  616. border-color: #ffd591;
  617. }
  618. /* 待审批 */
  619. .status-to_approve {
  620. background-color: #fff7e6;
  621. color: #fa8c16;
  622. border-color: #ffd591;
  623. }
  624. /* 已挂起 */
  625. .status-suspended {
  626. background-color: #fff2f0;
  627. color: #ff4d4f;
  628. border-color: #ffccc7;
  629. }
  630. /* 已完成 */
  631. .status-completed {
  632. background-color: #f0f9eb;
  633. color: #5cb87a;
  634. border-color: #c2e7b0;
  635. }
  636. /* 待下发 */
  637. .status-to_issue {
  638. background-color: #f4f4f5;
  639. color: #909399;
  640. border-color: #e9e9eb;
  641. }
  642. /* 已归档 */
  643. .status-archived {
  644. background-color: #f0f9eb;
  645. color: #5cb87a;
  646. border-color: #c2e7b0;
  647. }
  648. .scroll-view_H {
  649. width: 100%;
  650. flex-direction: row;
  651. }
  652. .scroll-view-item_H {
  653. justify-content: center;
  654. align-items: center;
  655. .status-txt{
  656. padding: 8px 12px;
  657. text-align: center;
  658. margin-right: 12rpx;
  659. border-radius: 36rpx;
  660. background-color: #fff;
  661. font-size: 28rpx;
  662. }
  663. .stauts-sel{
  664. background-color: #007AFF;
  665. color: #fff;
  666. }
  667. }
  668. </style>