监测数据改造导出及查询方案

This commit is contained in:
wgx 2026-03-24 17:14:38 +08:00
parent 896082a999
commit 4388a6ef49
17 changed files with 993 additions and 408 deletions

2
.env
View File

@ -2,7 +2,7 @@
VITE_PORT = 3100
# 网站标题
VITE_GLOB_APP_TITLE = 汾西面源污染在线监测平台
VITE_GLOB_APP_TITLE = 面源污染在线监测平台
VITE_GLOB_APP_ZY = 123123

View File

@ -97,7 +97,6 @@ export function useListPage(options: ListPageOptions) {
if (selectedRowKeys.value && selectedRowKeys.value.length > 0) {
paramsForm['selections'] = selectedRowKeys.value.join(',');
}
console.log()
return handleExportXls(title as string, realUrl, filterObj(paramsForm));
//update-end---author:wangshuai ---date:20220411 for导出新增自定义参数--------------
} else {

View File

@ -67,8 +67,8 @@ export default {
signUpFormTitle: '注册',
forgetFormTitle: '重置密码',
signInTitle: '汾西面源污染在线监测平台',
signInDesc: '汾西面源污染在线监测平台',
signInTitle: '面源污染在线监测平台',
signInDesc: '面源污染在线监测平台',
policy: '隐私政策',
scanSign: `扫码后,即可完成登录`,
scanSuccess: `扫码成功,登录中`,

View File

@ -235,7 +235,7 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
// authentication schemese.g: Bearer
// authenticationScheme: 'Bearer',
authenticationScheme: '',
timeout: 10 * 1000,
timeout: 30000,
// 基础接口地址
// baseURL: globSetting.apiUrl,
headers: { 'Content-Type': ContentTypeEnum.JSON },

View File

@ -2,51 +2,171 @@ import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {optionsListApi} from "/@/api/demo/select";
import {getStationList} from "/@/views/appmana/station/SurvStationInfo.api";
import {getDeviceList} from "/@/views/appmana/deploy/SurvDeviceDeploy.api";
//列表数据
export const columns: BasicColumn[] = [
{
title: '预警时间',
align: "center",
align: 'center',
dataIndex: 'alertTime'
},
{
title: '监测项',
align: "center",
title: '指标',
align: 'center',
dataIndex: 'itemName'
},
{
title: '预警内容',
align: "center",
dataIndex: 'alertContent'
title: '阈值',
align: 'center',
dataIndex: 'normalValue'
},
{
title: '预警所属单位',
align: "center",
dataIndex: 'corpId'
title: '监测值',
align: 'center',
dataIndex: 'survValue'
},
{
title: '触发预警站点',
align: "center",
dataIndex: 'stationName'
title: '单位',
align: 'center',
dataIndex: 'survUnit'
},
{
title: '触发预警设备编号',
align: "center",
dataIndex: 'deployCode'
title: '站点位置',
align: 'center',
dataIndex: 'fullDeviceName'
},
{
title: '推送状态',
align: "center",
dataIndex: 'pushStatus',
title: '严重程度',
align: 'center',
dataIndex: 'readStatus',
customRender: ({text}) => {
return render.renderDict(text, 'surv_push_status');
},
const color = (text === 'low' ? 'blue' : text == 'high' ? 'red' : 'gray');
const txt = (text === 'low' ? '低' : text == 'high' ? '高' : '');
return render.renderTag(txt, color);
}
},
// {
// title: '预警内容',
// align: 'center',
// dataIndex: 'alertContent'
// },
// {
// title: '预警所属单位',
// align: 'center',
// dataIndex: 'corpId'
// },
// {
// title: '触发预警站点',
// align: 'center',
// dataIndex: 'stationName'
// },
// {
// title: '触发预警设备编号',
// align: 'center',
// dataIndex: 'deployCode'
// },
// {
// title: '推送状态',
// align: 'center',
// dataIndex: 'pushStatus',
// customRender: ({ text }) => {
// return render.renderDict(text, 'surv_push_status');
// },
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
field: 'stationCdoe',
component: 'ApiSelect',
label: '选择监测站',
componentProps: {
// more details see /src/components/Form/src/components/ApiSelect.vue
api: getStationList,
params: {
id: 1,
},
resultField: 'list',
// use name as label
labelField: 'stationName',
// use id as value
valueField: 'stationCode',
// not request untill to select
immediate: false,
onChange: (e) => {
console.log('selected:', e);
},
// atfer request callback
onOptionsChange: (options) => {
console.log('get options', options.length, options);
},
},
colProps: {
span: 8,
},
},
{
field: 'deployId',
component: 'ApiSelect',
label: '选择设备',
componentProps: {
// more details see /src/components/Form/src/components/ApiSelect.vue
api: getDeviceList,
params: {
id: 1,
deployTypes: ["soil"]
},
resultField: 'list',
// use name as label
labelField: 'deployDes',
// use id as value
valueField: 'id',
// not request untill to select
immediate: false,
onChange: (e) => {
console.log('selected:', e);
},
// atfer request callback
onOptionsChange: (options) => {
console.log('get options', options.length, options);
},
},
colProps: {
span: 8,
},
},
{
field: 'alertTime',
label: '预警日期',
component: 'RangePicker',
colProps: { span: 8 },
componentProps: {
picker: 'date',
valueFormat: 'YYYY-MM-DD',
},
},
{
field: 'readStatus',
label: '预警级别',
component: 'Select',
colProps: { span: 8 },
componentProps: {
options: [
{
label: '高',
value: 'high',
},
{
label: '低 ',
value: 'low',
},
],
},
},
];
//表单数据

