Browse Source

整理api-definition,使用本地化整理,替换掉get-dto-column-type接口

master
安虹睿 1 year ago
parent
commit
804439bd2b
  1. 29
      Code/Fe/public/config.js
  2. 1
      Code/Fe/src/App.vue
  3. 26
      Code/Fe/src/api/wms-interface.js
  4. 64
      Code/Fe/src/components/filterForDetailPage/index.vue
  5. 5
      Code/Fe/src/components/tablePagination/index.vue
  6. 25
      Code/Fe/src/components/umyTable/index.vue
  7. 61
      Code/Fe/src/mixins/TableMixins.js
  8. 2
      Code/Fe/src/permission-0725.js
  9. 2
      Code/Fe/src/permission.js
  10. 1
      Code/Fe/src/store/getters.js
  11. 95
      Code/Fe/src/store/modules/definition.js
  12. 6
      Code/Fe/src/utils/detailsPageColumns_api/index.js
  13. 6
      Code/Fe/src/utils/detailsTableColumns_api/index.js
  14. 2
      Code/Fe/src/utils/index.js
  15. 6
      Code/Fe/src/utils/tableColumns_api/index.js
  16. 6
      Code/Fe/src/utils/tabsDesTions_api/index.js
  17. 14
      Code/Fe/src/views/basicConfig/ExportCustomUserSetting.vue

29
Code/Fe/public/config.js

@ -1,37 +1,8 @@
// dev_win
window.SITE_CONFIG['base'] = 'http://dev.ccwin-in.com:60069'
window.SITE_CONFIG['columnsApiNames'] = '/api/abp/application-localization'
// window.SITE_CONFIG['columnsApiNames'] = '/api/abp/application-configuration'
window.SITE_CONFIG['columnsApiNamesZh'] = 'Winin'
window.SITE_CONFIG['isAutoLogin'] = true
window.SITE_CONFIG['isSinglePage'] = false
window.SITE_CONFIG['userNameOrEmailAddress'] = 'admin'
window.SITE_CONFIG['client_secret'] = '1q2w3E*'
window.SITE_CONFIG['menuHiddenConfig'] = ['AsnDet','PoDet','ReceiptDet','ReturnDet','SodDet']
// window.SITE_CONFIG['user'] = 'http://dev.ccwin-in.com:60069/api'
// // window.SITE_CONFIG['print'] = 'print'21384
// window.SITE_CONFIG['print'] = 'http://dev.ccwin-in.com:60074'
// window.SITE_CONFIG['largeScreen'] = 'http://dev.ccwin-in.com:60073'
// window.SITE_CONFIG['warehouseCode'] = 'T8'
// window.SITE_CONFIG['company'] = 'DongYang'
// window.SITE_CONFIG['client_secret'] = '1q2w3E*'
// window.SITE_CONFIG['reportsUrl'] = 'http://dev.ccwin-in.com:60074/#/reports/'
// window.SITE_CONFIG['versionUrl'] = 'http://dev.ccwin-in.com:60070'
// window.SITE_CONFIG['companyName'] = '长春一汽富维东阳汽车塑料零部件(安徽)有限公司'
// 接口看板地址
// window.SITE_CONFIG['interfaceBoardUrl'] = 'http://dev.ccwin-in.com:60090/'
// window.SITE_CONFIG['interfaceBoardUrl'] = 'http://dev.ccwin-in.com:60069/'
// 接口看板表头获取地址
// window.SITE_CONFIG['interfaceBoardColumnsApi'] = 'api/abp/application-configuration'
// mock
// window.SITE_CONFIG['apifoxToken'] = 'NXHNi5mp0dnUHGt0wkCrjvfcidsFKV33'
// window.SITE_CONFIG['base'] = 'https://mock.apifox.cn/m1/1773588-0-default'
// window.SITE_CONFIG['user'] = 'http://dev.ccwin-in.com:60099/api/auth'
// window.SITE_CONFIG['print'] = 'print'
// window.SITE_CONFIG['largeScreen'] = 'http://dev.ccwin-in.com:60073'
// window.SITE_CONFIG['warehouseCode'] = 'T8'
// window.SITE_CONFIG['company'] = 'DongYang'
// window.SITE_CONFIG['client_secret'] = '1q2w3E*'
// window.SITE_CONFIG['reportsUrl'] = 'http://10.164.0.227:59091/#/reports/'

