功能优化

This commit is contained in:
曹磊 2025-09-01 19:51:39 +08:00
parent 4dba88a958
commit f7eaf1d77f
16 changed files with 151 additions and 85 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -490,6 +490,16 @@ outline:none;
padding-bottom: 10px;
}
.data-card-home{
width:100%;
margin:0 auto;
max-height: 960px;
height: 660px;
overflow-y: auto;
display: block;
//align-items: center;
}
.data-list1-home{
width:100%;
margin:0 auto;

View File

@ -23,23 +23,23 @@
<!-- action -->
<div :class="`${prefixCls}-action`">
<AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" />
<!-- <AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" />-->
<ErrorAction v-if="getUseErrorHandle" :class="`${prefixCls}-action__item error-action`" />
<Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" />
<!-- <Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" />-->
<FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" />
<LockScreen v-if="getUseLockPage" />
<AppLocalePicker v-if="getShowLocalePicker" :reload="true" :showText="false" :class="`${prefixCls}-action__item`" />
<!-- <AppLocalePicker v-if="getShowLocalePicker" :reload="true" :showText="false" :class="`${prefixCls}-action__item`" />-->
<UserDropDown :theme="getHeaderTheme" />
<SettingDrawer v-if="getShowSetting" :class="`${prefixCls}-action__item`" />
<!-- ai助手 -->
<Aide v-if="getAiIconShow"></Aide>
<!-- <Aide v-if="getAiIconShow"></Aide>-->
</div>
</Header>
<LoginSelect ref="loginSelectRef" @success="loginSelectOk"></LoginSelect>
@ -226,7 +226,7 @@
//update-begin---author:scott ---date:2022-09-30 for-----------
//
@prefix-cls: ~'@{namespace}-layout-header';
.ant-layout .@{prefix-cls} {
display: flex;
padding: 0 8px;
@ -234,14 +234,14 @@
height: @header-height;
// update-end--author:liaozhiyang---date:20240407---forQQYUN-8762
align-items: center;
.headerIntroductionClass {
margin-right: 4px;
margin-bottom: 2px;
border-bottom: 0px;
border-left: 0px;
}
&--light {
.headerIntroductionClass {
color: #000;

View File

@ -317,7 +317,7 @@ export default defineComponent({
<SwitchItem title={t('layout.setting.colorWeak')} event={HandlerEnum.COLOR_WEAK} def={unref(getColorWeak)} />
<SwitchItem title={t('layout.setting.aiIconSHow')} event={HandlerEnum.AI_ICON_SHOW} def={unref(getAiIconShow)} />
{/*<SwitchItem title={t('layout.setting.aiIconSHow')} event={HandlerEnum.AI_ICON_SHOW} def={unref(getAiIconShow)} />*/}
</>
);
}

View File

@ -22,16 +22,16 @@
<div class="rightExtra">
<TabRedo v-if="getShowRedo" />
<!-- <TabContent isExtra :tabItem="$route" v-if="getShowQuick" /> -->
<!-- 列表页全屏
<!-- 列表页全屏
<FoldButton v-if="getShowFold" />-->
<!-- <FullscreenOutlined /> -->
<router-link to="/ai" class="ai-icon">
<!-- <router-link to="/ai" class="ai-icon">
<a-tooltip title="AI助手" placement="left">
<svg t="1706259688149" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2056" width="17" height="17">
<path d="M826.368 325.632c0-7.168 2.048-10.24 10.24-10.24h123.904c7.168 0 10.24 2.048 10.24 10.24v621.568c0 7.168-2.048 10.24-10.24 10.24h-122.88c-8.192 0-10.24-4.096-10.24-10.24l-1.024-621.568z m-8.192-178.176c0-50.176 35.84-79.872 79.872-79.872 48.128 0 79.872 32.768 79.872 79.872 0 52.224-33.792 79.872-81.92 79.872-46.08 1.024-77.824-27.648-77.824-79.872zM462.848 584.704C441.344 497.664 389.12 307.2 368.64 215.04h-2.048c-16.384 92.16-58.368 247.808-92.16 369.664h188.416zM243.712 712.704l-62.464 236.544c-2.048 7.168-4.096 8.192-12.288 8.192H54.272c-8.192 0-10.24-2.048-8.192-12.288l224.256-783.36c4.096-13.312 7.168-26.624 8.192-65.536 0-6.144 2.048-8.192 7.168-8.192H450.56c6.144 0 8.192 2.048 10.24 8.192l250.88 849.92c2.048 7.168 0 10.24-7.168 10.24H573.44c-7.168 0-10.24-2.048-12.288-7.168l-65.536-236.544c1.024 1.024-251.904 0-251.904 0z" fill="#333333" p-id="19816"></path>
</svg>
</a-tooltip>
</router-link>
</router-link>-->
</div>
</template>
</Tabs>

View File

@ -135,12 +135,12 @@ function init(record_: any) {
view001: record_.view001,
view002: record_.view002,
view004: record_.view004 || -1,
SDateStr: formatDateTime(start),
EDateStr: formatDateTime(end),
startDate: formatDateTime(start),
endDate: formatDateTime(end),
};
list(params).then((res: any) => {
const records = (res && res.records) ? res.records : [];
const records = (res && res.list) ? res.list : [];
headerText.value = buildHeader(records, record_);
initChartsOptions(records);
nextTick(() => {

View File

@ -23,7 +23,7 @@
import { ref, nextTick, defineProps, onUnmounted } from 'vue';
import * as echarts from 'echarts';
import { useMessage } from '/@/hooks/web/useMessage';
import { jxpage } from '/@/views/heating/history/HeatanalysisHistory.api';
import {jxpage, list} from '/@/views/heating/history/HeatanalysisHistory.api';
const props = defineProps({});
const { createMessage } = useMessage();
@ -71,8 +71,8 @@ function buildHeader(records: any[], record_: any) {
function initChartsOptions(records: any[]) {
// datatime view032
records.sort((a: any, b: any) => {
const ta = new Date(a.datatime || a.view032 || '').getTime();
const tb = new Date(b.datatime || b.view032 || '').getTime();
const ta = new Date(a.view032 || a.datatime || '').getTime();
const tb = new Date(b.view032 || b.datatime || '').getTime();
return (isNaN(ta) ? 0 : ta) - (isNaN(tb) ? 0 : tb);
});
@ -180,13 +180,12 @@ function init(record_: any) {
view001: record_.view001,
view002: record_.view002,
view004: -1,
SDateStr: formatDateTime(start),
EDateStr: formatDateTime(end),
startDate: formatDateTime(start),
endDate: formatDateTime(end),
};
jxpage(params).then((res: any) => {
console.log("🌊 ~ init ~ res:", res)
const records = (res && res.records) ? res.records : [];
const records = (res && res.list) ? res.list : [];
headerText.value = buildHeader(records, record_);
initChartsOptions(records);
nextTick(() => {

View File

@ -4,8 +4,8 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/heating/heatanalysishistory/page',
jxpage = '/heating/heatanalysishistory/jxpage',
list = '/heating/heatanalysishistory/getHistoryList',
jxpage = '/heating/heatanalysishistory/getJxHistoryList',
companylist = '/heating/thermalcompany/list',
heatsourcelist = '/heating/heatsource/list',
heatsourcestationlist = '/heating/heatsourcestation/list',

View File

@ -13,7 +13,7 @@
</div>
</div>
<div v-show="twoShowType">
<div>
<div class="data-card-home">
<a-row>
<a-col :span="6" v-for="(item ,index) in list1" :key="index">
<a-card :title="item.view001Name" :hoverable=true :headStyle="headStyle" class="acolclass" >

View File

@ -48,24 +48,24 @@
<div class="area-body list-container">
<!-- 标题行 -->
<div class="list-header">
<img src="./dashboard/dp_icon4.png" class="left-icon" />
<img src="./dashboard/dp_icon4-left.png" class="left-icon" />
<span>锅炉房名称</span>
<span>换热站名称</span>
<span>二次网供水</span>
<span>二次网回水</span>
<span>二次网供压</span>
<span>二次网回压</span>
<img src="./dashboard/dp_icon4.png" class="right-icon" />
<img src="./dashboard/dp_icon4-right.png" class="left-icon" />
</div>
<!-- 内容行滚动区域 -->
<div class="list-body">
<div v-for="item in z" :key="item.view028" class="list-row">
<span>{{ item.view028 }}</span>
<span>{{ item.view030 }}</span>
<span>{{ item.view035 }}</span>
<span>{{ item.view036 }}</span>
<span>{{ item.view007 }}</span>
<span>{{ item.view008 }}</span>
<span>{{ item.view009 }}</span>
<span>{{ item.view010 }}</span>
<span>{{ item.view011 }}</span>
<span>{{ item.view012 }}</span>
</div>
</div>
</div>
@ -93,14 +93,14 @@
<img src="./dashboard/dp_icon3.png" />
</div>
<div class="right-text">
<div class="top-text-3">{{ jxglfsl }}</div>
<div class="top-text-3">{{ jxsl }}</div>
<div class="bottom-text-3">郊县总数</div>
</div>
<div class="left-img" style="cursor: pointer;" @click="openModal(2, '郊县锅炉房')">
<img src="./dashboard/dp_icon1.png" />
</div>
<div class="right-text" style="cursor: pointer;" @click="openModal(2, '郊县锅炉房')">
<div class="top-text-4">{{ jxsl }}</div>
<div class="top-text-4">{{ jxglfsl }}</div>
<div class="bottom-text-4">郊县锅炉房总数</div>
</div>
</div>
@ -145,7 +145,7 @@
</div>
<div class="modal-body list-container">
<div class="list-header" style="color: #81c7e6;">
<img src="./dashboard/dp_icon4.png" class="left-icon" />
<img src="./dashboard/dp_icon4-left.png" class="left-icon" />
<span>锅炉房名称</span>
<span v-show="modalType == 1">换热站名称</span>
<span>{{ modalType == 1 ? '二' : '一' }}次网供水</span>
@ -153,17 +153,21 @@
<span>{{ modalType == 1 ? '二' : '一' }}次网供压</span>
<span>{{ modalType == 1 ? '二' : '一' }}次网回压</span>
<span>操作</span>
<img src="./dashboard/dp_icon4.png" class="right-icon" />
<img src="./dashboard/dp_icon4-right.png" class="left-icon" />
</div>
<div class="list-body">
<div v-if="!!modalData.length" v-for="item in modalData" :key="item.view028" class="list-row"
style="color: #81c7e6;">
<span>{{ item.view028 }}</span>
<span v-show="modalType == 1">{{ item.view030 }}</span>
<span>{{ item.view035 }}</span>
<span>{{ item.view036 }}</span>
<span>{{ item.view007 }}</span>
<span>{{ item.view008 }}</span>
<span v-if="modalType == 0 || modalType == 1">{{ item.view005 }}</span>
<span v-if="modalType == 2">{{ item.view035 }}</span>
<span v-if="modalType == 0 || modalType == 1">{{ item.view006 }}</span>
<span v-if="modalType == 2">{{ item.view036 }}</span>
<span v-if="modalType == 0 || modalType == 2">{{ item.view007 }}</span>
<span v-if="modalType == 1">{{ item.view011 }}</span>
<span v-if="modalType == 0 || modalType == 2">{{ item.view008 }}</span>
<span v-if="modalType == 1">{{ item.view012 }}</span>
<span><a-button type="link"><span style="color: white;"
@click="detailFunc(item)">详情</span></a-button></span>
</div>
@ -606,10 +610,10 @@ async function loadData() {
z.value = z_.data.map(it => ({
view028: it.view028 ?? '',
view030: it.view030 ?? '',
view035: it.view035 ?? '',
view036: it.view036 ?? '',
view007: it.view007 ?? '',
view008: it.view008 ?? ''
view009: it.view009 ?? '',
view010: it.view010 ?? '',
view011: it.view011 ?? '',
view012: it.view012 ?? ''
}));
@ -627,7 +631,7 @@ async function loadData() {
cityList.value = cities;
countyList.value = countys;
//
//
const arr2 = (z_ && z_.data) ? z_.data : [];
const cities2: { name: string; value: number; raw: any }[] = [];
const countys2: { name: string; value: number; raw: any }[] = [];
@ -678,7 +682,7 @@ onMounted(() => {
updateChartArea8();
loadData();
dataTimer = window.setInterval(() => { loadData(); }, 3 * 1000);
dataTimer = window.setInterval(() => { loadData(); }, 60 * 1000);
window.addEventListener("resize", resizeChart);
@ -742,6 +746,7 @@ function closeModal() {
}
async function detailFunc(record) {
console.log(record);
modalVisible2.value = true;
await nextTick()
registerModal.value.init(record)
@ -1268,4 +1273,4 @@ function closeModal2() {
max-height: 400px;
overflow-y: auto;
}
</style>
</style>

View File

@ -18,11 +18,14 @@
<tbody class="data-list1-home">
<tr v-for="(item,index) in list" :key="item.id" :class="index%2==0?'data-list-data-screen':'data-list-data3-screen'">
<td class="tabulation-screen">{{ item.view004Name!=null?item.view004Name:item.view002Name }}</td>
<td style="width:20%; text-align: center;">{{ item.datatime }}</td>
<td style="width:10%; text-align: center;">{{ item.view005 }}</td>
<td style="width:10%; text-align: center;">{{ item.view006 }}</td>
<!-- <td style="width:10%; text-align: center;">{{ item.view007 }}</td>-->
<!-- <td style="width:10%; text-align: center;">{{ item.view008 }}</td>-->
<td v-if="item.regionType=='城区'" style="width:20%; text-align: center;">{{ item.datatime }}</td>
<td v-if="item.regionType=='郊县'" style="width:20%; text-align: center;">{{ item.view032 }}</td>
<td v-if="item.regionType=='城区'&&item.view004==null" style="width:10%; text-align: center;">{{ item.view005 }}</td>
<td v-if="item.regionType=='城区'&&item.view004==null" style="width:10%; text-align: center;">{{ item.view006 }}</td>
<td v-if="item.regionType=='城区'&&item.view004!=null" style="width:10%; text-align: center;">{{ item.view009 }}</td>
<td v-if="item.regionType=='城区'&&item.view004!=null" style="width:10%; text-align: center;">{{ item.view010 }}</td>
<td v-if="item.regionType=='郊县'" style="width:10%; text-align: center;">{{ item.view035 }}</td>
<td v-if="item.regionType=='郊县'" style="width:10%; text-align: center;">{{ item.view036 }}</td>
</tr>
</tbody>
</table>

View File

@ -22,7 +22,7 @@
import { ref, nextTick, defineProps, onUnmounted } from 'vue';
import * as echarts from 'echarts';
import { useMessage } from '/@/hooks/web/useMessage';
import { list } from '/@/views/heating/history/HeatanalysisHistory.api';
import {jxpage, list} from '/@/views/heating/history/HeatanalysisHistory.api';
const emit = defineEmits(['close']);
@ -68,16 +68,40 @@ function buildHeader(records: any[], record_: any) {
}
function initChartsOptions(records: any[]) {
records.sort((a: any, b: any) => new Date(a.datatime).getTime() - new Date(b.datatime).getTime());
function initChartsOptions(records: any[], record_: any) {
let wdSeries = [];
let ylSeries = [];
if(record_.regionType == '城区'){
records.sort((a: any, b: any) => new Date(a.datatime).getTime() - new Date(b.datatime).getTime());
if(record_.view004){
wdSeries.push({ name: '供水温度', key: 'view009', color: '#ff007f' });
wdSeries.push({ name: '回水温度', key: 'view010', color: '#6a5acd' });
ylSeries.push({ name: '供水压力', key: 'view011', color: '#ff007f' });
ylSeries.push({ name: '回水压力', key: 'view012', color: '#6a5acd' });
}else{
wdSeries.push({ name: '供水温度', key: 'view005', color: '#00c6ff' });
wdSeries.push({ name: '回水温度', key: 'view006', color: '#ff6a00' });
ylSeries.push({ name: '供水压力', key: 'view007', color: '#00c6ff' });
ylSeries.push({ name: '回水压力', key: 'view008', color: '#ff6a00' });
}
}
if(record_.regionType == '郊县'){
records.sort((a: any, b: any) => {
const ta = new Date(a.view032 || a.datatime || '').getTime();
const tb = new Date(b.view032 || b.datatime || '').getTime();
return (isNaN(ta) ? 0 : ta) - (isNaN(tb) ? 0 : tb);
});
wdSeries.push({ name: '供水温度', key: 'view035', color: '#00c6ff' });
wdSeries.push({ name: '回水温度', key: 'view036', color: '#ff6a00' });
ylSeries.push({ name: '供水压力', key: 'view007', color: '#00c6ff' });
ylSeries.push({ name: '回水压力', key: 'view008', color: '#ff6a00' });
}
const xAxis = records.map((r: any) => r.datatime);
const tempSeries = [
{ name: '一次供水温度', key: 'view005', color: '#00c6ff' }, // 使
{ name: '一次回水温度', key: 'view006', color: '#ff6a00' },
{ name: '二次供水温度', key: 'view009', color: '#ff007f' },
{ name: '二次回水温度', key: 'view010', color: '#6a5acd' },
].map(s => ({
const tempSeries = wdSeries.map(s => ({
name: s.name,
type: 'line',
showSymbol: false,
@ -89,12 +113,7 @@ function initChartsOptions(records: any[]) {
data: records.map((r: any) => safeNum(r[s.key])),
}));
const pressSeries = [
{ name: '一次供水压力', key: 'view007', color: '#00c6ff' },
{ name: '一次回水压力', key: 'view008', color: '#ff6a00' },
{ name: '二次供水压力', key: 'view011', color: '#ff007f' },
{ name: '二次回水压力', key: 'view012', color: '#6a5acd' },
].map(s => ({
const pressSeries = ylSeries.map(s => ({
name: s.name,
type: 'line',
showSymbol: false,
@ -147,30 +166,52 @@ function init(record_: any) {
const params = {
pageNo: 1,
pageSize: -1,
regionType: '城区',
regionType: record_.regionType,
view001: record_.view001,
view002: record_.view002,
view004: record_.view004 || -1,
SDateStr: formatDateTime(start),
EDateStr: formatDateTime(end),
startDate: formatDateTime(start),
endDate: formatDateTime(end),
};
list(params).then((res: any) => {
const records = (res && res.records) ? res.records : [];
headerText.value = buildHeader(records, record_);
initChartsOptions(records);
nextTick(() => {
// tab
if (tempChartRef.value) {
tempChart = echarts.init(tempChartRef.value);
tempChart.setOption(tempOption);
}
ensureResizeListener();
if(record_.regionType == '城区'){
list(params).then((res: any) => {
const records = (res && res.list) ? res.list : [];
headerText.value = buildHeader(records, record_);
initChartsOptions(records,record_);
nextTick(() => {
// tab
if (tempChartRef.value) {
tempChart = echarts.init(tempChartRef.value);
tempChart.setOption(tempOption);
}
ensureResizeListener();
});
}).catch(err => {
console.error(err);
createMessage.error('获取数据失败');
});
}).catch(err => {
console.error(err);
createMessage.error('获取数据失败');
});
}
if(record_.regionType == '郊县'){
jxpage(params).then((res: any) => {
const records = (res && res.list) ? res.list : [];
headerText.value = buildHeader(records, record_);
initChartsOptions(records,record_);
nextTick(() => {
// tab
if (tempChartRef.value) {
tempChart = echarts.init(tempChartRef.value);
tempChart.setOption(tempOption);
}
ensureResizeListener();
});
}).catch(err => {
console.error(err);
createMessage.error('获取数据失败');
});
}
}
// tab init

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -86,8 +86,16 @@ async function getHistoryList(){
queryParam.value.startDate = data.startDate;
queryParam.value.endDate = data.endDate;
for (let i = 0; i < list.length; i++) {
let value1 = Number(list[i].view005);
let value2 = Number(list[i].view006);
let value1 = 0;
let value2 = 0;
if(list[i].regionType =='城区'){
value1 = Number(list[i].view005);
value2 = Number(list[i].view006);
}
if(list[i].regionType =='郊县'){
value1 = Number(list[i].view035);
value2 = Number(list[i].view036);
}
let name = list[i].datatime;
name = name.replace(" ","\n");
xAxisData.value.push(name);