View File

@ -1,33 +1,5 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="设备部署编号" name="deployCode">
<a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deployCode"></a-input>
</a-form-item>
</a-col>
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="预警时间" name="alertTime">
<a-date-picker placeholder="请选择预警时间" v-model:value="queryParam.alertTime" value-format="YYYY-MM-DD HH" :show-time="{ format: 'YYYY-MM-DD HH' }" style="width: 100%" />
</a-form-item>
</a-col>
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
@ -76,7 +48,7 @@
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './SurvAlertRecord.data';
import { columns, searchFormSchema } from './SurvAlertRecord.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvAlertRecord.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvAlertRecordModal from './components/SurvAlertRecordModal.vue'
@ -92,7 +64,7 @@
api: list,
columns,
canResize: false,
useSearchForm: false,
useSearchForm: true,
actionColumn: {
width: 120,
fixed: 'right',
@ -100,9 +72,13 @@
beforeFetch: (params) => {
return Object.assign(params, queryParam);
},
formConfig: {
schemas: searchFormSchema,
fieldMapToTime: [['alertTime', ['alertTime_begin', 'alertTime_end'], 'YYYY-MM-DD']],
},
},
exportConfig: {
name: "surv_alert_record",
name: 'surv_alert_record',
url: getExportUrl,
params: queryParam,
},
@ -121,6 +97,7 @@
sm: { span: 16 },
});
/**
* 新增事件
*/

View File

@ -2,14 +2,39 @@
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="预警所属单位" v-bind="validateInfos.corpId">-->
<!-- <a-input v-model:value="formData.corpName" placeholder="请输入预警所属单位" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="监测项" v-bind="validateInfos.corpId">-->
<!-- <a-input v-model:value="formData.itemName" placeholder="请输入监测项" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-item label="预警所属单位" v-bind="validateInfos.corpId">
<a-input v-model:value="formData.corpName" placeholder="请输入预警所属单位" :disabled="disabled"></a-input>
<a-form-item label="预警时间" v-bind="validateInfos.alertTime">
<a-input v-model:value="formData.alertTime" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="监测项" v-bind="validateInfos.corpId">
<a-input v-model:value="formData.itemName" placeholder="请输入监测项" :disabled="disabled"></a-input>
<a-form-item label="指标" v-bind="validateInfos.itemName">
<a-input v-model:value="formData.itemName" placeholder="请输入预警设备" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="阈值" v-bind="validateInfos.normalValue">
<a-input v-model:value="formData.normalValue" placeholder="请输入预警设备" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="站点位置" v-bind="validateInfos.fullDeviceName">
<a-input v-model:value="formData.fullDeviceName" placeholder="请输入预警设备" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="严重程度" v-bind="validateInfos.readStatus">
<a-input v-model:value="formData.readStatus" placeholder="请输入预警设备" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
@ -17,46 +42,41 @@
<a-input v-model:value="formData.deviceName" placeholder="请输入预警设备" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="触发预警设备编号" v-bind="validateInfos.deviceCode">
<a-input v-model:value="formData.deviceCode" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预警内容" v-bind="validateInfos.alertContent">
<a-input v-model:value="formData.alertContent" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="触发预警设备编号" v-bind="validateInfos.deviceCode">-->
<!-- <a-input v-model:value="formData.deviceCode" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="预警内容" v-bind="validateInfos.alertContent">-->
<!-- <a-input v-model:value="formData.alertContent" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">
<a-form-item label="预警数据类型" v-bind="validateInfos.alertDtataType">
<a-input v-model:value="formData.alertDtataType" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col> -->
<a-col :span="24">
<a-form-item label="触发预警数据ID" v-bind="validateInfos.alertDataId">
<a-input v-model:value="formData.alertDataId" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="触发预警站点" v-bind="validateInfos.stationName">
<a-input v-model:value="formData.stationName" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="触发预警时间" v-bind="validateInfos.alertTime">
<a-input v-model:value="formData.alertTime" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="推送状态" v-bind="validateInfos.pushStatus">
<JDictSelectTag type="select" v-model:value="formData.pushStatus" dictCode="surv_push_status" placeholder="请选择养殖品种" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="原始报文" v-bind="validateInfos.orgMessage">
<a-textarea v-model:value="formData.orgMessage" placeholder="" :disabled="disabled"></a-textarea>
</a-form-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="触发预警数据ID" v-bind="validateInfos.alertDataId">-->
<!-- <a-input v-model:value="formData.alertDataId" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="触发预警站点" v-bind="validateInfos.stationName">-->
<!-- <a-input v-model:value="formData.stationName" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="推送状态" v-bind="validateInfos.pushStatus">-->
<!-- <JDictSelectTag type="select" v-model:value="formData.pushStatus" dictCode="surv_push_status" placeholder="请选择养殖品种" :disabled="disabled"/>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="原始报文" v-bind="validateInfos.orgMessage">-->
<!-- <a-textarea v-model:value="formData.orgMessage" placeholder="" :disabled="disabled"></a-textarea>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
</a-row>
</a-form>
</a-spin>
@ -109,7 +129,7 @@
if(props.formData.disabled === false){
return false;
}else{
return true;
return false;
}
}
return props.formDisabled;

