增加流量计页面

This commit is contained in:
zhangyue 2026-07-30 11:50:19 +08:00
parent 85ddef90ef
commit e798fe0d77
6 changed files with 240 additions and 256 deletions

View File

@ -5,8 +5,8 @@
<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="dataDateTime">
<a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD" style="width: 100%" />
<a-form-item label="数据更新时间" name="startTime">
<a-date-picker placeholder="" v-model:value="queryParam.startTime" value-format="YYYY-MM-DD" style="width: 100%" />
</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">

View File

@ -5,8 +5,8 @@
<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="dataDateTime">
<a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD" style="width: 100%" />
<a-form-item label="数据更新时间" name="startTime">
<a-date-picker placeholder="" v-model:value="queryParam.startTime" value-format="YYYY-MM-DD" style="width: 100%" />
</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">
@ -15,7 +15,7 @@
</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-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">

View File

@ -4,42 +4,41 @@
<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="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-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="startTime">
<a-date-picker placeholder="" v-model:value="queryParam.startTime" value-format="YYYY-MM-DD" 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-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;">
</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">
@ -48,7 +47,6 @@
</a>
</a-col>
</span>
</a-row>
</a-form>
</div>
@ -57,7 +55,7 @@
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
@ -76,18 +74,18 @@
<!--操作栏-->
<template #action="{ record }">
<!-- <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> -->
<TableAction :actions="getDetailAction(record)"/>
<TableAction :actions="getDetailAction(record)" />
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<template #htmlSlot="{ text }">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<template #pcaSlot="{text}">
<template #pcaSlot="{ text }">
{{ getAreaTextByCode(text) }}
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
@ -103,8 +101,8 @@
import { columns } from './SurvHisdataLivestockwater.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvHisdataLivestockwater.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvHisdataLivestockwaterModal from './components/SurvHisdataLivestockwaterModal.vue'
import { ApiSelect} from '/@/components/Form/index';
import SurvHisdataLivestockwaterModal from './components/SurvHisdataLivestockwaterModal.vue';
import { ApiSelect } from '/@/components/Form/index';
import { getStationList } from '../../station/SurvStationInfo.api';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
@ -119,7 +117,7 @@
title: 'surv_hisdata_livestockwater',
api: list,
columns,
canResize:false,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 120,
@ -130,16 +128,17 @@
},
},
exportConfig: {
name: "surv_hisdata_livestockwater",
name: 'surv_hisdata_livestockwater',
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
importConfig: {
url: getImportUrl,
success: handleSuccess,
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
@ -206,10 +205,10 @@
];
}
/**
/**
* 操作栏
*/
function getDetailAction(record) {
function getDetailAction(record) {
return [
{
label: '详情',
@ -226,14 +225,15 @@
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
},
},
];
}
/**
@ -252,10 +252,6 @@
//
reload();
}
</script>
<style lang="less" scoped>
@ -265,14 +261,14 @@
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
.query-group-cust {
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
text-align: center;
}
}
</style>

View File

@ -4,42 +4,41 @@
<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="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-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="startTime">
<a-date-picker placeholder="" v-model:value="queryParam.startTime" value-format="YYYY-MM-DD" 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-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;">
</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">
@ -48,7 +47,6 @@
</a>
</a-col>
</span>
</a-row>
</a-form>
</div>
@ -57,7 +55,7 @@
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
@ -76,18 +74,18 @@
<!--操作栏-->
<template #action="{ record }">
<!-- <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> -->
<TableAction :actions="getDetailAction(record)"/>
<TableAction :actions="getDetailAction(record)" />
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<template #htmlSlot="{ text }">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<template #pcaSlot="{text}">
<template #pcaSlot="{ text }">
{{ getAreaTextByCode(text) }}
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
@ -103,8 +101,8 @@
import { columns } from './SurvTransdataLivestockwater.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvTransdataLivestockwater.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvTransdataLivestockwaterModal from './components/SurvTransdataLivestockwaterModal.vue'
import { ApiSelect} from '/@/components/Form/index';
import SurvTransdataLivestockwaterModal from './components/SurvTransdataLivestockwaterModal.vue';
import { ApiSelect } from '/@/components/Form/index';
import { getStationList } from '../../station/SurvStationInfo.api';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
@ -119,7 +117,7 @@
title: 'surv_transdata_livestockwater',
api: list,
columns,
canResize:false,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 120,
@ -130,16 +128,17 @@
},
},
exportConfig: {
name: "surv_transdata_livestockwater",
name: 'surv_transdata_livestockwater',
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
importConfig: {
url: getImportUrl,
success: handleSuccess,
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
@ -206,10 +205,10 @@
];
}
/**
/**
* 操作栏
*/
function getDetailAction(record) {
function getDetailAction(record) {
return [
{
label: '详情',
@ -218,7 +217,6 @@
];
}
/**
* 下拉操作栏
*/
@ -227,14 +225,15 @@
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
},
},
];
}
/**
@ -253,10 +252,6 @@
//
reload();
}
</script>
<style lang="less" scoped>
@ -266,14 +261,14 @@
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
.query-group-cust {
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
text-align: center;
}
}
</style>

View File

@ -4,42 +4,41 @@
<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="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-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="startTime">
<a-date-picker placeholder="" v-model:value="queryParam.startTime" value-format="YYYY-MM-DD" 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-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;">
</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">
@ -56,7 +55,7 @@
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
@ -75,18 +74,18 @@
<!--操作栏-->
<template #action="{ record }">
<!-- <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> -->
<TableAction :actions="getDetailAction(record)"/>
<TableAction :actions="getDetailAction(record)" />
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<template #htmlSlot="{ text }">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<template #pcaSlot="{text}">
<template #pcaSlot="{ text }">
{{ getAreaTextByCode(text) }}
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
@ -102,8 +101,8 @@
import { columns } from './SurvHisdataOrientwater.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvHisdataOrientwater.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvHisdataOrientwaterModal from './components/SurvHisdataOrientwaterModal.vue'
import { ApiSelect} from '/@/components/Form/index';
import SurvHisdataOrientwaterModal from './components/SurvHisdataOrientwaterModal.vue';
import { ApiSelect } from '/@/components/Form/index';
import { getStationList } from '../../station/SurvStationInfo.api';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
@ -118,7 +117,7 @@
title: 'surv_hisdata_orientwater',
api: list,
columns,
canResize:false,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 120,
@ -129,16 +128,17 @@
},
},
exportConfig: {
name: "surv_hisdata_orientwater",
name: 'surv_hisdata_orientwater',
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
importConfig: {
url: getImportUrl,
success: handleSuccess,
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
@ -205,10 +205,10 @@
];
}
/**
/**
* 操作栏
*/
function getDetailAction(record) {
function getDetailAction(record) {
return [
{
label: '详情',
@ -225,14 +225,15 @@
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
},
},
];
}
/**
@ -251,10 +252,6 @@
//
reload();
}
</script>
<style lang="less" scoped>
@ -264,14 +261,14 @@
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
.query-group-cust {
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
text-align: center;
}
}
</style>

View File

@ -4,42 +4,41 @@
<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="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-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="startTime">
<a-date-picker placeholder="" v-model:value="queryParam.startTime" value-format="YYYY-MM-DD" 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-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;">
</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">
@ -56,7 +55,7 @@
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
@ -75,18 +74,18 @@
<!--操作栏-->
<template #action="{ record }">
<!-- <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> -->
<TableAction :actions="getDetailAction(record)"/>
<TableAction :actions="getDetailAction(record)" />
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<template #htmlSlot="{ text }">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<template #pcaSlot="{text}">
<template #pcaSlot="{ text }">
{{ getAreaTextByCode(text) }}
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
@ -102,8 +101,8 @@
import { columns } from './SurvTransdataOrientwater.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvTransdataOrientwater.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvTransdataOrientwaterModal from './components/SurvTransdataOrientwaterModal.vue'
import { ApiSelect} from '/@/components/Form/index';
import SurvTransdataOrientwaterModal from './components/SurvTransdataOrientwaterModal.vue';
import { ApiSelect } from '/@/components/Form/index';
import { getStationList } from '../../station/SurvStationInfo.api';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
@ -118,7 +117,7 @@
title: 'surv_transdata_orientwater',
api: list,
columns,
canResize:false,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 120,
@ -129,16 +128,17 @@
},
},
exportConfig: {
name: "surv_transdata_orientwater",
name: 'surv_transdata_orientwater',
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
importConfig: {
url: getImportUrl,
success: handleSuccess,
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
@ -193,11 +193,10 @@
(selectedRowKeys.value = []) && reload();
}
/**
/**
* 操作栏
*/
function getDetailAction(record) {
function getDetailAction(record) {
return [
{
label: '详情',
@ -226,14 +225,15 @@
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
},
},
];
}
/**
@ -252,10 +252,6 @@
//
reload();
}
</script>
<style lang="less" scoped>
@ -265,14 +261,14 @@
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
.query-group-cust {
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
text-align: center;
}
}
</style>