MyFile.vue 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635
  1. <template>
  2. <div>
  3. <div class="bigBox">
  4. <div class="settingBox" style="height: calc(100% - 60px);">
  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)">
  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: 80vh;align-content: flex-start;overflow-y: auto;">
  24. <!-- v-for盒子 -->
  25. <template v-for="(item, index) in fileMenu">
  26. <div class="setBox" @click="changeFile(item, index)">
  27. <el-dropdown trigger="click" class="selectChe">
  28. <span class="el-dropdown-link">
  29. ...
  30. </span>
  31. <template #dropdown>
  32. <el-dropdown-menu>
  33. <el-dropdown-item @click="restName(item, index)">重命名</el-dropdown-item>
  34. <el-dropdown-item @click="delName(item, index)">删除</el-dropdown-item>
  35. </el-dropdown-menu>
  36. </template>
  37. </el-dropdown>
  38. <img src="../../assets/images/fileStyle.png" style="width: 72px;height: 72px;">
  39. <p class="ellipsis-text">{{ item.dirName }}</p>
  40. </div>
  41. </template>
  42. </div>
  43. <div>
  44. <p>
  45. <span style="margin-left: 5px;">{{ useSpace ? useSpace + 'G' : '0' }}/{{ allSpace ?
  46. allSpace
  47. * 1024 + 'G' : '0' }}</span>
  48. <span style="margin-left: 5px;font-size: 12px;color: blue;cursor: pointer;"
  49. @click="askApply">申请扩容</span>
  50. </p>
  51. <el-progress style="margin-left: 8px;" :percentage="percent()" />
  52. </div>
  53. </div>
  54. <!-- 右侧大盒子 -->
  55. <div class="mesBox" style="height: calc(100% - 60px);" v-if="editOnline">
  56. <!-- 功能盒子 -->
  57. <div class="useBox">
  58. <!-- table切换 -->
  59. <div style="width: 100%;height: 24px;background-color: #7084B4;line-height: 20px;">
  60. <template v-for="(item, index) in menuList">
  61. <span @click="tableChange(item, index)"
  62. :class="['tables', { tableLis: selectedIndex === index }]">
  63. {{ item.name }}
  64. <img v-if="selectedIndex === index ? true : false"
  65. style="position: absolute;top: 4px;right: 4px;" src="../../assets/images/close.png"
  66. @click="shotdown(item)">
  67. </span>
  68. </template>
  69. </div>
  70. <!-- 众多功能 -->
  71. <div class="manyUse">
  72. <div
  73. style="display: flex;width: 82px;height: 32px;justify-content: flex-start;align-items: center;">
  74. <div style="margin-left: 5px;">
  75. <el-icon
  76. style="background-color: #7084B4;width: 24px;height: 24px;border-radius: 50%;color: white;"
  77. @click="createNewMenu">
  78. <Plus />
  79. </el-icon>
  80. </div>
  81. <div style="margin-left: 5px;" @click="createNewMenu">
  82. <span style="font-size: 14px;">新建</span>
  83. </div>
  84. </div>
  85. <template v-for="(item, index) in useMenu">
  86. <div style="display: flex;width: 82px;height: 32px;justify-content: flex-start;align-items: center;line-height: 18px;"
  87. @click="getMenu(item, index)">
  88. <div style="margin-left: 5px;">
  89. <img :src="item.img" style="width: 24px;height: 24px;" alt="">
  90. </div>
  91. <div style="margin-left: 5px;">
  92. <span style="font-size: 14px;">{{ item.name }}</span>
  93. </div>
  94. </div>
  95. </template>
  96. <div
  97. style="display: flex;width: 92px;height: 32px;justify-content: flex-start;align-items: center;line-height: 18px;">
  98. <div style="margin-left: 5px;">
  99. <img src="../../assets/images/upload.png" style="width: 24px;height: 24px;" alt="">
  100. </div>
  101. <div style="margin-left: 5px;">
  102. <span style="color: black;cursor: pointer;" @click="uploadModal = true">上传
  103. </span>
  104. </div>
  105. </div>
  106. </div>
  107. <!-- 面包屑功能栏 -->
  108. <div class="breadBox">
  109. <!-- 左侧 -->
  110. <div style="display: flex;justify-content: space-around;align-items: center;">
  111. <!-- 前进后退 -->
  112. <div style="display: flex;justify-content: space-around;align-items: center;">
  113. <img style="display:block;width: 11px;height: 11px;" :src="blueLeft" alt=""
  114. @click="getAllTop()">
  115. <img style="display:block;width: 16px;height: 16px;" :src="grayRight" alt="">
  116. </div>
  117. <!-- 面包屑 -->
  118. <div>
  119. <BreadMenu></BreadMenu>
  120. </div>
  121. </div>
  122. <!-- 右侧 -->
  123. <div>
  124. <img :src="sort" alt="">
  125. <img :src="squre" alt="">
  126. </div>
  127. </div>
  128. </div>
  129. <!-- 展示文件盒子 -->
  130. <!-- 文件夹 -->
  131. <div class="detailBox">
  132. <el-collapse v-model="folder" accordion class="collapseSell">
  133. <el-collapse-item title="文件夹" name="1" class="custom-collapse-item">
  134. <el-table :data="folderList" style="width: 100%" @selection-change="handleSelectionChange1"
  135. :single-select="true" @row-click="folderClick">
  136. <el-table-column type="selection" width="55" />
  137. <el-table-column label="名称" width="180">
  138. <template #default="scope">
  139. <span>
  140. <img src="../../assets/images/fileBox.png" style="width: 20px;height: 24px;"
  141. alt="">
  142. {{ scope.row.dirName }}
  143. </span>
  144. </template>
  145. </el-table-column>
  146. <el-table-column prop="createTime" label="时间" width="180" />
  147. <el-table-column prop="dirType" label="类型">
  148. <template #default="scope">
  149. <span>{{ scope.row.dirType === "1" ? "文件夹" : "未知类型" }}</span>
  150. </template>
  151. </el-table-column>
  152. <el-table-column label="大小">
  153. <template #default="scope">
  154. <span>
  155. 10KB
  156. </span>
  157. </template>
  158. </el-table-column>
  159. </el-table>
  160. </el-collapse-item>
  161. </el-collapse>
  162. </div>
  163. <!-- 文件 -->
  164. <div class="fileTable">
  165. <el-collapse v-model="files" accordion class="collapse" style="height: 200px;">
  166. <el-collapse-item title="文件" name="2" class="">
  167. <el-table :data="fileList" style="width: 100%" @row-click="handleRowClick"
  168. @selection-change="handleSelectionChange">
  169. <el-table-column type="selection" width="55" />
  170. <el-table-column label="名称" width="200">
  171. <template #default="scope">
  172. <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
  173. <el-icon v-if="collectImg">
  174. <Star />
  175. </el-icon>
  176. <img v-else src="../../assets/images/yellowstar.png" alt="">
  177. <img :src="getImage(scope.row.fileType)" alt="">
  178. {{ scope.row.fileName }}
  179. </span>
  180. </template>
  181. </el-table-column>
  182. <el-table-column prop="createTime" label="时间" width="180" />
  183. <el-table-column prop="fileType" label="类型" />
  184. <el-table-column label="大小">
  185. <template #default="scope">
  186. <span>
  187. {{ scope.row.fileSize }}KB
  188. </span>
  189. </template>
  190. </el-table-column>
  191. </el-table>
  192. <div class="setCli" v-if="cliCC">
  193. <template v-for="(item, index) in mouseCli">
  194. <p @click="chooseSet(item, index)" class="chooseSet">
  195. <img :src="item.img" alt="">
  196. {{ item.name }}
  197. <span v-if="item.name == '在线编辑' || item.name == '协作' ? true : false"
  198. style="color: #7084B4;float: right;position: relative;">></span>
  199. </p>
  200. </template>
  201. <div class="setCli1" v-if="anyP">
  202. <p @click="chooseSet1()" class="chooseSet">
  203. <img src="../../assets/images/user.png" alt="">
  204. 选择人员
  205. </p>
  206. <p class="chooseSet">
  207. <img src="../../assets/images/archiveTray.png" alt="">
  208. 归档
  209. </p>
  210. </div>
  211. </div>
  212. </el-collapse-item>
  213. </el-collapse>
  214. </div>
  215. <!-- 穿梭框 -->
  216. <div>
  217. <el-dialog v-model="transferModal" title="分享" width="40%">
  218. <!-- 穿梭大盒子 -->
  219. <div class="transBox">
  220. <!-- 总数据包 -->
  221. <div class="allBag">
  222. <el-input style="width: 220px;margin-left: 18px;margin-top:5px" v-model="allBag"
  223. placeholder="搜索"></el-input>
  224. <div class="allLog">
  225. <el-tree :data="allTreeData" :props="allTreeProps" show-checkbox node-key="id"
  226. :default-expanded-keys="openTree" @check-change="allTreeChange" />
  227. </div>
  228. </div>
  229. <!-- 需要的数据包 -->
  230. <div class="needBag">
  231. <!-- <el-input style="width: 220px;margin-left: 18px;margin-top:5px" v-model="needBag"
  232. placeholder="搜索"></el-input> -->
  233. <div style="border-bottom: 1px solid gray;">
  234. <span>已选择{{ chooseTagData.length }}人</span>
  235. <span style="color: red;font-size: 14px;float: right;">清空</span>
  236. </div>
  237. <div class="needLog">
  238. <el-tag v-for="(item, index) in chooseTagData" :key="index" class="tagtag" closable
  239. @close="handleClose(item)">
  240. {{ item.userName }}
  241. </el-tag>
  242. </div>
  243. </div>
  244. </div>
  245. <template #footer>
  246. <span class="dialog-footer">
  247. <el-button @click="transferModal = false">取消</el-button>
  248. <el-button type="primary" @click="sureShare">
  249. 确定
  250. </el-button>
  251. </span>
  252. </template>
  253. </el-dialog>
  254. </div>
  255. </div>
  256. <div v-else>
  257. <div>
  258. <el-button @click="editOnline = true">返回</el-button>
  259. </div>
  260. <FileEdit :docId="clickRowId" :copyRow="copyRow"></FileEdit>
  261. </div>
  262. <!-- 扩容弹窗 -->
  263. <div>
  264. <el-dialog v-model="askTo" title="扩容申请" width="30%">
  265. <el-form>
  266. <el-form-item label="新容量">
  267. <el-input-number v-model="askNum" :min="1" :max="10" />
  268. </el-form-item>
  269. <el-form-item label="申请理由">
  270. <el-input v-model="askTalk" maxlength="150" placeholder="请输入申请理由" show-word-limit
  271. type="textarea" />
  272. </el-form-item>
  273. </el-form>
  274. <template #footer>
  275. <span class="dialog-footer">
  276. <el-button @click="askTo = false">取消</el-button>
  277. <el-button type="primary" @click="sureAsk">
  278. 确定
  279. </el-button>
  280. </span>
  281. </template>
  282. </el-dialog>
  283. </div>
  284. <!-- 新增文件夹弹窗 -->
  285. <div>
  286. <el-dialog v-model="addBoser" title="新建文件夹" width="30%">
  287. <el-form :model="boserForm" label-width="120px">
  288. <el-form-item label="目录名称">
  289. <el-input v-model="boserForm.dirName" />
  290. </el-form-item>
  291. </el-form>
  292. <template #footer>
  293. <span class="dialog-footer">
  294. <el-button @click="addBoser = false">取消</el-button>
  295. <el-button type="primary" @click="sureAddBoser">
  296. 确认
  297. </el-button>
  298. </span>
  299. </template>
  300. </el-dialog>
  301. </div>
  302. <!-- 废弃的顶层目录新增 -->
  303. <div>
  304. <el-dialog v-model="addFile" title="Tips" width="30%">
  305. <el-form :model="fileForm" label-width="120px">
  306. <el-form-item label="空间类型">
  307. <el-select v-model="spaceValue" placeholder="请选择空间类型">
  308. <el-option v-for="(item, index) in spaceSelect" :key="item.value" :label="item.label"
  309. :value="item.value" :disabled="item.disabled" />
  310. </el-select>
  311. </el-form-item>
  312. <el-form-item label="空间名称">
  313. <el-input v-model="fileForm.spaceName" />
  314. </el-form-item>
  315. <el-form-item label="备注">
  316. <el-input v-model="fileForm.remark" />
  317. </el-form-item>
  318. </el-form>
  319. <template #footer>
  320. <span class="dialog-footer">
  321. <el-button @click="addFile = false">取消</el-button>
  322. <el-button type="primary" @click="sureAddFile">
  323. 确认
  324. </el-button>
  325. </span>
  326. </template>
  327. </el-dialog>
  328. </div>
  329. <!-- 文件上传 -->
  330. <div>
  331. <el-dialog v-model="uploadModal" title="文件上传" width="30%">
  332. <el-upload class="upload-demo" drag :http-request="onSuccess" multiple>
  333. <el-icon class="el-icon--upload"><upload-filled /></el-icon>
  334. <div class="el-upload__text">
  335. 拖入或<em>点击上传</em>
  336. </div>
  337. <template #tip>
  338. <div class="el-upload__tip">
  339. 请选择或拖入文件
  340. </div>
  341. </template>
  342. </el-upload>
  343. <template #footer>
  344. <span class="dialog-footer">
  345. <el-button @click="uploadModal = false">取消</el-button>
  346. <el-button type="primary" @click="sureUpload">
  347. 确认
  348. </el-button>
  349. </span>
  350. </template>
  351. </el-dialog>
  352. </div>
  353. <!-- 文件重命名 -->
  354. <div>
  355. <el-dialog v-model="fileNameChange" title="重命名" width="30%">
  356. <el-form :model="nameForm" label-width="120px">
  357. <el-form-item label="新名字">
  358. <el-input v-model="nameForm.name"></el-input>
  359. </el-form-item>
  360. </el-form>
  361. <template #footer>
  362. <span class="dialog-footer">
  363. <el-button @click="fileNameChange = false">取消</el-button>
  364. <el-button type="primary" @click="sureChangeName">
  365. 确认
  366. </el-button>
  367. </span>
  368. </template>
  369. </el-dialog>
  370. </div>
  371. <!-- 文件收藏 -->
  372. <div>
  373. <el-dialog v-model="fileCollect" title="重命名" width="30%">
  374. <el-form :model="collectForm" label-width="120px">
  375. <el-form-item label="名称">
  376. <el-input v-model="collectForm.name" />
  377. </el-form-item>
  378. <el-form-item label="收藏标签">
  379. <div class="newTag" v-if="tagCollect">
  380. <el-input v-model="newTag" placeholder="请输入新标签" @blur="tagBlur"></el-input>
  381. </div>
  382. <el-select v-model="collectForm.folders" class="m-2" placeholder="请选择" size="large"
  383. @change="collectChange">
  384. <el-option v-for="(item, index) in collectList" :key="item.labelId" :label="item.label"
  385. :value="item.labelId" />
  386. </el-select>
  387. </el-form-item>
  388. </el-form>
  389. <el-button @click="createTag">新建标签</el-button>
  390. <template #footer>
  391. <span class="dialog-footer">
  392. <el-button @click="fileCollect = false">取消</el-button>
  393. <el-button type="primary" @click="sureCollect">
  394. 确认
  395. </el-button>
  396. </span>
  397. </template>
  398. </el-dialog>
  399. </div>
  400. <!-- 中栏重命名 -->
  401. <div>
  402. <el-dialog v-model="folderName" title="重命名" width="30%">
  403. <el-input v-model="newName"></el-input>
  404. <template #footer>
  405. <span class="dialog-footer">
  406. <el-button @click="folderName = false">取消</el-button>
  407. <el-button type="primary" @click="sureFolderName">确认</el-button>
  408. </span>
  409. </template>
  410. </el-dialog>
  411. </div>
  412. <ImgPreview :previewData="previewData" :copyFileType="copyFileType" :showPreview="showPreview"
  413. @closeImgPreview="closeImgPreview"></ImgPreview>
  414. <div>
  415. <FileTree v-if="fileTrees" :fileTrees="fileTrees" :newSpaceId="newSpaceId" :fileId="clickRowId"
  416. @getChildren="getChildren" :copyOrMove="copyOrMove"></FileTree>
  417. </div>
  418. </div>
  419. </div>
  420. <!-- 图片预览 -->
  421. <!-- 历史版本 -->
  422. <FileTreeChoice
  423. :openFile="openForwardFile"
  424. :docId="clickRowId.toString()"
  425. @close="openForwardFile = false"
  426. :fileUserTreeData="fileUserTreeData.data"
  427. @forwardChangeMsg="forwardChangeMsg"
  428. ></FileTreeChoice>
  429. <!-- 历史版本 -->
  430. </template>
  431. <script>
  432. import { ref, toRaw, onMounted } from 'vue'
  433. import myfile from '../../api/myfile/myfile'
  434. import documents from '../../api/document/document'
  435. import fileSpace from '../../api/filespace/fileSpace'
  436. import userTree from '../../api/user/userTree'
  437. import fileShare from '../../api/fileShare/fileShare'
  438. import collect from '../../api/collect/collect'
  439. import FileTree from './components/FileTree.vue'
  440. import BreadMenu from './components/BreadMenu.vue'
  441. import FileEdit from './components/fileedit.vue'
  442. import ImgFile from "./jsComponents/ImgFile"
  443. import { Search } from '@element-plus/icons-vue'
  444. import blueLeft from '../../assets/images/blueLeft.png'
  445. import grayRight from "../../assets/images/grayRight.png"
  446. import sort from '../../assets/images/sort.png'
  447. import squre from '../../assets/images/squre.png'
  448. import { ElMessage } from 'element-plus'
  449. import ImgPreview from '@/components/ImgPreview/ImgPreview.vue'
  450. import { preview } from "@/api/common/common.js";
  451. import FileTreeChoice from "@/components/FileTreeChoice/index.vue"; //选择文件发送的列表,历史版本
  452. import { listVersion } from "@/api/biz/version";
  453. import useUserStore from "@/store/modules/user";
  454. import { useRouter, useRoute } from "vue-router";
  455. export default {
  456. setup() {
  457. let fileTrees = ref(false)
  458. let editOnline = ref(true)
  459. let searchFire = ref('')
  460. let selectedIndex = ref(0)
  461. let folder = ref(['1'])
  462. let files = ref(['2'])
  463. let folderList = ref([])
  464. let askTo = ref(false)
  465. let folderName = ref(false)
  466. let askNum = ref(1)
  467. let askTalk = ref('')
  468. let newTag = ref('')
  469. let cliCC = ref(false)
  470. let transferModal = ref(false)
  471. let addBoser = ref(false)
  472. let addFile = ref(false)
  473. let anyP = ref(false)
  474. let uploadModal = ref(false)
  475. let collectImg = ref(true)
  476. let fileCollect = ref(false)
  477. let tagCollect = ref(false)//添加收藏标签时显示
  478. let selectedBox = ref(-1)
  479. let newName = ref('')
  480. let clickRowId = ref("")
  481. let trandata = ref()
  482. let folderId = ref('')
  483. let fileId = ref('')
  484. let tranvalue = ref([])
  485. let useSpace = ref(0)
  486. let allSpace = ref(0)
  487. let fileArr = ref([])
  488. let copyDirId = ref(0)//需要操作的dirid
  489. let copySpaceId = ref(0)//需要操作的spaceid
  490. let copyDocId = ref(0)//需要操作的docid
  491. let copyFileId = ref(0)//需要操作的fileid
  492. let copyFileSize = ref(0)//需要操作的filesize
  493. let copyFileType = ref('')//需要操作的文件类型
  494. let copyFileName = ref("")//需要操作的文件名
  495. let directoryId = ref('')
  496. let impSpaceId = ref("")
  497. let impDirId = ref("")
  498. let impNum = ref(0)
  499. let copyParentId = ref("")//文件夹
  500. let allBag = ref("")//穿梭狂内搜索
  501. let needBag = ref("")
  502. let copyOrMove = ref(0)//0代表复制,1代表移动
  503. let sortNum = ref(0)
  504. const openForwardFile=ref(false) //历史版本展示
  505. const fileUserTreeData = reactive({ data: {} });
  506. let boserForm = ref({
  507. spaceId: "",//空间id
  508. dirName: "",
  509. dirPower: "",
  510. dirType: "",
  511. parentId: "",
  512. remark: ""//备注
  513. })
  514. let fileForm = ref({
  515. spaceType: '',
  516. spaceName: "",
  517. remark: "",
  518. })
  519. let fileList = ref([
  520. ])
  521. let menuList = ref([
  522. ])
  523. let useMenu = ref([
  524. {
  525. img: ImgFile.copy,
  526. name: "复制"
  527. },
  528. {
  529. img: ImgFile.clipboard,
  530. name: "粘贴"
  531. },
  532. {
  533. img: ImgFile.share,
  534. name: "分享给"
  535. },
  536. {
  537. img: ImgFile.trash,
  538. name: "删除"
  539. },
  540. ])
  541. let arrorMenu = ref([
  542. {
  543. img: ImgFile.file,
  544. name: "文件"
  545. },
  546. {
  547. img: ImgFile.folder,
  548. name: '文件夹'
  549. },
  550. {
  551. img: ImgFile.image,
  552. name: "图片"
  553. },
  554. {
  555. img: ImgFile.filmSlate,
  556. name: "视频"
  557. },
  558. {
  559. img: ImgFile.musicNotes,
  560. name: "音频"
  561. }
  562. ])
  563. let mouseCli = ref([
  564. {
  565. img: ImgFile.addolder,
  566. name: "移动",
  567. },
  568. {
  569. img: ImgFile.copy,
  570. name: "复制",
  571. },
  572. // {
  573. // img: ImgFile.clipboard,
  574. // name: "粘贴"
  575. // },
  576. {
  577. img: ImgFile.collect,
  578. name: "收藏"
  579. },
  580. {
  581. img: ImgFile.downLoad,
  582. name: "下载"
  583. },
  584. {
  585. img: ImgFile.textbox,
  586. name: "重命名"
  587. },
  588. // {
  589. // img: ImgFile.goon,
  590. // name: "发送"
  591. // },
  592. {
  593. img: ImgFile.share,
  594. name: "分享"
  595. },
  596. {
  597. img: ImgFile.notePencil,
  598. name: "在线编辑"
  599. },
  600. {
  601. img: ImgFile.togger,
  602. name: "协作"
  603. },
  604. {
  605. img: ImgFile.icc,
  606. name: "文字识别"
  607. },
  608. {
  609. img: ImgFile.history,
  610. name: "历史版本"
  611. },
  612. {
  613. img: ImgFile.previewIcon,
  614. name: "预览"
  615. },
  616. {
  617. img: ImgFile.trash,
  618. name: "删除"
  619. }
  620. ])
  621. let nameForm = ref({
  622. name: ""
  623. })
  624. let allTreeProps = {
  625. label: 'label',
  626. children: 'children',
  627. disabled: false,
  628. id: "id"
  629. }
  630. let collectForm = ref({
  631. name: "",
  632. folders: "",
  633. })
  634. let allTreeData = ref([])
  635. let needTagData = ref([])
  636. let chooseTagData = ref([])
  637. let openTree = ref([])
  638. let fileNameChange = ref(false)
  639. let fileMenu = ref([])
  640. let collectList = ref([])
  641. let copyRow = ref({})
  642. let spaceValue = ref("")
  643. let newDirId = ref('')
  644. let newSpaceId = ref('')
  645. let spaceSelect = ref([
  646. {
  647. label: "个人空间",
  648. value: 3,
  649. },
  650. {
  651. label: "部门空间",
  652. value: 2,
  653. disabled: true
  654. },
  655. {
  656. label: "公共空间",
  657. value: 1,
  658. disabled: true
  659. },
  660. ])
  661. const showPreview = ref(false)//控制图片预览组件显示
  662. const previewData = ref()//需要预览的文件的数据
  663. const router = useRouter(); //注册路由
  664. // 获取用户树
  665. function getAllUser() {
  666. userTree.getUserTree({}).then(res => {
  667. allTreeData.value = [res]
  668. userTree.getUserTree({}).then(res => {
  669. allTreeData.value = [res];
  670. // 递归函数来获取所有节点的 id
  671. function getAllNodeIds(nodes) {
  672. nodes.forEach(node => {
  673. openTree.value.push(node.id);
  674. if (node.children && node.children.length > 0) {
  675. getAllNodeIds(node.children);
  676. }
  677. });
  678. }
  679. // 调用递归函数获取所有节点的 id
  680. getAllNodeIds(allTreeData.value);
  681. });
  682. })
  683. }
  684. function getAllCollect() {
  685. collect.getCollect({}).then(res => {
  686. const maxAge = res.rows.reduce((max, obj) => (obj.orderNum > max ? obj.orderNum : max), res.rows[0].orderNum)
  687. sortNum.value = maxAge
  688. collectList.value = res.rows.map(item => {
  689. return {
  690. label: item.labelName,
  691. labelId: item.labelId,
  692. order: item.orderNum
  693. }
  694. })
  695. })
  696. }
  697. // 获取文件夹,中栏,文件
  698. function getAllTop() {
  699. documents.getTop(3).then(res => {
  700. let userMe = [res]
  701. impDirId.value = userMe[0].dirId//固定
  702. impSpaceId.value = userMe[0].spaceId//固定
  703. newSpaceId.value = userMe[0].spaceId//变化
  704. newDirId.value = userMe[0].dirId//变化
  705. documents.getALLdocument({ parentId: userMe[0].dirId - 0, spaceId: userMe[0].spaceId }).then(res => {
  706. fileMenu.value = res.data
  707. folderList.value = res.data
  708. })
  709. myfile.getById(userMe[0].dirId - 0).then(res => {
  710. if (res.code === 200) {
  711. fileList.value = res.rows
  712. }
  713. })
  714. })
  715. }
  716. function changeFile(row, num) {
  717. copyParentId.value = row.parentId
  718. newDirId.value = row.dirId
  719. newSpaceId.value = row.spaceId
  720. documents.getALLdocument({ parentId: row.dirId - 0, spaceId: row.spaceId - 0 }).then(res => {
  721. folderList.value = res.data
  722. // if (res.code === 200) {
  723. if (res.data.length === 0) {
  724. myfile.getById(newDirId.value)
  725. .then(res => {
  726. if (res.code === 200) {
  727. fileList.value = res.rows;
  728. }
  729. })
  730. .catch(error => {
  731. console.error("myfile.getAllFileMenu 调用失败:", error);
  732. });
  733. } else {
  734. myfile.getById(res.data[0].dirId - 0)
  735. .then(res => {
  736. if (res.code === 200) {
  737. fileList.value = res.rows;
  738. }
  739. })
  740. .catch(error => {
  741. console.error("myfile.getAllFileMenu 调用失败:", error);
  742. });
  743. }
  744. // }
  745. })
  746. this.selectedIndex = num
  747. const newItem = {
  748. name: row.dirName,
  749. choose: row.dirName
  750. };
  751. // 检查 newItem 是否已存在于 menuList 中
  752. const isItemExist = menuList.value.some(item => item.choose === newItem.choose);
  753. // 如果不存在,则添加它
  754. if (!isItemExist) {
  755. menuList.value.push(newItem);
  756. }
  757. useSpace.value = row.usedCap
  758. allSpace.value = row.spaceCap
  759. }
  760. // tableMenu切换
  761. function tableChange(row, num) {
  762. this.selectedIndex = num
  763. }
  764. // x图标事件
  765. function shotdown(row) {
  766. this.menuList = this.menuList.filter(item => item.name !== row.name)
  767. }
  768. // 文件名表格每一行点击事件
  769. function handleRowClick(row) {
  770. copyRow.value = row
  771. clickRowId.value = row.docId
  772. copyDirId.value = row.dirId
  773. copySpaceId.value = row.spaceId
  774. copyFileId.value = row.fileId
  775. copyFileSize.value = row.fileSize
  776. copyFileType.value = row.fileType
  777. nameForm.value.name = row.fileName
  778. if (cliCC.value === true) {
  779. cliCC.value = false
  780. } else {
  781. cliCC.value = true
  782. }
  783. fileShare.getSharePeople(row.docId).then(res => {
  784. console.log(res, 'res');
  785. }).catch(err => {
  786. console.log(err, 'err');
  787. })
  788. }
  789. // 申请扩容
  790. function askApply() {
  791. this.askTo = true
  792. }
  793. function sureAsk() {
  794. this.askTo = false
  795. }
  796. //mouse弹框
  797. async function chooseSet(row, num) {
  798. if (row.name == '在线编辑' || row.name == '协作') {
  799. cliCC.value = true
  800. } else {
  801. cliCC.value = false
  802. }
  803. if (row.name == '分享') {
  804. transferModal.value = true
  805. fileShare.getSharePeople(clickRowId.value).then(res => {
  806. // 去除数组内部的重复元素
  807. const uniqueRes = Array.from(new Set(res.map(item => item.userName))).map(id => res.find(item => item.userName === id));
  808. // 现在的 uniqueRes 数组不包含重复元素
  809. chooseTagData.value = uniqueRes;
  810. })
  811. } else {
  812. transferModal.value = false
  813. }
  814. if (row.name == '协作') {
  815. anyP.value = true
  816. } else {
  817. anyP.value = false
  818. }
  819. if (row.name == '删除') {
  820. myfile.delMenu(clickRowId.value).then(res => {
  821. if (res.code === 200) {
  822. ElMessage({
  823. type: "success",
  824. message: "删除成功"
  825. })
  826. getAllTop()
  827. }
  828. })
  829. }
  830. if (row.name === '复制') {
  831. copyOrMove.value = 0
  832. fileTrees.value = true
  833. }
  834. if (row.name === '移动') {
  835. copyOrMove.value = 1
  836. fileTrees.value = true
  837. }
  838. if (row.name === '重命名') {
  839. fileNameChange.value = true
  840. }
  841. if (row.name === "下载") {
  842. location.href = `${import.meta.env.VITE_APP_BASE_API}/api/download/${copyFileId.value}`;
  843. }
  844. if (row.name === '收藏') {
  845. collectForm.value.name = nameForm.value.name
  846. fileCollect.value = true
  847. }
  848. if (row.name === '在线编辑') {
  849. editOnline.value = false
  850. cliCC.value = false
  851. }
  852. if (row.name === '文字识别') {
  853. router.push({
  854. path: '/identifyFont'
  855. })
  856. }
  857. if (row.name === '预览') {
  858. // console.log('row=', toRaw(row));
  859. // console.log('copyFileId',copyFileId.value);//文件id
  860. // console.log('copyFileType',copyFileType.value);//文件type
  861. showPreview.value = true
  862. const res = await preview(copyFileId.value)
  863. previewData.value = URL.createObjectURL(res)
  864. // console.log('res',res);
  865. }else if(row.name ==="历史版本"){
  866. const resHistory=await listVersion({docId:clickRowId.value})
  867. fileUserTreeData.data = resHistory.rows;
  868. openForwardFile.value=true
  869. }
  870. }
  871. function chooseSet1() {
  872. transferModal.value = true
  873. anyP.value = false
  874. }
  875. function createNewMenu(num) {
  876. impNum.value = num
  877. addBoser.value = true
  878. }
  879. // 新建文件夹
  880. function sureAddBoser() {
  881. if (impNum.value === 1) {
  882. documents.addDocument(
  883. {
  884. "dirName": boserForm.value.dirName,
  885. "parentId": impDirId.value - 0,
  886. "spaceId": impSpaceId.value - 0,
  887. }
  888. ).then(res => {
  889. if (res.code === 200) {
  890. ElMessage({
  891. message: '添加一级目录成功',
  892. type: 'success',
  893. })
  894. }
  895. addBoser.value = false
  896. getAllTop()
  897. })
  898. } else {
  899. documents.addDocument(
  900. {
  901. "dirName": boserForm.value.dirName,
  902. "parentId": newDirId.value - 0,
  903. "spaceId": newSpaceId.value - 0,
  904. }
  905. ).then(res => {
  906. if (res.code === 200) {
  907. ElMessage({
  908. message: '添加成功',
  909. type: 'success',
  910. })
  911. }
  912. addBoser.value = false
  913. getAllTop()
  914. })
  915. }
  916. }
  917. function createNewFile() {
  918. addFile.value = true
  919. }
  920. // 确定新增中栏
  921. function sureAddFile() {
  922. fileSpace.addFileSpace(
  923. {
  924. "spaceName": fileForm.value.spaceName,
  925. "spaceType": fileForm.value.spaceType,
  926. "remark": fileForm.value.remark,//备注
  927. }
  928. ).then(res => {
  929. if (res.code === 200) {
  930. ElMessage({
  931. message: "新增成功",
  932. type: "success"
  933. })
  934. getAllTop()
  935. addFile.value = false
  936. } else {
  937. ElMessage({
  938. message: "请检查错误",
  939. type: "warning"
  940. })
  941. }
  942. })
  943. }
  944. function arrowClick(row, num) {
  945. if (row.name === '文件') {
  946. uploadModal.value = true
  947. } else {
  948. uploadModal.value = false
  949. }
  950. }
  951. // 确认上传
  952. function sureUpload() {
  953. if (fileArr.value.length > 0) {
  954. for (var i = 1; i <= fileArr.value.length; i++) {
  955. myfile.uploadFile({
  956. spaceId: newSpaceId.value - 0,
  957. dirId: newDirId.value - 0,
  958. file: fileArr.value[i - 1]
  959. }).then(res => {
  960. if (res.code === 200) {
  961. ElMessage({
  962. message: "上传文件成功",
  963. type: "success"
  964. })
  965. getAllTop()
  966. uploadModal.value = false
  967. fileArr.value = []
  968. }
  969. })
  970. }
  971. }
  972. }
  973. function onSuccess(files, val) {
  974. fileArr.value.push(files.file)
  975. }
  976. // 筛选后缀图片
  977. function getImage(file) {
  978. if (file === '.txt') {
  979. return ImgFile.txt
  980. } else if (file === '.xlxs' || file === '.docx') {
  981. return ImgFile.xlxs
  982. } else if (file === '.pptx') {
  983. return ImgFile.pptx
  984. } else if (file === '.word') {
  985. return ImgFile.word
  986. } else if (file === '.pdf') {
  987. return ImgFile.pdf
  988. }
  989. }
  990. // 表格多选框
  991. function handleSelectionChange(val) {
  992. if (val.length > 1) {
  993. // 如果选择了多项,只保留最后一项
  994. val.shift();
  995. }
  996. if (val.length === 1) {
  997. fileId.value = val[0].docId
  998. }
  999. }
  1000. // 文件夹
  1001. function handleSelectionChange1(val) {
  1002. if (val.length > 1) {
  1003. // 如果选择了多项,只保留最后一项
  1004. val.shift();
  1005. }
  1006. if (val.length === 1) {
  1007. folderId.value = val[0].dirId
  1008. }
  1009. }
  1010. // 重命名
  1011. function restName(row, index) {
  1012. newName.value = row.dirName
  1013. folderName.value = true
  1014. selectedBox.value = row.dirId
  1015. }
  1016. function getMenu(row, num) {
  1017. if (row.name === '删除') {
  1018. // 文件夹删除
  1019. documents.delDocument(folderId.value).then(res => {
  1020. if (res.code === 200) {
  1021. ElMessage({
  1022. message: "删除成功",
  1023. type: "success"
  1024. })
  1025. getAllTop()
  1026. } else {
  1027. ElMessage({
  1028. message: "删除失败,目录应不为空",
  1029. type: "error"
  1030. })
  1031. }
  1032. })
  1033. myfile.delMenu(fileId.value).then(res => {
  1034. if (res.code === 200) {
  1035. ElMessage({
  1036. message: "删除成功",
  1037. type: "success"
  1038. })
  1039. getAllTop()
  1040. }
  1041. })
  1042. }
  1043. }
  1044. function delName(row, num) {
  1045. fileSpace.delFileSpace(row.spaceId).then(res => {
  1046. if (res.code === 200) {
  1047. getAllMiddle()
  1048. ElMessage({
  1049. message: "删除成功",
  1050. type: "success"
  1051. })
  1052. }
  1053. })
  1054. }
  1055. // 计算百分比
  1056. function percent() {
  1057. let numP = 0
  1058. if (useSpace.value) {
  1059. numP = parseInt(useSpace.value / (allSpace.value * 1024) * 100)
  1060. }
  1061. return numP
  1062. }
  1063. // 文件夹每行点击事件
  1064. function folderClick(row, list) {
  1065. // 上一级dirId就是下一级的parentId
  1066. newDirId.value = row.dirId
  1067. newSpaceId.value = row.spaceId
  1068. documents.getALLdocument({ parentId: row.dirId - 0, spaceId: row.spaceId - 0 }).then(res => {
  1069. folderList.value = res.data
  1070. if (res.data.length === 0) {
  1071. myfile.getById(newDirId.value).then(res => {
  1072. if (res.code === 200) {
  1073. fileList.value = res.rows
  1074. }
  1075. })
  1076. } else {
  1077. myfile.getById(res.data[0].dirId - 0).then(res => {
  1078. if (res.code === 200) {
  1079. fileList.value = res.rows
  1080. }
  1081. })
  1082. }
  1083. })
  1084. }
  1085. // 确认文件重命名
  1086. function sureChangeName() {
  1087. myfile.editNewMenu({
  1088. dirId: copyDirId.value - 0,
  1089. docId: clickRowId.value - 0,
  1090. fileId: copyFileId.value,
  1091. fileName: nameForm.value.name,
  1092. fileSize: copyFileSize.value - 0,
  1093. fileType: copyFileType.value,
  1094. remark: '',
  1095. spaceId: copySpaceId.value - 0,
  1096. }).then(res => {
  1097. if (res.code === 200) {
  1098. ElMessage({
  1099. message: "重命名成功",
  1100. type: "success"
  1101. })
  1102. fileNameChange.value = false
  1103. getAllTop()
  1104. }
  1105. })
  1106. }
  1107. // 分享穿梭框
  1108. function allTreeChange(e) {
  1109. const id = e.id;
  1110. const label = e.label;
  1111. // 查找是否已经存在相同 userId 的数据的索引
  1112. const existingIndex = needTagData.value.findIndex(item => item.userId === id);
  1113. if (existingIndex !== -1) {
  1114. // 如果已存在,删除该项
  1115. needTagData.value.splice(existingIndex, 1);
  1116. } else {
  1117. // 选择操作,将数据添加到 needTagData 中
  1118. needTagData.value.push({ userId: id, userName: label });
  1119. }
  1120. chooseTagData.value = needTagData.value;
  1121. }
  1122. // 确认分享
  1123. function sureShare() {
  1124. fileShare.addSharePeople(clickRowId.value, chooseTagData.value).then(res => {
  1125. if (res.code === 200) {
  1126. ElMessage({
  1127. message: "分享成功",
  1128. type: "success"
  1129. })
  1130. transferModal.value = false
  1131. }
  1132. })
  1133. }
  1134. function handleClose(tag) {
  1135. chooseTagData.value.splice(chooseTagData.value.indexOf(tag), 1)
  1136. console.log(chooseTagData.value, 'move');
  1137. }
  1138. // 确认收藏
  1139. function sureCollect() {
  1140. collect.addCollect({
  1141. "docInfo": {
  1142. "fileId": copyFileId.value - 0,
  1143. "labelId": collectForm.value.folders - 0,
  1144. },
  1145. }).then(res => {
  1146. if (res.code === 200) {
  1147. ElMessage({
  1148. message: "收藏成功",
  1149. type: "success"
  1150. })
  1151. }
  1152. })
  1153. fileCollect.value = false
  1154. }
  1155. function collectChange(e) {
  1156. collectForm.value.folders = e
  1157. }
  1158. // 新建收藏标签
  1159. function createTag() {
  1160. newTag.value = ''
  1161. tagCollect.value = true
  1162. }
  1163. function tagBlur() {
  1164. collect.addNewTag({ labelName: newTag.value, orderNum: sortNum.value + 1 }).then(res => {
  1165. if (res.code === 200) {
  1166. ElMessage({
  1167. message: "新建标签成功",
  1168. type: "success"
  1169. })
  1170. getAllCollect()
  1171. }
  1172. })
  1173. tagCollect.value = false
  1174. }
  1175. // 判断id
  1176. function isId() {
  1177. if (directoryId.value === '') {
  1178. directoryId.value = 0
  1179. getAllTop()
  1180. }
  1181. if (folderId.value === '') {
  1182. folderId.value = 0
  1183. getAllTop()
  1184. }
  1185. }
  1186. // 中栏重命名
  1187. function sureFolderName() {
  1188. documents.editDocument({
  1189. dirId: selectedBox.value - 0,
  1190. name: newName.value,
  1191. }).then(res => {
  1192. if (res.code === 200) {
  1193. getAllTop()
  1194. folderName.value = false
  1195. ElMessage({
  1196. message: '重命名成功',
  1197. type: "success"
  1198. })
  1199. }
  1200. })
  1201. }
  1202. //关闭图片预览事件
  1203. const closeImgPreview = () => {
  1204. // console.log('close');
  1205. showPreview.value = false
  1206. }
  1207. function getChildren(data) {
  1208. fileTrees.value = data
  1209. }
  1210. //历史版本
  1211. // 点击转存
  1212. const forwardTreeData = reactive({ data: {} });
  1213. function forwardChangeMsg(val){
  1214. }
  1215. onMounted(() => {
  1216. getAllTop()
  1217. getAllUser()
  1218. getAllCollect()
  1219. })
  1220. return {
  1221. allBag,
  1222. folderList,//文件夹的数据
  1223. fileList,//文件夹的数据
  1224. searchFire,//搜索文件的model
  1225. changeFile,//切换右侧视图的file
  1226. menuList,//右侧切换
  1227. tableChange,//改变class点击事件
  1228. selectedIndex,//当前选中下标
  1229. shotdown,//筛选出当前数据
  1230. useMenu,
  1231. arrorMenu,
  1232. blueLeft,//返回
  1233. grayRight,//前进
  1234. squre,//视图切换
  1235. sort,//排序
  1236. folder,
  1237. files,
  1238. handleRowClick,
  1239. askApply,//申请扩容
  1240. askTo,
  1241. sureAsk,
  1242. askNum,
  1243. askTalk,
  1244. cliCC,
  1245. mouseCli,//文件点击弹框
  1246. chooseSet,
  1247. transferModal,
  1248. trandata,
  1249. tranvalue,
  1250. anyP,
  1251. chooseSet1,
  1252. fileMenu,
  1253. addBoser,
  1254. boserForm,
  1255. createNewMenu,
  1256. sureAddBoser,
  1257. // delBoser,
  1258. clickRowId,
  1259. addFile,
  1260. createNewFile,
  1261. fileForm,
  1262. sureAddFile,
  1263. // fileUpload,
  1264. getImage,//筛选文件类型
  1265. handleSelectionChange,
  1266. handleSelectionChange1,
  1267. selectedBox,//重命名相关
  1268. restName,//重命名相关
  1269. newName,//重命名相关
  1270. getMenu,
  1271. folderId,
  1272. fileId,
  1273. // getAllMiddle,//拿到所有空间信息
  1274. delName,//删除空间信息
  1275. useSpace,//使用空间
  1276. allSpace,//总空间
  1277. percent,
  1278. arrowClick,
  1279. uploadModal,
  1280. sureUpload,
  1281. onSuccess,
  1282. fileArr,
  1283. directoryId,
  1284. folderClick,
  1285. copyDirId,//复制移动需要的↓
  1286. copyDocId,
  1287. copySpaceId,
  1288. copyFileId,
  1289. copyFileName,
  1290. copyFileSize,
  1291. copyFileType,
  1292. sureChangeName,//文件重命名
  1293. fileNameChange,//文件重命名模态框
  1294. nameForm,
  1295. getAllUser,//获取所有用户
  1296. allTreeProps,//树形控件需要显示键名
  1297. allTreeData,//树形控件数据
  1298. allTreeChange,
  1299. sureShare,
  1300. openTree,
  1301. chooseTagData,
  1302. handleClose,
  1303. collectImg,//收藏小星星
  1304. fileCollect,
  1305. collectForm,
  1306. sureCollect,
  1307. getAllCollect,//获取所有收藏文件夹
  1308. collectList,//文件收藏表
  1309. createTag,
  1310. tagCollect,
  1311. tagBlur,
  1312. newTag,
  1313. collectChange,
  1314. sortNum,
  1315. needBag,
  1316. isId,
  1317. editOnline,//在线编辑
  1318. copyParentId,
  1319. folderName,
  1320. sureFolderName,
  1321. copyRow,
  1322. getAllTop,
  1323. spaceValue,
  1324. spaceSelect,
  1325. newDirId,
  1326. newSpaceId,
  1327. showPreview,//控制图片预览
  1328. closeImgPreview,//关闭预览事件
  1329. previewData,//预览文件数据
  1330. router,
  1331. fileTrees,
  1332. getChildren,//子传父
  1333. copyOrMove,
  1334. impDirId,
  1335. impNum,
  1336. impSpaceId,
  1337. openForwardFile,//历史版本
  1338. forwardTreeData,
  1339. forwardChangeMsg,
  1340. fileUserTreeData
  1341. }
  1342. },
  1343. watch: {
  1344. },
  1345. components: {
  1346. BreadMenu,
  1347. FileEdit,
  1348. ImgPreview,
  1349. FileTree,
  1350. FileTreeChoice
  1351. },
  1352. }
  1353. </script>
  1354. <style scoped>
  1355. p {
  1356. margin: 0;
  1357. padding: 0;
  1358. }
  1359. .bigBox {
  1360. width: 100%;
  1361. height: 100%;
  1362. display: flex;
  1363. justify-content: flex-start;
  1364. overflow: hidden;
  1365. }
  1366. .settingBox {
  1367. width: 20vw;
  1368. /* height: 100%; */
  1369. border: 1px solid black;
  1370. border-radius: 4px;
  1371. /* margin: 5px 5px; */
  1372. margin-right: 5px;
  1373. background-color: white;
  1374. }
  1375. .topSearch {
  1376. width: 100%;
  1377. height: 48px;
  1378. background-color: #EBEFF6;
  1379. display: flex;
  1380. justify-content: space-around;
  1381. align-items: center;
  1382. }
  1383. .searchFire {
  1384. width: 248px;
  1385. height: 32px;
  1386. }
  1387. .setBox {
  1388. width: 88px;
  1389. height: 112px;
  1390. text-align: center;
  1391. margin-left: 12px;
  1392. margin-top: 5px;
  1393. position: relative;
  1394. }
  1395. .setBox:hover {
  1396. background-color: #EEF9FF;
  1397. }
  1398. .setBox:hover .selectChe {
  1399. background-color: #EEF9FF;
  1400. display: block;
  1401. }
  1402. .selectChe {
  1403. display: none;
  1404. width: 20px;
  1405. height: 20px;
  1406. background: rgba(255, 255, 255, 0.7);
  1407. border-radius: 4px 4px 4px 4px;
  1408. position: absolute;
  1409. top: 2px;
  1410. right: 2px;
  1411. line-height: 10px;
  1412. }
  1413. .mesBox {
  1414. width: 72vw;
  1415. /* height: calc(100% - 200px); */
  1416. border-radius: 4px;
  1417. background-color: white;
  1418. }
  1419. .useBox {
  1420. width: 100%;
  1421. height: 96px;
  1422. }
  1423. .tables {
  1424. display: inline-block;
  1425. width: 112px;
  1426. height: 22px;
  1427. border-radius: 4px;
  1428. line-height: 21px;
  1429. text-align: center;
  1430. font-size: 12px;
  1431. margin-left: 5px;
  1432. position: relative;
  1433. white-space: nowrap;
  1434. overflow: hidden;
  1435. text-overflow: ellipsis;
  1436. }
  1437. .tableLis {
  1438. display: inline-block;
  1439. width: 112px;
  1440. height: 22px;
  1441. border-radius: 4px;
  1442. background-color: #EBEFF6;
  1443. line-height: 21px;
  1444. text-align: center;
  1445. font-size: 12px;
  1446. margin-left: 5px;
  1447. position: relative;
  1448. white-space: nowrap;
  1449. overflow: hidden;
  1450. text-overflow: ellipsis;
  1451. max-width: auto;
  1452. }
  1453. .manyUse {
  1454. width: 100%;
  1455. height: 48px;
  1456. /* background-color: gray; */
  1457. line-height: 48px;
  1458. display: flex;
  1459. justify-content: flex-start;
  1460. align-items: center;
  1461. }
  1462. .el-dropdown-link {
  1463. color: white;
  1464. }
  1465. .breadBox {
  1466. width: 100%;
  1467. height: 24px;
  1468. display: flex;
  1469. justify-content: space-between;
  1470. align-items: center;
  1471. background-color: #D9E0F0;
  1472. }
  1473. :deep(.el-collapse-item__header) {
  1474. height: 24px !important;
  1475. background-color: #EBEFF6 !important;
  1476. }
  1477. .detailBox {
  1478. width: 100%;
  1479. height: 270px;
  1480. }
  1481. :deep(.el-dialog__header) {
  1482. background-color: #ECEFF7;
  1483. margin-right: 0px;
  1484. }
  1485. .fileTable {
  1486. position: relative;
  1487. height: 300px;
  1488. /* overflow-y: auto; */
  1489. }
  1490. .setCli {
  1491. width: 156px;
  1492. height: 350px;
  1493. position: absolute;
  1494. top: -70px;
  1495. left: 300px;
  1496. background-color: white;
  1497. border: 1px solid gray;
  1498. border-radius: 4px;
  1499. z-index: 2;
  1500. overflow-y: auto;
  1501. }
  1502. .setCli1 {
  1503. width: 156px;
  1504. height: 350px;
  1505. position: absolute;
  1506. top: 185px;
  1507. left: 155px;
  1508. background-color: white;
  1509. border: 1px solid gray;
  1510. border-radius: 4px;
  1511. z-index: 2;
  1512. overflow-y: auto;
  1513. }
  1514. .chooseSet {
  1515. width: 140px;
  1516. height: 30px;
  1517. line-height: 30px;
  1518. margin: 5px auto;
  1519. }
  1520. .chooseSet:hover {
  1521. width: 140px;
  1522. height: 30px;
  1523. line-height: 30px;
  1524. margin: 5px auto;
  1525. background-color: #F5F7F9;
  1526. /* color: white; */
  1527. }
  1528. :deep([data-v-69cdaa40] .el-collapse-item__header) {
  1529. padding-left: 10px;
  1530. }
  1531. :deep(.el-collapse-item__content) {
  1532. height: 235px;
  1533. overflow-y: auto;
  1534. }
  1535. .ellipsis-text {
  1536. white-space: nowrap;
  1537. overflow: hidden;
  1538. text-overflow: ellipsis;
  1539. max-width: auto;
  1540. }
  1541. .transBox {
  1542. width: 550px;
  1543. height: 400px;
  1544. margin: 0 auto;
  1545. display: flex;
  1546. justify-content: space-around;
  1547. align-items: center;
  1548. /* border: 1px solid black; */
  1549. }
  1550. .allBag {
  1551. width: 255px;
  1552. height: 380px;
  1553. border: 1px solid green;
  1554. }
  1555. .needBag {
  1556. width: 255px;
  1557. height: 380px;
  1558. border: 1px solid green;
  1559. }
  1560. .allLog {
  1561. width: 245px;
  1562. height: 330px;
  1563. margin: 5px auto;
  1564. /* border: 1px solid red; */
  1565. overflow-y: auto;
  1566. }
  1567. .needLog {
  1568. width: 245px;
  1569. height: 330px;
  1570. margin: 5px auto;
  1571. /* border: 1px solid red; */
  1572. overflow-y: auto;
  1573. text-align: center;
  1574. }
  1575. .tagtag {
  1576. display: flex;
  1577. justify-content: space-between;
  1578. align-items: center;
  1579. text-align: start;
  1580. width: 230px;
  1581. margin: 0 auto;
  1582. }
  1583. :deep(.el-tag__content) {
  1584. display: block;
  1585. }
  1586. :deep(.el-icon el-tag__close) {
  1587. display: block;
  1588. }
  1589. </style>