数据报表
This commit is contained in:
parent
3bdaded6ac
commit
76056b45a7
|
@ -63,20 +63,20 @@
|
|||
v-model:value="queryParam.isExtract"
|
||||
style="width: 150px">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option value="0">否</a-select-option>
|
||||
<a-select-option value="1">是</a-select-option>
|
||||
<a-select-option value="0">否</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item label="被抽取">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择是否抽取"
|
||||
placeholder="请选择是否被抽取"
|
||||
v-model:value="queryParam.isExtracted"
|
||||
style="width: 150px">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option value="0">否</a-select-option>
|
||||
<a-select-option value="1">是</a-select-option>
|
||||
<a-select-option value="0">否</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
import {defHttp} from '/@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
list = '/heating/heatanalysis/page',
|
||||
companylist = '/heating/thermalcompany/list',
|
||||
heatsourcelist = '/heating/heatsource/list',
|
||||
heatsourcestationlist = '/heating/heatsourcestation/list',
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) =>
|
||||
defHttp.get({url: Api.list, params});
|
||||
|
||||
export const companylist = (params) =>
|
||||
defHttp.get({url: Api.companylist, params});
|
||||
|
||||
export const heatsourcelist = (params) =>
|
||||
defHttp.get({url: Api.heatsourcelist, params});
|
||||
|
||||
export const heatsourcestationlist = (params) =>
|
||||
defHttp.get({url: Api.heatsourcestationlist, params});
|
|
@ -0,0 +1,111 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '热力公司',
|
||||
align: "center",
|
||||
dataIndex: 'view001Name',
|
||||
width:140,
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '热源站',
|
||||
align: "center",
|
||||
dataIndex: 'view002Name',
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '换热站',
|
||||
align: "center",
|
||||
dataIndex: 'view004Name',
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '数据时间',
|
||||
align: "center",
|
||||
dataIndex: 'datatime',
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title:'一次网',
|
||||
width:100,
|
||||
children:[
|
||||
{
|
||||
title: '供水温度',
|
||||
align:"center",
|
||||
width:100,
|
||||
dataIndex: 'view005'
|
||||
},
|
||||
{
|
||||
title: '回水温度',
|
||||
align:"center",
|
||||
width:100,
|
||||
dataIndex: 'view006'
|
||||
},
|
||||
{
|
||||
title: '供水压力',
|
||||
align:"center",
|
||||
width:100,
|
||||
dataIndex: 'view007'
|
||||
},
|
||||
{
|
||||
title: '回水压力',
|
||||
align:"center",
|
||||
width:100,
|
||||
dataIndex: 'view008'
|
||||
}
|
||||
]},
|
||||
{
|
||||
title:'二次网',
|
||||
width:100,
|
||||
children:[
|
||||
{
|
||||
title: '供水温度',
|
||||
align:"center",
|
||||
width:100,
|
||||
dataIndex: 'view009'
|
||||
},
|
||||
{
|
||||
title: '回水温度',
|
||||
align:"center",
|
||||
width:100,
|
||||
dataIndex: 'view010'
|
||||
},
|
||||
{
|
||||
title: '供水压力',
|
||||
align:"center",
|
||||
width:100,
|
||||
dataIndex: 'view011'
|
||||
},
|
||||
{
|
||||
title: '回水压力',
|
||||
align:"center",
|
||||
width:100,
|
||||
dataIndex: 'view012'
|
||||
}
|
||||
]},
|
||||
{
|
||||
title: '上报类型',
|
||||
align: "center",
|
||||
dataIndex: 'reportType',
|
||||
width:100,
|
||||
ellipsis: false,
|
||||
slots: { customRender: 'reportType' },
|
||||
},
|
||||
{
|
||||
title: '已抽取',
|
||||
align: "center",
|
||||
dataIndex: 'isExtract',
|
||||
width:100,
|
||||
ellipsis: false,
|
||||
slots: { customRender: 'isExtract' },
|
||||
},
|
||||
{
|
||||
title: '被抽取',
|
||||
align: "center",
|
||||
dataIndex: 'isExtracted',
|
||||
width:100,
|
||||
ellipsis: false,
|
||||
slots: { customRender: 'isExtracted' },
|
||||
},
|
||||
];
|
|
@ -0,0 +1,294 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="3">
|
||||
<a-form-item label="类型">
|
||||
<a-select ref="select"
|
||||
placeholder="上报类型"
|
||||
v-model:value="queryParam.reportType"
|
||||
style="width: 150px">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option value="1">自动上报</a-select-option>
|
||||
<a-select-option value="2">定时模拟</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="3">
|
||||
<a-form-item label="已抽取">
|
||||
<a-select ref="select"
|
||||
placeholder="是否抽取"
|
||||
v-model:value="queryParam.isExtract"
|
||||
style="width: 150px">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option value="1">是</a-select-option>
|
||||
<a-select-option value="0">否</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="3">
|
||||
<a-form-item label="被抽取">
|
||||
<a-select ref="select"
|
||||
placeholder="是否被抽取"
|
||||
v-model:value="queryParam.isExtracted"
|
||||
style="width: 150px">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option value="1">是</a-select-option>
|
||||
<a-select-option value="0">否</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="4">
|
||||
<a-form-item label="热力公司">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择热力公司"
|
||||
v-model:value="queryParam.view001"
|
||||
style="width: 180px"
|
||||
@focus="focus"
|
||||
@change="handleChange1">
|
||||
<a-select-option :value="item.id" v-for="item in thermalcompany" :key="item.id">{{item.companyName}}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="3">
|
||||
<a-form-item label="热源站">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择热源站"
|
||||
v-model:value="queryParam.view002"
|
||||
style="width: 180px"
|
||||
@focus="focus"
|
||||
@change="handleChange2">
|
||||
<a-select-option :value="item.id" v-for="item in heatsource" :key="item.id">{{item.sourceName}}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="换热站">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择换热站"
|
||||
v-model:value="queryParam.view004"
|
||||
style="width: 250px"
|
||||
@focus="focus"
|
||||
@change="handleChange3">
|
||||
<a-select-option :value="item.id" v-for="item in heatsourcestation" :key="item.id">{{item.stationName}}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="一次供水温度">
|
||||
<a-input placeholder="请输入一次供水温度" v-model:value="queryParam.view005"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="一次回水温度">
|
||||
<a-input placeholder="请输入一次回水温度" v-model:value="queryParam.view006"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="二次供水温度">
|
||||
<a-input placeholder="请输入二次供水温度" v-model:value="queryParam.view009"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="二次回水温度">
|
||||
<a-input placeholder="请输入二次回水温度" v-model:value="queryParam.view010"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="4">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<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-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowClassName="tableRowClassName">
|
||||
<template #reportType="{ record }">
|
||||
<span v-if="record.reportType == 1">上报</span>
|
||||
<a-tag v-else color="purple">模拟</a-tag>
|
||||
</template>
|
||||
<template #isExtract="{ record }">
|
||||
<a-tag v-if="record.isExtract == 1" color="green" style="cursor:pointer" @click="showExtract(record)">是</a-tag>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
<template #isExtracted="{ record }">
|
||||
<a-tag v-if="record.isExtracted > 0" color="pink" style="cursor:pointer" @click="showExtracted(record)">是</a-tag>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
||||
<StationExtractModal ref="registerModal" @success="handleSuccess"></StationExtractModal>
|
||||
<StationExtractedModal ref="registerModalExtracted" @success="handleSuccess"></StationExtractedModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="heatanalysis-heatanalysis" setup>
|
||||
import {ref, reactive, onMounted} from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './Heatanalysis.data';
|
||||
import { list, companylist, heatsourcelist, heatsourcestationlist } from './Heatanalysis.api';
|
||||
import StationExtractModal from './components/extract/StationExtractModal.vue';
|
||||
import StationExtractedModal from './components/extracted/StationExtractedModal.vue';
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const registerModalExtracted = ref();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
clickToRowSelect:false,
|
||||
showActionColumn:false,
|
||||
showIndexColumn:false,
|
||||
tableSetting:{
|
||||
// 是否显示刷新按钮
|
||||
redo: false,
|
||||
// 是否显示尺寸调整按钮
|
||||
size: false,
|
||||
// 是否显示字段调整按钮
|
||||
setting: false,
|
||||
// 是否显示全屏按钮
|
||||
fullScreen: false,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.column = '',params.order = '';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
|
||||
function tableRowClassName(record){
|
||||
if (record.isTimeout == 1 && record.isExtract == 0) {
|
||||
return 'rowStyle';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已抽取列表
|
||||
*/
|
||||
function showExtract(record) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.openModal(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询被抽取列表
|
||||
*/
|
||||
function showExtracted(record) {
|
||||
registerModalExtracted.value.disableSubmit = true;
|
||||
registerModalExtracted.value.openModal(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany(){
|
||||
thermalcompany.value = await companylist();
|
||||
}
|
||||
|
||||
const heatsource = ref();
|
||||
async function getHeatsource(){
|
||||
heatsource.value = await heatsourcelist();
|
||||
}
|
||||
|
||||
const heatsourcestation = ref();
|
||||
async function getHeatsourcestation(){
|
||||
heatsourcestation.value = await heatsourcestationlist();
|
||||
}
|
||||
|
||||
async function handleChange1(record){
|
||||
var params = {companyId:record};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
heatsourcestation.value = [];
|
||||
}
|
||||
async function handleChange2(record){
|
||||
var params = {sourceId:record};
|
||||
heatsourcestation.value = await heatsourcestationlist(params);
|
||||
}
|
||||
function handleChange3(record){
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getThermalcompany();
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
width: calc(50% - 15px);
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-table-title) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.ant-table-tbody .rowStyle) {
|
||||
background-color: rgb(227, 192, 32) !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
|
@ -0,0 +1,16 @@
|
|||
import {defHttp} from '/@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
list1 = '/heating/heatanalysis/onePage',
|
||||
list2 = '/heating/heatanalysis/twoPage',
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list1 = (params) =>
|
||||
defHttp.get({url: Api.list1, params});
|
||||
|
||||
export const list2 = (params) =>
|
||||
defHttp.get({url: Api.list2, params});
|
|
@ -0,0 +1,81 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: 'SIM',
|
||||
align: "center",
|
||||
dataIndex: 'sim',
|
||||
width:120,
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '热力公司',
|
||||
align: "center",
|
||||
dataIndex: 'view001Name',
|
||||
width:140,
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '热源站',
|
||||
align: "center",
|
||||
dataIndex: 'view002Name',
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '换热站',
|
||||
align: "center",
|
||||
dataIndex: 'view004Name',
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '数据时间',
|
||||
align: "center",
|
||||
dataIndex: 'datatime',
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title:'一次网',
|
||||
width:100,
|
||||
children:[
|
||||
{
|
||||
title: '供水温度',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'view005'
|
||||
},
|
||||
{
|
||||
title: '回水温度',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'view006'
|
||||
},
|
||||
]},
|
||||
{
|
||||
title:'二次网',
|
||||
width:100,
|
||||
children:[
|
||||
{
|
||||
title: '供水温度',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'view009'
|
||||
},
|
||||
{
|
||||
title: '回水温度',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'view010'
|
||||
},
|
||||
]},
|
||||
{
|
||||
title: '上报类型',
|
||||
align: "center",
|
||||
dataIndex: 'reportType',
|
||||
width:120,
|
||||
ellipsis: false,
|
||||
slots: { customRender: 'reportType' },
|
||||
},
|
||||
];
|
|
@ -0,0 +1,142 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="4">
|
||||
<span title="热力公司" class="title">SIM: {{queryParam.sim}}</span>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<span title="热力公司" class="title">热力公司: {{queryParam.view001Name}}</span>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<span title="热源站" class="title">热源站: {{queryParam.view001Name}}</span>
|
||||
</a-col>
|
||||
<a-col :lg="7">
|
||||
<span title="换热站" class="title">换热站: {{queryParam.view001Name}}</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<template #reportType="{ record }">
|
||||
<span v-if="record.reportType == 1">上报</span>
|
||||
<a-tag v-else color="purple">模拟</a-tag>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="post.leve-blPostLeve" setup>
|
||||
import {ref, reactive, onMounted, defineExpose} from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import { columns } from './StationExtract.data';
|
||||
import { list1 } from './StationExtract.api';
|
||||
const queryParam = ref<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '抽取的一次网数据',
|
||||
api: list1,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
clickToRowSelect:false,
|
||||
showActionColumn:false,
|
||||
showIndexColumn:false,
|
||||
immediate: false, // 是否立即请求接口
|
||||
striped:true,
|
||||
tableSetting:{
|
||||
// 是否显示刷新按钮
|
||||
redo: false,
|
||||
// 是否显示尺寸调整按钮
|
||||
size: false,
|
||||
// 是否显示字段调整按钮
|
||||
setting: false,
|
||||
// 是否显示全屏按钮
|
||||
fullScreen: false,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.column = '',params.order = '';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
});
|
||||
|
||||
function setParams(record: Recordable){
|
||||
queryParam.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
setParams
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.jeecg-basic-table-form-container{
|
||||
padding-top: 5px;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.jeecg-basic-table-form-container .ant-form {
|
||||
padding: 5px 10px 0px 10px;
|
||||
margin-bottom: 0px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.ant-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.ant-table-wrapper .ant-table.ant-table-middle .ant-table-tbody>tr>th {
|
||||
padding: 2px 2px !important;
|
||||
}
|
||||
.ant-table-wrapper .ant-table.ant-table-middle .ant-table-tbody>tr>td {
|
||||
padding: 2px 2px !important;;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,120 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<template #reportType="{ record }">
|
||||
<span v-if="record.reportType == 1">上报</span>
|
||||
<a-tag v-else color="purple">模拟</a-tag>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="post.leve-blPostLeve" setup>
|
||||
import {ref, reactive, onMounted, defineExpose} from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import { columns } from './StationExtract.data';
|
||||
import { list2 } from './StationExtract.api';
|
||||
const queryParam = ref<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '抽取的二次网数据',
|
||||
api: list2,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
clickToRowSelect:false,
|
||||
showActionColumn:false,
|
||||
showIndexColumn:false,
|
||||
immediate: false,// 是否立即请求接口
|
||||
striped:true,
|
||||
tableSetting:{
|
||||
// 是否显示刷新按钮
|
||||
redo: false,
|
||||
// 是否显示尺寸调整按钮
|
||||
size: false,
|
||||
// 是否显示字段调整按钮
|
||||
setting: false,
|
||||
// 是否显示全屏按钮
|
||||
fullScreen: false,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.column = '',params.order = '';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
});
|
||||
|
||||
function setParams(record: Recordable){
|
||||
queryParam.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
setParams
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.jeecg-basic-table-form-container{
|
||||
padding-top: 5px;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.jeecg-basic-table-form-container .ant-form {
|
||||
padding: 5px 10px 0px 10px;
|
||||
margin-bottom: 0px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.ant-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.ant-table-wrapper .ant-table.ant-table-middle .ant-table-tbody>tr>th {
|
||||
padding: 2px 2px !important;
|
||||
}
|
||||
.ant-table-wrapper .ant-table.ant-table-middle .ant-table-tbody>tr>td {
|
||||
padding: 2px 2px !important;;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,66 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="width" :centered="true" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<StationExtractListOne ref="registerModalOne" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></StationExtractListOne>
|
||||
<StationExtractListTwo ref="registerModalTwo" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></StationExtractListTwo>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import StationExtractListOne from './StationExtractListOne.vue';
|
||||
import StationExtractListTwo from './StationExtractListTwo.vue';
|
||||
import {useModal} from "@/components/Modal";
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(1600);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
//注册model
|
||||
const registerModalOne = ref();
|
||||
const registerModalTwo = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const record = ref<string>({});
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(record: Recordable) {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
function openModal(record: Recordable){
|
||||
title.value = '已抽取数据';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerModalOne.value.setParams(record);
|
||||
registerModalTwo.value.setParams(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
// registerModal.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
emit('success');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
openModal,
|
||||
disableSubmit
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,16 @@
|
|||
import {defHttp} from '/@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
list1 = '/heating/heatanalysis/extractedOnePage',
|
||||
list2 = '/heating/heatanalysis/extractedTwoPage',
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list1 = (params) =>
|
||||
defHttp.get({url: Api.list1, params});
|
||||
|
||||
export const list2 = (params) =>
|
||||
defHttp.get({url: Api.list2, params});
|
|
@ -0,0 +1,81 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: 'SIM',
|
||||
align: "center",
|
||||
dataIndex: 'sim',
|
||||
width:120,
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '热力公司',
|
||||
align: "center",
|
||||
dataIndex: 'view001Name',
|
||||
width:140,
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '热源站',
|
||||
align: "center",
|
||||
dataIndex: 'view002Name',
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '换热站',
|
||||
align: "center",
|
||||
dataIndex: 'view004Name',
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '数据时间',
|
||||
align: "center",
|
||||
dataIndex: 'datatime',
|
||||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title:'一次网',
|
||||
width:100,
|
||||
children:[
|
||||
{
|
||||
title: '供水温度',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'view005'
|
||||
},
|
||||
{
|
||||
title: '回水温度',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'view006'
|
||||
},
|
||||
]},
|
||||
{
|
||||
title:'二次网',
|
||||
width:100,
|
||||
children:[
|
||||
{
|
||||
title: '供水温度',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'view009'
|
||||
},
|
||||
{
|
||||
title: '回水温度',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'view010'
|
||||
},
|
||||
]},
|
||||
{
|
||||
title: '上报类型',
|
||||
align: "center",
|
||||
dataIndex: 'reportType',
|
||||
width:120,
|
||||
ellipsis: false,
|
||||
slots: { customRender: 'reportType' },
|
||||
},
|
||||
];
|
|
@ -0,0 +1,142 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="4">
|
||||
<span title="热力公司" class="title">SIM: {{queryParam.sim}}</span>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<span title="热力公司" class="title">热力公司: {{queryParam.view001Name}}</span>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<span title="热源站" class="title">热源站: {{queryParam.view001Name}}</span>
|
||||
</a-col>
|
||||
<a-col :lg="7">
|
||||
<span title="换热站" class="title">换热站: {{queryParam.view001Name}}</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<template #reportType="{ record }">
|
||||
<span v-if="record.reportType == 1">上报</span>
|
||||
<a-tag v-else color="purple">模拟</a-tag>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="post.leve-blPostLeve" setup>
|
||||
import {ref, reactive, onMounted, defineExpose} from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import { columns } from './StationExtracted.data';
|
||||
import { list1 } from './StationExtracted.api';
|
||||
const queryParam = ref<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '被抽取的一次网数据',
|
||||
api: list1,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
clickToRowSelect:false,
|
||||
showActionColumn:false,
|
||||
showIndexColumn:false,
|
||||
immediate: false, // 是否立即请求接口
|
||||
striped:true,
|
||||
tableSetting:{
|
||||
// 是否显示刷新按钮
|
||||
redo: false,
|
||||
// 是否显示尺寸调整按钮
|
||||
size: false,
|
||||
// 是否显示字段调整按钮
|
||||
setting: false,
|
||||
// 是否显示全屏按钮
|
||||
fullScreen: false,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.column = '',params.order = '';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
});
|
||||
|
||||
function setParams(record: Recordable){
|
||||
queryParam.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
setParams
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.jeecg-basic-table-form-container{
|
||||
padding-top: 5px;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.jeecg-basic-table-form-container .ant-form {
|
||||
padding: 5px 10px 0px 10px;
|
||||
margin-bottom: 0px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.ant-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.ant-table-wrapper .ant-table.ant-table-middle .ant-table-tbody>tr>th {
|
||||
padding: 2px 2px !important;
|
||||
}
|
||||
.ant-table-wrapper .ant-table.ant-table-middle .ant-table-tbody>tr>td {
|
||||
padding: 2px 2px !important;;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,120 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<template #reportType="{ record }">
|
||||
<span v-if="record.reportType == 1">上报</span>
|
||||
<a-tag v-else color="purple">模拟</a-tag>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="post.leve-blPostLeve" setup>
|
||||
import {ref, reactive, onMounted, defineExpose} from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import { columns } from './StationExtracted.data';
|
||||
import { list2 } from './StationExtracted.api';
|
||||
const queryParam = ref<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '被抽取的二次网数据',
|
||||
api: list2,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
clickToRowSelect:false,
|
||||
showActionColumn:false,
|
||||
showIndexColumn:false,
|
||||
immediate: false,// 是否立即请求接口
|
||||
striped:true,
|
||||
tableSetting:{
|
||||
// 是否显示刷新按钮
|
||||
redo: false,
|
||||
// 是否显示尺寸调整按钮
|
||||
size: false,
|
||||
// 是否显示字段调整按钮
|
||||
setting: false,
|
||||
// 是否显示全屏按钮
|
||||
fullScreen: false,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.column = '',params.order = '';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
});
|
||||
|
||||
function setParams(record: Recordable){
|
||||
queryParam.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
setParams
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.jeecg-basic-table-form-container{
|
||||
padding-top: 5px;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.jeecg-basic-table-form-container .ant-form {
|
||||
padding: 5px 10px 0px 10px;
|
||||
margin-bottom: 0px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.ant-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.ant-table-wrapper .ant-table.ant-table-middle .ant-table-tbody>tr>th {
|
||||
padding: 2px 2px !important;
|
||||
}
|
||||
.ant-table-wrapper .ant-table.ant-table-middle .ant-table-tbody>tr>td {
|
||||
padding: 2px 2px !important;;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,66 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="width" :centered="true" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<StationExtractedListOne ref="registerModalOne" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></StationExtractedListOne>
|
||||
<StationExtractedListTwo ref="registerModalTwo" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></StationExtractedListTwo>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import StationExtractedListOne from './StationExtractedListOne.vue';
|
||||
import StationExtractedListTwo from './StationExtractedListTwo.vue';
|
||||
import {useModal} from "@/components/Modal";
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(1600);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
//注册model
|
||||
const registerModalOne = ref();
|
||||
const registerModalTwo = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const record = ref<string>({});
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(record: Recordable) {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
function openModal(record: Recordable){
|
||||
title.value = '被抽取数据';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerModalOne.value.setParams(record);
|
||||
registerModalTwo.value.setParams(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
// registerModal.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
emit('success');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
openModal,
|
||||
disableSubmit
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue