From 37e257afc81ea248e93ca6ab51622b00fcb52b5a Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Mon, 10 Mar 2025 11:39:10 +0800 Subject: [PATCH] =?UTF-8?q?Loading=E5=8A=A0=E8=BD=BD=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/controlSourceDetail.vue | 84 +++++++++++++------ 1 file changed, 59 insertions(+), 25 deletions(-) diff --git a/frontend/src/views/machine/controlSource/components/controlSourceDetail.vue b/frontend/src/views/machine/controlSource/components/controlSourceDetail.vue index 9d80cb4..2f3d2ad 100644 --- a/frontend/src/views/machine/controlSource/components/controlSourceDetail.vue +++ b/frontend/src/views/machine/controlSource/components/controlSourceDetail.vue @@ -112,30 +112,36 @@
-
- - - +
+ + + + + + + + +
+
+ +
+
Loading...
+
标准源加量输出:{{hour}}时{{minute}}分{{second}}秒
启动 停止
@@ -160,7 +166,7 @@ v-if="showDialog" /> - ({ - userPageId: '', - scriptId: '', + userPageId: '', + scriptId: '', scriptIndex: 0, sourceId: '', valueType:-1 }) // 获取树 -const getTree = () => { +const getTree = () => { getTreeData({ scriptId: '9ff96807cf8c7524587982ed8baa8b57' }).then(res => { if (res.code === 'A0000') { treeData.value = res.data - + // 添加tab子项 props.options.forEach((k: any, i: number) => { tabData.value[i].children = [] @@ -335,7 +341,7 @@ const tabChange = () => { tabData.value.filter((item: any) => item.value == activeName.value)[0]?.children[0]?.value || '' } - + } inquireTable() } @@ -391,7 +397,7 @@ const view = (row: Partial = {}) => { setTimeout(() => { viewRowRef.value?.open(row, communicationList.value, parentTabName, childrenTabName.value) }, 0) - + } // 定义 startLoading 方法 @@ -426,6 +432,9 @@ const stopLoading = async () => { const startTimeCount = () => { + // Loading效果展示 + showLoading.value = true + hour.value = 0 minute.value = 0 second.value = 0 @@ -448,6 +457,8 @@ const stopTimeCount = () => { if (timer) { clearInterval(timer) } + //Loading效果关闭 + showLoading.value = false } // 获取左边树数据 @@ -467,7 +478,7 @@ onMounted(() => { }) }) activeName.value = tabData.value[0].value - + valueCode.value = dictStore .getDictData('Script_Value_Type') .filter(item => item.id == props.formContent.valueType)[0].code @@ -553,7 +564,7 @@ defineExpose({ align-items: center; justify-content: center; - .loading-container { + .black-container { background-color: #000; width: 300px; height: 300px; @@ -561,6 +572,29 @@ defineExpose({ align-items: center; justify-content: center; margin-left: 20px; + + .loading-container{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + } + } +} + +.loading-box { + animation: rotate 2s linear infinite; + font-size: 30px; /* 增大图标的大小 */ +} + +@keyframes rotate { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); } }