filecenter.vue 23 KB

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