-
-
![]()
-
{{ item.productName }}
+
+ {{ currentDate }}
+ 凤庆县
+
+
+
+
+ 11
+ ℃
+
+
+ 多云
+ 12/-1℃
+
+
+
+
+ 东风
+ 3级
+
+
+ 光照
+ 强
+
+
+ 湿度
+ 85%
+
+
+ 降雨
+ 0mm
+
+
+ 炉温
+ 1201℃
+
+
+
+
+
+
+
+
![]()
+
+ {{ item.productName }}
+
+
+
@@ -84,6 +140,8 @@ export default {
},
data() {
return {
+ currentDate: '',
+ currentBase: 'base1',
//产品列表
productList: [],
//弹窗
@@ -133,9 +191,9 @@ export default {
if (n) {
await this.getProductList();
await this.getDeviceList();
- this.$nextTick(() => {
- this.changePosition();
- });
+ // this.$nextTick(() => {
+ // this.changePosition();
+ // });
}
},
immediate: true,
@@ -152,24 +210,188 @@ export default {
}
},
},
+ created() {
+ this.getDate();
+ },
methods: {
+ getDate() {
+ const date = new Date();
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, '0');
+ const day = String(date.getDate()).padStart(2, '0');
+ this.currentDate = `${year}-${month}-${day}`;
+ },
//获取设备所属产品列表
async getProductList() {
- //排除掉摄像头
+ // 排除掉摄像头
const { rows } = await listDevice({ baseId: this.baseId, isCamera: 0 });
- //将设备中包含的产品整理出来
- let p = rows.map((item) => ({ ...item, imgUrl: item.productImgUrl.split(',')[1] }));
- this.productList = this._.uniqBy(p, 'productId');
+ // //将设备中包含的产品整理出来
+ // let p = rows.map((item) => ({ ...item, imgUrl: item.productImgUrl.split(',')[1] }));
+ // this.productList = this._.uniqBy(p, 'productId');
+
+ const list = [
+ {
+ id: 'base1',
+ productName: '#8010地块',
+ imgUrl: require('../img/land-icon.png'),
+ url: require('../video/ht1.mp4'),
+ videos: [
+ require('../video/ht1.mp4'),
+ require('../video/ht2.mp4'),
+ require('../video/ht3.mp4'),
+ require('../video/ht4.mp4'),
+ require('../video/ht5.mp4'),
+ require('../video/ht6.mp4'),
+ ],
+ type: 'ht',
+ list: [
+ {
+ label: '1号土壤传感器',
+ value: '1',
+ children: [
+ {
+ label: '10cm',
+ t: '13℃',
+ s: '22%',
+ ec: '1.2mS/cm',
+ ph: 5.5,
+ ys: '15,22,150 mg/kg',
+ },
+ {
+ label: '20cm',
+ t: '15℃',
+ s: '26%',
+ ec: '1.3mS/cm',
+ ph: 5.5,
+ ys: '15,18,145 mg/kg',
+ },
+ {
+ label: '30cm',
+ t: '16℃',
+ s: '33%',
+ ec: '1.7mS/cm',
+ ph: 5.5,
+ ys: '11,10,100 mg/kg',
+ },
+ ],
+ },
+ {
+ label: '2号土壤传感器',
+ value: '2',
+ children: [
+ {
+ label: '10cm',
+ t: '10℃',
+ s: '28%',
+ ec: '0.6mS/cm',
+ ph: 6.3,
+ ys: '15,22,150 mg/kg',
+ },
+ {
+ label: '20cm',
+ t: '11℃',
+ s: '22%',
+ ec: '0.9mS/cm',
+ ph: 6.3,
+ ys: '12,18,145 mg/kg',
+ },
+ {
+ label: '30cm',
+ t: '9℃',
+ s: '15%',
+ ec: '1.1mS/cm',
+ ph: 6.3,
+ ys: '11,10,110 mg/kg',
+ },
+ ],
+ },
+ ],
+ },
+ {
+ id: 'base2',
+ productName: '#8023地块',
+ imgUrl: require('../img/land-icon.png'),
+ url: require('../video/cy1.mp4'),
+ videos: [require('../video/cy1.mp4'), require('../video/cy2.mp4'), require('../video/cy3.mp4')],
+ type: 'cy',
+ list: [
+ {
+ label: '3号土壤传感器',
+ value: '1',
+ children: [
+ {
+ label: '10cm',
+ t: '17℃',
+ s: '25%',
+ ec: '1.0mS/cm',
+ ph: 5.9,
+ ys: '15,22,139 mg/kg',
+ },
+ {
+ label: '20cm',
+ t: '15℃',
+ s: '27%',
+ ec: '1.2mS/cm',
+ ph: 5.9,
+ ys: '12,18,126 mg/kg',
+ },
+ {
+ label: '30cm',
+ t: '16℃',
+ s: '33%',
+ ec: '1.3mS/cm',
+ ph: 5.9,
+ ys: '11,16,111 mg/kg',
+ },
+ ],
+ },
+ {
+ label: '5号土壤传感器',
+ value: '2',
+ children: [
+ {
+ label: '10cm',
+ t: '13℃',
+ s: '18%',
+ ec: '0.8mS/cm',
+ ph: 6.2,
+ ys: '19,28,180 mg/kg',
+ },
+ {
+ label: '20cm',
+ t: '12℃',
+ s: '22%',
+ ec: '0.9mS/cm',
+ ph: 6.2,
+ ys: '15,25,170 mg/kg',
+ },
+ {
+ label: '30cm',
+ t: '9℃',
+ s: '15%',
+ ec: '1.1mS/cm',
+ ph: 6.2,
+ ys: '14,20,150 mg/kg',
+ },
+ ],
+ },
+ ],
+ },
+ ];
+ this.productList = list;
+ this.openDialog(list[0]);
},
//打开弹窗
async openDialog(product) {
- this.deviceDialogVisiable = true;
- //根据产品ID获取产品列表
- await this.getDeviceList(product.productId);
- //给第一个设备作为默认选项
- this.curentDeviceId = this.deviceList[0].deviceId;
- this.getDevice(this.curentDeviceId);
+ // this.deviceDialogVisiable = true;
+ // //根据产品ID获取产品列表
+ // await this.getDeviceList(product.productId);
+ // //给第一个设备作为默认选项
+ // this.curentDeviceId = this.deviceList[0].deviceId;
+ // this.getDevice(this.curentDeviceId);
+ this.currentBase = product.id;
+ this.$emit('switch', product);
},
//获取非摄像头设备列表
async getDeviceList(productId) {
@@ -347,30 +569,236 @@ export default {
};
diff --git a/src/views/dataV/video/cy1.mp4 b/src/views/dataV/video/cy1.mp4
new file mode 100644
index 0000000..a94d1ec
Binary files /dev/null and b/src/views/dataV/video/cy1.mp4 differ
diff --git a/src/views/dataV/video/cy2.mp4 b/src/views/dataV/video/cy2.mp4
new file mode 100644
index 0000000..4684f6e
Binary files /dev/null and b/src/views/dataV/video/cy2.mp4 differ
diff --git a/src/views/dataV/video/cy3.mp4 b/src/views/dataV/video/cy3.mp4
new file mode 100644
index 0000000..535547e
Binary files /dev/null and b/src/views/dataV/video/cy3.mp4 differ
diff --git a/src/views/dataV/video/ht1.mp4 b/src/views/dataV/video/ht1.mp4
new file mode 100644
index 0000000..78ca0fc
Binary files /dev/null and b/src/views/dataV/video/ht1.mp4 differ
diff --git a/src/views/dataV/video/ht2.mp4 b/src/views/dataV/video/ht2.mp4
new file mode 100644
index 0000000..53a4d12
Binary files /dev/null and b/src/views/dataV/video/ht2.mp4 differ
diff --git a/src/views/dataV/video/ht3.mp4 b/src/views/dataV/video/ht3.mp4
new file mode 100644
index 0000000..b7aae9e
Binary files /dev/null and b/src/views/dataV/video/ht3.mp4 differ
diff --git a/src/views/dataV/video/ht4.mp4 b/src/views/dataV/video/ht4.mp4
new file mode 100644
index 0000000..0a8ca64
Binary files /dev/null and b/src/views/dataV/video/ht4.mp4 differ
diff --git a/src/views/dataV/video/ht5.mp4 b/src/views/dataV/video/ht5.mp4
new file mode 100644
index 0000000..da750f8
Binary files /dev/null and b/src/views/dataV/video/ht5.mp4 differ
diff --git a/src/views/dataV/video/ht6.mp4 b/src/views/dataV/video/ht6.mp4
new file mode 100644
index 0000000..6573ded
Binary files /dev/null and b/src/views/dataV/video/ht6.mp4 differ
diff --git a/src/views/dataV/video/mp4.png b/src/views/dataV/video/mp4.png
new file mode 100644
index 0000000..f1b683b
Binary files /dev/null and b/src/views/dataV/video/mp4.png differ