|
|
|
@ -20,6 +20,19 @@
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.downloadType"
|
|
|
|
|
placeholder="类型"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in downloadTypeOptions"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<span style="color: #000; margin-left: 10px; margin-right: 6px"
|
|
|
|
|
>创建日期:</span
|
|
|
|
@ -50,13 +63,15 @@
|
|
|
|
|
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button @click="dialog2.visible = true">按时间段下载</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-table
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="list"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
|
|
|
|
:row-style="rowStyle"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column label="类型" prop="type">
|
|
|
|
@ -64,6 +79,12 @@
|
|
|
|
|
<span>{{ getType(scope.row.type) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="下载类型" prop="downloadType">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ getDownloadType(scope.row.downloadType) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="日期" prop="downloadDate"/>
|
|
|
|
|
<el-table-column label="提示行数" prop="totalCount"/>
|
|
|
|
|
<el-table-column label="实际行数" prop="realCount"/>
|
|
|
|
@ -105,12 +126,35 @@
|
|
|
|
|
<el-divider></el-divider>
|
|
|
|
|
<span>详情:</span><span>{{ dialog.content }}</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="重新下载"
|
|
|
|
|
:visible.sync="dialog2.visible"
|
|
|
|
|
width="650px">
|
|
|
|
|
<el-form label-width="60px">
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<span style="color: #000; margin-left: 10px; margin-right: 6px"
|
|
|
|
|
>日期:</span>
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="dialog2.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>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="downloadDatas">确 定</el-button>
|
|
|
|
|
<el-button @click="dialog2.visible=false">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {logList,downloadByDay} from "@/api/UDIDownload/jobLog"
|
|
|
|
|
import {logList,downloadByDay,downloadByDays} from "@/api/UDIDownload/jobLog"
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "jobLog",
|
|
|
|
@ -121,10 +165,12 @@ export default {
|
|
|
|
|
value: "warning",
|
|
|
|
|
label: "警告信息"
|
|
|
|
|
}, {value: "info", label: "正常信息"}],
|
|
|
|
|
downloadTypeOptions:[{value:"",label:"全部"},{value:"auto",label:"自动"},{value:"manual",label:"手动"}],
|
|
|
|
|
queryParams: {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
type: ""
|
|
|
|
|
type: "",
|
|
|
|
|
downloadType:''
|
|
|
|
|
},
|
|
|
|
|
loading: false,
|
|
|
|
|
list: [],
|
|
|
|
@ -135,6 +181,10 @@ export default {
|
|
|
|
|
msg:"",
|
|
|
|
|
content: ""
|
|
|
|
|
},
|
|
|
|
|
dialog2:{
|
|
|
|
|
visible: false,
|
|
|
|
|
dateRange: [],
|
|
|
|
|
},
|
|
|
|
|
pickerOptions: {
|
|
|
|
|
shortcuts: [
|
|
|
|
|
{
|
|
|
|
@ -199,11 +249,15 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
getType(type) {
|
|
|
|
|
for (let i = 0; i < this.typeOptions.length; i++) {
|
|
|
|
|
return this.selectDictLabel(this.typeOptions,type);
|
|
|
|
|
/* for (let i = 0; i < this.typeOptions.length; i++) {
|
|
|
|
|
if (this.typeOptions[i].value == type)
|
|
|
|
|
return this.typeOptions[i].label;
|
|
|
|
|
}
|
|
|
|
|
return "未知";
|
|
|
|
|
return "未知";*/
|
|
|
|
|
},
|
|
|
|
|
getDownloadType(type){
|
|
|
|
|
return this.selectDictLabel(this.downloadTypeOptions,type);
|
|
|
|
|
},
|
|
|
|
|
showContent(row) {
|
|
|
|
|
console.log(JSON.stringify(row));
|
|
|
|
@ -242,17 +296,20 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 添加日期范围
|
|
|
|
|
addDateRange(params, dateRange) {
|
|
|
|
|
let search = params;
|
|
|
|
|
search.startDate = null
|
|
|
|
|
search.endDate = null;
|
|
|
|
|
if (null != dateRange && '' != dateRange) {
|
|
|
|
|
search.startDate = dateRange[0];
|
|
|
|
|
search.endDate = dateRange[1];
|
|
|
|
|
downloadDatas(){
|
|
|
|
|
let query=this.addDateRange({},this.dialog2.dateRange);
|
|
|
|
|
downloadByDays(query);
|
|
|
|
|
this.$message.info("已发送下载指令,请稍等查看日志,防止同时下载!");
|
|
|
|
|
this.dialog2.visible = false;
|
|
|
|
|
},
|
|
|
|
|
rowStyle({row,rowIndex}){
|
|
|
|
|
let rowBackground={};
|
|
|
|
|
if(row.type == 'error'){
|
|
|
|
|
//rowBackground.background="#f6f5ee";
|
|
|
|
|
rowBackground.color='#f60303';
|
|
|
|
|
}
|
|
|
|
|
return search;
|
|
|
|
|
|
|
|
|
|
return rowBackground;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|