Browse Source

Merge branch 'develop' of http://39.106.8.246:3003/web/persagy_topo_editer into develop

YaolongHan 4 years ago
parent
commit
d4b62305cb

+ 3 - 3
package.json

@@ -16,11 +16,11 @@
   },
   "dependencies": {
     "@persagy-web/base": "2.2.1",
-    "@persagy-web/big": "2.2.54",
+    "@persagy-web/big": "2.2.55",
     "@persagy-web/draw": "2.2.14",
     "@persagy-web/graph": "2.2.46",
-    "@persagy-web/big-edit": "2.2.27",
-    "@persagy-web/edit": "2.2.25",
+    "@persagy-web/big-edit": "2.2.30",
+    "@persagy-web/edit": "2.2.27",
     "@types/uuid": "^8.0.0",
     "ant-design-vue": "^1.6.5",
     "axios": "^0.20.0",

+ 2 - 0
src/components/editClass/persagy-edit/PTopoScene.ts

@@ -393,6 +393,8 @@ export class PTopoScene extends SBaseEditScene {
             List.forEach((item: SGraphEdit) => {
                 item.defaultUrl = changestyle
             })
+        } else if (styletype == "rotate") { // 弯头设置旋转角度
+            styleValue = changestyle;
         } else {
             styleValue = changestyle
         }

+ 1 - 1
src/components/editClass/persagy-edit/item/SPersagyImageEdit.ts

@@ -26,8 +26,8 @@
 
 import { SBaseImageEdit } from '@persagy-web/edit';
 import { SGraphItem } from "@persagy-web/graph";
-import { Marker } from "@persagy-web/big-edit/lib/types/Marker";
 import { SMouseEvent } from "@persagy-web/base/lib";
+import { Marker } from '@persagy-web/big/lib';
 
 /**
  * 编辑基础图片类

+ 1 - 2
src/components/editClass/persagy-edit/items/SBasePipeUninTool.ts

@@ -26,9 +26,8 @@
 
 import { SBaseImageEdit } from "@persagy-web/edit";
 import { SGraphItem } from "@persagy-web/graph/lib";
-import { Marker } from "@persagy-web/edit/lib/type/Marker";
 import { SMouseEvent } from "@persagy-web/base/lib";
-import { svgTobase64 } from "@persagy-web/big-edit/lib/until"
+import { Marker } from "@persagy-web/big/lib";
 
 
 /**

+ 30 - 1
src/components/editview/rightPropertyBar/BaseImagePro.vue

@@ -108,6 +108,19 @@
           <span>颜色</span>
         </div>
       </li>
+      <li v-show="isSvg">
+        <div class="small-title">旋转角度</div>
+        <div>
+          <span>度</span>
+          <el-input
+            style="width: 74px; margin-left: 6px"
+            size="mini"
+            v-model="rotate"
+            @input="changeRotate"
+            placeholder="请输入内容"
+          ></el-input>
+        </div>
+      </li>
     </ul>
   </div>
 </template>
@@ -121,7 +134,7 @@ const imgBaseUrl = window.__systemConf.imgServeUri;
 const imgServeUpload = window.__systemConf.imgServeUpload;
 import { uploadGroup, getImageGroup } from "@/api/editer";
 export default {
-  props: ["strokeColor", "lineStyle", "lineWidth", "Width", "Height", "isSvg"],
+  props: ["strokeColor", "lineStyle", "lineWidth", "Width", "Height", "isSvg", "Rotate"],
   data() {
     return {
       width: 0,
@@ -145,6 +158,7 @@ export default {
       linestyle: "solid",
       url: "",
       filterColor: "",
+      rotate: 0, // 对象旋转角度
     };
   },
   methods: {
@@ -165,6 +179,18 @@ export default {
     changeColor(val) {
       bus.$emit("updateStyle", "strokeColor", val);
     },
+    // 改变旋转角度
+    changeRotate(val) {
+      if (val.length > 0 && !isNaN(Number(val))) {
+        if (val > 360) {
+          val = 360;
+        } 
+        if (val < -360) {
+          val = -360;
+        }
+        bus.$emit("updateStyle", "rotate", Number(val));
+      }
+    },
     beforeAvatarUpload(file) {
       let that = this;
       const fileReader = new FileReader();
@@ -269,6 +295,9 @@ export default {
     Url(val) {
       this.url = val;
     },
+    Rotate(val) {
+      this.rotate = val;
+    }
   },
 };
 </script>

+ 3 - 0
src/components/editview/rightPropertyBar/property.vue

@@ -59,6 +59,7 @@
       :Width="Width"
       :Height="Height"
       :isSvg="isSvg"
+      :Rotate="Rotate"
       v-show="itemType == 'BaseImage' || itemType == 'BasePipeUninTool'"
     ></BaseImagePro>
     <BaseEquipment
@@ -141,6 +142,7 @@ export default {
       Width: 0, //item 宽
       Height: 0, //item 高
       Url: "", // 路径
+      Rotate: 0, // 旋转角度
       fillColor: "", //填充色
       begin: "", //开头样式
       end: "", //结尾样式
@@ -215,6 +217,7 @@ export default {
         this.lineStyle = lineStyle[item.lineStyle];
         this.lineWidth = item.lineWidth;
         this.strokeColor = item.strokeColor.toRgba();
+        this.Rotate = item.rotate;
         if (
           item.data.style.default.url &&
           item.data.style.default.url.includes(".svg")