index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  1. <template>
  2. <div class="achievement-report-page">
  3. <custom-header :name="$t('生成成果报告')"></custom-header>
  4. <div class="report-content-wrap" v-loading="loading">
  5. <div class="report-content" ref="reportDom">
  6. <img src="@/assets/img/home/qrcode.png" alt="" class="code-icon" />
  7. <div class="report-header">
  8. <img class="header-book" src="@/assets/img/home/book.png" alt="" />
  9. <div class="time-tag">{{ workItem?.executeDate }}</div>
  10. <div class="report-title">{{ t('成果报告') }}</div>
  11. <div class="report-info">
  12. <div class="info-item">
  13. <img class="info-icon" :src="workItem?.executorIcon || 'https://birdseye-img.sysuimars.com/dinggou-mini/defalut-icon.png'" alt="" />
  14. <span class="info-text">执行组织:{{ workItem?.executeMain }}</span>
  15. </div>
  16. <div class="info-item">
  17. <img class="info-icon" src="@/assets/img/home/farm.png" alt="" />
  18. <span class="info-text">服务农场:{{ workItem?.farmName }}</span>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="report-box">
  23. <div class="report-box-item">
  24. <div class="item-content">{{ workItem?.farmWorkName || "--" }}</div>
  25. <div class="item-title">{{ t('作业农事') }}</div>
  26. </div>
  27. <div class="report-box-item">
  28. <div class="item-content">{{ formatArea(workItem?.area) || "--" }}</div>
  29. <div class="item-title">{{ t('作业面积') }}</div>
  30. </div>
  31. <div class="report-box-item">
  32. <div class="item-content">{{ reportData?.workCycle ? (reportData?.workCycle + '天') : "--" }}</div>
  33. <div class="item-title">{{ t('作业周期') }}</div>
  34. </div>
  35. <div class="report-box-item">
  36. <div class="item-content">{{ reportData?.deviceName || "--" }}</div>
  37. <div class="item-title">{{ t('使用设备') }}</div>
  38. </div>
  39. </div>
  40. <!-- <div class="report-box">
  41. <div class="box-title">{{ t('精准施治,智慧护航') }}</div>
  42. <div class="box-text">
  43. {{ reportData?.resultInfo || "--" }}
  44. </div>
  45. </div> -->
  46. <div class="report-excute" v-for="(item, index) in workItem?.executeEvidence" :key="index">
  47. <div class="tag-label">{{ t('执行照片') }}</div>
  48. <album-draw-box :key="paramsPage.id" :isShowNum="0" :imgData="workItem" :photo="item" :current="index" :index="index" :length="workItem?.executeEvidence?.length"></album-draw-box>
  49. </div>
  50. <div class="report-excute" v-for="(item, index) in workItem?.reviewImage" :key="index">
  51. <div class="tag-label">{{ t('复核照片') }}</div>
  52. <album-draw-box :key="paramsPage.id+'复核'" :isShowNum="0" :isAchievementImgs="true" :imgData="workItem" :photo="item" :current="index" :index="index" :length="workItem?.reviewImage?.length"></album-draw-box>
  53. </div>
  54. <!-- <div class="report-excute" v-for="(item, index) in workItem?.reviewImage" :key="index">
  55. <div class="tag-label">{{ t('复核照片') }}</div>
  56. <album-draw-box :isShowNum="0" :photo="item" :current="index" :index="'review'+index" :length="workItem?.reviewImage?.length"></album-draw-box>
  57. </div> -->
  58. <!-- <div class="report-excute">
  59. <album-carousel
  60. :key="93"
  61. :isAchievementImgs="true"
  62. :images="combinedReviewImages"
  63. ></album-carousel>
  64. </div> -->
  65. </div>
  66. <div class="bottom-btn">
  67. <div class="btn-item second" @click="handleDownload">{{ t('保存图片') }}</div>
  68. <div class="btn-item primay" @click="handleDownload">{{ t('转发') }}</div>
  69. </div>
  70. </div>
  71. <!-- 组合照片(用于生成合成图片) -->
  72. <div class="review-hide-box">
  73. <div class="review-image" ref="reviewComboRef">
  74. <div class="review-mask">
  75. <div class="review-text">{{ t('复核成效') }}</div>
  76. <div class="review-content">
  77. {{ workItem?.reCheckText }}
  78. </div>
  79. </div>
  80. <div class="vs-wrap" v-if="workItem?.reviewImage && workItem?.reviewImage?.length">
  81. <img src="@/assets/img/home/vs.png" alt="" />
  82. </div>
  83. <div class="review-image-item" v-if="workItem?.executeEvidence?.length">
  84. <div class="review-image-item-title">{{ t('复核照片') }}</div>
  85. <img
  86. class="review-image-item-img left-img"
  87. :src="leftCoverImg"
  88. style="width: 100%; height: 255px; display: block; image-rendering: auto"
  89. />
  90. </div>
  91. <div class="review-image-item" v-if="workItem?.reviewImage?.length">
  92. <img
  93. class="review-image-item-img right-img"
  94. :src="rightCoverImg"
  95. style="width: 100%; height: 255px; display: block; image-rendering: auto"
  96. />
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <popup class="cavans-popup" v-model:show="showPopup">
  102. <div class="cavans-content">
  103. <img class="current-img" :src="pageImg" alt="" />
  104. </div>
  105. <!-- 底部操作按钮 -->
  106. <div class="bottom-actions" @click.stop="showPopup = false">
  107. <div class="action-buttons">
  108. <div class="action-btn text-btn">
  109. &lt;&lt;长按图片保存或转发&gt;&gt;
  110. </div>
  111. </div>
  112. <div class="cancel-btn" @click="handleCancel">{{ t('取消') }}</div>
  113. </div>
  114. </popup>
  115. </template>
  116. <script setup>
  117. import { useI18n } from "@/i18n";
  118. const { t } = useI18n();
  119. import CustomHeader from "@/components/customHeader.vue";
  120. import AlbumCarousel from "@/components/album_compoents/albumCarousel";
  121. import { ref, onActivated, onDeactivated, onUnmounted, nextTick, watch } from "vue";
  122. import html2canvas from "html2canvas";
  123. import { uploadBase64 } from "@/common/uploadImg";
  124. import { detectRuntimeEnvironment } from "@/common/commonFun";
  125. import { useRoute } from "vue-router";
  126. import { Popup } from "vant";
  127. import { base_img_url2 } from "@/api/config";
  128. import wx from "weixin-js-sdk";
  129. import AlbumDrawBox from "@/components/album_compoents/albumDrawBox.vue";
  130. const route = useRoute();
  131. const loading = ref(false);
  132. const workItem = ref({});
  133. const showPopup = ref(false);
  134. function formatArea(val) {
  135. const num = typeof val === "number" ? val : parseFloat(val);
  136. if (Number.isNaN(num)) return val;
  137. return Number.isInteger(num) ? num : num.toFixed(2) + "亩";
  138. }
  139. const paramsPage = ref({});
  140. onActivated(() => {
  141. window.scrollTo(0, 0);
  142. paramsPage.value = route.query.miniJson ? JSON.parse(route.query.miniJson) : {};
  143. getDetail();
  144. getResultReport();
  145. });
  146. const reportData = ref({});
  147. const getResultReport = () => {
  148. VE_API.z_farm_work_record.resultReport({ recordId: paramsPage.value.id }).then((res) => {
  149. if (res.code === 0) {
  150. reportData.value = res.data;
  151. }
  152. });
  153. };
  154. const getDetail = () => {
  155. if (!paramsPage.value.id) return;
  156. loading.value = true;
  157. VE_API.z_farm_work_record
  158. .getDetail({ id: paramsPage.value.id })
  159. .then(({ data }) => {
  160. workItem.value = data[0];
  161. })
  162. .finally(() => {
  163. loading.value = false;
  164. });
  165. };
  166. const isDowload = ref(true);
  167. const reportDom = ref(null);
  168. const pageImg = ref(null);
  169. async function handleDownload() {
  170. isDowload.value = false;
  171. setTimeout(async () => {
  172. // 获取要截图的DOM元素
  173. const element = reportDom.value;
  174. try {
  175. const canvas = await html2canvas(element, {
  176. scrollY: -window.scrollY, // 处理滚动条位置
  177. allowTaint: true, // 允许跨域图片
  178. useCORS: true, // 使用CORS
  179. scale: 2, // 提高分辨率(2倍)
  180. height: element.scrollHeight, // 设置完整高度
  181. width: element.scrollWidth, // 设置完整宽度
  182. logging: true, // 开启日志(调试用)
  183. });
  184. // 转换为图片并下载
  185. const image = canvas.toDataURL("image/png");
  186. pageImg.value = image;
  187. nextTick(() => {
  188. showPopup.value = true;
  189. })
  190. } catch (error) {
  191. isDowload.value = true;
  192. }
  193. });
  194. }
  195. const handleCancel = () => {
  196. showPopup.value = false;
  197. };
  198. function downloadImage(dataUrl, filename) {
  199. const link = document.createElement("a");
  200. link.href = dataUrl;
  201. link.download = filename;
  202. document.body.appendChild(link);
  203. link.click();
  204. document.body.removeChild(link);
  205. }
  206. const reviewComboRef = ref(null);
  207. const combinedReviewImages = ref([]);
  208. // 生成组合照片,传给相册组件
  209. const generateCombinedReviewImage = async () => {
  210. try {
  211. await prepareCoverImages();
  212. await nextTick();
  213. const canvas = await html2canvas(reviewComboRef.value, {
  214. backgroundColor: null,
  215. useCORS: true,
  216. allowTaint: true,
  217. scale: window.devicePixelRatio || 2,
  218. });
  219. combinedReviewImages.value = [canvas.toDataURL("image/png")];
  220. } catch (e) {
  221. console.error("生成组合照片失败", e);
  222. }
  223. };
  224. const prepareCoverImages = async () => {
  225. await nextTick();
  226. const itemEl = reviewComboRef.value.querySelector(".review-image-item");
  227. const cssWidth = itemEl.offsetWidth;
  228. const cssHeight = 255;
  229. if (workItem.value?.executeEvidence?.length) {
  230. leftCoverImg.value = await coverImageToBase64HD(
  231. base_img_url2 + workItem.value.executeEvidence.at(-1),
  232. cssWidth,
  233. cssHeight
  234. );
  235. }
  236. if (workItem.value?.reviewImage?.length) {
  237. rightCoverImg.value = await coverImageToBase64HD(
  238. base_img_url2 + workItem.value.reviewImage.at(-1),
  239. cssWidth,
  240. cssHeight
  241. );
  242. }
  243. };
  244. const leftCoverImg = ref("");
  245. const rightCoverImg = ref("");
  246. function coverImageToBase64HD(imgUrl, cssWidth, cssHeight) {
  247. return new Promise((resolve, reject) => {
  248. const dpr = window.devicePixelRatio || 2;
  249. const img = new Image();
  250. img.crossOrigin = "anonymous";
  251. img.src = imgUrl;
  252. img.onload = () => {
  253. // ⚠️ 用“物理像素”创建 canvas
  254. const canvas = document.createElement("canvas");
  255. canvas.width = cssWidth * dpr;
  256. canvas.height = cssHeight * dpr;
  257. const ctx = canvas.getContext("2d");
  258. ctx.scale(dpr, dpr);
  259. const imgRatio = img.width / img.height;
  260. const targetRatio = cssWidth / cssHeight;
  261. let sx = 0,
  262. sy = 0,
  263. sw = img.width,
  264. sh = img.height;
  265. if (imgRatio > targetRatio) {
  266. sw = img.height * targetRatio;
  267. sx = (img.width - sw) / 2;
  268. } else {
  269. sh = img.width / targetRatio;
  270. sy = (img.height - sh) / 2;
  271. }
  272. ctx.drawImage(img, sx, sy, sw, sh, 0, 0, cssWidth, cssHeight);
  273. resolve(canvas.toDataURL("image/png"));
  274. };
  275. img.onerror = reject;
  276. });
  277. }
  278. const userInfoStr = localStorage.getItem("localUserInfo");
  279. const userInfo = userInfoStr ? JSON.parse(userInfoStr) : {};
  280. async function handleForward() {
  281. setTimeout(async () => {
  282. // 获取要截图的DOM元素
  283. const element = reportDom.value;
  284. try {
  285. const canvas = await html2canvas(element, {
  286. scrollY: -window.scrollY, // 处理滚动条位置
  287. allowTaint: true, // 允许跨域图片
  288. useCORS: true, // 使用CORS
  289. scale: 2, // 提高分辨率(2倍)
  290. height: element.scrollHeight, // 设置完整高度
  291. width: element.scrollWidth, // 设置完整宽度
  292. logging: true, // 开启日志(调试用)
  293. });
  294. // 转换为图片并下载
  295. const image = canvas.toDataURL("image/png");
  296. const process = detectRuntimeEnvironment();
  297. // if (process === "wechat-webview") {
  298. const imgUrl = await uploadBase64(image, false);
  299. const params = {
  300. val: 'share',
  301. key: "report",
  302. };
  303. VE_API.mine.saveSessionStore({ ...params, text: imgUrl }).then((res) => {
  304. if (res.success) {
  305. wx.miniProgram.navigateTo({
  306. url: `/pages/subPages/report_page/index`,
  307. });
  308. }
  309. });
  310. // }
  311. isDowload.value = true;
  312. } catch (error) {
  313. isDowload.value = true;
  314. }
  315. });
  316. // const image = await handleDownload(true);
  317. // const imgUrl = await uploadBase64(image, false);
  318. // const params = {
  319. // miniUserId: 766,
  320. // key: "report",
  321. // };
  322. // VE_API.mine.saveSessionStore({ ...params, text: imgUrl }).then((res) => {
  323. // if (res.success) {
  324. // wx.miniProgram.navigateTo({
  325. // url: `/pages/subPages/report_page/index`,
  326. // });
  327. // }
  328. // });
  329. }
  330. watch(
  331. () => [workItem.value.executeEvidence, workItem.value.reviewImage],
  332. ([preImgs, reviewImgs]) => {
  333. if (preImgs && preImgs.length && reviewImgs && reviewImgs.length) {
  334. generateCombinedReviewImage();
  335. }
  336. },
  337. { deep: true }
  338. );
  339. // 清理数据的函数
  340. const clearData = () => {
  341. workItem.value = {};
  342. reportData.value = {};
  343. paramsPage.value = {};
  344. loading.value = false;
  345. isDowload.value = true;
  346. combinedReviewImages.value = [];
  347. leftCoverImg.value = "";
  348. rightCoverImg.value = "";
  349. };
  350. onDeactivated(() => {
  351. clearData();
  352. });
  353. onUnmounted(() => {
  354. clearData();
  355. });
  356. </script>
  357. <style lang="scss" scoped>
  358. .achievement-report-page {
  359. width: 100%;
  360. height: 100vh;
  361. background: linear-gradient(195.35deg, #d4e4ff 16.34%, rgba(93, 189, 255, 0) 50.3%),
  362. linear-gradient(156.64deg, rgba(255, 255, 255, 0.16) 27.7%, rgba(255, 255, 255, 0) 72.82%);
  363. .report-content-wrap {
  364. height: calc(100% - 40px);
  365. padding-bottom: 60px;
  366. overflow: auto;
  367. box-sizing: border-box;
  368. position: relative;
  369. .bottom-btn {
  370. z-index: 2;
  371. position: fixed;
  372. bottom: 0;
  373. left: 0;
  374. width: 100%;
  375. background: #fff;
  376. height: 60px;
  377. display: flex;
  378. align-items: center;
  379. justify-content: space-between;
  380. padding: 0 12px;
  381. box-sizing: border-box;
  382. box-shadow: 2px 2px 4.5px 0px rgba(0, 0, 0, 0.4);
  383. .btn-item {
  384. height: 40px;
  385. line-height: 40px;
  386. padding: 0 24px;
  387. border-radius: 20px;
  388. font-size: 14px;
  389. &.second {
  390. color: #666666;
  391. border: 1px solid rgba(153, 153, 153, 0.5);
  392. }
  393. &.primay {
  394. padding: 0 34px;
  395. background: linear-gradient(180deg, #76c3ff, #2199f8);
  396. color: #fff;
  397. }
  398. }
  399. }
  400. }
  401. .code-icon {
  402. position: absolute;
  403. right: 10px;
  404. top: 12px;
  405. width: 48px;
  406. }
  407. .report-content {
  408. background: url("@/assets/img/home/report_bg.png") no-repeat center center;
  409. background-size: 100% auto;
  410. background-position: top center;
  411. padding: 24px 16px 16px;
  412. box-sizing: border-box;
  413. position: relative;
  414. .report-header {
  415. position: relative;
  416. .header-book {
  417. position: absolute;
  418. right: 0;
  419. bottom: -6px;
  420. height: 88px;
  421. z-index: 10;
  422. }
  423. .time-tag {
  424. background: linear-gradient(137.86deg, #9fd5ff 5.87%, #2199f8 82.98%);
  425. border-radius: 5px 0 5px 0;
  426. height: 23px;
  427. line-height: 23px;
  428. font-size: 13px;
  429. font-weight: 500;
  430. color: #fff;
  431. padding: 0 9px;
  432. width: fit-content;
  433. }
  434. .report-title {
  435. font-family: "PangMenZhengDao";
  436. font-size: 34px;
  437. line-height: 38px;
  438. color: #000000;
  439. }
  440. .report-info {
  441. padding: 10px 0 16px 0;
  442. .info-item {
  443. width: fit-content;
  444. display: flex;
  445. height: 33px;
  446. align-items: center;
  447. padding: 0 6px 0 3px;
  448. background: linear-gradient(90deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.0696) 100%);
  449. border-radius: 20px;
  450. border: 0.5px solid rgba(33, 153, 248, 0.35);
  451. gap: 3px;
  452. .info-icon {
  453. width: 26px;
  454. height: 26px;
  455. object-fit: cover;
  456. border-radius: 50%;
  457. }
  458. .info-text {
  459. font-size: 14px;
  460. color: #2199f8;
  461. }
  462. }
  463. .info-item + .info-item {
  464. margin-top: 5px;
  465. }
  466. }
  467. }
  468. .report-box {
  469. display: flex;
  470. align-items: center;
  471. padding: 8px;
  472. background: linear-gradient(0deg, #ffffff 86.32%, #2199f8 136.87%);
  473. border: 1px solid #ffffff;
  474. border-radius: 8px;
  475. gap: 5px;
  476. position: relative;
  477. .report-box-item {
  478. flex: 1;
  479. background: rgba(33, 153, 248, 0.1);
  480. border-radius: 8px;
  481. min-height: 62px;
  482. box-sizing: border-box;
  483. padding: 2px 4px;
  484. display: flex;
  485. flex-direction: column;
  486. justify-content: center;
  487. .item-content {
  488. color: #2199f8;
  489. font-size: 14px;
  490. text-align: center;
  491. }
  492. .item-title {
  493. color: #000000;
  494. font-size: 10px;
  495. text-align: center;
  496. padding-top: 5px;
  497. }
  498. }
  499. .box-title {
  500. position: absolute;
  501. top: -8px;
  502. left: 0;
  503. height: 32px;
  504. line-height: 26px;
  505. padding: 0 10px;
  506. color: #ffffff;
  507. background: url("@/assets/img/home/title-bg.png") no-repeat center center / 100% 100%;
  508. }
  509. .box-text {
  510. padding: 22px 0 12px 0;
  511. }
  512. }
  513. .report-box + .report-box {
  514. margin-top: 20px;
  515. }
  516. .report-excute {
  517. position: relative;
  518. margin-top: 12px;
  519. .tag-label {
  520. position: absolute;
  521. top: 0;
  522. left: 0;
  523. padding: 4px 10px;
  524. background: rgba(54, 52, 52, 0.8);
  525. color: #fff;
  526. font-size: 12px;
  527. border-radius: 8px 0 8px 0;
  528. z-index: 1;
  529. }
  530. ::v-deep {
  531. .carousel-container .carousel-wrapper .carousel-img {
  532. min-width: calc(100vw - 32px);
  533. width: calc(100vw - 32px);
  534. }
  535. }
  536. }
  537. }
  538. .download-btn {
  539. position: fixed;
  540. bottom: 20px;
  541. left: 50%;
  542. // background: #fff;
  543. // box-shadow: 2px 2px 4.5px 0px #00000066;
  544. // width: 100%;
  545. transform: translateX(-50%);
  546. }
  547. .review-hide-box {
  548. position: absolute;
  549. left: 0;
  550. width: 100%;
  551. height: 100%;
  552. z-index: -1;
  553. bottom: 0;
  554. }
  555. .review-image {
  556. position: relative;
  557. display: flex;
  558. align-items: center;
  559. justify-content: center;
  560. gap: 8px;
  561. margin: 12px;
  562. background: #fff;
  563. border-radius: 8px;
  564. .review-mask {
  565. z-index: 1;
  566. pointer-events: none;
  567. position: absolute;
  568. left: 0;
  569. top: 0;
  570. width: 100%;
  571. height: 100%;
  572. border-radius: 8px;
  573. background: linear-gradient(
  574. 360deg,
  575. rgba(0, 0, 0, 0.78) 0%,
  576. rgba(0, 0, 0, 0.437208) 19.87%,
  577. rgba(0, 0, 0, 0) 33.99%
  578. );
  579. display: flex;
  580. flex-direction: column;
  581. align-items: baseline;
  582. justify-content: end;
  583. padding: 12px;
  584. box-sizing: border-box;
  585. color: #fff;
  586. .review-text {
  587. font-family: "PangMenZhengDao";
  588. font-size: 16px;
  589. margin-bottom: 1px;
  590. }
  591. .review-content {
  592. font-size: 10px;
  593. line-height: 15px;
  594. }
  595. }
  596. .vs-wrap {
  597. position: absolute;
  598. left: 50%;
  599. top: 50%;
  600. transform: translate(-50%, -50%);
  601. width: 40px;
  602. height: 40px;
  603. z-index: 10;
  604. img {
  605. width: 100%;
  606. height: 100%;
  607. object-fit: cover;
  608. }
  609. }
  610. .review-image-item {
  611. position: relative;
  612. flex: 1;
  613. .review-image-item-title {
  614. position: absolute;
  615. top: 0;
  616. left: 0;
  617. background: rgba(54, 52, 52, 0.6);
  618. padding: 4px 10px;
  619. border-radius: 8px 0 8px 0;
  620. backdrop-filter: 4px;
  621. font-size: 12px;
  622. color: #fff;
  623. }
  624. // .review-image-item-img {
  625. // width: 100%;
  626. // height: 250px;
  627. // object-fit: cover;
  628. // }
  629. .review-image-item-img {
  630. width: 100%;
  631. height: 100%;
  632. object-fit: cover;
  633. object-position: center;
  634. }
  635. .left-img {
  636. border-radius: 8px 0 0 8px;
  637. }
  638. .right-img {
  639. border-radius: 0 8px 8px 0;
  640. }
  641. }
  642. }
  643. }
  644. .cavans-popup {
  645. width: 100%;
  646. max-width: 100%;
  647. max-height: 92vh;
  648. background: none;
  649. border-radius: 12px;
  650. overflow: auto;
  651. display: flex;
  652. flex-direction: column;
  653. backdrop-filter: 4px;
  654. .cavans-content {
  655. text-align: center;
  656. padding: 0 12px;
  657. height: fit-content;
  658. overflow: auto;
  659. .current-img {
  660. width: 100%;
  661. }
  662. }
  663. // 底部操作按钮
  664. .bottom-actions {
  665. flex-shrink: 0;
  666. .action-buttons {
  667. padding: 12px 0 4px 0;
  668. display: flex;
  669. justify-content: space-around;
  670. .action-btn {
  671. display: flex;
  672. flex-direction: column;
  673. align-items: center;
  674. cursor: pointer;
  675. &.text-btn {
  676. font-size: 12px;
  677. color: rgba(255, 255, 255, 0.7);
  678. }
  679. .icon-circle {
  680. width: 48px;
  681. height: 48px;
  682. border-radius: 50%;
  683. display: flex;
  684. align-items: center;
  685. justify-content: center;
  686. color: #fff;
  687. margin-bottom: 4px;
  688. .el-icon {
  689. color: #fff;
  690. }
  691. img {
  692. width: 50px;
  693. }
  694. }
  695. &.blue-btn .icon-circle {
  696. background: #2199f8;
  697. }
  698. &.green-btn .icon-circle {
  699. background: #07c160;
  700. }
  701. &.orange-btn .icon-circle {
  702. background: #ff790b;
  703. }
  704. .btn-label {
  705. font-size: 12px;
  706. color: #fff;
  707. }
  708. }
  709. }
  710. .cancel-btn {
  711. text-align: center;
  712. font-size: 18px;
  713. color: #fff;
  714. cursor: pointer;
  715. }
  716. }
  717. }
  718. </style>