|
|
|
@ -1,50 +1,37 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="history bg-white">
|
|
|
|
<div class="history bg-white">
|
|
|
|
<a-input-search
|
|
|
|
<div class="ant-advanced-search-form">
|
|
|
|
class="mb24"
|
|
|
|
<a-form layout="inline" :label-col="labelCol" :wrapper-col="wrapperCol" :form="queryParam">
|
|
|
|
style="width: 40%;"
|
|
|
|
<a-row :gutter="12">
|
|
|
|
placeholder="请输入工单号搜索"
|
|
|
|
<a-col :span="8" style="text-align: left">
|
|
|
|
v-model="search"
|
|
|
|
<a-form-item label="工单号">
|
|
|
|
enter-button="搜索"
|
|
|
|
<a-input v-model="queryParam.con_code" placeholder="请输入" />
|
|
|
|
@search="handleSearch"
|
|
|
|
</a-form-item>
|
|
|
|
></a-input-search>'
|
|
|
|
</a-col>
|
|
|
|
<a-table :rowKey="record => record.id" :columns="columns" :dataSource="dataSource">
|
|
|
|
<a-col :span="8">
|
|
|
|
<div slot="mediaPath" slot-scope="text, record">
|
|
|
|
<a-form-item class="ageInput" label="时间">
|
|
|
|
<a :href="record.mediaPath" target="_blank">
|
|
|
|
<a-range-picker @change="onTimeChange" v-model="queryParam.time" />
|
|
|
|
<img
|
|
|
|
</a-form-item>
|
|
|
|
v-if="imglist.some(item => record.mediaType.toLowerCase() === item)"
|
|
|
|
</a-col>
|
|
|
|
:src="record.mediaPath"
|
|
|
|
<a-col :span="8" style="text-align: right">
|
|
|
|
alt="内容图片"
|
|
|
|
<a-button type="primary" @click="handleSearch">搜索</a-button>
|
|
|
|
style="width: 140px; cursor:pointer;"
|
|
|
|
<!-- <a-button style="margin-left: 8px" @click="reset">重置</a-button>-->
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
</a-row>
|
|
|
|
<span v-else style="color: #40a9ff; cursor:pointer;">{{ record.mediaPath }}</span>
|
|
|
|
</a-form>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<a-table
|
|
|
|
|
|
|
|
:columns="columns"
|
|
|
|
|
|
|
|
:row-key="record => record.id"
|
|
|
|
|
|
|
|
:data-source="data"
|
|
|
|
|
|
|
|
:pagination="pagination"
|
|
|
|
|
|
|
|
@change="handleGetHistoryList"
|
|
|
|
|
|
|
|
>
|
|
|
|
</a-table>
|
|
|
|
</a-table>
|
|
|
|
<a-drawer placement="bottom" :visible="drawer" @close="onClose">
|
|
|
|
|
|
|
|
<img
|
|
|
|
|
|
|
|
v-if="showDrawer.type === 'image'"
|
|
|
|
|
|
|
|
:src="showDrawer.url"
|
|
|
|
|
|
|
|
alt="内容图片"
|
|
|
|
|
|
|
|
style="height: 500px"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <video-player
|
|
|
|
|
|
|
|
v-else
|
|
|
|
|
|
|
|
class="flex"
|
|
|
|
|
|
|
|
style="height: 500px;"
|
|
|
|
|
|
|
|
ref="videoPlayer"
|
|
|
|
|
|
|
|
:options="playerOptions"
|
|
|
|
|
|
|
|
></video-player>-->
|
|
|
|
|
|
|
|
</a-drawer>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
// require styles
|
|
|
|
|
|
|
|
// import "video.js/dist/video-js.css";
|
|
|
|
|
|
|
|
// import { videoPlayer } from "vue-video-player";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "historyMonitoring",
|
|
|
|
name: "historyMonitoring",
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
@ -52,94 +39,113 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
playerOptions: {
|
|
|
|
labelCol: { span: 6 },
|
|
|
|
autoplay: true,
|
|
|
|
wrapperCol: { span: 18 },
|
|
|
|
muted: true,
|
|
|
|
queryParam: {},
|
|
|
|
language: "zh-CN",
|
|
|
|
pageNum:1,
|
|
|
|
height: 500,
|
|
|
|
pageSize:10,
|
|
|
|
sources: [
|
|
|
|
data: [],
|
|
|
|
{
|
|
|
|
pagination:{
|
|
|
|
src: ""
|
|
|
|
total:0,
|
|
|
|
}
|
|
|
|
defaultPageSize:10, // 默认每页显示数量
|
|
|
|
]
|
|
|
|
showTotal: total => `共 ${total} 条数据`, // 显示总数
|
|
|
|
|
|
|
|
showSizeChanger:true, // 显示可改变每页数量
|
|
|
|
|
|
|
|
pageSizeOptions: ['10', '20', '30'],
|
|
|
|
|
|
|
|
onShowSizeChange:(current, pageSize)=>this.pageSize = pageSize // 改变每页数量时更新显示
|
|
|
|
},
|
|
|
|
},
|
|
|
|
search: "",
|
|
|
|
loading: false,
|
|
|
|
columns: [
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "工单号",
|
|
|
|
title: "工单号",
|
|
|
|
dataIndex: "orderNum",
|
|
|
|
dataIndex: "orderNum",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: "巷道",
|
|
|
|
|
|
|
|
dataIndex: "str",
|
|
|
|
width: 90
|
|
|
|
width: 90
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "仓位号",
|
|
|
|
title: "货架类型",
|
|
|
|
dataIndex: "positionNum",
|
|
|
|
dataIndex: "type",
|
|
|
|
width: 170
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "创建时间",
|
|
|
|
title: "货位",
|
|
|
|
dataIndex: "createTime",
|
|
|
|
dataIndex: "address",
|
|
|
|
width: 200
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "内容",
|
|
|
|
title: "时间",
|
|
|
|
dataIndex: "mediaPath",
|
|
|
|
dataIndex: "time",
|
|
|
|
scopedSlots: {
|
|
|
|
},
|
|
|
|
customRender: "mediaPath"
|
|
|
|
{
|
|
|
|
|
|
|
|
title: "照片(入库 货位 出库)",
|
|
|
|
|
|
|
|
dataIndex: "pic",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: "视频状态",
|
|
|
|
|
|
|
|
dataIndex: "status",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: "视频时长",
|
|
|
|
|
|
|
|
dataIndex: "mediaTime",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: "球机1",
|
|
|
|
|
|
|
|
dataIndex: "camera1",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: "球机2",
|
|
|
|
|
|
|
|
dataIndex: "camera2",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
width: 300
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
dataSource: [],
|
|
|
|
|
|
|
|
imglist: ["png", "jpg", "jpeg", "bmp", "gif"],
|
|
|
|
|
|
|
|
videolist: [
|
|
|
|
|
|
|
|
"mp4",
|
|
|
|
|
|
|
|
"m2v",
|
|
|
|
|
|
|
|
"mkv",
|
|
|
|
|
|
|
|
"rmvb",
|
|
|
|
|
|
|
|
"wmv",
|
|
|
|
|
|
|
|
"avi",
|
|
|
|
|
|
|
|
"flv",
|
|
|
|
|
|
|
|
"mov",
|
|
|
|
|
|
|
|
"m4v"
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
drawer: false,
|
|
|
|
|
|
|
|
showDrawer: {}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
this.handleGetHistoryList()
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
handleSearch() {
|
|
|
|
handleSearch(){
|
|
|
|
console.log(this.$api)
|
|
|
|
delete this.queryParam.time
|
|
|
|
this.query();
|
|
|
|
console.log(this.queryParam)
|
|
|
|
|
|
|
|
if(this.queryParam.con_code || this.queryParam.start_time && this.queryParam.end_time ){
|
|
|
|
|
|
|
|
this.handleGetHistoryList()
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.$message.error('请输入搜索条件')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleGetHistoryList(pagination) {
|
|
|
|
|
|
|
|
console.log(pagination)
|
|
|
|
|
|
|
|
if(pagination){
|
|
|
|
|
|
|
|
this.pagination.current = pagination.current;
|
|
|
|
|
|
|
|
this.pagination.pageSize = pagination.pageSize;
|
|
|
|
|
|
|
|
this.pageNum = pagination.current;
|
|
|
|
|
|
|
|
this.pageSize = pagination.pageSize;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.request();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
query() {
|
|
|
|
request() {
|
|
|
|
this.$api.httpApi
|
|
|
|
this.$api.httpApi.queryList({
|
|
|
|
.queryList({
|
|
|
|
|
|
|
|
data: {
|
|
|
|
data: {
|
|
|
|
orderNum: this.search
|
|
|
|
pageNum:this.pageNum,
|
|
|
|
|
|
|
|
pageSize:this.pageSize,
|
|
|
|
|
|
|
|
...this.queryParam
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}).then(res => {
|
|
|
|
.then(res => {
|
|
|
|
console.log(res)
|
|
|
|
// res.data[1].mediaPath =
|
|
|
|
|
|
|
|
// "http://gitlab.zhehekeji.com/security_check/security_front/raw/1.0.0/src/assets/video/video2.mp4";
|
|
|
|
|
|
|
|
this.dataSource = res.data;
|
|
|
|
|
|
|
|
}).catch(err => {
|
|
|
|
}).catch(err => {
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handlePopup(type, url) {
|
|
|
|
onTimeChange(date, dateString) {
|
|
|
|
this.drawer = true;
|
|
|
|
console.log(date)
|
|
|
|
this.showDrawer.type = type;
|
|
|
|
console.log(date[0].format('X'))
|
|
|
|
this.playerOptions.sources[0].src = url;
|
|
|
|
this.queryParam.start_time = date[0].format('X')
|
|
|
|
|
|
|
|
this.queryParam.end_time = date[1].format('X')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onClose() {
|
|
|
|
|
|
|
|
this.drawer = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.history {
|
|
|
|
.history {
|
|
|
|
padding: 24px;
|
|
|
|
padding: 24px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -149,4 +155,8 @@ export default {
|
|
|
|
.ant-drawer-body {
|
|
|
|
.ant-drawer-body {
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.ant-advanced-search-form .ant-form-item {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|