微调
This commit is contained in:
@@ -184,6 +184,7 @@ import TestScriptDipTab from '@/views/machine/testScript/components/testScriptDi
|
|||||||
import { useDictStore } from '@/stores/modules/dict'
|
import { useDictStore } from '@/stores/modules/dict'
|
||||||
import { addScriptDtls } from '@/api/device/testScript'
|
import { addScriptDtls } from '@/api/device/testScript'
|
||||||
import scriptForm from './scriptForm'
|
import scriptForm from './scriptForm'
|
||||||
|
import { on } from 'events'
|
||||||
|
|
||||||
const emit = defineEmits(['addTab', 'close', 'getCommunication'])
|
const emit = defineEmits(['addTab', 'close', 'getCommunication'])
|
||||||
const dictStore = useDictStore()
|
const dictStore = useDictStore()
|
||||||
@@ -578,7 +579,7 @@ const open = (sign: string, row: any) => {
|
|||||||
|
|
||||||
handleRowClick({ name: 'L1', sort: 0 }, { label: '相别' })
|
handleRowClick({ name: 'L1', sort: 0 }, { label: '相别' })
|
||||||
dictStore.getDictData('Script_Value_Type')
|
dictStore.getDictData('Script_Value_Type')
|
||||||
console.log('🚀 ~ open ~ tabChildren.value:', tabChildren.value)
|
//console.log('🚀 ~ open ~ tabChildren.value:', tabChildren.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断后台没有谐波,简谐波值 用于回显
|
// 判断后台没有谐波,简谐波值 用于回显
|
||||||
@@ -609,6 +610,7 @@ const copyRow = (num: number, index: number) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 打开 drawer(新增、编辑)
|
// 打开 drawer(新增、编辑)
|
||||||
const openDialog = () => {}
|
const openDialog = () => {}
|
||||||
|
|
||||||
|
|||||||
@@ -187,9 +187,11 @@
|
|||||||
v-if="showDialog"
|
v-if="showDialog"
|
||||||
/>
|
/>
|
||||||
<!-- 查看 -->
|
<!-- 查看 -->
|
||||||
<viewRow ref="viewRowRef"
|
<ViewRow ref="viewRowRef"
|
||||||
:activeName="activeName"
|
:activeName="activeName"
|
||||||
:formContent="props.formContent"
|
:formContent="props.formContent"
|
||||||
|
@close="viewDialog = false"
|
||||||
|
v-if="viewDialog"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -208,7 +210,7 @@ import { dlsDetails, deleteDtls, updateDtls, addScriptDtls, checkDataList } from
|
|||||||
import { useDictStore } from '@/stores/modules/dict'
|
import { useDictStore } from '@/stores/modules/dict'
|
||||||
import { useHandleData } from '@/hooks/useHandleData'
|
import { useHandleData } from '@/hooks/useHandleData'
|
||||||
import { scriptDtlsCheckDataList } from '@/api/device/testScript/index'
|
import { scriptDtlsCheckDataList } from '@/api/device/testScript/index'
|
||||||
import viewRow from './viewRow.vue'
|
import ViewRow from '@/views/machine/testScript/components/viewRow.vue'
|
||||||
interface TabOption {
|
interface TabOption {
|
||||||
label?: string
|
label?: string
|
||||||
name?: string
|
name?: string
|
||||||
@@ -230,6 +232,7 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
|
const viewDialog = ref(false)
|
||||||
const dictStore = useDictStore()
|
const dictStore = useDictStore()
|
||||||
const activeName = ref('')
|
const activeName = ref('')
|
||||||
const childActiveName = ref('')
|
const childActiveName = ref('')
|
||||||
@@ -397,8 +400,11 @@ const view = (row: Partial<TestScript.ResTestScript> = {}) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(tabData.value)
|
viewDialog.value = true
|
||||||
viewRowRef.value?.open(row,communicationList.value,parentTabName,childrenTabName.value)
|
setTimeout(() => {
|
||||||
|
viewRowRef.value?.open(row, communicationList.value, parentTabName, childrenTabName.value)
|
||||||
|
}, 0)
|
||||||
|
|
||||||
}
|
}
|
||||||
// 删除
|
// 删除
|
||||||
const deleteRow = async (row: any) => {
|
const deleteRow = async (row: any) => {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
<el-descriptions-item label="值类型">相对值</el-descriptions-item>
|
<el-descriptions-item label="值类型">相对值</el-descriptions-item>
|
||||||
</el-descriptions> -->
|
</el-descriptions> -->
|
||||||
<!-- tableData?.channelList -->
|
<!-- tableData?.channelList -->
|
||||||
<el-tabs type="border-card" >
|
<el-tabs type="border-card">
|
||||||
<el-tab-pane :label="`L${item}`" v-for="item in 3" :key="item">
|
<el-tab-pane :label="`L${item}`" v-for="item in 3" :key="item" >
|
||||||
<div class="tabPane">
|
<div class="tabPane">
|
||||||
<el-descriptions :column="4" border>
|
<el-descriptions :column="4" border>
|
||||||
<el-descriptions-item label-align="right" label="电压有效值(%)">
|
<el-descriptions-item label-align="right" label="电压有效值(%)">
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="参考设定值列表">
|
<el-tab-pane label="参考设定值列表" >
|
||||||
<div class="tabPane">
|
<div class="tabPane">
|
||||||
<el-table
|
<el-table
|
||||||
:data="setValue_TableData"
|
:data="setValue_TableData"
|
||||||
@@ -219,11 +219,12 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
import { dialogBig } from '@/utils/elementBind'
|
import { dialogBig } from '@/utils/elementBind'
|
||||||
import { getDictTreeByCode } from '@/api/system/dictionary/dictTree'
|
import { getDictTreeByCode } from '@/api/system/dictionary/dictTree'
|
||||||
import { scriptDtlsCheckDataList } from '@/api/device/testScript/index'
|
import { scriptDtlsCheckDataList } from '@/api/device/testScript/index'
|
||||||
import { Dictionary } from 'lodash'
|
import { Dictionary } from 'lodash'
|
||||||
|
import { on } from 'events'
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const titleType = ref('')
|
const titleType = ref('')
|
||||||
const tableData: any = ref({})
|
const tableData: any = ref({})
|
||||||
@@ -233,8 +234,9 @@ const harmVIsShow = ref(false)
|
|||||||
const harmAIsShow = ref(false)
|
const harmAIsShow = ref(false)
|
||||||
const iHarmVIsShow = ref(false)
|
const iHarmVIsShow = ref(false)
|
||||||
const iHarmAIsShow = ref(false)
|
const iHarmAIsShow = ref(false)
|
||||||
const activeTab = ref<string | number>('L1') // 设置默认激活的标签页
|
const emit = defineEmits(['close'])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
||||||
activeName: {
|
activeName: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
@@ -278,8 +280,7 @@ const tabVisibilityMap: { [key: string]: { harmVIsShow: boolean, harmAIsShow: bo
|
|||||||
'谐波有功功率': { harmVIsShow: true, harmAIsShow: true, iHarmVIsShow: false, iHarmAIsShow: false },
|
'谐波有功功率': { harmVIsShow: true, harmAIsShow: true, iHarmVIsShow: false, iHarmAIsShow: false },
|
||||||
};
|
};
|
||||||
const open = async (row: any,communicationList:any,parentTabName:string,childrenTabName:string) => {
|
const open = async (row: any,communicationList:any,parentTabName:string,childrenTabName:string) => {
|
||||||
//重置标签页
|
|
||||||
activeTab.value = 'L1' // 设置默认激活的标签页
|
|
||||||
//对应表格显示隐藏
|
//对应表格显示隐藏
|
||||||
const visibilitySettings = tabVisibilityMap[parentTabName] || { harmVIsShow: false, harmAIsShow: false, iHarmVIsShow: false, iHarmAIsShow: false };
|
const visibilitySettings = tabVisibilityMap[parentTabName] || { harmVIsShow: false, harmAIsShow: false, iHarmVIsShow: false, iHarmAIsShow: false };
|
||||||
harmVIsShow.value = visibilitySettings.harmVIsShow;
|
harmVIsShow.value = visibilitySettings.harmVIsShow;
|
||||||
@@ -339,16 +340,14 @@ const open = async (row: any,communicationList:any,parentTabName:string,children
|
|||||||
})
|
})
|
||||||
setValue_TableData.value = res.data
|
setValue_TableData.value = res.data
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
const close = () => {
|
const close = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理多余数据
|
// 处理多余数据
|
||||||
@@ -385,7 +384,6 @@ const isEqual = (obj1: any, obj2: any) => {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -157,6 +157,8 @@ const open = async (sign: string, data: TestSource.ResTestSource, currentMode: s
|
|||||||
dialogFormRef.value?.resetFields()
|
dialogFormRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const changeParameter = (parameterArr: any) => {
|
const changeParameter = (parameterArr: any) => {
|
||||||
formContent.value.parameter = JSON.stringify(parameterArr)
|
formContent.value.parameter = JSON.stringify(parameterArr)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user