Browse Source

优化

noToken
安虹睿 1 year ago
parent
commit
9435f6de36
  1. 3
      PC/InterFace.Dash/public/config.js
  2. 3
      PC/InterFace.Dash/src/api/wms-interface.js
  3. 7
      PC/InterFace.Dash/src/components/umyTable/index.vue
  4. 24
      PC/InterFace.Dash/src/permission.js
  5. 181
      PC/InterFace.Dash/src/views/interfaceBoard/TestSchool.vue
  6. 182
      PC/InterFace.Dash/src/views/interfaceBoard/demo_detail_addbase.vue
  7. 0
      PC/InterFace.Dash/src/views/interfaceBoard/demo_read.vue

3
PC/InterFace.Dash/public/config.js

@ -1,5 +1,6 @@
// dev_win
window.SITE_CONFIG['base'] = 'http://dev.ccwin-in.com:60068'
// window.SITE_CONFIG['base'] = 'http://dev.ccwin-in.com:60068'
window.SITE_CONFIG['base'] = 'http://192.168.0.197:60068'
window.SITE_CONFIG['columnsApiNames'] = '/api/abp/application-configuration'
window.SITE_CONFIG['columnsApiNamesZh'] = 'Z'
window.SITE_CONFIG['isAutoLogin'] = true

3
PC/InterFace.Dash/src/api/wms-interface.js

@ -15,7 +15,8 @@ const initParams = (data) => {
export function getInterfaceBoard() {
return request({
method:'get',
url: base_api + colum_url
url: base_api + colum_url,
params:{IncludeLocalizationResources:true}
})
}

7
PC/InterFace.Dash/src/components/umyTable/index.vue

@ -347,6 +347,7 @@
<!-- json弹窗 -->
<el-dialog
id="copyJsonTextarea_dialog_ref"
:visible.sync="showJsonCopy"
:modal-append-to-body="false"
:append-to-body="true"
@ -855,9 +856,9 @@ export default {
this.$nextTick(()=>{
if(this.$refs.copyJsonTextarea_ref){
this.$refs.copyJsonTextarea_ref.focus()
// this.$nextTick(()=>{
// this.$refs.copyJsonTextarea_ref.scrollTop = 0
// })
this.$nextTick(()=>{
document.getElementById('copyJsonTextarea_dialog_ref').scrollTop = 0
})
}
})
},

24
PC/InterFace.Dash/src/permission.js

@ -82,18 +82,18 @@ router.beforeEach(async (to, from, next) => {
}
}else{
// 重新获取api接口表头
const _interfaceBoardColumnsNames = localStorage.getItem("interfaceBoardColumnsNames")
if( !_interfaceBoardColumnsNames || _interfaceBoardColumnsNames == 'undefined' || _interfaceBoardColumnsNames == 'null'){
getInterfaceBoard().then(result => {
let _zh = localStorage.getItem('columnsApiNamesZh')
localStorage.setItem("interfaceBoardColumnsNames", JSON.stringify(result.localization.values[_zh]));
setTimeout(()=>{
next()
},0)
})
}else{
next()
}
// const _interfaceBoardColumnsNames = localStorage.getItem("interfaceBoardColumnsNames")
// if( !_interfaceBoardColumnsNames || _interfaceBoardColumnsNames == 'undefined' || _interfaceBoardColumnsNames == 'null'){
getInterfaceBoard().then(result => {
let _zh = localStorage.getItem('columnsApiNamesZh')
localStorage.setItem("interfaceBoardColumnsNames", JSON.stringify(result.localization.values[_zh]));
setTimeout(()=>{
next()
},0)
})
// }else{
// next()
// }
}

181
PC/InterFace.Dash/src/views/interfaceBoard/TestSchool.vue

@ -0,0 +1,181 @@
<template>
<div class="page-box" v-loading="Loading.appMainLoading">
<tablePagination
v-if="apiColumns_Table"
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="apiColumns_Table"
@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>
<curren-Drawer
:title="apiColumns_DesTions"
:tableColumns="apiColumns_DetailsTable"
:tabsDesTions="apiColumns_DesTions"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:dropdownData="dropdownData"
:propsData="propsData"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:totalCount="totalCountDetails"
:currentPage="oldSkipCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
></curren-Drawer>
<!-- 新增与编辑 -->
<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>
<filterForDetailPage
v-if="filterForDetailShow"
:listColumns="apiColumns_DetailsTable"
:parentColumns="apiColumns_Table"
@closeDialog="changeFilterForDetailShow"
></filterForDetailPage>
<!-- DeleteApi="TestSchoolDetailList_delete" -->
<!-- todo: 明细查询中的parentColumns 是否需要独立表头现与列表页面一致-->
</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 { getToken } from '@/utils/auth'
import * as tableColumns_api from "@/utils/tableColumns_api/index" //
import * as tabsDesTions_api from "@/utils/tabsDesTions_api/index" //
import * as detailsTableColumns_api from "@/utils/detailsTableColumns_api/index" //
export default {
name: "TestSchool",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
newAndEdiDialogMixins
],
computed: {
editDialog: {
get: function () {
return this.displayDialog.newDialog || this.displayDialog.editDialog;
},
},
},
data() {
return {
//
currenButtonData: [
this.defaultAddBtn(),//
this.defaultExportBtn({
isRedundance:true,
isDetailExport:true
}),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
this.defaultFilterForDetailBtn()//
],
//
filterForDetailShow:false,
//
CreateFormData: {
schoolName:null,
orderType:null,
details:null,
details: [
{
"lastModifierId": "ad731144-d789-f322-fede-327cac55dd36",
"creationTime": "1978-07-18T22:00:37.5Z",
"creatorId": "19e78d1b-6203-8d6d-b6e7-ae5b503c0824",
"id": "5926ec25-2132-ba25-6b93-e453c17f00e2",
"studentName": "张三0712",
"orderType": 712,
"masterId": "a044e2c6-3bc6-7cdd-55a6-f1a2a9682ccb",
"lastModificationTime": "1946-12-30T14:22:31.982Z"
},
],
},
//
editFormData: {
id:null,
schoolName:null,
orderType:null,
details:null,
},
//
CreateForm: [
{ type: "input", label: '名称', prop: 'schoolName', colSpan: 12 },
{ type: "input", label: 'orderType', prop: 'orderType', colSpan: 12 },
],
//
editForm: [
{ type: "input", label: '名称', prop: 'schoolName', colSpan: 12 },
{ type: "input", label: 'orderType', prop: 'orderType', colSpan: 12 },
],
editOptions: {},
editRules: {
cerateRule: {
schoolName: [{ required: true, trigger: "blur", message: "不可为空" }],
},
editRule: {
schoolName: [{ required: true, trigger: "blur", message: "不可为空" }],
}
},
};
},
mounted() {
this.initApiColumns()
this.paging();
},
methods: {
// api
initApiColumns(){
this.apiColumns_Table = tableColumns_api[this.$route.name]
this.apiColumns_DesTions = tabsDesTions_api[this.$route.name]
this.apiColumns_DetailsTable = detailsTableColumns_api[this.$route.name]
},
}
}
</script>
<style lang="scss" scoped>
@import "@/styles/basicData.scss";
</style>

