Forráskód Böngészése

Merge remote-tracking branch 'origin/dataType' into dataType

shaun-sheep 4 éve
szülő
commit
b1832f2370

+ 4 - 1
src/components/business_space/newGraphy/createBSP.vue

@@ -4,7 +4,7 @@
     <el-input :placeholder="`请输入业务空间名称`" v-model="roomName"></el-input>
     <span slot="footer" class="dialog-footer">
       <el-button size="small" @click="dialogVisible=false">取 消</el-button>
-      <el-button size="small" type="primary" @click="confirm">确 定</el-button>
+      <el-button size="small" type="primary" @click="confirm" :disabled="confirmDisable">确 定</el-button>
     </span>
   </el-dialog>
 </template>
@@ -16,6 +16,7 @@ export default {
       title: '提示',
       dialogVisible: false,
       roomName: '',
+      confirmDisable: true
     };
   },
   methods: {
@@ -23,6 +24,7 @@ export default {
     showDialog(val) {
       this.roomName = val;
       this.dialogVisible = true;
+      this.confirmDisable = false;
     },
     // 确认
     confirm() {
@@ -30,6 +32,7 @@ export default {
         this.$message.warning("请填写空间名称");
         return
       }
+      this.confirmDisable = true
       this.$emit('createRoom', this.roomName);
       this.dialogVisible = false;
     }

+ 16 - 8
src/components/business_space/newGraphy/graphy.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="graphy" ref="graphy" v-loading="canvasLoading">
     <div v-show="!FloorMap">
-        <!-- 平面图其他分区 -->
+      <!-- 平面图其他分区 -->
       <!-- <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag">
         <el-button type="primary" @click="addZoneBtn">添加分区</el-button>
         <el-select v-model="OtherValue" placeholder="请选择分区类型" @change="changeOtherZone">
@@ -71,8 +71,8 @@
             <el-button type="primary" v-show='curZoneItem.isInfected' @click="confirmAndSave">保存并确认业务空间</el-button>
           </div>
           <!-- 批量创建所选业务空间 -->
-          <div v-show="type==5">
-            <el-button type="primary" @click="groupCreateZone">批量创建所选业务空间</el-button>
+          <div v-if="type==5">
+            <el-button type="primary" @click.prevent.once="groupCreateZone">批量创建所选业务空间</el-button>
             <el-button plain @click="cancelGraphy">取 消</el-button>
           </div>
           <div style="position: absolute;right: 10px;">
@@ -444,11 +444,17 @@ export default {
               Infected: t.state
             }
           }).filter(item => item)
-          this.scene.removeAllZone();
-          this.scene.addZoneList(tempArr);
-          this.scene.click(this, this.canvasClick);
-          this.zoneList = this.scene.zoneList;
-          this.view._needDraw = true;
+          try {
+            this.scene.removeAllZone();
+            this.scene.addZoneList(tempArr);
+            this.scene.click(this, this.canvasClick);
+            this.zoneList = this.scene.zoneList;
+            this.view._needDraw = true;
+            this.fit();
+          } catch (err) {
+            console.log(err);
+            console.log(this)
+          }
           this.canvasLoading = false;
         }
       })
@@ -531,6 +537,8 @@ export default {
         this.scene.isSpaceSelectable = true;
         // 设置业务空间不可选
         this.scene.isZoneSelectable = false;
+        // 刷新
+        this.view.update()
       }
     },
     // 根据未关联元空间批量创建业务空间

+ 1 - 1
src/components/ledger/lib/bimDialog.vue

@@ -10,7 +10,7 @@
     <div id='bim-code' v-if='Object.keys(bimcodeobj).length>0'>
       <div class='eq'>
         <span class='eq-name'>设备名称 &nbsp;&nbsp;</span>
-        {{ bimcodeobj.EquipLocalName || bimcodeobj.EquipName || '--' }}
+        {{ bimcodeobj.localName || bimcodeobj.name || '--' }}
       </div>
       <div>
         <noAllDataFloor @change='changeFloor' ref='floors' @getFloorMap='getFloorMap'></noAllDataFloor>

+ 11 - 1
src/components/ledger/lib/spaceSelect.vue

