MyFile.vue 83 KB

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