area-patrol.uvue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. <template>
  2. <uni-navbar-lite :showLeft="true" title="区域巡查"></uni-navbar-lite>
  3. <scroll-view class="container" scroll-y="true">
  4. <view class="info-card">
  5. <view class="info-item">
  6. <text class="info-label">地点名称</text>
  7. <text class="info-value">{{ deviceInfo.locationName ?? '' }}</text>
  8. </view>
  9. <!-- <view class="info-item">
  10. <text class="info-label">设备编号</text>
  11. <text class="info-value">{{ deviceInfo.machineryCode ?? '' }}</text>
  12. </view> -->
  13. </view>
  14. <!-- 检查项目概览 -->
  15. <view class="section">
  16. <view class="section-header">
  17. <text class="section-title">检查项目</text>
  18. </view>
  19. <view class="subjects-container">
  20. <view class="subjects-tags">
  21. <text
  22. v-for="(subject, index) in subjectsList"
  23. :key="index"
  24. class="subject-tag"
  25. >
  26. {{ subject }}
  27. </text>
  28. </view>
  29. </view>
  30. </view>
  31. <!-- 媒体上传区域 -->
  32. <view class="section">
  33. <view class="section-header">
  34. <text class="section-title">检查记录</text>
  35. </view>
  36. <view class="check-item-media">
  37. <!-- 图片上传区域 -->
  38. <view class="media-section">
  39. <text class="media-title">上传图片</text>
  40. <view class="upload-wrapper" v-if="currentOpType != 'view'">
  41. <UploadImage
  42. :limit="6"
  43. :modelValue="photos"
  44. businessType="deviceCheck"
  45. @update:modelValue="(value: UTSArray<UploadResponse>) => updatePhotos(value)"
  46. />
  47. </view>
  48. <view class="image-container" v-else>
  49. <image
  50. v-for="(attachment, index) in attachmentList"
  51. :key="index"
  52. :src="attachment"
  53. :alt="'附件图片' + (index + 1)"
  54. class="attachment-image"
  55. @click="previewImage(attachment)"
  56. />
  57. </view>
  58. </view>
  59. <!-- 视频上传区域 -->
  60. <view class="media-section">
  61. <text class="media-title">上传视频</text>
  62. <view class="upload-wrapper" v-if="currentOpType != 'view'">
  63. <UploadVideo
  64. :limit="3"
  65. :modelValue="videos"
  66. businessType="deviceCheck"
  67. @update:modelValue="(value: UTSArray<VideoItem>) => updateVideos(value)"
  68. />
  69. </view>
  70. <view class="image-container" v-else>
  71. <video
  72. v-for="(attachment, index) in videoList"
  73. :key="index"
  74. :src="attachment"
  75. :alt="'附件视频' + (index + 1)"
  76. class="attachment-image"
  77. :controls="true"
  78. />
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- 状态选择 -->
  84. <view class="section">
  85. <view class="section-header">
  86. <text class="section-title">检查状态</text>
  87. </view>
  88. <view class="status-selector" @click="showStatusPicker" v-if="currentOpType!='view'">
  89. <view class="picker-display" >
  90. <text v-if="deviceInfo.status != null" class="selected-value">{{ getStatusText(deviceInfo.status) }}</text>
  91. <text v-else class="placeholder">请选择检查状态</text>
  92. <text class="arrow">▼</text>
  93. </view>
  94. </view>
  95. <view v-else>
  96. <text v-if="deviceInfo.status != null" class="selected-value">{{ getStatusText(deviceInfo.status) }}</text>
  97. </view>
  98. </view>
  99. <!-- 备注 -->
  100. <view class="section">
  101. <view class="section-header">
  102. <text class="section-title">备注</text>
  103. </view>
  104. <view class="remark-container" v-if="currentOpType != 'view'">
  105. <textarea class="remark-textarea" v-model="deviceInfo.remark" placeholder="请输入备注信息" maxlength="500"></textarea>
  106. </view>
  107. <view v-else>
  108. <text class="section-title">{{deviceInfo.remark}}</text>
  109. </view>
  110. </view>
  111. </scroll-view>
  112. <!-- 底部操作栏 -->
  113. <view class="bottom-actions" v-if="currentOpType != 'view'">
  114. <button class="action-btn submit-btn" @click="submitPatrol">完成巡查</button>
  115. </view>
  116. </template>
  117. <script setup lang="uts">
  118. import { ref, computed} from 'vue'
  119. import UploadImage from '../../components/upload-image/upload-image.uvue'
  120. import UploadVideo from '../../components/upload-video/upload-video.uvue'
  121. import type { UploadResponse } from '../../types/workbench'
  122. import type { VideoItem } from '../../types/workbench'
  123. import type { SysDictData } from '../../types/dict'
  124. import { getDetailInfo, batchEditTaskDetail } from '../../api/task/detail.uts'
  125. import { getDictDataByType } from '../../api/dict/index'
  126. import { getBaseUrl } from '../../utils/request'
  127. // 使用独立的类型定义,避免与device-check重复
  128. type AreaPatrolTaskInfo = {
  129. detailId: Number | null
  130. taskId: Number | null
  131. machineryRecordId: Number | null
  132. machineryId: Number | null
  133. machineryTypeName: string | null
  134. machineryCode: string | null
  135. machineryName: string | null
  136. subjectId: Number | null
  137. subjectCode: string | null
  138. subjectName: string | null
  139. locationRecordId: Number | null
  140. locationId: Number | null
  141. locationName: string | null
  142. locationCode: string | null
  143. sourceType: string | null
  144. orderNum: Number | null
  145. status: string | null
  146. taskStatus: string | null
  147. imagesUrl: string | null
  148. videosUrl: string | null
  149. resultValue: string | null
  150. resultDesc: string | null
  151. remark: string | null
  152. attr1: string | null
  153. attr2: string | null
  154. attr3: Number | null
  155. attr4: Number | null
  156. }
  157. // 设备信息
  158. const deviceInfo = ref<AreaPatrolTaskInfo>({
  159. detailId: null,
  160. taskId: null,
  161. machineryRecordId: null,
  162. machineryId: null,
  163. machineryTypeName: null,
  164. machineryCode: null,
  165. machineryName: null,
  166. subjectId: null,
  167. subjectCode: null,
  168. subjectName: null,
  169. locationRecordId: null,
  170. locationId: null,
  171. locationName: null,
  172. locationCode: null,
  173. sourceType: null,
  174. orderNum: null,
  175. status: null,
  176. taskStatus: null,
  177. imagesUrl: null,
  178. videosUrl: null,
  179. resultValue: null,
  180. resultDesc: null,
  181. remark: null,
  182. attr1: null,
  183. attr2: null,
  184. attr3: null,
  185. attr4: null
  186. })
  187. // 当前任务明细ID
  188. const currentDetailId = ref<string>('')
  189. const currentOpType = ref<string>('')
  190. // 媒体文件
  191. const photos = ref<UploadResponse[]>([])
  192. const videos = ref<VideoItem[]>([])
  193. // 字典数据
  194. const subjectStatusDictList = ref<SysDictData[]>([])
  195. const dictLoaded = ref<boolean>(false)
  196. // 状态选项
  197. type StatusOption = {
  198. label: string
  199. value: string
  200. }
  201. const statusOptions = ref<StatusOption[]>([])
  202. // 获取检查项状态字典列表
  203. const loadSubjectStatusDictList = async (): Promise<void> => {
  204. try {
  205. const result = await getDictDataByType('mes_subject_status')
  206. const resultObj = result as UTSJSONObject
  207. if (resultObj['code'] == 200) {
  208. const data = resultObj['data'] as any[]
  209. const dictData: SysDictData[] = []
  210. if (data.length > 0) {
  211. for (let i = 0; i < data.length; i++) {
  212. const item = data[i] as UTSJSONObject
  213. const dictItem: SysDictData = {
  214. dictValue: item['dictValue'] as string | null,
  215. dictLabel: item['dictLabel'] as string | null,
  216. dictCode: null,
  217. dictSort: null,
  218. dictType: null,
  219. cssClass: null,
  220. listClass: null,
  221. isDefault: null,
  222. status: null,
  223. default: null,
  224. createTime: null,
  225. remark: null
  226. }
  227. dictData.push(dictItem)
  228. }
  229. }
  230. subjectStatusDictList.value = dictData
  231. dictLoaded.value = true
  232. // 更新状态选项
  233. const newOptions: StatusOption[] = []
  234. for (let i = 0; i < dictData.length; i++) {
  235. const dict = dictData[i]
  236. if (dict.dictValue != null && dict.dictLabel != null) {
  237. newOptions.push({
  238. label: dict.dictLabel,
  239. value: dict.dictValue
  240. })
  241. }
  242. }
  243. statusOptions.value = newOptions
  244. }
  245. } catch (e: any) {
  246. console.error('获取检查项状态字典失败:', e.message)
  247. dictLoaded.value = true
  248. }
  249. }
  250. // 获取状态文本
  251. const getStatusText = (status: string | null): string => {
  252. if (status == null || status.length == 0) return ''
  253. if (dictLoaded.value != true) {
  254. return status
  255. }
  256. const dictItem = subjectStatusDictList.value.find((dict: SysDictData) => dict.dictValue == status)
  257. return dictItem != null && dictItem.dictLabel != null ? dictItem.dictLabel : status
  258. }
  259. // 显示状态选择器
  260. const showStatusPicker = (): void => {
  261. // 显示选择器
  262. uni.showActionSheet({
  263. itemList: statusOptions.value.map(option => option.label),
  264. success: (res) => {
  265. if (res.tapIndex >= 0 && res.tapIndex < statusOptions.value.length) {
  266. const selectedOption = statusOptions.value[res.tapIndex]
  267. deviceInfo.value.status = selectedOption.value
  268. }
  269. }
  270. })
  271. }
  272. // 计算检查项目显示列表
  273. const subjectsList = computed((): string[] => {
  274. if (deviceInfo.value.subjectName == null || deviceInfo.value.subjectName.length == 0) return ['暂无检查项目']
  275. return deviceInfo.value.subjectName.split(',').map(item => item.trim()).filter(item => item.length > 0)
  276. })
  277. // 更新图片
  278. const updatePhotos = (value: UTSArray<UploadResponse>): void => {
  279. photos.value = value as UploadResponse[];
  280. // 同步更新imagesUrl字段
  281. if (value.length > 0) {
  282. const fileNames: string[] = [];
  283. for (let i = 0; i < value.length; i++) {
  284. fileNames.push(value[i].fileName);
  285. }
  286. deviceInfo.value.imagesUrl = fileNames.join(',');
  287. } else {
  288. deviceInfo.value.imagesUrl = null;
  289. }
  290. };
  291. // 更新视频
  292. const updateVideos = (value: UTSArray<VideoItem>): void => {
  293. videos.value = value as VideoItem[];
  294. // 同步更新videosUrl字段
  295. if (value.length > 0) {
  296. const fileNames: string[] = [];
  297. for (let i = 0; i < value.length; i++) {
  298. fileNames.push(value[i].fileName);
  299. }
  300. deviceInfo.value.videosUrl = fileNames.join(',');
  301. } else {
  302. deviceInfo.value.videosUrl = null;
  303. }
  304. };
  305. // 加载设备检查任务明细数据
  306. const loadDeviceDetail = async (): Promise<void> => {
  307. if (currentDetailId.value == null || currentDetailId.value.length == 0) {
  308. uni.showToast({
  309. title: '缺少任务明细ID参数',
  310. icon: 'none'
  311. })
  312. return
  313. }
  314. try {
  315. uni.showLoading({
  316. title: '加载中...'
  317. })
  318. const result = await getDetailInfo(currentDetailId.value)
  319. const resultObj = result as UTSJSONObject
  320. const code = resultObj['code'] as number
  321. if (code == 200) {
  322. const data = resultObj['data'] as UTSJSONObject
  323. // 转换设备信息
  324. const newDeviceInfo: AreaPatrolTaskInfo = {
  325. detailId: data['detailId'] != null ? (data['detailId'] as Number) : null,
  326. taskId: data['taskId'] != null ? (data['taskId'] as Number) : null,
  327. machineryRecordId: data['machineryRecordId'] != null ? (data['machineryRecordId'] as Number) : null,
  328. machineryId: data['machineryId'] != null ? (data['machineryId'] as Number) : null,
  329. machineryTypeName: data['machineryTypeName'] as string | null,
  330. machineryCode: data['machineryCode'] as string | null,
  331. machineryName: data['machineryName'] as string | null,
  332. subjectId: data['subjectId'] != null ? (data['subjectId'] as Number) : null,
  333. subjectCode: data['subjectCode'] as string | null,
  334. subjectName: data['subjectName'] as string | null,
  335. locationRecordId: data['locationRecordId'] != null ? (data['locationRecordId'] as Number) : null,
  336. locationId: data['locationId'] != null ? (data['locationId'] as Number) : null,
  337. locationName: data['locationName'] as string | null,
  338. locationCode: data['locationCode'] as string | null,
  339. sourceType: data['sourceType'] as string | null,
  340. orderNum: data['orderNum'] != null ? (data['orderNum'] as Number) : null,
  341. status: data['status'] as string | null,
  342. taskStatus: data['taskStatus'] as string | null,
  343. imagesUrl: data['imagesUrl'] as string | null,
  344. videosUrl: data['videosUrl'] as string | null,
  345. resultValue: data['resultValue'] as string | null,
  346. resultDesc: data['resultDesc'] as string | null,
  347. remark: data['remark'] as string | null,
  348. attr1: data['attr1'] as string | null,
  349. attr2: data['attr2'] as string | null,
  350. attr3: data['attr3'] != null ? (data['attr3'] as Number) : null,
  351. attr4: data['attr4'] != null ? (data['attr4'] as Number) : null
  352. }
  353. deviceInfo.value = newDeviceInfo
  354. uni.hideLoading()
  355. } else {
  356. const msg = resultObj['msg'] as string | null
  357. uni.hideLoading()
  358. uni.showToast({
  359. title: msg ?? '加载失败',
  360. icon: 'none'
  361. })
  362. }
  363. } catch (e: any) {
  364. uni.hideLoading()
  365. uni.showToast({
  366. title: e.message ?? '加载失败',
  367. icon: 'none'
  368. })
  369. console.error('加载设备检查任务明细失败:', e)
  370. }
  371. }
  372. // 提交巡查
  373. const submitPatrol = (): void => {
  374. // 校验是否至少上传了图片或视频
  375. const hasMedia = (photos.value.length > 0) || (videos.value.length > 0);
  376. if (!hasMedia) {
  377. uni.showToast({
  378. title: '请至少上传一张图片或一个视频',
  379. icon: 'none'
  380. });
  381. return;
  382. }
  383. // 提交巡查结果
  384. const deviceNameStr = (deviceInfo.value.machineryName != null && deviceInfo.value.machineryName.length > 0) ? deviceInfo.value.machineryName : '';
  385. uni.showModal({
  386. title: '确认提交',
  387. //content: `确定提交区域巡查结果?\n设备:${deviceNameStr}`,
  388. success: (res) => {
  389. if (res.confirm) {
  390. // 构造提交数据
  391. const submitData: UTSJSONObject = {
  392. 'detailId': deviceInfo.value.detailId,
  393. 'taskId': deviceInfo.value.taskId,
  394. 'machineryRecordId': deviceInfo.value.machineryRecordId,
  395. 'machineryId': deviceInfo.value.machineryId,
  396. 'machineryTypeName': deviceInfo.value.machineryTypeName,
  397. 'machineryCode': deviceInfo.value.machineryCode,
  398. 'machineryName': deviceInfo.value.machineryName,
  399. 'subjectId': deviceInfo.value.subjectId,
  400. 'subjectCode': deviceInfo.value.subjectCode,
  401. 'subjectName': deviceInfo.value.subjectName,
  402. 'locationRecordId': deviceInfo.value.locationRecordId,
  403. 'locationId': deviceInfo.value.locationId,
  404. 'locationName': deviceInfo.value.locationName,
  405. 'locationCode': deviceInfo.value.locationCode,
  406. 'sourceType': deviceInfo.value.sourceType,
  407. 'orderNum': deviceInfo.value.orderNum,
  408. //'status': deviceInfo.value.status,
  409. 'status': deviceInfo.value.status != null ? deviceInfo.value.status : 'NORMAL',
  410. 'taskStatus': deviceInfo.value.taskStatus,
  411. 'imagesUrl': deviceInfo.value.imagesUrl,
  412. 'videosUrl': deviceInfo.value.videosUrl,
  413. 'resultValue': deviceInfo.value.resultValue,
  414. 'resultDesc': deviceInfo.value.resultDesc,
  415. 'remark': deviceInfo.value.remark,
  416. 'attr1': deviceInfo.value.attr1,
  417. 'attr2': deviceInfo.value.attr2,
  418. 'attr3': deviceInfo.value.attr3,
  419. 'attr4': deviceInfo.value.attr4
  420. } as UTSJSONObject;
  421. // 调用批量编辑接口
  422. uni.showLoading({
  423. title: '提交中...'
  424. });
  425. batchEditTaskDetail(submitData)
  426. .then((result: any) => {
  427. const resultObj = result as UTSJSONObject;
  428. const code = resultObj['code'] as number;
  429. uni.hideLoading();
  430. if (code == 200) {
  431. uni.showToast({
  432. title: '巡查提交成功!',
  433. icon: 'success'
  434. });
  435. // 设置标记,通知上一个页面需要刷新数据
  436. uni.setStorageSync('needRefresh', true);
  437. // 返回上一页
  438. setTimeout(() => {
  439. uni.navigateBack();
  440. }, 1500);
  441. } else {
  442. uni.hideLoading();
  443. const msg = resultObj['msg'] as string | null;
  444. uni.showToast({
  445. title: msg ?? '提交失败',
  446. icon: 'none'
  447. });
  448. }
  449. })
  450. .catch((error) => {
  451. uni.hideLoading();
  452. uni.showToast({
  453. title: '提交失败',
  454. icon: 'none'
  455. });
  456. console.error('提交巡查结果失败:', error);
  457. });
  458. }
  459. }
  460. })
  461. }
  462. // 计算附件列表
  463. const attachmentList = computed<string[]>(() => {
  464. if (deviceInfo.value.imagesUrl != null && deviceInfo.value.imagesUrl != '') {
  465. // 按逗号分割附件URL字符串,并加上基础URL
  466. const arr = deviceInfo.value.imagesUrl.split(',')
  467. .map((url: string) => {
  468. const trimmedUrl = url.trim();
  469. // 如果是相对路径,加上基础URL
  470. if (trimmedUrl.startsWith('/')) {
  471. return getBaseUrl() + trimmedUrl;
  472. }
  473. return trimmedUrl;
  474. })
  475. .filter((url: string) => url.length > 0);
  476. return arr;
  477. }
  478. return []
  479. })
  480. // 计算附件列表
  481. const videoList = computed<string[]>(() => {
  482. if (deviceInfo.value.videosUrl != null && deviceInfo.value.videosUrl != '') {
  483. // 按逗号分割附件URL字符串,并加上基础URL
  484. const arr = deviceInfo.value.videosUrl.split(',')
  485. .map((url: string) => {
  486. const trimmedUrl = url.trim();
  487. // 如果是相对路径,加上基础URL
  488. if (trimmedUrl.startsWith('/')) {
  489. return getBaseUrl() + trimmedUrl;
  490. }
  491. return trimmedUrl;
  492. })
  493. .filter((url: string) => url.length > 0);
  494. return arr;
  495. }
  496. return []
  497. })
  498. // 预览图片
  499. const previewImage = (url: string) => {
  500. if (url == '') return
  501. // 检查是否为图片文件
  502. const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.webp']
  503. const isImage = imageExtensions.some(ext => url.toLowerCase().endsWith(ext))
  504. if (isImage) {
  505. // 如果是图片,使用uni.previewImage预览
  506. uni.previewImage({
  507. urls: [url],
  508. current: 0
  509. })
  510. } else {
  511. // 对于非图片文件,显示提示
  512. uni.showToast({
  513. title: '不支持预览此文件类型',
  514. icon: 'none',
  515. duration: 2000
  516. })
  517. }
  518. }
  519. onLoad((options: any) => {
  520. const params = options as UTSJSONObject
  521. const detailId = params['detailId'] as string | null
  522. const opType = params.get('opType') as string | null
  523. if(opType != null){
  524. currentOpType.value = opType;
  525. }
  526. // 获取传递的任务明细ID
  527. if (detailId != null && detailId.length > 0) {
  528. currentDetailId.value = detailId
  529. // 并行加载字典数据和设备检查任务明细数据
  530. Promise.all([
  531. loadSubjectStatusDictList(),
  532. loadDeviceDetail()
  533. ]).catch(error => {
  534. console.error('加载数据失败:', error)
  535. })
  536. } else {
  537. uni.showToast({
  538. title: '缺少任务明细ID参数',
  539. icon: 'none'
  540. })
  541. }
  542. })
  543. </script>
  544. <style lang="scss">
  545. .container {
  546. flex: 1;
  547. background-color: #e8f0f9;
  548. padding: 20rpx;
  549. padding-bottom: 120rpx;
  550. }
  551. .info-card {
  552. background-color: #fff;
  553. padding: 30rpx;
  554. border-radius: 16rpx;
  555. margin: 12rpx 10rpx;
  556. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  557. }
  558. .info-item {
  559. flex-direction: row;
  560. padding: 20rpx 0;
  561. border-bottom: 1rpx solid #f0f0f0;
  562. &:last-child {
  563. border-bottom: none;
  564. }
  565. .info-label {
  566. width: 240rpx;
  567. font-size: 28rpx;
  568. color: #666666;
  569. white-space: nowrap;
  570. }
  571. .info-value {
  572. flex: 1;
  573. font-size: 28rpx;
  574. color: #333333;
  575. text-align: right;
  576. }
  577. }
  578. .section {
  579. background-color: #ffffff;
  580. padding: 30rpx;
  581. border-radius: 16rpx;
  582. margin: 12rpx 10rpx;
  583. }
  584. .subjects-container {
  585. margin-top: 20rpx;
  586. padding: 20rpx;
  587. background-color: #f8f9fa;
  588. border-radius: 8rpx;
  589. border: 1rpx solid #e0e0e0;
  590. }
  591. .subjects-tags {
  592. display: flex;
  593. flex-direction: row;
  594. flex-wrap: wrap;
  595. gap: 15rpx;
  596. }
  597. .subject-tag {
  598. padding: 12rpx 20rpx;
  599. background-color: #ffffff;
  600. border: 1rpx solid #165dff;
  601. border-radius: 30rpx;
  602. font-size: 26rpx;
  603. color: #165dff;
  604. font-weight: 500;
  605. }
  606. .status-selector {
  607. margin-top: 20rpx;
  608. }
  609. .picker-display {
  610. flex-direction: row;
  611. justify-content: space-between;
  612. align-items: center;
  613. min-height: 40rpx;
  614. padding: 12rpx 16rpx;
  615. border: 1rpx solid #e0e0e0;
  616. border-radius: 8rpx;
  617. background-color: #f8f9fa;
  618. }
  619. .selected-value {
  620. font-size: 28rpx;
  621. color: #333333;
  622. }
  623. .placeholder {
  624. font-size: 28rpx;
  625. color: #999999;
  626. }
  627. .arrow {
  628. font-size: 24rpx;
  629. color: #999999;
  630. margin-left: 12rpx;
  631. }
  632. .check-item-media {
  633. display: flex;
  634. flex-direction: column;
  635. gap: 20rpx;
  636. margin: 15rpx 0;
  637. }
  638. .media-section {
  639. margin-bottom: 15rpx;
  640. .image-container {
  641. display: flex;
  642. flex-direction: row;
  643. flex-wrap: wrap;
  644. justify-content: flex-start; // 或 space-around
  645. // justify-content: space-around; /* 自动分配间距,避免挤压 */
  646. align-items: center;
  647. padding: 0 3rpx;
  648. .attachment-image {
  649. width: 280rpx; /* 一行显示两个图片,减去间距的一半 */
  650. height: 280rpx;
  651. // padding: 3rpx;
  652. margin: 3px;
  653. }
  654. }
  655. }
  656. .media-title {
  657. display: block;
  658. font-size: 26rpx;
  659. color: #666;
  660. margin-bottom: 10rpx;
  661. font-weight: 500;
  662. }
  663. .upload-wrapper {
  664. margin-top: 10rpx;
  665. }
  666. .remark-container {
  667. margin-top: 20rpx;
  668. }
  669. .remark-textarea {
  670. width: 100%;
  671. min-height: 120rpx;
  672. padding: 20rpx;
  673. border: 1rpx solid #e0e0e0;
  674. border-radius: 8rpx;
  675. background-color: #fff;
  676. font-size: 28rpx;
  677. color: #333;
  678. box-sizing: border-box;
  679. }
  680. .section-header {
  681. margin-bottom: 20rpx;
  682. padding-bottom: 15rpx;
  683. border-bottom: 1rpx solid #eee;
  684. }
  685. .section-title {
  686. font-size: 32rpx;
  687. font-weight: bold;
  688. color: #333;
  689. }
  690. .image {
  691. &-list {
  692. flex-direction: row;
  693. flex-wrap: wrap;
  694. }
  695. &-item {
  696. background-color: #f5f7fa;
  697. border-radius: 8rpx;
  698. position: relative;
  699. width: 160rpx !important;
  700. height: 160rpx !important;
  701. margin-right: 20rpx;
  702. margin-bottom: 20rpx;
  703. }
  704. width: 160rpx !important;
  705. height: 160rpx !important;
  706. border-radius: 8rpx;
  707. &-delete {
  708. position: absolute;
  709. top: 2rpx;
  710. right: 2rpx;
  711. width: 44rpx;
  712. height: 44rpx;
  713. justify-content: center;
  714. align-items: center;
  715. }
  716. }
  717. .delete-icon {
  718. width: 32rpx;
  719. height: 32rpx;
  720. }
  721. .upload {
  722. &-box {
  723. background-color: #f5f7fa;
  724. border-radius: 8rpx;
  725. width: 160rpx !important;
  726. height: 160rpx !important;
  727. margin-right: 20rpx;
  728. margin-bottom: 20rpx;
  729. border: 2rpx dashed #d0d0d0;
  730. border-radius: 8rpx;
  731. justify-content: center;
  732. align-items: center;
  733. }
  734. &-icon {
  735. font-size: 60rpx;
  736. color: #999999;
  737. line-height: 60rpx;
  738. margin-bottom: 10rpx;
  739. }
  740. &-text {
  741. font-size: 24rpx;
  742. color: #999999;
  743. }
  744. }
  745. .video {
  746. &-list {
  747. flex-direction: row;
  748. flex-wrap: wrap;
  749. }
  750. &-item {
  751. background-color: #f5f7fa;
  752. border-radius: 8rpx;
  753. position: relative;
  754. width: 160rpx !important;
  755. height: 160rpx !important;
  756. margin-right: 20rpx;
  757. margin-bottom: 20rpx;
  758. }
  759. width: 160rpx !important;
  760. height: 160rpx !important;
  761. border-radius: 8rpx;
  762. &-delete {
  763. position: absolute;
  764. top: 2rpx;
  765. right: 2rpx;
  766. width: 44rpx;
  767. height: 44rpx;
  768. justify-content: center;
  769. align-items: center;
  770. }
  771. }
  772. .bottom-actions {
  773. position: fixed;
  774. bottom: 0;
  775. left: 0;
  776. right: 0;
  777. display: flex;
  778. flex-direction: row;
  779. padding: 20rpx 30rpx;
  780. background-color: #fff;
  781. border-top: 1rpx solid #eee;
  782. box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.1);
  783. }
  784. .action-btn {
  785. flex: 1;
  786. padding: 12rpx;
  787. border: none;
  788. border-radius: 6rpx;
  789. font-size: 26rpx;
  790. font-weight: bold;
  791. margin: 0 10rpx;
  792. min-width: 120rpx;
  793. }
  794. .submit-btn {
  795. background-color: #165dff;
  796. color: #fff;
  797. }
  798. </style>