Compare commits
2 Commits
94ab292232
...
f22aed3793
| Author | SHA1 | Date |
|---|---|---|
|
|
f22aed3793 | |
|
|
77da2278c0 |
|
|
@ -47,7 +47,15 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
]
|
||||
|
||||
export const searchFormSchema: FormSchema[] = []
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'name',
|
||||
label: '名称',
|
||||
component: 'Input',
|
||||
componentProps: {},
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
||||
export const accountFormSchema: FormSchema[] = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="pt-20px">
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleCreate"> 新增基地 </a-button>
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
useSearchForm: false,
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
bordered: true,
|
||||
showIndexColumn: true,
|
||||
|
|
|
|||
|
|
@ -43,7 +43,15 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
]
|
||||
|
||||
export const searchFormSchema: FormSchema[] = []
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'name',
|
||||
label: '名称',
|
||||
component: 'Input',
|
||||
componentProps: {},
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
||||
export const accountFormSchema: FormSchema[] = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<PageWrapper>
|
||||
<a-card title="全市数据统计">
|
||||
<a-card title="全市数据统计" class="px-16px">
|
||||
<!-- <template #extra>
|
||||
<a-button size="small">编辑</a-button>
|
||||
</template> -->
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
</a-card-grid>
|
||||
</a-card>
|
||||
|
||||
<div class="mt-20px">
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<!-- <a-button type="primary" @click="handleCreate"> 新增 </a-button> -->
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
import DeviceDrawer from './DeviceDrawer.vue'
|
||||
import { getCitydataStatistics } from '/@/api/sys/other'
|
||||
import { getTownAgriculturalBasic, deleteGriculturalBasic } from '/@/api/sys/user'
|
||||
import { columns } from './city.data'
|
||||
import { columns, searchFormSchema } from './city.data'
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
||||
import { useDrawer } from '/@/components/Drawer'
|
||||
import { message } from 'ant-design-vue'
|
||||
|
|
@ -69,18 +69,22 @@
|
|||
const CityDate = ref([])
|
||||
const [registerDrawer, { openDrawer }] = useDrawer()
|
||||
const [registerTable, { reload }] = useTable({
|
||||
api: async () => {
|
||||
const { data, meta } = await getTownAgriculturalBasic({ type: 2 })
|
||||
api: async (e) => {
|
||||
const { data, meta } = await getTownAgriculturalBasic({ type: 2, ...e })
|
||||
return {
|
||||
items: data,
|
||||
total: meta?.total,
|
||||
}
|
||||
},
|
||||
columns,
|
||||
useSearchForm: false,
|
||||
useSearchForm: true,
|
||||
showTableSetting: false,
|
||||
bordered: true,
|
||||
showIndexColumn: false,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
})
|
||||
const handleCreate = () => {
|
||||
openDrawer(true, {
|
||||
|
|
@ -119,4 +123,8 @@
|
|||
})
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
:deep(.ant-card) {
|
||||
margin: 0 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
picker: 'year',
|
||||
mode: 'year',
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'quarter',
|
||||
|
|
@ -65,7 +65,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{ label: '第四季度', value: '4' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
// {
|
||||
// field: 'crop',
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
picker: 'year',
|
||||
mode: 'year',
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'quarter',
|
||||
|
|
@ -65,7 +65,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{ label: '第四季度', value: '4' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
// {
|
||||
// field: 'crop',
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
label: '名称',
|
||||
component: 'Input',
|
||||
componentProps: {},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="pt-20px">
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleCreate"> 新增农作物 </a-button>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="pt-20px">
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleCreate"> 新增农作物 </a-button>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
label: '名称',
|
||||
component: 'Input',
|
||||
componentProps: {},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@
|
|||
lowest_price: data.lowest_price,
|
||||
highest_price: data.highest_price,
|
||||
name: data.name,
|
||||
unit: data.unit,
|
||||
})
|
||||
} else {
|
||||
setFieldsValue({
|
||||
unit: '元/吨',
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -44,10 +44,16 @@ export const columns: BasicColumn[] = [
|
|||
{
|
||||
title: '最低价',
|
||||
dataIndex: 'lowest_price',
|
||||
customRender: ({ record: { lowest_price, unit } }) => {
|
||||
return lowest_price + unit
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '最高价',
|
||||
dataIndex: 'highest_price',
|
||||
customRender: ({ record: { highest_price, unit } }) => {
|
||||
return highest_price + unit
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
|
|
@ -75,7 +81,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
picker: 'year',
|
||||
mode: 'year',
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'quarter',
|
||||
|
|
@ -89,7 +95,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{ label: '第四季度', value: '4' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'type',
|
||||
|
|
@ -101,14 +107,14 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{ label: '肥料', value: '2' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'name',
|
||||
label: '名称',
|
||||
required: false,
|
||||
component: 'Input',
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
||||
|
|
@ -165,16 +171,34 @@ export const accountFormSchema: FormSchema[] = [
|
|||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'unit',
|
||||
label: '单位',
|
||||
required: true,
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'lowest_price',
|
||||
label: '最低价',
|
||||
required: true,
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
formatter: (value) => {
|
||||
let reg = /^(-)*(\d+)\.(\d\d).*$/
|
||||
return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, '').replace(reg, '$1$2.$3')
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'highest_price',
|
||||
label: '最高价',
|
||||
required: true,
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
formatter: (value) => {
|
||||
let reg = /^(-)*(\d+)\.(\d\d).*$/
|
||||
return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, '').replace(reg, '$1$2.$3')
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
picker: 'year',
|
||||
mode: 'year',
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'quarter',
|
||||
|
|
@ -56,7 +56,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{ label: '第四季度', value: '4' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
||||
|
|
@ -100,5 +100,11 @@ export const accountFormSchema: FormSchema[] = [
|
|||
label: '价格',
|
||||
required: true,
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
formatter: (value) => {
|
||||
let reg = /^(-)*(\d+)\.(\d\d).*$/
|
||||
return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, '').replace(reg, '$1$2.$3')
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -37,6 +37,11 @@
|
|||
year: dayjs(data.year.toString()),
|
||||
area: data.area,
|
||||
sales: data.sales,
|
||||
unit: data.unit,
|
||||
})
|
||||
} else {
|
||||
setFieldsValue({
|
||||
unit: '吨',
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ export const columns: BasicColumn[] = [
|
|||
{
|
||||
title: '销量',
|
||||
dataIndex: 'sales',
|
||||
customRender: ({ record: { sales, unit } }) => {
|
||||
return sales + unit
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
|
|
@ -46,7 +49,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
picker: 'year',
|
||||
mode: 'year',
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'quarter',
|
||||
|
|
@ -60,7 +63,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{ label: '第四季度', value: '4' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
||||
|
|
@ -110,5 +113,17 @@ export const accountFormSchema: FormSchema[] = [
|
|||
label: '销量',
|
||||
required: true,
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
formatter: (value) => {
|
||||
let reg = /^(-)*(\d+)\.(\d\d).*$/
|
||||
return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, '').replace(reg, '$1$2.$3')
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'unit',
|
||||
label: '单位',
|
||||
required: true,
|
||||
component: 'Input',
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -38,6 +38,15 @@
|
|||
area: data.area,
|
||||
product_output: data.product_output,
|
||||
product_value: data.product_value,
|
||||
area_unit: data.area_unit,
|
||||
product_output_unit: data.product_output_unit,
|
||||
product_value_unit: data.product_value_unit,
|
||||
})
|
||||
} else {
|
||||
setFieldsValue({
|
||||
area_unit: '千亩',
|
||||
product_output_unit: '吨',
|
||||
product_value_unit: '万元',
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -15,14 +15,23 @@ export const columns: BasicColumn[] = [
|
|||
{
|
||||
title: '面积',
|
||||
dataIndex: 'area',
|
||||
customRender: ({ record: { area, area_unit } }) => {
|
||||
return area + area_unit
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '产量',
|
||||
dataIndex: 'product_output',
|
||||
customRender: ({ record: { product_output, product_output_unit } }) => {
|
||||
return product_output + product_output_unit
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '产值',
|
||||
dataIndex: 'product_value',
|
||||
customRender: ({ record: { product_value, product_value_unit } }) => {
|
||||
return product_value + product_value_unit
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
|
|
@ -50,7 +59,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
picker: 'year',
|
||||
mode: 'year',
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'quarter',
|
||||
|
|
@ -64,7 +73,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{ label: '第四季度', value: '4' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
||||
|
|
@ -108,17 +117,56 @@ export const accountFormSchema: FormSchema[] = [
|
|||
label: '面积',
|
||||
required: true,
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
formatter: (value) => {
|
||||
let reg = /^(-)*(\d+)\.(\d\d).*$/
|
||||
return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, '').replace(reg, '$1$2.$3')
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
field: 'product_output',
|
||||
label: '产量',
|
||||
required: true,
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
formatter: (value) => {
|
||||
let reg = /^(-)*(\d+)\.(\d\d).*$/
|
||||
return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, '').replace(reg, '$1$2.$3')
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
field: 'product_value',
|
||||
label: '产值',
|
||||
required: true,
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
formatter: (value) => {
|
||||
let reg = /^(-)*(\d+)\.(\d\d).*$/
|
||||
return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, '').replace(reg, '$1$2.$3')
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
field: 'area_unit',
|
||||
label: '面积单位',
|
||||
required: true,
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'product_output_unit',
|
||||
label: '产量单位',
|
||||
required: true,
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'product_value_unit',
|
||||
label: '产值单位',
|
||||
required: true,
|
||||
component: 'Input',
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'type',
|
||||
|
|
@ -99,7 +99,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
return formatDataByObject(res)
|
||||
},
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
|
@ -113,13 +113,13 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{ label: '故障', value: '3' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'point',
|
||||
label: '监控点',
|
||||
component: 'Input',
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">空气湿度</div>
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">空气湿度</div>
|
||||
<div class="ml-8px text-14px">%RH</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">空气温度</div>
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">空气温度</div>
|
||||
<div class="ml-8px text-14px">℃</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">CO2</div>
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">CO2</div>
|
||||
<div class="ml-8px text-14px">ppm</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">光照强度</div>
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">光照强度</div>
|
||||
<div class="ml-8px text-14px">Lux</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">噪声</div>
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">噪声</div>
|
||||
<div class="ml-8px text-14px">db</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">PM10</div>
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">PM10</div>
|
||||
<div class="ml-8px text-14px">ug/m3</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">PM25</div>
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">PM25</div>
|
||||
<div class="ml-8px text-14px">ug/m3</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">风力</div>
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">风力</div>
|
||||
<div class="ml-8px text-14px">m/s</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">降雨量</div>
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">降雨量</div>
|
||||
<div class="ml-8px text-14px">mm</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,16 @@
|
|||
if (props.company === 'day') return 'HH:mm'
|
||||
return 'YYYY-MM-DD'
|
||||
})
|
||||
const windDirection = {
|
||||
0: '北风',
|
||||
1: '东北风',
|
||||
2: '东风',
|
||||
3: '东南风',
|
||||
4: '南风',
|
||||
5: '西南风',
|
||||
6: '西风',
|
||||
7: '西北风',
|
||||
}
|
||||
const chartRef = ref<HTMLDivElement | null>(null)
|
||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
|
||||
watch(
|
||||
|
|
@ -60,6 +70,14 @@
|
|||
color: '#019680',
|
||||
},
|
||||
},
|
||||
formatter: (value) => {
|
||||
const data = value[0]
|
||||
let str = `${data.name}<br/>`
|
||||
str += `${data.marker}<span style="width:50px;display: inline-block;">${
|
||||
windDirection[data.value]
|
||||
}</span>`
|
||||
return str
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
|
|
@ -73,6 +91,9 @@
|
|||
},
|
||||
yAxis: [
|
||||
{
|
||||
splitNumber: 7,
|
||||
min: 0,
|
||||
max: 7,
|
||||
type: 'value',
|
||||
axisTick: {
|
||||
show: false,
|
||||
|
|
@ -82,9 +103,14 @@
|
|||
type: 'dashed',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: (value) => {
|
||||
return windDirection[value]
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
grid: { left: '2%', right: '4%', top: '2 %', bottom: 0, containLabel: true },
|
||||
grid: { left: '2%', right: '4%', top: '20px', bottom: 0, containLabel: true },
|
||||
series: [
|
||||
{
|
||||
symbolSize: 20,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">风速</div>
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">风速</div>
|
||||
<div class="ml-8px text-14px">m/s</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
|
|||
|
|
@ -135,14 +135,14 @@
|
|||
:company="formState.time_interval"
|
||||
/>
|
||||
<!-- 风力 -->
|
||||
<Pressure
|
||||
<!-- <Pressure
|
||||
:extra="name"
|
||||
:data="statisData.wind_degree"
|
||||
class="md:w-386px w-full !mr-4 !mb-4"
|
||||
:loading="false"
|
||||
:time="formState.time"
|
||||
:company="formState.time_interval"
|
||||
/>
|
||||
/> -->
|
||||
<!-- 风向 -->
|
||||
<WindDirection
|
||||
:extra="name"
|
||||
|
|
@ -206,7 +206,7 @@
|
|||
import LightIntensity from './components/LightIntensity.vue'
|
||||
import Rainfall from './components/Rainfall.vue'
|
||||
import WindSpeed from './components/WindSpeed.vue'
|
||||
import Pressure from './components/Pressure.vue'
|
||||
// import Pressure from './components/Pressure.vue'
|
||||
import WindDirection from './components/WindDirection.vue'
|
||||
import Noise from './components/Noise.vue'
|
||||
import PM10 from './components/PM10.vue'
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
componentProps: ({ formModel, formActionType }) => {
|
||||
return {
|
||||
placeholder: '基地',
|
||||
allowClear: false,
|
||||
allowClear: true,
|
||||
api: getGriculturalDeviceBasic,
|
||||
params: {
|
||||
device_type: 1,
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
label: '',
|
||||
colProps,
|
||||
componentProps: {
|
||||
allowClear: false,
|
||||
allowClear: true,
|
||||
placeholder: '检测点',
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">{{ title }}</div>
|
||||
<!-- <div class="text-18px font-extrabold">{{ title }}</div> -->
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">{{ title }}</div>
|
||||
<div class="ml-8px text-14px">{{ unit }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
@ -40,6 +44,10 @@
|
|||
type: Object as PropType<object>,
|
||||
default: () => {},
|
||||
},
|
||||
unit: {
|
||||
type: String as PropType<string>,
|
||||
default: '',
|
||||
},
|
||||
})
|
||||
const format = computed(() => {
|
||||
if (props.time) {
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@
|
|||
:title="item.lable"
|
||||
:data="statisData[item.value]"
|
||||
:time="formState.time"
|
||||
:unit="item.unit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -207,36 +208,42 @@
|
|||
value: 'conductivity',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: 'us/cm',
|
||||
},
|
||||
{
|
||||
lable: '湿度',
|
||||
value: 'humidity',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: '%RH',
|
||||
},
|
||||
{
|
||||
lable: '温度',
|
||||
value: 'temperature',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: '℃',
|
||||
},
|
||||
{
|
||||
lable: '氮',
|
||||
value: 'k',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: 'mg/kg',
|
||||
},
|
||||
{
|
||||
lable: '磷',
|
||||
value: 'n',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: 'mg/kg',
|
||||
},
|
||||
{
|
||||
lable: '钾',
|
||||
value: 'p',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: 'mg/kg',
|
||||
},
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
<template>
|
||||
<Card :loading="loading">
|
||||
<template #title>
|
||||
<div class="text-18px font-extrabold">{{ title }}</div>
|
||||
<!-- <div class="text-18px font-extrabold">{{ title }}</div> -->
|
||||
<div class="flex items-end">
|
||||
<div class="text-18px font-extrabold">{{ title }}</div>
|
||||
<div class="ml-8px text-14px">{{ unit }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra></template>
|
||||
<div ref="chartRef" :style="{ width, height }"></div>
|
||||
|
|
@ -40,6 +44,10 @@
|
|||
type: Object as PropType<object>,
|
||||
default: () => {},
|
||||
},
|
||||
unit: {
|
||||
type: String as PropType<string>,
|
||||
default: '',
|
||||
},
|
||||
})
|
||||
const format = computed(() => {
|
||||
if (props.time) {
|
||||
|
|
|
|||
|
|
@ -99,11 +99,13 @@
|
|||
<div v-for="(item, index) in tagMenus" :key="index">
|
||||
<LineCharts
|
||||
:company="formState.time_interval"
|
||||
class="md:w-386px w-full !mr-4 !mb-4"
|
||||
:extra="extra"
|
||||
:loading="false"
|
||||
:title="item.lable"
|
||||
:data="statisData[item.value]"
|
||||
:time="formState.time"
|
||||
:unit="item.unit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -206,36 +208,42 @@
|
|||
value: 'chlorine',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: 'mg/L',
|
||||
},
|
||||
{
|
||||
lable: '电导率',
|
||||
value: 'conductivity',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: 'us/cm',
|
||||
},
|
||||
{
|
||||
lable: '氧气',
|
||||
value: 'oxygen',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: 'mg/L',
|
||||
},
|
||||
{
|
||||
lable: 'PH',
|
||||
value: 'ph',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: '',
|
||||
},
|
||||
{
|
||||
lable: '温度',
|
||||
value: 'temperature',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: '℃',
|
||||
},
|
||||
{
|
||||
lable: '浊度',
|
||||
value: 'turbidity',
|
||||
icon: icon1,
|
||||
icon1: uicon1,
|
||||
unit: 'NTU',
|
||||
},
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{ label: 'delete', value: 'delete' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: '[start_time, end_time]',
|
||||
|
|
@ -116,6 +116,6 @@ export const searchFormSchema: FormSchema[] = [
|
|||
format: 'YYYY-MM-DD',
|
||||
placeholder: ['开始时间', '结束时间'],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{ label: 'delete', value: 'delete' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: '[start_time, end_time]',
|
||||
|
|
@ -51,6 +51,6 @@ export const searchFormSchema: FormSchema[] = [
|
|||
format: 'YYYY-MM-DD',
|
||||
placeholder: ['开始时间', '结束时间'],
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue