Browse Source

feat: 气浮按钮删除,欺负值变更为化验,开关限制放开

sunxiao 4 weeks ago
parent
commit
cbaf49cf9b

+ 6 - 4
src/views/control/MedicinalView.vue

@@ -627,8 +627,9 @@ onUnmounted(() => {
                             :btn-group="[
                               { label: '手动', value1: '', value2: '' },
                               { label: '仪表', value1: waterConfigParams.jsCodYB },
-                              { label: '化验', value1: waterConfigParams.jsCodHY },
-                              { label: '气浮', value1: waterConfigParams.oneCodQF },
+                              { label: '化验', value1: waterConfigParams.oneCodQF },
+                              // { label: '化验', value1: waterConfigParams.jsCodHY },
+                              // { label: '气浮', value1: waterConfigParams.oneCodQF },
                             ]"></BaseChooseItem>
                           <BaseChooseItem
                             tab-key="south"
@@ -778,8 +779,9 @@ onUnmounted(() => {
                             :btn-group="[
                               { label: '手动', value1: '', value2: '' },
                               { label: '仪表', value1: waterConfigParams.jsCodYB },
-                              { label: '化验', value1: waterConfigParams.jsCodHY },
-                              { label: '气浮', value1: waterConfigParams.twoCodQF },
+                              { label: '化验', value1: waterConfigParams.twoCodQF },
+                              // { label: '化验', value1: waterConfigParams.jsCodHY },
+                              // { label: '气浮', value1: waterConfigParams.twoCodQF },
                             ]"></BaseChooseItem>
                           <BaseChooseItem
                             tab-key="south"

+ 10 - 6
src/views/control/components/TheResultPanel.vue

@@ -1,9 +1,11 @@
 <script setup>
 import { computed, onMounted, ref } from 'vue';
-import { NNumberAnimation } from 'naive-ui';
+import { NNumberAnimation, useMessage } from 'naive-ui';
 import { controlApi } from "@/api/control"
 import { SvgIcon } from '@/components';
 
+const message = useMessage();
+
 const isVisibleBtn = defineModel();
 const systemStatus = ref({});
 const modelSystemStatus = defineModel('system');
@@ -94,7 +96,9 @@ const getPositionText = computed(() => {
   return str;
 })
 
-const emitEvent = (type) => {
+const emitEvent = async (type) => {
+
+  systemStatus.value.activeTwo = systemStatus.value.activeTwo === 1 ? 0 : 1;
 
   // const name = type == 'one' ? '西池' : '东池';
 
@@ -110,9 +114,9 @@ const emitEvent = (type) => {
   //   systemStatus.value.activeTwo = systemStatus.value.activeTwo === 1 ? 0 : 1;
   // }
 
-  // controlApi.putSystemStatus({ ...systemStatus.value });
+  await controlApi.putSystemStatus({ ...systemStatus.value });
 
-  // message.success(`${name}投药状态更改成功`);
+  message.success(`投药状态更改成功`);
 };
 const emitUpdate = async () => {
   emit('on-update');
@@ -383,8 +387,8 @@ onMounted(() => {
   .circle2,
   .circle3 {
     position: absolute;
-    width: 36px;
-    height: 36px;
+    width: 46px;
+    height: 46px;
     background: rgba(137, 142, 254, 1);
     border: 1px solid rgba(137, 142, 254, 0.85);
     border-radius: 999px;