liyangzheng 1 anno fa
parent
commit
863592eaea

+ 1 - 1
src/pages/components/HeadMenu.vue

@@ -107,7 +107,7 @@ export default {
         }
         // 退出登录
         function logOut(){
-            if(windowEx.Size != undefined){
+            if(typeof windowEx != "undefined"){
                 windowEx.Size(384,426)
             }
             localStorage.removeItem("loginStatus")

File diff suppressed because it is too large
+ 50 - 2
src/pages/components/draw/DrawDesigns.vue


+ 52 - 5
src/pages/system/components/InsideModule.vue

@@ -13,12 +13,12 @@
                                 <span class="sv" @click="svClick">SV</span>
                                 <span class="goose" @click="gooseClick">GOOSE</span>
                             </div>
-                            <div style="display: flex;width: calc(50%);">
+                            <div style="display: flex;width: calc(30%);">
                                 <span style="font-size: 20px;color: #7484AB;margin-left: 20px;">操作:</span>
                                 <div class="cutPoint">
-                                    <img style="width: 22px;height: 22px;display: block;"
+                                    <!-- <img style="width: 22px;height: 22px;display: block;"
                                         src="../../../assets/icon/iorn_pen.png" alt="">
-                                    <span style="display: block;">控点</span>
+                                    <span style="display: block;">控点</span> -->
                                 </div>
                                 <div class="deletePoint" @click="delClick">
                                     <img style="width: 22px;height: 22px;display: block;"
@@ -26,6 +26,16 @@
                                     <span style="display: block;">删除</span>
                                 </div>
                             </div>
+                            <div style="display: flex;width: 20%;">
+                                <div>
+                                    <span>X:</span>
+                                    <el-input class="coord" v-model="fatX" @input="limitNumX" @change="xChange"></el-input>
+                                </div>
+                                <div>
+                                    <span>Y:</span>
+                                    <el-input class="coord" v-model="fatY" @input="limitNumY" @change="yChange"></el-input>
+                                </div>
+                            </div>
                         </div>
                         <div style="width: calc(30%);">
                             <div style="width: calc(100%);">
@@ -38,7 +48,8 @@
                         <!-- <FeelLoad></FeelLoad> -->
                         <!-- <FatherMap></FatherMap> -->
                         <!-- 建议使用这个 -->
-                        <DrawDesigns ref="designsRef" :lineMenuColor="lineMenuColor"></DrawDesigns>
+                        <DrawDesigns ref="designsRef" :lineMenuColor="lineMenuColor" :fatX="fatX" :fatY="fatY"
+                            @backxy="backxy"></DrawDesigns>
                     </div>
                 </div>
             </div>
@@ -51,12 +62,14 @@ import { ref, onMounted, toRefs, watch } from 'vue';
 import { ElMessage } from 'element-plus';
 import FeelLoad from '@/pages/feelLoad/FeelLoad.vue'//bmnp
 import FatherMap from '@/pages/mapLoad/FatherMap.vue';//jsplumb
-import DrawDesigns from '@/pages/components/draw/DrawDesigns.vue';//原生js
+import DrawDesigns from '@/pages/components/draw/DrawDesigns.vue';//logicflow
 export default {
     setup() {
         let moduleList = ref([])
         let lineMenuColor = ref('#255CE7')
         let designsRef = ref(null)
+        let fatX = ref()
+        let fatY = ref()
         function searchModule() {
 
         }
@@ -77,6 +90,26 @@ export default {
         function cleanAll() {
             designsRef.value.cleanMap()//清除画布
         }
+        function limitNumX(e) {//强制转换为数字
+            let types = e.replace(/\D/g, '');
+            fatX.value = types - 0
+        }
+        function limitNumY(e) {//强制转换为数字
+            let types = e.replace(/\D/g, '');
+            fatY.value = types - 0
+        }
+        function xChange(e) {
+            fatX.value = e - 0
+            designsRef.value.momal()
+        }
+        function yChange(e) {
+            fatY.value = e - 0
+            designsRef.value.momal()
+        }
+        function backxy(x, y) {
+            fatX.value = x
+            fatY.value = y
+        }
         onMounted(() => {
             searchModule()
         })
@@ -90,6 +123,13 @@ export default {
             delClick,
             saveMap,
             cleanAll,
+            fatX,
+            fatY,
+            backxy,
+            xChange,
+            yChange,
+            limitNumX,//只能输入数字
+            limitNumY,
         }
     },
     components: {
@@ -195,4 +235,11 @@ export default {
     text-align: center;
     line-height: 22px;
 }
+
+.coord {
+    width: 50px;
+    height: 30px;
+    background-color: transparent;
+    border: none;
+}
 </style>

Some files were not shown because too many files changed in this diff