端口映射页面增加快捷打开网页按钮

This commit is contained in:
aoshiguchen
2023-08-30 18:13:01 +08:00
parent 93e8879bf5
commit 3991fcb91c
2 changed files with 10 additions and 6 deletions
+1
View File
@@ -118,6 +118,7 @@ export default {
status: '状态',
actions: '操作',
access: '访问',
openWebPage: '打开网页',
edit: '编辑',
publish: '发布',
draft: '草稿',
@@ -90,12 +90,15 @@
<el-tag :type="scope.row.isOnline | statusFilter">{{ scope.row.isOnline | isOnlineName }}</el-tag>
</template>
</el-table-column>
<el-table-column class-name="status-col" :label="$t('table.access')" width="120">
<template slot-scope="scope">
<el-button size="mini" v-if="(scope.row.protocal === 'HTTP' || scope.row.protocal === 'HTTP(S)')" @click="handleOpenWebPage(scope.row)">{{$t('table.openWebPage')}}</el-button>
</template>
</el-table-column>
<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>
<el-button v-if="scope.row.enable == '1'" size="mini" type="danger" @click="handleModifyStatus(scope.row, 2)">{{$t('table.disable')}}</el-button>
<el-button v-if="scope.row.enable == '2'" size="mini" type="success"
@click="handleModifyStatus(scope.row, 1)">{{ $t('table.enable') }}</el-button>
<!-- <el-button size="mini" type="danger" @click="handleDelete(scope.row,'deleted')">{{$t('table.delete')}}</el-button>-->
@@ -459,9 +462,9 @@ export default {
}
})
},
handleAccess(row){
let url = location.protocol + '//' + location.hostname + ':' + row.serverPort;
open(url);
handleOpenWebPage(row) {
const url = location.protocol + '//' + location.hostname + ':' + row.serverPort
open(url)
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj