UI-Project/src/views/hollow/hollowequipmenttwo.vue
@@ -23,7 +23,6 @@
            $t('hellow.stopproject')
          }}
        </el-button>
    <el-switch style="margin-top: 7px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('hellow.schedulingswitch')" @change="handleChange" />
  </div>
     
    <div id="dotClass">
@@ -511,7 +510,6 @@
const cell = ref('')
const cella = ref('')
const selectedProjectNo = ref('');
const ganghua = ref(true)
const totalPairQuantity = ref('')
const totalPairQuantitya = ref('')
const bottomRemove = ref('')
@@ -993,26 +991,7 @@
        console.error(error);
      }
    }
// 调度
const handleChange = async () => {
  try  {
    const body = {
      flag: ganghua.value,
    };
  var url="/hollowGlass/hollowGlassOutRelationInfo/dispatchHollowSwitch?flag="+ganghua.value;
  const response = await request.post(url)
    if (response.code == 200) {
      ElMessage.success(response.message);
      ganghua.value = response.data
    }else {
      ElMessage.error(response.message);
      }
}
catch (error) {
    console.error(error);
  }
}
onBeforeUnmount(() => {
  console.log("关闭了")
  closeWebSocket();