9 changed files with 741 additions and 570 deletions
@ -1,95 +1,341 @@ |
|||||
<template> |
<template> |
||||
<div class="page-box" v-loading="Loading.appMainLoading"> |
<div class="page-box" v-loading="Loading.appMainLoading"> |
||||
<tablePagination |
<tablePagination |
||||
:currenButtonData="currenButtonData" |
:currenButtonData="currenButtonData" |
||||
:tableData="tableData" |
:tableData="tableData" |
||||
:tableLoading="Loading.tableLoading" |
:tableLoading="Loading.tableLoading" |
||||
:tableColumns="tableColumns" |
:tableColumns="tableColumns" |
||||
@rowDrop="rowDrop" |
@rowDrop="rowDrop" |
||||
:totalCount="totalCount" |
:totalCount="totalCount" |
||||
:multipleSelection="multipleSelection" |
:multipleSelection="multipleSelection" |
||||
:MaxResultCount="PageListParams.MaxResultCount" |
:MaxResultCount="PageListParams.MaxResultCount" |
||||
@topbutton="topbutton" |
@topbutton="topbutton" |
||||
@inlineDialog="inlineDialog" |
@inlineDialog="inlineDialog" |
||||
@sortChange="sortChange" |
@sortChange="sortChange" |
||||
@alertoldSkipCount="alertoldSkipCount" |
@alertoldSkipCount="alertoldSkipCount" |
||||
@alterResultCount="alterResultCount" |
@alterResultCount="alterResultCount" |
||||
@handleSelectionChange="handleSelectionChange" |
@handleSelectionChange="handleSelectionChange" |
||||
:currentPageProps="oldSkipCount" |
:currentPageProps="oldSkipCount" |
||||
:quicklySearchOption="quicklySearchOption" |
:quicklySearchOption="quicklySearchOption" |
||||
@quicklySearchClick="quicklySearchClick" |
@quicklySearchClick="quicklySearchClick" |
||||
@quicklySearchClear="quicklySearchClear" |
@quicklySearchClear="quicklySearchClear" |
||||
:primarySearchOption="primarySearchOption" |
:primarySearchOption="primarySearchOption" |
||||
@overallSearchFormClick="overallSearchFormClick" |
@overallSearchFormClick="overallSearchFormClick" |
||||
:httpOverallSearchData="httpOverallSearchData" |
:httpOverallSearchData="httpOverallSearchData" |
||||
> |
> |
||||
</tablePagination> |
</tablePagination> |
||||
</div> |
<!-- 新增与编辑 --> |
||||
</template> |
<newAndEdiDialog |
||||
<script> |
ref="newAndEdiDialog" |
||||
import { tableMixins } from "@/mixins/TableMixins"; |
:loading="Loading.newAndEdiLoading" |
||||
import { LoadingMixins } from "@/mixins/LoadingMixins"; |
:active="active" |
||||
import { drawerMixins } from "@/mixins/drawerMixins" |
:pageStatus="pageStatus" |
||||
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"; |
:formReveal="formReveal" |
||||
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins" |
:formTitle="formTitle" |
||||
import { mixins } from "@/mixins/mixins"; |
:displayDialog="editDialog" |
||||
import { filterSelectMixins } from '@/mixins/filter-Select' |
:FormData="formReveal ? CreateFormData : editFormData" |
||||
import { getInterfaceBoard,dataExchangeFromOut,dataExchangeFromOut_save,dataExchangeFromOut_delete } from "@/api/wms-interface" |
:Form="formReveal ? CreateForm : editForm" |
||||
import { getToken } from '@/utils/auth' |
:Options="editOptions" |
||||
|
:Handle="editHandle" |
||||
export default { |
:Rules="formReveal ? editRules.cerateRule : editRules.editRule" |
||||
name: "dataExchangeFromOut", |
@FormSubmit="FormSubmit" |
||||
mixins: [ |
@close="FormClose" |
||||
tableMixins, |
@goBack="goBack" |
||||
LoadingMixins, |
></newAndEdiDialog> |
||||
drawerMixins, |
<curren-Drawer |
||||
TableHeaderMixins, |
:title="tableColumns" |
||||
mixins, |
:tableColumns="tableColumns" |
||||
filterSelectMixins, |
:DrawerLoading="Loading.DrawerLoading" |
||||
newAndEdiDialogMixins |
:drawer="displayDialog.detailsDialog" |
||||
], |
:dropdownData="dropdownData" |
||||
computed: { |
:propsData="propsData" |
||||
editDialog: { |
:tabsDesTions="tabsDesTions" |
||||
get: function () { |
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
||||
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
@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 { TestSchool,TestSchool_save,TestSchool_delete } from "@/api/wms-interface" |
||||
|
import { getToken } from '@/utils/auth' |
||||
|
|
||||
|
export default { |
||||
|
name: "TestSchool", |
||||
|
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: { |
||||
|
schoolName:null, |
||||
|
orderType:null, |
||||
|
// 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: { |
||||
|
id:null, |
||||
|
schoolName:null, |
||||
|
orderType:null, |
||||
|
// 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: '名称', prop: 'schoolName', colSpan: 12 }, |
||||
|
{ type: "input", label: 'orderType', prop: 'orderType', 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: '名称', prop: 'schoolName', colSpan: 12 }, |
||||
|
{ type: "input", label: 'orderType', prop: 'orderType', colSpan: 12 }, |
||||
|
// { 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: { |
||||
|
schoolName: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
// 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: { |
||||
|
schoolName: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
// 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 |
||||
|
TestSchool(this.PageListParams,true) |
||||
|
.then(result => { |
||||
|
let res = result.data |
||||
|
this.tableData = res.items |
||||
|
this.totalCount = res.totalCount |
||||
|
this.pagingCallback(callback) |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.Loading.tableLoading = false |
||||
|
}) |
||||
}, |
}, |
||||
data() { |
//打开抽屉 |
||||
let _this = this |
inlineDialog(val) { |
||||
return { |
this.Loading.DrawerLoading = true |
||||
tableLoading:false, |
this.displayDialog.detailsDialog = true; |
||||
//常用按钮数据 |
TestSchool(this.PageListParams) |
||||
currenButtonData: [ |
.then(result => { |
||||
// this.defaultAddBtn(),//新增 |
this.propsData = result.data.items.filter(item=>{ |
||||
this.defaultFieldSettingBtn(),//字段设置 |
return item.id == val.id |
||||
this.defaultFreshBtn(),//刷新 |
})[0] |
||||
// this.defaultFilterBtn(),//筛选 |
this.inlineDialogCallback() |
||||
], |
}) |
||||
}; |
.catch(err => { |
||||
|
this.Loading.DrawerLoading = false |
||||
|
}) |
||||
}, |
}, |
||||
mounted() { |
// 新增/编辑提交 |
||||
this.paging(); |
FormSubmit(val){ |
||||
|
this.Loading.tableLoading = true |
||||
|
let _data = this.formReveal ? this.CreateFormData : this.editFormData |
||||
|
TestSchool_save(_data,this.formReveal) |
||||
|
.then(result => { |
||||
|
this.FormResult("success") |
||||
|
this.Loading.tableLoading = false |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.FormResult("error") |
||||
|
this.Loading.tableLoading = false |
||||
|
}) |
||||
|
// 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为真是新增 |
||||
|
// TestSchool_save(_data,this.formReveal) |
||||
|
// .then(result => { |
||||
|
// this.Loading.tableLoading = false |
||||
|
// }) |
||||
|
// .catch(err => { |
||||
|
// this.Loading.tableLoading = false |
||||
|
// }) |
||||
}, |
}, |
||||
methods: { |
// FormSubmit(val){ |
||||
//渲染数据 |
// this.Loading.tableLoading = true |
||||
paging(callback) { |
// const _data = new URLSearchParams(); |
||||
this.Loading.tableLoading = true; |
// for(let item in this.CreateFormData){ |
||||
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
// _data.append('ViewModel.'+item.slice(0,1).toUpperCase() +item.slice(1).toLowerCase(), this.CreateFormData[item]) |
||||
dataExchangeFromOut(this.PageListParams) |
// } |
||||
.then(result => { |
// // todo:1、接口302 2、token取值的问题 |
||||
let res = result.data |
// _data.append('__RequestVerificationToken',getToken()) |
||||
this.tableData = res.items |
// // this.formReveal为真是新增 |
||||
this.totalCount = res.totalCount |
// TestSchool_save(_data,this.formReveal) |
||||
this.pagingCallback(callback) |
// .then(result => { |
||||
}) |
// this.Loading.tableLoading = false |
||||
.catch(err => { |
// }) |
||||
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 |
||||
|
TestSchool_delete(this.propsData.id).then(res => { |
||||
|
this.$successMsg('删除成功!') |
||||
|
this.Loading.appMainLoading = false |
||||
|
this.paging() |
||||
|
}).catch(err => { |
||||
|
this.Loading.appMainLoading = false |
||||
}) |
}) |
||||
}, |
}).catch(() => { |
||||
|
//取消操作 |
||||
|
}); |
||||
|
} |
||||
} |
} |
||||
} |
} |
||||
</script> |
} |
||||
|
</script> |
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
@import "@/styles/basicData.scss"; |
@import "@/styles/basicData.scss"; |
||||
</style> |
</style> |
@ -1,304 +0,0 @@ |
|||||
<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