quanyawei
2024-01-03 6429d4b210fadb4face2ade0bbdc02926c444f72
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<template>
  <div>
    <div class="bannerin">
      <img src="../assets/image/productBanner.png" alt="" />
    </div>
    <div class="menu_sild" v-if="isShowCar">
      <div class="container">
        <ul class="clearfix">
          <li @click="changeClickIndex(item)" v-for="item in menuList" :key="item.id">
            <span class="current" :class="{ clickCurrent: clickIndex.id === item.id }">{{
              item.name
            }}</span>
          </li>
        </ul>
      </div>
    </div>
 
    <div class="contentBox" v-if="isShowCar">
      <div class="carsList">
        <el-card v-for="item in clickIndex.list" :key="item.id" class="box-card">
          <div class="pro_img">
            <img class="leftConetenImg" :src="item.scr" alt="" />
          </div>
          <div class="pro_des">
            <p class="pro_tit">{{ item.title }}</p>
            <p class="pro_tex">{{ item.content }}</p>
            <p>
              <a class="showDetail" @click="toDetail(item)"> 查看详情</a>
            </p>
          </div>
        </el-card>
      </div>
      <div style="text-align: center; margin-bottom: 4em">
        <el-button type="info" plain
          >共 <strong>1</strong>页<strong>{{ clickIndex.list.length }}</strong
          >条记录</el-button
        >
      </div>
    </div>
    <router-view v-if="!isShowCar"></router-view>
  </div>
</template>
 
<script setup lang="ts">
import { onMounted, reactive, ref, watch } from 'vue'
import { useRoute } from 'vue-router'
import { useRouter } from 'vue-router'
import require from '@/utils/require'
const route = useRoute()
const router = useRouter()
onMounted(() => {
  console.log('router', route)
})
const menuList = reactive([
  {
    id: 0,
    name: '23参数微型空气站',
    list: [
      {
        id: 0,
        title: '七星瓢虫网格化空气质量监测系统微型空气站',
        name: 'menuChilderFirst1',
        scr: require('@/assets/image/product1.jpg'),
        content:
          '七星瓢虫网格化空气质量监测系统(23参数微型空气站),主要由探头、供电组件、风速风向传感器以及安装支架等组成。其中探头主要由气体测量模块、光散射颗粒物测量模块、无线...'
      },
      {
        id: 1,
        title: '七星瓢虫VOCs智慧监测系统(固定污染源)',
        name: 'menuChilderFirst2',
        scr: require('@/assets/image/product2.jpg'),
        content:
          '七星瓢虫VOCs智慧在线监测系统FEI-F19是一种使用方便,用以快速检验空气中的非甲烷总烃、苯、甲苯、二甲苯、VOCs总量、温度、湿度、PM2.5、PM10含量的监测系统。...'
      },
      {
        id: 2,
        title: '七星瓢虫VOCs智慧监测系统(厂界)',
        name: 'menuChilderFirst3',
        scr: require('@/assets/image/product3.jpg'),
        content:
          '七星瓢虫 VOCs智慧监测系统FEI-F19是一种使用方便,用以快速监测大气环境多类因子参数的监测系统。...'
      }
    ]
  },
  {
    id: 1,
    name: '大气环境智慧监测指挥平台',
    list: [
      {
        id: 0,
        name: 'menuChilderSecone',
        title: '七星瓢虫网格化空气质量监测系统微型空气站',
        scr: require('@/assets/image/product4.jpg'),
        content:
          '七星瓢虫大气环境智慧监测指挥平台,可将检测仪采集到的数据,通过大屏、PC端和手机APP等媒介将数据展示和一系列交互活动,可达到对环境质量安全的实时监控,主要可实现:客户端...'
      }
    ]
  },
  {
    id: 2,
    name: '无人机数据黑匣子监测系统',
    list: [
      {
        id: 0,
        title: '无人机数据黑匣子监测系统',
        name: 'menuChilderThree',
        scr: require('@/assets/image/product5.jpg'),
        content:
          '无人机环境数据黑匣子监测系统是由FEI-F19气体监测模块+ H920无人机+ E90超清云台相机组成...'
      }
    ]
  },
  {
    id: 3,
    name: '一体化扬尘监测系统',
    list: [
      {
        id: 0,
        title: '一体化扬尘监测系统',
        name: 'menuChilderFour',
        scr: require('@/assets/image/product6.jpg'),
        content:
          '本仪器采用光散射原理工作。空气中的粉尘颗粒物在高能激光束照射下产生光散射效应,散射光强跟粉尘颗粒物浓度成正比,高灵敏的光电二极管接收到散射光,由光信号转换成电信号...'
      }
    ]
  },
  {
    id: 4,
    name: '七星瓢虫温室气体监测系统',
    list: [
      {
        id: 0,
        name: 'menuChilderFirst1',
        title: '七星瓢虫网格化空气质量监测系统微型空气站',
        scr: require('@/assets/image/product1.jpg'),
        content:
          '七星瓢虫网格化空气质量监测系统(23参数微型空气站),主要由探头、供电组件、风速风向传感器以及安装支架等组成。其中探头主要由气体测量模块、光散射颗粒物测量模块、无线...'
      },
      {
        id: 1,
        name: 'menuChilderFirst2',
        title: '七星瓢虫VOCs智慧监测系统(固定污染源)',
        scr: require('@/assets/image/product2.jpg'),
        content:
          '七星瓢虫VOCs智慧在线监测系统FEI-F19是一种使用方便,用以快速检验空气中的非甲烷总烃、苯、甲苯、二甲苯、VOCs总量、温度、湿度、PM2.5、PM10含量的监测系统。...'
      },
      {
        id: 2,
        name: 'menuChilderFirst3',
        title: '七星瓢虫VOCs智慧监测系统(厂界)',
        scr: require('@/assets/image/product3.jpg'),
        content:
          '七星瓢虫 VOCs智慧监测系统FEI-F19是一种使用方便,用以快速监测大气环境多类因子参数的监测系统。...'
      }
    ]
  }
])
const clickIndex = ref(menuList[0])
const isShowCar = ref(true)
let changeClickIndex = (item: any) => {
  clickIndex.value = item
}
let toDetail = (item: any) => {
  isShowCar.value = false
  router.push({ name: 'productDetail', query: { name: item.name, id: item.id, title: item.title } })
}
watch(
  () => router.currentRoute.value,
  (newValue: any) => {
    if (newValue.name === 'product') {
      isShowCar.value = true
    }
    if (newValue.query.id === '31') {
      clickIndex.value = menuList[1]
    } else if (newValue.query.id === '32') {
      clickIndex.value = menuList[2]
    } else if (newValue.query.id === '33') {
      clickIndex.value = menuList[3]
    } else {
      clickIndex.value = menuList[0]
    }
  },
  { immediate: true }
)
</script>
 
