index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <template>
  2. <div class="container" v-if="!showPreview">
  3. <div class="statistics">
  4. <div class="left_box">
  5. <div class="dataNum">共查询到个相关结果</div>
  6. </div>
  7. <div class="right_box">
  8. <img
  9. src="@/assets/images/sort.png"
  10. @click="changeSort"
  11. v-if="isAsc == 'asc'"
  12. alt=""
  13. />
  14. <img
  15. src="@/assets/images/Frame_188.png"
  16. @click="changeSort"
  17. v-else
  18. alt=""
  19. />
  20. <img
  21. v-if="isList"
  22. src="@/assets/images/squre.png"
  23. alt=""
  24. @click="changeShow"
  25. />
  26. <img
  27. v-else
  28. src="@/assets/images/Frame_187.png"
  29. alt=""
  30. @click="changeShow"
  31. />
  32. </div>
  33. </div>
  34. <!-- 标签 -->
  35. <div class="tags">
  36. <!-- TODO 标签可以拖动位置 -->
  37. <!--
  38. <el-tabs v-if="false" v-model="clickCollect" class="demo-tabs tabSign">
  39. <el-tab-pane label="常用" name="first"></el-tab-pane>
  40. <el-tab-pane label="默认" name="second"></el-tab-pane>
  41. <draggable
  42. :list="toRaw(tabList)"
  43. ghost-class="ghost"
  44. chosen-class="chosenClass"
  45. animation="300"
  46. >
  47. <template #item="{ element }">
  48. <el-tab-pane>
  49. <template #label>
  50. <div
  51. v-if="isChangeTabName !== element.labelId"
  52. @click.right="tabClick($event, element)"
  53. >
  54. {{ element.labelName }}
  55. </div>
  56. <div v-else>
  57. <el-input
  58. v-model="changeTabName"
  59. size="mini"
  60. @blur="reTabName"
  61. maxlength="32"
  62. :autofocus="true"
  63. ></el-input>
  64. </div>
  65. </template>
  66. </el-tab-pane>
  67. </template>
  68. </draggable>
  69. </el-tabs> -->
  70. <el-tabs
  71. v-model="clickCollect"
  72. class="tabSign"
  73. @tab-change="tabchange"
  74. ref="tabs"
  75. >
  76. <!-- <el-tab-pane label="常用" name="first"></el-tab-pane> -->
  77. <el-tab-pane label="默认" name="second"></el-tab-pane>
  78. <el-tab-pane
  79. v-for="item in toRaw(tabList)"
  80. :key="item"
  81. :name="item.labelId"
  82. >
  83. <template #label>
  84. <div
  85. v-if="isChangeTabName !== item.labelId"
  86. @click.right="tabClick($event, item)"
  87. >
  88. {{ item.labelName }}
  89. </div>
  90. <div v-else>
  91. <el-input
  92. v-model="changeTabName"
  93. size="mini"
  94. @blur="reTabName"
  95. maxlength="32"
  96. :autofocus="true"
  97. ></el-input>
  98. </div>
  99. </template>
  100. </el-tab-pane>
  101. </el-tabs>
  102. <!-- 添加标签 -->
  103. <div class="addCollect">
  104. <div v-if="!isAddCollect">
  105. <el-icon color="#2E6BC8">
  106. <Plus />
  107. </el-icon>
  108. <span @click="toAddCollectFn">添加标签</span>
  109. </div>
  110. <div v-else>
  111. <el-input
  112. v-model="tabName"
  113. size="mini"
  114. @change="addCollectFn"
  115. maxlength="32"
  116. :autofocus="true"
  117. ></el-input>
  118. </div>
  119. </div>
  120. </div>
  121. <el-collapse v-model="activeNames">
  122. <div v-if="isList">
  123. <el-collapse-item name="folder">
  124. <template #title>
  125. <span class="collapseItem_title">文件夹</span>
  126. </template>
  127. <!-- 表格 -->
  128. <el-table
  129. :data="folderArr"
  130. style="width: 100%"
  131. height="250"
  132. :scrollbar-always-on="true"
  133. @row-contextmenu="fileRightTable"
  134. >
  135. <el-table-column fixed prop="date" label="名称" width="500">
  136. <template #default="scope">
  137. <div class="folderName">
  138. <img
  139. class="table_icon"
  140. src="@/assets/images/fileBox.png"
  141. alt=""
  142. style=""
  143. />
  144. <span class="shouzhi">{{ scope.row.docDir.dirName }}</span>
  145. </div>
  146. </template>
  147. </el-table-column>
  148. <el-table-column
  149. prop="docDir.createTime"
  150. label="时间"
  151. width="200"
  152. />
  153. <el-table-column prop="docInfo.fileType" label="类型" width="180">
  154. <!-- <template #default="scope"> -->
  155. <div>文件夹</div>
  156. <!-- </template> -->
  157. </el-table-column>
  158. </el-table>
  159. </el-collapse-item>
  160. <el-collapse-item name="file">
  161. <template #title>
  162. <span class="collapseItem_title">文件</span>
  163. </template>
  164. <!-- 表格 -->
  165. <el-table
  166. :data="fileArr"
  167. style="width: 100%"
  168. height="250"
  169. :scrollbar-always-on="true"
  170. @row-contextmenu="fileRightTable"
  171. >
  172. <el-table-column fixed prop="date" label="名称" width="500">
  173. <template #default="scope">
  174. <div class="fileName">
  175. <img
  176. class="table_icon"
  177. :src="setIcon(scope.row.docInfo.fileType)"
  178. alt=""
  179. style=""
  180. />
  181. <span class="shouzhi"> {{ scope.row.docInfo.fileName }}</span>
  182. </div>
  183. </template>
  184. </el-table-column>
  185. <el-table-column prop="createTime" label="时间" width="200" />
  186. <el-table-column prop="docInfo.fileType" label="类型" width="180" />
  187. <el-table-column prop="docInfo.fileSize" label="大小" width="160">
  188. <template #default="scope">
  189. <div>{{ scope.row.docInfo.fileSize }} KB</div>
  190. </template>
  191. </el-table-column>
  192. </el-table>
  193. </el-collapse-item>
  194. </div>
  195. <div v-else>
  196. <el-collapse-item name="folder">
  197. <template #title>
  198. <span class="collapseItem_title">文件夹</span>
  199. </template>
  200. <!-- 平铺 -->
  201. <el-scrollbar style="height: 37vh;">
  202. <div class="tile_box">
  203. <div
  204. class="file_box"
  205. @click.right="fileRight($event, item)"
  206. v-for="item in folderArr"
  207. :key="item"
  208. >
  209. <img
  210. class="big_file_img"
  211. src="@/assets/images/fileBox.png"
  212. alt=""
  213. />
  214. <el-tooltip
  215. class="box-item"
  216. effect="dark"
  217. :content="item.docDir.dirName"
  218. placement="top"
  219. >
  220. <span>{{ item.docDir.dirName }}</span>
  221. </el-tooltip>
  222. </div>
  223. </div>
  224. </el-scrollbar>
  225. </el-collapse-item>
  226. <el-collapse-item name="file">
  227. <template #title>
  228. <span class="collapseItem_title">文件</span>
  229. </template>
  230. <!-- 平铺 -->
  231. <el-scrollbar style="height: 37vh;">
  232. <div class="tile_box">
  233. <div
  234. class="file_box"
  235. @click.right="fileRight($event, item)"
  236. v-for="item in fileArr"
  237. :key="item"
  238. >
  239. <img
  240. class="big_file_img"
  241. :src="setIcon(item.docInfo.fileType)"
  242. alt=""
  243. />
  244. <el-tooltip
  245. class="box-item"
  246. effect="dark"
  247. :content="item.docInfo.fileName"
  248. placement="top"
  249. >
  250. <span>{{ item.docInfo.fileName }}</span>
  251. </el-tooltip>
  252. </div>
  253. </div>
  254. </el-scrollbar>
  255. </el-collapse-item>
  256. </div>
  257. </el-collapse>
  258. </div>
  259. <!-- 右键唤出的菜单 -->
  260. <!-- TODO 默认就是不搜索标签 -->
  261. <div
  262. class="right_menu shouzhi"
  263. v-if="visible"
  264. :style="{ left: left + 'px', top: top + 'px',margin:'0' }"
  265. >
  266. <div class="menu_item" @click="reName">
  267. <img src="@/assets/images/textbox.png" alt="" />
  268. <span>重命名</span>
  269. </div>
  270. <div class="menu_item" @click="delTabs">
  271. <img src="@/assets/images/trash.png" alt="" />
  272. <span>删除</span>
  273. </div>
  274. </div>
  275. <div v-else class="preview">
  276. <!-- TODO 预览功能后续实现-->
  277. <!-- <FileEdit
  278. :docId="thisRData.docInfo.docId"
  279. :copyRow="thisRData"
  280. :historyPrew="historyPrew"
  281. :historycopyRow="historycopyRow"
  282. :onlyView="onlyView"
  283. ></FileEdit> -->
  284. </div>
  285. <RightMenu v-if="showFlieRM" :fileRightXY="fileRightXY"></RightMenu>
  286. </template>
  287. <script setup>
  288. import Sortable from "sortablejs";
  289. // import { setIcon } from "@/utils/index.js";
  290. import draggable from "vuedraggable";
  291. import FileEdit from "@/views/myfile/components/FileEdit.vue";
  292. import { onMounted, ref, watch, nextTick } from "vue";
  293. import { toRaw } from "@vue/reactivity";
  294. import {
  295. listLabel,
  296. addLabel,
  297. delLabel,
  298. updateLabel,
  299. sortLabel,
  300. } from "@/api/biz/label.js";
  301. import { listFavorite, listFavoriteById } from "@/api/biz/favorite.js";
  302. import RightMenu from "@/components/RightMenu/index.vue";
  303. const activeNames = ref(["folder", "file"]);
  304. const clickCollect = ref("second"); //当前标签
  305. const isAddCollect = ref(false); //是否在添加标签
  306. const tabName = ref(""); //新增的标签名
  307. const changeTabName = ref(""); //修改的标签名
  308. const tabList = ref([]);
  309. const isAsc = ref("asc");
  310. const tableData = [];
  311. const visible = ref(false); //显示右键菜单
  312. const top = ref(0);
  313. const left = ref(0);
  314. const thisTab = ref({}); //当前右键的标签
  315. const isChangeTabName = ref(0); //存放修改状标签的id
  316. const folderArr = ref(); //文件夹数组
  317. const fileArr = ref(); //文件数组
  318. const isList = ref(false); //控制显示方式
  319. const showPreview = ref(false); //预览
  320. const fileRightXY = ref({}); //右键菜单坐标
  321. const showFlieRM = ref(false); //右键菜单显示
  322. const thisRData = ref(); //当前右键的文件
  323. //----引入图片----
  324. import file_DOC from "../../assets/images/fileType/file_DOC.png";
  325. import file_pdf from "../../assets/images/fileType/file_pdf.png";
  326. import file_PPT from "../../assets/images/fileType/file_PPT.png";
  327. import file_TXT from "../../assets/images/fileType/file_TXT.png";
  328. import file_XLSX from "../../assets/images/fileType/file_XLSX.png";
  329. import file_pic from "../../assets/images/fileType/file_pic.png";
  330. import file_audio from "../../assets/images/fileType/file_audio.png";
  331. import file_video from "../../assets/images/fileType/file_video.png";
  332. import file_zip from "../../assets/images/fileType/file_zip.png";
  333. // -------
  334. onMounted(async () => {
  335. await getList();
  336. await getCollectList();
  337. await tabchange('second')
  338. // rowDrop();
  339. // 添加监听,点击其他地方关闭菜单
  340. window.addEventListener("click", closeMenu, true);
  341. window.addEventListener("click", closeFlieRMenu, true);
  342. });
  343. // tab右键事件
  344. const tabClick = (e, item) => {
  345. e.preventDefault();
  346. e.stopPropagation();
  347. // console.log("e", e);
  348. // console.log("item", toRaw(item));
  349. thisTab.value = item;
  350. // 唤出右键菜单,思路:获取鼠标位置来定位菜单
  351. visible.value = true;
  352. top.value = e.pageY;
  353. left.value = e.pageX;
  354. };
  355. // file右键事件
  356. const fileRight = (e, item) => {
  357. e.preventDefault();
  358. e.stopPropagation();
  359. // console.log("e", e);
  360. // console.log("item", toRaw(item));
  361. // 唤出右键菜单,思路:获取鼠标位置来定位菜单
  362. thisRData.value = item;
  363. console.log("thisRData", thisRData.value);
  364. showFlieRM.value = true;
  365. fileRightXY.value.top = e.pageY;
  366. fileRightXY.value.left = e.pageX;
  367. };
  368. // folder右键事件
  369. const fileRightTable = (item, col, e) => {
  370. e.preventDefault();
  371. e.stopPropagation();
  372. // console.log("e", e);
  373. // console.log("item", toRaw(item));
  374. // 唤出右键菜单,思路:获取鼠标位置来定位菜单
  375. thisRData.value = item;
  376. console.log("thisRData", thisRData.value);
  377. showFlieRM.value = true;
  378. fileRightXY.value.top = e.pageY;
  379. fileRightXY.value.left = e.pageX;
  380. };
  381. // 关闭右键菜单
  382. const closeMenu = () => {
  383. // console.log("close");
  384. visible.value = false;
  385. };
  386. // 关闭右键菜单
  387. const closeFlieRMenu = () => {
  388. // console.log("close");
  389. showFlieRM.value = false;
  390. };
  391. //添加标签
  392. const toAddCollectFn = async () => {
  393. isAddCollect.value = true;
  394. };
  395. const addCollectFn = async () => {
  396. if (!tabName.value) {
  397. isAddCollect.value = false;
  398. return;
  399. }
  400. const list = toRaw(tabList.value);
  401. let order = 0;
  402. if (list.length > 0) {
  403. order = getBigOrder(list);
  404. }
  405. const res = await addLabel({
  406. labelName: tabName.value,
  407. orderNum: order,
  408. });
  409. if (res.code == 200) {
  410. isAddCollect.value = false;
  411. tabName.value = "";
  412. getList();
  413. }
  414. };
  415. //获取标签数据
  416. const getList = async () => {
  417. const res = await listLabel();
  418. console.log("tabList =", res);
  419. if (res.rows.length > 0) {
  420. let dates = JSON.parse(JSON.stringify(res.rows));
  421. dates.sort(sortArr("orderNum"));
  422. tabList.value = [...dates];
  423. // console.log("tabList", tabList.value);
  424. // console.log("dates", dates);
  425. }
  426. };
  427. // 删除标签
  428. const delTabs = async () => {
  429. let tabDetail = toRaw(thisTab.value);
  430. const res = await delLabel(tabDetail.labelId); //直接传id
  431. // console.log("delres = ", res);
  432. getList();
  433. };
  434. // TODO 按标签获取收藏数据,实现文件夹收藏功能,文件夹右键菜单和文件右键菜单样式统一
  435. //获取收藏数据
  436. const getCollectList = async () => {
  437. const res = await listFavorite();
  438. console.log("collectres = ", res);
  439. if (res.code === 200 && res.rows.length > 0) {
  440. tableData.value = res.rows;
  441. }
  442. };
  443. // 修改便签名
  444. const reName = async () => {
  445. console.log("thisTab", toRaw(thisTab.value));
  446. let tabDetail = toRaw(thisTab.value);
  447. changeTabName.value = tabDetail.labelName;
  448. isChangeTabName.value = tabDetail.labelId;
  449. };
  450. const reTabName = async () => {
  451. let tabDetail = toRaw(thisTab.value);
  452. const res = await updateLabel({
  453. labelId: tabDetail.labelId,
  454. labelName: changeTabName.value,
  455. });
  456. await getList();
  457. isChangeTabName.value = 0;
  458. console.log("rename", res);
  459. };
  460. //拖拽事件
  461. // const rowDrop = () => {
  462. // const el = document.querySelector(".tabSign .el-tabs__nav"); //找到想要拖拽的那一列
  463. // // console.log('el',el);
  464. // const _this = toRaw(JSON.parse(JSON.stringify(tabList.value))); //否则下面遍历会出错
  465. // // console.log("_this", _this);
  466. // Sortable.create(el, {
  467. // filter: "#tab-first,#tab-second", //限制哪些可以拖动
  468. // preventOnFilter: true,
  469. // onChoose: function (/**Event*/ evt) {
  470. // evt.oldIndex;
  471. // // console.log("evt", evt);
  472. // },
  473. // //结束拖拽事件
  474. // async onEnd({ newIndex, oldIndex, to }) {
  475. // //拿到交换前后对应的index
  476. // const ni = newIndex - 3;
  477. // const oi = oldIndex - 3;
  478. // let list = toRaw(tabList.value);
  479. // list = list.filter((item) => item); //筛除空数据
  480. // console.log("list", list);
  481. // console.log("newIndex", ni);
  482. // console.log("oldIndex", oi);
  483. // const newList = list.map((item, index) => {
  484. // console.log("item", item);
  485. // if (oi > ni) {
  486. // // 从后往前,需要将oi和ni之间的+1
  487. // if (index === oi) {
  488. // item.orderNum = _this[ni].orderNum;
  489. // // console.log("oiitem", item);
  490. // } else if (ni < index < oi) {
  491. // item.orderNum += 1;
  492. // }
  493. // } else if (oi < ni) {
  494. // // 从前往后,需要将oi和ni之间的-1
  495. // if (index === oi) {
  496. // item.orderNum = _this[ni].orderNum;
  497. // // console.log("oiitem", item);
  498. // } else if (oi < index < ni) {
  499. // item.orderNum -= 1;
  500. // }
  501. // }
  502. // return item;
  503. // });
  504. // console.log("newList", newList);
  505. // const res = await sortLabel(newList);
  506. // console.log("res", res);
  507. // await getList();
  508. // },
  509. // });
  510. // };
  511. const tabchange = async (labelId) => {
  512. console.log("labelId", toRaw(labelId));
  513. const query = {
  514. labelId,
  515. isAsc: isAsc.value,
  516. orderByColumn: "createTime",
  517. };
  518. let res;
  519. if (labelId === "second") {
  520. res = await listFavoriteById(-1);
  521. console.log("res", res);
  522. // return;
  523. } else {
  524. // 获取当前标签下的数据
  525. res = await listFavoriteById(labelId);
  526. }
  527. // console.log("----res", res);
  528. folderArr.value = res.filter((item) => item.isFolder === "Y");
  529. fileArr.value = res.filter((item) => item.isFolder === "N");
  530. console.log("folderArr", folderArr.value);
  531. console.log("fileArr", fileArr.value);
  532. };
  533. const changeShow = () => {
  534. isList.value = !isList.value;
  535. };
  536. const changeSort = async () => {
  537. isAsc.value == "asc" ? (isAsc.value = "desc") : (isAsc.value = "asc");
  538. // console.log("res", res);
  539. };
  540. // 工具函数
  541. //获取新增标签时要赋予的ordername
  542. const getBigOrder = (arr) => {
  543. let num = 0;
  544. arr.forEach((item) => {
  545. if (item.orderNum > num) {
  546. num = item.orderNum;
  547. }
  548. });
  549. return num + 1;
  550. };
  551. //数组排序
  552. const sortArr = (field) => {
  553. return function (a, b) {
  554. return a[field] - b[field];
  555. };
  556. };
  557. const setIcon = (fileType) => {
  558. switch (fileType) {
  559. case ".docx":
  560. return file_DOC;
  561. break;
  562. case ".pdf":
  563. return file_pdf;
  564. break;
  565. case ".ppt":
  566. return file_PPT;
  567. break;
  568. case ".txt":
  569. return file_TXT;
  570. break;
  571. case ".xlsx":
  572. return file_XLSX;
  573. break;
  574. case ".csv":
  575. return file_XLSX;
  576. break;
  577. case ".png":
  578. return file_pic;
  579. break;
  580. case ".mp3":
  581. return file_audio;
  582. break;
  583. case ".mp4":
  584. return file_video;
  585. break;
  586. case ".zip":
  587. return file_zip;
  588. break;
  589. default:
  590. return file_DOC;
  591. break;
  592. }
  593. };
  594. </script>
  595. <style lang="scss" scoped>
  596. @import "@/assets/styles/my-common.scss";
  597. .shouzhi {
  598. margin-left: 5px;
  599. }
  600. .container {
  601. height: 100%;
  602. background-color: #fff;
  603. border-radius: 4px;
  604. .statistics {
  605. width: 100%;
  606. height: 40px;
  607. background-color: #d9e0f0;
  608. padding-left: 16px;
  609. display: flex;
  610. justify-content: space-between;
  611. align-items: center;
  612. color: #6f85b5;
  613. .left_box {
  614. display: flex;
  615. align-items: center;
  616. .dataNum {
  617. margin-left: 4px;
  618. font-size: 14px;
  619. font-weight: 400;
  620. }
  621. }
  622. .right_box {
  623. width: 50px;
  624. display: flex;
  625. justify-content: space-between;
  626. margin-right: 30px;
  627. img {
  628. cursor: pointer;
  629. }
  630. }
  631. }
  632. .tags {
  633. display: flex;
  634. width: 100%;
  635. height: 40px;
  636. box-sizing: border-box;
  637. border-top: 1px solid #c1cce3;
  638. border-bottom: 1px solid #c1cce3;
  639. background-color: #f5f7f9;
  640. }
  641. .addCollect {
  642. margin-left: 16px;
  643. cursor: pointer;
  644. height: 100%;
  645. line-height: 40px;
  646. font-size: 14px;
  647. color: #2e6bc8;
  648. font-weight: 400;
  649. vertical-align: middle;
  650. }
  651. }
  652. .right_menu {
  653. width: 100px;
  654. position: absolute;
  655. padding: 8px;
  656. box-shadow: 0px 2px 10px 1px rgba(199, 203, 216);
  657. border-radius: 4px 4px 4px 4px;
  658. border: 1px solid #c1cce3;
  659. background-color: #fff;
  660. z-index: 10000;
  661. .menu_item {
  662. width: 100%;
  663. height: 40px;
  664. border-radius: 4px 4px 4px 4px;
  665. display: flex;
  666. align-items: center;
  667. &:hover {
  668. background-color: #f5f7f9;
  669. }
  670. span {
  671. margin-left: 4px;
  672. }
  673. }
  674. }
  675. // tag间距
  676. ::v-deep .el-tabs__item {
  677. padding: 0 16px !important;
  678. color: #505870 !important;
  679. font-weight: 400 !important;
  680. }
  681. ::v-deep .el-tabs--top .el-tabs__item.is-top:last-child {
  682. padding-right: 0 !important;
  683. }
  684. // tag选中颜色
  685. ::v-deep .el-tabs__item.is-active {
  686. color: #2e6bc8 !important;
  687. font-weight: normal;
  688. font-family: Inter-SemiBold;
  689. }
  690. ::v-deep .el-tabs__active-bar {
  691. background-color: #2e6bc8;
  692. }
  693. .table_icon {
  694. height: 27px;
  695. width: 27px;
  696. vertical-align: middle;
  697. }
  698. ::v-deep .el-collapse-item__content {
  699. padding-bottom: 0;
  700. }
  701. ::v-deep .el-collapse-item__header {
  702. background-color: #ebeff6 !important;
  703. width: 100% !important;
  704. height: 24px !important;
  705. }
  706. ::v-deep .el-collapse-item__arrow {
  707. position: relative;
  708. color: #2e6bc8;
  709. right: 97%;
  710. }
  711. ::v-deep .el-table td.el-table__cell {
  712. border: none;
  713. font-size: 14px !important;
  714. font-weight: 400 !important;
  715. color: #000 !important;
  716. }
  717. ::v-deep .el-table__row {
  718. height: 35px !important;
  719. }
  720. ::v-deep .el-table .el-table__header-wrapper th {
  721. border-bottom: none;
  722. border-right: 1px solid #c1cce3;
  723. background-color: #fff !important;
  724. color: #505870;
  725. font-size: 14px;
  726. }
  727. .collapseItem_title {
  728. position: relative;
  729. left: 60px;
  730. color: #2e6bc8;
  731. font-family: Inter-Medium;
  732. font-size: 12px;
  733. }
  734. // 表格右边3个靠右对齐
  735. ::v-deep .el-table__header thead tr th {
  736. font-family: Inter-Medium;
  737. font-size: 14px;
  738. color: #505870;
  739. text-align: right;
  740. &:nth-child(1) {
  741. text-align: left;
  742. }
  743. }
  744. ::v-deep .el-table__body tbody [class*="column_"] {
  745. text-align: right;
  746. &:nth-child(4n + 1) {
  747. text-align: left;
  748. }
  749. }
  750. //表格文本超出隐藏
  751. :deep(.fileName) {
  752. /*第一步: 溢出隐藏 */
  753. overflow: hidden;
  754. /* 第二步:让文本不会换行, 在同一行继续 */
  755. white-space: nowrap;
  756. /* 第三步:用省略号来代表未显示完的文本 */
  757. text-overflow: ellipsis;
  758. }
  759. //表格文本超出隐藏
  760. :deep(.folderName) {
  761. /*第一步: 溢出隐藏 */
  762. overflow: hidden;
  763. /* 第二步:让文本不会换行, 在同一行继续 */
  764. white-space: nowrap;
  765. /* 第三步:用省略号来代表未显示完的文本 */
  766. text-overflow: ellipsis;
  767. }
  768. //平铺
  769. .tile_box {
  770. width: 100%;
  771. height: 300px;
  772. display: flex;
  773. flex-wrap: wrap;
  774. .file_box {
  775. width: 116px;
  776. min-height: 138px;
  777. // border: 1px solid #000;
  778. display: flex;
  779. flex-direction: column;
  780. align-items: center;
  781. .big_file_img {
  782. width: 100px;
  783. height: 100px;
  784. }
  785. span {
  786. width: 100%;
  787. text-align: center;
  788. font-size: 14px;
  789. font-weight: 400;
  790. line-height: 22px;
  791. display: -webkit-box;
  792. -webkit-box-orient: vertical;
  793. text-overflow: ellipsis;
  794. -webkit-line-clamp: 2; //例如超过3行显示省略号
  795. overflow: hidden;
  796. }
  797. }
  798. }
  799. </style>