parent
18f34e8d57
commit
9f3e8227ee
|
|
@ -8,7 +8,7 @@
|
|||
<a-col :lg="6">
|
||||
<a-form-item name="sim">
|
||||
<template #label><span title="电话号">电话号</span></template>
|
||||
<JInput v-model:value="queryParam.sim" placeholder="请输入电话号"/>
|
||||
<JInput v-model:value="queryParam.sim" placeholder="请输入电话号" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
|
|
@ -21,14 +21,15 @@
|
|||
<a-col :lg="6">
|
||||
<a-form-item name="sourceId">
|
||||
<template #label><span title="锅炉房">锅炉房</span></template>
|
||||
<j-dict-select-tag placeholder="请选择锅炉房" v-model:value="queryParam.sourceId" :dictCode="`bl_heatsource,source_name,id ,company_id = '${queryParam.companyId || -1}' `"
|
||||
allow-clear />
|
||||
<j-dict-select-tag placeholder="请选择锅炉房" v-model:value="queryParam.sourceId"
|
||||
:dictCode="`bl_heatsource,source_name,id ,company_id = '${queryParam.companyId || -1}' `" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="stationId">
|
||||
<template #label><span title="换热站">换热站</span></template>
|
||||
<j-dict-select-tag placeholder="请选择换热站" v-model:value="queryParam.stationId" :dictCode="`bl_heatsourcestation,station_name,id,source_id = '${queryParam.sourceId || -1}' `"
|
||||
<j-dict-select-tag placeholder="请选择换热站" v-model:value="queryParam.stationId"
|
||||
:dictCode="`bl_heatsourcestation,station_name,id,source_id = '${queryParam.sourceId || -1}' `"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
@ -63,10 +64,10 @@
|
|||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'analysisrule:bl_analysis_rule:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown> -->
|
||||
<a-button v-auth="'analysisrule:bl_analysis_rule:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown> -->
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<a-col :lg="6">
|
||||
<a-form-item name="sim">
|
||||
<template #label><span title="电话号">电话号</span></template>
|
||||
<JInput v-model:value="queryParam.sim" placeholder="请输入电话号"/>
|
||||
<JInput v-model:value="queryParam.sim" placeholder="请输入电话号" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
|
|
@ -21,14 +21,15 @@
|
|||
<a-col :lg="6">
|
||||
<a-form-item name="sourceId">
|
||||
<template #label><span title="锅炉房">锅炉房</span></template>
|
||||
<j-dict-select-tag placeholder="请选择锅炉房" v-model:value="queryParam.sourceId" :dictCode="glfDictCode"
|
||||
allow-clear />
|
||||
<j-dict-select-tag placeholder="请选择锅炉房" v-model:value="queryParam.sourceId"
|
||||
:dictCode="`bl_heatsource,source_name,id ,company_id = '${queryParam.companyId || -1}' `" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="stationId">
|
||||
<template #label><span title="换热站">换热站</span></template>
|
||||
<j-dict-select-tag placeholder="请选择换热站" v-model:value="queryParam.stationId" :dictCode="hrzDictCode"
|
||||
<j-dict-select-tag placeholder="请选择换热站" v-model:value="queryParam.stationId"
|
||||
:dictCode="`bl_heatsourcestation,station_name,id,source_id = '${queryParam.sourceId || -1}' `"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
@ -45,7 +46,7 @@
|
|||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'analysisrule:bl_analysis_rule:add'" @click="handleAdd"
|
||||
|
|
@ -63,10 +64,10 @@
|
|||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'analysisrule:bl_analysis_rule:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown> -->
|
||||
<a-button v-auth="'analysisrule:bl_analysis_rule:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown> -->
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,76 @@
|
|||
import {defHttp} from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/heating/heatanalysis/page',
|
||||
save='/heating/heatanalysis/add',
|
||||
edit='/heating/heatanalysis/edit',
|
||||
deleteOne = '/heating/heatanalysis/delete',
|
||||
deleteBatch = '/heating/heatanalysis/deleteBatch',
|
||||
importExcel = '/heating/heatanalysis/importExcel',
|
||||
exportXls = '/heating/heatanalysis/exportXls',
|
||||
companylist = '/heating/thermalcompany/list',
|
||||
heatsourcelist = '/heating/heatsource/list',
|
||||
heatsourcestationlist = '/heating/heatsourcestation/list',
|
||||
}
|
||||
/**
|
||||
* 导出apif
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
/**
|
||||
* 列表接口
|
||||
* @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});
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({url: url, params});
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
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: '流量设备SN',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view031',
|
||||
},
|
||||
{
|
||||
title: '流量数据上报时间',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view032',
|
||||
},
|
||||
{
|
||||
title: '仪表ID',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view033',
|
||||
},
|
||||
{
|
||||
title: '数据是否有效',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view034',
|
||||
},
|
||||
{
|
||||
title: '供水温度',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view035',
|
||||
},
|
||||
{
|
||||
title: '回水温度',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view036',
|
||||
},
|
||||
{
|
||||
title: '瞬时流量',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view037',
|
||||
},
|
||||
{
|
||||
title: '正累积流量',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view038',
|
||||
},
|
||||
{
|
||||
title: '负累积流量',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view039',
|
||||
},
|
||||
{
|
||||
title: '净累积流量',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view040',
|
||||
},
|
||||
{
|
||||
title: '瞬时热量',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view041',
|
||||
},
|
||||
{
|
||||
title: '正累积热量',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view042',
|
||||
},
|
||||
{
|
||||
title: '负累积热量',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view043',
|
||||
},
|
||||
{
|
||||
title: '净累积热量',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view044',
|
||||
},
|
||||
{
|
||||
title: '流体速度',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view045',
|
||||
},
|
||||
{
|
||||
title: '流量因子',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view046',
|
||||
},
|
||||
{
|
||||
title: '热量因子',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'view047',
|
||||
},
|
||||
];
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [];
|
||||
|
|
@ -0,0 +1,218 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<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="5">
|
||||
<a-form-item label="热力公司">
|
||||
<a-select ref="select" placeholder="请选择热力公司" v-model:value="queryParam.view001" style="width: 150px"
|
||||
@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="5">
|
||||
<a-form-item label="热源站">
|
||||
<a-select ref="select" placeholder="请选择热源站" v-model:value="queryParam.view002" style="width: 150px"
|
||||
@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">
|
||||
<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 preIcon="ant-design:sync-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</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-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
<template v-if="column.dataIndex === 'view034'">
|
||||
<span v-if="record.view034 == 0">有效</span>
|
||||
<span v-else>无效</span>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</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';
|
||||
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = 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) => {
|
||||
queryParam.value.regionType = '郊县'
|
||||
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 = [];
|
||||
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: 8px;
|
||||
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(.jeecg-basic-table-form-container) {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
:deep(.ant-form-item) {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -37,7 +37,7 @@ export const columns: BasicColumn[] = [
|
|||
title: '供水温度',
|
||||
align:"center",
|
||||
width:120,
|
||||
dataIndex: 'view005'
|
||||
dataIndex: 'view005',
|
||||
},
|
||||
{
|
||||
title: '回水温度',
|
||||
|
|
|
|||
|
|
@ -6,37 +6,28 @@
|
|||
<a-row :gutter="24">
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="热力公司">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择热力公司"
|
||||
v-model:value="queryParam.view001"
|
||||
style="width: 150px"
|
||||
@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 ref="select" placeholder="请选择热力公司" v-model:value="queryParam.view001" style="width: 150px"
|
||||
@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="5">
|
||||
<a-form-item label="热源站">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择热源站"
|
||||
v-model:value="queryParam.view002"
|
||||
style="width: 150px"
|
||||
@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 ref="select" placeholder="请选择热源站" v-model:value="queryParam.view002" style="width: 150px"
|
||||
@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 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>
|
||||
|
|
@ -48,7 +39,7 @@
|
|||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
<!-- <a-col :lg="5">
|
||||
<!-- <a-col :lg="5">
|
||||
<a-form-item label="一次供水温度">
|
||||
<a-input placeholder="请输入一次供水温度" v-model:value="queryParam.view005"></a-input>
|
||||
</a-form-item>
|
||||
|
|
@ -73,16 +64,28 @@
|
|||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
<template v-if="column.dataIndex === 'view005'">
|
||||
<span v-if="record.fromFlow == 1">{{ record.view005 }}</span>
|
||||
<span v-else-if="record.fromFlow == 0">{{ record.view035 }}</span>
|
||||
<span v-else>{{ record.view005 || record.view035 || 0 }}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'view006'">
|
||||
<span v-if="record.fromFlow == 0">{{ record.view006 }}</span>
|
||||
<span v-else-if="record.fromFlow == 1">{{ record.view036 }}</span>
|
||||
<span v-else>{{ record.view005 || record.view035 || 0 }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="heatanalysis-heatanalysis" setup>
|
||||
import {ref, reactive, onMounted} from 'vue';
|
||||
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 { list, companylist, heatsourcelist, heatsourcestationlist } from './Heatanalysis.api';
|
||||
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
|
|
@ -93,12 +96,12 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
title: '',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
clickToRowSelect:false,
|
||||
showActionColumn:false,
|
||||
showIndexColumn:false,
|
||||
tableSetting:{
|
||||
clickToRowSelect: false,
|
||||
showActionColumn: false,
|
||||
showIndexColumn: false,
|
||||
tableSetting: {
|
||||
// 是否显示刷新按钮
|
||||
redo: false,
|
||||
// 是否显示尺寸调整按钮
|
||||
|
|
@ -110,7 +113,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
},
|
||||
beforeFetch: (params) => {
|
||||
queryParam.value.regionType = '城区'
|
||||
params.column = '',params.order = '';//新生成的默认不带排序
|
||||
params.column = '', params.order = '';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
|
|
@ -152,30 +155,30 @@ function searchReset() {
|
|||
}
|
||||
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany(){
|
||||
async function getThermalcompany() {
|
||||
thermalcompany.value = await companylist();
|
||||
}
|
||||
|
||||
const heatsource = ref();
|
||||
async function getHeatsource(){
|
||||
async function getHeatsource() {
|
||||
heatsource.value = await heatsourcelist();
|
||||
}
|
||||
|
||||
const heatsourcestation = ref();
|
||||
async function getHeatsourcestation(){
|
||||
async function getHeatsourcestation() {
|
||||
heatsourcestation.value = await heatsourcestationlist();
|
||||
}
|
||||
|
||||
async function handleChange1(record){
|
||||
var params = {companyId:record};
|
||||
async function handleChange1(record) {
|
||||
var params = { companyId: record };
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
heatsourcestation.value = [];
|
||||
}
|
||||
async function handleChange2(record){
|
||||
var params = {sourceId:record};
|
||||
async function handleChange2(record) {
|
||||
var params = { sourceId: record };
|
||||
heatsourcestation.value = await heatsourcestationlist(params);
|
||||
}
|
||||
function handleChange3(record){
|
||||
function handleChange3(record) {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
|
@ -194,11 +197,13 @@ onMounted(() => {
|
|||
margin-bottom: 8px;
|
||||
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
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<a-select ref="select" placeholder="请选择热力公司" v-model:value="queryParam.view001" style="width: 150px"
|
||||
@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-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<a-select ref="select" placeholder="请选择热源站" v-model:value="queryParam.view002" style="width: 150px"
|
||||
@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-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
<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-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
@ -64,6 +64,18 @@
|
|||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
<template v-if="column.dataIndex === 'view005'">
|
||||
<span v-if="record.fromFlow == 1">{{ record.view005 }}</span>
|
||||
<span v-else-if="record.fromFlow == 0">{{ record.view035 }}</span>
|
||||
<span v-else>{{ record.view005 || record.view035 || 0 }}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'view006'">
|
||||
<span v-if="record.fromFlow == 0">{{ record.view006 }}</span>
|
||||
<span v-else-if="record.fromFlow == 1">{{ record.view036 }}</span>
|
||||
<span v-else>{{ record.view005 || record.view035 || 0 }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue