| | |
| | | type="primary" |
| | | plain |
| | | @click="openForm('create')" |
| | | v-hasPermi="['system:tenant:create']" |
| | | v-hasPermi="['data:channel-opcua:create']" |
| | | > |
| | | <Icon icon="ep:plus" class="mr-5px" /> |
| | | 新增 |
| | |
| | | link |
| | | type="primary" |
| | | @click="openForm('update', scope.row.id)" |
| | | v-hasPermi="['system:tenant:update']" |
| | | v-hasPermi="['data:channel-opcua:update']" |
| | | > |
| | | 编辑 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="openTagList(scope.row.serverName)" |
| | | v-hasPermi="['data:channel-modbus:update']" |
| | | > |
| | | TAG |
| | | </el-button> |
| | | <el-button |
| | | link |
| | | type="danger" |
| | | @click="handleDelete(scope.row.id)" |
| | | v-hasPermi="['system:tenant:delete']" |
| | | v-hasPermi="['data:channel-opcua:delete']" |
| | | > |
| | | 删除 |
| | | </el-button> |
| | |
| | | <!-- 表单弹窗:添加/修改 --> |
| | | <OpcUaDeviceForm ref="formRef" @success="getList" /> |
| | | |
| | | <!-- TAG弹窗:添加/修改 --> |
| | | <TagList ref="tagRef" @success="getList"/> |
| | | |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import * as OpcUaApi from '@/api/data/channel/opcua' |
| | | import OpcUaDeviceForm from './OpcUaDeviceForm.vue' |
| | | import TagList from './tag/index.vue' |
| | | |
| | | defineOptions({name: 'DataOpcUa'}) |
| | | |
| | |
| | | formRef.value.open(type, id) |
| | | } |
| | | |
| | | /** TAG操作 */ |
| | | const tagRef = ref() |
| | | const openTagList = (serverName?: string) => { |
| | | tagRef.value.open(serverName) |
| | | } |
| | | |
| | | /** 删除按钮操作 */ |
| | | const handleDelete = async (id: number) => { |
| | | try { |