This commit is contained in:
sjl
2025-03-07 10:17:06 +08:00
parent 2377916f29
commit 7dcff99de5
10 changed files with 804 additions and 6 deletions

View File

@@ -258,11 +258,13 @@ const column = ref([
])
// 获取树
const getTree = () => {
console.log('props.formContent.id', props.formContent.id)
getTreeData({
scriptId: props.formContent.id
}).then(res => {
if (res.code === 'A0000') {
treeData.value = res.data
console.log('tree',treeData.value)
// 添加tab子项
props.options.forEach((k: any, i: number) => {
tabData.value[i].children = []
@@ -385,7 +387,7 @@ const copyRow = async (row: any) => {
}
// 查看
const view = (row: Partial<TestScript.ResTestScript> = {}) => {
getCommunication()
//当前点击的一级tab
const parentTabName = communicationList.value.find(t => t.id === activeName.value)?.name || '未找到对应名称';
@@ -441,6 +443,7 @@ const addTab = (row: any) => {
const saveTheNewsletter = () => {}
onMounted(() => {
getTree()
console.log('123',props.options)
props.options.forEach((item: any) => {
tabData.value.push({
label: item.label.replace(/准确度|检测/g, ''),
@@ -453,6 +456,7 @@ onMounted(() => {
valueCode.value = dictStore
.getDictData('Script_Value_Type')
.filter(item => item.id == props.formContent.valueType)[0].code
})
</script>
<style lang="scss" scoped>