18 changed files with 4259 additions and 250 deletions
@ -1,3 +1,3 @@ |
|||||
{ |
{ |
||||
"version": "1.0.34" |
"version": "1.0.35" |
||||
} |
} |
@ -0,0 +1,117 @@ |
|||||
|
// 接口监控看板相关api
|
||||
|
import axios from 'axios' |
||||
|
import request from '@/utils/request' |
||||
|
let filter = 'get-page-list-by-filter' |
||||
|
let base_api = localStorage.getItem('interfaceBoardUrl') |
||||
|
let colum_url = localStorage.getItem('interfaceBoardColumnsApi') |
||||
|
let interfaceBoard_api = base_api + 'api/app/' |
||||
|
// 转义传参
|
||||
|
const initParams = (data) => { |
||||
|
return { |
||||
|
skipCount:data.SkipCount, |
||||
|
maxResultCount:data.MaxResultCount, |
||||
|
sorting:data.Sorting |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 获取表头数据
|
||||
|
export function getInterfaceBoard() { |
||||
|
return axios({ |
||||
|
method:'get', |
||||
|
url: base_api + colum_url |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//外部数据转换
|
||||
|
export function dataExchangeFromOut(data,includeDetails) { |
||||
|
return axios({ |
||||
|
method:'post', |
||||
|
url: interfaceBoard_api + 'outgoing-to-external/' + filter + '?includeDetails='+ Boolean(includeDetails), |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//归档外部数据转换
|
||||
|
export function dataExchangeFromOut_file(data,includeDetails) { |
||||
|
return axios({ |
||||
|
method:'post', |
||||
|
url: interfaceBoard_api + 'archived-outgoing-to-external/' + filter + '?includeDetails='+ Boolean(includeDetails), |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//wms数据接收
|
||||
|
export function comingToWms(data,includeDetails) { |
||||
|
return axios({ |
||||
|
method:'post', |
||||
|
url: interfaceBoard_api + 'incoming-to-wms/' + filter + '?includeDetails='+ Boolean(includeDetails), |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//归档wms数据接收
|
||||
|
export function comingToWms_file(data,includeDetails) { |
||||
|
return axios({ |
||||
|
method:'post', |
||||
|
url: interfaceBoard_api + 'archived-incoming-to-wms/' + filter + '?includeDetails='+ Boolean(includeDetails), |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//wms数据转换
|
||||
|
export function dataExchangeFromWms(data,includeDetails) { |
||||
|
return axios({ |
||||
|
method:'post', |
||||
|
url: interfaceBoard_api + 'data-exchange_Outgoing-from-wms/' + filter + '?includeDetails='+ Boolean(includeDetails), |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 归档wms数据转换
|
||||
|
export function dataExchangeFromWms_file(data,includeDetails) { |
||||
|
return axios({ |
||||
|
method:'post', |
||||
|
url: interfaceBoard_api + 'data-exchange_Archived-outgoing-from-wms/' + filter + '?includeDetails='+ Boolean(includeDetails), |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//外部数据接收
|
||||
|
export function comingFromOut(data,includeDetails) { |
||||
|
return axios({ |
||||
|
method:'post', |
||||
|
url: interfaceBoard_api + 'data-exchange_Incoming-from-external/' + filter + '?includeDetails='+ Boolean(includeDetails), |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//归档外部数据接收
|
||||
|
export function comingFromOut_file(data,includeDetails) { |
||||
|
return axios({ |
||||
|
method:'post', |
||||
|
url: interfaceBoard_api + 'data-exchange_Archived-incoming-from-external/' + filter + '?includeDetails='+ Boolean(includeDetails), |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//外部数据转换新增、编辑
|
||||
|
export function dataExchangeFromOut_save(data,add) { |
||||
|
let _type = add ? 'CreateModal' : 'EditModal' |
||||
|
return axios({ |
||||
|
method:'post', |
||||
|
headers: { |
||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' |
||||
|
}, |
||||
|
url: base_api + 'AppBusiness/OutgoingToExternal/OutgoingToExternal/'+_type, |
||||
|
data:data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//外部数据转换删除
|
||||
|
export function dataExchangeFromOut_delete(id) { |
||||
|
return axios({ |
||||
|
method:'DELETE', |
||||
|
url: base_api + 'outgoing-to-external/' + id, |
||||
|
}) |
||||
|
} |
||||
|
|
File diff suppressed because it is too large
@ -0,0 +1,304 @@ |
|||||
|
<template> |
||||
|
<div class="page-box" v-loading="Loading.appMainLoading"> |
||||
|
<tablePagination |
||||
|
:currenButtonData="currenButtonData" |
||||
|
:tableData="tableData" |
||||
|
:tableLoading="Loading.tableLoading" |
||||
|
:tableColumns="tableColumns" |
||||
|
@rowDrop="rowDrop" |
||||
|
:totalCount="totalCount" |
||||
|
:multipleSelection="multipleSelection" |
||||
|
:MaxResultCount="PageListParams.MaxResultCount" |
||||
|
@topbutton="topbutton" |
||||
|
@inlineDialog="inlineDialog" |
||||
|
@sortChange="sortChange" |
||||
|
@alertoldSkipCount="alertoldSkipCount" |
||||
|
@alterResultCount="alterResultCount" |
||||
|
@handleSelectionChange="handleSelectionChange" |
||||
|
:currentPageProps="oldSkipCount" |
||||
|
:quicklySearchOption="quicklySearchOption" |
||||
|
@quicklySearchClick="quicklySearchClick" |
||||
|
@quicklySearchClear="quicklySearchClear" |
||||
|
:primarySearchOption="primarySearchOption" |
||||
|
@overallSearchFormClick="overallSearchFormClick" |
||||
|
:httpOverallSearchData="httpOverallSearchData" |
||||
|
> |
||||
|
</tablePagination> |
||||
|
<!-- 新增与编辑 --> |
||||
|
<newAndEdiDialog |
||||
|
:loading="Loading.newAndEdiLoading" |
||||
|
:active="active" |
||||
|
:pageStatus="pageStatus" |
||||
|
:formReveal="formReveal" |
||||
|
:formTitle="formTitle" |
||||
|
:displayDialog="editDialog" |
||||
|
:FormData="formReveal ? CreateFormData : editFormData" |
||||
|
:Form="formReveal ? CreateForm : editForm" |
||||
|
:Options="editOptions" |
||||
|
:Handle="editHandle" |
||||
|
:Rules="formReveal ? editRules.cerateRule : editRules.editRule" |
||||
|
@FormSubmit="FormSubmit" |
||||
|
@close="FormClose" |
||||
|
@goBack="goBack" |
||||
|
></newAndEdiDialog> |
||||
|
<curren-Drawer |
||||
|
:title="tableColumns" |
||||
|
:tableColumns="tableColumns" |
||||
|
:DrawerLoading="Loading.DrawerLoading" |
||||
|
:drawer="displayDialog.detailsDialog" |
||||
|
:dropdownData="dropdownData" |
||||
|
:propsData="propsData" |
||||
|
:tabsDesTions="tabsDesTions" |
||||
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
||||
|
@drawerbutton="drawerbutton" |
||||
|
@handleCommand="drawerHandle" |
||||
|
@close-value="closeValue" |
||||
|
></curren-Drawer> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { tableMixins } from "@/mixins/TableMixins"; |
||||
|
import { LoadingMixins } from "@/mixins/LoadingMixins"; |
||||
|
import { drawerMixins } from "@/mixins/drawerMixins" |
||||
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"; |
||||
|
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins" |
||||
|
import { mixins } from "@/mixins/mixins"; |
||||
|
import { filterSelectMixins } from '@/mixins/filter-Select' |
||||
|
import { dataExchangeFromOut,dataExchangeFromOut_save,dataExchangeFromOut_delete } from "@/api/wms-interface" |
||||
|
import { getToken } from '@/utils/auth' |
||||
|
|
||||
|
export default { |
||||
|
name: "dataExchangeFromOut", |
||||
|
mixins: [ |
||||
|
tableMixins, |
||||
|
LoadingMixins, |
||||
|
drawerMixins, |
||||
|
TableHeaderMixins, |
||||
|
mixins, |
||||
|
filterSelectMixins, |
||||
|
newAndEdiDialogMixins |
||||
|
], |
||||
|
computed: { |
||||
|
editDialog: { |
||||
|
get: function () { |
||||
|
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
data() { |
||||
|
let _Dashboard = JSON.parse(localStorage.getItem("interfaceBoardColumnsNames")) // 接口监控看板 |
||||
|
return { |
||||
|
tableLoading:false, |
||||
|
//常用按钮数据 |
||||
|
currenButtonData: [ |
||||
|
// this.defaultAddBtn(),//新增 |
||||
|
this.defaultFieldSettingBtn(),//字段设置 |
||||
|
this.defaultFreshBtn(),//刷新 |
||||
|
// this.defaultFilterBtn(),//筛选 |
||||
|
], |
||||
|
//新增 |
||||
|
CreateFormData: { |
||||
|
number: null,//数字+点* |
||||
|
remark: null, |
||||
|
dataType: null, |
||||
|
tableType: null,//数字+点* |
||||
|
dataAction: null,//数字+点* |
||||
|
effectiveDate: null,//* |
||||
|
status: null,//数字+点* |
||||
|
sourceSystem: null, |
||||
|
sourceDataId: null, |
||||
|
sourceDataGroupCode: null, |
||||
|
sourceDataDetailCode: null, |
||||
|
sourceDataContent: null, |
||||
|
writeTime: null,//* |
||||
|
writer: null, |
||||
|
destinationSystem: null, |
||||
|
destinationDataId: null, |
||||
|
destinationDataContent: null, |
||||
|
readTime: null,//* |
||||
|
reader: null, |
||||
|
errorCode: null,//数字+点* |
||||
|
errorMessage: null, |
||||
|
retryTimes: null,//数字+点* |
||||
|
}, |
||||
|
//新增 |
||||
|
editFormData: { |
||||
|
number: null,//数字+点* |
||||
|
remark: null, |
||||
|
dataType: null, |
||||
|
tableType: null,//数字+点* |
||||
|
dataAction: null,//数字+点* |
||||
|
effectiveDate: null,//* |
||||
|
status: null,//数字+点* |
||||
|
sourceSystem: null, |
||||
|
sourceDataId: null, |
||||
|
sourceDataGroupCode: null, |
||||
|
sourceDataDetailCode: null, |
||||
|
sourceDataContent: null, |
||||
|
writeTime: null,//* |
||||
|
writer: null, |
||||
|
destinationSystem: null, |
||||
|
destinationDataId: null, |
||||
|
destinationDataContent: null, |
||||
|
readTime: null,//* |
||||
|
reader: null, |
||||
|
errorCode: null,//数字+点* |
||||
|
errorMessage: null, |
||||
|
retryTimes: null,//数字+点* |
||||
|
}, |
||||
|
CreateForm: [ |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalNumber, prop: 'number', colSpan: 12, validType:'pointNumber' }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalRemark, prop: 'remark', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalDataType, prop: 'dataType', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalTableType, prop: 'tableType', colSpan: 12, validType:'pointNumber' }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalDataAction, prop: 'dataAction', colSpan: 12, validType:'pointNumber' }, |
||||
|
{ type: "dateTime", label: _Dashboard.OutgoingToExternalEffectiveDate, prop: 'effectiveDate', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalStatus, prop: 'status', colSpan: 12, validType:'pointNumber' }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalSourceSystem, prop: 'sourceSystem', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalSourceDataId, prop: 'sourceDataId', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalSourceDataGroupCode, prop: 'sourceDataGroupCode', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalSourceDataDetailCode, prop: 'sourceDataDetailCode', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalSourceDataContent, prop: 'sourceDataContent', colSpan: 12, }, |
||||
|
{ type: "dateTime", label: _Dashboard.OutgoingToExternalWriteTime, prop: 'writeTime', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalWriter, prop: 'writer', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalDestinationSystem, prop: 'destinationSystem', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalDestinationDataId, prop: 'destinationDataId', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalDestinationDataContent, prop: 'destinationDataContent', colSpan: 12, }, |
||||
|
{ type: "dateTime", label: _Dashboard.OutgoingToExternalReadTime, prop: 'readTime', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalReader, prop: 'reader', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalErrorCode, prop: 'errorCode', colSpan: 12, validType:'pointNumber' }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalErrorMessage, prop: 'errorMessage', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalRetryTimes, prop: 'retryTimes', colSpan: 12, validType:'pointNumber'}, |
||||
|
], |
||||
|
editForm: [ |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalNumber, prop: 'number', colSpan: 12, validType:'pointNumber' }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalRemark, prop: 'remark', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalDataType, prop: 'dataType', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalTableType, prop: 'tableType', colSpan: 12, validType:'pointNumber' }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalDataAction, prop: 'dataAction', colSpan: 12, validType:'pointNumber' }, |
||||
|
{ type: "dateTime", label: _Dashboard.OutgoingToExternalEffectiveDate, prop: 'effectiveDate', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalStatus, prop: 'status', colSpan: 12, validType:'pointNumber' }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalSourceSystem, prop: 'sourceSystem', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalSourceDataId, prop: 'sourceDataId', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalSourceDataGroupCode, prop: 'sourceDataGroupCode', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalSourceDataDetailCode, prop: 'sourceDataDetailCode', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalSourceDataContent, prop: 'sourceDataContent', colSpan: 12, }, |
||||
|
{ type: "dateTime", label: _Dashboard.OutgoingToExternalWriteTime, prop: 'writeTime', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalWriter, prop: 'writer', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalDestinationSystem, prop: 'destinationSystem', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalDestinationDataId, prop: 'destinationDataId', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalDestinationDataContent, prop: 'destinationDataContent', colSpan: 12, }, |
||||
|
{ type: "dateTime", label: _Dashboard.OutgoingToExternalReadTime, prop: 'readTime', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalReader, prop: 'reader', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalErrorCode, prop: 'errorCode', colSpan: 12, validType:'pointNumber' }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalErrorMessage, prop: 'errorMessage', colSpan: 12, }, |
||||
|
{ type: "input", label: _Dashboard.OutgoingToExternalRetryTimes, prop: 'retryTimes', colSpan: 12, validType:'pointNumber'}, |
||||
|
], |
||||
|
editOptions: {}, |
||||
|
editRules: { |
||||
|
cerateRule: { |
||||
|
number: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
tableType: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
dataAction: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
effectiveDate: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
status: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
writeTime: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
readTime: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
errorCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
retryTimes: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
}, |
||||
|
editRule: { |
||||
|
number: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
tableType: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
dataAction: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
effectiveDate: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
status: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
writeTime: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
readTime: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
errorCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
retryTimes: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
} |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.paging(); |
||||
|
}, |
||||
|
methods: { |
||||
|
//渲染数据 |
||||
|
paging(callback) { |
||||
|
this.Loading.tableLoading = true; |
||||
|
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
||||
|
dataExchangeFromOut(this.PageListParams) |
||||
|
.then(result => { |
||||
|
let res = result.data |
||||
|
this.tableData = res.items |
||||
|
this.totalCount = res.totalCount |
||||
|
this.pagingCallback(callback) |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.Loading.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
//打开抽屉 |
||||
|
inlineDialog(val) { |
||||
|
this.Loading.DrawerLoading = true |
||||
|
this.displayDialog.detailsDialog = true; |
||||
|
dataExchangeFromOut(this.PageListParams) |
||||
|
.then(result => { |
||||
|
this.propsData = result.data.items.filter(item=>{ |
||||
|
return item.id == val.id |
||||
|
})[0] |
||||
|
this.inlineDialogCallback() |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.Loading.DrawerLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 新增/编辑提交 |
||||
|
FormSubmit(val){ |
||||
|
this.Loading.tableLoading = true |
||||
|
const _data = new URLSearchParams(); |
||||
|
for(let item in this.CreateFormData){ |
||||
|
_data.append('ViewModel.'+item.slice(0,1).toUpperCase() +item.slice(1).toLowerCase(), this.CreateFormData[item]) |
||||
|
} |
||||
|
// todo:1、接口302 2、token取值的问题 |
||||
|
_data.append('__RequestVerificationToken',getToken()) |
||||
|
// this.formReveal为真是新增 |
||||
|
dataExchangeFromOut_save(_data,this.formReveal) |
||||
|
.then(result => { |
||||
|
this.Loading.tableLoading = false |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.Loading.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 重载抽屉 删除按钮 |
||||
|
drawerHandle(val) { |
||||
|
if (val == 'delete') { |
||||
|
this.$confirm('此操作将永久删除该消息, 是否继续?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
this.Loading.appMainLoading = true |
||||
|
this.displayDialog.detailsDialog = false |
||||
|
// todo:1、接口302 |
||||
|
dataExchangeFromOut_delete(this.propsData.id).then(res => { |
||||
|
this.$successMsg('删除成功!') |
||||
|
this.Loading.appMainLoading = false |
||||
|
this.paging() |
||||
|
}).catch(err => { |
||||
|
this.Loading.appMainLoading = false |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
//取消操作 |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/styles/basicData.scss"; |
||||
|
</style> |
Loading…
Reference in new issue