filecenter.vue 24 KB

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