燕山石化溯源三维电子沙盘-【前端】-Web
WX
2023-08-30 4c846958fd4046b7a125224c759ae7ae0af673fa
src/components/dateTimePicker.vue
@@ -88,15 +88,15 @@
    const store = useStore();
    let selectform = reactive({
      value: "",
      value: null,
      fetch: "",
      start: 0,
      end: 30,
      end: 0,
    });
    let btnState = false;
    let CS = {
      start: 0,
      end: 30,
      end: 0,
      Classify: "",
    };
    const selectBtn = () => {
@@ -130,6 +130,13 @@
        }
        emit("changeTime", { data: newTimeStr, week: week });
        CS.start = selectform.start;
        CS.end = selectform.end;
        CS.Classify = selectform.fetch;
        if (selectform.start > selectform.end) {
          CS.start = selectform.end;
          CS.end = selectform.start;
        }
        if (props.tpData == "d21") {
          menuTool.createFC("sj", newTimeStr);
        } else if (props.tpData == "d22") {
@@ -144,7 +151,6 @@
      }
    };
    function FQselectBtn() {
      selectform.value = "";
      CS.start = selectform.start;
      CS.end = selectform.end;
      CS.Classify = selectform.fetch;
@@ -154,13 +160,53 @@
      }
      if (props.tpData == "d22") {
        CS.Classify = "West";
        menuTool.createFC("fc", "", CS);
      } else if (props.tpData == "d23") {
        CS.Classify = "East";
      }
      if (btnState) {
        menuTool.createFC("sj", selectform.value, CS);
      } else {
        menuTool.createFC("fc", "", CS);
      }
    }
    function changeTime() {}
    watch(
      () => selectform.value,
      (nVal, oVal) => {
        if (nVal == null) {
          btnState = false;
        } else {
          btnState = true;
        }
      },
      { deep: true }
    );
    watch(
      () => props.tpData,
      (nVal, oVal) => {
        if (nVal == "d22") {
          selectform.start = 20;
          selectform.end = 25;
          selectform.value = null;
        } else if (nVal == "d23") {
          selectform.start = 13;
          selectform.end = 19;
          selectform.value = null;
        }
      },
      { deep: true }
    );
    onMounted(() => {
      if (props.tpData == "d22") {
        selectform.start = 20;
        selectform.end = 25;
      } else if (props.tpData == "d23") {
        selectform.start = 13;
        selectform.end = 19;
      }
    });
    return {
      selectBtn,
      changeTime,