9 changed files with 741 additions and 570 deletions
@ -1,95 +1,341 @@ |
|||
<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> |
|||
</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 { getInterfaceBoard,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; |
|||
<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 |
|||
ref="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 { 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 |
|||
return { |
|||
tableLoading:false, |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
// this.defaultAddBtn(),//新增 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
// this.defaultFilterBtn(),//筛选 |
|||
], |
|||
}; |
|||
//打开抽屉 |
|||
inlineDialog(val) { |
|||
this.Loading.DrawerLoading = true |
|||
this.displayDialog.detailsDialog = true; |
|||
TestSchool(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 |
|||
}) |
|||
}, |
|||
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: { |
|||
//渲染数据 |
|||
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 |
|||
// 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为真是新增 |
|||
// TestSchool_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 |
|||
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> |
|||
@import "@/styles/basicData.scss"; |
|||
</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