MyFile.vue 80 KB

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