新增一键访问穿透url的按钮

This commit is contained in:
click33
2023-08-10 19:01:27 +08:00
parent 323d86b49d
commit 3f42b58471
3 changed files with 8 additions and 1 deletions
+1
View File
@@ -97,6 +97,7 @@ export default {
readings: 'Readings',
status: 'Status',
actions: 'Actions',
access: 'Access',
edit: 'Edit',
publish: 'Publish',
draft: 'Draft',
+1
View File
@@ -117,6 +117,7 @@ export default {
readings: '阅读数',
status: '状态',
actions: '操作',
access: '访问',
edit: '编辑',
publish: '发布',
draft: '草稿',
@@ -90,8 +90,9 @@
<el-tag :type="scope.row.isOnline | statusFilter">{{ scope.row.isOnline | isOnlineName }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" :label="$t('table.actions')" width="230" class-name="small-padding fixed-width">
<el-table-column align="center" :label="$t('table.actions')" width="320" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" @click="handleAccess(scope.row)">{{ $t('table.access') }}</el-button>
<el-button type="primary" size="mini" @click="handleUpdate(scope.row)">{{ $t('table.edit') }}</el-button>
<el-button v-if="scope.row.enable == '1'" size="mini" type="danger" @click="handleModifyStatus(scope.row, 2)">{{
$t('table.disable') }}</el-button>
@@ -458,6 +459,10 @@ export default {
}
})
},
handleAccess(row){
let url = location.protocol + '//' + location.hostname + ':' + row.serverPort;
open(url);
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
this.temp.timestamp = new Date(this.temp.timestamp)