修改测试bug
This commit is contained in:
@@ -345,8 +345,9 @@ const unBindList = ref([])
|
||||
const bindList = ref([])
|
||||
//0 新增方案 1 修改方案 2 新增测试项 3 修改测试项 4 设备信息
|
||||
const open = async (val: any, id: any, name?: any) => {
|
||||
console.log("🚀 ~ open ~ val:", val)
|
||||
popupType.value = val
|
||||
title.value = val == 0 ? '新增方案' : val == 1 ? '修改方案' : val == 2 ? '新增测试项' : ('修改测试项' + '_' + name)
|
||||
title.value = val == 0 ? '新增方案' : val == 1 ? '修改方案' : val == 2 ? '新增测试项' : val == 3 ? '修改测试项' : ('绑定测试项' + '_' + name)
|
||||
dialogVisible.value = true
|
||||
planId.value = id
|
||||
//新增方案或者测试项数据
|
||||
@@ -477,7 +478,7 @@ const submit = () => {
|
||||
})
|
||||
}
|
||||
//修改测试项
|
||||
if (popupType.value == 3) {
|
||||
if (popupType.value == 3 || popupType.value == 4) {
|
||||
let subForm = JSON.parse(JSON.stringify(form1.value))
|
||||
subForm.list = checkedIdList.value
|
||||
updateRecord(subForm).then((res: any) => {
|
||||
|
||||
@@ -12,8 +12,16 @@
|
||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||
</template>
|
||||
</el-input>
|
||||
<Icon name="el-icon-Plus" size="18"
|
||||
class="fold ml10 menu-collapse" style="cursor: pointer" @click="onAdd"/>
|
||||
<el-tooltip placement="bottom" :hide-after="0">
|
||||
<template #content>
|
||||
<span>新增方案</span>
|
||||
</template>
|
||||
|
||||
<Icon name="el-icon-Plus" size="18" class="fold ml10 menu-collapse" style="cursor: pointer"
|
||||
@click="onAdd" />
|
||||
</el-tooltip>
|
||||
|
||||
|
||||
<Icon @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
||||
:class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 menu-collapse"
|
||||
style="cursor: pointer" />
|
||||
@@ -29,24 +37,52 @@
|
||||
<span>{{ node.label }}</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
|
||||
|
||||
|
||||
|
||||
<a :style="{ marginRight: '0.5rem' }" v-if="data?.children">
|
||||
<el-icon :style="{ color: '#0000FF' }">
|
||||
<Plus @click.stop="add(node, data)" />
|
||||
|
||||
<el-tooltip placement="bottom" :hide-after="0">
|
||||
<template #content>
|
||||
<span>新增测试项</span>
|
||||
</template>
|
||||
<Plus @click.stop="add(node, data)" />
|
||||
</el-tooltip>
|
||||
|
||||
|
||||
|
||||
</el-icon>
|
||||
</a>
|
||||
<a :style="{ marginRight: '0.5rem' }" v-else>
|
||||
<el-icon :style="{ color: '#0000FF' }">
|
||||
<SetUp @click.stop="bind(node, data)" />
|
||||
</el-icon>
|
||||
</a>
|
||||
<a :style="{ marginRight: '0.5rem' }">
|
||||
<el-icon :style="{ color: '#DA3434' }">
|
||||
<Delete @click.stop="del(node, data)" />
|
||||
<el-tooltip placement="bottom" :hide-after="0">
|
||||
<template #content>
|
||||
<span>绑定测试项</span>
|
||||
</template>
|
||||
<SetUp @click.stop="bind(node, data)" />
|
||||
</el-tooltip>
|
||||
|
||||
</el-icon>
|
||||
</a>
|
||||
<a :style="{ marginRight: '0.5rem' }">
|
||||
<el-icon :style="{ color: '#0000FF' }">
|
||||
<Edit @click.stop="edit(node, data)" />
|
||||
<el-tooltip placement="bottom" :hide-after="0">
|
||||
<template #content>
|
||||
<span>修改测试项</span>
|
||||
</template>
|
||||
|
||||
<Edit @click.stop="edit(node, data)" />
|
||||
</el-tooltip>
|
||||
|
||||
|
||||
</el-icon>
|
||||
|
||||
</a>
|
||||
<a :style="{ marginRight: '0.5rem' }">
|
||||
<el-icon :style="{ color: '#DA3434' }">
|
||||
<Delete @click.stop="del(node, data)" />
|
||||
</el-icon>
|
||||
</a>
|
||||
</div>
|
||||
@@ -65,7 +101,7 @@ import { getSchemeTree, getTestRecordInfo } from '@/api/cs-device-boot/planData'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import useCurrentInstance from '@/utils/useCurrentInstance'
|
||||
import { ElTree } from 'element-plus'
|
||||
import { Plus, Edit, Delete ,SetUp} from '@element-plus/icons-vue'
|
||||
import { Plus, Edit, Delete, SetUp } from '@element-plus/icons-vue'
|
||||
import { delRecord } from '@/api/cs-device-boot/planData'
|
||||
import popup from './popup.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
@@ -76,7 +112,10 @@ interface Props {
|
||||
width?: string
|
||||
canExpand?: boolean
|
||||
}
|
||||
|
||||
const visible1 = ref(false)
|
||||
const visible2 = ref(false)
|
||||
const visible3 = ref(false)
|
||||
const visible4 = ref(false)
|
||||
const { proxy } = useCurrentInstance()
|
||||
const menuCollapse = ref(false)
|
||||
const filterText = ref('')
|
||||
@@ -126,9 +165,9 @@ const onAdd = () => {
|
||||
}
|
||||
// 绑定数据
|
||||
const bind = (node: any, data: any) => {
|
||||
console.log("🚀 ~ bind ~ data:", data)
|
||||
emit('bind',data)
|
||||
|
||||
|
||||
emit('bind', data)
|
||||
|
||||
}
|
||||
/** 树形结构数据 */
|
||||
const defaultProps = {
|
||||
@@ -147,7 +186,7 @@ const props = withDefaults(
|
||||
}
|
||||
)
|
||||
|
||||
const emit = defineEmits(['init', 'checkChange', 'nodeChange', 'editNode', 'getChart','onAdd','bind'])
|
||||
const emit = defineEmits(['init', 'checkChange', 'nodeChange', 'editNode', 'getChart', 'onAdd', 'bind'])
|
||||
const config = useConfig()
|
||||
const tree = ref()
|
||||
const treRef = ref()
|
||||
|
||||
Reference in New Issue
Block a user