集成任务日志、监控开发完成
This commit is contained in:
parent
87caa89eb2
commit
50209c8a9a
|
@ -5,7 +5,7 @@
|
|||
ref="baseRightDialog"
|
||||
:footerShow="true"
|
||||
:dialogVisible.sync="dialogVisible"
|
||||
:title="dialogTitle + ' 集成前台任务'"
|
||||
:title="dialogTitle + ' 接口管理'"
|
||||
@handleClose="handleDialogClose"
|
||||
:type="dialogType"
|
||||
:submitShow="submitShow"
|
||||
|
@ -220,7 +220,7 @@ export default {
|
|||
return
|
||||
} else {
|
||||
let params = {
|
||||
...this.$refs.basicsForm.ruleForm,
|
||||
...this.$refs.basicsForm.ruleForm
|
||||
}
|
||||
if (this.dialogType == 'add') {
|
||||
this.openLoading('submit')
|
||||
|
|
|
@ -702,6 +702,100 @@ export default {
|
|||
}
|
||||
]
|
||||
},
|
||||
],//步骤2表
|
||||
stepOneformRowCopy: [
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'input',
|
||||
title: '目标地址',
|
||||
maxlength: 200,
|
||||
id: 'destinationAddress',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '请求编码',
|
||||
id: 'requestCoding',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '请求方法',
|
||||
id: 'requestMethod',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'num',
|
||||
title: '超出时间',
|
||||
id: 'timeoutPeriod',
|
||||
row: 24,
|
||||
min: 1,
|
||||
max: 600000,
|
||||
maxlength: 50,
|
||||
required: true,
|
||||
message: 'ms'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'num',
|
||||
title: '限流',
|
||||
maxlength: 50,
|
||||
id: 'currentLimiting',
|
||||
min: 1,
|
||||
row: 24,
|
||||
max: 1000,
|
||||
required: true,
|
||||
message: 'TPS'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'radio',
|
||||
title: '是否扩展API',
|
||||
maxlength: 200,
|
||||
id: 'extensionApi',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: [
|
||||
{
|
||||
label: '是',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
label: '否',
|
||||
id: '2'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
|
@ -712,7 +806,7 @@ export default {
|
|||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: false
|
||||
required: true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -726,7 +820,7 @@ export default {
|
|||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: false
|
||||
required: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1133,8 +1227,225 @@ export default {
|
|||
stepOneChangeRadio(val, index, indexRow, row) {
|
||||
console.log(row)
|
||||
if (row.id === 'extensionApi') {
|
||||
this.stepOneformRow[6].elCol[0].required = val == 1
|
||||
this.stepOneformRow[7].elCol[0].required = val == 1
|
||||
if (val == 1) {
|
||||
this.stepOneformRow = [
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'input',
|
||||
title: '目标地址',
|
||||
maxlength: 200,
|
||||
id: 'destinationAddress',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '请求编码',
|
||||
id: 'requestCoding',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '请求方法',
|
||||
id: 'requestMethod',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'num',
|
||||
title: '超出时间',
|
||||
id: 'timeoutPeriod',
|
||||
row: 24,
|
||||
min: 1,
|
||||
max: 600000,
|
||||
maxlength: 50,
|
||||
required: true,
|
||||
message: 'ms'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'num',
|
||||
title: '限流',
|
||||
maxlength: 50,
|
||||
id: 'currentLimiting',
|
||||
min: 1,
|
||||
row: 24,
|
||||
max: 1000,
|
||||
required: true,
|
||||
message: 'TPS'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'radio',
|
||||
title: '是否扩展API',
|
||||
maxlength: 200,
|
||||
id: 'extensionApi',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: [
|
||||
{
|
||||
label: '是',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
label: '否',
|
||||
id: '2'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'input',
|
||||
title: '内部bean名称',
|
||||
maxlength: 200,
|
||||
id: 'beanName',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'input',
|
||||
title: '方法名称',
|
||||
maxlength: 200,
|
||||
id: 'funName',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
} else {
|
||||
this.stepOneformRow = [
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'input',
|
||||
title: '目标地址',
|
||||
maxlength: 200,
|
||||
id: 'destinationAddress',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '请求编码',
|
||||
id: 'requestCoding',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '请求方法',
|
||||
id: 'requestMethod',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'num',
|
||||
title: '超出时间',
|
||||
id: 'timeoutPeriod',
|
||||
row: 24,
|
||||
min: 1,
|
||||
max: 600000,
|
||||
maxlength: 50,
|
||||
required: true,
|
||||
message: 'ms'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'num',
|
||||
title: '限流',
|
||||
maxlength: 50,
|
||||
id: 'currentLimiting',
|
||||
min: 1,
|
||||
row: 24,
|
||||
max: 1000,
|
||||
required: true,
|
||||
message: 'TPS'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'radio',
|
||||
title: '是否扩展API',
|
||||
maxlength: 200,
|
||||
id: 'extensionApi',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: [
|
||||
{
|
||||
label: '是',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
label: '否',
|
||||
id: '2'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
// 选项卡点击事件
|
||||
|
@ -1346,8 +1657,227 @@ export default {
|
|||
this.stepZeroForm = obj0
|
||||
this.stepOneForm = obj1
|
||||
//这里和stepOneChangeRadio方法一个道理 需要判断是否必填
|
||||
this.stepOneformRow[6].elCol[0].required = this.stepOneForm.extensionApi == 1
|
||||
this.stepOneformRow[7].elCol[0].required = this.stepOneForm.extensionApi == 1
|
||||
if (this.stepOneForm.extensionApi == 1) {
|
||||
this.stepOneformRow = [
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'input',
|
||||
title: '目标地址',
|
||||
maxlength: 200,
|
||||
id: 'destinationAddress',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '请求编码',
|
||||
id: 'requestCoding',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '请求方法',
|
||||
id: 'requestMethod',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'num',
|
||||
title: '超出时间',
|
||||
id: 'timeoutPeriod',
|
||||
row: 24,
|
||||
min: 1,
|
||||
max: 600000,
|
||||
maxlength: 50,
|
||||
required: true,
|
||||
message: 'ms'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'num',
|
||||
title: '限流',
|
||||
maxlength: 50,
|
||||
id: 'currentLimiting',
|
||||
min: 1,
|
||||
row: 24,
|
||||
max: 1000,
|
||||
required: true,
|
||||
message: 'TPS'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'radio',
|
||||
title: '是否扩展API',
|
||||
maxlength: 200,
|
||||
id: 'extensionApi',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: [
|
||||
{
|
||||
label: '是',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
label: '否',
|
||||
id: '2'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'input',
|
||||
title: '内部bean名称',
|
||||
maxlength: 200,
|
||||
id: 'beanName',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'input',
|
||||
title: '方法名称',
|
||||
maxlength: 200,
|
||||
id: 'funName',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
} else {
|
||||
this.stepOneformRow = [
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'input',
|
||||
title: '目标地址',
|
||||
maxlength: 200,
|
||||
id: 'destinationAddress',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '请求编码',
|
||||
id: 'requestCoding',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'select',
|
||||
title: '请求方法',
|
||||
id: 'requestMethod',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'num',
|
||||
title: '超出时间',
|
||||
id: 'timeoutPeriod',
|
||||
row: 24,
|
||||
min: 1,
|
||||
max: 600000,
|
||||
maxlength: 50,
|
||||
required: true,
|
||||
message: 'ms'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'num',
|
||||
title: '限流',
|
||||
maxlength: 50,
|
||||
id: 'currentLimiting',
|
||||
min: 1,
|
||||
row: 24,
|
||||
max: 1000,
|
||||
required: true,
|
||||
message: 'TPS'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
type: 'radio',
|
||||
title: '是否扩展API',
|
||||
maxlength: 200,
|
||||
id: 'extensionApi',
|
||||
pattern: '',
|
||||
message: 'URL或协议不合法',
|
||||
row: 24,
|
||||
required: true,
|
||||
options: [
|
||||
{
|
||||
label: '是',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
label: '否',
|
||||
id: '2'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
// this.stepOneformRow[6].elCol[0].required = this.stepOneForm.extensionApi == 1
|
||||
// this.stepOneformRow[7].elCol[0].required = this.stepOneForm.extensionApi == 1
|
||||
if (JSON.parse(res.attribute.queryIn) instanceof Array) {
|
||||
this.queryTableInfo.tableData = JSON.parse(res.attribute.queryIn)
|
||||
}
|
||||
|
|
|
@ -824,7 +824,8 @@ export default {
|
|||
color: #999;
|
||||
font-size: 13px;
|
||||
display: block;
|
||||
width: 180px;
|
||||
min-width: 80px;
|
||||
max-width: 180px;
|
||||
// text-align: left;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,18 +1,30 @@
|
|||
<template>
|
||||
<div>
|
||||
<base-layout ref="baseLayout" :buttonList="buttonList" @onFuncBtn="onFuncBtn" :querySwitch="true"
|
||||
:searchBtnList="searchBtnList" :searchList="requirementList" @search="handleSearchEvent" :isPage="true"
|
||||
@pageChange="handlePageChange" @onFuncSearchBtn="onFuncSearchBtn">
|
||||
<base-layout
|
||||
ref="baseLayout"
|
||||
:buttonList="buttonList"
|
||||
@onFuncBtn="onFuncBtn"
|
||||
:querySwitch="true"
|
||||
:searchList="requirementList"
|
||||
@search="handleSearchEvent"
|
||||
:isPage="true"
|
||||
@pageChange="handlePageChange"
|
||||
>
|
||||
<div slot="main" slot-scope="{ tableHeight }">
|
||||
<base-table ref="baseTable" :showIndex="true" :funWidth="300" :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>
|
||||
<base-table
|
||||
ref="baseTable"
|
||||
:showIndex="true"
|
||||
:funWidth="180"
|
||||
:funData="funData"
|
||||
@onFunc="onFunc"
|
||||
:tabLoading.sync="tabLoading"
|
||||
:tableHeight="tableHeight"
|
||||
:tableData="tableData"
|
||||
:tableColumn="tableColumnData"
|
||||
|
||||
>
|
||||
<template #taskStatus="{row}">
|
||||
{{ taskStatusDist[row.taskStatus] }}
|
||||
</template>
|
||||
</base-table>
|
||||
</div>
|
||||
|
@ -22,341 +34,197 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
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
|
||||
import baseLayout from '@/components/base/baseLayout'
|
||||
import baseTable from '@/components/base/baseTable'
|
||||
import rightDialog from './rightDialog.vue'
|
||||
import { authApi } from '@/api/apis/auth'
|
||||
|
||||
{
|
||||
export default {
|
||||
components: {
|
||||
baseLayout,
|
||||
baseTable,
|
||||
rightDialog,
|
||||
rightDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
buttonList: [
|
||||
{
|
||||
menuName: "刷新",
|
||||
icon: "el-icon-refresh",
|
||||
btnFunction: "resetLoad",
|
||||
},
|
||||
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" },
|
||||
],
|
||||
},
|
||||
placeholder: '任务名称',
|
||||
prop: 'taskName',
|
||||
tag: 'elInput'
|
||||
}
|
||||
], //查询模板list
|
||||
tabLoading: false,
|
||||
tableColumnData: configData.tableColumnData, //表头数据
|
||||
tableColumnData: [
|
||||
{
|
||||
prop: 'taskName',
|
||||
label: '任务名称'
|
||||
},
|
||||
{
|
||||
prop: 'taskId',
|
||||
label: '任务编码'
|
||||
},
|
||||
{
|
||||
prop: 'taskStatus',
|
||||
label: '任务状态'
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '当前任务开始时间'
|
||||
},
|
||||
{
|
||||
prop: 'endTime',
|
||||
label: '结束时间'
|
||||
},
|
||||
{
|
||||
prop: 'diffTime',
|
||||
label: '耗时'
|
||||
}
|
||||
], //表头数据
|
||||
funData: [
|
||||
|
||||
{
|
||||
color: "#6a9af1",
|
||||
text: "查看",
|
||||
},
|
||||
{
|
||||
color: "#6a9af1",
|
||||
text: "重新推送",
|
||||
},
|
||||
{
|
||||
color: "#6a9af1",
|
||||
text: "手工处理",
|
||||
},
|
||||
{
|
||||
color: "#d67a74",
|
||||
text: "删除",
|
||||
},
|
||||
color: '#6a9af1',
|
||||
text: '查看'
|
||||
}
|
||||
],
|
||||
tableData: [], //表格数据
|
||||
pageModel: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100
|
||||
},
|
||||
queryModel: {
|
||||
plugin_id: '',
|
||||
root_app_bill: '',
|
||||
new_push_date: '',
|
||||
business_date: '',
|
||||
new_system_number: '',
|
||||
new_state: 'N'
|
||||
code: '',
|
||||
name: '',
|
||||
classify: '',
|
||||
productionCompany: ''
|
||||
},
|
||||
};
|
||||
taskStatusDist: {
|
||||
1: '执行中',
|
||||
2: '执行成功',
|
||||
3: '执行失败'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.baseLayout.getField("new_state", "N");
|
||||
this.queryProductClassfy();
|
||||
this.GetProductionTableData();
|
||||
// this.queryProductClassfy();
|
||||
this.GetProductionTableData()
|
||||
|
||||
},
|
||||
methods: {
|
||||
onCellClick(row) {
|
||||
this.openLoading('detail')
|
||||
this.$refs.rightDialog.openDialog('show', row)
|
||||
},
|
||||
// 表格数据
|
||||
async GetProductionTableData() {
|
||||
this.tabLoading = true;
|
||||
const res = await option({
|
||||
tl: "integration_task_living_detailsService",
|
||||
as: "integrationTaskLog",
|
||||
dj: "queryPage",
|
||||
}, {
|
||||
this.tabLoading = true
|
||||
let param = {
|
||||
...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: "integration_task_living_detailsService",
|
||||
as: "integrationTaskLog",
|
||||
dj: "batchPush",
|
||||
}, {
|
||||
id: data
|
||||
})
|
||||
if (res.status == "200") {
|
||||
this.$vmNews("批量推送成功", "success");
|
||||
this.resetTable();
|
||||
let res = await authApi(
|
||||
'integrationTaskLivingDetailsService',
|
||||
'',
|
||||
'queryEntityPage',
|
||||
'',
|
||||
param
|
||||
)
|
||||
this.tabLoading = false
|
||||
if (res.status == '200') {
|
||||
this.tableData = res.attribute.list
|
||||
this.$refs.baseLayout.setPageTotal(res.attribute.total)
|
||||
}
|
||||
},
|
||||
// 分页变化
|
||||
handlePageChange(val) {
|
||||
this.pageModel.pageNum = val.pageIndex;
|
||||
this.pageModel.pageSize = val.pageSize;
|
||||
this.GetProductionTableData();
|
||||
this.pageModel.pageNum = val.pageIndex
|
||||
this.pageModel.pageSize = val.pageSize
|
||||
this.GetProductionTableData()
|
||||
},
|
||||
// 按钮组
|
||||
onFuncBtn(btn) {
|
||||
this[btn.btnFunction]();
|
||||
},
|
||||
// 搜索按钮组
|
||||
onFuncSearchBtn(btn) {
|
||||
this[btn.btnFunction]();
|
||||
this.onCellClick()
|
||||
// this[btn.btnFunction]()
|
||||
},
|
||||
// 新增
|
||||
add() {
|
||||
this.$refs.rightDialog.openDialog("add");
|
||||
this.$refs.rightDialog.openDialog('add')
|
||||
},
|
||||
// 表格操作事件 查看 编辑 删除
|
||||
async onFunc(index, row) {
|
||||
onFunc(index, row, item) {
|
||||
// 查看
|
||||
if (index == 0) {
|
||||
this.openLoading("detail");
|
||||
this.$refs.rightDialog.openDialog("show", row);
|
||||
if (item.text === '查看') {
|
||||
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 (item.text === '编辑') {
|
||||
this.openLoading('detail')
|
||||
this.$refs.rightDialog.openDialog('edit', row)
|
||||
}
|
||||
// 删除
|
||||
if (index == 3) {
|
||||
this.$confirm("确认删除该内容吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
if (item.text === '删除') {
|
||||
this.$delConfirm().then(() => {
|
||||
this.openLoading('del')
|
||||
this.productionDeleteById(row.id)
|
||||
})
|
||||
.then(() => {
|
||||
this.openLoading("del");
|
||||
this.productionDeleteById(row.id);
|
||||
})
|
||||
.catch(() => {
|
||||
this.$vmNews("取消操作", "info");
|
||||
});
|
||||
}
|
||||
},
|
||||
async handleRePush(row) {
|
||||
const res = await option({
|
||||
tl: "integration_task_living_detailsService",
|
||||
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: "integration_task_living_detailsService",
|
||||
as: "integrationTaskLog",
|
||||
dj: "manualProcessing",
|
||||
}, val)
|
||||
if (res.status == "200") {
|
||||
this.$vmNews("手工处理成功", "success");
|
||||
this.resetTable();
|
||||
}
|
||||
},
|
||||
async productionDeleteById(id) {
|
||||
const res = await option({
|
||||
tl: "integration_task_living_detailsService",
|
||||
as: "integrationTaskLog",
|
||||
dj: "deleteEntity",
|
||||
}, {
|
||||
id
|
||||
})
|
||||
if (res.status == "200") {
|
||||
this.$vmNews("删除成功", "success");
|
||||
this.resetTable();
|
||||
let param = {
|
||||
id: id
|
||||
}
|
||||
let res = await authApi(
|
||||
'sysPlugArgService',
|
||||
'integrationTaskService',
|
||||
'deletePlugArg',
|
||||
'',
|
||||
param
|
||||
)
|
||||
if (res.status == '200') {
|
||||
this.$vmNews('删除成功', 'success')
|
||||
this.resetTable()
|
||||
}
|
||||
},
|
||||
// 重置表格
|
||||
resetTable() {
|
||||
this.pageModel.pageNum = 1;
|
||||
this.$refs.baseLayout.pageClear();
|
||||
this.GetProductionTableData();
|
||||
this.pageModel.pageNum = 1
|
||||
this.$refs.baseLayout.pageClear()
|
||||
this.GetProductionTableData()
|
||||
},
|
||||
// 搜索
|
||||
handleSearchEvent() {
|
||||
let data = this.$refs.baseLayout.ruleForm
|
||||
this.queryModel = data
|
||||
this.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.requirementList[2].options = res.attribute
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
@ -364,8 +232,4 @@ export default
|
|||
color: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::v-deep .searchBox:nth-child(6) {
|
||||
width: 250px !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,133 +1,317 @@
|
|||
<template>
|
||||
<div>
|
||||
<base-right-dialog ref="baseRightDialog" :footerShow="true" :dialogVisible.sync="dialogVisible"
|
||||
: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>
|
||||
<base-right-dialog
|
||||
ref="baseRightDialog"
|
||||
:footerShow="true"
|
||||
:dialogVisible.sync="dialogVisible"
|
||||
:title="dialogTitle + ' 集成任务日志'"
|
||||
@handleClose="handleDialogClose"
|
||||
:type="dialogType"
|
||||
:submitShow="submitShow"
|
||||
@handleConfirmClick="handleConfirmClick"
|
||||
>
|
||||
<base-form
|
||||
ref="basicsForm"
|
||||
:formRow="formRow"
|
||||
:isFunBtn="false"
|
||||
class="dialog_form"
|
||||
:spanWidth="`120px`"
|
||||
:loading="vLoading"
|
||||
@onSelect="onSelect"
|
||||
></base-form>
|
||||
<!-- <el-button-->
|
||||
<!-- style="width: 125px; margin: 20px 0"-->
|
||||
<!-- @click="addVersionDialog"-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- :disabled="submitShow ? false : true"-->
|
||||
<!-- v-if="submitShow"-->
|
||||
<!-- >添加</el-button-->
|
||||
<!-- >-->
|
||||
<!-- <base-table-->
|
||||
<!-- :border="true"-->
|
||||
<!-- :showIndex="true"-->
|
||||
<!-- :tableColumn="tableVersionColumn"-->
|
||||
<!-- :tableData="tableVersionData"-->
|
||||
<!-- :funWidth="80"-->
|
||||
<!-- :funData="funData"-->
|
||||
<!-- @onFunc="onFunc"-->
|
||||
<!-- >-->
|
||||
<!-- <template v-slot:argName="{ row }" >-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <template v-if="!submitShow">{{row.argName}}</template>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-else-->
|
||||
<!-- v-model="row.argName"-->
|
||||
<!-- clearable-->
|
||||
<!-- type="text"-->
|
||||
<!-- :disabled="!submitShow || row.disabled"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:argCode="{ row }">-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <template v-if="!submitShow">-->
|
||||
<!-- {{ row.argCode }}-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-else-->
|
||||
<!-- v-model="row.argCode"-->
|
||||
<!-- clearable-->
|
||||
<!-- type="text"-->
|
||||
<!-- :disabled="!submitShow"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:argType="{ row }">-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!--<!– <el-radio-group v-model="row.argType" :disabled="!submitShow">–>-->
|
||||
<!--<!– <el-radio label="1">字符串</el-radio>–>-->
|
||||
<!--<!– <el-radio label="2">日期</el-radio>–>-->
|
||||
<!--<!– </el-radio-group>–>-->
|
||||
<!-- <el-select v-model="row.argType" placeholder="请选择">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in options"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:remark="{ row }">-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <template v-if="!submitShow">{{row.remark}}</template>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="row.remark"-->
|
||||
<!-- clearable-->
|
||||
<!-- type="text"-->
|
||||
<!-- v-else-->
|
||||
<!-- :disabled="!submitShow"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </base-table>-->
|
||||
</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 { authApi } from '@/api/apis/auth'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
baseRightDialog,
|
||||
baseForm,
|
||||
baseTable,
|
||||
baseTable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dialogTitle: "",
|
||||
dialogType: "",
|
||||
formRow: configData.formRow,
|
||||
basicsRules: configData.basicsRules,
|
||||
dialogTitle: '',
|
||||
dialogType: '',
|
||||
formRow: [],
|
||||
basicsRules: [],
|
||||
vLoading: false,
|
||||
newMarryOptions: [],
|
||||
submitShow: true,
|
||||
loadingType: true,
|
||||
tableVersionData: [],
|
||||
tableVersionColumn: configData.tableVersionColumn,
|
||||
tableVersionColumn: [],
|
||||
funData: [],
|
||||
isEdit: false
|
||||
};
|
||||
isEdit: false,
|
||||
select_dist: {},
|
||||
options: [
|
||||
{
|
||||
label: '字符串',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '日期范围选择',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '年月',
|
||||
value: '3'
|
||||
},
|
||||
{
|
||||
label: '年月日',
|
||||
value: '4'
|
||||
},
|
||||
{
|
||||
label: '年月日时间',
|
||||
value: '5'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initSelect()
|
||||
},
|
||||
mounted() { },
|
||||
methods: {
|
||||
// 插件下拉
|
||||
async initSelect() {
|
||||
let res = await authApi(
|
||||
'pluginService',
|
||||
'plugins',
|
||||
'queryPluginsByType',
|
||||
'',
|
||||
{
|
||||
'pluginType': '1'
|
||||
}
|
||||
)
|
||||
if (res.status == 200) {
|
||||
console.log(res.attribute)
|
||||
res.attribute.forEach(item => {
|
||||
this.$set(this.select_dist, item.pluginId, item)
|
||||
})
|
||||
this.formRow[0].elCol[0].options = res.attribute
|
||||
}
|
||||
},
|
||||
//下拉改变事件
|
||||
onSelect(val, index, indexRow, obj) {
|
||||
this.$set(this.$refs.basicsForm.ruleForm, 'plugName', this.select_dist[val]['pluginName'])
|
||||
},
|
||||
openDialog(type, row) {
|
||||
// this.queryProductClassfy();
|
||||
this.formRow = configData.formRow;
|
||||
this.submitShow = true;
|
||||
this.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.id)
|
||||
}
|
||||
// 查看
|
||||
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.dialogVisible = true;
|
||||
this.submitShow = false
|
||||
this.formRow = [
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: '任务编码',
|
||||
prop: 'taskCode',
|
||||
tag: 'elInput',
|
||||
disabled: true
|
||||
},
|
||||
async productGetById(id) {
|
||||
this.openLoading("detail");
|
||||
const res = await option({
|
||||
tl: "integration_task_living_detailsService",
|
||||
as: "integrationTaskLog",
|
||||
dj: "queryEntity",
|
||||
}, {
|
||||
id
|
||||
})
|
||||
if (res.status == '200') {
|
||||
this.$refs.basicsForm.incomingParameters(res.attribute);
|
||||
{
|
||||
label: '任务名称',
|
||||
prop: 'taskName',
|
||||
tag: 'elInput',
|
||||
disabled: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: '任务状态',
|
||||
prop: 'taskStatus',
|
||||
tag: 'elRadio',
|
||||
disabled: true,
|
||||
options: [
|
||||
{
|
||||
label: '执行中',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '执行成功',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '执行失败',
|
||||
value: '3'
|
||||
}
|
||||
],
|
||||
span: 24
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: '当前任务开始时间',
|
||||
prop: 'startTime',
|
||||
tag: 'elInput',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
tag: 'elInput',
|
||||
disabled: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: '耗时',
|
||||
prop: 'diffTime',
|
||||
tag: 'elInput',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
prop: 'remark',
|
||||
tag: 'elInput',
|
||||
disabled: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
this.dialogTitle = '查看'
|
||||
this.dialogType = 'show'
|
||||
this.productGetById(row.id)
|
||||
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
// 编辑详情
|
||||
// async productGetById(id) {
|
||||
// let params = {
|
||||
// id: id,
|
||||
// };
|
||||
// let res = await authApi(
|
||||
// "sysProductService",
|
||||
// "product",
|
||||
// "queryProduct",
|
||||
// "",
|
||||
// params
|
||||
// );
|
||||
// if (res.status == "200") {
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.basicsForm.incomingParameters(res.attribute);
|
||||
async productGetById(id) {
|
||||
let params = {
|
||||
id: id
|
||||
}
|
||||
let res = await authApi(
|
||||
'integrationTaskLivingDetailsService',
|
||||
'',
|
||||
'getEntity',
|
||||
'',
|
||||
params
|
||||
)
|
||||
if (res.status == '200') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.basicsForm.incomingParameters(res.attribute)
|
||||
// this.tableVersionData = res.attribute.sysPlugArgDetailEntityList
|
||||
// let result = [];
|
||||
// if (res.attribute.sysProductVersionList.length > 0) {
|
||||
// res.attribute.sysProductVersionList.forEach((item) => {
|
||||
// let obj = {
|
||||
// id: item.id,
|
||||
// versionNumber: item.versionNumber,
|
||||
// versionDescription: item.versionDescription,
|
||||
// disabled: true
|
||||
// };
|
||||
// result.push(obj);
|
||||
// });
|
||||
// }
|
||||
// this.tableVersionData = Object.assign([], result);
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
})
|
||||
}
|
||||
},
|
||||
addVersionDialog() {
|
||||
let obj = {
|
||||
id: new Date().getTime().toString(),
|
||||
versionNumber: "",
|
||||
versionDescription: "",
|
||||
disabled: false
|
||||
};
|
||||
this.tableVersionData.push(obj);
|
||||
argName: '',
|
||||
argCode: '',
|
||||
argType: '1',
|
||||
remark: ''
|
||||
}
|
||||
this.tableVersionData.push(obj)
|
||||
},
|
||||
// 删除
|
||||
onFunc(index, row) {
|
||||
|
@ -135,99 +319,103 @@ 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 {
|
||||
if (!this.tableVersionData.length) {
|
||||
this.$vmNews('请添加列表')
|
||||
return
|
||||
}
|
||||
let flag = this.tableVersionData.some(item => {
|
||||
if (!item.argName) {
|
||||
this.$vmNews('请输入参数名称')
|
||||
return true
|
||||
}
|
||||
if (!item.argCode) {
|
||||
this.$vmNews('参数编码')
|
||||
return true
|
||||
}
|
||||
})
|
||||
if (flag) return
|
||||
let params = {
|
||||
...this.$refs.basicsForm.ruleForm,
|
||||
sysProductVersionList: [],
|
||||
};
|
||||
let result = [];
|
||||
if (this.tableVersionData.length > 0) {
|
||||
this.tableVersionData.forEach((item) => {
|
||||
let obj = {
|
||||
versionNumber: item.versionNumber,
|
||||
versionDescription: item.versionDescription,
|
||||
};
|
||||
result.push(obj);
|
||||
});
|
||||
sysPlugArgDetailEntityList: this.tableVersionData
|
||||
}
|
||||
params.sysProductVersionList = Object.assign([], result);
|
||||
if (this.dialogType == "add") {
|
||||
this.openLoading("submit");
|
||||
this.productSaveDto(params);
|
||||
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",
|
||||
"",
|
||||
'sysPlugArgService',
|
||||
'integrationTaskService',
|
||||
'savePlugArg',
|
||||
'',
|
||||
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",
|
||||
"",
|
||||
'sysPlugArgService',
|
||||
'integrationTaskService',
|
||||
'updatePlugArg',
|
||||
'',
|
||||
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">
|
||||
|
|
|
@ -193,6 +193,16 @@ export default {
|
|||
text: '查看',
|
||||
color: '#5a9cf8'
|
||||
},
|
||||
{
|
||||
type: 'start',
|
||||
text: '启用',
|
||||
color: '#5a9cf8'
|
||||
},
|
||||
{
|
||||
type: 'stop',
|
||||
text: '停用',
|
||||
color: '#e47470'
|
||||
},
|
||||
{
|
||||
type: 'dele',
|
||||
text: '删除',
|
||||
|
@ -291,13 +301,11 @@ export default {
|
|||
{}
|
||||
)
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
this.treeData = res.attribute
|
||||
this.$nextTick(() => {
|
||||
this.$refs.menuTree.clickFirst()
|
||||
})
|
||||
}
|
||||
console.log(res, '🌲')
|
||||
},
|
||||
// 树添加
|
||||
treeAppendHandle(data) {
|
||||
|
@ -323,7 +331,6 @@ export default {
|
|||
treeRemoveHandle(data) {
|
||||
this.$confirm('确认删除?')
|
||||
.then(async() => {
|
||||
console.log(1)
|
||||
const res = await getUserModuleApi(
|
||||
{
|
||||
tl: 'integrationTaskClassificationService',
|
||||
|
@ -334,7 +341,6 @@ export default {
|
|||
id: data.id //任务id
|
||||
}
|
||||
)
|
||||
console.log(res)
|
||||
if (res.status == 200) {
|
||||
this.$nextTick(() => {
|
||||
this.initTreeData()
|
||||
|
@ -365,10 +371,9 @@ export default {
|
|||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: this.pageModel.limit,
|
||||
task_app: this.appId,
|
||||
...obj,
|
||||
...obj
|
||||
}
|
||||
)
|
||||
console.log(res, 'tabledata')
|
||||
if (res.status == 200) {
|
||||
this.tableData = res.attribute.list
|
||||
this.pageModel.total = res.attribute.total
|
||||
|
@ -388,7 +393,6 @@ export default {
|
|||
},
|
||||
// 树点击事件
|
||||
homeHandleNodeClick(data) {
|
||||
console.log(data, 'data')
|
||||
this.pageModel.pageIndex = 1
|
||||
this.pageModel.total = 0
|
||||
this.pageModel.limit = 10
|
||||
|
@ -414,9 +418,7 @@ export default {
|
|||
this.$set(this.pluginDist, item.id, item.label)
|
||||
})
|
||||
this.SearchformRow[1].elCol[0].options = res.attribute
|
||||
console.log(this.SearchformRow[1].elCol[0], 'this.SearchformRow[1].elCol[0]')
|
||||
}
|
||||
console.log(res, '拿到插件列表')
|
||||
},
|
||||
// 页面
|
||||
currentChangeHandle(pageModel) {
|
||||
|
@ -426,14 +428,13 @@ export default {
|
|||
})
|
||||
},
|
||||
// 表格按钮
|
||||
tableButtonHandle(val, item) {
|
||||
async tableButtonHandle(val, item) {
|
||||
if (item.type === 'view') {
|
||||
this.$router.push({
|
||||
name: 'taskAdd',
|
||||
query: { id: val.id, lookFlag: true }
|
||||
})
|
||||
} else if (item.type === 'dele') {
|
||||
console.log(111)
|
||||
this.$confirm('确认删除?')
|
||||
.then(async() => {
|
||||
const res = await getUserModuleApi(
|
||||
|
@ -454,16 +455,33 @@ export default {
|
|||
this.pageModel.pageIndex--
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$vmNews("删除成功",'success')
|
||||
this.$vmNews('删除成功', 'success')
|
||||
this.initTableData({ ...this.searchForm })
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
} else if (item.type === 'edit') {
|
||||
this.$router.push({ name: 'taskAdd', query: { id: val.id } })
|
||||
} else if (item.type === 'start') {
|
||||
const res = await authApi('integrationTaskService', '', 'enableDisableEntity', '', {
|
||||
'id': val.id,
|
||||
'taskStatus': '1' //1、启用2、停用
|
||||
})
|
||||
if (res.status === '200') {
|
||||
this.$vmNews(res.msg, 'success')
|
||||
this.initTableData()
|
||||
}
|
||||
} else if (item.type === 'stop') {
|
||||
const res = await authApi('integrationTaskService', '', 'enableDisableEntity', '', {
|
||||
'id': val.id,
|
||||
'taskStatus': '2' //1、启用2、停用
|
||||
})
|
||||
if (res.status === '200') {
|
||||
this.$vmNews(res.msg, 'success')
|
||||
this.initTableData()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -0,0 +1,464 @@
|
|||
<template>
|
||||
<div>
|
||||
<base-right-dialog
|
||||
ref="baseRightDialog"
|
||||
:footerShow="true"
|
||||
:dialogVisible.sync="dialogVisible"
|
||||
:title="dialogTitle + ' 集成任务监控'"
|
||||
@handleClose="handleDialogClose"
|
||||
:type="dialogType"
|
||||
:submitShow="submitShow"
|
||||
@handleConfirmClick="handleConfirmClick"
|
||||
>
|
||||
<base-form
|
||||
ref="basicsForm"
|
||||
:formRow="formRow"
|
||||
:isFunBtn="false"
|
||||
class="dialog_form"
|
||||
:spanWidth="`120px`"
|
||||
:loading="vLoading"
|
||||
@onSelect="onSelect"
|
||||
></base-form>
|
||||
<!-- <el-button-->
|
||||
<!-- style="width: 125px; margin: 20px 0"-->
|
||||
<!-- @click="addVersionDialog"-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- :disabled="submitShow ? false : true"-->
|
||||
<!-- v-if="submitShow"-->
|
||||
<!-- >添加</el-button-->
|
||||
<!-- >-->
|
||||
<!-- <base-table-->
|
||||
<!-- :border="true"-->
|
||||
<!-- :showIndex="true"-->
|
||||
<!-- :tableColumn="tableVersionColumn"-->
|
||||
<!-- :tableData="tableVersionData"-->
|
||||
<!-- :funWidth="80"-->
|
||||
<!-- :funData="funData"-->
|
||||
<!-- @onFunc="onFunc"-->
|
||||
<!-- >-->
|
||||
<!-- <template v-slot:argName="{ row }" >-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <template v-if="!submitShow">{{row.argName}}</template>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-else-->
|
||||
<!-- v-model="row.argName"-->
|
||||
<!-- clearable-->
|
||||
<!-- type="text"-->
|
||||
<!-- :disabled="!submitShow || row.disabled"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:argCode="{ row }">-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <template v-if="!submitShow">-->
|
||||
<!-- {{ row.argCode }}-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-else-->
|
||||
<!-- v-model="row.argCode"-->
|
||||
<!-- clearable-->
|
||||
<!-- type="text"-->
|
||||
<!-- :disabled="!submitShow"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:argType="{ row }">-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!--<!– <el-radio-group v-model="row.argType" :disabled="!submitShow">–>-->
|
||||
<!--<!– <el-radio label="1">字符串</el-radio>–>-->
|
||||
<!--<!– <el-radio label="2">日期</el-radio>–>-->
|
||||
<!--<!– </el-radio-group>–>-->
|
||||
<!-- <el-select v-model="row.argType" placeholder="请选择">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in options"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:remark="{ row }">-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <template v-if="!submitShow">{{row.remark}}</template>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="row.remark"-->
|
||||
<!-- clearable-->
|
||||
<!-- type="text"-->
|
||||
<!-- v-else-->
|
||||
<!-- :disabled="!submitShow"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </base-table>-->
|
||||
</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 { authApi } from "@/api/apis/auth";
|
||||
export default {
|
||||
components: {
|
||||
baseRightDialog,
|
||||
baseForm,
|
||||
baseTable,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dialogTitle: "",
|
||||
dialogType: "",
|
||||
formRow: [],
|
||||
basicsRules: [],
|
||||
vLoading: false,
|
||||
newMarryOptions: [],
|
||||
submitShow: true,
|
||||
loadingType: true,
|
||||
tableVersionData: [],
|
||||
tableVersionColumn: [],
|
||||
funData: [],
|
||||
isEdit: false,
|
||||
select_dist:{},
|
||||
options:[
|
||||
{
|
||||
label:"字符串",
|
||||
value:"1"
|
||||
},
|
||||
{
|
||||
label:"日期范围选择",
|
||||
value:"2"
|
||||
},
|
||||
{
|
||||
label:"年月",
|
||||
value:"3"
|
||||
},
|
||||
{
|
||||
label:"年月日",
|
||||
value:"4"
|
||||
},
|
||||
{
|
||||
label:"年月日时间",
|
||||
value:"5"
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initSelect()
|
||||
},
|
||||
methods: {
|
||||
// 插件下拉
|
||||
async initSelect(){
|
||||
let res = await authApi(
|
||||
"pluginService",
|
||||
"plugins",
|
||||
"queryPluginsByType",
|
||||
"",
|
||||
{
|
||||
"pluginType": "1"
|
||||
}
|
||||
);
|
||||
if(res.status == 200){
|
||||
console.log(res.attribute)
|
||||
res.attribute.forEach(item=>{
|
||||
this.$set(this.select_dist,item.pluginId,item)
|
||||
})
|
||||
this.formRow[0].elCol[0].options = res.attribute
|
||||
}
|
||||
},
|
||||
//下拉改变事件
|
||||
onSelect(val, index, indexRow, obj){
|
||||
this.$set(this.$refs.basicsForm.ruleForm,'plugName',this.select_dist[val]['pluginName'])
|
||||
},
|
||||
openDialog(type, row) {
|
||||
// this.queryProductClassfy();
|
||||
this.formRow = [];
|
||||
this.submitShow = true;
|
||||
this.isEdit = false
|
||||
this.funData = [
|
||||
{
|
||||
color: "#ff0000",
|
||||
text: "删除",
|
||||
}
|
||||
]
|
||||
// 新增
|
||||
if (type == "add") {
|
||||
this.dialogTitle = "新增";
|
||||
this.dialogType = "add";
|
||||
}
|
||||
// 编辑
|
||||
if (type == "edit") {
|
||||
this.isEdit = true
|
||||
this.dialogTitle = "编辑";
|
||||
this.dialogType = "edit";
|
||||
this.productGetById(row.id);
|
||||
}
|
||||
// 查看
|
||||
if (type == "show") {
|
||||
this.funData = Object.assign([],[])
|
||||
this.submitShow = false;
|
||||
this.formRow = [
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: "任务编码",
|
||||
prop: "taskCode",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
{
|
||||
label: "任务名称",
|
||||
prop: "taskName",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: "任务状态",
|
||||
prop: "taskStatus",
|
||||
tag: "elRadio",
|
||||
disabled:true,
|
||||
options:[
|
||||
{
|
||||
label:"执行中",
|
||||
value:'1'
|
||||
},
|
||||
{
|
||||
label:"待执行",
|
||||
value:'2'
|
||||
},
|
||||
{
|
||||
label:"错误",
|
||||
value:'3'
|
||||
},
|
||||
],
|
||||
span:24,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: "上次开始时间",
|
||||
prop: "oldStartTime",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
{
|
||||
label: "当前任务开始时间",
|
||||
prop: "startTime",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: "结束时间",
|
||||
prop: "endTime",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
{
|
||||
label: "耗时",
|
||||
prop: "diffTime",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: "运行次数",
|
||||
prop: "`runNum",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
];
|
||||
this.dialogTitle = "查看";
|
||||
this.dialogType = "show";
|
||||
this.productGetById(row.id);
|
||||
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
// 编辑详情
|
||||
async productGetById(id) {
|
||||
let params = {
|
||||
id: id,
|
||||
};
|
||||
let res = await authApi(
|
||||
"integrationTaskLivingService",
|
||||
"",
|
||||
"getEntity",
|
||||
"",
|
||||
params
|
||||
);
|
||||
if (res.status == "200") {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.basicsForm.incomingParameters(res.attribute);
|
||||
// this.tableVersionData = res.attribute.sysPlugArgDetailEntityList
|
||||
// let result = [];
|
||||
// this.tableVersionData = Object.assign([], result);
|
||||
});
|
||||
}
|
||||
},
|
||||
addVersionDialog() {
|
||||
let obj = {
|
||||
argName:"",
|
||||
argCode:"",
|
||||
argType:"1",
|
||||
remark:"",
|
||||
};
|
||||
this.tableVersionData.push(obj);
|
||||
},
|
||||
// 删除
|
||||
onFunc(index, row) {
|
||||
if (index == 0) {
|
||||
this.$delConfirm().then(() => {
|
||||
this.tableVersionData.forEach((item, itemIndex) => {
|
||||
if (item.id === row.id) {
|
||||
this.tableVersionData.splice(itemIndex, 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
// 弹窗关闭
|
||||
handleDialogClose() {
|
||||
this.tableVersionData = Object.assign([], []);
|
||||
this.$refs.basicsForm.resetFields();
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
// 弹窗确认按钮
|
||||
handleConfirmClick() {
|
||||
this.$refs.basicsForm.$refs["ruleForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return;
|
||||
} else {
|
||||
if(!this.tableVersionData.length){
|
||||
this.$vmNews("请添加列表")
|
||||
return
|
||||
}
|
||||
let flag = this.tableVersionData.some(item=>{
|
||||
if(!item.argName){
|
||||
this.$vmNews("请输入参数名称")
|
||||
return true
|
||||
}
|
||||
if(!item.argCode){
|
||||
this.$vmNews("参数编码")
|
||||
return true
|
||||
}
|
||||
})
|
||||
if(flag) return
|
||||
let params = {
|
||||
...this.$refs.basicsForm.ruleForm,
|
||||
sysPlugArgDetailEntityList: this.tableVersionData,
|
||||
};
|
||||
if (this.dialogType == "add") {
|
||||
this.openLoading("submit");
|
||||
this.productSaveDto(params);
|
||||
}
|
||||
if (this.dialogType == "edit") {
|
||||
this.openLoading("submit");
|
||||
this.productUpdateDto(params);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增保存
|
||||
async productSaveDto(params) {
|
||||
let res = await authApi(
|
||||
"sysPlugArgService",
|
||||
"integrationTaskService",
|
||||
"savePlugArg",
|
||||
"",
|
||||
params
|
||||
);
|
||||
if (res.status == "200") {
|
||||
this.handleDialogClose();
|
||||
this.$vmNews("新增成功", "success");
|
||||
this.$emit("resetTable");
|
||||
}
|
||||
},
|
||||
// 编辑保存
|
||||
async productUpdateDto(params) {
|
||||
let res = await authApi(
|
||||
"sysPlugArgService",
|
||||
"integrationTaskService",
|
||||
"updatePlugArg",
|
||||
"",
|
||||
params
|
||||
);
|
||||
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;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialogList {
|
||||
padding: 16px 0;
|
||||
border-top: 1px solid #dcdfe6;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.updateBtn {
|
||||
border: 1px solid #ebedf1;
|
||||
padding: 5px 0;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.updateBtn:hover {
|
||||
color: #1890ff;
|
||||
border-color: #badeff;
|
||||
background-color: #e8f4ff;
|
||||
}
|
||||
|
||||
::v-deep .el-table__body-wrapper.is-scrolling-none {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
::v-deep .app-container {
|
||||
height: auto !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,464 @@
|
|||
<template>
|
||||
<div>
|
||||
<base-right-dialog
|
||||
ref="baseRightDialog"
|
||||
:footerShow="true"
|
||||
:dialogVisible.sync="dialogVisible"
|
||||
:title="dialogTitle + ' 集成任务监控'"
|
||||
@handleClose="handleDialogClose"
|
||||
:type="dialogType"
|
||||
:submitShow="submitShow"
|
||||
@handleConfirmClick="handleConfirmClick"
|
||||
>
|
||||
<base-form
|
||||
ref="basicsForm"
|
||||
:formRow="formRow"
|
||||
:isFunBtn="false"
|
||||
class="dialog_form"
|
||||
:spanWidth="`120px`"
|
||||
:loading="vLoading"
|
||||
@onSelect="onSelect"
|
||||
></base-form>
|
||||
<!-- <el-button-->
|
||||
<!-- style="width: 125px; margin: 20px 0"-->
|
||||
<!-- @click="addVersionDialog"-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- :disabled="submitShow ? false : true"-->
|
||||
<!-- v-if="submitShow"-->
|
||||
<!-- >添加</el-button-->
|
||||
<!-- >-->
|
||||
<!-- <base-table-->
|
||||
<!-- :border="true"-->
|
||||
<!-- :showIndex="true"-->
|
||||
<!-- :tableColumn="tableVersionColumn"-->
|
||||
<!-- :tableData="tableVersionData"-->
|
||||
<!-- :funWidth="80"-->
|
||||
<!-- :funData="funData"-->
|
||||
<!-- @onFunc="onFunc"-->
|
||||
<!-- >-->
|
||||
<!-- <template v-slot:argName="{ row }" >-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <template v-if="!submitShow">{{row.argName}}</template>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-else-->
|
||||
<!-- v-model="row.argName"-->
|
||||
<!-- clearable-->
|
||||
<!-- type="text"-->
|
||||
<!-- :disabled="!submitShow || row.disabled"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:argCode="{ row }">-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <template v-if="!submitShow">-->
|
||||
<!-- {{ row.argCode }}-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-else-->
|
||||
<!-- v-model="row.argCode"-->
|
||||
<!-- clearable-->
|
||||
<!-- type="text"-->
|
||||
<!-- :disabled="!submitShow"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:argType="{ row }">-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!--<!– <el-radio-group v-model="row.argType" :disabled="!submitShow">–>-->
|
||||
<!--<!– <el-radio label="1">字符串</el-radio>–>-->
|
||||
<!--<!– <el-radio label="2">日期</el-radio>–>-->
|
||||
<!--<!– </el-radio-group>–>-->
|
||||
<!-- <el-select v-model="row.argType" placeholder="请选择">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in options"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:remark="{ row }">-->
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <template v-if="!submitShow">{{row.remark}}</template>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="row.remark"-->
|
||||
<!-- clearable-->
|
||||
<!-- type="text"-->
|
||||
<!-- v-else-->
|
||||
<!-- :disabled="!submitShow"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </base-table>-->
|
||||
</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 { authApi } from "@/api/apis/auth";
|
||||
export default {
|
||||
components: {
|
||||
baseRightDialog,
|
||||
baseForm,
|
||||
baseTable,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dialogTitle: "",
|
||||
dialogType: "",
|
||||
formRow: [],
|
||||
basicsRules: [],
|
||||
vLoading: false,
|
||||
newMarryOptions: [],
|
||||
submitShow: true,
|
||||
loadingType: true,
|
||||
tableVersionData: [],
|
||||
tableVersionColumn: [],
|
||||
funData: [],
|
||||
isEdit: false,
|
||||
select_dist:{},
|
||||
options:[
|
||||
{
|
||||
label:"字符串",
|
||||
value:"1"
|
||||
},
|
||||
{
|
||||
label:"日期范围选择",
|
||||
value:"2"
|
||||
},
|
||||
{
|
||||
label:"年月",
|
||||
value:"3"
|
||||
},
|
||||
{
|
||||
label:"年月日",
|
||||
value:"4"
|
||||
},
|
||||
{
|
||||
label:"年月日时间",
|
||||
value:"5"
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initSelect()
|
||||
},
|
||||
methods: {
|
||||
// 插件下拉
|
||||
async initSelect(){
|
||||
let res = await authApi(
|
||||
"pluginService",
|
||||
"plugins",
|
||||
"queryPluginsByType",
|
||||
"",
|
||||
{
|
||||
"pluginType": "1"
|
||||
}
|
||||
);
|
||||
if(res.status == 200){
|
||||
console.log(res.attribute)
|
||||
res.attribute.forEach(item=>{
|
||||
this.$set(this.select_dist,item.pluginId,item)
|
||||
})
|
||||
this.formRow[0].elCol[0].options = res.attribute
|
||||
}
|
||||
},
|
||||
//下拉改变事件
|
||||
onSelect(val, index, indexRow, obj){
|
||||
this.$set(this.$refs.basicsForm.ruleForm,'plugName',this.select_dist[val]['pluginName'])
|
||||
},
|
||||
openDialog(type, row) {
|
||||
// this.queryProductClassfy();
|
||||
this.formRow = [];
|
||||
this.submitShow = true;
|
||||
this.isEdit = false
|
||||
this.funData = [
|
||||
{
|
||||
color: "#ff0000",
|
||||
text: "删除",
|
||||
}
|
||||
]
|
||||
// 新增
|
||||
if (type == "add") {
|
||||
this.dialogTitle = "新增";
|
||||
this.dialogType = "add";
|
||||
}
|
||||
// 编辑
|
||||
if (type == "edit") {
|
||||
this.isEdit = true
|
||||
this.dialogTitle = "编辑";
|
||||
this.dialogType = "edit";
|
||||
this.productGetById(row.id);
|
||||
}
|
||||
// 查看
|
||||
if (type == "show") {
|
||||
this.funData = Object.assign([],[])
|
||||
this.submitShow = false;
|
||||
this.formRow = [
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: "任务编码",
|
||||
prop: "taskCode",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
{
|
||||
label: "任务名称",
|
||||
prop: "taskName",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: "任务状态",
|
||||
prop: "taskStatus",
|
||||
tag: "elRadio",
|
||||
disabled:true,
|
||||
options:[
|
||||
{
|
||||
label:"执行中",
|
||||
value:'1'
|
||||
},
|
||||
{
|
||||
label:"待执行",
|
||||
value:'2'
|
||||
},
|
||||
{
|
||||
label:"错误",
|
||||
value:'3'
|
||||
},
|
||||
],
|
||||
span:24,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: "上次开始时间",
|
||||
prop: "oldStartTime",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
{
|
||||
label: "当前任务开始时间",
|
||||
prop: "startTime",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: "结束时间",
|
||||
prop: "endTime",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
{
|
||||
label: "耗时",
|
||||
prop: "diffTime",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
elCol: [
|
||||
{
|
||||
label: "运行次数",
|
||||
prop: "`runNum",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
];
|
||||
this.dialogTitle = "查看";
|
||||
this.dialogType = "show";
|
||||
this.productGetById(row.id);
|
||||
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
// 编辑详情
|
||||
async productGetById(id) {
|
||||
let params = {
|
||||
id: id,
|
||||
};
|
||||
let res = await authApi(
|
||||
"integrationTaskLivingService",
|
||||
"",
|
||||
"getEntity",
|
||||
"",
|
||||
params
|
||||
);
|
||||
if (res.status == "200") {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.basicsForm.incomingParameters(res.attribute);
|
||||
// this.tableVersionData = res.attribute.sysPlugArgDetailEntityList
|
||||
// let result = [];
|
||||
// this.tableVersionData = Object.assign([], result);
|
||||
});
|
||||
}
|
||||
},
|
||||
addVersionDialog() {
|
||||
let obj = {
|
||||
argName:"",
|
||||
argCode:"",
|
||||
argType:"1",
|
||||
remark:"",
|
||||
};
|
||||
this.tableVersionData.push(obj);
|
||||
},
|
||||
// 删除
|
||||
onFunc(index, row) {
|
||||
if (index == 0) {
|
||||
this.$delConfirm().then(() => {
|
||||
this.tableVersionData.forEach((item, itemIndex) => {
|
||||
if (item.id === row.id) {
|
||||
this.tableVersionData.splice(itemIndex, 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
// 弹窗关闭
|
||||
handleDialogClose() {
|
||||
this.tableVersionData = Object.assign([], []);
|
||||
this.$refs.basicsForm.resetFields();
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
// 弹窗确认按钮
|
||||
handleConfirmClick() {
|
||||
this.$refs.basicsForm.$refs["ruleForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return;
|
||||
} else {
|
||||
if(!this.tableVersionData.length){
|
||||
this.$vmNews("请添加列表")
|
||||
return
|
||||
}
|
||||
let flag = this.tableVersionData.some(item=>{
|
||||
if(!item.argName){
|
||||
this.$vmNews("请输入参数名称")
|
||||
return true
|
||||
}
|
||||
if(!item.argCode){
|
||||
this.$vmNews("参数编码")
|
||||
return true
|
||||
}
|
||||
})
|
||||
if(flag) return
|
||||
let params = {
|
||||
...this.$refs.basicsForm.ruleForm,
|
||||
sysPlugArgDetailEntityList: this.tableVersionData,
|
||||
};
|
||||
if (this.dialogType == "add") {
|
||||
this.openLoading("submit");
|
||||
this.productSaveDto(params);
|
||||
}
|
||||
if (this.dialogType == "edit") {
|
||||
this.openLoading("submit");
|
||||
this.productUpdateDto(params);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增保存
|
||||
async productSaveDto(params) {
|
||||
let res = await authApi(
|
||||
"sysPlugArgService",
|
||||
"integrationTaskService",
|
||||
"savePlugArg",
|
||||
"",
|
||||
params
|
||||
);
|
||||
if (res.status == "200") {
|
||||
this.handleDialogClose();
|
||||
this.$vmNews("新增成功", "success");
|
||||
this.$emit("resetTable");
|
||||
}
|
||||
},
|
||||
// 编辑保存
|
||||
async productUpdateDto(params) {
|
||||
let res = await authApi(
|
||||
"sysPlugArgService",
|
||||
"integrationTaskService",
|
||||
"updatePlugArg",
|
||||
"",
|
||||
params
|
||||
);
|
||||
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;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialogList {
|
||||
padding: 16px 0;
|
||||
border-top: 1px solid #dcdfe6;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.updateBtn {
|
||||
border: 1px solid #ebedf1;
|
||||
padding: 5px 0;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.updateBtn:hover {
|
||||
color: #1890ff;
|
||||
border-color: #badeff;
|
||||
background-color: #e8f4ff;
|
||||
}
|
||||
|
||||
::v-deep .el-table__body-wrapper.is-scrolling-none {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
::v-deep .app-container {
|
||||
height: auto !important;
|
||||
}
|
||||
</style>
|
|
@ -1,365 +1,234 @@
|
|||
<template>
|
||||
<div class="monitoring">
|
||||
<header>
|
||||
<div class="left">
|
||||
<div class="title">
|
||||
<h1>后台任务监控</h1>
|
||||
</div>
|
||||
<div class="search">
|
||||
<el-input
|
||||
placeholder="任务名称"
|
||||
v-model="searchForm.task_name"
|
||||
@keyup.enter.native="submitsearchForm"
|
||||
<div>
|
||||
<base-layout
|
||||
ref="baseLayout"
|
||||
:buttonList="buttonList"
|
||||
@onFuncBtn="onFuncBtn"
|
||||
:querySwitch="true"
|
||||
:searchList="requirementList"
|
||||
@search="handleSearchEvent"
|
||||
:isPage="true"
|
||||
@pageChange="handlePageChange"
|
||||
>
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<el-button type="primary" @click="monPush" :loading="pushLoading"
|
||||
>输出</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
:loading="refreshLoading"
|
||||
@click="initMainTableData(searchForm)"
|
||||
circle
|
||||
></el-button>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<BaseTable
|
||||
ref="mainTable"
|
||||
:tableData="tableData"
|
||||
:tableColumn="tableColumn"
|
||||
:funData="funData"
|
||||
:funWidth="funWidth"
|
||||
<div slot="main" slot-scope="{ tableHeight }">
|
||||
<base-table
|
||||
ref="baseTable"
|
||||
:showIndex="true"
|
||||
:tabLoading="mainTabLoading"
|
||||
@onFunc="tableButtonHandle"
|
||||
:tableHeight="'70vh'"
|
||||
:border="false"
|
||||
:funWidth="180"
|
||||
:funData="funData"
|
||||
@onFunc="onFunc"
|
||||
:tabLoading.sync="tabLoading"
|
||||
:tableHeight="tableHeight"
|
||||
:tableData="tableData"
|
||||
:tableColumn="tableColumnData"
|
||||
>
|
||||
<template v-slot:sts="{ row }">
|
||||
<div>{{ stsDict[row.sts] }}</div>
|
||||
<template #taskStatus="{row}">
|
||||
{{ taskStatusDist[row.taskStatus] }}
|
||||
</template>
|
||||
<template v-slot:task_tag="{ row }">
|
||||
<baseNewSelect
|
||||
v-model="row.task_tag"
|
||||
:searchApiInfo="task_tag_apiInfo.searchApiInfo"
|
||||
:searchKey="task_tag_apiInfo.searchKey"
|
||||
:prop="task_tag_apiInfo.prop"
|
||||
:lookflag="true"
|
||||
></baseNewSelect>
|
||||
</template>
|
||||
<template v-slot:diff_time="{ row }">
|
||||
<div>{{ getTimeHandler(row.diff_time) }}</div>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</main>
|
||||
<footer>
|
||||
<basePage
|
||||
:pageModel="pageModel"
|
||||
@update:pageModel="currentChangeHandle"
|
||||
></basePage>
|
||||
</footer>
|
||||
</base-table>
|
||||
</div>
|
||||
</base-layout>
|
||||
<right-dialog ref="rightDialog" @resetTable="resetTable"></right-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basePage from "./compoments/basePage.vue";
|
||||
import BaseTable from "./compoments/baseTable.vue";
|
||||
import { getApiModuleApi, getExcelApi } from "@/api/apiChunks/index.js";
|
||||
import baseNewSelect from "./compoments/baseNewSelect.vue";
|
||||
import baseLayout from '@/components/base/baseLayout'
|
||||
import baseTable from '@/components/base/baseTable'
|
||||
import rightDialog from './monRightDialog.vue'
|
||||
import { authApi } from '@/api/apis/auth'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
baseLayout,
|
||||
baseTable,
|
||||
rightDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
refreshLoading: false,
|
||||
pushLoading: false,
|
||||
task_tag_apiInfo: {
|
||||
searchApiInfo: {
|
||||
tl: "apiReflectionService",
|
||||
as: "sys_api_reflectionService",
|
||||
dj: "queryOneById",
|
||||
buttonList: [
|
||||
{
|
||||
menuName: '刷新',
|
||||
icon: 'el-icon-refresh',
|
||||
btnFunction: 'resetLoad'
|
||||
}
|
||||
], //按钮组
|
||||
requirementList: [
|
||||
{
|
||||
placeholder: '任务名称',
|
||||
prop: 'taskName',
|
||||
tag: 'elInput'
|
||||
},
|
||||
searchKey: "id",
|
||||
prop: {
|
||||
id: "id",
|
||||
label: "ref_name",
|
||||
], //查询模板list
|
||||
tabLoading: false,
|
||||
tableColumnData: [
|
||||
{
|
||||
prop: 'taskName',
|
||||
label: '任务名称'
|
||||
},
|
||||
{
|
||||
prop: 'taskId',
|
||||
label: '任务编码'
|
||||
},
|
||||
stsDict: {
|
||||
Y: "正常",
|
||||
N: "不正常",
|
||||
{
|
||||
prop: 'taskStatus',
|
||||
label: '任务状态'
|
||||
},
|
||||
searchForm: {
|
||||
task_name: "",
|
||||
{
|
||||
prop: 'oldStartTime',
|
||||
label: '上次开始时间'
|
||||
},
|
||||
mainTabLoading: false,
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '当前任务开始时间'
|
||||
},
|
||||
{
|
||||
prop: 'runNum',
|
||||
label: '运行次数'
|
||||
}
|
||||
], //表头数据
|
||||
funData: [
|
||||
|
||||
{
|
||||
type: "execute",
|
||||
text: "执行",
|
||||
color: "#5a9cf8",
|
||||
},
|
||||
{
|
||||
type: "hang_up",
|
||||
text: "挂起",
|
||||
color: "#5a9cf8",
|
||||
},
|
||||
{
|
||||
type: "dele",
|
||||
text: "删除",
|
||||
color: "#e47470",
|
||||
color: '#6a9af1',
|
||||
text: '查看'
|
||||
},
|
||||
],
|
||||
tableColumn: [
|
||||
{
|
||||
id: "task_name",
|
||||
title: "任务名称",
|
||||
},
|
||||
{
|
||||
id: "task_tag",
|
||||
title: "任务场景",
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
id: "task_classes",
|
||||
title: "类型",
|
||||
},
|
||||
{
|
||||
id: "org_id",
|
||||
title: "部署公司",
|
||||
},
|
||||
{
|
||||
id: "sts",
|
||||
title: "状态",
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
id: "plan_time",
|
||||
title: "计划时间",
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
id: "diff_time",
|
||||
title: "上次耗时",
|
||||
},
|
||||
{
|
||||
id: "run_num",
|
||||
title: "运行次数",
|
||||
},
|
||||
{
|
||||
id: "server_name",
|
||||
title: "服务器",
|
||||
tooltip: true,
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
tableData: [], //表格数据
|
||||
pageModel: {
|
||||
pageIndex: 1,
|
||||
total: 10,
|
||||
limit: 10,
|
||||
pageNum: 1,
|
||||
pageSize: 100
|
||||
},
|
||||
};
|
||||
queryModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
classify: '',
|
||||
productionCompany: ''
|
||||
},
|
||||
taskStatusDist: {
|
||||
1: '执行中',
|
||||
2: '待执行',
|
||||
3: '错误'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.queryProductClassfy();
|
||||
this.GetProductionTableData()
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 时间处理
|
||||
getTimeHandler(time) {
|
||||
var days = parseInt(time / (1000 * 60 * 60 * 24));
|
||||
var hours = parseInt((time % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
var minutes = parseInt((time % (1000 * 60 * 60)) / (1000 * 60));
|
||||
var seconds = (time % (1000 * 60)) / 1000;
|
||||
return days + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒";
|
||||
onCellClick(row) {
|
||||
this.openLoading('detail')
|
||||
this.$refs.rightDialog.openDialog('show', row)
|
||||
},
|
||||
// 执行与挂起
|
||||
async executeHandle(obj) {
|
||||
const res = await getApiModuleApi(
|
||||
{
|
||||
tl: "integrationTaskMonitoringService",
|
||||
as: "integrationTaskMonitoring",
|
||||
dj: "updateTaskMonitoringCarryAndHang",
|
||||
},
|
||||
obj
|
||||
);
|
||||
if (res.status == 200) {
|
||||
this.$nextTick(() => {
|
||||
this.initMainTableData(this.searchForm);
|
||||
});
|
||||
return true;
|
||||
// 表格数据
|
||||
async GetProductionTableData() {
|
||||
this.tabLoading = true
|
||||
let param = {
|
||||
...this.pageModel,
|
||||
...this.queryModel
|
||||
}
|
||||
let res = await authApi(
|
||||
'integrationTaskLivingService',
|
||||
'',
|
||||
'queryEntityPage',
|
||||
'',
|
||||
param
|
||||
)
|
||||
this.tabLoading = false
|
||||
if (res.status == '200') {
|
||||
this.tableData = res.attribute.list
|
||||
this.$refs.baseLayout.setPageTotal(res.attribute.total)
|
||||
}
|
||||
},
|
||||
// 输出excel
|
||||
async monPush() {
|
||||
this.pushLoading = true;
|
||||
const res = await getExcelApi(
|
||||
{
|
||||
tl: "integrationTaskMonitoringService",
|
||||
as: "integrationTaskMonitoring",
|
||||
dj: "queryMonitoringExportation",
|
||||
// 分页变化
|
||||
handlePageChange(val) {
|
||||
this.pageModel.pageNum = val.pageIndex
|
||||
this.pageModel.pageSize = val.pageSize
|
||||
this.GetProductionTableData()
|
||||
},
|
||||
{
|
||||
task_name: this.searchForm.task_name,
|
||||
}
|
||||
);
|
||||
this.pushLoading = false;
|
||||
if (!res) {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "下载失败!",
|
||||
});
|
||||
} else {
|
||||
let url = window.URL.createObjectURL(
|
||||
new Blob([res], { type: "application/vnd.ms-excel" })
|
||||
);
|
||||
let fileName = "后台任务监控";
|
||||
let link = document.createElement("a");
|
||||
link.style.display = "none";
|
||||
link.href = url;
|
||||
link.setAttribute("download", fileName + ".xlsx");
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
window.URL.revokeObjectURL(url);
|
||||
}
|
||||
// 按钮组
|
||||
onFuncBtn(btn) {
|
||||
this.onCellClick()
|
||||
// this[btn.btnFunction]()
|
||||
},
|
||||
// 初始化表单
|
||||
async initMainTableData(obj = {}) {
|
||||
this.refreshLoading = true;
|
||||
const res = await getApiModuleApi(
|
||||
{
|
||||
tl: "integrationTaskMonitoringService",
|
||||
as: "integrationTaskMonitoring",
|
||||
dj: "queryListJson",
|
||||
// 新增
|
||||
add() {
|
||||
this.$refs.rightDialog.openDialog('add')
|
||||
},
|
||||
{
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: this.pageModel.limit,
|
||||
...obj,
|
||||
// 表格操作事件 查看 编辑 删除
|
||||
onFunc(index, row, item) {
|
||||
// 查看
|
||||
if (item.text === '查看') {
|
||||
this.openLoading('detail')
|
||||
this.$refs.rightDialog.openDialog('show', row)
|
||||
}
|
||||
);
|
||||
this.refreshLoading = false;
|
||||
if (res.status == 200) {
|
||||
this.tableData = res.attribute;
|
||||
}
|
||||
},
|
||||
// 表单搜索回车
|
||||
submitsearchForm() {
|
||||
this.initMainTableData(this.searchForm);
|
||||
},
|
||||
// 表格操作
|
||||
tableButtonHandle(val, item) {
|
||||
if (item.type === "execute") {
|
||||
let obj = {
|
||||
type: "1",
|
||||
};
|
||||
obj["task_id"] = val.task_id;
|
||||
obj["task_code"] = val.task_code;
|
||||
obj["task_name"] = val.task_name;
|
||||
this.executeHandle(obj).then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "执行成功!",
|
||||
});
|
||||
});
|
||||
} else if (item.type == "dele") {
|
||||
this.$confirm("确认删除?")
|
||||
.then(async () => {
|
||||
console.log(111);
|
||||
const res = await getApiModuleApi(
|
||||
{
|
||||
tl: "integrationTaskMonitoringService",
|
||||
as: "integrationTaskMonitoring",
|
||||
dj: "updateTaskMonitoringSts",
|
||||
},
|
||||
{ task_id: val.task_id }
|
||||
);
|
||||
console.log(res);
|
||||
if (res.status == 200) {
|
||||
if (
|
||||
this.pageModel.total + this.pageModel.limit - 1 <=
|
||||
this.pageModel.pageIndex * this.pageModel.limit
|
||||
) {
|
||||
this.pageModel.pageIndex--;
|
||||
}
|
||||
console.log("删除");
|
||||
this.$nextTick(() => {
|
||||
this.initMainTableData(this.searchForm);
|
||||
});
|
||||
// 编辑
|
||||
if (item.text === '编辑') {
|
||||
this.openLoading('detail')
|
||||
this.$refs.rightDialog.openDialog('edit', row)
|
||||
}
|
||||
// 删除
|
||||
if (item.text === '删除') {
|
||||
this.$delConfirm().then(() => {
|
||||
this.openLoading('del')
|
||||
this.productionDeleteById(row.id)
|
||||
})
|
||||
.catch(() => {});
|
||||
} else if (item.type === "hang_up") {
|
||||
let obj = {
|
||||
type: "2",
|
||||
};
|
||||
obj["task_id"] = val.task_id;
|
||||
obj["task_code"] = val.task_code;
|
||||
obj["task_name"] = val.task_name;
|
||||
this.executeHandle(obj).then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "挂起成功!",
|
||||
});
|
||||
});
|
||||
} else if (item.type === "view") {
|
||||
this.$router.push({
|
||||
name: "sceneAdd",
|
||||
query: { id: val.id, lookFlag: true },
|
||||
});
|
||||
}
|
||||
},
|
||||
currentChangeHandle(pageModel) {
|
||||
this.pageModel = pageModel;
|
||||
this.$nextTick(() => {
|
||||
this.initMainTableData(this.searchForm);
|
||||
});
|
||||
async productionDeleteById(id) {
|
||||
let param = {
|
||||
id: id
|
||||
}
|
||||
let res = await authApi(
|
||||
'sysPlugArgService',
|
||||
'integrationTaskService',
|
||||
'deletePlugArg',
|
||||
'',
|
||||
param
|
||||
)
|
||||
if (res.status == '200') {
|
||||
this.$vmNews('删除成功', 'success')
|
||||
this.resetTable()
|
||||
}
|
||||
},
|
||||
// 重置表格
|
||||
resetTable() {
|
||||
this.pageModel.pageNum = 1
|
||||
this.$refs.baseLayout.pageClear()
|
||||
this.GetProductionTableData()
|
||||
},
|
||||
computed: {
|
||||
// 操作框的宽度
|
||||
funWidth() {
|
||||
return this.funData.length * 70;
|
||||
// 搜索
|
||||
handleSearchEvent() {
|
||||
let data = this.$refs.baseLayout.ruleForm
|
||||
this.queryModel = data
|
||||
this.resetTable()
|
||||
},
|
||||
},
|
||||
components: {
|
||||
BaseTable,
|
||||
basePage,
|
||||
baseNewSelect,
|
||||
},
|
||||
created() {
|
||||
this.initMainTableData();
|
||||
},
|
||||
};
|
||||
// 获取所有产品分类
|
||||
async queryProductClassfy() {
|
||||
let params = {
|
||||
tab_name: 'sys_product',
|
||||
column_name: 'classify'
|
||||
}
|
||||
let res = await authApi(
|
||||
'generalServiceImpl',
|
||||
'dictionaryshop',
|
||||
'selectDictionaryshop',
|
||||
'',
|
||||
params
|
||||
)
|
||||
if (res.status == '200') {
|
||||
this.requirementList[2].options = res.attribute
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang='scss'>
|
||||
.monitoring {
|
||||
width: 100%;
|
||||
header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
background-color: #fff;
|
||||
border-radius: 20px;
|
||||
|
||||
.left {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
.search {
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
main {
|
||||
padding: 20px;
|
||||
height: 75vh;
|
||||
border-radius: 20px;
|
||||
background-color: #fff;
|
||||
}
|
||||
footer {
|
||||
margin-top: 20px;
|
||||
}
|
||||
<style scoped>
|
||||
.clickTitle {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
|
@ -113,7 +113,8 @@ export default {
|
|||
title: '任务名称',
|
||||
id: 'taskName',
|
||||
row: 8,
|
||||
required: true
|
||||
required: true,
|
||||
disabled: false,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
|
@ -671,6 +672,8 @@ export default {
|
|||
)
|
||||
if (res.status == 200) {
|
||||
this.ruleForm = res.attribute
|
||||
console.log(res)
|
||||
this.formRow[0].elCol[1].disabled = true
|
||||
const res2 = await authApi('sysApplicationPluginService', '', 'queryEntity', '', {
|
||||
appId: res.attribute.taskApp
|
||||
})
|
||||
|
@ -707,6 +710,10 @@ export default {
|
|||
},
|
||||
// 表单验证成功后
|
||||
async onSubmitHandle() {
|
||||
if (!this.ruleForm.taskCron) {
|
||||
this.$vmNews('请编辑发生时间选择任务策略')
|
||||
return
|
||||
}
|
||||
this.commitLoading = true
|
||||
let obj = { ...this.ruleForm }
|
||||
if (!this.$route.query.id) {
|
||||
|
@ -722,7 +729,7 @@ export default {
|
|||
if (res.status == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '保存成功!'
|
||||
message: res.msg
|
||||
})
|
||||
this.$router.back()
|
||||
//面包屑删除
|
||||
|
|
|
@ -106,10 +106,7 @@ export default {
|
|||
},
|
||||
// 操作按钮事件
|
||||
getFuncBtn(btnEven) {
|
||||
if (!this.delId) {
|
||||
this.$vmNews('请选择处理的信息')
|
||||
return
|
||||
}
|
||||
|
||||
if (btnEven.menuName == '新增根节点') {
|
||||
let newRuleForm = {
|
||||
parentMenuName: "",
|
||||
|
@ -121,6 +118,10 @@ export default {
|
|||
})
|
||||
}
|
||||
if (btnEven.menuName == '新增子节点') {
|
||||
if (!this.delId) {
|
||||
this.$vmNews('请选择处理的信息')
|
||||
return
|
||||
}
|
||||
let newRuleForm = {
|
||||
parentMenuName: this.ruleForm.menuName,
|
||||
parentMenuId: this.ruleForm.id
|
||||
|
|
Loading…
Reference in New Issue