diff --git a/src/components/state-app/deviceStates/StationProperty.vue b/src/components/state-app/deviceStates/StationProperty.vue
index 60545e4..48b23de 100644
--- a/src/components/state-app/deviceStates/StationProperty.vue
+++ b/src/components/state-app/deviceStates/StationProperty.vue
@@ -21,19 +21,15 @@
:options="optionsChoose"
label="车站控制模式转换"
/>
-
-
@@ -50,17 +46,6 @@ const stationModel = reactive(new StationState());
const optionsChoose = ['中控', '站控且允许转到中控', '站控且不允许转到中控'];
const controlChange = ref('');
-const ipRtuStusDown = ref('');
-const ipRtuStusInLocalCtrl = ref('');
-const optionsChooseCommon = ['是', '否'];
-enum showSelect {
- 是 = 'true',
- 否 = 'false',
-}
-enum showSelectData {
- true = '是',
- false = '否',
-}
lineStore.$subscribe;
watch(
@@ -68,12 +53,6 @@ watch(
(val) => {
if (val && val.type == Station.Type) {
stationModel.copyFrom((val as Station).states as StationState);
- ipRtuStusDown.value = (showSelectData as never)[
- stationModel.ipRtuStusDown + ''
- ];
- ipRtuStusInLocalCtrl.value = (showSelectData as never)[
- stationModel.ipRtuStusInLocalCtrl + ''
- ];
}
}
);
@@ -82,23 +61,11 @@ onMounted(() => {
const station = lineStore.selectedGraphic as Station;
if (station) {
stationModel.copyFrom((station as Station).states as StationState);
- ipRtuStusDown.value = (showSelectData as never)[
- stationModel.ipRtuStusDown + ''
- ];
- ipRtuStusInLocalCtrl.value = (showSelectData as never)[
- stationModel.ipRtuStusInLocalCtrl + ''
- ];
}
});
function onUpdate() {
const station = lineStore.selectedGraphic as Station;
- stationModel.ipRtuStusDown = JSON.parse(
- (showSelect as never)[ipRtuStusDown.value]
- );
- stationModel.ipRtuStusInLocalCtrl = JSON.parse(
- (showSelect as never)[ipRtuStusInLocalCtrl.value]
- );
const data = {
ipRtuStusDown: false,
ipRtuStusInLocalCtrl: false,
@@ -107,10 +74,8 @@ function onUpdate() {
id: station.id,
};
const lineId = lineStore.lineId as number;
- data.ipRtuStusDown = JSON.parse((showSelect as never)[ipRtuStusDown.value]);
- data.ipRtuStusInLocalCtrl = JSON.parse(
- (showSelect as never)[ipRtuStusInLocalCtrl.value]
- );
+ data.ipRtuStusDown = stationModel.ipRtuStusDown;
+ data.ipRtuStusInLocalCtrl = stationModel.ipRtuStusInLocalCtrl;
if (station) {
switch (controlChange.value) {
case '中控':