Browse Source

查看json的detail只存在同一条数据bug处理+api删除开发

noToken
安虹睿 1 year ago
parent
commit
7d65ceab0b
  1. 28
      PC/UI.WinIn.FasterZ.Store/src/api/wms-api.js
  2. 28
      PC/UI.WinIn.FasterZ.Store/src/components/addEditFromApiPop/index.vue
  3. 56
      PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue
  4. 34
      PC/UI.WinIn.FasterZ.Store/src/mixins/TableMixins.js
  5. 1
      PC/UI.WinIn.FasterZ.Store/src/store/getters.js
  6. 18
      PC/UI.WinIn.FasterZ.Store/src/store/modules/definition.js
  7. 112
      PC/UI.WinIn.FasterZ.Store/src/views/demo/demo_api_handle.vue
  8. 196
      PC/UI.WinIn.FasterZ.Store/src/views/demo/demo_base_handle.vue

28
PC/UI.WinIn.FasterZ.Store/src/api/wms-api.js

@ -2,6 +2,7 @@ import request from '@/utils/request'
import store from '@/store' import store from '@/store'
// let baseURL = process.env.VUE_APP_BASE_API + '/' // let baseURL = process.env.VUE_APP_BASE_API + '/'
let baseAPI = localStorage.getItem('baseApi') + '/'
let baseURL = localStorage.getItem('baseApi') + '/api/' let baseURL = localStorage.getItem('baseApi') + '/api/'
//新建 //新建
@ -148,3 +149,30 @@ export function getVsersion() {
method: 'get' method: 'get'
}) })
} }
// fast-new
//API-POST
export function ApiTypePost(data, url) {
return request({
url: baseAPI + url,
method: 'post',
data
})
}
//API-PUT
export function ApiTypePut(data, id, url) {
return request({
url: baseAPI + url,
method: 'put',
data,
params:{id:id}
})
}
//API-DELETE
export function ApiTypeDelete(id, url) {
return request({
url: baseAPI + url,
method: 'delete',
params:{id:id}
})
}

28
PC/UI.WinIn.FasterZ.Store/src/components/addEditFromApiPop/index.vue

