library.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. <template>
  2. <div class="l_box">
  3. <div class="l_type_box" v-loading="isLoading">
  4. <div class="header">
  5. <span class="title">我的资源库</span>
  6. <span class="add" @click="addClick" ref="divToHide3">添加分类</span>
  7. </div>
  8. <div class="nav">
  9. <div class="nav_b">
  10. <div class="nav_box" :class="{ active1: pid == 'wu' }" @click="checkType('wu')"><span
  11. class="icon no"></span><span class="name">未分类</span>
  12. </div>
  13. </div>
  14. <div class="nav_b" v-for="(item, index) in typeArray" :key="index">
  15. <div class="nav_box" :class="{ open: item.open, active2: pid.split('-')[0] == index }"
  16. @click="checkType(index + '')"><span class="icon" :class="{ haveL: item.child.length }"
  17. @click.stop="typeOpen(index)"></span>
  18. <input class="renameInput" v-model="renameInput" v-if="renameType == (index + '')" ref="renameInput"
  19. @change="rename" @keyup.enter="rename">
  20. <el-tooltip :content="item.name" placement="top" effect="dark" v-else>
  21. <span class="name">{{ item.name }}</span>
  22. </el-tooltip>
  23. <span ref="divToHide5" class="icon more" @click.stop="showActions($event, index + '')"></span>
  24. </div>
  25. <div class="nav_child_box" v-if="item.open && item.child.length">
  26. <div class="nav_box" :class="{ active: pid == index + '-' + index2 }" v-for="(item2, index2) in item.child"
  27. :key="index + '-' + index2" @click="checkType(index + '-' + index2)">
  28. <span class="icon"></span>
  29. <input class="renameInput" v-model="renameInput" v-if="renameType == (index + '-' + index2)"
  30. ref="renameInput" @change="rename" @keyup.enter="rename">
  31. <el-tooltip :content="item2.name" placement="top" effect="dark" v-else>
  32. <span class="name">{{ item2.name }}</span>
  33. </el-tooltip>
  34. <span ref="divToHide5" class="icon more" @click.stop="showActions($event, index + '-' + index2)"></span>
  35. </div>
  36. </div>
  37. <div class="add_box" v-if="addVisbile2 === index" ref="divToHide2">
  38. <input type="text" v-model="addInput" @change="addType" @keyup.enter="addType">
  39. </div>
  40. </div>
  41. <div class="add_box" v-if="addVisbile" ref="divToHide">
  42. <input type="text" v-model="addInput" @change="addType" @keyup.enter="addType">
  43. </div>
  44. </div>
  45. <div v-if="showActionDiv" ref="actionDiv" :style="actionDivStyle" class="action-div">
  46. <div @click="actionDelete">删除</div>
  47. <div @click="actionRename">重命名</div>
  48. <div @click="actionAdd" v-if="actionType.split('-').length == 1" ref="addTypeAction">添加分类</div>
  49. <div class="move" v-if="pidArray.length">
  50. <span>移动</span>
  51. <div class="pid_box">
  52. <div v-for="(item, index) in pidArray" :key="index" @click="actionMove(item)">
  53. <!-- <el-tooltip :content="item.name" placement="right" effect="dark"> -->
  54. <span>{{ item.name }}</span>
  55. <!-- </el-tooltip> -->
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="l_file_box">
  62. <div class="l_none" v-if="pid != 'wu' && pid.split('-').length == 1">请添加二级分类</div>
  63. <fileBox :userid="userid" :typeArray="typeArray" :pid="pid" :type='type' @addFile="addFile" ref="fileBox" v-else>
  64. </fileBox>
  65. </div>
  66. </div>
  67. </template>
  68. <script>
  69. import fileBox from './library/fileBox.vue';
  70. export default {
  71. components: {
  72. fileBox,
  73. },
  74. props: {
  75. type: {
  76. type: String,
  77. default: '1'
  78. },
  79. },
  80. data() {
  81. return {
  82. userid: this.$route.query.userid,
  83. pid: 'wu',
  84. addInput: '',
  85. addVisbile: false,
  86. addVisbile2: '',
  87. isLoading: false,
  88. typeArray: [],
  89. showActionDiv: false,
  90. actionDivStyle: {
  91. top: '0px',
  92. left: '0px'
  93. },
  94. actionType: '',
  95. renameType: '',
  96. renameInput: '',
  97. pidArray: [],
  98. }
  99. },
  100. methods: {
  101. getData() {
  102. this.isLoading = true;
  103. let params = {
  104. uid: this.userid,
  105. };
  106. this.ajax
  107. .get(this.$store.state.api + "getSourceFileType", params)
  108. .then((res) => {
  109. this.isLoading = false;
  110. let pid = res.data[0];
  111. let child = res.data[1];
  112. for (var i = 0; i < pid.length; i++) {
  113. let pidChild = []
  114. pid[i].open = (this.typeArray.length && this.typeArray[i]) ? this.typeArray[i].open : false
  115. for (var j = 0; j < child.length; j++) {
  116. if (pid[i].id == child[j].pid) {
  117. pidChild.push(child[j])
  118. }
  119. }
  120. pid[i].child = pidChild
  121. }
  122. this.typeArray = pid
  123. this.$forceUpdate()
  124. let _pid = this.pid.split('-')
  125. if (_pid.length === 1 && this.pid != 'wu') {
  126. if (pid[_pid[0]]) {
  127. pid[_pid[0]].open = true
  128. this.pid = this.pid + '-0'
  129. } else {
  130. this.pid = 'wu'
  131. };
  132. this.checkType(this.pid);
  133. } else if (_pid.length > 1) {
  134. if (this.typeArray[_pid[0]].child.length > 0 && (parseInt(_pid[1]) + 1) > this.typeArray[_pid[0]].child.length) {
  135. this.pid = _pid[0] + '-0';
  136. this.checkType(this.pid);
  137. } else if ((parseInt(_pid[1]) + 1) > this.typeArray[_pid[0]].child.length) {
  138. this.checkType(_pid[0]);
  139. }
  140. }
  141. this.$refs['fileBox'].getData()
  142. console.log(this.$refs['fileBox']);
  143. })
  144. .catch((err) => {
  145. this.isLoading = false;
  146. console.error(err);
  147. });
  148. },
  149. addClick() {
  150. // if (this.pid == 'wu') {
  151. this.addVisbile = true;
  152. this.addInput = '一级分类标签'
  153. setTimeout(() => {
  154. this.$refs.divToHide.children[0].select()
  155. }, 500);
  156. // } else {
  157. // let check = this.pid.split('-')
  158. // this.addVisbile2 = parseInt(check[0]);
  159. // this.addInput = '二级分类标签'
  160. // setTimeout(() => {
  161. // this.$refs.divToHide2[0].children[0].select()
  162. // }, 500);
  163. // }
  164. },
  165. addType() {
  166. let pid = ''
  167. if (!this.addInput) {
  168. this.$message.error('请输入分类名字');
  169. return
  170. }
  171. if (this.addVisbile) {
  172. pid = '0'
  173. } else if (this.addVisbile2 === 0 || this.addVisbile2) {
  174. let check = this.pid.split('-')
  175. pid = this.typeArray[check[0]].id
  176. }
  177. let params = [{
  178. pid: pid,
  179. name: this.addInput,
  180. uid: this.userid
  181. }];
  182. this.ajax
  183. .post(this.$store.state.api + "addSourceFileType", params)
  184. .then((res) => {
  185. this.$message.success('添加成功');
  186. this.addVisbile = false
  187. this.addVisbile2 = ''
  188. this.getData()
  189. })
  190. .catch((err) => {
  191. console.error(err);
  192. });
  193. },
  194. typeOpen(index) {
  195. if (this.typeArray[index].child.length > 0) {
  196. this.typeArray[index].open = !this.typeArray[index].open
  197. }
  198. },
  199. checkType(pid) {
  200. if (this.pid == pid) {
  201. return
  202. }
  203. let _pid = pid.split('-')
  204. if (_pid.length === 1 && pid != 'wu') {
  205. if (this.typeArray[_pid[0]].child.length > 0) {
  206. this.pid = pid + '-0';
  207. this.typeArray[_pid[0]].open = true;
  208. } else {
  209. this.pid = pid;
  210. }
  211. } else {
  212. this.pid = pid;
  213. }
  214. },
  215. handleClickOutside(event) {
  216. const target = event.target;
  217. const divToHide = this.$refs.divToHide; // 获取需要隐藏的 div 的引用
  218. const divToHide2 = this.$refs.divToHide2; // 获取需要隐藏的 div 的引用
  219. const addTypeAction = this.$refs.addTypeAction
  220. const divToHide3 = this.$refs.divToHide3; // 获取需要隐藏的 div 的引用
  221. const divToHide4 = this.$refs.actionDiv; // 获取需要隐藏的 div 的引用
  222. const divToHide5 = this.$refs.divToHide5; // 获取需要隐藏的 div 的引用
  223. const renameInput = this.$refs.renameInput; // 获取需要隐藏的 div 的引用
  224. console.log('1')
  225. if (divToHide && !divToHide.contains(target) && divToHide3 && !divToHide3.contains(target)) {
  226. // 点击的不是需要隐藏的 div,则隐藏它
  227. this.addVisbile = false
  228. }
  229. // if (divToHide2 && divToHide2[0] && !divToHide2[0].contains(target) && divToHide3 && !divToHide3.contains(target)) {
  230. // // 点击的不是需要隐藏的 div,则隐藏它
  231. // this.addVisbile2 = ''
  232. // }
  233. if (divToHide2 && divToHide2[0] && !divToHide2[0].contains(target) && addTypeAction && !addTypeAction.contains(target)) {
  234. // 点击的不是需要隐藏的 div,则隐藏它
  235. this.addVisbile2 = ''
  236. }
  237. if (divToHide4 && !divToHide4.contains(target) && divToHide5 && !divToHide5[0].contains(target)) {
  238. // 点击的不是需要隐藏的 div,则隐藏它
  239. this.showActionDiv = false;
  240. }
  241. if (renameInput && renameInput[0] && !renameInput[0].contains(target) && (!divToHide4 || (divToHide4 && !divToHide4.contains(target)))) {
  242. // 点击的不是需要隐藏的 div,则隐藏它
  243. this.renameType = ''
  244. }
  245. },
  246. showActions(event, type) {
  247. this.showActionDiv = true;
  248. const buttonRect = event.target.getBoundingClientRect();
  249. this.actionDivStyle.top = `${buttonRect.bottom - 30}px`;
  250. this.actionDivStyle.left = `${buttonRect.left + 25}px`;
  251. this.pidArray = []
  252. let _type = type.split('-')
  253. if (_type.length > 1) {
  254. let pid = this.typeArray[_type[0]].child[_type[1]].pid
  255. this.typeArray.forEach(item => {
  256. item.id != pid && this.pidArray.push(item)
  257. })
  258. }
  259. this.actionType = type;
  260. this.$forceUpdate();
  261. },
  262. actionMove(pid) {
  263. let type = this.actionType.split('-')
  264. let id = this.typeArray[type[0]].child[type[1]].id
  265. this
  266. .$confirm('确定移动到' + pid.name + '吗?并且此分类的底下的文件也会跟随!', "提示", {
  267. confirmButtonText: "确定",
  268. cancelButtonText: "取消",
  269. type: "warning",
  270. })
  271. .then(() => {
  272. let params = [{
  273. id: id,
  274. pid: pid.id
  275. }];
  276. this.ajax
  277. .post(this.$store.state.api + "updateSourceFileTypePid", params)
  278. .then((res) => {
  279. this.$message.success('移动成功');
  280. this.showActionDiv = false
  281. this.getData()
  282. })
  283. .catch((err) => {
  284. console.error(err);
  285. });
  286. })
  287. .catch(() => {
  288. });
  289. },
  290. actionRename() {
  291. let type = this.actionType.split('-')
  292. if (type.length == 1) {
  293. this.renameInput = this.typeArray[type[0]].name
  294. } else {
  295. this.renameInput = this.typeArray[type[0]].child[type[1]].name
  296. }
  297. this.renameType = this.actionType
  298. if (this.pid != this.renameType) {
  299. this.checkType(this.renameType)
  300. }
  301. console.log(this.renameType);
  302. setTimeout(() => {
  303. this.$refs.renameInput[0].select();
  304. this.showActionDiv = false
  305. }, 500);
  306. },
  307. actionAdd() {
  308. let type = this.actionType.split('-')
  309. if (type.length > 1) {
  310. return
  311. }
  312. let check = type
  313. this.checkType(this.actionType)
  314. this.addVisbile2 = parseInt(check[0]);
  315. this.addInput = '二级分类标签'
  316. this.showActionDiv = false
  317. setTimeout(() => {
  318. this.$refs.divToHide2[0].children[0].select()
  319. }, 500);
  320. },
  321. rename() {
  322. if (!this.renameInput) {
  323. this.$message.error('请输入分类名字');
  324. return
  325. }
  326. let type = this.renameType.split('-')
  327. let id = ''
  328. if (type.length == 1) {
  329. id = this.typeArray[type[0]].id
  330. } else {
  331. id = this.typeArray[type[0]].child[type[1]].id
  332. }
  333. let params = [{
  334. id: id,
  335. name: this.renameInput
  336. }];
  337. this.ajax
  338. .post(this.$store.state.api + "updateSourceFileName", params)
  339. .then((res) => {
  340. this.$message.success('修改成功');
  341. this.renameType = ''
  342. this.getData()
  343. })
  344. .catch((err) => {
  345. console.error(err);
  346. });
  347. },
  348. actionDelete() {
  349. let type = this.actionType.split('-')
  350. let id = ''
  351. let msg = ''
  352. if (type.length == 1) {
  353. if (this.typeArray[type[0]].child.length) {
  354. msg = '删除此分类后,该分类下的所有子分类将全部删除,确定删除此分类吗?'
  355. } else {
  356. msg = '确定删除此分类吗?'
  357. }
  358. id = this.typeArray[type[0]].id
  359. } else {
  360. msg = '确定删除此分类吗?'
  361. id = this.typeArray[type[0]].child[type[1]].id
  362. }
  363. this
  364. .$confirm(msg, "提示", {
  365. confirmButtonText: "确定",
  366. cancelButtonText: "取消",
  367. type: "warning",
  368. })
  369. .then(() => {
  370. let params = [{
  371. id: id,
  372. }];
  373. this.ajax
  374. .post(this.$store.state.api + "deleteSoureFileType", params)
  375. .then((res) => {
  376. this.$message.success('删除成功');
  377. this.showActionDiv = false
  378. this.getData()
  379. })
  380. .catch((err) => {
  381. console.error(err);
  382. });
  383. })
  384. .catch(() => {
  385. });
  386. },
  387. addFile(file) {
  388. this.$emit('addFile', file)
  389. }
  390. },
  391. beforeDestroy() {
  392. document.removeEventListener('click', this.handleClickOutside);
  393. },
  394. mounted() {
  395. document.addEventListener('click', this.handleClickOutside);
  396. this.getData();
  397. },
  398. }
  399. </script>
  400. <style scoped>
  401. .l_box {
  402. width: 100%;
  403. height: 100%;
  404. background: #f0f2f5;
  405. box-sizing: border-box;
  406. display: flex;
  407. padding: 20px;
  408. }
  409. .l_type_box {
  410. width: 300px;
  411. height: 100%;
  412. background: #fff;
  413. border-radius: 5px;
  414. }
  415. .l_type_box>.header {
  416. width: 100%;
  417. padding: 15px 15px;
  418. box-sizing: border-box;
  419. border-bottom: 1px solid #E7E7E7;
  420. display: flex;
  421. justify-content: space-between;
  422. align-items: center;
  423. }
  424. .l_type_box>.header>.title {
  425. font-size: 24px;
  426. font-weight: bold;
  427. }
  428. .l_type_box>.header>.add {
  429. display: flex;
  430. cursor: pointer;
  431. align-items: center;
  432. height: 30px;
  433. padding: 0 8px;
  434. background: rgb(0, 97, 255);
  435. color: #fff;
  436. box-sizing: border-box;
  437. border-radius: 4px;
  438. font-size: 14px;
  439. align-items: center;
  440. }
  441. .l_type_box>.header>.add::before {
  442. content: '';
  443. display: block;
  444. width: 14px;
  445. height: 14px;
  446. margin-right: 7px;
  447. background-image: url('../../assets/icon/sourceFile/icon_add.png');
  448. background-size: 100% 100%;
  449. }
  450. .l_type_box>.nav {
  451. width: 100%;
  452. height: calc(100% - 62px);
  453. box-sizing: border-box;
  454. padding: 15px;
  455. overflow: auto;
  456. }
  457. .l_type_box>.nav>.nav_b {
  458. margin-top: 10px;
  459. }
  460. .l_type_box>.nav>.nav_b>.nav_box {
  461. height: 44px;
  462. width: 100%;
  463. display: flex;
  464. align-items: center;
  465. border-radius: 5px;
  466. padding: 0 10px;
  467. box-sizing: border-box;
  468. cursor: pointer;
  469. }
  470. .l_type_box>.nav>.nav_b>.nav_box>.name {
  471. font-size: 16px;
  472. color: #000000e6;
  473. white-space: nowrap;
  474. overflow: hidden;
  475. text-overflow: ellipsis;
  476. }
  477. .l_type_box .active2 {
  478. background: #fff;
  479. }
  480. .l_type_box .active2 .name {
  481. color: #3681FC !important;
  482. }
  483. .l_type_box .active {
  484. background: #3681fc;
  485. }
  486. .l_type_box .active1 {
  487. background: #3681fc !important;
  488. }
  489. .l_type_box .active .name,
  490. .l_type_box .active1 .name {
  491. color: #fff !important;
  492. }
  493. .l_type_box>.nav>.nav_b>.nav_box:hover {
  494. background: #e0eafb;
  495. }
  496. .l_type_box>.nav>.nav_b>.nav_box:hover .more {
  497. display: block;
  498. }
  499. .l_type_box>.nav>.nav_b>.nav_box>.icon {
  500. min-width: 16px;
  501. height: 16px;
  502. background-size: 100% 100%;
  503. margin-right: 10px;
  504. /* background: #000; */
  505. transition: all 0.3s;
  506. }
  507. .l_type_box>.nav>.nav_b>.nav_box>.no {
  508. background-image: url('../../assets/icon/sourceFile/icon_no.png');
  509. }
  510. .l_type_box>.nav>.nav_b>.nav_box.active1>.no {
  511. background-image: url('../../assets/icon/sourceFile/icon_no_active.png');
  512. }
  513. .l_type_box>.nav>.nav_b>.nav_box>.more {
  514. cursor: pointer;
  515. margin: 0 0 0 auto;
  516. display: none;
  517. background-image: url('../../assets/icon/sourceFile/icon_select.png');
  518. }
  519. .l_type_box>.nav>.nav_b>.nav_box>.haveL {
  520. transform: rotate(-90deg);
  521. background-image: url('../../assets/icon/sourceFile/icon_arrow.png');
  522. }
  523. .l_type_box>.nav>.nav_b>.nav_box.active2>.haveL {
  524. transform: rotate(-90deg);
  525. background-image: url('../../assets/icon/sourceFile/icon_arrow_active.png');
  526. }
  527. .l_type_box>.nav>.nav_b>.nav_box.open>.haveL {
  528. transform: rotate(0deg);
  529. }
  530. .l_type_box>.nav>.nav_b>.nav_child_box {
  531. margin-top: 10px;
  532. }
  533. .l_type_box>.nav>.nav_b>.nav_child_box>.nav_box+.nav_box {
  534. margin-top: 10px;
  535. }
  536. .l_type_box>.nav>.nav_b>.nav_child_box>.nav_box {
  537. height: 44px;
  538. width: 100%;
  539. display: flex;
  540. align-items: center;
  541. border-radius: 5px;
  542. padding: 0 10px;
  543. box-sizing: border-box;
  544. cursor: pointer;
  545. }
  546. .l_type_box>.nav>.nav_b>.nav_child_box>.nav_box>.name {
  547. font-size: 16px;
  548. color: #000000e6;
  549. white-space: nowrap;
  550. overflow: hidden;
  551. text-overflow: ellipsis;
  552. }
  553. .l_type_box>.nav>.nav_b>.nav_child_box>.nav_box:hover {
  554. background: #e0eafb;
  555. }
  556. .l_type_box>.nav>.nav_b>.nav_child_box>.nav_box.active:hover {
  557. background: #5E9AFC;
  558. }
  559. .l_type_box>.nav>.nav_b>.nav_child_box>.nav_box:hover .more {
  560. display: block;
  561. }
  562. .l_type_box>.nav>.nav_b>.nav_child_box>.nav_box>.icon {
  563. min-width: 16px;
  564. height: 16px;
  565. background-size: 100% 100%;
  566. margin-right: 10px;
  567. transition: all 0.3s;
  568. }
  569. .l_type_box>.nav>.nav_b>.nav_child_box>.nav_box>.more {
  570. margin: 0 0 0 auto;
  571. display: none;
  572. background-image: url('../../assets/icon/sourceFile/icon_select.png');
  573. }
  574. .l_type_box>.nav>.nav_b>.nav_child_box>.nav_box.active>.more {
  575. background-image: url('../../assets/icon/sourceFile/icon_select_active.png');
  576. }
  577. .add_box {
  578. height: 44px;
  579. width: 100%;
  580. display: flex;
  581. align-items: center;
  582. border-radius: 5px;
  583. padding: 0 3px 0 10px;
  584. box-sizing: border-box;
  585. cursor: pointer;
  586. background: #E1EDFD;
  587. margin-top: 10px;
  588. }
  589. .add_box>input {
  590. width: calc(100% - 16px);
  591. height: calc(100% - 6px);
  592. box-sizing: border-box;
  593. border: none;
  594. margin-left: 16px;
  595. border-radius: 5px;
  596. padding: 0 12px;
  597. font-size: 16px;
  598. outline: none;
  599. }
  600. .renameInput {
  601. width: calc(100% - 16px);
  602. height: calc(100% - 6px);
  603. box-sizing: border-box;
  604. border: none;
  605. border-radius: 5px;
  606. padding: 0 12px;
  607. font-size: 16px;
  608. outline: none;
  609. }
  610. .action-div {
  611. position: absolute;
  612. background: #ffffff;
  613. display: flex;
  614. flex-direction: column;
  615. border-radius: 5px;
  616. /* overflow: hidden; */
  617. padding: 5px 0;
  618. box-shadow: 0 0 2px 0px #00000021;
  619. z-index: 99;
  620. }
  621. .action-div>div {
  622. width: 115px;
  623. height: 40px;
  624. line-height: 40px;
  625. cursor: pointer;
  626. padding: 0 10px;
  627. box-sizing: border-box;
  628. font-size: 14px;
  629. position: relative;
  630. z-index: 999;
  631. }
  632. .action-div>div:hover {
  633. background: #e0eafb;
  634. }
  635. .action-div>.move::after {
  636. content: '';
  637. position: absolute;
  638. display: block;
  639. width: 14px;
  640. height: 14px;
  641. right: 10px;
  642. top: 50%;
  643. transform: translateY(-50%) rotate(-90deg);
  644. background-image: url('../../assets/icon/sourceFile/icon_arrow.png');
  645. }
  646. .action-div>.move:hover .pid_box {
  647. display: flex;
  648. }
  649. .pid_box {
  650. position: absolute;
  651. right: 0;
  652. transform: translateX(100%);
  653. background: #ffffff;
  654. flex-direction: column;
  655. border-radius: 5px;
  656. /* overflow: hidden; */
  657. padding: 5px 0;
  658. box-shadow: 0 0 2px 0px #00000021;
  659. top: 0;
  660. display: none;
  661. }
  662. .pid_box>div {
  663. height: 40px;
  664. line-height: 40px;
  665. cursor: pointer;
  666. padding: 0 10px;
  667. box-sizing: border-box;
  668. font-size: 14px;
  669. overflow: hidden;
  670. text-overflow: ellipsis;
  671. white-space: nowrap;
  672. }
  673. .pid_box>div:hover {
  674. background: #e0eafb;
  675. }
  676. .l_file_box {
  677. width: calc(100% - 320px);
  678. margin-left: 20px;
  679. background: #fff;
  680. height: 100%;
  681. border-radius: 5px;
  682. overflow: hidden;
  683. }
  684. .l_none {
  685. color: #00000069;
  686. width: 100%;
  687. height: 100%;
  688. display: flex;
  689. align-items: center;
  690. justify-content: center;
  691. }
  692. </style>