修改无锡测试bug

This commit is contained in:
guanj
2025-10-27 08:55:54 +08:00
parent 7c8917a2cd
commit ea14a290b7
17 changed files with 556 additions and 201 deletions

View File

@@ -95,8 +95,8 @@ export function getEventList(data) {
export function clickImage(data) { export function clickImage(data) {
return http.request({ return http.request({
url: "/scale/clickImage", url: "/scale/clickImage",
method: "get", method: "post",
params: data, data: data,
}); });
} }

View File

@@ -258,7 +258,6 @@ export function rightImportOpenDetail(data: object) {
}); });
} }
// 对象类型 // 对象类型
export function getDicTree(data: object) { export function getDicTree(data: object) {
return service({ return service({
@@ -295,13 +294,12 @@ export function exportForms(data: object) {
responseType: "blob", responseType: "blob",
}); });
} }
// 报表导出
export function exportLineData() {
return service({
url: "/largescreen/exportLineData",
method: "post",
responseType: "blob",
});
}

View File

@@ -802,7 +802,7 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
}, 500) }, 500)
if (waveDatas && waveDatas.length > 1) { if (waveDatas && waveDatas.length > 1) {
const waveDatasTemp = waveDatas.slice(1).reverse() const waveDatasTemp = waveDatas.slice(1)
for (let step = 0; step < waveDatasTemp.length; step++) { for (let step = 0; step < waveDatasTemp.length; step++) {
drawPics(waveDatasTemp[step], picHeight, step, show, myChartes, rmscm, rmscu, titleText) drawPics(waveDatasTemp[step], picHeight, step, show, myChartes, rmscm, rmscu, titleText)
} }
@@ -881,19 +881,14 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
const option = { const option = {
tooltip: { tooltip: {
top: '10px',
trigger: 'axis', trigger: 'axis',
borderColor: 'grey', borderColor: 'grey',
backgroundColor: '#fff',
style: {
color: '#fff',
fontSize: '15px',
padding: 10
},
formatter: function (params: any) { formatter: function (params: any) {
let tips = '时刻:' + params[0].data[0] + '</br/>' let tips = '时刻:' + params[0].data[0] + '</br/>'
for (let i = 0; i < params.length; i++) { for (let i = 0; i < params.length; i++) {
if (params[i].seriesName != '暂降触发点') { if (params[i].seriesName != '暂降触发点') {
tips += params[i].seriesName + ':' + (params[i].value[1] - 0).toFixed(2) + '<br/>' tips += params[i].marker + params[i].seriesName + ':' + (params[i].value[1] - 0).toFixed(2) + '<br/>'
} }
} }
return tips return tips
@@ -904,11 +899,12 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0 borderWidth: 0
}, },
title: { title: {
left: 'center', left: 'center',
text: titlename || title, text: '',//titlename || title,
textStyle: { textStyle: {
fontSize: '0.8rem', fontSize: '0.8rem',
color: props.DColor ? '#fff' : echartsColor.WordColor color: props.DColor ? '#fff' : echartsColor.WordColor

View File

@@ -530,7 +530,7 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
}, 400) }, 400)
if (waveDatas && waveDatas.length > 1) { if (waveDatas && waveDatas.length > 1) {
const waveDatasTemp = waveDatas.slice(1).reverse() const waveDatasTemp = waveDatas.slice(1)
for (let step = 0; step < waveDatasTemp.length; step++) { for (let step = 0; step < waveDatasTemp.length; step++) {
drawPics(waveDatasTemp[step], picHeight, step, show, myChartes, titleText) drawPics(waveDatasTemp[step], picHeight, step, show, myChartes, titleText)
} }
@@ -638,7 +638,7 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
}, },
title: { title: {
left: 'center', left: 'center',
text: titlename || title, text: '',//titlename || title,
textStyle: { textStyle: {
fontSize: '0.8rem', fontSize: '0.8rem',
color: props.DColor ? '#fff' : echartsColor.WordColor color: props.DColor ? '#fff' : echartsColor.WordColor

View File

@@ -1,6 +1,7 @@
import { createStore, Store, useStore } from "vuex"; import { createStore, Store, useStore } from "vuex";
import { login } from "@/api/login/login"; import { login } from "@/api/login/login";
import { initLedger, queryConfig } from "@/api/statistics/index"; import { initLedger, queryConfig } from "@/api/statistics/index";
import { set } from "xe-utils";
// const store = useStore(); // const store = useStore();
// 定义状态接口 // 定义状态接口
@@ -18,6 +19,7 @@ interface State {
eventValue: number; eventValue: number;
eventDuration: number; eventDuration: number;
realData: []; //实时数据 realData: []; //实时数据
iframeLoad: boolean;
} }
// 初始状态 // 初始状态
@@ -35,11 +37,13 @@ const state: State = {
eventValue: 0.7, eventValue: 0.7,
eventDuration: 5, eventDuration: 5,
realData: [], //实时数据 realData: [], //实时数据
iframeLoad: false,
}; };
// 定义Mutation类型 // 定义Mutation类型
enum Mutations { enum Mutations {
INCREMENT = "INCREMENT", INCREMENT = "INCREMENT",
IFRAMELOAD = "IFRAMELOAD",
SET_TOKEN = "SET_TOKEN", SET_TOKEN = "SET_TOKEN",
SET_TIME = "SET-TIME", SET_TIME = "SET-TIME",
SET_CONFIG = "SET-CONFIG-TIME", SET_CONFIG = "SET-CONFIG-TIME",
@@ -51,6 +55,9 @@ export default createStore({
[Mutations.INCREMENT](state: State) { [Mutations.INCREMENT](state: State) {
state.count++; state.count++;
}, },
[Mutations.IFRAMELOAD](state: State, data: boolean) {
state.iframeLoad = data;
},
[Mutations.SET_TOKEN](state: State, data: any) { [Mutations.SET_TOKEN](state: State, data: any) {
window.sessionStorage.setItem("token", data.token); window.sessionStorage.setItem("token", data.token);
window.sessionStorage.setItem("deptId", data.deptId); window.sessionStorage.setItem("deptId", data.deptId);
@@ -96,6 +103,9 @@ export default createStore({
increment({ commit }) { increment({ commit }) {
commit(Mutations.INCREMENT); commit(Mutations.INCREMENT);
}, },
setIframeLoad({ commit }, data: any) {
commit(Mutations.IFRAMELOAD,data);
},
setTimeType({ commit }, data: any) { setTimeType({ commit }, data: any) {
commit(Mutations.SET_TIME, data); commit(Mutations.SET_TIME, data);
}, },

View File

@@ -74,7 +74,7 @@
<el-table-column <el-table-column
prop="duration" prop="duration"
align="center" align="center"
label="持续时间(S)" label="持续时间(s)"
width="100" width="100"
/> />
<el-table-column fixed="right" label="操作" width="80" align="center"> <el-table-column fixed="right" label="操作" width="80" align="center">
@@ -203,7 +203,7 @@ const exportTable = async () => {
"用户", "用户",
"触发类型", "触发类型",
"残余电压(%)", "残余电压(%)",
"持续时间(S)", "持续时间(s)",
], ],
]; ];

View File

@@ -44,6 +44,7 @@
<el-form-item label="运维单位"> <el-form-item label="运维单位">
<el-tree-select <el-tree-select
v-model="deptsIndex" v-model="deptsIndex"
:teleported="false"
:data="deptsList" :data="deptsList"
:render-after-expand="false" :render-after-expand="false"
clearable clearable
@@ -95,8 +96,8 @@
style="width: 150px" style="width: 150px"
size="small" size="small"
:max="100" :max="100"
:precision="1" :precision="2"
:step="1" :step="0.1"
@change=" @change="
(e) => (e == null ? (eventForm.eventValueMin = 1) : null) (e) => (e == null ? (eventForm.eventValueMin = 1) : null)
" "
@@ -112,8 +113,8 @@
style="width: 150px" style="width: 150px"
size="small" size="small"
:max="100" :max="100"
:precision="1" :precision="2"
:step="1" :step="0.1"
@change=" @change="
(e) => (e == null ? (eventForm.eventValueMax = 1) : null) (e) => (e == null ? (eventForm.eventValueMax = 1) : null)
" "
@@ -129,13 +130,13 @@
style="width: 150px" style="width: 150px"
size="small" size="small"
:max="1000000" :max="1000000"
:precision="1" :precision="2"
:step="1" :step="0.1"
@change=" @change="
(e) => (e == null ? (eventForm.eventDurationMin = 1) : null) (e) => (e == null ? (eventForm.eventDurationMin = 1) : null)
" "
><template #suffix> ><template #suffix>
<span>ms</span> <span>s</span>
</template></el-input-number </template></el-input-number
> >
<span> < 持续时间 < </span> <span> < 持续时间 < </span>
@@ -146,13 +147,13 @@
style="width: 150px" style="width: 150px"
size="small" size="small"
:max="1000000" :max="1000000"
:precision="1" :precision="2"
:step="1" :step="0.1"
@change=" @change="
(e) => (e == null ? (eventForm.eventDurationMax = 1) : null) (e) => (e == null ? (eventForm.eventDurationMax = 1) : null)
" "
><template #suffix> ><template #suffix>
<span>ms</span> <span>s</span>
</template></el-input-number </template></el-input-number
> >
</el-form-item> </el-form-item>
@@ -261,7 +262,7 @@
<el-table-column <el-table-column
prop="duration" prop="duration"
align="center" align="center"
label="持续时间(S)" label="持续时间(s)"
width="90" width="90"
/> />
<el-table-column fixed="right" label="操作" width="80" align="center"> <el-table-column fixed="right" label="操作" width="80" align="center">
@@ -489,7 +490,7 @@ const exportTable = async () => {
"用户", "用户",
"触发类型", "触发类型",
"残余电压(%)", "残余电压(%)",
"持续时间(S)", "持续时间(s)",
], ],
]; ];

View File

@@ -1,12 +1,19 @@
<template> <template>
<!-- 配网计算 --> <!-- 配网计算 -->
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes"> <splitpanes
style="height: 100%"
class="default-theme"
id="navigation-splitpanes"
>
<pane :size="20"> <pane :size="20">
<PointTree :showSelect="false" @node-click="handleNodeClick" @init="handleNodeClick"></PointTree> <PointTree
:showSelect="false"
@node-click="handleNodeClick"
@init="handleNodeClick"
></PointTree>
</pane> </pane>
<pane style="background-color: rgba(44, 46, 60, 0.1)" :size="100 - size"> <pane style="background-color: rgba(44, 46, 60, 0.1)" :size="100 - size">
<el-form :model="form" inline label-width="auto"> <el-form :model="form" inline label-width="auto">
<el-form-item label="谐波类型"> <el-form-item label="谐波类型">
<el-radio-group v-model="form.type"> <el-radio-group v-model="form.type">
@@ -15,86 +22,217 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="谐波次数"> <el-form-item label="谐波次数">
<el-select v-model="form.index" filterable multiple :multiple-limit="5" collapse-tags collapse-tags-tooltip <el-select
clearable placeholder="请选择次数" style="width: 200px" size="small"> v-model="form.index"
<el-option v-for="item in 49" :key="item" :label="item + 1 + '次'" :value="item + 1"></el-option> filterable
multiple
:multiple-limit="5"
collapse-tags
collapse-tags-tooltip
clearable
placeholder="请选择次数"
style="width: 200px"
size="small"
>
<el-option
v-for="item in 49"
:key="item"
:label="item + 1 + '次'"
:value="item + 1"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="负荷数据"> <el-form-item label="负荷数据">
<el-select v-model="form.loadDataId" clearable filterable placeholder="请选择负荷数据" style="width: 200px" <el-select
size="small"> v-model="form.loadDataId"
<el-option v-for="item in loadDataOptions" :key="item.id" :label="item.name" :value="item.id"></el-option> clearable
filterable
placeholder="请选择负荷数据"
style="width: 200px"
size="small"
>
<el-option
v-for="item in loadDataOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- <el-button type="primary" icon="el-icon-Plus" @click="push('/admin/division/aListOfLoadData')"> <!-- <el-button type="primary" icon="el-icon-Plus" @click="push('/admin/division/aListOfLoadData')">
新增 新增
</el-button> --> </el-button> -->
<el-button type="primary" :icon="Select" @click="submit" size="small">确定</el-button> <el-button type="primary" :icon="Select" @click="submit" size="small"
>确定</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-tabs v-model="activeName" v-if="showTabs" style="height: 740px"> <el-tabs v-model="activeName" v-if="showTabs" style="height: 740px">
<el-tab-pane v-for="(item, index) in tabList" :key="item" :label="item.label" :name="index" <el-tab-pane
style="height: 100%"> v-for="(item, index) in tabList"
:key="item"
:label="item.label"
:name="index"
style="height: 100%"
>
<div> <div>
<div> <div>
<span style="color: #fff">时间范围</span> <span style="color: #fff">时间范围</span>
<el-date-picker v-model="item.time" class="mr10 ml10" type="daterange" start-placeholder="起始时间" <el-date-picker
end-placeholder="结束时间" format="YYYY-MM-DD" date-format="YYYY-MM-DD" time-format="YYYY-MM-DD" v-model="time"
value-format="YYYY-MM-DD" :disabled-date="handleDisabledDate" size="small" /> class="mr10 ml10"
<el-button type="primary" :icon="CaretRight" @click="execute(item, index)" size="small"> type="daterange"
start-placeholder="起始时间"
end-placeholder="结束时间"
format="YYYY-MM-DD"
date-format="YYYY-MM-DD"
time-format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
:disabled-date="handleDisabledDate"
size="small"
/>
<el-button
type="primary"
:icon="CaretRight"
@click="execute(item, index)"
size="small"
>
执行 执行
</el-button> </el-button>
</div> </div>
<div v-if="item.showEcahr == 1" class="harmonicButton"> <div v-if="item.showEcahr == 1" class="harmonicButton">
<el-form :inline="true" v-model="item.form"> <el-form :inline="true" v-model="item.form">
<el-form-item label="限值" v-if="item.showDynamic"> <el-form-item label="限值" v-if="item.showDynamic">
<el-input v-model="item.form.limit" placeholder="请选择限值" disabled style="width: 200px" size="small"> <el-input
v-model="item.form.limit"
placeholder="请选择限值"
disabled
style="width: 200px"
size="small"
>
<template #append> <template #append>
<el-button :icon="Edit" :class="[code == 0 ? 'frontBox' : '']" @click="setCode(0)" size="small" /> <el-button
:icon="Edit"
:class="[code == 0 ? 'frontBox' : '']"
@click="setCode(0)"
size="small"
/>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="时间点一" v-if="item.showDynamic"> <el-form-item label="时间点一" v-if="item.showDynamic">
<el-input v-model="item.form.time1" placeholder="请选择时间点一" disabled style="width: 200px" size="small"> <el-input
v-model="item.form.time1"
placeholder="请选择时间点一"
disabled
style="width: 200px"
size="small"
>
<template #append> <template #append>
<el-button :icon="Edit" :class="[code == 1 ? 'frontBox' : '']" @click="setCode(1)" size="small" /> <el-button
:icon="Edit"
:class="[code == 1 ? 'frontBox' : '']"
@click="setCode(1)"
size="small"
/>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="时间点二" v-if="item.showDynamic"> <el-form-item label="时间点二" v-if="item.showDynamic">
<el-input v-model="item.form.time2" placeholder="请选择时间点二" disabled style="width: 200px" size="small"> <el-input
v-model="item.form.time2"
placeholder="请选择时间点二"
disabled
style="width: 200px"
size="small"
>
<template #append> <template #append>
<el-button :icon="Edit" :class="[code == 2 ? 'frontBox' : '']" @click="setCode(2)" size="small" /> <el-button
:icon="Edit"
:class="[code == 2 ? 'frontBox' : '']"
@click="setCode(2)"
size="small"
/>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-button type="primary" :icon="Document" @click="generateFn" v-if="!item.showDynamic" size="small"> <el-button
type="primary"
:icon="Document"
@click="generateFn"
v-if="!item.showDynamic"
size="small"
>
生成动态谐波责任数据 生成动态谐波责任数据
</el-button> </el-button>
<el-button type="primary" :icon="Document" v-else @click="generateMetrics" size="small"> <el-button
type="primary"
:icon="Document"
v-else
@click="generateMetrics"
size="small"
>
生成谐波责任指标 生成谐波责任指标
</el-button> </el-button>
</el-form> </el-form>
</div> </div>
<div class="box" v-loading="loading" element-loading-background="#343849c7"> <div
<MyEChart :options="item.options" v-if="item.showEcahr == 1" @group="group" /> class="box"
<el-empty description="时间范围内无谐波数据" v-if="item.showEcahr == 2" /> v-loading="loading"
element-loading-background="#343849c7"
>
<MyEChart
:options="item.options"
v-if="item.showEcahr == 1"
@group="group"
/>
<el-empty
description="时间范围内无谐波数据"
v-if="item.showEcahr == 2"
/>
</div> </div>
<!-- 生成动态谐波责任数据 --> <!-- 生成动态谐波责任数据 -->
<div class="box boxTab" v-loading="loading1" element-loading-background="#343849c7"> <div
<MyEChart :options="item.dynamicOptions" style="flex: 1" v-if="item.showDynamic" /> class="box boxTab"
<div style="width: 500px" v-if="item.showDynamic" class="tableBox"> v-loading="loading1"
<el-table :scrollbar-always-on="true" ref="tableRef" :data="item.dynamicData" height="280px" element-loading-background="#343849c7"
size="small" :header-cell-style="{ textAlign: 'center' }" border> >
<el-table-column prop="customerName" align="center" label="用户名(用户号)" /> <MyEChart
<el-table-column prop="responsibilityData" align="center" label="责任数据(%)" width="120"> :options="item.dynamicOptions"
style="flex: 1"
v-if="item.showDynamic"
/>
<div
style="width: 500px"
v-if="item.showDynamic"
class="tableBox"
>
<el-table
:scrollbar-always-on="true"
ref="tableRef"
:data="item.dynamicData"
height="280px"
size="small"
:header-cell-style="{ textAlign: 'center' }"
border
>
<el-table-column
prop="customerName"
align="center"
label="用户名(用户号)"
/>
<el-table-column
prop="responsibilityData"
align="center"
label="责任数据(%)"
width="120"
>
<template #default="scope"> <template #default="scope">
{{ {{
Math.floor(scope.row.responsibilityData * 10000) / Math.floor(scope.row.responsibilityData * 10000) / 10000
10000
}} }}
</template> </template>
</el-table-column> </el-table-column>
@@ -106,7 +244,6 @@
</el-tabs> </el-tabs>
</pane> </pane>
</splitpanes> </splitpanes>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@@ -142,6 +279,7 @@ const xAxisData = ref([]);
const loading = ref(false); const loading = ref(false);
const loading1 = ref(false); const loading1 = ref(false);
const tabList: any = ref([]); const tabList: any = ref([]);
const time: any = ref([]);
const activeName = ref(0); const activeName = ref(0);
const xValue = ref(""); const xValue = ref("");
const showTabs = ref(false); const showTabs = ref(false);
@@ -158,8 +296,7 @@ const handleNodeClick = (data: any) => {
dotList.value = data; dotList.value = data;
setTimeout(() => { setTimeout(() => {
emit("setTitle", data.alias); emit("setTitle", data.alias);
}, 0) }, 0);
} }
}; };
@@ -201,11 +338,12 @@ const submit = () => {
showTabs.value = true; showTabs.value = true;
let list = JSON.parse(JSON.stringify(form.index)).sort((a, b) => a - b); let list = JSON.parse(JSON.stringify(form.index)).sort((a, b) => a - b);
tabList.value = []; tabList.value = [];
time.value = [timeList.startTime, timeList.endTime];
list.forEach((item: any) => { list.forEach((item: any) => {
tabList.value.push({ tabList.value.push({
label: item + "次谐波", label: item + "次谐波",
key: item, key: item,
time: [timeList.startTime, timeList.endTime], time: [],
showExecute: false, showExecute: false,
form: { form: {
limit: "", limit: "",
@@ -230,8 +368,8 @@ const execute = async (item: any, index: number) => {
tabList.value[activeName.value].showDynamic = false; tabList.value[activeName.value].showDynamic = false;
loading.value = true; loading.value = true;
await getHistoryHarmData({ await getHistoryHarmData({
searchBeginTime: item.time[0], searchBeginTime: time.value[0],
searchEndTime: item.time[1], searchEndTime: time.value[1],
type: form.type, type: form.type,
time: item.key, time: item.key,
lineId: dotList.value.id, lineId: dotList.value.id,
@@ -616,10 +754,6 @@ onMounted(() => {
} }
}); });
defineExpose({ defineExpose({
openDialog, openDialog,
}); });
@@ -683,7 +817,7 @@ defineExpose({
} }
&:after { &:after {
background-color: #fffFFF80 !important; background-color: #ffffff80 !important;
} }
} }
@@ -697,6 +831,5 @@ defineExpose({
right: 10px; right: 10px;
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
} }
</style> </style>

View File

@@ -307,7 +307,7 @@ import {
nextTick, nextTick,
onBeforeUnmount, onBeforeUnmount,
} from "vue"; } from "vue";
import { ElMessage,ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import { import {
eventSource, eventSource,
eventAggregation, eventAggregation,
@@ -321,6 +321,7 @@ import {
harmOneImage, harmOneImage,
hasUpEventList, hasUpEventList,
} from "@/api/manage_wx/index"; } from "@/api/manage_wx/index";
import { HelpFilled, Aim, Memo } from "@element-plus/icons-vue"; import { HelpFilled, Aim, Memo } from "@element-plus/icons-vue";
const flag = ref(0); // 0 for 暂降, 1 for 谐波, 2 for 谐波放大 const flag = ref(0); // 0 for 暂降, 1 for 谐波, 2 for 谐波放大
const time = ref(0); // 0 for 周, 1 for 月 const time = ref(0); // 0 for 周, 1 for 月
@@ -686,13 +687,42 @@ const initialAggregation = () => {
// 提取发送消息到iframe的公共方法 // 提取发送消息到iframe的公共方法
const sendMessageToIframe = (type: string, payload: any) => { const sendMessageToIframe = (type: string, payload: any) => {
// console.log(123,store.state.iframeLoad);
// window.parent.postMessage(
// {
// type,
// payload,
// },
// "*"
// );
// 如果 iframe 已加载完成,直接发送消息
if (store.state.iframeLoad) {
window.parent.postMessage( window.parent.postMessage(
{ {
type, type,
payload, payload,
}, },
"*" "*" // 建议替换为具体域名,如 'https://父页面域名'
); );
return;
}
// 如果未加载完成,每 1 秒尝试发送一次
const interval = setInterval(() => {
console.log("等待 iframe 加载1 秒后重试...");
if (store.state.iframeLoad) {
// 加载完成后发送消息并清除定时器
window.parent.postMessage(
{
type,
payload,
},
"*" // 建议替换为具体域名
);
clearInterval(interval);
}
}, 1000);
}; };
// 闪烁点 // 闪烁点
@@ -752,7 +782,7 @@ const initHasUpEventList = () => {
const dataObject = { const dataObject = {
eventList: [...eventList.value], eventList: [...eventList.value],
color: "#fcfc57", color: "#fcfc57",
flagValue: '2', flagValue: "2",
}; };
// 发送eventList数据到iframe注意发送的是.value而不是响应式对象本身 // 发送eventList数据到iframe注意发送的是.value而不是响应式对象本身

View File

@@ -89,7 +89,7 @@
<div> <div>
<span style="color: #fff">时间范围</span> <span style="color: #fff">时间范围</span>
<el-date-picker <el-date-picker
v-model="item.time" v-model="time"
class="mr10 ml10" class="mr10 ml10"
type="daterange" type="daterange"
start-placeholder="起始时间" start-placeholder="起始时间"
@@ -292,6 +292,7 @@ const xAxisData = ref([]);
const loading = ref(false); const loading = ref(false);
const loading1 = ref(false); const loading1 = ref(false);
const tabList: any = ref([]); const tabList: any = ref([]);
const time: any = ref([]);
const activeName = ref(0); const activeName = ref(0);
const xValue = ref(""); const xValue = ref("");
const showTabs = ref(false); const showTabs = ref(false);
@@ -394,6 +395,7 @@ const submit = () => {
showTabs.value = true; showTabs.value = true;
let list = JSON.parse(JSON.stringify(form.index)).sort((a, b) => a - b); let list = JSON.parse(JSON.stringify(form.index)).sort((a, b) => a - b);
tabList.value = []; tabList.value = [];
list.forEach((item: any) => { list.forEach((item: any) => {
tabList.value.push({ tabList.value.push({
label: item + "次谐波", label: item + "次谐波",
@@ -424,8 +426,8 @@ const execute = async (item: any, index: number) => {
tabList.value[activeName.value].showDynamic = false; tabList.value[activeName.value].showDynamic = false;
loading.value = true; loading.value = true;
await getHistoryHarmData({ await getHistoryHarmData({
searchBeginTime: item.time[0], searchBeginTime: time.value[0],
searchEndTime: item.time[1], searchEndTime: time.value[1],
type: form.type, type: form.type,
time: item.key, time: item.key,
lineId: dotList.value.id, lineId: dotList.value.id,

View File

@@ -1,14 +1,23 @@
<!-- 谐波放大表格详情 --> <!-- 谐波放大表格详情 -->
<template> <template>
<el-dialog v-model="visible" :close-on-click-modal="false" title="趋势图" draggable width="70%" <el-dialog
@close="handleCloseDialog"> v-model="visible"
:close-on-click-modal="false"
title="趋势图"
draggable
width="70%"
@close="handleCloseDialog"
>
<el-radio-group v-model="condition" size="small" @change="init"> <el-radio-group v-model="condition" size="small" @change="init">
<el-radio-button label="谐波电压" value="42" /> <el-radio-button label="谐波电压" value="42" />
<el-radio-button label="谐波电流" value="43" /> <el-radio-button label="谐波电流" value="43" />
</el-radio-group> </el-radio-group>
<MyEChart v-loading="loading" element-loading-background="rgba(122, 122, 122, 0.8)" :options="list[0]?.option" <MyEChart
:style="`height:670px`" /> v-loading="loading"
element-loading-background="rgba(122, 122, 122, 0.8)"
:options="list[0]?.option"
:style="`height:670px`"
/>
</el-dialog> </el-dialog>
</template> </template>
@@ -25,13 +34,13 @@ const options = ref<any>(null);
const list = ref<any>([]); const list = ref<any>([]);
const traceability = ref<any>([]); const traceability = ref<any>([]);
const rowData: any = ref({}); const rowData: any = ref({});
const condition: any = ref('42'); const condition: any = ref("42");
const open = async (row: any) => { const open = async (row: any) => {
rowData.value = row; rowData.value = row;
condition.value = '42'; condition.value = "42";
visible.value = true; visible.value = true;
init() init();
}; };
const init = async () => { const init = async () => {
list.value = []; list.value = [];
@@ -48,7 +57,7 @@ const init = async () => {
}).then((res) => { }).then((res) => {
shujuchuli(res); shujuchuli(res);
}); });
} };
const shujuchuli = (res: any) => { const shujuchuli = (res: any) => {
list.value = []; list.value = [];
let shujuData = res.data; let shujuData = res.data;
@@ -56,9 +65,13 @@ const shujuchuli = (res: any) => {
//判断是否存在暂降点 //判断是否存在暂降点
if (item.eventDetail == null) { if (item.eventDetail == null) {
let [min, max] = yMethod([item.minValue, item.maxValue, condition.value == '42' ? rowData.value.vavgValue : rowData.value.vavgValue.iavgValue] let [min, max] = yMethod([
item.minValue,
); item.maxValue,
condition.value == "42"
? rowData.value.vavgValue
: rowData.value.vavgValue.iavgValue,
]);
//判断是否有限值(有上下限) //判断是否有限值(有上下限)
if (item.topLimit !== 0 && item.lowerLimit !== 0) { if (item.topLimit !== 0 && item.lowerLimit !== 0) {
item.phaiscType.push("上限"); item.phaiscType.push("上限");
@@ -107,7 +120,14 @@ const shujuchuli = (res: any) => {
} }
let shuju = { let shuju = {
id: "qushifenx" + i, id: "qushifenx" + i,
title: item.lineName + "--" + item.targetName, title:
item.lineName +
"--" +
item.targetName +
"--" +
"谐波次数_" +
item.harmNum +
"次",
targetName: item.targetName, targetName: item.targetName,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
@@ -147,7 +167,14 @@ const shujuchuli = (res: any) => {
} }
let shuju = { let shuju = {
id: "qushifenx" + i, id: "qushifenx" + i,
title: item.lineName + "--" + item.targetName, title:
item.lineName +
"--" +
item.targetName +
"--" +
"谐波次数_" +
item.harmNum +
"次",
targetName: item.targetName, targetName: item.targetName,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
@@ -163,7 +190,14 @@ const shujuchuli = (res: any) => {
} else { } else {
let shuju = { let shuju = {
id: "qushifenx" + i, id: "qushifenx" + i,
title: item.lineName + "--" + item.targetName, title:
item.lineName +
"--" +
item.targetName +
"--" +
"谐波次数_" +
item.harmNum +
"次",
targetName: item.targetName, targetName: item.targetName,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
@@ -223,7 +257,14 @@ const shujuchuli = (res: any) => {
} }
let shuju = { let shuju = {
id: "qushifenx" + i, id: "qushifenx" + i,
title: item.lineName + "--" + item.targetName, title:
item.lineName +
"--" +
item.targetName +
"--" +
"谐波次数_" +
item.harmNum +
"次",
targetName: item.targetName, targetName: item.targetName,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
@@ -260,7 +301,14 @@ const shujuchuli = (res: any) => {
} }
let shuju = { let shuju = {
id: "qushifenx" + i, id: "qushifenx" + i,
title: item.lineName + "--" + item.targetName, title:
item.lineName +
"--" +
item.targetName +
"--" +
"谐波次数_" +
item.harmNum +
"次",
targetName: item.targetName, targetName: item.targetName,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
@@ -274,7 +322,14 @@ const shujuchuli = (res: any) => {
} else { } else {
let shuju = { let shuju = {
id: "qushifenx" + i, id: "qushifenx" + i,
title: item.lineName + "--" + item.targetName, title:
item.lineName +
"--" +
item.targetName +
"--" +
"谐波次数_" +
item.harmNum +
"次",
targetName: item.targetName, targetName: item.targetName,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
@@ -330,7 +385,14 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: "qushifenx" + i, id: "qushifenx" + i,
title: item.lineName + "--" + item.targetName, title:
item.lineName +
"--" +
item.targetName +
"--" +
"谐波次数_" +
item.harmNum +
"次",
targetName: item.targetName, targetName: item.targetName,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
@@ -361,7 +423,14 @@ const shujuchuli = (res: any) => {
} }
let shuju = { let shuju = {
id: "qushifenx" + i, id: "qushifenx" + i,
title: item.lineName + "--" + item.targetName, title:
item.lineName +
"--" +
item.targetName +
"--" +
"谐波次数_" +
item.harmNum +
"次",
targetName: item.targetName, targetName: item.targetName,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
@@ -374,7 +443,14 @@ const shujuchuli = (res: any) => {
} else { } else {
let shuju = { let shuju = {
id: "qushifenx" + i, id: "qushifenx" + i,
title: item.lineName + "--" + item.targetName, title:
item.lineName +
"--" +
item.targetName +
"--" +
"谐波次数_" +
item.harmNum +
"次",
targetName: item.targetName, targetName: item.targetName,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
@@ -460,7 +536,8 @@ const rendering = () => {
if (item.valueName == undefined) { if (item.valueName == undefined) {
item.valueName = "无"; item.valueName = "无";
} }
opitonserise[0].markLine = { opitonserise = opitonserise.map((item) => {
item.markLine = {
itemStyle: { itemStyle: {
normal: { normal: {
lineStyle: { lineStyle: {
@@ -481,10 +558,43 @@ const rendering = () => {
data: [ data: [
{ {
name: "标准值", name: "标准值",
yAxis: condition.value == '42' ? rowData.value.vavgValue : rowData.value.iavgValue, yAxis:
condition.value == "42"
? rowData.value.vavgValue
: rowData.value.iavgValue,
}, },
], ],
}; };
return item;
});
// opitonserise[0].markLine = {
// itemStyle: {
// normal: {
// lineStyle: {
// type: "dashed", //dotted、solid
// color: "#FF33FF",
// width: 2,
// },
// },
// },
// label: {
// normal: {
// color: "#fff",
// formatter: function (params) {
// return `标准值`;
// },
// },
// },
// data: [
// {
// name: "标准值",
// yAxis:
// condition.value == "42"
// ? rowData.value.vavgValue
// : rowData.value.iavgValue,
// },
// ],
// };
// console.log("🚀 ~ rendering ~ row.value:", rowData.value); // console.log("🚀 ~ rendering ~ row.value:", rowData.value);
// console.log("🚀 ~ rendering ~ opitonserise:", opitonserise); // console.log("🚀 ~ rendering ~ opitonserise:", opitonserise);
@@ -495,7 +605,7 @@ const rendering = () => {
}; };
const getEcharts = () => { const getEcharts = () => {
list.value.forEach((item: any, i: number) => { list.value.forEach((item: any, i: number) => {
console.log("🚀 ~ getEcharts ~ item:", item) console.log("🚀 ~ getEcharts ~ item:", item);
item.option = { item.option = {
backgroundColor: "#fff", backgroundColor: "#fff",
title: { title: {
@@ -596,7 +706,6 @@ const getEcharts = () => {
max: item.maxValue, max: item.maxValue,
name: item.valueName, name: item.valueName,
axisLine: { axisLine: {
show: true, show: true,
onZero: false, //-----------重点 onZero: false, //-----------重点

View File

@@ -64,7 +64,7 @@ import { clickImage, realTimeData } from "@/api/manage_wx";
import { Close } from "@element-plus/icons-vue"; import { Close } from "@element-plus/icons-vue";
import socketClient from "@/utils/webSocketClient"; import socketClient from "@/utils/webSocketClient";
import DipDetail from "../eventStatistics/dipDetail.vue"; import DipDetail from "../eventStatistics/dipDetail.vue";
import { useStore } from "vuex";
// 定义接收的 props // 定义接收的 props
const props = defineProps<{ const props = defineProps<{
eventList?: []; eventList?: [];
@@ -111,7 +111,7 @@ const corners = ref([
// }, // },
]); ]);
const steadyStateList = ref([]); const steadyStateList = ref([]);
const store = useStore();
const selectedId = ref(""); const selectedId = ref("");
// 内部响应式数据 // 内部响应式数据
@@ -128,7 +128,11 @@ const handleClickImage = async (elementId: string) => {
} }
try { try {
// 发送点击图片请求 // 发送点击图片请求
const res = await clickImage({ lineId: elementId }); const res = await clickImage({
lineId: elementId,
searchBeginTime: store.state.timeValue[0],
searchEndTime: store.state.timeValue[1],
});
// 确保返回的数据是数组格式,并且过滤掉 null/undefined 元素 // 确保返回的数据是数组格式,并且过滤掉 null/undefined 元素
let dataToStore: any[] = []; let dataToStore: any[] = [];

View File

@@ -85,8 +85,8 @@
:min="0" :min="0"
style="width: 150px" style="width: 150px"
:max="100" :max="100"
:precision="1" :precision="2"
:step="1" :step="0.1"
@change=" @change="
(e) => (e == null ? (eventForm.eventValueMin = 1) : null) (e) => (e == null ? (eventForm.eventValueMin = 1) : null)
" "
@@ -101,8 +101,8 @@
:min="0" :min="0"
style="width: 150px" style="width: 150px"
:max="100" :max="100"
:precision="1" :precision="2"
:step="1" :step="0.1"
@change=" @change="
(e) => (e == null ? (eventForm.eventValueMax = 1) : null) (e) => (e == null ? (eventForm.eventValueMax = 1) : null)
" "
@@ -117,13 +117,13 @@
:min="0" :min="0"
style="width: 150px" style="width: 150px"
:max="1000000" :max="1000000"
:precision="1" :precision="2"
:step="1" :step="0.1"
@change=" @change="
(e) => (e == null ? (eventForm.eventDurationMin = 1) : null) (e) => (e == null ? (eventForm.eventDurationMin = 1) : null)
" "
><template #suffix> ><template #suffix>
<span>ms</span> <span>s</span>
</template></el-input-number </template></el-input-number
> >
<span> < 持续时间 < </span> <span> < 持续时间 < </span>
@@ -133,13 +133,13 @@
:min="0" :min="0"
style="width: 150px" style="width: 150px"
:max="1000000" :max="1000000"
:precision="1" :precision="2"
:step="1" :step="0.1"
@change=" @change="
(e) => (e == null ? (eventForm.eventDurationMax = 1) : null) (e) => (e == null ? (eventForm.eventDurationMax = 1) : null)
" "
><template #suffix> ><template #suffix>
<span>ms</span> <span>s</span>
</template></el-input-number </template></el-input-number
> >
</el-form-item> </el-form-item>
@@ -225,7 +225,7 @@
<el-table-column <el-table-column
prop="duration" prop="duration"
align="center" align="center"
label="持续时间(S)" label="持续时间(s)"
width="100" width="100"
/> />
<el-table-column fixed="right" label="操作" width="100" align="center"> <el-table-column fixed="right" label="操作" width="100" align="center">
@@ -800,7 +800,7 @@ const exportTable_0 = async () => {
"用户", "用户",
"触发类型", "触发类型",
"残余电压(%)", "残余电压(%)",
"持续时间(S)", "持续时间(s)",
], ],
]; ];

View File

@@ -22,7 +22,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch, onMounted, onUnmounted } from "vue"; import { ref, watch, onMounted, onUnmounted } from "vue";
import { getActive } from "@/api/manage_wx/index"; import { getActive } from "@/api/manage_wx/index";
import { useStore } from "vuex";
const store = useStore();
const props = defineProps<{ const props = defineProps<{
project: { id: string; name: string } | null; project: { id: string; name: string } | null;
}>(); }>();
@@ -37,6 +38,7 @@ watch(
// window.location.origin // window.location.origin
iframeSrc.value = iframeSrc.value =
window.location.origin + window.location.origin +
// "http://192.168.1.128:4001" +
`/zutai/?id=${newVal.id}&&name=${encodeURIComponent( `/zutai/?id=${newVal.id}&&name=${encodeURIComponent(
newVal.name newVal.name
)}&&preview=true&&display=true&&graphicDisplay=wx#/preview`; )}&&preview=true&&display=true&&graphicDisplay=wx#/preview`;
@@ -50,17 +52,25 @@ watch(
onMounted(() => { onMounted(() => {
// 监听来自 eventStatistics 组件的消息 // 监听来自 eventStatistics 组件的消息
window.addEventListener("message", handleMessage); window.addEventListener("message", handleMessage);
getActive({}).then((res: any) => { getActive({}).then((res: any) => {
if (res.code == "A0000") { if (res.code == "A0000") {
// window.location.origin // window.location.origin
iframeSrc.value = iframeSrc.value =
window.location.origin + window.location.origin +
// "http://192.168.1.128:4001" +
`/zutai/?id=${res.data.id}&&name=${encodeURIComponent( `/zutai/?id=${res.data.id}&&name=${encodeURIComponent(
res.data.name res.data.name
)}&&preview=true&&display=true&&graphicDisplay=wx#/preview`; )}&&preview=true&&display=true&&graphicDisplay=wx#/preview`;
} }
}); });
// 子页面
const iframe = document.getElementById("iframeLeft");
// 监听 iframe 加载完成事件
iframe.addEventListener("load", function () {
// 通知父页面:我已加载完毕
store.dispatch("setIframeLoad", true);
});
}); });
onUnmounted(() => { onUnmounted(() => {
@@ -107,7 +117,6 @@ const sendKeysToIframe = (keyList: string[]) => {
); // 在生产环境中应该指定具体的域名而不是 '*' ); // 在生产环境中应该指定具体的域名而不是 '*'
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.plan { .plan {

View File

@@ -43,7 +43,6 @@
:center="center" :center="center"
:scroll-wheel-zoom="false" :scroll-wheel-zoom="false"
:double-click-zoom="false" :double-click-zoom="false"
> >
<!-- 线--> <!-- 线-->
<div v-if="zoom > 13"> <div v-if="zoom > 13">
@@ -158,7 +157,7 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive } from "vue"; import { ref, reactive, nextTick } from "vue";
import { substationCount } from "@/api/statistics/index"; import { substationCount } from "@/api/statistics/index";
import { useStore } from "vuex"; import { useStore } from "vuex";
// import { BmlMarkerClusterer } from "vue-baidu-map-3x"; // import { BmlMarkerClusterer } from "vue-baidu-map-3x";
@@ -196,11 +195,16 @@ const handler = async ({ BMap, map }: any) => {
// 点击变电站\监测点 // 点击变电站\监测点
const markerClick = (e: any) => { const markerClick = (e: any) => {
center.value.lng = e.lng;
center.value.lat = e.lat + 0.01;
zoom.value = 15; zoom.value = 15;
infoWindowPoint.value = e; infoWindowPoint.value = e;
infoWindowPoint.value.show = true; infoWindowPoint.value.show = true;
center.value.lng = 116.404367;
center.value.lat = 39.915421;
setTimeout(() => {
center.value.lng = e.lng;
center.value.lat = e.lat + 0.01;
}, 0);
}; };
const init = () => { const init = () => {
@@ -360,8 +364,10 @@ const setIcon = (e: string) => {
moveenFlag.value = false; moveenFlag.value = false;
siteList.value.forEach((item: any) => { siteList.value.forEach((item: any) => {
if (item.stationName == e) { if (item.stationName == e) {
center.value.lng = item.lng; console.log(1);
center.value.lat = item.lat + 0.01;
// center.value.lng = item.lng;
// center.value.lat = item.lat + 0.01;
infoWindowPoint.value = item; infoWindowPoint.value = item;
infoWindowPoint.value.show = true; infoWindowPoint.value.show = true;
zoom.value = 15; zoom.value = 15;

View File

@@ -1,13 +1,17 @@
<template> <template>
<div id="index" ref="appRef"> <div id="index" ref="appRef">
<div class="bg" :class="store.state.screenNotic == 1 <div
class="bg"
:class="
store.state.screenNotic == 1
? pushFlag ? pushFlag
? bottomTextRef?.urgentList.length > 0 ? bottomTextRef?.urgentList.length > 0
? 'bg-red' ? 'bg-red'
: '' : ''
: '' : ''
: '' : ''
"> "
>
<dv-loading v-if="loading">Loading...</dv-loading> <dv-loading v-if="loading">Loading...</dv-loading>
<div v-else class="host-body"> <div v-else class="host-body">
@@ -15,7 +19,8 @@
<div class="react-left"> <div class="react-left">
<span class="text fw-b"> <span class="text fw-b">
{{ timeInfo.dateYear }} {{ timeInfo.dateWeek }} {{ timeInfo.dateYear }} {{ timeInfo.dateWeek }}
{{ timeInfo.dateDay }}</span> {{ timeInfo.dateDay }}</span
>
</div> </div>
<dv-decoration-10 class="dv-dec-10" :color="color[1]" /> <dv-decoration-10 class="dv-dec-10" :color="color[1]" />
@@ -24,7 +29,11 @@
<div class="title"> <div class="title">
<span class="title-text">{{ title }}</span> <span class="title-text">{{ title }}</span>
</div> </div>
<dv-decoration-8 class="dv-dec-8" :reverse="true" :color="color[2]" /> <dv-decoration-8
class="dv-dec-8"
:reverse="true"
:color="color[2]"
/>
</div> </div>
<dv-decoration-10 class="dv-dec-10-s" :color="color[1]" /> <dv-decoration-10 class="dv-dec-10-s" :color="color[1]" />
</div> </div>
@@ -32,7 +41,10 @@
<div class="d-flex secondLine"> <div class="d-flex secondLine">
<div class="react-right mr-1"> <div class="react-right mr-1">
<span class="text fw-b" style="display: flex"> <span class="text fw-b" style="display: flex">
<datePicker ref="datePickerRef" @timeChangeInfo="timeChangeInfo" /> <datePicker
ref="datePickerRef"
@timeChangeInfo="timeChangeInfo"
/>
</span> </span>
</div> </div>
@@ -49,8 +61,15 @@
<el-dropdown-item @click="handleClick('2')" <el-dropdown-item @click="handleClick('2')"
>模拟短信发送</el-dropdown-item >模拟短信发送</el-dropdown-item
> --> > -->
<el-dropdown-item @click="handleClick('3')">系统配置</el-dropdown-item> <el-dropdown-item @click="handleClick('3')"
<el-dropdown-item @click="handleClick('4')">报表导出</el-dropdown-item> >系统配置</el-dropdown-item
>
<el-dropdown-item @click="handleClick('4')"
>报表导出</el-dropdown-item
>
<el-dropdown-item @click="handleClick('5')"
>台账导出</el-dropdown-item
>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
@@ -72,22 +91,36 @@
<alarm ref="alarmRef" /> <alarm ref="alarmRef" />
<!-- 紧急告警 --> <!-- 紧急告警 -->
<div class="icon" v-if="!(bottomTextRef?.urgentList.length == 0)" :color="color[0][1]" :class="bottomTextRef?.urgentList.length > 0 <div
class="icon"
v-if="!(bottomTextRef?.urgentList.length == 0)"
:color="color[0][1]"
:class="
bottomTextRef?.urgentList.length > 0
? 'animate-flash-red' ? 'animate-flash-red'
: '' : ''
" @click="drawerClick"> "
@click="drawerClick"
>
<!-- <WarnTriangleFilled /> --> <!-- <WarnTriangleFilled /> -->
<span class="iconfont icon-gaojing" :style="{ <span
class="iconfont icon-gaojing"
:style="{
color: color:
bottomTextRef?.urgentList.length > 0 bottomTextRef?.urgentList.length > 0
? '#ff0000' ? '#ff0000'
: color[0][1], : color[0][1],
}"></span> }"
<span class="count" v-if="bottomTextRef?.urgentList.length > 0">{{ ></span>
<span
class="count"
v-if="bottomTextRef?.urgentList.length > 0"
>{{
bottomTextRef?.urgentList.length > 99 bottomTextRef?.urgentList.length > 99
? "99+" ? "99+"
: bottomTextRef?.urgentList.length : bottomTextRef?.urgentList.length
}}</span> }}</span
>
</div> </div>
</dv-border-box-13> </dv-border-box-13>
</div> </div>
@@ -100,7 +133,10 @@
<!-- <bottom-left /> --> <!-- <bottom-left /> -->
</dv-border-box-13> </dv-border-box-13>
<dv-border-box-13 :color="color[0]"> <dv-border-box-13 :color="color[0]">
<informationTable ref="informationTableRef" @handleCurrentChange="handleCurrentChange" /> <informationTable
ref="informationTableRef"
@handleCurrentChange="handleCurrentChange"
/>
</dv-border-box-13> </dv-border-box-13>
<dv-border-box-13 :color="color[0]"> <dv-border-box-13 :color="color[0]">
<sendTrends ref="sendTrendsRef" /> <sendTrends ref="sendTrendsRef" />
@@ -110,10 +146,17 @@
</div> </div>
</div> </div>
</div> </div>
<bottomText ref="bottomTextRef" @handleCurrentChange="handleCurrentChange" /> <bottomText
ref="bottomTextRef"
@handleCurrentChange="handleCurrentChange"
/>
<!-- 已发短信查询 --> <!-- 已发短信查询 -->
<smsQueries ref="smsQueriesRef" v-if="smsQueriesFlag" @close="smsQueriesFlag = false" /> <smsQueries
ref="smsQueriesRef"
v-if="smsQueriesFlag"
@close="smsQueriesFlag = false"
/>
<!-- 系统配置 --> <!-- 系统配置 -->
<Config ref="ConfigRef" @flushed="inquire" /> <Config ref="ConfigRef" @flushed="inquire" />
@@ -153,7 +196,7 @@ import socketClient from "@/utils/webSocketClient";
import { useStore } from "vuex"; import { useStore } from "vuex";
import Config from "./components/config.vue"; import Config from "./components/config.vue";
import ReportForms from "./components/reportForms.vue"; import ReportForms from "./components/reportForms.vue";
import { exportLineData } from "@/api/statistics/index";
const store = useStore(); const store = useStore();
const smsQueriesRef = ref(); // 短信查询组件引用 const smsQueriesRef = ref(); // 短信查询组件引用
const endpointStatisticsRef = ref(); // 终端在线统计组件引用 const endpointStatisticsRef = ref(); // 终端在线统计组件引用
@@ -255,6 +298,20 @@ const handleClick = (type: string) => {
if (type === "4") { if (type === "4") {
reportForms.value.open("报表导出"); reportForms.value.open("报表导出");
} }
if (type === "5") {
exportLineData().then((res: any) => {
let blob = new Blob([res], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8",
});
const url = window.URL.createObjectURL(blob);
const link = document.createElement("a"); // 创建a标签
link.href = url;
link.download = "台账.xlsx"; // 设置下载的文件名
document.body.appendChild(link);
link.click(); //执行下载
document.body.removeChild(link);
});
}
}, 100); }, 100);
}; };

View File

@@ -41,6 +41,7 @@ export default ({ command, mode }) => {
base: "./", base: "./",
server: { server: {
host: "127.0.0.1", host: "127.0.0.1",
allowedHosts: true,
port: 4000, // 设置服务启动端口号 port: 4000, // 设置服务启动端口号
// port: Number(loadEnv(mode, process.cwd()).VITE_APP_PORT), // port: Number(loadEnv(mode, process.cwd()).VITE_APP_PORT),
@@ -53,11 +54,10 @@ export default ({ command, mode }) => {
proxy: { proxy: {
"/api": { "/api": {
// target: "http://192.168.1.63/api/", // target: "http://192.168.1.63/api/",
// target: "http://192.168.1.133:4000/api/", // target: "http://192.168.1.133:18093",
//target: "http://192.168.1.62:10215", //target: "http://192.168.1.62:10215",
target: 'http://192.168.1.127:18093', //cdf // target: 'http://192.168.1.127:18093', //cdf
// target: 'http://192.168.1.63/api', //cdf target: "http://192.168.1.103:19001", //cdf
// target: 'http://192.168.1.130:18093', //cdf
changeOrigin: true, changeOrigin: true,
secure: false, secure: false,
rewrite: (path) => path.replace(/^\/api/, ""), rewrite: (path) => path.replace(/^\/api/, ""),