|
@@ -9,21 +9,12 @@
|
|
|
<n-tab-pane name="1" tab="设备">
|
|
|
<n-list>
|
|
|
<template #header>
|
|
|
- <n-checkbox
|
|
|
- v-model:checked="checked"
|
|
|
- @update:checked="handleSelectAll"
|
|
|
- >
|
|
|
+ <n-checkbox v-model:checked="checked" @update:checked="handleSelectAll">
|
|
|
全选
|
|
|
</n-checkbox>
|
|
|
</template>
|
|
|
- <n-scrollbar
|
|
|
- :style="{ maxHeight: `${height - 310}px` }"
|
|
|
- trigger="none"
|
|
|
- >
|
|
|
- <n-checkbox-group
|
|
|
- v-model:value="checkValues"
|
|
|
- @update:value="handleCheckValues"
|
|
|
- >
|
|
|
+ <n-scrollbar :style="{ maxHeight: `${height - 310}px` }" trigger="none">
|
|
|
+ <n-checkbox-group v-model:value="checkValues" @update:value="handleCheckValues">
|
|
|
<template v-for="item of classList" :key="item.T_id">
|
|
|
<n-list-item class="mr-5">
|
|
|
<template #prefix>
|
|
@@ -31,16 +22,8 @@
|
|
|
</template>
|
|
|
<template #suffix>
|
|
|
<n-space :wrap="false">
|
|
|
- <EditClass
|
|
|
- :task="task"
|
|
|
- :taskClass="item"
|
|
|
- :getClassList="getClassList"
|
|
|
- />
|
|
|
- <DeleteClass
|
|
|
- :task="task"
|
|
|
- :taskClass="item"
|
|
|
- :getClassList="getClassList"
|
|
|
- />
|
|
|
+ <EditClass :task="task" :taskClass="item" :getClassList="getClassList" />
|
|
|
+ <DeleteClass :task="task" :taskClass="item" :getClassList="getClassList" />
|
|
|
</n-space>
|
|
|
</template>
|
|
|
<n-thing>
|
|
@@ -59,12 +42,7 @@
|
|
|
</n-list>
|
|
|
</n-tab-pane>
|
|
|
<n-tab-pane name="2" tab="表单">
|
|
|
- <FormList
|
|
|
- :task="task"
|
|
|
- :class-list="classList"
|
|
|
- :time="time"
|
|
|
- :temporal-interval="temporalInterval"
|
|
|
- />
|
|
|
+ <FormList :task="task" :class-list="classList" :time="time" :temporal-interval="temporalInterval" />
|
|
|
</n-tab-pane>
|
|
|
</n-tabs>
|
|
|
</n-card>
|
|
@@ -72,18 +50,11 @@
|
|
|
<div class="h-full flex flex-col gap-y-3">
|
|
|
<n-space justify="space-between">
|
|
|
<n-input-group>
|
|
|
- <n-date-picker
|
|
|
- format="yyyy-MM-dd HH:mm"
|
|
|
- :time-picker-props="{ format: 'HH:mm' }"
|
|
|
- @update:formatted-value="
|
|
|
- (value) => {
|
|
|
- queryData.Time_start = value[0];
|
|
|
- queryData.Time_end = value[1];
|
|
|
- }
|
|
|
- "
|
|
|
- type="datetimerange"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <n-date-picker format="yyyy-MM-dd HH:mm" :time-picker-props="{ format: 'HH:mm' }" @update:formatted-value="(value) => {
|
|
|
+ queryData.Time_start = value[0];
|
|
|
+ queryData.Time_end = value[1];
|
|
|
+ }
|
|
|
+ " type="datetimerange" clearable />
|
|
|
<n-button type="primary" @click="getDataList">搜索</n-button>
|
|
|
</n-input-group>
|
|
|
<n-space>
|
|
@@ -94,39 +65,21 @@
|
|
|
<SetVue @submit="handleSet" />
|
|
|
</n-space>
|
|
|
</n-space>
|
|
|
- <n-tabs
|
|
|
- type="segment"
|
|
|
- animated
|
|
|
- v-model:value="tabChart"
|
|
|
- @update:value="handleTabChange"
|
|
|
- >
|
|
|
+ <n-tabs type="segment" animated v-model:value="tabChart" @update:value="handleTabChange">
|
|
|
<n-tab-pane name="温度" tab="温度">
|
|
|
- <Chart
|
|
|
- :style="{ minHeight: `${height - 300}px` }"
|
|
|
- ref="chart1"
|
|
|
- constructor-type="stockChart"
|
|
|
- :options="chartOptions1"
|
|
|
- ></Chart>
|
|
|
+ <Chart :style="{ minHeight: `${height - 300}px` }" ref="chart1" constructor-type="stockChart"
|
|
|
+ :options="chartOptions1"></Chart>
|
|
|
</n-tab-pane>
|
|
|
<n-tab-pane name="湿度" tab="湿度">
|
|
|
- <Chart
|
|
|
- :style="{ minHeight: `${height - 300}px` }"
|
|
|
- ref="chart2"
|
|
|
- constructor-type="stockChart"
|
|
|
- :options="chartOptions2"
|
|
|
- ></Chart>
|
|
|
+ <Chart :style="{ minHeight: `${height - 300}px` }" ref="chart2" constructor-type="stockChart"
|
|
|
+ :options="chartOptions2"></Chart>
|
|
|
</n-tab-pane>
|
|
|
</n-tabs>
|
|
|
</div>
|
|
|
</n-card>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <n-modal
|
|
|
- v-model:show="modal.showModal"
|
|
|
- :title="modal.title"
|
|
|
- :show-icon="false"
|
|
|
- preset="dialog"
|
|
|
- >
|
|
|
+ <n-modal v-model:show="modal.showModal" :title="modal.title" :show-icon="false" preset="dialog">
|
|
|
<template v-if="modal.title === '温度'">
|
|
|
<n-form-item show-require-mark>
|
|
|
<n-input v-model:value="formValue.T_t" />
|
|
@@ -163,6 +116,8 @@ import ImportPlatform from './ImportPlatform.vue';
|
|
|
import SetVue from './SetVue.vue';
|
|
|
import ExportVue from './ExportVue.vue';
|
|
|
import FormList from './FormList.vue';
|
|
|
+// import ForData from './formData.vue';
|
|
|
+
|
|
|
import { useWindowSize } from '@vueuse/core';
|
|
|
import { useNow, useDateFormat } from '@vueuse/core';
|
|
|
import EditClass from './EditTaskClass.vue';
|
|
@@ -457,6 +412,7 @@ const chartOptions1 = {
|
|
|
// dateFormat('%Y-%m-%d %H:%M', event.xAxis[0].max)
|
|
|
// );
|
|
|
if (event.xAxis) {
|
|
|
+ console.log('时间区间选择', event.xAxis)
|
|
|
temporalInterval.value = [
|
|
|
dateFormat('%Y-%m-%d %H:%M', event.xAxis[0].min),
|
|
|
dateFormat('%Y-%m-%d %H:%M', event.xAxis[0].max),
|