集成任务日志明细本地化修改

This commit is contained in:
hyt 2024-05-16 13:35:30 +08:00
parent 74cea6da6a
commit 9c6e772276
2 changed files with 456 additions and 452 deletions

View File

@ -1,371 +1,369 @@
<template>
<div>
<base-layout ref="baseLayout" :buttonList="buttonList" @onFuncBtn="onFuncBtn" :querySwitch="true"
:searchBtnList="searchBtnList" :searchList="requirementList" @search="handleSearchEvent" :isPage="true"
@pageChange="handlePageChange" @onFuncSearchBtn="onFuncSearchBtn">
<div slot="main" slot-scope="{ tableHeight }">
<base-table ref="baseTable" :showIndex="true" :funWidth="350" :funData="funData" @onFunc="onFunc"
:tabLoading.sync="tabLoading" :tableHeight="tableHeight" :tableData="tableData"
:fixedTable="'right'" :tableColumn="tableColumnData" :showSelect="true">
<template v-slot:new_state="{ row }">
<div style="width: 100%">
<span v-if="row.new_state == 'Y'" style="color: #67c23a">成功</span>
<span v-else-if="row.new_state == 'H'" style="color: #67c23a">已处理</span>
<span v-else style="color: #f56c6c">失败</span>
</div>
</template>
</base-table>
</div>
</base-layout>
<right-dialog ref="rightDialog" @resetTable="resetTable"></right-dialog>
<div>
<base-layout ref="baseLayout" :buttonList="buttonList" @onFuncBtn="onFuncBtn" :querySwitch="true"
:searchBtnList="searchBtnList" :searchList="requirementList" @search="handleSearchEvent" :isPage="true"
@pageChange="handlePageChange" @onFuncSearchBtn="onFuncSearchBtn"
>
<div slot="main" slot-scope="{ tableHeight }">
<base-table ref="baseTable" :showIndex="true" :funWidth="350" :funData="funData" @onFunc="onFunc"
:tabLoading.sync="tabLoading" :tableHeight="tableHeight" :tableData="tableData"
:fixedTable="'right'" :tableColumn="tableColumnData" :showSelect="true"
>
<template v-slot:new_state="{ row }">
<div style="width: 100%">
<span v-if="row.new_state == 'Y'" style="color: #67c23a">成功</span>
<span v-else-if="row.new_state == 'H'" style="color: #67c23a">已处理</span>
<span v-else style="color: #f56c6c">失败</span>
</div>
</template>
</base-table>
</div>
</base-layout>
<right-dialog ref="rightDialog" @resetTable="resetTable"></right-dialog>
</div>
</template>
<script>
import baseLayout from "@/components/base/baseLayout";
import baseTable from "@/components/base/baseTable";
import rightDialog from "./rightDialog";
import configData from "./configData";
import baseLayout from '@/components/base/baseLayout'
import baseTable from '@/components/base/baseTable'
import rightDialog from './rightDialog'
import configData from './configData'
import {
authApi
} from "@/api/apis/auth";
import { option } from "@/api/apis/detailData"
export default
authApi
} from '@/api/apis/auth'
import { option } from '@/api/apis/detailData'
{
components: {
baseLayout,
baseTable,
rightDialog,
},
data() {
return {
buttonList: [
{
menuName: "刷新",
icon: "el-icon-refresh",
btnFunction: "resetLoad",
},
], //
searchBtnList: [
{
name: "批量推送",
btnFunction: "batchPush",
},
], //
requirementList: [
{
placeholder: "任务名称",
prop: "plugin_id",
tag: "elSelect",
options: [],
optionValue: "pluginId",
optionLabel: "pluginName",
},
{
placeholder: "源系统编码",
prop: "root_app_bill",
tag: "elInput",
},
{
placeholder: "推送时间",
prop: "new_push_date",
tag: "elDatePicker",
valueFormat: "yyyy-MM-dd",
},
{
placeholder: "业务⽇期",
prop: "business_date",
tag: "elDatePicker",
valueFormat: "yyyy-MM-dd",
},
{
placeholder: "下游系统单号",
prop: "new_system_number",
tag: "elInput",
},
{
placeholder: "推送状态",
prop: "new_state",
tag: "elRadio",
options: [
{ label: "全部", value: "" },
{ label: "成功", value: "Y" },
{ label: "已处理", value: "H" },
{ label: "失败", value: "N" },
],
},
], //list
tabLoading: false,
tableColumnData: configData.tableColumnData, //
funData: [
{
color: "#6a9af1",
text: "查看",
},
{
color: "#6a9af1",
text: "重新推送",
},
{
color: "#6a9af1",
text: "手工处理",
},
{
color: "#d67a74",
text: "删除",
},
],
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
},
queryModel: {
plugin_id: '',
root_app_bill: '',
new_push_date: '',
business_date: '',
new_system_number: '',
new_state: 'N'
},
};
},
mounted() {
this.$refs.baseLayout.getField("new_state", "N");
this.queryProductClassfy();
this.GetProductionTableData();
},
methods: {
//
async GetProductionTableData() {
this.tabLoading = true;
const res = await option({
tl: "integrationTaskLivingDetailsService",
as: "integrationTaskLog",
dj: "queryPage",
}, {
...this.pageModel,
...this.queryModel
})
this.tabLoading = false;
if (res.status == "200") {
this.tableData = res.attribute.list;
this.$refs.baseTable.setTableKey()
this.$refs.baseLayout.setPageTotal(res.attribute.total);
}
},
async queryProductClassfy() {
const res = await option({
tl: "pluginService",
as: "plugins",
dj: "queryPlugins",
}, {})
export default {
components: {
baseLayout,
baseTable,
rightDialog
},
data() {
return {
buttonList: [
{
menuName: '刷新',
icon: 'el-icon-refresh',
btnFunction: 'resetLoad'
}
], //
searchBtnList: [
{
name: '批量推送',
btnFunction: 'batchPush'
}
], //
requirementList: [
{
placeholder: '任务名称',
prop: 'plugin_id',
tag: 'elSelect',
options: [],
optionValue: 'pluginId',
optionLabel: 'pluginName'
},
{
placeholder: '源系统编码',
prop: 'root_app_bill',
tag: 'elInput'
},
{
placeholder: '推送时间',
prop: 'new_push_date',
tag: 'elDatePicker',
valueFormat: 'yyyy-MM-dd'
},
{
placeholder: '业务⽇期',
prop: 'business_date',
tag: 'elDatePicker',
valueFormat: 'yyyy-MM-dd'
},
{
placeholder: '下游系统单号',
prop: 'new_system_number',
tag: 'elInput'
},
{
placeholder: '推送状态',
prop: 'new_state',
tag: 'elRadio',
options: [
{ label: '成功', value: 'Y' },
{ label: '已处理', value: 'H' },
{ label: '失败', value: 'N' }
]
}
], //list
tabLoading: false,
tableColumnData: configData.tableColumnData, //
funData: [
{
color: '#6a9af1',
text: '查看'
},
{
color: '#6a9af1',
text: '重新推送'
},
{
color: '#6a9af1',
text: '线下处理'
},
{
color: '#d67a74',
text: '删除'
}
],
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10
},
queryModel: {
plugin_id: '',
root_app_bill: '',
new_push_date: '',
business_date: '',
new_system_number: '',
new_state: 'N'
}
}
},
mounted() {
this.$refs.baseLayout.getField('new_state', 'N')
this.queryProductClassfy()
this.GetProductionTableData()
},
methods: {
//
async GetProductionTableData() {
this.tabLoading = true
const res = await option({
tl: 'integrationTaskLivingDetailsService',
as: 'integrationTaskLog',
dj: 'queryPage'
}, {
...this.pageModel,
...this.queryModel
})
this.tabLoading = false
if (res.status == '200') {
this.tableData = res.attribute.list
this.$refs.baseTable.setTableKey()
this.$refs.baseLayout.setPageTotal(res.attribute.total)
}
},
async queryProductClassfy() {
const res = await option({
tl: 'pluginService',
as: 'plugins',
dj: 'queryPlugins'
}, {})
if (res.status == "200") {
this.requirementList[0].options = res.attribute;
}
},
//
handleSearchEvent() {
let data = this.$refs.baseLayout.ruleForm;
this.queryModel.plugin_id = data.plugin_id;
this.queryModel.root_app_bill = data.root_app_bill;
this.queryModel.new_push_date = data.new_push_date;
this.queryModel.business_date = data.business_date;
this.queryModel.new_system_number = data.new_system_number;
this.queryModel.new_state = data.new_state;
this.resetTable();
},
//
async batchPush() {
let data = ''
this.$refs.baseTable.$refs.elTable.selection.forEach(el => {
if (data == '') {
data = el.id
} else {
data += `,${el.id}`
}
});
if (data.length > 0) {
this.$confirm("确认重新推送吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.openLoading("submit");
this.rePushBatch(data)
})
.catch(() => {
this.$vmNews("取消操作", "info");
});
} else {
this.$vmNews("请选择需要推送的单据", "warning");
}
},
async rePushBatch(data) {
const res = await option({
tl: "integrationTaskLivingDetailsService",
as: "integrationTaskLog",
dj: "batchPush",
}, {
id: data
})
if (res.status == "200") {
this.$vmNews("批量推送成功", "success");
this.resetTable();
}
},
//
handlePageChange(val) {
this.pageModel.pageNum = val.pageIndex;
this.pageModel.pageSize = val.pageSize;
this.GetProductionTableData();
},
//
onFuncBtn(btn) {
this[btn.btnFunction]();
},
//
onFuncSearchBtn(btn) {
this[btn.btnFunction]();
},
//
add() {
this.$refs.rightDialog.openDialog("add");
},
//
async onFunc(index, row) {
//
if (index == 0) {
this.openLoading("detail");
this.$refs.rightDialog.openDialog("show", row);
}
//
if (index == 1) {
this.$confirm("确认重新推送吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.openLoading("submit");
this.handleRePush(row);
})
.catch(() => {
this.$vmNews("取消操作", "info");
});
}
//
if (index == 2) {
this.$prompt("请填写旺店通或者NC的单据号方便以后排查", "提示", {
confirmButtonText: "提交",
cancelButtonText: "取消",
inputType: "textarea",
inputValidator: (value) => {
if (!value) {
return "请输入处理内容";
}
},
})
.then(({ value }) => {
this.openLoading("submit");
let params =
{
id: row.id,
processing_remarks: value,
}
;
this.updateManualProcess(params);
})
.catch(() => {
this.$message({
type: "info",
message: "取消操作",
});
});
}
//
if (index == 3) {
this.$confirm("确认删除该内容吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.openLoading("del");
this.productionDeleteById(row.id);
})
.catch(() => {
this.$vmNews("取消操作", "info");
});
}
},
async handleRePush(row) {
const res = await option({
tl: "integrationTaskLivingDetailsService",
as: "integrationTaskLog",
dj: "repush",
}, {
id: row.id
})
if (res.status == "200") {
this.$vmNews("补推成功", "success");
this.resetTable();
} else if (res.status == "500") {
this.$message({
title: "补推失败",
showClose: true,
message: res.msg,
duration: 0,
type: "error",
});
this.resetTable();
}
},
async updateManualProcess(val) {
const res = await option({
tl: "integrationTaskLivingDetailsService",
as: "integrationTaskLog",
dj: "manualProcessing",
}, val)
if (res.status == "200") {
this.$vmNews("手工处理成功", "success");
this.resetTable();
}
},
async productionDeleteById(id) {
const res = await option({
tl: "integrationTaskLivingDetailsService",
as: "integrationTaskLog",
dj: "deleteEntity",
}, {
id
})
if (res.status == "200") {
this.$vmNews("删除成功", "success");
this.resetTable();
}
},
//
resetTable() {
this.pageModel.pageNum = 1;
this.$refs.baseLayout.pageClear();
this.GetProductionTableData();
},
},
};
if (res.status == '200') {
this.requirementList[0].options = res.attribute
}
},
//
handleSearchEvent() {
let data = this.$refs.baseLayout.ruleForm
this.queryModel.plugin_id = data.plugin_id
this.queryModel.root_app_bill = data.root_app_bill
this.queryModel.new_push_date = data.new_push_date
this.queryModel.business_date = data.business_date
this.queryModel.new_system_number = data.new_system_number
this.queryModel.new_state = data.new_state
this.resetTable()
},
//
async batchPush() {
let data = []
this.$refs.baseTable.$refs.elTable.selection.forEach(el => {
data.push(el)
})
if (data.length > 0) {
this.$confirm('确认重新推送吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.openLoading('submit')
this.rePushBatch(data)
})
.catch(() => {
this.$vmNews('取消操作', 'info')
})
} else {
this.$vmNews('请选择需要推送的单据', 'warning')
}
},
async rePushBatch(data) {
const res = await option({
tl: 'integrationTaskLivingDetailsService',
as: 'integrationTaskLog',
dj: 'batchPush'
},
data
)
if (res.status == '200') {
this.$vmNews('批量推送成功', 'success')
this.resetTable()
}
},
//
handlePageChange(val) {
this.pageModel.pageNum = val.pageIndex
this.pageModel.pageSize = val.pageSize
this.GetProductionTableData()
},
//
onFuncBtn(btn) {
this[btn.btnFunction]()
},
//
onFuncSearchBtn(btn) {
this[btn.btnFunction]()
},
//
add() {
this.$refs.rightDialog.openDialog('add')
},
//
async onFunc(index, row) {
//
if (index == 0) {
this.openLoading('detail')
this.$refs.rightDialog.openDialog('show', row)
}
//
if (index == 1) {
this.$confirm('确认重新推送吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.openLoading('submit')
this.handleRePush(row)
})
.catch(() => {
this.$vmNews('取消操作', 'info')
})
}
//
if (index == 2) {
this.$prompt('请填写旺店通或者NC的线下单据号方便以后排查', '提示', {
confirmButtonText: '提交',
cancelButtonText: '取消',
inputType: 'textarea',
inputValidator: (value) => {
if (!value) {
return '请输入处理内容'
}
}
})
.then(({ value }) => {
this.openLoading('submit')
let params =
{
id: row.id,
processing_remarks: value
}
this.updateManualProcess(params)
})
.catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
}
//
if (index == 3) {
this.$confirm('确认删除该内容吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.openLoading('del')
this.productionDeleteById(row)
})
.catch(() => {
this.$vmNews('取消操作', 'info')
})
}
},
async handleRePush(row) {
const res = await option({
tl: 'integrationTaskLivingDetailsService',
as: 'integrationTaskLog',
dj: 'repush'
}, {
id: row.id,
new_state: row.new_state
})
if (res.status == '200') {
this.$vmNews('补推成功', 'success')
this.resetTable()
} else if (res.status == '500') {
this.$message({
title: '补推失败',
showClose: true,
message: res.msg,
duration: 0,
type: 'error'
})
this.resetTable()
}
},
async updateManualProcess(val) {
const res = await option({
tl: 'integrationTaskLivingDetailsService',
as: 'integrationTaskLog',
dj: 'manualProcessing'
}, val)
if (res.status == '200') {
this.$vmNews('线下处理成功', 'success')
this.resetTable()
}
},
async productionDeleteById(id) {
const res = await option({
tl: 'integrationTaskLivingDetailsService',
as: 'integrationTaskLog',
dj: 'deleteEntity'
}, {
id: row.id,
new_state: row.new_state
})
if (res.status == '200') {
this.$vmNews('删除成功', 'success')
this.resetTable()
}
},
//
resetTable() {
this.pageModel.pageNum = 1
this.$refs.baseLayout.pageClear()
this.GetProductionTableData()
}
}
}
</script>
<style scoped>
.clickTitle {
color: #409eff;
cursor: pointer;
color: #409eff;
cursor: pointer;
}
::v-deep .searchBox:nth-child(6) {
width: 250px !important;
width: 250px !important;
}
</style>

