切换通道左侧树问题、点击左侧树测试项类别清空、点击左侧树赋值ScriptType
This commit is contained in:
@@ -140,6 +140,7 @@ const currentCheckItem = ref<string>("")
|
||||
const checkList = reactive<{ value: string, label: string }[]>([])
|
||||
|
||||
let deviceId: string = ''
|
||||
let originScriptType: string | null = null
|
||||
let scriptType: string | null = null
|
||||
|
||||
// 通道下拉列表
|
||||
@@ -187,6 +188,7 @@ const handleNodeClick = async (data: any) => {
|
||||
checkIndex.value = data.index
|
||||
currentScriptTypeName.value = data.scriptTypeName
|
||||
currentDesc.value = data.sourceDesc
|
||||
scriptType = data.scriptType ?? scriptType
|
||||
|
||||
if (checkIndex.value) {
|
||||
await updateTableData()
|
||||
@@ -203,12 +205,14 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
|
||||
scriptId: checkStore.scriptId,
|
||||
devId: deviceId,
|
||||
devNum: formContent.chnNum + '',
|
||||
scriptType,
|
||||
scriptType:originScriptType,
|
||||
code: parseInt(checkStore.planCode)
|
||||
})
|
||||
updateTreeFly(resTreeDataTemp, 4)
|
||||
updateTreeFly(resTreeDataTemp, 2)
|
||||
|
||||
treeDataAll.length = 0
|
||||
|
||||
Object.assign(treeDataAll, resTreeDataTemp)
|
||||
|
||||
defaultOperate()
|
||||
@@ -321,6 +325,8 @@ const updateTableData = async () => {
|
||||
resCheckResult = (resCheckResult == null || resCheckResult == undefined ? {} : resCheckResult)
|
||||
setCheckResultData(resCheckResult)
|
||||
setRawData(resRawData)
|
||||
checkList.length = 0
|
||||
currentCheckItem.value = ''
|
||||
} else
|
||||
// if (resTableData.resultData.get('电压幅值') || resTableData.resultData.get('持续时间')) {
|
||||
// let tempCheckList = []
|
||||
@@ -394,6 +400,7 @@ const doCurrentCheckItemUpdate = (newVal: string)=>{
|
||||
|
||||
const open = async (_deviceId: string, chnNum: string, _scriptType: string | null) => {
|
||||
deviceId = _deviceId
|
||||
originScriptType = _scriptType
|
||||
scriptType = _scriptType
|
||||
|
||||
// 发起后端请求,查询详细信息 当chnNum为-1时,查询所有通道号
|
||||
|
||||
Reference in New Issue
Block a user