修改无锡测试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

@@ -74,7 +74,7 @@
<el-table-column
prop="duration"
align="center"
label="持续时间(S)"
label="持续时间(s)"
width="100"
/>
<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-tree-select
v-model="deptsIndex"
:teleported="false"
:data="deptsList"
:render-after-expand="false"
clearable
@@ -95,8 +96,8 @@
style="width: 150px"
size="small"
:max="100"
:precision="1"
:step="1"
:precision="2"
:step="0.1"
@change="
(e) => (e == null ? (eventForm.eventValueMin = 1) : null)
"
@@ -112,8 +113,8 @@
style="width: 150px"
size="small"
:max="100"
:precision="1"
:step="1"
:precision="2"
:step="0.1"
@change="
(e) => (e == null ? (eventForm.eventValueMax = 1) : null)
"
@@ -129,13 +130,13 @@
style="width: 150px"
size="small"
:max="1000000"
:precision="1"
:step="1"
:precision="2"
:step="0.1"
@change="
(e) => (e == null ? (eventForm.eventDurationMin = 1) : null)
"
><template #suffix>
<span>ms</span>
<span>s</span>
</template></el-input-number
>
<span> < 持续时间 < </span>
@@ -146,13 +147,13 @@
style="width: 150px"
size="small"
:max="1000000"
:precision="1"
:step="1"
:precision="2"
:step="0.1"
@change="
(e) => (e == null ? (eventForm.eventDurationMax = 1) : null)
"
><template #suffix>
<span>ms</span>
<span>s</span>
</template></el-input-number
>
</el-form-item>
@@ -261,7 +262,7 @@
<el-table-column
prop="duration"
align="center"
label="持续时间(S)"
label="持续时间(s)"
width="90"
/>
<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>
<!-- 配网计算 -->
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
<splitpanes
style="height: 100%"
class="default-theme"
id="navigation-splitpanes"
>
<pane :size="20">
<PointTree :showSelect="false" @node-click="handleNodeClick" @init="handleNodeClick"></PointTree>
<PointTree
:showSelect="false"
@node-click="handleNodeClick"
@init="handleNodeClick"
></PointTree>
</pane>
<pane style="background-color: rgba(44, 46, 60, 0.1)" :size="100 - size">
<el-form :model="form" inline label-width="auto">
<el-form-item label="谐波类型">
<el-radio-group v-model="form.type">
@@ -15,86 +22,217 @@
</el-radio-group>
</el-form-item>
<el-form-item label="谐波次数">
<el-select v-model="form.index" 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
v-model="form.index"
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-form-item>
<el-form-item label="负荷数据">
<el-select v-model="form.loadDataId" 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
v-model="form.loadDataId"
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-form-item>
<el-form-item>
<!-- <el-button type="primary" icon="el-icon-Plus" @click="push('/admin/division/aListOfLoadData')">
新增
</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>
<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"
style="height: 100%">
<el-tab-pane
v-for="(item, index) in tabList"
:key="item"
:label="item.label"
:name="index"
style="height: 100%"
>
<div>
<div>
<span style="color: #fff">时间范围</span>
<el-date-picker v-model="item.time" class="mr10 ml10" 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-date-picker
v-model="time"
class="mr10 ml10"
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>
</div>
<div v-if="item.showEcahr == 1" class="harmonicButton">
<el-form :inline="true" v-model="item.form">
<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>
<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>
</el-input>
</el-form-item>
<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>
<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>
</el-input>
</el-form-item>
<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>
<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>
</el-input>
</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 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-form>
</div>
<div class="box" 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
class="box"
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 class="box boxTab" v-loading="loading1" element-loading-background="#343849c7">
<MyEChart :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">
<div
class="box boxTab"
v-loading="loading1"
element-loading-background="#343849c7"
>
<MyEChart
: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">
{{
Math.floor(scope.row.responsibilityData * 10000) /
10000
Math.floor(scope.row.responsibilityData * 10000) / 10000
}}
</template>
</el-table-column>
@@ -106,7 +244,6 @@
</el-tabs>
</pane>
</splitpanes>
</template>
<script lang="ts" setup>
@@ -142,6 +279,7 @@ const xAxisData = ref([]);
const loading = ref(false);
const loading1 = ref(false);
const tabList: any = ref([]);
const time: any = ref([]);
const activeName = ref(0);
const xValue = ref("");
const showTabs = ref(false);
@@ -158,8 +296,7 @@ const handleNodeClick = (data: any) => {
dotList.value = data;
setTimeout(() => {
emit("setTitle", data.alias);
}, 0)
}, 0);
}
};
@@ -201,11 +338,12 @@ const submit = () => {
showTabs.value = true;
let list = JSON.parse(JSON.stringify(form.index)).sort((a, b) => a - b);
tabList.value = [];
time.value = [timeList.startTime, timeList.endTime];
list.forEach((item: any) => {
tabList.value.push({
label: item + "次谐波",
key: item,
time: [timeList.startTime, timeList.endTime],
time: [],
showExecute: false,
form: {
limit: "",
@@ -230,8 +368,8 @@ const execute = async (item: any, index: number) => {
tabList.value[activeName.value].showDynamic = false;
loading.value = true;
await getHistoryHarmData({
searchBeginTime: item.time[0],
searchEndTime: item.time[1],
searchBeginTime: time.value[0],
searchEndTime: time.value[1],
type: form.type,
time: item.key,
lineId: dotList.value.id,
@@ -616,10 +754,6 @@ onMounted(() => {
}
});
defineExpose({
openDialog,
});
@@ -683,7 +817,7 @@ defineExpose({
}
&:after {
background-color: #fffFFF80 !important;
background-color: #ffffff80 !important;
}
}
@@ -697,6 +831,5 @@ defineExpose({
right: 10px;
font-size: 14px;
font-weight: 600;
}
</style>

View File

@@ -307,7 +307,7 @@ import {
nextTick,
onBeforeUnmount,
} from "vue";
import { ElMessage,ElMessageBox } from "element-plus";
import { ElMessage, ElMessageBox } from "element-plus";
import {
eventSource,
eventAggregation,
@@ -321,6 +321,7 @@ import {
harmOneImage,
hasUpEventList,
} from "@/api/manage_wx/index";
import { HelpFilled, Aim, Memo } from "@element-plus/icons-vue";
const flag = ref(0); // 0 for 暂降, 1 for 谐波, 2 for 谐波放大
const time = ref(0); // 0 for 周, 1 for 月
@@ -686,13 +687,42 @@ const initialAggregation = () => {
// 提取发送消息到iframe的公共方法
const sendMessageToIframe = (type: string, payload: any) => {
window.parent.postMessage(
{
type,
payload,
},
"*"
);
// console.log(123,store.state.iframeLoad);
// window.parent.postMessage(
// {
// type,
// payload,
// },
// "*"
// );
// 如果 iframe 已加载完成,直接发送消息
if (store.state.iframeLoad) {
window.parent.postMessage(
{
type,
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 = {
eventList: [...eventList.value],
color: "#fcfc57",
flagValue: '2',
flagValue: "2",
};
// 发送eventList数据到iframe注意发送的是.value而不是响应式对象本身

View File

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

View File

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

View File

@@ -64,7 +64,7 @@ import { clickImage, realTimeData } from "@/api/manage_wx";
import { Close } from "@element-plus/icons-vue";
import socketClient from "@/utils/webSocketClient";
import DipDetail from "../eventStatistics/dipDetail.vue";
import { useStore } from "vuex";
// 定义接收的 props
const props = defineProps<{
eventList?: [];
@@ -111,7 +111,7 @@ const corners = ref([
// },
]);
const steadyStateList = ref([]);
const store = useStore();
const selectedId = ref("");
// 内部响应式数据
@@ -128,7 +128,11 @@ const handleClickImage = async (elementId: string) => {
}
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 元素
let dataToStore: any[] = [];

View File

@@ -85,8 +85,8 @@
:min="0"
style="width: 150px"
:max="100"
:precision="1"
:step="1"
:precision="2"
:step="0.1"
@change="
(e) => (e == null ? (eventForm.eventValueMin = 1) : null)
"
@@ -101,8 +101,8 @@
:min="0"
style="width: 150px"
:max="100"
:precision="1"
:step="1"
:precision="2"
:step="0.1"
@change="
(e) => (e == null ? (eventForm.eventValueMax = 1) : null)
"
@@ -117,13 +117,13 @@
:min="0"
style="width: 150px"
:max="1000000"
:precision="1"
:step="1"
:precision="2"
:step="0.1"
@change="
(e) => (e == null ? (eventForm.eventDurationMin = 1) : null)
"
><template #suffix>
<span>ms</span>
<span>s</span>
</template></el-input-number
>
<span> < 持续时间 < </span>
@@ -133,13 +133,13 @@
:min="0"
style="width: 150px"
:max="1000000"
:precision="1"
:step="1"
:precision="2"
:step="0.1"
@change="
(e) => (e == null ? (eventForm.eventDurationMax = 1) : null)
"
><template #suffix>
<span>ms</span>
<span>s</span>
</template></el-input-number
>
</el-form-item>
@@ -225,7 +225,7 @@
<el-table-column
prop="duration"
align="center"
label="持续时间(S)"
label="持续时间(s)"
width="100"
/>
<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">
import { ref, watch, onMounted, onUnmounted } from "vue";
import { getActive } from "@/api/manage_wx/index";
import { useStore } from "vuex";
const store = useStore();
const props = defineProps<{
project: { id: string; name: string } | null;
}>();
@@ -37,6 +38,7 @@ watch(
// window.location.origin
iframeSrc.value =
window.location.origin +
// "http://192.168.1.128:4001" +
`/zutai/?id=${newVal.id}&&name=${encodeURIComponent(
newVal.name
)}&&preview=true&&display=true&&graphicDisplay=wx#/preview`;
@@ -50,17 +52,25 @@ watch(
onMounted(() => {
// 监听来自 eventStatistics 组件的消息
window.addEventListener("message", handleMessage);
getActive({}).then((res: any) => {
if (res.code == "A0000") {
// window.location.origin
iframeSrc.value =
window.location.origin +
// "http://192.168.1.128:4001" +
`/zutai/?id=${res.data.id}&&name=${encodeURIComponent(
res.data.name
)}&&preview=true&&display=true&&graphicDisplay=wx#/preview`;
}
});
// 子页面
const iframe = document.getElementById("iframeLeft");
// 监听 iframe 加载完成事件
iframe.addEventListener("load", function () {
// 通知父页面:我已加载完毕
store.dispatch("setIframeLoad", true);
});
});
onUnmounted(() => {
@@ -107,7 +117,6 @@ const sendKeysToIframe = (keyList: string[]) => {
); // 在生产环境中应该指定具体的域名而不是 '*'
}
};
</script>
<style lang="scss" scoped>
.plan {