commit
Showing
3 changed files
with
115 additions
and
0 deletions
src/page/callLinuxLogByUid.vue
0 → 100644
| 1 | <template xmlns:el-col="http://www.w3.org/1999/html"> | ||
| 2 | <div> | ||
| 3 | <br/> | ||
| 4 | <span>查询服务器log,最多展示100条</span> | ||
| 5 | <el-table | ||
| 6 | :data="callLinuxLogByUid" | ||
| 7 | border | ||
| 8 | style="width: 100%" | ||
| 9 | :header-cell-style="{background: 'deepskyblue', color: 'snow'}"> | ||
| 10 | <el-table-column | ||
| 11 | prop="line" | ||
| 12 | label="详细LOG" | ||
| 13 | min-width="1"> | ||
| 14 | </el-table-column> | ||
| 15 | </el-table> | ||
| 16 | </div> | ||
| 17 | </template> | ||
| 18 | |||
| 19 | <script> | ||
| 20 | export default { | ||
| 21 | data() { | ||
| 22 | return { | ||
| 23 | uid: this.$route.query.uid, | ||
| 24 | huanjing: this.$route.query.huanjing, | ||
| 25 | callLinuxLogByUid: [] | ||
| 26 | } | ||
| 27 | }, | ||
| 28 | mounted() { | ||
| 29 | this.activity() | ||
| 30 | }, | ||
| 31 | methods: { | ||
| 32 | activity() { | ||
| 33 | const loading = this.$loading({ | ||
| 34 | lock: true, | ||
| 35 | text: '加载中...', | ||
| 36 | spinner: 'el-icon-loading', | ||
| 37 | background: 'rgba(0, 0, 0, 0.7)' | ||
| 38 | }); | ||
| 39 | let config = { | ||
| 40 | headers: { | ||
| 41 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 42 | } | ||
| 43 | } | ||
| 44 | this.$http.get('/tool/callLinuxLogByUid?'+this.$qs.stringify({ | ||
| 45 | uid: this.uid, | ||
| 46 | type: this.huanjing | ||
| 47 | }),config).then((res)=>{ | ||
| 48 | console.log(res.data) | ||
| 49 | this.callLinuxLogByUid=res.data | ||
| 50 | loading.close(); | ||
| 51 | }).catch(error=>{ | ||
| 52 | console.log(error); | ||
| 53 | loading.close(); | ||
| 54 | this.$message({ | ||
| 55 | showClose: true, | ||
| 56 | message: '服务器处理失败,请核对参数!', | ||
| 57 | type: 'error' | ||
| 58 | }); | ||
| 59 | }) | ||
| 60 | } | ||
| 61 | } | ||
| 62 | } | ||
| 63 | </script> |
| ... | @@ -402,6 +402,34 @@ | ... | @@ -402,6 +402,34 @@ |
| 402 | </el-row> | 402 | </el-row> |
| 403 | <el-row style="margin-bottom: 15px;"> | 403 | <el-row style="margin-bottom: 15px;"> |
| 404 | <el-col :span="8"> | 404 | <el-col :span="8"> |
| 405 | <el-form ref="callLinuxLogByUid" :model="callLinuxLogByUid" label-width="0px"> | ||
| 406 | <el-card class="darkred" shadow="always"> | ||
| 407 | <div slot="header" class="clearfix"> | ||
| 408 | <span>指定UID查询服务器LOG</span> | ||
| 409 | </div> | ||
| 410 | <div class="text item"> | ||
| 411 | <el-form-item> | ||
| 412 | <el-input placeholder="请输入UID" v-model="callLinuxLogByUid.uid" clearable></el-input> | ||
| 413 | </el-form-item> | ||
| 414 | <el-form-item> | ||
| 415 | <el-select v-model="callLinuxLogByUid.huanjing" placeholder="请选择执行环境"> | ||
| 416 | <el-option | ||
| 417 | v-for="item in callLinuxLogByUidOptions" | ||
| 418 | :key="item.value" | ||
| 419 | :label="item.label" | ||
| 420 | :value="item.value"> | ||
| 421 | </el-option> | ||
| 422 | </el-select> | ||
| 423 | </el-form-item> | ||
| 424 | <div style="margin: 15px 0;"></div> | ||
| 425 | <el-form-item> | ||
| 426 | <el-button round @click="callLinuxLogByUidSubmit">查询LOG</el-button> | ||
| 427 | </el-form-item> | ||
| 428 | </div> | ||
| 429 | </el-card> | ||
| 430 | </el-form> | ||
| 431 | </el-col> | ||
| 432 | <el-col :span="8"> | ||
| 405 | <el-form ref="nlpApi" :model="nlpApi" label-width="0px"> | 433 | <el-form ref="nlpApi" :model="nlpApi" label-width="0px"> |
| 406 | <el-card class="darkred" shadow="always"> | 434 | <el-card class="darkred" shadow="always"> |
| 407 | <div slot="header" class="clearfix"> | 435 | <div slot="header" class="clearfix"> |
| ... | @@ -451,6 +479,8 @@ | ... | @@ -451,6 +479,8 @@ |
| 451 | </el-card> | 479 | </el-card> |
| 452 | </el-form> | 480 | </el-form> |
| 453 | </el-col> | 481 | </el-col> |
| 482 | </el-row> | ||
| 483 | <el-row style="margin-bottom: 15px;"> | ||
| 454 | <el-col :span="8"> | 484 | <el-col :span="8"> |
| 455 | <el-form ref="bizData" :model="bizData" label-width="0px"> | 485 | <el-form ref="bizData" :model="bizData" label-width="0px"> |
| 456 | <el-card class="darkred" shadow="always"> | 486 | <el-card class="darkred" shadow="always"> |
| ... | @@ -636,6 +666,14 @@ | ... | @@ -636,6 +666,14 @@ |
| 636 | value: '0', | 666 | value: '0', |
| 637 | label: '测试环境' | 667 | label: '测试环境' |
| 638 | }], | 668 | }], |
| 669 | callLinuxLogByUid: { | ||
| 670 | uid: '', | ||
| 671 | huanjing: [] | ||
| 672 | }, | ||
| 673 | callLinuxLogByUidOptions: [{ | ||
| 674 | value: '0', | ||
| 675 | label: '测试环境' | ||
| 676 | }], | ||
| 639 | queryUserInfo: { | 677 | queryUserInfo: { |
| 640 | agentPhone: '', | 678 | agentPhone: '', |
| 641 | huanjing: [] | 679 | huanjing: [] |
| ... | @@ -1101,6 +1139,11 @@ | ... | @@ -1101,6 +1139,11 @@ |
| 1101 | {size: this.callLinuxCommand.size, huanjing: this.callLinuxCommand.huanjing.toString()}}) | 1139 | {size: this.callLinuxCommand.size, huanjing: this.callLinuxCommand.huanjing.toString()}}) |
| 1102 | window.open(href, '_blank') | 1140 | window.open(href, '_blank') |
| 1103 | }, | 1141 | }, |
| 1142 | callLinuxLogByUidSubmit() { | ||
| 1143 | const {href} = this.$router.resolve({ name:'callLinuxLogByUid', query: | ||
| 1144 | {uid: this.callLinuxLogByUid.uid, huanjing: this.callLinuxLogByUid.huanjing.toString()}}) | ||
| 1145 | window.open(href, '_blank') | ||
| 1146 | }, | ||
| 1104 | queryProvinceSubmit() { | 1147 | queryProvinceSubmit() { |
| 1105 | const {href} = this.$router.resolve({ name:'queryProvince', query: | 1148 | const {href} = this.$router.resolve({ name:'queryProvince', query: |
| 1106 | {code: this.queryProvince.provinceCode.toString()}}) | 1149 | {code: this.queryProvince.provinceCode.toString()}}) | ... | ... |
| ... | @@ -6,6 +6,7 @@ import activityConfig from '@/page/activityConfig' | ... | @@ -6,6 +6,7 @@ import activityConfig from '@/page/activityConfig' |
| 6 | import activityConfigRedis from '@/page/activityConfigRedis' | 6 | import activityConfigRedis from '@/page/activityConfigRedis' |
| 7 | import userInfo from '@/page/userInfo' | 7 | import userInfo from '@/page/userInfo' |
| 8 | import callLinuxCommand from '@/page/callLinuxCommand' | 8 | import callLinuxCommand from '@/page/callLinuxCommand' |
| 9 | import callLinuxLogByUid from '@/page/callLinuxLogByUid' | ||
| 9 | import apiTest from '@/page/apiTest' | 10 | import apiTest from '@/page/apiTest' |
| 10 | import apiTestAime from '@/page/apiTestAime' | 11 | import apiTestAime from '@/page/apiTestAime' |
| 11 | import tjUser from '@/page/tjUser' | 12 | import tjUser from '@/page/tjUser' |
| ... | @@ -73,6 +74,14 @@ export default new Router({ | ... | @@ -73,6 +74,14 @@ export default new Router({ |
| 73 | } | 74 | } |
| 74 | }, | 75 | }, |
| 75 | { | 76 | { |
| 77 | path: '/callLinuxLogByUid', | ||
| 78 | component: callLinuxLogByUid, | ||
| 79 | name: 'callLinuxLogByUid', | ||
| 80 | meta: { | ||
| 81 | title: '测试工具平台' | ||
| 82 | } | ||
| 83 | }, | ||
| 84 | { | ||
| 76 | path: '/queryProvince', | 85 | path: '/queryProvince', |
| 77 | component: queryProvince, | 86 | component: queryProvince, |
| 78 | name: 'queryProvince', | 87 | name: 'queryProvince', | ... | ... |
-
Please register or sign in to post a comment