YaolongHan 4 лет назад
Родитель
Сommit
3b2399aa58

+ 0 - 1
src/components/baseEditer.vue

@@ -474,7 +474,6 @@ export default {
       });
       // 更改图例数据工程化数据
       bus.$on("changeAttachObjectIds", arr => {
-        console.log(arr);
         this.scene.upadatAttachObjectIds(arr);
       });
     },

+ 0 - 1
src/components/edit/attr_select.vue

@@ -479,7 +479,6 @@ export default {
   },
   watch: {
     focusItemList: function(newval) {
-      console.log('xxxxxxxxxxxxxxx',newval)
       const Item = newval.itemList[0];
       this.getmajorId = Item.data.Properties.GraphCategoryId;
       if (Item.data && Item.data.SubType) {

+ 15 - 15
src/components/edit/edit-dialog.vue

@@ -152,14 +152,14 @@
                 setTimeout(() => {
                     this.visible = false;
                     this.loading = false;
-                    let lists = [];
+                    const lists = [];
                     let arr = [];
                     arr = JSON.parse(JSON.stringify( this.arrList))
                   arr.map(item =>{
                       lists.push({id:item.location||item.assetnum,name:item.wzjc||item.sbjc})
                     })
                     bus.$emit('changeAttachObjectIds',lists)
-
+                    bus.$emit('updateAttachMsg',lists)
                 }, 3000);
             },
             handleCancel(e) {
@@ -193,7 +193,7 @@
             },
           //获取表格数据
           queryGlsmsasset(){
-            let data = {
+            const data = {
               plazaId: getUrlMsg().projectId,//广场id 必填
               page: this.page,//页数
               size: this.size,//条数
@@ -201,8 +201,8 @@
             if( this.keyword){
               data.keyword = this.typeEdit=='Image'? `${this.keyword}:brand`:`${this.keyword}:wzjc`
             }
-            let paramData =  {classstructureid: this.classstructureid,gname:this.floorId};
-            let paramDataLocal =  {locfl: this.locfl,gname:this.floorId};
+            const paramData =  {classstructureid: this.classstructureid,gname:this.floorId};
+            const paramDataLocal =  {locfl: this.locfl,gname:this.floorId};
             this.loading = true;
             if(this.typeEdit=='Image'){
               queryGlsmsasset(data,paramData).then(res => {
@@ -210,7 +210,7 @@
                 if(res.data.result == 'success'){
                   this.total = res.data.count;
                   if(res.data.data){
-                    let data = res.data.data;
+                    const data = res.data.data;
                     data.map(item=>{
                       item.id = item.sbjbm
                     })
@@ -265,7 +265,7 @@
                 return false;
               }
             this.arrList = [...this.arrList,...selectedRows]
-            let obj = {}
+            const obj = {}
             if(this.typeEdit=='Zone'){
               this.arrList = this.arrList.reduce (function(item,next){
                 obj[next.location] ? ' ' : obj[next.location]  = true && item.push(next)
@@ -295,12 +295,12 @@
           },
           //获取楼层
           getPlazaFloor(){
-              let data = {
+              const data = {
                 plazaId:getUrlMsg().projectId
               }
             getPlazaFloor(data).then(res =>{
               if(res.result == 'success'){
-                let data = res.data;
+                const data = res.data;
                 data.map(item=>{
                   item.id = item.gname;
                 })
@@ -314,7 +314,7 @@
                 getQuerySmsxt({}).then(res =>{
                   if(res.result == 'success'){
                     if(res.data){
-                      let data = res.data;
+                      const data = res.data;
                       data.map(item=>{
                         item.id = item.code;
                         item.name = item.name;
@@ -328,7 +328,7 @@
                 queryWzfldl({}).then(res =>{
                 if(res.result == 'success'){
                   if(res.data){
-                    let data = res.data;
+                    const data = res.data;
                     data.map(item=>{
                       item.id = item.dl;
                       item.name = item.dl;
@@ -343,13 +343,13 @@
          // 获取设备大类下的分类和位置大类下的分类
           getQuerySmsxtBy(smsxt){
               if(this.typeEdit=='Image'){
-              let data = {
+              const data = {
                 smsxt:smsxt
               }
               getQuerySmsxtBy(data,{}).then(res =>{
                 if(res.result == 'success') {
                   if(res.data){
-                    let data = res.data;
+                    const data = res.data;
                     (function recursion(newObj) {
                       newObj.map(item=>{
                         item.label = item.gcxxhxtname || item.classqc;
@@ -368,13 +368,13 @@
                 }
               })
             }else if(this.typeEdit=='Zone'){
-                let data = {
+                const data = {
                   dl:smsxt
                 }
                 queryWzflByDl(data,{}).then(res =>{
                   if(res.result == 'success') {
                     if(res.data){
-                      let data = res.data;
+                      const data = res.data;
                       (function recursion(newObj) {
                         newObj.map(item=>{
                           item.label = item.name;

+ 10 - 3
src/components/edit/top_toolbar.vue

@@ -11,14 +11,14 @@
           <img class="lock" :src="require(`./../../assets/images/t-save.png`)" alt />
           <span>保存</span>
         </li>
-        <!-- <li>
+        <li @click="undo">
           <a-icon type="edit" />
           <span>撤销</span>
         </li>
-        <li>
+        <li @click="redo">
           <a-icon type="edit" />
           <span>重做</span>
-        </li>-->
+        </li>
         <li class="zoom-window">
           <div>
             <img class="lock" @click="handleScale(-1)" :src="require(`./../../assets/images/缩小.png`)" alt />
@@ -240,6 +240,13 @@ export default {
     // 对齐item
     changeAlignItem(val) {
       bus.$emit("changeAlignItem", val);
+    },
+    // 撤销
+    undo(){
+
+    },
+    // 重做
+    redo(){
     }
   },
   async mounted() {

+ 5 - 4
src/components/mapClass/EditScence.ts

@@ -675,9 +675,12 @@ export class EditScence extends SGraphScene {
      * @param AttachObjectIds Array
      */
     upadatAttachObjectIds(AttachObjectIds: []): void {
-        console.log('AttachObjectIds', AttachObjectIds)
         if (this.focusItem) {
             this.focusItem.data.AttachObjectIds = AttachObjectIds;
+            // 重新选中focusitem
+            const item =  this.focusItem;
+            this.selectContainer.clear();
+            this.selectContainer.toggleItem(item)
         }
     }
 
@@ -834,9 +837,7 @@ export class EditScence extends SGraphScene {
         this.cmd = 'choice';
         this.selectContainer.clear()
         this.selectContainer.toggleItem(item)
-        setTimeout(() => {
-            this.focusItem = item;
-        })
+        this.focusItem = item;
     }
     ////////////////////////
     //  以下为鼠标键盘操作事件

+ 4 - 4
vue.config.js

@@ -15,9 +15,9 @@ module.exports = {
                 },
             },
             '/serve': {
-                // target: 'http://192.168.200.87:8088/',
+                target: 'http://192.168.200.87:8088/',
                 // target: 'http://192.168.200.83:8085/',
-                target: 'http://60.205.177.43:8080', //阿里云
+                // target: 'http://60.205.177.43:8080', //阿里云
                 changeOrigin: true,
                 secure: false,
                 pathRewrite: {
@@ -25,8 +25,8 @@ module.exports = {
                 },
             },
             '/data': {
-                // target: 'http://192.168.200.87:9003',
-                target: 'http://60.205.177.43:9903', //阿里云
+                target: 'http://192.168.200.87:9003',
+                // target: 'http://60.205.177.43:9903', //阿里云
                 changeOrigin: true,
                 secure: false,
                 pathRewrite: {