From e7361ceabe69cce946884a6a4af223ff3cdfa89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Mon, 24 Jul 2023 16:05:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Code/Fe/src/App.vue | 9 +- Code/Fe/src/api/wms-interface.js | 15 +- .../components/filterForDetailPage/index.vue | 60 +- .../Fe/src/components/umyTable/index copy.vue | 993 ++++++++++++++++++ Code/Fe/src/components/umyTable/index.vue | 386 ++----- Code/Fe/src/mixins/TableMixins.js | 119 ++- Code/Fe/src/permission.js | 35 +- Code/Fe/src/router/index.js | 2 +- Code/Fe/src/store/getters.js | 2 + Code/Fe/src/store/modules/definition.js | 33 +- Code/Fe/src/store/modules/permission.js | 12 +- .../src/utils/detailsPageColumns_api/index.js | 8 +- .../utils/detailsTableColumns_api/index.js | 8 +- Code/Fe/src/utils/tableColumns_api/index.js | 8 +- Code/Fe/src/utils/tabsDesTions_api/index.js | 8 +- .../src/views/interfaceBoard/TestSchool.vue | 15 +- Code/Fe/src/views/login/index.vue | 10 - 17 files changed, 1309 insertions(+), 414 deletions(-) create mode 100644 Code/Fe/src/components/umyTable/index copy.vue diff --git a/Code/Fe/src/App.vue b/Code/Fe/src/App.vue index a88e274..10d62c0 100644 --- a/Code/Fe/src/App.vue +++ b/Code/Fe/src/App.vue @@ -16,7 +16,14 @@ localStorage.setItem('isSinglePage',window.SITE_CONFIG['isSinglePage']) localStorage.setItem('userNameOrEmailAddress',window.SITE_CONFIG['userNameOrEmailAddress']) localStorage.setItem('client_secret',window.SITE_CONFIG['client_secret']) localStorage.setItem('menuHiddenConfig',window.SITE_CONFIG['menuHiddenConfig']) - +// 获取浏览器语言 +const language_brow = (navigator.language || navigator.browserLanguage) +console.log(21,language_brow) +if(language_brow == 'zh'){ + localStorage.setItem('browserLanguage','zh-Hans') +}else{ + localStorage.setItem('browserLanguage','en') +} // localStorage.setItem('user',window.SITE_CONFIG['user']) // localStorage.setItem('print',window.SITE_CONFIG['print']) // localStorage.setItem('warehouseCode',window.SITE_CONFIG['warehouseCode']) diff --git a/Code/Fe/src/api/wms-interface.js b/Code/Fe/src/api/wms-interface.js index b3c0c07..9f09d03 100644 --- a/Code/Fe/src/api/wms-interface.js +++ b/Code/Fe/src/api/wms-interface.js @@ -8,7 +8,10 @@ export function getInterfaceBoard() { return request({ method:'get', url: base_api + colum_url, - params:{CultureName:'zh-Hans'} + params:{ + CultureName:localStorage.getItem('browserLanguage'), + OnlyDynamics:false + } // params:{IncludeLocalizationResources:true} }) } @@ -22,7 +25,6 @@ export function getDefinitionMenu(IncludeTypes) { }) } - // 获取枚举数据 export async function getApiEnumList() { return request({ @@ -32,6 +34,15 @@ export async function getApiEnumList() { }) } +// 获取dto列数据 +export async function getDtoColumnType(api) { + if(!api)return + return request({ + method:'post', + url: base_api + '/api/'+ api +'/get-dto-column-type', + }) +} + // 获取dto列数据 export async function getDtoColumnType(api) { return request({ diff --git a/Code/Fe/src/components/filterForDetailPage/index.vue b/Code/Fe/src/components/filterForDetailPage/index.vue index e268c7f..41da2b7 100644 --- a/Code/Fe/src/components/filterForDetailPage/index.vue +++ b/Code/Fe/src/components/filterForDetailPage/index.vue @@ -127,6 +127,7 @@ import { filterSelectMixins } from '@/mixins/filter-Select' // import { TestSchoolDetailList,TestSchoolDetailList_delete } from "@/api/wms-interface" import * as interfaceApi from "@/api/wms-interface" import {getListDesById,getPageListForDetail} from "@/api/wms-api" +import { getDtoColumnType } from "@/api/wms-interface" import * as allUrlOption from '@/utils/baseData/urlOption' export default { name: 'filterForDetailPage', @@ -174,10 +175,10 @@ props: { default: null }, // 列表数据-表头 - listColumns:{ - type: Array, - default: null - }, + // listColumns:{ + // type: Array, + // default: null + // }, // 主表数据-表头 parentColumns:{ type: Array, @@ -215,6 +216,7 @@ data () { showParentTitle:null,//显示父级数据弹窗-title showParentTableData:null,//显示父级数据弹窗-数据 showParentLoading:false,//显示父级数据弹窗-加载 + listColumns:[],//表头数据 } }, mounted(){ @@ -251,23 +253,53 @@ methods: { paging(callback){ this.Loading.tableLoading = true this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount - getPageListForDetail(this.PageListParams,this.URLOption_detailList) - // interfaceApi[this.URLOption_detailList](this.PageListParams) - .then(result => { + Promise.all([ + getDtoColumnType(this.URLOption_detailList), + getPageListForDetail(this.PageListParams,this.URLOption_detailList) + ]).then((allData) => { + // 表头处理 + if(allData[0]){ + let _parentName = this.URLOption_detailList.substr(0,this.URLOption_detailList.indexOf('/')) + let _Columns = this.initApiColumnsForDto(allData[0],allData[1].items[0],_parentName) + this.listColumns = this.initTableColumns(_Columns) + } + // 页面数据处理 + if(allData[1]){ this.Loading.tableLoading = false this.tableData = [] - result.items.forEach(item=>{ + allData[1].items.forEach(item=>{ item.deleteTipVisible = false this.tableData.push(item) }) - this.totalCount = result.totalCount this.pagingCallback(callback) - }) - .catch(err => { - this.Loading.tableLoading = false - this.$message.error("数据获取失败") - }) + this.totalCount = allData[1].totalCount + } + this.pagingCallback(callback) + }).catch(()=>{ + this.Loading.tableLoading = false + this.$message.error("数据获取失败") + }) }, + // paging(callback){ + // this.Loading.tableLoading = true + // this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount + // getPageListForDetail(this.PageListParams,this.URLOption_detailList) + // // interfaceApi[this.URLOption_detailList](this.PageListParams) + // .then(result => { + // this.Loading.tableLoading = false + // this.tableData = [] + // result.items.forEach(item=>{ + // item.deleteTipVisible = false + // this.tableData.push(item) + // }) + // this.totalCount = result.totalCount + // this.pagingCallback(callback) + // }) + // .catch(err => { + // this.Loading.tableLoading = false + // this.$message.error("数据获取失败") + // }) + // }, // 查看主表信息 showParentHandleForDetail(data){ this.showParentTitle = `${data[this.URLOption_masterName] || ''} 主表信息` diff --git a/Code/Fe/src/components/umyTable/index copy.vue b/Code/Fe/src/components/umyTable/index copy.vue new file mode 100644 index 0000000..bd21a40 --- /dev/null +++ b/Code/Fe/src/components/umyTable/index copy.vue @@ -0,0 +1,993 @@ + + + \ No newline at end of file diff --git a/Code/Fe/src/components/umyTable/index.vue b/Code/Fe/src/components/umyTable/index.vue index bd21a40..1c82757 100644 --- a/Code/Fe/src/components/umyTable/index.vue +++ b/Code/Fe/src/components/umyTable/index.vue @@ -84,284 +84,36 @@ * @@ -375,11 +127,13 @@ :append-to-body="true" :show-close="true" :title="'内容详情'" + :close-on-click-modal="true" + :close-on-press-escape="true" > {{ showDetailData ? showDetailData + "" : showDetailData }} - + { @@ -883,28 +639,50 @@ export default { } } } + console.log(666,this.showJsonData) + this.showJsonData = _arr + this.showJsonData_str = JSON.stringify(JSON.parse(JSON.stringify(this.showJsonData)), null, '\t') this.$emit("showJsonTable", row); }, // 复制Json按钮 copyJsonHandle(){ + console.log(651,window.isSecureContext) this.showJsonCopy = true - navigator.clipboard.writeText(this.showJsonData_str) - .then(() => { - this.$message.success('复制成功'); - }) - .catch(err => { - this.$message.error('复制失败'); - }); - this.$nextTick(()=>{ - if(this.$refs.copyJsonTextarea_ref){ - this.$refs.copyJsonTextarea_ref.focus() + if (navigator.clipboard && window.isSecureContext) { + navigator.clipboard.writeText(this.showJsonData_str) + .then(() => { + this.$message.success('复制成功'); + }) + .catch(err => { + this.$message.error('复制失败'); + }); + }else { + // 创建text area + const textArea = document.createElement('textarea') + textArea.value = this.showJsonData_str + // 使text area不在viewport,同时设置不可见 + document.body.appendChild(textArea) + textArea.focus() + textArea.select() + return new Promise((resolve, reject) => { + // 执行复制命令并移除文本框 + document.execCommand('copy') ? resolve() : reject(new Error('出错了')) + textArea.remove() + }).then(() => { this.$nextTick(()=>{ - document.getElementById('copyJsonTextarea_dialog_ref').scrollTop = 0 + if(this.$refs.copyJsonTextarea_ref){ + this.$message.success('复制成功'); + this.$refs.copyJsonTextarea_ref.focus() + document.getElementById('copyJsonTextarea_dialog_ref').scrollTop = 0 + } }) - } - }) + },() => { + this.$message.error('复制失败'); + }) + } + }, //点击按钮打开自定义弹窗 buttonClick(row, index, label) { @@ -918,6 +696,36 @@ export default { buttonOperationClick_right(row, item, index) { this.$emit("buttonOperationClick_right", row, item, index); }, + // 转义枚举值 + initApiEnumList(item,data){ + let _enumListOp = this.$store.getters.enumList[item.apiBaseType] + let _item_enumList = {} + _enumListOp.enumValues.forEach((item,key)=>{ + _item_enumList[item] = _enumListOp.enumNames[key] + }) + return _item_enumList[data] || '未定义' + }, + // 其他类型转义,直接显示 | 点击可出详情 | 点击可点出json + initApiOtherType(data){ + try { + let _json = JSON.parse(data) + // 数值类型 + if(typeof _json == 'number' && _json){ + return [data,'show'] + }else{ + return [data,'json'] + } + } + // 直接显示 + catch(err){ + return [data,'detail'] + } + }, + // 判断操作 + showTypeHandle(type,row){ + if(type == 'detail')this.showDetailInfo(row) + if(type == 'json')this.showJsonTable(row) + }, }, }; diff --git a/Code/Fe/src/mixins/TableMixins.js b/Code/Fe/src/mixins/TableMixins.js index 251c472..edf881a 100644 --- a/Code/Fe/src/mixins/TableMixins.js +++ b/Code/Fe/src/mixins/TableMixins.js @@ -48,6 +48,8 @@ export const tableMixins = { URLOption_base:allUrlOption[this.$route.name].baseURL, //主表-明细 URLOption_detail:allUrlOption[this.$route.name].detailURL, + //明细列表(主表明细找枚举转义使用) + URLOption_detailList:allUrlOption[this.$route.name].detailListURL, // 主表-明细-筛选数据同步回显 detailSearchDataFE:null, // 主表-操作列 @@ -56,40 +58,54 @@ export const tableMixins = { }, methods: { // 获取通过api的表头数据,不可以在初始化处理,因为接口返回问题 - initApiColumns(table,des,detailsTable,detailsPage){ - // 赋值表头数据 - // if(table && table[this.$route.name])this.apiColumns_Table = this.initTableColumns(table[this.$route.name]) - if(des && des[this.$route.name])this.apiColumns_DesTions = des[this.$route.name] - if(detailsTable && detailsTable[this.$route.name])this.apiColumns_DetailsTable = this.initTableColumns(detailsTable[this.$route.name],'detail_api') - if(detailsPage && detailsPage[this.$route.name])this.apiColumns_DetailsPage = this.initTableColumns(detailsPage[this.$route.name],'detailPage_api') + // initApiColumns(table,des,detailsTable,detailsPage){ + // // 赋值表头数据 + // // if(table && table[this.$route.name])this.apiColumns_Table = this.initTableColumns(table[this.$route.name]) + // if(des && des[this.$route.name])this.apiColumns_DesTions = des[this.$route.name] + // if(detailsTable && detailsTable[this.$route.name])this.apiColumns_DetailsTable = this.initTableColumns(detailsTable[this.$route.name],'detail_api') + // if(detailsPage && detailsPage[this.$route.name])this.apiColumns_DetailsPage = this.initTableColumns(detailsPage[this.$route.name],'detailPage_api') + // }, + // get-dto-column-type接口表头类型初始化 + initApiColumnsForDto(data,list,titleName){ + let _coloums = data.filter(item=>{ + return item.dtoType == 'S' + }) + let _Columns_Table = [] + if(_coloums && _coloums.length > 0){ + let _data = _coloums[0].columnsTypes + _data.forEach(item=>{ + let _item = { + label:initFromApiColumnsLable(titleName + item.z_ColumnName) || item.z_ColumnName, + prop:firstWordSizeChange(item.z_ColumnName), + apiType:item.z_ColumnType, + apiBaseType:item.z_ColumnBaseType, + apiIsEnum:item.isEnum + } + // 如果list接口存在数据 ,与list接口返回字段比较处理,list接口存在的话则追加 + let _if = firstWordSizeChange(item.z_ColumnName) != 'details' + if(list && list.length > 0){ + _if = firstWordSizeChange(item.z_ColumnName) in list && firstWordSizeChange(item.z_ColumnName) != 'details' + } + if(_if){ + _Columns_Table.push(_item) + } + }) + } + return _Columns_Table }, //渲染数据 paging(callback) { this.Loading.tableLoading = true; this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount Promise.all([ - getDtoColumnType(this.$route.name), + getDtoColumnType(this.URLOption_base), getPageList(this.PageListParams, this.URLOption_base) ]).then((allData) => { // 表头处理 if(allData[0]){ - let _coloums = allData[0].filter(item=>{ - return item.dtoType == 'S' - }) - let _Columns_Table = [] - if(_coloums && _coloums.length > 0){ - let _data = _coloums[0].columnsTypes - _data.forEach(item=>{ - let _item = { - label:initFromApiColumnsLable(this.$route.name + item.z_ColumnName) || item.z_ColumnName, - prop:firstWordSizeChange(item.z_ColumnName), - apiType:item.z_ColumnType, - isEnum:item.isEnum - } - _Columns_Table.push(_item) - }) - } - this.apiColumns_Table = this.initTableColumns(_Columns_Table) + let _Columns = this.initApiColumnsForDto(allData[0],allData[1].items[0] ,this.$route.name) + this.apiColumns_Table = this.initTableColumns(_Columns) + this.apiColumns_DesTions = _Columns } // 页面数据处理 if(allData[1]){ @@ -97,17 +113,10 @@ export const tableMixins = { this.totalCount = allData[1].totalCount } this.pagingCallback(callback) - console.log(111,this.apiColumns_Table,this.tableData) - }).catch(()=>{ + }).catch((err)=>{ this.Loading.tableLoading = false + if(error_callback)error_callback() }) - // getPageList(this.PageListParams, this.URLOption_base).then(res => { - // this.tableData = res.items - // this.totalCount = res.totalCount - // this.pagingCallback(callback) - // }).catch(err => { - // this.Loading.tableLoading = false - // }) }, //接受排序信息并改变视图 sortChange(val) { @@ -147,24 +156,35 @@ export const tableMixins = { this.Loading.DrawerLoading = true this.displayDialog.detailsDialog = true; let _url = this.URLOption_detail ? this.URLOption_detail : this.URLOption_base - getDetailed(val.id, _url).then(res => { - // 打印使用的全部数据存储 - this.tableDataDetails = JSON.parse(JSON.stringify(res)) - this.propsData = res - if (res.details) { - if(this.$refs.currenDrawer_Ref){ - this.$refs.currenDrawer_Ref.getDetailList(res,()=>{ - this.inlineDialogCallback() - },()=>{ - this.Loading.DrawerLoading = false - }) + Promise.all([ + getDtoColumnType(this.URLOption_detailList), + getDetailed(val.id, _url) + ]).then((allData) => { + // 表头处理 + if(allData[0]){ + let _parentName = this.URLOption_detailList.substr(0,this.URLOption_detailList.indexOf('/')) + this.initApiColumnsForDto(allData[0],allData[1].details[0],_parentName) + this.apiColumns_DetailsTable = this.initTableColumns(this.initApiColumnsForDto(allData[0],allData[1].details[0],_parentName)) + } + // 页面数据处理 + if(allData[1]){ + let res = allData[1] + // 打印使用的全部数据存储 + this.tableDataDetails = JSON.parse(JSON.stringify(res)) + this.propsData = res + if (res.details) { + if(this.$refs.currenDrawer_Ref){ + this.$refs.currenDrawer_Ref.getDetailList(res,()=>{ + this.inlineDialogCallback() + },()=>{ + this.Loading.DrawerLoading = false + }) + } + }else{ + this.Loading.DrawerLoading = false } - // 前端分页处理 - // this.propsData = this.detailListPageFromFE(res) - }else{ - this.Loading.DrawerLoading = false } - }).catch(err => { + }).catch(()=>{ this.Loading.DrawerLoading = false }) }, @@ -277,7 +297,6 @@ export const tableMixins = { // if( _item.name == 'search' || _item.name == 'moreList-search'){ // let _searchObj = {} // let searchData = options.data_moreList.filters; - // console.log(299,searchData) // searchData.forEach(item=>{ // _searchObj[item.column] = item.value // }) diff --git a/Code/Fe/src/permission.js b/Code/Fe/src/permission.js index ca62732..ab774e3 100644 --- a/Code/Fe/src/permission.js +++ b/Code/Fe/src/permission.js @@ -6,7 +6,6 @@ import 'nprogress/nprogress.css' // progress bar style import { getToken } from '@/utils/auth' // get token from cookie import getPageTitle from '@/utils/get-page-title' import { asyncRoutes } from '@/router' -import { getInterfaceBoard } from "@/api/wms-interface" import { login,getUsersByUserName } from "@/api/wms-auth" NProgress.configure({ @@ -19,6 +18,16 @@ router.beforeEach(async (to, from, next) => { // set page title document.title = getPageTitle() + // 获取枚举数据 + if(!store.getters.enumList || store.getters.enumList.length <= 0){ + await store.dispatch('definition/getEnumList') + } + + // // 获取表头转义 + // if(!store.getters.columZHList || store.getters.columZHList.length <= 0){ + // await store.dispatch('definition/getColumZHList') + // } + // 判断是否自动登录 let isAutoLogin = JSON.parse(localStorage.getItem('isAutoLogin')) const interfaceBoardColumnsNames = localStorage.getItem("interfaceBoardColumnsNames") @@ -52,11 +61,12 @@ router.beforeEach(async (to, from, next) => { }) } }else{ - console.log('没有store.getters.currentUserInfo',store.getters.currentUserInfo) + // console.log('没有store.getters.currentUserInfo',store.getters.currentUserInfo) if(!interfaceBoardColumnsNames){ console.log('没有interfaceBoardColumnsNames',interfaceBoardColumnsNames) - const accessRoutes = await store.dispatch('permission/getApiColumnsNames') - router.addRoutes(accessRoutes) + await store.dispatch('definition/getColumZHList') + // const accessRoutes = await store.dispatch('permission/getApiColumnsNames') + // router.addRoutes(accessRoutes) next({ ...to, query:{ @@ -91,14 +101,15 @@ router.beforeEach(async (to, from, next) => { replace: true }) }).catch(()=>{ - next({ - path:'/login', - query:{ - isAutoLogin:to.query.isAutoLogin, - isSinglePage:to.query.isSinglePage - }, - replace: true - }) + next() + // next({ + // path:'/login', + // query:{ + // isAutoLogin:to.query.isAutoLogin, + // isSinglePage:to.query.isSinglePage + // }, + // replace: true + // }) // next(`/login?loginName=${to.query.loginName}&isAutoLogin=${to.query.isAutoLogin}`) // next(`/login`) Message.error('获取用户信息失败,请重试!') diff --git a/Code/Fe/src/router/index.js b/Code/Fe/src/router/index.js index f94fb44..f3a3c8b 100644 --- a/Code/Fe/src/router/index.js +++ b/Code/Fe/src/router/index.js @@ -87,7 +87,7 @@ export let constantRoutes = [ name: 'Dashboard', meta: { keepAlive : true, - title: '系统首页', + title: localStorage.getItem('browserLanguage') == 'zh-Hans' ? '系统首页' : 'Dashboard', icon: '系统首页', outerFirst:true // affix: true diff --git a/Code/Fe/src/store/getters.js b/Code/Fe/src/store/getters.js index 48b96d8..544de54 100644 --- a/Code/Fe/src/store/getters.js +++ b/Code/Fe/src/store/getters.js @@ -14,5 +14,7 @@ const getters = { permission_routes: state => state.permission.routes, errorLogs: state => state.errorLog.logs, dictionaries: state => state.dictionaries.dict, + enumList: state => state.definition.enumList, + columZHList: state => state.definition.enumList, } export default getters diff --git a/Code/Fe/src/store/modules/definition.js b/Code/Fe/src/store/modules/definition.js index 7d8b791..fc46be0 100644 --- a/Code/Fe/src/store/modules/definition.js +++ b/Code/Fe/src/store/modules/definition.js @@ -1,16 +1,39 @@ +import { getInterfaceBoard,getApiEnumList } from "@/api/wms-interface" + const state = { - enumList: [] + enumList: [],//枚举 + columZHList:null,//表头转义 } const mutations = { - GET_ENUM_LIST: (state, log) => { - state.logs.push(log) + GET_ENUM_LIST: (state, data) => { + state.enumList=data + }, + GET_COLUMZH_LIST: (state, data) => { + state.columZHList=data }, } const actions = { - getEnumList({ commit }, log) { - commit('GET_ENUM_LIST', log) + // 获取枚举 + getEnumList({ commit }) { + return new Promise(resolve => { + getApiEnumList().then(res=>{ + commit('GET_ENUM_LIST', res.types) + resolve(res) + }) + }) + }, + // 获取表头转义 + getColumZHList({ commit }) { + return new Promise(resolve => { + getInterfaceBoard().then(res=>{ + let _zh = res.resources[localStorage.getItem('columnsApiNamesZh')].texts; + localStorage.setItem("interfaceBoardColumnsNames",JSON.stringify(_zh)) + commit('GET_COLUMZH_LIST', _zh) + resolve(res) + }) + }) }, } diff --git a/Code/Fe/src/store/modules/permission.js b/Code/Fe/src/store/modules/permission.js index 7f14117..c44f7f1 100644 --- a/Code/Fe/src/store/modules/permission.js +++ b/Code/Fe/src/store/modules/permission.js @@ -140,14 +140,14 @@ export function generaMenu(routes, data, first) { } // todo:接口返回的层级菜单,与查重后最终显示的菜单数组做查重及组合处理 -export function initTreeMenusHandle(tree, list,zh,first) { +export function initTreeMenusHandle(tree, list,first) { let _res = [] tree.forEach(item=>{ if(list.indexOf(item.name) >= 0){ - item.title = zh[item.name] || item.name + item.title = JSON.parse(localStorage.getItem("interfaceBoardColumnsNames"))[item.name] || item.name if(first)item.component = '@/layout' if (item.children && item.children.length > 0) { - item.children = initTreeMenusHandle(item.children,list,zh) + item.children = initTreeMenusHandle(item.children,list) } _res.push(item) } @@ -168,8 +168,6 @@ const actions = { // resolve(accessedRoutes) getDefinitionMenu(true).then(res => { let _allConfig = res.auth.grantedPolicies;//所有配置 - let _zh = res.localization.values[localStorage.getItem('columnsApiNamesZh')]; - localStorage.setItem("interfaceBoardColumnsNames", JSON.stringify(_zh)); let _menuList = []//接口获取所有的菜单 for(let item in _allConfig){ let point_number = item.split('.').length - 1 @@ -235,13 +233,13 @@ const actions = { let _initTreeMenus = [] if(_treeMenusAll && _treeMenusAll.length > 0){ - _initTreeMenus = initTreeMenusHandle(_treeMenusAll,_showMenus,_zh,true) + _initTreeMenus = initTreeMenusHandle(_treeMenusAll,_showMenus,true) }else{ let _data = [] for(let i in _showMenus){ _data.push({name:_showMenus[i]}) } - _initTreeMenus = initTreeMenusHandle(_data,_showMenus,_zh,true) + _initTreeMenus = initTreeMenusHandle(_data,_showMenus,true) } // 最后查重+层级查重后的菜单 let _initEndMenus = generaMenu(asyncRoutes, _initTreeMenus,true) diff --git a/Code/Fe/src/utils/detailsPageColumns_api/index.js b/Code/Fe/src/utils/detailsPageColumns_api/index.js index dcbd804..be71fdb 100644 --- a/Code/Fe/src/utils/detailsPageColumns_api/index.js +++ b/Code/Fe/src/utils/detailsPageColumns_api/index.js @@ -3,7 +3,7 @@ import { initFromApiColumnsLable } from '@/utils/index' // 测试数据 -export const TestSchool = [ - { label: initFromApiColumnsLable('TestStudentDetailStudentName'), prop: "studentName" }, - { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" }, -] \ No newline at end of file +// export const TestSchool = [ +// { label: initFromApiColumnsLable('TestStudentDetailStudentName'), prop: "studentName" }, +// { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" }, +// ] \ No newline at end of file diff --git a/Code/Fe/src/utils/detailsTableColumns_api/index.js b/Code/Fe/src/utils/detailsTableColumns_api/index.js index 27d924e..51ffc1d 100644 --- a/Code/Fe/src/utils/detailsTableColumns_api/index.js +++ b/Code/Fe/src/utils/detailsTableColumns_api/index.js @@ -4,7 +4,7 @@ import { initFromApiColumnsLable } from '@/utils/index' // 测试数据 -export const TestSchool = [ - { label: initFromApiColumnsLable('TestStudentDetailStudentName'), prop: "studentName" }, - { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" }, -] \ No newline at end of file +// export const TestSchool = [ +// { label: initFromApiColumnsLable('TestStudentDetailStudentName'), prop: "studentName" }, +// { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" }, +// ] \ No newline at end of file diff --git a/Code/Fe/src/utils/tableColumns_api/index.js b/Code/Fe/src/utils/tableColumns_api/index.js index b4b0a73..253be7e 100644 --- a/Code/Fe/src/utils/tableColumns_api/index.js +++ b/Code/Fe/src/utils/tableColumns_api/index.js @@ -3,7 +3,7 @@ import { initFromApiColumnsLable } from '@/utils/index' // 测试数据 -export const TestSchool = [ - { label: initFromApiColumnsLable('TestSchoolSchoolName'), prop: "schoolName", fixed: "left" }, - { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" }, -] \ No newline at end of file +// export const TestSchool = [ +// { label: initFromApiColumnsLable('TestSchoolSchoolName'), prop: "schoolName", fixed: "left" }, +// { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" }, +// ] \ No newline at end of file diff --git a/Code/Fe/src/utils/tabsDesTions_api/index.js b/Code/Fe/src/utils/tabsDesTions_api/index.js index a9b3ea5..d04646b 100644 --- a/Code/Fe/src/utils/tabsDesTions_api/index.js +++ b/Code/Fe/src/utils/tabsDesTions_api/index.js @@ -3,7 +3,7 @@ import { initFromApiColumnsLable } from '@/utils/index' // 测试数据 -export const TestSchool = [ - { label: initFromApiColumnsLable('TestSchoolSchoolName'), prop: "schoolName", fixed: "left", type: "name" }, - { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" }, -] \ No newline at end of file +// export const TestSchool = [ +// { label: initFromApiColumnsLable('TestSchoolSchoolName'), prop: "schoolName", fixed: "left", type: "name" }, +// { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" }, +// ] \ No newline at end of file diff --git a/Code/Fe/src/views/interfaceBoard/TestSchool.vue b/Code/Fe/src/views/interfaceBoard/TestSchool.vue index 4aa4757..ca2e992 100644 --- a/Code/Fe/src/views/interfaceBoard/TestSchool.vue +++ b/Code/Fe/src/views/interfaceBoard/TestSchool.vue @@ -66,10 +66,10 @@ @goBack="goBack" > + @@ -92,10 +92,10 @@ 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" //全局从接口缓存的列表-明细 -import * as detailsPageColumns_api from "@/utils/detailsPageColumns_api/index" //全局从接口缓存的明细列表 +// 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" //全局从接口缓存的列表-明细 +// import * as detailsPageColumns_api from "@/utils/detailsPageColumns_api/index" //全局从接口缓存的明细列表 export default { name: "TestSchool", @@ -176,7 +176,8 @@ export default { }; }, mounted() { - this.initApiColumns(tableColumns_api,tabsDesTions_api,detailsTableColumns_api,detailsPageColumns_api) + // 如果使用动态api(全局进入时候获取情况) + // this.initApiColumns(tableColumns_api,tabsDesTions_api,detailsTableColumns_api,detailsPageColumns_api) this.paging(); }, } diff --git a/Code/Fe/src/views/login/index.vue b/Code/Fe/src/views/login/index.vue index b7c6d36..2cf4b08 100644 --- a/Code/Fe/src/views/login/index.vue +++ b/Code/Fe/src/views/login/index.vue @@ -70,7 +70,6 @@