数据同步信息维护
parent
f60b263786
commit
e121775242
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,4 @@
|
||||
{
|
||||
"BASE_URL":"https://www.udims.com/UDIC_UDI_Server"
|
||||
"BASE_URL":"http://localhost:9995/",
|
||||
"Download_URL": "http://localhost:9994/"
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function getFileList(param){
|
||||
return request({
|
||||
url:"/file/getlist",
|
||||
method:"post",
|
||||
data:param
|
||||
})
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function logList(param){
|
||||
return request({
|
||||
url: "/jobLog/list",
|
||||
method: "post",
|
||||
data: param
|
||||
});
|
||||
}
|
||||
|
||||
export function downloadByDay(day){
|
||||
return request({
|
||||
url: "/udidl/device/dlByDay",
|
||||
method: "get",
|
||||
params:{day:day}
|
||||
})
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :inline="true">
|
||||
<el-form-item>
|
||||
<span style="color: #000; margin-left: 10px; margin-right: 6px"
|
||||
>日期:</span
|
||||
>
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="search" @click="download()"
|
||||
>重新下载
|
||||
</el-button
|
||||
>
|
||||
<el-button>刷新</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="tableData" border stripe>
|
||||
<el-table-column label="文件名" align="center" prop="fileName">
|
||||
<template slot-scope="scope">
|
||||
<a :href="'/files/'+scope.row.fileName" :download="scope.row.fileName">{{ scope.row.fileName }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="行数" align="center" prop="count" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="文件大小" align="center" prop="fileSize" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
{{ getFileSize(scope.row.fileSize) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="queryParams.page"
|
||||
:page-sizes="[100, 200, 300, 400]"
|
||||
:page-size="queryParams.limit"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getFileList} from "@/api/UDIDownload/fileInfo";
|
||||
|
||||
export default {
|
||||
name: "fileInfo",
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: true,
|
||||
total: 0,
|
||||
dateRange:[],
|
||||
queryParams: {
|
||||
page: 1,
|
||||
limit: 15
|
||||
},
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: "最近一周",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "最近一个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "最近三个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
console.log(`每页 ${val} 条`);
|
||||
this.getList();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(`当前页: ${val}`);
|
||||
this.getList();
|
||||
this.page++;
|
||||
},
|
||||
getList() {
|
||||
getFileList(this.queryParams).then(res => {
|
||||
this.tableData = res.data.list;
|
||||
this.total = res.data.total;
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 重新下载文件
|
||||
*/
|
||||
download(){
|
||||
|
||||
},
|
||||
getFileSize(size) {
|
||||
let res = "";
|
||||
if (size > 0) {
|
||||
if (size > 1000 * 1000)
|
||||
res = (size / (1000 * 1000)).toFixed(2) + "M";
|
||||
else if (size > 1000)
|
||||
res = (size / 1000).toFixed(2) + "k";
|
||||
else
|
||||
res = size + "byte";
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #3683be;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue