filecenter.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744
  1. <template name="filecenter">
  2. <view class="file-page">
  3. <u-navbar
  4. title="文件中心"
  5. :safeAreaInsetTop="true"
  6. :fixed="true"
  7. height="50px"
  8. bgColor="transparent"
  9. titleStyle="fw600 fs-18"
  10. leftIconColor="#303133"
  11. @leftClick="goBack"
  12. >
  13. <view class="u-nav-slot" slot="left">
  14. <u-icon name="arrow-left" size="20" color="#303133"></u-icon>
  15. </view>
  16. </u-navbar>
  17. <view v-if="!menushow" class="file-page-content">
  18. <view class="file-tab-bar">
  19. <view
  20. class="file-tab-item"
  21. v-for="(item, index) in sectionList"
  22. :key="index"
  23. :class="{ active: curNow === index }"
  24. @click="sectionChange(index)"
  25. >
  26. <text class="file-tab-text">{{ item.name }}</text>
  27. <view class="file-tab-line" v-if="curNow === index"></view>
  28. </view>
  29. </view>
  30. <view class="file-main">
  31. <view class="search-card">
  32. <view class="search-row">
  33. <text class="search-label">文件名称:</text>
  34. <u-input
  35. v-model="fileName"
  36. type="text"
  37. class="search-input"
  38. placeholder="请输入文件名称"
  39. border="none"
  40. confirmType="search"
  41. font-size="24rpx"
  42. placeholder-style="font-size: 24rpx;"
  43. @confirm="searchFile"
  44. ></u-input>
  45. <view
  46. class="action-btn action-btn-outline search-picker-btn"
  47. @click="pickershow = true"
  48. >
  49. <text class="action-btn-text">{{
  50. fileType ? fileType : "文件类型"
  51. }}</text>
  52. <view class="search-picker-arrow"></view>
  53. </view>
  54. <view
  55. class="action-btn action-btn-primary search-query-btn"
  56. @click="searchFile"
  57. >
  58. <text class="action-btn-text">查询</text>
  59. </view>
  60. </view>
  61. <u-picker
  62. :show="pickershow"
  63. :columns="fileTypeList"
  64. keyName="label"
  65. @cancel="pickershow = false"
  66. @confirm="selectFileType"
  67. ></u-picker>
  68. </view>
  69. <scroll-view
  70. class="file-list"
  71. :class="{ 'file-list--fallback': !listHeight }"
  72. :key="listKey"
  73. :scroll-y="scrollEnabled"
  74. :show-scrollbar="false"
  75. :lower-threshold="scrollLowerThreshold"
  76. :style="listHeight ? { height: listHeight + 'px' } : null"
  77. @scrolltolower="loadMore"
  78. >
  79. <view v-for="item in fileData" :key="item.id">
  80. <view class="file-card">
  81. <view class="file-card-header" @tap="openFile(item)">
  82. <text class="file-card-title">{{ item.fileName }}</text>
  83. </view>
  84. <view class="file-action-row">
  85. <view
  86. class="action-btn action-btn-primary"
  87. @click.stop="detailmodal(item)"
  88. >
  89. <text class="action-btn-text">审批详情</text>
  90. </view>
  91. <view
  92. class="action-btn action-btn-outline"
  93. @click.stop="commitmodal(item)"
  94. >
  95. <text class="action-btn-text">提交</text>
  96. </view>
  97. <view
  98. class="action-btn action-btn-outline"
  99. @click.stop="retractmodal(item)"
  100. >
  101. <text class="action-btn-text">撤回</text>
  102. </view>
  103. <view
  104. class="action-btn action-btn-outline"
  105. @click.stop="download(item)"
  106. >
  107. <text class="action-btn-text">下载</text>
  108. </view>
  109. <view
  110. class="action-btn action-btn-outline"
  111. @click.stop="showmodal(item)"
  112. >
  113. <text class="action-btn-text">删除</text>
  114. </view>
  115. </view>
  116. <view class="file-info-grid" @tap="openFile(item)">
  117. <view class="file-info-card">
  118. <view class="file-info-icon-box">
  119. <view class="file-info-icon-glass">
  120. <image
  121. class="file-info-icon"
  122. src="/static/filecenter/FileSource.svg"
  123. mode="aspectFit"
  124. ></image>
  125. </view>
  126. </view>
  127. <view class="file-info-content">
  128. <text class="file-info-value">{{ item.fileSource }}</text>
  129. <text class="file-info-label">文件来源</text>
  130. </view>
  131. </view>
  132. <view class="file-info-card">
  133. <view class="file-info-icon-box">
  134. <view class="file-info-icon-glass">
  135. <image
  136. class="file-info-icon"
  137. src="/static/filecenter/ApprovalStatus.svg"
  138. mode="aspectFit"
  139. ></image>
  140. </view>
  141. </view>
  142. <view class="file-info-content">
  143. <text class="file-info-value">{{
  144. item.bpmStatus_dictText
  145. }}</text>
  146. <text class="file-info-label">审批状态</text>
  147. </view>
  148. </view>
  149. <view class="file-info-card">
  150. <view class="file-info-icon-box">
  151. <view class="file-info-icon-glass">
  152. <image
  153. class="file-info-icon"
  154. src="/static/filecenter/Creator.svg"
  155. mode="aspectFit"
  156. ></image>
  157. </view>
  158. </view>
  159. <view class="file-info-content">
  160. <text class="file-info-value">{{ item.createBy }}</text>
  161. <text class="file-info-label">创建人</text>
  162. </view>
  163. </view>
  164. <view class="file-info-card">
  165. <view class="file-info-icon-box">
  166. <view class="file-info-icon-glass">
  167. <image
  168. class="file-info-icon"
  169. src="/static/filecenter/UpdateTime.svg"
  170. mode="aspectFit"
  171. ></image>
  172. </view>
  173. </view>
  174. <view class="file-info-content">
  175. <text class="file-info-value">{{ item.createTime }}</text>
  176. <text class="file-info-label">上传时间</text>
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. </view>
  182. <view v-if="loading && fileData.length === 0" class="file-empty">
  183. <u-loading-icon
  184. mode="circle"
  185. size="26"
  186. color="#0065f8"
  187. ></u-loading-icon>
  188. <text class="file-empty-text">正在加载...</text>
  189. </view>
  190. <view
  191. v-else-if="!loading && fileData.length === 0"
  192. class="file-empty"
  193. @click="retryLoad"
  194. >
  195. <image
  196. class="file-empty-img"
  197. src="/static/empty.png"
  198. mode="aspectFit"
  199. ></image>
  200. <text class="file-empty-text">{{
  201. loadFailed ? "加载失败,点击重试" : "暂无文件"
  202. }}</text>
  203. </view>
  204. <u-loadmore
  205. v-if="fileData.length > 0"
  206. :status="loadStatus"
  207. loading-text="正在加载..."
  208. loadmore-text="上拉加载更多"
  209. nomore-text="没有更多文件了"
  210. :margin-top="16"
  211. :margin-bottom="16"
  212. @loadmore="loadMore"
  213. ></u-loadmore>
  214. </scroll-view>
  215. <!-- 审批详情 -->
  216. <u-popup
  217. :show="detailShow"
  218. mode="center"
  219. :round="16"
  220. :closeable="false"
  221. @close="detailClose"
  222. >
  223. <view class="detail-modal">
  224. <view class="detail-modal-header">
  225. <text class="detail-modal-title">审批详情</text>
  226. <view class="detail-modal-close" @click="detailClose">
  227. <image
  228. class="detail-close-icon"
  229. src="/static/filecenter/关闭.svg"
  230. mode="aspectFit"
  231. />
  232. </view>
  233. </view>
  234. <view class="detail-modal-divider"></view>
  235. <scroll-view scroll-y class="detail-modal-body">
  236. <view class="detail-section">
  237. <view class="detail-section-title">
  238. <text class="detail-section-text">流程审批进度历史</text>
  239. </view>
  240. <view class="detail-table-container">
  241. <view class="detail-table">
  242. <view class="detail-table-header">
  243. <view class="detail-table-cell">序号</view>
  244. <view class="detail-table-cell">当前环节</view>
  245. <view class="detail-table-cell">审批人</view>
  246. <view class="detail-table-cell">审批结果</view>
  247. <view class="detail-table-cell">审批开始时间</view>
  248. <view class="detail-table-cell">审批结束时间</view>
  249. <view class="detail-table-cell">处理意见</view>
  250. <view class="detail-table-cell">状态</view>
  251. </view>
  252. <view
  253. class="detail-table-row"
  254. v-for="(item, index) in tableData"
  255. :key="index"
  256. >
  257. <view class="detail-table-cell">
  258. <text>{{ index + 1 }}</text>
  259. </view>
  260. <view class="detail-table-cell">{{ item.name }}</view>
  261. <view class="detail-table-cell">
  262. <text
  263. v-if="item.assignees && item.assignees.length > 0"
  264. >
  265. {{ item.assignees[0].username }}
  266. </text>
  267. <text v-else> - </text>
  268. </view>
  269. <view class="detail-table-cell">{{
  270. item.deleteReason
  271. }}</view>
  272. <view class="detail-table-cell">{{
  273. item.createTime
  274. }}</view>
  275. <view class="detail-table-cell">{{ item.endTime }}</view>
  276. <view class="detail-table-cell">{{ item.comment }}</view>
  277. <view class="detail-table-cell">
  278. <text v-if="item.assignees[0].isExecutor">
  279. 已处理
  280. </text>
  281. <text v-else> 待处理</text>
  282. </view>
  283. </view>
  284. </view>
  285. </view>
  286. </view>
  287. <view class="detail-section">
  288. <view class="detail-section-title">
  289. <text class="detail-section-text">实时流程图</text>
  290. </view>
  291. <view class="detail-flowchart-wrap">
  292. <image
  293. class="detail-flowchart-img"
  294. :src="imageUrl"
  295. mode="widthFix"
  296. />
  297. </view>
  298. </view>
  299. </scroll-view>
  300. </view>
  301. </u-popup>
  302. <!-- 删除 -->
  303. <u-popup
  304. :show="show"
  305. mode="center"
  306. :round="16"
  307. :closeable="false"
  308. @close="cancel"
  309. >
  310. <view class="delete-modal">
  311. <view class="delete-modal-header">
  312. <text class="delete-modal-title">删除</text>
  313. <view class="delete-modal-close" @click="cancel">
  314. <image
  315. class="delete-close-icon"
  316. src="/static/filecenter/close.svg"
  317. mode="aspectFit"
  318. />
  319. </view>
  320. </view>
  321. <view class="delete-modal-divider"></view>
  322. <view class="delete-modal-body">
  323. <view class="delete-confirm-box">
  324. <image
  325. class="delete-confirm-icon"
  326. src="/static/filecenter/delete.svg"
  327. mode="aspectFit"
  328. />
  329. <text class="delete-confirm-text">确定删除?</text>
  330. </view>
  331. </view>
  332. <view class="delete-modal-footer">
  333. <view class="action-btn action-btn-outline" @click="cancel">
  334. <text class="action-btn-text">取消</text>
  335. </view>
  336. <view class="action-btn action-btn-primary" @click="confirm">
  337. <text class="action-btn-text">确定</text>
  338. </view>
  339. </view>
  340. </view>
  341. </u-popup>
  342. <!-- 提交 -->
  343. <u-popup
  344. :show="commitShow"
  345. mode="center"
  346. :round="16"
  347. :closeable="false"
  348. @close="cancelCommit"
  349. >
  350. <view class="commit-modal">
  351. <view class="commit-modal-header">
  352. <text class="commit-modal-title">提交文件</text>
  353. <view class="commit-modal-close" @click="cancelCommit">
  354. <image
  355. class="commit-close-icon"
  356. src="/static/filecenter/关闭.svg"
  357. mode="aspectFit"
  358. />
  359. </view>
  360. </view>
  361. <view class="commit-modal-divider"></view>
  362. <view class="commit-modal-body">
  363. <view class="commit-form-box">
  364. <view class="commit-form-row">
  365. <view class="commit-form-label">
  366. <text class="commit-required">*</text>
  367. <text>选择审批</text>
  368. </view>
  369. <view class="commit-select" @click="openCommitPicker">
  370. <text class="commit-select-text">{{
  371. selectedCommitName
  372. }}</text>
  373. <text class="commit-select-arrow"></text>
  374. </view>
  375. </view>
  376. </view>
  377. </view>
  378. <view class="commit-modal-footer">
  379. <view class="action-btn action-btn-outline" @click="cancelCommit">
  380. <text class="action-btn-text">取消</text>
  381. </view>
  382. <view
  383. class="action-btn action-btn-primary"
  384. @click="confirmCommit"
  385. >
  386. <text class="action-btn-text">确定</text>
  387. </view>
  388. </view>
  389. </view>
  390. </u-popup>
  391. <u-picker
  392. :show="commitPickerShow"
  393. :columns="[commitPickerColumns]"
  394. keyName="label"
  395. :defaultIndex="[selectedCommitIndex]"
  396. @cancel="commitPickerShow = false"
  397. @confirm="onCommitPickerConfirm"
  398. ></u-picker>
  399. <!-- 撤回 -->
  400. <u-popup
  401. :show="showretract"
  402. mode="center"
  403. :round="16"
  404. :closeable="false"
  405. @close="close"
  406. >
  407. <view class="retract-modal">
  408. <view class="retract-modal-header">
  409. <text class="retract-modal-title">撤销申请</text>
  410. <view class="retract-modal-close" @click="close">
  411. <image
  412. class="retract-close-icon"
  413. src="/static/filecenter/关闭.svg"
  414. mode="aspectFit"
  415. />
  416. </view>
  417. </view>
  418. <view class="retract-modal-divider"></view>
  419. <view class="retract-modal-body">
  420. <view class="retract-textarea-wrap">
  421. <u--textarea
  422. v-model="value1"
  423. placeholder="请输入撤回原因"
  424. border="none"
  425. ></u--textarea>
  426. </view>
  427. </view>
  428. <view class="retract-modal-footer">
  429. <view
  430. class="action-btn action-btn-outline"
  431. @click="cancelRetract"
  432. >
  433. <text class="action-btn-text">取消</text>
  434. </view>
  435. <view
  436. class="action-btn action-btn-primary"
  437. @click="confirmRetract"
  438. >
  439. <text class="action-btn-text">确定</text>
  440. </view>
  441. </view>
  442. </view>
  443. </u-popup>
  444. <u-notify
  445. message="只有审批中的数据才能撤回!"
  446. :show="notifyShow"
  447. :duration="1000"
  448. ></u-notify>
  449. </view>
  450. </view>
  451. </view>
  452. </template>
  453. <script>
  454. import api from "@/api/api";
  455. import configService from "../../common/service/config.service";
  456. // import FileTreeMenu from "./treeMenu/fileTreeMenu.vue";
  457. export default {
  458. // components: {
  459. // FileTreeMenu,
  460. // },
  461. name: "filecenter",
  462. props: ["cur"],
  463. watch: {
  464. // 页面用 v-show 常驻挂载,切到文件中心时才能量到真实位置
  465. cur(val) {
  466. if (val === "filecenter") {
  467. this.refreshListHeight();
  468. }
  469. },
  470. },
  471. data() {
  472. return {
  473. backPic0: "url(/static/topnavbar0.png)",
  474. backPic: "url(../../static/topnavbar.png)",
  475. sectionList: [
  476. { name: "全部", code: 0 },
  477. { name: "待审批", code: 1 },
  478. { name: "已审批", code: 2 },
  479. ],
  480. fileTypeList: [
  481. [
  482. { label: "全部类型", value: "" },
  483. { label: ".txt", value: "txt" },
  484. { label: ".doc", value: "doc" },
  485. { label: ".docx", value: "docx" },
  486. { label: ".xls", value: "xls" },
  487. { label: ".xlsx", value: "xlsx" },
  488. { label: ".ppt", value: "ppt" },
  489. { label: ".pptx", value: "pptx" },
  490. { label: ".jpg", value: "jpg" },
  491. { label: ".png", value: "png" },
  492. { label: ".pdf", value: "pdf" },
  493. ],
  494. ],
  495. fileType: "", //文件类型
  496. pickershow: false,
  497. curNow: 0,
  498. fileData: [],
  499. bpmStatus: 1, //1处理中 2 已完成 3 已驳回
  500. show: false, //删除modal
  501. selectItem: "", //选择文件
  502. showretract: false, //撤回popup
  503. value1: "", //撤回原因
  504. cancelItem: "", //撤回文件
  505. detailShow: false, //详情
  506. notifyShow: false, //撤回文件提示消息显示
  507. commitShow: false, //提交
  508. commitPickerShow: false,
  509. columns: [],
  510. selectedCommitIndex: 0,
  511. commitItem: "", //提交文件
  512. selectFile: [],
  513. tableData: [], //审批内容
  514. detailItem: "", //详情文件
  515. imageUrl: "",
  516. fileName: "", //文件名称搜索框
  517. menushow: false,
  518. pageNo: 1, //当前页码
  519. pageSize: 10, //每页条数
  520. total: 0, //文件总数
  521. loading: false, //是否正在加载
  522. hasMore: true, //是否还有下一页
  523. requestSeq: 0, //请求序号,用于丢弃过期响应
  524. listKey: 0, //列表 key,重新查询时重建列表以回到顶部
  525. loadFailed: false, //列表加载是否失败
  526. listHeight: 0, //列表滚动区高度(px),由搜索卡片下沿算到底部 tabbar
  527. // 用 data 传值,避免编译器把字面量属性裁掉导致 scroll-y 丢失
  528. scrollEnabled: true,
  529. scrollLowerThreshold: 120,
  530. };
  531. },
  532. mounted() {
  533. this.getFileInfo();
  534. this.refreshListHeight();
  535. if (typeof uni.onWindowResize === "function") {
  536. uni.onWindowResize(this.refreshListHeight);
  537. }
  538. },
  539. beforeDestroy() {
  540. if (typeof uni.offWindowResize === "function") {
  541. uni.offWindowResize(this.refreshListHeight);
  542. }
  543. },
  544. computed: {
  545. commitPickerColumns() {
  546. return (this.selectFile || []).map((item, index) => ({
  547. label:
  548. item.name ||
  549. item.processName ||
  550. item.procDefName ||
  551. `审批流程${index + 1}`,
  552. value: item.id,
  553. }));
  554. },
  555. selectedCommitName() {
  556. if (!this.commitPickerColumns.length) {
  557. return "请选择审批";
  558. }
  559. const item = this.commitPickerColumns[this.selectedCommitIndex];
  560. return item ? item.label : "请选择审批";
  561. },
  562. loadStatus() {
  563. if (this.loading) {
  564. return "loading";
  565. }
  566. return this.hasMore ? "loadmore" : "nomore";
  567. },
  568. },
  569. methods: {
  570. //左上角返回键:直接返回首页
  571. goBack() {
  572. this.$emit("changePage", "device");
  573. },
  574. // fileTreeShow(e) {
  575. // this.menushow = !this.menushow;
  576. // },
  577. menuClick(id) {
  578. this.menushow = false;
  579. },
  580. //选择文件类型
  581. selectFileType(e) {
  582. this.pickershow = false;
  583. if (e.value[0].label === "全部类型") {
  584. this.fileType = "";
  585. } else {
  586. this.fileType = e.value[0].label;
  587. }
  588. },
  589. //根据条件查询相关文件
  590. searchFile() {
  591. this.getFileInfo();
  592. },
  593. sectionChange(newVal) {
  594. this.curNow = newVal;
  595. // 0-全部,1-待审批,2-已审批
  596. this.bpmStatus = newVal === 0 ? "" : newVal;
  597. this.getFileInfo();
  598. },
  599. getTreeList() {
  600. var params = { parentId: "" };
  601. new Promise((resolve, reject) => {
  602. api
  603. .getFileInfo(params)
  604. .then((response) => {
  605. if (response.data.code == 200) {
  606. let data = response.data.result.records;
  607. let datas = data.filter((v) => v.fileType == null);
  608. let list = list2trees(datas);
  609. listArr.push(...list);
  610. } else {
  611. reject(response);
  612. }
  613. })
  614. .catch((error) => {
  615. console.log("catch===>response", response);
  616. reject(error);
  617. });
  618. });
  619. },
  620. // 拉取文件列表:reset 为 true 时从第一页重新加载,否则加载下一页
  621. async getFileInfo(reset = true) {
  622. if (!reset && (this.loading || !this.hasMore)) {
  623. return;
  624. }
  625. const pageNo = reset ? 1 : this.pageNo + 1;
  626. const seq = ++this.requestSeq;
  627. this.loading = true;
  628. this.loadFailed = false;
  629. if (reset) {
  630. this.pageNo = 1;
  631. this.total = 0;
  632. this.fileData = [];
  633. this.hasMore = true;
  634. this.listKey += 1;
  635. }
  636. var params = {
  637. bpmStatus: this.bpmStatus,
  638. column: "createTime",
  639. fileSuffix: this.fileType,
  640. likeFileName: this.fileName,
  641. pageNo: pageNo,
  642. pageSize: this.pageSize,
  643. parentId: "",
  644. selectFlag: true,
  645. sysOrgCode: "",
  646. };
  647. try {
  648. const response = await api.getFileInfo(params);
  649. if (seq !== this.requestSeq) {
  650. return;
  651. }
  652. if (response.data.code != 200) {
  653. this.loadFailed = true;
  654. uni.showToast({ title: "文件列表加载失败", icon: "none" });
  655. return;
  656. }
  657. const result = response.data.result || {};
  658. const records = result.records || [];
  659. this.pageNo = pageNo;
  660. this.total = result.total || 0;
  661. this.fileData = reset ? records : this.fileData.concat(records);
  662. this.hasMore =
  663. records.length > 0 &&
  664. (this.total
  665. ? this.fileData.length < this.total
  666. : records.length >= this.pageSize);
  667. } catch (error) {
  668. if (seq === this.requestSeq) {
  669. this.loadFailed = true;
  670. uni.showToast({ title: "文件列表加载失败", icon: "none" });
  671. }
  672. } finally {
  673. if (seq === this.requestSeq) {
  674. this.loading = false;
  675. }
  676. }
  677. },
  678. //上拉加载下一页
  679. loadMore() {
  680. this.getFileInfo(false);
  681. },
  682. //加载失败时点击空态重试
  683. retryLoad() {
  684. if (this.loadFailed) {
  685. this.getFileInfo();
  686. }
  687. },
  688. //重新计算滚动区高度(页面显示、窗口尺寸变化时调用)
  689. refreshListHeight() {
  690. this.$nextTick(() => {
  691. setTimeout(() => {
  692. this.measureListHeight();
  693. }, 30);
  694. });
  695. },
  696. //滚动区 = 搜索卡片下沿 到 底部 tabbar 上方 20rpx
  697. measureListHeight() {
  698. const query = uni.createSelectorQuery().in(this);
  699. query.select(".search-card").boundingClientRect();
  700. query.exec((res) => {
  701. const card = res && res[0];
  702. // 组件被 v-show 隐藏时量不到尺寸,等切换到本页再算
  703. if (!card || !card.height) {
  704. return;
  705. }
  706. const sys = uni.getSystemInfoSync();
  707. const safeBottom =
  708. (sys.safeAreaInsets && sys.safeAreaInsets.bottom) || 0;
  709. // 减去:底部 tabbar(50 + 安全区)、搜索卡片 margin-bottom 20rpx、.file-main 下内边距 20rpx
  710. const height = Math.floor(
  711. sys.windowHeight - (50 + safeBottom) - card.bottom - uni.upx2px(40)
  712. );
  713. this.listHeight = height > 0 ? height : 0;
  714. });
  715. },
  716. //查看文件内容
  717. openFile(params) {
  718. uni.downloadFile({
  719. url:
  720. configService.apiUrl +
  721. "/ventanaly-sharefile/fileServer/onlyOffice/read?id=" +
  722. params.id,
  723. success: function (res) {
  724. var filePath = res.tempFilePath;
  725. uni.openDocument({
  726. filePath: filePath,
  727. showMenu: true,
  728. success: function (res) {
  729. console.log("打开文档成功");
  730. },
  731. });
  732. },
  733. });
  734. },
  735. // //下载文件到手机
  736. download(params) {
  737. var fileiId = params.id;
  738. var params = {
  739. id: fileiId,
  740. };
  741. new Promise((resolve, reject) => {
  742. api
  743. .downloadFile(params)
  744. .then((response) => {
  745. if (response.statusCode == 200) {
  746. console.log(response, "111");
  747. // const blob = new Blob([response.data], {
  748. // type: "charset=UTF-8",
  749. // }); // 构造一个blob对象来处理数据
  750. // if ("download" in document.createElement("a")) {
  751. // // 支持a标签download的浏览器
  752. // const link = document.createElement("a"); // 创建a标签
  753. // link.href = URL.createObjectURL(blob);
  754. // document.body.appendChild(link);
  755. // link.click(); // 执行下载
  756. // URL.revokeObjectURL(link.href); //
  757. // document.body.removeChild(link); //
  758. // }
  759. } else {
  760. // console.log("请求下载文件失败:", err);
  761. }
  762. })
  763. .catch((error) => {
  764. reject(error);
  765. });
  766. });
  767. },
  768. // //删除文件
  769. showmodal(data) {
  770. this.selectItem = data;
  771. this.show = true;
  772. },
  773. confirm() {
  774. this.delatefile(this.selectItem);
  775. },
  776. cancel() {
  777. this.show = false;
  778. },
  779. delatefile(params) {
  780. var fileiId = params.id;
  781. new Promise((resolve, reject) => {
  782. api
  783. .delateFile({ id: fileiId })
  784. .then((response) => {
  785. if (response.data.code == 200) {
  786. this.show = false;
  787. // 本地移除,避免删除后列表回到顶部
  788. this.fileData = this.fileData.filter(
  789. (item) => String(item.id) !== String(fileiId)
  790. );
  791. this.total = Math.max(this.total - 1, 0);
  792. if (!this.fileData.length) {
  793. this.getFileInfo();
  794. }
  795. } else {
  796. // console.log("请求下载文件失败:", err);
  797. }
  798. })
  799. .catch((error) => {
  800. reject(error);
  801. });
  802. });
  803. },
  804. //撤回文件
  805. retractmodal(data) {
  806. this.value1 = "";
  807. this.showretract = true;
  808. this.cancelItem = data;
  809. },
  810. close() {
  811. this.showretract = false;
  812. },
  813. cancelRetract() {
  814. this.showretract = false;
  815. },
  816. confirmRetract() {
  817. var fileiId = this.cancelItem.id;
  818. var params = {
  819. tableId: fileiId,
  820. reason: this.value1,
  821. tableName: this.cancelItem.tableName,
  822. };
  823. if (this.cancelItem.bpmStatus == 1) {
  824. new Promise((resolve, reject) => {
  825. api
  826. .cancelFile(params)
  827. .then((response) => {
  828. if (response.data.code == 200) {
  829. this.showretract = false;
  830. this.getFileInfo();
  831. } else {
  832. // console.log("请求下载文件失败:", err);
  833. }
  834. })
  835. .catch((error) => {
  836. reject(error);
  837. });
  838. });
  839. } else {
  840. this.notifyShow = true;
  841. }
  842. },
  843. // 详情
  844. detailmodal(data) {
  845. this.detailShow = true;
  846. var fileiId = data.id;
  847. var tablename = data.tableName;
  848. var params = {
  849. tableId: fileiId,
  850. tableName: tablename,
  851. };
  852. new Promise((resolve, reject) => {
  853. api
  854. .gethistoricFlowNew(params)
  855. .then((response) => {
  856. if (response.data.code == 200) {
  857. var detailData = response.data;
  858. this.tableData = detailData.result;
  859. } else {
  860. // console.log("请求下载文件失败:", err);
  861. }
  862. })
  863. .catch((error) => {
  864. reject(error);
  865. });
  866. });
  867. this.getDetailImg(data);
  868. },
  869. getDetailImg(data) {
  870. var fileiId = data.id;
  871. var tablename = data.tableName;
  872. var params = {
  873. tableId: fileiId,
  874. tableName: tablename,
  875. };
  876. new Promise((resolve, reject) => {
  877. api
  878. .getHighlightImgNew(params)
  879. .then((response) => {
  880. if (response.statusCode == 200) {
  881. this.imageUrl = response.config.baseUrl + response.config.url;
  882. } else {
  883. // console.log("请求下载文件失败:", err);
  884. }
  885. })
  886. .catch((error) => {
  887. reject(error);
  888. });
  889. });
  890. },
  891. detailClose() {
  892. this.detailShow = false;
  893. },
  894. // 提交
  895. commitmodal(data) {
  896. this.selectedCommitIndex = 0;
  897. this.commitShow = true;
  898. this.commitItem = data;
  899. this.getListFile();
  900. },
  901. getListFile() {
  902. this.columns = [];
  903. var params = {
  904. zx: true,
  905. column: "createTime",
  906. order: "desc",
  907. status: 1,
  908. _t: Date.now(),
  909. };
  910. new Promise((resolve, reject) => {
  911. api
  912. .getListFile(params)
  913. .then((response) => {
  914. if (response.data.code == 200) {
  915. this.selectFile = response.data.result || [];
  916. this.columns = [];
  917. this.selectedCommitIndex = 0;
  918. this.selectFile.forEach((item) => {
  919. this.columns.push(item.id);
  920. });
  921. } else {
  922. // console.log("请求下载文件失败:", err);
  923. }
  924. })
  925. .catch((error) => {
  926. reject(error);
  927. });
  928. });
  929. },
  930. openCommitPicker() {
  931. if (!this.commitPickerColumns.length) {
  932. uni.showToast({
  933. title: "暂无审批流程",
  934. icon: "none",
  935. });
  936. return;
  937. }
  938. this.commitPickerShow = true;
  939. },
  940. onCommitPickerConfirm(e) {
  941. this.commitPickerShow = false;
  942. const selected = e.value && e.value[0];
  943. if (!selected) {
  944. return;
  945. }
  946. const index = this.commitPickerColumns.findIndex(
  947. (item) => item.value === selected.value
  948. );
  949. this.selectedCommitIndex =
  950. index >= 0
  951. ? index
  952. : e.indexs && e.indexs[0] !== undefined
  953. ? e.indexs[0]
  954. : 0;
  955. },
  956. confirmCommit() {
  957. var fileiId = this.commitItem.id;
  958. const selected = this.commitPickerColumns[this.selectedCommitIndex];
  959. var reqDefId = (selected && selected.value) || this.columns[0];
  960. var params = {
  961. tableId: fileiId,
  962. procDefId: reqDefId,
  963. firstGateway: true,
  964. };
  965. new Promise((resolve, reject) => {
  966. api
  967. .commitFile(params)
  968. .then((response) => {
  969. if (response.data.code == 200) {
  970. this.commitShow = false;
  971. this.commitPickerShow = false;
  972. this.getFileInfo();
  973. } else {
  974. // console.log("请求下载文件失败:", err);
  975. }
  976. })
  977. .catch((error) => {
  978. reject(error);
  979. });
  980. });
  981. },
  982. cancelCommit() {
  983. this.commitShow = false;
  984. this.commitPickerShow = false;
  985. },
  986. },
  987. };
  988. </script>
  989. <style lang="scss" scoped>
  990. .file-page {
  991. /* 高度 = 视口 - 底部 u-tabbar 高度(50px + 安全区),与 u-tabbar 的占位元素相抵,页面不再产生页面级滚动 */
  992. height: calc(100vh - 50px);
  993. height: calc(100vh - 50px - constant(safe-area-inset-bottom));
  994. height: calc(100vh - 50px - env(safe-area-inset-bottom));
  995. overflow: hidden;
  996. display: flex;
  997. flex-direction: column;
  998. background: linear-gradient(180deg, #c8d8f8 0%, #eef4fd 320rpx, #f4f7fd 100%);
  999. }
  1000. .file-page-content {
  1001. flex: 1;
  1002. min-height: 0;
  1003. display: flex;
  1004. flex-direction: column;
  1005. box-sizing: border-box;
  1006. padding-top: calc(50px + var(--status-bar-height, 0px));
  1007. }
  1008. .file-tab-bar {
  1009. display: flex;
  1010. flex-direction: row;
  1011. align-items: center;
  1012. padding: 16rpx 32rpx 0;
  1013. }
  1014. .file-tab-item {
  1015. position: relative;
  1016. margin-right: 48rpx;
  1017. padding-bottom: 16rpx;
  1018. }
  1019. .file-tab-text {
  1020. font-size: 28rpx;
  1021. color: #000;
  1022. line-height: 1.4;
  1023. }
  1024. .file-tab-item.active .file-tab-text {
  1025. color: #0065f8;
  1026. font-weight: 600;
  1027. }
  1028. .file-tab-line {
  1029. position: absolute;
  1030. left: 0;
  1031. right: 0;
  1032. bottom: 0;
  1033. height: 6rpx;
  1034. border-radius: 3rpx;
  1035. background: #0065f8;
  1036. }
  1037. .file-main {
  1038. flex: 1;
  1039. min-height: 0;
  1040. padding: 20rpx 24rpx;
  1041. box-sizing: border-box;
  1042. display: flex;
  1043. flex-direction: column;
  1044. }
  1045. .search-card {
  1046. flex-shrink: 0;
  1047. background: #f9f9fb;
  1048. border: 1rpx solid #fff;
  1049. border-radius: 16rpx;
  1050. padding: 20rpx 24rpx;
  1051. margin-bottom: 20rpx;
  1052. box-sizing: border-box;
  1053. }
  1054. .search-row {
  1055. display: flex;
  1056. flex-direction: row;
  1057. align-items: center;
  1058. }
  1059. .search-label {
  1060. flex-shrink: 0;
  1061. font-size: 24rpx;
  1062. color: #000;
  1063. }
  1064. .search-input {
  1065. flex: 3;
  1066. min-width: 0;
  1067. height: 48rpx;
  1068. margin: 0 4rpx;
  1069. font-size: 24rpx;
  1070. padding: 0 12rpx !important;
  1071. border: 1rpx solid #2572ff;
  1072. }
  1073. .search-picker-arrow {
  1074. width: 0;
  1075. height: 0;
  1076. margin-left: 4rpx;
  1077. border-left: 8rpx solid transparent;
  1078. border-right: 8rpx solid transparent;
  1079. border-top: 10rpx solid #0065f8;
  1080. flex-shrink: 0;
  1081. }
  1082. /* scroll-view 必须有确定高度,否则内部 height:100% 会被内容撑开、滚动失效。
  1083. 正常情况下由 JS 量出搜索卡片下沿到底部 tabbar 的高度,直接内联 px;
  1084. 量不到时退回 flex 撑满。 */
  1085. .file-list {
  1086. width: 100%;
  1087. flex: none;
  1088. min-height: 0;
  1089. }
  1090. /* 隐藏滚动条:滚动条会占用宽度,导致列表卡片比上方搜索卡片窄、左右不齐 */
  1091. .file-list ::v-deep ::-webkit-scrollbar {
  1092. width: 0 !important;
  1093. height: 0 !important;
  1094. display: none;
  1095. }
  1096. .file-list--fallback {
  1097. flex: 1 1 0;
  1098. height: 0;
  1099. }
  1100. .file-empty {
  1101. display: flex;
  1102. flex-direction: column;
  1103. align-items: center;
  1104. justify-content: center;
  1105. padding: 120rpx 0;
  1106. }
  1107. .file-empty-img {
  1108. width: 240rpx;
  1109. height: 240rpx;
  1110. }
  1111. .file-empty-text {
  1112. margin-top: 16rpx;
  1113. font-size: 26rpx;
  1114. color: #8a94a6;
  1115. }
  1116. .file-card {
  1117. background: #f9f9fb;
  1118. border: 1rpx solid #fff;
  1119. border-radius: 16rpx;
  1120. padding: 24rpx;
  1121. margin-bottom: 20rpx;
  1122. }
  1123. .file-card-header {
  1124. margin-bottom: 16rpx;
  1125. }
  1126. .file-card-title {
  1127. font-size: 28rpx;
  1128. font-weight: 700;
  1129. color: #000;
  1130. line-height: 1.4;
  1131. word-break: break-all;
  1132. }
  1133. .file-action-row {
  1134. display: flex;
  1135. flex-direction: row;
  1136. align-items: center;
  1137. justify-content: space-between;
  1138. gap: 10rpx;
  1139. margin-bottom: 20rpx;
  1140. }
  1141. .action-btn {
  1142. flex: 1;
  1143. min-width: 0;
  1144. height: 56rpx;
  1145. border-radius: 8rpx;
  1146. display: flex;
  1147. align-items: center;
  1148. justify-content: center;
  1149. box-sizing: border-box;
  1150. padding: 0 8rpx;
  1151. }
  1152. .action-btn-text {
  1153. font-size: 24rpx;
  1154. font-weight: 500;
  1155. line-height: 1;
  1156. white-space: nowrap;
  1157. overflow: hidden;
  1158. text-overflow: ellipsis;
  1159. max-width: 100%;
  1160. }
  1161. .action-btn-primary {
  1162. background: #0065f8;
  1163. }
  1164. .action-btn-primary .action-btn-text {
  1165. color: #ffffff;
  1166. }
  1167. .action-btn-outline {
  1168. background: #ffffff;
  1169. border: 1rpx solid #0065f8;
  1170. }
  1171. .action-btn-outline .action-btn-text {
  1172. color: #0065f8;
  1173. }
  1174. .search-picker-btn {
  1175. flex: 2;
  1176. min-width: 0;
  1177. margin-left: 8rpx;
  1178. padding: 0 12rpx;
  1179. }
  1180. .search-query-btn {
  1181. flex: 2;
  1182. min-width: 0;
  1183. margin-left: 8rpx;
  1184. padding: 0 12rpx;
  1185. }
  1186. .search-query-btn {
  1187. padding: 0 16rpx;
  1188. }
  1189. .file-info-grid {
  1190. display: flex;
  1191. flex-direction: row;
  1192. flex-wrap: wrap;
  1193. margin: 0 -6rpx;
  1194. }
  1195. .file-info-card {
  1196. width: calc(50% - 12rpx);
  1197. margin: 6rpx;
  1198. padding: 16rpx 12rpx;
  1199. box-sizing: border-box;
  1200. border-radius: 12rpx;
  1201. display: flex;
  1202. flex-direction: row;
  1203. align-items: center;
  1204. background: linear-gradient(
  1205. to bottom,
  1206. rgba(175, 195, 252, 0.6) 0%,
  1207. rgba(175, 195, 252, 0.1) 100%
  1208. );
  1209. }
  1210. .file-info-icon-box {
  1211. position: relative;
  1212. width: 56rpx;
  1213. height: 56rpx;
  1214. border-radius: 12rpx;
  1215. background: #2b7cff;
  1216. box-sizing: border-box;
  1217. box-shadow: 0 4rpx 10rpx rgba(43, 124, 255, 0.22);
  1218. flex-shrink: 0;
  1219. margin-right: 12rpx;
  1220. }
  1221. .file-info-icon-glass {
  1222. position: absolute;
  1223. left: -6rpx;
  1224. bottom: -6rpx;
  1225. width: 50rpx;
  1226. height: 50rpx;
  1227. border-radius: 12rpx;
  1228. background: transparent;
  1229. border: none;
  1230. box-shadow: 0 0 0 0.6px #ffffff inset;
  1231. box-sizing: border-box;
  1232. backdrop-filter: blur(4rpx);
  1233. -webkit-backdrop-filter: blur(4rpx);
  1234. display: flex;
  1235. align-items: center;
  1236. justify-content: center;
  1237. }
  1238. .file-info-icon {
  1239. width: 28rpx;
  1240. height: 28rpx;
  1241. }
  1242. .file-info-content {
  1243. flex: 1;
  1244. min-width: 0;
  1245. }
  1246. .file-info-value {
  1247. display: block;
  1248. font-size: 24rpx;
  1249. font-weight: 700;
  1250. color: #0065f8;
  1251. line-height: 1.3;
  1252. overflow: hidden;
  1253. text-overflow: ellipsis;
  1254. white-space: nowrap;
  1255. }
  1256. .file-info-label {
  1257. display: block;
  1258. margin-top: 6rpx;
  1259. font-size: 24rpx;
  1260. color: #000;
  1261. line-height: 1.3;
  1262. }
  1263. .retract-modal {
  1264. width: 620rpx;
  1265. background: #ffffff;
  1266. border-radius: 16rpx;
  1267. overflow: hidden;
  1268. padding-bottom: 28rpx;
  1269. box-sizing: border-box;
  1270. }
  1271. .retract-modal-header {
  1272. display: flex;
  1273. flex-direction: row;
  1274. align-items: center;
  1275. justify-content: space-between;
  1276. padding: 28rpx 28rpx 20rpx;
  1277. }
  1278. .retract-modal-title {
  1279. font-size: 32rpx;
  1280. font-weight: 700;
  1281. color: #1a1a1a;
  1282. }
  1283. .retract-modal-close {
  1284. width: 44rpx;
  1285. height: 44rpx;
  1286. display: flex;
  1287. align-items: center;
  1288. justify-content: center;
  1289. }
  1290. .retract-close-icon {
  1291. width: 28rpx;
  1292. height: 28rpx;
  1293. }
  1294. .retract-modal-divider {
  1295. height: 1rpx;
  1296. background: #eef0f4;
  1297. margin: 0 24rpx;
  1298. }
  1299. .retract-modal-body {
  1300. padding: 24rpx 28rpx;
  1301. }
  1302. .retract-textarea-wrap {
  1303. border: 1rpx solid #2b7cff;
  1304. border-radius: 8rpx;
  1305. overflow: hidden;
  1306. min-height: 200rpx;
  1307. background: #ffffff;
  1308. }
  1309. .retract-modal-footer {
  1310. display: flex;
  1311. flex-direction: row;
  1312. align-items: center;
  1313. justify-content: space-between;
  1314. gap: 20rpx;
  1315. padding: 0 28rpx;
  1316. }
  1317. .retract-modal-footer .action-btn {
  1318. flex: 1;
  1319. height: 64rpx;
  1320. }
  1321. .delete-modal {
  1322. width: 620rpx;
  1323. background: #ffffff;
  1324. border-radius: 16rpx;
  1325. overflow: hidden;
  1326. padding-bottom: 28rpx;
  1327. box-sizing: border-box;
  1328. }
  1329. .delete-modal-header {
  1330. display: flex;
  1331. flex-direction: row;
  1332. align-items: center;
  1333. justify-content: space-between;
  1334. padding: 28rpx 28rpx 20rpx;
  1335. }
  1336. .delete-modal-title {
  1337. font-size: 32rpx;
  1338. font-weight: 700;
  1339. color: #1a1a1a;
  1340. }
  1341. .delete-modal-close {
  1342. width: 44rpx;
  1343. height: 44rpx;
  1344. display: flex;
  1345. align-items: center;
  1346. justify-content: center;
  1347. }
  1348. .delete-close-icon {
  1349. width: 28rpx;
  1350. height: 28rpx;
  1351. }
  1352. .delete-modal-divider {
  1353. height: 1rpx;
  1354. background: #eef0f4;
  1355. margin: 0 24rpx;
  1356. }
  1357. .delete-modal-body {
  1358. padding: 24rpx 28rpx;
  1359. }
  1360. .delete-confirm-box {
  1361. display: flex;
  1362. flex-direction: row;
  1363. align-items: center;
  1364. justify-content: center;
  1365. gap: 16rpx;
  1366. padding: 20rpx 24rpx;
  1367. background: #f0f4ff;
  1368. border-radius: 8rpx;
  1369. }
  1370. .delete-confirm-icon {
  1371. width: 48rpx;
  1372. height: 52rpx;
  1373. flex-shrink: 0;
  1374. }
  1375. .delete-confirm-text {
  1376. font-size: 28rpx;
  1377. color: #1a1a1a;
  1378. }
  1379. .delete-modal-footer {
  1380. display: flex;
  1381. flex-direction: row;
  1382. align-items: center;
  1383. justify-content: space-between;
  1384. gap: 20rpx;
  1385. padding: 0 28rpx;
  1386. }
  1387. .delete-modal-footer .action-btn {
  1388. flex: 1;
  1389. height: 64rpx;
  1390. }
  1391. .commit-modal {
  1392. width: 620rpx;
  1393. background: #ffffff;
  1394. border-radius: 16rpx;
  1395. overflow: hidden;
  1396. padding-bottom: 28rpx;
  1397. box-sizing: border-box;
  1398. }
  1399. .commit-modal-header {
  1400. display: flex;
  1401. flex-direction: row;
  1402. align-items: center;
  1403. justify-content: space-between;
  1404. padding: 28rpx 28rpx 20rpx;
  1405. }
  1406. .commit-modal-title {
  1407. font-size: 32rpx;
  1408. font-weight: 700;
  1409. color: #1a1a1a;
  1410. }
  1411. .commit-modal-close {
  1412. width: 44rpx;
  1413. height: 44rpx;
  1414. display: flex;
  1415. align-items: center;
  1416. justify-content: center;
  1417. }
  1418. .commit-close-icon {
  1419. width: 28rpx;
  1420. height: 28rpx;
  1421. }
  1422. .commit-modal-divider {
  1423. height: 1rpx;
  1424. background: #eef0f4;
  1425. margin: 0 24rpx;
  1426. }
  1427. .commit-modal-body {
  1428. padding: 24rpx 28rpx;
  1429. }
  1430. .commit-form-box {
  1431. background: #f0f4ff;
  1432. border-radius: 8rpx;
  1433. padding: 32rpx 24rpx;
  1434. }
  1435. .commit-form-row {
  1436. display: flex;
  1437. flex-direction: row;
  1438. align-items: center;
  1439. gap: 16rpx;
  1440. }
  1441. .commit-form-label {
  1442. display: flex;
  1443. flex-direction: row;
  1444. align-items: center;
  1445. flex-shrink: 0;
  1446. font-size: 28rpx;
  1447. color: #1a1a1a;
  1448. }
  1449. .commit-required {
  1450. color: #ff4d4f;
  1451. margin-right: 4rpx;
  1452. }
  1453. .commit-select {
  1454. flex: 1;
  1455. display: flex;
  1456. flex-direction: row;
  1457. align-items: center;
  1458. justify-content: space-between;
  1459. height: 64rpx;
  1460. padding: 0 20rpx;
  1461. background: #ffffff;
  1462. border: 1rpx solid #2b7cff;
  1463. border-radius: 8rpx;
  1464. box-sizing: border-box;
  1465. }
  1466. .commit-select-text {
  1467. flex: 1;
  1468. font-size: 26rpx;
  1469. color: #333333;
  1470. overflow: hidden;
  1471. text-overflow: ellipsis;
  1472. white-space: nowrap;
  1473. }
  1474. .commit-select-arrow {
  1475. width: 0;
  1476. height: 0;
  1477. margin-left: 12rpx;
  1478. border-left: 10rpx solid transparent;
  1479. border-right: 10rpx solid transparent;
  1480. border-top: 12rpx solid #2b7cff;
  1481. flex-shrink: 0;
  1482. }
  1483. .commit-modal-footer {
  1484. display: flex;
  1485. flex-direction: row;
  1486. align-items: center;
  1487. justify-content: space-between;
  1488. gap: 20rpx;
  1489. padding: 0 28rpx;
  1490. }
  1491. .commit-modal-footer .action-btn {
  1492. flex: 1;
  1493. height: 64rpx;
  1494. }
  1495. .detail-modal {
  1496. width: 680rpx;
  1497. max-height: 80vh;
  1498. background: #ffffff;
  1499. border-radius: 16rpx;
  1500. overflow: hidden;
  1501. box-sizing: border-box;
  1502. display: flex;
  1503. flex-direction: column;
  1504. }
  1505. .detail-modal-header {
  1506. display: flex;
  1507. flex-direction: row;
  1508. align-items: center;
  1509. justify-content: space-between;
  1510. padding: 28rpx 28rpx 20rpx;
  1511. flex-shrink: 0;
  1512. }
  1513. .detail-modal-title {
  1514. font-size: 32rpx;
  1515. font-weight: 700;
  1516. color: #1a1a1a;
  1517. }
  1518. .detail-modal-close {
  1519. width: 44rpx;
  1520. height: 44rpx;
  1521. display: flex;
  1522. align-items: center;
  1523. justify-content: center;
  1524. }
  1525. .detail-close-icon {
  1526. width: 28rpx;
  1527. height: 28rpx;
  1528. }
  1529. .detail-modal-divider {
  1530. height: 1rpx;
  1531. background: #eef0f4;
  1532. margin: 0 24rpx;
  1533. flex-shrink: 0;
  1534. }
  1535. .detail-modal-body {
  1536. flex: 1;
  1537. max-height: calc(80vh - 100rpx);
  1538. padding: 24rpx 28rpx 28rpx;
  1539. box-sizing: border-box;
  1540. }
  1541. .detail-section {
  1542. margin-bottom: 32rpx;
  1543. }
  1544. .detail-section:last-child {
  1545. margin-bottom: 0;
  1546. }
  1547. .detail-section-title {
  1548. position: relative;
  1549. display: flex;
  1550. flex-direction: row;
  1551. align-items: center;
  1552. padding: 4px 18px 12px;
  1553. background-image: url(/static/warndata/1-1.png);
  1554. background-repeat: no-repeat;
  1555. background-size: 100% 79%;
  1556. }
  1557. .detail-section-prefix {
  1558. position: relative;
  1559. z-index: 1;
  1560. font-size: 28rpx;
  1561. font-weight: 700;
  1562. color: #2b7cff;
  1563. margin-right: 8rpx;
  1564. font-style: italic;
  1565. }
  1566. .detail-section-text {
  1567. position: relative;
  1568. z-index: 1;
  1569. font-size: 22rpx;
  1570. font-weight: 700;
  1571. color: #1a1a1a;
  1572. }
  1573. .detail-table-container {
  1574. overflow-x: auto;
  1575. border: 1rpx solid #b8d4ff;
  1576. border-radius: 8rpx;
  1577. }
  1578. .detail-table {
  1579. width: max-content;
  1580. min-width: 100%;
  1581. display: flex;
  1582. flex-direction: column;
  1583. }
  1584. .detail-table-header,
  1585. .detail-table-row {
  1586. display: flex;
  1587. flex-direction: row;
  1588. }
  1589. .detail-table-header {
  1590. background: #ffffff;
  1591. height: 76rpx;
  1592. border-bottom: 1rpx solid #bcd7fb;
  1593. box-sizing: border-box;
  1594. }
  1595. .detail-table-header .detail-table-cell {
  1596. color: #1a6dff;
  1597. font-weight: 600;
  1598. background: transparent;
  1599. display: flex;
  1600. align-items: center;
  1601. justify-content: center;
  1602. padding: 0 12rpx;
  1603. border-right-color: #bcd7fb;
  1604. border-bottom: none;
  1605. }
  1606. .detail-table-row {
  1607. background: #ffffff;
  1608. }
  1609. .detail-table-cell {
  1610. flex: 1;
  1611. min-width: 140rpx;
  1612. padding: 16rpx 12rpx;
  1613. font-size: 24rpx;
  1614. color: #333333;
  1615. text-align: center;
  1616. border-right: 1rpx solid #b8d4ff;
  1617. border-bottom: 1rpx solid #b8d4ff;
  1618. box-sizing: border-box;
  1619. word-break: break-all;
  1620. }
  1621. .detail-table-cell:last-child {
  1622. border-right: none;
  1623. }
  1624. .detail-table-row:last-child .detail-table-cell {
  1625. border-bottom: none;
  1626. }
  1627. .detail-flowchart-wrap {
  1628. background: #f0f5ff;
  1629. border-radius: 8rpx;
  1630. padding: 24rpx;
  1631. overflow: hidden;
  1632. }
  1633. .detail-flowchart-img {
  1634. width: 100%;
  1635. display: block;
  1636. }
  1637. </style>