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>

View File

@@ -120,6 +120,7 @@ const resetFormContent = () => {
}
// 关闭弹窗
const close = () => {
// 清空dialogForm中的值
resetFormContent()
// 重置表单
@@ -162,9 +163,9 @@ const open = async (title: string, row: any) => {
} else {
let list = JSON.parse(row)
formContent.value = list
console.log('🚀 ~ open ~ list:', formContent.value )
show.value = true
}
// 重置表单
dialogFormRef.value?.resetFields()
}
@@ -181,7 +182,7 @@ const treeInfo = async (currentMode: string) => {
const result = await getDictTreeByCode(data)
const result1 = (await getDictTreeByCode({ ...data, code: 'Script_Error' })).data[0].children
const allOptions = await convertToOptions(result.data as Dict.ResDictTree[])
console.log('🚀 ~ treeInfo ~ result1:', allOptions[0]?.children)
//console.log('🚀 ~ treeInfo ~ result1:', allOptions[0]?.children)
const setallTree = await setTree(allOptions[0]?.children, result1)
secondLevelOptions.push(...(setallTree || []))
modeId.value = dictStore.getDictData('Pattern').find(item => item.name === currentMode)?.id

View File

@@ -37,6 +37,7 @@ const defaultProps = {
const activeName = ref('')
const childActiveName = ref('')
const handleNodeClick = (data, node) => {
console.log('handleNodeClick', data, node)
let code = ['Base', 'VOL', 'Freq', 'Harm', 'Base_0_10', 'Base_20_85', 'Base_110_200']
const parents = getParentNodes(node, [])
parents.pop()

View File

@@ -81,7 +81,6 @@ const testScriptPopup = ref()
const valueTypePopup = ref()
const modeStore = useModeStore()
const dictStore = useDictStore()
const getTableList = (params: any) => {
let newParams = JSON.parse(JSON.stringify(params))
const patternId = dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id //获取数据字典中对应的id
@@ -144,6 +143,7 @@ const openDialog = (titleType: string, row: Partial<TestScript.ResTestScript> =
if (modeStore.currentMode == '比对式') {
comparisonPopup.value?.open(titleType, row, modeStore.currentMode)
} else {
if (titleType == 'add') {
router.push({
path: '/machine/testScriptAdd',