|
@@ -7,6 +7,8 @@ import { registerAreaPens } from "./pens/register";
|
|
|
import { useSelection } from "@/services/selections";
|
|
|
import { useMonitorPointPen } from "@/services/monitor-point-pen";
|
|
|
import { monitorPointData, MonitorPointPen } from "./pens/monitorPoint";
|
|
|
+import { EnvAreaMsgType, getEnvAreaMsgType } from ".";
|
|
|
+import { IframeMsg } from "@/types";
|
|
|
|
|
|
const { select } = useSelection();
|
|
|
const { setMonitorPointPens } = useMonitorPointPen();
|
|
@@ -85,7 +87,7 @@ const patchFlag = () => {
|
|
|
const monitorPointPens = data.pens.filter(
|
|
|
(item) => item.name === monitorPointData.name
|
|
|
);
|
|
|
-
|
|
|
+
|
|
|
setMonitorPointPens(monitorPointPens as MonitorPointPen[]);
|
|
|
};
|
|
|
|
|
@@ -143,11 +145,27 @@ const changeContextMenuVisible = (e: boolean) => {
|
|
|
};
|
|
|
|
|
|
const handleOk = () => {
|
|
|
- return;
|
|
|
+ const msg: IframeMsg = {
|
|
|
+ msgType: getEnvAreaMsgType(EnvAreaMsgType.SubmitEditArea),
|
|
|
+ };
|
|
|
+
|
|
|
+ window.parent.postMessage(msg, "*");
|
|
|
};
|
|
|
|
|
|
const handleCancel = () => {
|
|
|
- return;
|
|
|
+ const msg: IframeMsg = {
|
|
|
+ msgType: getEnvAreaMsgType(EnvAreaMsgType.CancelEditArea),
|
|
|
+ };
|
|
|
+
|
|
|
+ window.parent.postMessage(msg, "*");
|
|
|
+};
|
|
|
+
|
|
|
+const handleOutdoorTempHumidity = () => {
|
|
|
+ const msg: IframeMsg = {
|
|
|
+ msgType: getEnvAreaMsgType(EnvAreaMsgType.EditOutdoorTempHumidity),
|
|
|
+ };
|
|
|
+
|
|
|
+ window.parent.postMessage(msg, "*");
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -169,7 +187,7 @@ const handleCancel = () => {
|
|
|
<t-button
|
|
|
class="hvac-outline-button temperature-humidity-button outdoor"
|
|
|
variant="outline"
|
|
|
- @click="handleOk"
|
|
|
+ @click="handleOutdoorTempHumidity"
|
|
|
>
|
|
|
<SvgIcon name="outdoor"></SvgIcon>
|
|
|
<span>{{ $t("点击配置") }}</span>
|