filecenter.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  1. <template name="filecenter">
  2. <view>
  3. <u-navbar
  4. title="文件中心"
  5. :bgStatusImage="backPic0"
  6. :bgImage="backPic"
  7. :safeAreaInsetTop="true"
  8. >
  9. <view class="u-nav-slot" slot="left">
  10. <u-icon name="list" size="20"> </u-icon>
  11. </view>
  12. </u-navbar>
  13. <!-- <view v-if="menushow" class="menupage">
  14. <FileTreeMenu @menuClick="menuClick"></FileTreeMenu>
  15. </view> -->
  16. <view v-if="!menushow" class="container">
  17. <view class="main">
  18. <view class="fileArea" style="margin-top: 28px">
  19. <view style="margin-top: 15px; margin-left: 10px" class="fileTitle"
  20. >文件名称</view
  21. >
  22. <u-input
  23. style="margin-top: 15px; border-color: #2a94ff"
  24. v-model="fileName"
  25. type="text"
  26. ></u-input
  27. ></view>
  28. <view class="pickerArea">
  29. <view class="btns">
  30. <u-button
  31. style="margin: 15px"
  32. type="primary"
  33. :text="fileType ? fileType : '选择文件类型'"
  34. @click="pickershow = true"
  35. ></u-button>
  36. <u-button style="margin: 15px" type="primary" @click="searchFile"
  37. >查询</u-button
  38. >
  39. </view>
  40. <u-picker
  41. :show="pickershow"
  42. :columns="fileTypeList"
  43. keyName="label"
  44. @cancel="pickershow = false"
  45. @confirm="selectFileType"
  46. ></u-picker>
  47. </view>
  48. <view class="u-page">
  49. <u-subsection
  50. :list="sectionList"
  51. mode="button"
  52. :current="curNow"
  53. @change="sectionChange"
  54. :animation="true"
  55. bg-color="#3c9cff"
  56. button-color="#3c9cff"
  57. active-color="#000"
  58. inactive-color="#000"
  59. ></u-subsection>
  60. <u-list>
  61. <u-list-item
  62. class="itemback"
  63. v-for="(item, index) in fileData"
  64. :key="index"
  65. >
  66. <view class="content flcard" @tap="openFile(item)">
  67. <view
  68. class="demo-layout bg-purple-light"
  69. style="margin-bottom: 20rpx"
  70. >
  71. <view style="margin-top: 10rpx">
  72. <text class="text-style1">{{ item.fileName }}</text>
  73. </view>
  74. </view>
  75. <view class="datacard laiyuan">
  76. <view style="margin: 20rpx 20rpx">
  77. <text class="text-style">{{ item.fileSource }}</text>
  78. </view>
  79. <view style="margin: 20rpx 20rpx; font-size: small"
  80. >文件来源</view
  81. >
  82. </view>
  83. <view class="datacard zhuangtai">
  84. <view style="margin: 20rpx 20rpx">
  85. <text class="text-style">{{
  86. item.bpmStatus_dictText
  87. }}</text>
  88. </view>
  89. <view style="margin: 20rpx 20rpx; font-size: small"
  90. >审批状态</view
  91. >
  92. </view>
  93. <view class="datacard user">
  94. <view style="margin: 20rpx 20rpx">
  95. <text class="text-style">{{ item.createBy }}</text>
  96. </view>
  97. <view style="margin: 20rpx 20rpx; font-size: small"
  98. >创建人</view
  99. >
  100. </view>
  101. <view class="datacard time">
  102. <view style="margin: 20rpx 20rpx">
  103. <text class="text-style">{{ item.createTime }}</text>
  104. </view>
  105. <view style="margin: 20rpx 20rpx; font-size: small"
  106. >上传时间</view
  107. >
  108. </view>
  109. </view>
  110. <view class="btnClass">
  111. <u-button
  112. class="btn"
  113. type="primary"
  114. shape="circle"
  115. text="审批详情"
  116. @click="detailmodal(item)"
  117. ></u-button>
  118. <u-button
  119. class="btn"
  120. type="primary"
  121. shape="circle"
  122. text="提交"
  123. @click="commitmodal(item)"
  124. ></u-button>
  125. <u-button
  126. class="btn"
  127. type="primary"
  128. shape="circle"
  129. text="撤回"
  130. @click="retractmodal(item)"
  131. ></u-button>
  132. <u-button
  133. class="btn"
  134. type="primary"
  135. shape="circle"
  136. text="下载"
  137. @click="download(item)"
  138. ></u-button>
  139. <u-button
  140. class="btn"
  141. type="primary"
  142. shape="circle"
  143. text="删除"
  144. @click="showmodal(item)"
  145. ></u-button>
  146. </view>
  147. </u-list-item>
  148. </u-list>
  149. <!-- 审批详情 -->
  150. <u-popup
  151. :show="detailShow"
  152. :closeable="true"
  153. :round="10"
  154. mode="bottom"
  155. @close="detailClose"
  156. >
  157. <view>
  158. <view class="title">
  159. <span class="firetext">流程审批进度历史</span>
  160. </view>
  161. <view class="table-container">
  162. <view class="table">
  163. <view class="table-header">
  164. <view class="table-cell">序号</view>
  165. <view class="table-cell">当前环节</view>
  166. <view class="table-cell">审批人</view>
  167. <view class="table-cell">审批结果</view>
  168. <view class="table-cell">审批开始时间</view>
  169. <view class="table-cell">审批结束时间</view>
  170. <view class="table-cell">处理意见</view>
  171. <view class="table-cell">状态</view>
  172. <!-- ... 根据需要添加更多表头 -->
  173. </view>
  174. <view
  175. class="table-row"
  176. v-for="(item, index) in tableData"
  177. :key="index"
  178. >
  179. <view class="table-cell"
  180. ><template>
  181. <span>{{ index + 1 }}</span>
  182. </template></view
  183. >
  184. <view class="table-cell">{{ item.name }}</view>
  185. <view class="table-cell">
  186. <template>
  187. <span
  188. v-if="item.assignees && item.assignees.length > 0"
  189. >
  190. {{ item.assignees[0].username }}
  191. </span>
  192. <!-- 如果没有审批人,可以显示空或占位符 -->
  193. <span v-else> - </span>
  194. </template></view
  195. >
  196. <view class="table-cell">{{ item.deleteReason }}</view>
  197. <view class="table-cell">{{ item.createTime }}</view>
  198. <view class="table-cell">{{ item.endTime }}</view>
  199. <view class="table-cell">{{ item.comment }}</view>
  200. <view class="table-cell">
  201. <template>
  202. <span v-if="item.assignees[0].isExecutor">
  203. 已处理
  204. </span>
  205. <!-- 如果没有审批人,可以显示空或占位符 -->
  206. <span v-else> 待处理</span>
  207. </template></view
  208. >
  209. <!-- ... 根据需要添加更多单元格 -->
  210. </view>
  211. </view>
  212. </view>
  213. </view>
  214. <view>
  215. <view class="title">
  216. <span class="firetext">实时流程图</span>
  217. </view>
  218. <image style="width: 100%" :src="imageUrl" alt="" />
  219. </view>
  220. </u-popup>
  221. <!-- 删除 -->
  222. <u-modal
  223. :show="show"
  224. :showCancelButton="true"
  225. :showConfirmButton="true"
  226. :content="content"
  227. @confirm="confirm"
  228. @cancel="cancel"
  229. ></u-modal>
  230. <!-- 提交 -->
  231. <u-picker
  232. :show="commitShow"
  233. :columns="[columns]"
  234. title="选择审批"
  235. @confirm="confirmCommit"
  236. @cancel="cancelCommit"
  237. ></u-picker>
  238. <!-- 撤回 -->
  239. <u-popup
  240. :show="showretract"
  241. :closeable="true"
  242. :round="10"
  243. mode="bottom"
  244. @close="close"
  245. >
  246. <view>
  247. <u--textarea
  248. v-model="value1"
  249. placeholder="请输入撤回原因"
  250. ></u--textarea>
  251. </view>
  252. <view class="button-container">
  253. <u-button @click="cancelRetract" shape="circle">取消</u-button>
  254. <u-button @click="confirmRetract" shape="circle" type="primary"
  255. >确认</u-button
  256. >
  257. </view>
  258. </u-popup>
  259. <u-notify
  260. message="只有审批中的数据才能撤回!"
  261. :show="notifyShow"
  262. :duration="1000"
  263. ></u-notify>
  264. </view>
  265. </view>
  266. </view>
  267. </view>
  268. </template>
  269. <script>
  270. import api from "@/api/api";
  271. import configService from "../../common/service/config.service";
  272. // import FileTreeMenu from "./treeMenu/fileTreeMenu.vue";
  273. export default {
  274. // components: {
  275. // FileTreeMenu,
  276. // },
  277. name: "filecenter",
  278. watch: {},
  279. data() {
  280. return {
  281. backPic0: "url(/static/topnavbar0.png)",
  282. backPic: "url(../../static/topnavbar.png)",
  283. sectionList: [
  284. { name: "全部", code: 0 },
  285. { name: "待审批", code: 1 },
  286. { name: "已审批", code: 2 },
  287. ],
  288. fileTypeList: [
  289. [
  290. { label: "全部类型", value: "" },
  291. { label: ".txt", value: "txt" },
  292. { label: ".doc", value: "doc" },
  293. { label: ".docx", value: "docx" },
  294. { label: ".xls", value: "xls" },
  295. { label: ".xlsx", value: "xlsx" },
  296. { label: ".ppt", value: "ppt" },
  297. { label: ".pptx", value: "pptx" },
  298. { label: ".jpg", value: "jpg" },
  299. { label: ".png", value: "png" },
  300. { label: ".pdf", value: "pdf" },
  301. ],
  302. ],
  303. fileType: "", //文件类型
  304. pickershow: false,
  305. curNow: 0,
  306. fileData: [],
  307. bpmStatus: 1, //1处理中 2 已完成 3 已驳回
  308. show: false, //删除modal
  309. content: "确定要删除吗?",
  310. selectItem: "", //选择文件
  311. showretract: false, //撤回popup
  312. value1: "", //撤回原因
  313. cancelItem: "", //撤回文件
  314. detailShow: false, //详情
  315. notifyShow: false, //撤回文件提示消息显示
  316. commitShow: false, //提交
  317. columns: [],
  318. commitItem: "", //提交文件
  319. selectFile: [],
  320. tableData: [], //审批内容
  321. detailItem: "", //详情文件
  322. imageUrl: "",
  323. fileName: "", //文件名称搜索框
  324. menushow: false,
  325. };
  326. },
  327. mounted() {
  328. this.getFileInfo();
  329. },
  330. computed: {},
  331. methods: {
  332. // fileTreeShow(e) {
  333. // this.menushow = !this.menushow;
  334. // },
  335. menuClick(id) {
  336. this.menushow = false;
  337. },
  338. //选择文件类型
  339. selectFileType(e) {
  340. this.pickershow = false;
  341. if (e.value[0].label === "全部类型") {
  342. this.fileType = "";
  343. } else {
  344. this.fileType = e.value[0].label;
  345. }
  346. },
  347. //根据条件查询相关文件
  348. searchFile() {
  349. this.getFileInfo();
  350. },
  351. sectionChange(newVal) {
  352. this.curNow = newVal;
  353. if (this.curNow === 0) {
  354. // 如果选择了“全部”,返回所有文件
  355. this.bpmStatus = "";
  356. this.getFileInfo();
  357. } else if (this.curNow === 1) {
  358. // 否则,根据curNow的值过滤文件
  359. this.bpmStatus = 1;
  360. this.getFileInfo();
  361. } else if (this.curNow === 2) {
  362. this.bpmStatus = 2;
  363. this.getFileInfo();
  364. }
  365. },
  366. getTreeList() {
  367. var params = { parentId: "" };
  368. new Promise((resolve, reject) => {
  369. api
  370. .getFileInfo(params)
  371. .then((response) => {
  372. if (response.data.code == 200) {
  373. let data = response.data.result.records;
  374. let datas = data.filter((v) => v.fileType == null);
  375. let list = list2trees(datas);
  376. listArr.push(...list);
  377. } else {
  378. reject(response);
  379. }
  380. })
  381. .catch((error) => {
  382. console.log("catch===>response", response);
  383. reject(error);
  384. });
  385. });
  386. },
  387. getFileInfo() {
  388. var params = {
  389. bpmStatus: this.bpmStatus,
  390. column: "createTime",
  391. fileSuffix: this.fileType,
  392. likeFileName: this.fileName,
  393. pageNo: 1,
  394. pageSize: 10000,
  395. parentId: "",
  396. selectFlag: true,
  397. sysOrgCode: "",
  398. };
  399. new Promise((resolve, reject) => {
  400. api
  401. .getFileInfo(params)
  402. .then((response) => {
  403. if (response.data.code == 200) {
  404. this.fileData = response.data.result.records;
  405. } else {
  406. reject(response);
  407. }
  408. })
  409. .catch((error) => {
  410. console.log("catch===>response", response);
  411. reject(error);
  412. });
  413. });
  414. },
  415. //查看文件内容
  416. openFile(params) {
  417. uni.downloadFile({
  418. url:
  419. configService.apiUrl +
  420. "/ventanaly-sharefile/fileServer/onlyOffice/read?id=" +
  421. params.id,
  422. success: function (res) {
  423. var filePath = res.tempFilePath;
  424. uni.openDocument({
  425. filePath: filePath,
  426. showMenu: true,
  427. success: function (res) {
  428. console.log("打开文档成功");
  429. },
  430. });
  431. },
  432. });
  433. },
  434. // //下载文件到手机
  435. download(params) {
  436. var fileiId = params.id;
  437. var params = {
  438. id: fileiId,
  439. };
  440. new Promise((resolve, reject) => {
  441. api
  442. .downloadFile(params)
  443. .then((response) => {
  444. if (response.statusCode == 200) {
  445. console.log(response, "111");
  446. // const blob = new Blob([response.data], {
  447. // type: "charset=UTF-8",
  448. // }); // 构造一个blob对象来处理数据
  449. // if ("download" in document.createElement("a")) {
  450. // // 支持a标签download的浏览器
  451. // const link = document.createElement("a"); // 创建a标签
  452. // link.href = URL.createObjectURL(blob);
  453. // document.body.appendChild(link);
  454. // link.click(); // 执行下载
  455. // URL.revokeObjectURL(link.href); //
  456. // document.body.removeChild(link); //
  457. // }
  458. } else {
  459. // console.log("请求下载文件失败:", err);
  460. }
  461. })
  462. .catch((error) => {
  463. reject(error);
  464. });
  465. });
  466. },
  467. // //删除文件
  468. showmodal(data) {
  469. this.selectItem = data;
  470. this.show = true;
  471. },
  472. confirm() {
  473. this.delatefile(this.selectItem);
  474. },
  475. cancel() {
  476. this.show = false;
  477. },
  478. delatefile(params) {
  479. var fileiId = params.id;
  480. new Promise((resolve, reject) => {
  481. api
  482. .delateFile({ id: fileiId })
  483. .then((response) => {
  484. if (response.data.code == 200) {
  485. this.show = false;
  486. this.getFileInfo();
  487. } else {
  488. // console.log("请求下载文件失败:", err);
  489. }
  490. })
  491. .catch((error) => {
  492. reject(error);
  493. });
  494. });
  495. },
  496. //撤回文件
  497. retractmodal(data) {
  498. this.showretract = true;
  499. this.cancelItem = data;
  500. },
  501. close() {
  502. this.showretract = false;
  503. },
  504. cancelRetract() {
  505. this.showretract = false;
  506. },
  507. confirmRetract() {
  508. this.value1 = "";
  509. var fileiId = this.cancelItem.id;
  510. var params = {
  511. tableId: fileiId,
  512. reason: this.value1,
  513. tableName: this.cancelItem.tableName,
  514. };
  515. if (this.cancelItem.bpmStatus == 1) {
  516. new Promise((resolve, reject) => {
  517. api
  518. .cancelFile(params)
  519. .then((response) => {
  520. if (response.data.code == 200) {
  521. this.showretract = false;
  522. this.getFileInfo();
  523. } else {
  524. // console.log("请求下载文件失败:", err);
  525. }
  526. })
  527. .catch((error) => {
  528. reject(error);
  529. });
  530. });
  531. } else {
  532. this.notifyShow = true;
  533. }
  534. },
  535. // 详情
  536. detailmodal(data) {
  537. this.detailShow = true;
  538. var fileiId = data.id;
  539. var tablename = data.tableName;
  540. var params = {
  541. tableId: fileiId,
  542. tableName: tablename,
  543. };
  544. new Promise((resolve, reject) => {
  545. api
  546. .gethistoricFlowNew(params)
  547. .then((response) => {
  548. if (response.data.code == 200) {
  549. var detailData = response.data;
  550. this.tableData = detailData.result;
  551. } else {
  552. // console.log("请求下载文件失败:", err);
  553. }
  554. })
  555. .catch((error) => {
  556. reject(error);
  557. });
  558. });
  559. this.getDetailImg(data);
  560. },
  561. getDetailImg(data) {
  562. var fileiId = data.id;
  563. var tablename = data.tableName;
  564. var params = {
  565. tableId: fileiId,
  566. tableName: tablename,
  567. };
  568. new Promise((resolve, reject) => {
  569. api
  570. .getHighlightImgNew(params)
  571. .then((response) => {
  572. if (response.statusCode == 200) {
  573. this.imageUrl = response.config.baseUrl + response.config.url;
  574. } else {
  575. // console.log("请求下载文件失败:", err);
  576. }
  577. })
  578. .catch((error) => {
  579. reject(error);
  580. });
  581. });
  582. },
  583. detailClose() {
  584. this.detailShow = false;
  585. },
  586. // 提交
  587. commitmodal(data) {
  588. this.commitShow = true;
  589. this.commitItem = data;
  590. this.getListFile();
  591. },
  592. getListFile() {
  593. this.columns = [];
  594. var params = {
  595. zx: true,
  596. column: "createTime",
  597. order: "desc",
  598. status: 1,
  599. _t: Date.now(),
  600. };
  601. new Promise((resolve, reject) => {
  602. api
  603. .getListFile(params)
  604. .then((response) => {
  605. if (response.data.code == 200) {
  606. this.selectFile = response.data.result;
  607. this.selectFile.forEach((item) => {
  608. this.columns.push(item.id);
  609. console.log(this.columns);
  610. });
  611. } else {
  612. // console.log("请求下载文件失败:", err);
  613. }
  614. })
  615. .catch((error) => {
  616. reject(error);
  617. });
  618. });
  619. },
  620. confirmCommit() {
  621. var fileiId = this.commitItem.id;
  622. var reqDefId = this.columns[0];
  623. var params = {
  624. tableId: fileiId,
  625. procDefId: reqDefId,
  626. firstGateway: true,
  627. };
  628. new Promise((resolve, reject) => {
  629. api
  630. .commitFile(params)
  631. .then((response) => {
  632. if (response.data.code == 200) {
  633. this.commitShow = false;
  634. this.getFileInfo();
  635. } else {
  636. // console.log("请求下载文件失败:", err);
  637. }
  638. })
  639. .catch((error) => {
  640. reject(error);
  641. });
  642. });
  643. },
  644. cancelCommit() {
  645. this.commitShow = false;
  646. },
  647. },
  648. };
  649. </script>
  650. <style scoped>
  651. .fileTitle {
  652. margin-right: 20px;
  653. line-height: 40px;
  654. }
  655. .fileArea,
  656. .pickerArea {
  657. display: flex;
  658. flex-direction: row;
  659. justify-content: space-around;
  660. }
  661. .btns {
  662. width: 100%;
  663. display: flex;
  664. flex-direction: row;
  665. justify-content: space-around;
  666. }
  667. .button-container {
  668. display: flex;
  669. justify-content: space-between;
  670. margin-top: 10px; /* 根据需要调整 */
  671. }
  672. button {
  673. /* 样式可以根据需要自定义 */
  674. padding: 10px 20px;
  675. background-color: #007aff;
  676. color: white;
  677. border: none;
  678. border-radius: 5px;
  679. cursor: pointer;
  680. }
  681. .container {
  682. margin-top: 30px;
  683. }
  684. .main {
  685. display: flex;
  686. flex-direction: column;
  687. }
  688. .itemback {
  689. padding: 20rpx;
  690. background-color: #ffffff;
  691. margin-bottom: 5rpx;
  692. display: flex;
  693. }
  694. .btnClass {
  695. display: flex;
  696. justify-content: space-around;
  697. margin-top: 20rpx;
  698. }
  699. .btn {
  700. border-radius: 10rpx;
  701. margin-right: 10rpx; /* 示例:添加一些右外边距,但确保它不会导致换行 */
  702. }
  703. /* 最后一个按钮不需要右外边距 */
  704. .btn:last-child {
  705. margin-right: 0;
  706. }
  707. .text-style {
  708. color: #3787fe;
  709. font-weight: small;
  710. }
  711. .text-style1 {
  712. color: #000000;
  713. font-size: large;
  714. font-weight: bold;
  715. }
  716. .datacard {
  717. width: 48%;
  718. margin: 1%;
  719. float: left;
  720. height: 120rpx;
  721. border-radius: 10px;
  722. }
  723. .time {
  724. background: url(/static/filecenter/time.png),
  725. linear-gradient(
  726. to right,
  727. rgba(55, 135, 254, 0.08),
  728. rgba(4, 184, 255, 0.08),
  729. rgba(60, 161, 237, 0.08)
  730. );
  731. background-size: auto 100%;
  732. background-position: right;
  733. background-repeat: no-repeat;
  734. }
  735. .laiyuan {
  736. background: url(/static/filecenter/laiyuan.png),
  737. linear-gradient(
  738. to right,
  739. rgba(55, 135, 254, 0.08),
  740. rgba(4, 184, 255, 0.08),
  741. rgba(60, 161, 237, 0.08)
  742. );
  743. background-size: auto 100%;
  744. background-position: right;
  745. background-repeat: no-repeat;
  746. }
  747. .user {
  748. background: url(/static/filecenter/user.png),
  749. linear-gradient(
  750. to right,
  751. rgba(55, 135, 254, 0.08),
  752. rgba(4, 184, 255, 0.08),
  753. rgba(60, 161, 237, 0.08)
  754. );
  755. background-size: auto 100%;
  756. background-position: right;
  757. background-repeat: no-repeat;
  758. }
  759. .zhuangtai {
  760. background: url(/static/filecenter/zhuangtai.png),
  761. linear-gradient(
  762. to right,
  763. rgba(55, 135, 254, 0.08),
  764. rgba(4, 184, 255, 0.08),
  765. rgba(60, 161, 237, 0.08)
  766. );
  767. background-size: auto 100%;
  768. background-position: right;
  769. background-repeat: no-repeat;
  770. }
  771. .datacard1 {
  772. width: 100%;
  773. margin: 1%;
  774. float: left;
  775. height: 100rpx;
  776. text-align: center;
  777. border-radius: 10px;
  778. background: linear-gradient(
  779. to right,
  780. rgba(55, 135, 254, 0.08),
  781. rgba(4, 184, 255, 0.08),
  782. rgba(60, 161, 237, 0.08)
  783. );
  784. }
  785. .title {
  786. width: 100%;
  787. height: 50rpx;
  788. background: url(/static/warndata/title.png);
  789. background-repeat: no-repeat;
  790. background-size: 100% 100%;
  791. display: flex; /* 将父级元素设置为 Flex 容器 */
  792. align-items: center; /* 垂直居中子元素 */
  793. }
  794. .firetext {
  795. margin: 20px;
  796. font-weight: bold;
  797. }
  798. .custom-header-class {
  799. background-color: #f8f8f8;
  800. color: #333;
  801. }
  802. .table-container {
  803. overflow-x: auto; /* 允许横向滚动 */
  804. }
  805. .table {
  806. width: 100%;
  807. margin: 10px;
  808. width: max-content; /* 或者设置一个足够大的宽度以容纳所有列 */
  809. display: flex;
  810. flex-direction: column;
  811. }
  812. .table-header,
  813. .table-row {
  814. display: flex; /* 启用Flex布局 */
  815. }
  816. .table-cell {
  817. padding: 8px;
  818. flex: 1;
  819. text-align: center;
  820. border: 1px solid #ccc; /* 底部边框 */
  821. }
  822. </style>