This commit is contained in:
GYYM
2024-11-14 18:40:58 +08:00
parent 12201e065f
commit a3051c0ea4
6 changed files with 146 additions and 56 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div class="device-list-container">
<!-- :model-value="visible" -->
<el-dropdown @command="handleCommand" >
<div class="device-list-container" v-if="isShow">
<el-dropdown @command="handleCommand">
<el-button link type='primary' class='table-operate'>
<div class='table-operate-text'>更多...</div>
</el-button>
@@ -44,9 +44,11 @@ import type { ErrorSystem } from '@/api/error/interface'
maxErrorValue: '',//最大误差
})
// const props = defineProps<{
// visible: boolean;
// }>();
const props = defineProps<{
isShow: boolean;
}>();
console.log(props.isShow,1111)
const handleCommand = (command: string | number | object) => {
detail_dialogTitle.value = command as string;
detail_dialogFormVisible.value = true // 显示对话框

View File

@@ -105,6 +105,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import type { Action } from 'element-plus'
import type { ErrorSystem } from '@/api/error/interface'
import ErrorStandardDialog from '@/views/machine/errorSystem/components/ErrorStandardDialog.vue' // 导入子组件
import { isVisible } from 'element-plus/es/utils'
const dictStore = useDictStore()
// 定义包含和排除的单位
@@ -176,8 +177,10 @@ const columns = reactive<ColumnProps<Plan.PlanAndSourceBO>[]>([
<el-button type='primary' link onClick={() => showData(scope.row.testSourceName)}>
{scope.row.testSourceName}
</el-button>
<Temp></Temp>
<Temp isShow={isVisible(scope.row)} ></Temp>
</div>
// isVisible(scope.row)
// <Temp { visible: scope.row.testSourceList.length > 1 }></Temp>
// <Temp :visible='{scope.row.testSourceList.length > 1}'></Temp>
// <Temp :visible="scope.row.testSourceList.length > 1"></Temp>
@@ -287,6 +290,17 @@ function openFileDialog() {
}
}
function isVisible(row: Plan.PlanAndSourceBO) {
console.log(row)
if(!row.hasOwnProperty('testSourceList') || !Array.isArray(row.testSourceList))
return false
else if(row.testSourceList.length <= 1)
return false
else
return true
}
function showData(row: string) {
detail_dialogTitle.value = row