systeminfo.vue
2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<template>
<div class="systembox">
<el-row class="manage-content">
<el-col :span="24">
<el-table
:data="tableData"
:max-height="tableHeight"
style="width: 100%;"
v-loading="loading"
>
<el-table-column prop="servName" align="center" :label="$t('table.serviceName')" ></el-table-column>
<el-table-column :label="$t('table.version')" align="center" prop="version"></el-table-column>
<el-table-column :label="$t('table.publishdate')" align="center" prop="publish"></el-table-column>
<el-table-column :label="$t('table.operate')" align="center">
<template slot-scope="scope">
<div>
<!-- <el-button type="primary" @click="showVersionInfo(scope.row)" size="mini">{{$t('button.look')}}</el-button> -->
<el-button @click="showVersionInfo(scope.row)" type="text" size="small" class="tab-btn">{{$t('button.look')}}</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%"
>
<span v-html="serviceinfo"></span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false" size="small">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false" size="small">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
tableData:[],
loading:false,
dialogVisible:false,
serviceinfo:''
}
},
methods: {
getSystemInfo() {
this.$api.base
.getSystemInfo().then(res => {
this.tableData = res.data.data;
})
},
showVersionInfo(data){
this.$api.base
.getSystemServiceInfo(data.servName).then(res => {
this.dialogVisible =true;
console.log(res)
this.serviceinfo = res.data.msg
})
}
},
computed: {
tableHeight() {
const windowInnerHeight = window.innerHeight;
return windowInnerHeight - 200;
}
},
created(){
this.getSystemInfo();
}
}
</script>
<style scoped>
.systembox{
margin: 20px 0;
}
</style>