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

ibiz4j 发布系统代码

上级 62664c75
## v7.0.0-alpha.16 [2020-8-2]
### Bug修复
修复表格聚合异常
修复文本框精度问题
修复属性值规则常规规则异常
修复应用菜单标题重复问题
修复界面行为异常问题
修复下拉选组件代码表类型和属性进行不匹配问题
### 功能新增及优化
#### 模板
新增应用数据看板视图(卡片样式)、实体数据看板视图(卡片样式)
优化拷贝功能
优化临时模式新建置空父键
优化实体行为执行后逻辑
优化操作栏触发界面行为逻辑
优化实体主状态
#### 基础文件
优化数值框数值位置
优化应用语言选择组件和应用组织部门信息呈现组件
优化无数据主键界面行为逻辑
## v7.0.0-alpha.15 [2020-7-23]
### Bug修复
修复修复数值框错误问题
修复表单通知关系界面上下文、表单数据先后顺序
修复实体行为执行前、后逻辑增加行为逻辑者判断
修复表单loadDraft清空表单临时主键
修复数据图表月份显示问题
修复首页横向菜单呈现
修复树视图部件国际化问题
### 功能新增及优化
#### 模板
新增表单属性值规则(正则式规则、数值范围规则、字符长度规则、常规规则、系统值规则、规则组)支持
新增数据选择、自动填充编辑器自填模式排序
新增表单传入关系界面临时模式
新增数据选择编辑器自填模式界面行为组(662)
新增向导添加数据
优化向导面板成功提示、忽略版本检查
优化导航类部件选中事件
优化表格操作列分隔符问题
优化表单准备工作流数据,填充未存库数据
#### 基础文件
修复数值框firstElementChild异常问题
修复图表视图无搜索表单加载数据问题
修复表格视图标题问题
更新view-design组件库的版本,修复面板分割组件
优化关系界面内嵌表格视图先行通知,再保存表单逻辑
优化部门选择、组织选择编辑器的样式
优化导入文件逻辑
新增关系界面增加无临时数据模式判断
新增数据选择、自动填充编辑器自填模式排序
新增数据选择编辑器自填模式界面行为组(662)
## v7.0.0-alpha.14 [2020-7-18]
### Bug修复
......
......@@ -35,7 +35,7 @@
"qs": "^6.9.1",
"rxjs": "^6.5.4",
"tinymce": "4.8.5",
"view-design": "^4.1.0",
"view-design": "4.2.0",
"vue": "^2.6.10",
"vue-class-component": "^7.0.2",
"vue-grid-layout": "^2.3.7",
......
......@@ -2,9 +2,9 @@
<div class="app-actionbar">
<div class="app-actionbar-item" v-for="(item,index) in items" :key="index">
<Badge v-if="item.counterService&&item.counterService.counterData" v-show="item.visabled" :count="item.counterService.counterData[item.counterId]" type="primary">
<i-button :style="{'pointer-events':item.disabled?'none':'auto'}" @click="handleClick(item.viewlogicname)"><i v-if="item.icon" style="margin-right: 5px;" :class="item.icon"></i>{{item.actionName}}</i-button>
<i-button :style="{'pointer-events':item.disabled?'none':'auto'}" @click="handleClick(item, $event)"><i v-if="item.icon" style="margin-right: 5px;" :class="item.icon"></i>{{item.actionName}}</i-button>
</Badge>
<i-button v-show="item.visabled" :style="{'pointer-events':item.disabled?'none':'auto'}" v-else @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button>
<i-button v-show="item.visabled" :style="{'pointer-events':item.disabled?'none':'auto'}" v-else @click="handleClick(item, $event)">{{item.actionName}}</i-button>
</div>
</div>
</template>
......@@ -49,6 +49,14 @@ export default class AppActionBar extends Vue {
*/
public viewStateEvent: Subscription | undefined;
/**
* 部件数据
*
* @type {*}
* @memberof AppActionBar
*/
public data: any;
/**
* 组件初始化
*
......@@ -61,6 +69,7 @@ export default class AppActionBar extends Vue {
return;
}
if(Object.is(action,'loadmodel')){
this.data = data;
this.calcActionItemAuthState(data,this.items,this.uiService);
}
});
......@@ -72,8 +81,13 @@ export default class AppActionBar extends Vue {
*
* @memberof AppActionBar
*/
public handleClick($event:any){
this.$emit('itemClick',$event);
public handleClick(item: any, $event:any){
let _data = {
tag : item.viewlogicname,
params : this.data,
event : $event
};
this.$emit('itemClick',_data);
}
/**
......
<template>
<div class="appAddressSelection">
<el-cascader
style="width:100%"
:disabled="disabled"
size ="medium"
v-model="CurrentVal"
......@@ -14,6 +15,7 @@ import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import axios from 'axios';
import { cityCode } from './city_code'
@Component({})
export default class AppAddressSelection extends Vue {
......@@ -63,12 +65,7 @@ export default class AppAddressSelection extends Vue {
* @memberof AppAddressSelection
*/
public getcity() {
axios.get("../../assets/json/city_code.json").then((response: any) => {
this.format(response.data);
}).catch((response: any) => {
console.log((this.$t('components.appAddressSelection.loadDataFail') as string));
});
this.format(cityCode);
}
/**
......@@ -86,11 +83,11 @@ export default class AppAddressSelection extends Vue {
* @memberof AppAddressSelection
*/
public format(data :any) {
let data1 = JSON.parse(JSON.stringify(data).replace(/city/g, 'children'))
let data2 = JSON.parse(JSON.stringify(data1).replace(/name/g, 'label'))
let data3 = JSON.parse(JSON.stringify(data2).replace(/area/g, 'children'))
let data4 = JSON.parse(JSON.stringify(data3).replace(/code/g, 'value'))
this.city = data4;
let town = JSON.parse(JSON.stringify(data).replace(/city/g, 'children'))
let county = JSON.parse(JSON.stringify(town).replace(/name/g, 'label'))
let city = JSON.parse(JSON.stringify(county).replace(/area/g, 'children'))
let province = JSON.parse(JSON.stringify(city).replace(/code/g, 'value'))
this.city = province;
}
}
......
......@@ -7,6 +7,7 @@
size='small'
:trigger-on-focus="true"
:fetch-suggestions="onSearch"
:sort="sort"
@select="onACSelect"
@input="onInput"
@blur="onBlur"
......@@ -123,6 +124,15 @@ export default class AppAutocomplete extends Vue {
*/
@Prop() public valueitem?: string;
/**
* 排序
*
* @type {string}
* @memberof AppAutocomplete
*/
@Prop() public sort?: string;
/**
* 值
*
......@@ -196,6 +206,9 @@ export default class AppAutocomplete extends Vue {
query = '';
}
this.inputState = false;
if(this.sort && !Object.is(this.sort, "")) {
Object.assign(_param, { sort: this.sort });
}
Object.assign(_param, { query: query });
// 错误信息国际化
let error: string = (this.$t('components.appAutocomplete.error') as any);
......
......@@ -30,6 +30,22 @@ export default class AppColumnLink extends Vue {
*/
@Prop() public linkview?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localParam!:any;
/**
* 值项名称
*
......@@ -281,6 +297,15 @@ export default class AppColumnLink extends Vue {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
return true;
}
......
<template>
<div class="app-data-upload-view">
<el-row :gutter="20">
<el-row style="margin-top:24px" :gutter="20">
<el-col :span="4">
<el-button type="primary" @click="handleUpLoad">{{$t('components.appDataUploadView.selectfile')}}</el-button>
<input ref="inputUpLoad" type="file" style="display: none" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" @change="importFile"/>
......@@ -13,12 +13,12 @@
</el-col>
</el-row>
<el-divider></el-divider>
<el-row style="height:calc(100% - 128px);padding: 0px 12px;">
<el-row style="height:480px;padding: 0px 12px;">
<div class="data-info-content" >
<template v-if="importDataArray.length >0 && isUploading === false">
<ul>
<li v-for="(item,index) in importDataArray" :key="index" class="font-class">
{{$t('components.appDataUploadView.dataid')+item[importUniqueItem]+$t('components.appDataUploadView.read')+'......'}}
{{item[importUniqueItem]?$t('components.appDataUploadView.dataid')+item[importUniqueItem]+$t('components.appDataUploadView.read')+'......':$t('components.appDataUploadView.read')+'......'}}
</li>
</ul>
</template>
......@@ -285,7 +285,7 @@ export default class AppDataUploadView extends Vue {
this.importDataArray = [];
try{
this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{
service.ImportData(this.viewdata,{name:this.importId,data:tempDataArray}).then((res:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:tempDataArray}).then((res:any) =>{
const result:any = res.data;
if(result && result.rst !== 0){
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -295,6 +295,10 @@ export default class AppDataUploadView extends Vue {
this.importSuccessData = result.data;
this.promptInfo = (this.$t('components.appDataUploadView.completed') as string);
this.isUploading = false;
}).catch((error:any) =>{
this.isUploading = false;
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
console.error(error);
})
}).catch((error:any) =>{
this.isUploading = false;
......
.ivu-dropdown{
.ivu-dropdown-rel{
.tree-input{
.ivu-input-suffix{
width: auto;
text-align: right;
.icon-arrow{
margin-right: 4px;
.app-department-select{
.ivu-dropdown{
.ivu-dropdown-rel{
.tree-input{
.ivu-input-suffix{
width: auto;
text-align: right;
.icon-arrow{
margin-right: 4px;
}
}
.el-icon-circle-close{
display: none;
}
}
.el-icon-circle-close{
display: none;
.tree-input:hover{
.el-icon-circle-close{
display: inline-block;
}
}
}
.tree-input:hover{
.el-icon-circle-close{
display: inline-block;
.ivu-select-dropdown{
max-height: 200px;
overflow: scroll;
.tree-contant{
overflow:inherit;
}
}
}
.ivu-select-dropdown{
max-height: 200px;
overflow: scroll;
.tree-contant{
overflow:inherit;
}
.el-input__inner{
height: 32px;
line-height: 32px
}
.el-input__icon{
line-height: 32px;
}
}
......@@ -6,12 +6,16 @@
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
@viewdataschange="setValue(args)"
@viewdataschange="setValue($event)"
style="height:100%;">
</component>
</div>
<template v-if="placeholder">
<div v-if="value" class="app-embed-value">{{value}}</div>
<div v-if="value" class="app-embed-value">
<span v-for="(item,index) in value" :key="index">
{{item}}
</span>
</div>
<div v-else class="app-embed-placeholder">{{placeholder}}</div>
</template>
</div>
......@@ -174,8 +178,8 @@ export default class AppEmbedPicker extends Vue {
}
let arg: any = {};
// 合并视图上下文参数和视图参数
let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context));
arg.param = JSON.parse(JSON.stringify(this.viewparams));
arg.context = JSON.parse(JSON.stringify(this.context));
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
......@@ -185,8 +189,8 @@ export default class AppEmbedPicker extends Vue {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
this.viewdata = JSON.stringify(context);
this.viewparam = JSON.stringify(param);
this.viewdata = JSON.stringify(arg.context);
this.viewparam = JSON.stringify(arg.param);
}
/**
......@@ -243,11 +247,21 @@ export default class AppEmbedPicker extends Vue {
* @memberof AppEmbedPicker
*/
public setValue(item: any) {
if (this.valueItem) {
this.$emit('formitemvaluechange', { name: this.valueItem, value: item[0].srfkey });
}
if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: item[0].srfmajortext });
let selectsrfkey: Array<any> = [];
let selectsrfmajortext: Array<any> = [];
if(item && Array.isArray(item)){
item.forEach((select: any)=>{
selectsrfkey.push(select.srfkey);
selectsrfmajortext.push(select.srfmajortext);
})
if (this.valueItem) {
let value = selectsrfkey.length > 0 ? selectsrfkey : '';
this.$emit('formitemvaluechange', { name: this.valueItem, value: value });
}
if (this.name) {
let value = selectsrfmajortext.length > 0 ? selectsrfmajortext : '';
this.$emit('formitemvaluechange', { name: this.name, value: value });
}
}
}
......
......@@ -291,6 +291,7 @@ export default class AppFormDRUIPart extends Vue {
let _param:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localParam);
Object.assign(tempParam,_param);
}
if(this.viewparams.hasOwnProperty('copymode')) Object.assign(tempParam,{copymode:this.viewparams.copymode});
this.viewparam = JSON.stringify(tempParam);
if (this.isRelationalData) {
// 从数据模式无遮罩层
......@@ -332,21 +333,22 @@ export default class AppFormDRUIPart extends Vue {
}
// 表单保存之前
if (Object.is($event.type, 'beforesave')) {
if(Object.is(this.refviewtype,'DEMEDITVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW')){
// 从数据模式直接通知保存
if(this.tempMode && Object.is(this.tempMode,"2")){
this.formDruipart.next({action:'save',data:$event.data});
}else{
if($event.data && !Object.is($event.data.srfuf,"0")){
this.formDruipart.next({action:'save',data:$event.data});
}else{
this.$emit('drdatasaved',$event);
}
}
} else {
// 不需要保存的界面也要抛出事件,供计数器计算
this.$emit('drdatasaved',$event);
// 支持嵌入视图类型:嵌入视图本身抛drdatasaved的视图,如:DEMEDITVIEW9,DEGRIDVIEW9,DEGRIDVIEW等
// 从数据模式直接通知保存
// 临时补充,todo
if(Object.is(this.refviewtype,'DEMEDITVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW')){
if(this.tempMode && Object.is(this.tempMode,"2")){
this.formDruipart.next({action:'save',data:$event.data});
}else{
if($event.data && !Object.is($event.data.srfuf,"0")){
this.formDruipart.next({action:'save',data:$event.data});
}else{
this.$emit('drdatasaved',$event);
}
}
}else{
this.$emit('drdatasaved',$event);
}
}
// 表单保存完成
if (Object.is($event.type, 'save')) {
......
<template>
<dropdown trigger='click' @on-click="selectLang">
<dropdown v-if="localList.length > 1" trigger='click' @on-click="selectLang">
<span>
{{title}}
<icon size='18' type='md-arrow-dropdown'></icon>
......
......@@ -2,7 +2,7 @@
<div class="app-menu-item">
<template v-for="item in menus">
<template v-if="item.items && Array.isArray(item.items) && item.items.length > 0">
<el-submenu v-show="!item.hidden" :index="item.name" :popper-class="popperClass" :key="item.id">
<el-submenu :class="[{'isCollpase' : appMenuCollapseFlag},item.textcls]" v-show="!item.hidden" :index="item.name" :popper-class="popperClass" :key="item.id">
<template slot='title'>
<template v-if="item.icon && item.icon != ''">
<img :src="item.icon" class='app-menu-icon' />
......@@ -13,25 +13,28 @@
<template v-else>
<i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i>
</template>
<span class='text' :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<span ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template>
<app-menu-item :menus="item.items" :ctrlName="ctrlName" :isFirst="false" :counterdata="counterdata" :popperclass="popperClass"></app-menu-item>
<app-menu-item :isCollapse="isCollapse" :menus="item.items" :ctrlName="ctrlName" :isFirst="false" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item>
</el-submenu>
</template>
<template v-else>
<template v-if="item.type =='MENUITEM'">
<el-menu-item v-show="!item.hidden" :index="item.name" :key="item.id">
<el-menu-item :class="[{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id">
<template v-if="item.icon && item.icon != ''">
<img :src="item.icon" class='app-menu-icon' />
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template>
<template v-else-if="item.iconcls && item.iconcls != ''">
<i :class="[item.iconcls, 'app-menu-icon']"></i>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template>
<template v-else>
<i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template>
<template slot="title">
<span class="text" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<span :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<template v-if="counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item.counterid]" :overflow-count="9999"></badge>
......@@ -94,5 +97,47 @@ export default class AppMenuItem extends Vue {
*/
@Prop() public isFirst!: boolean;
/**
* 菜单是否缩进
*
* @type {*}
* @memberof AppMenuItem
*/
@Prop() public isCollapse!: boolean;
/**
* 菜单缩进,元素类名标记
*
* @type {*}
* @memberof AppMenuItem
*/
public appMenuCollapseFlag: boolean = false;
/**
* vue 生命周期
*
* @memberof AppIndexViewBase
*/
public mounted() {
this.onCollapsechangeChange();
}
/**
* 根据菜单缩进状态修改菜单项值
*/
onCollapsechangeChange() {
if(this.isCollapse && this.isFirst) {
this.appMenuCollapseFlag = true;
let appMenuCircle: any[] = this.$refs.circleText as any[];
if(appMenuCircle) {
appMenuCircle.forEach((item: any) => {
let text: string = (item.innerText as string).slice(0,1);
item.innerText = text;
})
}
}
}
}
</script>
\ No newline at end of file
.app-org-select {
width: 100%;
.el-input__inner{
height: 32px !important;
line-height: 32px !important;
}
.el-input__icon{
line-height: 32px;
}
}
\ No newline at end of file
......@@ -65,14 +65,36 @@ export default class AppOrgSector extends Vue {
* @memberof AppOrgSector
*/
public mounted() {
this.getData();
}
/**
* 获取数据
*
* @memberof AppOrgSector
*/
public getData(){
if (this.$store.getters.getAppData()) {
if (this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srforgsectorid && this.$store.getters.getAppData().context.srforgsectorname) {
let _context = this.$store.getters.getAppData().context;
let _srforgname = this.$store.getters.getAppData().context.srforgname;
let _srforgsectorname = this.$store.getters.getAppData().context.srforgsectorname;
if (_context && this.$store.getters.getAppData().context.srforgsectorid ){
this.selectedOrgId = this.$store.getters.getAppData().context.srforgsectorid;
this.selectedOrgName = this.$store.getters.getAppData().context.srforgsectorname;
} else {
return false;
}
if(_context && _srforgname && _srforgsectorname){
this.selectedOrgName = _srforgname + '-' + _srforgsectorname;
} else if (_context && _srforgname) {
this.selectedOrgName = _srforgname;
} else if (_context && _srforgsectorname) {
this.selectedOrgName = _srforgsectorname;
}
if (this.$store.getters.getAppData().srforgsections) {
this.selectedOrgArray = this.$store.getters.getAppData().srforgsections;
}
}
}
......
......@@ -8,14 +8,17 @@
:trigger-on-focus="true" :fetch-suggestions="(query, callback) => { this.onSearch(query, callback, true) }" @select="onACSelect"
@input="onInput" @blur="onBlur" style='width:100%;'>
<template v-slot:default="{item}">
<template v-if="item.isNew">
<!-- <template v-if="item.isNew">
<div v-if="linkview" @click="newAndEdit">{{$t('components.appPicker.newAndEdit')}}</div>
</template> -->
<template v-if="item.tag">
<div @click="clickAction(item.tag)">{{item.caption}}</div>
</template>
<slot v-else name="default" :item="item"></slot>
</template>
<template v-slot:suffix>
<i v-if="curvalue && !disabled" class='el-icon-circle-close' @click="onClear"></i>
<i v-if="!Object.is(editortype, 'ac')" class='el-icon-search' @click="openView"></i>
<i v-if="!Object.is(editortype, 'ac') && showButton" class='el-icon-search' @click="openView"></i>
<icon v-if="linkview" type="ios-open-outline" @click="openLinkView"/>
</template>
</el-autocomplete>
......@@ -37,7 +40,10 @@
@change="onSelect" :disabled="disabled" style='width:100%;' clearable
@clear="onClear" @visible-change="onSelectOpen">
<template v-if="items">
<el-option v-for="_item in items" :key="_item[deKeyField]" :value="_item[deKeyField]" :label="_item[deMajorField]" :disabled="_item.disabled"></el-option>
<template v-for="_item in items">
<el-option v-if="!_item.tag" :key="_item[deKeyField]" :value="_item[deKeyField]" :label="_item[deMajorField]" :disabled="_item.disabled"></el-option>
<el-option v-else :key="_item[deKeyField]" value="action"><span @click="clickAction(_item.tag)" style="float: left; width: 100%;">{{ _item.caption }}</span></el-option>
</template>
</template>
</el-select>
<span style='position: absolute;right: 5px;color: #c0c4cc;top:0;font-size: 13px;'>
......@@ -55,7 +61,6 @@ import { AppModal } from '@/utils';
@Component({
})
export default class AppPicker extends Vue {
/**
* 视图上下文
*
......@@ -128,6 +133,14 @@ export default class AppPicker extends Vue {
*/
@Prop() public disabled?: boolean;
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof AppPicker
*/
@Prop({default:true}) public showButton?: boolean;
/**
* 类型
*
......@@ -184,6 +197,14 @@ export default class AppPicker extends Vue {
*/
@Prop() public sort?: string;
/**
* 行为组
*
* @type {Array<any>}
* @memberof AppPicker
*/
@Prop() public actionDetails?:Array<any>;
/**
* 值
......@@ -274,9 +295,6 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public created() {
if(Object.is(this.editortype, 'dropdown')){
this.onSearch("", null, true);
}
if(!Object.is(this.editortype, 'pickup-no-ac') && !Object.is(this.editortype, 'dropdown')){
this.curvalue = this.value;
}
......@@ -332,7 +350,7 @@ export default class AppPicker extends Vue {
if(this.sort && !Object.is(this.sort, "")) {
Object.assign(_param, { sort: this.sort });
}
Object.assign(_param, { query: query });
Object.assign(_param, { query: query, size: 1000 });
// 错误信息国际化
let error: string = (this.$t('components.appPicker.error') as any);
let miss: string = (this.$t('components.appPicker.miss') as any);
......@@ -350,8 +368,11 @@ export default class AppPicker extends Vue {
} else {
this.items = [...response];
}
if(this.acParams && this.linkview){
this.items.push({ isNew :true });
// if(this.acParams && this.linkview){
// this.items.push({ isNew :true });
// }
if(this.acParams && this.actionDetails && this.actionDetails.length >0){
this.items = [...this.items,...this.actionDetails];
}
if (callback) {
callback(this.items);
......@@ -681,6 +702,17 @@ export default class AppPicker extends Vue {
return true;
}
/**
* 触发界面行为
*
* @param {*} arg
* @returns
* @memberof AppPicker
*/
public clickAction(arg:any){
this.$emit('editoractionclick',arg);
}
/**
* 创建并编辑
*
......
......@@ -72,7 +72,7 @@ export default class AppRichTextEditor extends Vue {
* @type {string}
* @memberof AppRichTextEditor
*/
public uploadUrl = Environment.BaseUrl + Environment.UploadFile;
public uploadUrl = Environment.UploadFile;
/**
* 下载路径
......
......@@ -92,7 +92,7 @@ export default class AppUser extends Vue {
* @memberof AppUser
*/
public logout() {
const get: Promise<any> = this.$http.get('v7/logout');
const get: Promise<any> = this.$http.get('/v7/logout');
get.then((response:any) =>{
if (response && response.status === 200) {
localStorage.removeItem('user');
......
......@@ -123,6 +123,12 @@ export default class DropDownListDynamic extends Vue {
*/
@Prop() public placeholder?: string;
/**
* 属性类型
* @type {string}
* @memberof DropDownList
*/
@Prop() public valueType?: string;
/**
* 计算属性(当前值)
......@@ -199,9 +205,10 @@ export default class DropDownListDynamic extends Vue {
if(this.tag && Object.is(this.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
this.items = [...JSON.parse(JSON.stringify(codelist.items))];
let items: Array<any> = [...JSON.parse(JSON.stringify(codelist.items))];
this.formatCodeList(items);
} else {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${this.tag}----代码表不存在`);
}
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
// 公共参数处理
......@@ -211,9 +218,10 @@ export default class DropDownListDynamic extends Vue {
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
let items: Array<any> = [...res];
this.formatCodeList(items);
}).catch((error:any) => {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${this.tag}----代码表不存在`);
});
}
}
......@@ -234,14 +242,51 @@ export default class DropDownListDynamic extends Vue {
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
let items: Array<any> = [...res];
this.formatCodeList(items);
}).catch((error:any) => {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${this.tag}----代码表不存在`);
});
}
}
}
/**
* 代码表类型和属性匹配
*
* @param {*} items
* @memberof DropDownList
*/
public formatCodeList(items: Array<any>){
let matching: boolean = true;
this.items = [];
try{
if(this.valueType){
items.forEach((item: any)=>{
const type = this.$util.typeOf(item.value);
if(type != this.valueType){
matching = false;
if(type == 'number'){
item.value = item.value.toString();
}else{
if(item.value.indexOf('.') == -1){
item.value = parseInt(item.value);
}else{
item.value = parseFloat(item.value);
}
}
}
this.items.push(item);
});
if(!matching){
console.warn(`代码表 ${ this.tag } 值类型和属性类型不匹配,已自动强制转换,请修正代码表值类型和属性类型匹配`);
}
}else{
this.items = items;
}
}catch(error){
console.warn('代码表值类型和属性类型不匹配,自动强制转换异常,请修正代码表值类型和属性类型匹配');
}
}
}
</script>
......
......@@ -185,7 +185,7 @@ export default class DropDownListMpicker extends Vue {
if(this.tag && Object.is(this.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
this.items = [...JSON.parse(JSON.stringify(codelist.items))];
this.items = [...JSON.parse(JSON.stringify(codelist.items))];
} else {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
}
......@@ -197,7 +197,7 @@ export default class DropDownListMpicker extends Vue {
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
});
......@@ -225,7 +225,6 @@ export default class DropDownListMpicker extends Vue {
});
}
}
}
</script>
......
......@@ -8,7 +8,7 @@
:filterable="filterable === true ? true : false"
@on-open-change="onClick"
:placeholder="$t('components.dropDownList.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value.toString()">{{($t('codelist.'+tag+'.'+item.value)!== ('codelist.'+tag+'.'+item.value))?$t('codelist.'+tag+'.'+item.value) : item.text}}</i-option>
<i-option v-for="(item, index) in items" :key="index" :value="item.value">{{($t('codelist.'+tag+'.'+item.value)!== ('codelist.'+tag+'.'+item.value))?$t('codelist.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
</template>
......@@ -116,7 +116,7 @@ export default class DropDownList extends Vue {
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 是否禁用
* @type {any}
......@@ -139,6 +139,12 @@ export default class DropDownList extends Vue {
*/
@Prop() public placeholder?: string;
/**
* 属性类型
* @type {string}
* @memberof DropDownList
*/
@Prop() public valueType?: string;
/**
* 计算属性(当前值)
......@@ -157,7 +163,7 @@ export default class DropDownList extends Vue {
* @memberof DropDownList
*/
get currentVal() {
return this.itemValue ? this.itemValue.toString() : undefined;
return this.itemValue;
}
/**
......@@ -199,9 +205,10 @@ export default class DropDownList extends Vue {
if(this.tag && Object.is(this.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
this.items = [...JSON.parse(JSON.stringify(codelist.items))];
let items: Array<any> = [...JSON.parse(JSON.stringify(codelist.items))];
this.formatCodeList(items);
} else {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${this.tag}----代码表不存在`);
}
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
// 公共参数处理
......@@ -211,9 +218,10 @@ export default class DropDownList extends Vue {
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
let items: Array<any> = [...res];
this.formatCodeList(items);
}).catch((error:any) => {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${this.tag}----代码表不存在`);
});
}
}
......@@ -234,14 +242,52 @@ export default class DropDownList extends Vue {
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
let items: Array<any> = [...res];
this.formatCodeList(items);
}).catch((error:any) => {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${this.tag}----代码表不存在`);
});
}
}
}
/**
* 代码表类型和属性匹配
*
* @param {*} items
* @memberof DropDownList
*/
public formatCodeList(items: Array<any>){
let matching: boolean = true;
this.items = [];
try{
if(this.valueType){
items.forEach((item: any)=>{
const type = this.$util.typeOf(item.value);
if(type != this.valueType){
matching = false;
if(type == 'number'){
item.value = item.value.toString();
}else{
if(item.value.indexOf('.') == -1){
item.value = parseInt(item.value);
}else{
item.value = parseFloat(item.value);
}
}
}
this.items.push(item);
});
if(!matching){
console.warn(`代码表 ${ this.tag } 值类型和属性类型不匹配,已自动强制转换,请修正代码表值类型和属性类型匹配`);
}
}else{
this.items = items;
}
}catch(error){
console.warn('代码表值类型和属性类型不匹配,自动强制转换异常,请修正代码表值类型和属性类型匹配');
}
}
}
</script>
......
......@@ -9,7 +9,7 @@
width: 100%;
}
.ivu-input-number-input{
text-align: right;
text-align: left;
}
.ivu-input-number-input:hover{
padding-right:22px;
......
......@@ -175,15 +175,18 @@ export default class InputBox extends Vue {
*/
public addEvent(){
if(Object.is(this.type, "number")){
let inputNumber :any = document.getElementById(this.numberId);
let handlerWrap :any = inputNumber.firstElementChild;
handlerWrap.onmouseover=()=>{
inputNumber.style.paddingRight="15px";
inputNumber.style.transition="all 0.2s linear";
}
handlerWrap.onmouseout=()=>{
inputNumber.style.paddingRight="0px";
}
// 整个页面渲染完之后再去执行
this.$nextTick(() => {
let inputNumber :any = document.getElementById(this.numberId);
let handlerWrap :any = inputNumber.firstElementChild;
handlerWrap.onmouseover=()=>{
inputNumber.style.paddingRight="15px";
inputNumber.style.transition="all 0.2s linear";
}
handlerWrap.onmouseout=()=>{
inputNumber.style.paddingRight="0px";
}
});
}
}
......
......@@ -175,7 +175,7 @@ export default class Login extends Vue {
const loginname: any = this.form.loginname;
const password: any = this.form.password;
const post: Promise<any> = this.$http.post('v7/login', this.form, true);
const post: Promise<any> = this.$http.post('/v7/login', this.form, true);
post.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
......
......@@ -36,7 +36,15 @@ export default class ChartViewEngine extends SearchViewEngine {
* @memberof ChartViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
if (this.getSearchForm()) {
const tag = this.getSearchForm().name;
this.setViewState2({ tag: tag, action: 'loaddraft', viewdata: this.view.viewparams });
}else if(this.getChart() && this.isLoadDefault) {
const tag = this.getChart().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: {} });
} else {
this.isLoadDefault = true;
}
}
/**
......
......@@ -70,17 +70,14 @@ export default class DataViewEngine extends MDViewEngine {
* @memberof DataViewEngine
*/
public doRemove(): void {
let selectedData = this.getMDCtrl() && this.getMDCtrl().getSelection();
if (!selectedData || selectedData == null || selectedData.length === 0) {
return;
}
let dataInfo = '';
selectedData.forEach((record: any, index: number) => {
let srfmajortext = record.srfmajortext;
if (index < 5) {
let srfmajortext = record.srfmajortext;
if (index < 5) {
if (!Object.is(dataInfo, '')) {
dataInfo += '、';
}
......@@ -88,18 +85,13 @@ export default class DataViewEngine extends MDViewEngine {
} else {
return false;
}
});
if (selectedData.length < 5) {
dataInfo = dataInfo + '共' + selectedData.length + '条数据';
} else {
dataInfo = dataInfo + '...' + '共' + selectedData.length + '条数据';
}
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
// 询问框
this.view.$Modal.confirm({
title:'警告',
......@@ -107,9 +99,7 @@ export default class DataViewEngine extends MDViewEngine {
onOk:() => {
this.removeData(null);
},
onCancel: () => {
}
onCancel: () => {}
});
}
......@@ -124,15 +114,6 @@ export default class DataViewEngine extends MDViewEngine {
if (!arg) {
arg = {};
}
// if (this.getParentMode()) {
// Object.assign(arg, this.getParentMode());
// }
// if (this.getParentData()) {
// Object.assign(arg, this.getParentData());
// }
if (!arg.srfkeys) {
// 获取要删除的数据集合
const selectedData: Array<any> = this.getMDCtrl() && this.getMDCtrl().getSelection();
......
......@@ -198,7 +198,8 @@ export default class EditViewEngine extends ViewEngine {
if(index !== -1){
viewdata.srfTitle = viewdata.srfTitle.substr(0,index);
}
if(this.view.$tabPageExp){
// 解决表格视图标题问题
if(this.view.$tabPageExp && this.view.viewDefaultUsage){
this.view.$tabPageExp.setCurPageCaption(this.view.$t(viewdata.srfTitle), this.view.$t(viewdata.srfTitle), info);
}
if(this.view.$route){
......
......@@ -123,15 +123,6 @@ export default class ListViewEngine extends MDViewEngine {
if (!arg) {
arg = {};
}
// if (this.getParentMode()) {
// Object.assign(arg, this.getParentMode());
// }
// if (this.getParentData()) {
// Object.assign(arg, this.getParentData());
// }
if (!arg.srfkeys) {
// 获取要删除的数据集合
const selectedData: Array<any> = this.getMDCtrl() && this.getMDCtrl().getSelection();
......
......@@ -6,15 +6,15 @@ export const Environment = {
// 应用 title
AppTitle: '字典',
// 应用基础路径
BaseUrl: '../',
BaseUrl: '',
// 系统名称
SysName: 'ibzdict',
// 远程登录地址,本地开发调试使用
RemoteLogin: 'ibizutil/login',
RemoteLogin: '/ibizutil/login',
// 文件导出
ExportFile: 'ibizutil/download',
ExportFile: '/ibizutil/download',
// 文件上传
UploadFile: 'ibizutil/upload',
UploadFile: '/ibizutil/upload',
// 是否为pc端应用
isAppMode:true,
//统一地址
......
......@@ -24,6 +24,7 @@ export default {
deleteError: "Failed to delete",
delDataFail: "Failed to delete data",
noData: "No data",
startsuccess:"Start successful"
},
local:{
new: "New",
......
......@@ -20,10 +20,11 @@ export default {
rulesException: "值规则校验异常",
saveSuccess: "保存成功",
saveFailed: "保存失败",
deleteSuccess: "删除成功",
deleteError: "删除失败",
deleteSuccess: "删除成功",
deleteError: "删除失败",
delDataFail: "删除数据失败",
noData: "暂无数据",
startsuccess:"启动成功"
},
local:{
new: "新建",
......
......@@ -378,7 +378,7 @@ export default class AppIndexViewBase extends Vue {
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()]){
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
......@@ -386,7 +386,7 @@ export default class AppIndexViewBase extends Vue {
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()]){
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
......
......@@ -15,6 +15,12 @@
overflow: hidden;
color:#303133;
background-color: #fff;
.app-horizontal-layout{
.view-container{
height: calc(100% - 32px);
margin: 12px;
}
}
.index_header{
height:65px;
padding:0 20px;
......
......@@ -522,7 +522,7 @@ export default class DictCatalogEditViewBase extends Vue {
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()]){
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
......@@ -530,7 +530,7 @@ export default class DictCatalogEditViewBase extends Vue {
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()]){
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
......@@ -1340,20 +1340,16 @@ export default class DictCatalogEditViewBase extends Vue {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { dictcatalog: args[0].dictcatalog });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -547,7 +547,7 @@ export default class DictCatalogGridViewBase extends Vue {
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()]){
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
......@@ -555,7 +555,7 @@ export default class DictCatalogGridViewBase extends Vue {
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()]){
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
......@@ -1206,7 +1206,7 @@ export default class DictCatalogGridViewBase extends Vue {
* @param {*} [xData]
* @memberof DictCatalogGridView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
public opendata(args: any[],fullargs?:any,params?: any, $event?: any, xData?: any) {
if(!this.viewDefaultUsage){
if(Object.is(this.navModel,"route")){
this.initNavDataWithRoute(this.viewCacheData, false, true);
......@@ -1227,6 +1227,9 @@ export default class DictCatalogGridViewBase extends Vue {
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
......@@ -1323,20 +1326,16 @@ export default class DictCatalogGridViewBase extends Vue {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { dictcatalog: args[0].dictcatalog });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -412,7 +412,7 @@ export default class DictCatalogPickupGridViewBase extends Vue {
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()]){
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
......@@ -420,7 +420,7 @@ export default class DictCatalogPickupGridViewBase extends Vue {
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()]){
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
......
......@@ -405,7 +405,7 @@ export default class DictCatalogPickupViewBase extends Vue {
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()]){
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
......@@ -413,7 +413,7 @@ export default class DictCatalogPickupViewBase extends Vue {
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()]){
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
......
......@@ -436,7 +436,7 @@ export default class DictOptionEditViewBase extends Vue {
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()]){
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
......@@ -444,7 +444,7 @@ export default class DictOptionEditViewBase extends Vue {
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()]){
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
......
......@@ -534,7 +534,7 @@ export default class DictOptionGridEditViewBase extends Vue {
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()]){
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
......@@ -542,7 +542,7 @@ export default class DictOptionGridEditViewBase extends Vue {
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()]){
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
......@@ -1179,7 +1179,7 @@ export default class DictOptionGridEditViewBase extends Vue {
* @param {*} [xData]
* @memberof DictOptionGridEditView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
public opendata(args: any[],fullargs?:any,params?: any, $event?: any, xData?: any) {
if(!this.viewDefaultUsage){
if(Object.is(this.navModel,"route")){
this.initNavDataWithRoute(this.viewCacheData, false, true);
......@@ -1204,6 +1204,9 @@ export default class DictOptionGridEditViewBase extends Vue {
{ pathName: 'dictoptions', parameterName: 'dictoption' },
];
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
......@@ -1315,20 +1318,16 @@ export default class DictOptionGridEditViewBase extends Vue {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { dictoption: args[0].dictoption });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -534,7 +534,7 @@ export default class DictOptionGridViewBase extends Vue {
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()]){
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
......@@ -542,7 +542,7 @@ export default class DictOptionGridViewBase extends Vue {
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()]){
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
......@@ -1179,7 +1179,7 @@ export default class DictOptionGridViewBase extends Vue {
* @param {*} [xData]
* @memberof DictOptionGridView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
public opendata(args: any[],fullargs?:any,params?: any, $event?: any, xData?: any) {
if(!this.viewDefaultUsage){
if(Object.is(this.navModel,"route")){
this.initNavDataWithRoute(this.viewCacheData, false, true);
......@@ -1204,6 +1204,9 @@ export default class DictOptionGridViewBase extends Vue {
{ pathName: 'dictoptions', parameterName: 'dictoption' },
];
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
......@@ -1315,20 +1318,16 @@ export default class DictOptionGridViewBase extends Vue {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { dictoption: args[0].dictoption });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
import { Store } from 'vuex';
import { Http } from '@/utils';
import CodeListService from "@service/app/codelist-service";
/**
* 实体服务基类
......@@ -115,6 +116,34 @@ export default class EntityService {
return this.$store;
}
/**
* 获取代码表
*
* @memberof EntityService
*/
public getCodeList(tag:string,codelistType:string,context:any = {},param:any ={}){
return new Promise((resolve:any,reject:any) =>{
if(tag && Object.is(codelistType,"STATIC")){
let returnItems:Array<any> = [];
const codelist = (this.getStore() as Store<any>).getters.getCodeList(tag);
if (codelist) {
returnItems = [...JSON.parse(JSON.stringify(codelist.items))];
} else {
console.log(`----${tag}----代码表不存在`);
}
resolve(returnItems);
}else if(tag && Object.is(codelistType,"DYNAMIC")){
let codeListService = new CodeListService({ $store: this.$store });
codeListService.getItems(tag,context,param).then((res:any) => {
resolve(res);
}).catch((error:any) => {
reject(`${tag}代码表不存在`);
console.log(`----${tag}----代码表不存在`);
});
}
})
}
/**
* 初始化基础数据
*
......@@ -174,6 +203,7 @@ export default class EntityService {
if(context.srfsessionkey && !Object.is(this.tempStorage.getItem(context.srfsessionkey+'_'+this.APPDENAME),'undefined')){
let tempData:any = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_'+this.APPDENAME) as any);
data.srffrontuf = "0";
data[this.APPDEKEY] = null;
tempData.push(data);
this.tempStorage.setItem(context.srfsessionkey+'_'+this.APPDENAME,JSON.stringify(tempData));
return {"status":200,"data":data};
......@@ -581,7 +611,9 @@ export default class EntityService {
* @memberof EntityService
*/
public async ImportData(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/${this.APPDENAME}/import`,data,isloading);
let _data:Array<any> = [];
if (data && data.importData) _data = data.importData;
return Http.getInstance().post(`/${this.APPDENAME}/import?config=${data.name}`,_data,isloading);
}
/**
......@@ -931,7 +963,7 @@ export default class EntityService {
* @param isloading
*/
public async getAllApp(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`uaa/access-center/app-switcher/default`,data,isloading);
return Http.getInstance().get(`/uaa/access-center/app-switcher/default`,data,isloading);
}
/**
......@@ -942,7 +974,7 @@ export default class EntityService {
* @param isloading
*/
public async updateChooseApp(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().put(`uaa/access-center/app-switcher/default`,data,isloading);
return Http.getInstance().put(`/uaa/access-center/app-switcher/default`,data,isloading);
}
/**
......@@ -953,7 +985,7 @@ export default class EntityService {
* @param isloading
*/
public async changPassword(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`v7/changepwd`,data,isloading);
return Http.getInstance().post(`/v7/changepwd`,data,isloading);
}
}
\ No newline at end of file
......@@ -77,19 +77,6 @@ export const getViewSplit = (state: any) => (viewUID: string) => {
return state.viewSplit[viewUID];
}
/**
* 获取拷贝数据
*
* @param state
*/
export const getCopyData = (state: any) => (srfkey: string) => {
let copyData = state.copyDataMap[srfkey];
if(copyData){
delete state.copyDataMap[srfkey];
}
return copyData;
}
/**
* 获取单位数据
*
......
......@@ -255,18 +255,6 @@ export const setViewSplit = (state: any, args: {viewSplit: number,viewUID:string
state.viewSplit[args.viewUID] = args.viewSplit;
}
/**
* 添加拷贝数据
*
* @param state
* @param localdata
*/
export const addCopyData = (state: any, args: {srfkey: string,copyData: any}) => {
if(args && args.srfkey && args.copyData){
state.copyDataMap[args.srfkey] = JSON.parse(JSON.stringify(args.copyData));
}
}
/**
* 添加单位数据
*
......
......@@ -13,7 +13,6 @@ export const rootstate: any = {
localdata: {},
zIndex: 300,
viewSplit: {},
copyDataMap:{},
orgDataMap:{},
depDataMap:{},
}
\ No newline at end of file
......@@ -2,8 +2,7 @@ import { Store } from 'vuex';
import axios from 'axios';
import Router from 'vue-router';
import i18n from '@/locale';
import { Environment } from '@/environments/environment';
/**
* 拦截器
*
......@@ -96,9 +95,9 @@ export class Interceptors {
config.headers['Authorization'] = `Bearer ${token}`;
}
config.headers['Accept-Language'] = i18n.locale;
// if (!config.url.startsWith('https://') && !config.url.startsWith('http://')) {
// config.url = Environment.BaseUrl + config.url;
// }
if (!Object.is(Environment.BaseUrl,"") && !config.url.startsWith('https://') && !config.url.startsWith('http://') && !config.url.startsWith('./assets')) {
config.url = Environment.BaseUrl + config.url;
}
return config;
}, (error: any) => {
return Promise.reject(error);
......
......@@ -52,9 +52,9 @@ export class UIActionTool {
return;
}
let value: string | null = _params[name];
if (value && value.startsWith('%') && value.endsWith('%')) {
if (value && typeof(value) === 'string' && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1);
if (arg && arg.hasOwnProperty(key)) {
if (arg && arg.hasOwnProperty(key) && Object.is(actionTarget, 'SINGLEKEY')) {
value = (arg[key] !== null && arg[key] !== undefined) ? arg[key] : null;
} else if(parentContext && parentContext.hasOwnProperty(key)){
value = (parentContext[key] !== null && parentContext[key] !== undefined) ? parentContext[key] : null;
......@@ -76,7 +76,7 @@ export class UIActionTool {
}
let value: string | null = _params[name];
let values: any[] = [];
if (value && value.startsWith('%') && value.endsWith('%')) {
if (value && typeof(value) === 'string' && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1);
args.forEach((arg: any) => {
if (arg && arg.hasOwnProperty(key)) {
......
......@@ -116,6 +116,12 @@ export class Verify {
* @memberof Verify
*/
public static compareNumber(value: number, value2: number): number {
if(isNaN(value)){
value = 0;
}
if(isNaN(value2)){
value2 = 0;
}
if (value > value2) {
return 1;
} else if (value < value2) {
......@@ -270,12 +276,8 @@ export class Verify {
}
if (Object.is(paramType, 'ENTITYFIELD')) {
value2 = value2 ? value2.toLowerCase() : '';
const _value2Field = form.findFormItem(value2);
if (!_value2Field) {
this.errorInfo = `表单项${value2}未配置`;
return true;
}
value2 = _value2Field.getValue();
const _value2Field = form[value2]?form[value2]:value2;
value2 = _value2Field;
}
if (Util.isEmpty(errorInfo)) {
errorInfo = '内容必须符合值规则';
......@@ -284,7 +286,7 @@ export class Verify {
const result = this.testCond(value, op, value2);
if (!result) {
if (primaryModel) {
throw new Error(this.errorInfo);
// throw new Error(this.errorInfo);
}
}
return !result;
......
......@@ -8,7 +8,105 @@
:collapse="isCollapse"
@select="select"
:default-active="defaultActive">
<app-menu-item :menus="menus" :ctrlName="'appindexview'" :isFirst="true" :counterdata="counterdata" :popperclass="popperClass"></app-menu-item>
<template v-if="Object.is(mode,'horizontal')">
<template v-for="item0 in menus">
<template v-if="item0.items && Array.isArray(item0.items) && item0.items.length > 0">
<el-submenu v-show="!item0.hidden" :index="item0.name" :popper-class="popperClass" :key="item0.id" :class="item0.textcls">
<template slot='title'>
<template v-if="item0.icon && item0.icon != ''">
<img :src="item0.icon" class='app-menu-icon' />
</template>
<template v-else-if="item0.iconcls && item0.iconcls != ''">
<i :class="[item0.iconcls, 'app-menu-icon']"></i>
</template>
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
</template>
<span class='text' :title="$t('app.menus.appindexview.' + item0.name)">{{$t('app.menus.appindexview.' + item0.name)}}</span>
</template>
<template v-for="item1 in item0.items">
<template v-if="item1.items && Array.isArray(item1.items) && item1.items.length > 0">
<el-submenu v-show="!item1.hidden" :index="item1.name" :popper-class="popperClass" :key="item1.id" :class="item1.textcls">
<template slot='title'>
<template v-if="item1.icon && item1.icon != ''">
<img :src="item1.icon" class='app-menu-icon' />
</template>
<template v-else-if="item1.iconcls && item1.iconcls != ''">
<i :class="[item1.iconcls, 'app-menu-icon']"></i>
</template>
<span class='text' :title="$t('app.menus.appindexview.' + item1.name)">{{$t('app.menus.appindexview.' + item1.name)}}</span>
</template>
<template v-for="item2 in item1.items">
<template v-if="item2.type =='MENUITEM'">
<el-menu-item v-show="!item2.hidden" :index="item2.name" :key="item2.id" :class="item2.textcls">
<template v-if="item2.icon && item2.icon != ''">
<img :src="item2.icon" class='app-menu-icon' />
</template>
<template v-else-if="item2.iconcls && item2.iconcls != ''">
<i :class="[item2.iconcls, 'app-menu-icon']"></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.appindexview.' + item2.name)">{{$t('app.menus.appindexview.' + item2.name)}}</span>
<template v-if="counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item2.counterid]" :overflow-count="9999"></badge>
</span>
</template>
</template>
</el-menu-item>
</template>
</template>
</el-submenu>
</template>
<template v-else>
<template v-if="item1.type =='MENUITEM'">
<el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id" :class="item1.textcls">
<template v-if="item1.icon && item1.icon != ''">
<img :src="item1.icon" class='app-menu-icon' />
</template>
<template v-else-if="item1.iconcls && item1.iconcls != ''">
<i :class="[item1.iconcls, 'app-menu-icon']"></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.appindexview.' + item1.name)">{{$t('app.menus.appindexview.' + item1.name)}} </span>
<template v-if="counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item1.counterid]" :overflow-count="9999"></badge>
</span>
</template>
</template>
</el-menu-item>
</template>
</template>
</template>
</el-submenu>
</template>
<template v-else>
<template v-if="item0.type =='MENUITEM'">
<el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id" :class="item0.textcls">
<template v-if="item0.icon && item0.icon != ''">
<img :src="item0.icon" class='app-menu-icon' />
</template>
<template v-else-if="item0.iconcls && item0.iconcls != ''">
<i :class="[item0.iconcls, 'app-menu-icon']"></i>
</template>
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.appindexview.' + item0.name)">{{$t('app.menus.appindexview.' + item0.name)}}</span>
<template v-if="counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item0.counterid]" :overflow-count="9999"></badge>
</span>
</template>
</template>
</el-menu-item>
</template>
</template>
</template>
</template>
<app-menu-item v-else :isCollapse="isCollapse" :menus="menus" :ctrlName="'appindexview'" :isFirst="true" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item>
</el-menu>
</div>
</template>
......
......@@ -24,18 +24,47 @@
font-size: 12px;
width: 18px;
}
.el-submenu__title .app-menu-icon,.el-submenu__title .app-menu-icon{
.el-submenu__title .app-menu-icon,.el-menu-item .app-menu-icon{
width:20px;
font-size: 14px;
}
.el-submenu__title .text {
font-size: 16px;
font-size: 16px;
}
.el-menu-item, .el-submenu__title {
.el-submenu__title .app-menu-circle,.el-menu-item .app-menu-circle {
display: inline-block;
border-radius: 50%;
width: 20px;
height: 20px;
line-height: 36px;
vertical-align:middle;
background: rgb(var(--app-footer-background-color-rgb));
border: 1px solid #fff;
border-color: rgb(var(--app-header-color-rgb));
color: rgb(var(--app-header-color-rgb));;
text-align: center;
font: 12px Arial, sans-serif;
}
.el-submenu__title, .el-menu-item {
height: 50px;
font-size: 14px;
line-height: 50px;
border-left: 4px !important;
}
.el-menu-item .el-tooltip {
padding-left: 12px !important;
}
.isCollpase .el-submenu__title{
padding-left: 12px !important;
}
.isFirst > .text {
font-size: 16px !important;
}
.el-menu-item, .el-submenu, .el-menu {
border-top: 1px solid #fff;
}
......@@ -73,6 +102,23 @@
overflow: hidden;
}
}
.el-menu--horizontal{
display: flex;
width: calc(100vw - 1100px);
height: 65px;
flex-wrap: nowrap;
overflow-x:scroll;
padding-top: 3px;
.el-menu-item{
overflow: visible;
}
.el-submenu{
.el-submenu__title{
padding-right: 0px !important;
padding-left: 0px !important;
}
}
}
.ivu-divider-horizontal {
width: 100%;
min-width: 100%;
......@@ -110,5 +156,4 @@
}
}
// this is less
......@@ -6,21 +6,42 @@
<row>
<i-col v-show="detailsModel.n_ccode_like.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='n_ccode_like' :itemRules="this.rules.n_ccode_like" class='' :caption="$t('entities.dictcatalog.default_searchform.details.n_ccode_like')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_ccode_like.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.n_ccode_like" @enter="onEnter($event)" :disabled="detailsModel.n_ccode_like.disabled" type='text' style="width:100px;"></input-box>
<input-box
v-model="data.n_ccode_like"
@enter="onEnter($event)"
:disabled="detailsModel.n_ccode_like.disabled"
type='text'
style="width:100px;">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.n_cname_like.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='n_cname_like' :itemRules="this.rules.n_cname_like" class='' :caption="$t('entities.dictcatalog.default_searchform.details.n_cname_like')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_cname_like.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.n_cname_like" @enter="onEnter($event)" :disabled="detailsModel.n_cname_like.disabled" type='text' style="width:100px;"></input-box>
<input-box
v-model="data.n_cname_like"
@enter="onEnter($event)"
:disabled="detailsModel.n_cname_like.disabled"
type='text'
style="width:100px;">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.n_cgroup_like.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='n_cgroup_like' :itemRules="this.rules.n_cgroup_like" class='' :caption="$t('entities.dictcatalog.default_searchform.details.n_cgroup_like')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_cgroup_like.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.n_cgroup_like" @enter="onEnter($event)" :disabled="detailsModel.n_cgroup_like.disabled" type='text' style="width:100px;"></input-box>
<input-box
v-model="data.n_cgroup_like"
@enter="onEnter($event)"
:disabled="detailsModel.n_cgroup_like.disabled"
type='text'
style="width:100px;">
</input-box>
</app-form-item>
......
<template>
<div class='grid' style="height:100%;">
<i-form style="height:100%">
<div class='grid' style="height:100%">
<i-form style="height:100%;display:flex;flex-direction: column;justify-content: space-between">
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
:cell-class-name="getCellClassName"
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
......@@ -77,7 +77,7 @@
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD hh:mm:ss" :data="row.updatedate"></app-format-data>
<app-format-data format="YYYY-MM-DD HH:mm:ss" :data="row.updatedate"></app-format-data>
</template>
</el-table-column>
</template>
......@@ -1468,6 +1468,12 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public async save(args: any[], params?: any, $event?: any, xData?: any){
let _this = this;
// 拷贝模式
if(_this.viewparams && _this.viewparams.copymode && Object.is(_this.viewparams.copymode,'true') && _this.items && _this.items.length >0){
for (const item of _this.items) {
item.rowDataState = 'create';
}
}
if(_this.items && _this.items.length >0){
for (const item of _this.items) {
if(Object.is(item.rowDataState, 'update')){
......
......@@ -33,6 +33,19 @@
display: inline;
}
.el-table {
height: 100%;
display:flex;
flex-direction: column;
justify-content: start;
.el-table__row{
.grid-uiaction-divider {
padding:0 10px 0 10px;
border-left: 1px #b3b3b3 solid;
}
.grid-first-uiaction {
padding:0 10px 0 10px;
}
}
.quick-toolbar{
display: inline-block;
button{
......@@ -85,9 +98,6 @@
}
}
}
.el-table__body-wrapper{
height: calc(100% - 45px) !important;
}
}
.ivu-modal-content{
.footer{
......
......@@ -6,21 +6,42 @@
<row>
<i-col v-show="detailsModel.n_cname_like.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='n_cname_like' :itemRules="this.rules.n_cname_like" class='' :caption="$t('entities.dictoption.default_searchform.details.n_cname_like')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_cname_like.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.n_cname_like" @enter="onEnter($event)" :disabled="detailsModel.n_cname_like.disabled" type='text' style="width:100px;"></input-box>
<input-box
v-model="data.n_cname_like"
@enter="onEnter($event)"
:disabled="detailsModel.n_cname_like.disabled"
type='text'
style="width:100px;">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.n_val_like.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='n_val_like' :itemRules="this.rules.n_val_like" class='' :caption="$t('entities.dictoption.default_searchform.details.n_val_like')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_val_like.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.n_val_like" @enter="onEnter($event)" :disabled="detailsModel.n_val_like.disabled" type='text' style="width:100px;"></input-box>
<input-box
v-model="data.n_val_like"
@enter="onEnter($event)"
:disabled="detailsModel.n_val_like.disabled"
type='text'
style="width:100px;">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.n_label_like.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='n_label_like' :itemRules="this.rules.n_label_like" class='' :caption="$t('entities.dictoption.default_searchform.details.n_label_like')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_label_like.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.n_label_like" @enter="onEnter($event)" :disabled="detailsModel.n_label_like.disabled" type='text' style="width:100px;"></input-box>
<input-box
v-model="data.n_label_like"
@enter="onEnter($event)"
:disabled="detailsModel.n_label_like.disabled"
type='text'
style="width:100px;">
</input-box>
</app-form-item>
......
<template>
<div class='grid' style="height:100%;">
<i-form style="height:100%">
<div class='grid' style="height:100%">
<i-form style="height:100%;display:flex;flex-direction: column;justify-content: space-between">
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
:cell-class-name="getCellClassName"
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
......@@ -389,7 +389,7 @@
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD hh:mm:ss" :data="row.updatedate"></app-format-data>
<app-format-data format="YYYY-MM-DD HH:mm:ss" :data="row.updatedate"></app-format-data>
</template>
</el-table-column>
</template>
......@@ -1920,6 +1920,12 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public async save(args: any[], params?: any, $event?: any, xData?: any){
let _this = this;
// 拷贝模式
if(_this.viewparams && _this.viewparams.copymode && Object.is(_this.viewparams.copymode,'true') && _this.items && _this.items.length >0){
for (const item of _this.items) {
item.rowDataState = 'create';
}
}
if(_this.items && _this.items.length >0){
for (const item of _this.items) {
if(Object.is(item.rowDataState, 'update')){
......
......@@ -33,6 +33,19 @@
display: inline;
}
.el-table {
height: 100%;
display:flex;
flex-direction: column;
justify-content: start;
.el-table__row{
.grid-uiaction-divider {
padding:0 10px 0 10px;
border-left: 1px #b3b3b3 solid;
}
.grid-first-uiaction {
padding:0 10px 0 10px;
}
}
.quick-toolbar{
display: inline-block;
button{
......@@ -85,9 +98,6 @@
}
}
}
.el-table__body-wrapper{
height: calc(100% - 45px) !important;
}
}
.ivu-modal-content{
.footer{
......
<template>
<div class='grid' style="height:100%;">
<i-form style="height:100%">
<div class='grid' style="height:100%">
<i-form style="height:100%;display:flex;flex-direction: column;justify-content: space-between">
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
:cell-class-name="getCellClassName"
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
......@@ -1900,6 +1900,12 @@ export default class OptionsBase extends Vue implements ControlInterface {
*/
public async save(args: any[], params?: any, $event?: any, xData?: any){
let _this = this;
// 拷贝模式
if(_this.viewparams && _this.viewparams.copymode && Object.is(_this.viewparams.copymode,'true') && _this.items && _this.items.length >0){
for (const item of _this.items) {
item.rowDataState = 'create';
}
}
if(_this.items && _this.items.length >0){
for (const item of _this.items) {
if(Object.is(item.rowDataState, 'update')){
......
......@@ -33,6 +33,19 @@
display: inline;
}
.el-table {
height: 100%;
display:flex;
flex-direction: column;
justify-content: start;
.el-table__row{
.grid-uiaction-divider {
padding:0 10px 0 10px;
border-left: 1px #b3b3b3 solid;
}
.grid-first-uiaction {
padding:0 10px 0 10px;
}
}
.quick-toolbar{
display: inline-block;
button{
......@@ -85,9 +98,6 @@
}
}
}
.el-table__body-wrapper{
height: calc(100% - 45px) !important;
}
}
.ivu-modal-content{
.footer{
......
......@@ -27,7 +27,6 @@ import java.util.List;
@MapperScan("cn.ibizlab.*.mapper")
@SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class,
})
public class webApplication extends WebMvcConfigurerAdapter{
......
......@@ -21,7 +21,6 @@ import java.util.List;
@EnableTransactionManagement
@EnableFeignClients(basePackages = {"cn.ibizlab" })
@SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class,
})
@ComponentScan(basePackages = {"cn.ibizlab"}
// ,excludeFilters={
......
package cn.ibizlab.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@Configuration
public class DevBootAutoConfiguration {
}
......@@ -98,6 +98,7 @@
<artifactId>jobs-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<properties>
......
......@@ -72,4 +72,3 @@ public class DictCatalogSearchContext extends QueryWrapperContext<DictCatalog> {
......@@ -86,4 +86,3 @@ public class DictOptionSearchContext extends QueryWrapperContext<DictOption> {
......@@ -21,14 +21,19 @@ public interface DictCatalogMapper extends BaseMapper<DictCatalog>{
Page<DictCatalog> searchDefault(IPage page, @Param("srf") DictCatalogSearchContext context, @Param("ew") Wrapper<DictCatalog> wrapper) ;
@Override
@Cacheable( value="dictcatalog",key = "'row:'+#p0")
DictCatalog selectById(Serializable id);
@Override
@CacheEvict( value="dictcatalog",key = "'row:'+#p0.id")
int insert(DictCatalog entity);
@Override
@CacheEvict( value="dictcatalog",key = "'row:'+#p0.id")
int updateById(@Param(Constants.ENTITY) DictCatalog entity);
@Override
@CacheEvict(value="dictcatalog",key = "'row:'+#p0.id")
int update(@Param(Constants.ENTITY) DictCatalog entity, @Param("ew") Wrapper<DictCatalog> updateWrapper);
@Override
@CacheEvict( value="dictcatalog",key = "'row:'+#p0")
int deleteById(Serializable id);
/**
* 自定义查询SQL
......
......@@ -26,15 +26,19 @@ import com.baomidou.mybatisplus.extension.service.IService;
public interface IDictCatalogService extends IService<DictCatalog>{
boolean create(DictCatalog et) ;
@CacheEvict(value="dictcatalog",allEntries=true)
void createBatch(List<DictCatalog> list) ;
boolean update(DictCatalog et) ;
@CacheEvict(value="dictcatalog",allEntries=true)
void updateBatch(List<DictCatalog> list) ;
boolean remove(String key) ;
@CacheEvict(value="dictcatalog",allEntries=true)
void removeBatch(Collection<String> idList) ;
DictCatalog get(String key) ;
DictCatalog getDraft(DictCatalog et) ;
boolean checkKey(DictCatalog et) ;
boolean save(DictCatalog et) ;
@CacheEvict(value="dictcatalog",allEntries=true)
void saveBatch(List<DictCatalog> list) ;
Page<DictCatalog> searchDefault(DictCatalogSearchContext context) ;
/**
......
......@@ -28,6 +28,7 @@ import cn.ibizlab.core.dict.filter.DictCatalogSearchContext;
import cn.ibizlab.core.dict.service.IDictCatalogService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -121,9 +122,7 @@ public class DictCatalogServiceImpl extends ServiceImpl<DictCatalogMapper, DictC
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
@Transactional
public boolean saveOrUpdate(DictCatalog et) {
if (null == et) {
return false;
......@@ -188,3 +187,4 @@ public class DictCatalogServiceImpl extends ServiceImpl<DictCatalogMapper, DictC
}
......@@ -28,6 +28,7 @@ import cn.ibizlab.core.dict.filter.DictOptionSearchContext;
import cn.ibizlab.core.dict.service.IDictOptionService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -126,9 +127,7 @@ public class DictOptionServiceImpl extends ServiceImpl<DictOptionMapper, DictOpt
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
@Transactional
public boolean saveOrUpdate(DictOption et) {
if (null == et) {
return false;
......@@ -221,3 +220,4 @@ public class DictOptionServiceImpl extends ServiceImpl<DictOptionMapper, DictOpt
}
......@@ -4,7 +4,7 @@
<!--输出实体[DICT_CATALOG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dict_catalog-67-1">
<changeSet author="a_A_5d9d78509" id="tab-dict_catalog-69-1">
<createTable tableName="IBZDICTCATALOG">
<column name="CID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DICT_CATALOG_CID"/>
......
......@@ -33,8 +33,8 @@
<select id="selectByCatalogId" resultMap="DictOptionResultMap">
select t1.* from (
<include refid="Default" />
) t1
where cid=#{id}
) t1
where cid=#{id}
</select>
<!--数据集合[Default]-->
......
......@@ -19,8 +19,8 @@
</parent>
<properties>
<!-- Spring Cloud Alibaba(2.1.x.RELEASE) & Spring Cloud(Spring Cloud Greenwich) & Spring Boot(2.1.x.RELEASE) compatibility -->
<spring-cloud-alibaba.version>2.1.1.RELEASE</spring-cloud-alibaba.version>
<!-- Spring Cloud Alibaba(2.2.x.RELEASE) & Spring Cloud(Spring Cloud Greenwich) & Spring Boot(2.2.x.RELEASE) compatibility -->
<spring-cloud-alibaba.version>2.2.1.RELEASE</spring-cloud-alibaba.version>
<spring-cloud-openfeign.version>2.2.1.RELEASE</spring-cloud-openfeign.version>
......@@ -80,6 +80,12 @@
<!-- eureka微服务注册中心 -->
<eureka-client.version>2.2.1.RELEASE</eureka-client.version>
<!-- 阿里sentinel熔断器 -->
<alibaba-sentinel.version>2.1.1.RELEASE</alibaba-sentinel.version>
<!-- 阿里seata分布式事务 -->
<alibaba-seata.version>1.3.0</alibaba-seata.version>
<oracle.version>11.2.0.3</oracle.version>
<postgresql.version>42.2.6</postgresql.version>
......@@ -264,6 +270,7 @@
<version>${baomidou-jobs.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
......@@ -291,6 +298,7 @@
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
<version>${alibaba-sentinel.version}</version>
</dependency>
<!-- Lombok -->
......
......@@ -13,6 +13,7 @@ import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
import org.springframework.context.annotation.Import;
@Configuration
@ConditionalOnClass(apiRestConfiguration.class)
......
......@@ -24,6 +24,8 @@
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
......@@ -95,9 +95,9 @@ public class DEFieldDefaultValueAspect
for(Object item:(List)obj) {
if(item instanceof EntityBase) {
if(deFields==null) {
deFields = DEFieldCacheMap.getDEFields(obj.getClass());
deFields = DEFieldCacheMap.getDEFields(item.getClass());
curUser = AuthenticationUser.getAuthenticationUser();
keyField=DEFieldCacheMap.getDEKeyField(obj.getClass());
keyField=DEFieldCacheMap.getDEKeyField(item.getClass());
if(StringUtils.isEmpty(keyField))
return true;
}
......
......@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.lang.reflect.Field;
import java.util.Map;
/**
* 数据库版本检查
......@@ -28,6 +29,7 @@ import java.lang.reflect.Field;
public class VersionCheckAspect
{
private final ExpressionParser parser = new SpelExpressionParser();
private final String IgnoreField="ignoreversioncheck";
@SneakyThrows
@Before("execution(* cn.ibizlab.*.rest.*.update(..)) && @annotation(versionCheck)")
......@@ -47,19 +49,26 @@ public class VersionCheckAspect
@Before("execution(* cn.ibizlab.*.rest.*.updateBy*(..)) && @annotation(versionCheck)")
public void BeforeUpdateBy(JoinPoint point, VersionCheck versionCheck){
Object[] args = point.getArgs();
Object id=args[1];
Object dto=args[2];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto))
return;
String versionField=versionCheck.versionfield();
if(StringUtils.isEmpty(versionField))
return;
versionCheck(versionCheck,point.getTarget(),dto,id);
if(args.length>=2){
Object id=args[args.length-2];
Object dto=args[args.length-1];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto))
return;
String versionField=versionCheck.versionfield();
if(StringUtils.isEmpty(versionField))
return;
versionCheck(versionCheck,point.getTarget(),dto,id);
}
}
private void versionCheck(VersionCheck versionCheck,Object resource,Object dto,Object id ){
EvaluationContext context = new StandardEvaluationContext();
context.setVariable("dto",dto);
//忽略版本检查
Expression dtoParamsExp = parser.parseExpression("#dto.extensionparams");
Map dtoParam=dtoParamsExp.getValue(context, Map.class);
if(!ObjectUtils.isEmpty(dtoParam) && !ObjectUtils.isEmpty(dtoParam.get(IgnoreField)) && dtoParam.get(IgnoreField).equals(1))
return;
Expression newExp = parser.parseExpression(String.format("#dto.%s",versionCheck.versionfield()));
Object newVersion=newExp.getValue(context);
if(ObjectUtils.isEmpty(newVersion))
......
......@@ -2,6 +2,8 @@ package cn.ibizlab.util.security;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Date;
public interface AuthTokenUtil {
String generateToken(UserDetails userDetails);
......@@ -9,6 +11,8 @@ public interface AuthTokenUtil {
Boolean validateToken(String token, UserDetails userDetails);
String getUsernameFromToken(String token);
Date getExpirationDateFromToken(String token) ;
}
......@@ -29,6 +29,8 @@ public class FeignRequestInterceptor implements RequestInterceptor {
if (headerNames != null) {
while (headerNames.hasMoreElements()) {
String name = headerNames.nextElement();
if(name.equalsIgnoreCase("transfer-encoding"))
continue;
String values = request.getHeader(name);
requestTemplate.header(name, values);
}
......
#缓存、数据源
spring:
cache:
......@@ -16,10 +17,14 @@ spring:
max-wait: 300ms
max-idle: 16
min-idle: 8
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
datasource:
username: a_A_5d9d78509
password: '@6dEfb3@'
url: jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
url: jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
driver-class-name: com.mysql.jdbc.Driver
filters: stat,wall,log4j2
#配置初始化大小/最小/最大
......@@ -102,3 +107,4 @@ server:
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
min-response-size: 10240
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册