1
Code/Fe/src/App.vue

@ -9,7 +9,6 @@ export default {
name: 'App'
}
localStorage.setItem('base',window.SITE_CONFIG['base'])
localStorage.setItem('columnsApiNames',window.SITE_CONFIG['columnsApiNames'])
localStorage.setItem('columnsApiNamesZh',window.SITE_CONFIG['columnsApiNamesZh'])
localStorage.setItem('isAutoLogin',window.SITE_CONFIG['isAutoLogin'])
localStorage.setItem('isSinglePage',window.SITE_CONFIG['isSinglePage'])

26
Code/Fe/src/api/wms-interface.js

@ -1,13 +1,12 @@
// 接口监控看板相关api
import request from '@/utils/request'
let base_api = localStorage.getItem('base')
let colum_url = localStorage.getItem('columnsApiNames')
// 获取表头数据
// 获取表头zh转义数据
export function getInterfaceBoard() {
return request({
method:'get',
url: base_api + colum_url,
url: base_api + '/api/abp/application-localization',
params:{
CultureName:localStorage.getItem('browserLanguage'),
OnlyDynamics:false
@ -25,8 +24,8 @@ export function getDefinitionMenu(IncludeTypes) {
})
}
// 获取枚举数据
export async function getApiEnumList() {
// 获取枚举数据/dto列类型等所有配置
export async function getApiDefinition() {
return request({
method:'get',
url: base_api + '/api/abp/api-definition',
@ -34,23 +33,6 @@ 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({
method:'post',
url: base_api + '/api/'+ api +'/base/get-dto-column-type',
})
}
// // 测试数据-明细-删除
// export function TestSchoolDetailList_delete(id) {
// return request({

64
Code/Fe/src/components/filterForDetailPage/index.vue

@ -16,12 +16,13 @@
>
<!-- 列表 -->
<tablePagination
v-if="dialogShow"
v-if="dialogShow && listColumns && listColumns.length > 0"
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
@rowDrop="rowDropForDetail"
:rowSource="'detailPage_api'"
:rowMaxHeight="rowMaxHeight"
:tableColumns="listColumns"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
@ -127,7 +128,6 @@ 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',
@ -202,6 +202,10 @@ props: {
type: String,
default: 'horizontal'
},
rowMaxHeight:{
type:String,
default:'calc(90vh - 450px)'
},
},
data () {
return {
@ -251,55 +255,31 @@ methods: {
},
//
paging(callback){
this.Loading.tableLoading = true
this.Loading.tableLoading = true;
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount
Promise.all([
getDtoColumnType(this.URLOption_detailList),
getPageListForDetail(this.PageListParams,this.URLOption_detailList)
]).then((allData) => {
.then(res=>{
//
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)
let _Columns = this.initApiColumnsForDto(res.items[0],_parentName)
this.listColumns = this.initTableColumns(_Columns)
}
//
if(allData[1]){
if(res){
this.Loading.tableLoading = false
this.tableData = []
allData[1].items.forEach(item=>{
res.items.forEach(item=>{
item.deleteTipVisible = false
this.tableData.push(item)
})
this.pagingCallback(callback)
this.totalCount = allData[1].totalCount
this.totalCount = res.totalCount
}
this.pagingCallback(callback)
}).catch(()=>{
})
.catch(err=>{
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] || ''} 主表信息`
@ -338,15 +318,15 @@ methods: {
</script>
<style lang="scss">
.filterForDetailPage {
.el-dialog__body{
.el-dialog{
height: calc(100% - 100px);
}
.el-dialog__body{
padding-bottom: 20px !important;
}
.fullPageCover{
height: calc(100% - 380px) !important;
}
}
.filterForDetailPage-list{
height: calc(100% - 320px);
}
}
.filterForDetailPage-list{
height: calc(100%);
overflow: auto;
}
</style>

5
Code/Fe/src/components/tablePagination/index.vue

@ -36,6 +36,7 @@
:visible="rowDropVisible"
@closeRowDrop="closeRowDrop"
:source="rowSource"
:innerMaxHeight="rowMaxHeight"
></rowDrop>
<!-- 列表 -->
<div class="uTableOuter" ref="uTableOuterRef" :style="{height:uTableOuterHeight + 'px',overflow:'hidden'}">
@ -90,6 +91,10 @@ export default {
rowDrop
},
props: {
rowMaxHeight:{
type:String,
default:'calc(90vh - 280px)'
},
//
searchOverallCoverHeight:{
type: String,

25
Code/Fe/src/components/umyTable/index.vue

@ -86,7 +86,7 @@
</template>
<template slot-scope="scope">
<!-- 时间转换 -->
<span v-if="item.apiBaseType == 'System.DateTime'"
<span v-if="item.apiBaseType == 'datetime'"
@click="showDetailInfo(scope.row[item.prop],'time')"
style="cursor: pointer;"
:title="'点击查看详情'"
@ -95,15 +95,15 @@
{{ scope.row[item.prop] | formatDate }}
</span>
<!-- 枚举 -->
<span v-else-if="item.apiIsEnum">
<span v-else-if="item.isEnums">
{{ initApiEnumList(item,scope.row[item.prop]) }}
</span>
<!-- 布尔 -->
<span v-else-if="item.apiBaseType == 'System.Boolean'">
<span v-else-if="item.apiBaseType == 'boolean'">
{{ scope.row[item.prop] ? '是' : '否' }}
</span>
<!-- 数值 -->
<span v-else-if="initTypeList.indexOf(item.apiBaseType.toLowerCase()) >= 0">
<span v-else-if="item.apiBaseType == 'number'">
{{ scope.row[item.prop] }}
</span>
<!-- 点击可出详情 | 点击可点出json 目前已知String|Guid-->
@ -329,7 +329,6 @@ export default {
showJsonData:null,//Json
showJsonData_str:null,//Json
showJsonCopy:false,//jsonDialog
initTypeList:['system.decimal','system.int64','system.int32','system.long']
};
},
computed: {
@ -604,7 +603,6 @@ export default {
// jsontable
showJsonTable(row){
this.showJsonDialog = true
console.log(606,_json)
let _json = eval('(' + row + ')')
let _arr = []
let __initJson = (data) => {
@ -640,24 +638,24 @@ 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
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(this.showJsonData_str)
.then(() => {
this.$message.success('复制成功');
this.$refs.copyJsonTextarea_ref.focus()
document.getElementById('copyJsonTextarea_dialog_ref').scrollTop = 0
})
.catch(err => {
this.$message.error('复制失败');
this.$refs.copyJsonTextarea_ref.focus()
document.getElementById('copyJsonTextarea_dialog_ref').scrollTop = 0
});
}else {
// text area
@ -681,6 +679,8 @@ export default {
})
},() => {
this.$message.error('复制失败');
this.$refs.copyJsonTextarea_ref.focus()
document.getElementById('copyJsonTextarea_dialog_ref').scrollTop = 0
})
}
@ -699,10 +699,9 @@ export default {
},
//
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]
item.enums_list.forEach((item,key)=>{
_item_enumList[item.value] = item.label
})
return _item_enumList[data] || '未定义'
},

61
Code/Fe/src/mixins/TableMixins.js

@ -3,9 +3,8 @@ import {
getDetailed,
postDelete
} from '@/api/wms-api'
import { initFromApiColumnsLable,firstWordSizeChange } from '@/utils/index'
import { zhApiColumnsLable,firstWordSizeChange } from '@/utils/index'
import * as allUrlOption from '@/utils/baseData/urlOption'
import { getDtoColumnType } from '@/api/wms-interface'
export const tableMixins = {
data() {
return {
@ -113,25 +112,20 @@ export const tableMixins = {
// 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'
})
initApiColumnsForDto(list,titleName){
let data = this.$store.getters.dtoColumnTypes
let _coloums = data[titleName].S
let _Columns_Table = []
if(_coloums && _coloums.length > 0){
let _data = _coloums[0].columnsTypes
if(_coloums){
let _data = _coloums.dtoList
_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
}
let _item = item
_item.label = zhApiColumnsLable(titleName + item.name) || item.name
_item.prop = firstWordSizeChange(item.name)
// 如果list接口存在数据 ,与list接口返回字段比较处理,list接口存在的话则追加
let _if = firstWordSizeChange(item.z_ColumnName) != 'details'
let _if = firstWordSizeChange(item.name) != 'details'
if(list && list.length > 0){
_if = firstWordSizeChange(item.z_ColumnName) in list && firstWordSizeChange(item.z_ColumnName) != 'details'
_if = firstWordSizeChange(item.name) in list && firstWordSizeChange(item.name) != 'details'
}
if(_if){
_Columns_Table.push(_item)
@ -144,23 +138,20 @@ export const tableMixins = {
paging(callback) {
this.Loading.tableLoading = true;
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount
Promise.all([
getDtoColumnType(this.URLOption_base),
getPageList(this.PageListParams, this.URLOption_base)
]).then((allData) => {
.then(res=>{
// 表头处理
if(allData[0]){
let _Columns = this.initApiColumnsForDto(allData[0],allData[1].items[0] ,this.$route.name)
let _Columns = this.initApiColumnsForDto(res,this.$route.name)
this.apiColumns_Table = this.initTableColumns(_Columns)
this.apiColumns_DesTions = _Columns
}
// 页面数据处理
if(allData[1]){
this.tableData = allData[1].items
this.totalCount = allData[1].totalCount
if(res){
this.tableData = res.items
this.totalCount = res.totalCount
}
this.pagingCallback(callback)
}).catch((err)=>{
})
.catch(err=>{
this.Loading.tableLoading = false
})
},
@ -202,19 +193,11 @@ export const tableMixins = {
this.Loading.DrawerLoading = true
this.displayDialog.detailsDialog = true;
let _url = this.URLOption_detail ? this.URLOption_detail : this.URLOption_base
Promise.all([
getDtoColumnType(this.URLOption_detailList),
getDetailed(val.id, _url)
]).then((allData) => {
.then(res=>{
// 表头处理
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.apiColumns_DetailsTable = this.initTableColumns(this.initApiColumnsForDto(res.details[0],_parentName))
// 打印使用的全部数据存储
this.tableDataDetails = JSON.parse(JSON.stringify(res))
this.propsData = res
@ -229,8 +212,8 @@ export const tableMixins = {
}else{
this.Loading.DrawerLoading = false
}
}
}).catch(()=>{
})
.catch(err=>{
this.Loading.DrawerLoading = false
})
},

2
Code/Fe/src/permission-0725.js

@ -20,7 +20,7 @@ router.beforeEach(async (to, from, next) => {
// 获取枚举数据
if(!store.getters.enumList || store.getters.enumList.length <= 0){
await store.dispatch('definition/getEnumList')
await store.dispatch('definition/getDefinitionConfig')
}
// // 获取表头转义

2
Code/Fe/src/permission.js

@ -31,7 +31,7 @@ router.beforeEach(async (to, from, next) => {
// 获取枚举数据
if(!store.getters.enumList || store.getters.enumList.length <= 0){
await store.dispatch('definition/getEnumList')
await store.dispatch('definition/getDefinitionConfig')
}
// 是否有用户信息:

1
Code/Fe/src/store/getters.js

@ -16,5 +16,6 @@ const getters = {
dictionaries: state => state.dictionaries.dict,
enumList: state => state.definition.enumList,//接口获取的枚举
columZHList: state => state.definition.columZHList,//接口转义的表头
dtoColumnTypes: state => state.definition.dtoColumnTypes,//所有页面的dto类型
}
export default getters

95
Code/Fe/src/store/modules/definition.js

@ -1,25 +1,104 @@
import { getInterfaceBoard,getApiEnumList } from "@/api/wms-interface"
import { getInterfaceBoard,getApiDefinition } from "@/api/wms-interface"
const state = {
enumList: [],//枚举
columZHList:null,//表头转义
dtoColumnTypes:[],//所有页面的dto类型
}
const mutations = {
GET_ENUM_LIST: (state, data) => {
// 设置枚举
SET_ENUM_LIST: (state, data) => {
state.enumList=data
},
GET_COLUMZH_LIST: (state, data) => {
// 设置表头转义
SET_COLUMZH_LIST: (state, data) => {
state.columZHList=data
},
// 所有页面的dto类型
SET_DTOCOLUMN_TYPES: (state, data) => {
state.dtoColumnTypes=data
},
}
// 通过url做方法处理转换(S/C/U/G等)目前只做了S查询。如果有需要在丰富
export function initDtoTypeByUrl(url){
if(url.indexOf('get-list-page-by-filter') >= 0){
return "S"
}else{
return url
}
}
// DTO类型转义
export function initDtoColumnTypes(res) {
// modules>app>controller>这里是所有的接口
let _controller = res.modules.app.controllers
let _allData = {}
for(let item in _controller){
let _com = 'AppService'
// 获取简单的api(路由,如:IncomingData)
let _api = item.substring(item.lastIndexOf('.') + 1,item.length - _com.length)
let _item = {
S:{
dtoList:[],
dtoType: 'S',
dtoName:item.substring(0,item.length - _com.length),
columnsType:null
}
}
for(let ac in _controller[item].actions){
let _actions = _controller[item].actions[ac]
// actions下通过URL匹配 做特殊处理
// 查询处理
if(initDtoTypeByUrl(_actions.url) == 'S'){
let _type = _actions.returnValue.type
let _type_value = _type.substring(_type.indexOf('<') + 1,_type.indexOf('>'))
_item.S.columnsType=_type_value
// 通过returnValue.type 在 res.types 中获取全部的dto
let _dtos = res.types[_type_value].properties
_dtos.forEach(d=>{
// 如果是枚举做处理(目前枚举只根据Enums做处理,todo:是否需要其他处理)
if(d.type.indexOf('Enums') >= 0){
d.apiBaseType = 'enums'
d.isEnums = true
// -1 是去掉最后的'?'(todo:是否每个Enums类型都有?)
let enums_type = d.type.substring(0,d.type.length - 1)
// 通过type包含Enums的全字段-'?'匹配res.types中的值
let enums_list = res.types[enums_type]
if(enums_list){
d.enums_list = []
enums_list.enumValues.forEach((e,key)=>{
d.enums_list.push({value:e,label:enums_list.enumNames[key]})
})
}
}else{
if(d.typeSimple == 'number' || d.typeSimple == 'number?'){
d.apiBaseType='number'
}else{
let _end_index = d.type.lastIndexOf('?') >= 0 ? d.type.lastIndexOf('?') : d.type.length
d.apiBaseType = d.type.substring(d.type.lastIndexOf('.') + 1, _end_index).toLowerCase()
}
if(d.type.indexOf('Guid') >= 0){
d.apiBaseType='string'
}
}
})
_item.S.dtoList=_dtos
}
}
_allData[_api] = _item
}
return _allData
}
const actions = {
// 获取枚举
getEnumList({ commit }) {
getDefinitionConfig({ commit }) {
return new Promise(resolve => {
getApiEnumList().then(res=>{
commit('GET_ENUM_LIST', res.types)
getApiDefinition().then(res=>{
commit('SET_DTOCOLUMN_TYPES', initDtoColumnTypes(res))
commit('SET_ENUM_LIST', res.types)
resolve(res)
})
})
@ -29,11 +108,11 @@ const actions = {
return new Promise(resolve => {
getInterfaceBoard().then(res=>{
let _zh = res.resources[localStorage.getItem('columnsApiNamesZh')].texts;
commit('GET_COLUMZH_LIST', _zh)
commit('SET_COLUMZH_LIST', _zh)
resolve(res)
})
})
},
}
}
export default {

6
Code/Fe/src/utils/detailsPageColumns_api/index.js

@ -1,9 +1,9 @@
// 此文件为【明细 - 列表】表头从接口缓存的表头
import { initFromApiColumnsLable } from '@/utils/index'
import { zhApiColumnsLable } from '@/utils/index'
// 测试数据
// export const TestSchool = [
// { label: initFromApiColumnsLable('TestStudentDetailStudentName'), prop: "studentName" },
// { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" },
// { label: zhApiColumnsLable('TestStudentDetailStudentName'), prop: "studentName" },
// { label: zhApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" },
// ]

6
Code/Fe/src/utils/detailsTableColumns_api/index.js

@ -1,10 +1,10 @@
// 此文件为【明细 - 列表】表头从接口缓存的表头
// 如果有父级id字段,请设置showProp,避免明细列表内可查询其他主表的明细
import { initFromApiColumnsLable } from '@/utils/index'
import { zhApiColumnsLable } from '@/utils/index'
// 测试数据
// export const TestSchool = [
// { label: initFromApiColumnsLable('TestStudentDetailStudentName'), prop: "studentName" },
// { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" },
// { label: zhApiColumnsLable('TestStudentDetailStudentName'), prop: "studentName" },
// { label: zhApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" },
// ]

2
Code/Fe/src/utils/index.js

@ -560,7 +560,7 @@ export function createNewTabs (url) {
// faster-new
// 转义及读取api接口返回的表头信息
export function initFromApiColumnsLable (data) {
export function zhApiColumnsLable (data) {
let _list = store.getters.columZHList
return _list ? _list[data] : data
}

6
Code/Fe/src/utils/tableColumns_api/index.js

@ -1,9 +1,9 @@
// 此文件为【主表-列表】表头从接口缓存的表头
import { initFromApiColumnsLable } from '@/utils/index'
import { zhApiColumnsLable } from '@/utils/index'
// 测试数据
// export const TestSchool = [
// { label: initFromApiColumnsLable('TestSchoolSchoolName'), prop: "schoolName", fixed: "left" },
// { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" },
// { label: zhApiColumnsLable('TestSchoolSchoolName'), prop: "schoolName", fixed: "left" },
// { label: zhApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" },
// ]

6
Code/Fe/src/utils/tabsDesTions_api/index.js

@ -1,9 +1,9 @@
// 此文件为【主表-明细】表头从接口缓存的表头
import { initFromApiColumnsLable } from '@/utils/index'
import { zhApiColumnsLable } from '@/utils/index'
// 测试数据
// export const TestSchool = [
// { label: initFromApiColumnsLable('TestSchoolSchoolName'), prop: "schoolName", fixed: "left", type: "name" },
// { label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" },
// { label: zhApiColumnsLable('TestSchoolSchoolName'), prop: "schoolName", fixed: "left", type: "name" },
// { label: zhApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" },
// ]

14
Code/Fe/src/views/basicConfig/ExportCustomUserSetting.vue

@ -108,7 +108,7 @@ import { filterSelectMixins } from '@/mixins/filter-Select'
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 { initFromApiColumnsLable } from '@/utils/index'
import { zhApiColumnsLable } from '@/utils/index'
// import { getExportConfigList } from '@/api/wms-interface'
export default {
@ -157,14 +157,14 @@ export default {
},
editOptions: {},
CreateForm: [
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", colSpan: 12 },
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnName", colSpan: 12 },
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", colSpan: 12 },
{ type: "input", label: zhApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", colSpan: 12 },
{ type: "input", label: zhApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnName", colSpan: 12 },
{ type: "input", label: zhApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", colSpan: 12 },
],
editForm: [
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", colSpan: 12 },
{ type: "input", label:initFromApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnName", colSpan: 12 },
{ type: "input", label: initFromApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", colSpan: 12 },
{ type: "input", label: zhApiColumnsLable('ExportCustomUserSettingCustomUserSetting'), prop: "customUserSetting", colSpan: 12 },
{ type: "input", label:zhApiColumnsLable('ExportCustomUserSettingExportColumnName'), prop: "exportColumnName", colSpan: 12 },
{ type: "input", label: zhApiColumnsLable('ExportCustomUserSettingExportTableName'), prop: "exportTableName", colSpan: 12 },
],
editRules: {
cerateRule: {

Loading…
Cancel
Save