Explorar el Código

fix: 还原度修改 适配

zhaojijng hace 2 años
padre
commit
2eec370e52

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 22 - 22
dist/sgdaping/assets/background.40d84767.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
dist/sgdaping/assets/background.63543e5b.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 1
dist/sgdaping/assets/background.f27284c2.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
dist/sgdaping/assets/index.0a9b579f.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
dist/sgdaping/assets/index.791231a3.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 1
dist/sgdaping/assets/index.81411fa7.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 14 - 14
dist/sgdaping/assets/index.bda9aa30.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
dist/sgdaping/assets/index.aed949d3.css


+ 1 - 1
dist/sgdaping/assets/index.ef89d74e.js

@@ -1 +1 @@
-import{h as e,r as n,o,k as t,_ as s,c as r,f as a}from"./index.bda9aa30.js";const c=e({setup(){return t(),n({}),o(()=>{}),{}}});function u(p,_,f,i,d,l){return a(),r("h2",null,"login\u9875\u9762")}const x=s(c,[["render",u]]);export{x as default};
+import{h as e,r as n,o,k as t,_ as s,c as r,f as a}from"./index.9c728adc.js";const c=e({setup(){return t(),n({}),o(()=>{}),{}}});function u(p,_,f,i,d,l){return a(),r("h2",null,"login\u9875\u9762")}const x=s(c,[["render",u]]);export{x as default};

+ 1 - 1
dist/sgdaping/index.html

@@ -5,7 +5,7 @@
     <link rel="icon" type="image/svg+xml" href="/sgdaping/vite.svg" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>daping</title>
-    <script type="module" crossorigin src="/sgdaping/assets/index.bda9aa30.js"></script>
+    <script type="module" crossorigin src="/sgdaping/assets/index.9c728adc.js"></script>
     <link rel="stylesheet" href="/sgdaping/assets/index.4f0b5577.css">
   </head>
   <body>

+ 4 - 3
src/components/HorFloorSpace.vue

