Browse Source

接口监控暂存

dev_web_online
安虹睿 2 years ago
parent
commit
35be443085
  1. 24
      fe/PC/src/api/wms-interface.js
  2. 4
      fe/PC/src/api/wms-job.js
  3. 4
      fe/PC/src/main.js
  4. 7
      fe/PC/src/utils/tableColumns/index.js
  5. 43
      fe/PC/src/utils/tabsDesTions/index.js
  6. 258
      fe/PC/src/views/interfaceBoard/dataExchangeFromOut.vue

24
fe/PC/src/api/wms-interface.js

@ -1,6 +1,8 @@
// 接口监控看板相关api
import axios from 'axios'
let interfaceBoard_api = localStorage.getItem('interfaceBoardUrl') + 'api/app/'
import request from '@/utils/request'
let base_api = localStorage.getItem('interfaceBoardUrl')
let interfaceBoard_api = base_api + 'api/app/'
// 转义传参
const initParams = (data) => {
return {
@ -81,6 +83,24 @@ export function comingFromOut_file(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,
})
}

4
fe/PC/src/api/wms-job.js

@ -167,10 +167,10 @@ export function InspectJobHandle(data, params, url) {
// }
//人工发料任务 | 自动发料任务
export function materialRequestByType(data, url, params) {
export function materialRequestByType(data, url, params,includeDetails) {
let _type = params.type?params.type:params.requestType
return request({
url: baseURL + url + '/' + _type,
url: baseURL + url + '/' + _type + '?includeDetails=' + (includeDetails || false),
method: 'post',
params: params,
data

4
fe/PC/src/main.js

@ -6,7 +6,7 @@ import App from './App'
import store from './store'
import router from './router'
import watchLocal from '@/utils/watcLlocalstorage'//用于监听本地缓存
// import i18n from './lang'
import i18n from './lang'
import "./utils/utils"
@ -69,6 +69,6 @@ new Vue({
el: '#app',
router,
store,
// i18n,
i18n,
render: h => h(App)
})

7
fe/PC/src/utils/tableColumns/index.js

@ -3486,7 +3486,12 @@ export const Department = [
// 接口监控看板
// 外部数据转换
export const dataExchangeFromOut = [
{ label: _Dashboard.number, prop: "number" },
{
label: _Dashboard.number,
prop: "number",
fixed: "left",
type: "name"
},
{ label: _Public.remark, prop: "remark", type:"showDetail" },
{ label: _Dashboard.dataType, prop: "dataType", type:"showDetail" },
{ label: _Dashboard.tableType, prop: "tableType" },

43
fe/PC/src/utils/tabsDesTions/index.js

@ -1,3 +1,8 @@
import zh from '@/lang/zh'
let _Public = zh.ColumsPublic // 字段通用
let _Dashboard = zh.ColumsDashboard // 接口监控看板
let _Names = zh.ColumsNames // 接口监控看板
// 基础信息数据管理
/**/
// 物品基础信息 20230328
@ -2683,4 +2688,42 @@ export const Department = [
// ************** 确认隐藏 ************************
// { label: "ID", prop: 'id' },
// ************** 确认隐藏 ************************
]
// 接口监控看板
// 外部数据转换
export const dataExchangeFromOut = [
{
label: _Dashboard.number,
prop: "number",
fixed: "left",
type: "name"
},
{ label: _Public.remark, prop: "remark", type:"showDetail" },
{ label: _Dashboard.dataType, prop: "dataType", type:"showDetail" },
{ label: _Dashboard.tableType, prop: "tableType" },
{ label: _Dashboard.dataAction, prop: "dataAction" },
{ label: _Dashboard.effectiveDate, prop: "effectiveDate",type:'dateTime' },
{ label: _Dashboard.status, prop: "status" },
{ label: _Dashboard.sourceSystem, prop: "sourceSystem", type:"showDetail" },
{ label: _Dashboard.sourceDataId, prop: "sourceDataId" },
{ label: _Dashboard.sourceDataGroupCode, prop: "sourceDataGroupCode", type:"showDetail" },
{ label: _Dashboard.sourceDataDetailCode, prop: "sourceDataDetailCode", type:"showDetail" },
{ label: _Dashboard.sourceDataContent, prop: "sourceDataContent", type:"showJsonTable" },
{ label: _Dashboard.writeTime, prop: "writeTime",type:'dateTime' },
{ label: _Dashboard.writer, prop: "writer" },
{ label: _Dashboard.destinationSystem, prop: "destinationSystem", type:"showDetail" },
{ label: _Dashboard.destinationDataId, prop: "destinationDataId" },
{ label: _Dashboard.destinationDataContent, prop: "destinationDataContent", type:"showJsonTable" },
{ label: _Dashboard.readTime, prop: "readTime",type:'dateTime' },
{ label: _Dashboard.reader, prop: "reader" },
{ label: _Dashboard.errorCode, prop: "errorCode" },
{ label: _Dashboard.errorMessage, prop: "errorMessage", type:"showDetail" },
{ label: _Dashboard.retryTimes, prop: "retryTimes" },
// ************** 暂时隐藏 ************************
// { label: _Public.creationTime, prop: "creationTime",type:'dateTime' },
// { label: _Public.creatorId, prop: "creatorId" },
// { label: _Public.lastModificationTime", prop: "lastModificationTime",type:'dateTime' },
// { label: _Public.lastModifierId, prop: "lastModifierId" },
// { label: _Public.ID, prop: "ID" },
]

258
fe/PC/src/views/interfaceBoard/dataExchangeFromOut.vue

@ -24,52 +24,278 @@
: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 { dataExchangeFromOut } from "@/api/wms-interface"
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 _this = this
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: _this.$t("ColumsDashboard.number"), prop: 'number', colSpan: 12, validType:'pointNumber' },
{ type: "input", label: _this.$t("ColumsPublic.remark"), prop: 'remark', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.dataType"), prop: 'dataType', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.tableType"), prop: 'tableType', colSpan: 12, validType:'pointNumber' },
{ type: "input", label: _this.$t("ColumsDashboard.dataAction"), prop: 'dataAction', colSpan: 12, validType:'pointNumber' },
{ type: "dateTime", label: _this.$t("ColumsDashboard.effectiveDate"), prop: 'effectiveDate', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.status"), prop: 'status', colSpan: 12, validType:'pointNumber' },
{ type: "input", label: _this.$t("ColumsDashboard.sourceSystem"), prop: 'sourceSystem', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataId"), prop: 'sourceDataId', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataGroupCode"), prop: 'sourceDataGroupCode', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataDetailCode"), prop: 'sourceDataDetailCode', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataContent"), prop: 'sourceDataContent', colSpan: 12, },
{ type: "dateTime", label: _this.$t("ColumsDashboard.writeTime"), prop: 'writeTime', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.writer"), prop: 'writer', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.destinationSystem"), prop: 'destinationSystem', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.destinationDataId"), prop: 'destinationDataId', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.destinationDataContent"), prop: 'destinationDataContent', colSpan: 12, },
{ type: "dateTime", label: _this.$t("ColumsDashboard.readTime"), prop: 'readTime', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.reader"), prop: 'reader', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.errorCode"), prop: 'errorCode', colSpan: 12, validType:'pointNumber' },
{ type: "input", label: _this.$t("ColumsDashboard.errorMessage"), prop: 'errorMessage', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.retryTimes"), prop: 'retryTimes', colSpan: 12, validType:'pointNumber'},
],
editForm: [
{ type: "input", label: _this.$t("ColumsDashboard.number"), prop: 'number', colSpan: 12, validType:'pointNumber' },
{ type: "input", label: _this.$t("ColumsPublic.remark"), prop: 'remark', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.dataType"), prop: 'dataType', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.tableType"), prop: 'tableType', colSpan: 12, validType:'pointNumber' },
{ type: "input", label: _this.$t("ColumsDashboard.dataAction"), prop: 'dataAction', colSpan: 12, validType:'pointNumber' },
{ type: "dateTime", label: _this.$t("ColumsDashboard.effectiveDate"), prop: 'effectiveDate', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.status"), prop: 'status', colSpan: 12, validType:'pointNumber' },
{ type: "input", label: _this.$t("ColumsDashboard.sourceSystem"), prop: 'sourceSystem', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataId"), prop: 'sourceDataId', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataGroupCode"), prop: 'sourceDataGroupCode', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataDetailCode"), prop: 'sourceDataDetailCode', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataContent"), prop: 'sourceDataContent', colSpan: 12, },
{ type: "dateTime", label: _this.$t("ColumsDashboard.writeTime"), prop: 'writeTime', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.writer"), prop: 'writer', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.destinationSystem"), prop: 'destinationSystem', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.destinationDataId"), prop: 'destinationDataId', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.destinationDataContent"), prop: 'destinationDataContent', colSpan: 12, },
{ type: "dateTime", label: _this.$t("ColumsDashboard.readTime"), prop: 'readTime', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.reader"), prop: 'reader', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.errorCode"), prop: 'errorCode', colSpan: 12, validType:'pointNumber' },
{ type: "input", label: _this.$t("ColumsDashboard.errorMessage"), prop: 'errorMessage', colSpan: 12, },
{ type: "input", label: _this.$t("ColumsDashboard.retryTimes"), 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
})
},
//
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:1302 2token
_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:1302
dataExchangeFromOut_delete(this.propsData.id).then(res => {
this.$successMsg('删除成功!')
this.Loading.appMainLoading = false
this.paging()
}).catch(err => {
this.Loading.appMainLoading = false
})
}).catch(() => {
//
});
}
}
}
}
</script>

Loading…
Cancel
Save