|
|
|
@ -31,26 +31,16 @@ |
|
|
|
<th>服务器端口</th> |
|
|
|
<th>操作</th> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td>服务器1</td> |
|
|
|
<td>192.168.1.1</td> |
|
|
|
<td>8080</td> |
|
|
|
<td> |
|
|
|
<button>编辑</button> |
|
|
|
<button>删除</button> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td>服务器2</td> |
|
|
|
<td>192.168.1.2</td> |
|
|
|
<td>8080</td> |
|
|
|
<tr v-for="val in serverlist"> |
|
|
|
<td>{{val.scname}}</td> |
|
|
|
<td>{{val.addr}}</td> |
|
|
|
<td>{{ val.port }}</td> |
|
|
|
<td> |
|
|
|
<button>编辑</button> |
|
|
|
<button>删除</button> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
@ -122,3 +112,24 @@ tr:nth-child(odd) { |
|
|
|
background-color: #ffffff; |
|
|
|
} |
|
|
|
</style> |
|
|
|
<script> |
|
|
|
import { Sclist } from '@/api/scinfo' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
serverlist: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.getscdb() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getscdb() { |
|
|
|
let host="http://localhost:9099" |
|
|
|
Sclist(host).then(res => { |
|
|
|
this.serverlist = res.data |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |