filecenter.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  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="subsection"
  52. :current="curNow"
  53. @change="sectionChange"
  54. :active-color="'#4590fe'"
  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: "全部类型", value: "" },
  287. { label: ".txt", value: "txt" },
  288. { label: ".doc", value: "doc" },
  289. { label: ".docx", value: "docx" },
  290. { label: ".xls", value: "xls" },
  291. { label: ".xlsx", value: "xlsx" },
  292. { label: ".ppt", value: "ppt" },
  293. { label: ".pptx", value: "pptx" },
  294. { label: ".jpg", value: "jpg" },
  295. { label: ".png", value: "png" },
  296. { label: ".pdf", value: "pdf" },
  297. ],
  298. ],
  299. fileType: "", //文件类型
  300. pickershow: false,
  301. curNow: 0,
  302. fileData: [],
  303. bpmStatus: 1, //1处理中 2 已完成 3 已驳回
  304. show: false, //删除modal
  305. content: "确定要删除吗?",
  306. selectItem: "", //选择文件
  307. showretract: false, //撤回popup
  308. value1: "", //撤回原因
  309. cancelItem: "", //撤回文件
  310. detailShow: false, //详情
  311. notifyShow: false, //撤回文件提示消息显示
  312. commitShow: false, //提交
  313. columns: [],
  314. commitItem: "", //提交文件
  315. selectFile: [],
  316. tableData: [], //审批内容
  317. detailItem: "", //详情文件
  318. imageUrl: "",
  319. fileName: "", //文件名称搜索框
  320. menushow: false,
  321. };
  322. },
  323. mounted() {
  324. this.getFileInfo();
  325. },
  326. computed: {},
  327. methods: {
  328. // fileTreeShow(e) {
  329. // this.menushow = !this.menushow;
  330. // },
  331. menuClick(id) {
  332. this.menushow = false;
  333. },
  334. //选择文件类型
  335. selectFileType(e) {
  336. this.pickershow = false;
  337. if (e.value[0].label === "全部类型") {
  338. this.fileType = "";
  339. } else {
  340. this.fileType = e.value[0].label;
  341. }
  342. },
  343. //根据条件查询相关文件
  344. searchFile() {
  345. this.getFileInfo();
  346. },
  347. sectionChange(newVal) {
  348. this.curNow = newVal;
  349. if (this.curNow === 0) {
  350. // 如果选择了“全部”,返回所有文件
  351. this.bpmStatus = "";
  352. this.getFileInfo();
  353. } else if (this.curNow === 1) {
  354. // 否则,根据curNow的值过滤文件
  355. this.bpmStatus = 1;
  356. this.getFileInfo();
  357. } else if (this.curNow === 2) {
  358. this.bpmStatus = 2;
  359. this.getFileInfo();
  360. }
  361. },
  362. getTreeList() {
  363. var params = { parentId: "" };
  364. new Promise((resolve, reject) => {
  365. api
  366. .getFileInfo(params)
  367. .then((response) => {
  368. if (response.data.code == 200) {
  369. let data = response.data.result.records;
  370. let datas = data.filter((v) => v.fileType == null);
  371. let list = list2trees(datas);
  372. listArr.push(...list);
  373. } else {
  374. reject(response);
  375. }
  376. })
  377. .catch((error) => {
  378. console.log("catch===>response", response);
  379. reject(error);
  380. });
  381. });
  382. },
  383. getFileInfo() {
  384. var params = {
  385. bpmStatus: this.bpmStatus,
  386. column: "createTime",
  387. fileSuffix: this.fileType,
  388. likeFileName: this.fileName,
  389. pageNo: 1,
  390. pageSize: 10000,
  391. parentId: "",
  392. selectFlag: true,
  393. sysOrgCode: "",
  394. };
  395. new Promise((resolve, reject) => {
  396. api
  397. .getFileInfo(params)
  398. .then((response) => {
  399. if (response.data.code == 200) {
  400. this.fileData = response.data.result.records;
  401. } else {
  402. reject(response);
  403. }
  404. })
  405. .catch((error) => {
  406. console.log("catch===>response", response);
  407. reject(error);
  408. });
  409. });
  410. },
  411. //查看文件内容
  412. openFile(params) {
  413. uni.downloadFile({
  414. url:
  415. configService.apiUrl +
  416. "/ventanaly-sharefile/fileServer/onlyOffice/read?id=" +
  417. params.id,
  418. success: function (res) {
  419. var filePath = res.tempFilePath;
  420. uni.openDocument({
  421. filePath: filePath,
  422. showMenu: true,
  423. success: function (res) {
  424. console.log("打开文档成功");
  425. },
  426. });
  427. },
  428. });
  429. },
  430. // //下载文件到手机
  431. download(params) {
  432. var fileiId = params.id;
  433. var params = {
  434. id: fileiId,
  435. };
  436. new Promise((resolve, reject) => {
  437. api
  438. .downloadFile(params)
  439. .then((response) => {
  440. if (response.statusCode == 200) {
  441. console.log(response, "111");
  442. // const blob = new Blob([response.data], {
  443. // type: "charset=UTF-8",
  444. // }); // 构造一个blob对象来处理数据
  445. // if ("download" in document.createElement("a")) {
  446. // // 支持a标签download的浏览器
  447. // const link = document.createElement("a"); // 创建a标签
  448. // link.href = URL.createObjectURL(blob);
  449. // document.body.appendChild(link);
  450. // link.click(); // 执行下载
  451. // URL.revokeObjectURL(link.href); //
  452. // document.body.removeChild(link); //
  453. // }
  454. } else {
  455. // console.log("请求下载文件失败:", err);
  456. }
  457. })
  458. .catch((error) => {
  459. reject(error);
  460. });
  461. });
  462. },
  463. // //删除文件
  464. showmodal(data) {
  465. this.selectItem = data;
  466. this.show = true;
  467. },
  468. confirm() {
  469. this.delatefile(this.selectItem);
  470. },
  471. cancel() {
  472. this.show = false;
  473. },
  474. delatefile(params) {
  475. var fileiId = params.id;
  476. new Promise((resolve, reject) => {
  477. api
  478. .delateFile({ id: fileiId })
  479. .then((response) => {
  480. if (response.data.code == 200) {
  481. this.show = false;
  482. this.getFileInfo();
  483. } else {
  484. // console.log("请求下载文件失败:", err);
  485. }
  486. })
  487. .catch((error) => {
  488. reject(error);
  489. });
  490. });
  491. },
  492. //撤回文件
  493. retractmodal(data) {
  494. this.showretract = true;
  495. this.cancelItem = data;
  496. },
  497. close() {
  498. this.showretract = false;
  499. },
  500. cancelRetract() {
  501. this.showretract = false;
  502. },
  503. confirmRetract() {
  504. this.value1 = "";
  505. var fileiId = this.cancelItem.id;
  506. var params = {
  507. tableId: fileiId,
  508. reason: this.value1,
  509. tableName: this.cancelItem.tableName,
  510. };
  511. if (this.cancelItem.bpmStatus == 1) {
  512. new Promise((resolve, reject) => {
  513. api
  514. .cancelFile(params)
  515. .then((response) => {
  516. if (response.data.code == 200) {
  517. this.showretract = false;
  518. this.getFileInfo();
  519. } else {
  520. // console.log("请求下载文件失败:", err);
  521. }
  522. })
  523. .catch((error) => {
  524. reject(error);
  525. });
  526. });
  527. } else {
  528. this.notifyShow = true;
  529. }
  530. },
  531. // 详情
  532. detailmodal(data) {
  533. this.detailShow = true;
  534. var fileiId = data.id;
  535. var tablename = data.tableName;
  536. var params = {
  537. tableId: fileiId,
  538. tableName: tablename,
  539. };
  540. new Promise((resolve, reject) => {
  541. api
  542. .gethistoricFlowNew(params)
  543. .then((response) => {
  544. if (response.data.code == 200) {
  545. var detailData = response.data;
  546. this.tableData = detailData.result;
  547. } else {
  548. // console.log("请求下载文件失败:", err);
  549. }
  550. })
  551. .catch((error) => {
  552. reject(error);
  553. });
  554. });
  555. this.getDetailImg(data);
  556. },
  557. getDetailImg(data) {
  558. var fileiId = data.id;
  559. var tablename = data.tableName;
  560. var params = {
  561. tableId: fileiId,
  562. tableName: tablename,
  563. };
  564. new Promise((resolve, reject) => {
  565. api
  566. .getHighlightImgNew(params)
  567. .then((response) => {
  568. if (response.statusCode == 200) {
  569. this.imageUrl = response.config.baseUrl + response.config.url;
  570. } else {
  571. // console.log("请求下载文件失败:", err);
  572. }
  573. })
  574. .catch((error) => {
  575. reject(error);
  576. });
  577. });
  578. },
  579. detailClose() {
  580. this.detailShow = false;
  581. },
  582. // 提交
  583. commitmodal(data) {
  584. this.commitShow = true;
  585. this.commitItem = data;
  586. this.getListFile();
  587. },
  588. getListFile() {
  589. this.columns = [];
  590. var params = {
  591. zx: true,
  592. column: "createTime",
  593. order: "desc",
  594. status: 1,
  595. _t: Date.now(),
  596. };
  597. new Promise((resolve, reject) => {
  598. api
  599. .getListFile(params)
  600. .then((response) => {
  601. if (response.data.code == 200) {
  602. this.selectFile = response.data.result;
  603. this.selectFile.forEach((item) => {
  604. this.columns.push(item.id);
  605. console.log(this.columns);
  606. });
  607. } else {
  608. // console.log("请求下载文件失败:", err);
  609. }
  610. })
  611. .catch((error) => {
  612. reject(error);
  613. });
  614. });
  615. },
  616. confirmCommit() {
  617. var fileiId = this.commitItem.id;
  618. var reqDefId = this.columns[0];
  619. var params = {
  620. tableId: fileiId,
  621. procDefId: reqDefId,
  622. firstGateway: true,
  623. };
  624. new Promise((resolve, reject) => {
  625. api
  626. .commitFile(params)
  627. .then((response) => {
  628. if (response.data.code == 200) {
  629. this.commitShow = false;
  630. this.getFileInfo();
  631. } else {
  632. // console.log("请求下载文件失败:", err);
  633. }
  634. })
  635. .catch((error) => {
  636. reject(error);
  637. });
  638. });
  639. },
  640. cancelCommit() {
  641. this.commitShow = false;
  642. },
  643. },
  644. };
  645. </script>
  646. <style scoped>
  647. .fileTitle {
  648. margin-right: 20px;
  649. line-height: 40px;
  650. }
  651. .fileArea,
  652. .pickerArea {
  653. display: flex;
  654. flex-direction: row;
  655. justify-content: space-around;
  656. }
  657. .btns {
  658. width: 100%;
  659. display: flex;
  660. flex-direction: row;
  661. justify-content: space-around;
  662. }
  663. .button-container {
  664. display: flex;
  665. justify-content: space-between;
  666. margin-top: 10px; /* 根据需要调整 */
  667. }
  668. button {
  669. /* 样式可以根据需要自定义 */
  670. padding: 10px 20px;
  671. background-color: #007aff;
  672. color: white;
  673. border: none;
  674. border-radius: 5px;
  675. cursor: pointer;
  676. }
  677. .container {
  678. margin-top: 30px;
  679. }
  680. .main {
  681. display: flex;
  682. flex-direction: column;
  683. }
  684. .itemback {
  685. padding: 20rpx;
  686. background-color: #ffffff;
  687. margin-bottom: 5rpx;
  688. display: flex;
  689. }
  690. .btnClass {
  691. display: flex;
  692. justify-content: space-around;
  693. margin-top: 20rpx;
  694. }
  695. .btn {
  696. border-radius: 10rpx;
  697. margin-right: 10rpx; /* 示例:添加一些右外边距,但确保它不会导致换行 */
  698. }
  699. /* 最后一个按钮不需要右外边距 */
  700. .btn:last-child {
  701. margin-right: 0;
  702. }
  703. .text-style {
  704. color: #3787fe;
  705. font-weight: bold;
  706. }
  707. .text-style1 {
  708. color: #000000;
  709. font-size: large;
  710. font-weight: bold;
  711. }
  712. .datacard {
  713. width: 48%;
  714. margin: 1%;
  715. float: left;
  716. height: 120rpx;
  717. border-radius: 10px;
  718. }
  719. .time {
  720. background: url(/static/filecenter/time.png),
  721. linear-gradient(
  722. to right,
  723. rgba(55, 135, 254, 0.08),
  724. rgba(4, 184, 255, 0.08),
  725. rgba(60, 161, 237, 0.08)
  726. );
  727. background-size: auto 100%;
  728. background-position: right;
  729. background-repeat: no-repeat;
  730. }
  731. .laiyuan {
  732. background: url(/static/filecenter/laiyuan.png),
  733. linear-gradient(
  734. to right,
  735. rgba(55, 135, 254, 0.08),
  736. rgba(4, 184, 255, 0.08),
  737. rgba(60, 161, 237, 0.08)
  738. );
  739. background-size: auto 100%;
  740. background-position: right;
  741. background-repeat: no-repeat;
  742. }
  743. .user {
  744. background: url(/static/filecenter/user.png),
  745. linear-gradient(
  746. to right,
  747. rgba(55, 135, 254, 0.08),
  748. rgba(4, 184, 255, 0.08),
  749. rgba(60, 161, 237, 0.08)
  750. );
  751. background-size: auto 100%;
  752. background-position: right;
  753. background-repeat: no-repeat;
  754. }
  755. .zhuangtai {
  756. background: url(/static/filecenter/zhuangtai.png),
  757. linear-gradient(
  758. to right,
  759. rgba(55, 135, 254, 0.08),
  760. rgba(4, 184, 255, 0.08),
  761. rgba(60, 161, 237, 0.08)
  762. );
  763. background-size: auto 100%;
  764. background-position: right;
  765. background-repeat: no-repeat;
  766. }
  767. .datacard1 {
  768. width: 100%;
  769. margin: 1%;
  770. float: left;
  771. height: 100rpx;
  772. text-align: center;
  773. border-radius: 10px;
  774. background: linear-gradient(
  775. to right,
  776. rgba(55, 135, 254, 0.08),
  777. rgba(4, 184, 255, 0.08),
  778. rgba(60, 161, 237, 0.08)
  779. );
  780. }
  781. .title {
  782. width: 100%;
  783. height: 50rpx;
  784. background: url(/static/warndata/title.png);
  785. background-repeat: no-repeat;
  786. background-size: 100% 100%;
  787. display: flex; /* 将父级元素设置为 Flex 容器 */
  788. align-items: center; /* 垂直居中子元素 */
  789. }
  790. .firetext {
  791. margin: 20px;
  792. font-weight: bold;
  793. }
  794. .custom-header-class {
  795. background-color: #f8f8f8;
  796. color: #333;
  797. }
  798. .table-container {
  799. overflow-x: auto; /* 允许横向滚动 */
  800. }
  801. .table {
  802. width: 100%;
  803. margin: 10px;
  804. width: max-content; /* 或者设置一个足够大的宽度以容纳所有列 */
  805. display: flex;
  806. flex-direction: column;
  807. }
  808. .table-header,
  809. .table-row {
  810. display: flex; /* 启用Flex布局 */
  811. }
  812. .table-cell {
  813. padding: 8px;
  814. flex: 1;
  815. text-align: center;
  816. border: 1px solid #ccc; /* 底部边框 */
  817. }
  818. </style>