182
PC/InterFace.Dash/src/views/interfaceBoard/demo_detail_addbase.vue

@ -0,0 +1,182 @@
<template>
<div class="page-box" v-loading="Loading.appMainLoading">
<!-- 带明细查询+基础增删改查单层样本 -->
<tablePagination
v-if="apiColumns_Table"
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="apiColumns_Table"
@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>
<curren-Drawer
:title="apiColumns_DesTions"
:tableColumns="apiColumns_DetailsTable"
:tabsDesTions="apiColumns_DesTions"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:dropdownData="dropdownData"
:propsData="propsData"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:totalCount="totalCountDetails"
:currentPage="oldSkipCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
></curren-Drawer>
<!-- 新增与编辑 -->
<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>
<filterForDetailPage
v-if="filterForDetailShow"
:listColumns="apiColumns_DetailsTable"
:parentColumns="apiColumns_Table"
@closeDialog="changeFilterForDetailShow"
></filterForDetailPage>
<!-- DeleteApi="TestSchoolDetailList_delete" -->
<!-- todo: 明细查询中的parentColumns 是否需要独立表头现与列表页面一致-->
</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 { getToken } from '@/utils/auth'
import * as tableColumns_api from "@/utils/tableColumns_api/index" //
import * as tabsDesTions_api from "@/utils/tabsDesTions_api/index" //
import * as detailsTableColumns_api from "@/utils/detailsTableColumns_api/index" //
export default {
name: "TestSchool",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
newAndEdiDialogMixins
],
computed: {
editDialog: {
get: function () {
return this.displayDialog.newDialog || this.displayDialog.editDialog;
},
},
},
data() {
return {
//
currenButtonData: [
this.defaultAddBtn(),//
this.defaultExportBtn({
isRedundance:true,
isDetailExport:true
}),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
this.defaultFilterForDetailBtn()//
],
//
filterForDetailShow:false,
//
CreateFormData: {
schoolName:null,
orderType:null,
details:null,
details: [
{
"lastModifierId": "ad731144-d789-f322-fede-327cac55dd36",
"creationTime": "1978-07-18T22:00:37.5Z",
"creatorId": "19e78d1b-6203-8d6d-b6e7-ae5b503c0824",
"id": "5926ec25-2132-ba25-6b93-e453c17f00e2",
"studentName": "张三0712",
"orderType": 712,
"masterId": "a044e2c6-3bc6-7cdd-55a6-f1a2a9682ccb",
"lastModificationTime": "1946-12-30T14:22:31.982Z"
},
],
},
//
editFormData: {
id:null,
schoolName:null,
orderType:null,
details:null,
},
//
CreateForm: [
{ type: "input", label: '名称', prop: 'schoolName', colSpan: 12 },
{ type: "input", label: 'orderType', prop: 'orderType', colSpan: 12 },
],
//
editForm: [
{ type: "input", label: '名称', prop: 'schoolName', colSpan: 12 },
{ type: "input", label: 'orderType', prop: 'orderType', colSpan: 12 },
],
editOptions: {},
editRules: {
cerateRule: {
schoolName: [{ required: true, trigger: "blur", message: "不可为空" }],
},
editRule: {
schoolName: [{ required: true, trigger: "blur", message: "不可为空" }],
}
},
};
},
mounted() {
this.initApiColumns()
this.paging();
},
methods: {
// api
initApiColumns(){
this.apiColumns_Table = tableColumns_api[this.$route.name]
this.apiColumns_DesTions = tabsDesTions_api[this.$route.name]
this.apiColumns_DetailsTable = detailsTableColumns_api[this.$route.name]
},
}
}
</script>
<style lang="scss" scoped>
@import "@/styles/basicData.scss";
</style>

0
PC/InterFace.Dash/src/views/interfaceBoard/demo.vue → PC/InterFace.Dash/src/views/interfaceBoard/demo_read.vue

Loading…
Cancel
Save