@ -125,10 +125,9 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { postCreate, postUpdate } from "@/api/wms-api" import { ApiTypePost, ApiTypePut } from "@/api/wms-api"
import { LoadingMixins } from "@/mixins/LoadingMixins"; import { LoadingMixins } from "@/mixins/LoadingMixins";
import { tableMixins } from "@/mixins/TableMixins" import { tableMixins } from "@/mixins/TableMixins"
import * as allUrlOption from '@/utils/baseData/urlOption'
export default { export default {
name:"addEditFromApiPop", name:"addEditFromApiPop",
mixins:[ LoadingMixins,tableMixins ], mixins:[ LoadingMixins,tableMixins ],
@ -161,12 +160,7 @@ export default {
}, },
data () { data () {
return { return {
// currentDtos:this.$store.getters.dtoColumnTypes[this.$route.name],
URLOption_base:allUrlOption[this.$route.name].baseURL,
//
URLOption_add:allUrlOption[this.$route.name].addURL,
//
URLOption_edit:allUrlOption[this.$route.name].editURL,
active:0,//0 1 2 active:0,//0 1 2
show:true, show:true,
formTitle:null,//form formTitle:null,//form
@ -188,9 +182,8 @@ export default {
}, },
// rules // rules
initFormItems(){ initFormItems(){
let data = this.$store.getters.dtoColumnTypes
let _dtoList_type = this.handleType == 'add' ? 'C' : 'U' let _dtoList_type = this.handleType == 'add' ? 'C' : 'U'
let _dtoList = data[this.$route.name][_dtoList_type].dtoList let _dtoList = this.currentDtos[_dtoList_type].dtoList
this.formItemData = JSON.parse(JSON.stringify(_dtoList)) this.formItemData = JSON.parse(JSON.stringify(_dtoList))
// //
if(this.handleType == 'edit' && this.editRowData){ if(this.handleType == 'edit' && this.editRowData){
@ -236,14 +229,14 @@ export default {
this.submitForm(valid,this.formData,this.handleType,this.formItemData,this.formRules) this.submitForm(valid,this.formData,this.handleType,this.formItemData,this.formRules)
return return
} }
let _updata = this.handleType == 'add' ? this.URLOption_add : this.URLOption_edit
let _url = _updata ? _updata : this.URLOption_base
this.Loading.addEditApiLoading = true this.Loading.addEditApiLoading = true
if (valid) { if (valid) {
// //
if(this.handleType == 'add'){ if(this.handleType == 'add'){
if(!_updata){_url = _url + '/create'} ApiTypePost(
postCreate(this.formData, _url).then(res => { this.formData,
this.currentDtos.C.actionsUrl
).then(res => {
this.changeActive(1) this.changeActive(1)
}).catch(err => { }).catch(err => {
this.changeActive(2) this.changeActive(2)
@ -251,8 +244,11 @@ export default {
} }
// //
else{ else{
if(!_updata){_url = _url + '/update-by-id'} ApiTypePut(
postUpdate(this.formData, this.formData.id, _url).then(res => { this.formData,
this.formData.id,
this.currentDtos.U.actionsUrl
).then(res => {
this.changeActive(1) this.changeActive(1)
}).catch(err => { }).catch(err => {
this.changeActive(2) this.changeActive(2)

56
PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue

@ -214,24 +214,24 @@
stripe stripe
:border="true" :border="true"
style="width: 100%" style="width: 100%"
height="500" height="300"
> >
<el-table-column <el-table-column
v-for="(head) in showJsonHeader" v-for="(head,h_key) in showJsonHeader"
:key="h_key" :key="h_key"
min-width="120" min-width="120"
> >
<template #header> <template #header>
<span :title="head">{{ head }}</span> <span :title="head">{{ head }}</span>
</template> </template>
<template slot-scope="scope" v-for="item in scope.row.value"> <template slot-scope="scope2">
<div v-if="typeof item[head] == 'object'"> <div v-if="typeof scope2.row[head] == 'object'">
<div v-for="(o,o_key) in item[head]"> <div v-for="(o,o_key) in scope2.row[head]">
{{ o_key }}{{ o }} {{ o_key }}{{ o }}
<div style="border-bottom: dashed 1px #ddd;"></div> <div style="border-bottom: dashed 1px #ddd;"></div>
</div> </div>
</div> </div>
<div v-else>{{ item[head] }}</div> <div v-else>{{ scope2.row[head] }}</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -672,29 +672,31 @@ export default {
// //
if(!_json[item]){ if(!_json[item]){
_arr.push({name:item,value:_json[item]}) _arr.push({name:item,value:_json[item]})
}else if(_json[item] && typeof _json[item] != 'object'){
_arr.push({name:item,value:_json[item] + ""})
}else{ }else{
// if(typeof _json[item] != 'object'){
if(Array.isArray(_json[item])){ _arr.push({name:item,value:_json[item] + ""})
// DETAILS todo:DETAILS使 }else{
// let _value = (item).toUpperCase() == 'DETAILS' ? __initJson(_json[item][0]) : (_json[item]).join(",") //
this.showJsonHeader = [] if(Array.isArray(_json[item])){
for(let h in _json[item][0]){ // DETAILS todo:DETAILS使
this.showJsonHeader.push(h) // let _value = (item).toUpperCase() == 'DETAILS' ? __initJson(_json[item][0]) : (_json[item]).join(",")
this.showJsonHeader = []
for(let h in _json[item][0]){
this.showJsonHeader.push(h)
}
let _value = (item).toUpperCase() == 'DETAILS' ? _json[item] : (_json[item]).join(",")
_arr.push({name:item,value:_value})
} }
let _value = (item).toUpperCase() == 'DETAILS' ? _json[item] : (_json[item]).join(",") //
_arr.push({name:item,value:_value}) else{
} let _obj_arr = __initJson(_json[item])
// //
else{ if(_obj_arr.length > 0){
let _obj_arr = __initJson(_json[item]) _arr = [..._obj_arr]
// }else{
if(_obj_arr.length > 0){ //
_arr = [..._obj_arr] _arr.push({name:item,value:""})
}else{ }
//
_arr.push({name:item,value:""})
} }
} }
} }

34
PC/UI.WinIn.FasterZ.Store/src/mixins/TableMixins.js

@ -1,7 +1,8 @@
import { import {
getPageList, getPageList,
getDetailed, getDetailed,
postDelete postDelete,
ApiTypeDelete
} from '@/api/wms-api' } from '@/api/wms-api'
import { zhApiColumnsLable,firstWordSizeChange } from '@/utils/index' import { zhApiColumnsLable,firstWordSizeChange } from '@/utils/index'
export const tableMixins = { export const tableMixins = {
@ -71,6 +72,13 @@ export const tableMixins = {
color:'#ff9000' color:'#ff9000'
}) })
} }
if(type.indexOf('delete') >= 0){
_btns.push({
label:'删除',
name:'deleteFromApi',
color:'red'
})
}
return _btns return _btns
}, },
// 主表-右侧操作列基础按钮操作 // 主表-右侧操作列基础按钮操作
@ -89,7 +97,7 @@ export const tableMixins = {
this.displayDialog.editDialog = true this.displayDialog.editDialog = true
} }
// 编辑 api // 编辑 api
if (item.name == "editFromApi") { else if (item.name == "editFromApi") {
this.addEditApiType = 'edit' this.addEditApiType = 'edit'
this.editFromApiRowData = row this.editFromApiRowData = row
this.displayDialog.addEditApiDialog = true; this.displayDialog.addEditApiDialog = true;
@ -114,6 +122,28 @@ export const tableMixins = {
this.Loading.tableLoading = false this.Loading.tableLoading = false
}); });
} }
// 删除 api
else if (item.name == "deleteFromApi") {
this.$confirm('此操作将永久删除该消息, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.Loading.tableLoading = true
ApiTypeDelete(
row.id,
this.$store.getters.apiActions[this.$route.name].DeleteAsyncById.url
).then(res => {
this.$successMsg('删除成功!')
this.Loading.tableLoading = false
this.paging()
}).catch(err => {
this.Loading.tableLoading = false
})
}).catch(() => {
this.Loading.tableLoading = false
});
}
}, },
// 获取通过api的表头数据,不可以在初始化处理,因为接口返回问题 // 获取通过api的表头数据,不可以在初始化处理,因为接口返回问题
// initApiColumns(table,des,detailsTable,detailsPage){ // initApiColumns(table,des,detailsTable,detailsPage){

1
PC/UI.WinIn.FasterZ.Store/src/store/getters.js

@ -15,5 +15,6 @@ const getters = {
enumList: state => state.definition.enumList,//接口获取的枚举 enumList: state => state.definition.enumList,//接口获取的枚举
columZHList: state => state.definition.columZHList,//接口转义的表头 columZHList: state => state.definition.columZHList,//接口转义的表头
dtoColumnTypes: state => state.definition.dtoColumnTypes,//所有页面的dto类型 dtoColumnTypes: state => state.definition.dtoColumnTypes,//所有页面的dto类型
apiActions: state => state.definition.apiActions,//所有api的动作(增删改查等)
} }
export default getters export default getters

18
PC/UI.WinIn.FasterZ.Store/src/store/modules/definition.js

@ -5,6 +5,7 @@ const state = {
enumList: [],//枚举 enumList: [],//枚举
columZHList:null,//表头转义 columZHList:null,//表头转义
dtoColumnTypes:[],//所有页面的dto类型 dtoColumnTypes:[],//所有页面的dto类型
apiActions:[],//所有api的动作(增删改查等)
} }
const mutations = { const mutations = {
@ -20,6 +21,10 @@ const mutations = {
SET_DTOCOLUMN_TYPES: (state, data) => { SET_DTOCOLUMN_TYPES: (state, data) => {
state.dtoColumnTypes=data state.dtoColumnTypes=data
}, },
// 所有api的动作(增删改查等)
SET_API_ACTIONS: (state, data) => {
state.apiActions=data
}
} }
// 通过url做方法处理转换(S/C/U/G等)目前做了S查询/C新增/U编辑。如果有需要在丰富 // 通过url做方法处理转换(S/C/U/G等)目前做了S查询/C新增/U编辑。如果有需要在丰富
@ -76,7 +81,8 @@ export function initDtoTypesAndEnums(res,typeName,apiName) {
} }
// DTO列类型转义 // DTO列类型转义
export function initDtoColumnTypes(res) { export function initDtoColumnTypes(res,commit) {
let _actionsObj = {}// 所有actions处理暂存数据
// modules>app>controller>这里是所有的接口 // modules>app>controller>这里是所有的接口
let _controller = res.modules.app.controllers let _controller = res.modules.app.controllers
let _allData = {} let _allData = {}
@ -84,6 +90,9 @@ export function initDtoColumnTypes(res) {
let _com = 'AppService' let _com = 'AppService'
// 获取简单的api(路由,如:IncomingData) // 获取简单的api(路由,如:IncomingData)
let _api = item.substring(item.lastIndexOf('.') + 1,item.length - _com.length) let _api = item.substring(item.lastIndexOf('.') + 1,item.length - _com.length)
// 所有actions处理
_actionsObj[_api] = _controller[item].actions;
// dto处理
let inner_item = { let inner_item = {
baseApi:_api, baseApi:_api,
dtoList:[], dtoList:[],
@ -101,23 +110,28 @@ export function initDtoColumnTypes(res) {
// 查询处理 // 查询处理
let _type = _actions.returnValue.type let _type = _actions.returnValue.type
if(initDtoTypeByUrl(_actions.url) == 'S'){ if(initDtoTypeByUrl(_actions.url) == 'S'){
_item.S.actionsUrl = _actions.url
let _type_value = _type.substring(_type.indexOf('<') + 1,_type.indexOf('>')) let _type_value = _type.substring(_type.indexOf('<') + 1,_type.indexOf('>'))
_item.S.columnsType=_type_value _item.S.columnsType=_type_value
_item.S.dtoList = initDtoTypesAndEnums(res,_type_value,_api) _item.S.dtoList = initDtoTypesAndEnums(res,_type_value,_api)
} }
// 新增处理 // 新增处理
if( initDtoTypeByUrl(_actions.url) == 'C' ){ if( initDtoTypeByUrl(_actions.url) == 'C' ){
_item.C.actionsUrl = _actions.url
_item.C.columnsType = _type _item.C.columnsType = _type
_item.C.dtoList = initDtoTypesAndEnums(res,_type,_api) _item.C.dtoList = initDtoTypesAndEnums(res,_type,_api)
} }
// 编辑处理 // 编辑处理
if( initDtoTypeByUrl(_actions.url) == 'U' ){ if( initDtoTypeByUrl(_actions.url) == 'U' ){
_item.U.actionsUrl = _actions.url
_item.U.columnsType = _type _item.U.columnsType = _type
_item.U.dtoList = initDtoTypesAndEnums(res,_type,_api) _item.U.dtoList = initDtoTypesAndEnums(res,_type,_api)
} }
} }
_allData[_api] = _item _allData[_api] = _item
} }
// 设置所有actions
commit('SET_API_ACTIONS', _actionsObj)
return _allData return _allData
} }
@ -127,7 +141,7 @@ const actions = {
return new Promise(resolve => { return new Promise(resolve => {
getApiDefinition().then(res=>{ getApiDefinition().then(res=>{
commit('SET_ENUM_LIST', res.types) commit('SET_ENUM_LIST', res.types)
commit('SET_DTOCOLUMN_TYPES', initDtoColumnTypes(res)) commit('SET_DTOCOLUMN_TYPES', initDtoColumnTypes(res,commit))
resolve(res) resolve(res)
}) })
}) })

112
PC/UI.WinIn.FasterZ.Store/src/views/demo/demo_api_handle.vue

@ -0,0 +1,112 @@
<template>
<div class="page-box" v-loading="Loading.tableLoading">
<!-- DEMO:只有主表查询 API新增编辑删除 -->
<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"
:buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList_right="(data)=>{return buttonOperationList_rightApi(data,'edit|delete')}"
@buttonOperationClick_right="buttonOperationClick_right"
></tablePagination>
<curren-Drawer
ref="currenDrawer_Ref"
:title="apiColumns_DesTions"
@rowDrop="rowDrop"
:tableColumns="apiColumns_DetailsTable"
:tabsDesTions="apiColumns_DesTions"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:Butttondata="[]"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:totalCount="totalCountDetails"
:currentPage="oldSkipCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
:buttonOperationList_left="operationButtonsDetail"
></curren-Drawer>
<!-- 导出弹窗 -->
<exportDrop
v-if="displayDialog.exportDialog"
@closeDialog="closeExportDrop"
@exportDropSubmit="exportDropSubmit"
></exportDrop>
<!-- Api新增 -->
<addEditFromApiPop
v-if="displayDialog.addEditApiDialog"
:handleType="addEditApiType"
:editRowData="editFromApiRowData"
@closePop="closeAddEditApiPop"
></addEditFromApiPop>
</div>
</template>
<script>
import { tableMixins } from "@/mixins/TableMixins";
import { LoadingMixins } from "@/mixins/LoadingMixins";
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
import { mixins } from "@/mixins/mixins";
import { filterSelectMixins } from '@/mixins/filter-Select'
import { getToken } from '@/utils/auth'
export default {
name: "IncomingData",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
],
data() {
return {
//
currenButtonData: [
this.defaultAddBtn({
name:'addFromApi'
}),//
this.defaultExportBtn({
isRedundance:true,
isDetailExport:true
}),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
};
},
mounted() {
this.paging();
},
}
</script>
<style lang="scss" scoped>
@import "@/styles/basicData.scss";
</style>

196
PC/UI.WinIn.FasterZ.Store/src/views/demo/demo_base_handle.vue

@ -0,0 +1,196 @@
<template>
<div class="page-box" v-loading="Loading.tableLoading">
<!-- DEMO:只有主表 基础的主表增删改查 -->
<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"
:buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left"
>
<!-- <div slot="tableTopSlot">
上方按钮插槽位置预留
</div>
<div slot="searchPrimarySlot">
普通初级搜索插槽位置预留
</div> -->
<!-- <template>表格内容插槽位置预留</template> -->
</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>
<!-- 搜索按钮窗体组件 -->
<searchPage
ref="searchTable"
:tableLoading="Loading.autoTableLoading"
:advancedFilter="advancedFilter()"
:filterPageListParams="filterPageListParams"
:formTitle="searchTitle"
:displayDialog="displayDialog.AddNewDialog"
:searchTableData="searchData"
:searchTableColumns="searchColumns"
:searchTotalCount="searchTotalCount"
:supplierItemPage="searchPageListParams"
@handleSelectionChange="prepareFormData"
@SizeChange="searchAlterResultCount($event, searchPageListParams)"
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)"
@tableButtonClick="searchSubmit(arguments)"
></searchPage>
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用-->
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 -->
<importFile
:loading="Loading.importLoading"
:show="displayDialog.importDialog"
:disabledMethod = {method1:false,method2:false,method3:false}
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false}
isAllowPartImportValue="1"
@importClick="postImportMergeClick(arguments)"
@postImportDown="importDown"
></importFile>
<!--抽屉-->
<curren-Drawer
ref="currenDrawer_Ref"
:title="apiColumns_DesTions"
@rowDrop="rowDrop"
:tableColumns="apiColumns_DetailsTable"
:tabsDesTions="apiColumns_DesTions"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:dropdownData="dropdownData"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:firstTabs="firstTabs"
:totalCount="totalCountDetails"
:currentPage="oldSkipCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
:buttonOperationList_left="operationButtonsDetail"
></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 { zhApiColumnsLable } from '@/utils/index'
export default {
name: "ExportCustomUserSetting",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
newAndEdiDialogMixins
],
computed: {
editDialog: {
get: function () {
return this.displayDialog.newDialog || this.displayDialog.editDialog;
},
},
},
data () {
const userInfo=this.$store.getters.currentUserInfo
return {
tableLoading:false,
//
currenButtonData: [
this.defaultAddBtn(),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
//
CreateFormData: {
customUserSetting: null,
exportUserName: userInfo.name,
exportUserId: userInfo.id,
exportColumnName: null,
exportTableName: null,
},
//
editFormData: {
customUserSetting: null,
exportUserName: userInfo.name,
exportUserId: userInfo.id,
exportColumnName: null,
exportTableName: null,
},
editOptions: {},
CreateForm: [
{ 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: 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: {
customUserSetting: [{ required: true, trigger: "blur", message: "不可为空" }],
exportColumnName: [{ required: true, trigger: "blur", message: "不可为空" }],
exportTableName: [{ required: true, trigger: "blur", message: "不可为空" }],
},
editRule: {
customUserSetting: [{ required: true, trigger: "blur", message: "不可为空" }],
exportColumnName: [{ required: true, trigger: "blur", message: "不可为空" }],
exportTableName: [{ required: true, trigger: "blur", message: "不可为空" }],
}
},
};
},
mounted () {
this.paging();
},
};
</script>
<style lang="scss" scoped>
@import "@/styles/basicData.scss";
</style>
Loading…
Cancel
Save