Explorar o código

[Feat 0000] 看板添加返回首页的按钮

houzekong hai 8 meses
pai
achega
194f786b24

+ 1 - 1
src/views/vent/gas/gasPumpMonitor/index.vue

@@ -1,7 +1,7 @@
 <!-- eslint-disable vue/multi-word-component-names -->
 <template>
   <div class="scene-box">
-    <customHeader :fieldNames="calcFieldNames" :options="options" @change="getSelectRow" :optionValue="optionValue">瓦斯抽采泵监测系统</customHeader>
+    <customHeader :fieldNames="calcFieldNames" :options="options" @change="getSelectRow" :optionValue="optionValue">瓦斯抽采泵监测</customHeader>
     <div class="center-container">
       <template v-if="activeKey == 'deviceMonitor'">
         <GasPumpMonitor :device="deviceValue" />

+ 16 - 0
src/views/vent/home/billboard/index.vue

@@ -1,6 +1,15 @@
 <!-- eslint-disable vue/multi-word-component-names -->
 <template>
   <div class="company-home">
+    <a-button
+      preIcon="ant-design:rollback-outlined"
+      type="text"
+      size="small"
+      style="position: absolute; left: 15px; top: 15px; color: #fff"
+      @click="getBack"
+    >
+      回到首页
+    </a-button>
     <div class="top-bg">
       <div class="main-title">{{ mainTitle }}</div>
     </div>
@@ -49,6 +58,7 @@
   import GasStatus from './components/GasStatus.vue';
   import Summary from './components/Summary.vue';
   import _ from 'lodash-es';
+  import { useRouter } from 'vue-router';
   // import mapComponent from './components/3Dmap/index.vue';
 
   const props = defineProps<{
@@ -57,6 +67,7 @@
 
   // const route = useRoute();
   const { open } = useSSO();
+  const router = useRouter();
 
   // 组件Map,不同type使用不用组件
   const componentMap = {
@@ -128,6 +139,11 @@
     open(url, routePathMap[props.billboardType]);
   }
 
+  // 返回首页
+  function getBack() {
+    router.push('/company/home');
+  }
+
   onMounted(() => {
     // if (route.query.type) {
     //   billboardType.value = route.query.type as string;