<style scoped lang="scss">
.bannerin {
  position: relative;
  overflow: hidden;
  img {
    height: 588px;
    object-fit: cover;
    width: 100%;
  }
}
.menu_sild {
  border-bottom: 1px solid #ebebeb;
  .container {
    width: 1270px;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    .clearfix {
      li {
        cursor: pointer;
        display: inline-block;
        .current {
          display: block;
          padding: 0 30px;
          height: 50px;
          line-height: 50px;
          color: #555;
          &:hover {
            color: #ff575a;
            border-bottom: 2px solid #ff575a;
          }
        }
        .clickCurrent {
          color: #ff575a;
          border-bottom: 2px solid #ff575a;
        }
      }
    }
  }
}
.carsList {
  padding: 50px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  .box-card {
    margin-bottom: 20px;
    padding: 30px 20px;
    width: 45%;
    margin-right: 20px;
    &:hover {
      transition: 1s all;
      box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
    }
    .pro_img,
    .pro_des {
      float: left;
      width: 50%;
      img {
        max-width: 100%;
        vertical-align: middle;
      }
      .pro_tit {
        font-size: 18px;
        line-height: 25px;
        color: #555;
        border-bottom: 1px solid #e5e6e8;
        padding: 6px 0;
        margin-bottom: 20px;
      }
      .pro_tex {
        line-height: 24px;
        color: #666;
        font-size: 12px;
        margin-bottom: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
      }
    }
  }
}
.showDetail {
  color: #ff575a;
  margin-top: 20px;
  border: 1px solid #ff575a;
  padding: 6px 20px;
  border-radius: 4px;
  display: inline-block;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
  &:hover {
    background: #ff575a;
    color: #fff;
    text-decoration: none;
  }
}
.contentBox {
  width: 1270px;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
</style>