|
@@ -38,7 +38,7 @@
|
|
|
</n-space>
|
|
|
</template>
|
|
|
<n-thing>
|
|
|
- <template #header> ID:{{ item.T_id }} </template>
|
|
|
+ <template #header> {{ item.T_id }} </template>
|
|
|
<template #description> {{ item.T_sn }} </template>
|
|
|
</n-thing>
|
|
|
</n-list-item>
|
|
@@ -87,6 +87,7 @@
|
|
|
:options="chartOptions1"
|
|
|
></Chart>
|
|
|
<Chart
|
|
|
+ v-if="checkValues.length !== 0"
|
|
|
ref="chart2"
|
|
|
constructor-type="stockChart"
|
|
|
:options="chartOptions2"
|
|
@@ -125,25 +126,25 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { Chart } from "highcharts-vue";
|
|
|
+import { Chart } from 'highcharts-vue';
|
|
|
import {
|
|
|
deleteTaskData,
|
|
|
editTaskData,
|
|
|
getTaskDataClassList,
|
|
|
getTaskDataList,
|
|
|
-} from "@/api";
|
|
|
-import AddVue from "./AddVue.vue";
|
|
|
-import ImportVue from "./ImportVue.vue";
|
|
|
-import ImportPlatform from "./ImportPlatform.vue";
|
|
|
-import SetVue from "./SetVue.vue";
|
|
|
-import ExportVue from "./ExportVue.vue";
|
|
|
-import TemplateForm from "./TemplateForm.vue";
|
|
|
-import { useWindowSize } from "@vueuse/core";
|
|
|
-import { useNow, useDateFormat } from "@vueuse/core";
|
|
|
-import EditClass from "./EditTaskClass.vue";
|
|
|
-import DeleteClass from "./DeleteTaskClass.vue";
|
|
|
-
|
|
|
-const formatted = useDateFormat(useNow(), "YYYY-MM-DD HH:mm:ss");
|
|
|
+} from '@/api';
|
|
|
+import AddVue from './AddVue.vue';
|
|
|
+import ImportVue from './ImportVue.vue';
|
|
|
+import ImportPlatform from './ImportPlatform.vue';
|
|
|
+import SetVue from './SetVue.vue';
|
|
|
+import ExportVue from './ExportVue.vue';
|
|
|
+import TemplateForm from './TemplateForm.vue';
|
|
|
+import { useWindowSize } from '@vueuse/core';
|
|
|
+import { useNow, useDateFormat } from '@vueuse/core';
|
|
|
+import EditClass from './EditTaskClass.vue';
|
|
|
+import DeleteClass from './DeleteTaskClass.vue';
|
|
|
+
|
|
|
+const formatted = useDateFormat(useNow(), 'YYYY-MM-DD HH:mm:ss');
|
|
|
|
|
|
const notification = useNotification();
|
|
|
|
|
@@ -151,8 +152,8 @@ const { height } = useWindowSize();
|
|
|
|
|
|
const message = useMessage();
|
|
|
|
|
|
-const task = window.sessionStorage.getItem("task")
|
|
|
- ? JSON.parse(window.sessionStorage.getItem("task"))
|
|
|
+const task = window.sessionStorage.getItem('task')
|
|
|
+ ? JSON.parse(window.sessionStorage.getItem('task'))
|
|
|
: {};
|
|
|
|
|
|
const chart1 = ref(null);
|
|
@@ -161,14 +162,14 @@ const chart2 = ref(null);
|
|
|
// Modal 数据源
|
|
|
const modal = reactive({
|
|
|
showModal: false,
|
|
|
- title: "",
|
|
|
+ title: '',
|
|
|
});
|
|
|
|
|
|
// 查询数据
|
|
|
const queryData = reactive({
|
|
|
T_task_id: task.T_task_id,
|
|
|
- T_sn: "",
|
|
|
- T_id: "",
|
|
|
+ T_sn: '',
|
|
|
+ T_id: '',
|
|
|
Time_start: null,
|
|
|
Time_end: null,
|
|
|
page: 1,
|
|
@@ -206,7 +207,7 @@ const onScroll = (e) => {
|
|
|
//
|
|
|
const handleSet = (data) => {
|
|
|
chart1.value.chart.yAxis[0].addPlotLine({
|
|
|
- color: "red",
|
|
|
+ color: 'red',
|
|
|
width: 2,
|
|
|
value: data.tTop,
|
|
|
label: {
|
|
@@ -214,7 +215,7 @@ const handleSet = (data) => {
|
|
|
},
|
|
|
});
|
|
|
chart1.value.chart.yAxis[0].addPlotLine({
|
|
|
- color: "red",
|
|
|
+ color: 'red',
|
|
|
width: 2,
|
|
|
value: data.tBottom,
|
|
|
label: {
|
|
@@ -222,7 +223,7 @@ const handleSet = (data) => {
|
|
|
},
|
|
|
});
|
|
|
chart2.value.chart.yAxis[0].addPlotLine({
|
|
|
- color: "red",
|
|
|
+ color: 'red',
|
|
|
width: 2,
|
|
|
value: data.hTop,
|
|
|
label: {
|
|
@@ -230,7 +231,7 @@ const handleSet = (data) => {
|
|
|
},
|
|
|
});
|
|
|
chart2.value.chart.yAxis[0].addPlotLine({
|
|
|
- color: "red",
|
|
|
+ color: 'red',
|
|
|
width: 2,
|
|
|
value: data.hBottom,
|
|
|
label: {
|
|
@@ -257,10 +258,10 @@ const handleCheckAll = (checked) => {
|
|
|
name: item,
|
|
|
data: data1,
|
|
|
lineWidth: 1,
|
|
|
- cursor: "pointer",
|
|
|
+ cursor: 'pointer',
|
|
|
events: {
|
|
|
click(e) {
|
|
|
- modal.title = "温度";
|
|
|
+ modal.title = '温度';
|
|
|
modal.showModal = true;
|
|
|
formValue.T_t = e.point.y;
|
|
|
queryData.T_id = e.point.series.name;
|
|
@@ -274,10 +275,10 @@ const handleCheckAll = (checked) => {
|
|
|
name: item,
|
|
|
data: data2,
|
|
|
lineWidth: 1,
|
|
|
- cursor: "pointer",
|
|
|
+ cursor: 'pointer',
|
|
|
events: {
|
|
|
click(e) {
|
|
|
- modal.title = "湿度";
|
|
|
+ modal.title = '湿度';
|
|
|
modal.showModal = true;
|
|
|
formValue.T_rh = e.point.y;
|
|
|
queryData.T_id = e.point.series.name;
|
|
@@ -312,16 +313,16 @@ const onUpdateValues = async (values, meta) => {
|
|
|
const data2 = dataList.value
|
|
|
.map((item) => [new Date(item.T_time).getTime(), item.T_rh])
|
|
|
.sort((a, b) => a[0] - b[0]);
|
|
|
- if (meta.actionType === "check") {
|
|
|
+ if (meta.actionType === 'check') {
|
|
|
chart1.value.chart.addSeries({
|
|
|
id: meta.value,
|
|
|
name: meta.value,
|
|
|
data: data1,
|
|
|
lineWidth: 1,
|
|
|
- cursor: "pointer",
|
|
|
+ cursor: 'pointer',
|
|
|
events: {
|
|
|
click(e) {
|
|
|
- modal.title = "温度";
|
|
|
+ modal.title = '温度';
|
|
|
modal.showModal = true;
|
|
|
formValue.T_t = e.point.y;
|
|
|
queryData.T_id = e.point.series.name;
|
|
@@ -335,10 +336,10 @@ const onUpdateValues = async (values, meta) => {
|
|
|
name: meta.value,
|
|
|
data: data2,
|
|
|
lineWidth: 1,
|
|
|
- cursor: "pointer",
|
|
|
+ cursor: 'pointer',
|
|
|
events: {
|
|
|
click(e) {
|
|
|
- modal.title = "湿度";
|
|
|
+ modal.title = '湿度';
|
|
|
modal.showModal = true;
|
|
|
formValue.T_rh = e.point.y;
|
|
|
queryData.T_id = e.point.series.name;
|
|
@@ -357,7 +358,7 @@ const onUpdateValues = async (values, meta) => {
|
|
|
const chartOptions1 = {
|
|
|
xAxis: {
|
|
|
labels: {
|
|
|
- format: "{value:%Y-%m-%d}",
|
|
|
+ format: '{value:%Y-%m-%d %H:%M:%S}',
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -377,7 +378,7 @@ const chartOptions1 = {
|
|
|
},
|
|
|
|
|
|
chart: {
|
|
|
- zoomType: "xy",
|
|
|
+ zoomType: 'xy',
|
|
|
},
|
|
|
|
|
|
boost: {
|
|
@@ -386,12 +387,12 @@ const chartOptions1 = {
|
|
|
},
|
|
|
|
|
|
title: {
|
|
|
- text: "车载冷藏箱",
|
|
|
+ text: '车载冷藏箱',
|
|
|
},
|
|
|
|
|
|
subtitle: {
|
|
|
- align: "left",
|
|
|
- text: "车载冷藏箱",
|
|
|
+ align: 'left',
|
|
|
+ text: '车载冷藏箱',
|
|
|
},
|
|
|
|
|
|
tooltip: {
|
|
@@ -403,7 +404,7 @@ const chartOptions1 = {
|
|
|
const chartOptions2 = {
|
|
|
xAxis: {
|
|
|
labels: {
|
|
|
- format: "{value:%Y-%m-%d}",
|
|
|
+ format: '{value:%Y-%m-%d %H:%M:%S}',
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -422,7 +423,7 @@ const chartOptions2 = {
|
|
|
},
|
|
|
|
|
|
chart: {
|
|
|
- zoomType: "xy",
|
|
|
+ zoomType: 'xy',
|
|
|
},
|
|
|
|
|
|
boost: {
|
|
@@ -431,12 +432,12 @@ const chartOptions2 = {
|
|
|
},
|
|
|
|
|
|
title: {
|
|
|
- text: "车载冷藏箱",
|
|
|
+ text: '车载冷藏箱',
|
|
|
},
|
|
|
|
|
|
subtitle: {
|
|
|
- align: "left",
|
|
|
- text: "车载冷藏箱",
|
|
|
+ align: 'left',
|
|
|
+ text: '车载冷藏箱',
|
|
|
},
|
|
|
|
|
|
tooltip: {
|
|
@@ -490,7 +491,6 @@ const getDataList = async () => {
|
|
|
}
|
|
|
}
|
|
|
const { data: res } = await getTaskDataList(data);
|
|
|
- console.log(res);
|
|
|
dataList.value = res.Data.List || [];
|
|
|
if (queryData.page_z <= res.Data.Page_size) {
|
|
|
const arr = classList.value.filter((item) =>
|
|
@@ -509,7 +509,7 @@ getClassList();
|
|
|
if (task.T_collection_state === 0) {
|
|
|
notification.info({
|
|
|
closable: false,
|
|
|
- title: "未完成",
|
|
|
+ title: '未完成',
|
|
|
meta: `当前时间:${formatted.value}`,
|
|
|
duration: 2500,
|
|
|
keepAliveOnHover: true,
|
|
@@ -517,7 +517,7 @@ if (task.T_collection_state === 0) {
|
|
|
} else if (task.T_collection_state === 1) {
|
|
|
notification.info({
|
|
|
closable: false,
|
|
|
- title: "已完成",
|
|
|
+ title: '已完成',
|
|
|
meta: `当前时间:${formatted.value}`,
|
|
|
duration: 2500,
|
|
|
keepAliveOnHover: true,
|
|
@@ -525,7 +525,7 @@ if (task.T_collection_state === 0) {
|
|
|
} else if (task.T_collection_state === 2) {
|
|
|
notification.info({
|
|
|
closable: false,
|
|
|
- title: "处理中",
|
|
|
+ title: '处理中',
|
|
|
meta: `当前时间:${formatted.value}`,
|
|
|
duration: 2500,
|
|
|
keepAliveOnHover: true,
|
|
@@ -533,7 +533,7 @@ if (task.T_collection_state === 0) {
|
|
|
} else if (task.T_collection_state === 3) {
|
|
|
notification.info({
|
|
|
closable: false,
|
|
|
- title: "已采集-无数据",
|
|
|
+ title: '已采集-无数据',
|
|
|
meta: `当前时间:${formatted.value}`,
|
|
|
duration: 2500,
|
|
|
keepAliveOnHover: true,
|