Sfoglia il codice sorgente

Merge branch 'hjl' of git.sagacloud.cn:web/ibms into hjl

zhangyu 5 anni fa
parent
commit
551635879a

+ 0 - 2
src/components/config_point/dictionaryCascader.vue

@@ -175,11 +175,9 @@ export default {
     },
     //设置值
     setCascaderVal(value) {
-      console.log(value)
       this.form.dict = tools.deepCopy(value)
       value.splice(value.length - 1, 1)
       this.handleChange(value)
-      console.log(1111111111111)
     },
     //校验是否选择
     validate(cb) {

+ 18 - 0
src/views/point/config_point/steps/index.vue

@@ -111,6 +111,24 @@
                     path: '/point/pointsetting'
                 })
             }
+        },
+        //路由切换提示
+        beforeRouteLeave(to, from, next) {
+            let step = this.$refs.step
+            let flag = step.hasOwnProperty('noSaveData') ? step.noSaveData() : false
+            if(flag){
+                next()
+            }else{
+                this.$confirm('存在数据未保存, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    next()
+                }).catch(() => {
+                    next(false)
+                });
+            }
         }
     }
 </script>