View File

@ -1,32 +1,36 @@
<template>
<div>
<base-right-dialog ref="baseRightDialog" :footerShow="true" :dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 集成产品清单'" @handleClose="handleDialogClose" :type="dialogType" :submitShow="submitShow"
@handleConfirmClick="handleConfirmClick">
:title="dialogTitle + ' 集成产品清单'" @handleClose="handleDialogClose" :type="dialogType"
:submitShow="submitShow"
@handleConfirmClick="handleConfirmClick"
>
<base-form ref="basicsForm" :formRow="formRow" :isFunBtn="false" :rules="basicsRules" class="dialog_form"
:spanWidth="`120px`" :loading="vLoading"></base-form>
:spanWidth="`120px`" :loading="vLoading"
></base-form>
</base-right-dialog>
</div>
</template>
<script>
import baseRightDialog from "@/components/base/baseRightDialog";
import baseForm from "@/components/base/baseNewForm";
import baseTable from "@/components/base/baseTable";
import configData from "./configData";
import { authApi } from "@/api/apis/auth";
import { option } from "@/api/apis/detailData"
import baseRightDialog from '@/components/base/baseRightDialog'
import baseForm from '@/components/base/baseNewForm'
import baseTable from '@/components/base/baseTable'
import configData from './configData'
import { authApi } from '@/api/apis/auth'
import { option } from '@/api/apis/detailData'
export default {
components: {
baseRightDialog,
baseForm,
baseTable,
baseTable
},
data() {
return {
dialogVisible: false,
dialogTitle: "",
dialogType: "",
dialogTitle: '',
dialogType: '',
formRow: configData.formRow,
basicsRules: configData.basicsRules,
vLoading: false,
@ -37,55 +41,57 @@ export default {
tableVersionColumn: configData.tableVersionColumn,
funData: [],
isEdit: false
};
}
},
mounted() {
},
mounted() { },
methods: {
openDialog(type, row) {
// this.queryProductClassfy();
this.formRow = configData.formRow;
this.submitShow = true;
this.formRow = configData.formRow
this.submitShow = true
this.isEdit = false
this.funData = [
{
color: "#ff0000",
text: "删除",
color: '#ff0000',
text: '删除'
}
]
//
if (type == "add") {
this.dialogTitle = "新增";
this.dialogType = "add";
if (type == 'add') {
this.dialogTitle = '新增'
this.dialogType = 'add'
}
//
if (type == "edit") {
if (type == 'edit') {
this.isEdit = true
this.dialogTitle = "编辑";
this.dialogType = "edit";
this.productGetById(row.id);
this.dialogTitle = '编辑'
this.dialogType = 'edit'
this.productGetById(row)
}
//
if (type == "show") {
if (type == 'show') {
this.funData = Object.assign([], [])
this.submitShow = false;
this.formRow = configData.formRowShow;
this.dialogTitle = "查看";
this.dialogType = "show";
this.productGetById(row.id);
this.submitShow = false
this.formRow = configData.formRowShow
this.dialogTitle = '查看'
this.dialogType = 'show'
this.productGetById(row)
}
this.dialogVisible = true;
this.dialogVisible = true
},
async productGetById(id) {
this.openLoading("detail");
async productGetById(row) {
this.openLoading('detail')
const res = await option({
tl: "integrationTaskLivingDetailsService",
as: "integrationTaskLog",
dj: "queryEntity",
tl: 'integrationTaskLivingDetailsService',
as: 'integrationTaskLog',
dj: 'queryEntity'
}, {
id
id: row.id,
new_state: row.new_state
})
if (res.status == '200') {
this.$refs.basicsForm.incomingParameters(res.attribute);
this.$refs.basicsForm.incomingParameters(res.attribute)
}
},
@ -123,11 +129,11 @@ export default {
addVersionDialog() {
let obj = {
id: new Date().getTime().toString(),
versionNumber: "",
versionDescription: "",
versionNumber: '',
versionDescription: '',
disabled: false
};
this.tableVersionData.push(obj);
}
this.tableVersionData.push(obj)
},
//
onFunc(index, row) {
@ -135,99 +141,99 @@ export default {
this.$delConfirm().then(() => {
this.tableVersionData.forEach((item, itemIndex) => {
if (item.id === row.id) {
this.tableVersionData.splice(itemIndex, 1);
this.tableVersionData.splice(itemIndex, 1)
}
});
});
})
})
}
},
//
handleDialogClose() {
this.tableVersionData = Object.assign([], []);
this.$refs.basicsForm.resetFields();
this.dialogVisible = false;
this.tableVersionData = Object.assign([], [])
this.$refs.basicsForm.resetFields()
this.dialogVisible = false
},
//
handleConfirmClick() {
this.$refs.basicsForm.$refs["ruleForm"].validate((valid) => {
this.$refs.basicsForm.$refs['ruleForm'].validate((valid) => {
if (!valid) {
return;
return
} else {
let params = {
...this.$refs.basicsForm.ruleForm,
sysProductVersionList: [],
};
let result = [];
sysProductVersionList: []
}
let result = []
if (this.tableVersionData.length > 0) {
this.tableVersionData.forEach((item) => {
let obj = {
versionNumber: item.versionNumber,
versionDescription: item.versionDescription,
};
result.push(obj);
});
versionDescription: item.versionDescription
}
result.push(obj)
})
}
params.sysProductVersionList = Object.assign([], result);
if (this.dialogType == "add") {
this.openLoading("submit");
this.productSaveDto(params);
params.sysProductVersionList = Object.assign([], result)
if (this.dialogType == 'add') {
this.openLoading('submit')
this.productSaveDto(params)
}
if (this.dialogType == "edit") {
this.openLoading("submit");
this.productUpdateDto(params);
if (this.dialogType == 'edit') {
this.openLoading('submit')
this.productUpdateDto(params)
}
}
});
})
},
//
async productSaveDto(params) {
let res = await authApi(
"sysProductService",
"product",
"addProduct",
"",
'sysProductService',
'product',
'addProduct',
'',
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("新增成功", "success");
this.$emit("resetTable");
)
if (res.status == '200') {
this.handleDialogClose()
this.$vmNews('新增成功', 'success')
this.$emit('resetTable')
}
},
//
async productUpdateDto(params) {
let res = await authApi(
"sysProductService",
"product",
"updateProduct",
"",
'sysProductService',
'product',
'updateProduct',
'',
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("更新成功", "success");
this.$emit("resetTable");
)
if (res.status == '200') {
this.handleDialogClose()
this.$vmNews('更新成功', 'success')
this.$emit('resetTable')
}
},
//
async queryProductClassfy() {
let params = {
tab_name: "sys_product",
column_name: "classify",
};
let res = await authApi(
"generalServiceImpl",
"dictionaryshop",
"selectDictionaryshop",
"",
params
);
if (res.status == "200") {
this.formRow[1].elCol[0].options = res.attribute;
tab_name: 'sys_product',
column_name: 'classify'
}
},
},
};
let res = await authApi(
'generalServiceImpl',
'dictionaryshop',
'selectDictionaryshop',
'',
params
)
if (res.status == '200') {
this.formRow[1].elCol[0].options = res.attribute
}
}
}
}
</script>
<style scoped lang="scss">