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

ibiz4j 发布系统代码 [ ibiz-pay,支付]

上级 3e648869
## v7.0.0-alpha.21 [2020-10-31]
### Bug修复
修复视图类型门户部件通知嵌入视图刷新问题
修复表格行编辑传值无效和设置表格行编辑禁用无效问题
修复表格列触发行为权限控制无效问题
修复表格导出代码表转化问题
修复行编辑时合并行主键到上下文中
修复多表单编辑视图(部件视图)临时模式异常问题
修复修复表单值规则异常问题
### 功能新增及优化
#### 模板
新增导航类部件快速搜索栏提示
新增分页导航面板主状态逻辑
新增图片预览(可旋转)控件
新增多数据部件无值显示内容适配
新增分页导航视图工具栏权限状态逻辑
新增适配界面行为中显示处理
新增支持是否支持实体主状态属性
优化列表加载、刷新逻辑
优化直接内容项组件
优化甘特图部件和树表格部件加载逻辑
优化后台界面行为异常处理逻辑
优化分页导航面板切换分页刷新逻辑
优化树导航视图树节点刷新逻辑
优化表单更新项传入调用方法名称
优化行编辑值校验错误信息提示
#### 基础文件
新增图片预览(可旋转)控件
新增计算分页导航视图工具栏权限状态逻辑
新增支持是否支持实体主状态逻辑
新增切换组织部门功能
优化数据选择下拉控件(下拉列表宽度和编辑器宽度保持一致)
优化直接内容项组件
修复数据选择无值抛出null
修复登录完成user存储到localStorage
修复表格值为0不显示问题
## v7.0.0-alpha.20 [2020-10-18]
### Bug修复
......
......@@ -97,6 +97,7 @@ import AppFormPart from './components/app-form-part/app-form-part.vue'
import AppAlert from './components/app-alert/app-alert.vue'
import AppAlertGroup from './components/app-alert-group/app-alert-group.vue'
import AppRawItem from './components/app-rawitem/app-rawitem.vue'
import AppImageRomate from './components/app-image-romate/app-image-romate.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -209,5 +210,6 @@ export const AppComponents = {
v.component('app-alert', AppAlert);
v.component('app-alert-group', AppAlertGroup);
v.component('app-rawitem',AppRawItem);
v.component('app-image-romate', AppImageRomate)
},
};
\ No newline at end of file
......@@ -100,6 +100,8 @@ export default class AppActionBar extends Vue {
* @memberof AppActionBar
*/
public calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
if(!UIService.isEnableDEMainState)
return;
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
......
......@@ -279,7 +279,7 @@ export default class AppColumnLink extends Vue {
if (result.datas && Array.isArray(result.datas)) {
Object.assign(item, result.datas[0]);
}
console.log(item);
this.$emit('refresh',item);
}
/**
......
......@@ -158,6 +158,8 @@ export default class AppFormGroup extends Vue {
* @memberof AppFormGroup
*/
public calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
if(!UIService.isEnableDEMainState)
return;
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
......
......@@ -47,7 +47,7 @@ export default class AppFormatData extends Vue {
* @memberof AppFormatData
*/
getcurValue(){
if(this.data){
if(this.data || this.data == 0){
if(Object.is(this.dataType,"DECIMAL") || Object.is(this.dataType,"FLOAT") || Object.is(this.dataType,"CURRENCY")){
let number = Number(this.data);
let precision = Number(this.precision);
......
<template>
<div class='app-image-preview'>
<el-image :src="data[name]" :previewSrcList="previewList" :disabled="disabled">
</el-image>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Watch, Provide } from 'vue-property-decorator';
import { Subject, Unsubscribable } from 'rxjs';
@Component({})
export default class AppImageRomate extends Vue {
/**
* 表单状态
*
* @type {any}
* @memberof AppImageRomate
*/
@Prop() public formState: any;
/**
* 图片数据
*
* @type {any}
* @memberof AppImageRomate
*/
@Prop() public data!: any;
/**
* 字段名
*
* @type {any}
* @memberof AppImageRomate
*/
@Prop() public name: any;
/**
* 禁用状态
*
* @type {boolean}
* @memberof AppImageRomate
*/
@Prop() public disabled: boolean = false;
/**
* 预览图片数组
*
* @type {boolean}
* @memberof AppImageRomate
*/
public previewList:Array<any> = [];
/**
* 表单状态事件
*
* @private
* @type {(Unsubscribable | undefined)}
* @memberof AppImageUpload
*/
private formStateEvent: Unsubscribable | undefined;
/**
* Vue生命周期
*
* @type {boolean}
* @memberof AppImageRomate
*/
public created() {
if (this.formState) {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if(this.data && this.name) {
this.handleData();
}
});
}
}
/**
* 数据处理
*
* @type {boolean}
* @memberof AppImageRomate
*/
public handleData() {
this.previewList.push(this.data[this.name]);
}
/**
* 组件销毁
*
* @memberof AppImageRomate
*/
public destroyed(): void {
if (this.formStateEvent) {
this.formStateEvent.unsubscribe();
}
}
}
</script>
\ No newline at end of file
......@@ -22,6 +22,7 @@
</div>
</template>
<script lang = 'ts'>
import { Http } from '@/utils/http/http';
import { Vue, Component, Inject } from "vue-property-decorator";
@Component({})
......@@ -110,17 +111,33 @@ export default class AppOrgSector extends Vue {
let item: any = this.selectedOrgArray.find((_item: any) => {
return _item.srforgsectorid === data;
});
if (item.srforgsectorid && item.srforgsectorname) {
this.selectedOrgId = item.srforgsectorid;
this.selectedOrgName = item.srforgsectorname;
this.reload();
this.switchDepartment(data).then((response:any) =>{
if (response.status == 200) {
if (item.srforgsectorid && item.srforgsectorname) {
this.selectedOrgId = item.srforgsectorid;
this.selectedOrgName = item.srforgsectorname;
}
this.updateStoreOrgData(item);
this.reload();
}else{
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data?response.data.message:(this.$t('components.appOrgSector.errorSwitch') as string) });
}
}).catch((error:any) =>{
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('components.appOrgSector.errorSwitch') as string) });
})
}
}
this.updateStoreOrgData(item);
/**
* 调用远端切换部门接口
*
* @memberof AppOrgSector
*/
public async switchDepartment(data:any){
return await Http.getInstance().post(`/oumaps/switch`,data,false);
}
/**
* 更新仓库Org信息
* 更新仓库部门信息
*
* @memberof AppOrgSector
*/
......
......@@ -37,7 +37,7 @@
</div>
<div v-else-if="Object.is(editortype, 'dropdown')" class='app-picker'>
<el-select ref="appPicker" remote :remote-method="(query) => this.onSearch(query, null, true)" :value="refvalue" size='small' filterable
@change="onSelect" :disabled="disabled" style='width:100%;' clearable
@change="onSelect" :disabled="disabled" style='width:100%;' clearable popper-class="app-picker-dropdown"
@clear="onClear" @visible-change="onSelectOpen">
<template v-if="items">
<template v-for="_item in items">
......@@ -260,6 +260,14 @@ export default class AppPicker extends Vue {
*/
public selectValue = this.value;
/**
* 下拉列表节点元素
*
* @type {*}
* @memberof AppPicker
*/
public dropdownDom:any = {};
/**
* 获取关联数据项值
*
......@@ -314,6 +322,8 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public mounted() {
const dropdownDom:any = this.$el.getElementsByClassName('app-picker-dropdown')[0];
this.dropdownDom = dropdownDom;
}
/**
......@@ -331,10 +341,22 @@ export default class AppPicker extends Vue {
public onSelectOpen(flag: boolean): void {
this.open = flag;
if (this.open) {
//设置下拉列表的最大宽度
this.setDropdownWidth();
this.onSearch(this.curvalue, null, true);
}
}
/**
* 设置下拉列表最大宽度使下拉列表宽度和编辑器宽度一致
*
* @memberof AppPicker
*/
public setDropdownWidth(){
const elInput:any = this.$el.getElementsByClassName('el-input__inner')[0];
this.dropdownDom.style.maxWidth = elInput.offsetWidth+'px';
}
/**
* 执行搜索数据
* @param query
......@@ -434,10 +456,10 @@ export default class AppPicker extends Vue {
*/
public onClear($event: any): void {
if (this.valueitem) {
this.$emit('formitemvaluechange', { name: this.valueitem, value: '' });
this.$emit('formitemvaluechange', { name: this.valueitem, value: null });
}
if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: '' });
this.$emit('formitemvaluechange', { name: this.name, value: null });
}
this.fillPickUpData();
this.$forceUpdate();
......
<template>
<div>
<span v-if="caption">{{caption}}</span>
<div :class="contentStyle" :style="sizeStyle">
<template v-if="Object.is(contentType,'RAW')">
{{rawContent ? rawContent : ''}}
</template>
<template v-else-if="Object.is(contentType,'HTML')">
{{htmlContent ? htmlContent : ''}}
</template>
<template v-else-if="Object.is(contentType,'IMAGE')">
<i :class="imageClass ? imageClass : ''"></i>
</template>
<div :style="sizeStyle">
<span>{{caption}}</span>
<div v-if="Object.is(contentType,'RAW')" :class="contentStyle">
<slot></slot>
</div>
<div v-else-if="Object.is(contentType,'HTML')" :class="contentStyle" v-html="htmlContent" />
<div v-else-if="Object.is(contentType,'IMAGE')" :class="contentStyle">
<i :class="imageClass ? imageClass : ''"></i>
</div>
</div>
</template>
......@@ -22,20 +18,28 @@ import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
export default class AppRawItem extends Vue {
/**
* 内容类型
* 应用上下文
*
* @type {string}
* @memberof AppRawItem
*/
@Prop() public contentType!: string;
@Prop() public context!: any;
/**
* 直接内容
*
* @type {strin}
* @memberof AppRawItem
*/
@Prop() public rawContent?: string;
* 视图参数
*
* @type {string}
* @memberof AppRawItem
*/
@Prop() public viewparams!: any;
/**
* 内容类型
*
* @type {string}
* @memberof AppRawItem
*/
@Prop() public contentType!: string;
/**
* html内容
......@@ -46,7 +50,7 @@ export default class AppRawItem extends Vue {
@Prop() public htmlContent?: string;
/**
* html内容
* 图片
*
* @type {strin}
* @memberof AppRawItem
......
......@@ -183,6 +183,9 @@ export default class Login extends Vue {
localStorage.setItem('token', data.token);
this.setCookie('ibzuaa-token',data.token,0);
}
if(data && data.user){
localStorage.setItem('user', JSON.stringify(data.user));
}
// 设置cookie,保存账号密码7天
this.setCookie("loginname",loginname, 7);
// 跳转首页
......
......@@ -44,4 +44,14 @@ export default class TabExpViewEngine extends ViewEngine {
this.setViewState2({ tag: _item.name, action: 'load', viewdata: this.view.context });
});
}
/**
* 计算按钮状态
*
* @memberof TabExpViewEngine
*/
public computeToolbarState(state:boolean,data:any){
this.calcToolbarItemState(state);
this.calcToolbarItemAuthState(data);
}
}
\ No newline at end of file
......@@ -187,6 +187,8 @@ export default class ViewEngine {
*/
public calcToolbarItemAuthState(data:any){
const _this: any = this;
if(!_this.view.appUIService.isEnableDEMainState)
return;
for (const key in _this.view.toolBarModels) {
if (!_this.view.toolBarModels.hasOwnProperty(key)) {
return;
......
......@@ -39,7 +39,6 @@ export default {
show: "Show",
records: "records",
totle: "totle",
noData: "No data",
valueVail: "Value cannot be empty",
group:"Group",
other:"Other",
......
......@@ -39,7 +39,6 @@ export default {
show: "显示",
records: "条",
totle: "共",
noData: "无数据",
valueVail: "值不能为空",
group:"分组",
other:"其他",
......
......@@ -11,6 +11,10 @@ export default {
indexPage: 'home page',
continue: 'to continue browsing',
},
appOrgSector:{
successSwitch:'The switch was successful',
errorSwitch:'The switchover failed',
},
appAutocomplete: {
error: 'Error',
miss: 'Missing parameter ',
......
......@@ -11,6 +11,10 @@ export default {
indexPage: '首页',
continue: '继续浏览',
},
appOrgSector:{
successSwitch:'切换成功',
errorSwitch:'切换失败',
},
appAutocomplete: {
error: '错误',
miss: '缺少参数',
......
......@@ -61,6 +61,7 @@ export default {
region_id: "RegionId",
redirect_uri: "RedirectURI",
},
nodata:"",
uiactions: {
},
},
......
......@@ -60,6 +60,7 @@ export default {
region_id: "RegionId",
redirect_uri: "RedirectURI",
},
nodata:"",
uiactions: {
},
},
......
......@@ -51,6 +51,7 @@ export default {
totalamount: "订单金额",
accessname: "支付平台",
},
nodata:"",
uiactions: {
},
},
......
......@@ -50,6 +50,7 @@ export default {
totalamount: "订单金额",
accessname: "支付平台",
},
nodata:"",
uiactions: {
},
},
......
......@@ -187,11 +187,11 @@ export default class PayIndexViewBase extends Vue {
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
......@@ -489,7 +489,7 @@ export default class PayIndexViewBase extends Vue {
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'calendar-view9')){
if(!Object.is(res.name,'PayIndexView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
......
......@@ -274,11 +274,11 @@ export default class PayOpenAccessEditViewBase extends Vue {
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
......@@ -646,7 +646,7 @@ export default class PayOpenAccessEditViewBase extends Vue {
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'calendar-view9')){
if(!Object.is(res.name,'PayOpenAccessEditView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
......
......@@ -303,11 +303,11 @@ export default class PayOpenAccessGridViewBase extends Vue {
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
......@@ -680,7 +680,7 @@ export default class PayOpenAccessGridViewBase extends Vue {
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'calendar-view9')){
if(!Object.is(res.name,'PayOpenAccessGridView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
......
......@@ -198,11 +198,11 @@ export default class PayOpenAccessPickupGridViewBase extends Vue {
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
......@@ -533,7 +533,7 @@ export default class PayOpenAccessPickupGridViewBase extends Vue {
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'calendar-view9')){
if(!Object.is(res.name,'PayOpenAccessPickupGridView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
......
......@@ -188,11 +188,11 @@ export default class PayOpenAccessPickupViewBase extends Vue {
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
......@@ -516,7 +516,7 @@ export default class PayOpenAccessPickupViewBase extends Vue {
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'calendar-view9')){
if(!Object.is(res.name,'PayOpenAccessPickupView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
......
......@@ -274,11 +274,11 @@ export default class PayTradeEditViewBase extends Vue {
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
......@@ -646,7 +646,7 @@ export default class PayTradeEditViewBase extends Vue {
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'calendar-view9')){
if(!Object.is(res.name,'PayTradeEditView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
......
......@@ -303,11 +303,11 @@ export default class PayTradeGridViewBase extends Vue {
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
......@@ -680,7 +680,7 @@ export default class PayTradeGridViewBase extends Vue {
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'calendar-view9')){
if(!Object.is(res.name,'PayTradeGridView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
......
......@@ -20,6 +20,13 @@ export default class PayOpenAccessUIServiceBase extends UIService {
*/
public isEnableWorkflow:boolean = false;
/**
* 是否支持实体主状态
*
* @memberof PayOpenAccessUIServiceBase
*/
public isEnableDEMainState:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
......
......@@ -20,6 +20,13 @@ export default class PayTradeUIServiceBase extends UIService {
*/
public isEnableWorkflow:boolean = false;
/**
* 是否支持实体主状态
*
* @memberof PayTradeUIServiceBase
*/
public isEnableDEMainState:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
......
......@@ -258,7 +258,7 @@ export class ViewTool {
return result;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
if(_item && _item['dataaccaction'] && UIService && UIService.isEnableDEMainState){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE") || Object.is(_item['actiontarget'],"")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
......
......@@ -16,7 +16,7 @@
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
{{$t('app.gridpage.noData')}}
{{$t('entities.payopenaccess.main_grid.nodata')}}
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
......@@ -566,6 +566,14 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public isDisplay:boolean = true;
/**
* 表格行编辑项校验错误提示信息
*
* @type {boolean}
* @memberof MainBase
*/
public errorMessages: Array<any> = [];
/**
* 部件刷新
*
......@@ -606,6 +614,7 @@ export default class MainBase extends Vue implements ControlInterface {
show: true,
unit: 'px',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'open_type',
......@@ -614,6 +623,7 @@ export default class MainBase extends Vue implements ControlInterface {
show: true,
unit: 'px',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'region_id',
......@@ -622,6 +632,7 @@ export default class MainBase extends Vue implements ControlInterface {
show: true,
unit: 'px',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'redirect_uri',
......@@ -630,6 +641,7 @@ export default class MainBase extends Vue implements ControlInterface {
show: true,
unit: 'px',
isEnableRowEdit: false,
enableCond: 3 ,
},
]
......@@ -740,6 +752,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public async validateAll(){
this.errorMessages = [];
let validateState = true;
let index = -1;
for(let item of this.items){
......@@ -748,6 +761,7 @@ export default class MainBase extends Vue implements ControlInterface {
for(let property of Object.keys(this.rules)){
if(!await this.validate(property,item,index)){
validateState = false;
this.errorMessages.push(this.gridItemsModel[index][property].error);
}
}
}
......@@ -1076,14 +1090,14 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public async formatExcelData(filterVal:any, jsonData:any) {
let codelistColumns:Array<any> = [
{
name: 'open_type',
srfkey: 'OpenAccessType',
codelistType : 'STATIC',
renderMode: 'other',
textSeparator: '、',
valueSeparator: ',',
},
{
name: 'open_type',
srfkey: 'OpenAccessType',
codelistType : 'STATIC',
renderMode: 'other',
textSeparator: '、',
valueSeparator: ',',
},
];
let _this = this;
for (const codelist of codelistColumns) {
......@@ -1115,7 +1129,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getCodelistValue(items: any[], value: any, codelist: any,){
if(!value){
if(!value && value !== 0 && value !== false){
return this.$t('codelist.'+codelist.srfkey+'.empty');
}
if (items) {
......@@ -1691,8 +1705,16 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
}
if(!await this.validateAll()){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
if (!await this.validateAll()) {
if(this.errorMessages && this.errorMessages.length > 0) {
let descMessage: string = '';
this.errorMessages.forEach((message: any) => {
descMessage = descMessage + '<p>' + message + '<p>';
})
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: descMessage });
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
}
return [];
}
let successItems:any = [];
......@@ -1832,9 +1854,10 @@ export default class MainBase extends Vue implements ControlInterface {
if (!mode || (mode && Object.is(mode, ''))) {
return;
}
let tempContext: any = this.$util.deepCopy(this.context);
const arg: any = JSON.parse(JSON.stringify(data));
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading);
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(tempContext)),arg, showloading);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.gridpage.formitemFailed') as string) });
......@@ -2075,6 +2098,24 @@ export default class MainBase extends Vue implements ControlInterface {
})
}
/**
* 获取表格列禁用状态
*
* @memberof MainBase
*/
public getColumnDisabled(data:any,name:string){
if(this.allColumns || Array.isArray(this.allColumns)){
const curColumn:any = this.allColumns.find((item:any) =>{
return item.name === name;
})
if(curColumn.hasOwnProperty('enableCond')){
return data.srfuf == 1 ? (curColumn.enableCond & 2) !== 2 : (curColumn.enableCond & 1) !== 1
}else{
return false;
}
}
}
}
</script>
......
......@@ -216,7 +216,7 @@ export default class MainService extends ControlService {
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
Object.assign(response.data,{srfuf:'0'});
}
resolve(response);
}).catch(response => {
......@@ -347,7 +347,7 @@ export default class MainService extends ControlService {
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && (data[item.name] || Object.is(data[item.name],0) || Object.is(data[item.name],"")) ){
if(item && item.isEditable && item.prop && item.name && data.hasOwnProperty(item.name)){
requestData[item.prop] = data[item.name];
}
}
......
......@@ -16,7 +16,7 @@
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
{{$t('app.gridpage.noData')}}
{{$t('entities.paytrade.main_grid.nodata')}}
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
......@@ -590,6 +590,14 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public isDisplay:boolean = true;
/**
* 表格行编辑项校验错误提示信息
*
* @type {boolean}
* @memberof MainBase
*/
public errorMessages: Array<any> = [];
/**
* 部件刷新
*
......@@ -630,6 +638,7 @@ export default class MainBase extends Vue implements ControlInterface {
show: true,
unit: 'px',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'subject',
......@@ -638,6 +647,7 @@ export default class MainBase extends Vue implements ControlInterface {
show: true,
unit: 'px',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'outtradeno',
......@@ -646,6 +656,7 @@ export default class MainBase extends Vue implements ControlInterface {
show: true,
unit: 'px',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'totalamount',
......@@ -654,6 +665,7 @@ export default class MainBase extends Vue implements ControlInterface {
show: true,
unit: 'px',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'accessname',
......@@ -662,6 +674,7 @@ export default class MainBase extends Vue implements ControlInterface {
show: true,
unit: 'px',
isEnableRowEdit: false,
enableCond: 3 ,
},
]
......@@ -772,6 +785,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public async validateAll(){
this.errorMessages = [];
let validateState = true;
let index = -1;
for(let item of this.items){
......@@ -780,6 +794,7 @@ export default class MainBase extends Vue implements ControlInterface {
for(let property of Object.keys(this.rules)){
if(!await this.validate(property,item,index)){
validateState = false;
this.errorMessages.push(this.gridItemsModel[index][property].error);
}
}
}
......@@ -1139,7 +1154,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getCodelistValue(items: any[], value: any, codelist: any,){
if(!value){
if(!value && value !== 0 && value !== false){
return this.$t('codelist.'+codelist.srfkey+'.empty');
}
if (items) {
......@@ -1716,8 +1731,16 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
}
if(!await this.validateAll()){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
if (!await this.validateAll()) {
if(this.errorMessages && this.errorMessages.length > 0) {
let descMessage: string = '';
this.errorMessages.forEach((message: any) => {
descMessage = descMessage + '<p>' + message + '<p>';
})
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: descMessage });
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
}
return [];
}
let successItems:any = [];
......@@ -1857,9 +1880,10 @@ export default class MainBase extends Vue implements ControlInterface {
if (!mode || (mode && Object.is(mode, ''))) {
return;
}
let tempContext: any = this.$util.deepCopy(this.context);
const arg: any = JSON.parse(JSON.stringify(data));
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading);
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(tempContext)),arg, showloading);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.gridpage.formitemFailed') as string) });
......@@ -2100,6 +2124,24 @@ export default class MainBase extends Vue implements ControlInterface {
})
}
/**
* 获取表格列禁用状态
*
* @memberof MainBase
*/
public getColumnDisabled(data:any,name:string){
if(this.allColumns || Array.isArray(this.allColumns)){
const curColumn:any = this.allColumns.find((item:any) =>{
return item.name === name;
})
if(curColumn.hasOwnProperty('enableCond')){
return data.srfuf == 1 ? (curColumn.enableCond & 2) !== 2 : (curColumn.enableCond & 1) !== 1
}else{
return false;
}
}
}
}
</script>
......
......@@ -216,7 +216,7 @@ export default class MainService extends ControlService {
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
Object.assign(response.data,{srfuf:'0'});
}
resolve(response);
}).catch(response => {
......@@ -347,7 +347,7 @@ export default class MainService extends ControlService {
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && (data[item.name] || Object.is(data[item.name],0) || Object.is(data[item.name],"")) ){
if(item && item.isEditable && item.prop && item.name && data.hasOwnProperty(item.name)){
requestData[item.prop] = data[item.name];
}
}
......
......@@ -4,57 +4,57 @@ server:
#zuul网关路由设置
zuul:
routes:
loginv7:
path: /v7/login
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
uaa:
path: /uaa/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
config:
path: /configs/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
oucore:
path: /ibzorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
oudict:
path: /dictionarys/**/Ibzou**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou:
path: /ibzdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
uaadict:
path: /dictionarys/**/SysOperator
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
dict:
path: /dictionarys/**
serviceId: ${ibiz.ref.service.dict:ibzdict-api}
stripPrefix: false
disk:
path: /net-disk/**
serviceId: ${ibiz.ref.service.disk:ibzdisk-api}
stripPrefix: false
ou_sys_org:
path: /sysorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou_sys_dept:
path: /sysdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
lite-core:
path: /lite/**
serviceId: ${ibiz.ref.service.lite:ibzlite-api}
stripPrefix: false
loginv7:
path: /v7/login
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
uaa:
path: /uaa/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
config:
path: /configs/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
oucore:
path: /ibzorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
oudict:
path: /dictionarys/**/Ibzou**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou:
path: /ibzdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
uaadict:
path: /dictionarys/**/SysOperator
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
dict:
path: /dictionarys/**
serviceId: ${ibiz.ref.service.dict:ibzdict-api}
stripPrefix: false
disk:
path: /net-disk/**
serviceId: ${ibiz.ref.service.disk:ibzdisk-api}
stripPrefix: false
ou_sys_org:
path: /sysorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou_sys_dept:
path: /sysdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
lite-core:
path: /lite/**
serviceId: ${ibiz.ref.service.lite:ibzlite-api}
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -18,7 +18,6 @@ import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.pay.domain.PayOpenAccess;
import cn.ibizlab.core.pay.filter.PayOpenAccessSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
......
......@@ -18,7 +18,6 @@ import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.pay.domain.PayTrade;
import cn.ibizlab.core.pay.filter.PayTradeSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
......@@ -38,8 +37,8 @@ public interface IPayTradeService extends IService<PayTrade>{
boolean save(PayTrade et) ;
void saveBatch(List<PayTrade> list) ;
Page<PayTrade> searchDefault(PayTradeSearchContext context) ;
List<PayTrade> selectByAccessId(String id) ;
void removeByAccessId(String id) ;
List<PayTrade> selectByAccessId(String id);
void removeByAccessId(String id);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -194,6 +194,7 @@ public class PayOpenAccessServiceImpl extends ServiceImpl<PayOpenAccessMapper, P
}
......
......@@ -162,7 +162,6 @@ public class PayTradeServiceImpl extends ServiceImpl<PayTradeMapper, PayTrade> i
public List<PayTrade> selectByAccessId(String id) {
return baseMapper.selectByAccessId(id);
}
@Override
public void removeByAccessId(String id) {
this.remove(new QueryWrapper<PayTrade>().eq("accessid",id));
......@@ -228,6 +227,7 @@ public class PayTradeServiceImpl extends ServiceImpl<PayTradeMapper, PayTrade> i
}
......
......@@ -21,6 +21,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":1,
"show_order":1,
"major_field":0
},
{
......@@ -34,6 +35,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":2,
"major_field":1
},
{
......@@ -48,6 +50,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":3,
"major_field":0
},
{
......@@ -61,6 +64,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":4,
"major_field":0
},
{
......@@ -74,6 +78,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":5,
"major_field":0
},
{
......@@ -87,6 +92,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":6,
"major_field":0
},
{
......@@ -100,6 +106,7 @@
"data_type":"VARCHAR",
"data_length":1000,
"key_field":0,
"show_order":7,
"major_field":0
},
{
......@@ -112,6 +119,7 @@
"physical_field":1,
"data_type":"DATETIME",
"key_field":0,
"show_order":8,
"major_field":0
},
{
......@@ -125,6 +133,7 @@
"physical_field":1,
"data_type":"INT",
"key_field":0,
"show_order":10,
"major_field":0
},
{
......@@ -138,6 +147,7 @@
"data_type":"VARCHAR",
"data_length":500,
"key_field":0,
"show_order":11,
"major_field":0
},
{
......@@ -151,6 +161,7 @@
"data_type":"VARCHAR",
"data_length":500,
"key_field":0,
"show_order":11,
"major_field":0
}
],
......@@ -185,6 +196,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
......@@ -198,6 +210,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
......@@ -211,6 +224,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":1
},
{
......@@ -225,6 +239,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
......@@ -239,6 +254,7 @@
"data_type":"VARCHAR",
"data_length":60,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
......@@ -253,6 +269,7 @@
"data_length":100,
"key_field":0,
"union_key":"KEY2",
"show_order":1000,
"major_field":0
},
{
......@@ -266,6 +283,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":1,
"show_order":1000,
"major_field":0
},
{
......@@ -283,6 +301,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
......@@ -300,6 +319,7 @@
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
......@@ -318,6 +338,7 @@
"data_length":100,
"key_field":0,
"union_key":"KEY1",
"show_order":1000,
"major_field":0
}
],
......
......@@ -233,12 +233,6 @@
<version>${jsonwebtoken-jjwt.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${alibaba-druid.version}</version>
</dependency>
<dependency>
<groupId>org.zalando</groupId>
<artifactId>problem-spring-web</artifactId>
......@@ -351,6 +345,8 @@
</dependency>
</dependencies>
</project>
......@@ -2,6 +2,7 @@ package cn.ibizlab.util.annotation;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DupCheck;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
......@@ -66,5 +67,14 @@ public @interface DEField
* @return
*/
String format() default "";
/**
* 重复性检查
* @return
*/
DupCheck dupCheck() default DupCheck.NONE;
/**
* 范围属性
*/
String dupCheckField() default "";
}
......@@ -6,9 +6,9 @@ public class EntityClient extends EntityBase {
@Override
public void modify(String field,Object val) {
getExtensionparams().put("dirtyflagenable",true);
if(val==null){
this.getFocusNull().add(field.toLowerCase());
getExtensionparams().put("dirtyflagenable",true);
getExtensionparams().put(field.toLowerCase()+"dirtyflag",true);
}
else{
......
package cn.ibizlab.util.enums;
/**
* 属性重复值检查
*/
public enum DupCheck {
/**
* 不检查
*/
NONE,
/**
* 全部检查
*/
ALL,
/**
* 非空检查
*/
NOTNULL,
/**
* 指定范围检查
*/
RANGE,
}
package cn.ibizlab.util.errors;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.dao.*;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.BindingResult;
......@@ -90,9 +90,18 @@ public class ExceptionTranslator implements ProblemHandling {
return create(ex, problem, request);
}
@ExceptionHandler(DataAccessException.class)
public ResponseEntity<Problem> handlerDataAccessFailure(DataAccessException ex, NativeWebRequest request){
Problem problem = Problem.builder()
.withStatus(Status.INTERNAL_SERVER_ERROR)
.with("message", ex.getMessage())
.build();
return create(ex, problem, request,createFailureAlert(ex.getClass().getSimpleName(), ex.getClass().getSimpleName(), ex.getMessage()));
}
public static HttpHeaders createFailureAlert(String entityName, String errorKey, String defaultMessage) {
HttpHeaders headers = new HttpHeaders();
headers.add("X-ibz-error", "error." + errorKey);
headers.add("X-ibz-error", errorKey);
headers.add("X-ibz-params", entityName);
return headers;
}
......
......@@ -41,6 +41,7 @@ public class PermissionSyncJob implements ApplicationRunner {
@Lazy
IBZLiteFeignClient liteFeignClient;
@Override
public void run(ApplicationArguments args) {
try {
......@@ -76,5 +77,6 @@ public class PermissionSyncJob implements ApplicationRunner {
}
}
}
\ No newline at end of file
......@@ -59,6 +59,7 @@ public class AppController {
appData.put("enablepermissionvalid",false);
else
appData.put("enablepermissionvalid",enablePermissionValid);
fillAppData(appData);
return ResponseEntity.status(HttpStatus.OK).body(appData);
}
......@@ -87,4 +88,12 @@ public class AppController {
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",configType);
return ResponseEntity.ok(ibzConfigService.getConfig(configType,targetType,userId));
}
/**
* 应用参数扩展
* @param appData
*/
protected void fillAppData(JSONObject appData){
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册