提交 c88b8fb1 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 2516ef5e
...@@ -12,4 +12,10 @@ ...@@ -12,4 +12,10 @@
width: 100%; width: 100%;
overflow: auto; overflow: auto;
} }
.font-class{
margin: 0px;
padding: 0px;
font-family: '微软雅黑','黑体','宋体';
font-size: 16px;
}
} }
\ No newline at end of file
...@@ -2,47 +2,44 @@ ...@@ -2,47 +2,44 @@
<div class="app-data-upload-view"> <div class="app-data-upload-view">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<el-button type="primary" @click="handleUpLoad">选取文件</el-button> <el-button type="primary" @click="handleUpLoad">{{$t('info.selectfile')}}</el-button>
<input ref="inputUpLoad" type="file" style="display: none" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" @change="importFile"/> <input ref="inputUpLoad" type="file" style="display: none" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" @change="importFile"/>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-button type="primary" @click="uploadServer">上传服务器</el-button> <el-button type="primary" @click="uploadServer">{{$t('info.uploadserver')}}</el-button>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<div class="import-temp"><span style="cursor: pointer;" @click="downloadTemp">下载导入数据模板</span></div> <div class="import-temp"><span style="cursor: pointer;" @click="downloadTemp">{{$t('info.datatemplate')}}</span></div>
</el-col> </el-col>
</el-row> </el-row>
<el-divider></el-divider> <el-divider></el-divider>
<el-row style="height:calc(100% - 128px);padding: 0px 12px;"> <el-row style="height:calc(100% - 128px);padding: 0px 12px;">
<div class="data-info-content" > <div class="data-info-content" >
<template v-if="importDataArray.length >0"> <template v-if="importDataArray.length >0 && isUploading === false">
<ul> <ul>
<li v-for="(item,index) in importDataArray" :key="index"> <li v-for="(item,index) in importDataArray" :key="index" class="font-class">
{{'数据标识为'+item[importUniqueItem]+'读取成功......'}} {{$t('info.dataid')+item[importUniqueItem]+$t('info.read')+'......'}}
</li> </li>
</ul> </ul>
</template> </template>
<template v-if="importDataArray.length ==0"> <template v-if="hasImported === true && importDataArray.length === 0">
{{uploadStatus === true?"导入中......":""}} <span class="font-class">{{isUploading === true?$t('info.importing')+"......":$t('info.completed')}}</span>
</template> </template>
</div> </div>
</el-row> </el-row>
<el-row :gutter="20"> <el-row>
<el-col :span="4"> <!-- <el-col :span="4">
<div class="import-temp"> <div class="import-temp">
<span style="cursor: pointer;display: inline-block;" @click="downloadSuccessData">{{importSuccessData.length >0?"下载导入成功数据":""}}</span> <div style="cursor: pointer;display: inline-block;" @click="downloadSuccessData">{{importSuccessData.length >0?"下载导入成功数据":""}}</div>
</div> </div>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<div class="import-temp"> <div class="import-temp">
<span style="cursor: pointer;display: inline-block;" @click="downloadErrorData">{{importErrorData.length >0?"下载导入失败数据":""}}</span> <span style="cursor: pointer;display: inline-block;" @click="downloadErrorData">{{importErrorData.length >0?"下载导入失败数据":""}}</span>
</div> </div>
</el-col> </el-col> -->
<el-col :span="2" :offset="11"> <el-col :span="2" :offset="22">
<el-button type="primary" @click="handleOK">确定</el-button> <el-button type="primary" @click="handleOK">{{$t('info.confirm')}}</el-button>
</el-col>
<el-col :span="3" style="text-align: center;">
<el-button plain @click="handleCancel">取消</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -59,12 +56,32 @@ import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorat ...@@ -59,12 +56,32 @@ import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorat
messages: { messages: {
'zh-CN': { 'zh-CN': {
info: { info: {
"viewtitle":"应用数据导入视图" "viewtitle":"应用数据导入视图",
"selectfile":"选取文件",
"uploadserver":"上传服务器",
"datatemplate":"下载导入数据模板",
"dataid":"数据标识为",
"read":"读取成功",
"importing":"导入中",
"completed":"导入完成",
"confirm":"确认",
"datatemp":"导入数据模板",
"importfailed":"导入失败"
} }
}, },
'en-US': { 'en-US': {
info: { info: {
"viewtitle":"AppDataUploadView" "viewtitle":"AppDataUploadView",
"selectfile":"Select File",
"uploadserver":"Upload Server",
"datatemplate":"Download Import Data Template",
"dataid":"Data ID is ",
"read":" read Successful",
"importing":"Importing",
"completed":"Import Completed",
"confirm":"OK",
"datatemp":"Data Template",
"importfailed":"Import Failed"
} }
} }
} }
...@@ -137,6 +154,14 @@ export default class AppDataUploadView extends Vue { ...@@ -137,6 +154,14 @@ export default class AppDataUploadView extends Vue {
*/ */
protected importId:string = ""; protected importId:string = "";
/**
* 是否已有导入数据
*
* @type {boolean}
* @memberof AppDataUploadView
*/
protected hasImported:boolean = false;
/** /**
* 导入数据识别项属性 * 导入数据识别项属性
* *
...@@ -145,13 +170,21 @@ export default class AppDataUploadView extends Vue { ...@@ -145,13 +170,21 @@ export default class AppDataUploadView extends Vue {
*/ */
protected importUniqueItem:string =""; protected importUniqueItem:string ="";
/**
* 提示信息
*
* @type {string}
* @memberof AppDataUploadView
*/
protected promptInfo:string ="";
/** /**
* 导入状态 * 导入状态
* *
* @type {boolean} * @type {boolean}
* @memberof AppDataUploadView * @memberof AppDataUploadView
*/ */
protected uploadStatus:boolean = false; protected isUploading:boolean = false;
/** /**
* 导入成功数据 * 导入成功数据
...@@ -227,7 +260,6 @@ export default class AppDataUploadView extends Vue { ...@@ -227,7 +260,6 @@ export default class AppDataUploadView extends Vue {
} }
this.allFieldMap.set(item.headername,item); this.allFieldMap.set(item.headername,item);
}); });
console.log(this.allFieldMap);
//获取代码表值 //获取代码表值
this.allCodeList = await this.getChartAllCodeList(); this.allCodeList = await this.getChartAllCodeList();
} }
...@@ -258,25 +290,7 @@ export default class AppDataUploadView extends Vue { ...@@ -258,25 +290,7 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView * @memberof AppDataUploadView
*/ */
public downloadTemp(){ public downloadTemp(){
this.importExcel(this.viewparams.appDeLogicName+"导入数据模板",[]); this.importExcel(this.viewparams.appDeLogicName+this.$t('info.datatemp'),[]);
}
/**
* 下载导入成功数据
*
* @memberof AppDataUploadView
*/
public downloadSuccessData(){
this.importExcel(this.viewparams.appDeLogicName+"导入成功数据",this.importSuccessData);
}
/**
* 下载导入失败数据
*
* @memberof AppDataUploadView
*/
public downloadErrorData(){
this.importExcel(this.viewparams.appDeLogicName+"导入失败数据",this.importErrorData);
} }
/** /**
...@@ -285,6 +299,7 @@ export default class AppDataUploadView extends Vue { ...@@ -285,6 +299,7 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView * @memberof AppDataUploadView
*/ */
public handleUpLoad(){ public handleUpLoad(){
this.importSuccessData = [];
(this.$refs.inputUpLoad as any).click(); (this.$refs.inputUpLoad as any).click();
} }
...@@ -299,20 +314,29 @@ export default class AppDataUploadView extends Vue { ...@@ -299,20 +314,29 @@ export default class AppDataUploadView extends Vue {
} }
let tempDataArray:Array<any> = []; let tempDataArray:Array<any> = [];
this.transformData(this.importDataArray,tempDataArray); this.transformData(this.importDataArray,tempDataArray);
this.hasImported = true;
this.isUploading = true;
this.importDataArray = []; this.importDataArray = [];
this.uploadStatus = true;
try{ try{
this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{ this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{
service.ImportData(this.viewdata,{name:this.importId,data:tempDataArray}).then((res:any) =>{ service.ImportData(this.viewdata,{name:this.importId,data:tempDataArray}).then((res:any) =>{
console.log(res); const result:any = res.data;
this.uploadStatus = false; if(result && result.rst !== 0){
this.promptInfo = (this.$t('info.importfailed') as string);
this.isUploading = false;
return;
}
this.importSuccessData = result.data;
this.isUploading = false;
}) })
}).catch((error:any) =>{ }).catch((error:any) =>{
this.uploadStatus = false; this.isUploading = false;
this.promptInfo = (this.$t('info.importfailed') as string);
console.error(error); console.error(error);
}) })
}catch(error){ }catch(error){
this.uploadStatus = false; this.isUploading = false;
this.promptInfo = (this.$t('info.importfailed') as string);
console.error(error); console.error(error);
}; };
} }
...@@ -346,16 +370,7 @@ export default class AppDataUploadView extends Vue { ...@@ -346,16 +370,7 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView * @memberof AppDataUploadView
*/ */
public handleOK(){ public handleOK(){
this.$emit('viewdataschange',this.importSuccessData); this.$emit('close',this.importSuccessData);
}
/**
* 取消
*
* @memberof AppDataUploadView
*/
public handleCancel(){
this.$emit('close',null);
} }
/** /**
......
import ibzdictitem_en_US from '@locale/lanres/ibzdict-item/ibzdict-item_en_US'; import ibzdictitem_en_US from '@locale/lanres/ibzdictitem/ibzdictitem_en_US';
import ibzdict_en_US from '@locale/lanres/ibzdict/ibzdict_en_US'; import ibzdict_en_US from '@locale/lanres/ibzdict/ibzdict_en_US';
import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US'; import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US'; import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
......
import ibzdictitem_zh_CN from '@locale/lanres/ibzdict-item/ibzdict-item_zh_CN'; import ibzdictitem_zh_CN from '@locale/lanres/ibzdictitem/ibzdictitem_zh_CN';
import ibzdict_zh_CN from '@locale/lanres/ibzdict/ibzdict_zh_CN'; import ibzdict_zh_CN from '@locale/lanres/ibzdict/ibzdict_zh_CN';
import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN'; import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN'; import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
......
...@@ -7,5 +7,5 @@ import './login/login'; ...@@ -7,5 +7,5 @@ import './login/login';
import './upload/upload'; import './upload/upload';
// 实体级接口对象 // 实体级接口对象
import './entity/ibzdict-items/ibzdict-items'; import './entity/ibzdictitems/ibzdictitems';
import './entity/ibzdicts/ibzdicts'; import './entity/ibzdicts/ibzdicts';
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import IBZDictItemService from '@/service/ibzdict-item/ibzdict-item-service'; import IBZDICTITEMService from '@/service/ibzdictitem/ibzdictitem-service';
import EditViewEngine from '@engine/view/edit-view-engine'; import EditViewEngine from '@engine/view/edit-view-engine';
...@@ -140,10 +140,10 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -140,10 +140,10 @@ export default class IBZDictItemEditViewBase extends Vue {
/** /**
* 实体服务对象 * 实体服务对象
* *
* @type {IBZDictItemService} * @type {IBZDICTITEMService}
* @memberof IBZDictItemEditViewBase * @memberof IBZDictItemEditViewBase
*/ */
protected appEntityService: IBZDictItemService = new IBZDictItemService; protected appEntityService: IBZDICTITEMService = new IBZDICTITEMService;
/** /**
...@@ -661,7 +661,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -661,7 +661,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.Save(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -687,7 +687,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -687,7 +687,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -713,7 +713,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -713,7 +713,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -739,7 +739,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -739,7 +739,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -765,7 +765,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -765,7 +765,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -791,7 +791,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -791,7 +791,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -817,7 +817,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -817,7 +817,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -843,7 +843,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -843,7 +843,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -869,7 +869,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -869,7 +869,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -895,7 +895,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -895,7 +895,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.FirstRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.FirstRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -921,7 +921,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -921,7 +921,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.PrevRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.PrevRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -947,7 +947,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -947,7 +947,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.NextRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.NextRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -973,7 +973,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -973,7 +973,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.LastRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.LastRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -999,7 +999,7 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -999,7 +999,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -1339,33 +1339,6 @@ export default class IBZDictItemEditViewBase extends Vue { ...@@ -1339,33 +1339,6 @@ export default class IBZDictItemEditViewBase extends Vue {
} }
} }
/**
* 销毁视图回调
*
* @memberof IBZDictItemEditViewBase
*/
protected destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBZDictItemEditViewBase
*/
protected afterDestroyed(){
if(this.viewDefaultUsage){
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
if(item.startsWith(this.context.srfsessionid)){
localStorage.removeItem(item);
}
})
}
}
}
} }
</script> </script>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { Component } from 'vue-property-decorator'; import { Component } from 'vue-property-decorator';
import IBZDictItemEditViewBase from './ibzdict-item-edit-view-base.vue'; import IBZDictItemEditViewBase from './ibzdict-item-edit-view-base.vue';
import view_form from '@widgets/ibzdict-item/main-form/main-form.vue'; import view_form from '@widgets/ibzdictitem/main-form/main-form.vue';
@Component({ @Component({
components: { components: {
view_form, view_form,
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import IBZDictItemService from '@/service/ibzdict-item/ibzdict-item-service'; import IBZDICTITEMService from '@/service/ibzdictitem/ibzdictitem-service';
import GridViewEngine from '@engine/view/grid-view-engine'; import GridViewEngine from '@engine/view/grid-view-engine';
...@@ -162,10 +162,10 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -162,10 +162,10 @@ export default class IBZDictItemGridViewBase extends Vue {
/** /**
* 实体服务对象 * 实体服务对象
* *
* @type {IBZDictItemService} * @type {IBZDICTITEMService}
* @memberof IBZDictItemGridViewBase * @memberof IBZDictItemGridViewBase
*/ */
protected appEntityService: IBZDictItemService = new IBZDictItemService; protected appEntityService: IBZDICTITEMService = new IBZDICTITEMService;
/** /**
...@@ -755,7 +755,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -755,7 +755,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -781,7 +781,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -781,7 +781,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -807,7 +807,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -807,7 +807,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.View(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.View(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -833,7 +833,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -833,7 +833,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -859,7 +859,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -859,7 +859,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -885,7 +885,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -885,7 +885,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.NewRow(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -911,7 +911,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -911,7 +911,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.Remove(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -937,7 +937,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -937,7 +937,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -963,7 +963,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -963,7 +963,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -989,7 +989,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -989,7 +989,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -1015,7 +1015,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -1015,7 +1015,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.Import(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.Import(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -1041,7 +1041,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -1041,7 +1041,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -1067,7 +1067,7 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -1067,7 +1067,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
// 界面行为 // 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem"); this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
} }
/** /**
...@@ -1087,11 +1087,9 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -1087,11 +1087,9 @@ export default class IBZDictItemGridViewBase extends Vue {
Object.assign(curViewParam,args[0]); Object.assign(curViewParam,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(curViewParam.ibzdict && true){
deResParameters = [ deResParameters = [
{ pathName: 'ibzdicts', parameterName: 'ibzdict' }, { pathName: 'ibzdicts', parameterName: 'ibzdict' },
] ];
}
const parameters: any[] = [ const parameters: any[] = [
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' }, { pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
{ pathName: 'editview', parameterName: 'editview' }, { pathName: 'editview', parameterName: 'editview' },
...@@ -1124,11 +1122,9 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -1124,11 +1122,9 @@ export default class IBZDictItemGridViewBase extends Vue {
Object.assign(curViewParam,args[0]); Object.assign(curViewParam,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(curViewParam.ibzdict && true){
deResParameters = [ deResParameters = [
{ pathName: 'ibzdicts', parameterName: 'ibzdict' }, { pathName: 'ibzdicts', parameterName: 'ibzdict' },
] ];
}
const parameters: any[] = [ const parameters: any[] = [
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' }, { pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
{ pathName: 'editview', parameterName: 'editview' }, { pathName: 'editview', parameterName: 'editview' },
...@@ -1417,33 +1413,6 @@ export default class IBZDictItemGridViewBase extends Vue { ...@@ -1417,33 +1413,6 @@ export default class IBZDictItemGridViewBase extends Vue {
} }
} }
/**
* 销毁视图回调
*
* @memberof IBZDictItemGridViewBase
*/
protected destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBZDictItemGridViewBase
*/
protected afterDestroyed(){
if(this.viewDefaultUsage){
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
if(item.startsWith(this.context.srfsessionid)){
localStorage.removeItem(item);
}
})
}
}
}
/** /**
* 是否单选 * 是否单选
* *
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
import { Component } from 'vue-property-decorator'; import { Component } from 'vue-property-decorator';
import IBZDictItemGridViewBase from './ibzdict-item-grid-view-base.vue'; import IBZDictItemGridViewBase from './ibzdict-item-grid-view-base.vue';
import view_grid from '@widgets/ibzdict-item/main-grid/main-grid.vue'; import view_grid from '@widgets/ibzdictitem/main-grid/main-grid.vue';
import view_searchform from '@widgets/ibzdict-item/default-searchform/default-searchform.vue'; import view_searchform from '@widgets/ibzdictitem/default-searchform/default-searchform.vue';
@Component({ @Component({
components: { components: {
view_grid, view_grid,
......
...@@ -39,7 +39,7 @@ export class EntityServiceRegister { ...@@ -39,7 +39,7 @@ export class EntityServiceRegister {
* @memberof EntityServiceRegister * @memberof EntityServiceRegister
*/ */
protected init(): void { protected init(): void {
this.allEntityService.set('ibzdictitem', () => import('@/service/ibzdict-item/ibzdict-item-service')); this.allEntityService.set('ibzdictitem', () => import('@/service/ibzdictitem/ibzdictitem-service'));
this.allEntityService.set('ibzdict', () => import('@/service/ibzdict/ibzdict-service')); this.allEntityService.set('ibzdict', () => import('@/service/ibzdict/ibzdict-service'));
} }
......
...@@ -39,7 +39,7 @@ export class UIServiceRegister { ...@@ -39,7 +39,7 @@ export class UIServiceRegister {
* @memberof UIServiceRegister * @memberof UIServiceRegister
*/ */
protected init(): void { protected init(): void {
this.allUIService.set('ibzdictitem', () => import('@/uiservice/ibzdict-item/ibzdict-item-ui-service')); this.allUIService.set('ibzdictitem', () => import('@/uiservice/ibzdictitem/ibzdictitem-ui-service'));
this.allUIService.set('ibzdict', () => import('@/uiservice/ibzdict/ibzdict-ui-service')); this.allUIService.set('ibzdict', () => import('@/uiservice/ibzdict/ibzdict-ui-service'));
} }
......
...@@ -759,7 +759,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -759,7 +759,7 @@ export default class MainBase extends Vue implements ControlInterface {
let container: Subject<any> = this.$appmodal.openModal(view, JSON.parse(JSON.stringify(this.context)), importDataModel); let container: Subject<any> = this.$appmodal.openModal(view, JSON.parse(JSON.stringify(this.context)), importDataModel);
container.subscribe((result: any) => { container.subscribe((result: any) => {
if(Object.is(result.ret,'OK')){ if(Object.is(result.ret,'OK')){
console.log(result); this.refresh(result.datas);
} }
}); });
} }
......
...@@ -156,7 +156,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -156,7 +156,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 获取多项数据 * 获取多项数据
* *
* @returns {any[]} * @returns {any[]}
* @memberof Default * @memberof DefaultBase
*/ */
public getDatas(): any[] { public getDatas(): any[] {
return [this.data]; return [this.data];
...@@ -166,49 +166,25 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -166,49 +166,25 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 获取单项树 * 获取单项树
* *
* @returns {*} * @returns {*}
* @memberof Default * @memberof DefaultBase
*/ */
public getData(): any { public getData(): any {
return this.data; return this.data;
} }
/**
* 是否默认保存
*
* @type {boolean}
* @memberof Default
*/
@Prop({ default: false }) protected autosave?: boolean;
/** /**
* 显示处理提示 * 显示处理提示
* *
* @type {boolean} * @type {boolean}
* @memberof Default * @memberof DefaultBase
*/ */
@Prop({ default: true }) protected showBusyIndicator?: boolean; @Prop({ default: true }) protected showBusyIndicator?: boolean;
/**
* 部件行为--update
*
* @type {string}
* @memberof Default
*/
@Prop() protected updateAction!: string;
/**
* 部件行为--remove
*
* @type {string}
* @memberof Default
*/
@Prop() protected removeAction!: string;
/** /**
* 部件行为--loaddraft * 部件行为--loaddraft
* *
* @type {string} * @type {string}
* @memberof Default * @memberof DefaultBase
*/ */
@Prop() protected loaddraftAction!: string; @Prop() protected loaddraftAction!: string;
...@@ -216,31 +192,15 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -216,31 +192,15 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 部件行为--load * 部件行为--load
* *
* @type {string} * @type {string}
* @memberof Default * @memberof DefaultBase
*/ */
@Prop() protected loadAction!: string; @Prop() protected loadAction!: string;
/**
* 部件行为--create
*
* @type {string}
* @memberof Default
*/
@Prop() protected createAction!: string;
/**
* 部件行为--create
*
* @type {string}
* @memberof Default
*/
@Prop() protected searchAction!: string;
/** /**
* 视图标识 * 视图标识
* *
* @type {string} * @type {string}
* @memberof Default * @memberof DefaultBase
*/ */
@Prop() protected viewtag!: string; @Prop() protected viewtag!: string;
...@@ -248,7 +208,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -248,7 +208,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 表单状态 * 表单状态
* *
* @type {Subject<any>} * @type {Subject<any>}
* @memberof Default * @memberof DefaultBase
*/ */
protected formState: Subject<any> = new Subject(); protected formState: Subject<any> = new Subject();
...@@ -256,7 +216,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -256,7 +216,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 忽略表单项值变化 * 忽略表单项值变化
* *
* @type {boolean} * @type {boolean}
* @memberof Default * @memberof DefaultBase
*/ */
protected ignorefieldvaluechange: boolean = false; protected ignorefieldvaluechange: boolean = false;
...@@ -265,7 +225,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -265,7 +225,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @private * @private
* @type {Subject<any>} * @type {Subject<any>}
* @memberof Default * @memberof DefaultBase
*/ */
private dataChang: Subject<any> = new Subject(); private dataChang: Subject<any> = new Subject();
...@@ -274,7 +234,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -274,7 +234,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @private * @private
* @type {(Subscription | undefined)} * @type {(Subscription | undefined)}
* @memberof Default * @memberof DefaultBase
*/ */
private dataChangEvent: Subscription | undefined; private dataChangEvent: Subscription | undefined;
...@@ -283,7 +243,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -283,7 +243,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @private * @private
* @type {*} * @type {*}
* @memberof Default * @memberof DefaultBase
*/ */
private oldData: any = {}; private oldData: any = {};
...@@ -291,7 +251,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -291,7 +251,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 表单数据对象 * 表单数据对象
* *
* @type {*} * @type {*}
* @memberof Default * @memberof DefaultBase
*/ */
protected data: any = { protected data: any = {
n_ibzdictitemname_like: null, n_ibzdictitemname_like: null,
...@@ -302,7 +262,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -302,7 +262,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 属性值规则 * 属性值规则
* *
* @type {*} * @type {*}
* @memberof Default * @memberof DefaultBase
*/ */
protected rules: any = { protected rules: any = {
n_ibzdictitemname_like: [ n_ibzdictitemname_like: [
...@@ -323,7 +283,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -323,7 +283,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 详情模型集合 * 详情模型集合
* *
* @type {*} * @type {*}
* @memberof Default * @memberof DefaultBase
*/ */
protected detailsModel: any = { protected detailsModel: any = {
formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }) formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
...@@ -339,7 +299,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -339,7 +299,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @param {*} newVal * @param {*} newVal
* @param {*} oldVal * @param {*} oldVal
* @memberof Default * @memberof DefaultBase
*/ */
@Watch('data.n_ibzdictitemname_like') @Watch('data.n_ibzdictitemname_like')
onN_ibzdictitemname_likeChange(newVal: any, oldVal: any) { onN_ibzdictitemname_likeChange(newVal: any, oldVal: any) {
...@@ -351,7 +311,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -351,7 +311,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @param {*} newVal * @param {*} newVal
* @param {*} oldVal * @param {*} oldVal
* @memberof Default * @memberof DefaultBase
*/ */
@Watch('data.n_dictitemval_like') @Watch('data.n_dictitemval_like')
onN_dictitemval_likeChange(newVal: any, oldVal: any) { onN_dictitemval_likeChange(newVal: any, oldVal: any) {
...@@ -364,7 +324,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -364,7 +324,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @private * @private
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal } * @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof Default * @memberof DefaultBase
*/ */
private resetFormData({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void { private resetFormData({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
} }
...@@ -374,7 +334,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -374,7 +334,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @private * @private
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal } * @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof Default * @memberof DefaultBase
*/ */
private formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void { private formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
...@@ -389,7 +349,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -389,7 +349,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @private * @private
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal } * @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @returns {void} * @returns {void}
* @memberof Default * @memberof DefaultBase
*/ */
private formDataChange({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void { private formDataChange({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
if (this.ignorefieldvaluechange) { if (this.ignorefieldvaluechange) {
...@@ -405,7 +365,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -405,7 +365,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @private * @private
* @param {*} [data={}] * @param {*} [data={}]
* @memberof Default * @memberof DefaultBase
*/ */
private onFormLoad(data: any = {}): void { private onFormLoad(data: any = {}): void {
this.setFormEnableCond(data); this.setFormEnableCond(data);
...@@ -417,7 +377,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -417,7 +377,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 值填充 * 值填充
* *
* @param {*} [_datas={}] * @param {*} [_datas={}]
* @memberof Default * @memberof DefaultBase
*/ */
protected fillForm(_datas: any = {}): void { protected fillForm(_datas: any = {}): void {
this.ignorefieldvaluechange = true; this.ignorefieldvaluechange = true;
...@@ -436,7 +396,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -436,7 +396,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @protected * @protected
* @param {*} data * @param {*} data
* @memberof Default * @memberof DefaultBase
*/ */
protected setFormEnableCond(data: any): void { protected setFormEnableCond(data: any): void {
Object.values(this.detailsModel).forEach((detail: any) => { Object.values(this.detailsModel).forEach((detail: any) => {
...@@ -452,7 +412,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -452,7 +412,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 重置草稿表单状态 * 重置草稿表单状态
* *
* @private * @private
* @memberof Default * @memberof DefaultBase
*/ */
private resetDraftFormStates(): void { private resetDraftFormStates(): void {
const form: any = this.$refs.form; const form: any = this.$refs.form;
...@@ -464,7 +424,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -464,7 +424,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
/** /**
* 重置校验结果 * 重置校验结果
* *
* @memberof Default * @memberof DefaultBase
*/ */
protected resetValidates(): void { protected resetValidates(): void {
Object.values(this.detailsModel).forEach((detail: any) => { Object.values(this.detailsModel).forEach((detail: any) => {
...@@ -480,7 +440,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -480,7 +440,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 填充校验结果 (后台) * 填充校验结果 (后台)
* *
* @param {any[]} fieldErrors * @param {any[]} fieldErrors
* @memberof Default * @memberof DefaultBase
*/ */
protected fillValidates(fieldErrors: any[]): void { protected fillValidates(fieldErrors: any[]): void {
fieldErrors.forEach((error: any) => { fieldErrors.forEach((error: any) => {
...@@ -498,7 +458,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -498,7 +458,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 表单校验状态 * 表单校验状态
* *
* @returns {boolean} * @returns {boolean}
* @memberof Default * @memberof DefaultBase
*/ */
protected formValidateStatus(): boolean { protected formValidateStatus(): boolean {
const form: any = this.$refs.searchform; const form: any = this.$refs.searchform;
...@@ -513,7 +473,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -513,7 +473,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 获取全部值 * 获取全部值
* *
* @returns {*} * @returns {*}
* @memberof Default * @memberof DefaultBase
*/ */
protected getValues(): any { protected getValues(): any {
return this.data; return this.data;
...@@ -524,7 +484,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -524,7 +484,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @param {{ name: string, value: any }} $event * @param {{ name: string, value: any }} $event
* @returns {void} * @returns {void}
* @memberof Default * @memberof DefaultBase
*/ */
protected onFormItemValueChange($event: { name: string, value: any }): void { protected onFormItemValueChange($event: { name: string, value: any }): void {
if (!$event) { if (!$event) {
...@@ -542,7 +502,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -542,7 +502,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @param {string} name * @param {string} name
* @param {*} value * @param {*} value
* @returns {void} * @returns {void}
* @memberof Default * @memberof DefaultBase
*/ */
protected setDataItemValue(name: string, value: any): void { protected setDataItemValue(name: string, value: any): void {
if (!name || Object.is(name, '') || !this.data.hasOwnProperty(name)) { if (!name || Object.is(name, '') || !this.data.hasOwnProperty(name)) {
...@@ -560,7 +520,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -560,7 +520,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 分组界面行为事件 * 分组界面行为事件
* *
* @param {*} $event * @param {*} $event
* @memberof Default * @memberof DefaultBase
*/ */
protected groupUIActionClick($event: any): void { protected groupUIActionClick($event: any): void {
if (!$event) { if (!$event) {
...@@ -572,7 +532,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -572,7 +532,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
/** /**
* Vue声明周期(处理组件的输入属性) * Vue声明周期(处理组件的输入属性)
* *
* @memberof Default * @memberof DefaultBase
*/ */
protected created(): void { protected created(): void {
this.afterCreated(); this.afterCreated();
...@@ -581,7 +541,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -581,7 +541,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
/** /**
* 执行created后的逻辑 * 执行created后的逻辑
* *
* @memberof Default * @memberof DefaultBase
*/ */
protected afterCreated(){ protected afterCreated(){
if (this.viewState) { if (this.viewState) {
...@@ -598,26 +558,14 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -598,26 +558,14 @@ export default class DefaultBase extends Vue implements ControlInterface {
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); this.loadDraft(data);
} }
if (Object.is('save', action)) {
this.save(data);
}
}); });
} }
this.dataChang
.pipe(
debounceTime(300),
distinctUntilChanged()
).subscribe((data: any) => {
if (this.autosave) {
this.autoSave();
}
});
} }
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof Default * @memberof DefaultBase
*/ */
protected destroyed() { protected destroyed() {
this.afterDestroy(); this.afterDestroy();
...@@ -626,7 +574,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -626,7 +574,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
/** /**
* 执行destroyed后的逻辑 * 执行destroyed后的逻辑
* *
* @memberof Default * @memberof DefaultBase
*/ */
protected afterDestroy() { protected afterDestroy() {
if (this.viewStateEvent) { if (this.viewStateEvent) {
...@@ -637,42 +585,12 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -637,42 +585,12 @@ export default class DefaultBase extends Vue implements ControlInterface {
} }
} }
/**
* 拷贝内容
*
* @param {*} [arg={}]
* @memberof @memberof Default
*/
protected copy(arg: any = {}): void {
this.loadDraft(arg);
}
/**
* 部件刷新
*
* @param {any[]} args
* @memberof Default
*/
protected refresh(args: any[]): void {
let arg: any = {};
if (this.data.srfkey && !Object.is(this.data.srfkey, '')) {
Object.assign(arg, { srfkey: this.data.srfkey });
this.load(arg);
return;
}
if (this.data.srfkeys && !Object.is(this.data.srfkeys, '')) {
Object.assign(arg, { srfkey: this.data.srfkeys });
this.load(arg);
return;
}
}
/** /**
* 自动加载 * 自动加载
* *
* @param {*} [arg={}] * @param {*} [arg={}]
* @returns {void} * @returns {void}
* @memberof Default * @memberof DefaultBase
*/ */
protected autoLoad(arg: any = {}): void { protected autoLoad(arg: any = {}): void {
if (arg.srfkey && !Object.is(arg.srfkey, '')) { if (arg.srfkey && !Object.is(arg.srfkey, '')) {
...@@ -693,7 +611,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -693,7 +611,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* *
* @private * @private
* @param {*} [opt={}] * @param {*} [opt={}]
* @memberof Default * @memberof DefaultBase
*/ */
private load(opt: any = {}): void { private load(opt: any = {}): void {
if(!this.loadAction){ if(!this.loadAction){
...@@ -730,9 +648,9 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -730,9 +648,9 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 加载草稿 * 加载草稿
* *
* @param {*} [opt={}] * @param {*} [opt={}]
* @memberof Default * @memberof DefaultBase
*/ */
protected loadDraft(opt: any = {}): void { protected loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: 'IBZDictItemGridView视图搜索表单loaddraftAction参数未配置' }); this.$Notice.error({ title: '错误', desc: 'IBZDictItemGridView视图搜索表单loaddraftAction参数未配置' });
return; return;
...@@ -751,10 +669,6 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -751,10 +669,6 @@ export default class DefaultBase extends Vue implements ControlInterface {
const data = response.data; const data = response.data;
this.resetDraftFormStates(); this.resetDraftFormStates();
this.onFormLoad(data); this.onFormLoad(data);
this.$emit('load', data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
setTimeout(() => { setTimeout(() => {
const form: any = this.$refs.form; const form: any = this.$refs.form;
if (form) { if (form) {
...@@ -765,50 +679,14 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -765,50 +679,14 @@ export default class DefaultBase extends Vue implements ControlInterface {
}); });
} }
}); });
}).catch((response: any) => { if(Object.is(mode,'RESET')){
if (response && response.status === 401) {
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
return;
}
const { data: _data } = response;
this.$Notice.error({ title: _data.title, desc: _data.message });
});
}
/**
* 自动保存
*
* @param {*} [opt={}]
* @memberof Default
*/
protected autoSave(opt: any = {}): void {
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
return; return;
} }
const arg: any = { ...opt };
const data = this.getValues();
Object.assign(arg, data);
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.add(action,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
}
return;
} }
this.$emit('load', data);
const data = response.data;
this.onFormLoad(data);
this.$emit('save', data);
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'load', data: data });
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
...@@ -818,62 +696,10 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -818,62 +696,10 @@ export default class DefaultBase extends Vue implements ControlInterface {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: '错误', desc: '系统异常' });
return; return;
} }
});
}
/** const { data: _data } = response;
* 保存 this.$Notice.error({ title: _data.title, desc: _data.message });
*
* @param {*} [opt={}]
* @param {boolean} [showResultInfo]
* @returns {Promise<any>}
* @memberof Default
*/
protected async save(opt: any = {}, showResultInfo?: boolean): Promise<any> {
showResultInfo = showResultInfo === undefined ? true : false;
if (!this.formValidateStatus()) {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' });
return;
}
const arg: any = { ...opt };
const data = this.getValues();
Object.assign(arg, data);
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.add(action,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
}
return;
}
const data = response.data;
this.onFormLoad(data);
this.$emit('save', data);
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
});
if (showResultInfo) {
this.$Notice.success({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + '&nbsp;保存成功!' });
}
resolve(response);
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
reject(response);
return;
}
reject(response);
}); });
})
} }
/** /**
...@@ -884,7 +710,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -884,7 +710,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @param {string[]} updateDetails 更新项 * @param {string[]} updateDetails 更新项
* @param {boolean} [showloading] 是否显示加载状态 * @param {boolean} [showloading] 是否显示加载状态
* @returns {void} * @returns {void}
* @memberof Default * @memberof DefaultBase
*/ */
protected updateFormItems(mode: string, data: any = {}, updateDetails: string[], showloading?: boolean): void { protected updateFormItems(mode: string, data: any = {}, updateDetails: string[], showloading?: boolean): void {
...@@ -894,28 +720,34 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -894,28 +720,34 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 回车事件 * 回车事件
* *
* @param {*} $event * @param {*} $event
* @memberof Default * @memberof DefaultBase
*/ */
protected onEnter($event: any): void { protected onEnter($event: any): void {
if (!this.formValidateStatus()) {
return;
}
this.$emit('load', this.data); this.$emit('load', this.data);
} }
/** /**
* 搜索 * 搜索
* *
* @memberof Default * @memberof DefaultBase
*/ */
protected onSearch() { protected onSearch() {
if (!this.formValidateStatus()) {
return;
}
this.$emit('load', this.data); this.$emit('load', this.data);
} }
/** /**
* 重置 * 重置
* *
* @memberof Default * @memberof DefaultBase
*/ */
protected onReset() { protected onReset() {
this.loadDraft(); this.loadDraft({},'RESET');
} }
} }
</script> </script>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<template v-if="getColumnState('updatedate')"> <template v-if="getColumnState('updatedate')">
<el-table-column show-overflow-tooltip :prop="'updatedate'" :label="$t('ibzdictitem.main_grid.columns.updatedate')" :width="250" :align="'left'" :sortable="'custom'"> <el-table-column show-overflow-tooltip :prop="'updatedate'" :label="$t('ibzdictitem.main_grid.columns.updatedate')" :width="250" :align="'left'" :sortable="'custom'">
<template v-slot="{row,column}"> <template v-slot="{row,column}">
<span>{{row.updatedate}}</span> <app-format-data format="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS" :data="row.updatedate"></app-format-data>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
...@@ -806,6 +806,35 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -806,6 +806,35 @@ export default class MainBase extends Vue implements ControlInterface {
console.error("批量添加未实现"); console.error("批量添加未实现");
} }
/**
* 数据导入
*
* @param {*} data
* @memberof Main
*/
public importExcel(data:any ={}):void{
//导入excel
const importDataModel:any ={
}
if(Object.keys(importDataModel).length == 0){
this.$Notice.warning({ title: '警告', desc: '请配置数据导入项' });
return;
}
const view:any ={
viewname: 'app-data-upload',
title: '导入数据',
width: 900,
height: 700
}
let container: Subject<any> = this.$appmodal.openModal(view, JSON.parse(JSON.stringify(this.context)), importDataModel);
container.subscribe((result: any) => {
if(Object.is(result.ret,'OK')){
this.refresh(result.datas);
}
});
}
/** /**
* 数据导出 * 数据导出
* *
...@@ -818,7 +847,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -818,7 +847,7 @@ export default class MainBase extends Vue implements ControlInterface {
const tHeader: Array<any> = []; const tHeader: Array<any> = [];
const filterVal: Array<any> = []; const filterVal: Array<any> = [];
this.allColumns.forEach((item: any) => { this.allColumns.forEach((item: any) => {
item.show && item.label ? tHeader.push(item.label) : ""; item.show && item.label ? tHeader.push(this.$t(item.langtag)) : "";
item.show && item.name ? filterVal.push(item.name) : ""; item.show && item.name ? filterVal.push(item.name) : "";
}); });
const data = await this.formatExcelData(filterVal, _data); const data = await this.formatExcelData(filterVal, _data);
...@@ -826,7 +855,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -826,7 +855,7 @@ export default class MainBase extends Vue implements ControlInterface {
excel.export_json_to_excel({ excel.export_json_to_excel({
header: tHeader, //表头 必填 header: tHeader, //表头 必填
data, //具体数据 必填 data, //具体数据 必填
filename: "主实体"+"表", //非必填 filename: "字典项目表", //非必填
autoWidth: true, //非必填 autoWidth: true, //非必填
bookType: "xlsx" //非必填 bookType: "xlsx" //非必填
}); });
......
...@@ -6,6 +6,14 @@ ...@@ -6,6 +6,14 @@
*/ */
export default class MainModel { export default class MainModel {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof MainGridMode
*/
public isDEExport: boolean = false;
/** /**
* 获取数据项集合 * 获取数据项集合
* *
...@@ -13,6 +21,10 @@ export default class MainModel { ...@@ -13,6 +21,10 @@ export default class MainModel {
* @memberof MainGridMode * @memberof MainGridMode
*/ */
public getDataItems(): any[] { public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [ return [
{ {
name: 'dictitemval', name: 'dictitemval',
...@@ -83,7 +95,6 @@ export default class MainModel { ...@@ -83,7 +95,6 @@ export default class MainModel {
name: 'ibzdictitem', name: 'ibzdictitem',
prop: 'itemid', prop: 'itemid',
}, },
{ {
name: 'n_ibzdictitemname_like', name: 'n_ibzdictitemname_like',
prop: 'n_ibzdictitemname_like', prop: 'n_ibzdictitemname_like',
...@@ -122,5 +133,6 @@ export default class MainModel { ...@@ -122,5 +133,6 @@ export default class MainModel {
} }
] ]
} }
}
} }
\ No newline at end of file
...@@ -175,7 +175,7 @@ export default class MainService extends ControlService { ...@@ -175,7 +175,7 @@ export default class MainService extends ControlService {
} }
/** /**
* 查询数据 * 获取数据
* *
* @param {string} action * @param {string} action
* @param {*} [context={}] * @param {*} [context={}]
...@@ -237,6 +237,7 @@ export default class MainService extends ControlService { ...@@ -237,6 +237,7 @@ export default class MainService extends ControlService {
}); });
} }
/** /**
* 加载草稿 * 加载草稿
* *
......
...@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "") @RequestMapping(value = "")
public class webAppController { public class webAppController {
......
package cn.ibizlab.web.filter;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import org.springframework.cloud.netflix.zuul.filters.support.FilterConstants;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
/**
* 将应用实体映射到对应的系统服务接口
*/
@Component
public class webDataEntitySysApiMappingFilter extends ZuulFilter {
private static Map<String, String> AppDataEntitySysApiMapping = new HashMap<>();
@PostConstruct
private void initDataEntitySysApiMapping() {
AppDataEntitySysApiMapping.put("ibzdictitem", "dictapi");
AppDataEntitySysApiMapping.put("ibzdict", "dictapi");
}
@Override
public Object run() {
RequestContext context = RequestContext.getCurrentContext();
Object entity = context.get(FilterConstants.PROXY_KEY);
Object requestPath = context.get(FilterConstants.REQUEST_URI_KEY);
if (ObjectUtils.isEmpty(requestPath) || ObjectUtils.isEmpty(entity)) {
return null;
}
String sysApiPrefix = AppDataEntitySysApiMapping.get(entity);
if (StringUtils.isEmpty(sysApiPrefix)) {
return null;
}
context.put(FilterConstants.REQUEST_URI_KEY, String.format("/%s%s", sysApiPrefix,requestPath));
return null;
}
@Override
public String filterType() {
return FilterConstants.PRE_TYPE;
}
@Override
public int filterOrder() {
return FilterConstants.PRE_DECORATION_FILTER_ORDER + 1;
}
@Override
public boolean shouldFilter() {
return true;
}
}
...@@ -18,14 +18,11 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; ...@@ -18,14 +18,11 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@Import({ @Import({
FeignClientsConfiguration.class FeignClientsConfiguration.class
}) })
@ComponentScans({
@ComponentScan(basePackages = {"cn.ibizlab.util", "cn.ibizlab.web"})
})
@EnableDiscoveryClient @EnableDiscoveryClient
@Configuration @Configuration
@EnableFeignClients @EnableFeignClients
@EnableZuulProxy @EnableZuulProxy
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) @SpringBootApplication
public class webApplication extends WebMvcConfigurerAdapter{ public class webApplication extends WebMvcConfigurerAdapter{
public static void main(String[] args) { public static void main(String[] args) {
......
server:
devmode: true
port: 8080
servlet:
session:
cookie:
name: ibzdict-app-web
spring:
cloud:
nacos:
discovery:
server-addr: 172.16.102.211:8848
sysapi:
defaultServiceId: ibzdict
defaultStripPrefix: false
zuul:
routes:
ibzdictitem:
path: /ibzdictitems/**
serviceId: ${sysapi.defaultServiceId}
stripPrefix: ${sysapi.defaultStripPrefix}
ibzdict:
path: /ibzdicts/**
serviceId: ${sysapi.defaultServiceId}
stripPrefix: ${sysapi.defaultStripPrefix}
ribbon:
ReadTimeout: 60000
ConnectTimeout: 60000
server:
devmode: true
port: 8080
servlet:
session:
cookie:
name: ibzdict-app-web
spring:
application:
name: ibzdict-app-web
cloud:
nacos:
discovery:
server-addr: 172.16.102.211:8848
sysapi:
defaultServiceId: ibzdict
defaultStripPrefix: false
zuul:
routes:
ibzdictitem:
path: /ibzdictitems/**
serviceId: ${sysapi.defaultServiceId}
stripPrefix: ${sysapi.defaultStripPrefix}
ibzdict:
path: /ibzdicts/**
serviceId: ${sysapi.defaultServiceId}
stripPrefix: ${sysapi.defaultStripPrefix}
ribbon:
ReadTimeout: 60000
ConnectTimeout: 60000
spring: spring:
profiles: profiles:
include: web, sys include: web-prod, sys
...@@ -32,12 +32,6 @@ ...@@ -32,12 +32,6 @@
</dependency> </dependency>
<dependency>
<groupId>cn.ibizlab</groupId>
<artifactId>ibzdict-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId> <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
......
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
<artifactId>ibzdict-provider-dictapi</artifactId> <artifactId>ibzdict-provider-dictapi</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>cn.ibizlab</groupId>
<artifactId>ibzdict-app-web</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies> </dependencies>
......
...@@ -30,7 +30,6 @@ import cn.ibizlab.util.web.SearchContextHandlerMethodArgumentResolver; ...@@ -30,7 +30,6 @@ import cn.ibizlab.util.web.SearchContextHandlerMethodArgumentResolver;
}) })
@EnableDiscoveryClient @EnableDiscoveryClient
@Configuration @Configuration
@ComponentScan(nameGenerator = UniqueNameGenerator.class)
@EnableTransactionManagement @EnableTransactionManagement
public class IbzdictApplication extends WebMvcConfigurerAdapter { public class IbzdictApplication extends WebMvcConfigurerAdapter {
......
spring: spring:
profiles: profiles:
include: dev, core, mybatis, sys include: dev, core, mybatis, sys ,web-dev
...@@ -16,7 +16,6 @@ import cn.ibizlab.util.SearchFieldFilter; ...@@ -16,7 +16,6 @@ import cn.ibizlab.util.SearchFieldFilter;
import cn.ibizlab.util.enums.SearchFieldType; import cn.ibizlab.util.enums.SearchFieldType;
import cn.ibizlab.util.enums.SearchGroupType; import cn.ibizlab.util.enums.SearchGroupType;
import cn.ibizlab.util.SearchGroupFilter; import cn.ibizlab.util.SearchGroupFilter;
import cn.ibizlab.util.log.IBIZLog;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
...@@ -29,7 +28,6 @@ import cn.ibizlab.core.dict.domain.IBZDictItem; ...@@ -29,7 +28,6 @@ import cn.ibizlab.core.dict.domain.IBZDictItem;
*/ */
@Slf4j @Slf4j
@Data @Data
@IBIZLog
public class IBZDictItemSearchContext extends MybatisSearchContext { public class IBZDictItemSearchContext extends MybatisSearchContext {
private QueryWrapper<IBZDictItem> selectCond=new QueryWrapper(); private QueryWrapper<IBZDictItem> selectCond=new QueryWrapper();
......
...@@ -16,7 +16,6 @@ import cn.ibizlab.util.SearchFieldFilter; ...@@ -16,7 +16,6 @@ import cn.ibizlab.util.SearchFieldFilter;
import cn.ibizlab.util.enums.SearchFieldType; import cn.ibizlab.util.enums.SearchFieldType;
import cn.ibizlab.util.enums.SearchGroupType; import cn.ibizlab.util.enums.SearchGroupType;
import cn.ibizlab.util.SearchGroupFilter; import cn.ibizlab.util.SearchGroupFilter;
import cn.ibizlab.util.log.IBIZLog;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
...@@ -29,7 +28,6 @@ import cn.ibizlab.core.dict.domain.IBZDict; ...@@ -29,7 +28,6 @@ import cn.ibizlab.core.dict.domain.IBZDict;
*/ */
@Slf4j @Slf4j
@Data @Data
@IBIZLog
public class IBZDictSearchContext extends MybatisSearchContext { public class IBZDictSearchContext extends MybatisSearchContext {
private QueryWrapper<IBZDict> selectCond=new QueryWrapper(); private QueryWrapper<IBZDict> selectCond=new QueryWrapper();
......
...@@ -28,4 +28,10 @@ public interface IBZDictItemMapper extends BaseMapper<IBZDictItem>{ ...@@ -28,4 +28,10 @@ public interface IBZDictItemMapper extends BaseMapper<IBZDictItem>{
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
Page<IBZDictItem> selectPermission(IPage page,@Param("pw") Wrapper<IBZDictItem> wrapper) ; Page<IBZDictItem> selectPermission(IPage page,@Param("pw") Wrapper<IBZDictItem> wrapper) ;
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IBZDICTITEM_IBZDICT_DICTID] -->
List<IBZDictItem> selectByDictid(@Param("dictid") Serializable dictid) ;
} }
\ No newline at end of file
...@@ -28,4 +28,6 @@ public interface IBZDictMapper extends BaseMapper<IBZDict>{ ...@@ -28,4 +28,6 @@ public interface IBZDictMapper extends BaseMapper<IBZDict>{
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
Page<IBZDict> selectPermission(IPage page,@Param("pw") Wrapper<IBZDict> wrapper) ; Page<IBZDict> selectPermission(IPage page,@Param("pw") Wrapper<IBZDict> wrapper) ;
} }
\ No newline at end of file
...@@ -36,5 +36,12 @@ public interface IIBZDictItemService extends IService<IBZDictItem>{ ...@@ -36,5 +36,12 @@ public interface IIBZDictItemService extends IService<IBZDictItem>{
void updateBatch(List<IBZDictItem> list, int batchSize) ; void updateBatch(List<IBZDictItem> list, int batchSize) ;
Page<IBZDictItem> searchDefault(IBZDictItemSearchContext context) ; Page<IBZDictItem> searchDefault(IBZDictItemSearchContext context) ;
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IBZDICTITEM_IBZDICT_DICTID] -->
List<IBZDictItem> selectByDictid(String dictid) ;
void saveByDictid(String dictidList<IBZDictItem>) ;
void removeByDictid(String dictid) ;
} }
...@@ -36,5 +36,7 @@ public interface IIBZDictService extends IService<IBZDict>{ ...@@ -36,5 +36,7 @@ public interface IIBZDictService extends IService<IBZDict>{
void saveBatch(List<IBZDict> list, int batchSize) ; void saveBatch(List<IBZDict> list, int batchSize) ;
Page<IBZDict> searchDefault(IBZDictSearchContext context) ; Page<IBZDict> searchDefault(IBZDictSearchContext context) ;
} }
package cn.ibizlab.core.dict.service.dto; package cn.ibizlab.core.dict.service.dto;
import java.sql.Timestamp; import java.sql.Timestamp;
...@@ -9,10 +8,6 @@ import java.util.Map; ...@@ -9,10 +8,6 @@ import java.util.Map;
import java.util.HashMap; import java.util.HashMap;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import cn.ibizlab.core.dict.domain.IBZDict;
import org.springframework.cglib.beans.BeanCopier;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
...@@ -32,14 +27,14 @@ public class IBZDictDTO extends DTOBase implements Serializable { ...@@ -32,14 +27,14 @@ public class IBZDictDTO extends DTOBase implements Serializable {
* *
*/ */
@JsonProperty("dictid") @JsonProperty("dictid")
private String dictId; private String dictid;
/** /**
* 属性 [IBZDICTNAME] * 属性 [IBZDICTNAME]
* *
*/ */
@JsonProperty("dictname") @JsonProperty("dictname")
private String dictName; private String dictname;
/** /**
* 属性 [ENABLE] * 属性 [ENABLE]
...@@ -52,39 +47,36 @@ public class IBZDictDTO extends DTOBase implements Serializable { ...@@ -52,39 +47,36 @@ public class IBZDictDTO extends DTOBase implements Serializable {
* 属性 [CREATEDATE] * 属性 [CREATEDATE]
* *
*/ */
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createDate; private Timestamp createdate;
/** /**
* 属性 [UPDATEDATE] * 属性 [UPDATEDATE]
* *
*/ */
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JsonProperty("updatedate") @JsonProperty("updatedate")
private Timestamp updateDate; private Timestamp updatedate;
/** /**
* 属性 [CREATEMAN] * 属性 [CREATEMAN]
* *
*/ */
@JsonProperty("createman") @JsonProperty("createman")
private String createMan; private String createman;
/** /**
* 属性 [UPDATEMAN] * 属性 [UPDATEMAN]
* *
*/ */
@JsonProperty("updateman") @JsonProperty("updateman")
private String updateMan; private String updateman;
/** /**
* 设置 [IBZDICTID] * 设置 [IBZDICTID]
*/ */
@JsonProperty("dictid") public void setUpdateman(String updateman){
public void setDictId(String dictId){ this.updateman = updateman ;
this.dictId = dictId ;
if(dictId==null){ if(dictId==null){
this.addFocusNull("ibzdictid"); this.addFocusNull("ibzdictid");
} }
...@@ -92,9 +84,8 @@ public class IBZDictDTO extends DTOBase implements Serializable { ...@@ -92,9 +84,8 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/** /**
* 设置 [IBZDICTNAME] * 设置 [IBZDICTNAME]
*/ */
@JsonProperty("dictname") public void setUpdateman(String updateman){
public void setDictName(String dictName){ this.updateman = updateman ;
this.dictName = dictName ;
if(dictName==null){ if(dictName==null){
this.addFocusNull("ibzdictname"); this.addFocusNull("ibzdictname");
} }
...@@ -102,9 +93,8 @@ public class IBZDictDTO extends DTOBase implements Serializable { ...@@ -102,9 +93,8 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/** /**
* 设置 [ENABLE] * 设置 [ENABLE]
*/ */
@JsonProperty("enable") public void setUpdateman(Integer updateman){
public void setEnable(Integer enable){ this.updateman = updateman ;
this.enable = enable ;
if(enable==null){ if(enable==null){
this.addFocusNull("enable"); this.addFocusNull("enable");
} }
...@@ -112,9 +102,8 @@ public class IBZDictDTO extends DTOBase implements Serializable { ...@@ -112,9 +102,8 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/** /**
* 设置 [CREATEDATE] * 设置 [CREATEDATE]
*/ */
@JsonProperty("createdate") public void setUpdateman(Timestamp updateman){
public void setCreateDate(Timestamp createDate){ this.updateman = updateman ;
this.createDate = createDate ;
if(createDate==null){ if(createDate==null){
this.addFocusNull("createdate"); this.addFocusNull("createdate");
} }
...@@ -122,9 +111,8 @@ public class IBZDictDTO extends DTOBase implements Serializable { ...@@ -122,9 +111,8 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/** /**
* 设置 [UPDATEDATE] * 设置 [UPDATEDATE]
*/ */
@JsonProperty("updatedate") public void setUpdateman(Timestamp updateman){
public void setUpdateDate(Timestamp updateDate){ this.updateman = updateman ;
this.updateDate = updateDate ;
if(updateDate==null){ if(updateDate==null){
this.addFocusNull("updatedate"); this.addFocusNull("updatedate");
} }
...@@ -132,9 +120,8 @@ public class IBZDictDTO extends DTOBase implements Serializable { ...@@ -132,9 +120,8 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/** /**
* 设置 [CREATEMAN] * 设置 [CREATEMAN]
*/ */
@JsonProperty("createman") public void setUpdateman(String updateman){
public void setCreateMan(String createMan){ this.updateman = updateman ;
this.createMan = createMan ;
if(createMan==null){ if(createMan==null){
this.addFocusNull("createman"); this.addFocusNull("createman");
} }
...@@ -142,13 +129,27 @@ public class IBZDictDTO extends DTOBase implements Serializable { ...@@ -142,13 +129,27 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/** /**
* 设置 [UPDATEMAN] * 设置 [UPDATEMAN]
*/ */
@JsonProperty("updateman") public void setUpdateman(String updateman){
public void setUpdateMan(String updateMan){ this.updateman = updateman ;
this.updateMan = updateMan ;
if(updateMan==null){ if(updateMan==null){
this.addFocusNull("updateman"); this.addFocusNull("updateman");
} }
} }
/**
* [IBZDICTITEM]
*/
private List<IBZDictItemDTO> ibzdictitems = new ArrayList<IBZDictItemDTO>();
@JsonProperty("ibzdictitems")
public List<IBZDictItemDTO> getIbzdictitems(){
return ibzdictitems ;
}
@JsonProperty("ibzdictitems")
public void setIbzdictitems(List <IBZDictItemDTO> ibzdictitems){
this.ibzdictitems = ibzdictitems ;
}
} }
package cn.ibizlab.core.dict.service.dto; package cn.ibizlab.core.dict.service.dto;
import java.sql.Timestamp; import java.sql.Timestamp;
...@@ -9,10 +8,6 @@ import java.util.Map; ...@@ -9,10 +8,6 @@ import java.util.Map;
import java.util.HashMap; import java.util.HashMap;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import cn.ibizlab.core.dict.domain.IBZDictItem;
import org.springframework.cglib.beans.BeanCopier;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
...@@ -32,101 +27,98 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -32,101 +27,98 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
* *
*/ */
@JsonProperty("itemid") @JsonProperty("itemid")
private String itemId; private String itemid;
/** /**
* 属性 [IBZDICTITEMNAME] * 属性 [IBZDICTITEMNAME]
* *
*/ */
@JsonProperty("itemname") @JsonProperty("itemname")
private String itemName; private String itemname;
/** /**
* 属性 [DICTITEMVAL] * 属性 [DICTITEMVAL]
* *
*/ */
@JsonProperty("itemval") @JsonProperty("itemval")
private String itemVal; private String itemval;
/** /**
* 属性 [DICTID] * 属性 [DICTID]
* *
*/ */
@JsonProperty("dictid") @JsonProperty("dictid")
private String dictId; private String dictid;
/** /**
* 属性 [PITEMVAL] * 属性 [PITEMVAL]
* *
*/ */
@JsonProperty("pitemval") @JsonProperty("pitemval")
private String pItemVal; private String pitemval;
/** /**
* 属性 [ITEMFILTER] * 属性 [ITEMFILTER]
* *
*/ */
@JsonProperty("itemfilter") @JsonProperty("itemfilter")
private String itemFilter; private String itemfilter;
/** /**
* 属性 [ITEMCLS] * 属性 [ITEMCLS]
* *
*/ */
@JsonProperty("itemcls") @JsonProperty("itemcls")
private String itemCls; private String itemcls;
/** /**
* 属性 [ITEMICON] * 属性 [ITEMICON]
* *
*/ */
@JsonProperty("itemicon") @JsonProperty("itemicon")
private String itemIcon; private String itemicon;
/** /**
* 属性 [SHOWORDER] * 属性 [SHOWORDER]
* *
*/ */
@JsonProperty("showorder") @JsonProperty("showorder")
private Integer showOrder; private Integer showorder;
/** /**
* 属性 [CREATEDATE] * 属性 [CREATEDATE]
* *
*/ */
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createDate; private Timestamp createdate;
/** /**
* 属性 [UPDATEDATE] * 属性 [UPDATEDATE]
* *
*/ */
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JsonProperty("updatedate") @JsonProperty("updatedate")
private Timestamp updateDate; private Timestamp updatedate;
/** /**
* 属性 [CREATEMAN] * 属性 [CREATEMAN]
* *
*/ */
@JsonProperty("createman") @JsonProperty("createman")
private String createMan; private String createman;
/** /**
* 属性 [UPDATEMAN] * 属性 [UPDATEMAN]
* *
*/ */
@JsonProperty("updateman") @JsonProperty("updateman")
private String updateMan; private String updateman;
/** /**
* 设置 [IBZDICTITEMID] * 设置 [IBZDICTITEMID]
*/ */
@JsonProperty("itemid") public void setUpdateman(String updateman){
public void setItemId(String itemId){ this.updateman = updateman ;
this.itemId = itemId ;
if(itemId==null){ if(itemId==null){
this.addFocusNull("ibzdictitemid"); this.addFocusNull("ibzdictitemid");
} }
...@@ -134,9 +126,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -134,9 +126,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [IBZDICTITEMNAME] * 设置 [IBZDICTITEMNAME]
*/ */
@JsonProperty("itemname") public void setUpdateman(String updateman){
public void setItemName(String itemName){ this.updateman = updateman ;
this.itemName = itemName ;
if(itemName==null){ if(itemName==null){
this.addFocusNull("ibzdictitemname"); this.addFocusNull("ibzdictitemname");
} }
...@@ -144,9 +135,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -144,9 +135,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [DICTITEMVAL] * 设置 [DICTITEMVAL]
*/ */
@JsonProperty("itemval") public void setUpdateman(String updateman){
public void setItemVal(String itemVal){ this.updateman = updateman ;
this.itemVal = itemVal ;
if(itemVal==null){ if(itemVal==null){
this.addFocusNull("dictitemval"); this.addFocusNull("dictitemval");
} }
...@@ -154,9 +144,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -154,9 +144,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [DICTID] * 设置 [DICTID]
*/ */
@JsonProperty("dictid") public void setUpdateman(String updateman){
public void setDictId(String dictId){ this.updateman = updateman ;
this.dictId = dictId ;
if(dictId==null){ if(dictId==null){
this.addFocusNull("dictid"); this.addFocusNull("dictid");
} }
...@@ -164,9 +153,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -164,9 +153,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [PITEMVAL] * 设置 [PITEMVAL]
*/ */
@JsonProperty("pitemval") public void setUpdateman(String updateman){
public void setPItemVal(String pItemVal){ this.updateman = updateman ;
this.pItemVal = pItemVal ;
if(pItemVal==null){ if(pItemVal==null){
this.addFocusNull("pitemval"); this.addFocusNull("pitemval");
} }
...@@ -174,9 +162,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -174,9 +162,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [ITEMFILTER] * 设置 [ITEMFILTER]
*/ */
@JsonProperty("itemfilter") public void setUpdateman(String updateman){
public void setItemFilter(String itemFilter){ this.updateman = updateman ;
this.itemFilter = itemFilter ;
if(itemFilter==null){ if(itemFilter==null){
this.addFocusNull("itemfilter"); this.addFocusNull("itemfilter");
} }
...@@ -184,9 +171,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -184,9 +171,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [ITEMCLS] * 设置 [ITEMCLS]
*/ */
@JsonProperty("itemcls") public void setUpdateman(String updateman){
public void setItemCls(String itemCls){ this.updateman = updateman ;
this.itemCls = itemCls ;
if(itemCls==null){ if(itemCls==null){
this.addFocusNull("itemcls"); this.addFocusNull("itemcls");
} }
...@@ -194,9 +180,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -194,9 +180,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [ITEMICON] * 设置 [ITEMICON]
*/ */
@JsonProperty("itemicon") public void setUpdateman(String updateman){
public void setItemIcon(String itemIcon){ this.updateman = updateman ;
this.itemIcon = itemIcon ;
if(itemIcon==null){ if(itemIcon==null){
this.addFocusNull("itemicon"); this.addFocusNull("itemicon");
} }
...@@ -204,9 +189,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -204,9 +189,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [SHOWORDER] * 设置 [SHOWORDER]
*/ */
@JsonProperty("showorder") public void setUpdateman(Integer updateman){
public void setShowOrder(Integer showOrder){ this.updateman = updateman ;
this.showOrder = showOrder ;
if(showOrder==null){ if(showOrder==null){
this.addFocusNull("showorder"); this.addFocusNull("showorder");
} }
...@@ -214,9 +198,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -214,9 +198,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [CREATEDATE] * 设置 [CREATEDATE]
*/ */
@JsonProperty("createdate") public void setUpdateman(Timestamp updateman){
public void setCreateDate(Timestamp createDate){ this.updateman = updateman ;
this.createDate = createDate ;
if(createDate==null){ if(createDate==null){
this.addFocusNull("createdate"); this.addFocusNull("createdate");
} }
...@@ -224,9 +207,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -224,9 +207,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [UPDATEDATE] * 设置 [UPDATEDATE]
*/ */
@JsonProperty("updatedate") public void setUpdateman(Timestamp updateman){
public void setUpdateDate(Timestamp updateDate){ this.updateman = updateman ;
this.updateDate = updateDate ;
if(updateDate==null){ if(updateDate==null){
this.addFocusNull("updatedate"); this.addFocusNull("updatedate");
} }
...@@ -234,9 +216,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -234,9 +216,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [CREATEMAN] * 设置 [CREATEMAN]
*/ */
@JsonProperty("createman") public void setUpdateman(String updateman){
public void setCreateMan(String createMan){ this.updateman = updateman ;
this.createMan = createMan ;
if(createMan==null){ if(createMan==null){
this.addFocusNull("createman"); this.addFocusNull("createman");
} }
...@@ -244,9 +225,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable { ...@@ -244,9 +225,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/** /**
* 设置 [UPDATEMAN] * 设置 [UPDATEMAN]
*/ */
@JsonProperty("updateman") public void setUpdateman(String updateman){
public void setUpdateMan(String updateMan){ this.updateman = updateman ;
this.updateMan = updateMan ;
if(updateMan==null){ if(updateMan==null){
this.addFocusNull("updateman"); this.addFocusNull("updateman");
} }
......
...@@ -26,8 +26,6 @@ import cn.ibizlab.core.dict.filter.IBZDictItemSearchContext; ...@@ -26,8 +26,6 @@ import cn.ibizlab.core.dict.filter.IBZDictItemSearchContext;
import cn.ibizlab.core.dict.service.IIBZDictItemService; import cn.ibizlab.core.dict.service.IIBZDictItemService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.SearchResult;
import cn.ibizlab.util.log.IBIZLog;
...@@ -42,7 +40,6 @@ import org.springframework.util.ObjectUtils; ...@@ -42,7 +40,6 @@ import org.springframework.util.ObjectUtils;
* 实体[字典项目] 服务对象接口实现 * 实体[字典项目] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@IBIZLog
@Service @Service
public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDictItem> implements IIBZDictItemService { public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDictItem> implements IIBZDictItemService {
......
...@@ -26,8 +26,6 @@ import cn.ibizlab.core.dict.filter.IBZDictSearchContext; ...@@ -26,8 +26,6 @@ import cn.ibizlab.core.dict.filter.IBZDictSearchContext;
import cn.ibizlab.core.dict.service.IIBZDictService; import cn.ibizlab.core.dict.service.IIBZDictService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.SearchResult;
import cn.ibizlab.util.log.IBIZLog;
...@@ -42,7 +40,6 @@ import org.springframework.util.ObjectUtils; ...@@ -42,7 +40,6 @@ import org.springframework.util.ObjectUtils;
* 实体[数据字典] 服务对象接口实现 * 实体[数据字典] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@IBIZLog
@Service @Service
public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> implements IIBZDictService { public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> implements IIBZDictService {
......
...@@ -11,7 +11,6 @@ import org.mapstruct.factory.Mappers; ...@@ -11,7 +11,6 @@ import org.mapstruct.factory.Mappers;
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface IBZDictItemMapping extends MappingBase<IBZDictItemDTO, IBZDictItem> { public interface IBZDictItemMapping extends MappingBase<IBZDictItemDTO, IBZDictItem> {
IBZDictItemMapping MAPPER = Mappers.getMapper(IBZDictItemMapping.class);
} }
...@@ -11,7 +11,6 @@ import org.mapstruct.factory.Mappers; ...@@ -11,7 +11,6 @@ import org.mapstruct.factory.Mappers;
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface IBZDictMapping extends MappingBase<IBZDictDTO, IBZDict> { public interface IBZDictMapping extends MappingBase<IBZDictDTO, IBZDict> {
IBZDictMapping MAPPER = Mappers.getMapper(IBZDictMapping.class);
} }
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<resultMap id="IBZDictResultMap" type="cn.ibizlab.core.dict.domain.IBZDict" autoMapping="true"> <resultMap id="IBZDictResultMap" type="cn.ibizlab.core.dict.domain.IBZDict" autoMapping="true">
<id property="dictid" column="ibzdictid" /><!--主键字段映射--> <id property="dictid" column="ibzdictid" /><!--主键字段映射-->
<!--通过mybatis自动注入关系属性[关系实体],fetchType="lazy"为懒加载配置 --> <!--通过mybatis自动注入关系属性[关系实体],fetchType="lazy"为懒加载配置 -->
<collection property="items" ofType="cn.ibizlab.core.dict.domain.IBZDictItem" column="ibzdictid" select="cn.ibizlab.core.dict.mapper.IBZDictItemMapper.selectBydictid" fetchType="lazy"></collection> <collection property="items" ofType="cn.ibizlab.core.dict.domain.IBZDictItem" column="ibzdictid" select="cn.ibizlab.core.dict.mapper.IBZDictItemMapper.selectByDictid" fetchType="lazy"></collection>
</resultMap> </resultMap>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IBZDICTITEM_IBZDICT_DICTID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IBZDICTITEM_IBZDICT_DICTID] -->
<select id="selectBydictid" resultMap="IBZDictItemResultMap"> <select id="selectByDictid" resultMap="IBZDictItemResultMap">
select t1.* from ( select t1.* from (
<include refid="Default" /> <include refid="Default" />
) t1 ) t1
......
...@@ -35,12 +35,10 @@ import cn.ibizlab.core.dict.filter.IBZDictSearchContext; ...@@ -35,12 +35,10 @@ import cn.ibizlab.core.dict.filter.IBZDictSearchContext;
import cn.ibizlab.core.dict.service.mapping.IBZDictMapping; import cn.ibizlab.core.dict.service.mapping.IBZDictMapping;
import cn.ibizlab.util.log.IBIZLog;
@Slf4j @Slf4j
@IBIZLog
@Api(tags = {"IBZDict" }) @Api(tags = {"IBZDict" })
@RestController @RestController("dictapiIBZDict")
@RequestMapping("") @RequestMapping("")
public class IBZDictResource { public class IBZDictResource {
......
...@@ -14,18 +14,20 @@ public class DTOBase implements Serializable { ...@@ -14,18 +14,20 @@ public class DTOBase implements Serializable {
@JSONField(serialize = false) @JSONField(serialize = false)
private Set<String> focusNull; private Set<String> focusNull;
@JsonIgnore
@JSONField(serialize = false) public void modify(String field,Object val) {
public void addFocusNull(String field) { if(val==null)
getFocusNull().add(field); this.getFocusNull().add(field.toLowerCase());
else
this.getFocusNull().remove(field.toLowerCase());
} }
@JsonIgnore
@JSONField(serialize = false)
public Set<String> getFocusNull() { public Set<String> getFocusNull() {
if(focusNull==null) if(focusNull==null)
focusNull=new HashSet<>(); focusNull=new HashSet<>();
return focusNull; return focusNull;
} }
} }
...@@ -5,10 +5,8 @@ import lombok.extern.slf4j.Slf4j; ...@@ -5,10 +5,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.AnnotationBeanNameGenerator; import org.springframework.context.annotation.AnnotationBeanNameGenerator;
import cn.ibizlab.util.log.IBIZLog;
@Slf4j @Slf4j
@IBIZLog
public class UniqueNameGenerator extends AnnotationBeanNameGenerator { public class UniqueNameGenerator extends AnnotationBeanNameGenerator {
@Override @Override
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册