fileBox.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878
  1. <template>
  2. <div class="f_box" @dragover.prevent @drop="handleDrop">
  3. <div class="f_box_top">
  4. <div class="f_box_top_left">
  5. <div class="f_box_top_title">所有文件</div>
  6. </div>
  7. <div class="f_box_top_right">
  8. <div class="btn" @click="serchFile">刷新</div>
  9. <div class="btn" @click="addImg($event)">
  10. 上传文件
  11. <input
  12. type="file"
  13. accept="*"
  14. style="display: none"
  15. multiple="multiple"
  16. @change="beforeUpload($event)"
  17. />
  18. </div>
  19. <div class="btn delBtn" @click="batchDelete">删除</div>
  20. </div>
  21. </div>
  22. <div class="f_box_top">
  23. <div class="f_box_top_left">
  24. <el-select v-model="checkFolderid" filterable @change="serchFile">
  25. <el-option v-for="item in myFolderArray"
  26. :key="item.folderid"
  27. :label="item.name"
  28. :value="item.folderid">
  29. </el-option>
  30. </el-select>
  31. </div>
  32. <div class="f_box_top_right">
  33. <div class="input">
  34. <input
  35. type="text"
  36. v-model="fileName"
  37. placeholder="请输入你需要搜索的文件名字"
  38. @keyup.enter="serchFile"
  39. />
  40. <div class="serch" @click="serchFile"></div>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="none_box" v-if="fileArray.length == 0">暂无上传文件</div>
  45. <div
  46. class="f_box_file_list"
  47. v-else-if="stype == '2' && fileArray.length"
  48. v-loading.body="isLoading"
  49. >
  50. <div class="list_file_box">
  51. <el-table
  52. :data="fileArray"
  53. border
  54. stripe
  55. style="width: 100%"
  56. @selection-change="handleSelectionChange"
  57. :row-key="(row) => row.id"
  58. ref="myTable"
  59. >
  60. <el-table-column type="selection" width="50px" :reserve-selection="true"></el-table-column>
  61. <el-table-column prop="name" label="文件名" show-overflow-tooltip min-width="15"></el-table-column>
  62. <el-table-column prop="username" label="拥有者" show-overflow-tooltip min-width="20"></el-table-column>
  63. <el-table-column prop="folderName" label="所属文件夹" show-overflow-tooltip min-width="20"></el-table-column>
  64. <el-table-column label="处理状态" width="80px">
  65. <template slot-scope="scope">
  66. {{ getState(scope.row.ingestionStatus) }}
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="是否已提取知识图谱" width="150px">
  70. <template slot-scope="scope">
  71. {{ getState2(scope.row.extractionStatus) }}
  72. </template>
  73. </el-table-column>
  74. <el-table-column prop="documentType" label="文件类型" show-overflow-tooltip min-width="10"></el-table-column>
  75. <!-- <el-table-column label="公开状态" show-overflow-tooltip width="80px"></el-table-column> -->
  76. <el-table-column prop="time" label="上传时间" show-overflow-tooltip min-width="20"></el-table-column>
  77. <el-table-column label="操作" width="200px">
  78. <template slot-scope="scope">
  79. <div>
  80. <!-- <el-button type="primary" size="small">查看</el-button> -->
  81. <el-button type="danger" size="small" v-if="scope.row.userid == userid" @click="deleteFile(scope.row.id, scope.row.documentid)">删除</el-button>
  82. </div>
  83. </template>
  84. </el-table-column>
  85. </el-table>
  86. </div>
  87. <el-pagination
  88. style="margin-top: 10px"
  89. background
  90. layout="prev, pager, next"
  91. :page-size="limit"
  92. :total="total"
  93. @current-change="handleCurrentChange"
  94. >
  95. </el-pagination>
  96. </div>
  97. <div v-if="proVisible" class="mask">
  98. <div class="progressBox">
  99. <div class="lbox">
  100. <img src="../../../assets/loading.gif" />上传中,请稍后
  101. </div>
  102. </div>
  103. </div>
  104. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  105. <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
  106. <wOffice
  107. :dialogVisibleOffice.sync="dialogVisibleOffice"
  108. :url="wurl"
  109. ></wOffice>
  110. </div>
  111. </template>
  112. <script>
  113. import officeImg from "../../../assets/icon/sourceFile/office.png";
  114. import pdfImg from "../../../assets/icon/sourceFile/pdf.png";
  115. import videoImg from "../../../assets/icon/sourceFile/video.png";
  116. import otherImg from "../../../assets/icon/sourceFile/other.png";
  117. import checkImg from "../../../assets/icon/sourceFile/check.png";
  118. import checkIsImg from "../../../assets/icon/sourceFile/check_is.png";
  119. import wVideo from "../test/file/wVideo.vue";
  120. import wpdf from "../test/file/wPdf2.vue";
  121. import wOffice from "../test/file/wOffice.vue";
  122. import { v4 as uuidv4 } from "uuid";
  123. const getFile = (url) => {
  124. return new Promise((resolve, reject) => {
  125. var credentials = {
  126. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  127. secretAccessKey: "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",
  128. }; //秘钥形式的登录上传
  129. window.AWS.config.update(credentials);
  130. window.AWS.config.region = "cn-northwest-1"; //设置区域
  131. let url2 = url;
  132. let _url2 = "";
  133. if (
  134. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  135. ) {
  136. _url2 = url2.split(
  137. "https://view.officeapps.live.com/op/view.aspx?src="
  138. )[1];
  139. } else {
  140. _url2 = url2;
  141. }
  142. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  143. let name = decodeURIComponent(
  144. _url2
  145. .split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
  146. .replace(/\+/g, " ")
  147. );
  148. var params = {
  149. Bucket: "ccrb",
  150. Key: name,
  151. };
  152. s3.getObject(params, function (err, data) {
  153. if (err) {
  154. console.log(err, err.stack);
  155. resolve({ data: 1 });
  156. } else {
  157. resolve({ data: data.Body });
  158. console.log(data);
  159. } // sxuccessful response
  160. });
  161. // axios({
  162. });
  163. };
  164. export default {
  165. components: {
  166. wVideo,
  167. wpdf,
  168. wOffice,
  169. },
  170. props: {
  171. userid: {
  172. type: String,
  173. },
  174. typeArray: {
  175. type: Array,
  176. },
  177. pid: {
  178. type: String,
  179. },
  180. type: {
  181. type: String,
  182. },
  183. moFolderid: {
  184. type: String
  185. },
  186. myFolderArray: {
  187. type: Array,
  188. }
  189. },
  190. watch: {
  191. pid: {
  192. immediate: true,
  193. deep: true,
  194. handler(newValue, oldValue) {
  195. this.fileArray = [];
  196. this.checkArray = [];
  197. this.fileName = "";
  198. this.checkFolderid = this.moFolderid
  199. // this.getData();
  200. },
  201. },
  202. },
  203. data() {
  204. return {
  205. isLoading: false,
  206. proVisible: false,
  207. stype: 2,
  208. fileArray: [],
  209. officeImg: officeImg,
  210. pdfImg: pdfImg,
  211. videoImg: videoImg,
  212. otherImg: otherImg,
  213. checkImg: checkImg,
  214. checkIsImg: checkIsImg,
  215. checkArray: [],
  216. checkArray2: [],
  217. dialogVisiblePdf: false,
  218. dialogVisibleVideo: false,
  219. dialogVisibleOffice: false,
  220. wurl: "",
  221. moveBox: false,
  222. checkTypeArray: [],
  223. moveChild: "",
  224. fileName: "",
  225. limit: 10,
  226. total: 0,
  227. page: 1,
  228. checkFolderid: "",
  229. };
  230. },
  231. computed: {
  232. getState() {
  233. return function (item) {
  234. if (item == "success") {
  235. return "成功";
  236. } else if (item == "failed") {
  237. return "失败";
  238. } else if (item == "augmenting") {
  239. return "上传中";
  240. } else if (item == "pending") {
  241. return "待处理";
  242. } else if (item == "enriched") {
  243. return "enriched";
  244. } else if(!item){
  245. return "上传中"
  246. } else {
  247. return item
  248. }
  249. };
  250. },
  251. getState2() {
  252. return function (item) {
  253. if (item == "success") {
  254. return "成功";
  255. } else if (item == "failed") {
  256. return "失败";
  257. } else if (item == "pending") {
  258. return "待处理";
  259. } else if (item == "processing") {
  260. return "处理中";
  261. } else if (item == "enriched") {
  262. return "enriched";
  263. } else if(!item){
  264. return "上传中"
  265. } else {
  266. return item
  267. }
  268. };
  269. },
  270. },
  271. methods: {
  272. handleCurrentChange(val) {
  273. this.page = val;
  274. this.getData();
  275. },
  276. getData() {
  277. this.isLoading = true;
  278. let params = {
  279. uid: this.userid,
  280. folderid: this.checkFolderid,
  281. n: this.fileName,
  282. page: this.page,
  283. num: this.limit,
  284. };
  285. this.ajax
  286. .post(this.$store.state.fileApi + "getFile", [params])
  287. .then((res) => {
  288. this.isLoading = false;
  289. console.log(res.data);
  290. this.total = res.data.result.length ? res.data.result[0].num : 0;
  291. this.fileArray = res.data.result;
  292. this.$parent.$refs.folder.getData();
  293. })
  294. .catch((err) => {
  295. this.isLoading = false;
  296. console.error(err);
  297. });
  298. },
  299. handleSelectionChange(selectedRows) {
  300. this.checkArray = selectedRows.map((row) => row.id);
  301. this.checkArray2 = selectedRows.map(row => ({ id: row.id, documentid: row.documentid }));
  302. },
  303. addImg(e) {
  304. var el = e.currentTarget;
  305. el.getElementsByTagName("input")[0].click();
  306. e.target.value = "";
  307. },
  308. handleDrop(event) {
  309. event.preventDefault(); // 阻止默认的浏览器下载行为
  310. const files = event.dataTransfer.files;
  311. if (files.length) {
  312. this.beforeUpload({target:{files}});
  313. }
  314. },
  315. serchFile() {
  316. this.page = 1;
  317. this.getData();
  318. },
  319. async beforeUpload(event) {
  320. let file = "";
  321. let cfindex2 = 0;
  322. this.proVisible = true;
  323. const allowedExtensions = [
  324. "csv","xls","xlsx","md","pdf","txt","ppt","pptx","docx"
  325. ];
  326. const uploadFiles = async (files) => {
  327. for (let cfindex = 0; cfindex < files.length; cfindex++) {
  328. file = files[cfindex];
  329. const fileExtension = file.name.split('.').pop().toLowerCase();
  330. if (!allowedExtensions.includes(fileExtension)) {
  331. this.$message.error(`不支持的文件格式: ${file.name}`);
  332. cfindex2++;
  333. continue; // 跳过不支持的文件
  334. }
  335. let uuid = uuidv4();
  336. let formData = new FormData();
  337. const timestamp = Date.now();
  338. const baseName = file.name.slice(0, -(fileExtension.length + 1));
  339. formData.append('file', new File([file], `${baseName}${timestamp}.${fileExtension}`));
  340. formData.append('collection_ids', JSON.stringify([this.moFolderid]));
  341. formData.append('id', uuid);
  342. formData.append('metadata', JSON.stringify({title: file.name}));
  343. formData.append('ingestion_mode', "fast");
  344. // 使用同步方式上传文件
  345. await this.uploadFile(formData, file.name, uuid);
  346. cfindex2++;
  347. // 每5秒上传一次
  348. if (cfindex < files.length - 1) {
  349. await new Promise(resolve => setTimeout(resolve, 5000));
  350. }
  351. }
  352. this.proVisible = false;
  353. this.$message.success("上传成功");
  354. await this.getData(); // 在上传完文件后再调用getData
  355. };
  356. await uploadFiles(event.target.files);
  357. },
  358. async uploadFile(formData, name, uuid, bool) {
  359. try {
  360. // 确保formData是正确的格式
  361. // this.$store.state.fileApi + "upload"
  362. this.ajax.post("https://r2rserver.cocorobo.cn/v3/documents", formData, {
  363. headers: {
  364. 'Content-Type': 'multipart/form-data'
  365. }
  366. });
  367. let params = {
  368. n: name,
  369. did: uuid,
  370. uid: this.userid,
  371. fid: this.moFolderid,
  372. mofid: "",
  373. }
  374. const res2 = await this.ajax.post(this.$store.state.api + 'addFile', [params]);
  375. } catch (err) {
  376. console.error(err);
  377. this.$message.error("上传失败");
  378. }
  379. },
  380. formatFileSize(bytes) {
  381. if (bytes < 1024) {
  382. return bytes + "B";
  383. } else if (bytes < 1048576) {
  384. return (bytes / 1024).toFixed(2) + "KB";
  385. } else if (bytes < 1073741824) {
  386. return (bytes / 1048576).toFixed(2) + "MB";
  387. } else {
  388. return (bytes / 1073741824).toFixed(2) + "GB";
  389. }
  390. },
  391. deleteFile(fileid, documentid) {
  392. this.$confirm("确定删除该文件吗?", "提示", {
  393. confirmButtonText: "确定",
  394. cancelButtonText: "取消",
  395. type: "warning",
  396. })
  397. .then(() => {
  398. let params = [{
  399. ids: fileid,
  400. documentids: documentid,
  401. }];
  402. this.ajax
  403. .post(this.$store.state.fileApi + "deleteFile", params)
  404. .then((res) => {
  405. this.$message({
  406. message: "删除成功",
  407. type: "success",
  408. });
  409. this.checkArray = []
  410. this.checkArray2 = []
  411. this.$refs.myTable.clearSelection();
  412. this.getData();
  413. })
  414. .catch((err) => {
  415. this.$message.error("删除失败");
  416. console.error(err);
  417. });
  418. })
  419. .catch(() => {});
  420. },
  421. batchDelete(){
  422. if(!this.checkArray.length){
  423. this.$message.warning("请选择要删除的文件")
  424. return;
  425. }
  426. let array = this.checkArray2.map(item => item.id);
  427. let array2 = this.checkArray2.map(item => item.documentid);
  428. this.deleteFile(array.join(","), array2.join(","))
  429. },
  430. },
  431. mounted() {
  432. this.getData();
  433. },
  434. };
  435. </script>
  436. <style scoped>
  437. .f_box {
  438. width: 100%;
  439. /* height: 100%; */
  440. position: relative;
  441. min-height: 400px;
  442. }
  443. .f_box_top {
  444. display: flex;
  445. align-items: center;
  446. padding: 10px;
  447. width: 100%;
  448. box-sizing: border-box;
  449. }
  450. .f_box_top_left {
  451. display: flex;
  452. align-items: center;
  453. }
  454. .f_box_top_title {
  455. font-size: 16px;
  456. /* font-weight: bold; */
  457. }
  458. .f_box_top .btn {
  459. display: flex;
  460. cursor: pointer;
  461. align-items: center;
  462. height: 30px;
  463. padding: 0 8px;
  464. background: rgb(0, 97, 255);
  465. color: #fff;
  466. box-sizing: border-box;
  467. border-radius: 4px;
  468. font-size: 14px;
  469. align-items: center;
  470. }
  471. .f_box_top .btn2 {
  472. display: flex;
  473. cursor: pointer;
  474. align-items: center;
  475. height: 30px;
  476. padding: 0 8px;
  477. background: #fff;
  478. color: rgb(0, 97, 255);
  479. border: 1px solid rgb(0, 97, 255);
  480. box-sizing: border-box;
  481. border-radius: 4px;
  482. font-size: 14px;
  483. align-items: center;
  484. }
  485. .f_box_top .delBtn {
  486. background: rgb(255, 0, 13);
  487. }
  488. .f_box_top .btn + .btn2,
  489. .f_box_top .btn + .btn,
  490. .f_box_top .btn2 + .btn2,
  491. .f_box_top .btn2 + .delBtn {
  492. margin-left: 15px;
  493. }
  494. .f_box_top_right {
  495. margin-left: auto;
  496. max-width: calc(100% - 280px);
  497. overflow: hidden;
  498. display: flex;
  499. align-items: center;
  500. }
  501. .f_box_top_right > .input {
  502. position: relative;
  503. width: 250px;
  504. height: 35px;
  505. }
  506. .f_box_top_right > .input > input {
  507. width: 100%;
  508. height: 100%;
  509. border: 1px solid #d9d9d9;
  510. border-radius: 5px;
  511. padding: 0 45px 0 10px;
  512. box-sizing: border-box;
  513. font-size: 12px;
  514. outline: none;
  515. }
  516. .f_box_top_right > .input > .serch {
  517. content: "";
  518. display: block;
  519. width: 20px;
  520. height: 20px;
  521. background-image: url("../../../assets/icon/sourceFile/search.png");
  522. background-size: 100% 100%;
  523. position: absolute;
  524. right: 13px;
  525. top: 50%;
  526. transform: translateY(-50%);
  527. cursor: pointer;
  528. }
  529. .f_box_top_right > .tab {
  530. height: 30px;
  531. width: 80px;
  532. margin-left: 15px;
  533. background: #e7e7e7;
  534. border: 2px solid #d9d9d9;
  535. border-radius: 5px;
  536. box-sizing: border-box;
  537. overflow: hidden;
  538. display: flex;
  539. align-items: center;
  540. }
  541. .f_box_top_right > .tab > .table,
  542. .f_box_top_right > .tab > .list {
  543. width: 50%;
  544. height: 100%;
  545. display: flex;
  546. align-items: center;
  547. justify-content: center;
  548. cursor: pointer;
  549. }
  550. .f_box_top_right > .tab > .list::before {
  551. content: "";
  552. display: block;
  553. width: 20px;
  554. height: 20px;
  555. background-image: url("../../../assets/icon/sourceFile/list.png");
  556. background-size: 100% 100%;
  557. }
  558. .f_box_top_right > .tab > .list.active,
  559. .f_box_top_right > .tab > .table.active {
  560. background: #fff;
  561. }
  562. .f_box_top_right > .tab > .table::before {
  563. content: "";
  564. display: block;
  565. width: 20px;
  566. height: 20px;
  567. background-image: url("../../../assets/icon/sourceFile/table.png");
  568. background-size: 100% 100%;
  569. }
  570. .mask {
  571. background-color: rgb(0 0 0 / 30%);
  572. /* position: fixed; */
  573. position: absolute;
  574. top: 0;
  575. left: 0;
  576. width: 100%;
  577. height: 100%;
  578. z-index: 90;
  579. display: flex;
  580. align-items: center;
  581. justify-content: center;
  582. }
  583. .progressBox {
  584. width: 300px;
  585. height: 150px;
  586. background: #fff;
  587. border-radius: 10px;
  588. box-shadow: 0 0 6px 1px #bfbfbf;
  589. display: flex;
  590. align-items: center;
  591. justify-content: center;
  592. flex-direction: column;
  593. position: relative;
  594. color: #6c6c6c;
  595. }
  596. .progressBox >>> .el-progress-bar__outer {
  597. background-color: #d1dfff !important;
  598. }
  599. .progressBox .lbox {
  600. height: 50px;
  601. font-size: 19px;
  602. display: flex;
  603. align-items: center;
  604. color: #747474;
  605. }
  606. .progressBox .lbox img {
  607. width: 40px;
  608. margin-right: 20px;
  609. }
  610. .closeCss {
  611. position: absolute;
  612. top: 8px;
  613. right: 8px;
  614. cursor: pointer;
  615. width: 20px;
  616. height: 20px;
  617. }
  618. .closeCss > img {
  619. width: 100%;
  620. height: 100%;
  621. }
  622. .f_box_file_square {
  623. height: calc(100% - 55px);
  624. overflow: auto;
  625. width: 100%;
  626. padding: 55px;
  627. box-sizing: border-box;
  628. display: flex;
  629. flex-wrap: wrap;
  630. align-content: flex-start;
  631. position: relative;
  632. }
  633. .f_box_file_square > .f_box_file {
  634. display: flex;
  635. flex-direction: column;
  636. align-items: center;
  637. justify-content: center;
  638. width: 160px;
  639. height: 160px;
  640. cursor: pointer;
  641. margin: 0 36px 36px 0;
  642. border-radius: 20px;
  643. position: relative;
  644. }
  645. .f_box_file_square > .f_box_file:hover {
  646. background: #f0f2f5;
  647. }
  648. .f_box_file_square > .f_box_file:hover > .check {
  649. display: block;
  650. }
  651. .f_box_file_square > .f_box_file.check {
  652. background: #e0eafb;
  653. }
  654. .f_box_file_square > .f_box_file.check > .check {
  655. display: block;
  656. }
  657. .f_box_file_square > .f_box_file > .check {
  658. position: absolute;
  659. left: 15px;
  660. top: 15px;
  661. width: 16px;
  662. height: 16px;
  663. background-size: 100%;
  664. display: none;
  665. }
  666. .f_box_file_square > .f_box_file > .check > img {
  667. width: 100%;
  668. height: 100%;
  669. object-fit: cover;
  670. }
  671. .f_box_file_square > .f_box_file > img {
  672. width: 90px;
  673. height: 90px;
  674. object-fit: cover;
  675. }
  676. .f_box_file_square > .f_box_file > .name {
  677. white-space: nowrap;
  678. font-size: 14px;
  679. max-width: 80%;
  680. overflow: hidden;
  681. margin: 4px auto 0;
  682. text-overflow: ellipsis;
  683. text-align: center;
  684. }
  685. .f_box_file_list {
  686. /* height: calc(100% - 55px); */
  687. /* overflow: auto; */
  688. width: 100%;
  689. padding: 10px;
  690. box-sizing: border-box;
  691. }
  692. .f_box_file_list > .f_box_file {
  693. }
  694. .f_box_file_allCheck {
  695. display: flex;
  696. align-items: center;
  697. position: absolute;
  698. font-size: 14px;
  699. top: 20px;
  700. left: 10px;
  701. cursor: pointer;
  702. }
  703. .f_box_file_allCheck > img {
  704. width: 16px;
  705. height: 16px;
  706. object-fit: cover;
  707. margin-right: 5px;
  708. }
  709. .dialog >>> .el-dialog__body {
  710. padding: 10px 20px;
  711. }
  712. .type_nav_box {
  713. }
  714. .type_nav_box > .nav {
  715. height: 40px;
  716. border-radius: 5px;
  717. cursor: pointer;
  718. display: flex;
  719. align-items: center;
  720. width: 100%;
  721. padding: 0 10px;
  722. box-sizing: border-box;
  723. margin-bottom: 10px;
  724. font-size: 16px;
  725. color: #000;
  726. }
  727. .type_nav_box > .nav > .down {
  728. min-width: 14px;
  729. height: 14px;
  730. background-image: url("../../../assets/icon/sourceFile/icon_arrow.png");
  731. background-size: 100% 100%;
  732. margin-right: 10px;
  733. transition: all 0.3s;
  734. transform: rotate(-90deg);
  735. }
  736. .type_nav_box > .nav.active > .down {
  737. transform: rotate(0deg);
  738. }
  739. .type_nav_box > .nav > .file {
  740. min-width: 18px;
  741. height: 18px;
  742. background-image: url("../../../assets/icon/sourceFile/file.png");
  743. background-size: 100% 100%;
  744. margin-right: 10px;
  745. }
  746. .type_nav_box > .nav > .name {
  747. max-width: 100%;
  748. overflow: hidden;
  749. text-overflow: ellipsis;
  750. white-space: nowrap;
  751. }
  752. .type_nav_box > .child {
  753. }
  754. .type_nav_box > .child > .nav {
  755. height: 40px;
  756. border-radius: 5px;
  757. cursor: pointer;
  758. display: flex;
  759. align-items: center;
  760. width: 100%;
  761. padding: 0 10px 0 50px;
  762. box-sizing: border-box;
  763. margin-bottom: 10px;
  764. font-size: 16px;
  765. color: #000;
  766. }
  767. .type_nav_box > .child > .nav.active {
  768. background: #e0eafb;
  769. }
  770. .type_nav_box > .child > .nav > .file {
  771. min-width: 18px;
  772. height: 18px;
  773. background-image: url("../../../assets/icon/sourceFile/file.png");
  774. background-size: 100% 100%;
  775. margin-right: 10px;
  776. }
  777. .type_nav_box > .child > .nav > .name {
  778. max-width: 100%;
  779. overflow: hidden;
  780. text-overflow: ellipsis;
  781. white-space: nowrap;
  782. }
  783. .none_box {
  784. height: calc(100% - 55px);
  785. overflow: auto;
  786. width: 100%;
  787. padding: 10px;
  788. box-sizing: border-box;
  789. display: flex;
  790. align-items: center;
  791. justify-content: center;
  792. }
  793. .list_file_box {
  794. width: 100%;
  795. }
  796. .list_file_name {
  797. display: flex;
  798. align-items: center;
  799. }
  800. .list_file_name > img {
  801. width: 24px;
  802. height: 24px;
  803. object-fit: cover;
  804. margin-right: 5px;
  805. }
  806. .list_file_name > div {
  807. max-width: 100%;
  808. overflow: hidden;
  809. white-space: nowrap;
  810. text-overflow: ellipsis;
  811. }
  812. </style>