| | |
| | | const store = useStore(); |
| | | |
| | | let selectform = reactive({ |
| | | value: "", |
| | | value: null, |
| | | fetch: "", |
| | | start: 0, |
| | | end: 0, |
| | | }); |
| | | let btnState = false; |
| | | let CS = { |
| | | start: "", |
| | | end: "", |
| | | start: 0, |
| | | end: 0, |
| | | Classify: "", |
| | | }; |
| | | const selectBtn = () => { |
| | |
| | | } |
| | | |
| | | emit("changeTime", { data: newTimeStr, week: week }); |
| | | if (props.tpData == "d2") { |
| | | if (!btnState) { |
| | | return ElMessage.error("请先选择风区"); |
| | | } |
| | | 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") { |
| | | CS.Classify = "West"; |
| | | menuTool.createFC("sj", newTimeStr, CS); |
| | | } else if (props.tpData == "d23") { |
| | | CS.Classify = "East"; |
| | | menuTool.createFC("sj", newTimeStr, CS); |
| | | } else { |
| | | menuTool.createWRW("sj", newTimeStr); |
| | |
| | | } |
| | | }; |
| | | function FQselectBtn() { |
| | | btnState = true; |
| | | selectform.value = ""; |
| | | CS.start = selectform.start; |
| | | CS.end = selectform.end; |
| | | CS.Classify = selectform.fetch; |
| | |
| | | CS.start = selectform.end; |
| | | CS.end = selectform.start; |
| | | } |
| | | menuTool.createFC("fc", "", CS); |
| | | if (props.tpData == "d22") { |
| | | CS.Classify = "West"; |
| | | } 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, |
| | |
| | | color: #ffffff; |
| | | padding-right: 10px; |
| | | } |
| | | i { |
| | | font-size: 24px; |
| | | font-weight: 400; |
| | | color: #ffffff; |
| | | padding-right: 10px; |
| | | padding-left: 10px; |
| | | } |
| | | :deep(.el-date-editor) { |
| | | height: 64px; |
| | | } |