index.uvue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. <template>
  2. <view class="detail-page">
  3. <scroll-view class="detail-content" :scroll-y="true">
  4. <!-- 工单信息 -->
  5. <view class="info-section">
  6. <view class="section-title">
  7. <text class="section-title-text">工单信息</text>
  8. </view>
  9. <view class="info-card">
  10. <view class="info-item">
  11. <text class="info-label">工单编码</text>
  12. <text class="info-value">{{ detailData.workOrderProjectNo ?? '' }}</text>
  13. </view>
  14. <view class="info-item">
  15. <text class="info-label">工单类型</text>
  16. <text class="info-value">{{ detailData.orderType == 1 ? '维修工单' : '维保工单' }}</text>
  17. </view>
  18. <view class="info-item">
  19. <text class="info-label">风机编号</text>
  20. <text class="info-value">{{ detailData.pcsDeviceName ?? '' }}</text>
  21. </view>
  22. <view class="info-item">
  23. <text class="info-label">场站</text>
  24. <text class="info-value">{{ detailData.pcsStationName ?? '' }}</text>
  25. </view>
  26. <view class="info-item">
  27. <text class="info-label">工作负责人</text>
  28. <text class="info-value">{{ detailData.teamLeaderName ?? '' }}</text>
  29. </view>
  30. <view class="info-item">
  31. <text class="info-label">工作结束时间</text>
  32. <text class="info-value">{{ detailData.realEndTime ?? '' }}</text>
  33. </view>
  34. <view class="info-item">
  35. <text class="info-label">状态</text>
  36. <text class="info-value">{{ getScoringStatusText(detailData.scoringStatus) }}</text>
  37. </view>
  38. <view class="info-item" v-if="detailData.orderType == 1 && detailData.maintenanceType != null && detailData.maintenanceType != ''">
  39. <text class="info-label">检修类型</text>
  40. <text class="info-value">{{ getMaintenanceTypeText(detailData.maintenanceType) }}</text>
  41. </view>
  42. <view class="info-item" v-if="detailData.orderType == 2 && detailData.inspectionType != null && detailData.inspectionType != ''">
  43. <text class="info-label">维保类型</text>
  44. <text class="info-value">{{ getInspectionTypeText(detailData.inspectionType) }}</text>
  45. </view>
  46. <!-- <view class="info-item" v-if="detailData.workSummary != null && detailData.workSummary != ''">
  47. <text class="info-label">{{ detailData.orderType == 1 ? '维修总结' : '维保总结' }}</text>
  48. <text class="info-value">{{ detailData.workSummary ?? '' }}</text>
  49. </view> -->
  50. <view class="info-item" v-if="detailData.orderType == 1">
  51. <text class="info-label">故障代码</text>
  52. <text class="info-value">{{ detailData.faultCode ?? '' }}</text>
  53. </view>
  54. <view class="info-item" v-if="detailData.orderType == 1">
  55. <text class="info-label">故障条文</text>
  56. <text class="info-value">{{ detailData.faultBarcode ?? '' }}</text>
  57. </view>
  58. <view class="info-item" v-if="detailData.orderType == 1">
  59. <text class="info-label">故障描述</text>
  60. <text class="info-value">{{ detailData.faultDesc ?? '' }}</text>
  61. </view>
  62. <view class="info-item" v-if="detailData.orderType == 2">
  63. <text class="info-label">分项完成系数</text>
  64. <text class="info-value">{{ detailData.itemCompletionFactor ?? '' }}</text>
  65. </view>
  66. <view class="info-item" v-if="detailData.orderType == 2">
  67. <text class="info-label">分项完成系数和</text>
  68. <text class="info-value">{{ detailData.itemCompletionFactorSum ?? '' }}</text>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- 工作总结 -->
  73. <view class="info-section" v-if="detailData.workSummary != null && detailData.workSummary != ''">
  74. <view class="section-title">
  75. <text class="section-title-text">{{ detailData.orderType == 1 ? '维修总结' : '维保总结' }}</text>
  76. </view>
  77. <view class="info-card">
  78. <view class="summary-content">
  79. <text class="summary-text">{{ detailData.workSummary ?? '' }}</text>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- 额外工作总结 -->
  84. <view class="info-section" v-if="detailData.orderType == 1 && detailData.extraWork != null && detailData.extraWork != ''">
  85. <view class="section-title">
  86. <text class="section-title-text">额外工作总结</text>
  87. </view>
  88. <view class="info-card">
  89. <view class="summary-content">
  90. <text class="summary-text">{{ detailData.extraWork ?? '' }}</text>
  91. </view>
  92. </view>
  93. </view>
  94. <!-- 退回理由 -->
  95. <view class="info-section" v-if="detailData.orderType == 1 && detailData.scoringStatus == 'returned'">
  96. <view class="section-title">
  97. <text class="section-title-text">退回理由</text>
  98. </view>
  99. <view class="info-card">
  100. <view class="summary-content">
  101. <text class="summary-text">{{ detailData.scoreReturnReason ?? '' }}</text>
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 修改理由 -->
  106. <view class="info-section" v-if="detailData.modifyReason != null && detailData.modifyReason != ''">
  107. <view class="section-title">
  108. <text class="section-title-text">修改理由</text>
  109. </view>
  110. <view class="info-card">
  111. <view class="summary-content">
  112. <text class="summary-text">{{ detailData.modifyReason ?? '' }}</text>
  113. </view>
  114. </view>
  115. </view>
  116. <!-- 得分明细 -->
  117. <view class="info-section">
  118. <view class="section-title">
  119. <text class="section-title-text">得分明细</text>
  120. </view>
  121. <view class="info-card">
  122. <!-- 表格头部 -->
  123. <view class="table-header">
  124. <text class="table-cell score-col">检修员</text>
  125. <text class="table-cell score-col">自评得分</text>
  126. <text class="table-cell score-col">复评得分</text>
  127. <!-- <text class="table-cell score-col">终评得分</text> -->
  128. <text class="table-cell score-col" v-if="detailData.orderType == 1 && detailData.extraWork != null && detailData.extraWork != ''">额外工分</text>
  129. <text class="table-cell score-col" v-if="detailData.orderType == 1 && detailData.extraWork != null && detailData.extraWork != ''">工单得分</text>
  130. <text class="table-cell score-col" v-if="detailData.orderType == 2 && hasOtherOrQitaInspectionType()">额外工分</text>
  131. <text class="table-cell score-col" v-if="detailData.orderType == 2 && hasOtherOrQitaInspectionType()">工单得分</text>
  132. <!-- 如果是重启时间不为空且不为undefined,则显示奖励得分列 -->
  133. <text class="table-cell score-col" v-if="detailData.restartTime !== null">奖励得分</text>
  134. <!-- <text class="table-cell score-col">确认状态</text> -->
  135. </view>
  136. <!-- 表格行数据 -->
  137. <view class="table-row" v-for="(person, index) in detailData.scorePersonList" :key="index">
  138. <text class="table-cell score-col">
  139. {{ person.nickName }}
  140. <text class="table-cell score-col" v-if="person.isLeader == 1">(负责人)</text>
  141. </text>
  142. <text class="table-cell score-col">{{ person.selfScore !== null ? formatNumber(person.selfScore) : '-' }}</text>
  143. <text class="table-cell score-col">{{ person.reviewScore !== null ? formatNumber(person.reviewScore) : '-' }}</text>
  144. <!-- <text class="table-cell score-col">{{ person.finalScore !== null ? formatNumber(person.finalScore) : '-' }}</text> -->
  145. <text class="table-cell score-col" v-if="detailData.orderType == 1 && detailData.extraWork != null && detailData.extraWork != ''">{{ person.extraScore !== null ? formatNumber(person.extraScore) : '-' }}</text>
  146. <text class="table-cell score-col" v-if="detailData.orderType == 1 && detailData.extraWork != null && detailData.extraWork != ''">{{ person.totalScore !== null ? formatNumber(person.totalScore) : '-' }}</text>
  147. <text class="table-cell score-col" v-if="detailData.orderType == 2 && hasOtherOrQitaInspectionType()">{{ person.extraScore !== null ? formatNumber(person.extraScore) : '-' }}</text>
  148. <text class="table-cell score-col" v-if="detailData.orderType == 2 && hasOtherOrQitaInspectionType()">{{ person.totalScore !== null ? formatNumber(person.totalScore) : '-' }}</text>
  149. <!-- 显示奖励得分 -->
  150. <text class="table-cell score-col" v-if="detailData.restartTime !== null">{{ person.runScore !== null ? formatNumber(person.runScore) : '-' }}</text>
  151. <!-- <text class="table-cell score-col">{{ person.confirmStatus !== null ? getConfirmStatusText(person.confirmStatus) : '-' }}</text> -->
  152. </view>
  153. </view>
  154. </view>
  155. </scroll-view>
  156. <!-- 加载中状态 -->
  157. <view v-if="loading" class="loading-mask">
  158. <text class="loading-text">加载中...</text>
  159. </view>
  160. </view>
  161. </template>
  162. <script setup lang="uts">
  163. import { ref, reactive } from 'vue'
  164. import { getOrderScoreDetail } from '../../../api/score/index'
  165. import { getDictDataByType } from '@/api/dict/index'
  166. import type { SysDictData } from '@/types/dict'
  167. // 人员得分对象
  168. type ScorePersonItem = {
  169. nickName: string | null
  170. selfScore: number | null
  171. reviewScore: number | null
  172. finalScore: number | null
  173. confirmStatus: number | null
  174. isLeader: number | null
  175. extraScore: number | null
  176. totalScore: number | null
  177. runScore: number | null // 添加奖励得分字段
  178. }
  179. // 详情数据
  180. type DetailDataType = {
  181. orderType: Number
  182. id: Number
  183. workOrderProjectNo: string | null
  184. pcsDeviceName: string | null
  185. pcsStationName: string | null
  186. teamLeaderName: string | null
  187. realEndTime: string | null
  188. scoringStatus: string | null
  189. workSummary: string | null
  190. maintenanceType: string | null
  191. inspectionType: string | null
  192. itemCompletionFactor: number | null
  193. itemCompletionFactorSum: number | null
  194. extraWork: string | null
  195. scoreReturnReason: string | null
  196. restartTime: string | null // 添加重启时间字段,用于控制奖励得分列显示
  197. scorePersonList: ScorePersonItem[]
  198. faultCode: string | null
  199. faultBarcode: string | null
  200. faultDesc: string | null
  201. modifyReason: string | null // 修改理由
  202. }
  203. const detailData = reactive<DetailDataType>({
  204. orderType: 0 as Number,
  205. id: 0 as Number,
  206. workOrderProjectNo: null,
  207. pcsDeviceName: null,
  208. pcsStationName: null,
  209. teamLeaderName: null,
  210. realEndTime: null,
  211. scoringStatus: null,
  212. workSummary: null,
  213. maintenanceType: null,
  214. inspectionType: null,
  215. itemCompletionFactor: null,
  216. itemCompletionFactorSum: null,
  217. extraWork: null,
  218. scoreReturnReason: null,
  219. restartTime: null, // 添加重启时间字段
  220. scorePersonList: [],
  221. faultCode: null,
  222. faultBarcode: null,
  223. faultDesc: null,
  224. modifyReason: null // 修改理由
  225. })
  226. const loading = ref<boolean>(false)
  227. // 字典数据
  228. const scoringStatusDictList = ref<SysDictData[]>([])
  229. const maintenanceTypeDictList = ref<SysDictData[]>([])
  230. const inspectionTypeDictList = ref<SysDictData[]>([])
  231. // 获取工单评分状态字典
  232. const loadScoringStatusDictList = async (): Promise<void> => {
  233. try {
  234. const result = await getDictDataByType('gxt_scoring_status')
  235. const resultObj = result as UTSJSONObject
  236. if (resultObj['code'] == 200) {
  237. const data = resultObj['data'] as any[]
  238. const dictData: SysDictData[] = []
  239. if (data != null && data.length > 0) {
  240. for (let i = 0; i < data.length; i++) {
  241. const item = data[i] as UTSJSONObject
  242. const dictItem: SysDictData = {
  243. dictValue: item['dictValue'] as string | null,
  244. dictLabel: item['dictLabel'] as string | null,
  245. dictCode: null,
  246. dictSort: null,
  247. dictType: null,
  248. cssClass: null,
  249. listClass: null,
  250. isDefault: null,
  251. status: null,
  252. default: null,
  253. createTime: null,
  254. remark: null
  255. }
  256. dictData.push(dictItem)
  257. }
  258. }
  259. scoringStatusDictList.value = dictData
  260. }
  261. } catch (e: any) {
  262. console.error('获取工单评分状态字典失败:', e.message)
  263. }
  264. }
  265. // 获取检修类型字典
  266. const loadMaintenanceTypeDictList = async (): Promise<void> => {
  267. try {
  268. const result = await getDictDataByType('gxt_maintenance_type')
  269. const resultObj = result as UTSJSONObject
  270. if (resultObj['code'] == 200) {
  271. const data = resultObj['data'] as any[]
  272. const dictData: SysDictData[] = []
  273. if (data != null && data.length > 0) {
  274. for (let i = 0; i < data.length; i++) {
  275. const item = data[i] as UTSJSONObject
  276. const dictItem: SysDictData = {
  277. dictValue: item['dictValue'] as string | null,
  278. dictLabel: item['dictLabel'] as string | null,
  279. dictCode: null,
  280. dictSort: null,
  281. dictType: null,
  282. cssClass: null,
  283. listClass: null,
  284. isDefault: null,
  285. status: null,
  286. default: null,
  287. createTime: null,
  288. remark: null
  289. }
  290. dictData.push(dictItem)
  291. }
  292. }
  293. maintenanceTypeDictList.value = dictData
  294. }
  295. } catch (e: any) {
  296. console.error('获取检修类型字典失败:', e.message)
  297. }
  298. }
  299. // 获取维保类型字典
  300. const loadInspectionTypeDictList = async (): Promise<void> => {
  301. try {
  302. const result = await getDictDataByType('gxt_inspection_type')
  303. const resultObj = result as UTSJSONObject
  304. if (resultObj['code'] == 200) {
  305. const data = resultObj['data'] as any[]
  306. const dictData: SysDictData[] = []
  307. if (data != null && data.length > 0) {
  308. for (let i = 0; i < data.length; i++) {
  309. const item = data[i] as UTSJSONObject
  310. const dictItem: SysDictData = {
  311. dictValue: item['dictValue'] as string | null,
  312. dictLabel: item['dictLabel'] as string | null,
  313. dictCode: null,
  314. dictSort: null,
  315. dictType: null,
  316. cssClass: null,
  317. listClass: null,
  318. isDefault: null,
  319. status: null,
  320. default: null,
  321. createTime: null,
  322. remark: null
  323. }
  324. dictData.push(dictItem)
  325. }
  326. }
  327. inspectionTypeDictList.value = dictData
  328. }
  329. } catch (e: any) {
  330. console.error('获取维保类型字典失败:', e.message)
  331. }
  332. }
  333. // 获取工单评分状态文本
  334. const getScoringStatusText = (status: string | null): string => {
  335. if (status == null || status == '') return ''
  336. const dictItem = scoringStatusDictList.value.find(dict => dict.dictValue == status)
  337. return dictItem != null ? (dictItem.dictLabel ?? status) : status
  338. }
  339. // 获取检修类型文本
  340. const getMaintenanceTypeText = (type: string | null): string => {
  341. if (type == null || type == '') return ''
  342. const dictItem = maintenanceTypeDictList.value.find(dict => dict.dictValue == type)
  343. return dictItem != null ? (dictItem.dictLabel ?? type) : type
  344. }
  345. // 获取维保类型文本(处理逗号分隔的多个类型)
  346. const getInspectionTypeText = (type: string | null): string => {
  347. if (type == null || type == '') return ''
  348. // 如果是逗号分隔的多个类型,将其分割并转换为标签
  349. if (type.includes(',')) {
  350. const typeIds = type.split(',')
  351. const labels: string[] = []
  352. for (const typeId of typeIds) {
  353. const dictItem = inspectionTypeDictList.value.find(dict => dict.dictValue == typeId.trim())
  354. labels.push(dictItem != null ? (dictItem.dictLabel ?? typeId) : typeId)
  355. }
  356. return labels.join(', ')
  357. } else {
  358. // 单个类型的情况
  359. const dictItem = inspectionTypeDictList.value.find(dict => dict.dictValue == type)
  360. return dictItem != null ? (dictItem.dictLabel ?? type) : type
  361. }
  362. }
  363. // 获取确认状态文本
  364. const getConfirmStatusText = (status: number | null): string => {
  365. if (status == null) return '未知'
  366. switch (status) {
  367. case 0: return '未确认'
  368. case 1: return '已确认'
  369. case 2: return '已反馈'
  370. default: return '未知状态'
  371. }
  372. }
  373. // Format number to fixed 2 decimal places
  374. const formatNumber = (value: number | string | null): string => {
  375. if (value == null) return '0.00'
  376. // Convert value to string properly to avoid ClassCastException
  377. const stringValue = value.toString()
  378. const num = parseFloat(stringValue)
  379. if (isNaN(num)) return '0.00'
  380. return num.toFixed(2)
  381. }
  382. // 检查维保类型是否包含'其他'或'其它'选项
  383. const hasOtherOrQitaInspectionType = (): boolean => {
  384. // 如果是维保工单且inspectionType不为空
  385. if (detailData.orderType == 2 && detailData.inspectionType != null) {
  386. let inspectionTypes: string[] = [];
  387. // 检查inspectionType是字符串还是数组
  388. if (typeof detailData.inspectionType === 'string') {
  389. if (detailData.inspectionType !== '') {
  390. inspectionTypes = detailData.inspectionType.split(',');
  391. }
  392. } else if (Array.isArray(detailData.inspectionType)) {
  393. // 如果是数组,直接使用
  394. inspectionTypes = detailData.inspectionType as string[];
  395. }
  396. // 遍历维保类型字典,检查是否包含'其他'或'其它'
  397. for (const typeId of inspectionTypes) {
  398. const dictItem = inspectionTypeDictList.value.find(item => item.dictValue == typeId);
  399. if (dictItem != null && dictItem.dictLabel != null) {
  400. const labelName = dictItem.dictLabel.trim();
  401. if (labelName == '其他' || labelName == '其它') {
  402. return true;
  403. }
  404. }
  405. }
  406. }
  407. return false;
  408. }
  409. // 加载详情数据
  410. const loadDetail = async (id: string, orderType: string): Promise<void> => {
  411. try {
  412. loading.value = true
  413. const result = await getOrderScoreDetail(orderType, id)
  414. // 提取响应数据
  415. const resultObj = result as UTSJSONObject
  416. const code = resultObj.get('code') as number
  417. const data = resultObj.get('data') as UTSJSONObject | null
  418. if (code == 200 && data != null) {
  419. // 填充基本数据
  420. const orderTypeValue = data.get('orderType')
  421. detailData.orderType = (orderTypeValue != null ? (orderTypeValue as number) : 0) as Number
  422. const idValue = data.get('id')
  423. detailData.id = (idValue != null ? (idValue as number) : 0) as Number
  424. detailData.workOrderProjectNo = data.get('workOrderProjectNo') as string | null
  425. detailData.pcsDeviceName = data.get('pcsDeviceName') as string | null
  426. detailData.pcsStationName = data.get('pcsStationName') as string | null
  427. detailData.teamLeaderName = data.get('teamLeaderName') as string | null
  428. detailData.realEndTime = data.get('realEndTime') as string | null
  429. detailData.scoringStatus = data.get('scoringStatus') as string | null
  430. // 根据工单类型设置总结内容
  431. detailData.workSummary = (detailData.orderType == 1 ?
  432. data.get('content') :
  433. data.get('realContent')) as string | null
  434. // 类型信息
  435. detailData.maintenanceType = data.get('maintenanceType') as string | null
  436. detailData.inspectionType = data.get('inspectionType') as string | null
  437. const itemCompletionFactorValue = data.get('itemCompletionFactor')
  438. detailData.itemCompletionFactor = itemCompletionFactorValue != null ?
  439. (itemCompletionFactorValue as number) : null
  440. const itemCompletionFactorSumValue = data.get('itemCompletionFactorSum')
  441. detailData.itemCompletionFactorSum = itemCompletionFactorSumValue != null ?
  442. (itemCompletionFactorSumValue as number) : null
  443. // 根据工单类型设置总结内容
  444. detailData.extraWork = (detailData.orderType == 1 ?
  445. data.get('extraWork') :
  446. null) as string | null
  447. detailData.scoreReturnReason = (detailData.orderType == 1 ?
  448. data.get('scoreReturnReason') :
  449. null) as string | null
  450. // 添加重启时间字段
  451. detailData.restartTime = data.get('restartTime') as string | null
  452. // 人员得分列表
  453. const scorePersonList = (detailData.orderType == 1 ?
  454. data.get('repairOrderPersonList') :
  455. data.get('workOrderPersonList')) as UTSJSONObject[] | null
  456. detailData.faultCode = data.get('faultCode') as string | null
  457. detailData.faultBarcode = data.get('faultBarcode') as string | null
  458. detailData.faultDesc = data.get('faultDesc') as string | null
  459. detailData.modifyReason = data.get('modifyReason') as string | null
  460. if (scorePersonList != null) {
  461. const processedList: ScorePersonItem[] = []
  462. for (let i = 0; i < scorePersonList.length; i++) {
  463. const person = scorePersonList[i]
  464. const item: ScorePersonItem = {
  465. nickName: person.get('nickName') as string | null,
  466. selfScore: (person.get('selfScore') != null ? person.get('selfScore') as number : null),
  467. reviewScore: (person.get('reviewScore') != null ? person.get('reviewScore') as number : null),
  468. finalScore: (person.get('finalScore') != null ? person.get('finalScore') as number : null),
  469. extraScore: (person.get('extraScore') != null ? person.get('extraScore') as number : null),
  470. totalScore: (person.get('totalScore') != null ? person.get('totalScore') as number : null),
  471. // 添加奖励得分字段
  472. runScore: (person.get('runScore') != null ? person.get('runScore') as number : null),
  473. confirmStatus: (person.get('confirmStatus') != null ? person.get('confirmStatus') as number : null),
  474. isLeader: (person.get('isLeader') != null ? person.get('isLeader') as number : null)
  475. }
  476. processedList.push(item)
  477. }
  478. detailData.scorePersonList = processedList
  479. } else {
  480. detailData.scorePersonList = []
  481. }
  482. } else {
  483. const msg = (resultObj.get('msg') as string | null) ?? '加载失败'
  484. uni.showToast({
  485. title: msg,
  486. icon: 'none'
  487. })
  488. }
  489. } catch (e: any) {
  490. uni.showToast({
  491. title: e.message ?? '加载失败',
  492. icon: 'none'
  493. })
  494. } finally {
  495. loading.value = false
  496. }
  497. }
  498. // 页面加载
  499. onLoad((options: any) => {
  500. const params = options as UTSJSONObject
  501. const id = params.get('id') as string | null
  502. const orderType = params.get('orderType') as string | null
  503. if (id != null && orderType != null) {
  504. loadScoringStatusDictList()
  505. loadMaintenanceTypeDictList()
  506. loadInspectionTypeDictList()
  507. loadDetail(id, orderType)
  508. }
  509. })
  510. </script>
  511. <style lang="scss">
  512. .detail-page {
  513. flex: 1;
  514. background-color: #e8f0f9;
  515. }
  516. .detail-content {
  517. flex: 1;
  518. padding: 20rpx 0;
  519. }
  520. .info-section {
  521. margin: 0 30rpx 24rpx;
  522. .section-title {
  523. position: relative;
  524. padding-left: 20rpx;
  525. margin-bottom: 20rpx;
  526. &::before {
  527. position: absolute;
  528. left: 0;
  529. top: 50%;
  530. transform: translateY(-50%);
  531. width: 8rpx;
  532. height: 32rpx;
  533. background-color: #007aff;
  534. border-radius: 4rpx;
  535. }
  536. &-text {
  537. font-size: 32rpx;
  538. font-weight: bold;
  539. color: #333333;
  540. }
  541. }
  542. .info-card {
  543. background-color: #ffffff;
  544. border-radius: 16rpx;
  545. padding: 30rpx;
  546. .info-item {
  547. flex-direction: row;
  548. padding: 20rpx 0;
  549. border-bottom: 1rpx solid #f0f0f0;
  550. &:last-child {
  551. border-bottom: none;
  552. }
  553. .info-label {
  554. width: 240rpx;
  555. font-size: 28rpx;
  556. color: #666666;
  557. white-space: nowrap;
  558. }
  559. .info-value {
  560. flex: 1;
  561. font-size: 28rpx;
  562. color: #333333;
  563. text-align: right;
  564. }
  565. }
  566. .summary-content {
  567. .summary-text {
  568. font-size: 28rpx;
  569. color: #333333;
  570. line-height: 44rpx;
  571. }
  572. }
  573. /* 表格样式 */
  574. .table-header, .table-row {
  575. flex-direction: row;
  576. padding: 20rpx 0;
  577. border-bottom: 1rpx solid #f0f0f0;
  578. &:last-child {
  579. border-bottom: none;
  580. }
  581. }
  582. .table-header {
  583. background-color: #f8f8f8;
  584. font-weight: bold;
  585. }
  586. .table-cell {
  587. font-size: 26rpx;
  588. color: #333;
  589. text-align: center;
  590. &.name-col {
  591. flex: 2;
  592. text-align: left;
  593. }
  594. &.score-col {
  595. flex: 1;
  596. }
  597. &.status-col {
  598. flex: 1;
  599. }
  600. }
  601. }
  602. }
  603. .loading-mask {
  604. position: absolute;
  605. top: 0;
  606. left: 0;
  607. right: 0;
  608. bottom: 0;
  609. justify-content: center;
  610. align-items: center;
  611. background-color: rgba(0, 0, 0, 0.3);
  612. .loading-text {
  613. padding: 30rpx 60rpx;
  614. background-color: rgba(0, 0, 0, 0.7);
  615. color: #ffffff;
  616. font-size: 28rpx;
  617. border-radius: 12rpx;
  618. }
  619. }
  620. </style>