Commit 6ca0b401 6ca0b401af81df327c12af6d40323c5467dada94 by zhanghao

commit

1 parent 612323fa
<template xmlns:el-col="http://www.w3.org/1999/html">
<div>
<br/>
<span>查询服务器log,最多展示100条</span>
<el-table
:data="callLinuxLogByUid"
border
style="width: 100%"
:header-cell-style="{background: 'deepskyblue', color: 'snow'}">
<el-table-column
prop="line"
label="详细LOG"
min-width="1">
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
data() {
return {
uid: this.$route.query.uid,
huanjing: this.$route.query.huanjing,
callLinuxLogByUid: []
}
},
mounted() {
this.activity()
},
methods: {
activity() {
const loading = this.$loading({
lock: true,
text: '加载中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/tool/callLinuxLogByUid?'+this.$qs.stringify({
uid: this.uid,
type: this.huanjing
}),config).then((res)=>{
console.log(res.data)
this.callLinuxLogByUid=res.data
loading.close();
}).catch(error=>{
console.log(error);
loading.close();
this.$message({
showClose: true,
message: '服务器处理失败,请核对参数!',
type: 'error'
});
})
}
}
}
</script>
......@@ -402,6 +402,34 @@
</el-row>
<el-row style="margin-bottom: 15px;">
<el-col :span="8">
<el-form ref="callLinuxLogByUid" :model="callLinuxLogByUid" label-width="0px">
<el-card class="darkred" shadow="always">
<div slot="header" class="clearfix">
<span>指定UID查询服务器LOG</span>
</div>
<div class="text item">
<el-form-item>
<el-input placeholder="请输入UID" v-model="callLinuxLogByUid.uid" clearable></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="callLinuxLogByUid.huanjing" placeholder="请选择执行环境">
<el-option
v-for="item in callLinuxLogByUidOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<div style="margin: 15px 0;"></div>
<el-form-item>
<el-button round @click="callLinuxLogByUidSubmit">查询LOG</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
<el-col :span="8">
<el-form ref="nlpApi" :model="nlpApi" label-width="0px">
<el-card class="darkred" shadow="always">
<div slot="header" class="clearfix">
......@@ -451,6 +479,8 @@
</el-card>
</el-form>
</el-col>
</el-row>
<el-row style="margin-bottom: 15px;">
<el-col :span="8">
<el-form ref="bizData" :model="bizData" label-width="0px">
<el-card class="darkred" shadow="always">
......@@ -636,6 +666,14 @@
value: '0',
label: '测试环境'
}],
callLinuxLogByUid: {
uid: '',
huanjing: []
},
callLinuxLogByUidOptions: [{
value: '0',
label: '测试环境'
}],
queryUserInfo: {
agentPhone: '',
huanjing: []
......@@ -1101,6 +1139,11 @@
{size: this.callLinuxCommand.size, huanjing: this.callLinuxCommand.huanjing.toString()}})
window.open(href, '_blank')
},
callLinuxLogByUidSubmit() {
const {href} = this.$router.resolve({ name:'callLinuxLogByUid', query:
{uid: this.callLinuxLogByUid.uid, huanjing: this.callLinuxLogByUid.huanjing.toString()}})
window.open(href, '_blank')
},
queryProvinceSubmit() {
const {href} = this.$router.resolve({ name:'queryProvince', query:
{code: this.queryProvince.provinceCode.toString()}})
......
......@@ -6,6 +6,7 @@ import activityConfig from '@/page/activityConfig'
import activityConfigRedis from '@/page/activityConfigRedis'
import userInfo from '@/page/userInfo'
import callLinuxCommand from '@/page/callLinuxCommand'
import callLinuxLogByUid from '@/page/callLinuxLogByUid'
import apiTest from '@/page/apiTest'
import apiTestAime from '@/page/apiTestAime'
import tjUser from '@/page/tjUser'
......@@ -73,6 +74,14 @@ export default new Router({
}
},
{
path: '/callLinuxLogByUid',
component: callLinuxLogByUid,
name: 'callLinuxLogByUid',
meta: {
title: '测试工具平台'
}
},
{
path: '/queryProvince',
component: queryProvince,
name: 'queryProvince',
......