houzhongjian
2024-07-23 8501060c4f921d1e744c477e4dc08eb47b52693c
提交 | 用户 | 时间
850106 1 <template>
H 2   <el-dialog :visible.sync="visible" title="调用日志" :close-on-click-modal="false"
3              :close-on-press-escape="false" width="75%">
4     <el-form :inline="true" :model="dataForm" ref="dataForm" @keyup.enter.native="getDataList()">
5       <el-form-item>
6         <el-input v-model="dataForm.appKey" placeholder="调用方账号" clearable></el-input>
7       </el-form-item>
8       <el-form-item prop="startTime">
9         <el-date-picker
10             v-model="dataForm.startTime"
11             type="datetime"
12             value-format="yyyy-MM-dd HH:mm:ss"
13             placeholder="选择日期时间">
14         </el-date-picker>
15       </el-form-item>
16       <el-form-item prop="endTime">
17         <el-date-picker
18             v-model="dataForm.endTime"
19             type="datetime"
20             value-format="yyyy-MM-dd HH:mm:ss"
21             placeholder="选择日期时间">
22         </el-date-picker>
23       </el-form-item>
24       <el-form-item>
25         <el-button @click="getDataList()">{{ $t('query') }}</el-button>
26       </el-form-item>
27     </el-form>
28     <el-table
29         v-loading="dataListLoading"
30         :data="dataList"
31         border
32         @sort-change="dataListSortChangeHandle"
33         height="460"
34         style="width: 100%;">
35       <el-table-column prop="appKey" label="调用方账号" header-align="center" align="center" min-width="100"></el-table-column>
36       <el-table-column prop="requestTime" label="调用时间" header-align="center" align="center" min-width="100"></el-table-column>
37       <el-table-column prop="requestParams" label="请求参数" header-align="center" align="center" min-width="300" show-overflow-tooltip></el-table-column>
38       <el-table-column prop="responseResult" label="返回结果" header-align="center" align="center" min-width="300" show-overflow-tooltip></el-table-column>
39     </el-table>
40     <el-pagination
41         :current-page="page"
42         :page-sizes="[10, 20, 50, 100]"
43         :page-size="limit"
44         :total="total"
45         layout="total, sizes, prev, pager, next, jumper"
46         @size-change="pageSizeChangeHandle"
47         @current-change="pageCurrentChangeHandle">
48     </el-pagination>
49   </el-dialog>
50 </template>
51
52 <script>
53   import mixinViewModule from '@/mixins/view-module'
54
55   export default {
56     mixins: [mixinViewModule],
57     data() {
58       return {
59         visible: false,
60         mixinViewModuleOptions: {
61           getDataListURL: '/iailab-ntt-model/mcs/model-request-log/page',
62           getDataListIsPage: true
63         },
64         dataForm: {
65           modelId: '0',
66           appKey: '',
67           startTime: '',
68           endTime: ''
69         }
70       }
71     },
72     methods: {
73       init(modelId) {
74         this.visible = true
75         this.dataForm.modelId = modelId
76         this.$nextTick(() => {
77           this.$refs['dataForm'].resetFields()
78           this.getDataList()
79         })
80       }
81     }
82   }
83 </script>