diff --git a/frontend/src/views/machine/controlSource/components/controlSourceDetail.vue b/frontend/src/views/machine/controlSource/components/controlSourceDetail.vue index 909b087..b843748 100644 --- a/frontend/src/views/machine/controlSource/components/controlSourceDetail.vue +++ b/frontend/src/views/machine/controlSource/components/controlSourceDetail.vue @@ -6,7 +6,7 @@
- +
@@ -135,14 +135,16 @@
-
- +
+
+
Loading...
-
- +
+
+
Loading
@@ -155,7 +157,7 @@ type="primary" size="large" @click="startLoading" - + :disabled="pauseDisabled" >启动 ([]) const valueCode = ref('') //Absolute绝对值 @@ -286,9 +288,9 @@ const second = ref(0) const emit = defineEmits(['update:activeName','update:activeIndex','update:startDisabeld','update:pauseDisabled']) watch(()=>props.formControl.scriptId,()=>{ - //console.log("切换脚本",props.formControl.scriptId); if(props.formControl.scriptId!=''){ getTree() + } }) const controlContent = ref({ @@ -356,7 +358,7 @@ const getTree = () => { } }) - + treeRef.value.checkTree() } @@ -437,11 +439,7 @@ const view = (row: Partial = {}) => { }) viewDialog.value = true setTimeout(() => { - console.log('row',row) - console.log('communicationList',communicationList.value) - console.log('parentTabName',parentTabName) - console.log('childrenTabName',parentTabName) - console.log('activeName',activeName.value) + viewRowRef.value?.open(row, communicationList.value, parentTabName, childrenTabName.value) }, 0) @@ -515,6 +513,7 @@ const addTab = (row: any) => { } onMounted(() => { + getTree() props.options.forEach((item: any) => { tabData.value.push({ @@ -605,37 +604,74 @@ defineExpose({ } } -.page{ +.page { display: flex; flex-direction: column; align-items: center; justify-content: center; +} - .black-container { - background-color: #000; - width: 300px; - height: 300px; - display: flex; - align-items: center; - justify-content: center; - margin-left: 20px; +.black-container { + background-color: #000; + width: 300px; + height: 300px; + position: relative; /* 设置为相对定位 */ + display: flex; + 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-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; /* 增大图标的大小 */ + position: relative; /* 设置为相对定位 */ + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; } +.loading-circle { + border: 8px solid rgba(255, 255, 255, 0.932); + border-top: 8px solid var(--el-color-primary); /* 蓝色 */ + border-bottom: 8px solid var(--el-color-primary); /* 蓝色 */ + border-radius: 50%; + width: 200px; + height: 200px; + position: absolute; /* 设置为绝对定位 */ + animation: spin 2s linear infinite; +} + +.loading-circle.static { + animation: none; +} + +.loading-text { + position: absolute; /* 设置为绝对定位 */ + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + color: #fff; + font-size: 20px; /* 根据需要调整字体大小 */ + text-align: center; +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + + + .hidden-tab { display: none; } diff --git a/frontend/src/views/machine/controlSource/components/tree.vue b/frontend/src/views/machine/controlSource/components/tree.vue index 6822fe7..ed3ca0e 100644 --- a/frontend/src/views/machine/controlSource/components/tree.vue +++ b/frontend/src/views/machine/controlSource/components/tree.vue @@ -23,15 +23,17 @@