MyFile.vue 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043
  1. <template>
  2. <div>
  3. <div class="bigBox">
  4. <div class="settingBox" @click="mouseClick">
  5. <!-- 设置盒子顶部搜索 -->
  6. <div class="topSearch">
  7. <div style="position: relative;">
  8. <el-input v-model="searchFire" class="searchFire" size="large" placeholder="搜索文件"
  9. style="width: 15rem;" />
  10. <el-icon style="color: gray;display: inline-block;position: absolute;top: 8px;right: 5px;">
  11. <Search />
  12. </el-icon>
  13. </div>
  14. <div>
  15. <el-icon style="font-size: 24px;" @click="createNewMenu(1,true)">
  16. <Plus />
  17. </el-icon>
  18. <!-- @click="createNewFile" -->
  19. </div>
  20. </div>
  21. <!-- 方块点击盒子 -->
  22. <div
  23. style="display: flex;justify-content: flex-start;align-items: flex-start;flex-wrap: wrap;height: 75vh;align-content: flex-start;overflow-y: auto;">
  24. <!-- v-for盒子 -->
  25. <template v-for="(item, index) in fileMenu">
  26. <div class="setBox" @click="changeFile(item, index)">
  27. <el-dropdown trigger="click" class="selectChe">
  28. <span class="el-dropdown-link">
  29. ...
  30. </span>
  31. <template #dropdown>
  32. <el-dropdown-menu>
  33. <el-dropdown-item @click="restName(item, index)">重命名</el-dropdown-item>
  34. <el-dropdown-item @click="delName(item, index)">删除</el-dropdown-item>
  35. </el-dropdown-menu>
  36. </template>
  37. </el-dropdown>
  38. <div class="left_fileBox">
  39. <img src="../../assets/images/fileStyle.png" style="width: 72px;height: 72px;">
  40. <p class="ellipsis-text">{{ item.dirName }}</p>
  41. <img class="levelImg" v-if="item.isEncrypt === 'Y'" :src="getLevelImg(item.encryptLevel)" alt="">
  42. </div>
  43. </div>
  44. </template>
  45. </div>
  46. <div class="expansion">
  47. <div class="top_box">
  48. <span style="margin-left: 5px;font-size: 14px;font-weight: 500;">{{ formatStorage(useSpace) }}/{{ allSpace + "G" }}</span>
  49. <span style="margin-left: 5px;font-size: 14px;color: #2E6BC8;cursor: pointer;"
  50. @click="askApply">申请扩容</span>
  51. </div>
  52. <el-progress style="margin-left: 8px;" :stroke-width="12" color='#2E6BC8' :percentage="percent()" />
  53. </div>
  54. </div>
  55. <!-- 右侧大盒子 -->
  56. <div class="mesBox">
  57. <!-- 功能盒子 -->
  58. <!-- table切换 -->
  59. <!-- <div class="useBox">
  60. <div style="width: 100%;height: 24px;background-color: #7084B4;line-height: 20px;">
  61. <template v-for="(item, index) in menuList">
  62. <span @click="tableChange(item, index)"
  63. :class="['tables', { tableLis: selectedIndex === index }]">
  64. {{ item.name }}
  65. <img v-if="selectedIndex === index ? true : false"
  66. style="position: absolute;top: 4px;right: 4px;" src="../../assets/images/close.png"
  67. @click="shotdown(item)">
  68. </span>
  69. </template>
  70. </div>
  71. </div> -->
  72. <div v-if="editOnline">
  73. <!-- 众多功能 -->
  74. <div class="manyUse">
  75. <div v-if="thisFolder.dirType == '1'"
  76. style="display: flex;width: 92px;height: 32px;justify-content: flex-start;align-items: center;line-height: 18px;">
  77. <div style="margin-left: 5px;">
  78. <img src="../../assets/images/upload.png" style="width: 24px;height: 24px;" alt="">
  79. </div>
  80. <div style="margin-left: 5px;">
  81. <span style="color: black;cursor: pointer;" @click="uploadModal = true">上传
  82. </span>
  83. </div>
  84. </div>
  85. <div v-else
  86. style="display: flex;width: 92px;opacity:0.5;height: 32px;justify-content: flex-start;align-items: center;line-height: 18px;">
  87. <div style="margin-left: 5px;">
  88. <img src="../../assets/images/upload.png" style="width: 24px;height: 24px;" alt="">
  89. </div>
  90. <div style="margin-left: 5px;">
  91. <span style="color: black;cursor: pointer;">上传
  92. </span>
  93. </div>
  94. </div>
  95. <div v-if="thisFolder.dirType"
  96. style="display: flex;width: 82px;height: 32px;justify-content: flex-start;align-items: center;">
  97. <div style="margin-left: 5px;">
  98. <el-icon
  99. style="background-color: #7084B4;width: 24px;height: 24px;border-radius: 50%;color: white;"
  100. @click="createNewMenu(0)">
  101. <Plus />
  102. </el-icon>
  103. </div>
  104. <div style="margin-left: 5px;" @click="createNewMenu(0)">
  105. <span style="font-size: 14px;">新建</span>
  106. </div>
  107. </div>
  108. <div v-else
  109. style="display: flex;opacity:0.5;width: 82px;height: 32px;justify-content: flex-start;align-items: center;">
  110. <div style="margin-left: 5px;">
  111. <el-icon
  112. style="background-color: #7084B4;width: 24px;height: 24px;border-radius: 50%;color: white;"
  113. @click="createNewMenu(0)">
  114. <Plus />
  115. </el-icon>
  116. </div>
  117. <div style="margin-left: 5px;" @click="createNewMenu(0)">
  118. <span style="font-size: 14px;">新建</span>
  119. </div>
  120. </div>
  121. <template v-for="(item, index) in useMenu" :key="index">
  122. <div :class="{ 'isCheck': haveCheck }"
  123. style="display: flex;width: 82px;opacity:0.5;height: 32px;justify-content: flex-start;align-items: center;line-height: 18px;cursor: pointer;"
  124. @click="getMenu(item, index)">
  125. <div style="margin-left: 5px;">
  126. <img :src="item.img" style="width: 24px;height: 24px;" alt="">
  127. </div>
  128. <div style="margin-left: 5px;">
  129. <span style="font-size: 14px;">{{ item.name }}</span>
  130. </div>
  131. </div>
  132. </template>
  133. </div>
  134. <!-- 面包屑功能栏 -->
  135. <div class="breadBox">
  136. <!-- 左侧 -->
  137. <div style="display: flex;justify-content: space-around;align-items: center;">
  138. <!-- 前进后退 -->
  139. <!-- <div style="display: flex;justify-content: space-around;align-items: center;">
  140. <img style="display:block;width: 11px;height: 11px;" :src="blueLeft" alt=""
  141. @click="arrowLift">
  142. <img style="display:block;width: 16px;height: 16px;" :src="grayRight" alt="">
  143. </div> -->
  144. <!-- 面包屑 -->
  145. <div class="topPath">
  146. {{ topPath }}
  147. <!-- <BreadMenu></BreadMenu> -->
  148. </div>
  149. </div>
  150. <!-- 右侧 -->
  151. <div>
  152. <img :src="sort" alt="">
  153. <img :src="squre" alt="" @click="gridChange">
  154. </div>
  155. </div>
  156. <!-- </div> -->
  157. <!-- 展示文件夹盒子 -->
  158. <!-- 文件夹 -->
  159. <div class="showBox">
  160. <div class="detailBox file-jia" @click="mouseClick">
  161. <el-collapse v-model="folder" style="height: 100%;">
  162. <el-collapse-item title="文件夹" name="1" class="custom-collapse-item">
  163. <el-table v-if="folderGrid" :data="folderList" style="width: 100%" :scrollbar-always-on="true"
  164. @selection-change="handleSelectionChange1" :single-select="true" @row-click="folderClick"
  165. @row-contextmenu="folderRClick" ref="taskTableRef">
  166. <el-table-column type="selection" width="55" />
  167. <el-table-column label="名称" width="180">
  168. <template #default="scope">
  169. <span>
  170. <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,true)">
  171. <Star />
  172. </el-icon>
  173. <img v-else @click.stop="delCollect(scope.row,true)" src="../../assets/images/yellowstar.png" alt="">
  174. <img src="../../assets/images/fileBox.png" style="width: 20px;height: 24px;"
  175. alt="">
  176. <el-tooltip
  177. class="box-item"
  178. effect="dark"
  179. :content="scope.row.dirName"
  180. placement="top"
  181. :show-after="1000"
  182. >
  183. {{ scope.row.dirName }}
  184. </el-tooltip>
  185. </span>
  186. </template>
  187. </el-table-column>
  188. <el-table-column prop="createTime" label="时间" width="180" />
  189. <el-table-column prop="dirType" label="类型">
  190. <template #default="scope">
  191. <span>文件夹</span>
  192. </template>
  193. </el-table-column>
  194. <el-table-column label="大小">
  195. <template #default="scope">
  196. <span>
  197. 10KB
  198. </span>
  199. </template>
  200. </el-table-column>
  201. </el-table>
  202. <PlaceGridFolder v-else :folderClick="folderClick" :restName="restName"
  203. :collectFolder="collectFolder" :getAllTop="getAllTop" @folderBack="folderBack">
  204. </PlaceGridFolder>
  205. </el-collapse-item>
  206. </el-collapse>
  207. <!-- 右键唤出的菜单 -->
  208. <div class="right_menu" v-if="folderVisible"
  209. :style="{ left: folderleft + 'px', top: foldertop + 'px' }">
  210. <!-- <div class="menu_item" @click="folderClick(null, null)">
  211. <img src="@/assets/images/trash.png" alt="" />
  212. <span>打开</span>
  213. </div> -->
  214. <div class="menu_item" @click="restName(null, null)">
  215. <img src="@/assets/images/textbox.png" alt="" />
  216. <span>重命名</span>
  217. </div>
  218. <div class="menu_item" @click="collectFolder">
  219. <img src="@/assets/images/collect.png" alt="" />
  220. <span>收藏</span>
  221. </div>
  222. </div>
  223. </div>
  224. <!-- 文件 -->
  225. <div class="fileTable">
  226. <el-collapse v-model="files" style="height: 100%;" >
  227. <el-collapse-item title="文件" name="2" class="">
  228. <el-table v-if="fileGrid" :data="fileList" :scrollbar-always-on="true" style="width: 100%;position: relative;"
  229. @row-contextmenu="handleRowClick" @selection-change="handleSelectionChange"
  230. @row-click="mouseClick" :default-sort="{ prop: 'createTime', order: 'descending' }">
  231. <el-table-column type="selection" width="55" />
  232. <el-table-column label="名称" width="200">
  233. <template #default="scope">
  234. <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
  235. <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,false)">
  236. <Star />
  237. </el-icon>
  238. <img v-else @click.stop="delCollect(scope.row,false)" src="../../assets/images/yellowstar.png" alt="">
  239. <img :src="getImage(scope.row.fileType)" alt="">
  240. <el-tooltip
  241. class="box-item"
  242. effect="dark"
  243. :content="scope.row.fileName"
  244. placement="top"
  245. :show-after="1000"
  246. >
  247. {{ scope.row.fileName }}
  248. </el-tooltip>
  249. </span>
  250. </template>
  251. </el-table-column>
  252. <el-table-column prop="createTime" label="时间" sortable width="180" />
  253. <el-table-column prop="fileType" label="类型" />
  254. <el-table-column label="大小">
  255. <template #default="scope">
  256. <span>
  257. {{ formatFileSize(scope.row.fileSize) }}
  258. </span>
  259. </template>
  260. </el-table-column>
  261. </el-table>
  262. <PalaceGridFile v-else @showFile="showFile" :getAllTop="getAllTop" @navBack="navBack"
  263. @lastBB="lastBB" @onlineCase="onlineCase" @shareBack="shareBack"></PalaceGridFile>
  264. </el-collapse-item>
  265. </el-collapse>
  266. <div class="setCli" v-if="cliCC" :style="{ left: xz + 'px', top: yz - 260 + 'px' }">
  267. <template v-for="(item, index) in filterMouseCli()" :key="index">
  268. <p @click="chooseSet(item, index, 1)" class="chooseSet">
  269. <img :src="item.img" alt="">
  270. {{ item.name }}
  271. <span v-if="item.name == '在线编辑' || item.name == '协作' ? true : false"
  272. style="color: #7084B4;float: right;position: relative;" class="arrow">></span>
  273. </p>
  274. </template>
  275. </div>
  276. <div class="setCli1" v-if="anyP" :style="{ left: xz + 155 + 'px', top: yz + 'px' }">
  277. <p @click="chooseSet1(0)" class="chooseSet">
  278. <img src="../../assets/images/user.png" alt="">
  279. 选择人员
  280. </p>
  281. <p class="chooseSet" @click="goLock">
  282. <img src="../../assets/images/archiveTray.png" alt="">
  283. 归档
  284. </p>
  285. </div>
  286. </div>
  287. </div>
  288. </div>
  289. <div v-else>
  290. <div>
  291. <el-button @click="editOnline = true; historyPrew = false">返回</el-button>
  292. </div>
  293. <FileEdit :docId="clickRowId" :copyRow="copyRow" :historyPrew="historyPrew"
  294. :historycopyRow="historycopyRow" :onlyView="onlyView" @cancleHistoryPrew="cancleHistoryPrew">
  295. </FileEdit>
  296. </div>
  297. </div>
  298. <!-- 扩容弹窗 -->
  299. <div>
  300. <SpaceBig v-if="spaces" :spaces="spaces" :impSpaceId="impSpaceId" @getSpaceC="getSpaceC"></SpaceBig>
  301. </div>
  302. <!-- 新增文件夹弹窗 -->
  303. <div>
  304. <CreateFloder v-if="folderCase" :folderCase="folderCase" @getChildrenC="getChildrenC" :oneOrTwo="oneOrTwo"
  305. :impDirId="impDirId" :impSpaceId="impSpaceId" :newDirId="newDirId" :newSpaceId="newSpaceId" :thisFolderRole="thisFolderRole"
  306. :getAllTop="getAllTop">
  307. </CreateFloder>
  308. </div>
  309. <!-- 文件上传 -->
  310. <div>
  311. <el-dialog v-model="uploadModal" title="文件上传" width="30%">
  312. <el-upload class="upload-demo" :file-list="fileArr" drag :http-request="onSuccess" multiple>
  313. <el-icon class="el-icon--upload"><upload-filled /></el-icon>
  314. <div class="el-upload__text">拖入或<em>点击上传</em></div>
  315. <template #tip>
  316. <div class="el-upload__tip">请选择或拖入文件</div>
  317. </template>
  318. </el-upload>
  319. <template #footer>
  320. <span class="dialog-footer">
  321. <el-button @click="uploadModal = false">取消</el-button>
  322. <el-button type="primary" @click="sureUpload">确认</el-button>
  323. </span>
  324. </template>
  325. </el-dialog>
  326. </div>
  327. <!-- 文件重命名 -->
  328. <div>
  329. <el-dialog v-model="fileNameChange" title="重命名" width="30%">
  330. <el-form :model="nameForm" label-width="120px">
  331. <el-form-item label="新名字">
  332. <el-input v-model="nameForm.name"></el-input>
  333. </el-form-item>
  334. </el-form>
  335. <template #footer>
  336. <span class="dialog-footer">
  337. <el-button @click="fileNameChange = false">取消</el-button>
  338. <el-button type="primary" @click="sureChangeName">
  339. 确认
  340. </el-button>
  341. </span>
  342. </template>
  343. </el-dialog>
  344. </div>
  345. <!-- 文件收藏 -->
  346. <div>
  347. <FileCollect v-if="collects" :collects="collects" @getCollects="getCollects" :copyFileName="copyFileName"
  348. :copyFileId="copyFileId" @refreshFile="refreshFile" :isFolder="isFolder" :clickRow="clickRow"></FileCollect>
  349. </div>
  350. <!-- 中栏重命名 -->
  351. <div>
  352. <FolderReName v-if="rename" :rename="rename" :selectedBox="selectedBox" :getAllTop="getAllTop"
  353. :copyFolderName="copyFolderName" @getRename="getRename">
  354. </FolderReName>
  355. </div>
  356. <ImgPreview :previewData="previewData" :copyFileType="copyFileType" :showPreview="showPreview"
  357. @closeImgPreview="closeImgPreview"></ImgPreview>
  358. <div>
  359. <FileTree v-if="fileTrees" :fileTrees="fileTrees" :newSpaceId="newSpaceId" :fileId="clickRowId"
  360. @getChildren="getChildren" :copyOrMove="copyOrMove"></FileTree>
  361. </div>
  362. <!-- 穿梭框 -->
  363. <div>
  364. <TransferModal v-if="thanks" :thanks="thanks" :clickRowId="clickRowId" :workOrEdit="workOrEdit"
  365. @getCback="getCback"></TransferModal>
  366. </div>
  367. </div>
  368. </div>
  369. <!-- 图片预览 -->
  370. <!-- 历史版本 -->
  371. <historyList :openFile="openForwardFile" :docId="clickRowId" :name="nameForm.name" :copyRow="copyRow"
  372. @close="openForwardFile = false" :fileUserTreeData="fileUserTreeData.data" @changeMsgClose="changeMsgClose"
  373. :historyTotal="historyTotal">
  374. </historyList>
  375. <!-- 历史版本 -->
  376. <!-- 二次密码验证 -->
  377. <inputPassword v-if="showInputPassword" @surePass="surePass" @closeIptPass="closeIptPass" :showInputPassword="showInputPassword"></inputPassword>
  378. <div v-loading.fullscreen="loadingPreview" v-if="loadingPreview" class="lodingBox"></div>
  379. </template>
  380. <script>
  381. import { ref, toRaw, onMounted ,inject,onActivated} from 'vue'
  382. import myfile from '../../api/myfile/myfile'
  383. import { delFavorite } from '@/api/biz/favorite.js'
  384. import documents from '../../api/document/document'
  385. import fileCount from '../../api/fileCount/fileCount'
  386. import FileTree from './components/FileTree.vue'
  387. import BreadMenu from './components/BreadMenu.vue'
  388. import FileEdit from './components/FileEdit.vue'
  389. import TransferModal from './modalComponebts/Transfer.vue'
  390. import CreateFloder from './modalComponebts/CreateFloder.vue'
  391. import FileCollect from './modalComponebts/FileCollect.vue'
  392. import FolderReName from './modalComponebts/FolderReName.vue'
  393. import SpaceBig from './modalComponebts/SpaceBig.vue'
  394. import PlaceGridFolder from './components/PlaceGridFolder.vue'
  395. import PalaceGridFile from './components/PalaceGridFile.vue'
  396. import ImgFile from "./jsComponents/ImgFile"
  397. import { Search } from '@element-plus/icons-vue'
  398. import blueLeft from '../../assets/images/blueLeft.png'
  399. import grayRight from "../../assets/images/grayRight.png"
  400. import sort from '../../assets/images/sort.png'
  401. import squre from '../../assets/images/squre.png'
  402. import level1 from "@/assets/images/level1.png";
  403. import level2 from "@/assets/images/level2.png";
  404. import level3 from "@/assets/images/level3.png";
  405. import level4 from "@/assets/images/level4.png";
  406. import { ElMessage ,ElLoading } from 'element-plus'
  407. import ImgPreview from '@/components/ImgPreview/ImgPreview.vue'
  408. import { preview } from "@/api/common/common.js";
  409. import historyList from "@/components/historyList/index.vue"; //选择文件发送的列表,历史版本
  410. import inputPassword from "./components/inputPassword.vue"; //选择文件发送的列表,历史版本
  411. import { listVersion } from "@/api/biz/version";
  412. import useUserStore from "@/store/modules/user";
  413. import { useRouter, useRoute } from "vue-router";
  414. import { canPreviewFile,rightMenuRole } from "@/utils/index.js"
  415. import fileSpace from '../../api/filespace/fileSpace';
  416. import { getLeveldetail } from '../../api/level/level';
  417. import { encrypt, decrypt } from "@/utils/jsencrypt";
  418. import Cookies from "js-cookie";
  419. export default {
  420. setup() {
  421. const { proxy } = getCurrentInstance();
  422. let fileTrees = ref(false)//filetree父传子
  423. let thanks = ref(false)//transfer父传子
  424. let collects = ref(false)//文件收藏父传子
  425. let rename = ref(false)//文件夹重命名
  426. let spaces = ref(false)//空间扩容父传子
  427. let folderCase = ref(false)
  428. let fileGrid = ref(true)
  429. let folderGrid = ref(true)
  430. let editOnline = ref(true)
  431. let searchFire = ref('')
  432. let selectedIndex = ref(0)
  433. let folder = ref(['1'])
  434. let files = ref(['2'])
  435. let folderList = ref([])
  436. let cliCC = ref(false)
  437. let anyP = ref(false)
  438. let uploadModal = ref(false)
  439. let collectImg = ref(true)
  440. let selectedBox = ref(-1)
  441. let clickRowId = ref(0)
  442. let trandata = ref()
  443. let folderId = ref('')
  444. let fileId = ref('')
  445. let tranvalue = ref([])
  446. let useSpace = ref(0)
  447. let allSpace = ref(0)
  448. let fileArr = ref([])
  449. let copyDirId = ref(0)//需要操作的dirid
  450. let copySpaceId = ref(0)//需要操作的spaceid
  451. let copyDocId = ref(0)//需要操作的docid
  452. let copyFileId = ref(0)//需要操作的fileid
  453. let copyFileSize = ref(0)//需要操作的filesize
  454. let copyFileType = ref('')//需要操作的文件类型
  455. let copyFileName = ref("")//需要操作的文件名
  456. let copyFolderName = ref("")
  457. let copySpaceCup = ref(0)
  458. let directoryId = ref('')
  459. let impSpaceId = ref("")
  460. let impDirId = ref("")
  461. let impNum = ref(0)
  462. let copyParentId = ref("")//文件夹
  463. let needBag = ref("")
  464. let copyOrMove = ref(0)//0代表复制,1代表移动
  465. let oneOrTwo = ref(0)//0代表二级,1代表一级
  466. let sortNum = ref(0)
  467. let folderTotal = ref(0)//文件夹total
  468. let fileTotal = ref(0)//文件total
  469. const openForwardFile = ref(false) //历史版本展示
  470. const delMoreFile = ref([]) //删除多个文件夹
  471. const historyTotal = ref(0)
  472. const historyPrew = ref(false)
  473. let xz = ref(0)
  474. let yz = ref(0)
  475. const fileUserTreeData = reactive({ data: {} });
  476. let fileList = ref()
  477. let menuList = ref([
  478. {
  479. name: "我的空间",
  480. choose: "我的空间"
  481. }
  482. ])
  483. let useMenu = ref([
  484. // {
  485. // img: ImgFile.copy,
  486. // name: "复制"
  487. // },
  488. // {
  489. // img: ImgFile.clipboard,
  490. // name: "粘贴"
  491. // },
  492. {
  493. img: ImgFile.share,
  494. name: "分享给"
  495. },
  496. {
  497. img: ImgFile.trash,
  498. name: "删除"
  499. },
  500. ])
  501. let arrorMenu = ref([
  502. {
  503. img: ImgFile.file,
  504. name: "文件"
  505. },
  506. {
  507. img: ImgFile.folder,
  508. name: '文件夹'
  509. },
  510. {
  511. img: ImgFile.image,
  512. name: "图片"
  513. },
  514. {
  515. img: ImgFile.filmSlate,
  516. name: "视频"
  517. },
  518. {
  519. img: ImgFile.musicNotes,
  520. name: "音频"
  521. }
  522. ])
  523. let mouseCli = ref([
  524. {
  525. img: ImgFile.previewIcon,
  526. name: "预览"
  527. },
  528. {
  529. img: ImgFile.addolder,
  530. name: "移动到...",
  531. },
  532. {
  533. img: ImgFile.copy,
  534. name: "复制到...",
  535. },
  536. // {
  537. // img: ImgFile.clipboard,
  538. // name: "粘贴"
  539. // },
  540. {
  541. img: ImgFile.collect,
  542. name: "收藏"
  543. },
  544. {
  545. img: ImgFile.downLoad,
  546. name: "下载"
  547. },
  548. {
  549. img: ImgFile.textbox,
  550. name: "重命名"
  551. },
  552. // {
  553. // img: ImgFile.goon,
  554. // name: "发送"
  555. // },
  556. {
  557. img: ImgFile.share,
  558. name: "分享"
  559. },
  560. {
  561. img: ImgFile.notePencil,
  562. name: "在线编辑"
  563. },
  564. {
  565. img: ImgFile.togger,
  566. name: "协作"
  567. },
  568. {
  569. img: ImgFile.icc,
  570. name: "文字识别"
  571. },
  572. {
  573. img: ImgFile.history,
  574. name: "历史版本"
  575. },
  576. {
  577. img: ImgFile.trash,
  578. name: "删除"
  579. }
  580. ])
  581. let nameForm = ref({
  582. name: ""
  583. })
  584. let fileNameChange = ref(false)
  585. let fileMenu = ref([])
  586. let copyRow = ref({})
  587. let newDirId = ref('')
  588. let newSpaceId = ref('')
  589. let workOrEdit = ref(0)
  590. const showPreview = ref(false)//控制图片预览组件显示
  591. const previewData = ref()//需要预览的文件的数据
  592. const router = useRouter(); //注册路由
  593. const route = useRoute(); //注册路由
  594. const folderVisible = ref(false); //显示文件夹右键菜单
  595. const foldertop = ref(0);
  596. const folderleft = ref(0);
  597. const thisFolder = ref({}); //当前右键的文件夹
  598. const folderCheckout = ref(false)//是否有勾选
  599. const fileCheckout = ref(false)//是否有勾选
  600. const haveCheck = ref(false)//是否有勾选
  601. const onlyView = ref(false) //预览
  602. const topPath = ref()//顶部路径
  603. const isFolder = ref('N') //是否为文件夹
  604. const clickRow = ref()//当前右键的行数据
  605. const backFolder = ref()//上一级的文件夹
  606. const thisFolderRole = ref()//文件夹权限
  607. const showInputPassword = ref(false)
  608. const chooseRow = ref()
  609. const chooseNum = ref()
  610. const loadingPreview = ref(false)
  611. const addTab = inject("addTab");
  612. const addFolderAdd = inject("addFolderAdd");
  613. // 获取文件夹,中栏,文件
  614. function getAllTop() {
  615. documents.getTop(3).then(res => {
  616. let userMe = [res]
  617. impDirId.value = userMe[0].dirId//固定
  618. impSpaceId.value = userMe[0].spaceId//固定
  619. newSpaceId.value = userMe[0].spaceId//变化
  620. newDirId.value = userMe[0].dirId//变化
  621. topPath.value = userMe[0].dirPath
  622. let obj = {
  623. pageNum: 1,
  624. pageSize: 10
  625. }
  626. documents.getALLdocument({ parentId: userMe[0].dirId - 0, spaceId: userMe[0].spaceId, pageNum: obj.pageNum, pageSize: obj.pageSize }).then(res => {
  627. fileMenu.value = res.data
  628. folderList.value = res.data
  629. })
  630. myfile.getById(userMe[0].dirId - 0, obj).then(res => {
  631. if (res.code === 200) {
  632. fileList.value = res.rows
  633. fileTotal.value = res.total
  634. if (fileTotal.value / 10 != 1) {
  635. let x = Math.trunc(fileTotal.value / 10) + 1
  636. for (var i = 1; i <= x; i++) {
  637. obj.pageNum = i
  638. myfile.getById(userMe[0].dirId - 0, obj).then(res => {
  639. fileList.value = fileList.value.concat(res.rows)
  640. const uniqueFileList = Array.from(new Set(fileList.value.map(item => item.docId)))
  641. .map(docId => fileList.value.find(item => item.docId === docId));
  642. // 合并数组并更新 fileList.value
  643. fileList.value = uniqueFileList
  644. })
  645. }
  646. }
  647. // console.log('fileList.value',fileList.value);
  648. }
  649. // console.log('not200');
  650. })
  651. })
  652. }
  653. function getSpaceList() {
  654. myfile.fileType(3).then(res => {
  655. useSpace.value = res.data.usedCap
  656. allSpace.value = res.data.spaceCap
  657. })
  658. }
  659. function changeFile(row, num) {
  660. // 创建标签
  661. const addData = {
  662. path:route.path,
  663. row:toRaw(row)
  664. }
  665. addFolderAdd(addData)
  666. thisFolder.value = row
  667. console.log('row2',row);
  668. if(row.isEncrypt === "Y"){
  669. getLeveldetailFn(row.encryptLevel)
  670. }else{
  671. thisFolderRole.value = null
  672. }
  673. copyParentId.value = row.parentId
  674. newDirId.value = row.dirId
  675. newSpaceId.value = row.spaceId
  676. documents.getALLdocument({ parentId: row.dirId - 0, spaceId: row.spaceId - 0 }).then(res => {
  677. folderList.value = res.data
  678. // if (res.code === 200) {
  679. if (res.data.length === 0) {
  680. myfile.getById(newDirId.value)
  681. .then(res => {
  682. if (res.code === 200) {
  683. fileList.value = res.rows;
  684. }
  685. })
  686. .catch(error => {
  687. console.error("myfile.getAllFileMenu 调用失败:", error);
  688. });
  689. } else {
  690. myfile.getById(row.dirId - 0)
  691. .then(res => {
  692. if (res.code === 200) {
  693. fileList.value = res.rows;
  694. }
  695. })
  696. .catch(error => {
  697. console.error("myfile.getAllFileMenu 调用失败:", error);
  698. });
  699. }
  700. // }
  701. })
  702. selectedIndex.value = num
  703. const newItem = {
  704. name: row.dirName,
  705. choose: row.dirName,
  706. dirIds: row.dirId,
  707. spaceIds: row.spaceId
  708. };
  709. // 检查 newItem 是否已存在于 menuList 中
  710. const isItemExist = menuList.value.some(item => item.choose === newItem.choose);
  711. // 如果不存在,则添加它
  712. if (!isItemExist) {
  713. menuList.value.push(newItem);
  714. }
  715. }
  716. // tableMenu切换
  717. function tableChange(row, num) {
  718. if (row.name == '我的空间') {
  719. getAllTop()
  720. if (!editOnline.value) {
  721. editOnline.value = true
  722. }
  723. } else {
  724. let obj = {
  725. pageNum: 1,
  726. pageSize: 10
  727. }
  728. documents.getALLdocument({ parentId: row.dirIds - 0, spaceId: row.spaceIds - 0, pageNum: obj.pageNum, pageSize: obj.pageSize }).then(res => {
  729. // fileMenu.value = res.data
  730. folderList.value = res.data
  731. })
  732. myfile.getById(row.dirIds - 0, obj).then(res => {
  733. if (res.code === 200) {
  734. fileList.value = res.rows
  735. fileTotal.value = res.total
  736. if (fileTotal.value / 10 != 1) {
  737. let x = Math.trunc(fileTotal.value / 10) + 1
  738. for (var i = 1; i <= x; i++) {
  739. obj.pageNum = i
  740. myfile.getById(userMe[0].dirId - 0, obj).then(res => {
  741. fileList.value = fileList.value.concat(res.rows)
  742. const uniqueFileList = Array.from(new Set(fileList.value.map(item => item.docId)))
  743. .map(docId => fileList.value.find(item => item.docId === docId));
  744. // 合并数组并更新 fileList.value
  745. fileList.value = uniqueFileList
  746. })
  747. }
  748. }
  749. }
  750. })
  751. }
  752. selectedIndex.value = num
  753. }
  754. // x图标事件
  755. function shotdown(row) {
  756. menuList.value = menuList.value.filter(item => item.name !== row.name)
  757. selectedIndex.value = -1
  758. if (!editOnline.value) {
  759. editOnline.value = true
  760. }
  761. }
  762. // 文件名表格每一行点击事件
  763. function handleRowClick(row, col, e) {
  764. console.log('row',row);
  765. isFolder.value = "N"
  766. clickRow.value = row
  767. e.preventDefault();
  768. e.stopPropagation();
  769. xz.value = e.pageX
  770. yz.value = e.pageY
  771. copyRow.value = row
  772. clickRowId.value = row.docId
  773. copyDirId.value = row.dirId
  774. copySpaceId.value = row.spaceId
  775. copyFileId.value = row.fileId
  776. copyFileSize.value = row.fileSize
  777. copyFileType.value = row.fileType
  778. nameForm.value.name = row.fileName
  779. copyFileName.value = row.fileName
  780. if (cliCC.value === true) {
  781. cliCC.value = false
  782. } else {
  783. cliCC.value = true
  784. }
  785. }
  786. // 申请扩容
  787. async function askApply() {
  788. const res = await fileSpace.querySpace(impSpaceId.value)
  789. console.log('res',res);
  790. if(res.data){
  791. ElMessage({ message: '已存在扩容申请', type: 'error' })
  792. return
  793. }
  794. spaces.value = true
  795. }
  796. //mouse弹框
  797. async function chooseSet(row, index, num) {
  798. // 权限控制
  799. if(thisFolderRole.value && thisFolderRole.value.roles){
  800. if(thisFolderRole.value.roles.l0600){
  801. const passArr = localStorage.getItem('passArr');
  802. const passArrObj = JSON.parse(passArr)
  803. if((!passArrObj) || !passArrObj.some(item=>item === clickRow.value.docId)){
  804. chooseRow.value = row
  805. chooseNum.value = num
  806. showInputPassword.value = true
  807. return
  808. }
  809. // console.log('needc');
  810. }
  811. }
  812. console.log('chooseSetrow',row);
  813. console.log('chooseSetnum',num);
  814. if (row.name == '在线编辑' || row.name == '协作') {
  815. cliCC.value = true
  816. }
  817. if (row.name == '分享') {
  818. workOrEdit.value = num
  819. thanks.value = true
  820. } else {
  821. thanks.value = false
  822. }
  823. if (row.name == '协作') {
  824. workOrEdit.value = num
  825. if (anyP.value) {
  826. anyP.value = false
  827. } else {
  828. anyP.value = true
  829. }
  830. } else {
  831. anyP.value = false
  832. }
  833. if (row.name == '删除') {
  834. myfile.delMenu(clickRowId.value).then(res => {
  835. if (res.code === 200) {
  836. ElMessage({
  837. type: "success",
  838. message: "删除成功"
  839. })
  840. getAllTop()
  841. }
  842. })
  843. }
  844. if (row.name === '复制到...') {
  845. copyOrMove.value = 0
  846. fileTrees.value = true
  847. }
  848. if (row.name === '移动到...') {
  849. copyOrMove.value = 1
  850. fileTrees.value = true
  851. }
  852. if (row.name === '重命名') {
  853. fileNameChange.value = true
  854. }
  855. if (row.name === "下载") {
  856. // location.href = `${import.meta.env.VITE_APP_BASE_API}/biz/info/download/${copyFileId.value}`;
  857. downLoadfile()
  858. }
  859. if (row.name === '收藏') {
  860. collects.value = true
  861. }
  862. if (row.name === '在线编辑') {
  863. editOnline.value = false
  864. cliCC.value = false
  865. const newItem = {
  866. name: copyFileName.value,
  867. choose: copyFileId.value,
  868. dirIds: copyDirId.value,
  869. spaceIds: copySpaceId.value
  870. };
  871. // 检查 newItem 是否已存在于 menuList 中
  872. const isItemExist = menuList.value.some(item => item.choose === newItem.choose);
  873. // 如果不存在,则添加它
  874. if (!isItemExist) {
  875. menuList.value.push(newItem);
  876. }
  877. selectedIndex.value = selectedIndex.value + 1
  878. }
  879. if (row.name === '文字识别') {
  880. router.push({
  881. path: '/identifyFont',
  882. query: {
  883. fileId: copyFileId.value,
  884. fileType: copyFileType.value
  885. }
  886. })
  887. }
  888. if (row.name === '预览') {
  889. loadingPreview.value = true
  890. const filePreview = canPreviewFile(copyFileType.value)
  891. if (filePreview) {
  892. loadingPreview.value = false
  893. addTab(clickRow.value);
  894. onlyView.value = true
  895. // editOnline.value = false
  896. cliCC.value = false
  897. } else {
  898. const res = await preview(copyFileId.value)
  899. showPreview.value = true
  900. previewData.value = URL.createObjectURL(res)
  901. }
  902. loadingPreview.value = false
  903. console.log('filePreview', filePreview);
  904. // // console.log('res',res);
  905. // const res = await preview(copyFileId.value)
  906. // showPreview.value = true
  907. // previewData.value = URL.createObjectURL(res)
  908. } else if (row.name === "历史版本") {
  909. const resHistory = await listVersion({ docId: clickRowId.value })
  910. console.log('resHistory',resHistory);
  911. historyTotal.value = resHistory.total
  912. fileUserTreeData.data = resHistory.rows;
  913. openForwardFile.value = true
  914. }
  915. }
  916. function chooseSet1(num) {
  917. workOrEdit.value = num
  918. thanks.value = true
  919. anyP.value = false
  920. }
  921. function createNewMenu(num) {
  922. oneOrTwo.value = num
  923. folderCase.value = true
  924. }
  925. function cancleHistoryPrew(val) {
  926. historyPrew.value = false
  927. }
  928. function createNewFile() {
  929. addFile.value = true
  930. }
  931. function arrowClick(row, num) {
  932. if (row.name === '文件') {
  933. uploadModal.value = true
  934. } else {
  935. uploadModal.value = false
  936. }
  937. }
  938. // 确认上传
  939. function sureUpload() {
  940. if (fileArr.value.length > 0) {
  941. for (var i = 1; i <= fileArr.value.length; i++) {
  942. myfile.uploadFile({
  943. spaceId: newSpaceId.value - 0,
  944. dirId: newDirId.value - 0,
  945. file: fileArr.value[i - 1]
  946. }).then(res => {
  947. if (res.code === 200) {
  948. ElMessage({
  949. message: "上传文件成功",
  950. type: "success"
  951. })
  952. getAllTop()
  953. uploadModal.value = false
  954. fileArr.value = []
  955. }
  956. })
  957. }
  958. }
  959. }
  960. function onSuccess(files, val) {
  961. fileArr.value.push(files.file)
  962. }
  963. // 筛选后缀图片
  964. function getImage(file) {
  965. if (file === '.txt') {
  966. return ImgFile.txt
  967. } else if (file === '.xlxs' || file === '.docx') {
  968. return ImgFile.xlxs
  969. } else if (file === '.pptx') {
  970. return ImgFile.pptx
  971. } else if (file === '.word') {
  972. return ImgFile.word
  973. } else if (file === '.pdf') {
  974. return ImgFile.pdf
  975. }
  976. }
  977. // 表格多选框
  978. function handleSelectionChange(val) {
  979. delMoreFile.value = val //删除多项的数据
  980. // if (val.length > 1) {
  981. // // 如果选择了多项,只保留最后一项
  982. // val.shift();
  983. // }
  984. if (val.length === 1) {
  985. fileId.value = val[0].docId
  986. }
  987. if (val.length) {
  988. folderCheckout.value = true
  989. haveCheck.value = true
  990. } else {
  991. folderCheckout.value = false
  992. if (!fileCheckout.value) {
  993. haveCheck.value = false
  994. }
  995. }
  996. }
  997. // 文件夹
  998. function handleSelectionChange1(val) {
  999. delMoreFile.value = val //删除多项的数据
  1000. if (val.length > 1) {
  1001. // 如果选择了多项,只保留最后一项
  1002. val.shift();
  1003. proxy.$refs.taskTableRef.toggleRowSelection(val.shift(), false);//单选操作
  1004. }
  1005. if (val.length === 1) {
  1006. folderId.value = val[0].dirId
  1007. }
  1008. if (val.length) {
  1009. fileCheckout.value = true
  1010. haveCheck.value = true
  1011. } else {
  1012. fileCheckout.value = false
  1013. if (!folderCheckout.value) {
  1014. haveCheck.value = false
  1015. }
  1016. }
  1017. }
  1018. // 重命名
  1019. function restName(row, index) {
  1020. // 判断是点击打开还是右键菜单打开
  1021. row = row ? row : clickRow.value
  1022. copyFolderName.value = row.dirName
  1023. selectedBox.value = row.dirId
  1024. rename.value = true
  1025. }
  1026. function getMenu(row, num) {
  1027. if (row.name === '删除') {
  1028. const datas = []
  1029. const isFile = ref(false)
  1030. delMoreFile.value.map(i => {//多选删除
  1031. if (i.parentId) {//文件
  1032. isFile.value = true
  1033. } else {//文件夹
  1034. datas.push(i.docId)
  1035. }
  1036. })
  1037. // 文件夹删除
  1038. if (isFile.value) {//文件
  1039. documents.delDocument(folderId.value).then(res => {
  1040. if (res.code === 200) {
  1041. ElMessage({
  1042. message: "删除成功",
  1043. type: "success"
  1044. })
  1045. getAllTop()
  1046. } else {
  1047. ElMessage({
  1048. message: "删除失败,目录应不为空",
  1049. type: "error"
  1050. })
  1051. }
  1052. isFile.value = false
  1053. })
  1054. } else {
  1055. myfile.delMenu(datas.toString()).then(res => {
  1056. if (res.code === 200) {
  1057. ElMessage({
  1058. message: "删除成功",
  1059. type: "success"
  1060. })
  1061. getAllTop()
  1062. }
  1063. })
  1064. }
  1065. }
  1066. }
  1067. function delName(row, num) {
  1068. documents.delDocument(row.dirId).then(res => {
  1069. if (res.code === 200) {
  1070. getAllTop()
  1071. ElMessage({
  1072. message: "删除成功",
  1073. type: "success"
  1074. })
  1075. }
  1076. })
  1077. }
  1078. // 计算百分比
  1079. function percent() {
  1080. let numP = 0;
  1081. if (useSpace.value && allSpace.value) {
  1082. numP = (useSpace.value / allSpace.value) * 100;
  1083. }
  1084. return numP.toFixed(2) - 0; // 将结果保留两位小数
  1085. }
  1086. // 文件夹每行点击事件
  1087. function folderClick(row, list) {
  1088. // 上一级dirId就是下一级的parentId
  1089. // 判断是点击打开还是右键菜单打开
  1090. if(row){
  1091. backFolder.value = thisFolder.value
  1092. thisFolder.value = row;
  1093. }else{
  1094. row =thisFolder.value
  1095. }
  1096. if(row.isEncrypt === "Y"){
  1097. getLeveldetailFn(row.encryptLevel)
  1098. }else{
  1099. thisFolderRole.value = null
  1100. }
  1101. console.log('row1', toRaw(row));
  1102. topPath.value = row.dirPath
  1103. // console.log('topPath',toRaw(topPath.value));
  1104. newDirId.value = row.dirId
  1105. newSpaceId.value = row.spaceId
  1106. documents.getALLdocument({
  1107. parentId: newDirId.value - 0,
  1108. spaceId: newSpaceId.value - 0
  1109. }).then(res => {
  1110. folderList.value = res.data
  1111. if (res.data.length === 0) {
  1112. myfile.getById(newDirId.value).then(res => {
  1113. if (res.code === 200) {
  1114. fileList.value = res.rows
  1115. }
  1116. })
  1117. } else {
  1118. myfile.getById(newDirId.value).then(res => {
  1119. if (res.code === 200) {
  1120. fileList.value = JSON.parse(JSON.stringify(res.rows))
  1121. // console.log('fileList',toRaw(fileList.value));
  1122. }
  1123. })
  1124. }
  1125. })
  1126. }
  1127. // 确认文件重命名
  1128. function sureChangeName() {
  1129. myfile.editNewMenu({
  1130. dirId: copyDirId.value - 0,
  1131. docId: clickRowId.value - 0,
  1132. fileId: copyFileId.value,
  1133. fileName: nameForm.value.name,
  1134. fileSize: copyFileSize.value - 0,
  1135. fileType: copyFileType.value,
  1136. remark: '',
  1137. spaceId: copySpaceId.value - 0,
  1138. }).then(res => {
  1139. if (res.code === 200) {
  1140. ElMessage({
  1141. message: "重命名成功",
  1142. type: "success"
  1143. })
  1144. fileNameChange.value = false
  1145. getAllTop()
  1146. }
  1147. })
  1148. }
  1149. // 判断id
  1150. function isId() {
  1151. if (directoryId.value === '') {
  1152. directoryId.value = 0
  1153. getAllTop()
  1154. }
  1155. if (folderId.value === '') {
  1156. folderId.value = 0
  1157. getAllTop()
  1158. }
  1159. }
  1160. //关闭图片预览事件
  1161. const closeImgPreview = () => {
  1162. // console.log('close');
  1163. showPreview.value = false
  1164. }
  1165. function getChildren(data) {
  1166. fileTrees.value = data
  1167. refreshFile()
  1168. }
  1169. function getCback(data) {
  1170. thanks.value = data
  1171. }
  1172. function getChildrenC(data) {
  1173. folderCase.value = data
  1174. }
  1175. function getCollects(data) {
  1176. collects.value = data
  1177. }
  1178. function getRename(data) {
  1179. rename.value = data
  1180. }
  1181. function getSpaceC(data) {
  1182. spaces.value = data
  1183. }
  1184. function navBack(data, name) {
  1185. nameForm.value.name = name
  1186. fileNameChange.value = data
  1187. }
  1188. function onlineCase(data, uid, row) {
  1189. editOnline.value = data
  1190. clickRowId.value = uid
  1191. copyRow = row
  1192. }
  1193. function shareBack(data, num) {
  1194. thanks.value = data
  1195. workOrEdit.value = num
  1196. }
  1197. function showFile(data, e, a) {
  1198. editOnline.value = data
  1199. clickRowId.value = e
  1200. copyRow = a
  1201. }
  1202. function folderBack(dir, spa, nam) {
  1203. selectedBox.value = dir
  1204. copyFolderName.value = nam
  1205. copyFileName.value = spa
  1206. }
  1207. //历史版本
  1208. const forwardTreeData = reactive({ data: {} });
  1209. const historycopyRow = ref({})
  1210. function changeMsgClose(val, item) {
  1211. if (val) {
  1212. historycopyRow.value = item
  1213. editOnline.value = false
  1214. cliCC.value = false
  1215. historyPrew.value = true
  1216. }
  1217. openForwardFile.value = val
  1218. }
  1219. function lastBB(data, row, num) {
  1220. openForwardFile.value = data
  1221. historyTotal.value = row
  1222. fileUserTreeData.data = num
  1223. }
  1224. //对mouseCli数组进行筛选,实现菜单的区分显示
  1225. const filterMouseCli = () => {
  1226. const canPreviewArray = ['.doc','.wps', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.pdf', '.rtf', '.txt', '.djvu', '.xps', '.csv', '.fods', '.ods', '.ots', '.xls', '.xlsm', '.xlsx', '.xlt', '.xltm', '.xltx', '.fodp', '.odp', '.otp', '.pot', '.potm', '.potx', '.pps', '.ppsm', '.ppsx', '.ppt', '.pptm', '.pptx']
  1227. const typeArr = ['.png', '.jpg', '.jpeg', '.JPG', '.mp3', '.mp4']
  1228. const imgTypeArr = ['.png', '.jpg', '.jpeg', '.JPG']
  1229. const canEditArr = ['.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.txt', '.djvu', '.xps', '.csv', '.fods', '.ods', '.ots', '.xls', '.xlsm', '.xlsx', '.xlt', '.xltm', '.xltx', '.fodp', '.odp', '.otp','.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.rtf', '.txt', '.djvu', '.xps', '.wps','.pptx']
  1230. let arr = []
  1231. if (!(typeArr.includes(copyFileType.value) || canPreviewArray.includes(copyFileType.value))) {
  1232. arr = mouseCli.value.filter(item => item.name !== "预览")
  1233. } else {
  1234. arr = toRaw(mouseCli.value)
  1235. }
  1236. if (!canEditArr.includes(copyFileType.value)) {
  1237. arr = arr.filter(item => item.name !== "在线编辑" && item.name !== "协作" && item.name !== "历史版本")
  1238. }
  1239. if (!imgTypeArr.includes(copyFileType.value)) {
  1240. arr = arr.filter(item => item.name !== "文字识别")
  1241. }
  1242. // console.log('arr',arr);
  1243. if(thisFolderRole.value){
  1244. arr = rightMenuRole(toRaw(thisFolderRole.value),arr)
  1245. }
  1246. return arr
  1247. }
  1248. function mouseClick() {
  1249. if (cliCC.value) {
  1250. cliCC.value = false
  1251. }
  1252. if (anyP) {
  1253. anyP.value = false
  1254. }
  1255. }
  1256. // 文件夹右键事件
  1257. const folderRClick = (row, col, e) => {
  1258. e.preventDefault();
  1259. e.stopPropagation();
  1260. // thisFolder.value = '' //先清空
  1261. let thisRow = toRaw(row)
  1262. // console.log('thisFolder',thisFolder.value);
  1263. clickRow.value = thisRow
  1264. copyFolderName.value = row.dirName
  1265. // 唤出右键菜单,思路:获取鼠标位置来定位菜单
  1266. folderVisible.value = true;
  1267. foldertop.value = e.pageY;
  1268. folderleft.value = e.pageX;
  1269. };
  1270. // 关闭文件夹右键菜单
  1271. const closeRMenu = () => {
  1272. // console.log("close");
  1273. folderVisible.value = false;
  1274. };
  1275. // 文件夹收藏事件
  1276. const collectFolder = () => {
  1277. isFolder.value = 'Y'
  1278. // clickRow.value = thisFolder.value
  1279. // thisFolder.value = ''
  1280. copyFileName.value = clickRow.value.dirName
  1281. collects.value = true
  1282. }
  1283. // 左箭头事件
  1284. const arrowLift =async () => {
  1285. // router.go(-1)
  1286. // console.log(1);
  1287. topPath.value = backFolder.value.dirPath
  1288. // console.log('topPath',toRaw(topPath.value));
  1289. newDirId.value = backFolder.value.parentId
  1290. newSpaceId.value = backFolder.value.spaceId
  1291. documents.getALLdocument({
  1292. parentId: newDirId.value - 0,
  1293. spaceId: newSpaceId.value - 0
  1294. }).then(res => {
  1295. folderList.value = res.data
  1296. if (res.data.length === 0) {
  1297. myfile.getById(newDirId.value).then(res => {
  1298. if (res.code === 200) {
  1299. fileList.value = res.rows
  1300. }
  1301. })
  1302. } else {
  1303. myfile.getById(newDirId.value).then(res => {
  1304. if (res.code === 200) {
  1305. fileList.value = JSON.parse(JSON.stringify(res.rows))
  1306. // console.log('fileList',toRaw(fileList.value));
  1307. }
  1308. })
  1309. }
  1310. })
  1311. }
  1312. // 归档
  1313. function goLock() {
  1314. fileCount.lockActor(clickRowId.value).then(res => {
  1315. if (res.code === 200) {
  1316. ElMessage({
  1317. type: "success",
  1318. message: "归档成功"
  1319. })
  1320. cliCC.value = false
  1321. anyP.value = false
  1322. }
  1323. })
  1324. }
  1325. function formatFileSize(fileSize) {
  1326. if (fileSize >= 1024 * 1024 * 1024) {
  1327. // 大于等于1GB,显示GB
  1328. return (fileSize / (1024 * 1024 * 1024)).toFixed(2) + 'GB';
  1329. } else if (fileSize >= 1024 * 1024) {
  1330. // 大于等于1MB,显示MB
  1331. return (fileSize / (1024 * 1024)).toFixed(2) + 'MB';
  1332. } else if (fileSize >= 1024) {
  1333. // 大于等于1KB,显示KB
  1334. return (fileSize / 1024).toFixed(2) + 'KB';
  1335. } else {
  1336. // 小于1KB,显示字节
  1337. return fileSize + 'B';
  1338. }
  1339. }
  1340. function formatStorage(sizeInGB) {
  1341. if (sizeInGB >= 1) {
  1342. return sizeInGB.toFixed(2) + 'GB';
  1343. } else {
  1344. const sizeInMB = sizeInGB * 1024;
  1345. if (sizeInMB >= 1) {
  1346. return sizeInMB.toFixed(2) + 'MB';
  1347. } else {
  1348. const sizeInKB = sizeInMB * 1024;
  1349. return sizeInKB.toFixed(2) + 'KB';
  1350. }
  1351. }
  1352. }
  1353. function gridChange() {
  1354. if (fileGrid.value) {
  1355. fileGrid.value = false
  1356. } else {
  1357. fileGrid.value = true
  1358. }
  1359. if (folderGrid.value) {
  1360. folderGrid.value = false
  1361. } else {
  1362. folderGrid.value = true
  1363. }
  1364. }
  1365. //点击收藏后刷新文件
  1366. const refreshFile = ()=>{
  1367. // console.log('ref',toRaw(thisFolder.value));
  1368. if(toRaw(thisFolder.value).isFavorite){//如果点开了文件夹
  1369. // console.log(111);
  1370. folderClick()
  1371. }else{
  1372. // console.log(222);
  1373. getAllTop()
  1374. }
  1375. }
  1376. //star收藏事件
  1377. const collectByStar = (row,isfolder)=>{
  1378. console.log('row',row);
  1379. if(isfolder){
  1380. let thisRow = toRaw(row)
  1381. isFolder.value = 'Y'
  1382. clickRow.value = thisRow
  1383. copyFolderName.value = row.dirName
  1384. copyFileName.value = clickRow.value.dirName
  1385. }else{
  1386. isFolder.value = "N"
  1387. clickRow.value = row
  1388. copyRow.value = row
  1389. clickRowId.value = row.docId
  1390. copyDirId.value = row.dirId
  1391. copyFileName.value = row.fileName
  1392. }
  1393. collects.value = true
  1394. }
  1395. // 取消文件收藏
  1396. const delCollect = async (row,isfolder)=>{
  1397. const thisRow = toRaw(row)
  1398. console.log('thisRow',thisRow);
  1399. let query = {}
  1400. if(isfolder){
  1401. query = {
  1402. isFolder:"Y",
  1403. relaId:thisRow.dirId
  1404. }
  1405. }else{
  1406. query = {
  1407. isFolder:"N",
  1408. relaId:thisRow.docId
  1409. }
  1410. }
  1411. const res = await delFavorite(query)
  1412. //TODO 之后需要重新获取数据 并message提示
  1413. console.log('res',res);
  1414. refreshFile()
  1415. }
  1416. //获取安全图标
  1417. const getLevelImg = (level)=>{
  1418. switch (level) {
  1419. case "L1":
  1420. return level1;
  1421. break;
  1422. case "L2":
  1423. return level2;
  1424. break;
  1425. case "L3":
  1426. return level3;
  1427. break;
  1428. case "L4":
  1429. return level4;
  1430. break;
  1431. return level1;
  1432. break;
  1433. }
  1434. }
  1435. //获取权限详情
  1436. const getLeveldetailFn =async (data)=>{
  1437. const res = await getLeveldetail(data)
  1438. // console.log('getLeveldetailFn',res);
  1439. if(res.code === 200){
  1440. thisFolderRole.value = res.data
  1441. }
  1442. // console.log('thisFolderRole',thisFolderRole.value);
  1443. }
  1444. const closeIptPass = ()=>{
  1445. showInputPassword.value = false
  1446. }
  1447. //输入验证密码后
  1448. const surePass = (pass)=>{
  1449. const passwordCookies = Cookies.get("pass");
  1450. const oldPass = decrypt(passwordCookies)
  1451. // console.log('pass',pass);
  1452. // console.log('oldPass',oldPass);
  1453. // console.log('clickRow',clickRow);
  1454. showInputPassword.value = false
  1455. if(pass === oldPass){
  1456. const passArr = localStorage.getItem('passArr');
  1457. // console.log('passArr',passArr);
  1458. if(!passArr){
  1459. const newArr = []
  1460. newArr.push(clickRow.value.docId)
  1461. localStorage.setItem('passArr',JSON.stringify(newArr))
  1462. }else{
  1463. const passArrObj = JSON.parse(passArr)
  1464. passArrObj.push(clickRow.value.docId)
  1465. localStorage.setItem('passArr',JSON.stringify(passArrObj))
  1466. }
  1467. // 设置销毁
  1468. setTimeout(()=>{
  1469. const passArr = localStorage.getItem('passArr');
  1470. const passArrObj = JSON.parse(passArr)
  1471. console.log('```passArrObj',passArrObj);
  1472. const newArr = passArrObj.filter(item=>item != clickRow.value.docId)
  1473. console.log('```newArr',newArr);
  1474. localStorage.setItem('passArr',JSON.stringify(newArr))
  1475. },1000*30)
  1476. chooseSet(chooseRow.value,null,chooseNum.value)
  1477. }else{
  1478. ElMessage({ message: "验证失败", type: "error" })
  1479. }
  1480. }
  1481. // 文件下载
  1482. const downLoadfile = ()=>{
  1483. myfile.fileDown(clickRow.value.fileId).then(res=>{
  1484. var reader = new FileReader();
  1485. reader.onloadend = function(event){
  1486. //event 就是你要的返回内容
  1487. //因为返回的报错格式是字符串,手动转换成对象,转换成功表示请求失败
  1488. //转换失败就意味着你拿到的result是文件流,那么直接手动下载就好
  1489. try{
  1490. let data = JSON.parse(event.target.result)
  1491. }catch(err){
  1492. const link = document.createElement('a'); // 创建a标签
  1493. let blob = new Blob([res]);
  1494. link.style.display = 'none';
  1495. link.href = URL.createObjectURL(blob); // 创建下载的链接
  1496. link.setAttribute('download',clickRow.value.fileName); // 给下载后的文件命名
  1497. document.body.appendChild(link);
  1498. link.click(); // 点击下载
  1499. document.body.removeChild(link); // 完成移除元素
  1500. window.URL.revokeObjectURL(link.href); // 释放blob对象
  1501. }
  1502. };
  1503. reader.readAsText(res);
  1504. })
  1505. }
  1506. onMounted(() => {
  1507. getAllTop()
  1508. getSpaceList()
  1509. // 添加监听,点击其他地方关闭文件夹右键菜单
  1510. window.addEventListener("click", closeRMenu, true);
  1511. window.addEventListener("click", mouseClick, true);
  1512. })
  1513. onActivated(()=>{
  1514. console.log('route.query',route.query);
  1515. if(route.query.row){
  1516. const newRow = JSON.parse(route.query.row)
  1517. thisFolder.value = newRow
  1518. refreshFile()
  1519. }
  1520. })
  1521. return {
  1522. getSpaceList,
  1523. folderList,//文件夹的数据
  1524. fileList,//文件夹的数据
  1525. searchFire,//搜索文件的model
  1526. changeFile,//切换右侧视图的file
  1527. menuList,//右侧切换
  1528. tableChange,//改变class点击事件
  1529. selectedIndex,//当前选中下标
  1530. shotdown,//筛选出当前数据
  1531. useMenu,
  1532. arrorMenu,
  1533. blueLeft,//返回
  1534. grayRight,//前进
  1535. squre,//视图切换
  1536. sort,//排序
  1537. folder,
  1538. files,
  1539. handleRowClick,
  1540. askApply,//申请扩容
  1541. cliCC,
  1542. mouseCli,//文件点击弹框
  1543. chooseSet,
  1544. trandata,
  1545. tranvalue,
  1546. anyP,
  1547. chooseSet1,
  1548. fileMenu,
  1549. createNewMenu,
  1550. // delBoser,
  1551. clickRowId,
  1552. createNewFile,
  1553. // fileUpload,
  1554. getImage,//筛选文件类型
  1555. handleSelectionChange,
  1556. handleSelectionChange1,
  1557. selectedBox,//重命名相关
  1558. restName,//重命名相关
  1559. getMenu,
  1560. folderId,
  1561. fileId,
  1562. // getAllMiddle,//拿到所有空间信息
  1563. delName,//删除空间信息
  1564. useSpace,//使用空间
  1565. allSpace,//总空间
  1566. percent,
  1567. arrowClick,
  1568. uploadModal,
  1569. sureUpload,
  1570. onSuccess,
  1571. fileArr,
  1572. directoryId,
  1573. folderClick,
  1574. copyDirId,//复制移动需要的↓
  1575. copyDocId,
  1576. copySpaceId,
  1577. copyFileId,
  1578. copyFileName,
  1579. copyFileSize,
  1580. copyFileType,
  1581. sureChangeName,//文件重命名
  1582. fileNameChange,//文件重命名模态框
  1583. nameForm,
  1584. collectImg,//收藏小星星
  1585. sortNum,
  1586. needBag,
  1587. isId,
  1588. editOnline,//在线编辑
  1589. copyParentId,
  1590. copyRow,
  1591. getAllTop,
  1592. newDirId,
  1593. newSpaceId,
  1594. showPreview,//控制图片预览
  1595. closeImgPreview,//关闭预览事件
  1596. previewData,//预览文件数据
  1597. router,
  1598. route,
  1599. fileTrees,
  1600. getChildren,//子传父
  1601. copyOrMove,
  1602. impDirId,
  1603. impNum,
  1604. impSpaceId,
  1605. //历史版本=========
  1606. openForwardFile,
  1607. forwardTreeData,
  1608. fileUserTreeData,
  1609. filterMouseCli,
  1610. changeMsgClose,
  1611. historyPrew,
  1612. historycopyRow,
  1613. thanks,
  1614. getCback,
  1615. mouseClick,
  1616. folderVisible,
  1617. foldertop,
  1618. folderleft,
  1619. thisFolder,
  1620. folderRClick,
  1621. closeRMenu,
  1622. cancleHistoryPrew,
  1623. historyTotal,
  1624. //历史版本=========
  1625. fileUserTreeData,
  1626. thanks,
  1627. getCback,
  1628. mouseClick,
  1629. workOrEdit,
  1630. folderCase,//新建文件夹传值
  1631. getChildrenC,
  1632. oneOrTwo,//父传子判断
  1633. folderCheckout,
  1634. fileCheckout,
  1635. haveCheck,
  1636. onlyView,
  1637. goLock,
  1638. collects,//收藏父传子
  1639. getCollects,//收藏子传父
  1640. folderTotal,
  1641. fileTotal,
  1642. delMoreFile,//删除多个文件夹
  1643. topPath,
  1644. xz,//文件右键菜单left
  1645. yz,//文件右键菜单top
  1646. formatFileSize,
  1647. isFolder,
  1648. clickRow,
  1649. rename,
  1650. getRename,//文件夹重命名子传父
  1651. copyFolderName,
  1652. spaces,//空间扩容父传子
  1653. getSpaceC,//空间扩容子传父
  1654. copySpaceCup,
  1655. fileGrid,
  1656. folderGrid,
  1657. gridChange,
  1658. collectFolder,
  1659. arrowLift,
  1660. formatStorage,
  1661. showFile,
  1662. navBack,
  1663. onlineCase,
  1664. lastBB,
  1665. shareBack,
  1666. folderBack,
  1667. refreshFile,
  1668. delCollect,
  1669. backFolder,
  1670. collectByStar,
  1671. getLevelImg,
  1672. level1,
  1673. level2,
  1674. level3,
  1675. level4,
  1676. getLeveldetailFn,
  1677. thisFolderRole,
  1678. showInputPassword,
  1679. closeIptPass,
  1680. surePass,
  1681. chooseRow,
  1682. chooseNum,
  1683. loadingPreview,
  1684. downLoadfile,
  1685. addTab,
  1686. addFolderAdd
  1687. }
  1688. },
  1689. watch: {
  1690. },
  1691. components: {
  1692. BreadMenu,
  1693. FileEdit,
  1694. ImgPreview,
  1695. FileTree,
  1696. historyList,
  1697. TransferModal,
  1698. CreateFloder,
  1699. FileCollect,
  1700. FolderReName,
  1701. SpaceBig,
  1702. PlaceGridFolder,
  1703. PalaceGridFile,
  1704. inputPassword
  1705. },
  1706. }
  1707. </script>
  1708. <style lang="scss" scoped>
  1709. .lodingBox{
  1710. position:absolute;
  1711. top: 0;
  1712. left: 0;
  1713. width: 100vh;
  1714. height: 100vh;
  1715. z-index: 10000000;
  1716. }
  1717. p {
  1718. margin: 0;
  1719. padding: 0;
  1720. }
  1721. .bigBox {
  1722. width: 100%;
  1723. height: 100%;
  1724. display: flex;
  1725. justify-content: flex-start;
  1726. overflow: hidden;
  1727. }
  1728. .settingBox {
  1729. width: 25vw;
  1730. height: 92vh;
  1731. border: 1px solid black;
  1732. border-radius: 4px;
  1733. /* margin: 5px 5px; */
  1734. margin-right: 5px;
  1735. background-color: white;
  1736. }
  1737. .topSearch {
  1738. width: 100%;
  1739. height: 48px;
  1740. background-color: #EBEFF6;
  1741. display: flex;
  1742. justify-content: space-around;
  1743. align-items: center;
  1744. }
  1745. .searchFire {
  1746. width: 248px;
  1747. height: 32px;
  1748. }
  1749. .setBox {
  1750. width: 88px;
  1751. height: 112px;
  1752. text-align: center;
  1753. margin-left: 5px;
  1754. margin-top: 5px;
  1755. position: relative;
  1756. .left_fileBox{
  1757. position: relative;
  1758. .levelImg{
  1759. width: 32px;
  1760. height: 32px;
  1761. position: absolute;
  1762. right: 5%;
  1763. bottom: 20%;
  1764. }
  1765. }
  1766. }
  1767. .setBox:hover {
  1768. background-color: #EEF9FF;
  1769. }
  1770. .setBox:hover .selectChe {
  1771. background-color: #EEF9FF;
  1772. display: block;
  1773. z-index: 1000;
  1774. }
  1775. .selectChe {
  1776. display: none;
  1777. width: 20px;
  1778. height: 20px;
  1779. background: rgba(255, 255, 255, 0.7);
  1780. border-radius: 4px 4px 4px 4px;
  1781. position: absolute;
  1782. top: 2px;
  1783. right: 2px;
  1784. line-height: 10px;
  1785. }
  1786. .mesBox {
  1787. width: 75vw;
  1788. height: 92vh;
  1789. border-radius: 4px;
  1790. background-color: white;
  1791. }
  1792. .useBox {
  1793. width: 100%;
  1794. height: 24px;
  1795. }
  1796. .tables {
  1797. display: inline-block;
  1798. width: 112px;
  1799. height: 22px;
  1800. border-radius: 4px;
  1801. line-height: 21px;
  1802. text-align: center;
  1803. font-size: 12px;
  1804. margin-left: 5px;
  1805. position: relative;
  1806. white-space: nowrap;
  1807. overflow: hidden;
  1808. text-overflow: ellipsis;
  1809. }
  1810. .tableLis {
  1811. display: inline-block;
  1812. width: 112px;
  1813. height: 22px;
  1814. border-radius: 4px;
  1815. background-color: #EBEFF6;
  1816. line-height: 21px;
  1817. text-align: center;
  1818. font-size: 12px;
  1819. margin-left: 5px;
  1820. position: relative;
  1821. white-space: nowrap;
  1822. overflow: hidden;
  1823. text-overflow: ellipsis;
  1824. max-width: auto;
  1825. }
  1826. .manyUse {
  1827. width: 100%;
  1828. height: 48px;
  1829. /* background-color: gray; */
  1830. line-height: 48px;
  1831. display: flex;
  1832. justify-content: flex-start;
  1833. align-items: center;
  1834. }
  1835. .el-dropdown-link {
  1836. color: white;
  1837. }
  1838. .breadBox {
  1839. width: 100%;
  1840. height: 24px;
  1841. display: flex;
  1842. justify-content: space-between;
  1843. align-items: center;
  1844. background-color: #F6F7F9;
  1845. .topPath {
  1846. color: #6F85B5;
  1847. font-size: 12px;
  1848. }
  1849. }
  1850. :deep(.el-collapse-item__header) {
  1851. height: 24px !important;
  1852. background-color: #EBEFF6 !important;
  1853. }
  1854. .showBox{
  1855. height: 100%;
  1856. }
  1857. .detailBox {
  1858. width: 100%;
  1859. height: 50%;
  1860. }
  1861. :deep(.el-dialog__header) {
  1862. background-color: #ECEFF7;
  1863. margin-right: 0px;
  1864. }
  1865. .fileTable {
  1866. height: 50%;
  1867. overflow-y: hidden;
  1868. margin-top: 55px;
  1869. }
  1870. .setCli {
  1871. width: 156px;
  1872. max-height: auto;
  1873. position: absolute;
  1874. top: -70px;
  1875. left: 300px;
  1876. flex-wrap: 400;
  1877. background-color: white;
  1878. border: 1px solid gray;
  1879. border-radius: 4px;
  1880. z-index: 3;
  1881. overflow-y: auto;
  1882. // font-size: 16px;
  1883. }
  1884. .setCli1 {
  1885. width: 156px;
  1886. height: auto;
  1887. position: absolute;
  1888. background-color: white;
  1889. border: 1px solid gray;
  1890. border-radius: 4px;
  1891. z-index: 100;
  1892. overflow-y: auto;
  1893. }
  1894. .chooseSet {
  1895. width: 140px;
  1896. height: 30px;
  1897. line-height: 30px;
  1898. margin: 5px auto;
  1899. font-size: 13px;
  1900. // display: flex;
  1901. // align-items: center;
  1902. // position: relative;
  1903. img {
  1904. margin-right: 4px;
  1905. vertical-align: middle;
  1906. }
  1907. }
  1908. .chooseSet:hover {
  1909. width: 140px;
  1910. height: 30px;
  1911. line-height: 30px;
  1912. margin: 5px auto;
  1913. font-size: 13px;
  1914. background-color: #F5F7F9;
  1915. /* color: white; */
  1916. }
  1917. :deep([data-v-69cdaa40] .el-collapse-item__header) {
  1918. padding-left: 10px;
  1919. }
  1920. :deep(.el-collapse-item__content) {
  1921. // height: 235px;
  1922. overflow-y: auto;
  1923. }
  1924. .ellipsis-text {
  1925. white-space: nowrap;
  1926. overflow: hidden;
  1927. text-overflow: ellipsis;
  1928. max-width: auto;
  1929. }
  1930. .right_menu {
  1931. width: 156px;
  1932. position: absolute;
  1933. padding: 8px;
  1934. box-shadow: 0px 2px 10px 1px rgba(199, 203, 216);
  1935. border-radius: 4px 4px 4px 4px;
  1936. border: 1px solid gray;
  1937. background-color: #fff;
  1938. z-index: 10000;
  1939. .menu_item {
  1940. width: 100%;
  1941. height: 30px;
  1942. border-radius: 4px 4px 4px 4px;
  1943. line-height: 30px;
  1944. display: flex;
  1945. margin: 5px auto;
  1946. align-items: center;
  1947. font-size: 13px;
  1948. &:hover {
  1949. background-color: #f5f7f9;
  1950. }
  1951. span {
  1952. margin-left: 4px;
  1953. }
  1954. }
  1955. }
  1956. // 扩容盒子
  1957. .expansion{
  1958. margin: 0 16px;
  1959. border-top: 1px solid #C1CCE3 ;
  1960. .top_box{
  1961. margin-top: 16px;
  1962. width: 100%;
  1963. display: flex;
  1964. justify-content: space-between;
  1965. }
  1966. }
  1967. .isCheck {
  1968. opacity: 1 !important;
  1969. }
  1970. :deep(.el-tag__content) {
  1971. display: block;
  1972. }
  1973. :deep(.el-icon el-tag__close) {
  1974. display: block;
  1975. }
  1976. :deep(.el-collapse-item__content) {
  1977. height: 100%;
  1978. border-bottom: none;
  1979. }
  1980. :deep(.el-collapse-item__wrap) {
  1981. // height: 100%;
  1982. }
  1983. // 隐藏全选按钮
  1984. .file-jia {
  1985. :deep(.el-table th.el-table__cell:nth-child(1) .cell) {
  1986. visibility: hidden;
  1987. }
  1988. }
  1989. </style>