View File

@ -2,6 +2,7 @@ import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {getDeviceList} from "/@/views/appmana/deploy/SurvDeviceDeploy.api";
//列表数据
export const columns: BasicColumn[] = [
// {
@ -17,7 +18,7 @@ export const columns: BasicColumn[] = [
{
title: '设备名称',
align: "center",
dataIndex: 'deployDes',
dataIndex: 'deviceName',
},
{
title: '数据更新时间',
@ -69,6 +70,70 @@ export const columns: BasicColumn[] = [
//查询数据
export const searchFormSchema: FormSchema[] = [
{
field: 'deployId',
component: 'ApiSelect',
label: '监测站点',
componentProps: {
// more details see /src/components/Form/src/components/ApiSelect.vue
api: getDeviceList,
params: {
id: 1,
deployTypes: ["soil"]
},
resultField: 'list',
// use name as label
labelField: 'deployDes',
// use id as value
valueField: 'id',
// not request untill to select
immediate: false,
onChange: (e) => {
console.log('selected:', e);
},
// atfer request callback
onOptionsChange: (options) => {
console.log('get options', options.length, options);
},
},
colProps: {
span: 8,
},
},
{
field: 'dataDateTime',
label: '监测时间',
component: 'RangePicker',
colProps: { span: 8 },
componentProps: {
picker: 'date',
valueFormat: 'YYYY-MM-DD',
},
},
{
field: 'deployType',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'soil',
},
{
field: 'column',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'dataDateTime',
},
{
field: 'order',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'desc',
},
];
//表单数据

View File

@ -1,73 +1,73 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<!-- <div class="jeecg-basic-table-form-container">-->
<!-- <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">-->
<!-- <a-row :gutter="24">-->
<!--&lt;!&ndash; <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">&ndash;&gt;-->
<!--&lt;!&ndash; <a-form-item label="选择监测站" name="stationCode">&ndash;&gt;-->
<!--&lt;!&ndash; <ApiSelect&ndash;&gt;-->
<!--&lt;!&ndash; :api="getStationList"&ndash;&gt;-->
<!--&lt;!&ndash; :params = stationType&ndash;&gt;-->
<!--&lt;!&ndash; showSearch&ndash;&gt;-->
<!--&lt;!&ndash; v-model:value="queryParam.stationCode"&ndash;&gt;-->
<!--&lt;!&ndash; optionFilterProp="label"&ndash;&gt;-->
<!--&lt;!&ndash; resultField="list"&ndash;&gt;-->
<!--&lt;!&ndash; labelField="stationName"&ndash;&gt;-->
<!--&lt;!&ndash; valueField="stationCode"&ndash;&gt;-->
<!--&lt;!&ndash; placeholder="请选择"&ndash;&gt;-->
<!--&lt;!&ndash; />&ndash;&gt;-->
<!--&lt;!&ndash; </a-form-item>&ndash;&gt;-->
<!--&lt;!&ndash; </a-col>&ndash;&gt;-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="选择监测站" name="stationCode">-->
<!-- <a-form-item label="选择设备" name="deployId">-->
<!-- <ApiSelect-->
<!-- :api="getStationList"-->
<!-- :params = stationType-->
<!-- :api="getDeviceList"-->
<!-- :params = deployType-->
<!-- showSearch-->
<!-- v-model:value="queryParam.stationCode"-->
<!-- v-model:value="queryParam.deployId"-->
<!-- optionFilterProp="label"-->
<!-- resultField="list"-->
<!-- labelField="stationName"-->
<!-- valueField="stationCode"-->
<!-- labelField="deployDes"-->
<!-- valueField="id"-->
<!-- placeholder="请选择"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="选择设备" name="deployId">
<ApiSelect
:api="getDeviceList"
:params = deployType
showSearch
v-model:value="queryParam.deployId"
optionFilterProp="label"
resultField="list"
labelField="deployDes"
valueField="id"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="数据更新时间" name="dataDateTime">-->
<!-- <a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <template v-if="toggleSearchStatus">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="设备部署编号" name="deviceCode">-->
<!-- <a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- &lt;!&ndash; <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="污染物类型" name="pollution">-->
<!-- <JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_soil_pullution" placeholder="请选择污染物类型" />-->
<!-- </a-form-item>-->
<!-- </a-col> &ndash;&gt;-->
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="数据更新时间" name="dataDateTime">
<a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="设备部署编号" name="deviceCode">
<a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="污染物类型" name="pollution">
<JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_soil_pullution" placeholder="请选择污染物类型" />
</a-form-item>
</a-col> -->
<!-- </template>-->
<!-- <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>-->
<!-- <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>-->
<!-- <a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />-->
<!-- </a>-->
<!-- </a-col>-->
<!-- </span>-->
</template>
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- </a-row>-->
<!-- </a-form>-->
<!-- </div>-->
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
@ -116,7 +116,7 @@
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './SurvHisdataSoil.data';
import { columns, searchFormSchema } from './SurvHisdataSoil.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvHisdataSoil.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvHisdataSoilModal from './components/SurvHisdataSoilModal.vue'
@ -138,15 +138,19 @@
api: list,
columns,
canResize: false,
useSearchForm: false,
useSearchForm: true,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.deployType = 'soil';
return Object.assign(params, queryParam);
},
formConfig: {
schemas: searchFormSchema,
fieldMapToTime: [['dataDateTime', ['dataDateTime_begin', 'dataDateTime_end'], 'YYYY-MM-DD']],
showAdvancedButton: false,
},
},
exportConfig: {
name: "surv_hisdata_soil",

View File

@ -2,13 +2,15 @@ import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {getDeviceList} from "/@/views/appmana/deploy/SurvDeviceDeploy.api";
import { getStationList } from '../../station/SurvStationInfo.api';
//列表数据
export const columns: BasicColumn[] = [
// {
// title: '站点名称',
// align: "center",
// dataIndex: 'stationName',
// },
{
title: '站点名称',
align: "center",
dataIndex: 'stationName',
},
// {
// title: '设备部署编号',
// align: "center",
@ -17,13 +19,28 @@ export const columns: BasicColumn[] = [
{
title: '设备名称',
align: "center",
dataIndex: 'deployDes',
dataIndex: 'deviceName',
},
{
title: '数据更新时间',
align: "center",
dataIndex: 'dataDateTime',
},
{
title: '水温(℃)',
align: "center",
dataIndex: 'dataWaterTemp'
},
{
title: 'pH',
align: "center",
dataIndex: 'dataWaterPh'
},
{
title: '电导率(uS/cm)',
align: "center",
dataIndex: 'dataWaterDdl'
},
{
title: '浊度(ntu)',
align: "center",
@ -34,21 +51,6 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'dataWaterDo'
},
{
title: 'pH',
align: "center",
dataIndex: 'dataWaterPh'
},
{
title: '水温(℃)',
align: "center",
dataIndex: 'dataWaterTemp'
},
{
title: '电导率(uS/cm)',
align: "center",
dataIndex: 'dataWaterDdl'
},
// {
// title: '数据类型',
@ -64,6 +66,100 @@ export const columns: BasicColumn[] = [
//查询数据
export const searchFormSchema: FormSchema[] = [
{
field: 'stationCode',
component: 'ApiSelect',
label: '监测站点',
componentProps: {
// more details see /src/components/Form/src/components/ApiSelect.vue
api: getStationList,
params: {
id: 1,
stationType: 'watershed'
},
resultField: 'list',
// use name as label
labelField: 'stationName',
// use id as value
valueField: 'stationCode',
// not request untill to select
immediate: false,
onChange: (e) => {
console.log('selected:', e);
},
// atfer request callback
onOptionsChange: (options) => {
console.log('get options', options.length, options);
},
},
colProps: {
span: 8,
},
},
// {
// field: 'deployId',
// component: 'ApiSelect',
// label: '选择设备',
// componentProps: {
// // more details see /src/components/Form/src/components/ApiSelect.vue
// api: getDeviceList,
// params: {
// id: 1,
// deployTypes: ["6_water"]
// },
// resultField: 'list',
// // use name as label
// labelField: 'deployDes',
// // use id as value
// valueField: 'id',
// // not request untill to select
// immediate: false,
// onChange: (e) => {
// console.log('selected:', e);
// },
// // atfer request callback
// onOptionsChange: (options) => {
// console.log('get options', options.length, options);
// },
// },
// colProps: {
// span: 8,
// },
// },
{
field: 'dataDateTime',
label: '监测时间',
component: 'RangePicker',
colProps: { span: 8 },
componentProps: {
picker: 'date',
valueFormat: 'YYYY-MM-DD',
},
},
{
field: 'deployType',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: '6_water',
},
{
field: 'column',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'dataDateTime',
},
{
field: 'order',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'desc',
},
];
//表单数据

View File

@ -1,73 +1,73 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="选择监测站" name="stationCode">
<ApiSelect
:api="getStationList"
:params = stationType
showSearch
v-model:value="queryParam.stationCode"
optionFilterProp="label"
resultField="list"
labelField="stationName"
valueField="stationCode"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<!-- <div class="jeecg-basic-table-form-container">-->
<!-- <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="选择监测站" name="stationCode">-->
<!-- <ApiSelect-->
<!-- :api="getStationList"-->
<!-- :params = stationType-->
<!-- showSearch-->
<!-- v-model:value="queryParam.stationCode"-->
<!-- optionFilterProp="label"-->
<!-- resultField="list"-->
<!-- labelField="stationName"-->
<!-- valueField="stationCode"-->
<!-- placeholder="请选择"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="选择设备" name="deployId">
<ApiSelect
:api="getDeviceList"
:params = deployType
showSearch
v-model:value="queryParam.deployId"
optionFilterProp="label"
resultField="list"
labelField="deployDes"
valueField="id"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="选择设备" name="deployId">-->
<!-- <ApiSelect-->
<!-- :api="getDeviceList"-->
<!-- :params = deployType-->
<!-- showSearch-->
<!-- v-model:value="queryParam.deployId"-->
<!-- optionFilterProp="label"-->
<!-- resultField="list"-->
<!-- labelField="deployDes"-->
<!-- valueField="id"-->
<!-- placeholder="请选择"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="数据更新时间" name="dataDateTime">
<a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="设备部署编号" name="deviceCode">
<a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="污染物类型" name="pollution">
<JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_soil_pullution" placeholder="请选择污染物类型" />
</a-form-item>
</a-col> -->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="数据更新时间" name="dataDateTime">-->
<!-- <a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <template v-if="toggleSearchStatus">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="设备部署编号" name="deviceCode">-->
<!-- <a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- &lt;!&ndash; <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="污染物类型" name="pollution">-->
<!-- <JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_soil_pullution" placeholder="请选择污染物类型" />-->
<!-- </a-form-item>-->
<!-- </a-col> &ndash;&gt;-->
</template>
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
<!-- </template>-->
<!-- <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>-->
<!-- <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>-->
<!-- <a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />-->
<!-- </a>-->
<!-- </a-col>-->
<!-- </span>-->
</a-row>
</a-form>
</div>
<!-- </a-row>-->
<!-- </a-form>-->
<!-- </div>-->
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
@ -116,7 +116,7 @@
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './SurvHisdataSoil.data';
import { columns,searchFormSchema } from './SurvHisdataSoil.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvHisdataSoil.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvHisdataSoilModal from './components/SurvHisdataSoilModal.vue'
@ -138,15 +138,19 @@
api: list,
columns,
canResize:false,
useSearchForm: false,
useSearchForm: true,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.deployType = '6_water';
return Object.assign(params, queryParam);
},
formConfig: {
schemas: searchFormSchema,
fieldMapToTime: [['dataDateTime', ['dataDateTime_begin', 'dataDateTime_end'], 'YYYY-MM-DD']],
showAdvancedButton: false,
},
},
exportConfig: {
name: "surv_hisdata_soil",

View File

@ -2,6 +2,7 @@ import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {getStationList} from "/@/views/appmana/station/SurvStationInfo.api";
//列表数据
export const columns: BasicColumn[] = [
{
@ -59,6 +60,100 @@ export const columns: BasicColumn[] = [
//查询数据
export const searchFormSchema: FormSchema[] = [
{
field: 'stationCode',
component: 'ApiSelect',
label: '监测站点',
componentProps: {
// more details see /src/components/Form/src/components/ApiSelect.vue
api: getStationList,
params: {
id: 1,
stationType: 'livestock'
},
resultField: 'list',
// use name as label
labelField: 'stationName',
// use id as value
valueField: 'stationCode',
// not request untill to select
immediate: false,
onChange: (e) => {
console.log('selected:', e);
},
// atfer request callback
onOptionsChange: (options) => {
console.log('get options', options.length, options);
},
},
colProps: {
span: 8,
},
},
// {
// field: 'deployId',
// component: 'ApiSelect',
// label: '选择设备',
// componentProps: {
// // more details see /src/components/Form/src/components/ApiSelect.vue
// api: getDeviceList,
// params: {
// id: 1,
// deployTypes: ["6_water"]
// },
// resultField: 'list',
// // use name as label
// labelField: 'deployDes',
// // use id as value
// valueField: 'id',
// // not request untill to select
// immediate: false,
// onChange: (e) => {
// console.log('selected:', e);
// },
// // atfer request callback
// onOptionsChange: (options) => {
// console.log('get options', options.length, options);
// },
// },
// colProps: {
// span: 8,
// },
// },
{
field: 'dataDateTime',
label: '监测时间',
component: 'RangePicker',
colProps: { span: 8 },
componentProps: {
picker: 'date',
valueFormat: 'YYYY-MM-DD',
},
},
{
field: 'deployType',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'standard',
},
{
field: 'column',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'dataDateTime',
},
{
field: 'order',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'desc',
},
];
//表单数据

View File

@ -1,55 +1,55 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-form-item label="选择监测站" name="stationCode">
<ApiSelect
:api="getStationList"
:params="stationType"
showSearch
v-model:value="queryParam.stationCode"
optionFilterProp="label"
resultField="list"
labelField="stationName"
valueField="stationCode"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<!-- <div class="jeecg-basic-table-form-container">-->
<!-- <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-form-item label="选择监测站" name="stationCode">-->
<!-- <ApiSelect-->
<!-- :api="getStationList"-->
<!-- :params="stationType"-->
<!-- showSearch-->
<!-- v-model:value="queryParam.stationCode"-->
<!-- optionFilterProp="label"-->
<!-- resultField="list"-->
<!-- labelField="stationName"-->
<!-- valueField="stationCode"-->
<!-- placeholder="请选择"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-form-item label="数据更新时间" name="dataDateTime">
<a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-form-item label="设备部署编号" name="deviceCode">
<a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="污染物类型" name="pollution">
<JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_livestock_pullution" placeholder="请选择污染物类型" />
</a-form-item>
</a-col> -->
</template>
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-form-item label="数据更新时间" name="dataDateTime">-->
<!-- <a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <template v-if="toggleSearchStatus">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-form-item label="设备部署编号" name="deviceCode">-->
<!-- <a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- &lt;!&ndash; <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="污染物类型" name="pollution">-->
<!-- <JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_livestock_pullution" placeholder="请选择污染物类型" />-->
<!-- </a-form-item>-->
<!-- </a-col> &ndash;&gt;-->
<!-- </template>-->
<!-- <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>-->
<!-- <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>-->
<!-- <a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />-->
<!-- </a>-->
<!-- </a-col>-->
<!-- </span>-->
<!-- </a-row>-->
<!-- </a-form>-->
<!-- </div>-->
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
@ -98,7 +98,7 @@
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './SurvHisdataLivestockwater.data';
import { columns,searchFormSchema } from './SurvHisdataLivestockwater.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvHisdataLivestockwater.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvHisdataLivestockwaterModal from './components/SurvHisdataLivestockwaterModal.vue'
@ -118,7 +118,7 @@
api: list,
columns,
canResize:false,
useSearchForm: false,
useSearchForm: true,
actionColumn: {
width: 120,
fixed: 'right',
@ -127,6 +127,11 @@
queryParam.dataType = 'standard';
return Object.assign(params, queryParam);
},
formConfig: {
schemas: searchFormSchema,
fieldMapToTime: [['dataDateTime', ['dataDateTime_begin', 'dataDateTime_end'], 'YYYY-MM-DD']],
showAdvancedButton: false,
},
},
exportConfig: {
name: "surv_hisdata_livestockwater",

View File

@ -2,6 +2,7 @@ import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {getStationList} from "/@/views/appmana/station/SurvStationInfo.api";
//列表数据
export const columns: BasicColumn[] = [
{
@ -83,6 +84,100 @@ export const columns: BasicColumn[] = [
//查询数据
export const searchFormSchema: FormSchema[] = [
{
field: 'stationCode',
component: 'ApiSelect',
label: '监测站点',
componentProps: {
// more details see /src/components/Form/src/components/ApiSelect.vue
api: getStationList,
params: {
id: 1,
stationType: 'orient'
},
resultField: 'list',
// use name as label
labelField: 'stationName',
// use id as value
valueField: 'stationCode',
// not request untill to select
immediate: false,
onChange: (e) => {
console.log('selected:', e);
},
// atfer request callback
onOptionsChange: (options) => {
console.log('get options', options.length, options);
},
},
colProps: {
span: 8,
},
},
// {
// field: 'deployId',
// component: 'ApiSelect',
// label: '选择设备',
// componentProps: {
// // more details see /src/components/Form/src/components/ApiSelect.vue
// api: getDeviceList,
// params: {
// id: 1,
// deployTypes: ["6_water"]
// },
// resultField: 'list',
// // use name as label
// labelField: 'deployDes',
// // use id as value
// valueField: 'id',
// // not request untill to select
// immediate: false,
// onChange: (e) => {
// console.log('selected:', e);
// },
// // atfer request callback
// onOptionsChange: (options) => {
// console.log('get options', options.length, options);
// },
// },
// colProps: {
// span: 8,
// },
// },
{
field: 'dataDateTime',
label: '监测时间',
component: 'RangePicker',
colProps: { span: 8 },
componentProps: {
picker: 'date',
valueFormat: 'YYYY-MM-DD',
},
},
{
field: 'deployType',
label: '',
component: 'JInput',
colProps: { span: 8 },
ifShow: false,
defaultValue: 'orient_no',
},
{
field: 'column',
label: '',
component: 'JInput',
colProps: { span: 8 },
ifShow: false,
defaultValue: 'dataDateTime',
},
{
field: 'order',
label: '',
component: 'JInput',
colProps: { span: 8 },
ifShow: false,
defaultValue: 'desc',
},
];
//表单数据

View File

@ -1,55 +1,55 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-form-item label="选择监测站" name="stationCode">
<ApiSelect
:api="getStationList"
:params="stationType"
showSearch
v-model:value="queryParam.stationCode"
optionFilterProp="label"
resultField="list"
labelField="stationName"
valueField="stationCode"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<!-- <div class="jeecg-basic-table-form-container">-->
<!-- <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-form-item label="选择监测站" name="stationCode">-->
<!-- <ApiSelect-->
<!-- :api="getStationList"-->
<!-- :params="stationType"-->
<!-- showSearch-->
<!-- v-model:value="queryParam.stationCode"-->
<!-- optionFilterProp="label"-->
<!-- resultField="list"-->
<!-- labelField="stationName"-->
<!-- valueField="stationCode"-->
<!-- placeholder="请选择"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-form-item label="数据更新时间" name="dataDateTime">
<a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-form-item label="设备部署编号" name="deviceCode">
<a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="污染物类型" name="pollution">
<JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_orient_pullution" placeholder="请选择污染物类型" />
</a-form-item>
</a-col> -->
</template>
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-form-item label="数据更新时间" name="dataDateTime">-->
<!-- <a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <template v-if="toggleSearchStatus">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-form-item label="设备部署编号" name="deviceCode">-->
<!-- <a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- &lt;!&ndash; <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="污染物类型" name="pollution">-->
<!-- <JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_orient_pullution" placeholder="请选择污染物类型" />-->
<!-- </a-form-item>-->
<!-- </a-col> &ndash;&gt;-->
<!-- </template>-->
<!-- <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>-->
<!-- <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>-->
<!-- <a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />-->
<!-- </a>-->
<!-- </a-col>-->
<!-- </span>-->
<!-- </a-row>-->
<!-- </a-form>-->
<!-- </div>-->
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
@ -98,7 +98,7 @@
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './SurvHisdataOrientwater.data';
import { columns,searchFormSchema } from './SurvHisdataOrientwater.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvHisdataOrientwater.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvHisdataOrientwaterModal from './components/SurvHisdataOrientwaterModal.vue';
@ -118,15 +118,20 @@
api: list,
columns,
canResize: false,
useSearchForm: false,
useSearchForm: true,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
queryParam.dataType = 'orient_no';
// queryParam.dataType = 'orient_no';
return Object.assign(params, queryParam);
},
formConfig: {
schemas: searchFormSchema,
fieldMapToTime: [['dataDateTime', ['dataDateTime_begin', 'dataDateTime_end'], 'YYYY-MM-DD']],
showAdvancedButton: false,
},
},
exportConfig: {
name: 'surv_hisdata_orientwater',

View File

@ -2,6 +2,7 @@ import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {getStationList} from "/@/views/appmana/station/SurvStationInfo.api";
//列表数据
export const columns: BasicColumn[] = [
{
@ -83,6 +84,100 @@ export const columns: BasicColumn[] = [
//查询数据
export const searchFormSchema: FormSchema[] = [
{
field: 'stationCode',
component: 'ApiSelect',
label: '监测站点',
componentProps: {
// more details see /src/components/Form/src/components/ApiSelect.vue
api: getStationList,
params: {
id: 1,
stationType: 'watershed'
},
resultField: 'list',
// use name as label
labelField: 'stationName',
// use id as value
valueField: 'stationCode',
// not request untill to select
immediate: false,
onChange: (e) => {
console.log('selected:', e);
},
// atfer request callback
onOptionsChange: (options) => {
console.log('get options', options.length, options);
},
},
colProps: {
span: 8,
},
},
// {
// field: 'deployId',
// component: 'ApiSelect',
// label: '选择设备',
// componentProps: {
// // more details see /src/components/Form/src/components/ApiSelect.vue
// api: getDeviceList,
// params: {
// id: 1,
// deployTypes: ["6_water"]
// },
// resultField: 'list',
// // use name as label
// labelField: 'deployDes',
// // use id as value
// valueField: 'id',
// // not request untill to select
// immediate: false,
// onChange: (e) => {
// console.log('selected:', e);
// },
// // atfer request callback
// onOptionsChange: (options) => {
// console.log('get options', options.length, options);
// },
// },
// colProps: {
// span: 8,
// },
// },
{
field: 'dataDateTime',
label: '监测时间',
component: 'RangePicker',
colProps: { span: 8 },
componentProps: {
picker: 'date',
valueFormat: 'YYYY-MM-DD',
},
},
{
field: 'deployType',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'standard',
},
{
field: 'column',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'dataDateTime',
},
{
field: 'order',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'desc',
},
];
//表单数据

View File

@ -1,55 +1,55 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-form-item label="选择监测站" name="stationCode">
<ApiSelect
:api="getStationList"
:params="stationType"
showSearch
v-model:value="queryParam.stationCode"
optionFilterProp="label"
resultField="list"
labelField="stationName"
valueField="stationCode"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<!-- <div class="jeecg-basic-table-form-container">-->
<!-- <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-form-item label="选择监测站" name="stationCode">-->
<!-- <ApiSelect-->
<!-- :api="getStationList"-->
<!-- :params="stationType"-->
<!-- showSearch-->
<!-- v-model:value="queryParam.stationCode"-->
<!-- optionFilterProp="label"-->
<!-- resultField="list"-->
<!-- labelField="stationName"-->
<!-- valueField="stationCode"-->
<!-- placeholder="请选择"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-form-item label="数据更新时间" name="dataDateTime">
<a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-form-item label="设备部署编号" name="deviceCode">
<a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="污染物类型" name="pollution">
<JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_orient_pullution" placeholder="请选择污染物类型" />
</a-form-item>
</a-col> -->
</template>
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-form-item label="数据更新时间" name="dataDateTime">-->
<!-- <a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <template v-if="toggleSearchStatus">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-form-item label="设备部署编号" name="deviceCode">-->
<!-- <a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- &lt;!&ndash; <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="污染物类型" name="pollution">-->
<!-- <JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_orient_pullution" placeholder="请选择污染物类型" />-->
<!-- </a-form-item>-->
<!-- </a-col> &ndash;&gt;-->
<!-- </template>-->
<!-- <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">-->
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left: -10px; margin-top: 16px">-->
<!-- <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>-->
<!-- <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>-->
<!-- <a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />-->
<!-- </a>-->
<!-- </a-col>-->
<!-- </span>-->
<!-- </a-row>-->
<!-- </a-form>-->
<!-- </div>-->
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
@ -98,7 +98,7 @@
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './SurvHisdataOrientwater.data';
import { columns,searchFormSchema } from './SurvHisdataOrientwater.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvHisdataOrientwater.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvHisdataOrientwaterModal from './components/SurvHisdataOrientwaterModal.vue';
@ -118,15 +118,20 @@
api: list,
columns,
canResize: false,
useSearchForm: false,
useSearchForm: true,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
queryParam.dataType = 'standard';
// queryParam.dataType = 'standard';
return Object.assign(params, queryParam);
},
formConfig: {
schemas: searchFormSchema,
fieldMapToTime: [['dataDateTime', ['dataDateTime_begin', 'dataDateTime_end'], 'YYYY-MM-DD']],
showAdvancedButton: false,
},
},
exportConfig: {
name: 'surv_hisdata_orientwater',