{"ast":null,"code":"import bus from \"../../service/bus\";\nexport default {\n  props: {},\n  data() {\n    return {\n      value: \"\",\n      show: false\n    };\n  },\n  computed: {\n    goBackVisible: () => {\n      return false;\n    }\n  },\n  methods: {\n    onFocus() {\n      this.show = true;\n      this.$emit(\"focus\");\n    },\n    onInput(event) {\n      this.value = event.target.value;\n      this.$emit(\"input\", this.value);\n    },\n    onBlur(e) {\n      // this.show = false;\n      // console.log('=======-------======', e.currentTarget.classList)\n      // this.$emit(\"blur\");\n    },\n    goBack() {},\n    modeChange() {\n      this.$store.dispatch('common/setSquareStatus', false);\n      this.$store.dispatch(\"common/toggle3dStatus\");\n      this.$store.dispatch(\"common/setIsOpen\", false);\n    },\n    goMantis() {\n      window.open(\"http://139.196.158.57:8080/mantis_test/#/dashboard\", \"_blank\");\n    },\n    goKpm() {\n      window.open(\"http://106.14.237.165/kpm/#/list/kpm-list\", \"_blank\");\n    },\n    goAutoGo() {\n      window.open(\"http://139.196.158.57/#/Overview\", \"_blank\");\n    },\n    goHome() {\n      bus.emit(\"goHome\");\n      // this.$router.push({\n      //   path: '/',\n      //   query:{\n      //     m: '8b934420_ZJUb_b6f9'\n      //   }\n      // })\n      this.$store.dispatch(\"common/setGoHome\", true);\n      this.$store.dispatch(\"common/setIsOpen\", false);\n      this.$store.dispatch(\"common/set3dStatus\", false);\n      this.$store.dispatch(\"common/setSquareStatus\", false);\n    },\n    goSquare() {\n      this.$store.dispatch(\"common/setGoHome\", false);\n      this.$store.dispatch(\"common/set3dStatus\", false);\n      this.$store.dispatch(\"common/setSquareStatus\", true);\n      this.$store.dispatch(\"common/setIsOpen\", false);\n    }\n  }\n};","map":{"version":3,"names":["bus","props","data","value","show","computed","goBackVisible","methods","onFocus","$emit","onInput","event","target","onBlur","e","goBack","modeChange","$store","dispatch","goMantis","window","open","goKpm","goAutoGo","goHome","emit","goSquare"],"sources":["src/components/SearchBar/index.vue"],"sourcesContent":["<template>\n  <div class=\"search-box backgroundBox\">\n    <div class=\"iconBtnBox\">\n      <div class=\"iconBtn backBtn\" @click=\"goBack\"></div>\n    </div>\n    <input\n      placeholder=\"搜索人员、部门、设备或地标\"\n      class=\"search-input\"\n      ref=\"input\"\n      :value=\"value\"\n      @focus=\"onFocus\"\n      @input=\"onInput\"\n      @blur=\"onBlur\"\n    />\n  </div>\n</template>\n\n<script>\nimport bus from \"../../service/bus\";\nexport default {\n  props: {},\n  data() {\n    return {\n      value: \"\",\n      show: false,\n    };\n  },\n  computed: {\n    goBackVisible: () => {\n      return false;\n    },\n  },\n  methods: {\n    onFocus() {\n      this.show = true;\n      this.$emit(\"focus\");\n    },\n    onInput(event) {\n      this.value = event.target.value;\n      this.$emit(\"input\", this.value);\n    },\n    onBlur(e) {\n      // this.show = false;\n      // console.log('=======-------======', e.currentTarget.classList)\n      // this.$emit(\"blur\");\n    },\n    goBack() {\n      \n    },\n    modeChange() {\n      this.$store.dispatch('common/setSquareStatus', false)\n      this.$store.dispatch(\"common/toggle3dStatus\");\n      this.$store.dispatch(\"common/setIsOpen\", false);\n    },\n    goMantis() {\n      window.open(\"http://139.196.158.57:8080/mantis_test/#/dashboard\", \"_blank\");\n    },\n    goKpm() {\n      window.open(\"http://106.14.237.165/kpm/#/list/kpm-list\", \"_blank\");\n    },\n    goAutoGo() {\n      window.open(\"http://139.196.158.57/#/Overview\", \"_blank\");\n    },\n    goHome() {\n      bus.emit(\"goHome\");\n      // this.$router.push({\n      //   path: '/',\n      //   query:{\n      //     m: '8b934420_ZJUb_b6f9'\n      //   }\n      // })\n      this.$store.dispatch(\"common/setGoHome\", true);\n      this.$store.dispatch(\"common/setIsOpen\", false);\n      this.$store.dispatch(\"common/set3dStatus\", false);\n      this.$store.dispatch(\"common/setSquareStatus\", false);\n    },\n    goSquare(){\n      this.$store.dispatch(\"common/setGoHome\", false);\n      this.$store.dispatch(\"common/set3dStatus\", false);\n      this.$store.dispatch(\"common/setSquareStatus\", true);\n      this.$store.dispatch(\"common/setIsOpen\", false);\n    }\n  },\n};\n</script>\n\n<style scoped>\n.search-box {\n  display: flex;\n  justify-content: space-around;\n  align-items: center;\n  /* background-image: url(../../images/search.png); */\n  /* background-color: transparent; */\n  background-size: 100% 100%;\n  box-sizing: border-box;\n  /* padding-right: 1.56vw; */\n  height: 7.4vh;\n  padding: 0 30px;\n  margin-left: -400px;\n  left: 50%;\n  box-sizing: border-box;\n  width: 700px;\n  top: 67px;\n  position: absolute;\n}\n.closeBtn {\n  color: #fff;\n  font-size: 30px;\n  float: right;\n}\n.search-input {\n  width: calc(100% - 350px);\n  border: 0;\n  overflow: hidden;\n  position: relative;\n  padding: 0 20px;\n  height: 3.5vh;\n  background-color: rgba(255, 255, 255, 0.12);\n  color: #dfdfdf;\n  border-radius: 1.75vh;\n}\n.search-input::placeholder {\n  color: #dfdfdf;\n}\n\n.search-input:before {\n  background: linear-gradient(\n    359deg,\n    rgba(255, 255, 255, 0.63) 0%,\n    rgba(255, 255, 255, 0) 66%,\n    rgba(84, 84, 84, 0) 100%\n  );\n  border-radius: 40px 40px 40px 40px;\n  opacity: 1;\n  content: \"\";\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  z-index: -1;\n}\n\n.iconBtnBox,\n.jumpBtnBox {\n  box-sizing: border-box;\n  display: flex;\n  justify-content: space-around;\n}\n\n.iconBtn {\n  height: 25px;\n  width: 25px;\n  margin: 0 10px;\n  background-size: contain;\n  cursor: pointer;\n}\n\n.backBtn {\n  background-image: url(../../assets/back.png);\n}\n\n.mapBtn {\n  background-image: url(../../assets/3d.png);\n}\n\n.homeBtn {\n  height: 22px;\n  width: 22px;\n  background-image: url(../../assets/home.png);\n}\n\n.squareBtn{\n  height: 22px;\n  width: 22px;\n  background-image: url(../../assets/square.png);\n}\n\n.jumpBtn {\n  margin: 0 6px;\n  width: 30px;\n  height: 20px;\n  line-height: 20px;\n  border-radius: 15px;\n  background-color: #ddd;\n  text-align: center;\n  font-size: 12px;\n  cursor: pointer;\n}\n</style>"],"mappings":"AAkBA,OAAAA,GAAA;AACA;EACAC,KAAA;EACAC,KAAA;IACA;MACAC,KAAA;MACAC,IAAA;IACA;EACA;EACAC,QAAA;IACAC,aAAA,EAAAA,CAAA;MACA;IACA;EACA;EACAC,OAAA;IACAC,QAAA;MACA,KAAAJ,IAAA;MACA,KAAAK,KAAA;IACA;IACAC,QAAAC,KAAA;MACA,KAAAR,KAAA,GAAAQ,KAAA,CAAAC,MAAA,CAAAT,KAAA;MACA,KAAAM,KAAA,eAAAN,KAAA;IACA;IACAU,OAAAC,CAAA;MACA;MACA;MACA;IAAA,CACA;IACAC,OAAA,GAEA;IACAC,WAAA;MACA,KAAAC,MAAA,CAAAC,QAAA;MACA,KAAAD,MAAA,CAAAC,QAAA;MACA,KAAAD,MAAA,CAAAC,QAAA;IACA;IACAC,SAAA;MACAC,MAAA,CAAAC,IAAA;IACA;IACAC,MAAA;MACAF,MAAA,CAAAC,IAAA;IACA;IACAE,SAAA;MACAH,MAAA,CAAAC,IAAA;IACA;IACAG,OAAA;MACAxB,GAAA,CAAAyB,IAAA;MACA;MACA;MACA;MACA;MACA;MACA;MACA,KAAAR,MAAA,CAAAC,QAAA;MACA,KAAAD,MAAA,CAAAC,QAAA;MACA,KAAAD,MAAA,CAAAC,QAAA;MACA,KAAAD,MAAA,CAAAC,QAAA;IACA;IACAQ,SAAA;MACA,KAAAT,MAAA,CAAAC,QAAA;MACA,KAAAD,MAAA,CAAAC,QAAA;MACA,KAAAD,MAAA,CAAAC,QAAA;MACA,KAAAD,MAAA,CAAAC,QAAA;IACA;EACA;AACA"},"metadata":{},"sourceType":"module","externalDependencies":[]}