From 24d32ba3488d6b097525ecc086113778be6f41dc Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 18 九月 2024 08:49:21 +0800 Subject: [PATCH] data tag --- src/views/data/channel/kio/index.vue | 46 ++++++++++++++++++++++++++++++++-------------- 1 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/views/data/channel/kio/index.vue b/src/views/data/channel/kio/index.vue index 36cea40..eeeb0fc 100644 --- a/src/views/data/channel/kio/index.vue +++ b/src/views/data/channel/kio/index.vue @@ -19,20 +19,20 @@ </el-form-item> <el-form-item> <el-button @click="handleQuery"> - <Icon icon="ep:search" class="mr-5px" /> + <Icon icon="ep:search" class="mr-5px"/> 搜索 </el-button> <el-button @click="resetQuery"> - <Icon icon="ep:refresh" class="mr-5px" /> + <Icon icon="ep:refresh" class="mr-5px"/> 重置 </el-button> <el-button type="primary" plain @click="openForm('create')" - v-hasPermi="['system:tenant:create']" + v-hasPermi="['data:channel-kio:create']" > - <Icon icon="ep:plus" class="mr-5px" /> + <Icon icon="ep:plus" class="mr-5px"/> 新增 </el-button> </el-form-item> @@ -42,25 +42,33 @@ <!-- 列表 --> <ContentWrap> <el-table v-loading="loading" :data="list"> - <el-table-column label="实例名称" align="center" prop="instanceName" /> - <el-table-column label="IP地址" align="center" prop="address" /> - <el-table-column label="端口" align="center" prop="port" /> - <el-table-column label="用户名" align="center" prop="username" /> + <el-table-column label="实例名称" align="center" prop="instanceName"/> + <el-table-column label="IP地址" align="center" prop="address"/> + <el-table-column label="端口" align="center" prop="port"/> + <el-table-column label="用户名" align="center" prop="username"/> <el-table-column label="操作" align="center" min-width="110" fixed="right"> <template #default="scope"> <el-button link type="primary" @click="openForm('update', scope.row.id)" - v-hasPermi="['system:tenant:update']" + v-hasPermi="['data:channel-kio:update']" > 编辑 </el-button> <el-button link + type="primary" + @click="openTagList(scope.row.name)" + v-hasPermi="['data:channel-kio:update']" + > + TAG + </el-button> + <el-button + link type="danger" @click="handleDelete(scope.row.id)" - v-hasPermi="['system:tenant:delete']" + v-hasPermi="['data:channel-kio:delete']" > 删除 </el-button> @@ -77,14 +85,18 @@ </ContentWrap> <!-- 表单弹窗:添加/修改 --> - <KioDeviceForm ref="formRef" @success="getList" /> + <KioDeviceForm ref="formRef" @success="getList"/> + + <!-- TAG弹窗:添加/修改 --> + <TagList ref="tagRef" @success="getList" /> </template> <script lang="ts" setup> -import * as KioApi from '@/api/data/channel/kio' -import KioDeviceForm from './KioDeviceForm.vue' + import * as KioApi from '@/api/data/channel/kio' + import KioDeviceForm from './KioDeviceForm.vue' + import TagList from './tag/index.vue' -defineOptions({name: 'DataKio'}) + defineOptions({name: 'DataKio'}) const message = useMessage() // 消息弹窗 const {t} = useI18n() // 国际化 @@ -131,6 +143,12 @@ formRef.value.open(type, id) } + /** TAG操作 */ + const tagRef = ref() + const openTagList = (name?: string) => { + tagRef.value.open(name) + } + /** 删除按钮操作 */ const handleDelete = async (id: number) => { try { -- Gitblit v1.9.3