MyFile.vue 55 KB

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