检测脚本

This commit is contained in:
sjl
2024-11-20 15:13:50 +08:00
parent c46a55e9c4
commit 55383cf501
21 changed files with 74 additions and 56 deletions

View File

@@ -395,6 +395,8 @@ const disabledDate = (time: Date) => {
// 打开弹窗,可能是新增,也可能是编辑
const open = (sign: string, data: Device.ResPqDev) => {
// 重置表单
dialogFormRef.value?.resetFields()
titleType.value = sign
dialogVisible.value = true

View File

@@ -8,8 +8,8 @@
<!-- :data='testScriptData' 如果要显示静态数据就切换该配置 -->
<!-- 表格 header 按钮 -->
<template #tableHeader='scope'>
<el-button type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
<el-button type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
<el-button v-auth.testScript="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
<el-button v-auth.testScript="'batchDelete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
@click='batchDelete(scope.selectedListIds)'>
批量删除
</el-button>
@@ -18,7 +18,7 @@
<template #operation='scope'>
<el-button type='primary' link :icon='EditPen' :model-value="false" @click="openDialog('edit', scope.row)">编辑</el-button>
<el-button type='primary' link :icon='Delete' @click='handleDelete(scope.row)'>删除</el-button>
<el-button type='primary' v-if="scope.row.type !== 1" link :icon='Share' @click='updateType(scope.row)'>升级</el-button>
<el-button v-auth.testScript="'upgrade'" type='primary' v-if="scope.row.type !== 1" link :icon='Share' @click='updateType(scope.row)'>升级</el-button>
</template>
</ProTable>