1
z8018
2025-05-06 7da6f394864ba0412c1ac58ba7752862de7d3f3d
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/src/views/temppage.vue
@@ -1,7 +1,8 @@
<template>
  <div>
    <el-button type="primary" @click="goBack">一号龙门架</el-button>
  <div class="container">
    <el-button type="primary" style="width: 200px;height: 100px;" @click="goBack(1)">一号龙门架</el-button>
    <el-button type="primary" style="width: 200px;height: 100px;" @click="goBack(2)">二号龙门架</el-button>
    <el-button type="primary" style="width: 200px;height: 100px;" @click="goBack(3)">三号龙门架</el-button>
  </div>
</template>
@@ -9,12 +10,35 @@
export default {
  name: "temppage",
  methods: {
    goBack() {
    goBack(index) {
      // è¿™é‡Œå¯ä»¥æ ¹æ®éœ€è¦ä¼ é€’不同的参数
      // ä¾‹å¦‚,传递一个设备代码作为查询参数
      // ä½ å¯ä»¥æ ¹æ®æŒ‰é’®çš„不同,传递不同的参数
      // è¿™é‡Œå‡è®¾ä½ æœ‰ä¸€ä¸ªè®¾å¤‡ä»£ç çš„æ•°ç»„
      const deviceCodes = ["GT01", "GT02", "GT03"];
      const deviceCode = deviceCodes[index - 1]; // æ ¹æ®æŒ‰é’®çš„索引获取设备代码
      this.$router.push({
        path: "/bigdata",
        query: { deviceCode: "GT03" },
        query: { deviceCode: deviceCode }
      });
    },
  },
    }
  }
};
</script>
<style scoped>
.container {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(1, 1fr);
  gap: 15px;
  padding: 20px;
  background: #f8f9fa;
  justify-content: center;
  align-items: center;
  justify-items: center;
}
</script>
</style>