Commit 4b992bf4 authored by tianxinyuan's avatar tianxinyuan

第二次需求 照片 appid

parent 3fcb3599
......@@ -65,3 +65,27 @@ export function logsearchfilter(gte,lte, page, size,code,appid) {
}
})
}
//自定义库(修改url)
export function customLog(transaction_order_number, page, size) {
return request({
url: baseURL + '/log/search/v1/ocean',
method: 'get',
params: {
transaction_order_number: transaction_order_number,
page: page,
size: size
}
})
}
//商城算法(修改url)
export function shoppingLog(transaction_order_number, page, size) {
return request({
url: baseURL + '/log/search/v1/ocean',
method: 'get',
params: {
transaction_order_number: transaction_order_number,
page: page,
size: size
}
})
}
......@@ -51,6 +51,54 @@
</div>
</a-layout>
</a-locale-provider>
<a-modal v-model="visible" title="详情" cancel-text="关闭" ok-text="复制" width="80%" :mask-closable="maskClosable">
<a-descriptions bordered>
<a-descriptions-item label="业务流水号">
{{ detail.transaction_order_number }}
</a-descriptions-item>
<a-descriptions-item label="IP地址">
{{ detail.ip }}
</a-descriptions-item>
<a-descriptions-item label="认证模式">
{{ detail.mode }}
</a-descriptions-item>
<a-descriptions-item label="认证耗时">
{{ detail.business_time }}
</a-descriptions-item>
<a-descriptions-item label="日志写入时间">
{{ detail.time_stamp | dateFilter }}
</a-descriptions-item>
<a-descriptions-item label="是否成功">
{{ detail.status ? '是': '否' }}
</a-descriptions-item>
<a-descriptions-item label="业务响应码">
{{ detail.code }}
</a-descriptions-item>
<a-descriptions-item label="业务响应说明">
{{ detail.msg }}
</a-descriptions-item>
<a-descriptions-item label="应用ID">
{{ detail.appid }}
</a-descriptions-item>
</a-descriptions>
<!-- <div style="min-height:200px;border:1px solid #e8e8e8;color:#8f8f8f;border-radius: 5px;">
{{ ModalText }}
</div>-->
<img style="width: 150px;height: auto;margin-top: 10px" v-if="detail.mode =='YTCR-BASIC'" :src=" 'data:image/png;base64,' + imageList" />
<div style="margin-top: 10px;display: flex" v-else >
<a-row v-for="item in imageListArray">
<img style="width: 150px;height:160px;margin-left: 10px;display: flex;align-items: center;" :src=" 'data:image/png;base64,' + item.Data" />
</a-row>
</div>
<template slot="footer">
<a-button key="back" @click="visible = false">
关闭
</a-button>
<a-button key="submit" v-clipboard:copy="ModalText" v-clipboard:success="copySuccess" v-clipboard:error="copyError" type="primary">
复制
</a-button>
</template>
</a-modal>
</div>
</template>
......@@ -65,13 +113,13 @@ const columns = [
{
title: '业务流水号',
dataIndex: 'transaction_order_number',
width: '26%',
width: '21%',
scopedSlots: { customRender: 'transaction_order_number' }
},
{
title: '应用id',
dataIndex: 'appid',
width: '26%',
width: '21%',
scopedSlots: { customRender: 'appid' }
},
{
......@@ -92,6 +140,11 @@ const columns = [
width: '16%',
scopedSlots: { customRender: 'time_stamp' }
},
{
title: '操作',
dataIndex: 'operation',
scopedSlots: { customRender: 'operation' }
}
]
export default {
filters: {
......@@ -107,8 +160,14 @@ export default {
data: [],
searchInput: '',
locale: zhCN,
maskClosable: false,
flagMode:false,
imageListArray:[],
ModalText:'',
isLoading:false,
imageList:'',
visible: false,
detail: {},
pagination: {
current: 1,
total: 0
......@@ -137,6 +196,30 @@ export default {
})
},
// 点击表格上的编辑,查看单条的详情信息
edit(record) {
debugger
this.visible = true
this.detail = record
this.ModalText = record
this.imageListArray=[]
if (record.mode =='YTCR-BASIC'){
this.imageList =JSON.parse(record.requestData).bdata.ImageData
console.log(this.imageList)
}else{
console.log(record.requestData)
this.imageListArray =JSON.parse(record.requestData).bdata.FaceImageList
console.log(this.imageListArray)
}
},
// 复制成功;
copySuccess() {
this.$message.success('复制成功')
},
// 复制失败
copyError() {
this.$message.error('复制失败')
},
mobandaochu(){
var url = baseURL +'/log/search/v1/excelExport?code='+this.searchInput+'&page='+this.pagination.current+'&size='+this.pagination.total+'&appid='+this.codeId+'&gte='+this.gte+'&lte='+this.lte
window.location.href = url
......
......@@ -24,7 +24,7 @@
:style="{ margin:'0 24px',backgroundColor:'white'}"
>
<a-spin :spinning="isLoading" :indicator="indicator">
<a-table class="table" :columns="columns" :data-source="data" :pagination="pagination" bordered @change="handleTableChange">
<a-table class="table" :columns="jierucolumnsYw" :data-source="data" :pagination="pagination" bordered @change="handleTableChange">
<span slot="time_stamp" slot-scope="text">
{{ text | dateFilter }}
</span>
......@@ -55,17 +55,25 @@
</a-spin>
</a-layout-content>
</a-tab-pane>
<a-tab-pane key="3" tab="云从算法">
<!-- <div style="display:flex;background-color: #f0f2f5;margin:10px 24px;border-radius: 5px;padding:24px;">
<div style="display: flex;justify-content: center;align-items: center;">
<span style="color:black;">日期:</span>
<a-button style="margin-left:10px;" :type="currentBtn=='all'?'primary':'link'" :style="{color:currentBtn=='all'?'#fff':'#00000099'}" @click="clickTimeBtn('all')">全部</a-button>
<a-button style="margin-left:10px;" :type="currentBtn=='today'?'primary':'link'" :style="{color:currentBtn=='today'?'#fff':'#00000099'}" @click="clickTimeBtn('today')">今日</a-button>
<a-button style="margin-left:10px;" :type="currentBtn=='recentThreeDay'?'primary':'link'" :style="{color:currentBtn=='recentThreeDay'?'#fff':'#00000099'}" @click="clickTimeBtn('recentThreeDay')">近三天</a-button>
<a-button style="margin-left:10px;" :type="currentBtn=='recentSevenDay'?'primary':'link'" :style="{color:currentBtn=='recentSevenDay'?'#fff':'#00000099'}" @click="clickTimeBtn('recentSevenDay')">近七天</a-button>
<a-button style="margin-left:10px;" :type="currentBtn=='recentOneMonth'?'primary':'link'" :style="{color:currentBtn=='recentOneMonth'?'#fff':'#00000099'}" @click="clickTimeBtn('recentOneMonth')">近一个月</a-button>
</div>
</div> -->
<a-tab-pane key="3" tab="自定义库">
<a-layout-content
:style="{ margin:'0 24px',backgroundColor:'white',}"
>
<a-spin :spinning="isLoading" :indicator="indicator">
<a-table class="table" :columns="columns" :data-source="data" :pagination="pagination" bordered @change="handleTableChange">
<span slot="time_stamp" slot-scope="text">
{{ text | dateFilter }}
</span>
<template slot="operation" slot-scope="text, record">
<div class="editable-row-operations">
<a @click="() => edit(record)">详情</a>
</div>
</template>
</a-table>
</a-spin>
</a-layout-content>
</a-tab-pane>
<a-tab-pane key="4" tab="云从算法">
<a-layout-content
:style="{ margin:'0 24px',backgroundColor:'white',}"
>
......@@ -83,7 +91,7 @@
</a-spin>
</a-layout-content>
</a-tab-pane>
<a-tab-pane key="4" tab="依图业务">
<a-tab-pane key="5" tab="依图业务">
<a-layout-content
:style="{ margin:'0 24px',backgroundColor:'white',}"
>
......@@ -101,6 +109,24 @@
</a-spin>
</a-layout-content>
</a-tab-pane>
<a-tab-pane key="6" tab="商城算法">
<a-layout-content
:style="{ margin:'0 24px',backgroundColor:'white',}"
>
<a-spin :spinning="isLoading" :indicator="indicator">
<a-table class="table" :columns="columns" :data-source="data" :pagination="pagination" bordered @change="handleTableChange">
<span slot="time_stamp" slot-scope="text">
{{ text | dateFilter }}
</span>
<template slot="operation" slot-scope="text, record">
<div class="editable-row-operations">
<a @click="() => edit(record)">详情</a>
</div>
</template>
</a-table>
</a-spin>
</a-layout-content>
</a-tab-pane>
</a-tabs>
</div>
</a-layout>
......@@ -131,10 +157,19 @@
<a-descriptions-item label="业务响应说明">
{{ detail.msg }}
</a-descriptions-item>
<a-descriptions-item label="应用ID">
{{ detail.appid }}
</a-descriptions-item>
</a-descriptions>
<!-- <div style="min-height:200px;border:1px solid #e8e8e8;color:#8f8f8f;border-radius: 5px;">
{{ ModalText }}
</div>-->
<img style="width: 150px;height: auto;margin-top: 10px" v-if="detail.mode =='YTCR-BASIC'" :src=" 'data:image/png;base64,' + imageList" />
<div style="margin-top: 10px;display: flex" v-else >
<a-row v-for="item in imageListArray">
<img style="width: 150px;height:160px;margin-left: 10px;display: flex;align-items: center;" :src=" 'data:image/png;base64,' + item.Data" />
</a-row>
</div>
<template slot="footer">
<a-button key="back" @click="visible = false">
关闭
......@@ -149,8 +184,39 @@
</template>
<script>
import { getAccessData, getCoreData, getOceanData, getMultiAlgoData } from '@/api/user'
import { getAccessData, getCoreData, getOceanData, getMultiAlgoData,shoppingLog,customLog } from '@/api/user'
import { dateFormat } from '@/utils/index'
const jierucolumnsYw = [
{
title: '业务流水号',
dataIndex: 'transaction_order_number',
width: '25%',
scopedSlots: { customRender: 'transaction_order_number' }
},
{
title: 'ip地址',
dataIndex: 'ip',
width: '15%',
scopedSlots: { customRender: 'ip' }
},
{
title: '时间',
dataIndex: 'time_stamp',
width: '30%',
scopedSlots: { customRender: 'time_stamp' }
},
{
title: '响应码',
dataIndex: 'code',
width: '10%',
scopedSlots: { customRender: 'code' }
},
{
title: '操作',
dataIndex: 'operation',
scopedSlots: { customRender: 'operation' }
}
]
const columns = [
{
title: '业务流水号',
......@@ -188,6 +254,7 @@ export default {
indicator: <a-icon type="sync" style="font-size: 30px;color:rgb(24,144,255)" spin />,
isLoading:true,
columns,
jierucolumnsYw,
data: [],
ModalText: '',
visible: false,
......@@ -195,6 +262,9 @@ export default {
currentTab: '1',
// currentBtn: 'all',
searchInput: '',
imageList:'',
imageListArray:[],
detailAppid:'',
pagination: {
current: 1,
total: 0
......@@ -217,8 +287,10 @@ export default {
switch (this.currentTab) {
case '1': this.getAccessLog(); break
case '2': this.getCoreLog(); break
case '3': this.getOceanLog(); break
case '4': this.getMultiAlgoLog(); break
case '3': this.customLog(); break
case '4': this.getOceanLog(); break
case '5': this.getMultiAlgoLog(); break
case '6': this.shoppingLog(); break
}
},
// 点击查询按钮
......@@ -226,8 +298,10 @@ export default {
switch (this.currentTab) {
case '1': this.getAccessLog(); break
case '2': this.getCoreLog(); break
case '3': this.getOceanLog(); break
case '4': this.getMultiAlgoLog(); break
case '3': this.customLog(); break
case '4': this.getOceanLog(); break
case '5': this.getMultiAlgoLog(); break
case '6': this.shoppingLog(); break
}
},
// 接入服务的日志查询
......@@ -237,6 +311,8 @@ export default {
this.isLoading = false
this.pagination.total = res.data.data.total
this.data = res.data.data.list
// this.imageList
// JSON.stringify(res.data.data.list)
console.log(this.searchInput, this.pagination.current, 10)
} else {
this.$message.warning(res.data.msg)
......@@ -267,6 +343,30 @@ export default {
}
})
},
//自定义库
customLog() {
customLog(this.searchInput, this.pagination.current, 10).then(res => {
if (res.data.code === 200) {
this.isLoading = false
this.pagination.total = res.data.data.total
this.data = res.data.data.list
} else {
this.$message.warning(res.data.msg)
}
})
},
//商城算法
shoppingLog() {
shoppingLog(this.searchInput, this.pagination.current, 10).then(res => {
if (res.data.code === 200) {
this.isLoading = false
this.pagination.total = res.data.data.total
this.data = res.data.data.list
} else {
this.$message.warning(res.data.msg)
}
})
},
// 依图业务的日志查询
getMultiAlgoLog() {
getMultiAlgoData(this.searchInput, this.pagination.current, 10).then(res => {
......@@ -291,15 +391,27 @@ export default {
switch (value) {
case '1': this.getAccessLog(); break
case '2': this.getCoreLog(); break
case '3': this.getOceanLog(); break
case '4': this.getMultiAlgoLog(); break
case '3': this.customLog(); break
case '4': this.getOceanLog(); break
case '5': this.getMultiAlgoLog(); break
case '6': this.shoppingLog(); break
}
},
// 点击表格上的编辑,查看单条的详情信息
edit(record) {
debugger
this.visible = true
this.detail = record
this.ModalText = JSON.stringify(record)
this.ModalText = record
this.imageListArray=[]
if (record.mode =='YTCR-BASIC'){
this.imageList =JSON.parse(record.requestData).bdata.ImageData
console.log(this.imageList)
}else{
console.log(record.requestData)
this.imageListArray =JSON.parse(record.requestData).bdata.FaceImageList
console.log(this.imageListArray)
}
},
// 复制成功;
copySuccess() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment