folderFileBox.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619
  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. <el-breadcrumb separator="/">
  6. <el-breadcrumb-item style="color: #000;font-weight: 600;"><span @click="goBackPage">{{lang.rootDirectory}}</span></el-breadcrumb-item>
  7. <el-breadcrumb-item>{{ data.name }}</el-breadcrumb-item>
  8. </el-breadcrumb>
  9. <!-- <div class="f_box_top_title">文件</div> -->
  10. </div>
  11. <div class="f_box_top_center">
  12. <span :class="{active: fileType == 1}" @click="checkType(1)">{{lang.fileData}}</span>
  13. <span :class="{active: fileType == 2}" @click="checkType(2)">{{lang.backTest}}</span>
  14. </div>
  15. </div>
  16. <div class="f_box_container">
  17. <div class="f_box_top_right" v-if="fileType == 1">
  18. <div class="input">
  19. <input
  20. type="text"
  21. v-model="fileName"
  22. :placeholder=lang.selectFileName
  23. @input="debouncedSearch"
  24. />
  25. <div class="serch"></div>
  26. </div>
  27. <el-button type="primary" size="small" @click="serchFile"
  28. >
  29. <img style="vertical-align: middle;transform: scale(1.1);padding-bottom: 2px;box-sizing: border-box;" src="../../../assets/shuax.svg" alt="">
  30. {{lang.flushed}}</el-button
  31. >
  32. <el-button v-if="userid == data.userid" type="primary" icon="el-icon-plus" size="small" @click="addImg($event)"
  33. >{{ lang.uploadFile }}
  34. <input
  35. type="file"
  36. accept="*"
  37. style="display: none"
  38. multiple="multiple"
  39. @change="beforeUpload($event)"
  40. /></el-button>
  41. <el-button
  42. type="primary"
  43. size="small"
  44. @click="openG"
  45. v-if="userid == data.userid && data.isMo == '2'"
  46. >
  47. <img style="vertical-align: middle;" src="../../../assets/ETL.svg" alt="">
  48. {{lang.associatedFiles}}</el-button
  49. >
  50. <el-button type="primary" v-if="checkArray.length && userid == data.userid " size="small" @click="batchRemove"
  51. >
  52. <img style="vertical-align: middle;padding-bottom: 3px;" src="../../../assets/yichuBtn.svg" alt="">
  53. {{lang.remove}}</el-button
  54. >
  55. <el-button type="danger" style="background: #F56C6C;" v-if="checkArray.length && userid == data.userid " size="small" @click="batchDelete"
  56. >
  57. <img style="vertical-align: middle;padding-bottom: 3px;" src="../../../assets/delBtn.svg" alt="">
  58. {{lang.delete}}</el-button
  59. >
  60. <div v-if="checkArray.length" style="margin-left: 12px;color: #b0b0b0;font-size: 14px;flex-shrink: 0;line-height: 35px;">{{lang.selectedFiles}}&nbsp;{{checkArray.length}}&nbsp;{{lang.piece}}</div>
  61. <!-- <div class="btn" @click="serchFile">刷新</div>
  62. <div class="btn" @click="addImg($event)">
  63. 上传文件
  64. <input
  65. type="file"
  66. accept="*"
  67. style="display: none"
  68. multiple="multiple"
  69. @change="beforeUpload($event)"
  70. />
  71. </div> -->
  72. <!-- <div class="btn" @click="openG" v-if="userid == data.userid && data.isMo == '2'">关联文件</div>
  73. <div class="btn" @click="batchRemove">移除</div>
  74. <div class="btn delBtn" @click="batchDelete">删除</div> -->
  75. </div>
  76. <!-- <div class="f_box_top">
  77. <div class="f_box_top_left"></div>
  78. <div class="f_box_top_right">
  79. </div>
  80. </div> -->
  81. <!-- <div class="none_box" v-if="fileArray.length == 0">暂无上传文件</div> -->
  82. <!-- v-else-if="stype == '2' && fileArray.length" -->
  83. <div
  84. v-show="fileType == 1"
  85. class="f_box_file_list"
  86. v-loading.body="isLoading"
  87. >
  88. <div class="list_file_box">
  89. <el-table
  90. :data="fileArray"
  91. border
  92. style="width: 100%; cursor: pointer;"
  93. @selection-change="handleSelectionChange"
  94. ref="myTable"
  95. :row-key="row => row.id"
  96. @row-click="checkFile"
  97. >
  98. <template #empty>
  99. <div class="customC">
  100. <div style="height: 50px;line-height: 50px;width: 47.4px;">
  101. <img style="width: 100%;" src="../../../assets/flieKong.svg" alt="">
  102. </div>
  103. <div style="height: 50px;line-height: 40px;">{{lang.noDataContent}}</div>
  104. </div>
  105. </template>
  106. <el-table-column
  107. type="selection"
  108. width="50px"
  109. :reserve-selection="true"
  110. ></el-table-column>
  111. <el-table-column
  112. prop="name"
  113. :label=lang.fileName
  114. show-overflow-tooltip
  115. min-width="15"
  116. ></el-table-column>
  117. <el-table-column
  118. prop="folderName"
  119. :label=lang.folderBelongs
  120. show-overflow-tooltip
  121. min-width="20"
  122. ></el-table-column>
  123. <el-table-column
  124. prop="username"
  125. :label=lang.owner
  126. show-overflow-tooltip
  127. width="120"
  128. ></el-table-column>
  129. <el-table-column :label=lang.sliceClassification width="120px">
  130. <template slot-scope="scope">
  131. {{ getState(scope.row.ingestionStatus) }}
  132. </template>
  133. </el-table-column>
  134. <el-table-column :label=lang.graphExtraction width="120px">
  135. <template slot-scope="scope">
  136. {{ getState2(scope.row.extractionStatus) }}
  137. </template>
  138. </el-table-column>
  139. <el-table-column
  140. :label=lang.fileType
  141. show-overflow-tooltip
  142. width="120"
  143. >
  144. <template slot-scope="scope">
  145. {{ scope.row.documentType ? scope.row.documentType : "-" }}
  146. </template>
  147. </el-table-column>
  148. <!-- <el-table-column label="公开状态" show-overflow-tooltip width="80px"></el-table-column> -->
  149. <el-table-column
  150. prop="time"
  151. :label=lang.uploadTime
  152. show-overflow-tooltip
  153. min-width="20"
  154. ></el-table-column>
  155. <el-table-column :label=lang.operate width="100px">
  156. <template slot-scope="scope">
  157. <el-popover
  158. placement="bottom-end"
  159. trigger="hover"
  160. visible-arrow
  161. popper-class="custom-popover"
  162. width="100px"
  163. >
  164. <div class="BtnHP">
  165. <div class="BtnHPDel1">
  166. <!-- <el-button
  167. type="primary"
  168. size="small"
  169. @click="extractFile(scope.row)"
  170. v-if="userid == data.userid "
  171. :disabled="scope.row.ingestionStatus == 'failed'"
  172. >提取</el-button
  173. > -->
  174. <div class="btnBh"
  175. @click="extractFile(scope.row)"
  176. @mouseover="isHover = true"
  177. v-if="userid == data.userid "
  178. :disabled="scope.row.ingestionStatus == 'failed'"
  179. @mouseleave="isHover = false">
  180. <img
  181. style="width: 14px;"
  182. :src="isHover ? tqList2 : tqList"
  183. alt="">
  184. <span :class="isHover ? 'lookHp2' : 'lookHp1'">{{lang.extract}}</span>
  185. </div>
  186. <!-- <el-button
  187. type="primary"
  188. size="small"
  189. @click="checkFile(scope.row)"
  190. :disabled="scope.row.ingestionStatus == 'failed'"
  191. >查看</el-button
  192. > -->
  193. <div class="btnBh"
  194. @click="checkFile(scope.row)"
  195. @mouseover="isHover2 = true"
  196. :disabled="scope.row.ingestionStatus == 'failed'"
  197. @mouseleave="isHover2 = false">
  198. <img
  199. :src="isHover2 ? look2 : look1"
  200. alt="">
  201. <span :class="isHover2 ? 'lookHp2' : 'lookHp1'">{{lang.view}}</span>
  202. </div>
  203. </div>
  204. <div class="btnBh"
  205. @click="removeFile(scope.row.id, scope.row.documentid)"
  206. @mouseover="isHover3 = true"
  207. v-if="userid == data.userid && data.isMo == '2'"
  208. @mouseleave="isHover3 = false">
  209. <img
  210. style="width: 14px;"
  211. :src="isHover3 ? yichu2 : yichu"
  212. alt="">
  213. <span :class="isHover3 ? 'lookHp2' : 'lookHp1'">{{lang.remove}}</span>
  214. </div>
  215. <div class="btnBh"
  216. @click="downloadFile(scope.row)"
  217. @mouseover="isHover4 = true"
  218. :disabled="scope.row.ingestionStatus == 'failed'"
  219. @mouseleave="isHover4 = false">
  220. <img
  221. :src="isHover4 ? download2 : download"
  222. alt="">
  223. <span :class="isHover4 ? 'lookHp2' : 'lookHp1'">{{lang.download}}</span>
  224. </div>
  225. <!-- <el-button
  226. type="primary"
  227. size="small"
  228. v-if="userid == data.userid && data.isMo == '2'"
  229. @click="removeFile(scope.row.id, scope.row.documentid)"
  230. >移除</el-button
  231. > -->
  232. <!-- <el-button
  233. type="danger"
  234. size="small"
  235. v-if="userid == scope.row.userid"
  236. @click="deleteFile(scope.row.id, scope.row.documentid)"
  237. >删除</el-button
  238. > -->
  239. <div style="background-color: #e7e7e7;width: 100%;height: .5px;margin: 5px 0;"></div>
  240. <div class="BtnHPDel">
  241. <div class="btnBh2"
  242. @click="deleteFile(scope.row.id, scope.row.documentid)"
  243. v-if="scope.row.userid == userid">
  244. <img src="../../../assets/listdel.svg" alt="">
  245. <span style="color: #DE4C41;">{{lang.delete}}</span>
  246. </div>
  247. </div>
  248. </div>
  249. <el-button slot="reference" class="BtnH" style="border: none;padding: 5px;" @click.stop="">
  250. <i class="el-icon-more"></i>
  251. </el-button>
  252. </el-popover>
  253. </template>
  254. </el-table-column>
  255. </el-table>
  256. </div>
  257. <el-pagination
  258. class="pageBox"
  259. style="margin-top: 10px"
  260. layout="total, prev, pager, next"
  261. :page-size="limit"
  262. :total="total"
  263. @current-change="handleCurrentChange"
  264. >
  265. </el-pagination>
  266. <div v-if="proVisible" class="mask">
  267. <div class="progressBox">
  268. <div class="lbox">
  269. {{lang.uploadWait}}<img src="../../../assets/KekeLoading.gif" />
  270. </div>
  271. <div class="lbox_count">{{ pcount }} / {{ ptotal }}</div>
  272. </div>
  273. </div>
  274. <testBox v-if="fileType == 2" :userid="userid" :folderid="folderid"></testBox>
  275. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  276. <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
  277. <wOffice
  278. :dialogVisibleOffice.sync="dialogVisibleOffice"
  279. :url="wurl"
  280. ></wOffice>
  281. <relateFiles ref="relateFiles"></relateFiles>
  282. <checkDialog ref="checkDialog"></checkDialog>
  283. </div>
  284. </template>
  285. <script>
  286. import officeImg from "../../../assets/icon/sourceFile/office.png";
  287. import pdfImg from "../../../assets/icon/sourceFile/pdf.png";
  288. import videoImg from "../../../assets/icon/sourceFile/video.png";
  289. import otherImg from "../../../assets/icon/sourceFile/other.png";
  290. import checkImg from "../../../assets/icon/sourceFile/check.png";
  291. import checkIsImg from "../../../assets/icon/sourceFile/check_is.png";
  292. // 导入SVG组件
  293. import look1 from '../../../assets/look1.svg';
  294. import look2 from '../../../assets/look2.svg';
  295. import tqList2 from '../../../assets/tqList2.svg';
  296. import tqList from '../../../assets/tqList.svg';
  297. import yichu from '../../../assets/yichu.svg';
  298. import yichu2 from '../../../assets/yichu2.svg';
  299. import download from '../../../assets/download.svg';
  300. import download2 from '../../../assets/download2.svg';
  301. import wVideo from "../test/file/wVideo.vue";
  302. import wpdf from "../test/file/wPdf2.vue";
  303. import wOffice from "../test/file/wOffice.vue";
  304. import { v4 as uuidv4 } from "uuid";
  305. import relateFiles from "./components/relateFiles";
  306. import checkDialog from "./components/checkDialog";
  307. import testBox from "./components/testBox";
  308. export default {
  309. components: {
  310. wVideo,
  311. wpdf,
  312. wOffice,
  313. relateFiles,
  314. checkDialog,
  315. testBox
  316. },
  317. props: {
  318. userid: {
  319. type: String
  320. },
  321. typeArray: {
  322. type: Array
  323. },
  324. pid: {
  325. type: String
  326. },
  327. folderid: {
  328. type: String
  329. },
  330. moFolderid: {
  331. type: String
  332. },
  333. data: {
  334. type: Object
  335. }
  336. },
  337. watch: {
  338. pid: {
  339. immediate: true,
  340. deep: true,
  341. handler(newValue, oldValue) {
  342. this.fileArray = [];
  343. this.checkArray = [];
  344. this.fileName = "";
  345. this.proVisible = false;
  346. this.page = 1;
  347. this.getData();
  348. }
  349. }
  350. },
  351. data() {
  352. return {
  353. look1:look1,
  354. look2:look2,
  355. tqList2:tqList2,
  356. tqList:tqList,
  357. yichu:yichu,
  358. yichu2:yichu2,
  359. download: download,
  360. download2: download2,
  361. isHover:false,
  362. isHover2:false,
  363. isHover3:false,
  364. isHover4:false,
  365. isLoading: false,
  366. proVisible: false,
  367. stype: 2,
  368. fileArray: [],
  369. officeImg: officeImg,
  370. pdfImg: pdfImg,
  371. videoImg: videoImg,
  372. otherImg: otherImg,
  373. checkImg: checkImg,
  374. checkIsImg: checkIsImg,
  375. checkArray: [],
  376. checkArray2: [],
  377. dialogVisiblePdf: false,
  378. dialogVisibleVideo: false,
  379. dialogVisibleOffice: false,
  380. wurl: "",
  381. moveBox: false,
  382. checkTypeArray: [],
  383. moveChild: "",
  384. fileName: "",
  385. limit: 10,
  386. total: 0,
  387. page: 1,
  388. debounceTimeout: null,
  389. pcount: 0,
  390. ptotal: 0,
  391. fileType: 1
  392. };
  393. },
  394. computed: {
  395. getState() {
  396. return function(item) {
  397. if (item == "success") {
  398. return this.lang.success;
  399. } else if (item == "failed") {
  400. return this.lang.fail;
  401. } else if (item == "augmenting") {
  402. return this.lang.sliced;
  403. } else if (item == "pending") {
  404. return this.lang.pending;
  405. } else if (item == "enriched") {
  406. return "enriched";
  407. } else if (!item) {
  408. return this.lang.sliced;
  409. } else {
  410. return item;
  411. }
  412. };
  413. },
  414. getState2() {
  415. return function(item) {
  416. if (item == "success") {
  417. return this.lang.success;
  418. } else if (item == "failed") {
  419. return this.lang.fail;
  420. } else if (item == "pending") {
  421. return this.lang.pending;
  422. } else if (item == "processing") {
  423. return this.lang.processing;
  424. } else if (item == "enriched") {
  425. return "enriched";
  426. } else if (!item) {
  427. return this.lang.uploading;
  428. } else {
  429. return item;
  430. }
  431. };
  432. }
  433. },
  434. methods: {
  435. goBackPage(){
  436. this.$emit("goCheckType", this.pid.split("/")[0]);
  437. },
  438. handleCurrentChange(val) {
  439. this.page = val;
  440. this.getData();
  441. },
  442. getData() {
  443. this.isLoading = true;
  444. let params = {
  445. uid: this.userid,
  446. folderid: this.folderid,
  447. n: this.fileName.trim(),
  448. page: this.page,
  449. num: this.limit
  450. };
  451. this.ajax
  452. .post(this.$store.state.fileApi + "getFileD", [params])
  453. .then(res => {
  454. this.isLoading = false;
  455. console.log(res.data);
  456. this.total = res.data.result.length ? res.data.result[0].num : 0;
  457. this.fileArray = res.data.result;
  458. })
  459. .catch(err => {
  460. this.isLoading = false;
  461. console.error(err);
  462. });
  463. },
  464. handleSelectionChange(selectedRows) {
  465. this.checkArray = selectedRows.map(row => row.id);
  466. this.checkArray2 = selectedRows.map(row => ({
  467. id: row.id,
  468. documentid: row.documentid
  469. }));
  470. },
  471. addImg(e) {
  472. var el = e.currentTarget;
  473. el.getElementsByTagName("input")[0].click();
  474. e.target.value = "";
  475. },
  476. handleDrop(event) {
  477. event.preventDefault(); // 阻止默认的浏览器下载行为
  478. const files = event.dataTransfer.files;
  479. if (files.length) {
  480. this.beforeUpload({ target: { files } });
  481. }
  482. },
  483. debouncedSearch() {
  484. clearTimeout(this.debounceTimeout);
  485. this.debounceTimeout = setTimeout(() => {
  486. this.serchFile();
  487. }, 300);
  488. },
  489. serchFile() {
  490. this.page = 1;
  491. this.getData();
  492. },
  493. async beforeUpload(event) {
  494. let file = "";
  495. let cfindex2 = 0;
  496. this.proVisible = true;
  497. const allowedExtensions = [
  498. "csv",
  499. "xls",
  500. "xlsx",
  501. "md",
  502. "pdf",
  503. "txt",
  504. "ppt",
  505. "pptx",
  506. "docx",
  507. "jpg",
  508. "jpeg",
  509. "png",
  510. "gif",
  511. "bmp"
  512. ];
  513. // let uuid = uuidv4();
  514. // let res = window.uploadFile({ file: event.target.files[0], uuid, userid:this.userid, folderid:this.folderid, moFolderid: this.moFolderid })
  515. // console.log(res);
  516. // return
  517. const uploadFiles = async files => {
  518. this.pcount = 0
  519. this.ptotal = files.length
  520. for (let cfindex = 0; cfindex < files.length; cfindex++) {
  521. file = files[cfindex];
  522. const fileExtension = file.name
  523. .split(".")
  524. .pop()
  525. .toLowerCase();
  526. if (!allowedExtensions.includes(fileExtension)) {
  527. this.$message.error(`${this.lang.unsupFileformats}: ${file.name}`);
  528. await new Promise(resolve => setTimeout(resolve, 1000)); // 延迟1秒再跳过
  529. continue; // 跳过不支持的文件
  530. }
  531. let uuid = uuidv4();
  532. let formData = new FormData();
  533. const timestamp = Date.now();
  534. const baseName = file.name.slice(0, -(fileExtension.length + 1));
  535. let string = [this.folderid, this.moFolderid].filter(id => id);
  536. formData.append(
  537. "file",
  538. new File([file], `${baseName}${timestamp}.${fileExtension}`)
  539. );
  540. formData.append("collection_ids", JSON.stringify(string));
  541. formData.append("id", uuid);
  542. formData.append(
  543. "metadata",
  544. JSON.stringify({ title: file.name, collection_ids: string })
  545. );
  546. formData.append("ingestion_mode", "fast");
  547. formData.append("run_with_orchestration", "false");
  548. // 使用同步方式上传文件
  549. await this.uploadFile(formData, file.name, uuid);
  550. this.pcount = cfindex + 1
  551. // 每5秒上传一次
  552. if (cfindex < files.length - 1) {
  553. await new Promise(resolve => setTimeout(resolve, 5000));
  554. }
  555. }
  556. setTimeout(() => {
  557. this.proVisible = false;
  558. this.$message.success(this.lang.operComplete);
  559. this.getData(); // 在上传完所有文件后再调用getData
  560. }, 1000);
  561. };
  562. await uploadFiles(event.target.files);
  563. },
  564. async uploadFile(formData, name, uuid) {
  565. try {
  566. this.ajax.post("https://r2rserver.cocorobo.cn/v3/documents", formData, {
  567. headers: {
  568. "Content-Type": "multipart/form-data"
  569. }
  570. }).then(res => {
  571. console.log(res, formData);
  572. const message = res.data.results && res.data.results.message;
  573. const status = message === 'Document created and ingested successfully.' ? 'success' : 'failed';
  574. const msg = message === 'Document created and ingested successfully.' ? '切片成功' : '切片失败';
  575. this.$message({
  576. message: msg,
  577. type: status == 'success' ? status : 'error'
  578. })
  579. // setTimeout(() => {
  580. this.getData()
  581. // }, 1000)
  582. setTimeout(() => {
  583. this.fileArray.forEach(e => {
  584. if (e.documentid === uuid) {
  585. e.ingestionStatus = status;
  586. }
  587. });
  588. }, 1000);
  589. }).catch(err => {
  590. this.$message.error(this.lang.uploadFail)
  591. this.fileArray.forEach(e => {
  592. if (e.documentid === uuid) {
  593. e.ingestionStatus = 'failed';
  594. }
  595. });
  596. console.error(err);
  597. });
  598. let docid = uuid;
  599. let params = {
  600. n: name,
  601. did: docid,
  602. uid: this.userid,
  603. fid: this.folderid,
  604. mofid: this.moFolderid != this.folderid ? this.moFolderid : ""
  605. };
  606. const res2 = await this.ajax.post(this.$store.state.api + "addFile", [
  607. params
  608. ]);
  609. console.log(res2);
  610. } catch (err) {
  611. console.error(err);
  612. this.$message.error(this.lang.uploadFail);
  613. }
  614. },
  615. formatFileSize(bytes) {
  616. if (bytes < 1024) {
  617. return bytes + "B";
  618. } else if (bytes < 1048576) {
  619. return (bytes / 1024).toFixed(2) + "KB";
  620. } else if (bytes < 1073741824) {
  621. return (bytes / 1048576).toFixed(2) + "MB";
  622. } else {
  623. return (bytes / 1073741824).toFixed(2) + "GB";
  624. }
  625. },
  626. deleteFile(fileid, documentid) {
  627. this.$confirm(this.lang.deleteFile, this.lang.prompt, {
  628. confirmButtonText:this.lang.confirm,
  629. cancelButtonText: this.lang.cancel,
  630. type: "warning"
  631. })
  632. .then(() => {
  633. let params = [
  634. {
  635. ids: fileid,
  636. documentids: documentid
  637. }
  638. ];
  639. this.ajax //deleteFileByFilter
  640. .post(this.$store.state.fileApi + "deleteFile", params)
  641. .then(res => {
  642. this.$message({
  643. message: this.lang.deleteSuccess,
  644. type: "success"
  645. });
  646. this.checkArray = [];
  647. this.checkArray2 = [];
  648. this.$refs.myTable.clearSelection();
  649. this.getData();
  650. })
  651. .catch(err => {
  652. this.$message.error(this.lang.deleteFail);
  653. console.error(err);
  654. });
  655. })
  656. .catch(() => {});
  657. },
  658. batchDelete() {
  659. if (!this.checkArray.length) {
  660. this.$message.warning(this.lang.selectDeFile);
  661. return;
  662. }
  663. let array = this.checkArray2.map(item => item.id);
  664. let array2 = this.checkArray2.map(item => item.documentid);
  665. this.deleteFile(array.join(","), array2.join(","));
  666. },
  667. removeFile(fileid, documentid) {
  668. this.$confirm(this.lang.sureRemove, this.lang.prompt, {
  669. confirmButtonText: this.lang.confirm,
  670. cancelButtonText: this.lang.cancel,
  671. type: "warning"
  672. })
  673. .then(() => {
  674. let params = [
  675. {
  676. ids: fileid,
  677. documentids: documentid,
  678. folderid: this.folderid
  679. }
  680. ];
  681. this.ajax
  682. .post(this.$store.state.fileApi + "removeFile", params)
  683. .then(res => {
  684. this.$message({
  685. message: this.lang.removeSuccess,
  686. type: "success"
  687. });
  688. this.checkArray = [];
  689. this.checkArray2 = [];
  690. this.$refs.myTable.clearSelection();
  691. this.getData();
  692. })
  693. .catch(err => {
  694. this.$message.error(this.lang.removeFail);
  695. console.error(err);
  696. });
  697. })
  698. .catch(() => {});
  699. },
  700. batchRemove() {
  701. if (!this.checkArray.length) {
  702. this.$message.warning(this.lang.seReFile);
  703. return;
  704. }
  705. let array = this.checkArray2.map(item => item.id);
  706. let array2 = this.checkArray2.map(item => item.documentid);
  707. this.removeFile(array.join(","), array2.join(","));
  708. },
  709. isSelectable(row) {
  710. return row.isMo !== "2";
  711. },
  712. openG() {
  713. this.$refs.relateFiles.openG(this.userid, this.folderid, this.moFolderid);
  714. },
  715. checkFile(row) {
  716. if (row.ingestionStatus != "success") return this.$message.info(this.lang.fileUploadFail)
  717. this.$refs.checkDialog.openG(row.documentid);
  718. },
  719. downloadFile(row) {
  720. let params = {
  721. documentid: row.documentid,
  722. filename: row.name,
  723. };
  724. // 使用axios发送GET请求下载文件
  725. this.ajax.post(`${this.$store.state.fileApi}downloadFile2`, [params],{responseType: 'blob'}).then(response => {
  726. const url = window.URL.createObjectURL(new Blob([response.data]));
  727. const link = document.createElement('a');
  728. link.href = url;
  729. link.setAttribute('download', row.name); // 设置下载文件名
  730. document.body.appendChild(link);
  731. link.click();
  732. link.remove();
  733. this.$message({
  734. message: this.lang.downloadSuccess,
  735. type: "success"
  736. });
  737. }).catch(err => {
  738. this.$message.error(this.lang.downloadFail);
  739. console.error(err);
  740. });
  741. },
  742. extractFile(row) {
  743. if (row.ingestionStatus != "success") return this.$message.info(this.lang.fileUploadFail)
  744. let params = {
  745. documentid: row.documentid
  746. };
  747. // 获取切片
  748. try {
  749. const res = this.ajax.post(this.$store.state.fileApi + "extractFile2", [
  750. params
  751. ]).then(res => {
  752. console.log(res, row);
  753. const message = res.data.result && res.data.result.message;
  754. // const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
  755. // const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
  756. // this.$message({
  757. // message: msg,
  758. // type: status == 'success' ? status : 'error'
  759. // })
  760. // this.fileArray.forEach(e => {
  761. // if (e.documentid === row.documentid) {
  762. // e.extractionStatus = status;
  763. // }
  764. // });
  765. setTimeout(() => {
  766. this.getData();
  767. }, 1000)
  768. }).catch(err => {
  769. this.$message.error(this.lang.extrFailed)
  770. this.fileArray.forEach(e => {
  771. if (e.documentid === row.documentid) {
  772. e.extractionStatus = 'failed';
  773. }
  774. });
  775. console.error(err);
  776. });;
  777. console.log(res.data);
  778. this.$message.success(this.lang.extractingFile);
  779. } catch (err) {
  780. console.error(err);
  781. }
  782. },
  783. checkType(type){
  784. this.fileType = type
  785. }
  786. },
  787. mounted() {
  788. // this.getData();
  789. // const script = document.createElement('script');
  790. // script.src = 'https://beta.cloud.cocorobo.cn/js/Common/uploadR2R.js';
  791. // script.type = 'text/javascript';
  792. // script.defer = true; // 或者 async,根据需要
  793. // script.onload = () => {
  794. // console.log('上传脚本加载成功');
  795. // // 你可以在这里使用上传文件的功能了
  796. // };
  797. // script.onerror = () => {
  798. // console.error('上传脚本加载失败');
  799. // };
  800. // document.head.appendChild(script);
  801. }
  802. };
  803. </script>
  804. <style scoped>
  805. .f_box {
  806. width: 100%;
  807. /* height: 100%; */
  808. position: relative;
  809. min-height: 400px;
  810. display: flex;
  811. flex-direction: column;
  812. }
  813. .f_box_top {
  814. display: flex;
  815. align-items: center;
  816. padding: 10px 0 0;
  817. padding-top: 0px;
  818. width: 100%;
  819. box-sizing: border-box;
  820. position: relative;
  821. height: 50px;
  822. min-height: 50px;
  823. border-bottom: 1px solid #E8EBF0;
  824. padding: 0 24px;
  825. }
  826. .f_box_top_left {
  827. display: flex;
  828. align-items: center;
  829. }
  830. .f_box_top_title {
  831. font-size: 16px;
  832. color: rgba(8, 13, 30, .9);
  833. /* font-weight: bold; */
  834. }
  835. .btn {
  836. display: flex;
  837. cursor: pointer;
  838. align-items: center;
  839. height: 30px;
  840. padding: 0 8px;
  841. background: rgb(0, 97, 255);
  842. color: #fff;
  843. box-sizing: border-box;
  844. border-radius: 4px;
  845. font-size: 14px;
  846. align-items: center;
  847. }
  848. .btn2 {
  849. display: flex;
  850. cursor: pointer;
  851. align-items: center;
  852. height: 30px;
  853. padding: 0 8px;
  854. background: #fff;
  855. color: rgb(0, 97, 255);
  856. border: 1px solid rgb(0, 97, 255);
  857. box-sizing: border-box;
  858. border-radius: 4px;
  859. font-size: 14px;
  860. align-items: center;
  861. }
  862. .f_box_top .delBtn {
  863. background: rgb(255, 0, 13);
  864. }
  865. .btn + .btn2,
  866. .btn + .btn,
  867. .btn2 + .btn2,
  868. .btn2 + .delBtn {
  869. margin-left: 15px;
  870. }
  871. .f_box_container{
  872. display: flex;
  873. flex-direction: column;
  874. gap: 16px;
  875. height: 100%;
  876. overflow: auto;
  877. }
  878. .f_box_top_right {
  879. margin-left: auto;
  880. /* max-width: calc(100% - 280px); */
  881. overflow: hidden;
  882. display: flex;
  883. /* align-items: center; */
  884. padding: 0 24px;
  885. min-height: fit-content;
  886. }
  887. .f_box_top_right > .input {
  888. position: relative;
  889. /* height: 40px; */
  890. }
  891. .f_box_top_right >>> .el-button{
  892. height: 35px !important;
  893. font-size: 12.8px;
  894. background-color: #3370FF;
  895. border-radius: 6px;
  896. margin-left: 12px;
  897. }
  898. .f_box_top_right >>>.el-button--primary:focus,.f_box_top_right>>> .el-button--primary:hover{
  899. filter: brightness(120%);
  900. }
  901. .f_box_top_right >>> .el-icon-plus:before {
  902. font-size: 14px;
  903. font-weight: 600;
  904. /* vertical-align: middle; */
  905. }
  906. .f_box_top_right > .input > input {
  907. width: 100%;
  908. height: 100%;
  909. border: 1px solid #dcdfe6;
  910. border-radius: 5px;
  911. padding: 0 15px 0 45px;
  912. box-sizing: border-box;
  913. font-size: 14px;
  914. width: 250px;
  915. height: 36px;
  916. font-size: 12.8px;
  917. border-radius: 6px;
  918. outline: none;
  919. }
  920. .f_box_top_right > .input > .serch {
  921. content: "";
  922. display: block;
  923. width: 20px;
  924. height: 20px;
  925. background-image: url("../../../assets/icon/sourceFile/search.png");
  926. background-size: 100% 100%;
  927. position: absolute;
  928. left: 13px;
  929. top: 50%;
  930. transform: translateY(-50%);
  931. cursor: pointer;
  932. }
  933. .f_box_top_right > .tab {
  934. height: 30px;
  935. width: 80px;
  936. margin-left: 15px;
  937. background: #e7e7e7;
  938. border: 2px solid #d9d9d9;
  939. border-radius: 5px;
  940. box-sizing: border-box;
  941. overflow: hidden;
  942. display: flex;
  943. align-items: center;
  944. }
  945. .f_box_top_right > .tab > .table,
  946. .f_box_top_right > .tab > .list {
  947. width: 50%;
  948. height: 100%;
  949. display: flex;
  950. align-items: center;
  951. justify-content: center;
  952. cursor: pointer;
  953. }
  954. .f_box_top_right > .tab > .list::before {
  955. content: "";
  956. display: block;
  957. width: 20px;
  958. height: 20px;
  959. background-image: url("../../../assets/icon/sourceFile/list.png");
  960. background-size: 100% 100%;
  961. }
  962. .f_box_top_right > .tab > .list.active,
  963. .f_box_top_right > .tab > .table.active {
  964. background: #fff;
  965. }
  966. .f_box_top_right > .tab > .table::before {
  967. content: "";
  968. display: block;
  969. width: 20px;
  970. height: 20px;
  971. background-image: url("../../../assets/icon/sourceFile/table.png");
  972. background-size: 100% 100%;
  973. }
  974. .mask {
  975. /* background-color: rgb(0 0 0 / 30%); */
  976. /* position: fixed; */
  977. position: absolute;
  978. top: 0;
  979. left: 0;
  980. width: 100%;
  981. height: 100%;
  982. z-index: 90;
  983. display: flex;
  984. align-items: center;
  985. justify-content: center;
  986. }
  987. .progressBox {
  988. width: 300px;
  989. height: 100px;
  990. background: #fff;
  991. border-radius: 5px;
  992. box-shadow: 0 0 6px 1px #bfbfbf;
  993. display: flex;
  994. align-items: center;
  995. justify-content: center;
  996. flex-direction: column;
  997. position: relative;
  998. color: #6c6c6c;
  999. }
  1000. .progressBox >>> .el-progress-bar__outer {
  1001. background-color: #d1dfff !important;
  1002. }
  1003. .progressBox .lbox {
  1004. height: 50px;
  1005. font-size: 16px;
  1006. display: flex;
  1007. align-items: center;
  1008. color: #747474;
  1009. }
  1010. .progressBox .lbox img {
  1011. width: 50px;
  1012. margin-right: 0px;
  1013. }
  1014. .closeCss {
  1015. position: absolute;
  1016. top: 8px;
  1017. right: 8px;
  1018. cursor: pointer;
  1019. width: 20px;
  1020. height: 20px;
  1021. }
  1022. .closeCss > img {
  1023. width: 100%;
  1024. height: 100%;
  1025. }
  1026. .f_box_file_square {
  1027. height: calc(100% - 55px);
  1028. overflow: auto;
  1029. width: 100%;
  1030. padding: 55px;
  1031. box-sizing: border-box;
  1032. display: flex;
  1033. flex-wrap: wrap;
  1034. align-content: flex-start;
  1035. position: relative;
  1036. }
  1037. .f_box_file_square > .f_box_file {
  1038. display: flex;
  1039. flex-direction: column;
  1040. align-items: center;
  1041. justify-content: center;
  1042. width: 160px;
  1043. height: 160px;
  1044. cursor: pointer;
  1045. margin: 0 36px 36px 0;
  1046. border-radius: 20px;
  1047. position: relative;
  1048. }
  1049. .f_box_file_square > .f_box_file:hover {
  1050. background: #f0f2f5;
  1051. }
  1052. .f_box_file_square > .f_box_file:hover > .check {
  1053. display: block;
  1054. }
  1055. .f_box_file_square > .f_box_file.check {
  1056. background: #e0eafb;
  1057. }
  1058. .f_box_file_square > .f_box_file.check > .check {
  1059. display: block;
  1060. }
  1061. .f_box_file_square > .f_box_file > .check {
  1062. position: absolute;
  1063. left: 15px;
  1064. top: 15px;
  1065. width: 16px;
  1066. height: 16px;
  1067. background-size: 100%;
  1068. display: none;
  1069. }
  1070. .f_box_file_square > .f_box_file > .check > img {
  1071. width: 100%;
  1072. height: 100%;
  1073. object-fit: cover;
  1074. }
  1075. .f_box_file_square > .f_box_file > img {
  1076. width: 90px;
  1077. height: 90px;
  1078. object-fit: cover;
  1079. }
  1080. .f_box_file_square > .f_box_file > .name {
  1081. white-space: nowrap;
  1082. font-size: 14px;
  1083. max-width: 80%;
  1084. overflow: hidden;
  1085. margin: 4px auto 0;
  1086. text-overflow: ellipsis;
  1087. text-align: center;
  1088. }
  1089. .f_box_file_list {
  1090. /* height: calc(100% - 55px); */
  1091. /* overflow: auto; */
  1092. width: 100%;
  1093. /* padding: 10px 0; */
  1094. padding-top: 0;
  1095. box-sizing: border-box;
  1096. position: relative;
  1097. padding: 0 24px;
  1098. }
  1099. .f_box_file_list > .f_box_file {
  1100. }
  1101. .f_box_file_list >>> .el-table-column--selection .cell{
  1102. display: flex !important;
  1103. align-items: center !important;
  1104. }
  1105. .f_box_file_allCheck {
  1106. display: flex;
  1107. align-items: center;
  1108. position: absolute;
  1109. font-size: 14px;
  1110. top: 20px;
  1111. left: 10px;
  1112. cursor: pointer;
  1113. }
  1114. .f_box_file_allCheck > img {
  1115. width: 16px;
  1116. height: 16px;
  1117. object-fit: cover;
  1118. margin-right: 5px;
  1119. }
  1120. .el-dialogClass>>>.el-dialog{
  1121. border-radius: 8px;
  1122. }
  1123. .dialog >>> .el-dialog__body {
  1124. padding: 10px 20px;
  1125. }
  1126. .type_nav_box {
  1127. }
  1128. .type_nav_box > .nav {
  1129. height: 40px;
  1130. border-radius: 5px;
  1131. cursor: pointer;
  1132. display: flex;
  1133. align-items: center;
  1134. width: 100%;
  1135. padding: 0 10px;
  1136. box-sizing: border-box;
  1137. margin-bottom: 10px;
  1138. font-size: 16px;
  1139. color: #000;
  1140. }
  1141. .type_nav_box > .nav > .down {
  1142. min-width: 14px;
  1143. height: 14px;
  1144. background-image: url("../../../assets/icon/sourceFile/icon_arrow.png");
  1145. background-size: 100% 100%;
  1146. margin-right: 10px;
  1147. transition: all 0.3s;
  1148. transform: rotate(-90deg);
  1149. }
  1150. .type_nav_box > .nav.active > .down {
  1151. transform: rotate(0deg);
  1152. }
  1153. .type_nav_box > .nav > .file {
  1154. min-width: 18px;
  1155. height: 18px;
  1156. background-image: url("../../../assets/icon/sourceFile/file.png");
  1157. background-size: 100% 100%;
  1158. margin-right: 10px;
  1159. }
  1160. .type_nav_box > .nav > .name {
  1161. max-width: 100%;
  1162. overflow: hidden;
  1163. text-overflow: ellipsis;
  1164. white-space: nowrap;
  1165. }
  1166. .type_nav_box > .child {
  1167. }
  1168. .type_nav_box > .child > .nav {
  1169. height: 40px;
  1170. border-radius: 5px;
  1171. cursor: pointer;
  1172. display: flex;
  1173. align-items: center;
  1174. width: 100%;
  1175. padding: 0 10px 0 50px;
  1176. box-sizing: border-box;
  1177. margin-bottom: 10px;
  1178. font-size: 16px;
  1179. color: #000;
  1180. }
  1181. .type_nav_box > .child > .nav.active {
  1182. background: #e0eafb;
  1183. }
  1184. .type_nav_box > .child > .nav > .file {
  1185. min-width: 18px;
  1186. height: 18px;
  1187. background-image: url("../../../assets/icon/sourceFile/file.png");
  1188. background-size: 100% 100%;
  1189. margin-right: 10px;
  1190. }
  1191. .type_nav_box > .child > .nav > .name {
  1192. max-width: 100%;
  1193. overflow: hidden;
  1194. text-overflow: ellipsis;
  1195. white-space: nowrap;
  1196. }
  1197. .none_box {
  1198. height: calc(100% - 55px);
  1199. overflow: auto;
  1200. width: 100%;
  1201. padding: 10px;
  1202. box-sizing: border-box;
  1203. display: flex;
  1204. align-items: center;
  1205. justify-content: center;
  1206. }
  1207. .list_file_box {
  1208. width: 100%;
  1209. }
  1210. .list_file_box >>> .el-table__empty-block{
  1211. height: 300px !important;
  1212. display: flex;
  1213. align-items: center;
  1214. }
  1215. .list_file_box >>> .el-table__empty-block div{
  1216. display: flex;
  1217. flex-direction: column;
  1218. align-items: center;
  1219. /* justify-content: center; */
  1220. }
  1221. .customC{
  1222. /* height: 300px; */
  1223. /* width: 100px; */
  1224. /* height: 400px;
  1225. display: flex;
  1226. flex-direction: column;
  1227. align-items: center;
  1228. justify-content: center;
  1229. flex-wrap: wrap;
  1230. font-size: 14px;
  1231. margin-top: .5rem;
  1232. color: #667085; */
  1233. }
  1234. .list_file_box >>>table th{
  1235. border:none !important;
  1236. background-color: #F0F2F5 !important; /* 浅灰色背景 */
  1237. color: #00000099 !important;
  1238. }
  1239. .list_file_box >>>table tr td{
  1240. border:none !important;
  1241. border-bottom: 1px solid #EBEEF5 !important;
  1242. }
  1243. .list_file_box >>>table tr {
  1244. border:1px #000 solid !important;
  1245. }
  1246. .list_file_box >>> .el-table__header-wrapper{
  1247. margin-bottom: 10px !important;
  1248. }
  1249. .list_file_box >>> .el-table__row{
  1250. border: 1px #ccc solid;
  1251. }
  1252. .list_file_box >>>table tr td:nth-child(1){
  1253. border-radius: 10px 0 0 10px !important;
  1254. }
  1255. .list_file_box >>>table tr td:nth-last-child(1){
  1256. border-radius: 0 10px 10px 0 !important;
  1257. }
  1258. .list_file_box >>>table tr th:nth-child(1){
  1259. border-radius: 10px 0 0 10px;
  1260. }
  1261. .list_file_box >>>table tr th:nth-last-child(2){
  1262. border-radius: 0 10px 10px 0 !important;
  1263. }
  1264. .list_file_box >>>.el-table::before{
  1265. background-color: #fff;
  1266. }
  1267. .list_file_box >>>.el-table--border::after{
  1268. background-color: #fff;
  1269. }
  1270. .list_file_box >>> .el-table--border{
  1271. border: none;
  1272. border-bottom: 1px solid #EBEEF5;
  1273. }
  1274. .BtnH >>> .el-button{
  1275. padding: 5px !important;
  1276. width: 30px !important;
  1277. color: #4C5567;
  1278. }
  1279. .BtnH >>> .el-button:focus,.BtnH >>> .el-button:hover{
  1280. background: #E8EBF0 !important;
  1281. color: #487FFF !important;
  1282. }
  1283. .BtnH >>> .el-button--small, .el-button--small.is-round{
  1284. border: none;
  1285. padding: 0;
  1286. }
  1287. .BtnHP{
  1288. display: flex;
  1289. flex-direction: column;
  1290. justify-content: center;
  1291. }
  1292. .BtnHP >>>.el-popper .popper__arrow, .el-popper .popper__arrow::after{
  1293. display: none;
  1294. }
  1295. .BtnHP >>> .el-button--text{
  1296. color: #667095;
  1297. }
  1298. .BtnHP img{
  1299. width: 16px;
  1300. }
  1301. .BtnHPDel{
  1302. display: flex;
  1303. flex-direction: column;
  1304. flex-wrap: wrap;
  1305. justify-content: center;
  1306. }
  1307. .BtnHPDel >>> .el-button+.el-button{
  1308. padding: 0;
  1309. }
  1310. .BtnHPDel >>> .el-button:focus,.BtnHPDel >>> .el-button:hover{
  1311. background: #E8EBF0 !important;
  1312. }
  1313. /* .BtnHPDel >>> .el-button:hover .lookHp{
  1314. } */
  1315. .lookHp2{
  1316. color: #6c6c6c;
  1317. }
  1318. .lookHp2{
  1319. color: #487FFF;
  1320. }
  1321. /* .btnBh{
  1322. display: flex;
  1323. align-items: center;
  1324. justify-content: center;
  1325. cursor: pointer;
  1326. height: 28px;
  1327. border-radius: 5px;
  1328. }
  1329. .btnBh:hover{
  1330. background: #F0F4FF;
  1331. }
  1332. .btnBh img{
  1333. margin-right: 5px;
  1334. } */
  1335. .btnBh2 img{
  1336. width: 17px;
  1337. margin-right: 5px;
  1338. padding: 1.5px;
  1339. box-sizing: border-box;
  1340. }
  1341. .btnBh2:hover{
  1342. background: #FBEAE8;
  1343. }
  1344. .list_file_name {
  1345. display: flex;
  1346. align-items: center;
  1347. }
  1348. .list_file_name > img {
  1349. width: 24px;
  1350. height: 24px;
  1351. object-fit: cover;
  1352. margin-right: 5px;
  1353. }
  1354. .list_file_name > div {
  1355. max-width: 100%;
  1356. overflow: hidden;
  1357. white-space: nowrap;
  1358. text-overflow: ellipsis;
  1359. }
  1360. .pageBox{
  1361. display: flex;
  1362. }
  1363. .pageBox >>> .el-pagination__total{
  1364. margin-right: auto;
  1365. }
  1366. .btnBh2{
  1367. display: flex;
  1368. align-items: center;
  1369. cursor: pointer;
  1370. padding: 5px 8px;
  1371. border-radius: 6px;
  1372. box-sizing: border-box;
  1373. }
  1374. .btnBh{
  1375. display: flex;
  1376. cursor: pointer;
  1377. border-radius: 6px;
  1378. padding: 5px 8px;
  1379. }
  1380. </style>
  1381. <style>
  1382. .custom-popover {
  1383. min-width: 70px !important;
  1384. width: auto !important;
  1385. padding: 8px 10px;
  1386. border-radius: 8px;
  1387. }
  1388. /* .custom-popover2 {
  1389. min-width: 88px !important;
  1390. width: auto !important;
  1391. padding: 8px;
  1392. top: 414px !important;
  1393. text-align: center;
  1394. } */
  1395. .BtnH >>> .el-button{
  1396. padding: 5px !important;
  1397. width: 30px !important;
  1398. color: #4C5567;
  1399. }
  1400. .BtnH >>> .el-button:focus,.BtnH >>> .el-button:hover{
  1401. background: #E8EBF0 !important;
  1402. color: #487FFF !important;
  1403. }
  1404. .BtnHPDel1 >>> .el-button:focus, .BtnHPDel1 >>> .el-button:hover{
  1405. background: #F0F4FF ;
  1406. color: #082e86 !important;
  1407. }
  1408. .BtnHPDel >>> .el-button:focus,.BtnHPDel >>> .el-button:hover{
  1409. background: #FBEAE8 !important;
  1410. color: #DE4C41 !important;
  1411. }
  1412. .BtnH >>> .el-button--small, .el-button--small.is-round{
  1413. border: none;
  1414. padding: 0;
  1415. }
  1416. .BtnHP{
  1417. display: flex;
  1418. flex-direction: column;
  1419. justify-content: center;
  1420. }
  1421. .BtnHPDel{
  1422. display: flex;
  1423. flex-direction: column;
  1424. justify-content: center;
  1425. }
  1426. .BtnHPDel1{
  1427. display: flex;
  1428. flex-direction: column;
  1429. justify-content: center;
  1430. }
  1431. .BtnHP >>> .el-button{
  1432. color: #4C5567;
  1433. margin-left: 0 !important;
  1434. }
  1435. .BtnHP >>>.el-popper .popper__arrow, .el-popper .popper__arrow::after{
  1436. display: none;
  1437. }
  1438. .btnBh{
  1439. display: flex;
  1440. /* align-items: center; */
  1441. justify-content: center;
  1442. cursor: pointer;
  1443. /* height: 28px; */
  1444. border-radius: 6px;
  1445. padding: 6px 9px;
  1446. }
  1447. .btnBh:hover{
  1448. background: #F0F4FF;
  1449. }
  1450. .btnBh img{
  1451. margin-right: 5px;
  1452. width: 17px;
  1453. }
  1454. .btnBh2{
  1455. display: flex;
  1456. align-items: center;
  1457. justify-content: center;
  1458. cursor: pointer;
  1459. height: 28px;
  1460. padding: 0 10px;
  1461. border-radius: 5px;
  1462. }
  1463. .btnBh2 img{
  1464. width: 14px;
  1465. margin-right: 5px;
  1466. }
  1467. .btnBh2:hover{
  1468. background: #FBEAE8;
  1469. }
  1470. .lookHp2{
  1471. color: #6c6c6c;
  1472. }
  1473. .lookHp2{
  1474. color: #487FFF;
  1475. }
  1476. .list_file_box >>> .el-table__empty-text{
  1477. display: flex;
  1478. justify-content: center;
  1479. line-height: 22px !important;
  1480. }
  1481. .list_file_box >>> .el-table-column--selection .cell{
  1482. display: flex !important;
  1483. align-items: center !important;
  1484. }
  1485. .f_box_top_center{
  1486. margin: auto;
  1487. display: flex;
  1488. align-items: center;
  1489. position: absolute;
  1490. top: 50%;
  1491. left: 50%;
  1492. transform: translate(-50%, -50%);
  1493. }
  1494. .f_box_top_center > span{
  1495. font-size: 16px;
  1496. cursor: pointer;
  1497. padding: 6px 8px;
  1498. color: #1A202C;
  1499. }
  1500. .f_box_top_center > span:hover{
  1501. background: rgb(242, 243, 243);
  1502. border-radius: 5px;
  1503. }
  1504. .f_box_top_center > span.active{
  1505. color: #2B5FD9;
  1506. }
  1507. </style>