浏览代码

修改bug

haojianlong 4 年之前
父节点
当前提交
c57dd06e48
共有 2 个文件被更改,包括 28 次插入10 次删除
  1. 20 9
      src/views/ledger/facility/batchPoint.vue
  2. 8 1
      src/views/ready/buildfloor/repetitionGraphy.vue

+ 20 - 9
src/views/ledger/facility/batchPoint.vue

@@ -71,10 +71,10 @@
                 <el-link icon="el-icon-close" :underline="false" @click="visible = false"></el-link>
             </div>
             <el-row>
-                <p>距地面高度:{{equipZ}}m</p>
+                <p>距地面高度:{{equipZ}}mm</p>
             </el-row>
-            <div style="padding: 10px 15px;">
-                <el-slider v-model="equipZ" :max="maxHeight" :step="0.0001" show-input></el-slider>
+            <div class="elSlider">
+                <el-slider v-model="equipZ" :max="maxHeight" :step="1" :marks="marks"></el-slider>
             </div>
             <el-row style="text-align: right;">
                 <el-button size="mini" @click="visible = false">取消</el-button>
@@ -101,7 +101,7 @@ export default {
     return {
         visible: false,
         equipZ: 0,
-        maxHeight: 99,
+        maxHeight: 99000,
         popoverPosition: {
             top: 0,
             left: 0,
@@ -144,7 +144,11 @@ export default {
           value: "CADID",
           label: "显示图纸编码"
 		}],
-		equipList: [],
+        equipList: [],
+        marks: {
+            0: '本层地面',
+            99000: '本层屋顶'
+        },
 		loading: false,
 		pageNumber: 1,
 		pageSize: 50,
@@ -226,7 +230,7 @@ export default {
         const e = events[0];
         this.selectedIcon = item;
         if (item.data.Z) {
-            this.equipZ = (item.data.Z / 1000);
+            this.equipZ = (item.data.Z);
         } else {
             this.equipZ = 0;
         }
@@ -239,8 +243,8 @@ export default {
     },
     // 修改设备Z坐标
     handleUpdateZ() {
-        if (this.selectedIcon.data.Z !== this.equipZ * 1000) {
-            this.selectedIcon.data.Z = this.equipZ * 1000;
+        if (this.selectedIcon.data.Z !== this.equipZ) {
+            this.selectedIcon.data.Z = this.equipZ;
             this.isChange = true;
             this.visible = false;
         }
@@ -384,7 +388,7 @@ export default {
         if (data.StructureInfo && data.StructureInfo.Height) {
             this.maxHeight = data.StructureInfo.Height;
         } else {
-            this.maxHeight = 99;
+            this.maxHeight = 99000;
         }
 		if (data.Outline && data.Outline.length) {
 			this.floorOutline = data.Outline;
@@ -569,6 +573,13 @@ export default {
     position: fixed;
   }
 }
+.elSlider{
+    padding: 10px 24px;
+    margin-bottom:15px;
+    /deep/ .el-slider__marks-text:nth-child(2) {
+        width: 80px;
+    }
+}
 .no-data {
 	height: 100%;
 	text-align: center;

+ 8 - 1
src/views/ready/buildfloor/repetitionGraphy.vue

@@ -8,7 +8,7 @@
                     <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>
-                <el-button style='float:right;' size='mini' type='primary' v-if="step==1" @click="nextStep">保存</el-button>
+                <el-button style='float:right;' size='mini' type='primary' v-if="step==1" @click="nextStep" :disabled="timeOut">保存</el-button>
                 <el-button style='float:right;' size='mini' v-if="step==1" @click="lastStep">上一步</el-button>
             </template>
             <template v-else>
@@ -99,6 +99,7 @@ export default {
             scaleItem: null, // 比例尺item
             baseImgItem: null, // 当前楼层图的图片
             nextStepBtnDisable: true, // 比例尺item创建标识
+            timeOut: true, // 保存按钮延时3秒可操作
         }
     },
     created() {
@@ -265,6 +266,8 @@ export default {
                                 vm.$nextTick(()=>{
                                     vm.initFromModelId(uploadKey + '.' + type)
                                 })
+                                // 设定保存按钮不可操作
+                                this.timeOut = true;
                             }
                         }
                     }
@@ -334,6 +337,10 @@ export default {
                 this.$refs.drawFloor.scaleItem.hide();
                 // 获取楼层列表
                 this.getFloorData('next')
+                // 延时3秒可操作性保存按钮
+                setTimeout(() => {
+                    this.timeOut = false
+                },3000)
             } else if (this.step == 1) {
                 // 保存
                 this.updateFloorKey();