菜单拆分为城区/郊县
This commit is contained in:
parent
1336a0ac01
commit
45234a297e
|
|
@ -16,37 +16,28 @@
|
|||
</a-col>
|
||||
<a-col :lg="4">
|
||||
<a-form-item label="热力公司">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择热力公司"
|
||||
v-model:value="queryParam.companyCompanyId"
|
||||
style="width: 150px"
|
||||
@focus="focus"
|
||||
@change="handleChange1">
|
||||
<a-select-option :value="item.companyId" v-for="item in thermalcompany" :key="item.id">{{item.companyName}}</a-select-option>
|
||||
<a-select ref="select" placeholder="请选择热力公司" v-model:value="queryParam.companyCompanyId"
|
||||
style="width: 150px" @focus="focus" @change="handleChange1">
|
||||
<a-select-option :value="item.companyId" v-for="item in thermalcompany"
|
||||
:key="item.id">{{ item.companyName }}</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.sourceSourceId"
|
||||
style="width: 150px"
|
||||
@focus="focus"
|
||||
@change="handleChange2">
|
||||
<a-select-option :value="item.sourceId" v-for="item in heatsource" :key="item.id">{{item.sourceName}}</a-select-option>
|
||||
<a-select ref="select" placeholder="请选择热源站" v-model:value="queryParam.sourceSourceId" style="width: 150px"
|
||||
@focus="focus" @change="handleChange2">
|
||||
<a-select-option :value="item.sourceId" 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.stationStationId"
|
||||
style="width: 250px"
|
||||
@focus="focus"
|
||||
@change="handleChange3">
|
||||
<a-select-option :value="item.stationId" v-for="item in heatsourcestation" :key="item.id">{{item.stationName}}</a-select-option>
|
||||
<a-select ref="select" placeholder="请选择换热站" v-model:value="queryParam.stationStationId"
|
||||
style="width: 250px" @focus="focus" @change="handleChange3">
|
||||
<a-select-option :value="item.stationId" v-for="item in heatsourcestation"
|
||||
:key="item.id">{{ item.stationName }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
@ -61,29 +52,30 @@
|
|||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'heating:bl_simconfig:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<!-- <a-button type="primary" v-auth="'heating:bl_simconfig:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<a-button type="primary" v-auth="'heating:bl_simconfig:add'" @click="handleAdd"
|
||||
preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<!-- <a-button type="primary" v-auth="'heating:bl_simconfig:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'heating:bl_simconfig:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'heating:bl_simconfig:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'heating:bl_simconfig:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)"/>
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<!--字段回显插槽-->
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
|
|
@ -95,194 +87,195 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="heating-simconfig" setup>
|
||||
import {ref, reactive, computed, unref, onMounted} from 'vue';
|
||||
import {BasicTable, useTable, TableAction} from '/@/components/Table';
|
||||
import {useModal} from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import SimconfigModal from './components/SimconfigModal.vue'
|
||||
import {columns, searchFormSchema} from './Simconfig.data';
|
||||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,companylist,heatsourcelist,heatsourcestationlist } from './Simconfig.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const queryParam = ref<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
const userStore = useUserStore();
|
||||
const registerModal = ref();
|
||||
//注册table数据
|
||||
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
|
||||
tableProps:{
|
||||
title: '设备信息管理',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
formConfig: {
|
||||
//labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter:true,
|
||||
showAdvancedButton:true,
|
||||
fieldMapToNumber: [
|
||||
],
|
||||
fieldMapToTime: [
|
||||
],
|
||||
},
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed:'right'
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
import { ref, reactive, computed, unref, onMounted } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import SimconfigModal from './components/SimconfigModal.vue'
|
||||
import { columns, searchFormSchema } from './Simconfig.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, companylist, heatsourcelist, heatsourcestationlist } from './Simconfig.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const queryParam = ref<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
const userStore = useUserStore();
|
||||
const registerModal = ref();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '设备信息管理',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
formConfig: {
|
||||
//labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter: true,
|
||||
showAdvancedButton: true,
|
||||
fieldMapToNumber: [
|
||||
],
|
||||
fieldMapToTime: [
|
||||
],
|
||||
},
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right'
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
queryParam.value.regionType = '城区'
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "设备信息管理",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
})
|
||||
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'heating:bl_simconfig:edit'
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
exportConfig: {
|
||||
name:"设备信息管理",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
})
|
||||
|
||||
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({id: record.id}, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ids: selectedRowKeys.value}, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record){
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'heating:bl_simconfig:edit'
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'heating:bl_simconfig:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
auth: 'heating:bl_simconfig:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany(){
|
||||
thermalcompany.value = await companylist();
|
||||
}
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany() {
|
||||
thermalcompany.value = await companylist();
|
||||
}
|
||||
|
||||
const heatsource = ref();
|
||||
async function getHeatsource(){
|
||||
heatsource.value = await heatsourcelist();
|
||||
}
|
||||
const heatsource = ref();
|
||||
async function getHeatsource() {
|
||||
heatsource.value = await heatsourcelist();
|
||||
}
|
||||
|
||||
const heatsourcestation = ref();
|
||||
async function getHeatsourcestation(){
|
||||
heatsourcestation.value = await heatsourcestationlist();
|
||||
heatsource.value = [];
|
||||
}
|
||||
const heatsourcestation = ref();
|
||||
async function getHeatsourcestation() {
|
||||
heatsourcestation.value = await heatsourcestationlist();
|
||||
heatsource.value = [];
|
||||
}
|
||||
|
||||
async function handleChange1(record){
|
||||
var params = {companyCompanyId:record};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
heatsourcestation.value = [];
|
||||
queryParam.value.sourceSourceId = '';
|
||||
queryParam.value.stationStationId = '';
|
||||
}
|
||||
async function handleChange2(record){
|
||||
var params = {sourceSourceId:record};
|
||||
heatsourcestation.value = await heatsourcestationlist(params);
|
||||
queryParam.value.stationStationId = '';
|
||||
}
|
||||
function handleChange3(record){
|
||||
}
|
||||
async function handleChange1(record) {
|
||||
var params = { companyCompanyId: record };
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
heatsourcestation.value = [];
|
||||
queryParam.value.sourceSourceId = '';
|
||||
queryParam.value.stationStationId = '';
|
||||
}
|
||||
async function handleChange2(record) {
|
||||
var params = { sourceSourceId: record };
|
||||
heatsourcestation.value = await heatsourcestationlist(params);
|
||||
queryParam.value.stationStationId = '';
|
||||
}
|
||||
function handleChange3(record) {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getThermalcompany();
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
});
|
||||
onMounted(() => {
|
||||
getThermalcompany();
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.jeecg-basic-table-form-container) {
|
||||
padding: 0px;
|
||||
}
|
||||
:deep(.jeecg-basic-table-form-container) {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
:deep(.ant-form-item) {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
:deep(.ant-form-item) {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,281 @@
|
|||
<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="3">
|
||||
<a-form-item label="电话号">
|
||||
<a-input placeholder="请输入电话号" v-model:value="queryParam.sim"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="3">
|
||||
<a-form-item label="设备号">
|
||||
<a-input placeholder="请输入设备号" v-model:value="queryParam.code"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="4">
|
||||
<a-form-item label="热力公司">
|
||||
<a-select ref="select" placeholder="请选择热力公司" v-model:value="queryParam.companyCompanyId"
|
||||
style="width: 150px" @focus="focus" @change="handleChange1">
|
||||
<a-select-option :value="item.companyId" v-for="item in thermalcompany"
|
||||
:key="item.id">{{ item.companyName }}</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.sourceSourceId" style="width: 150px"
|
||||
@focus="focus" @change="handleChange2">
|
||||
<a-select-option :value="item.sourceId" 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.stationStationId"
|
||||
style="width: 250px" @focus="focus" @change="handleChange3">
|
||||
<a-select-option :value="item.stationId" 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="overflow: hidden" class="table-page-search-submitButtons">
|
||||
<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>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'heating:bl_simconfig:add'" @click="handleAdd"
|
||||
preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<!-- <a-button type="primary" v-auth="'heating:bl_simconfig:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'heating:bl_simconfig:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'heating:bl_simconfig:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<!--字段回显插槽-->
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<SimconfigModal ref="registerModal" @success="handleSuccess"></SimconfigModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="heating-simconfig" setup>
|
||||
import { ref, reactive, computed, unref, onMounted } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import SimconfigModal from './components/SimconfigModal.vue'
|
||||
import { columns, searchFormSchema } from './Simconfig.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, companylist, heatsourcelist, heatsourcestationlist } from './Simconfig.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const queryParam = ref<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
const userStore = useUserStore();
|
||||
const registerModal = ref();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '设备信息管理',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
formConfig: {
|
||||
//labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter: true,
|
||||
showAdvancedButton: true,
|
||||
fieldMapToNumber: [
|
||||
],
|
||||
fieldMapToTime: [
|
||||
],
|
||||
},
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right'
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
queryParam.value.regionType = '郊县'
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "设备信息管理",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
})
|
||||
|
||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'heating:bl_simconfig:edit'
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'heating:bl_simconfig:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
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();
|
||||
heatsource.value = [];
|
||||
}
|
||||
|
||||
async function handleChange1(record) {
|
||||
var params = { companyCompanyId: record };
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
heatsourcestation.value = [];
|
||||
queryParam.value.sourceSourceId = '';
|
||||
queryParam.value.stationStationId = '';
|
||||
}
|
||||
async function handleChange2(record) {
|
||||
var params = { sourceSourceId: record };
|
||||
heatsourcestation.value = await heatsourcestationlist(params);
|
||||
queryParam.value.stationStationId = '';
|
||||
}
|
||||
function handleChange3(record) {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getThermalcompany();
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.jeecg-basic-table-form-container) {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
:deep(.ant-form-item) {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -109,6 +109,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
fullScreen: false,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
queryParam.value.regionType = '城区'
|
||||
params.column = '',params.order = '';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,212 @@
|
|||
<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">
|
||||
</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>
|
||||
|
|
@ -6,34 +6,28 @@
|
|||
<a-row :gutter="24">
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="热力公司">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择热力公司"
|
||||
v-model:value="queryParam.view001"
|
||||
@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" @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"
|
||||
@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" @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"
|
||||
@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" @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>
|
||||
|
|
@ -52,12 +46,14 @@
|
|||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="开始时间">
|
||||
<a-date-picker placeholder="请选择开始时间" v-model:value="queryParam.SDate" :disabledDate="startDisabledDate" @change="handleStartChange" show-time style="width: 100%" allow-clear />
|
||||
<a-date-picker placeholder="请选择开始时间" v-model:value="queryParam.SDate" :disabledDate="startDisabledDate"
|
||||
@change="handleStartChange" show-time style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="结束时间">
|
||||
<a-date-picker placeholder="请选择结束时间" v-model:value="queryParam.EDate" :disabledDate="endDisabledDate" @change="handleEndChange" show-time style="width: 100%" allow-clear />
|
||||
<a-date-picker placeholder="请选择结束时间" v-model:value="queryParam.EDate" :disabledDate="endDisabledDate"
|
||||
@change="handleEndChange" show-time style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
|
@ -70,11 +66,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="heatanalysis-heatanalysis" setup>
|
||||
import {ref, reactive, onMounted, watch, unref} from 'vue';
|
||||
import { ref, reactive, onMounted, watch, unref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './HeatanalysisHistory.data';
|
||||
import { list, companylist, heatsourcelist, heatsourcestationlist } from './HeatanalysisHistory.api';
|
||||
import { list, companylist, heatsourcelist, heatsourcestationlist } from './HeatanalysisHistory.api';
|
||||
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
|
|
@ -85,12 +81,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,
|
||||
// 是否显示尺寸调整按钮
|
||||
|
|
@ -101,7 +97,8 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
fullScreen: false,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.column = '',params.order = '';//新生成的默认不带排序
|
||||
queryParam.value.regionType = '城区'
|
||||
params.column = '', params.order = '';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
|
|
@ -143,30 +140,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) {
|
||||
}
|
||||
|
||||
// 禁用开始日期的规则
|
||||
|
|
@ -238,11 +235,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
|
||||
|
|
@ -260,5 +259,4 @@ onMounted(() => {
|
|||
:deep(.ant-form-item) {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,262 @@
|
|||
<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" @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" @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" @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.sim"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="开始时间">
|
||||
<a-date-picker placeholder="请选择开始时间" v-model:value="queryParam.SDate" :disabledDate="startDisabledDate"
|
||||
@change="handleStartChange" show-time style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<a-form-item label="结束时间">
|
||||
<a-date-picker placeholder="请选择结束时间" v-model:value="queryParam.EDate" :disabledDate="endDisabledDate"
|
||||
@change="handleEndChange" show-time style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="heatanalysis-heatanalysis" setup>
|
||||
import { ref, reactive, onMounted, watch, unref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './HeatanalysisHistory.data';
|
||||
import { list, companylist, heatsourcelist, heatsourcestationlist } from './HeatanalysisHistory.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) {
|
||||
}
|
||||
|
||||
// 禁用开始日期的规则
|
||||
function startDisabledDate(current) {
|
||||
// 结束日期未选时不做限制
|
||||
if (!queryParam.value.EDate) return false;
|
||||
return !current.isSame(queryParam.value.EDate, 'month') ||
|
||||
current.isAfter(queryParam.value.EDate, 'day');
|
||||
}
|
||||
|
||||
// 禁用结束日期的规则
|
||||
function endDisabledDate(current) {
|
||||
// 开始日期未选时禁用所有
|
||||
if (!queryParam.value.SDate) return true;
|
||||
return !current.isSame(queryParam.value.SDate, 'month') ||
|
||||
current.isBefore(queryParam.value.SDate, 'day');
|
||||
}
|
||||
|
||||
// 开始日期变化时处理
|
||||
function handleStartChange(momentObj) {
|
||||
if (momentObj && queryParam.value.EDate &&
|
||||
!momentObj.isSame(queryParam.value.EDate, 'month')) {
|
||||
queryParam.value.EDate = null;
|
||||
}
|
||||
}
|
||||
|
||||
// 结束日期变化时处理
|
||||
function handleEndChange(momentObj) {
|
||||
if (momentObj && queryParam.value.SDate &&
|
||||
!momentObj.isSame(queryParam.value.SDate, 'month')) {
|
||||
queryParam.value.SDate = null;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getThermalcompany();
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
|
||||
watch(
|
||||
() => queryParam.value.SDate,
|
||||
async (newVal) => {
|
||||
if (newVal && queryParam.value.EDate &&
|
||||
(!newVal.isSame(queryParam.value.EDate, 'month') || newVal > queryParam.value.EDate)) {
|
||||
queryParam.value.EDate = null;
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
// 更新 父部门 选项
|
||||
watch(
|
||||
() => queryParam.value.EDate,
|
||||
async (newVal) => {
|
||||
if (newVal && queryParam.value.SDate &&
|
||||
(!newVal.isSame(queryParam.value.SDate, 'month') || newVal < queryParam.value.SDate)) {
|
||||
queryParam.value.SDate = null;
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
});
|
||||
|
||||
</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>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = '添加热源';
|
||||
title.value = '添加锅炉房';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@
|
|||
let contextMenu = new BMap.ContextMenu();//当用户右键点击元素时,会出现上下文菜单
|
||||
let txtMenuItem = [
|
||||
{
|
||||
text : '添加热源',
|
||||
text : '添加锅炉房',
|
||||
callback : function(p) {
|
||||
addSourceModalRef.value.disableSubmit = false;
|
||||
addSourceModalRef.value.edit(p);
|
||||
|
|
|
|||
|
|
@ -6,46 +6,34 @@
|
|||
<a-row :gutter="24">
|
||||
<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 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 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 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="4">
|
||||
<a-form-item label="上报类型">
|
||||
<a-select ref="select"
|
||||
placeholder="上报类型"
|
||||
v-model:value="queryParam.reportType"
|
||||
style="width: 150px">
|
||||
<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>
|
||||
|
|
@ -54,10 +42,7 @@
|
|||
</a-col>
|
||||
<a-col :lg="4">
|
||||
<a-form-item label="是否抽取">
|
||||
<a-select ref="select"
|
||||
placeholder="是否抽取"
|
||||
v-model:value="queryParam.isExtract"
|
||||
style="width: 150px">
|
||||
<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>
|
||||
|
|
@ -66,10 +51,7 @@
|
|||
</a-col>
|
||||
<a-col :lg="4">
|
||||
<a-form-item label="是否被抽取">
|
||||
<a-select ref="select"
|
||||
placeholder="是否被抽取"
|
||||
v-model:value="queryParam.isExtracted"
|
||||
style="width: 150px">
|
||||
<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>
|
||||
|
|
@ -77,28 +59,29 @@
|
|||
</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="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;margin-bottom: 8px;margin-top: 12px; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<span style="float: left;margin-bottom: 8px;margin-top: 12px; 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>
|
||||
|
|
@ -111,14 +94,16 @@
|
|||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowClassName="tableRowClassName">
|
||||
<template #reportType="{ record }">
|
||||
<a-switch v-model:checked="record.reportType" :checked-value="1" :un-checked-value="2" checked-children="上报" un-checked-children="模拟" @change="editReportType(record)"/>
|
||||
<a-switch v-model:checked="record.reportType" :checked-value="1" :un-checked-value="2" checked-children="上报"
|
||||
un-checked-children="模拟" @change="editReportType(record)" />
|
||||
</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>
|
||||
<a-tag v-if="record.isExtracted > 0" color="pink" style="cursor:pointer"
|
||||
@click="showExtracted(record)">是</a-tag>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
|
@ -129,15 +114,15 @@
|
|||
</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 , updateType} from './Heatanalysis.api';
|
||||
import { list, companylist, heatsourcelist, heatsourcestationlist, updateType } from './Heatanalysis.api';
|
||||
import StationExtractModal from './components/extract/StationExtractModal.vue';
|
||||
import StationExtractedModal from './components/extracted/StationExtractedModal.vue';
|
||||
import {saveOrUpdate} from "@/views/heating/heatanalysis/Heatanalysis.api";
|
||||
import {useMessage} from "@/hooks/web/useMessage";
|
||||
import { saveOrUpdate } from "@/views/heating/heatanalysis/Heatanalysis.api";
|
||||
import { useMessage } from "@/hooks/web/useMessage";
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
|
|
@ -149,12 +134,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,
|
||||
// 是否显示尺寸调整按钮
|
||||
|
|
@ -165,7 +150,8 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
fullScreen: false,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.column = '',params.order = '';//新生成的默认不带排序
|
||||
queryParam.value.regionType = '城区'
|
||||
params.column = '', params.order = '';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
|
|
@ -180,19 +166,19 @@ const wrapperCol = reactive({
|
|||
sm: { span: 16 },
|
||||
});
|
||||
|
||||
function tableRowClassName(record){
|
||||
function tableRowClassName(record) {
|
||||
if (record.isTimeout == 1 && record.isExtract == 0) {
|
||||
return 'rowStyle';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function editReportType(record){
|
||||
function editReportType(record) {
|
||||
const model = reactive<Record<string, any>>({
|
||||
id: record.id,
|
||||
reportType: record.reportType
|
||||
})
|
||||
updateType(model).then((res) => {})
|
||||
updateType(model).then((res) => { })
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -238,30 +224,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(() => {
|
||||
|
|
@ -280,11 +266,13 @@ onMounted(() => {
|
|||
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
|
||||
|
|
@ -306,5 +294,4 @@ onMounted(() => {
|
|||
:deep(.ant-form-item) {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,297 @@
|
|||
<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="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="4">
|
||||
<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="4">
|
||||
<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="4">
|
||||
<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="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;margin-bottom: 8px;margin-top: 12px; 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-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowClassName="tableRowClassName">
|
||||
<template #reportType="{ record }">
|
||||
<a-switch v-model:checked="record.reportType" :checked-value="1" :un-checked-value="2" checked-children="上报"
|
||||
un-checked-children="模拟" @change="editReportType(record)" />
|
||||
</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, updateType } from './Heatanalysis.api';
|
||||
import StationExtractModal from './components/extract/StationExtractModal.vue';
|
||||
import StationExtractedModal from './components/extracted/StationExtractedModal.vue';
|
||||
import { saveOrUpdate } from "@/views/heating/heatanalysis/Heatanalysis.api";
|
||||
import { useMessage } from "@/hooks/web/useMessage";
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const registerModalExtracted = ref();
|
||||
const { createMessage } = useMessage();
|
||||
//注册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 tableRowClassName(record) {
|
||||
if (record.isTimeout == 1 && record.isExtract == 0) {
|
||||
return 'rowStyle';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function editReportType(record) {
|
||||
const model = reactive<Record<string, any>>({
|
||||
id: record.id,
|
||||
reportType: record.reportType
|
||||
})
|
||||
updateType(model).then((res) => { })
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
:deep(.jeecg-basic-table-form-container) {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
:deep(.ant-form-item) {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue