folder.vue 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776
  1. <template>
  2. <div
  3. class="f_box"
  4. :style="{
  5. background: stype2 == 2 ? '#fff' : '',
  6. padding: stype2 == 2 ? '10px' : '',
  7. }"
  8. v-loading="delLoading"
  9. >
  10. <!-- <div class="f_box_top" >
  11. <div class="f_box_top_left">
  12. <div class="f_box_top_title">
  13. 所有文件夹
  14. </div>
  15. </div>
  16. </div> -->
  17. <div class="f_box_top">
  18. <div class="f_box_top_left">
  19. <el-select
  20. style="margin-right: 10px; width: 100px"
  21. v-loading="tagLoading1"
  22. v-model="check1"
  23. :placeholder="lang.subject"
  24. clearable
  25. filterable
  26. collapse-tags
  27. @change="serchFile()"
  28. >
  29. <el-option
  30. v-for="(item, index) in tagData1"
  31. :key="index"
  32. :label="item.name"
  33. :value="item.id"
  34. ></el-option>
  35. </el-select>
  36. <el-select
  37. style="margin-right: 10px; width: 100px"
  38. v-loading="tagLoading2"
  39. v-model="check2"
  40. :placeholder="lang.grade"
  41. clearable
  42. filterable
  43. @change="serchFile()"
  44. >
  45. <el-option
  46. v-for="(item, index) in tagData2"
  47. :key="index"
  48. :label="item.name"
  49. :value="item.id"
  50. ></el-option>
  51. </el-select>
  52. <el-select
  53. v-if="pid.split('/')[0] == '0'"
  54. style="width: 100px"
  55. v-loading="tagLoading3"
  56. v-model="check3"
  57. :placeholder="lang.customize"
  58. clearable
  59. filterable
  60. @change="serchFile()"
  61. >
  62. <el-option
  63. v-for="(item, index) in tagData3"
  64. :key="index"
  65. :label="item.name"
  66. :value="item.name"
  67. ></el-option>
  68. </el-select>
  69. <el-select
  70. v-if="pid.split('/')[0] == '1'"
  71. style="width: 120px"
  72. v-loading="isLoading"
  73. v-model="user"
  74. :placeholder="lang.owner"
  75. clearable
  76. filterable
  77. @change="serchFile()"
  78. >
  79. <el-option
  80. v-for="(item, index) in userArray"
  81. :key="index"
  82. :label="item.username"
  83. :value="item.userid"
  84. ></el-option>
  85. </el-select>
  86. </div>
  87. <div class="f_box_top_right">
  88. <div>
  89. <div
  90. class="left"
  91. style="display: flex; justify-content: flex-end; padding: 10px 16px"
  92. >
  93. <span
  94. class="list"
  95. :class="{ active: stype2 == 1 }"
  96. @click="checkStype2(1)"
  97. ></span>
  98. <span
  99. class="table"
  100. :class="{ active: stype2 == 2 }"
  101. @click="checkStype2(2)"
  102. ></span>
  103. </div>
  104. </div>
  105. <div class="input">
  106. <div class="serch"></div>
  107. <input
  108. type="text"
  109. v-model="fileName"
  110. :placeholder="lang.search"
  111. @input="debouncedSearch"
  112. />
  113. </div>
  114. <div class="f_box_top_right">
  115. <el-button
  116. v-if="pid.split('/')[0] == '0'"
  117. type="primary"
  118. style="background-color: #3370ff; height: 38px"
  119. size="small"
  120. @click="openAdd"
  121. icon="el-icon-plus"
  122. >{{ lang.newFolder }}</el-button
  123. >
  124. <el-button
  125. style="height: 38px; margin-right: 12px; background: #f56c6c"
  126. type="danger"
  127. v-if="checkArray.length && stype2 == 2"
  128. size="small"
  129. @click="deleteFolder"
  130. >{{ lang.delete }}</el-button
  131. >
  132. <span
  133. v-if="checkArray.length && stype2 == 2"
  134. style="
  135. margin-right: 10px;
  136. color: #b0b0b0;
  137. font-size: 14px;
  138. flex-shrink: 0;
  139. "
  140. >{{ lang.selectedFolders }}{{ checkArray.length
  141. }}{{ lang.piece }}</span
  142. >
  143. </div>
  144. </div>
  145. </div>
  146. <div
  147. class="none_box"
  148. v-if="fileArray.length == 0"
  149. v-loading.body="isLoading && showBool"
  150. >
  151. {{ lang.noFolder }}
  152. </div>
  153. <div
  154. class="f_box_file_list"
  155. v-else-if="stype == '2' && fileArray.length"
  156. v-loading.body="isLoading && showBool"
  157. >
  158. <!-- 切换样式 -->
  159. <!-- :style="{'grid-template-columns': `repeat(${lisTnum}, 1fr)`}" -->
  160. <div v-if="stype2 == 1" class="listBlockS">
  161. <div
  162. class="listBlock"
  163. @click="editFile(item.id, item.folderid)"
  164. v-for="(item, index) in fileArray"
  165. :key="index"
  166. >
  167. <div class="listBlockTit">
  168. <div class="listBlockTit">
  169. <img
  170. style="width: 28px; height: 28px"
  171. src="../../../assets/listfolder2.svg"
  172. alt=""
  173. />
  174. <div
  175. class="listBlockTitZ"
  176. style="margin-left: 5px; color: #111824"
  177. >
  178. {{ item.name }}
  179. </div>
  180. </div>
  181. </div>
  182. <div class="listDetail">
  183. <span v-if="!item.detail">{{ lang.noDesc }}~</span>
  184. <div class="listDetail2" v-else>
  185. {{ item.detail }}
  186. </div>
  187. </div>
  188. <div class="listBlockTit">
  189. <div class="owerCon">
  190. <div
  191. style="display: flex; align-items: center; margin-right: 14px"
  192. >
  193. <img src="../../../assets/owerlogo.png" alt="" />
  194. <div class="perName">{{ item.username }}</div>
  195. </div>
  196. <div
  197. style="
  198. display: flex;
  199. align-items: center;
  200. margin-right: 10px;
  201. flex-shrink: 0;
  202. "
  203. >
  204. <img
  205. v-if="item.juri == 1"
  206. style="width: 13px"
  207. src="../../../assets/siyou1.svg"
  208. alt=""
  209. />
  210. <img
  211. v-if="item.juri == 2"
  212. style="width: 13px"
  213. src="../../../assets/siyou2.svg"
  214. alt=""
  215. />
  216. <img
  217. v-if="item.juri == 3"
  218. style="width: 13px"
  219. src="../../../assets/siyou3.svg"
  220. alt=""
  221. />
  222. {{ getJuri(item.juri) }}
  223. </div>
  224. <div class="listTag">
  225. {{ item.subTagName }}
  226. </div>
  227. </div>
  228. <div>
  229. <el-popover
  230. placement="bottom-start"
  231. trigger="hover"
  232. popper-class="custom-popover"
  233. visible-arrow
  234. width="100px"
  235. >
  236. <div class="BtnHP">
  237. <div class="BtnHPDel">
  238. <!-- <el-button
  239. @click="editFile(item.id, item.folderid)"
  240. size="small"
  241. type="text"
  242. @mouseover="isHover = true"
  243. @mouseleave="isHover = false"
  244. > -->
  245. <div
  246. class="btnBh"
  247. @click="editFile(item.id, item.folderid)"
  248. @mouseover="isHover = true"
  249. @mouseleave="isHover = false"
  250. >
  251. <img :src="isHover ? look2 : look1" />
  252. <span :class="isHover ? 'lookHp2' : 'lookHp1'">{{
  253. lang.view
  254. }}</span>
  255. </div>
  256. <!-- </el-button
  257. > -->
  258. <!-- <el-button
  259. @click="copyFolder(item)"
  260. size="small"
  261. type="text"
  262. v-if="item.isMo == '2'"
  263. > -->
  264. <div
  265. class="btnBh"
  266. v-if="item.isMo == '2'"
  267. @click="copyFolder(item)"
  268. @mouseover="isHover2 = true"
  269. @mouseleave="isHover2 = false"
  270. >
  271. <img :src="isHover2 ? copy1 : copy2" alt="" />
  272. <span :class="isHover2 ? 'lookHp2' : 'lookHp1'">{{
  273. lang.copy
  274. }}</span>
  275. </div>
  276. <!-- </el-button > -->
  277. </div>
  278. <div
  279. v-if="item.userid == userid && item.isMo == '2'"
  280. style="
  281. background-color: #e7e7e7;
  282. width: 100%;
  283. height: 0.5px;
  284. margin: 5px 0;
  285. "
  286. ></div>
  287. <div class="BtnHPDel1">
  288. <!-- <el-button
  289. @click="deleteFile(item.id, item.folderid)"
  290. size="small"
  291. type="text"
  292. style="color: #DE4C41;"
  293. v-if="item.userid == userid && item.isMo == '2'"
  294. > -->
  295. <div
  296. class="btnBh2"
  297. @click="deleteFile(item.id, item.folderid, 1)"
  298. v-if="item.userid == userid && item.isMo == '2'"
  299. >
  300. <img src="../../../assets/listdel.svg" alt="" />
  301. <span style="color: #de4c41">{{ lang.delete }}</span>
  302. </div>
  303. <!-- </el-button
  304. > -->
  305. </div>
  306. </div>
  307. <el-button
  308. slot="reference"
  309. class="BtnH"
  310. style="border: none; padding: 5px"
  311. >
  312. <i class="el-icon-more"></i>
  313. </el-button>
  314. </el-popover>
  315. </div>
  316. </div>
  317. </div>
  318. </div>
  319. <div v-else class="list_file_box" v-loading.body="isLoading && showBool">
  320. <el-table
  321. ref="myTable"
  322. :data="fileArray"
  323. border
  324. style="width: 100%"
  325. @selection-change="handleSelectionChange"
  326. max-height="800px"
  327. :row-key="(row) => row.id"
  328. >
  329. <el-table-column
  330. type="selection"
  331. width="50px"
  332. :reserve-selection="true"
  333. :selectable="isSelectable"
  334. ></el-table-column>
  335. <el-table-column
  336. prop="name"
  337. :label="lang.folderName"
  338. show-overflow-tooltip
  339. min-width="15"
  340. ></el-table-column>
  341. <el-table-column
  342. prop="detail"
  343. :label="lang.description"
  344. show-overflow-tooltip
  345. min-width="20"
  346. ></el-table-column>
  347. <el-table-column
  348. prop="fileCount"
  349. :label="lang.fileNumber"
  350. width="120px"
  351. ></el-table-column>
  352. <el-table-column
  353. prop="username"
  354. :label="lang.owner"
  355. show-overflow-tooltip
  356. width="120"
  357. ></el-table-column>
  358. <el-table-column
  359. :label="lang.tag"
  360. show-overflow-tooltip
  361. min-width="10"
  362. >
  363. <template slot-scope="scope">
  364. {{ getTag(scope.row) }}
  365. </template>
  366. </el-table-column>
  367. <el-table-column :label="lang.publicPermissions" width="120px">
  368. <template slot-scope="scope">
  369. {{ getJuri(scope.row.juri) }}
  370. </template>
  371. </el-table-column>
  372. <el-table-column
  373. prop="time"
  374. :label="lang.editTime"
  375. min-width="15"
  376. ></el-table-column>
  377. <el-table-column align="center" width="100px">
  378. <template slot-scope="scope">
  379. <div>
  380. <el-popover
  381. placement="bottom-start"
  382. trigger="hover"
  383. popper-class="custom-popover"
  384. visible-arrow
  385. width="100px"
  386. >
  387. <div class="BtnHP">
  388. <div class="BtnHPDel">
  389. <div
  390. class="btnBh"
  391. @click="editFile(scope.row.id, scope.row.folderid)"
  392. @mouseover="isHover = true"
  393. @mouseleave="isHover = false"
  394. >
  395. <img :src="isHover ? look2 : look1" />
  396. <span :class="isHover ? 'lookHp2' : 'lookHp1'">{{
  397. lang.view
  398. }}</span>
  399. </div>
  400. <!-- <el-button
  401. @click="editFile(scope.row.id, scope.row.folderid)"
  402. size="small"
  403. type="text"
  404. >查看</el-button
  405. > -->
  406. <div
  407. class="btnBh"
  408. v-if="scope.row.isMo == '2'"
  409. @click="copyFolder(scope.row)"
  410. @mouseover="isHover2 = true"
  411. @mouseleave="isHover2 = false"
  412. >
  413. <img :src="isHover2 ? copy1 : copy2" alt="" />
  414. <span :class="isHover2 ? 'lookHp2' : 'lookHp1'">{{
  415. lang.copy
  416. }}</span>
  417. </div>
  418. <!-- <el-button
  419. @click="copyFolder(scope.row)"
  420. size="small"
  421. type="text"
  422. v-if="scope.row.isMo == '2'"
  423. >复制</el-button
  424. > -->
  425. </div>
  426. <div
  427. v-if="scope.row.userid == userid && scope.row.isMo == '2'"
  428. style="
  429. background-color: #e7e7e7;
  430. width: 100%;
  431. height: 0.5px;
  432. margin: 5px 0;
  433. "
  434. ></div>
  435. <div class="BtnHPDel1">
  436. <div
  437. class="btnBh2"
  438. @click="deleteFile(scope.row.id, scope.row.folderid)"
  439. v-if="
  440. scope.row.userid == userid && scope.row.isMo == '2'
  441. "
  442. >
  443. <img src="../../../assets/listdel.svg" alt="" />
  444. <span style="color: #de4c41">{{ lang.delete }}</span>
  445. </div>
  446. <!-- <el-button
  447. @click="deleteFile(scope.row.id, scope.row.folderid)"
  448. size="small"
  449. type="text"
  450. style="color: #DE4C41;"
  451. v-if="scope.row.userid == userid && scope.row.isMo == '2'"
  452. >删除</el-button
  453. > -->
  454. </div>
  455. </div>
  456. <el-button
  457. slot="reference"
  458. class="BtnH"
  459. style="border: none; background: none; padding: 5px"
  460. >
  461. <i class="el-icon-more"></i>
  462. </el-button>
  463. </el-popover>
  464. </div>
  465. </template>
  466. </el-table-column>
  467. </el-table>
  468. </div>
  469. <div class="paginationArea">
  470. <span>{{ lang.a_total_of_x_items.replace('${x}',total) }}</span>
  471. <el-pagination
  472. class="pageBox"
  473. style="margin-top: 10px"
  474. layout="prev, pager, next, slot"
  475. :page-size="limit"
  476. :total="total"
  477. @current-change="handleCurrentChange"
  478. :page-sizes="[10, 20, 50, 100]"
  479. >
  480. <el-select
  481. v-model="limit"
  482. @change="handleSizeChange"
  483. class="file_mySelect"
  484. >
  485. <el-option
  486. v-for="item in [10, 20, 50, 100]"
  487. :key="item"
  488. :label="item"
  489. :value="item"
  490. ></el-option>
  491. </el-select>
  492. </el-pagination>
  493. </div>
  494. </div>
  495. <el-dialog
  496. :title="lang.newFolder"
  497. :visible.sync="moveBox"
  498. width="550px"
  499. style="border-radius: 8px"
  500. @close="moveBox = false"
  501. class="canEditCss"
  502. >
  503. <div class="canEditTit" slot="title">
  504. <img src="../../../assets/listfolder2.svg" alt="" />
  505. <span>{{ lang.newFolder }}</span>
  506. </div>
  507. <div>
  508. <el-input
  509. v-model="folderName"
  510. :placeholder="lang.knowledgeName"
  511. ></el-input>
  512. <el-input
  513. v-model="folderDescription"
  514. type="textarea"
  515. rows="4"
  516. resize="none"
  517. :placeholder="lang.knowledgeDesc"
  518. style="margin-top: 10px"
  519. ></el-input>
  520. </div>
  521. <span slot="footer">
  522. <el-button @click="moveBox = false">{{ lang.cancel }}</el-button>
  523. <el-button type="primary" @click="createFolder(2)" v-loading="addLoading">{{
  524. lang.confirm
  525. }}</el-button>
  526. </span>
  527. </el-dialog>
  528. </div>
  529. </template>
  530. <script>
  531. import officeImg from "../../../assets/icon/sourceFile/office.png";
  532. import pdfImg from "../../../assets/icon/sourceFile/pdf.png";
  533. import videoImg from "../../../assets/icon/sourceFile/video.png";
  534. import otherImg from "../../../assets/icon/sourceFile/other.png";
  535. import checkImg from "../../../assets/icon/sourceFile/check.png";
  536. import checkIsImg from "../../../assets/icon/sourceFile/check_is.png";
  537. import wVideo from "../test/file/wVideo.vue";
  538. import wpdf from "../test/file/wPdf2.vue";
  539. import wOffice from "../test/file/wOffice.vue";
  540. // 导入SVG组件
  541. import look1 from "../../../assets/look1.svg";
  542. import look2 from "../../../assets/look2.svg";
  543. import copy2 from "../../../assets/copy2.svg";
  544. import copy1 from "../../../assets/copy1.svg";
  545. import JSZip from "jszip";
  546. import FileSaver from "file-saver";
  547. import _ from "lodash";
  548. const getFile = (url) => {
  549. return new Promise((resolve, reject) => {
  550. var credentials = {
  551. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  552. secretAccessKey: "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",
  553. }; //秘钥形式的登录上传
  554. window.AWS.config.update(credentials);
  555. window.AWS.config.region = "cn-northwest-1"; //设置区域
  556. let url2 = url;
  557. let _url2 = "";
  558. if (
  559. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  560. ) {
  561. _url2 = url2.split(
  562. "https://view.officeapps.live.com/op/view.aspx?src="
  563. )[1];
  564. } else {
  565. _url2 = url2;
  566. }
  567. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  568. let name = decodeURIComponent(
  569. _url2
  570. .split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
  571. .replace(/\+/g, " ")
  572. );
  573. var params = {
  574. Bucket: "ccrb",
  575. Key: name,
  576. };
  577. s3.getObject(params, function (err, data) {
  578. if (err) {
  579. console.log(err, err.stack);
  580. resolve({ data: 1 });
  581. } else {
  582. resolve({ data: data.Body });
  583. console.log(data);
  584. } // sxuccessful response
  585. });
  586. // axios({
  587. });
  588. };
  589. export default {
  590. components: {
  591. wVideo,
  592. wpdf,
  593. wOffice,
  594. },
  595. props: {
  596. userid: {
  597. type: String,
  598. },
  599. typeArray: {
  600. type: Array,
  601. },
  602. pid: {
  603. type: String,
  604. },
  605. type: {
  606. type: String,
  607. },
  608. showBool: {
  609. type: Boolean,
  610. default: false,
  611. },
  612. },
  613. watch: {
  614. pid: {
  615. immediate: true,
  616. deep: true,
  617. handler(newValue, oldValue) {
  618. this.fileArray = [];
  619. this.checkArray = [];
  620. this.fileName = "";
  621. this.page = 1;
  622. this.getData();
  623. this.getTagArray(1);
  624. this.getTagArray(2);
  625. this.getTagArray(3);
  626. },
  627. },
  628. },
  629. data() {
  630. return {
  631. look1: look1,
  632. look2: look2,
  633. copy2: copy2,
  634. copy1: copy1,
  635. isHover: false,
  636. isHover2: false,
  637. delLoading: false,
  638. isLoading: false,
  639. proVisible: false,
  640. stype: 2,
  641. fileArray: [],
  642. officeImg: officeImg,
  643. pdfImg: pdfImg,
  644. videoImg: videoImg,
  645. otherImg: otherImg,
  646. checkImg: checkImg,
  647. checkIsImg: checkIsImg,
  648. checkArray: [],
  649. checkArray2: [],
  650. dialogVisiblePdf: false,
  651. dialogVisibleVideo: false,
  652. dialogVisibleOffice: false,
  653. wurl: "",
  654. moveBox: false,
  655. checkTypeArray: [],
  656. moveChild: "",
  657. fileName: "",
  658. folderName: "",
  659. folderDescription: "",
  660. page: 1,
  661. total: 0,
  662. limit: 20,
  663. tagLoading1: false,
  664. tagLoading2: false,
  665. tagLoading3: false,
  666. tagData1: [],
  667. tagData2: [],
  668. tagData3: [],
  669. check1: [],
  670. check2: [],
  671. check3: [],
  672. stype2: 1,
  673. userArray: [],
  674. user: "",
  675. addLoading: false,
  676. };
  677. },
  678. computed: {
  679. lisTnum() {
  680. if (this.fileArray.length >= 9 || this.fileArray.length > 2) {
  681. return 4;
  682. } else if (this.fileArray.length <= 2) {
  683. return 2;
  684. } else if (this.fileArray.length <= 1) {
  685. return 1;
  686. }
  687. },
  688. retrunType() {
  689. return function (item) {
  690. if (item.type == 1) {
  691. return this.lang.office;
  692. } else if (item.type == 2) {
  693. return this.lang.video;
  694. } else if (item.type == 3) {
  695. return this.lang.img;
  696. } else if (item.type == 4) {
  697. return this.lang.pdf;
  698. } else if (item.type == 5) {
  699. return this.lang.other;
  700. }
  701. };
  702. },
  703. getJuri() {
  704. return function (juri) {
  705. if (juri == 1) {
  706. return this.lang.private;
  707. } else if (juri == 2) {
  708. return this.lang.organization;
  709. } else if (juri == 3) {
  710. return this.lang.public;
  711. }
  712. };
  713. },
  714. getTag() {
  715. return function (row) {
  716. const tags = [row.classTagName, row.subTagName, row.tag]
  717. .filter((tag) => tag) // 过滤掉空值
  718. .flatMap((tag) => tag.split(",")); // 展开并分割
  719. return tags.length ? tags.join(",") : "-";
  720. };
  721. },
  722. },
  723. methods: {
  724. checkStype2(type) {
  725. if (this.stype2 != type) {
  726. this.checkArray = [];
  727. this.stype2 = type;
  728. }
  729. },
  730. getTagArray(type) {
  731. const tagLoadings = [
  732. this.tagLoading1,
  733. this.tagLoading2,
  734. this.tagLoading3,
  735. ];
  736. tagLoadings[type - 1] = true;
  737. let params = {
  738. type: type,
  739. uid: this.userid,
  740. };
  741. this.ajax
  742. .post(this.$store.state.api + "getKnowledgeTag", [params])
  743. .then((res) => {
  744. tagLoadings[type - 1] = false;
  745. let _data = res.data[0];
  746. _data.forEach((i) => {
  747. if (this.lang.lang == "en" && i.com) {
  748. i.name = i.com;
  749. } else if (this.lang.lang == "hk" && i.hk) {
  750. i.name = i.hk;
  751. }
  752. });
  753. this[`tagData${type}`] = _data;
  754. const checkKey = `check${type}`;
  755. // this[checkKey] = this[checkKey].filter(tag =>
  756. // this[`tagData${type}`].some(item => item.id === tag)
  757. // );
  758. })
  759. .catch((err) => {
  760. tagLoadings[type - 1] = false;
  761. console.error(err);
  762. });
  763. },
  764. handleCurrentChange(val) {
  765. this.page = val;
  766. this.getData();
  767. },
  768. handleSizeChange(val) {
  769. this.page = 1;
  770. this.limit = val;
  771. this.getData();
  772. },
  773. getData() {
  774. let type = this.pid.split("/");
  775. let id = this.userid;
  776. this.isLoading = true;
  777. let params = {
  778. uid: id,
  779. n: this.fileName.trim(),
  780. sub: this.check1,
  781. class: this.check2,
  782. tag: type[0] == "0" ? this.check3 : this.user,
  783. page: this.page,
  784. num: this.limit,
  785. };
  786. if(!type[0] == "0"){
  787. params.juri2 = this.lang.lang == 'hk' ? 2 : this.lang.lang == 'en' ? 3 : 1;
  788. }
  789. this.ajax
  790. .post(
  791. this.$store.state.fileApi +
  792. (type[0] == "0" ? "getFolderPage3" : "getFolderPageOpen2"),
  793. [params]
  794. )
  795. .then((res) => {
  796. this.isLoading = false;
  797. this.total = res.data[0].length ? res.data[0][0].num : 0;
  798. let _fileArray = res.data[0];
  799. _fileArray.forEach((i) => {
  800. if (i.isMo == '1') {
  801. i.name = this.lang.defaultFolder;
  802. i.detail = this.lang.defaultFolderDesc;
  803. }
  804. if (this.lang.lang == "en" && i.subTagNameCom) {
  805. i.subTagName = i.subTagNameCom;
  806. } else if (this.lang.lang == "hk" && i.subTagNameHk) {
  807. i.subTagName = i.subTagNameHk;
  808. }
  809. });
  810. this.fileArray = _fileArray;
  811. if (type[0] == "0" && res.data[1].length == 0) {
  812. this.folderName = this.lang.defaultFolder;
  813. this.folderDescription = this.lang.defaultFolderDesc;
  814. this.createFolder(1);
  815. }
  816. if (res.data[2].length != 0) {
  817. this.userArray = res.data[2];
  818. }
  819. this.$parent.getData();
  820. this.$forceUpdate();
  821. })
  822. .catch((err) => {
  823. this.isLoading = false;
  824. console.error(err);
  825. });
  826. },
  827. debouncedSearch() {
  828. clearTimeout(this.debounceTimeout);
  829. this.debounceTimeout = setTimeout(() => {
  830. this.serchFile();
  831. }, 300);
  832. },
  833. serchFile() {
  834. this.page = 1;
  835. this.getData();
  836. },
  837. handleSelectionChange(selectedRows) {
  838. this.checkArray = selectedRows.map((row) => row.id);
  839. this.checkArray2 = selectedRows.map((row) => ({
  840. id: row.id,
  841. folderid: row.folderid,
  842. }));
  843. },
  844. deleteFile(id, folderid, val) {
  845. this.$confirm(this.lang.confirmDelete, this.lang.prompt, {
  846. confirmButtonText: this.lang.confirm,
  847. cancelButtonText: this.lang.cancel,
  848. type: "warning",
  849. })
  850. .then(() => {
  851. this.delLoading = true;
  852. let params = [{ ids: id, folderids: folderid }];
  853. this.ajax
  854. .post(this.$store.state.fileApi + "deleteFolder", params)
  855. .then((res) => {
  856. this.delLoading = false;
  857. this.$message({
  858. message: this.lang.deleteSuccess,
  859. type: "success",
  860. });
  861. this.checkArray = [];
  862. this.checkArray2 = [];
  863. if (val != 1) {
  864. this.$refs.myTable.clearSelection();
  865. }
  866. this.getData();
  867. })
  868. .catch((err) => {
  869. this.delLoading = false;
  870. this.$message.error(this.lang.deleteFail);
  871. console.error(err);
  872. });
  873. })
  874. .catch(() => {});
  875. },
  876. copyFolder(data) {
  877. this.isLoading = true;
  878. let params = [
  879. {
  880. n: data.name,
  881. fd: data.detail,
  882. uid: this.userid,
  883. folderid: data.folderid,
  884. },
  885. ];
  886. this.ajax
  887. .post(this.$store.state.fileApi + "copyFolder", params)
  888. .then((res) => {
  889. this.isLoading = false;
  890. this.$message({
  891. message: this.lang.copySuccess,
  892. type: "success",
  893. });
  894. this.getData();
  895. })
  896. .catch((err) => {
  897. this.isLoading = false;
  898. this.$message.error(this.lang.copyFail);
  899. console.error(err);
  900. });
  901. },
  902. deleteFolder() {
  903. if (!this.checkArray.length) {
  904. this.$message.warning(this.lang.selectDeFolder);
  905. return;
  906. }
  907. let array = this.checkArray2.map((item) => item.id);
  908. let array2 = this.checkArray2.map((item) => item.folderid);
  909. this.deleteFile(array.join(","), array2.join(","));
  910. },
  911. checkMoveChild(item) {
  912. this.moveChild = item;
  913. },
  914. openAdd() {
  915. this.folderName = "";
  916. this.folderDescription = "";
  917. this.moveBox = true;
  918. },
  919. createFolder: _.debounce(function(im) {
  920. if (!this.folderName) {
  921. this.$message.error(this.lang.folderNameMust);
  922. return;
  923. }
  924. if (this.addLoading) {
  925. return;
  926. }
  927. this.addLoading = true;
  928. let params = [
  929. {
  930. n: this.folderName,
  931. fd: this.folderDescription,
  932. uid: this.userid,
  933. im: im ? im : 2,
  934. },
  935. ];
  936. this.ajax
  937. .post(this.$store.state.fileApi + "addFolder", params)
  938. .then((res) => {
  939. this.moveBox = false;
  940. this.addLoading = false;
  941. this.$message({
  942. message: this.lang.createSuccess,
  943. type: "success",
  944. });
  945. this.getData();
  946. })
  947. .catch((err) => {
  948. this.addLoading = false;
  949. this.$message.error(this.lang.createFail);
  950. console.error(err);
  951. });
  952. }, 500),
  953. editFile(id, folderid) {
  954. console.log(id);
  955. let array = [this.pid.split("/")[0], id];
  956. this.$emit("checkType", array.join("/"), folderid);
  957. },
  958. isSelectable(row) {
  959. return row.isMo == "2" && row.userid == this.userid;
  960. },
  961. },
  962. mounted() {
  963. // this.getData();
  964. },
  965. };
  966. </script>
  967. <style scoped>
  968. .listBlockS {
  969. display: grid;
  970. font-family: PingFang;
  971. gap: 20px;
  972. grid-template-columns: repeat(4, 1fr);
  973. -webkit-box-align: stretch;
  974. align-items: stretch;
  975. }
  976. .listBlock {
  977. flex: 1;
  978. min-width: 250px;
  979. user-select: none;
  980. height: 150px;
  981. cursor: pointer;
  982. box-sizing: border-box;
  983. border: 1px solid #dfe2ea;
  984. /* margin-top: 1.25rem; */
  985. border-radius: 0.75rem;
  986. background-color: #fff;
  987. box-shadow: 0px 4px 4px 0px rgba(19, 51, 107, 0.05),
  988. 0px 0px 1px 0px rgba(19, 51, 107, 0.08);
  989. display: flex;
  990. flex-direction: column;
  991. justify-content: space-between;
  992. padding: 20px 20px 12px;
  993. }
  994. .listBlock:hover {
  995. border-color: #94b5ff;
  996. box-shadow: 0px 1px 2px 0px rgba(19, 51, 107, 0.1),
  997. 0px 0px 1px 0px rgba(19, 51, 107, 0.15);
  998. }
  999. .listBlockTit {
  1000. display: flex;
  1001. font-size: 16px;
  1002. justify-content: space-between;
  1003. align-items: center;
  1004. overflow: hidden;
  1005. }
  1006. .listBlockTitZ {
  1007. min-width: 100px;
  1008. overflow: hidden;
  1009. text-overflow: ellipsis;
  1010. white-space: nowrap;
  1011. }
  1012. .owerCon {
  1013. display: flex;
  1014. align-items: center;
  1015. font-size: 12px;
  1016. color: #667085;
  1017. width: 80%;
  1018. }
  1019. .owerCon img {
  1020. width: 16px;
  1021. margin-right: 5px;
  1022. }
  1023. .listDetail {
  1024. /* height: 100%; */
  1025. height: 45px;
  1026. font-size: 12.8px;
  1027. color: #667085;
  1028. padding: 12px 0;
  1029. }
  1030. .listDetail2 {
  1031. -webkit-line-clamp: 2;
  1032. display: -webkit-box;
  1033. -webkit-box-orient: vertical;
  1034. overflow: hidden;
  1035. text-overflow: ellipsis;
  1036. }
  1037. .f_box {
  1038. width: 100%;
  1039. /* height: 100%; */
  1040. height: calc(100% - 58px);
  1041. margin-top: 16px;
  1042. border-radius: 8px;
  1043. padding-bottom: 0 !important;
  1044. box-sizing: border-box;
  1045. position: relative;
  1046. overflow: auto;
  1047. }
  1048. .f_box_top {
  1049. display: flex;
  1050. align-items: center;
  1051. padding: 0;
  1052. width: 100%;
  1053. box-sizing: border-box;
  1054. padding-bottom: 0;
  1055. }
  1056. .f_box_top_left {
  1057. display: flex;
  1058. align-items: center;
  1059. }
  1060. .f_box_top_title {
  1061. /* font-size: 16px; */
  1062. color: rgba(8, 13, 30, 0.9);
  1063. font-size: 20px;
  1064. font-style: normal;
  1065. font-weight: 500;
  1066. /* line-height: 32px; */
  1067. /* font-weight: bold; */
  1068. }
  1069. .f_box_top .btn {
  1070. display: flex;
  1071. cursor: pointer;
  1072. align-items: center;
  1073. height: 30px;
  1074. padding: 0 8px;
  1075. background: rgb(0, 97, 255);
  1076. color: #fff;
  1077. box-sizing: border-box;
  1078. border-radius: 4px;
  1079. font-size: 14px;
  1080. align-items: center;
  1081. }
  1082. .f_box_top .btn2 {
  1083. display: flex;
  1084. cursor: pointer;
  1085. align-items: center;
  1086. height: 30px;
  1087. padding: 0 8px;
  1088. background: #fff;
  1089. color: rgb(0, 97, 255);
  1090. border: 1px solid rgb(0, 97, 255);
  1091. box-sizing: border-box;
  1092. border-radius: 4px;
  1093. font-size: 14px;
  1094. align-items: center;
  1095. }
  1096. .f_box_top .delBtn {
  1097. background: rgb(255, 0, 13);
  1098. }
  1099. .f_box_top .btn + .btn2,
  1100. .f_box_top .btn + .btn,
  1101. .f_box_top .btn2 + .btn2,
  1102. .f_box_top .btn2 + .delBtn {
  1103. margin-left: 15px;
  1104. }
  1105. .f_box_top_right {
  1106. margin-left: auto;
  1107. /* max-width: calc(100% - 280px); */
  1108. overflow: hidden;
  1109. display: flex;
  1110. align-items: center;
  1111. }
  1112. .f_box_top_right >>> .el-icon-plus:before {
  1113. font-size: 14px;
  1114. font-weight: 600;
  1115. /* vertical-align: middle; */
  1116. }
  1117. .f_box_top_right >>> .el-button {
  1118. height: 35px !important;
  1119. font-size: 12.8px;
  1120. background-color: #3370ff;
  1121. border-radius: 6px;
  1122. margin-left: 12px;
  1123. }
  1124. .f_box_top_right >>> .el-button--primary:focus,
  1125. .f_box_top_right >>> .el-button--primary:hover {
  1126. filter: brightness(120%);
  1127. }
  1128. .f_box_top_right > .input {
  1129. position: relative;
  1130. height: 40px;
  1131. display: flex;
  1132. align-items: center;
  1133. }
  1134. .f_box_top_right > .input > input {
  1135. width: 100%;
  1136. height: 100%;
  1137. border: 1px solid #dcdfe6;
  1138. border-radius: 5px;
  1139. padding: 0 15px 0 45px;
  1140. box-sizing: border-box;
  1141. font-size: 14px;
  1142. width: 250px;
  1143. height: 36px;
  1144. font-size: 12.8px;
  1145. border-radius: 6px;
  1146. outline: none;
  1147. }
  1148. .f_box_top_right > .input > .serch {
  1149. content: "";
  1150. display: block;
  1151. width: 20px;
  1152. height: 20px;
  1153. background-image: url("../../../assets/icon/sourceFile/search.png");
  1154. background-size: 100% 100%;
  1155. position: absolute;
  1156. left: 13px;
  1157. top: 50%;
  1158. transform: translateY(-50%);
  1159. cursor: pointer;
  1160. }
  1161. .f_box_top_right > .tab {
  1162. height: 30px;
  1163. width: 80px;
  1164. margin-left: 15px;
  1165. background: #e7e7e7;
  1166. border: 2px solid #d9d9d9;
  1167. border-radius: 5px;
  1168. box-sizing: border-box;
  1169. overflow: hidden;
  1170. display: flex;
  1171. align-items: center;
  1172. }
  1173. .f_box_top_right > .tab > .table,
  1174. .f_box_top_right > .tab > .list {
  1175. width: 50%;
  1176. height: 100%;
  1177. display: flex;
  1178. align-items: center;
  1179. justify-content: center;
  1180. cursor: pointer;
  1181. }
  1182. .f_box_top_right > .tab > .list::before {
  1183. content: "";
  1184. display: block;
  1185. width: 20px;
  1186. height: 20px;
  1187. background-image: url("../../../assets/icon/sourceFile/list.png");
  1188. background-size: 100% 100%;
  1189. }
  1190. .f_box_top_right > .tab > .list.active,
  1191. .f_box_top_right > .tab > .table.active {
  1192. background: #fff;
  1193. }
  1194. .f_box_top_right > .tab > .table::before {
  1195. content: "";
  1196. display: block;
  1197. width: 20px;
  1198. height: 20px;
  1199. background-image: url("../../../assets/icon/sourceFile/table.png");
  1200. background-size: 100% 100%;
  1201. }
  1202. .mask {
  1203. /* background-color: rgb(0 0 0 / 30%); */
  1204. /* position: fixed; */
  1205. position: absolute;
  1206. top: 0;
  1207. left: 0;
  1208. width: 100%;
  1209. height: 100%;
  1210. z-index: 90;
  1211. display: flex;
  1212. align-items: center;
  1213. justify-content: center;
  1214. }
  1215. .progressBox {
  1216. width: 300px;
  1217. height: 150px;
  1218. background: #fff;
  1219. border-radius: 10px;
  1220. box-shadow: 0 0 6px 1px #bfbfbf;
  1221. display: flex;
  1222. align-items: center;
  1223. justify-content: center;
  1224. flex-direction: column;
  1225. position: relative;
  1226. color: #6c6c6c;
  1227. }
  1228. .progressBox >>> .el-progress-bar__outer {
  1229. background-color: #d1dfff !important;
  1230. }
  1231. .progressBox .lbox {
  1232. height: 50px;
  1233. font-size: 19px;
  1234. display: flex;
  1235. align-items: center;
  1236. color: #747474;
  1237. }
  1238. .progressBox .lbox img {
  1239. width: 40px;
  1240. margin-right: 20px;
  1241. }
  1242. .closeCss {
  1243. position: absolute;
  1244. top: 8px;
  1245. right: 8px;
  1246. cursor: pointer;
  1247. width: 20px;
  1248. height: 20px;
  1249. }
  1250. .closeCss > img {
  1251. width: 100%;
  1252. height: 100%;
  1253. }
  1254. .f_box_file_square {
  1255. height: calc(100% - 55px);
  1256. overflow: auto;
  1257. width: 100%;
  1258. padding: 55px;
  1259. box-sizing: border-box;
  1260. display: flex;
  1261. flex-wrap: wrap;
  1262. align-content: flex-start;
  1263. position: relative;
  1264. }
  1265. .f_box_file_square > .f_box_file {
  1266. display: flex;
  1267. flex-direction: column;
  1268. align-items: center;
  1269. justify-content: center;
  1270. width: 160px;
  1271. height: 160px;
  1272. cursor: pointer;
  1273. margin: 0 36px 36px 0;
  1274. border-radius: 20px;
  1275. position: relative;
  1276. }
  1277. .f_box_file_square > .f_box_file:hover {
  1278. background: #f0f2f5;
  1279. }
  1280. .f_box_file_square > .f_box_file:hover > .check {
  1281. display: block;
  1282. }
  1283. .f_box_file_square > .f_box_file.check {
  1284. background: #e0eafb;
  1285. }
  1286. .f_box_file_square > .f_box_file.check > .check {
  1287. display: block;
  1288. }
  1289. .f_box_file_square > .f_box_file > .check {
  1290. position: absolute;
  1291. left: 15px;
  1292. top: 15px;
  1293. width: 16px;
  1294. height: 16px;
  1295. background-size: 100%;
  1296. display: none;
  1297. }
  1298. .f_box_file_square > .f_box_file > .check > img {
  1299. width: 100%;
  1300. height: 100%;
  1301. object-fit: cover;
  1302. }
  1303. .f_box_file_square > .f_box_file > img {
  1304. width: 90px;
  1305. height: 90px;
  1306. object-fit: cover;
  1307. }
  1308. .f_box_file_square > .f_box_file > .name {
  1309. white-space: nowrap;
  1310. font-size: 14px;
  1311. max-width: 80%;
  1312. overflow: hidden;
  1313. margin: 4px auto 0;
  1314. text-overflow: ellipsis;
  1315. text-align: center;
  1316. }
  1317. .f_box_file_list {
  1318. /* height: calc(100% - 55px); */
  1319. /* overflow: auto; */
  1320. width: 100%;
  1321. padding: 10px 0;
  1322. padding-top: 0;
  1323. margin-top: 10px;
  1324. border-radius: 8px;
  1325. box-sizing: border-box;
  1326. }
  1327. .f_box_file_allCheck {
  1328. display: flex;
  1329. align-items: center;
  1330. position: absolute;
  1331. font-size: 14px;
  1332. top: 20px;
  1333. left: 10px;
  1334. cursor: pointer;
  1335. }
  1336. .f_box_file_allCheck > img {
  1337. width: 16px;
  1338. height: 16px;
  1339. object-fit: cover;
  1340. margin-right: 5px;
  1341. }
  1342. .canEditCss >>> .el-dialog__body {
  1343. padding: 10px 20px;
  1344. }
  1345. .canEditCss >>> .el-dialog__header {
  1346. background-color: rgb(251, 251, 252);
  1347. border-radius: 8px 8px 0 0;
  1348. font-family: Pingfang;
  1349. border-bottom: 0.5px rgb(244, 246, 248) solid;
  1350. }
  1351. .canEditCss >>> .el-dialog {
  1352. border-radius: 8px;
  1353. width: 500px !important;
  1354. }
  1355. .type_nav_box {
  1356. }
  1357. .type_nav_box > .nav {
  1358. height: 40px;
  1359. border-radius: 5px;
  1360. cursor: pointer;
  1361. display: flex;
  1362. align-items: center;
  1363. width: 100%;
  1364. padding: 0 10px;
  1365. box-sizing: border-box;
  1366. margin-bottom: 10px;
  1367. font-size: 16px;
  1368. color: #000;
  1369. }
  1370. .type_nav_box > .nav > .down {
  1371. min-width: 14px;
  1372. height: 14px;
  1373. background-image: url("../../../assets/icon/sourceFile/icon_arrow.png");
  1374. background-size: 100% 100%;
  1375. margin-right: 10px;
  1376. transition: all 0.3s;
  1377. transform: rotate(-90deg);
  1378. }
  1379. .type_nav_box > .nav.active > .down {
  1380. transform: rotate(0deg);
  1381. }
  1382. .type_nav_box > .nav > .file {
  1383. min-width: 18px;
  1384. height: 18px;
  1385. background-image: url("../../../assets/icon/sourceFile/file.png");
  1386. background-size: 100% 100%;
  1387. margin-right: 10px;
  1388. }
  1389. .type_nav_box > .nav > .name {
  1390. max-width: 100%;
  1391. overflow: hidden;
  1392. text-overflow: ellipsis;
  1393. white-space: nowrap;
  1394. }
  1395. .type_nav_box > .child {
  1396. }
  1397. .type_nav_box > .child > .nav {
  1398. height: 40px;
  1399. border-radius: 5px;
  1400. cursor: pointer;
  1401. display: flex;
  1402. align-items: center;
  1403. width: 100%;
  1404. padding: 0 10px 0 50px;
  1405. box-sizing: border-box;
  1406. margin-bottom: 10px;
  1407. font-size: 16px;
  1408. color: #000;
  1409. }
  1410. .type_nav_box > .child > .nav.active {
  1411. background: #e0eafb;
  1412. }
  1413. .type_nav_box > .child > .nav > .file {
  1414. min-width: 18px;
  1415. height: 18px;
  1416. background-image: url("../../../assets/icon/sourceFile/file.png");
  1417. background-size: 100% 100%;
  1418. margin-right: 10px;
  1419. }
  1420. .type_nav_box > .child > .nav > .name {
  1421. max-width: 100%;
  1422. overflow: hidden;
  1423. text-overflow: ellipsis;
  1424. white-space: nowrap;
  1425. }
  1426. .none_box {
  1427. height: calc(100% - 55px);
  1428. overflow: auto;
  1429. width: 100%;
  1430. padding: 10px;
  1431. box-sizing: border-box;
  1432. display: flex;
  1433. align-items: center;
  1434. justify-content: center;
  1435. }
  1436. .list_file_box {
  1437. width: 100%;
  1438. }
  1439. .list_file_box >>> .el-table {
  1440. border-radius: 10px !important;
  1441. overflow: hidden !important;
  1442. }
  1443. .list_file_box >>> table th {
  1444. border: none !important;
  1445. background-color: #f2f3f6 !important; /* 浅灰色背景 */
  1446. color: #00000099 !important;
  1447. }
  1448. .list_file_box >>> table tr td {
  1449. border: none !important;
  1450. border-bottom: 1px solid #ebeef5 !important;
  1451. }
  1452. .list_file_box >>> table tr {
  1453. border: 1px #000 solid !important;
  1454. }
  1455. .list_file_box >>> .el-table__header-wrapper {
  1456. margin-bottom: 10px !important;
  1457. }
  1458. .list_file_box >>> .el-table__row {
  1459. border: 1px #ccc solid;
  1460. }
  1461. .list_file_box >>> table tr td:nth-child(1) {
  1462. border-radius: 10px 0 0 10px !important;
  1463. }
  1464. .list_file_box >>> table tr td:nth-last-child(1) {
  1465. border-radius: 0 10px 10px 0 !important;
  1466. }
  1467. .list_file_box >>> table tr th:nth-child(1) {
  1468. border-radius: 10px 0 0 10px;
  1469. }
  1470. .list_file_box >>> table tr th:nth-last-child(2) {
  1471. border-radius: 0 10px 10px 0 !important;
  1472. }
  1473. .list_file_box >>> .el-table::before {
  1474. background-color: #fff;
  1475. }
  1476. .list_file_box >>> .el-table--border::after {
  1477. background-color: #fff;
  1478. }
  1479. .list_file_box >>> .el-table--border {
  1480. border: none;
  1481. border-bottom: 1px solid #ebeef5;
  1482. }
  1483. .BtnH >>> .el-button {
  1484. padding: 5px !important;
  1485. width: 30px !important;
  1486. color: #4c5567;
  1487. }
  1488. .BtnH >>> .el-button:focus,
  1489. .BtnH >>> .el-button:hover {
  1490. background: #e8ebf0 !important;
  1491. color: #487fff !important;
  1492. }
  1493. .BtnH >>> .el-button--small,
  1494. .el-button--small.is-round {
  1495. border: none;
  1496. padding: 0;
  1497. }
  1498. .BtnHP {
  1499. display: flex;
  1500. flex-direction: column;
  1501. justify-content: center;
  1502. }
  1503. .BtnHP >>> .el-button:focus,
  1504. .BtnHP >>> .el-button:hover {
  1505. background-color: #487fff;
  1506. }
  1507. .BtnHP >>> .el-popper .popper__arrow,
  1508. .el-popper .popper__arrow::after {
  1509. display: none;
  1510. }
  1511. .BtnHP >>> .el-button--text {
  1512. color: #667095;
  1513. }
  1514. .BtnHP img {
  1515. width: 16px;
  1516. }
  1517. /* 删除 */
  1518. .BtnHPDel1 {
  1519. display: flex;
  1520. flex-direction: column;
  1521. justify-content: center;
  1522. color: #de4c41 !important;
  1523. }
  1524. .BtnHPDel1 >>> .el-button:focus,
  1525. .BtnHPDel1 >>> .el-button:hover {
  1526. background: #fbeae8;
  1527. color: #de4c41 !important;
  1528. }
  1529. /* .BtnHPDel1{
  1530. display: flex;
  1531. flex-direction: column;
  1532. justify-content: center;
  1533. } */
  1534. .BtnHPDel {
  1535. display: flex;
  1536. flex-direction: column;
  1537. flex-wrap: wrap;
  1538. justify-content: center;
  1539. }
  1540. .BtnHPDel >>> .el-button + .el-button {
  1541. padding: 0;
  1542. }
  1543. .BtnHPDel >>> .el-button:focus,
  1544. .BtnHPDel >>> .el-button:hover {
  1545. background: #e8ebf0 !important;
  1546. }
  1547. /* .BtnHPDel >>> .el-button:hover .lookHp{
  1548. } */
  1549. .lookHp2 {
  1550. color: #6c6c6c;
  1551. }
  1552. .lookHp2 {
  1553. color: #487fff;
  1554. }
  1555. .left {
  1556. display: flex;
  1557. align-items: center;
  1558. margin-left: auto;
  1559. }
  1560. .left > span {
  1561. height: 25px;
  1562. width: 25px;
  1563. display: flex;
  1564. align-items: center;
  1565. justify-content: center;
  1566. border-radius: 5px;
  1567. cursor: pointer;
  1568. }
  1569. .left > span + span {
  1570. margin-left: 10px;
  1571. }
  1572. .left > span.active {
  1573. background: #e0eafb;
  1574. }
  1575. .left > span::before {
  1576. content: "";
  1577. width: 12px;
  1578. height: 12px;
  1579. background-size: 100% 100%;
  1580. }
  1581. .left > span.list::before {
  1582. background-image: url("../../../assets/test_list.png");
  1583. }
  1584. .left > span.table::before {
  1585. background-image: url("../../../assets/test_table.png");
  1586. }
  1587. .left > span.table.active::before {
  1588. background-image: url("../../../assets/test_table_active.png");
  1589. }
  1590. .left > span.list.active::before {
  1591. background-image: url("../../../assets/test_list_active.png");
  1592. }
  1593. .pageBox {
  1594. display: flex;
  1595. }
  1596. .pageBox >>> .el-pagination__total {
  1597. margin-right: auto;
  1598. }
  1599. .btnBh:hover {
  1600. background: #f0f4ff;
  1601. }
  1602. .btnBh img {
  1603. margin-right: 5px;
  1604. width: 17px;
  1605. }
  1606. .btnBh2 img {
  1607. width: 17px;
  1608. margin-right: 5px;
  1609. padding: 1.5px;
  1610. box-sizing: border-box;
  1611. }
  1612. .btnBh2:hover {
  1613. background: #fbeae8;
  1614. }
  1615. .listTag {
  1616. width: 100%;
  1617. overflow: hidden;
  1618. white-space: nowrap;
  1619. text-overflow: ellipsis;
  1620. }
  1621. .f_box_file_list >>> .el-table-column--selection .cell {
  1622. display: flex !important;
  1623. align-items: center !important;
  1624. }
  1625. .perName {
  1626. flex-shrink: 0;
  1627. min-width: 30px;
  1628. max-width: 47px;
  1629. overflow: hidden;
  1630. white-space: nowrap;
  1631. text-overflow: ellipsis;
  1632. }
  1633. .btnBh2 {
  1634. display: flex;
  1635. /* align-items: center; */
  1636. cursor: pointer;
  1637. padding: 5px 8px;
  1638. border-radius: 6px;
  1639. box-sizing: border-box;
  1640. }
  1641. .btnBh {
  1642. display: flex;
  1643. cursor: pointer;
  1644. border-radius: 6px;
  1645. padding: 5px 8px;
  1646. }
  1647. .canEditTit {
  1648. display: flex;
  1649. justify-content: flex-start;
  1650. align-items: center;
  1651. }
  1652. .canEditTit img {
  1653. width: 25px;
  1654. margin-right: 10px;
  1655. }
  1656. .paginationArea{
  1657. width: 100%;
  1658. height: auto;
  1659. display: flex;
  1660. align-items: center;
  1661. justify-content: space-between;
  1662. }
  1663. .paginationArea>span{
  1664. font-size: 13px;
  1665. color: #606266;
  1666. }
  1667. </style>
  1668. <style>
  1669. .custom-popover {
  1670. min-width: 70px !important;
  1671. width: auto !important;
  1672. padding: 8px 6px;
  1673. border-radius: 8px;
  1674. }
  1675. /* .custom-popover2 {
  1676. min-width: 18px !important;
  1677. width: auto !important;
  1678. padding: 8px;
  1679. top: 414px !important;
  1680. text-align: center;
  1681. } */
  1682. </style>