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

ibizdev提交

上级 b6091e93
## v7.0.0-alpha.4 [2020-5-14]
### Bug修复
修复代码表代码项图标和数据
修复数据多项选择视图UI逻辑不匹配
修复列表高度异常
修复树节点上下文
修复表格(视图)高度,滚动条问题
修复表单loaddraft服务仿真主键丢失修复
修复user显示名称逻辑
修复issue地址为正式环境地址
### 功能新增及优化
#### 模板
模态时视图样式调整
增加菜单权限
增加快速分组搜索或快速搜索表单功能
增加表格内置工具栏
代码表多选控件分割符从分号转化为逗号
#### 基础文件
增加数据选择类插件表格呈现插件
## v7.0.0-alpha.3 [2020-5-10] ## v7.0.0-alpha.3 [2020-5-10]
### Bug修复 ### Bug修复
...@@ -65,3 +106,5 @@ ...@@ -65,3 +106,5 @@
## v7.0.0-alpha.1 [2020-4-29] ## v7.0.0-alpha.1 [2020-4-29]
初始化文件 初始化文件
...@@ -263,7 +263,9 @@ export default class AppFormDRUIPart extends Vue { ...@@ -263,7 +263,9 @@ export default class AppFormDRUIPart extends Vue {
} }
} }
if(!this.isForbidLoad){ if(!this.isForbidLoad){
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}}); this.$nextTick(() => {
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}});
});
} }
} }
......
...@@ -81,9 +81,16 @@ export default class AppUser extends Vue { ...@@ -81,9 +81,16 @@ export default class AppUser extends Vue {
* @memberof AppUser * @memberof AppUser
*/ */
public logout() { public logout() {
localStorage.removeItem('user'); const get: Promise<any> = this.$http.get('v7/logout');
localStorage.removeItem('token'); get.then((response:any) =>{
this.$router.push({ name: 'login' }); if (response && response.status === 200) {
localStorage.removeItem('user');
localStorage.removeItem('token');
this.$router.push({ name: 'login' });
}
}).catch((error: any) =>{
console.error(error);
})
} }
} }
</script> </script>
......
...@@ -812,14 +812,14 @@ export default class IBZDepartmentEditViewBase extends Vue { ...@@ -812,14 +812,14 @@ export default class IBZDepartmentEditViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -959,6 +959,9 @@ export default class IBZDepartmentGridViewBase extends Vue { ...@@ -959,6 +959,9 @@ export default class IBZDepartmentGridViewBase extends Vue {
*/ */
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
const data: any = {}; const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context)); let curViewParam = JSON.parse(JSON.stringify(this.context));
if(args.length >0){ if(args.length >0){
Object.assign(curViewParam,args[0]); Object.assign(curViewParam,args[0]);
...@@ -1117,14 +1120,14 @@ export default class IBZDepartmentGridViewBase extends Vue { ...@@ -1117,14 +1120,14 @@ export default class IBZDepartmentGridViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -812,14 +812,14 @@ export default class IBZEmployeeEditViewBase extends Vue { ...@@ -812,14 +812,14 @@ export default class IBZEmployeeEditViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -999,6 +999,9 @@ export default class IBZEmployeeGridViewBase extends Vue { ...@@ -999,6 +999,9 @@ export default class IBZEmployeeGridViewBase extends Vue {
*/ */
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
const data: any = {}; const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context)); let curViewParam = JSON.parse(JSON.stringify(this.context));
if(args.length >0){ if(args.length >0){
Object.assign(curViewParam,args[0]); Object.assign(curViewParam,args[0]);
...@@ -1157,14 +1160,14 @@ export default class IBZEmployeeGridViewBase extends Vue { ...@@ -1157,14 +1160,14 @@ export default class IBZEmployeeGridViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -812,14 +812,14 @@ export default class IBZOrganizationEditViewBase extends Vue { ...@@ -812,14 +812,14 @@ export default class IBZOrganizationEditViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -959,6 +959,9 @@ export default class IBZOrganizationGridViewBase extends Vue { ...@@ -959,6 +959,9 @@ export default class IBZOrganizationGridViewBase extends Vue {
*/ */
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
const data: any = {}; const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context)); let curViewParam = JSON.parse(JSON.stringify(this.context));
if(args.length >0){ if(args.length >0){
Object.assign(curViewParam,args[0]); Object.assign(curViewParam,args[0]);
...@@ -1107,14 +1110,14 @@ export default class IBZOrganizationGridViewBase extends Vue { ...@@ -1107,14 +1110,14 @@ export default class IBZOrganizationGridViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -75,4 +75,17 @@ export const getZIndex = (state: any) => () => { ...@@ -75,4 +75,17 @@ export const getZIndex = (state: any) => () => {
*/ */
export const getViewSplit = (state: any) => (viewUID: string) => { export const getViewSplit = (state: any) => (viewUID: string) => {
return state.viewSplit[viewUID]; return state.viewSplit[viewUID];
}
/**
* 获取拷贝数据
*
* @param state
*/
export const getCopyData = (state: any) => (srfkey: string) => {
let copyData = state.copyDataMap[srfkey];
if(copyData){
delete state.copyDataMap[srfkey];
}
return copyData;
} }
\ No newline at end of file
...@@ -253,4 +253,16 @@ export const updateZIndex = (state: any, zIndex: number) => { ...@@ -253,4 +253,16 @@ export const updateZIndex = (state: any, zIndex: number) => {
*/ */
export const setViewSplit = (state: any, args: {viewSplit: number,viewUID:string}) => { export const setViewSplit = (state: any, args: {viewSplit: number,viewUID:string}) => {
state.viewSplit[args.viewUID] = args.viewSplit; state.viewSplit[args.viewUID] = args.viewSplit;
}
/**
* 添加拷贝数据
*
* @param state
* @param localdata
*/
export const addCopyData = (state: any, args: {srfkey: string,copyData: any}) => {
if(args && args.srfkey && args.copyData){
state.copyDataMap[args.srfkey] = JSON.parse(JSON.stringify(args.copyData));
}
} }
\ No newline at end of file
...@@ -13,4 +13,5 @@ export const rootstate: any = { ...@@ -13,4 +13,5 @@ export const rootstate: any = {
localdata: {}, localdata: {},
zIndex: 300, zIndex: 300,
viewSplit: {}, viewSplit: {},
copyDataMap:{},
} }
\ No newline at end of file
...@@ -1180,7 +1180,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1180,7 +1180,11 @@ export default class MainBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -1244,8 +1248,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1244,8 +1248,18 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof Main * @memberof @memberof Main
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.ibzdepartment = copyData.srfkey;
copyData.deptid = copyData.srfkey;
Object.assign(this.context,{ibzdepartment:copyData.ibzdepartment})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -1043,7 +1043,11 @@ export default class NewFormBase extends Vue implements ControlInterface { ...@@ -1043,7 +1043,11 @@ export default class NewFormBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -1107,8 +1111,18 @@ export default class NewFormBase extends Vue implements ControlInterface { ...@@ -1107,8 +1111,18 @@ export default class NewFormBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof NewForm * @memberof @memberof NewForm
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.ibzdepartment = copyData.srfkey;
copyData.deptid = copyData.srfkey;
Object.assign(this.context,{ibzdepartment:copyData.ibzdepartment})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -911,7 +911,11 @@ export default class ChangePwBase extends Vue implements ControlInterface { ...@@ -911,7 +911,11 @@ export default class ChangePwBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -975,8 +979,18 @@ export default class ChangePwBase extends Vue implements ControlInterface { ...@@ -975,8 +979,18 @@ export default class ChangePwBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof ChangePw * @memberof @memberof ChangePw
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.ibzemployee = copyData.srfkey;
copyData.userid = copyData.srfkey;
Object.assign(this.context,{ibzemployee:copyData.ibzemployee})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -1519,7 +1519,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1519,7 +1519,11 @@ export default class MainBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -1583,8 +1587,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1583,8 +1587,18 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof Main * @memberof @memberof Main
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.ibzemployee = copyData.srfkey;
copyData.userid = copyData.srfkey;
Object.assign(this.context,{ibzemployee:copyData.ibzemployee})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -1071,7 +1071,11 @@ export default class NewFormBase extends Vue implements ControlInterface { ...@@ -1071,7 +1071,11 @@ export default class NewFormBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -1135,8 +1139,18 @@ export default class NewFormBase extends Vue implements ControlInterface { ...@@ -1135,8 +1139,18 @@ export default class NewFormBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof NewForm * @memberof @memberof NewForm
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.ibzemployee = copyData.srfkey;
copyData.userid = copyData.srfkey;
Object.assign(this.context,{ibzemployee:copyData.ibzemployee})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -1083,7 +1083,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1083,7 +1083,11 @@ export default class MainBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -1147,8 +1151,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1147,8 +1151,18 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof Main * @memberof @memberof Main
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.ibzorganization = copyData.srfkey;
copyData.orgid = copyData.srfkey;
Object.assign(this.context,{ibzorganization:copyData.ibzorganization})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -974,7 +974,11 @@ export default class NewFormBase extends Vue implements ControlInterface { ...@@ -974,7 +974,11 @@ export default class NewFormBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -1038,8 +1042,18 @@ export default class NewFormBase extends Vue implements ControlInterface { ...@@ -1038,8 +1042,18 @@ export default class NewFormBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof NewForm * @memberof @memberof NewForm
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.ibzorganization = copyData.srfkey;
copyData.orgid = copyData.srfkey;
Object.assign(this.context,{ibzorganization:copyData.ibzorganization})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -13,4 +13,5 @@ services: ...@@ -13,4 +13,5 @@ services:
networks: networks:
agent_network: agent_network:
driver: overlay driver: overlay
attachable: true attachable: true
\ No newline at end of file
...@@ -11,6 +11,8 @@ import com.alibaba.fastjson.annotation.JSONField; ...@@ -11,6 +11,8 @@ import com.alibaba.fastjson.annotation.JSONField;
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;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.util.domain.EntityBase; import cn.ibizlab.util.domain.EntityBase;
import cn.ibizlab.util.annotation.DEField; import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType; import cn.ibizlab.util.enums.DEPredefinedFieldType;
...@@ -23,6 +25,7 @@ import org.springframework.data.annotation.Transient; ...@@ -23,6 +25,7 @@ import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP; import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[部门] * 实体[部门]
*/ */
...@@ -207,10 +210,7 @@ public class IBZDepartment extends EntityMP implements Serializable { ...@@ -207,10 +210,7 @@ public class IBZDepartment extends EntityMP implements Serializable {
this.bcode = bcode ; this.bcode = bcode ;
this.modify("bcode",bcode); this.modify("bcode",bcode);
} }
}
}
...@@ -11,6 +11,8 @@ import com.alibaba.fastjson.annotation.JSONField; ...@@ -11,6 +11,8 @@ import com.alibaba.fastjson.annotation.JSONField;
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;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.util.domain.EntityBase; import cn.ibizlab.util.domain.EntityBase;
import cn.ibizlab.util.annotation.DEField; import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType; import cn.ibizlab.util.enums.DEPredefinedFieldType;
...@@ -23,6 +25,7 @@ import org.springframework.data.annotation.Transient; ...@@ -23,6 +25,7 @@ import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP; import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[人员] * 实体[人员]
*/ */
...@@ -523,10 +526,7 @@ public class IBZEmployee extends EntityMP implements Serializable { ...@@ -523,10 +526,7 @@ public class IBZEmployee extends EntityMP implements Serializable {
this.showorder = showorder ; this.showorder = showorder ;
this.modify("showorder",showorder); this.modify("showorder",showorder);
} }
}
}
...@@ -11,6 +11,8 @@ import com.alibaba.fastjson.annotation.JSONField; ...@@ -11,6 +11,8 @@ import com.alibaba.fastjson.annotation.JSONField;
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;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.util.domain.EntityBase; import cn.ibizlab.util.domain.EntityBase;
import cn.ibizlab.util.annotation.DEField; import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType; import cn.ibizlab.util.enums.DEPredefinedFieldType;
...@@ -23,6 +25,7 @@ import org.springframework.data.annotation.Transient; ...@@ -23,6 +25,7 @@ import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP; import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[单位机构] * 实体[单位机构]
*/ */
...@@ -172,10 +175,7 @@ public class IBZOrganization extends EntityMP implements Serializable { ...@@ -172,10 +175,7 @@ public class IBZOrganization extends EntityMP implements Serializable {
this.showorder = showorder ; this.showorder = showorder ;
this.modify("showorder",showorder); this.modify("showorder",showorder);
} }
}
}
...@@ -68,7 +68,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I ...@@ -68,7 +68,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
@Override @Override
public void createBatch(List<IBZDepartment> list) { public void createBatch(List<IBZDepartment> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
saveBatch(list,batchSize); this.saveBatch(list,batchSize);
} }
@Override @Override
......
...@@ -85,7 +85,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm ...@@ -85,7 +85,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
@Override @Override
public void createBatch(List<IBZEmployee> list) { public void createBatch(List<IBZEmployee> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
saveBatch(list,batchSize); this.saveBatch(list,batchSize);
} }
@Override @Override
......
...@@ -91,7 +91,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe ...@@ -91,7 +91,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
@Override @Override
public void createBatch(List<IBZOrganization> list) { public void createBatch(List<IBZOrganization> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
saveBatch(list,batchSize); this.saveBatch(list,batchSize);
} }
@Override @Override
......
...@@ -13,4 +13,5 @@ services: ...@@ -13,4 +13,5 @@ services:
networks: networks:
agent_network: agent_network:
driver: overlay driver: overlay
attachable: true attachable: true
\ No newline at end of file
...@@ -4,7 +4,7 @@ import com.github.benmanes.caffeine.cache.CaffeineSpec; ...@@ -4,7 +4,7 @@ import com.github.benmanes.caffeine.cache.CaffeineSpec;
import cn.ibizlab.util.cache.cacheManager.CaffeineCacheManager; import cn.ibizlab.util.cache.cacheManager.CaffeineCacheManager;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.cache.CacheProperties; import org.springframework.boot.autoconfigure.cache.CacheProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
...@@ -19,7 +19,7 @@ import org.springframework.util.StringUtils; ...@@ -19,7 +19,7 @@ import org.springframework.util.StringUtils;
@EnableCaching @EnableCaching
@Configuration @Configuration
@EnableConfigurationProperties(CacheProperties.class) @EnableConfigurationProperties(CacheProperties.class)
@ConditionalOnProperty("ibiz.enableCaffeineCache") @ConditionalOnExpression("'${ibiz.cacheLevel:None}'.equals('L1')")
public class CaffeineCacheConfig { public class CaffeineCacheConfig {
@Autowired @Autowired
......
...@@ -11,7 +11,7 @@ import cn.ibizlab.util.cache.redis.StringRedisSerializer; ...@@ -11,7 +11,7 @@ import cn.ibizlab.util.cache.redis.StringRedisSerializer;
import cn.ibizlab.util.enums.RedisChannelTopic; import cn.ibizlab.util.enums.RedisChannelTopic;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.cache.CacheProperties; import org.springframework.boot.autoconfigure.cache.CacheProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
...@@ -36,7 +36,7 @@ import org.springframework.util.StringUtils; ...@@ -36,7 +36,7 @@ import org.springframework.util.StringUtils;
@EnableCaching @EnableCaching
@Configuration @Configuration
@EnableConfigurationProperties(CacheProperties.class) @EnableConfigurationProperties(CacheProperties.class)
@ConditionalOnProperty("ibiz.enableRedisCache") @ConditionalOnExpression("'${ibiz.cacheLevel:None}'.equals('L2')")
public class RedisCacheConfig { public class RedisCacheConfig {
@Autowired @Autowired
......
...@@ -3,7 +3,7 @@ package cn.ibizlab.util.cache.cacheManager; ...@@ -3,7 +3,7 @@ package cn.ibizlab.util.cache.cacheManager;
import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.CaffeineSpec; import com.github.benmanes.caffeine.cache.CaffeineSpec;
import lombok.Data; import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.caffeine.CaffeineCache; import org.springframework.cache.caffeine.CaffeineCache;
...@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit; ...@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit;
*/ */
@Data @Data
@Component @Component
@ConditionalOnProperty("ibiz.enableCaffeineCache") @ConditionalOnExpression("'${ibiz.cacheLevel:None}'.equals('L1')")
public class CaffeineCacheManager implements CacheManager { public class CaffeineCacheManager implements CacheManager {
private static final int DEFAULT_EXPIRE_AFTER_WRITE = 1; private static final int DEFAULT_EXPIRE_AFTER_WRITE = 1;
......
...@@ -5,7 +5,7 @@ import com.github.benmanes.caffeine.cache.CaffeineSpec; ...@@ -5,7 +5,7 @@ import com.github.benmanes.caffeine.cache.CaffeineSpec;
import lombok.Data; import lombok.Data;
import cn.ibizlab.util.cache.cache.LayeringCache; import cn.ibizlab.util.cache.cache.LayeringCache;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.data.redis.cache.RedisCacheConfiguration; import org.springframework.data.redis.cache.RedisCacheConfiguration;
...@@ -27,7 +27,7 @@ import java.util.concurrent.TimeUnit; ...@@ -27,7 +27,7 @@ import java.util.concurrent.TimeUnit;
*/ */
@Data @Data
@Component @Component
@ConditionalOnProperty("ibiz.enableRedisCache") @ConditionalOnExpression("'${ibiz.cacheLevel:None}'.equals('L2')")
public class LayeringCacheManager implements CacheManager { public class LayeringCacheManager implements CacheManager {
private static final int DEFAULT_EXPIRE_AFTER_WRITE = 1; private static final int DEFAULT_EXPIRE_AFTER_WRITE = 1;
......
...@@ -5,7 +5,7 @@ import cn.ibizlab.util.enums.RedisChannelTopic; ...@@ -5,7 +5,7 @@ import cn.ibizlab.util.enums.RedisChannelTopic;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.data.redis.connection.Message; import org.springframework.data.redis.connection.Message;
...@@ -22,7 +22,7 @@ import java.util.Map; ...@@ -22,7 +22,7 @@ import java.util.Map;
*/ */
@Component @Component
@ConditionalOnProperty("ibiz.enableRedisCache") @ConditionalOnExpression("'${ibiz.cacheLevel:None}'.equals('L2')")
public class RedisMessageListener extends MessageListenerAdapter { public class RedisMessageListener extends MessageListenerAdapter {
private static final Logger logger = LoggerFactory.getLogger(RedisPublisher.class); private static final Logger logger = LoggerFactory.getLogger(RedisPublisher.class);
@Autowired @Autowired
......
...@@ -78,9 +78,8 @@ ribbon: ...@@ -78,9 +78,8 @@ ribbon:
ConnectTimeout: 60000 ConnectTimeout: 60000
#系统是否开启权限验证、是否开启缓存 #系统是否开启权限验证、是否开启缓存
#缓存模式:关闭缓存(无配置项)、本地缓存(enableCaffeineCache=true-默认)、caffeine+redis两级缓存(enableRedisCache=true) #缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2)
ibiz: ibiz:
enablePermissionValid: true enablePermissionValid: true
enableCaffeineCache: true cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存
#enableRedisCache: true
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册