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

@@ -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