页面优化
This commit is contained in:
parent
9f3e8227ee
commit
b2a9d385a8
|
|
@ -5,6 +5,11 @@ import { render } from '/@/utils/common/renderUtils';
|
|||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '序号',
|
||||
align:"center",
|
||||
dataIndex: 'id'
|
||||
},
|
||||
{
|
||||
title: '公司名称',
|
||||
align:"center",
|
||||
|
|
@ -14,6 +19,16 @@ export const columns: BasicColumn[] = [
|
|||
title: '公司类型',
|
||||
align:"center",
|
||||
dataIndex: 'companyType_dictText'
|
||||
},
|
||||
{
|
||||
title: '锅炉房个数',
|
||||
align:"center",
|
||||
dataIndex: 'boilerHouse'
|
||||
},
|
||||
{
|
||||
title: '换热站个数',
|
||||
align:"center",
|
||||
dataIndex: 'barterHeat'
|
||||
},
|
||||
{
|
||||
title: '电话',
|
||||
|
|
@ -25,16 +40,6 @@ export const columns: BasicColumn[] = [
|
|||
align:"center",
|
||||
dataIndex: 'companyAddress'
|
||||
},
|
||||
{
|
||||
title: '换热站个数',
|
||||
align:"center",
|
||||
dataIndex: 'barterHeat'
|
||||
},
|
||||
{
|
||||
title: '锅炉房个数',
|
||||
align:"center",
|
||||
dataIndex: 'boilerHouse'
|
||||
},
|
||||
];
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@
|
|||
tableProps:{
|
||||
title: '热力公司',
|
||||
api: list,
|
||||
defSort: {
|
||||
column: 'id',
|
||||
order: 'asc',
|
||||
},
|
||||
columns,
|
||||
canResize:false,
|
||||
formConfig: {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@
|
|||
tableProps:{
|
||||
title: '热力公司',
|
||||
api: list,
|
||||
defSort: {
|
||||
column: 'id',
|
||||
order: 'asc',
|
||||
},
|
||||
columns,
|
||||
canResize:false,
|
||||
formConfig: {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,11 @@ import { render } from '/@/utils/common/renderUtils';
|
|||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '序号',
|
||||
align:"center",
|
||||
dataIndex: 'id'
|
||||
},
|
||||
{
|
||||
title: '热源名称',
|
||||
align:"center",
|
||||
|
|
@ -35,31 +40,50 @@ export const columns: BasicColumn[] = [
|
|||
align:"center",
|
||||
dataIndex: 'boilerType_dictText'
|
||||
},
|
||||
{
|
||||
title: '建设时间',
|
||||
align:"center",
|
||||
dataIndex: 'setupTime',
|
||||
customRender:({text}) =>{
|
||||
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
return text;
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: '建设时间',
|
||||
// align:"center",
|
||||
// dataIndex: 'setupTime',
|
||||
// customRender:({text}) =>{
|
||||
// text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
// return text;
|
||||
// },
|
||||
// },
|
||||
];
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
label: "热源名称",
|
||||
label: "锅炉房",
|
||||
field: 'sourceName',
|
||||
component: 'Input',
|
||||
//colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "所属公司",
|
||||
label: "热力公司",
|
||||
field: 'companyId',
|
||||
component: 'JSelectMultiple',
|
||||
componentProps:{
|
||||
dictCode:"bl_thermalcompany,company_name,id"
|
||||
dictCode:"bl_thermalcompany,company_name,id,del_flag = '0' and region_type = '城区'"
|
||||
},
|
||||
//colProps: {span: 6},
|
||||
},
|
||||
];
|
||||
|
||||
//查询数据
|
||||
export const searchFormSchemaJx: FormSchema[] = [
|
||||
{
|
||||
label: "锅炉房",
|
||||
field: 'sourceName',
|
||||
component: 'Input',
|
||||
//colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "热力公司",
|
||||
field: 'companyId',
|
||||
component: 'JSelectMultiple',
|
||||
componentProps:{
|
||||
dictCode:"bl_thermalcompany,company_name,id,del_flag = '0' and region_type = '郊县'"
|
||||
},
|
||||
//colProps: {span: 6},
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,8 +51,12 @@ const registerModal = ref();
|
|||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '热力源',
|
||||
title: '锅炉房',
|
||||
api: list,
|
||||
defSort: {
|
||||
column: 'id',
|
||||
order: 'asc',
|
||||
},
|
||||
columns,
|
||||
canResize: false,
|
||||
formConfig: {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import { ref, reactive, computed, unref } from 'vue';
|
|||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import HeatsourceModal from './components/HeatsourceModal.vue'
|
||||
import { columns, searchFormSchema } from './Heatsource.data';
|
||||
import { columns, searchFormSchemaJx } from './Heatsource.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Heatsource.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
|
@ -51,13 +51,17 @@ const registerModal = ref();
|
|||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '热力源',
|
||||
title: '锅炉房',
|
||||
api: list,
|
||||
defSort: {
|
||||
column: 'id',
|
||||
order: 'asc',
|
||||
},
|
||||
columns,
|
||||
canResize: false,
|
||||
formConfig: {
|
||||
//labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
schemas: searchFormSchemaJx,
|
||||
autoSubmitOnEnter: true,
|
||||
showAdvancedButton: true,
|
||||
fieldMapToNumber: [
|
||||
|
|
|
|||
|
|
@ -18,17 +18,17 @@ export const columns: BasicColumn[] = [
|
|||
width: 120
|
||||
},
|
||||
{
|
||||
title: '公司名称',
|
||||
title: '热力公司',
|
||||
align:"center",
|
||||
dataIndex: 'companyCompanyId_dictText'
|
||||
},
|
||||
{
|
||||
title: '热源名称',
|
||||
title: '锅炉房',
|
||||
align:"center",
|
||||
dataIndex: 'sourceSourceId_dictText'
|
||||
},
|
||||
{
|
||||
title: '换热站名称',
|
||||
title: '换热站',
|
||||
align:"center",
|
||||
dataIndex: 'stationStationId_dictText'
|
||||
},
|
||||
|
|
@ -42,7 +42,7 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
},
|
||||
{
|
||||
title: '更改时间',
|
||||
title: '更新时间',
|
||||
align:"center",
|
||||
dataIndex: 'updateDate',
|
||||
customRender:({text}) =>{
|
||||
|
|
@ -50,8 +50,51 @@ export const columns: BasicColumn[] = [
|
|||
return text;
|
||||
},
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
export const columnsJx: BasicColumn[] = [
|
||||
{
|
||||
title: '电话号',
|
||||
align:"center",
|
||||
dataIndex: 'sim',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '设备号',
|
||||
align:"center",
|
||||
dataIndex: 'code',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '热力公司',
|
||||
align:"center",
|
||||
dataIndex: 'companyCompanyId_dictText'
|
||||
},
|
||||
{
|
||||
title: '锅炉房',
|
||||
align:"center",
|
||||
dataIndex: 'sourceSourceId_dictText'
|
||||
},
|
||||
{
|
||||
title: '注册设备时间',
|
||||
align:"center",
|
||||
dataIndex: 'occurtime',
|
||||
customRender:({text}) =>{
|
||||
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
align:"center",
|
||||
dataIndex: 'updateDate',
|
||||
customRender:({text}) =>{
|
||||
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
return text;
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
];
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
</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"
|
||||
<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>
|
||||
|
|
@ -105,6 +105,10 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
tableProps: {
|
||||
title: '设备信息管理',
|
||||
api: list,
|
||||
defSort: {
|
||||
column: '',
|
||||
order: '',
|
||||
},
|
||||
columns,
|
||||
canResize: false,
|
||||
formConfig: {
|
||||
|
|
@ -228,29 +232,30 @@ function searchReset() {
|
|||
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany() {
|
||||
thermalcompany.value = await companylist();
|
||||
let params = {regionType:'城区'};
|
||||
thermalcompany.value = await companylist(params);
|
||||
}
|
||||
|
||||
const heatsource = ref();
|
||||
async function getHeatsource() {
|
||||
heatsource.value = await heatsourcelist();
|
||||
let params = {regionType:'城区'};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
}
|
||||
|
||||
const heatsourcestation = ref();
|
||||
async function getHeatsourcestation() {
|
||||
heatsourcestation.value = await heatsourcestationlist();
|
||||
heatsource.value = [];
|
||||
}
|
||||
|
||||
async function handleChange1(record) {
|
||||
var params = { companyCompanyId: record };
|
||||
let params = { companyCompanyId: record,regionType:'城区' };
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
heatsourcestation.value = [];
|
||||
queryParam.value.sourceSourceId = '';
|
||||
queryParam.value.stationStationId = '';
|
||||
}
|
||||
async function handleChange2(record) {
|
||||
var params = { sourceSourceId: record };
|
||||
let params = { sourceSourceId: record };
|
||||
heatsourcestation.value = await heatsourcestationlist(params);
|
||||
queryParam.value.stationStationId = '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,24 +24,23 @@
|
|||
</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"
|
||||
<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">-->
|
||||
<!-- <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>
|
||||
|
|
@ -82,7 +81,7 @@
|
|||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<SimconfigModal ref="registerModal" @success="handleSuccess"></SimconfigModal>
|
||||
<SimconfigJxModal ref="registerModal" @success="handleSuccess"></SimconfigJxModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -91,8 +90,8 @@ 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 SimconfigJxModal from './components/SimconfigJxModal.vue'
|
||||
import { columnsJx, 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';
|
||||
|
|
@ -105,7 +104,11 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
tableProps: {
|
||||
title: '设备信息管理',
|
||||
api: list,
|
||||
columns,
|
||||
defSort: {
|
||||
column: '',
|
||||
order: '',
|
||||
},
|
||||
columns: columnsJx,
|
||||
canResize: false,
|
||||
formConfig: {
|
||||
//labelWidth: 120,
|
||||
|
|
@ -221,46 +224,47 @@ function searchReset() {
|
|||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
// getHeatsourcestation();
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany() {
|
||||
thermalcompany.value = await companylist();
|
||||
let params = {regionType:'郊县'};
|
||||
thermalcompany.value = await companylist(params);
|
||||
}
|
||||
|
||||
const heatsource = ref();
|
||||
async function getHeatsource() {
|
||||
heatsource.value = await heatsourcelist();
|
||||
let params = {regionType:'郊县'};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
}
|
||||
|
||||
const heatsourcestation = ref();
|
||||
async function getHeatsourcestation() {
|
||||
heatsourcestation.value = await heatsourcestationlist();
|
||||
heatsource.value = [];
|
||||
}
|
||||
// const heatsourcestation = ref();
|
||||
// async function getHeatsourcestation() {
|
||||
// heatsourcestation.value = await heatsourcestationlist();
|
||||
// }
|
||||
|
||||
async function handleChange1(record) {
|
||||
var params = { companyCompanyId: record };
|
||||
let params = { companyCompanyId: record,regionType:'郊县' };
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
heatsourcestation.value = [];
|
||||
// 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) {
|
||||
// let params = { sourceSourceId: record };
|
||||
// heatsourcestation.value = await heatsourcestationlist(params);
|
||||
// queryParam.value.stationStationId = '';
|
||||
// }
|
||||
// function handleChange3(record) {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getThermalcompany();
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
// getHeatsourcestation();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="公司" v-bind="validateInfos.companyCompanyId" id="HeatsourcestationForm-companyCompanyId" name="companyCompanyId">
|
||||
<a-form-item label="热力公司" v-bind="validateInfos.companyCompanyId" id="HeatsourcestationForm-companyCompanyId" name="companyCompanyId">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择热力公司"
|
||||
v-model:value="formData.companyCompanyId"
|
||||
|
|
@ -31,9 +31,9 @@
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="热源" v-bind="validateInfos.sourceSourceId" id="HeatsourcestationForm-sourceSourceId" name="sourceSourceId">
|
||||
<a-form-item label="锅炉房" v-bind="validateInfos.sourceSourceId" id="HeatsourcestationForm-sourceSourceId" name="sourceSourceId">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择热源站"
|
||||
placeholder="请选择锅炉房"
|
||||
v-model:value="formData.sourceSourceId"
|
||||
@focus="focus"
|
||||
@change="handleChange2">
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
sim: [{ required: true, message: '请输入电话号!'},],
|
||||
code: [{ required: true, message: '请输入设备号!'},],
|
||||
companyCompanyId: [{ required: true, message: '请选择热力公司!'},],
|
||||
sourceSourceId: [{ required: true, message: '请选择热源站!'},],
|
||||
sourceSourceId: [{ required: true, message: '请选择锅炉房!'},],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
|
|
@ -193,22 +193,23 @@
|
|||
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany(){
|
||||
thermalcompany.value = await companylist();
|
||||
let params = {regionType:'城区'};
|
||||
thermalcompany.value = await companylist(params);
|
||||
}
|
||||
|
||||
const heatsource = ref();
|
||||
async function getHeatsource(){
|
||||
heatsource.value = await heatsourcelist();
|
||||
let params = {regionType:'城区'};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
}
|
||||
|
||||
const heatsourcestation = ref();
|
||||
async function getHeatsourcestation(){
|
||||
heatsourcestation.value = await heatsourcestationlist();
|
||||
heatsource.value = [];
|
||||
}
|
||||
|
||||
async function handleChange1(record){
|
||||
var params = {companyCompanyId:record};
|
||||
var params = {companyCompanyId:record,regionType:'城区'};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
heatsourcestation.value = [];
|
||||
formData.sourceSourceId = '';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,238 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="SimconfigForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="电话号" v-bind="validateInfos.sim" id="SimconfigForm-sim" name="sim">
|
||||
<a-input v-model:value="formData.sim" placeholder="请输入电话号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="设备号" v-bind="validateInfos.code" id="SimconfigForm-code" name="code">
|
||||
<a-input v-model:value="formData.code" placeholder="请输入设备号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="注册设备时间" v-bind="validateInfos.occurtime" id="SimconfigForm-occurtime" name="occurtime">
|
||||
<a-date-picker placeholder="请选择注册设备时间" v-model:value="formData.occurtime" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="热力公司" v-bind="validateInfos.companyCompanyId" id="HeatsourcestationForm-companyCompanyId" name="companyCompanyId">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择热力公司"
|
||||
v-model:value="formData.companyCompanyId"
|
||||
@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 :span="24">
|
||||
<a-form-item label="锅炉房" v-bind="validateInfos.sourceSourceId" id="HeatsourcestationForm-sourceSourceId" name="sourceSourceId">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择锅炉房"
|
||||
v-model:value="formData.sourceSourceId"
|
||||
@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 :span="24">
|
||||
<a-form-item label="换热站" v-bind="validateInfos.stationStationId" id="HeatsourcestationForm-stationStationId" name="stationStationId">
|
||||
<a-select ref="select"
|
||||
placeholder="请选择换热站"
|
||||
v-model:value="formData.stationStationId"
|
||||
@focus="focus">
|
||||
<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-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import {companylist, heatsourcelist, heatsourcestationlist, saveOrUpdate} from '../Simconfig.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
sim: '',
|
||||
occurtime: '',
|
||||
companyCompanyId: undefined,
|
||||
sourceSourceId: undefined,
|
||||
stationStationId: undefined,
|
||||
updateDate: '',
|
||||
code: '',
|
||||
delFlag: '0',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
sim: [{ required: true, message: '请输入电话号!'},],
|
||||
code: [{ required: true, message: '请输入设备号!'},],
|
||||
companyCompanyId: [{ required: true, message: '请选择热力公司!'},],
|
||||
sourceSourceId: [{ required: true, message: '请选择锅炉房!'},],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
getThermalcompany();
|
||||
getHeatsource();
|
||||
// getHeatsourcestation();
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
if(record[key]!=null){
|
||||
tmpData[key] = String(record[key])
|
||||
}else{
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany(){
|
||||
let params = {regionType:'郊县'};
|
||||
thermalcompany.value = await companylist(params);
|
||||
}
|
||||
|
||||
const heatsource = ref();
|
||||
async function getHeatsource(){
|
||||
let params = {regionType:'郊县'};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
}
|
||||
|
||||
// const heatsourcestation = ref();
|
||||
// async function getHeatsourcestation(){
|
||||
// heatsourcestation.value = await heatsourcestationlist();
|
||||
// heatsource.value = [];
|
||||
// }
|
||||
|
||||
async function handleChange1(record){
|
||||
let params = {companyCompanyId:record};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
// heatsourcestation.value = [];
|
||||
formData.sourceSourceId = '';
|
||||
formData.stationStationId = '';
|
||||
}
|
||||
async function handleChange2(record){
|
||||
// var params = {sourceSourceId:record};
|
||||
// heatsourcestation.value = await heatsourcestationlist(params);
|
||||
// formData.stationStationId = '';
|
||||
}
|
||||
function handleChange3(record){
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<SimconfigJxForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></SimconfigJxForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import SimconfigJxForm from './SimconfigJxForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -5,6 +5,12 @@ import { render } from '/@/utils/common/renderUtils';
|
|||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '序号',
|
||||
align:"center",
|
||||
dataIndex: 'id',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '换热站名称',
|
||||
align:"center",
|
||||
|
|
@ -12,16 +18,16 @@ export const columns: BasicColumn[] = [
|
|||
width: 250
|
||||
},
|
||||
{
|
||||
title: '公司',
|
||||
title: '热力公司',
|
||||
align:"center",
|
||||
dataIndex: 'companyId_dictText',
|
||||
width: 220
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '热源',
|
||||
title: '锅炉房',
|
||||
align:"center",
|
||||
dataIndex: 'sourceId_dictText',
|
||||
width: 220
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
|
|
@ -35,16 +41,16 @@ export const columns: BasicColumn[] = [
|
|||
dataIndex: 'stationPhone',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '建设时间',
|
||||
align:"center",
|
||||
dataIndex: 'setupTime',
|
||||
customRender:({text}) =>{
|
||||
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
return text;
|
||||
},
|
||||
width: 120
|
||||
},
|
||||
// {
|
||||
// title: '建设时间',
|
||||
// align:"center",
|
||||
// dataIndex: 'setupTime',
|
||||
// customRender:({text}) =>{
|
||||
// text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
// return text;
|
||||
// },
|
||||
// width: 120
|
||||
// },
|
||||
{
|
||||
title: '换热站地址',
|
||||
align:"center",
|
||||
|
|
|
|||
|
|
@ -217,16 +217,18 @@
|
|||
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany(){
|
||||
thermalcompany.value = await companylist();
|
||||
let params = {regionType:'城区'};
|
||||
thermalcompany.value = await companylist(params);
|
||||
}
|
||||
|
||||
const heatsource = ref();
|
||||
async function getHeatsource(){
|
||||
heatsource.value = await heatsourcelist();
|
||||
let params = {regionType:'城区'};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
}
|
||||
|
||||
async function handleChange1(record){
|
||||
var params = {companyId:record};
|
||||
let params = {companyId:record, regionType:'城区'};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ export const columns: BasicColumn[] = [
|
|||
dataIndex: 'sn'
|
||||
},
|
||||
{
|
||||
title: '公司名称',
|
||||
title: '热力公司',
|
||||
align: "center",
|
||||
dataIndex: 'companyCompanyId_dictText'
|
||||
},
|
||||
{
|
||||
title: '热源名称',
|
||||
title: '锅炉房',
|
||||
align: "center",
|
||||
dataIndex: 'sourceSourceId_dictText'
|
||||
},
|
||||
|
|
@ -38,7 +38,7 @@ export const columns: BasicColumn[] = [
|
|||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
sn: {title: 'sn',order: 0,view: 'text', type: 'string',},
|
||||
sn: {title: 'SN',order: 0,view: 'text', type: 'string',},
|
||||
occurtime: {title: '注册设备时间',order: 1,view: 'date', type: 'string',},
|
||||
companyCompanyId: {title: '公司名称',order: 2,view: 'number', type: 'number',dictTable: "bl_thermalcompany", dictCode: 'id', dictText: 'company_name',},
|
||||
sourceSourceId: {title: '热源名称',order: 3,view: 'number', type: 'number',dictTable: "bl_heatsource", dictCode: 'id', dictText: 'source_name',},
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@
|
|||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="companyCompanyId">
|
||||
<template #label><span title="公司名称">公司名称</span></template>
|
||||
<j-dict-select-tag placeholder="请选择公司名称" v-model:value="queryParam.companyCompanyId" dictCode="bl_thermalcompany,company_name,id" allow-clear />
|
||||
<template #label><span title="热力公司">热力公司</span></template>
|
||||
<j-dict-select-tag placeholder="请选择热力公司" v-model:value="queryParam.companyCompanyId" dictCode="bl_thermalcompany,company_name,id,del_flag = '0' and region_type = '城区'" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="sourceSourceId">
|
||||
<template #label><span title="热源名称">热源名称</span></template>
|
||||
<j-dict-select-tag placeholder="请选择热源名称" v-model:value="queryParam.sourceSourceId" :dictCode="`bl_heatsource,source_name,id,company_id = '${queryParam.companyCompanyId || -1}'`" allow-clear />
|
||||
<template #label><span title="锅炉房">锅炉房</span></template>
|
||||
<j-dict-select-tag placeholder="请选择锅炉房" v-model:value="queryParam.sourceSourceId" :dictCode="`bl_heatsource,source_name,id,del_flag = '0' and region_type = '城区' and company_id = '${queryParam.companyCompanyId || -1}'`" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :lg="6">
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add({regionType:'城区'});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
|
|
@ -151,28 +151,28 @@
|
|||
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();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
|
|
@ -185,7 +185,7 @@
|
|||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
|
|
@ -212,7 +212,7 @@
|
|||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
|
|
@ -222,7 +222,7 @@
|
|||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,20 +6,20 @@
|
|||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="sn">
|
||||
<template #label><span title="sn">sn</span></template>
|
||||
<j-input placeholder="请输入sn" v-model:value="queryParam.sn" allow-clear ></j-input>
|
||||
<template #label><span title="SN">SN</span></template>
|
||||
<j-input placeholder="请输入SN" v-model:value="queryParam.sn" allow-clear ></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="companyCompanyId">
|
||||
<template #label><span title="公司名称">公司名称</span></template>
|
||||
<j-dict-select-tag placeholder="请选择公司名称" v-model:value="queryParam.companyCompanyId" dictCode="bl_thermalcompany,company_name,id" allow-clear />
|
||||
<template #label><span title="热力公司">热力公司</span></template>
|
||||
<j-dict-select-tag placeholder="请选择热力公司" v-model:value="queryParam.companyCompanyId" dictCode="bl_thermalcompany,company_name,id,del_flag = '0' and region_type = '郊县'" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="sourceSourceId">
|
||||
<template #label><span title="热源名称">热源名称</span></template>
|
||||
<j-dict-select-tag placeholder="请选择热源名称" v-model:value="queryParam.sourceSourceId" :dictCode="`bl_heatsource,source_name,id,company_id = '${queryParam.companyCompanyId || -1}'`" allow-clear />
|
||||
<template #label><span title="锅炉房">锅炉房</span></template>
|
||||
<j-dict-select-tag placeholder="请选择锅炉房" v-model:value="queryParam.sourceSourceId" :dictCode="`bl_heatsource,source_name,id,del_flag = '0' and region_type = '郊县' and company_id = '${queryParam.companyCompanyId || -1}'`" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :lg="6">
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
<TableAction :actions="getTableAction(record)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add({regionType:'郊县'});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
|
|
@ -151,28 +151,28 @@
|
|||
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();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
|
|
@ -183,18 +183,7 @@
|
|||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'waterFlowConfig:bl_water_flow_config:edit'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
|
|
@ -203,6 +192,18 @@
|
|||
},
|
||||
auth: 'waterFlowConfig:bl_water_flow_config:delete'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +213,7 @@
|
|||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
|
|
@ -222,7 +223,7 @@
|
|||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -5,25 +5,25 @@
|
|||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="BlWaterFlowConfigForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="SN" v-bind="validateInfos.sn" id="BlWaterFlowConfigForm-sn" name="sn">
|
||||
<a-input v-model:value="formData.sn" placeholder="请输入sn" allow-clear ></a-input>
|
||||
<a-form-item label="SN" v-bind="validateInfos.sn" id="BlWaterFlowConfigForm-sn" name="SN">
|
||||
<a-input v-model:value="formData.sn" placeholder="请输入SN" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="公司名称" v-bind="validateInfos.companyCompanyId" id="BlWaterFlowConfigForm-companyCompanyId" name="companyCompanyId">
|
||||
<j-dict-select-tag v-model:value="formData.companyCompanyId" :dictCode="`bl_thermalcompany,company_name,id,region_type = '${formData.regionType || -1}'`" placeholder="请选择公司名称" allow-clear />
|
||||
<a-form-item label="热力公司" v-bind="validateInfos.companyCompanyId" id="BlWaterFlowConfigForm-companyCompanyId" name="companyCompanyId">
|
||||
<j-dict-select-tag v-model:value="formData.companyCompanyId" :dictCode="`bl_thermalcompany,company_name,id,region_type = '${formData.regionType || -1}'`" placeholder="请选择热力公司" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="热源名称" v-bind="validateInfos.sourceSourceId" id="BlWaterFlowConfigForm-sourceSourceId" name="sourceSourceId">
|
||||
<j-dict-select-tag v-model:value="formData.sourceSourceId" :dictCode="`bl_heatsource,source_name,id,company_id = '${formData.companyCompanyId || -1}'`" placeholder="请选择热源名称" allow-clear />
|
||||
<a-form-item label="锅炉房" v-bind="validateInfos.sourceSourceId" id="BlWaterFlowConfigForm-sourceSourceId" name="sourceSourceId">
|
||||
<j-dict-select-tag v-model:value="formData.sourceSourceId" :dictCode="`bl_heatsource,source_name,id,company_id = '${formData.companyCompanyId || -1}'`" placeholder="请选择锅炉房" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" hidden>
|
||||
<a-form-item label="换热站名称" v-bind="validateInfos.stationStationId" id="BlWaterFlowConfigForm-stationStationId" name="stationStationId">
|
||||
<!-- <a-col :span="24" hidden>
|
||||
<a-form-item label="换热站" v-bind="validateInfos.stationStationId" id="BlWaterFlowConfigForm-stationStationId" name="stationStationId">
|
||||
<j-dict-select-tag v-model:value="formData.stationStationId" :dictCode="`bl_heatsourcestation,station_name,id,source_id = '${formData.stationStationId || -1}'`" placeholder="请选择换热站名称" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-col>-->
|
||||
<a-col :span="24">
|
||||
<a-form-item label="注册设备时间" v-bind="validateInfos.occurtime" id="BlWaterFlowConfigForm-occurtime" name="occurtime">
|
||||
<a-date-picker placeholder="请选择注册设备时间" v-model:value="formData.occurtime" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
|
|
@ -55,8 +55,8 @@
|
|||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
sn: '',
|
||||
occurtime: '',
|
||||
sn: '',
|
||||
occurtime: '',
|
||||
companyCompanyId: undefined,
|
||||
sourceSourceId: undefined,
|
||||
stationStationId: undefined,
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export const columns: BasicColumn[] = [
|
|||
ellipsis: false
|
||||
},
|
||||
{
|
||||
title: '热源站',
|
||||
title: '锅炉房',
|
||||
align: "center",
|
||||
dataIndex: 'view002Name',
|
||||
ellipsis: false
|
||||
|
|
@ -89,6 +89,106 @@ export const columns: BasicColumn[] = [
|
|||
]},
|
||||
];
|
||||
|
||||
//列表数据
|
||||
export const columnsJx: BasicColumn[] = [
|
||||
{
|
||||
title: '热力公司',
|
||||
align: "center",
|
||||
dataIndex: 'view001Name',
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: '锅炉房',
|
||||
align: "center",
|
||||
dataIndex: 'view002Name',
|
||||
width:120,
|
||||
},
|
||||
{
|
||||
title: '数据时间',
|
||||
align: "center",
|
||||
dataIndex: 'view032',
|
||||
width:160,
|
||||
},
|
||||
{
|
||||
title: '供水温度',
|
||||
align: "center",
|
||||
width: 90,
|
||||
dataIndex: 'view005',
|
||||
},
|
||||
{
|
||||
title: '回水温度',
|
||||
align: "center",
|
||||
width: 90,
|
||||
dataIndex: 'view006'
|
||||
},
|
||||
{
|
||||
title: '供水压力',
|
||||
align: "center",
|
||||
width: 90,
|
||||
dataIndex: 'view007'
|
||||
},
|
||||
{
|
||||
title: '回水压力',
|
||||
align: "center",
|
||||
width: 90,
|
||||
dataIndex: 'view008'
|
||||
},
|
||||
{
|
||||
title: '瞬时热量',
|
||||
align: "center",
|
||||
width: 90,
|
||||
dataIndex: 'view041'
|
||||
},
|
||||
{
|
||||
title: '正累积热量',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
dataIndex: 'view042',
|
||||
},
|
||||
{
|
||||
title: '负累积热量',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
dataIndex: 'view043',
|
||||
},
|
||||
{
|
||||
title: '净累积热量',
|
||||
align: "center",
|
||||
width: 90,
|
||||
dataIndex: 'view044'
|
||||
},
|
||||
{
|
||||
title: '瞬时流量',
|
||||
align: "center",
|
||||
width: 90,
|
||||
dataIndex: 'view037'
|
||||
},
|
||||
{
|
||||
title: '正累积流量',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
dataIndex: 'view038',
|
||||
},
|
||||
{
|
||||
title: '负累积流量',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
dataIndex: 'view039',
|
||||
},
|
||||
{
|
||||
title: '净累积流量',
|
||||
align: "center",
|
||||
width: 90,
|
||||
dataIndex: 'view040'
|
||||
},
|
||||
{
|
||||
title: '流体速度',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
dataIndex: 'view045',
|
||||
},
|
||||
];
|
||||
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
];
|
||||
|
|
@ -100,7 +200,7 @@ export const formSchema: FormSchema[] = [
|
|||
field: 'view001Name',
|
||||
},
|
||||
{
|
||||
label: '热源站',
|
||||
label: '锅炉房',
|
||||
field: 'view002Name',
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@
|
|||
</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"
|
||||
<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>
|
||||
|
|
@ -66,8 +66,8 @@
|
|||
<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-if="record.fromFlow == 0">{{ record.view005 }}</span>
|
||||
<span v-else-if="record.fromFlow == 1">{{ record.view035 }}</span>
|
||||
<span v-else>{{ record.view005 || record.view035 || 0 }}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'view006'">
|
||||
|
|
@ -156,12 +156,14 @@ function searchReset() {
|
|||
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany() {
|
||||
thermalcompany.value = await companylist();
|
||||
let params = {regionType:'城区'};
|
||||
thermalcompany.value = await companylist(params);
|
||||
}
|
||||
|
||||
const heatsource = ref();
|
||||
async function getHeatsource() {
|
||||
heatsource.value = await heatsourcelist();
|
||||
let params = {regionType:'城区'};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
}
|
||||
|
||||
const heatsourcestation = ref();
|
||||
|
|
@ -170,7 +172,7 @@ async function getHeatsourcestation() {
|
|||
}
|
||||
|
||||
async function handleChange1(record) {
|
||||
var params = { companyId: record };
|
||||
var params = { companyId: record,regionType:'城区' };
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
heatsourcestation.value = [];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,23 +14,23 @@
|
|||
</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"
|
||||
<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">-->
|
||||
<!-- <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">
|
||||
|
|
@ -66,8 +66,8 @@
|
|||
<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-if="record.fromFlow == 0">{{ record.view005 }}</span>
|
||||
<span v-else-if="record.fromFlow == 1">{{ record.view035 }}</span>
|
||||
<span v-else>{{ record.view005 || record.view035 || 0 }}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'view006'">
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
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 { columnsJx } from './Heatanalysis.data';
|
||||
import { list, companylist, heatsourcelist, heatsourcestationlist } from './Heatanalysis.api';
|
||||
|
||||
const queryParam = ref<any>({});
|
||||
|
|
@ -95,7 +95,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
tableProps: {
|
||||
title: '',
|
||||
api: list,
|
||||
columns,
|
||||
columns: columnsJx,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
clickToRowSelect: false,
|
||||
|
|
@ -149,34 +149,36 @@ function searchReset() {
|
|||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
// getHeatsourcestation();
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
const thermalcompany = ref();
|
||||
async function getThermalcompany() {
|
||||
thermalcompany.value = await companylist();
|
||||
let params = {regionType:'郊县'};
|
||||
thermalcompany.value = await companylist(params);
|
||||
}
|
||||
|
||||
const heatsource = ref();
|
||||
async function getHeatsource() {
|
||||
heatsource.value = await heatsourcelist();
|
||||
let params = {regionType:'郊县'};
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
}
|
||||
|
||||
const heatsourcestation = ref();
|
||||
async function getHeatsourcestation() {
|
||||
heatsourcestation.value = await heatsourcestationlist();
|
||||
}
|
||||
// const heatsourcestation = ref();
|
||||
// async function getHeatsourcestation() {
|
||||
// heatsourcestation.value = await heatsourcestationlist();
|
||||
// }
|
||||
|
||||
async function handleChange1(record) {
|
||||
var params = { companyId: record };
|
||||
var params = { companyId: record,regionType:'郊县' };
|
||||
heatsource.value = await heatsourcelist(params);
|
||||
heatsourcestation.value = [];
|
||||
// heatsourcestation.value = [];
|
||||
}
|
||||
async function handleChange2(record) {
|
||||
var params = { sourceId: record };
|
||||
heatsourcestation.value = await heatsourcestationlist(params);
|
||||
// var params = { sourceId: record };
|
||||
// heatsourcestation.value = await heatsourcestationlist(params);
|
||||
}
|
||||
function handleChange3(record) {
|
||||
}
|
||||
|
|
@ -184,7 +186,7 @@ function handleChange3(record) {
|
|||
onMounted(() => {
|
||||
getThermalcompany();
|
||||
getHeatsource();
|
||||
getHeatsourcestation();
|
||||
// getHeatsourcestation();
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue