同步记录taskId查询问题

master
anthonyywj2 3 years ago
parent 33517bc693
commit aaa6c804a1

@ -8,13 +8,14 @@
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="filterQuery.id" placeholder="记录ID"></el-input> <el-input v-model="filterQuery.taskId" placeholder="记录ID"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.status" placeholder="处理状态"> <el-select v-model="filterQuery.status" placeholder="处理状态">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="等待处理" value="0"></el-option> <el-option label="等待处理" value="0"></el-option>
<el-option label="等待下载" value="3"></el-option>
<el-option label="已处理" value="1"></el-option> <el-option label="已处理" value="1"></el-option>
<el-option label="异常" value="2"></el-option> <el-option label="异常" value="2"></el-option>
</el-select> </el-select>
@ -146,6 +147,7 @@ export default {
data() { data() {
return { return {
filterQuery: { filterQuery: {
taskId: null,
id: null, id: null,
status: "0", status: "0",
page: 1, page: 1,

@ -1,133 +1,133 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<div> <div>
<span style="color: red;">说明:&nbsp;此页面用于记录接收下游上传数据日志记录上传数据至上游日志记录 </span> <span style="color: red;">说明:&nbsp;此页面用于记录接收下游上传数据日志记录上传数据至上游日志记录 </span>
</div> </div>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="filterQuery.id" placeholder="记录ID"></el-input> <el-input v-model="filterQuery.taskId" placeholder="记录ID"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.status" placeholder="处理状态"> <el-select v-model="filterQuery.status" placeholder="处理状态">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="等待处理" value="0"></el-option> <el-option label="等待处理" value="0"></el-option>
<el-option label="已处理" value="1"></el-option> <el-option label="已处理" value="1"></el-option>
<el-option label="异常" value="2"></el-option> <el-option label="异常" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button> <el-button type="primary" icon="search" @click="getList"></el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="list" :data="list"
style="width: 100%" style="width: 100%"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="任务ID"
prop="taskId"
width="180"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="任务类型"
prop="idDatas"
width="140"
show-overflow-tooltip
>
<template slot-scope="scope">
<span>{{ type[scope.row.idDatas] }}</span>
</template>
</el-table-column>
<el-table-column
label="状态"
prop="status"
width="140"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
:type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }}
</el-tag
> >
</template> <el-table-column label="序号" type="index"></el-table-column>
</el-table-column> <el-table-column
<el-table-column label="任务ID"
label="开始时间" prop="taskId"
width="180" width="180"
prop="startTime" show-overflow-tooltip
show-overflow-tooltip ></el-table-column>
></el-table-column>
<el-table-column
label="结束时间"
width="180"
prop="endTime"
show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="同步信息" label="任务类型"
prop="remark" prop="idDatas"
show-overflow-tooltip width="140"
></el-table-column> show-overflow-tooltip
<el-table-column >
label="文件路径" <template slot-scope="scope">
prop="cacheFilePath" <span>{{ type[scope.row.idDatas] }}</span>
show-overflow-tooltip </template>
></el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="160"> <el-table-column
<template slot-scope="scope"> label="状态"
<el-button prop="status"
type="text" width="140"
size="small" show-overflow-tooltip
@click.native.stop="detailDialog(scope.row.id)" >
>详情 <template slot-scope="scope">
</el-button <el-tag
> :type="statusFilterType(scope.row.status)"
<el-button >{{ status[scope.row.status] }}
type="text" </el-tag
size="small" >
@click.native.stop="deleteDialog(scope.row.id)" </template>
>删除 </el-table-column>
</el-button <el-table-column
> label="开始时间"
</template> width="180"
</el-table-column> prop="startTime"
</el-table> show-overflow-tooltip
<el-pagination ></el-table-column>
:page-size="filterQuery.limit" <el-table-column
@current-change="handleCurrentChange" label="结束时间"
layout="prev, pager, next" width="180"
:total="total" prop="endTime"
></el-pagination> show-overflow-tooltip
</el-card> ></el-table-column>
<el-table-column
label="同步信息"
prop="remark"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="文件路径"
prop="cacheFilePath"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="detailDialog(scope.row.id)"
>详情
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
<el-dialog <el-dialog
title="同步信息" title="同步信息"
width="25%" width="25%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:visible.sync="syncVisible" :visible.sync="syncVisible"
> >
<span v-text="syncInfo" style="white-space:pre-line;" class="syncInfo"></span> <span v-text="syncInfo" style="white-space:pre-line;" class="syncInfo"></span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -135,271 +135,272 @@ import {filterUploadStatus, deleteUploadStatus, updateConfig} from "../../api/sy
import store from "@/store"; import store from "@/store";
export default { export default {
data() { data() {
return { return {
filterQuery: { filterQuery: {
id: null, taskId: null,
status: "0", id: null,
page: 1, status: "0",
limit: 10, page: 1,
syncTime: null, limit: 10,
}, syncTime: null,
list: [], },
headers: {}, list: [],
detailList: [], headers: {},
thirdSys: [], detailList: [],
thirdSysDetail: null, thirdSys: [],
total: 0, thirdSysDetail: null,
currentRow: null, total: 0,
editQuery: null, currentRow: null,
type: { editQuery: null,
"AutoDownloadOrder": "扫码单据", type: {
"AutoDownloadBusType": "单据类型", "AutoDownloadOrder": "扫码单据",
"AutoDownloadAllData": "基础信息", "AutoDownloadBusType": "单据类型",
"AutoDownloadDiProducts": "国家库DI数据" "AutoDownloadAllData": "基础信息",
}, "AutoDownloadDiProducts": "国家库DI数据"
status: { },
0: "等待处理", status: {
1: "处理完成", 0: "等待处理",
2: "处理异常", 1: "处理完成",
}, 2: "处理异常",
},
configQuery: {
id: null,
typeBus: null,
typeScan: null,
typeThird: null,
basicProducts: null,
basicCorp: null,
basicInv: null,
basicThirdProducts: null,
basicThirdCorp: null,
basicThirdInv: null,
basicThirdBusOrder: null,
orderScanFinish: null,
dbDiProducts: null,
downstreamEnable: null,
}, configQuery: {
uploadFileUrl: null, id: null,
uploadData: { typeBus: null,
thirdSys: "thirdId", typeScan: null,
}, typeThird: null,
templateDlUrl: null, basicProducts: null,
checked: false, basicCorp: null,
syncTime: null, basicInv: null,
syncInfo: null, basicThirdProducts: null,
syncVisible: false basicThirdCorp: null,
}; basicThirdInv: null,
}, basicThirdBusOrder: null,
orderScanFinish: null,
dbDiProducts: null,
downstreamEnable: null,
methods: { },
onReset() { uploadFileUrl: null,
this.$router.push({ uploadData: {
path: "", thirdSys: "thirdId",
}); },
this.filterQuery = { templateDlUrl: null,
id: null, checked: false,
page: 1, syncTime: null,
limit: 20, syncInfo: null,
}; syncVisible: false
this.syncTime = null; };
this.getList();
},
getList() {
this.loading = true;
filterUploadStatus(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
}, },
saveConfig() { methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
id: null,
page: 1,
limit: 20,
};
this.syncTime = null;
this.getList();
},
getList() {
this.loading = true;
filterUploadStatus(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
saveConfig() {
updateConfig(this.configQuery) updateConfig(this.configQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("更新成功!"); this.$message.success("更新成功!");
this.getConfig(); this.getConfig();
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
}, },
cancelDialog(val) { cancelDialog(val) {
this.udiImportDetailVisible = false; this.udiImportDetailVisible = false;
this.thrCorpSelectVisible = false; this.thrCorpSelectVisible = false;
if (val) { if (val) {
this.getList(); this.getList();
} }
} }
, ,
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val; this.filterQuery.page = val;
this.getList(); this.getList();
} }
, ,
/* createScheduleDialog(type) { /* createScheduleDialog(type) {
if (this.$isNotBlank(this.syncTime)) { if (this.$isNotBlank(this.syncTime)) {
this.$confirm("此操作将从" + this.syncTime + "开始同步最新数据,是否继续", "提示", { this.$confirm("此操作将从" + this.syncTime + "开始同步最新数据,是否继续", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
})
.then(() => {
this.createSchedule(type);
}) })
.catch(() => { .then(() => {
}); this.createSchedule(type);
} else { })
this.createSchedule(type); .catch(() => {
} });
} else {
this.createSchedule(type);
}
}, },
createSchedule(type) { createSchedule(type) {
let query = { let query = {
createType: type, createType: type,
syncTime: this.syncTime, syncTime: this.syncTime,
} }
createSchedule(query) createSchedule(query)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("创建成功!"); this.$message.success("创建成功!");
} else if (response.code == 501) { } else if (response.code == 501) {
this.$alert(response.message, '提示', { this.$alert(response.message, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
type: "warning", type: "warning",
callback: action => { callback: action => {
} }
}); });
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
this.getList(); this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
},*/ },*/
deleteDialog(rowId) { deleteDialog(rowId) {
this.$confirm("此操作将删除该任务信息, 是否继续?", "提示", { this.$confirm("此操作将删除该任务信息, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
let dQuery = { let dQuery = {
id: rowId, id: rowId,
}; };
deleteUploadStatus(dQuery) deleteUploadStatus(dQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("删除成功"); this.$message.success("删除成功");
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
this.getList(); this.getList();
})
.catch(() => {
this.loading = false;
});
}) })
.catch(() => { .catch(() => {
this.loading = false;
}); });
})
.catch(() => {
});
}
,
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
this.getList();
} else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success(response.data);
this.getList();
}
}
,
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "success",
2: "danger",
};
return statusMap[status];
},
detailDialog(id) {
this.syncVisible = true;
this.list.forEach(item => {
if (id === item.id) {
this.syncInfo = item.remark;
} }
}) ,
} handleChange(response, files, fileList) {
}, console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
this.getList();
} else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success(response.data);
this.getList();
}
}
,
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "success",
2: "danger",
};
return statusMap[status];
},
detailDialog(id) {
this.syncVisible = true;
this.list.forEach(item => {
if (id === item.id) {
this.syncInfo = item.remark;
}
})
}
},
mounted() { mounted() {
}, },
components: {}, components: {},
created() { created() {
this.headers = { this.headers = {
ADMIN_ID: store.getters.adminId, ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token, ADMIN_TOKEN: store.getters.token,
}; };
this.getList(); this.getList();
this.getConfig(); this.getConfig();
}, },
}; };
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
.syncInfo { .syncInfo {
font-size: medium; font-size: medium;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
line-height: 25px; line-height: 25px;
} }
</style> </style>

Loading…
Cancel
Save