Browse Source

fix: 进度环,图片,分区颜色

刘秀芳 1 tuần trước cách đây
mục cha
commit
9ccea0a9dd

+ 1 - 1
src/components/common/stepBox.vue

@@ -12,7 +12,7 @@
             <div class="step-time time-b-l" v-if="card.updateDate4">
                 {{ formatDate(card.updateDate4) }}
             </div> -->
-        <img class="step-img" :src="require(`@/assets/img/gallery/step-${orderStatus}.png`)" />
+        <img class="step-img" :src="require(`@/assets/img/gallery/step-${orderStatus >=0 ? orderStatus : 0}.png`)" />
     </div>
 </template>
 

+ 4 - 5
src/views/home/album/album_compoents/albumDrawBox.vue

@@ -113,14 +113,13 @@ const drawBottom = (imgWidth, imgHeight, weather) => {
   ctx.textAlign = "left"; // 设置为左对齐
   let imgRect = { x: 0, y: 0, width: imgWidth, height: imgHeight}
   // 绘制头部黑色半透明遮罩
-  let topRect = drawRectInRect(ctx,imgRect, 0, 0, 80, 15,"rgba(0, 0, 0, 0.6)")
+  let topRect = drawRectInRect(ctx,imgRect, 0, 0, 40, 15,"rgba(0, 0, 0, 0.6)")
   // 绘制黑色半透明遮罩
   let bottomRect = drawRectInRect(ctx,imgRect, 0, 5/6 * 100, 100, 1/6 * 100,"rgba(0, 0, 0, 0.6)")
 
-  drawHorizontalTextList(ctx, topRect, '#ffffff',[data.treeCode, "蓬径:5m", "高度:3m", "高产树",data.pingzhong],
-      40/1.5, 0,
-      65/1.5 , 0,"|",0,
-      30/1.5,"#ffffff",1,2)
+  // drawHorizontalTextList(ctx, topRect, '#ffffff',[data.treeCode, "蓬径:5m", "高度:3m", "高产树",data.pingzhong],
+  drawHorizontalTextList(ctx, topRect, '#ffffff',[data.treeCode],
+      40/1.5, 0,)
   if(props.temp){
     drawHorizontalTextList(ctx, topRect, '#ffffff',["高温控梢", props.temp, "新梢萌动5级"],
         40/1.5, -18,

+ 1 - 0
src/views/home/album_compoents/albumCarousel.vue

@@ -231,6 +231,7 @@ function toggleAcitve(name) {
 function closeDialog() {
     activeOuput.value = null
     eventBus.emit("change:watermark", "")
+    eventBus.emit("resetImgIndex")
 }
 
 // 质量详情

+ 8 - 0
src/views/home/album_compoents/albumCarouselItem.vue

@@ -62,9 +62,12 @@ const currentIndex = ref(0);
 onMounted(() => {
   updateImagePosition();
   clearAndRestartTimer();
+  eventBus.on("resetImgIndex", resetImgIndex)
+  eventBus.on("resetImgIndex", resetImgIndex)
 });
 onUnmounted(() => {
   clearInterval(timer);
+  eventBus.off("resetImgIndex", resetImgIndex)
 });
 
 const updateImagePosition = () => {
@@ -122,6 +125,11 @@ const clearAndRestartTimer = () => {
   // timer = setInterval(next, 5000);
 };
 
+function resetImgIndex() {
+  setTimeout(() => {
+    currentIndex.value = 0
+  }, 500)
+}
 
 </script>
 

+ 3 - 2
src/views/home/album_compoents/albumDrawBox.vue

@@ -135,11 +135,12 @@ const drawBottom = (imgWidth, imgHeight, weather) => {
   ctx.textAlign = "left"; // 设置为左对齐
   let imgRect = { x: 0, y: 0, width: imgWidth, height: imgHeight}
   // 绘制头部黑色半透明遮罩
-  let topRect = drawRectInRect(ctx,imgRect, 0, 0, 70, 10,"rgba(0, 0, 0, 0.6)")
+  let topRect = drawRectInRect(ctx,imgRect, 0, 0, 30, 10,"rgba(0, 0, 0, 0.6)")
   // 绘制黑色半透明遮罩
   let bottomRect = drawRectInRect(ctx,imgRect, 0, 5/6 * 100, 100, 1/6 * 100,"rgba(0, 0, 0, 0.6)")
 
-  drawHorizontalTextList(ctx, topRect, '#ffffff90',[data.treeCode, "蓬径:5m", "高度:3m", "高产树",data.pingzhong],
+  // drawHorizontalTextList(ctx, topRect, '#ffffff90',[data.treeCode, "蓬径:5m", "高度:3m", "高产树",data.pingzhong],
+  drawHorizontalTextList(ctx, topRect, '#ffffff90',[data.treeCode],
       40, 0,
       65 , 0,"|",0,
       30,"#ffffff50",1,2)

+ 2 - 1
src/views/home/map/blueRegionLayer.js

@@ -26,7 +26,8 @@ class BlueRegionLayer {
             for (let item of arr) {
                 let feature = newAreaFeature(item);
                 let strokeColor = "#FFFFFF";
-                feature.setStyle(this.vectorStyle.getPolygonStyle("transparent", item.color, 2));
+                // feature.setStyle(this.vectorStyle.getPolygonStyle("transparent", item.color, 2));
+                feature.setStyle(this.vectorStyle.getPolygonStyle("transparent", "rgba(255, 255, 255, 0.6)", 2));
                 // feature.setStyle(this.vectorStyle.getPolygonStyle(item.color+opacity, strokeColor, 1));
                 this.blueRegionLayer.addFeature(feature);
             }