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

ibiz4j 发布系统代码 [ibz-disk,存储]

上级 42571a8e
...@@ -12,3 +12,4 @@ ...@@ -12,3 +12,4 @@
**.iml **.iml
*.jar *.jar
*.log *.log
.DS_Store
此差异已折叠。
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
"dev-build": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service build --mode development", "dev-build": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service build --mode development",
"test:unit": "vue-cli-service test:unit", "test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e", "test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint"
"format-code": "prettier-eslint --write \"src/**/*.js\" \"src/**/*.vue\" \"src/**/*.tsx\" \"src/**/*.ts\" \"src/**/*.less\""
}, },
"dependencies": { "dependencies": {
"@fullcalendar/core": "^4.4.0", "@fullcalendar/core": "^4.4.0",
...@@ -30,6 +29,7 @@ ...@@ -30,6 +29,7 @@
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"ibiz-gantt-elastic": "^1.0.17", "ibiz-gantt-elastic": "^1.0.17",
"ibiz-vue-lib": "^0.1.13", "ibiz-vue-lib": "^0.1.13",
"ibiz-vue-pivottable": "^1.0.6",
"interactjs": "^1.9.4", "interactjs": "^1.9.4",
"moment": "^2.24.0", "moment": "^2.24.0",
"path-to-regexp": "^6.1.0", "path-to-regexp": "^6.1.0",
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
"tinymce": "4.8.5", "tinymce": "4.8.5",
"view-design": "4.2.0", "view-design": "4.2.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-amap": "^0.5.10",
"vue-class-component": "^7.0.2", "vue-class-component": "^7.0.2",
"vue-grid-layout": "^2.3.7", "vue-grid-layout": "^2.3.7",
"vue-i18n": "^8.15.3", "vue-i18n": "^8.15.3",
...@@ -67,12 +68,5 @@ ...@@ -67,12 +68,5 @@
"script-loader": "^0.7.2", "script-loader": "^0.7.2",
"typescript": "~3.5.3", "typescript": "~3.5.3",
"vue-template-compiler": "^2.6.10" "vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
"root": true,
"extends": [
"gitee",
"stylelint-config-prettier"
]
} }
} }
...@@ -99,6 +99,11 @@ import AppAlertGroup from './components/app-alert-group/app-alert-group.vue' ...@@ -99,6 +99,11 @@ import AppAlertGroup from './components/app-alert-group/app-alert-group.vue'
import AppRawItem from './components/app-rawitem/app-rawitem.vue' import AppRawItem from './components/app-rawitem/app-rawitem.vue'
import AppImageRomate from './components/app-image-romate/app-image-romate.vue' import AppImageRomate from './components/app-image-romate/app-image-romate.vue'
import { MenuIcon } from './components/menu-icon/menu-icon' import { MenuIcon } from './components/menu-icon/menu-icon'
import AppVuePivottable from './components/app-vue-pivottable/app-vue-pivottable.vue';
import AppMapPosition from './components/app-map-position/app-map-position.vue';
import AppSortBar from './components/app-sort-bar/app-sort-bar.vue';
import AppAfterTime from './components/app-after-time/app-after-time.vue';
import AppInputIp from './components/app-input-ip/app-input-ip.vue';
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
...@@ -213,5 +218,10 @@ export const AppComponents = { ...@@ -213,5 +218,10 @@ export const AppComponents = {
v.component('app-rawitem',AppRawItem); v.component('app-rawitem',AppRawItem);
v.component('app-image-romate', AppImageRomate); v.component('app-image-romate', AppImageRomate);
v.component('menu-icon', MenuIcon); v.component('menu-icon', MenuIcon);
v.component('app-vue-pivottable', AppVuePivottable);
v.component('app-map-position', AppMapPosition);
v.component('app-sort-bar', AppSortBar);
v.component('app-after-time', AppAfterTime);
v.component('app-input-ip', AppInputIp);
}, },
}; };
\ No newline at end of file
...@@ -69,6 +69,30 @@ export default class CodeListService { ...@@ -69,6 +69,30 @@ export default class CodeListService {
return (window as any)['codeListRegister'].getService(name); return (window as any)['codeListRegister'].getService(name);
} }
/**
* 获取代码表数据
*
* @param {string} tag 代码表标识
* @param {*} context
* @param {*} data
* @param {boolean} isloading
* @returns {Promise<any[]>}
* @memberof CodeListService
*/
public async getDataItems(codelist:any,context?:any, data?: any, isloading?: boolean){
let dataItems:Array<any> = [];
try{
if(codelist.tag && Object.is(codelist.type,"STATIC")){
dataItems = await this.getStaticItems(codelist.tag);
}else{
dataItems = await this.getItems(codelist.tag,codelist.context,codelist.viewparam,codelist.isloading);
}
}catch(error){
console.warn("代码表加载异常" + error);
}
return dataItems;
}
/** /**
* 获取静态代码表 * 获取静态代码表
* *
......
<template>
<div class="app-after-time">
<span v-if="diffTime =='minutes'">{{curvalue}}{{$t('components.appAfterTime.minutesAgo')}}</span>
<span v-if="diffTime =='hours'">{{curvalue}}{{$t('components.appAfterTime.hoursAgo')}}</span>
<span v-if="diffTime =='days'">{{curvalue}}{{$t('components.appAfterTime.dayAgo')}}</span>
<span v-if="diffTime =='mouth'">{{curvalue}}{{$t('components.appAfterTime.monthsAgo')}}</span>
<span v-if="diffTime =='years'">{{curvalue}}{{$t('components.appAfterTime.yearsAgo')}}</span>
<span v-if="!diffTime">&nbsp;</span>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Emit, Watch, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
@Component({})
export default class AppAfterTime extends Vue {
/**
* 属性项名称
*
* @type {string}
* @memberof AppAfterTime
*/
@Prop() public name!: string;
/**
* 应用上下文
*
* @type {any}
* @memberof AppAfterTime
*/
@Prop() context: any;
/**
* 视图参数
*
* @type {any}
* @memberof AppAfterTime
*/
@Prop() viewparam: any;
/**
* 表单状态对象
*
* @type {Subject<any>}
* @memberof AppAfterTime
*/
@Prop() public formState?:Subject<any>;
/**
* 表单绑定数据
*
* @type {any}
* @memberof AppAfterTime
*/
@Model('change') public value:any;
/**
* 当前值
*
* @type {any}
* @memberof AppAfterTime
*/
public curvalue: string = '';
/**
* 毫秒差
*
* @type {any}
* @memberof AppAfterTime
*/
public diffTime:any='';
/**
* 值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppAfterTime
*/
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
this.transTime();
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof AppAfterTime
*/
public created(){
if(this.formState){
this.formState.subscribe(({type,data})=>{
if(Object.is('load',type)){
this.transTime();
}
})
}
this.transTime();
}
/**
* 处理时间
*
* @memberof AppAfterTime
*/
public transTime(){
if(this.value){
let oldTime = new Date(this.value).getTime();
let nowTime = new Date().getTime();
let diffTime = nowTime - oldTime;
if(diffTime < 3600000){
this.curvalue = Math.ceil(diffTime/60000)+'';
this.diffTime = 'minutes';
}else if(diffTime < 86400000){
this.curvalue = Math.ceil(diffTime/3600000)+'';
this.diffTime = 'hours';
}else if(diffTime < 2592000000){
this.curvalue = Math.floor(diffTime/86400000)+'';
this.diffTime = 'days';
}else if(diffTime < 31104000000){
this.curvalue = Math.floor(diffTime/2592000000)+'';
this.diffTime = 'mounth';
}else{
this.curvalue = Math.floor(diffTime/31104000000)+'';
this.diffTime = 'years';
}
}
}
}
</script>
<style>
.app-after-time{
margin-left: 6px;
}
</style>
\ No newline at end of file
...@@ -110,4 +110,11 @@ export default class AppAlertGroup extends Vue { ...@@ -110,4 +110,11 @@ export default class AppAlertGroup extends Vue {
}); });
} }
} }
</script> </script>
\ No newline at end of file
<style lang="less">
.view-body-messages {
margin-top: -10px;
margin-bottom: 6px;
}
</style>
\ No newline at end of file
<template> <template>
<div class='form-druipart'> <div class='form-druipart'>
<component <component
ref="appFormDruipart"
:is="viewname" :is="viewname"
class="viewcontainer2" class="viewcontainer2"
:viewdata ="viewdata" :viewdata ="viewdata"
...@@ -178,6 +179,14 @@ export default class AppFormDRUIPart extends Vue { ...@@ -178,6 +179,14 @@ export default class AppFormDRUIPart extends Vue {
*/ */
private formStateEvent: Unsubscribable | undefined; private formStateEvent: Unsubscribable | undefined;
/**
* 定时器实例
*
* @type {[any]}
* @memberof AppFormDRUIPart
*/
protected timer?: any;
/** /**
* 监控值 * 监控值
* *
...@@ -308,11 +317,43 @@ export default class AppFormDRUIPart extends Vue { ...@@ -308,11 +317,43 @@ export default class AppFormDRUIPart extends Vue {
} }
if(!this.isForbidLoad){ if(!this.isForbidLoad){
setTimeout(() => { setTimeout(() => {
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}}); this.partViewEvent('load',{data:{srfparentdename:this.parentName,srfparentkey:_paramitem}},0);
}, 0); }, 0);
} }
} }
/**
* 向关系视图发送事件,采用轮询模式。避免异步视图出现加载慢情况
*
* @param {*} action 触发行为
* @param {*} data 数据
* @param {*} count 轮询计数
* @memberof AppFormDRUIPart
*/
protected partViewEvent(action: string, data: any, count: number = 0): void {
if (count > 100) {
return;
}
const clearResource:Function = () =>{
if(this.timer !== undefined){
clearTimeout(this.timer);
this.timer = undefined;
}
}
if (count === 0) {
clearResource();
}
if (this.$refs.appFormDruipart) {
this.formDruipart.next({ action: action, data });
clearResource();
return;
}
this.timer = setTimeout(() => {
count++;
this.partViewEvent(action, data, count);
}, 30);
}
/** /**
* vue 生命周期 * vue 生命周期
* *
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
} }
.app-form-item-label { .app-form-item-label {
padding: 6px 10px 6px 0px; padding: 6px 10px 6px 0px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
} }
......
...@@ -31,7 +31,17 @@ ...@@ -31,7 +31,17 @@
:class="labelclasses" :class="labelclasses"
> >
<span v-if="required" style="color:red;">* </span> <span v-if="required" style="color:red;">* </span>
{{this.isEmptyCaption ? '' : this.caption}} <span v-if="!isEmptyCaption">
<el-tooltip v-if="isShowTip" placement="top" effect="light">
<span v-html="caption"></span>
<template >
<span slot="content" v-html="caption" ></span>
</template>
</el-tooltip>
<template v-if="!isShowTip">
<span v-html="caption" ></span>
</template>
</span>
</span> </span>
<div <div
v-if="Object.is(this.labelPos,'TOP') || Object.is(this.labelPos,'LEFT') || Object.is(this.labelPos,'RIGHT')" v-if="Object.is(this.labelPos,'TOP') || Object.is(this.labelPos,'LEFT') || Object.is(this.labelPos,'RIGHT')"
...@@ -136,6 +146,14 @@ export default class AppFormItem extends Vue { ...@@ -136,6 +146,14 @@ export default class AppFormItem extends Vue {
*/ */
@Prop() public itemRules!: any; @Prop() public itemRules!: any;
/**
* 是否显示表单项Label提示
*
* @memberof AppFormItem
*/
public isShowTip:boolean = false;
/** /**
* 值规则数组 * 值规则数组
* *
...@@ -266,7 +284,21 @@ export default class AppFormItem extends Vue { ...@@ -266,7 +284,21 @@ export default class AppFormItem extends Vue {
}); });
} catch (error) {} } catch (error) {}
} }
this.getShowTip();
} }
/**
* 计算是否显示表单项Label提示
*
* @memberof AppFormItem
*/
public getShowTip(){
if(this.caption && ((this.caption.length)*14) > this.labelWidth ){
this.isShowTip = true;
}
}
} }
</script> </script>
<style lang='less'> <style lang='less'>
......
input{
border-radius: 4px;
border:1px solid #888;
padding: 2px 10px;
width: 20%;
}
<template>
<div class="app-inpu-ip">
<input
type="text"
v-model="firstIp"
maxlength="3" />.
<input
type="text"
v-model="secIp"
maxlength="3" />.
<input
type="text"
maxlength="3"
v-model="thirdIp" />.
<input
type="text"
maxlength="3"
v-model="forIp" />
</div>
</template>
<script lang='ts'>
import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject,Subscription } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
@Component({
})
export default class AppInputIp extends Vue {
/**
* 应用上下文
*
* @type {any}
* @memberof AppInputIp
*/
@Prop() context: any;
/**
* 视图参数
*
* @type {any}
* @memberof AppInputIp
*/
@Prop() viewparam: any;
/**
* 表单状态对象
*
* @type {Subject<any>}
* @memberof AppInputIp
*/
@Prop() public formState!: Subject<any>;
/**表单数据绑定
*
* @type {string}
* @memberof AppInputIp
*/
@Model('change') public ipdata!: string;
/**
* 获取当前值
*
* @type {string}
* @memberof AppInputIp
*/
public CurValue: any[] = [];
/**
* 第一段ip
*
* @type {any}
* @memberof AppInputIp
*/
public firstIp: any = '';
/**
* 第二段ip
*
* @type {any}
* @memberof AppInputIp
*/
public secIp: any = '';
/**
* 第三段ip
*
* @type {any}
*/
public thirdIp: any = '';
/**
* 第四段ip
*
* @type {any}
* @memberof AppInputIp
*/
public forIp: any = '';
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof AppInputIp
*/
public created(){
if(this.formState){
this.formState.subscribe(({type,data})=>{
if(Object.is('load',type)){
this.loadData();
}
})
}
this.loadData();
}
/**
* 加载数据
*
* @memberof AppInputIp
*/
public loadData(){
if(this.ipdata){
let iparr:Array<any> = this.ipdata.split('.');
this.CurValue = iparr;
this.firstIp = this.CurValue[0];
this.secIp = this.CurValue[1];
this.thirdIp = this.CurValue[2];
this.forIp = this.CurValue[3];
}
}
/**
* 监听每段ip变化
*
* @memberof AppInputIp
*/
@Watch('firstIp')
public FirstIpChange(newVal:any,oldVal:any){
this.checkIpVal(newVal,oldVal,'firstIp',0);
}
@Watch('secIp')
public SecIpChange(newVal:any,oldVal:any){
this.checkIpVal(newVal,oldVal,'secIp',1);
}
@Watch('thirdIp')
public ThirdIpChange(newVal:any,oldVal:any){
this.checkIpVal(newVal,oldVal,'thirdIp',2);
}
@Watch('forIp')
public ForIpChange(newVal:any,oldVal:any){
this.checkIpVal(newVal,oldVal,'forIp',3);
}
/**
* 验证格式
*
* @memberof AppInputIp
*/
public checkIpVal(newVal:any,oldVal:any,flag:any,index:number){
if(newVal === '') return
let val = newVal;
let reg = /^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/g;
if(reg.test(val)){
this.CurValue[index] = val;
}else{
if(flag){
let that:any = this;
that[flag] = oldVal;
this.CurValue[index] = oldVal;
}
}
if(this.firstIp && this.secIp && this.thirdIp && this.forIp){
this.$emit('change',this.firstIp+'.'+this.secIp+'.'+this.thirdIp+'.'+this.forIp);
}
}
}
</script>
<style lang='less'>
@import './app-input-ip.less';
</style>
.app-map-position {
.map-modal {
.el-dialog {
margin-top: 60px !important;
width: 90%;
.el-dialog__header {
padding: 10px 0px 10px 40px;
}
.el-dialog__body {
padding: 6px 10px;
.search-toolbar {
display: flex;
#map__result {
position: absolute;
z-index: 20;
right: 10px;
top: 110px;
}
.el-vue-search-box-container {
border: 1px solid #DCDFE6;
height: 40px;
margin-right: 20px;
}
}
}
.amap-marker-content {
img {
width: 25px;
height: 34px;
}
.input-map__marker {
position: absolute;
top: -28px;
right: -160px;
color: #fff;
padding: 0px 10px;
-webkit-box-shadow: 1px 1px 1px rgba(10,10,10,.2);
box-shadow: 1px 1px 1px rgba(10,10,10,.2);
white-space: nowrap;
font-size: 12px;
font-family: "";
background-color: #25a5f7;
border-radius: 3px;
}
}
}
.el-vue-amap-container {
padding-top: 20px;
height: 640px;
}
}
}
\ No newline at end of file
<template> <template>
<div> <div>
<el-rate <el-rate :value="currentVal" :disabled="disabled" :max="maxItem" @change="change"> </el-rate>
:value ="currentVal" </div>
:disabled="disabled"
:max="max"
@change="change"
>
</el-rate>
</div>
</template> </template>
<script lang='ts'> <script lang="ts">
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator"; import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import CodeListService from '@codelist/codelist-service';
@Component({}) @Component({})
export default class AppRate extends Vue { export default class AppRate extends Vue {
/** /**
* 传入值 * 传入值
* @type {any} * @type {any}
* @memberof AppRate * @memberof AppRate
*/ */
@Prop() public value?:any; @Prop() public value?: any;
/** /**
* 是否禁用 * 是否禁用
* @type {boolean} * @type {boolean}
* @memberof AppRate * @memberof AppRate
*/ */
@Prop() public disabled?: boolean; @Prop() public disabled?: boolean;
/** /**
* 最大值 * 下发数据
* @type {number} * @type {number}
* @memberof AppRate * @memberof AppRate
*/ */
@Prop({default:5}) public max!: number; @Prop() public data?: any;
/**
* 当前值
*
* @memberof AppRate
*/
get currentVal() {
return this.value;
}
/**
* change
*/
public change(val: any) {
this.$emit("change", val);
}
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof AppRate
*/
public codeListService: CodeListService = new CodeListService({ $store: this.$store });
/**
* 传递最大值
* @type {*}
* @memberof AppRate
*/
@Prop({ default: 5 }) public max!: number;
/**
* 应用上下文
* @type {*}
* @memberof AppRate
*/
@Prop() context: any;
/**
* 视图参数
* @type {*}
* @memberof AppRate
*/
@Prop() viewparams: any;
/**
* 临时上下文
* @type {*}
* @memberof AppRate
*/
@Prop() localContext: any;
/**
* 临时参数
* @type {*}
* @memberof AppRate
*/
@Prop() localParam: any;
/**
* 代码表标识
* @type {string}
* @memberof AppRate
*/
@Prop() tag?: string;
/**
* 代码表类型
* @type {string}
* @memberof AppRate
*/
@Prop() codelistType?: string;
/**
* 代码表值分隔符
* @type {string}
* @memberof AppRate
*/
@Prop({default: ','}) valueSeparator?: string;
/**
* 数据名称
* @type {*}
* @memberof AppRate
*/
@Prop() name: any;
/**
* 最大值
* @type {number}
* @memberof AppRate
*/
public maxItem: number = 5;
/**
* 监听数据变化
*
* @memberof AppRate
*/
@Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) {
if(newVal){
if(this.tag && this.codelistType == 'DYNAMIC'){
// 公共参数处理
let data: any = {};
this.handlePublicParams(data);
// 参数处理
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag, _context, _param).then((res: any) => {
const items = res;
// 获取最大值
const maxItem = Math.max.apply(Math,items.map((item: any) => { return item.value; }));
this.maxItem = maxItem>5 ? 5 : maxItem;
}).catch((error: any) => {
console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`);
});
}
}
}
/**
* 当前值
*
* @memberof AppRate
*/
get currentVal() {
return Number(this.value);
}
/**
* change
*/
public change(val: any) {
this.$emit('change', val);
}
/**
* Vue生命周期
* @memberof AppRate
*/
public created() {
if (this.max) {
this.maxItem = this.max;
}
this.handleCodelist();
}
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppRate
*/
public handlePublicParams(arg: any) {
// 合并表单参数
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);
}
}
/**
* 根据代码表获取最大值
* @memberof AppRate
*/
public handleCodelist() {
if (this.tag && Object.is(this.codelistType, 'STATIC')) {
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
const items = [...JSON.parse(JSON.stringify(codelist.items))];
// 获取最大值
const maxItem = Math.max.apply(Math,items.map((item: any) => { return item.value; }));
this.maxItem = maxItem>5 ? 5 : maxItem;
} else {
console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`);
}
} else if (this.tag && Object.is(this.codelistType, 'DYNAMIC')) {
// 公共参数处理
let data: any = {};
this.handlePublicParams(data);
// 参数处理
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag, _context, _param).then((res: any) => {
const items = res;
// 获取最大值
let maxItem = Math.max.apply(Math,items.map((item: any) => { return item.value; }));
this.maxItem = maxItem>5 ? 5 : maxItem;
}).catch((error: any) => {
console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`);
});
}
}
} }
</script> </script>
<style lang='less'> <style lang="less">
@import "./app-rate.less"; @import './app-rate.less';
</style> </style>
\ No newline at end of file
.app-sort-bar{
padding: 6px 8px;
.ivu-row-flex.page-sort-bar{
width: 100%;
height: 30px;
position: relative;
.ivu-col{
border-radius: 2px;
user-select: none;
text-align: center;
margin: 0px 16px;
display: flex;
align-items: flex-end;
padding-bottom: 4px;
background-color: #FFF;
border: 1px solid #CCC;
margin-left: -1px;
.sort-field-text{
margin-left: 7px;
}
.caret-wrapper{
width: 15px;
display: inline-block;
position: relative;
top: 4px;
padding-bottom: 2px;
.ivu-icon{
display: block;
line-height: 0.5;
color: #c5c8ce;
}
}
}
// 悬浮样式
.ivu-col:hover{
border:1px solid #82bff7;
position:relative;
z-index:2;
.sort-field-text{
color: #82bff7;
}
}
// 选中样式
.sort-ascending, .sort-descending{
border:1px solid #82bff7;
position:relative;
z-index:2;
.sort-field-text{
color:#82bff7;
font-weight: 800;
}
}
.sort-ascending .caret-wrapper .ivu-icon.ivu-icon-md-arrow-dropup,
.sort-descending .caret-wrapper .ivu-icon.ivu-icon-md-arrow-dropdown{
color: #82bff7;
}
.issort {
position: absolute;
cursor: pointer;
top: 4px;
right: 10px;
}
}
}
.open-bar {
background-color: #EEF2F5;
}
\ No newline at end of file
<template>
<div :class="['app-sort-bar', isSort ? 'open-bar' : '']">
<row v-if="sortModel && sortModel.length>0" class="page-sort-bar" :gutter="10" type="flex" justify="start" style="margin:0px;">
<template v-for="(item, index) in sortModel">
<i-col v-show="isSort" :key="index" :class="getSortClass(item)">
<div @click="sortItemClick(item)">
<span class="sort-field-text" >{{$t('entities.'+ entityName +'.fields.' + item)}}</span>
<span class="caret-wrapper">
<Icon type="md-arrow-dropup" />
<Icon type="md-arrow-dropdown" />
</span>
</div>
</i-col>
</template>
<div class="issort" @click="handleSort">
<Icon v-if="isSort" type="ios-funnel-outline" />
<Icon v-else type="ios-funnel" />
{{ $t('components.appSortBar.title') }}
</div>
</row>
</div>
</template>
<script lang='ts'>
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
@Component({})
export default class AppSortBar extends Vue {
@Prop() public sortModel!: any[];
@Prop() public sortField!: any;
@Prop() public sortDir!: any;
@Prop() public entityName!: string;
public isSort: boolean = false;
public getSortClass(name: any) {
if(this.sortField !== name || this.sortDir === ''){
return '';
}else if(this.sortDir === 'asc'){
return 'sort-ascending'
}else if(this.sortDir === 'desc'){
return 'sort-descending'
}
}
public sortItemClick(name: string) {
console.log(name);
this.$emit('clickSort', name);
}
public handleSort() {
this.isSort = !this.isSort;
}
}
</script>
<style lang="less">
@import './app-sort-bar.less';
</style>
\ No newline at end of file
<template>
<vue-pivottable-ui
class="app-vue-pivottable"
:data="datas"
:aggregatorName="aggregatorName"
:rendererName="rendererName"
:columns="columns"
:rows="rows"
:cols="cols"
:vals="vals"
:locales="locales"
:rowTotal="rowTotal"
:colTotal="colTotal"
:onChange="onChange"
:hiddenFromDragDrop="hiddenFromDragDrop"
>
</vue-pivottable-ui>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop } from 'vue-property-decorator';
import { VuePivottableUi } from 'ibiz-vue-pivottable';
import 'ibiz-vue-pivottable/dist/vue-pivottable.css';
@Component({
components: {
VuePivottableUi
}
})
export default class AppVuePivotTable extends Vue {
/**
* 数据集
*
* @type {*}
* @memberof AppVuePivotTable
*/
@Prop() datas: any;
/**
* 列集合
*
* @type {*}
* @memberof AppVuePivotTable
*/
@Prop() allColumns: any;
/**
* 聚合模式
*
* @type {string}
* @memberof AppVuePivotTable
*/
protected aggregatorName: string = 'Sum';
/**
* 渲染模式
*
* @type {string}
* @memberof AppVuePivotTable
*/
protected rendererName: string = 'Table Heatmap';
/**
* 行统计
*
* @type {boolean}
* @memberof AppVuePivotTable
*/
protected rowTotal: boolean = true;
/**
* 列统计
*
* @type {boolean}
* @memberof AppVuePivotTable
*/
protected colTotal: boolean = true;
/**
* 列属性列集合
*
* @type {*}
* @memberof AppVuePivotTable
*/
protected cols: any[] = [];
/**
* 行属性列集合
*
* @type {*}
* @memberof AppVuePivotTable
*/
protected rows: any[] = [];
/**
* 值属性集合
*
* @type {*}
* @memberof AppVuePivotTable
*/
protected vals: any[] = [];
/**
* 隐藏列集合
*
* @type {*}
* @memberof AppVuePivotTable
*/
protected hiddenFromDragDrop: any[] = [];
/**
* 展现列集合
*
* @type {*}
* @memberof AppVuePivotTable
*/
protected columns: any[] = [];
/**
* 语言资源
*
* @type {*}
* @memberof AppVuePivotTable
*/
protected locales: any = {
aggregators: {
'Count': 'Count',
'Count Unique Values': 'Count Unique Values',
'List Unique Values': 'List Unique Values',
'Sum': 'Sum',
'Integer Sum': 'Integer Sum',
'Average': 'Average',
'Median': 'Median',
'Sample Variance': 'Sample Variance',
'Sample Standard Deviation': 'Sample Standard Deviation',
'Minimum': 'Minimum',
'Maximum': 'Maximum',
'First': 'First',
'Last': 'Last',
'Sum over Sum': 'Sum over Sum',
'Sum as Fraction of Total': 'Sum as Fraction of Total',
'Sum as Fraction of Rows': 'Sum as Fraction of Rows',
'Sum as Fraction of Columns': 'Sum as Fraction of Columns',
'Count as Fraction of Total': 'Count as Fraction of Total',
'Count as Fraction of Rows': 'Count as Fraction of Rows',
'Count as Fraction of Columns': 'Count as Fraction of Columns'
},
renderer: {
'Table': 'Table',
'Table Heatmap': 'Table Heatmap',
'Table Col Heatmap': 'Table Col Heatmap',
'Table Row Heatmap': 'Table Row Heatmap',
'Expor Table TSV': 'Expor Table TSV',
'Grouped Column Chart': 'Grouped Column Chart',
'Stacked Column Chart': 'Stacked Column Chart',
'Grouped Bar Chart': 'Grouped Bar Chart',
'Stacked Bar Chart': 'Stacked Bar Chart',
'Line Chart': 'Line Chart',
'Dot Chart': 'Dot Chart',
'Area Chart': 'Area Chart',
'Scatter Chart': 'Scatter Chart',
'Multiple Pie Chart': 'Multiple Pie Chart'
},
'Filter Values': 'Filter Values',
'Select All': 'Select All',
'Deselect All': 'Deselect All',
'Totals': 'Totals'
};
/**
* 生命周期
*
* @type {*}
* @memberof AppVuePivotTable
*/
public created() {
if(this.allColumns) {
this.allColumns.forEach((item: any) => {
if(!item.show) {
this.hiddenFromDragDrop.push(item.name);
}
let col: any = { ...item };
col.prop = col.name;
this.columns.push(col);
});
}
}
/**
* 事件
*
* @type {*}
* @memberof AppVuePivotTable
*/
public onChange(evt: any) {
console.log(evt);
}
}
</script>
<style lang="less">
.app-vue-pivottable {
height: calc(100% - 1px);
.pvtTable {
min-width: 100%;
}
}
</style>
\ No newline at end of file
...@@ -3,9 +3,14 @@ ...@@ -3,9 +3,14 @@
<span v-if="ifEmpty">{{$t('codelist.'+tag+'.empty')}}</span> <span v-if="ifEmpty">{{$t('codelist.'+tag+'.empty')}}</span>
<template v-if="!ifEmpty"> <template v-if="!ifEmpty">
<template v-for="(item, index) in items"> <template v-for="(item, index) in items">
<span>{{ index != 0 ? textSeparator : ''}}</span> <div class="codelist-item" :key="index">
<i v-if="item.iconCls" :class="item.iconCls"></i> <i v-if="item.iconcls" :class="item.iconcls"></i>
<span :class="item.textCls" :style="{color:item.color}">{{isUseLangres ? $t(item.text) : item.text}}</span> <img v-if="item.icon" :src="getIcon(item.icon)" />
<span :class="item.class" :style="{ color: item.color }">
{{ isUseLangres ? $t(item.text) : item.text }}
</span>
<span v-if="index != items.length-1">{{ textSeparator }}</span>
</div>
</template> </template>
</template> </template>
</div> </div>
...@@ -14,6 +19,7 @@ ...@@ -14,6 +19,7 @@
<script lang="ts"> <script lang="ts">
import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator';
import CodeListService from "@/codelist/codelist-service"; import CodeListService from "@/codelist/codelist-service";
import { Environment } from '@/environments/environment';
@Component({}) @Component({})
export default class CodeList extends Vue { export default class CodeList extends Vue {
...@@ -288,14 +294,66 @@ export default class CodeList extends Vue { ...@@ -288,14 +294,66 @@ export default class CodeList extends Vue {
} }
} }
/**
* 获取图片路径
*
* @param {*} arg
* @returns
* @memberof CodeList
*/
public getIcon(arg:any){
if(!arg){
return;
}
if(Object.prototype.toString.call(arg)=="[object String]"){
try {
let targetData:any = JSON.parse(arg);
if(Object.prototype.toString.call(targetData) == "[object Array]"){
if(targetData && targetData.length >0){
let fileId:string = targetData[0] && targetData[0].id;
return Environment.BaseUrl + Environment.ExportFile + fileId;
}
}else if(Object.prototype.toString.call(targetData) === '[object Object]'){
let fileId:string = targetData && targetData.id;
return Environment.BaseUrl + Environment.ExportFile + fileId;
}
} catch (error) {
return arg;
}
}else if(Object.prototype.toString.call(arg) == "[object Array]"){
if(arg && arg.length >0){
let fileId:string = arg[0] && arg[0].id;
return Environment.BaseUrl + Environment.ExportFile + fileId;
}
}else if(Object.prototype.toString.call(arg) === '[object Object]'){
let fileId:string = arg && arg.id;
return Environment.BaseUrl + Environment.ExportFile + fileId;
}else{
return arg;
}
}
} }
</script> </script>
<style lang='less'> <style lang='less'>
.codelist { .codelist {
display: flex;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
word-break: break-all; word-break: break-all;
overflow: hidden; overflow: hidden;
.codelist-item{
display: flex;
align-items: center;
max-height: 32px;
padding: 0px 3px;
> img{
max-height: 32px;
width: auto;
margin-right: 6px;
border-radius: 50%;
}
}
} }
</style> </style>
\ No newline at end of file
...@@ -265,9 +265,8 @@ export default class DropDownList extends Vue { ...@@ -265,9 +265,8 @@ export default class DropDownList extends Vue {
this.loadData(); this.loadData();
} }
}); });
}else{
this.loadData();
} }
this.loadData();
} }
/** /**
......
.menu-icon {
padding-right: 6px;
}
\ No newline at end of file
...@@ -29,10 +29,10 @@ export class MenuIcon extends Vue { ...@@ -29,10 +29,10 @@ export class MenuIcon extends Vue {
public render(): any { public render(): any {
if (this.item) { if (this.item) {
if (this.item.iconcls) { if (this.item.iconcls) {
return <i class={this.item.iconcls} /> return <i class={[this.item.iconcls, 'menu-icon']} />
} }
if (this.item.icon) { if (this.item.icon) {
return <img src={this.item.icon} /> return <img class="menu-icon" src={this.item.icon} />
} }
} }
return <span /> return <span />
......
import MDViewEngine from './md-view-engine';
/**
* 视图引擎基础
*
* @export
* @class GridViewEngine
* @extends {MDViewEngine}
*/
export default class MapViewEngine extends MDViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof GridViewEngine
*/
protected map: any;
/**
* Creates an instance of GridViewEngine.
* @memberof MapViewEngine
*/
constructor() {
super();
}
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof MapViewEngine
*/
public init(options: any = {}): void {
this.map = options.map;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof MapViewEngine
*/
public load(opts: any = {},isnotify:boolean=false): void {
if(!this.view.isformDruipart){
super.load(opts, isnotify);
}else{
if(isnotify){
super.load(opts, isnotify);
}
}
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof MapViewEngine
*/
public getMDCtrl(): any {
return this.map;
}
}
\ No newline at end of file
import MapViewEngine from './map-view-engine';
/**
* 视图引擎基础
*
* @export
* @class GridViewEngine
* @extends {MDViewEngine}
*/
export default class MapView9Engine extends MapViewEngine {
}
\ No newline at end of file
...@@ -197,7 +197,13 @@ export default class ViewEngine { ...@@ -197,7 +197,13 @@ export default class ViewEngine {
if(_item && _item['dataaccaction'] && _this.view.appUIService){ if(_item && _item['dataaccaction'] && _this.view.appUIService){
let dataActionResult:any; let dataActionResult:any;
if (_item.uiaction && (Object.is(_item.uiaction.target, "NONE") || Object.is(_item.uiaction.target, ""))){ if (_item.uiaction && (Object.is(_item.uiaction.target, "NONE") || Object.is(_item.uiaction.target, ""))){
dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']); if(Object.is(_item.uiaction.target, "") && Object.is(_item.uiaction.tag, "Save")){
if(data && Object.keys(data).length >0){
dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}else{
dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']);
}
}else{ }else{
if(data && Object.keys(data).length >0){ if(data && Object.keys(data).length >0){
dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']]; dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
......
...@@ -18,13 +18,15 @@ export default class WFDynaEditViewEngine extends EditViewEngine { ...@@ -18,13 +18,15 @@ export default class WFDynaEditViewEngine extends EditViewEngine {
} }
/** /**
* 表单加载完成 * 引擎加载
* *
* @param {*} args * @param {*} [opts={}]
* @memberof WFDynaEditViewEngine * @memberof WFDynaEditViewEngine
*/ */
public onFormLoad(arg: any): void { public load(opts: any = {}): void {
super.onFormLoad(arg); if(this.view.getWFLinkModel && this.view.getWFLinkModel instanceof Function){
this.view.getWFLinkModel(); this.view.getWFLinkModel();
}
} }
} }
\ No newline at end of file
...@@ -375,5 +375,19 @@ export default { ...@@ -375,5 +375,19 @@ export default {
false: 'False', false: 'False',
deleteImageFailure:'Image deletion failed', deleteImageFailure:'Image deletion failed',
updateFailure: 'Batch update file failed', updateFailure: 'Batch update file failed',
} },
appMapPosition: {
submit: 'Submit',
title: 'Please select address'
},
appSortBar: {
title: 'Sort'
},
appAfterTime:{
minutesAgo: 'minutes ago',
hoursAgo: 'hours ago',
dayAgo: 'days ago',
monthsAgo: 'months ago',
yearsAgo: 'years ago'
}
}; };
\ No newline at end of file
...@@ -376,5 +376,19 @@ export default { ...@@ -376,5 +376,19 @@ export default {
false: '取消', false: '取消',
deleteImageFailure:'删除图片失败', deleteImageFailure:'删除图片失败',
updateFailure: '批量更新文件失败', updateFailure: '批量更新文件失败',
} },
appMapPosition: {
submit: '确认',
title: '请选择地址'
},
appSortBar: {
title: '排序'
},
appAfterTime:{
minutesAgo: '分钟前',
hoursAgo: '小时前',
dayAgo: '天前',
monthsAgo: '月前',
yearsAgo: '年前'
}
}; };
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</div> </div>
<div class='content-container'> <div class='content-container'>
<div style='margin-bottom: 6px;'> <div style='margin-bottom: 6px;'>
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' placeholder="名称" /> <i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;padding-left: 24px' placeholder="名称" />
<div class='pull-right'> <div class='pull-right'>
<div class='toolbar-container'> <div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
......
...@@ -15,6 +15,15 @@ import 'view-design/dist/styles/iview.css'; ...@@ -15,6 +15,15 @@ import 'view-design/dist/styles/iview.css';
import 'ibiz-vue-lib/lib/ibiz-vue-lib.css'; import 'ibiz-vue-lib/lib/ibiz-vue-lib.css';
import '@/styles/default.less'; import '@/styles/default.less';
import VueAMap from 'vue-amap';
Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
key: '6ab2751103aea67e817c90a5528181b5',
plugin: ["AMap.Geolocation","AMap.PlaceSearch","AMap.Geocoder", "AMap.Autocomplete"],
uiVersion: '1.1'
});
// 模拟数据 // 模拟数据
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
require('@/mock'); require('@/mock');
......
...@@ -184,4 +184,18 @@ export default class SDFileServiceBase extends EntityService { ...@@ -184,4 +184,18 @@ export default class SDFileServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/sdfiles/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/sdfiles/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SDFileServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sdfiles/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -9,4 +9,6 @@ declare module '@fullcalendar/list'; ...@@ -9,4 +9,6 @@ declare module '@fullcalendar/list';
declare module '@fullcalendar/interaction'; declare module '@fullcalendar/interaction';
declare module 'vue-grid-layout'; declare module 'vue-grid-layout';
declare module 'vue-print-nb'; declare module 'vue-print-nb';
declare module 'vuedraggable'; declare module 'vuedraggable';
\ No newline at end of file declare module 'ibiz-vue-pivottable';
declare module 'vue-amap';
\ No newline at end of file
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
border-color: rgb(221, 221, 221); border-color: rgb(221, 221, 221);
border-style: solid; border-style: solid;
border-width: 0px 0px 1px; border-width: 0px 0px 1px;
margin: 0px 0px 11px; margin: 0px 0px 6px;
padding: 6px 0px 2px; padding: 6px 0px 2px;
> .header-container{ > .header-container{
min-height: 42px; min-height: 42px;
......
...@@ -13,6 +13,6 @@ ...@@ -13,6 +13,6 @@
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<script src="./environments/environment.js"></script> <script src="./environments/environment.js"></script>
<script src="../assets/js/avue.min.js"></script> <script src="./assets/js/avue.min.js"></script>
</body> </body>
</html> </html>
...@@ -345,6 +345,14 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -345,6 +345,14 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public formKeyItemName: string = ''; public formKeyItemName: string = '';
/**
* 是否自动加载
*
* @type {boolean}
* @memberof MainBase
*/
@Prop({default:false}) public isautoload?:boolean;
/** /**
* 界面UI服务对象 * 界面UI服务对象
* *
...@@ -724,34 +732,40 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -724,34 +732,40 @@ export default class MainBase extends Vue implements ControlInterface {
startOp(true); startOp(true);
return falg; return falg;
} }
// 常规规则 try {
if(item.type == 'SIMPLE'){ // 常规规则
startOp(!this.$verify.checkFieldSimpleRule(dataValue,item.condOP,item.paramValue,item.ruleInfo,item.paramType,this.data,item.isKeyCond)); if(item.type == 'SIMPLE'){
falg.infoMessage = item.ruleInfo; startOp(!this.$verify.checkFieldSimpleRule(dataValue,item.condOP,item.paramValue,item.ruleInfo,item.paramType,this.data,item.isKeyCond));
if(!falg.isPast) return falg; falg.infoMessage = item.ruleInfo;
} if(!falg.isPast) return falg;
// 数值范围 }
if(item.type == 'VALUERANGE2'){ // 数值范围
startOp( !this.$verify.checkFieldValueRangeRule(dataValue,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond)); if(item.type == 'VALUERANGE2'){
falg.infoMessage = item.ruleInfo; startOp( !this.$verify.checkFieldValueRangeRule(dataValue,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond));
if(!falg.isPast) return falg; falg.infoMessage = item.ruleInfo;
} if(!falg.isPast) return falg;
// 正则式 }
if (item.type == "REGEX") { // 正则式
startOp(!this.$verify.checkFieldRegExRule(dataValue,item.regExCode,item.ruleInfo,item.isKeyCond)); if (item.type == "REGEX") {
falg.infoMessage = item.ruleInfo; startOp(!this.$verify.checkFieldRegExRule(dataValue,item.regExCode,item.ruleInfo,item.isKeyCond));
if(!falg.isPast) return falg; falg.infoMessage = item.ruleInfo;
} if(!falg.isPast) return falg;
// 长度 }
if (item.type == "STRINGLENGTH") { // 长度
startOp(!this.$verify.checkFieldStringLengthRule(dataValue,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond)); if (item.type == "STRINGLENGTH") {
falg.infoMessage = item.ruleInfo; startOp(!this.$verify.checkFieldStringLengthRule(dataValue,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond));
if(!falg.isPast) return falg; falg.infoMessage = item.ruleInfo;
} if(!falg.isPast) return falg;
// 系统值规则 }
if(item.type == "SYSVALUERULE") { // 系统值规则
startOp(!this.$verify.checkFieldSysValueRule(dataValue,item.sysRule.regExCode,item.ruleInfo,item.isKeyCond)); if(item.type == "SYSVALUERULE") {
startOp(!this.$verify.checkFieldSysValueRule(dataValue,item.sysRule.regExCode,item.ruleInfo,item.isKeyCond));
falg.infoMessage = item.ruleInfo;
if(!falg.isPast) return falg;
}
} catch(error) {
falg.infoMessage = item.ruleInfo; falg.infoMessage = item.ruleInfo;
startOp(false);
if(!falg.isPast) return falg; if(!falg.isPast) return falg;
} }
// 分组 // 分组
...@@ -766,7 +780,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -766,7 +780,7 @@ export default class MainBase extends Vue implements ControlInterface {
if(!falg.hasOwnProperty("isPast")){ if(!falg.hasOwnProperty("isPast")){
falg.isPast = true; falg.isPast = true;
} }
if(!this.data[name]){ if(!this.data[name] && this.data[name] != 0){
falg.isPast = true; falg.isPast = true;
} }
return falg; return falg;
...@@ -1444,6 +1458,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1444,6 +1458,9 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase * @memberof MainBase
*/ */
public afterCreated(){ public afterCreated(){
if(this.isautoload){
this.autoLoad({srfkey:this.context.documentcenter});
}
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
...@@ -2258,6 +2275,17 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2258,6 +2275,17 @@ export default class MainBase extends Vue implements ControlInterface {
public updateDefault(){ public updateDefault(){
} }
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof MainBase
*/
public onPanelDataChange(item:any,$event:any) {
Object.assign(item, $event, {rowDataState:'update'});
}
} }
</script> </script>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
} }
.app-form { .app-form {
overflow: auto; overflow: auto;
padding: 6px;
> .ivu-row { > .ivu-row {
> .ivu-tabs { > .ivu-tabs {
height: 100%; height: 100%;
......
...@@ -30,13 +30,13 @@ import java.util.List; ...@@ -30,13 +30,13 @@ import java.util.List;
@SpringBootApplication(exclude = { @SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
}) })
public class webApplication extends WebMvcConfigurerAdapter{ public class webApplication extends WebMvcConfigurerAdapter {
@Autowired @Autowired
SearchContextHandlerMethodArgumentResolver resolver; SearchContextHandlerMethodArgumentResolver resolver;
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(webApplication.class,args); SpringApplication.run(webApplication.class, args);
} }
@Override @Override
......
...@@ -25,8 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -25,8 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
@SpringBootApplication(exclude = { @SpringBootApplication(exclude = {
}) })
@ComponentScan(basePackages = {"cn.ibizlab"} @ComponentScan(basePackages = {"cn.ibizlab"}
// ,excludeFilters={ // ,excludeFilters = {
// @ComponentScan.Filter(type= org.springframework.context.annotation.FilterType.REGEX,pattern="cn.ibizlab.xxx.rest.xxx"), // @ComponentScan.Filter(type= org.springframework.context.annotation.FilterType.REGEX, pattern="cn.ibizlab.xxx.rest.xxx"),
// } // }
) )
@Import({ @Import({
...@@ -34,13 +34,13 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -34,13 +34,13 @@ import org.springframework.beans.factory.annotation.Autowired;
}) })
@EnableAsync @EnableAsync
@EnableScheduling @EnableScheduling
public class DevBootApplication extends WebMvcConfigurerAdapter{ public class DevBootApplication extends WebMvcConfigurerAdapter {
@Autowired @Autowired
SearchContextHandlerMethodArgumentResolver resolver; SearchContextHandlerMethodArgumentResolver resolver;
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(DevBootApplication.class,args); SpringApplication.run(DevBootApplication.class, args);
} }
@Override @Override
......
...@@ -44,7 +44,7 @@ public class SDFileSearchContext extends QueryWrapperContext<SDFile> { ...@@ -44,7 +44,7 @@ public class SDFileSearchContext extends QueryWrapperContext<SDFile> {
this.query=query; this.query=query;
if(!StringUtils.isEmpty(query)){ if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper -> this.getSearchCond().and( wrapper ->
wrapper.like("filename", query) wrapper.like("filename", query)
); );
} }
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"dedataset":[{"id":"Default" , "name":"DEFAULT"}], "dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }], "deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}] "datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
} }
], ],
"appmenus":[ "appmenus":[
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
"table_name":"IBZFILE", "table_name":"IBZFILE",
"system_id":"ibzdisk", "system_id":"ibzdisk",
"system_name":"ibzdisk", "system_name":"ibzdisk",
"module_id":"disk",
"module_name":"disk",
"fields":[ "fields":[
{ {
"fieldname":"FILEID" , "fieldname":"FILEID" ,
......
...@@ -19,7 +19,7 @@ import org.springframework.context.annotation.Import; ...@@ -19,7 +19,7 @@ import org.springframework.context.annotation.Import;
@ConditionalOnClass(apiRestConfiguration.class) @ConditionalOnClass(apiRestConfiguration.class)
@ConditionalOnWebApplication @ConditionalOnWebApplication
@EnableConfigurationProperties(apiServiceProperties.class) @EnableConfigurationProperties(apiServiceProperties.class)
public class apiAutoConfiguration implements ApplicationContextAware{ public class apiAutoConfiguration implements ApplicationContextAware {
protected ApplicationContext applicationContext; protected ApplicationContext applicationContext;
......
package cn.ibizlab.util.domain; package cn.ibizlab.util.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.alibaba.fastjson.annotation.JSONField; import lombok.Data;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import org.springframework.cglib.beans.BeanMap;
import org.springframework.data.annotation.Transient;
import org.springframework.util.StringUtils;
import java.io.Serializable; import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import lombok.Data;
@Data @Data
public class DTOBase implements Serializable { public class DTOBase implements Serializable {
...@@ -73,9 +77,44 @@ public class DTOBase implements Serializable { ...@@ -73,9 +77,44 @@ public class DTOBase implements Serializable {
return extensionparams; return extensionparams;
} }
@JsonIgnore
@JSONField(serialize = false)
@Transient
private BeanMap map;
private BeanMap getMap()
{
if(map==null) {
map=BeanMap.create(this);
}
return map;
}
public Object get(String field) {
String fieldRealName= DEFieldCacheMap.getFieldRealName(this.getClass(),field);
if(!StringUtils.isEmpty(fieldRealName)) {
return getMap().get(fieldRealName);
}
else {
return this.extensionparams.get(field.toLowerCase());
}
}
@JsonAnySetter @JsonAnySetter
public void set(String name, Object value) { public void set(String field, Object value) {
extensionparams.put(name.toLowerCase(), value); field=field.toLowerCase();
String fieldRealName=DEFieldCacheMap.getFieldRealName(this.getClass(),field);
if(!StringUtils.isEmpty(fieldRealName)) {
if (value == null) {
getMap().put(fieldRealName, null);
}
else {
getMap().put(fieldRealName, DEFieldCacheMap.fieldValueOf(this.getClass(), fieldRealName, value));
}
}
else {
this.extensionparams.put(field.toLowerCase(),value);
}
} }
} }
...@@ -15,12 +15,12 @@ public interface AuthenticationUserService extends UserDetailsService { ...@@ -15,12 +15,12 @@ public interface AuthenticationUserService extends UserDetailsService {
@Override @Override
@Cacheable( value="ibzuaa_users",key = "'getByUsername:'+#p0") @Cacheable( value="ibzuaa_users", key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByUsername(String username); AuthenticationUser loadUserByUsername(String username);
@Cacheable( value="ibzuaa_users",key = "'getByUsername:'+#p0") @Cacheable( value="ibzuaa_users", key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByLogin(String username,String password); AuthenticationUser loadUserByLogin(String username,String password);
@CacheEvict( value="ibzuaa_users",key = "'getByUsername:'+#p0") @CacheEvict( value="ibzuaa_users", key = "'getByUsername:'+#p0")
void resetByUsername(String username); void resetByUsername(String username);
} }
...@@ -26,39 +26,39 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im ...@@ -26,39 +26,39 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@Value("${ibiz.admin.userid:0100}") @Value("${ibiz.admin.userid:0100}")
private String adminuserid; private String adminuserid;
@Cacheable( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2") @Cacheable(value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public JSONObject getConfig(String cfgType,String targetType,String userId) public JSONObject getConfig(String cfgType,String targetType,String userId)
{ {
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){ if(StringUtils.isEmpty(userId) || StringUtils.isEmpty(cfgType) || StringUtils.isEmpty(targetType)) {
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",cfgType); throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",cfgType);
} }
IBZConfig config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()),false); IBZConfig config = this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()), false);
if(config==null) { if(config == null) {
config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(adminuserid).build()),false); config = this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(adminuserid).build()), false);
if(config==null) { if(config == null) {
return new JSONObject(); return new JSONObject();
} }
} }
return JSON.parseObject(config.getCfg()); return JSON.parseObject(config.getCfg());
} }
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2") @CacheEvict(value="ibzrt_configs", key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public boolean saveConfig(String cfgType,String targetType,String userId,JSONObject config) public boolean saveConfig(String cfgType, String targetType, String userId, JSONObject config)
{ {
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){ if(StringUtils.isEmpty(userId) || StringUtils.isEmpty(cfgType) || StringUtils.isEmpty(targetType)) {
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",cfgType); throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",cfgType);
} }
String cfg="{}"; String cfg = "{}";
if(config!=null){ if(config != null) {
cfg=JSONObject.toJSONString(config); cfg = JSONObject.toJSONString(config);
} }
return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build()); return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build());
} }
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2") @CacheEvict(value = "ibzrt_configs", key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public void resetConfig(String cfgType,String targetType,String userId) public void resetConfig(String cfgType, String targetType, String userId)
{ {
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){ if(StringUtils.isEmpty(userId) || StringUtils.isEmpty(cfgType) || StringUtils.isEmpty(targetType)) {
throw new BadRequestAlertException("重置配置失败,参数缺失","IBZConfig",cfgType); throw new BadRequestAlertException("重置配置失败,参数缺失","IBZConfig",cfgType);
} }
this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build())); this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()));
......
...@@ -11,9 +11,9 @@ import java.util.Map; ...@@ -11,9 +11,9 @@ import java.util.Map;
*/ */
public interface IBZDataAuditService { public interface IBZDataAuditService {
@Async("asyncExecutor") @Async("asyncExecutor")
void createAudit(HttpServletRequest request,EntityBase entity,Object idValue,Map<String, Audit> auditFields); void createAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields);
@Async("asyncExecutor") @Async("asyncExecutor")
void updateAudit(HttpServletRequest request, EntityBase beforeEntity, Object serviceObj, Object idValue, Map<String, Audit> auditFields); void updateAudit(HttpServletRequest request, EntityBase beforeEntity, Object serviceObj, Object idValue, Map<String, Audit> auditFields);
@Async("asyncExecutor") @Async("asyncExecutor")
void removeAudit(HttpServletRequest request,EntityBase entity,Object idValue,Map<String, Audit> auditFields); void removeAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields);
} }
\ No newline at end of file
...@@ -26,8 +26,8 @@ public class IBZUAAUserService implements AuthenticationUserService{ ...@@ -26,8 +26,8 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override @Override
public AuthenticationUser loadUserByUsername(String username) { public AuthenticationUser loadUserByUsername(String username) {
AuthenticationUser user=uaaFeignClient.loginByUsername(username); AuthenticationUser user = uaaFeignClient.loginByUsername(username);
if(user==null){ if(user == null) {
throw new BadRequestAlertException("登录失败","IBZUAAUser",username); throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
} }
return user; return user;
...@@ -35,9 +35,9 @@ public class IBZUAAUserService implements AuthenticationUserService{ ...@@ -35,9 +35,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override @Override
public AuthenticationUser loadUserByLogin(String username, String password) { public AuthenticationUser loadUserByLogin(String username, String password) {
String[] data=username.split("[|]"); String[] data = username.split("[|]");
String loginname=username; String loginname = username;
String domains=""; String domains = "";
if(data.length==2) { if(data.length==2) {
loginname=data[0].trim(); loginname=data[0].trim();
...@@ -47,9 +47,9 @@ public class IBZUAAUserService implements AuthenticationUserService{ ...@@ -47,9 +47,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
logininfo.setDomain(domains); logininfo.setDomain(domains);
logininfo.setLoginname(loginname); logininfo.setLoginname(loginname);
logininfo.setPassword(password); logininfo.setPassword(password);
AuthenticationUser user=uaaFeignClient.login(logininfo); AuthenticationUser user = uaaFeignClient.login(logininfo);
if(user==null){ if(user == null){
throw new BadRequestAlertException("登录失败","IBZUAAUser",username); throw new BadRequestAlertException("登录失败","IBZUAAUser", username);
} }
return user; return user;
} }
......
...@@ -49,19 +49,19 @@ public class RemoteService { ...@@ -49,19 +49,19 @@ public class RemoteService {
*/ */
public interface RemoteFeignClient { public interface RemoteFeignClient {
@RequestMapping(method = RequestMethod.POST, value = "/{path}") @RequestMapping(method = RequestMethod.POST, value = "/{path}")
JSONObject post( @PathVariable("path") String path, @RequestHeader("Authorization") String token,@RequestBody Map param); JSONObject post( @PathVariable("path") String path, @RequestHeader("Authorization") String token, @RequestBody Map param);
@RequestMapping(method = RequestMethod.GET, value = "/{path}") @RequestMapping(method = RequestMethod.GET, value = "/{path}")
JSONObject request( @PathVariable("path") String path, @RequestHeader("Authorization") String token,Map param); JSONObject request( @PathVariable("path") String path, @RequestHeader("Authorization") String token, Map param);
@RequestMapping(method = RequestMethod.GET, value = "/{path}") @RequestMapping(method = RequestMethod.GET, value = "/{path}")
JSONObject get( @PathVariable("path") String path, @RequestHeader("Authorization") String token); JSONObject get( @PathVariable("path") String path, @RequestHeader("Authorization") String token);
@RequestMapping(method = RequestMethod.PUT, value = "/{path}") @RequestMapping(method = RequestMethod.PUT, value = "/{path}")
JSONObject put( @PathVariable("path") String path, @RequestHeader("Authorization") String token,@RequestBody Map param); JSONObject put( @PathVariable("path") String path, @RequestHeader("Authorization") String token,@RequestBody Map param);
@RequestMapping(method = RequestMethod.DELETE, value = "/{path}") @RequestMapping(method = RequestMethod.DELETE, value = "/{path}")
JSONObject delete( @PathVariable("path") String path, @RequestHeader("Authorization") String token); JSONObject delete(@PathVariable("path") String path, @RequestHeader("Authorization") String token);
} }
/** /**
...@@ -115,6 +115,4 @@ public class RemoteService { ...@@ -115,6 +115,4 @@ public class RemoteService {
final HttpMessageConverters httpMessageConverters = new HttpMessageConverters(jsonConverter); final HttpMessageConverters httpMessageConverters = new HttpMessageConverters(jsonConverter);
return () -> httpMessageConverters; return () -> httpMessageConverters;
} }
} }
\ No newline at end of file
...@@ -68,7 +68,7 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -68,7 +68,7 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
public void createAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields) { public void createAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields) {
IBZDataAudit dataAudit = new IBZDataAudit(); IBZDataAudit dataAudit = new IBZDataAudit();
dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid()); dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid());
dataAudit.setOppersonname(String.format("%s[%s]",AuthenticationUser.getAuthenticationUser().getPersonname(),AuthenticationUser.getAuthenticationUser().getOrgname())); dataAudit.setOppersonname(String.format("%s[%s]", AuthenticationUser.getAuthenticationUser().getPersonname(), AuthenticationUser.getAuthenticationUser().getOrgname()));
dataAudit.setAudittype("CREATE"); dataAudit.setAudittype("CREATE");
dataAudit.setAuditobject(entity.getClass().getSimpleName()); dataAudit.setAuditobject(entity.getClass().getSimpleName());
dataAudit.setAuditobjectdata(idValue); dataAudit.setAuditobjectdata(idValue);
......
...@@ -31,14 +31,14 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod ...@@ -31,14 +31,14 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception {
Map<String, String[]> params = webRequest.getParameterMap(); Map<String, String[]> params = webRequest.getParameterMap();
LinkedHashMap<String,Object> set=new LinkedHashMap<>(); LinkedHashMap<String,Object> set = new LinkedHashMap<>();
for (String key : params.keySet()) { for (String key : params.keySet()) {
set.put(key,params.get(key)[0]); set.put(key,params.get(key)[0]);
} }
if((!set.containsKey("size")) ){ if((!set.containsKey("size")) ){
set.put("size",pageLimit); set.put("size", pageLimit);
} }
String json=objectMapper.writeValueAsString(set); String json = objectMapper.writeValueAsString(set);
return objectMapper.readValue(json,parameter.getParameterType()); return objectMapper.readValue(json, parameter.getParameterType());
} }
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ spring: ...@@ -3,7 +3,7 @@ spring:
cloud: cloud:
nacos: nacos:
discovery: discovery:
server-addr: 172.16.102.211:8848 server-addr: 172.16.100.243:8848
enabled: true enabled: true
eureka: eureka:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册