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

ibiz4j 发布系统代码

上级 e6164e98
## v7.0.0-alpha.19 [2020-9-13]
### Bug修复
修复表单动态隐藏和权限控制冲突问题
修复向导面板上一步去除表单校验逻辑
修复行为逻辑和附加后逻辑共同使用异常问题
修复树导航数据变化刷新当前节点问题
### 功能新增及优化
#### 模板
新增首页统一待办组件
新增实体工作流动态导航表格视图批量提交流程数据
新增菜单、工具栏、表单分组按钮、表单按钮、表格操作列单机模式支持
新增挂载外部配置文件
新增支持静态代码表样式表
新增增加树视图节点、日历项上下文菜单权限支持
新增支持表格导航、列表导航、卡片导航支持快速分组
新增部门人员选择器组件、文件上传(磁盘)组件、图片上传(磁盘)组件、动态表单组件
新增列表、数据视图回到顶部功能
新增表格分组、列表分组、数据视图分组功能
新增数据选择编辑器自填模式文本属性、值属性支持
新增附加逻辑外部逻辑支持
新增应用主题配置
优化项布局面板功能
优化列表样式
优化计数器支持
优化表格行编辑新建行追加在第一行
#### 基础文件
修复表单动态隐藏和权限控制冲突问题
修复嵌入视图组件初始化导航数据和抛值问题
修复app-format-data组件时间格式化转化异常
优化工作流审批组件
优化穿梭框组件样式
优化app-span精度逻辑
优化计数器处理逻辑
优化快速分组代码表抛值逻辑
优化debug组件和头部菜单增加开发环境配置
新增统一待办组件
新增实体工作流动态导航表格视图批量提交数据
新增菜单、工具栏、表单分组按钮、表单按钮、表格操作列单机模式支持
新增挂载外部配置文件
新增支持静态代码表样式表
新增部门人员选择器组件、文件上传(磁盘)组件、图片上传(磁盘)组件、动态表单组件
新增应用主题配置
## v7.0.0-alpha.18 [2020-8-23]
### Bug修复
......
......@@ -86,6 +86,12 @@ import AppLockScren from './components/app-lock-scren/app-lock-scren.vue'
import ActionTimeline from './components/action-timeline/action-timeline.vue'
import CronEditor from './components/cron-editor/cron-editor.vue'
import AppMessagePopover from './components/app-message-popover/app-message-popover.vue'
import AppPanelField from './components/app-panel-field/app-panel-field.vue'
import AppPanelItem from './components/app-panel-item/app-panel-item.vue'
import AppDepartmentPersonnel from './components/app-department-personnel/app-department-personnel.vue'
import DiskFileUpload from './components/disk-file-upload/disk-file-upload.vue'
import AvueCustomForm from './components/avue-custom-form/avue-custom-form.vue'
import DiskImageUpload from './components/disk-image-upload/disk-image-upload.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -111,6 +117,9 @@ export const AppComponents = {
v.prototype.$verify = Verify;
v.prototype.$viewTool = ViewTool;
v.prototype.$uiActionTool = UIActionTool;
v.component('app-department-personnel',AppDepartmentPersonnel);
v.component('app-panel-item',AppPanelItem);
v.component('app-panel-field',AppPanelField);
v.component('app-full-scren',AppFullScren);
v.component('app-lock-scren',AppLockScren);
v.component('input-box', InputBox);
......@@ -186,5 +195,8 @@ export const AppComponents = {
v.component('action-timeline', ActionTimeline);
v.component('cron-editor', CronEditor);
v.component('app-message-popover', AppMessagePopover);
v.component('disk-file-upload', DiskFileUpload);
v.component('avue-custom-form', AvueCustomForm);
v.component('disk-image-upload', DiskImageUpload);
},
};
\ No newline at end of file
......@@ -112,6 +112,9 @@ export default class AuthService {
* @memberof AuthService
*/
public getMenusPermission(item: any): boolean {
if(!this.$store.getters['authresource/getEnablePermissionValid']) {
return true;
}
return this.$store.getters['authresource/getAuthMenu'](item);
}
......@@ -123,6 +126,9 @@ export default class AuthService {
* @memberof AuthService
*/
public getResourcePermission(tag: any): boolean {
if(!this.$store.getters['authresource/getEnablePermissionValid']) {
return true;
}
return this.$store.getters['authresource/getResourceData'](tag);
}
......
......@@ -100,39 +100,37 @@ export default class AppActionBar extends Vue {
* @memberof AppActionBar
*/
public calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
if(Environment.enablePermissionValid){
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
}else{
_item.visabled = true;
}
}
if(dataActionResult === 1){
_item.visabled = true;
_item.disabled = false;
}
}
}
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
}else{
_item.visabled = true;
}
}
if(dataActionResult === 1){
_item.visabled = true;
_item.disabled = false;
}
}
}
}
......
......@@ -18,4 +18,7 @@
font-family: '微软雅黑','黑体','宋体';
font-size: 16px;
}
.progress {
margin-top: -15px;
}
}
\ No newline at end of file
<template>
<div class="app-data-upload-view">
<div class="app-data-upload-view" v-loading.fullscreen="isUploading" element-loading-background="rgba(57, 57, 57, 0.2)">
<el-row style="margin-top:24px" :gutter="20">
<el-col :span="4">
<el-button type="primary" @click="handleUpLoad">{{$t('components.appDataUploadView.selectfile')}}</el-button>
......@@ -13,6 +13,7 @@
</el-col>
</el-row>
<el-divider></el-divider>
<el-progress class="progress" v-show="isUploading" :text-inside="true" :stroke-width="14" :percentage="uploadProgress"></el-progress>
<el-row style="height:480px;padding: 0px 12px;">
<div class="data-info-content" >
<template v-if="importDataArray.length >0 && isUploading === false">
......@@ -50,6 +51,7 @@ import XLSX from 'xlsx';
import CodeListService from "@service/app/codelist-service";
import EntityService from '@/service/entity-service';
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { Environment } from '@/environments/environment';
@Component({
})
......@@ -191,6 +193,22 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
*/
public allFieldMap:Map<string,any> = new Map();
/**
* 上传服务器数据切片数
*
* @type {number}
* @memberof AppDataUploadView
*/
public sliceUploadCnt: number = Environment.sliceUploadCnt;
/**
* 上传服务器进度条百分比
*
* @type {number}
* @memberof AppDataUploadView
*/
public uploadProgress: number = 0;
/**
* 视图参数变化
......@@ -282,10 +300,29 @@ export default class AppDataUploadView extends Vue {
this.transformData(this.importDataArray,tempDataArray);
this.hasImported = true;
this.isUploading = true;
this.uploadProgress = 0;
this.importDataArray = [];
this.sliceUploadService(tempDataArray, 0);
}
/**
* 数据切片上传
*
* @memberof AppDataUploadView
*/
public sliceUploadService(dataArray: Array<any>, cnt: number) {
if(cnt > dataArray.length) {
this.isUploading = false;
this.uploadProgress = 100;
return;
}
let sliceArray: Array<any> = [];
if(dataArray) {
sliceArray = dataArray.slice(cnt, cnt+this.sliceUploadCnt);
}
try{
this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:tempDataArray}).then((res:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:sliceArray}).then((res:any) =>{
const result:any = res.data;
if(result && result.rst !== 0){
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -294,7 +331,8 @@ export default class AppDataUploadView extends Vue {
}
this.importSuccessData = result.data;
this.promptInfo = (this.$t('components.appDataUploadView.completed') as string);
this.isUploading = false;
this.uploadProgress = Number((cnt / dataArray.length * 100).toFixed(2));
this.sliceUploadService(dataArray, cnt + this.sliceUploadCnt);
}).catch((error:any) =>{
this.isUploading = false;
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -311,7 +349,6 @@ export default class AppDataUploadView extends Vue {
console.error(error);
};
}
/**
* 导出excel
*
......
<template>
<div class="app-debug-actions">
<div class="app-debug-actions" v-if="isShow">
<div class="actions">
<button-group vertical>
<i-button :title="$t('components.appDebugActions.button')" :type="sdc.isShowTool ? 'warning' : 'info'" ghost @click="() => sdc.showToolChange()" :icon="sdc.isShowTool ? 'ios-bug' : 'ios-bug-outline'" ></i-button>
......@@ -25,6 +25,14 @@ import { Environment } from '@/environments/environment';
})
export default class AppDebugActions extends Vue {
/**
* 是否显示
*
* @type {boolean}
* @memberof AppDebugActions
*/
public isShow:boolean = Environment.devMode;
/**
* 配置平台操作控制器
*
......
.app-department-personnel{
position: relative;
.ivu-select-selection{
position: relative;
padding: 0;
.ivu-select-selected-value{
padding-left: 15px;
font-size: 13px;
}
.ivu-tag.ivu-tag-checked{
top: 1px;
font-size: 12px;
height: 24px;
line-height: 22px;
margin: 2px 0px 2px 6px;
padding: 0 3px 0 8px;
background-color: #f4f4f5;
border-color: #e9e9eb;
color: #909399;
.ivu-tag-text{
padding: 0 8px 0 0;
}
}
.ivu-icon.ivu-icon-ios-close{
position: absolute;
width: 10px;
line-height: 10px;
height: 10px;
top: 6px;
margin-left: 8px;
font-size: 4px;
color: #909399;
background-color: #c0c4cc;
border-radius: 50%;
}
.ivu-icon.ivu-icon-ios-close:hover{
color: #fff;
background-color: #909399;
}
.ivu-icon-ios-close:before {
position: absolute;
left: -1px;
}
}
.el-icon-search{
position: absolute;
top: 10px;
right: 27px;
color: #c0c4cc;
}
}
\ No newline at end of file
......@@ -158,38 +158,36 @@ export default class AppFormGroup extends Vue {
* @memberof AppFormGroup
*/
public calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
if(Environment.enablePermissionValid){
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
}else{
_item.visabled = true;
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if(dataActionResult === 1){
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
}else{
_item.visabled = true;
_item.disabled = false;
}
}
if(dataActionResult === 1){
_item.visabled = true;
_item.disabled = false;
}
}
}
}
......
......@@ -72,10 +72,14 @@ export default class AppFormatData extends Vue {
return result;
}
} else if (this.format){
let date: any = moment(this.data);
if(!date._isValid) {
return this.data;
}
if(this.format.indexOf('%1$t') !== -1){
return moment(this.data).format("YYYY-MM-DD HH:mm:ss");
return date.format("YYYY-MM-DD HH:mm:ss");
}else{
return moment(this.data).format(this.format);
return date.format(this.format);
}
}else{
return this.data;
......
......@@ -176,7 +176,12 @@ export default class AppGroupPicker extends Vue {
*/
public loadTree() {
let orgid = this.viewParam.filtervalue;
let tempTreeUrl:string = this.treeurl.replace('${orgid}',orgid);
let tempTreeUrl: string = '';
if(this.viewParam.selectType && Object.is(this.viewParam.selectType,"dept")){
tempTreeUrl = this.treeurl.replace('{deptId}',orgid);
}else{
tempTreeUrl = this.treeurl.replace('${orgid}',orgid);
}
let get = Http.getInstance().get(tempTreeUrl, true);
get.then((response: any) => {
if(response.status === 200) {
......@@ -194,7 +199,12 @@ export default class AppGroupPicker extends Vue {
* @memberof AppGroupPicker
*/
public loadGroupData(key: string) {
let tempUrl = this.url.replace('${selected-orgid}',key);
let tempUrl: string = '';
if(this.viewParam.selectType && Object.is(this.viewParam.selectType,"dept")){
tempUrl = this.url.replace('{deptId}',key);
}else{
tempUrl = this.url.replace('${selected-orgid}',key);
}
let get = Http.getInstance().get(tempUrl, true);
get.then((response: any) => {
if(response.status === 200) {
......
.ibiz-group-select {
width: 100%;
display: flex;
border: 1px solid #DCDFE6;
height: 32px;
border-radius: 4px;
.ibiz-group-content {
flex-grow: 1;
height: 32px;
.group-item-text{
padding-left: 15px;
font-size: 13px;
}
.ibiz-group-item {
display: inline-block;
border: 1px solid #bbb;
border-radius: 5px;
font-size: 12px;
height: 24px;
line-height: 22px;
margin: 2px 0px 2px 6px;
padding: 1px 3px 0 8px;
background-color: #f4f4f5;
border-color: #e9e9eb;
color: #909399;
.group-item-multiple{
margin: 0 8px 0 0;
}
.el-icon-close{
color: #909399;
background-color: #c0c4cc;
border-radius: 50%;
top: 0;
}
.el-icon-close:hover{
color: #fff;
background-color: #909399;
}
}
}
.ibiz-group-open {
display: flex;
text-align: center;
align-items: center;
padding: 0 5px;
}
}
.ibiz-group-select:hover {
border-color: #108cee;
}
\ No newline at end of file
<template>
<div class="ibiz-group-select">
<div class="ibiz-group-content">
<span v-if="!multiple">
<span class="group-item-text" v-if="!multiple">
{{ selectName }}
</span>
<template v-else v-for="(select, index) of selects">
<div :key="index" class="ibiz-group-item">
{{ select.label }}
<span class="group-item-multiple">{{ select.label }}</span>
<i v-if="!disabled" class="el-icon-close" @click="remove(select)"></i>
</div>
</template>
</div>
<div v-if="!disabled" class="ibiz-group-open">
<i v-if="!disabled && !multiple && selects.length > 0" class="el-icon-close" @click="remove(selects[0])"></i>
<i class="el-icon-search" @click="openView"></i>
<i class="el-icon-search" @click="openView" style="color: #c0c4cc;"></i>
</div>
</div>
</template>
......@@ -147,9 +147,7 @@ export default class AppGroupSelect extends Vue {
if (newVal) {
let item: any = {};
item.label = this.data[this.name]?this.data[this.name].split(','):[];
if(this.valueitem) {
item.id = this.data[this.valueitem] ? this.data[this.valueitem].split(',') : [];
}
item.id = this.data[this.valueitem] ? this.data[this.valueitem].split(',') : [];
if(this.fillmap) {
for(let key in this.fillmap) {
item[this.fillmap[key]] = this.data[key] ? this.data[key].split(',') : [];
......@@ -219,7 +217,7 @@ export default class AppGroupSelect extends Vue {
treeurl:this.treeurl,
filtervalue: filtervalue,
multiple: this.multiple,
selects: this.selects
selects: this.selects,
});
let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => {
......@@ -330,32 +328,5 @@ export default class AppGroupSelect extends Vue {
</script>
<style lang="less">
.ibiz-group-select {
width: 100%;
display: flex;
border: 1px solid #DCDFE6;
min-height: 32px;
border-radius: 4px;
.ibiz-group-content {
flex-grow: 1;
padding: 0 16px;
.ibiz-group-item {
display: inline-block;
border: 1px solid #bbb;
line-height: 24px;
border-radius: 5px;
margin-right: 5px;
padding: 0 5px;
}
}
.ibiz-group-open {
display: flex;
text-align: center;
align-items: center;
padding: 0 5px;
}
}
.ibiz-group-select:hover {
border-color: #108cee;
}
@import './app-group-select.less';
</style>
\ No newline at end of file
<template>
<div class="app-header-menus">
<div class="app-header-menus" v-if="isShow">
<div v-for="(menu,index) in menus" :key="index" class="app-header-menu-item text" @click="openWindow(menu)">
<div class="app-header-menu-item-icon">
<i :class="menu.iconcls" :aria-hidden="true" />
......@@ -19,6 +19,14 @@ import { Environment } from '@/environments/environment';
})
export default class AppHeaderMenus extends Vue {
/**
* 是否显示
*
* @type {boolean}
* @memberof AppHeaderMenus
*/
public isShow:boolean = Environment.devMode;
/**
* 菜单数据
*
......@@ -41,7 +49,7 @@ export default class AppHeaderMenus extends Vue {
{
name: "ibizstudio",
title: "components.appHeaderMenus.ibizstudio.title",
url: `${Environment.StudioUrl}?#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview`,
url: `${Environment.StudioUrl}?#/common_mosindex/srfkeys=${Environment.SysId}`,
iconcls: 'fa fa-wrench',
},
{
......
.item {
height: 24px;
line-height: 24px;
padding: 0 5px 0 0;
}
.show-more {
......
......@@ -18,7 +18,7 @@
</el-col>
<el-col :span="21" class="column2" :draggable="false">
<el-row :draggable="false">
<el-col :span="16" :draggable="false">
<el-col :span="16" :draggable="false" style="width: 65%;">
<div class="process-definition-name" :draggable="false"><strong>{{myTask.processDefinitionName}}</strong></div>
<div class="description" :draggable="false">{{myTask.description}}</div>
<div class="createtime" :draggable="false">{{ formatDate(myTask.createTime, 'MM-DD hh:mm') }}</div>
......@@ -26,7 +26,7 @@
<el-col :span="5" :draggable="false" style='display: flex; align-items: center'>
<el-tag :type="myTask.name.indexOf('驳回')!=-1?'danger':(myTask.name.indexOf('成功')!=-1?'success':(myTask.name.indexOf('取消')!=-1?'info':'-'))"
size="small" @click="handleTag(myTask)"
style="cursor: pointer;" :draggable="false">
style="cursor: pointer;overflow: hidden;text-overflow: ellipsis;" :draggable="false">
{{myTask.name}}
</el-tag>
</el-col>
......@@ -52,7 +52,7 @@
</el-col>
<el-col :span="21" class="column2" :draggable="false">
<el-row :draggable="false">
<el-col :span="16" :draggable="false">
<el-col :span="16" :draggable="false" style="width: 65%;">
<div class="process-definition-name" :draggable="false"><strong>{{myMsg.processDefinitionName}}</strong></div>
<div class="description" :draggable="false">{{myMsg.description}}</div>
<div class="createtime" :draggable="false">{{ formatDate(myMsg.createTime, 'MM-DD hh:mm') }}</div>
......@@ -60,7 +60,7 @@
<el-col :span="5" :draggable="false" style='display: flex; align-items: center'>
<el-tag :type="myMsg.name.indexOf('驳回')!=-1?'danger':(myMsg.name.indexOf('成功')!=-1?'success':(myMsg.name.indexOf('取消')!=-1?'info':'-'))"
size="small" @click="handleTag(myMsg)"
style="cursor: pointer;" :draggable="false">
style="cursor: pointer;overflow: hidden;text-overflow: ellipsis;" :draggable="false">
{{myMsg.name}}
</el-tag>
</el-col>
......@@ -149,7 +149,7 @@
this.getMyMsgs();
}
}).catch((error: any) => {
this.$Notice.error({title: '错误', desc: error});
console.warn("加载数据错误");
})
}
......
......@@ -5,14 +5,14 @@
<i v-if=" item.iconcls && !Object.is(item.iconcls, '')" :class="item.iconcls"></i>
<img v-else-if="item.icon && !Object.is(item.icon, '')" :src="item.icon" />
<span class="app-quick-item-label">{{item.label}}</span>
<span v-show="isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename]" class="app-quick-item-counter">{{itemTag(item)}}</span>
<span v-show="isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename.toLowerCase()]" class="app-quick-item-counter">{{itemTag(item)}}</span>
</span>
<el-dropdown v-if="item.children" style="outline: none !important;" trigger="click" @command="handleCommand($event,item)">
<span :style="{color:item.color}" :class="{'app-seleted-item':isSelectedItem(item)}">
<i v-if=" item.iconcls && !Object.is(item.iconcls, '')" :class="item.iconcls"></i>
<img v-else-if="item.icon && !Object.is(item.icon, '')" :src="item.icon" />
<span class="app-quick-item-label">{{item.label}}</span>
<span v-show="isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename]" class="app-quick-item-counter">{{itemTag(item)}}</span>
<span v-show="isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename.toLowerCase()]" class="app-quick-item-counter">{{itemTag(item)}}</span>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="childitem in item.children" :command="childitem" :key="childitem.id">
......@@ -65,7 +65,6 @@ export default class AppQuickGroup extends Vue {
*/
get renderArray(){
if(this.items && this.items.length >0){
this.selectedUiItem = this.items[0];
this.handleClick(this.items[0]);
return this.handleDataSet(this.items)
}else{
......@@ -75,7 +74,7 @@ export default class AppQuickGroup extends Vue {
public itemTag(item:any){
if(this.counterService && this.counterService.counterData && item.codename){
return this.counterService.counterData[item.codename];
return this.counterService.counterData[item.codename.toLowerCase()];
}else{
return "";
}
......@@ -145,6 +144,9 @@ export default class AppQuickGroup extends Vue {
* @memberof AppQuickGroup
*/
public handleClick($event:any,isswitch:boolean = true){
if(this.selectedUiItem && (this.selectedUiItem.id === $event.id)){
return;
}
this.$emit('valuechange',$event);
if(isswitch){
this.selectedUiItem = $event;
......
......@@ -214,7 +214,8 @@ export default class AppSpan extends Vue {
this.text = Number(number.toFixed(this.precision)).toLocaleString('en-US')+ ' '+ this.unitName;
}else if(Object.is(this.dataType,"FLOAT") || Object.is(this.dataType,"DECIMAL")){
let number:any = Number(this.value);
this.text = number.toFixed(this.precision);
const decimalCnt:number = this.value.toString().split('.').length > 1 ? this.value.toString().split('.')[1].length : 0;
this.text = (Number(this.precision) === 0 && decimalCnt !== 0) ? number.toFixed(decimalCnt) : number.toFixed(this.precision);
}else {
this.text = this.value;
}
......
.app-theme{
width: auto !important;
padding: 0 5px;
/*** BRGIN:主题选择框样式 ***/
.app-app-theme {
.app-theme-color {
......
......@@ -48,6 +48,7 @@
<script lang = 'ts'>
import { Component, Vue } from 'vue-property-decorator';
import { appConfig } from '@/config/appConfig';
@Component({
})
......@@ -75,23 +76,7 @@ export default class AppTheme extends Vue {
* @type {Array<any>}
* @memberof AppTheme
*/
defaultThemes: Array<any> = [
{
tag: 'app-default-theme',
title: 'light',
color: '#f6f6f6',
},
{
title: 'Blue',
tag: 'app_theme_blue',
color: '#6ba1d1'
},
{
title: 'Dark Blue',
tag: 'app_theme_darkblue',
color: '#606d80'
}
];
defaultThemes: Array<any> = appConfig.themes;
/**
* 所选择的字体
......@@ -106,20 +91,7 @@ export default class AppTheme extends Vue {
*
* @memberof AppTheme
*/
public fontFamilys = [
{
label: 'MicrosoftYaHei',
value: 'Microsoft YaHei',
},
{
label: 'SimHei',
value: 'SimHei',
},
{
label: 'YouYuan',
value: 'YouYuan',
},
];
public fontFamilys = appConfig.fonts;
/**
* 挂载元素事件
......@@ -130,12 +102,12 @@ export default class AppTheme extends Vue {
if (localStorage.getItem('theme-class')) {
this.selectTheme = localStorage.getItem('theme-class');
} else {
this.selectTheme = 'app-default-theme';
this.selectTheme = appConfig.defaultTheme;
}
if (localStorage.getItem('font-family')) {
this.selectFont = localStorage.getItem('font-family');
} else {
this.selectFont = 'Microsoft YaHei';
this.selectFont = appConfig.defaultFont;
}
}
......@@ -146,7 +118,7 @@ export default class AppTheme extends Vue {
* @memberof AppTheme
*/
public themeChange(val: any) {
if (!Object.is(this.activeTheme, val)) {
if (!Object.is(this.selectTheme, val)) {
this.selectTheme = val;
localStorage.setItem('theme-class', val);
this.$router.app.$store.commit('setCurrentSelectTheme', val);
......
<template>
<div v-if="formOption!=null" class="app-custom-form">
<avue-form :option="formOption" v-model="formvalue"></avue-form>
</div>
</template>
<script lang="ts">
import {Vue,Component,Prop,Model,Emit,Watch,} from "vue-property-decorator";
import { Subject, Subscription } from "rxjs";
@Component({})
export default class AvueCustomForm extends Vue {
/**
* 编辑器参数传入组件配置
*
* @type {any}
* @memberof AvueCustomForm
*/
@Prop()
public options?: any;
/**
* 是否需要转换为string类型
*
* @type {boolean}
* @memberof AvueCustomForm
*/
@Prop()
public isParseString?: boolean;
/**
* 远端地址
*
* @type {string}
* @memberof AvueCustomForm
*/
@Prop() public url?: string;
/**
* 表单项值
*
* @type {any}
* @memberof AvueCustomForm
*/
@Prop() public value: any;
/**
* 是否将表单数据通过组件配置带入组件中
*
* @type {boolean}
* @memberof AvueCustomForm
*/
@Prop() public isFormData?: boolean;
/**
* 监听事件
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AvueCustomForm
*/
@Watch("value")
public onValueChange(newVal: any, oldVal: any) {
if (newVal) {
let obj: any = {};
if (newVal && newVal != null) {
if (this.isParseString) obj = JSON.parse(newVal);
else obj = newVal;
}
if (obj) this.formvalue = JSON.parse(JSON.stringify(obj));
}
}
/**
* 表单数据
*
* @type {any}
* @memberof AvueCustomForm
*/
@Prop()
public formData: any;
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof AvueCustomForm
*/
@Prop() public formState!: Subject<any>;
/**
* 视图状态事件
*
* @protected
* @type {(Subscription | undefined)}
* @memberof AvueCustomForm
*/
protected formStateEvent: Subscription | undefined;
/**
* 当前组件配置设置属性
*
* @type {any}
* @memberof AvueCustomForm
*/
public formOption: any = null;
/**
* avue-form绑定值
*
* @type {any}
* @memberof AvueCustomForm
*/
public formvalue: any = {};
/**
* avue-form默认配置
*
* @type {any}
* @memberof AvueCustomForm
*/
public defaultOptions: any = {
column: [
{
type: "dynamic",
label: "子表单",
span: 24,
display: true,
children: {
align: "center",
headerAlign: "center",
index: false,
addBtn: true,
delBtn: true,
column: [
{
type: "input",
label: "属性",
span: 24,
display: true,
prop: "property",
},
{
type: "input",
label: "值",
span: 24,
display: true,
prop: "value",
},
],
},
prop: "1599476281048_17916",
},
],
labelPosition: "left",
labelSuffix: ":",
labelWidth: 120,
gutter: 0,
menuBtn: false,
submitBtn: false,
submitText: "提交",
emptyBtn: false,
emptyText: "清空",
menuPosition: "center",
};
/**
* vue生命周期
*
* @memberof AvueCustomForm
*/
public mounted() {
let that: any = this;
if (this.formState) {
this.formStateEvent = this.formState.subscribe(({ type, data }) => {
if (Object.is("load", type)) that.load();
});
}
}
/**
* 加载表单配置,配置优先级,依次按优先级加载(表单项值 > 远端请求 > 默认值)
*
* @memberof AvueCustomForm
*/
public load() {
let that: any = this;
if (!this.options && this.options == null) {
if (this.url && this.options == null) {
const get: Promise<any> = this.$http.get(this.url);
get.then((response: any) => {
if (response && response.data && response.data.view_config) {
that.formOption = JSON.parse(response.data.view_config)[
"formConfig"
];
if (this.isFormData) that.getFormData();
}
});
} else {
this.formOption = this.defaultOptions;
if (this.isFormData) that.getFormData();
}
} else {
this.formOption = this.options;
if (this.isFormData) that.getFormData();
}
}
/**
* 当组件配置中的属性与表单属性重复时,表单值塞入组件中
*
* @memberof AvueCustomForm
*/
public getFormData() {
let that: any = this;
let obj: any;
if (this.value) obj = JSON.parse(JSON.stringify(this.value));
else obj = {};
let recursionOption: any = function (group: any) {
group.column.forEach((gItem: any) => {
if (group.column && group.column.length > 0) {
if (that.formData[gItem.prop])
obj[gItem.prop] = that.formData[gItem.prop];
}
});
if (group.group && group.group.length > 0)
group.group.forEach((gItem: any) => {
recursionOption(gItem);
});
};
recursionOption(this.formOption);
this.setValue(obj);
}
/**
* 设置表单值
*
* @param {*} value
* @memberof AvueCustomForm
*/
public setValue(value: any) {
if (this.isParseString) this.$emit("change", JSON.stringify(value));
else this.$emit("change", value);
}
}
</script>
\ No newline at end of file
......@@ -293,12 +293,13 @@ export default class ContextMenuDrag extends Vue {
mounted() {
let that: any = this;
const get: Promise<any> = this.entityService.getAllApp(null,{});
get
.then((response: any) => {
get.then((response: any) => {
if (response) {
that.list = response.data.model;
that.listFilter();
}
}).catch((error:any) =>{
console.warn("加载数据错误")
});
}
}
......
......@@ -92,6 +92,14 @@ export default class ContextMenu extends Vue {
*/
@Prop()
public menus?: any[]
/**
* 是否阻止默认绘制上下文菜单
*
* @type {any}
* @memberof ContextMenu
*/
@Prop({default:false})
public isBlocked?:any;
/**
* 显示右键菜单
......@@ -195,7 +203,10 @@ export default class ContextMenu extends Vue {
if (contextRef) {
contextRef.oncontextmenu = (event: MouseEvent) => {
event.preventDefault();
this.showContextMenu(event.clientX, event.clientY);
if(!this.isBlocked){
this.showContextMenu(event.clientX, event.clientY);
}
this.$emit("showContext",event);
};
}
}
......
......@@ -7,7 +7,7 @@
:clearable="true"
:filterable="filterable"
@on-open-change="onClick"
:placeholder="$t('components.dropDownListDynamic.placeholder')">
:placeholder="placeholder?placeholder:$t('components.dropDownListDynamic.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value">{{($t('userCustom.'+tag+'.'+item.value)!== ('userCustom.'+tag+'.'+item.value))?$t('userCustom.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
</template>
......
......@@ -11,7 +11,7 @@
:clearable="true"
:filterable="filterable"
@on-open-change="onClick"
:placeholder="$t('components.dropDownListMpicker.placeholder')">
:placeholder="placeholder?placeholder:$t('components.dropDownListMpicker.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value.toString()" :label="item.text">
<Checkbox :value = "(currentVal.indexOf(item.value.toString()))==-1?false:true">
{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}
......
......@@ -8,7 +8,7 @@
:clearable="true"
:filterable="filterable"
@on-open-change="onClick"
:placeholder="$t('components.dropDownList.placeholder')">
:placeholder="placeholder?placeholder:$t('components.dropDownList.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value">{{($t('codelist.'+tag+'.'+item.value)!== ('codelist.'+tag+'.'+item.value))?$t('codelist.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
<ibiz-select-tree v-if="hasChildren" class="tree-dropdown-list" :disabled="disabled" :NodesData="items" v-model="currentVal" :multiple="false"></ibiz-select-tree>
......
export const appConfig = {
//默认主题
defaultTheme: 'app-default-theme',
//默认字体
defaultFont: 'Microsoft YaHei',
//主题集合
themes: [
{
tag: 'app-default-theme',
title: 'light',
color: '#f6f6f6',
},
{
tag: 'app_theme_blue',
title: 'Blue',
color: '#6ba1d1'
},
{
tag: 'app_theme_darkblue',
title: 'Dark Blue',
color: '#606d80'
},
],
//字体集合
fonts: [
{
label: 'MicrosoftYaHei',
value: 'Microsoft YaHei',
},
{
label: 'SimHei',
value: 'SimHei',
},
{
label: 'YouYuan',
value: 'YouYuan',
},
]
}
\ No newline at end of file
import { Store } from 'vuex';
import EntityService from '@/service/entity-service';
/**
* 计数器服务基类
......@@ -16,6 +18,51 @@ export default class CounterService {
* @memberof CounterService
*/
private $store: Store<any> | null = null;
/**
* 当前计数器数据
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected counterData:any ={};
/**
* 应用实体数据服务
*
* @protected
* @type {EntityService}
* @memberof CounterService
*/
protected appEntityService:EntityService = new EntityService();
/**
* 当前计数器导航上下文
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected context:any ={};
/**
* 当前计数器导航参数
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected viewparams:any ={};
/**
* 当前计数器定时器对象
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected timer:any;
/**
* Creates an instance of CounterService.
......@@ -25,6 +72,8 @@ export default class CounterService {
*/
constructor(opts: any = {}) {
this.$store = opts.$store;
this.context = opts.context?opts.context:{};
this.viewparams = opts.viewparams?opts.viewparams:{};
}
/**
......@@ -49,5 +98,13 @@ export default class CounterService {
return (window as any)['counterServiceRegister'].getService(name);
}
/**
* 销毁计数器
*
* @memberof ActionCounterCounterServiceBase
*/
public destroyCounter(){
if(this.timer) clearInterval(this.timer);
}
}
\ No newline at end of file
......@@ -144,6 +144,9 @@ export default class MDViewEngine extends ViewEngine {
if (Object.is(eventName, 'beforeload')) {
this.MDCtrlBeforeLoad(args)
}
if (Object.is(eventName, 'remove')) {
this.MDCtrlRemove(args)
}
}
/**
......@@ -454,5 +457,13 @@ export default class MDViewEngine extends ViewEngine {
return this.getMDCtrl().transformData(arg);
}
/**
* 多数据部件删除后
*
* @param {*} [arg={}]
* @memberof MDViewEngine
*/
public MDCtrlRemove(arg: any = {}): void {
this.view.$emit('drdatasremove', arg);
}
}
\ No newline at end of file
......@@ -186,39 +186,37 @@ export default class ViewEngine {
* @memberof ViewEngine
*/
public calcToolbarItemAuthState(data:any){
if(Environment.enablePermissionValid){
const _this: any = this;
for (const key in _this.view.toolBarModels) {
if (!_this.view.toolBarModels.hasOwnProperty(key)) {
return;
}
const _item = _this.view.toolBarModels[key];
if(_item && _item['dataaccaction'] && _this.view.appUIService){
let dataActionResult:any;
if (_item.uiaction && (Object.is(_item.uiaction.target, 'NONE'))){
dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
const _this: any = this;
for (const key in _this.view.toolBarModels) {
if (!_this.view.toolBarModels.hasOwnProperty(key)) {
return;
}
const _item = _this.view.toolBarModels[key];
if(_item && _item['dataaccaction'] && _this.view.appUIService){
let dataActionResult:any;
if (_item.uiaction && (Object.is(_item.uiaction.target, 'NONE'))){
dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_this.view.toolBarModels[key].disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_this.view.toolBarModels[key].visabled = false;
}else{
_this.view.toolBarModels[key].visabled = true;
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_this.view.toolBarModels[key].disabled = true;
}
if(dataActionResult === 1){
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_this.view.toolBarModels[key].visabled = false;
}else{
_this.view.toolBarModels[key].visabled = true;
_this.view.toolBarModels[key].disabled = false;
}
}
if(dataActionResult === 1){
_this.view.toolBarModels[key].visabled = true;
_this.view.toolBarModels[key].disabled = false;
}
}
}
}
......
......@@ -49,6 +49,7 @@ export default class WFDynaExpGridViewEngine extends GridViewEngine {
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'grid')) {
this.GridEvent(eventName, args);
return;
}
super.onCtrlEvent(ctrlName, eventName, args);
}
......
......@@ -15,6 +15,8 @@ export const Environment = {
ExportFile: '/ibizutil/download',
// 文件上传
UploadFile: '/ibizutil/upload',
// 数据导入单次上传最大数量
sliceUploadCnt: 100,
// 是否为pc端应用
isAppMode:true,
//统一地址
......
......@@ -24,7 +24,10 @@ export default {
deleteError: "Failed to delete",
delDataFail: "Failed to delete data",
noData: "No data",
startsuccess:"Start successful"
startsuccess:"Start successful",
loadmore:"Load more",
nomore:"No more",
other:"other"
},
local:{
new: "New",
......@@ -38,6 +41,8 @@ export default {
totle: "totle",
noData: "No data",
valueVail: "Value cannot be empty",
group:"Group",
other:"Other",
notConfig: {
fetchAction: "The view table fetchaction parameter is not configured",
removeAction: "The view table removeaction parameter is not configured",
......
......@@ -24,7 +24,10 @@ export default {
deleteError: "删除失败",
delDataFail: "删除数据失败",
noData: "暂无数据",
startsuccess:"启动成功"
startsuccess:"启动成功",
loadmore:"加载更多",
nomore:"没有更多了",
other:"其他"
},
local:{
new: "新建",
......@@ -38,6 +41,8 @@ export default {
totle: "共",
noData: "无数据",
valueVail: "值不能为空",
group:"分组",
other:"其他",
notConfig: {
fetchAction: "视图表格fetchAction参数未配置",
removeAction: "视图表格removeAction参数未配置",
......
......@@ -328,5 +328,48 @@ export default {
appMessagePopover: {
loadMore: 'Load more',
noMore: 'No more'
},
diskFileUpload:{
fileDrag: 'Drag the file here, or',
clickUpload: 'Click on the upload',
load: 'Load',
preview: 'preview',
edit: 'Edit',
delete: 'Delete',
clues: 'Individual file sizes do not exceed',
clues1: 'Documents not exceeding',
getFileFailure: 'Failed to get file list',
loadFailure: 'Upload file failed',
loadFailure1: 'Upload failed, individual file cannot exceed',
downloadFile: 'Download file failed',
downloadFile1: 'Download file failed, not get file!',
deleteFile: 'This action will permanently delete the file. Do you want to continue?',
deleteFilePrompt: 'Prompt',
true: 'True',
false: 'False',
deleteFileFailure: 'File deletion failed',
updateFailure: 'Batch update file failed',
},
diskImageUpload:{
preview: 'Preview',
OCRdiscern: 'OCRdiscern',
load: 'Load',
delete: 'Delete',
getImageFailure: 'Failed to get list of images',
loadImageFailure: 'Failed to download thumbnails',
loadImageFailure1: 'Failed to download thumbnail, failed to get file!',
loadImageFailure2:'Download image failed',
loadImageFailure3:'Download picture failed, no picture found!',
ImageIdNone: 'Picture ID does not exist!',
uploadImageFailure: 'Failed to upload image',
uploadImageFailure1: "Upload failed, only support 'GIF, JPG, PNG, BMP' format images!",
uploadFailure: 'Upload failed, individual image must not exceed',
notImageUrl: 'The image URL does not exist',
deleteFile: 'This action will permanently delete the file. Do you want to continue?',
deleteFilePrompt: 'Prompt',
true: 'True',
false: 'False',
deleteImageFailure:'Image deletion failed',
updateFailure: 'Batch update file failed',
}
};
\ No newline at end of file
......@@ -329,5 +329,48 @@ export default {
appMessagePopover: {
loadMore: '加载更多',
noMore: '没有更多了'
},
diskFileUpload:{
fileDrag: '将文件拖到此处,或',
clickUpload: '点击上传',
load: '下载',
preview: '预览',
edit: '编辑',
delete: '删除',
clues: '单个文件大小不超过',
clues1: '文件不超过',
getFileFailure: '获取文件列表失败',
loadFailure: '上传文件失败',
loadFailure1: '上传失败,单个文件不得超过',
downloadFile: '下载文件失败',
downloadFile1: '下载文件失败,未获取到文件!',
deleteFile: '此操作将永久删除该文件, 是否继续?',
deleteFilePrompt: '提示',
true: '确定',
false: '取消',
deleteFileFailure: '删除文件失败',
updateFailure: '批量更新文件失败',
},
diskImageUpload:{
preview: '预览',
OCRdiscern: 'ORC识别',
load: '下载',
delete: '删除',
getImageFailure: '获取图片列表失败',
loadImageFailure: '下载缩略图失败',
loadImageFailure1: '下载缩略图失败,未获取到文件!',
loadImageFailure2:'下载图片失败',
loadImageFailure3:'下载图片失败,未找到图片!',
ImageIdNone: '图片id不存在!',
uploadImageFailure: '上传图片失败',
uploadImageFailure1: '上传失败,仅支持'gif,jpg,png,bmp'格式的图片!',
uploadFailure: '上传失败,单个图片不得超过',
notImageUrl: '图片url不存在',
deleteFile: '此操作将永久删除该文件, 是否继续?',
deleteFilePrompt: '提示',
true: '确定',
false: '取消',
deleteImageFailure:'删除图片失败',
updateFailure: '批量更新文件失败',
}
};
\ No newline at end of file
......@@ -33,6 +33,7 @@ mock.onGet('/appdata').reply((config: any) => {
// 当前用户条线代码
srfsectorbc:""
},
enablepermissionvalid:false,
unires:["RESOURCE1","RESOURCE2"],
//当前用户所有组织部门标识
srforgsections:[{"srforgsectorid":"5bd1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目一部"},{"srforgsectorid":"2ad1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目二部"}]
......
......@@ -63,6 +63,7 @@
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
......@@ -71,21 +72,14 @@ import { Subject,Subscription } from 'rxjs';
import { appConfig } from '@/config/appConfig';
@Component({
components: {
},
})
export default class PayIndexViewBase extends Vue {
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayIndexViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -197,6 +191,8 @@ export default class PayIndexViewBase extends Vue {
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh() && Object.is(_this.$util.typeOf(_this.refresh()), 'function')) {
_this.refresh();
}
}
......@@ -288,6 +284,15 @@ export default class PayIndexViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayIndexViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......@@ -575,7 +580,7 @@ export default class PayIndexViewBase extends Vue {
} else if (localStorage.getItem('theme-class')) {
return localStorage.getItem('theme-class');
} else {
return 'app-default-theme';
return appConfig.defaultTheme;
}
}
......@@ -591,7 +596,7 @@ export default class PayIndexViewBase extends Vue {
} else if (localStorage.getItem('font-family')) {
return localStorage.getItem('font-family');
} else {
return 'Microsoft YaHei';
return appConfig.defaultFont;
}
}
......@@ -644,12 +649,8 @@ export default class PayIndexViewBase extends Vue {
* @type {string[]}
* @memberof PayIndexViewBase
*/
get themeClasses(): string[] {
return [
Object.is(this.selectTheme, 'app_theme_blue') ? 'app_theme_blue' : '',
Object.is(this.selectTheme, 'app-default-theme') ? 'app-default-theme' : '',
Object.is(this.selectTheme, 'app_theme_darkblue') ? 'app_theme_darkblue' : '',
];
get themeClasses(): string {
return this.selectTheme;
}
/**
......
......@@ -152,15 +152,6 @@ export default class PayOpenAccessEditViewBase extends Vue {
* @memberof PayOpenAccessEditViewBase
*/
public appUIService: PayOpenAccessUIService = new PayOpenAccessUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayOpenAccessEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -280,6 +271,8 @@ export default class PayOpenAccessEditViewBase extends Vue {
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh() && Object.is(_this.$util.typeOf(_this.refresh()), 'function')) {
_this.refresh();
}
}
......@@ -424,6 +417,15 @@ export default class PayOpenAccessEditViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayOpenAccessEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......@@ -1555,6 +1557,14 @@ export default class PayOpenAccessEditViewBase extends Vue {
this.serviceStateEvent.unsubscribe();
}
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
this.counterServiceArray.forEach((item:any) =>{
if(item.destroyCounter && item.destroyCounter instanceof Function){
item.destroyCounter();
}
})
}
}
......
......@@ -182,15 +182,6 @@ export default class PayOpenAccessGridViewBase extends Vue {
* @memberof PayOpenAccessGridViewBase
*/
public appUIService: PayOpenAccessUIService = new PayOpenAccessUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayOpenAccessGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -310,6 +301,8 @@ export default class PayOpenAccessGridViewBase extends Vue {
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh() && Object.is(_this.$util.typeOf(_this.refresh()), 'function')) {
_this.refresh();
}
}
......@@ -459,6 +452,15 @@ export default class PayOpenAccessGridViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayOpenAccessGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......@@ -1578,6 +1580,14 @@ export default class PayOpenAccessGridViewBase extends Vue {
this.serviceStateEvent.unsubscribe();
}
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
this.counterServiceArray.forEach((item:any) =>{
if(item.destroyCounter && item.destroyCounter instanceof Function){
item.destroyCounter();
}
})
}
}
/**
......
......@@ -79,15 +79,6 @@ export default class PayOpenAccessPickupGridViewBase extends Vue {
* @memberof PayOpenAccessPickupGridViewBase
*/
public appUIService: PayOpenAccessUIService = new PayOpenAccessUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayOpenAccessPickupGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -207,6 +198,8 @@ export default class PayOpenAccessPickupGridViewBase extends Vue {
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh() && Object.is(_this.$util.typeOf(_this.refresh()), 'function')) {
_this.refresh();
}
}
......@@ -314,6 +307,15 @@ export default class PayOpenAccessPickupGridViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayOpenAccessPickupGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......@@ -661,6 +663,14 @@ export default class PayOpenAccessPickupGridViewBase extends Vue {
this.serviceStateEvent.unsubscribe();
}
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
this.counterServiceArray.forEach((item:any) =>{
if(item.destroyCounter && item.destroyCounter instanceof Function){
item.destroyCounter();
}
})
}
}
/**
* 选中数据字符串
......
......@@ -64,15 +64,6 @@ export default class PayOpenAccessPickupViewBase extends Vue {
* @memberof PayOpenAccessPickupViewBase
*/
public appUIService: PayOpenAccessUIService = new PayOpenAccessUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayOpenAccessPickupViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -195,6 +186,8 @@ export default class PayOpenAccessPickupViewBase extends Vue {
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh() && Object.is(_this.$util.typeOf(_this.refresh()), 'function')) {
_this.refresh();
}
}
......@@ -307,6 +300,15 @@ export default class PayOpenAccessPickupViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayOpenAccessPickupViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......@@ -609,6 +611,14 @@ export default class PayOpenAccessPickupViewBase extends Vue {
this.serviceStateEvent.unsubscribe();
}
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
this.counterServiceArray.forEach((item:any) =>{
if(item.destroyCounter && item.destroyCounter instanceof Function){
item.destroyCounter();
}
})
}
}
/**
* 选中数据的字符串
......
......@@ -152,15 +152,6 @@ export default class PayTradeEditViewBase extends Vue {
* @memberof PayTradeEditViewBase
*/
public appUIService: PayTradeUIService = new PayTradeUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayTradeEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -280,6 +271,8 @@ export default class PayTradeEditViewBase extends Vue {
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh() && Object.is(_this.$util.typeOf(_this.refresh()), 'function')) {
_this.refresh();
}
}
......@@ -424,6 +417,15 @@ export default class PayTradeEditViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayTradeEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......@@ -1555,6 +1557,14 @@ export default class PayTradeEditViewBase extends Vue {
this.serviceStateEvent.unsubscribe();
}
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
this.counterServiceArray.forEach((item:any) =>{
if(item.destroyCounter && item.destroyCounter instanceof Function){
item.destroyCounter();
}
})
}
}
......
......@@ -182,15 +182,6 @@ export default class PayTradeGridViewBase extends Vue {
* @memberof PayTradeGridViewBase
*/
public appUIService: PayTradeUIService = new PayTradeUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayTradeGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -310,6 +301,8 @@ export default class PayTradeGridViewBase extends Vue {
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh() && Object.is(_this.$util.typeOf(_this.refresh()), 'function')) {
_this.refresh();
}
}
......@@ -459,6 +452,15 @@ export default class PayTradeGridViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PayTradeGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......@@ -1578,6 +1580,14 @@ export default class PayTradeGridViewBase extends Vue {
this.serviceStateEvent.unsubscribe();
}
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
this.counterServiceArray.forEach((item:any) =>{
if(item.destroyCounter && item.destroyCounter instanceof Function){
item.destroyCounter();
}
})
}
}
/**
......
/**
* 获取部门成员
*
* @param state
*/
export const getDepartmentPersonnel = (state: any) => () => {
return state.departmentPersonnel;
}
/**
* 获取代码表对象
*
......
import { Environment } from '@/environments/environment';
/**
* 添加部门成员
*
* @param state
* @param codelists
*/
export const addDepartmentPersonnel = (state: any, departmentPersonnel: Array<any>) => {
state.departmentPersonnel = [];
state.departmentPersonnel = [...departmentPersonnel];
}
/**
* 添加代码表
*
......@@ -101,7 +112,7 @@ export const addPage = (state: any, arg: any) => {
// 视图类型为REDIRECTVIEW和NOTAB的视图不添加缓存
if(Object.is(arg.meta.viewType, 'REDIRECTVIEW') || Object.is(arg.meta.viewType, 'NOTAB')){
return;
}else if(Object.is(arg.meta.viewType, 'APPINDEX')) {
}else if (Object.is(arg.meta.viewType, 'APPINDEX')) {
window.sessionStorage.setItem(Environment.AppName, arg.fullPath);
} else {
const page: any = {};
......
......@@ -7,6 +7,7 @@ export const rootstate: any = {
pageMetas: [],
historyPathList: [],
codelists: [],
departmentPersonnel:[],
selectTheme: '',
selectFont: '',
appdata: '',
......
......@@ -580,7 +580,7 @@ export default class PayIndexViewBase extends Vue implements ControlInterface {
* @memberof PayIndexViewBase
*/
public handleMenusResource(inputMenus:Array<any>){
if(Environment.enablePermissionValid){
if(this.$store.getters['authresource/getEnablePermissionValid']){
this.computedEffectiveMenus(inputMenus);
this.computeParentMenus(inputMenus);
}
......
......@@ -498,7 +498,7 @@ export default class MainBase extends Vue implements ControlInterface {
public saveState:any ;
/**
* 属性值规则
* 值规则
*
* @type {*}
* @memberof MainBase
......@@ -1215,20 +1215,18 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public computeButtonState(data:any){
if(Environment.enablePermissionValid){
let targetData:any = this.transformData(data);
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
let targetData:any = this.transformData(data);
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
}
......
......@@ -116,7 +116,61 @@
}
}
}
.cell-indeterminate {
>div>label {
>span {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:before {
content: "";
position: absolute;
display: block;
background-color: #fff;
height: 2px;
transform: scale(.5);
left: 0;
right: 0;
top: 5px;
}
}
>span.is-checked {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:after {
border: 0px;
}
}
}
}
.cell-select-all {
>div>label {
>span {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:after {
box-sizing: content-box;
content: "";
border: 1px solid #fff;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
position: absolute;
top: 1px;
transform: rotate(45deg) scaleY(1);
width: 3px;
transition: transform .15s ease-in .05s;
transform-origin: center;
}
}
}
}
// this is less
......@@ -255,7 +255,7 @@ export default class PickupViewpickupviewpanelBase extends Vue implements Contro
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item['name'];
let srfmajortext = item.srfmajortext?item.srfmajortext:item['name'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
......
......@@ -468,7 +468,7 @@ export default class MainBase extends Vue implements ControlInterface {
public saveState:any ;
/**
* 属性值规则
* 值规则
*
* @type {*}
* @memberof MainBase
......@@ -1143,20 +1143,18 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public computeButtonState(data:any){
if(Environment.enablePermissionValid){
let targetData:any = this.transformData(data);
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
let targetData:any = this.transformData(data);
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
}
......
......@@ -116,7 +116,61 @@
}
}
}
.cell-indeterminate {
>div>label {
>span {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:before {
content: "";
position: absolute;
display: block;
background-color: #fff;
height: 2px;
transform: scale(.5);
left: 0;
right: 0;
top: 5px;
}
}
>span.is-checked {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:after {
border: 0px;
}
}
}
}
.cell-select-all {
>div>label {
>span {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:after {
box-sizing: content-box;
content: "";
border: 1px solid #fff;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
position: absolute;
top: 1px;
transform: rotate(45deg) scaleY(1);
width: 3px;
transition: transform .15s ease-in .05s;
transform-origin: center;
}
}
}
}
// this is less
......@@ -22,6 +22,7 @@ import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import cn.ibizlab.util.errors.BadRequestAlertException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.pay.domain.PayOpenAccess;
......@@ -35,6 +36,7 @@ import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.pay.mapper.PayOpenAccessMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
......@@ -62,6 +64,7 @@ public class PayOpenAccessServiceImpl extends ServiceImpl<PayOpenAccessMapper, P
}
@Override
@Transactional
public void createBatch(List<PayOpenAccess> list) {
this.saveBatch(list,batchSize);
}
......@@ -69,13 +72,14 @@ public class PayOpenAccessServiceImpl extends ServiceImpl<PayOpenAccessMapper, P
@Override
@Transactional
public boolean update(PayOpenAccess et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("accessid",et.getId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("accessid",et.getId())))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
@Override
@Transactional
public void updateBatch(List<PayOpenAccess> list) {
updateBatchById(list,batchSize);
}
......@@ -88,6 +92,7 @@ public class PayOpenAccessServiceImpl extends ServiceImpl<PayOpenAccessMapper, P
}
@Override
@Transactional
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
......@@ -133,12 +138,14 @@ public class PayOpenAccessServiceImpl extends ServiceImpl<PayOpenAccessMapper, P
}
@Override
@Transactional
public boolean saveBatch(Collection<PayOpenAccess> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<PayOpenAccess> list) {
saveOrUpdateBatch(list,batchSize);
}
......@@ -185,6 +192,7 @@ public class PayOpenAccessServiceImpl extends ServiceImpl<PayOpenAccessMapper, P
}
}
......
......@@ -22,6 +22,7 @@ import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import cn.ibizlab.util.errors.BadRequestAlertException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.pay.domain.PayTrade;
......@@ -35,6 +36,7 @@ import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.pay.mapper.PayTradeMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
......@@ -63,6 +65,7 @@ public class PayTradeServiceImpl extends ServiceImpl<PayTradeMapper, PayTrade> i
}
@Override
@Transactional
public void createBatch(List<PayTrade> list) {
list.forEach(item->fillParentData(item));
this.saveOrUpdateBatch(list,batchSize);
......@@ -72,13 +75,14 @@ public class PayTradeServiceImpl extends ServiceImpl<PayTradeMapper, PayTrade> i
@Transactional
public boolean update(PayTrade et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("tradeid",et.getTradeId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("tradeid",et.getTradeId())))
return false;
CachedBeanCopier.copy(get(et.getTradeId()),et);
return true;
}
@Override
@Transactional
public void updateBatch(List<PayTrade> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
......@@ -92,6 +96,7 @@ public class PayTradeServiceImpl extends ServiceImpl<PayTradeMapper, PayTrade> i
}
@Override
@Transactional
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
......@@ -138,6 +143,7 @@ public class PayTradeServiceImpl extends ServiceImpl<PayTradeMapper, PayTrade> i
}
@Override
@Transactional
public boolean saveBatch(Collection<PayTrade> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
......@@ -145,6 +151,7 @@ public class PayTradeServiceImpl extends ServiceImpl<PayTradeMapper, PayTrade> i
}
@Override
@Transactional
public void saveBatch(List<PayTrade> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
......@@ -219,6 +226,7 @@ public class PayTradeServiceImpl extends ServiceImpl<PayTradeMapper, PayTrade> i
}
}
......
......@@ -16,7 +16,7 @@
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="PayOpenAccessResultMap" type="cn.ibizlab.core.pay.domain.PayOpenAccess" autoMapping="true">
<id property="id" column="accessid" /><!--主键字段映射-->
<id property="id" column="accessid" /><!--主键字段映射-->
<result property="name" column="accessname" />
<result property="openType" column="open_type" />
<result property="accessKey" column="access_key" />
......
......@@ -16,7 +16,7 @@
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="PayTradeResultMap" type="cn.ibizlab.core.pay.domain.PayTrade" autoMapping="true">
<id property="tradeId" column="tradeid" /><!--主键字段映射-->
<id property="tradeId" column="tradeid" /><!--主键字段映射-->
<result property="accessId" column="accessid" />
......
......@@ -12,6 +12,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
......@@ -30,6 +33,7 @@ public class PayOpenAccessDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "id")
@JsonProperty("id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String id;
/**
......@@ -38,6 +42,7 @@ public class PayOpenAccessDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "name")
@JsonProperty("name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String name;
/**
......@@ -46,6 +51,7 @@ public class PayOpenAccessDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "open_type")
@JsonProperty("open_type")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String openType;
/**
......@@ -54,6 +60,7 @@ public class PayOpenAccessDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "access_key")
@JsonProperty("access_key")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String accessKey;
/**
......@@ -62,6 +69,7 @@ public class PayOpenAccessDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "secret_key")
@JsonProperty("secret_key")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String secretKey;
/**
......@@ -70,6 +78,7 @@ public class PayOpenAccessDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "region_id")
@JsonProperty("region_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String regionId;
/**
......@@ -78,6 +87,7 @@ public class PayOpenAccessDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "access_token")
@JsonProperty("access_token")
@Size(min = 0, max = 1000, message = "内容长度必须小于等于[1000]")
private String accessToken;
/**
......@@ -103,6 +113,7 @@ public class PayOpenAccessDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "redirect_uri")
@JsonProperty("redirect_uri")
@Size(min = 0, max = 500, message = "内容长度必须小于等于[500]")
private String redirectUri;
/**
......@@ -111,6 +122,7 @@ public class PayOpenAccessDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "notify_url")
@JsonProperty("notify_url")
@Size(min = 0, max = 500, message = "内容长度必须小于等于[500]")
private String notifyUrl;
......@@ -197,3 +209,4 @@ public class PayOpenAccessDTO extends DTOBase implements Serializable {
}
......@@ -12,6 +12,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
......@@ -30,6 +33,7 @@ public class PayTradeDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "subject")
@JsonProperty("subject")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String subject;
/**
......@@ -38,6 +42,7 @@ public class PayTradeDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "total_amount")
@JsonProperty("total_amount")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String totalAmount;
/**
......@@ -46,6 +51,7 @@ public class PayTradeDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "trade_name")
@JsonProperty("trade_name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String tradeName;
/**
......@@ -54,6 +60,7 @@ public class PayTradeDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "trade_type")
@JsonProperty("trade_type")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String tradeType;
/**
......@@ -62,6 +69,7 @@ public class PayTradeDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "trade_status")
@JsonProperty("trade_status")
@Size(min = 0, max = 60, message = "内容长度必须小于等于[60]")
private String tradeStatus;
/**
......@@ -70,6 +78,7 @@ public class PayTradeDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "out_trade_no")
@JsonProperty("out_trade_no")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String outTradeNo;
/**
......@@ -78,6 +87,7 @@ public class PayTradeDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "trade_id")
@JsonProperty("trade_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String tradeId;
/**
......@@ -86,6 +96,7 @@ public class PayTradeDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "app_id")
@JsonProperty("app_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String appId;
/**
......@@ -94,6 +105,7 @@ public class PayTradeDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "access_name")
@JsonProperty("access_name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String accessName;
/**
......@@ -102,6 +114,7 @@ public class PayTradeDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "access_id")
@JsonProperty("access_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String accessId;
......@@ -180,3 +193,4 @@ public class PayTradeDTO extends DTOBase implements Serializable {
}
......@@ -22,6 +22,7 @@ import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
......@@ -49,7 +50,7 @@ public class PayOpenAccessResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzpay-PayOpenAccess-Create-all')")
@ApiOperation(value = "新建支付平台", tags = {"支付平台" }, notes = "新建支付平台")
@RequestMapping(method = RequestMethod.POST, value = "/payopenaccesses")
public ResponseEntity<PayOpenAccessDTO> create(@RequestBody PayOpenAccessDTO payopenaccessdto) {
public ResponseEntity<PayOpenAccessDTO> create(@Validated @RequestBody PayOpenAccessDTO payopenaccessdto) {
PayOpenAccess domain = payopenaccessMapping.toDomain(payopenaccessdto);
payopenaccessService.create(domain);
PayOpenAccessDTO dto = payopenaccessMapping.toDto(domain);
......
......@@ -22,6 +22,7 @@ import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
......@@ -49,7 +50,7 @@ public class PayTradeResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzpay-PayTrade-Create-all')")
@ApiOperation(value = "新建支付交易1", tags = {"支付交易1" }, notes = "新建支付交易1")
@RequestMapping(method = RequestMethod.POST, value = "/paytrades")
public ResponseEntity<PayTradeDTO> create(@RequestBody PayTradeDTO paytradedto) {
public ResponseEntity<PayTradeDTO> create(@Validated @RequestBody PayTradeDTO paytradedto) {
PayTrade domain = paytradeMapping.toDomain(paytradedto);
paytradeService.create(domain);
PayTradeDTO dto = paytradeMapping.toDto(domain);
......
......@@ -213,7 +213,7 @@ public class DEFieldDefaultValueAspect
private void fillPreFieldValue(String fieldname , DEPredefinedFieldType preFieldType ,EntityBase et , String actionName,String logicValue ,AuthenticationUser curUser) throws Exception {
Object fieldValue = et.get(fieldname);
//为预置属性进行赋值
if( actionName.equalsIgnoreCase("create")||
if( actionName.toLowerCase().startsWith("create") ||
preFieldType== DEPredefinedFieldType.UPDATEDATE|| preFieldType== DEPredefinedFieldType.UPDATEMAN||
preFieldType== DEPredefinedFieldType.UPDATEMANNAME){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册