diff --git a/src/views/edgeServer/edgeServerConfigure/device.vue b/src/views/edgeServer/edgeServerConfigure/device.vue index 506766c..f8622e6 100644 --- a/src/views/edgeServer/edgeServerConfigure/device.vue +++ b/src/views/edgeServer/edgeServerConfigure/device.vue @@ -48,8 +48,8 @@ + @cpoy='copyDevicePoint' @dialog-cancel="handleDialogCancel" @banding="bandingNodeTemplate" + @cell-data-change="handleCellDataChange" @form-data-change="handleFormDataChange"> 新增 @@ -207,19 +207,10 @@ export default { return false } }, - { - text: '发送', - size: 'mini', - show (index, row) { - if (row.showSendButton) { - return true - } - return false - } - }, { text: '复制', size: 'mini', + emit: 'cpoy', show (index, row) { if (row.showCopyButton) { return true @@ -625,6 +616,17 @@ export default { this.$set(this.devicePointData[index], '@Binding', row.nodeCode) done() }, + async copyDevicePoint ({ row }) { + this.$prompt('复制该点位前,请输入设备点位名称', '复制点位', { + confirmButtonText: '确定', + inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/, + inputErrorMessage: '请输入设备点位名称' + }).then(async ({ value }) => { + row.id = this.devicePointData.length + 1 + row['@Name'] = value + this.devicePointData.push(row) + }) + }, setDeviceConfigureConfirm () { this.$confirm('是否要应用该配置信息,更改配置后需要重启改服务才能使配置生效?', '提示', { confirmButtonText: '确定',