@@ -601,7 +601,7 @@ export default defineComponent({
             border-radius: 10px;
             text-align: center;
             .other {
-                height: 62%;
+                height: 60%;
                 padding: 14px 0;
                 box-sizing: border-box;
                 font-size: 0;
@@ -615,7 +615,7 @@ export default defineComponent({
                 color: #f7ecdb;
                 font-size: 24px;
                 //font-size: 1.3vw;
-                height: 18%;
+                height: 20%;
                 font-weight: 600;
             }
             .ltextCont {
@@ -626,6 +626,7 @@ export default defineComponent({
                 .value {
                     font-weight: 700;
                     font-size: 20px;
+                    font-family: PersagyBold;
                 }
                 .name {
                     font-weight: 400;
@@ -681,7 +682,7 @@ export default defineComponent({
         display: flex;
         justify-content: center;
         align-items: center;
-        font-family: Persagy;
+        font-family: PersagyBold;
         font-size: 36px;
         font-weight: bold;
         line-height: 43px;

+ 8 - 5
src/components/LastAllEnergy.vue

@@ -11,7 +11,7 @@
         </div>
         <div class="energySave">
             <div class="textDiv">
-                <span>中海能耗</span><span class="value">{{ lastAllComputed.energySaving }}kWh</span>
+                <span>项目能耗</span><span class="value">{{ lastAllComputed.energySaving }}kWh</span>
             </div>
             <div
                 class="saveBack"
@@ -68,7 +68,7 @@ export default defineComponent({
                     ? lastAllEnergy.energyTotal.toFixed(1)
                     : lastAllEnergy.energyTotal,
                 energyCompare: lastAllEnergy.energyCompare
-                    ? (lastAllEnergy.energyCompare * 100).toFixed(1)
+                    ? (lastAllEnergy.energyCompare * 100).toFixed(0)
                     : lastAllEnergy.energyCompare,
             };
             return lastObj;
@@ -110,8 +110,9 @@ export default defineComponent({
 <style scoped lang="scss">
 .lastMonth {
     height: 100%;
-    background: rgba(100, 108, 130, 0.06);
     backdrop-filter: blur(20px);
+    background: rgba(100, 108, 130, 0.06);
+
     border-radius: 20px;
     .saveEnergy {
         color: #f7e6cd;
@@ -128,9 +129,11 @@ export default defineComponent({
             background-position: center bottom;
             background-size: 100%;
             padding-bottom: 5px;
-            .value{
+            text-shadow: 0px 0px 8px rgba(255, 255, 255, 0.4);
+            .value {
                 font-weight: 700;
-                 font-size: 48px;
+                font-size: 48px;
+                margin-left: 2px;
             }
         }
     }

+ 1 - 1
src/components/LastMonthData.vue

@@ -160,7 +160,7 @@ export default defineComponent({
             width: 62px;
             height: 62px;
             margin-right: 20px;
-            background: rgba(100, 108, 130, 0.3);
+            background: rgba(100, 108, 130, 0.06);
             backdrop-filter: blur(10px);
             border-radius: 12px;
             font-size:0;

+ 52 - 19
src/components/LastSaveEnergy.vue

@@ -40,8 +40,6 @@
                     <canvas
                         id="co2Canvas"
                         class="co2Canvas"
-                        width="800"
-                        height="300"
                     ></canvas>
                     <canvas
                         id="circleCanvas1"
@@ -60,7 +58,7 @@
                             src="@/assets/image/horImg/saveCo2.png"
                         />
                         <div class="co2Wrap sco2">
-                            减排<span class="value">{{ lastAllEnergyRes.cdmCo2 }}Kg</span>CO2
+                            减排<span class="value">{{ lastAllEnergyRes.cdmCo2 }}Kg</span>CO
                         </div>
                     </div>
 
@@ -125,7 +123,7 @@ import {
 import { queryLastEnergy } from "@/api/index";
 import useProjectStore from "@/store/useProjectStore";
 import { storeToRefs, mapState } from "pinia";
-
+import { getBodySize } from "@/utils/rem";
 //import { lastGold, lastGray } from "@/utils/dapingImage";
 
 export default defineComponent({
@@ -170,6 +168,11 @@ export default defineComponent({
             circtx.fill();
             // circtx.restore();
         }
+        function handleFont(num) {
+            let fontSize = getBodySize();
+            let handleNum = (num / 192) * fontSize;
+            return handleNum;
+        }
         onMounted(() => {
             nextTick(() => {
                 //videoWrap  :style="{ width: videoWidth + 'px', left: videoLeft + 'px' }"
@@ -187,30 +190,43 @@ export default defineComponent({
                 // );
 
                 var c = document.getElementById("co2Canvas");
+                c.setAttribute("width", handleFont(800) + "px");
+                c.setAttribute("height", handleFont(300) + "px");
+
                 var ctx = c.getContext("2d");
-                ctx.moveTo(20, 120);
-                ctx.lineTo(110, 120);
-                ctx.lineTo(173, 173);
+
+                console.log(
+                    "sdsd",
+                    handleFont(676),
+                    handleFont(50),
+                    handleFont(590),
+                    handleFont(150),
+                    handleFont(515),
+                    handleFont(150)
+                );
+                ctx.moveTo(handleFont(20), handleFont(120));
+                ctx.lineTo(handleFont(110), handleFont(120));
+                ctx.lineTo(handleFont(173), handleFont(173));
                 ctx.lineWidth = 1;
                 ctx.strokeStyle = "rgba(247, 230, 205, 0.4)";
-                ctx.setLineDash([2, 3]);
+                ctx.setLineDash([handleFont(2), handleFont(3)]);
                 ctx.stroke();
                 ctx.beginPath();
-                ctx.moveTo(676, 50);
-                ctx.lineTo(590, 150);
-                ctx.lineTo(515, 150);
+                ctx.moveTo(handleFont(676), handleFont(50));
+                ctx.lineTo(handleFont(590), handleFont(150));
+                ctx.lineTo(handleFont(515), handleFont(150));
                 ctx.lineWidth = 1;
                 ctx.strokeStyle = "rgba(247, 230, 205, 0.4)";
-                ctx.setLineDash([2, 3]);
+                ctx.setLineDash([handleFont(2), handleFont(3)]);
                 ctx.stroke();
 
                 ctx.beginPath();
-                ctx.moveTo(756, 250);
-                ctx.lineTo(670, 210);
-                ctx.lineTo(512, 210);
+                ctx.moveTo(handleFont(756), handleFont(250));
+                ctx.lineTo(handleFont(670), handleFont(210));
+                ctx.lineTo(handleFont(512), handleFont(210));
                 ctx.lineWidth = 1;
                 ctx.strokeStyle = "rgba(247, 230, 205, 0.4)";
-                ctx.setLineDash([2, 3]);
+                ctx.setLineDash([handleFont(2), handleFont(3)]);
                 ctx.stroke();
 
                 var circ = document.getElementById("circleCanvas1");
@@ -236,7 +252,7 @@ export default defineComponent({
                     ? lastAllEnergy.cdmC.toFixed(2)
                     : lastAllEnergy.cdmC,
                 energySaving: lastAllEnergy.energySaving
-                    ? lastAllEnergy.energySaving.toFixed(2)
+                    ? lastAllEnergy.energySaving.toFixed(0)
                     : lastAllEnergy.energySaving,
             };
         });
@@ -345,12 +361,14 @@ export default defineComponent({
         }
         .outOval {
             width: 152px;
-            height: 58px;
+            height: 68px;
             border: 1px dashed rgba(224, 194, 155, 0.26);
             border-radius: 50%;
             position: absolute;
             display: flex;
             transform: translate(-50%, -50%);
+            animation: mycircle 3s linear infinite alternate;
+            -webkit-animation: mycircle 3s linear infinite alternate;
             .inOval {
                 width: 112px;
                 height: 40px;
@@ -391,6 +409,19 @@ export default defineComponent({
                 transform: translate(-50%, 0);
             }
         }
+
+        @keyframes mycircle {
+            from {
+                width: 152px;
+                height: 68px;
+                opacity: 1;
+            }
+            to {
+                width: 200px;
+                height: 98px;
+                opacity: 0.3;
+            }
+        }
         .outOvalCo2 {
             left: -400px;
             top: -30px;
@@ -418,6 +449,8 @@ export default defineComponent({
             position: absolute;
             left: 0;
             top: 0;
+            // width: 800px;
+            // height: 300px;
             //  border: 1px solid red;
             transform: translate(-50%, -50%);
         }
@@ -430,8 +463,8 @@ export default defineComponent({
     }
 }
 .horSaveClass {
-    background: rgba(100, 108, 130, 0.06);
     backdrop-filter: blur(20px);
+    background: rgba(100, 108, 130, 0.06);
     border-radius: 20px;
     overflow: hidden;
 

+ 4 - 1
src/components/NowData.vue

@@ -22,7 +22,7 @@
                     }"
                 >
                     <div class="content_value">
-                        <span>{{ item.value }}</span><span class="unit">{{ item.unit }}</span>
+                        <span class="value">{{ item.value }}</span><span class="unit">{{ item.unit }}</span>
                     </div>
                     <div class="content_name">
                         <span>{{ item.name }}</span>
@@ -166,6 +166,9 @@ export default defineComponent({
                 text-fill-color: transparent;
                 text-shadow: 0px 0px 8px rgba(255, 255, 255, 0.4);
                 line-height: 64px;
+                .value{
+                    font-family: PersagyBold;
+                }
                 .unit {
                     font-size: 32px;
                     margin-left: 8px;

+ 9 - 2
src/components/TemChart.vue

@@ -123,12 +123,19 @@ export default defineComponent({
             });
             chart.scale("temp", {
                 type: "linear",
-                //minTickInterval: 2,
+                minTickInterval: 1,
                 min: 22,
-                max: 26,
+                //max: 25,
                 //ticks:[22,23,24,25,26,27]
             });
             chart.axis("time", {
+                line: {
+                    style: {
+                        lineWidth: 1, // 设置线的宽度
+                        stroke: "rgba(224,194,155,0.2)", // 设置线的颜色
+                        lineDash: [3, 3], // 设置虚线样式
+                    },
+                },
                 label: {
                     style: {
                         fill: "#E0C29B",

+ 5 - 1
src/components/airSwitchHor.vue

@@ -79,7 +79,10 @@ export default defineComponent({
                 .color("type", ["l(90) 0:#BFA17E 1:#E0D1BB", "#3C3F52"])
                 .style({
                     opacity: 1,
+                    strokeOpacity: 0,
+                    //lineWidth:5,
                     lineCap: "round",
+                    //stroke: "#3C3F52",
                 });
             var textHtml = `<div class="airText"><span class="value">${
                 data[0].value
@@ -97,7 +100,6 @@ export default defineComponent({
                 // alignX: "center",
                 // alignY: "center",
                 offsetY: -43,
-                offsetX: -36,
             });
             chart.annotation().text({
                 position: ["50%", "50%"],
@@ -171,6 +173,7 @@ export default defineComponent({
 </script>
 <style scoped lang="scss">
 .airSwitch ::v-deep .airText {
+    width: 100%;
     background: linear-gradient(180deg, #fff5df 0%, #ead0b1 100%);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
@@ -179,6 +182,7 @@ export default defineComponent({
     text-shadow: 0px 0px 8px rgba(255, 255, 255, 0.4);
     font-size: 42px;
     font-weight: 700;
+    transform: translateX(-50%);
     .value {
     }
     .unit {

+ 6 - 6
src/components/lastEnergyChart.vue

@@ -119,17 +119,17 @@ export default defineComponent({
                             clearInterval(intervalInt);
                             contx.emit("donethreepage");
                         }
-                    }, 1200);
+                    }, 800);
                 }
             },
             cInitChart(cdata) {
                 if (props.screenType == "hor") {
                     var end =
                         cdata[cdata.length - 1] && cdata[cdata.length - 1].Date;
-                    var barWidth=8;
+                    var barWidth = 8;
                 } else {
                     var end = cdata[11] && cdata[11].Date;
-                     var barWidth=12;
+                    var barWidth = 12;
                 }
                 // 指定初始化状态量
                 let ds = new DataSet({
@@ -217,7 +217,7 @@ export default defineComponent({
                         },
                     },
                     tickline: null,
-                    label: null,//坐标轴刻度
+                    label: null, //坐标轴刻度
                 });
 
                 chart.legend(false);
@@ -254,8 +254,8 @@ export default defineComponent({
 <style scoped lang="scss">
 .lastChart {
     height: 100%;
-    background: rgba(149, 162, 194, 0.1);
-    backdrop-filter: blur(40px);
+    background: rgba(100, 108, 130, 0.06);
+    backdrop-filter: blur(20px);
     border-radius: 20px;
     .head-title {
         justify-content: space-between;

+ 9 - 5
src/utils/rem.ts

@@ -4,7 +4,7 @@ import { ref, computed, onMounted } from "vue";
 // 基准大小
 const baseSize = 192;
 // 设置 rem 函数
-function setRem() {
+function getBodySize() {
     // 当前页面宽度相对于 750 宽的缩放比例,可根据自己需要修改。
 
     // 设置页面根节点字体大小
@@ -18,9 +18,13 @@ function setRem() {
         baseWidth = 1280;
     }
     const scale = document.documentElement.clientWidth / baseWidth;
-    document.documentElement.style.fontSize = `${
-        baseSize * Math.min(scale, 1)
-    }px`;
+    let fontSize = baseSize * Math.min(scale, 1);
+    return fontSize;
+}
+function setRem() {
+    debugger;
+    let fontSize = getBodySize();
+    document.documentElement.style.fontSize = `${fontSize}px`;
 }
 // 初始化
 setRem();
@@ -28,4 +32,4 @@ setRem();
 window.onresize = () => {
     setRem();
 };
-export {};
+export { getBodySize };

+ 5 - 7
src/views/horiScreen/index.vue

@@ -161,7 +161,7 @@ export default {
             top: 0%;
             left: 0;
             width: 120%;
-            height: 126%;
+            height: 120%;
             // height: 1420PX;//不想自动转换成rem的px 只需要将px大写 PX就可以了
             z-index: -4;
             animation: mymove 40s linear infinite alternate;
@@ -176,8 +176,6 @@ export default {
             }
         }
         img {
-            // width: 100%;
-            // height: 100%;
         }
     }
     .hor-head {
@@ -203,16 +201,16 @@ export default {
             .bottom-left {
                 width: 36%;
                 height: 100%;
-                background: rgba(149, 162, 194, 0.2);
-                backdrop-filter: blur(18px);
+                background: rgba(100, 108, 130, 0.06);
+                backdrop-filter: blur(20px);
                 border-top-left-radius: 20px;
                 border-bottom-left-radius: 20px;
             }
             .bottom-right {
                 width: 64%;
                 height: 100%;
-                background: rgba(149, 162, 194, 0.2);
-                backdrop-filter: blur(18px);
+                background: rgba(100, 108, 130, 0.06);
+                backdrop-filter: blur(20px);
                 border-top-right-radius: 20px;
                 border-bottom-right-radius: 20px;
             }