@@ -24,12 +24,15 @@ export default {
     isWidth: {
       type: Boolean,
       default: true
+    },
+    isAll: {
+			type: Boolean,
+			default: false
     }
   },
   data() {
     return {
       value:[null],
-      spaceVal: null,//值
       options: [],
       props: {
         isWidth:false
@@ -47,6 +50,13 @@ export default {
       //Cascade: [{ Name: 'zoneType', Filters: `ProjectId='${this.projectId}'` }]
       queryAllZoneType(params1, res => {
         this.options = res.content;
+        if (this.isAll) {
+					this.options.unshift({
+						code: "",
+						name: "全部"
+					});
+					this.value = [''];
+        }
         this.changeVal(this.value);
       })
     },

+ 20 - 4
src/components/ledger/system/dialog/addSpaceDialog.vue

@@ -10,7 +10,7 @@
         <floor-cascader ref="floorcas" @change="changeFloor"></floor-cascader>
       </el-col>
       <el-col :span="7.5" style="padding:0 0;">
-        <space-select ref="spacesel" @change="changeSpace"></space-select>
+        <space-select ref="spacesel" :isAll="true" @change="changeSpace"></space-select>
       </el-col>
     </el-row>
     <el-row class="filters" :gutter="20"></el-row>
@@ -87,6 +87,7 @@ export default {
       inSpaceType: "业务空间",
       Buildfloor: ["all"], // 选中的建筑楼层
       Spacecategory: null, // 选中的业务空间类型
+			spaceValue: [""], //记录切换成功的业务空间值
       tableData: [],
       floorData: {}, //楼层
       spaceData: {}, //业务空间分区
@@ -125,9 +126,24 @@ export default {
       this.getTableData();
     },
     //修改空间类型
-    changeSpace(value) {
-      this.Spacecategory = value;
-      this.getTableData();
+    changeSpace(val, space, value) {
+			if (this.selections.length) {
+				this.$confirm('关联的业务空间未保存, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.Spacecategory = val;
+					this.spaceValue = value;
+      		this.getTableData();
+        }).catch(() => {
+          this.$refs.spacesel.value = this.spaceValue;  
+        });
+			} else {
+				this.Spacecategory = val;
+				this.spaceValue = value;
+      	this.getTableData();
+			}
     },
     getTableData() {
       let params = {

+ 1 - 1
src/views/ledger/cenotelist/index.vue

@@ -378,7 +378,7 @@ export default {
       let name = infos.localName ? infos.localName : infos.name
       this.shaftId = infos.id //要操作的数据id
       //点击关联的元空间
-      if (val === "SpaceList") {
+      if (val === "spaceList") {
         this.$router.push({
           path: '/ledger/relatedSpace',
           query: { ShaftId: this.shaftId, name: name, onlyRead: this.onlyRead }

+ 1 - 1
src/views/ledger/facility/addfacility.vue

@@ -22,7 +22,7 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button">创建设备</el-button>
+      <el-button type="primary" size="medium" @click.prevent.once="handleCreateTableData" class="create_button">创建设备</el-button>
     </el-row>
     <!-- 二维码弹窗 -->
     <qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>

+ 1 - 1
src/views/ledger/property/addproperty.vue

@@ -22,7 +22,7 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button">创建资产</el-button>
+      <el-button type="primary" size="medium" @click.prevent.once="handleCreateTableData" class="create_button">创建资产</el-button>
     </el-row>
     <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr"
                          :dialog="myDialog"></upload-files-dialog>

+ 18 - 21
src/views/ledger/spacelist/index.vue

@@ -10,8 +10,7 @@
       <div class="saga-build-mess">
         <div style="margin-left: 10px;float: left;">
           <span style="color: #999999;font-size: 14px;margin-right: 12px;">建筑楼层</span>
-          <el-cascader :options="options" @change="changeCascader" placeholder="请选择建筑楼层" ref="cascaderAddr"
-                       v-model="buildFloorSelectd">
+          <el-cascader :options="options" @change="changeCascader" placeholder="请选择建筑楼层" ref="cascaderAddr" v-model="buildFloorSelectd">
             <template slot-scope="{ node, data }">
               <span>{{ data.label }}</span>
               <i class="el-icon-warning-outline" v-if="data.count" style="color:red;margin-right:10px;"></i>
@@ -35,29 +34,26 @@
             <template v-for="(item,index) in tabsList">
               <el-tab-pane :name="item.code" :key="index">
                 <span slot="label"><i class="el-icon-warning-outline" v-if="item.count>0"
-                                      style="color:red;margin-right:10px;"></i>{{ item.name }}</span>
+                    style="color:red;margin-right:10px;"></i>{{ item.name }}</span>
               </el-tab-pane>
             </template>
           </el-tabs>
         </div>
       </el-row>
       <div v-show="isMyTab == 1" style="width:100%;height:100%">
-        <graphy @getSp="checkSpace" @dimension="checkSpace" @businessDetails="getBuinessDetails" ref="graphy"
-                @copyID="copyID"
-                @updateState="updateStateSuc"></graphy>
+        <graphy @getSp="checkSpace" @dimension="checkSpace" @businessDetails="getBuinessDetails" ref="graphy" @copyID="copyID"
+          @updateState="updateStateSuc"></graphy>
       </div>
       <div v-show="isMyTab == 2">
-        <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :otherType="otherType"
-                           :id="`handsontable${activeName}`">
+        <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :otherType="otherType" :id="`handsontable${activeName}`">
         </handsontable-main>
       </div>
       <div class="infectedTips" v-show="isMyTab==1&&infectedTotal>0">
-        <p>因底图变化而受影响的业务空间{{ infectedTotal.toString() }}个<span
-          v-show="buildFloorSelectd.length>1">,本层受影响的业务空间{{ infectedCurfloor.toString() }}个</span></p>
+        <p>因底图变化而受影响的业务空间{{ infectedTotal.toString() }}个<span v-show="buildFloorSelectd.length>1">,本层受影响的业务空间{{ infectedCurfloor.toString() }}个</span>
+        </p>
       </div>
     </div>
-    <div v-show="needCalculate"
-         style="display:flex;align-items:center;justify-content:center;height:100%;background-color:#fff;">
+    <div v-show="needCalculate" style="display:flex;align-items:center;justify-content:center;height:100%;background-color:#fff;">
       <div class="center" style="flex:1">
         <i class="iconfont icon-jianzhu" style="font-size:50px;"></i>
         <p style="margin:10px 0;">空间关系已发生变化,请更新关系后再使用业务空间台账</p>
@@ -146,6 +142,7 @@ export default {
   created() {
     this.getRelations()
     this.childBackParam = this.$route.params;
+    console.log(this.childBackParam);
   },
   mounted() {
   },
@@ -247,17 +244,17 @@ export default {
     // 获取关系是否需要计算
     getRelations() {
       let pa = {
-        Filters: `RelationType in ["bd2sp","fl2sp"];ComputationalState>1`
+        filters: `relationType in ["bd2sp","fl2sp"];computationalState>1`
       }
       // 后台暂无接口提供 todo
-      // getrelationTypeProject(pa, res => {
-      //   if (res.Content.length) {
-      //     this.needCalculate = true;
-      //   } else {
-      //     this.needCalculate = false;
-      this.init()
-      //   }
-      // })
+      getrelationTypeProject(pa, res => {
+        if (res.content.length) {
+          this.needCalculate = true;
+        } else {
+          this.needCalculate = false;
+          this.init()
+        }
+      })
     },
     // 通过选中的tab-Code 获取选中的tab的所有数据
     getItemForType() {

+ 2 - 2
src/views/ledger/spacelist/spaceadd/index.vue

@@ -22,7 +22,7 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button">创建业务空间</el-button>
+      <el-button type="primary" size="medium" @click.prevent.once="handleCreateTableData" class="create_button">创建业务空间</el-button>
     </el-row>
 
     <!--二维码弹窗 -->
@@ -407,7 +407,7 @@ export default {
     },
     //上传图片弹窗触发事件
     imgChange(keys) {
-      this.setDataToMain(keys, 'Pic', this.row);
+      this.setDataToMain(keys, 'pic', this.row);
     },
     //判断是否有值,有值赋值
     setDataToMain(data, key, row) {

+ 1 - 1
src/views/ledger/system/addsystem.vue

@@ -22,7 +22,7 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button">创建系统</el-button>
+      <el-button type="primary" size="medium" @click.prevent.once="handleCreateTableData" class="create_button">创建系统</el-button>
     </el-row>
 
     <!-- 关联楼层 -->

+ 2 - 1
src/views/ready/buildfloor/drawGraphy/checkGraphy.vue

@@ -122,13 +122,14 @@ export default {
         floorId: this.floor.FloorID,
         buildingId: this.floor.BuildID,
         cover: true,
+        currentModelId: this.floor.CurrentModelId
       }
       if (this.jsonKey) {
         pa.id = this.modelIdToFloorId[this.jsonKey]
         bindFloorModel(pa, (res) => {
           this.$message.success('更新成功')
           this.handleClose()
-          this.$emit('refresh', this.jsonKey)
+          this.$emit('refresh', this.jsonKey, pa)
         })
       }
       if (this.key) {

+ 19 - 40
src/views/ready/buildfloor/index.vue

@@ -4,23 +4,18 @@
       <div class="l-list">
         <div class="action-box">
           <div>
-            <el-button @click="addBuild" icon="el-icon-plus" size="small" type="default"/>
-            <el-button @click="delBuild" icon="el-icon-minus" size="small" type="default"
-                       :disabled="!buildList.length"/>
-            <el-button @click="editBuild" icon="el-icon-edit-outline" size="small" type="default"
-                       :disabled="!buildList.length"/>
+            <el-button @click="addBuild" icon="el-icon-plus" size="small" type="default" />
+            <el-button @click="delBuild" icon="el-icon-minus" size="small" type="default" :disabled="!buildList.length" />
+            <el-button @click="editBuild" icon="el-icon-edit-outline" size="small" type="default" :disabled="!buildList.length" />
           </div>
         </div>
         <h4>建筑</h4>
         <div class="build-list">
-          <div :class="{'floor-item':true,active:item.active}"
-               :key="item.id"
-               @click="changeBuild(index)"
-               style="cursor: pointer"
-               v-for="(item,index) in buildList">
+          <div :class="{'floor-item':true,active:item.active}" :key="item.id" @click="changeBuild(index)" style="cursor: pointer"
+            v-for="(item,index) in buildList">
             <span>
               {{ item.localName || item.name }}
-              <el-badge :value="item.count" class="mark" v-if="item.count>0"/>
+              <el-badge :value="item.count" class="mark" v-if="item.count>0" />
             </span>
           </div>
         </div>
@@ -31,8 +26,7 @@
           </el-button>
         </div>
         <div class="table-box">
-          <el-table :data="tableData" :header-cell-style="headerStyle" height="100%" style="width: 100%"
-                    v-loading="loading">
+          <el-table :data="tableData" :header-cell-style="headerStyle" height="100%" style="width: 100%" v-loading="loading">
             <el-table-column label="楼层本地名">
               <template slot-scope="scope">{{ scope.row.localName }}</template>
             </el-table-column>
@@ -48,31 +42,29 @@
               <template slot-scope="scope">
                 <p @click="checkDrawImg(scope.row,2)" v-if="scope.row.sign>0">
                   <el-badge is-dot>
-                    <i class="iconfont icon-floorplan"/>
+                    <i class="iconfont icon-floorplan" />
                   </el-badge>
                   平面图重复
                 </p>
-                <p @click="checkDrawImg(scope.row,1)"
-                   v-else-if="scope.row.infos?scope.row.infos.floorMap:false">
-                  <i class="iconfont icon-floorplan"/>
+                <p @click="checkDrawImg(scope.row,1)" v-else-if="scope.row.infos?scope.row.infos.floorMap:false">
+                  <i class="iconfont icon-floorplan" />
                   查看平面图
                 </p>
                 <p @click="checkDrawImg(scope.row,3)" v-else>
-                  <i class="iconfont icon-nopicture"/>
+                  <i class="iconfont icon-nopicture" />
                   暂无平面图
                 </p>
               </template>
             </el-table-column>
             <el-table-column label="楼层贯通关系" prop="SubTypeName">
               <template slot-scope="scope">
-                <span
-                  style="margin-right:20px">{{ scope.row.floorThroughList ? scope.row.floorThroughList.length : 0 }}</span>
-                <el-button @click="changeConnection(scope.row)" icon="el-icon-edit-outline" plain size="mini"/>
+                <span style="margin-right:20px">{{ scope.row.floorThroughList ? scope.row.floorThroughList.length : 0 }}</span>
+                <el-button @click="changeConnection(scope.row)" icon="el-icon-edit-outline" plain size="mini" />
               </template>
             </el-table-column>
             <el-table-column label="操作" prop="action">
               <template slot-scope="scope">
-                <el-button @click="handleDelete(scope.row)" icon="el-icon-delete" plain size="mini" type="danger"/>
+                <el-button @click="handleDelete(scope.row)" icon="el-icon-delete" plain size="mini" type="danger" />
               </template>
             </el-table-column>
           </el-table>
@@ -85,24 +77,11 @@
       </div>
     </el-row>
     <!-- 添加-修改楼层 -->
-    <addFloor :curBuildId="curBuildId" :curFloorId="curFloorId" :title="floorTitle" @refresh="refresh"
-              ref="addFloorDialog"/>
+    <addFloor :curBuildId="curBuildId" :curFloorId="curFloorId" :title="floorTitle" @refresh="refresh" ref="addFloorDialog" />
     <!-- 添加-修改建筑 :currentType="currentType"-->
-    <addBuild
-      :buildTitle="buildTitle"
-      ref="addBuildDialog"
-      :buildMessage="buildMessage"
-      @handleBuild="handleBuild"
-    />
+    <addBuild :buildTitle="buildTitle" ref="addBuildDialog" :buildMessage="buildMessage" @handleBuild="handleBuild" />
     <!-- 删除建筑-删除楼层 -->
-    <el-dialog
-      :visible.sync="delDialogVis"
-      @close="handleClose"
-      id="messageDialog"
-      title="提示"
-      width="20%"
-
-    >
+    <el-dialog :visible.sync="delDialogVis" @close="handleClose" id="messageDialog" title="提示" width="20%">
       <div>确定要删除该{{ delText }}?</div>
       <span class="dialog-footer" slot="footer">
         <el-button @click="delDialogVis=false" size="small">取消</el-button>
@@ -110,7 +89,7 @@
       </span>
     </el-dialog>
     <!-- 添加贯通关系弹窗 -->
-    <addConnectivity @refresh="refresh" ref="addConnectivity"/>
+    <addConnectivity @refresh="refresh" ref="addConnectivity" />
   </div>
 </template>
 
@@ -187,7 +166,7 @@ export default {
       buildingQueryAndCount(bdParam, res => {
         this.buildList = res.content;
         if (this.buildList.length) {
-          this.changeBuild(this.selectedBuildIndex);
+          this.changeBuild(this.selectedBuildIndex > this.buildList.length - 1 ? 0 : this.selectedBuildIndex);
         }
       });
     },

+ 47 - 26
src/views/ready/buildfloor/repetitionGraphy.vue

@@ -4,7 +4,8 @@
     <div class='buttons'>
       <el-button icon='el-icon-back' size='mini' @click='backRouter'></el-button>
       <template v-if="!hasModel">
-        <el-upload class='upload-demo' action='string' :http-request='uploadAndSubmit' :show-file-list='false' v-if="step==-1" accept=".jpg,.png" :before-upload="beforeUpload">
+        <el-upload class='upload-demo' action='string' :http-request='uploadAndSubmit' :show-file-list='false' v-if="step==-1" accept=".jpg,.png"
+          :before-upload="beforeUpload">
           <el-button size="mini">{{hasGraph?'替换平面图图片':'上传平面图图片'}}</el-button>
         </el-upload>
         <el-button style='float:right;' size='mini' type='primary' v-if="step==0" @click="nextStep" :disabled="nextStepBtnDisable">下一步</el-button>
@@ -99,6 +100,7 @@ export default {
       scaleItem: null, // 比例尺item
       baseImgItem: null, // 当前楼层图的图片
       nextStepBtnDisable: true, // 比例尺item创建标识
+      timeOut: true, // 保存按钮延时3秒可操作
     }
   },
   created() {
@@ -115,13 +117,15 @@ export default {
       } else {
         this.init()
       }
+    } else {
+      this.init()
     }
     this.getCountModel()
     this.$nextTick(() => {
       this.$refs.drawFloor.buildFloorName = `${this.BuildName}-${this.FloorName}`
     })
   },
-  mounted() {},
+  mounted() { },
   methods: {
     init() {
       this.getFloorData()
@@ -140,7 +144,7 @@ export default {
     },
     // 替换模型文件
     changeGraphy() {
-      this.$refs.checkGraphy.showDialog({ FloorID: this.FloorID, BuildID: this.BuildID })
+      this.$refs.checkGraphy.showDialog({ FloorID: this.FloorID, BuildID: this.BuildID, CurrentModelId: this.currentModelId })
     },
     // 确认保存
     confirm() {
@@ -159,14 +163,16 @@ export default {
         Outline = this.$refs.drawFloor.drawMainScene.sceneMark.outLine
         Outline = Outline.map((t) => {
           return {
-            x: t.x.toFixed(2),
-            y: -t.y.toFixed(2),
+            X: t.x.toFixed(2),
+            Y: -t.y.toFixed(2),
           }
         })
       }
       let pa = {
-        content: [{ id: this.FloorID, outline: Outline }],
-        projection: ['outline'],
+        content: [{ id: this.FloorID, outline: Outline }]
+      }
+      if (!Outline) {
+        pa.nullItems = ['outline']
       }
       floorUpdateOutline(pa, (res) => {
         this.isEdit = false
@@ -183,12 +189,20 @@ export default {
       this.isEdit = true
     },
     // 替换模型文件成功
-    refresh(modelId) {
+    refresh(modelId,pa) {
       this.modelId = modelId
       this.hasGraph = true;
       const temp = this.modelId.split('.');
-      if (temp[1] && temp[1].toLowerCase() != 'png' && temp[1].toLowerCase() != 'jpg') {
+      if (temp[1]) {
+        if (temp[1].toLowerCase() != 'png' && temp[1].toLowerCase() != 'jpg') {
+          // do nothing
+        } else {
+          // do nothing
+        }
+      } else {
         this.key = '';
+        pa && pa.id && this.getFileName(pa.id)
+        this.initFromModelId(this.modelId)
       }
     },
     // 获取文件夹名称
@@ -221,6 +235,7 @@ export default {
         this.alreadyRelatedModel = res.content.map((t) => {
           if (t.id != this.FloorID) return t.modelId
           this.sign = t.Sign > 0
+          this.currentModelId = t.modelId;
           t.modelId && this.getFileName(t.modelId)
         }).filter((t) => t)
       })
@@ -230,7 +245,7 @@ export default {
     },
     // 统计项目下是否有模型文件
     getCountModel() {
-      countModel({Filters:"Status in [4]"}, res => {
+      countModel({ Filters: "Status in [4]" }, res => {
         this.hasModel = res.Count > 0
       })
     },
@@ -266,9 +281,11 @@ export default {
                 // 设置步骤为第一步
                 vm.step = 0;
                 // watch中不会走到initGraph,所以手动触发
-                vm.$nextTick(()=>{
+                vm.$nextTick(() => {
                   vm.initFromModelId(uploadKey + '.' + type)
                 })
+                // 设定保存按钮不可操作
+                this.timeOut = true;
               }
             }
           }
@@ -281,8 +298,8 @@ export default {
       // 拿到当前上传图片的name,判断其后缀名是否符合
       let type = this.isImage(file.name);
       if (!type) {
-          this.$message.error('仅支持png、jpg格式的图片');
-          return false
+        this.$message.error('仅支持png、jpg格式的图片');
+        return false
       }
       return true
     },
@@ -306,10 +323,10 @@ export default {
       let Param = {
         content: [{
           id: this.FloorID,
-          infos: { 
+          infos: {
             floorMap: this.key,
             floorMapRatio: proScale,
-            floorMapShift: JSON.stringify({x: this.baseImgItem.x, y: this.baseImgItem.y})
+            floorMapShift: JSON.stringify({ x: this.baseImgItem.x, y: this.baseImgItem.y })
           },
           properties: {
             line: line,
@@ -359,6 +376,10 @@ export default {
         this.$refs.drawFloor.scaleItem.hide();
         // 获取楼层列表
         this.getFloorData('next')
+        // 延时3秒可操作性保存按钮
+        setTimeout(() => {
+          this.timeOut = false
+        }, 3000)
       } else if (this.step == 1) {
         // 保存
         this.updateFloorKey();
@@ -394,7 +415,7 @@ export default {
       this.loadOtherImg(v)
     },
     // 加载其他楼层图片
-    loadOtherImg(v){
+    loadOtherImg(v) {
       if (v.infos && v.infos.floorMap) {
         const temp = this.modelId.split('.');
         if (temp[1] && (temp[1].toLowerCase() == 'png' || temp[1].toLowerCase() == 'jpg')) {
@@ -459,16 +480,16 @@ export default {
     }
   },
   watch: {
-    modelId(n, o) {
-      if (o && n != o) {
-        if (n) {
-          // 替换的时候需要走
-          this.$nextTick(()=>{
-            this.initFromModelId(n)
-          })
-        }
-      }
-    },
+    // modelId(n, o) {
+    //   if (o && n != o) {
+    //     if (n) {
+    //       // 替换的时候需要走
+    //       this.$nextTick(() => {
+    //         this.initFromModelId(n)
+    //       })
+    //     }
+    //   }
+    // },
   },
 }
 </script>