cam.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877
  1. <template>
  2. <div
  3. class="scroll-container"
  4. ref="w-list-ref"
  5. @scroll.self="onWorkListScroll"
  6. >
  7. <div class="back-top" @click="onClickBackTop" v-show="isShowBackTopBtn">
  8. <i class="iconfont icon-top"></i>
  9. </div>
  10. <div class="mask" v-show="isShowMask"></div>
  11. <!-- 断网时,输入关键字触发网络请求后,骨架图的隐藏会触发v-infinite-scroll,原因未知。进而导致循环触发,因此list为空时要禁用v-infinite-scroll -->
  12. <ul
  13. class="w-list"
  14. v-if="!(list.length === 0 && !hasMoreData)"
  15. v-infinite-scroll="requestMoreData"
  16. :infinite-scroll-disabled="
  17. !hasMoreData || isRequestingMoreData || list.length === 0
  18. "
  19. >
  20. <!-- <li class="add-work" @click="add">
  21. <div class="wrapper">
  22. <div class="add-con">
  23. <div>
  24. <i class="iconfont icon-works_add"></i>
  25. </div>
  26. <span>{{ create }}</span>
  27. </div>
  28. </div>
  29. </li> -->
  30. <!-- 骨架图 -->
  31. <template v-if="isRequestingMoreData && list.length === 0">
  32. <li v-for="index in 19" :key="index">
  33. <div class="wrapper">
  34. <workCardSkeleton></workCardSkeleton>
  35. </div>
  36. </li>
  37. </template>
  38. <li
  39. v-for="(item, i) in list"
  40. :key="i"
  41. :class="{ 'has-more-data': hasMoreData }"
  42. >
  43. <div class="wrapper" :class="{ disabled: item.calcStatus === 0 }">
  44. <div class="li-hover">
  45. <span class="lipreview" @click="handlePreview(item)">{{
  46. preview
  47. }}</span>
  48. <ul class="oper">
  49. <li class="comfirmhover" @click="edit(item)">
  50. <i class="iconfont icon-works_editor"></i>{{ edittips }}
  51. </li>
  52. <li class="comfirmhover" @click="openShare(item)">
  53. <i class="iconfont icon-works_share"></i>{{ share }}
  54. </li>
  55. <li class="cancelhover" @click="del(item, i)">
  56. <i class="iconfont icon-works_delete"></i>{{ deltips }}
  57. </li>
  58. </ul>
  59. </div>
  60. <div class="img" @click="handlePreview(item)">
  61. <img class="real" :src="item.icon || $thumb" alt="" />
  62. <span class="snCode" v-if="item.snCode">
  63. SN: {{ item.snCode }}</span
  64. >
  65. <div class="calc-mask" v-if="item.calcStatus === 0">
  66. <span>{{ calcing }}</span>
  67. <svg
  68. xmlns="http://www.w3.org/2000/svg"
  69. width="1em"
  70. height="1em"
  71. viewBox="0 0 24 24"
  72. >
  73. <circle cx="4" cy="12" r="3" fill="currentColor">
  74. <animate
  75. id="svgSpinners3DotsFade0"
  76. fill="freeze"
  77. attributeName="opacity"
  78. begin="0;svgSpinners3DotsFade1.end-0.25s"
  79. dur="0.75s"
  80. values="1;0.2"
  81. />
  82. </circle>
  83. <circle cx="12" cy="12" r="3" fill="currentColor" opacity="0.4">
  84. <animate
  85. fill="freeze"
  86. attributeName="opacity"
  87. begin="svgSpinners3DotsFade0.begin+0.15s"
  88. dur="0.75s"
  89. values="1;0.2"
  90. />
  91. </circle>
  92. <circle cx="20" cy="12" r="3" fill="currentColor" opacity="0.3">
  93. <animate
  94. id="svgSpinners3DotsFade1"
  95. fill="freeze"
  96. attributeName="opacity"
  97. begin="svgSpinners3DotsFade0.begin+0.3s"
  98. dur="0.75s"
  99. values="1;0.2"
  100. />
  101. </circle>
  102. </svg>
  103. </div>
  104. </div>
  105. <div class="li-info">
  106. <div>
  107. <span class="shenglve tttttt" :title="item.name || no_title">{{
  108. item.name || no_title
  109. }}</span>
  110. </div>
  111. <div>
  112. <span>{{ item.createTime.split(" ")[0] }}</span>
  113. <div :title="item.visit">
  114. <i class="iconfont icon-works_look"></i
  115. >{{ item.visit > 10000 ? "1w+" : item.visit }}
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </li>
  121. <div
  122. class="work-list-loading-wrapper"
  123. v-show="isRequestingMoreData && list.length !== 0"
  124. >
  125. <img
  126. class="work-list-loading"
  127. :src="require('@/assets/images/icons/work-list-loading.gif')"
  128. />
  129. </div>
  130. </ul>
  131. <div
  132. class="nodata"
  133. v-if="list.length == 0 && !hasMoreData && lastestUsedSearchKey"
  134. >
  135. <img :src="$noresult" alt="" />
  136. <span>{{ no_search_result }}~</span>
  137. </div>
  138. <div
  139. class="nodata"
  140. v-if="list.length == 0 && !hasMoreData && !lastestUsedSearchKey"
  141. >
  142. <img :src="config.empty" alt="" />
  143. <span>{{ no_works }}</span>
  144. <!-- <button @click="add" class="upload-btn-in-table">{{ create }}</button> -->
  145. </div>
  146. <share
  147. :show="showShare"
  148. :item="shareItem"
  149. @close="showShare = false"
  150. ></share>
  151. <preview
  152. v-if="showItem"
  153. :name="showItem.name"
  154. :show="showPreview"
  155. :ifr="`./show.html?id=${showItem.id}&lang=${$lang}`"
  156. :dark="false"
  157. @close="showPreview = false"
  158. />
  159. <div class="dialog" style="z-index: 1000" v-if="isShowMaterialSelector">
  160. <MaterialSelector
  161. :isDarkTheme="false"
  162. :title="select_material"
  163. :selectableType="['pano', '3D']"
  164. :isMultiSelection="true"
  165. initialMaterialType="pano"
  166. @cancel="isShowMaterialSelector = false"
  167. @submit="handleSubmitFromMaterialSelector"
  168. />
  169. </div>
  170. </div>
  171. </template>
  172. <script>
  173. import share from "../popup/share";
  174. import preview from "@/components/preview";
  175. import workCardSkeleton from "@/components/workCardSkeleton.vue";
  176. import config from "@/config";
  177. import { debounce } from "@/utils/other.js";
  178. import MaterialSelector from "@/components/materialSelector.vue";
  179. import { mapGetters } from "vuex";
  180. import { i18n } from "@/lang";
  181. import { $waiting } from "@/components/shared/loading";
  182. import {
  183. addWorks,
  184. getCamWorksList,
  185. delWorks,
  186. getPanoInfo,
  187. saveWorks,
  188. } from "@/api";
  189. export default {
  190. components: {
  191. share,
  192. preview,
  193. workCardSkeleton,
  194. MaterialSelector,
  195. },
  196. computed: {
  197. ...mapGetters(["info"]),
  198. },
  199. props: {
  200. searchKey: String,
  201. },
  202. data() {
  203. return {
  204. myWorks: i18n.t("material.works.my"),
  205. create: i18n.t("material.works.create"),
  206. search: i18n.t("material.works.search"),
  207. preview: i18n.t("material.works.preview"),
  208. edittips: i18n.t("material.works.edit"),
  209. share: i18n.t("material.works.share"),
  210. deltips: i18n.t("material.works.delete"),
  211. no_works: i18n.t("material.works.no_works_cam"),
  212. no_title: i18n.t("gather.no_title"),
  213. no_search_result: i18n.t("gather.no_search_result"),
  214. select_material: i18n.t("gather.select_material"),
  215. calcing: i18n.t("material.works.calcing"),
  216. config,
  217. list: [],
  218. workTotalNum: undefined,
  219. hasMoreData: true,
  220. isRequestingMoreData: false,
  221. lastestUsedSearchKey: "",
  222. isFilterFocus: false,
  223. showShare: false,
  224. showPreview: false,
  225. showItem: "",
  226. shareItem: "",
  227. isBackingTop: false,
  228. isShowBackTopBtn: false,
  229. isShowMask: false,
  230. isShowMaterialSelector: false,
  231. newWorkId: "",
  232. };
  233. },
  234. mounted() {
  235. this.requestMoreData();
  236. },
  237. watch: {
  238. searchKey: {
  239. handler: function (val) {
  240. if (val.length > 0) {
  241. this.selectedList = [];
  242. }
  243. this.refreshListDebounced();
  244. },
  245. immediate: false,
  246. },
  247. workTotalNum: {
  248. handler: function (val) {
  249. if (val) {
  250. this.$emit("updateNum", val);
  251. }
  252. },
  253. immediate: true,
  254. },
  255. },
  256. methods: {
  257. onFilterFocus() {
  258. this.isFilterFocus = true;
  259. },
  260. onFilterBlur() {
  261. this.isFilterFocus = false;
  262. },
  263. refreshListDebounced: debounce(
  264. function () {
  265. this.list = [];
  266. this.isRequestingMoreData = false;
  267. this.hasMoreData = true;
  268. this.requestMoreData();
  269. },
  270. 500,
  271. false
  272. ),
  273. openShare(data) {
  274. console.log(data);
  275. getPanoInfo(data.id, (data) => {
  276. if (data.scenes.length <= 0) {
  277. return this.$msg.warning(this.$i18n.t("material.works.no_link"));
  278. }
  279. this.showShare = true;
  280. this.shareItem = data;
  281. });
  282. },
  283. handlePreview(item) {
  284. getPanoInfo(item.id, (data) => {
  285. if (data.scenes.length <= 0) {
  286. return this.$msg.warning(this.$i18n.t("material.works.no_link"));
  287. }
  288. this.showItem = {
  289. ...item,
  290. ...data,
  291. };
  292. this.showPreview = true;
  293. });
  294. },
  295. add() {
  296. // 新建作品,弹窗让用户给作品选择素材。
  297. $waiting.show();
  298. addWorks({}, (res) => {
  299. $waiting.hide();
  300. this.newWorkId = res.data.id;
  301. this.isShowMaterialSelector = true;
  302. });
  303. },
  304. handleSubmitFromMaterialSelector(selected) {
  305. $waiting.show();
  306. // 拿新作品的初始数据
  307. getPanoInfo(
  308. this.newWorkId,
  309. // 拿到了。
  310. (data) => {
  311. // 往里边添加用户选中的素材。
  312. this.$store.commit("SetInfo", data);
  313. console.log("selected", selected);
  314. for (const [key, item] of Object.entries(selected)) {
  315. if (item.materialType === "pano") {
  316. let newScene = {
  317. icon: item.icon,
  318. sceneCode: item.sceneCode,
  319. sceneTitle: item.name,
  320. category: this.info.catalogs[0].id,
  321. type: "pano",
  322. id: "s_" + this.$randomWord(true, 8, 8),
  323. };
  324. console.log("key", key);
  325. if (Number(key) === 0) {
  326. //新建时开天空mask
  327. newScene = Object.assign(newScene, this.info.scenes[0]);
  328. newScene.customMask.sky.isShow = true;
  329. this.info.scenes[0] = newScene;
  330. } else {
  331. newScene = Object.assign(newScene, {
  332. customMask: this.info.scenes[0].customMask,
  333. initVisual: this.info.scenes[0].initVisual,
  334. });
  335. newScene.customMask.sky.isShow = true;
  336. this.info.scenes.push(newScene);
  337. }
  338. } else if (item.materialType === "3D") {
  339. let newScene = {
  340. icon: item.thumb,
  341. sceneCode: item.num,
  342. sceneTitle: item.sceneName,
  343. category: this.info.catalogs[0].id,
  344. type: "4dkk",
  345. id: "s_" + this.$randomWord(true, 8, 8),
  346. };
  347. if (Number(key) === 0) {
  348. this.info.scenes[0] = null;
  349. this.info.scenes[0] = newScene;
  350. } else {
  351. this.info.scenes.push(newScene);
  352. }
  353. }
  354. }
  355. // 保存新作品
  356. saveWorks(
  357. {
  358. id: this.newWorkId,
  359. password: "",
  360. someData: {
  361. ...this.info,
  362. status: 1,
  363. icon: this.info.scenes[0].icon,
  364. },
  365. },
  366. // 保存成功
  367. () => {
  368. $waiting.hide();
  369. // 隐藏素材选择弹窗
  370. this.isShowMaterialSelector = false;
  371. // 刷新作品列表
  372. this.list = [];
  373. this.isRequestingMoreData = false;
  374. this.hasMoreData = true;
  375. this.requestMoreData()
  376. .then(() => {
  377. // 刷新成功
  378. // 弹出提示窗口
  379. this.$confirm({
  380. title: this.$i18n.t("tips_code.tips"),
  381. content: this.$i18n.t("material.works.had_created"),
  382. okText: this.$i18n.t("material.works.goto_preview"),
  383. ok: () => {
  384. this.handlePreview(this.list[0]);
  385. this.newWorkId = "";
  386. this.$store.commit("SetInfo", {});
  387. },
  388. ok2Text: this.$i18n.t("material.works.continue_edit"),
  389. ok2: () => {
  390. window.open(
  391. `./edit.html?id=${this.newWorkId}&lang=${this.$lang}`
  392. );
  393. this.newWorkId = "";
  394. this.$store.commit("SetInfo", {});
  395. },
  396. });
  397. })
  398. .catch(() => {
  399. this.$msg.message(
  400. this.$i18n.t("material.works.had_created_but_no_link")
  401. );
  402. console.error("已成功新建作品,但刷新作品列表失败。");
  403. });
  404. },
  405. // 保存失败,删除新建的作品。
  406. (error) => {
  407. $waiting.hide();
  408. console.error("保存失败:", error);
  409. delWorks(this.newWorkId);
  410. this.newWorkId = "";
  411. this.$store.commit("SetInfo", {});
  412. }
  413. );
  414. },
  415. // 没拿到,删除新建的作品。
  416. (error) => {
  417. console.error("没拿到新建的作品数据:", error);
  418. delWorks(this.newWorkId);
  419. this.newWorkId = "";
  420. }
  421. );
  422. },
  423. edit(item) {
  424. const from = this.$route.name;
  425. window.open(`./edit.html?id=${item.id}&lang=${this.$lang}&from=cam`);
  426. },
  427. del(item, index) {
  428. this.$confirm({
  429. title: this.$i18n.t("material.works.delete_work"),
  430. content: this.$i18n.t("material.works.comfirm_delete"),
  431. ok: () => {
  432. $waiting.show();
  433. delWorks(item.id, () => {
  434. this.$msg.success(this.$i18n.t("gather.delete_success"));
  435. this.isRequestingMoreData = true;
  436. const lastestUsedSearchKey = this.searchKey;
  437. getCamWorksList(
  438. {
  439. pageNum: this.list.length,
  440. pageSize: 1,
  441. searchKey: this.searchKey,
  442. },
  443. (data) => {
  444. $waiting.hide();
  445. this.list.splice(index, 1);
  446. this.list = this.list.concat(data.data.list);
  447. if (this.list.length === data.data.total) {
  448. this.hasMoreData = false;
  449. }
  450. this.isRequestingMoreData = false;
  451. this.lastestUsedSearchKey = lastestUsedSearchKey;
  452. if (!lastestUsedSearchKey) {
  453. this.workTotalNum = data.data.total;
  454. }
  455. // TODO: 这是干啥呢?
  456. this.$nextTick(() => {
  457. this.$bus.emit("refreshTips");
  458. });
  459. },
  460. () => {
  461. $waiting.hide();
  462. this.lastestUsedSearchKey = lastestUsedSearchKey;
  463. this.isRequestingMoreData = false;
  464. }
  465. );
  466. });
  467. },
  468. });
  469. },
  470. requestMoreData() {
  471. this.isRequestingMoreData = true;
  472. const lastestUsedSearchKey = this.searchKey;
  473. return new Promise((resolve, reject) => {
  474. getCamWorksList(
  475. {
  476. pageNum: Math.floor(this.list.length / config.PAGE_SIZE) + 1,
  477. pageSize: config.PAGE_SIZE,
  478. searchKey: this.searchKey,
  479. },
  480. (data) => {
  481. this.list = this.list.concat(data.data.list);
  482. if (this.list.length === data.data.total) {
  483. this.hasMoreData = false;
  484. }
  485. this.isRequestingMoreData = false;
  486. this.lastestUsedSearchKey = lastestUsedSearchKey;
  487. if (!lastestUsedSearchKey) {
  488. this.workTotalNum = data.data.total;
  489. }
  490. // TODO: 这是干啥呢?
  491. this.$nextTick(() => {
  492. this.$bus.emit("refreshTips");
  493. });
  494. resolve();
  495. },
  496. () => {
  497. this.isRequestingMoreData = false;
  498. this.lastestUsedSearchKey = lastestUsedSearchKey;
  499. reject();
  500. }
  501. );
  502. });
  503. },
  504. onClickBackTop() {
  505. if (this.isBackingTop) {
  506. return;
  507. }
  508. this.isBackingTop = true;
  509. const startTime = Date.now();
  510. const totalScroll = this.$refs["w-list-ref"].scrollTop;
  511. const fn = () => {
  512. if (this.$refs["w-list-ref"].scrollTop === 0) {
  513. this.isBackingTop = false;
  514. return;
  515. }
  516. const nowTime = Date.now();
  517. const assumeScrollTop =
  518. totalScroll - ((nowTime - startTime) * totalScroll) / 500;
  519. this.$refs["w-list-ref"].scrollTop =
  520. assumeScrollTop > 0 ? assumeScrollTop : 0;
  521. requestAnimationFrame(fn);
  522. };
  523. requestAnimationFrame(fn);
  524. },
  525. onWorkListScroll(e) {
  526. if (e.target.scrollTop >= 30) {
  527. !this.isShowMask && (this.isShowMask = true);
  528. } else {
  529. this.isShowMask && (this.isShowMask = false);
  530. }
  531. if (e.target.scrollTop >= 600) {
  532. this.isShowBackTopBtn = true;
  533. } else {
  534. this.isShowBackTopBtn = false;
  535. }
  536. },
  537. },
  538. };
  539. </script>
  540. <style lang="less" scoped>
  541. .scroll-container {
  542. flex: 1 1 auto;
  543. overflow: auto;
  544. margin-left: calc((100vw - 100%) / -2);
  545. padding-left: calc((100vw - 100%) / 2);
  546. margin-right: calc((100vw - 100%) / -2);
  547. padding-right: calc((100vw - 100%) / 2);
  548. &::-webkit-scrollbar {
  549. width: 0;
  550. height: 0;
  551. }
  552. .back-top {
  553. position: absolute;
  554. right: -80px;
  555. bottom: 30px;
  556. width: 60px;
  557. height: 60px;
  558. border-radius: 8px;
  559. background-color: #fff;
  560. z-index: 1;
  561. color: #c8c9cc;
  562. &:hover {
  563. color: #323233;
  564. }
  565. cursor: pointer;
  566. display: flex;
  567. justify-content: center;
  568. align-items: center;
  569. i {
  570. font-size: 20px;
  571. }
  572. }
  573. .mask {
  574. position: absolute;
  575. width: 100%;
  576. top: 180px;
  577. height: 30px;
  578. background: linear-gradient(rgb(239, 242, 244), rgba(255, 255, 255, 0));
  579. z-index: 1;
  580. pointer-events: none;
  581. }
  582. .w-list {
  583. margin-top: 22px;
  584. padding-top: 8px;
  585. width: 100%;
  586. @gap: 20px;
  587. display: flex;
  588. flex-wrap: wrap;
  589. align-content: flex-start;
  590. > li {
  591. width: calc((100% - @gap * 4) / 5);
  592. height: 322px;
  593. margin-bottom: @gap;
  594. margin-right: @gap;
  595. &:nth-of-type(5n) {
  596. margin-right: 0;
  597. }
  598. // 因为有个“创建作品”card占着空间,每次拿20个数据,每行五个,又不想每次拿到数据后最后一行只有一个card,所以把最后那个card隐藏掉。
  599. &:last-of-type.has-more-data {
  600. display: none;
  601. }
  602. .wrapper {
  603. height: 100%;
  604. background: #fff;
  605. position: relative;
  606. border-radius: 6px;
  607. overflow: hidden;
  608. .calc-mask {
  609. display: none;
  610. width: 100%;
  611. height: 100%;
  612. top: 0;
  613. position: absolute;
  614. left: 0;
  615. z-index: 10;
  616. pointer-events: none;
  617. justify-content: center;
  618. align-items: center;
  619. color: #fff;
  620. display: flex;
  621. flex-direction: column;
  622. font-size: 15px;
  623. svg {
  624. width: 28px;
  625. height: 28px;
  626. }
  627. }
  628. &.disabled {
  629. > * {
  630. pointer-events: none;
  631. }
  632. .calc-mask {
  633. background: rgba(0, 0, 0, 0.6);
  634. display: flex;
  635. }
  636. }
  637. .li-hover {
  638. display: none;
  639. width: 100%;
  640. height: 240px;
  641. position: absolute;
  642. top: 0;
  643. left: 0;
  644. z-index: 99;
  645. background: rgba(0, 0, 0, 0.6);
  646. .lipreview {
  647. position: absolute;
  648. top: 50%;
  649. left: 50%;
  650. transform: translate(-50%, -50%);
  651. color: #fff;
  652. display: inline-block;
  653. line-height: 40px;
  654. height: 40px;
  655. width: 100px;
  656. text-align: center;
  657. border-radius: 22px;
  658. cursor: pointer;
  659. background-color: transparent;
  660. border: 1px solid #fff;
  661. &:hover {
  662. border: none;
  663. background: #1983f6;
  664. }
  665. }
  666. .oper {
  667. display: flex;
  668. justify-content: space-around;
  669. align-items: center;
  670. position: absolute;
  671. bottom: 10px;
  672. left: 0;
  673. width: 100%;
  674. > li {
  675. color: #fff;
  676. font-size: 13px;
  677. display: flex;
  678. align-items: center;
  679. cursor: pointer;
  680. > i {
  681. font-size: 20px;
  682. margin-right: 4px;
  683. }
  684. }
  685. }
  686. }
  687. .img {
  688. width: 100%;
  689. height: 240px;
  690. position: relative;
  691. overflow: hidden;
  692. cursor: pointer;
  693. .snCode {
  694. position: absolute;
  695. z-index: 100;
  696. color: #fff;
  697. min-width: 116px;
  698. height: 36px;
  699. background: rgba(0, 0, 0, 0.6);
  700. border-radius: 0px 0px 0px 10px;
  701. top: 0;
  702. right: 0;
  703. font-size: 13px;
  704. text-align: center;
  705. line-height: 36px;
  706. white-space: nowrap;
  707. }
  708. .real {
  709. height: 100%;
  710. position: absolute;
  711. top: 0;
  712. left: 50%;
  713. transform: translateX(-50%);
  714. z-index: 0;
  715. transition: all ease 0.3s;
  716. }
  717. }
  718. .li-info {
  719. font-size: 14px;
  720. padding: 10px;
  721. > div {
  722. text-align: left;
  723. &:first-of-type {
  724. > span {
  725. font-weight: bold;
  726. margin-bottom: 10px;
  727. display: inline-block;
  728. text-overflow: ellipsis;
  729. overflow: hidden;
  730. white-space: nowrap;
  731. cursor: pointer;
  732. color: #323233;
  733. font-size: 16px;
  734. }
  735. }
  736. &:last-of-type {
  737. display: flex;
  738. justify-content: space-between;
  739. align-items: center;
  740. > span {
  741. font-size: 14px;
  742. color: #969799;
  743. }
  744. > div {
  745. color: #969799;
  746. i {
  747. margin-right: 6px;
  748. }
  749. }
  750. }
  751. }
  752. }
  753. }
  754. &:hover {
  755. .wrapper:not(.disabled) {
  756. box-shadow: 0px 2px 12px 0px rgba(50, 50, 51, 0.12);
  757. transform: translateY(-6px);
  758. .li-hover {
  759. display: block;
  760. }
  761. .img {
  762. .real {
  763. height: 108%;
  764. }
  765. }
  766. }
  767. }
  768. }
  769. .add-work {
  770. .wrapper {
  771. .add-con {
  772. position: absolute;
  773. top: 50%;
  774. left: 50%;
  775. transform: translate(-50%, -50%);
  776. text-align: center;
  777. div {
  778. width: 60px;
  779. height: 60px;
  780. border-radius: 50%;
  781. background: linear-gradient(144deg, #00aefb 0%, #0076f6 100%);
  782. position: relative;
  783. cursor: pointer;
  784. margin: 0 auto;
  785. > i {
  786. font-size: 16px;
  787. position: absolute;
  788. top: 50%;
  789. left: 50%;
  790. transform: translate(-50%, -50%);
  791. color: #fff;
  792. }
  793. }
  794. span {
  795. color: #333333;
  796. display: inline-block;
  797. margin-top: 8px;
  798. font-size: 14px;
  799. }
  800. }
  801. }
  802. }
  803. .work-list-loading-wrapper {
  804. width: 100%;
  805. margin-top: 20px;
  806. margin-bottom: 22px;
  807. .work-list-loading {
  808. display: block;
  809. margin: 0 auto;
  810. width: 50px;
  811. height: 8px;
  812. }
  813. }
  814. }
  815. }
  816. </style>
  817. <style lang="less" scoped>
  818. @import "../style.less";
  819. </style>