修改请求名称
This commit is contained in:
parent
ad44239d16
commit
e363d59d82
|
@ -4,7 +4,7 @@ import request from '@/utils/request'
|
|||
// 动态模版请求
|
||||
export function getApiModuleApi(obj, data = {}) {
|
||||
return request({
|
||||
url: 'kangarooDataCenterV3/entranceController/option',
|
||||
url: 'kangarooDataCenter/entranceController/option',
|
||||
method: 'post',
|
||||
headers: obj,
|
||||
data
|
||||
|
@ -12,7 +12,7 @@ export function getApiModuleApi(obj, data = {}) {
|
|||
}
|
||||
export function getApiResultApi(data = {}) {
|
||||
return request({
|
||||
url: 'kangarooDataCenterV3/entranceController/option ',
|
||||
url: 'kangarooDataCenter/entranceController/option ',
|
||||
method: 'post',
|
||||
headers: {
|
||||
tl: "appApiService",
|
||||
|
@ -24,7 +24,7 @@ export function getApiResultApi(data = {}) {
|
|||
}
|
||||
export function getExcelApi(obj, data = {}) {
|
||||
return request({
|
||||
url: 'kangarooDataCenterV3/entranceController/option ',
|
||||
url: 'kangarooDataCenter/entranceController/option ',
|
||||
method: 'post',
|
||||
responseType: "blob",
|
||||
headers: obj,
|
||||
|
|
|
@ -2,7 +2,7 @@ import request from "@/utils/request";
|
|||
|
||||
export function authApi(tl,as,dj,url = '',data){
|
||||
return request({
|
||||
url: 'kangarooDataCenterV3/entranceController/option' + url,
|
||||
url: 'kangarooDataCenter/entranceController/option' + url,
|
||||
headers: {
|
||||
tl:tl,
|
||||
as:as,
|
||||
|
|
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||
// 获取全部插件列表
|
||||
export function option(obj, data = {}) {
|
||||
return request({
|
||||
url: 'kangarooDataCenterV3/entranceController/option',
|
||||
url: 'kangarooDataCenter/entranceController/option',
|
||||
method: 'post',
|
||||
headers: obj,
|
||||
data
|
||||
|
|
|
@ -6,7 +6,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function login(obj) {
|
||||
return request({
|
||||
url: 'kangarooDataCenterV3/entranceController/option',
|
||||
url: 'kangarooDataCenter/entranceController/option',
|
||||
headers: {
|
||||
isToken: false,
|
||||
tl:obj.tl,
|
||||
|
|
|
@ -3,7 +3,7 @@ import request from "@/utils/request";
|
|||
|
||||
export function uploadLogo(data) {
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileUpload",
|
||||
url: "/kangarooDataCenter/entranceController/fileUpload",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
|
@ -11,7 +11,7 @@ export function uploadLogo(data) {
|
|||
//下载
|
||||
export function downloadLogo(id) {
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + id,
|
||||
url: "/kangarooDataCenter/entranceController/fileDownloadNew?id=" + id,
|
||||
method: "get",
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||
|
||||
export function getUserModuleApi(obj, data = {}) {
|
||||
return request({
|
||||
url: 'kangarooDataCenterV3/entranceController/option',
|
||||
url: 'kangarooDataCenter/entranceController/option',
|
||||
method: 'post',
|
||||
headers: obj,
|
||||
data
|
||||
|
|
|
@ -9,11 +9,9 @@ export function login(login_name, password) {
|
|||
const data = {
|
||||
loginCode:login_name,
|
||||
password,
|
||||
|
||||
|
||||
}
|
||||
return request({
|
||||
url: 'kangarooDataCenterV3/entranceController/option',
|
||||
url: 'kangarooDataCenter/entranceController/option',
|
||||
headers: {
|
||||
isToken: false,
|
||||
tl: 'loginService',
|
||||
|
|
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||
// 集成应用请求
|
||||
export function getPagesApi(obj, data = {}) {
|
||||
return request({
|
||||
url: 'kangarooDataCenterV3/entranceController/option',
|
||||
url: 'kangarooDataCenter/entranceController/option',
|
||||
method: 'post',
|
||||
headers: obj,
|
||||
data
|
||||
|
|
|
@ -19,6 +19,7 @@ const whiteList = [
|
|||
"/register",
|
||||
"/systemInit",
|
||||
"/databaseLogin",
|
||||
"/apiLogs",
|
||||
];
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
|
|
1679
src/router/index.js
1679
src/router/index.js
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,267 @@
|
|||
/**
|
||||
* @desc 消息管理日志
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
// 表头
|
||||
const tableColumnData = [
|
||||
{
|
||||
label: '发送者应用',
|
||||
prop: 'sendAppName',
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
label: '源数据',
|
||||
prop: 'sourceData',
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
label: '目标数据',
|
||||
prop: 'targetData',
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
label: '错误状态',
|
||||
prop: 'errorStatus',
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
label: '返回信息',
|
||||
prop: 'returnData',
|
||||
tooltip: true,
|
||||
}, {
|
||||
label: '创建时间',
|
||||
prop: 'createTime',
|
||||
tooltip: true,
|
||||
},
|
||||
]
|
||||
const tableVersionColumn = [
|
||||
{
|
||||
label: '接收者名称',
|
||||
prop: 'receiveName',
|
||||
},
|
||||
{
|
||||
label: '接收者编码',
|
||||
prop: 'receiveCode',
|
||||
},
|
||||
{
|
||||
label: '接收者应用',
|
||||
prop: 'receiveApp',
|
||||
},
|
||||
{
|
||||
label: '接收者',
|
||||
prop: 'receiveApi',
|
||||
},
|
||||
{
|
||||
label: '数据类型',
|
||||
prop: 'dataType',
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
prop: 'remark',
|
||||
},
|
||||
]
|
||||
|
||||
// 基本信息内容
|
||||
const formRow = [
|
||||
{
|
||||
elCol: [{
|
||||
label: '消息管理名称',
|
||||
prop: 'theme',
|
||||
tag: 'elInput',
|
||||
disabled: true,
|
||||
span: 24
|
||||
}]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '发送者应用',
|
||||
prop: 'sendApp',
|
||||
tag: 'elSelect',
|
||||
disabled: true,
|
||||
options: [],
|
||||
optionValue: 'id',
|
||||
optionLabel: 'name',
|
||||
}, {
|
||||
label: '发送者',
|
||||
prop: 'sendApi',
|
||||
tag: 'elSelect',
|
||||
disabled: true,
|
||||
options: [],
|
||||
optionValue: 'id',
|
||||
optionLabel: 'apiName',
|
||||
}]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '接收者应用',
|
||||
prop: 'receiveApp',
|
||||
tag: 'elSelect',
|
||||
disabled: true,
|
||||
options: [],
|
||||
optionValue: 'id',
|
||||
optionLabel: 'name',
|
||||
}, {
|
||||
label: '接收者',
|
||||
prop: 'receiveApi',
|
||||
tag: 'elSelect',
|
||||
disabled: true,
|
||||
options: [],
|
||||
optionValue: 'id',
|
||||
optionLabel: 'apiName',
|
||||
}]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '源数据',
|
||||
prop: 'sourceData',
|
||||
tag: 'elSlot',
|
||||
slotName: "sourceData",
|
||||
span: 24,
|
||||
}]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '目标数据',
|
||||
prop: 'targetData',
|
||||
tag: 'elSlot',
|
||||
slotName: "targetData",
|
||||
span: 24,
|
||||
}]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
tag: 'elRadio',
|
||||
disabled: true,
|
||||
span: 24,
|
||||
options: [
|
||||
{value: "1", label: "待发送"},
|
||||
{value: "2", label: "发送中"},
|
||||
{value: "3", label: "发送成功"},
|
||||
{value: "4", label: "发送失败"},
|
||||
],
|
||||
},]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '错误状态',
|
||||
prop: 'error_status',
|
||||
tag: 'elRadio',
|
||||
disabled: true,
|
||||
span: 24,
|
||||
options: [
|
||||
{value: "1", label: "需要重新发送"},
|
||||
{value: "2", label: "不需要重新发送"},
|
||||
],
|
||||
},]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '返回信息',
|
||||
prop: 'returnData',
|
||||
tag: 'elInput',
|
||||
type: 'textarea',
|
||||
disabled: true,
|
||||
span: 24,
|
||||
}]
|
||||
},
|
||||
]
|
||||
|
||||
const basicsRules = {
|
||||
sourceData: [{
|
||||
required: true,
|
||||
message: '请输入源数据',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
targetData: [{
|
||||
required: true,
|
||||
message: '请输入目标数据',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
}
|
||||
|
||||
// 查看
|
||||
const formRowShow = [
|
||||
{
|
||||
elCol: [{
|
||||
label: '发送者应用',
|
||||
prop: 'sendApp',
|
||||
tag: 'elSelect',
|
||||
disabled: true,
|
||||
options: [],
|
||||
optionValue: 'id',
|
||||
optionLabel: 'name',
|
||||
},]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '源数据',
|
||||
prop: 'sourceData',
|
||||
tag: 'elInput',
|
||||
disabled: true,
|
||||
type: 'textarea',
|
||||
span: 24,
|
||||
}]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '目标数据',
|
||||
prop: 'targetData',
|
||||
tag: 'elInput',
|
||||
disabled: true,
|
||||
type: 'textarea',
|
||||
span: 24,
|
||||
}]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
tag: 'elRadio',
|
||||
disabled: true,
|
||||
span: 24,
|
||||
options: [
|
||||
{value: "1", label: "待发送"},
|
||||
{value: "2", label: "发送中"},
|
||||
{value: "3", label: "发送成功"},
|
||||
{value: "4", label: "发送失败"},
|
||||
],
|
||||
},]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '错误状态',
|
||||
prop: 'errorStatus',
|
||||
tag: 'elRadio',
|
||||
disabled: true,
|
||||
span: 24,
|
||||
options: [
|
||||
{value: "1", label: "需要重新发送"},
|
||||
{value: "2", label: "不需要重新发送"},
|
||||
],
|
||||
},]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '返回信息',
|
||||
prop: 'returnData',
|
||||
tag: 'elInput',
|
||||
type: 'textarea',
|
||||
disabled: true,
|
||||
span: 24,
|
||||
}]
|
||||
},
|
||||
]
|
||||
export default {
|
||||
tableColumnData,
|
||||
formRow,
|
||||
basicsRules,
|
||||
formRowShow,
|
||||
tableVersionColumn
|
||||
}
|
|
@ -0,0 +1,336 @@
|
|||
<template>
|
||||
<div>
|
||||
<base-layout
|
||||
ref="baseLayout"
|
||||
@onFuncBtn="onFuncBtn"
|
||||
:querySwitch="true"
|
||||
:searchList="requirementList"
|
||||
@search="handleSearchEvent"
|
||||
:isPage="true"
|
||||
@pageChange="handlePageChange"
|
||||
@onElSelect="onElSelect"
|
||||
:bodyHight="''"
|
||||
>
|
||||
<div slot="main" slot-scope="{ tableHeight }">
|
||||
<base-table
|
||||
ref="baseTable"
|
||||
:showIndex="true"
|
||||
:funWidth="215"
|
||||
:funData="funData"
|
||||
@onFunc="onFunc"
|
||||
:tabLoading.sync="tabLoading"
|
||||
:tableHeight="'80vh'"
|
||||
:tableData="tableData"
|
||||
:tableColumn="tableColumnData"
|
||||
>
|
||||
<template v-slot:status="{ row }">
|
||||
<div style="width: 100%">
|
||||
<span v-if="row.status == '1'">待发送</span>
|
||||
<span v-else-if="row.status == '2'">发送中</span>
|
||||
<span v-else-if="row.status == '3'">发送成功</span>
|
||||
<span v-else-if="row.status == '4'">发送失败</span>
|
||||
<span v-else></span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:errorStatus="{ row }">
|
||||
<div style="width: 100%">
|
||||
<span>{{
|
||||
row.errorStatus === "1" ? "需要重新发送" : "不需要重新发送"
|
||||
}}</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 {authApi} from "@/api/apis/auth";
|
||||
import {getApiModuleApi} from "@/api/apiChunks/index.js";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
baseLayout,
|
||||
baseTable,
|
||||
rightDialog,
|
||||
},
|
||||
props: {
|
||||
receiveApi: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
buttonList: [
|
||||
{
|
||||
menuName: "刷新",
|
||||
icon: "el-icon-refresh",
|
||||
btnFunction: "resetLoad",
|
||||
},
|
||||
], //按钮组
|
||||
requirementList: [
|
||||
{
|
||||
placeholder: "发送者应用",
|
||||
prop: "sendApp",
|
||||
tag: "elSelect",
|
||||
options: [],
|
||||
optionValue: "id",
|
||||
optionLabel: "name",
|
||||
},
|
||||
{
|
||||
placeholder: "接受者应用",
|
||||
prop: "receiveApp",
|
||||
tag: "elSelect",
|
||||
options: [],
|
||||
optionValue: "id",
|
||||
optionLabel: "name",
|
||||
},
|
||||
{
|
||||
placeholder: "接受者api",
|
||||
prop: "receiveApi",
|
||||
tag: "elSelect",
|
||||
options: [],
|
||||
optionValue: "id",
|
||||
optionLabel: "apiName",
|
||||
},
|
||||
{
|
||||
placeholder: "开始日期",
|
||||
prop: "createTimeStart",
|
||||
tag: "elDatePicker",
|
||||
},
|
||||
{
|
||||
placeholder: "结束日期",
|
||||
prop: "createTimeEnd",
|
||||
tag: "elDatePicker",
|
||||
},
|
||||
{
|
||||
placeholder: "状态",
|
||||
prop: "status",
|
||||
tag: "elSelect",
|
||||
options: [
|
||||
{id: "1", label: "待发送"},
|
||||
{id: "2", label: "发送中"},
|
||||
{id: "3", label: "发送成功"},
|
||||
{id: "4", label: "发送失败"},
|
||||
],
|
||||
error_status_dist: {
|
||||
1: "需要重新发送",
|
||||
2: "不需要重新发送",
|
||||
},
|
||||
optionValue: "id",
|
||||
optionLabel: "label",
|
||||
},
|
||||
{
|
||||
placeholder: "源数据",
|
||||
prop: "sourceData",
|
||||
tag: "elInput",
|
||||
},
|
||||
{
|
||||
placeholder: "目标数据",
|
||||
prop: "targetData",
|
||||
tag: "elInput",
|
||||
},
|
||||
{
|
||||
placeholder: "返回信息",
|
||||
prop: "returnData",
|
||||
tag: "elInput",
|
||||
},
|
||||
], //查询模板list
|
||||
tabLoading: false,
|
||||
tableColumnData: configData.tableColumnData, //表头数据
|
||||
funData: [
|
||||
{
|
||||
color: "#6a9af1",
|
||||
text: "查看",
|
||||
},
|
||||
],
|
||||
tableData: [], //表格数据
|
||||
pageModel: {
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
},
|
||||
queryModel: {
|
||||
theme: "",
|
||||
sendApp: "",
|
||||
sendApi: "",
|
||||
receiveApp: "",
|
||||
receiveApi: "",
|
||||
status: "",
|
||||
targetData: '',
|
||||
sourceData: '',
|
||||
returnData: ''
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.GetMessageLogTableData();
|
||||
this.initSelect()
|
||||
},
|
||||
methods: {
|
||||
async onElSelect(event, index, indexItem, model, row) {
|
||||
console.log(event, index, indexItem, model, row)
|
||||
|
||||
if (row.placeholder === '接受者应用') {
|
||||
this.$set(this.queryModel, 'receiveApi', '')
|
||||
this.$set(this.$refs.baseLayout.ruleForm, 'receiveApi', "")
|
||||
if (event) {
|
||||
const res = await authApi('sysApplicationService', 'application', 'thirdInterfacequeryAppApi', '', {
|
||||
appId: event
|
||||
})
|
||||
if(res.status ==200){
|
||||
this.requirementList[2].options = res.attribute
|
||||
}
|
||||
} else {
|
||||
this.requirementList[2].options = []
|
||||
}
|
||||
}
|
||||
},
|
||||
// 表格数据
|
||||
async GetMessageLogTableData() {
|
||||
this.tabLoading = true;
|
||||
let param = {
|
||||
...this.pageModel,
|
||||
...this.queryModel,
|
||||
};
|
||||
let res = await authApi(
|
||||
"sysApplicationService",
|
||||
"application",
|
||||
"thirdInterfacequeryAppApiLog",
|
||||
"",
|
||||
param
|
||||
);
|
||||
this.tabLoading = false;
|
||||
console.log(res, 112312312)
|
||||
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.GetMessageLogTableData();
|
||||
},
|
||||
// 按钮组
|
||||
onFuncBtn(btn) {
|
||||
this[btn.btnFunction]();
|
||||
},
|
||||
// 表格操作事件 查看 编辑 重新推送
|
||||
onFunc(index, row) {
|
||||
// 查看
|
||||
if (index == 0) {
|
||||
this.openLoading("detail");
|
||||
this.$refs.rightDialog.openDialog("show", row);
|
||||
}
|
||||
// 编辑
|
||||
if (index == 1) {
|
||||
this.openLoading("detail");
|
||||
this.$refs.rightDialog.openDialog("edit", row);
|
||||
}
|
||||
// 重新推送
|
||||
if (index == 2) {
|
||||
this.$confirm("确认重新发送吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.openLoading("detail");
|
||||
this.messageResendData(row.id);
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: "info",
|
||||
message: "取消重新发送",
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
async messageResendData(id) {
|
||||
let param = {
|
||||
id: id,
|
||||
};
|
||||
let res = await authApi(
|
||||
"sysMessageManageLogService",
|
||||
"messageManage",
|
||||
"resendData",
|
||||
"",
|
||||
param
|
||||
);
|
||||
if (res.status == "200") {
|
||||
this.$vmNews("重新发送成功!", "success");
|
||||
this.resetTable();
|
||||
}
|
||||
},
|
||||
// 重置表格
|
||||
resetTable() {
|
||||
this.pageModel.pageNum = 1;
|
||||
this.$refs.baseLayout.pageClear();
|
||||
this.GetMessageLogTableData();
|
||||
},
|
||||
// 搜索
|
||||
handleSearchEvent(form) {
|
||||
let data = this.$refs.baseLayout.ruleForm;
|
||||
this.queryModel = {...data}
|
||||
if (!data.sendApp) {
|
||||
this.$vmNews("请选择发送者应用")
|
||||
return
|
||||
}
|
||||
if (!data.receiveApp) {
|
||||
this.$vmNews("请选择接受者应用")
|
||||
return
|
||||
}
|
||||
if (!data.receiveApi) {
|
||||
this.$vmNews("请选择接受者api")
|
||||
return
|
||||
}
|
||||
this.resetTable();
|
||||
},
|
||||
async initSelect() {
|
||||
const res = await getApiModuleApi({
|
||||
tl: "sysApplicationService",
|
||||
as: "application",
|
||||
dj: "thirdInterfacequeryApp"
|
||||
}, {
|
||||
"pageNum": 1,
|
||||
"pageSize": 999
|
||||
})
|
||||
console.log(res, 'res')
|
||||
this.requirementList[0].options = res.attribute.list
|
||||
this.requirementList[1].options = res.attribute.list
|
||||
},
|
||||
// async onElSelect(val, b, c, d, row) {
|
||||
// if (row.prop === 'sendApp') {
|
||||
// this.requirementList[1].options = []
|
||||
// this.$set(this.$refs.baseLayout.ruleForm, 'sendApi', "")
|
||||
// const res = await getApiModuleApi({
|
||||
// tl: "sysApplicationService",
|
||||
// as: "application",
|
||||
// dj: "queryAppApi",
|
||||
// }, {
|
||||
// "pageNum": 1,
|
||||
// "pageSize": 999,
|
||||
// appId: val
|
||||
// })
|
||||
// this.requirementList[1].options = res.attribute.list
|
||||
// console.log(res)
|
||||
// }
|
||||
// }
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.clickTitle {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,282 @@
|
|||
<template>
|
||||
<div>
|
||||
<base-right-dialog
|
||||
ref="baseRightDialog"
|
||||
:footerShow="true"
|
||||
:dialogVisible.sync="dialogVisible"
|
||||
:title="dialogTitle + ' 消息管理日志'"
|
||||
@handleClose="handleDialogClose"
|
||||
:type="dialogType"
|
||||
:submitShow="submitShow"
|
||||
:size="'65%'"
|
||||
@handleConfirmClick="handleConfirmClick"
|
||||
>
|
||||
<base-form
|
||||
ref="basicsForm"
|
||||
:formRow="formRow"
|
||||
:isFunBtn="false"
|
||||
:rules="basicsRules"
|
||||
class="dialog_form"
|
||||
:spanWidth="`120px`"
|
||||
:loading="vLoading"
|
||||
style="padding-bottom:20px;"
|
||||
>
|
||||
<div slot="sourceData" class="code-json-editor">
|
||||
<vue-json-editor
|
||||
class="editor"
|
||||
v-model="sourceData"
|
||||
:showBtns="false"
|
||||
:mode="'code'"
|
||||
@json-change="onSourceDataJsonChange"
|
||||
@json-save="onSourceDataSave"
|
||||
@has-error="onSourceDataError"
|
||||
/>
|
||||
</div>
|
||||
<div slot="targetData" class="code-json-editor">
|
||||
<vue-json-editor
|
||||
class="editor"
|
||||
v-model="targetData"
|
||||
:showBtns="false"
|
||||
:mode="'code'"
|
||||
@json-change="onTargetDataChange"
|
||||
@json-save="onTargetDataSave"
|
||||
@has-error="onTargetDataError"
|
||||
/>
|
||||
</div>
|
||||
</base-form>
|
||||
</base-right-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vueJsonEditor from "vue-json-editor";
|
||||
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 {getApiModuleApi} from "@/api/apiChunks/index.js";
|
||||
export default {
|
||||
components: {
|
||||
baseRightDialog,
|
||||
baseForm,
|
||||
baseTable,
|
||||
vueJsonEditor,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dialogTitle: "",
|
||||
dialogType: "",
|
||||
formRow: configData.formRow,
|
||||
basicsRules: configData.basicsRules,
|
||||
vLoading: false,
|
||||
submitShow: true,
|
||||
sourceData: {},
|
||||
sourceDataFlag: true,
|
||||
targetData: {},
|
||||
targetDataFlag: true,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDialog(type, row) {
|
||||
this.querysysAppService();
|
||||
// this.querysysAppApiService();
|
||||
this.formRow = configData.formRow;
|
||||
this.submitShow = true;
|
||||
// 编辑
|
||||
if (type == "edit") {
|
||||
this.dialogTitle = "编辑";
|
||||
this.dialogType = "edit";
|
||||
this.messageLogGetById(row.id);
|
||||
}
|
||||
// 查看
|
||||
if (type == "show") {
|
||||
this.submitShow = false;
|
||||
this.formRow = configData.formRowShow;
|
||||
this.dialogTitle = "查看";
|
||||
this.dialogType = "show";
|
||||
this.messageLogGetById(row.id);
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
// 编辑详情
|
||||
async messageLogGetById(id) {
|
||||
let params = {
|
||||
id: id,
|
||||
};
|
||||
let res = await authApi(
|
||||
"sysMessageManageLogService",
|
||||
"messageManage",
|
||||
"thirdInterfacequeryEntity",
|
||||
"",
|
||||
params
|
||||
);
|
||||
if (res.status == "200") {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.basicsForm.incomingParameters(res.attribute);
|
||||
});
|
||||
}
|
||||
},
|
||||
// 实时保存 源数据
|
||||
onSourceDataJsonChange(value) {
|
||||
this.onSourceDataSave(value);
|
||||
},
|
||||
onSourceDataSave(value) {
|
||||
this.sourceData = value;
|
||||
this.sourceDataFlag = true;
|
||||
},
|
||||
onSourceDataError(value) {
|
||||
this.sourceDataFlag = false;
|
||||
},
|
||||
checkSourceDataJson() {
|
||||
if (this.sourceDataFlag === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 实时保存 目标数据
|
||||
onTargetDataChange(value) {
|
||||
this.onTargetDataSave(value);
|
||||
},
|
||||
onTargetDataSave(value) {
|
||||
this.targetData = value;
|
||||
this.targetDataFlag = true;
|
||||
},
|
||||
onTargetDataError(value) {
|
||||
this.targetDataFlag = false;
|
||||
},
|
||||
checkTargetDataJson() {
|
||||
if (this.targetDataFlag === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 弹窗关闭
|
||||
handleDialogClose() {
|
||||
this.$refs.basicsForm.resetFields();
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
// 弹窗确认按钮
|
||||
handleConfirmClick() {
|
||||
let checkSource = this.checkSourceDataJson();
|
||||
if (!checkSource) {
|
||||
this.$vmNews("源数据格式应为JSON格式!", "warning");
|
||||
return;
|
||||
}
|
||||
let checkTarget = this.checkTargetDataJson();
|
||||
if (!checkTarget) {
|
||||
this.$vmNews("目标数据格式应为JSON格式!", "warning");
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
...this.$refs.basicsForm.ruleForm,
|
||||
sourceData: this.sourceData,
|
||||
targetData: this.targetData,
|
||||
};
|
||||
if (this.dialogType == "edit") {
|
||||
this.openLoading("submit");
|
||||
this.messageLogUpdateDto(params);
|
||||
}
|
||||
},
|
||||
// 编辑保存
|
||||
async messageLogUpdateDto(params) {
|
||||
let res = await authApi(
|
||||
"sysMessageManageLogService",
|
||||
"messageManage",
|
||||
"updateEntity",
|
||||
"",
|
||||
params
|
||||
);
|
||||
if (res.status == "200") {
|
||||
this.handleDialogClose();
|
||||
this.$vmNews("更新成功", "success");
|
||||
this.$emit("resetTable");
|
||||
}
|
||||
},
|
||||
// 应用
|
||||
async querysysAppService() {
|
||||
const res = await getApiModuleApi({
|
||||
tl: "sysApplicationService",
|
||||
as: "application",
|
||||
dj: "thirdInterfacequeryApp"
|
||||
}, {
|
||||
"pageNum": 1,
|
||||
"pageSize": 999
|
||||
})
|
||||
this.formRow[0].elCol[0].options = res.attribute.list
|
||||
// if (res.status == "200") {
|
||||
// this.formRow[1].elCol[0].options = res.attribute.list;
|
||||
// this.formRow[2].elCol[0].options = res.attribute.list;
|
||||
// }
|
||||
},
|
||||
// 应用者
|
||||
async querysysAppApiService() {
|
||||
let params = {
|
||||
pageSize: 9999,
|
||||
pageNum: 1,
|
||||
};
|
||||
let res = await authApi(
|
||||
"appApiService",
|
||||
"appApi",
|
||||
"queryPage",
|
||||
"",
|
||||
params
|
||||
);
|
||||
if (res.status == "200") {
|
||||
// this.formRow[1].elCol[1].options = res.attribute.list;
|
||||
// this.formRow[2].elCol[1].options = res.attribute.list;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.code-json-editor {
|
||||
/* jsoneditor右上角默认有一个链接,加css去掉 */
|
||||
/deep/ .jsoneditor-poweredBy {
|
||||
display: none !important;
|
||||
}
|
||||
/deep/ .ace-jsoneditor {
|
||||
height: 150px !important;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
::v-deep textarea.el-textarea__inner {
|
||||
min-height: 150px !important;
|
||||
}
|
||||
.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>
|
|
@ -103,7 +103,7 @@ export default {
|
|||
// this.appLogo = el.id
|
||||
// }
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileUpload",
|
||||
url: "/kangarooDataCenter/entranceController/fileUpload",
|
||||
method: "post",
|
||||
data: formData,
|
||||
}).then((res) => {
|
||||
|
@ -230,7 +230,7 @@ export default {
|
|||
getLogoUrl() {
|
||||
let id = this.appLogo ? this.appLogo : this.$route.query.appLogo
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + id,
|
||||
url: "/kangarooDataCenter/entranceController/fileDownloadNew?id=" + id,
|
||||
method: "get",
|
||||
responseType: 'arraybuffer'
|
||||
}).then((res) => {
|
||||
|
|
|
@ -202,7 +202,7 @@ export default {
|
|||
this.pageModel.total = res.attribute.total;
|
||||
res.attribute.list.map(el => {
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + el.appLogo,
|
||||
url: "/kangarooDataCenter/entranceController/fileDownloadNew?id=" + el.appLogo,
|
||||
method: "get",
|
||||
responseType: 'arraybuffer'
|
||||
}).then((res) => {
|
||||
|
|
|
@ -79,7 +79,7 @@ export default {
|
|||
this.versionNumber = res.attribute.versionNumber
|
||||
//下载logo
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + res.attribute.appLogo,
|
||||
url: "/kangarooDataCenter/entranceController/fileDownloadNew?id=" + res.attribute.appLogo,
|
||||
method: "get",
|
||||
responseType: 'arraybuffer'
|
||||
}).then((res) => {
|
||||
|
|
|
@ -183,7 +183,7 @@ export default {
|
|||
res.attribute.list.map(el => {
|
||||
this.$set(el,'imgLoading',true)
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + el.mdmLogo,
|
||||
url: "/kangarooDataCenter/entranceController/fileDownloadNew?id=" + el.mdmLogo,
|
||||
method: "get",
|
||||
responseType: 'arraybuffer'
|
||||
}).then((res) => {
|
||||
|
|
|
@ -92,7 +92,7 @@ export default {
|
|||
formData.append("fileFlag", true);
|
||||
formData.append("businessType", "application");
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileUpload",
|
||||
url: "/kangarooDataCenter/entranceController/fileUpload",
|
||||
method: "post",
|
||||
data: formData,
|
||||
}).then((res) => {
|
||||
|
@ -210,7 +210,7 @@ export default {
|
|||
this.imgLoading = true
|
||||
let id = this.appLogo ? this.appLogo : this.$route.query.appLogo
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + id,
|
||||
url: "/kangarooDataCenter/entranceController/fileDownloadNew?id=" + id,
|
||||
method: "get",
|
||||
responseType: 'arraybuffer'
|
||||
}).then((res) => {
|
||||
|
|
|
@ -63,7 +63,7 @@ export default {
|
|||
//下载logo
|
||||
this.imgLoading = true
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + res.attribute.mdmLogo,
|
||||
url: "/kangarooDataCenter/entranceController/fileDownloadNew?id=" + res.attribute.mdmLogo,
|
||||
method: "get",
|
||||
responseType: 'arraybuffer'
|
||||
}).then((res) => {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="dataList" label="字段">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex;align-items: center;flex-wrap: wrap">
|
||||
<div style="display: flex;align-items: center">
|
||||
<i
|
||||
class="el-icon-star-on"
|
||||
style="
|
||||
|
|
|
@ -39,10 +39,9 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://hzya.ufyct.com:9067/`,
|
||||
// target: `http://hzya.ufyct.com:9067/`,
|
||||
// target: `http://127.0.0.1:9081/`,
|
||||
// target: `http://192.168.2.78:9999`,
|
||||
// target: `http://192.168.2.78:8080`,
|
||||
target: `http://192.168.2.78:9999`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
["^" + process.env.VUE_APP_BASE_API]: "",
|
||||
|
|
Loading…
Reference in New Issue