微调
This commit is contained in:
@@ -17,6 +17,19 @@
|
||||
<!-- <el-button :icon="CirclePlus" type="primary" @click="openDialog('add')">新增</el-button>-->
|
||||
</div>
|
||||
<div style="display: flex">
|
||||
<!-- 通信脚本 -->
|
||||
<el-tabs type="border-card" v-model="firstName" style="height: 100%" class="hidden-tab">
|
||||
<el-tab-pane label="通讯脚本" name="first">
|
||||
<Commun
|
||||
:activeName="activeName"
|
||||
:formContent="props.formContent"
|
||||
:options="props.options"
|
||||
style="width: 360px"
|
||||
:disabled="tab.children.length == 0 ? false : true"
|
||||
ref="communRef"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- 2级tab -->
|
||||
<el-tabs
|
||||
type="border-card"
|
||||
@@ -178,7 +191,7 @@
|
||||
<script setup lang="ts">
|
||||
import { type PropType, ref, nextTick, onMounted, watch } from 'vue'
|
||||
import Tree from './tree.vue'
|
||||
import Commun from './communication.vue'
|
||||
import Commun from '@/views/machine/testScript/components//communication.vue'
|
||||
import {type CascaderOption, ElMessage} from 'element-plus'
|
||||
import { getTreeData } from '@/api/check/test'
|
||||
import {CirclePlus, Delete, Check, CopyDocument, View, EditPen, VideoPlay, VideoPause, Loading} from '@element-plus/icons-vue'
|
||||
@@ -234,7 +247,7 @@ const childActiveName = ref('')
|
||||
const childActiveIndex = ref(0)
|
||||
const firstName = 'first'
|
||||
const viewRowRef = ref()
|
||||
const communicationList = ref([])
|
||||
const communicationList = ref<[]>([])
|
||||
const testProjectPopupRef = ref()
|
||||
const tableData: any = ref([])
|
||||
const tabData: any = ref([])
|
||||
@@ -325,6 +338,7 @@ const setTab = row => {
|
||||
const copyActiveName = ref('')
|
||||
// 获取通讯脚本点击
|
||||
const getCommunication = () => {
|
||||
console.log('controlSourceDetail',communRef.value[0]?.getData())
|
||||
communicationList.value = communRef.value[0]?.getData()
|
||||
}
|
||||
// 切换大tab控制小tab
|
||||
@@ -368,13 +382,7 @@ const inquireTable = () => {
|
||||
|
||||
|
||||
}
|
||||
// 打开 drawer(新增、编辑)
|
||||
const openDialog = (titleType: string, row: Partial<TestScript.ResTestScript> = {}) => {
|
||||
showDialog.value = true
|
||||
setTimeout(() => {
|
||||
testProjectPopupRef.value?.open(titleType, row)
|
||||
}, 0)
|
||||
}
|
||||
|
||||
|
||||
// 查看
|
||||
const view = (row: Partial<TestScript.ResTestScript> = {}) => {
|
||||
@@ -395,6 +403,11 @@ const view = (row: Partial<TestScript.ResTestScript> = {}) => {
|
||||
})
|
||||
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)
|
||||
|
||||
@@ -589,6 +602,10 @@ defineExpose({
|
||||
font-size: 30px; /* 增大图标的大小 */
|
||||
}
|
||||
|
||||
.hidden-tab {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
|
||||
Reference in New Issue
Block a user