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

ibiz4j 发布系统代码 [ibz-lite,应用]

上级 a0387894
此差异已折叠。
...@@ -99,6 +99,8 @@ import AppAlertGroup from './components/app-alert-group/app-alert-group.vue' ...@@ -99,6 +99,8 @@ 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';
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
...@@ -213,5 +215,7 @@ export const AppComponents = { ...@@ -213,5 +215,7 @@ 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);
}, },
}; };
\ 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;
}
/** /**
* 获取静态代码表 * 获取静态代码表
* *
......
...@@ -114,6 +114,8 @@ export default class DstAppList { ...@@ -114,6 +114,8 @@ export default class DstAppList {
Object.assign(itemdata,{text:item.id}); Object.assign(itemdata,{text:item.id});
Object.assign(itemdata,{label:item.id}); Object.assign(itemdata,{label:item.id});
_items.push(itemdata); _items.push(itemdata);
}); });
} }
......
...@@ -114,6 +114,8 @@ export default class DstSystemList { ...@@ -114,6 +114,8 @@ export default class DstSystemList {
Object.assign(itemdata,{text:item.pssystemname}); Object.assign(itemdata,{text:item.pssystemname});
Object.assign(itemdata,{label:item.pssystemname}); Object.assign(itemdata,{label:item.pssystemname});
_items.push(itemdata); _items.push(itemdata);
}); });
} }
......
...@@ -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'>
......
.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
<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> <span v-if="index != 0">{{ textSeparator }}</span>
<span :class="item.textCls" :style="{color:item.color}">{{isUseLangres ? $t(item.text) : item.text}}</span> <i v-if="item.iconcls" :class="item.iconcls"></i>
<img v-if="item.icon" :src="getIcon(item.icon)" />
<span :class="item.class" :style="{ color: item.color }">
{{ isUseLangres ? $t(item.text) : item.text }}
</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,6 +294,45 @@ export default class CodeList extends Vue { ...@@ -288,6 +294,45 @@ 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>
...@@ -297,5 +342,16 @@ export default class CodeList extends Vue { ...@@ -297,5 +342,16 @@ export default class CodeList extends Vue {
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;
> 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();
} }
/** /**
......
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,9 @@ export default { ...@@ -375,5 +375,9 @@ 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'
} }
}; };
\ No newline at end of file
...@@ -376,5 +376,9 @@ export default { ...@@ -376,5 +376,9 @@ export default {
false: '取消', false: '取消',
deleteImageFailure:'删除图片失败', deleteImageFailure:'删除图片失败',
updateFailure: '批量更新文件失败', updateFailure: '批量更新文件失败',
},
appMapPosition: {
submit: '确认',
title: '请选择地址'
} }
}; };
\ No newline at end of file
...@@ -233,6 +233,44 @@ mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).re ...@@ -233,6 +233,44 @@ mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).re
return [status, data]; return [status, data];
}); });
// InitDefaultDataSource
mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/initdefaultdatasource$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: InitDefaultDataSource");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['pssystemid'];
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/initdefaultdatasource$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.pssystemid, tempValue.pssystemid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['pssystemid'] == tempValue['pssystemid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save // Save
mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Save"); console.groupCollapsed("实体:dstsystem 方法: Save");
......
...@@ -362,6 +362,7 @@ mock.onPost(new RegExp(/^\/metaentities\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)). ...@@ -362,6 +362,7 @@ mock.onPost(new RegExp(/^\/metaentities\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).
return [status, data]; return [status, data];
}); });
// Save // Save
mock.onPost(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/metaentities\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/metaentities\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
...@@ -649,3 +650,59 @@ mock.onGet(new RegExp(/^\/metaentities\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi ...@@ -649,3 +650,59 @@ mock.onGet(new RegExp(/^\/metaentities\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi
console.groupEnd(); console.groupEnd();
return [status, _items?_items:{}]; return [status, _items?_items:{}];
}); });
// GetDefaultModel
mock.onGet(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/metaentities\/([a-zA-Z0-9\-\;]{1,35})\/getdefaultmodel$/)).reply((config: any) => {
console.groupCollapsed("实体:metaentity 方法: GetDefaultModel");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['pssystemid','entity_id'];
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/metaentities\/([a-zA-Z0-9\-\;]{1,35})\/getdefaultmodel$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.entity_id, tempValue.entity_id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// GetDefaultModel
mock.onGet(new RegExp(/^\/metaentities\/([a-zA-Z0-9\-\;]{1,35})\/getdefaultmodel$/)).reply((config: any) => {
console.groupCollapsed("实体:metaentity 方法: GetDefaultModel");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['entity_id'];
const matchArray:any = new RegExp(/^\/metaentities\/([a-zA-Z0-9\-\;]{1,35})\/getdefaultmodel$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.entity_id, tempValue.entity_id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
...@@ -184,4 +184,18 @@ export default class BladeVisualServiceBase extends EntityService { ...@@ -184,4 +184,18 @@ export default class BladeVisualServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/bladevisuals/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/bladevisuals/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BladeVisualServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/bladevisuals/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -304,4 +304,26 @@ export default class DstAPIServiceBase extends EntityService { ...@@ -304,4 +304,26 @@ export default class DstAPIServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/dstapis/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/dstapis/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstAPIServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && context.dstmicroservice && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/dstmicroservices/${context.dstmicroservice}/dstapis/searchdefault`,tempData,isloading);
}
if(context.dstmicroservice && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstmicroservices/${context.dstmicroservice}/dstapis/searchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstapis/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -250,4 +250,22 @@ export default class DstAppServiceBase extends EntityService { ...@@ -250,4 +250,22 @@ export default class DstAppServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/dstapps/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/dstapps/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstAppServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/dstapps/searchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstapps/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -332,4 +332,26 @@ export default class DstComponentServiceBase extends EntityService { ...@@ -332,4 +332,26 @@ export default class DstComponentServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/dstcomponents/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/dstcomponents/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstComponentServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && context.dstapp && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/dstapps/${context.dstapp}/dstcomponents/searchdefault`,tempData,isloading);
}
if(context.dstapp && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstapps/${context.dstapp}/dstcomponents/searchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstcomponents/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -198,4 +198,18 @@ export default class DstConfigServiceBase extends EntityService { ...@@ -198,4 +198,18 @@ export default class DstConfigServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/dstconfigs/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/dstconfigs/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstConfigServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstconfigs/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -184,4 +184,18 @@ export default class DstDataSourceServiceBase extends EntityService { ...@@ -184,4 +184,18 @@ export default class DstDataSourceServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/dstdatasources/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/dstdatasources/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstDataSourceServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstdatasources/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -246,4 +246,22 @@ export default class DstMicroserviceServiceBase extends EntityService { ...@@ -246,4 +246,22 @@ export default class DstMicroserviceServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/dstmicroservices/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/dstmicroservices/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstMicroserviceServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/dstmicroservices/searchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstmicroservices/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -304,4 +304,26 @@ export default class DstRouterServiceBase extends EntityService { ...@@ -304,4 +304,26 @@ export default class DstRouterServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/dstrouters/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/dstrouters/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstRouterServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && context.dstapp && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/dstapps/${context.dstapp}/dstrouters/searchdefault`,tempData,isloading);
}
if(context.dstapp && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstapps/${context.dstapp}/dstrouters/searchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstrouters/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -156,6 +156,20 @@ export default class DstSystemServiceBase extends EntityService { ...@@ -156,6 +156,20 @@ export default class DstSystemServiceBase extends EntityService {
return res; return res;
} }
/**
* InitDefaultDataSource接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstSystemServiceBase
*/
public async InitDefaultDataSource(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/dstsystems/${context.dstsystem}/initdefaultdatasource`,data,isloading);
return res;
}
/** /**
* Save接口方法 * Save接口方法
* *
...@@ -201,4 +215,18 @@ export default class DstSystemServiceBase extends EntityService { ...@@ -201,4 +215,18 @@ export default class DstSystemServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/dstsystems/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/dstsystems/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstSystemServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -304,4 +304,26 @@ export default class DstViewServiceBase extends EntityService { ...@@ -304,4 +304,26 @@ export default class DstViewServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/dstviews/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/dstviews/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstViewServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && context.dstapp && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/dstapps/${context.dstapp}/dstviews/searchdefault`,tempData,isloading);
}
if(context.dstapp && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstapps/${context.dstapp}/dstviews/searchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstviews/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -304,4 +304,26 @@ export default class MetaDataSetServiceBase extends EntityService { ...@@ -304,4 +304,26 @@ export default class MetaDataSetServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/metadatasets/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/metadatasets/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaDataSetServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && context.metaentity && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/metaentities/${context.metaentity}/metadatasets/searchdefault`,tempData,isloading);
}
if(context.metaentity && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metaentities/${context.metaentity}/metadatasets/searchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metadatasets/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -207,6 +207,26 @@ export default class MetaEntityServiceBase extends EntityService { ...@@ -207,6 +207,26 @@ export default class MetaEntityServiceBase extends EntityService {
return res; return res;
} }
/**
* GetDefaultModel接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaEntityServiceBase
*/
public async GetDefaultModel(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && context.metaentity){
let res:any = await Http.getInstance().get(`/dstsystems/${context.dstsystem}/metaentities/${context.metaentity}/getdefaultmodel`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/metaentities/${context.metaentity}/getdefaultmodel`,isloading);
return res;
}
/** /**
* Save接口方法 * Save接口方法
* *
...@@ -250,4 +270,22 @@ export default class MetaEntityServiceBase extends EntityService { ...@@ -250,4 +270,22 @@ export default class MetaEntityServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/metaentities/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/metaentities/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaEntityServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/metaentities/searchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metaentities/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -304,4 +304,26 @@ export default class MetaFieldServiceBase extends EntityService { ...@@ -304,4 +304,26 @@ export default class MetaFieldServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/metafields/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/metafields/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaFieldServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && context.metaentity && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/metaentities/${context.metaentity}/metafields/searchdefault`,tempData,isloading);
}
if(context.metaentity && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metaentities/${context.metaentity}/metafields/searchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metafields/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -198,4 +198,18 @@ export default class MetaModelServiceBase extends EntityService { ...@@ -198,4 +198,18 @@ export default class MetaModelServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/metamodels/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/metamodels/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaModelServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metamodels/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -184,4 +184,18 @@ export default class MetaModuleServiceBase extends EntityService { ...@@ -184,4 +184,18 @@ export default class MetaModuleServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/metamodules/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/metamodules/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaModuleServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metamodules/searchdefault`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -304,4 +304,26 @@ export default class MetaRelationshipServiceBase extends EntityService { ...@@ -304,4 +304,26 @@ export default class MetaRelationshipServiceBase extends EntityService {
let res:any = Http.getInstance().get(`/metarelationships/fetchdefault`,tempData,isloading); let res:any = Http.getInstance().get(`/metarelationships/fetchdefault`,tempData,isloading);
return res; return res;
} }
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaRelationshipServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && context.metaentity && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/metaentities/${context.metaentity}/metarelationships/searchdefault`,tempData,isloading);
}
if(context.metaentity && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metaentities/${context.metaentity}/metarelationships/searchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metarelationships/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;
......
...@@ -235,6 +235,14 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -235,6 +235,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服务对象
* *
...@@ -569,34 +577,40 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -569,34 +577,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;
} }
// 分组 // 分组
...@@ -611,7 +625,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -611,7 +625,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;
...@@ -1154,6 +1168,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1154,6 +1168,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)) {
...@@ -1968,6 +1985,17 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1968,6 +1985,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>
......
...@@ -252,6 +252,14 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -252,6 +252,14 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public formKeyItemName: string = 'apiid'; public formKeyItemName: string = 'apiid';
/**
* 是否自动加载
*
* @type {boolean}
* @memberof MainBase
*/
@Prop({default:false}) public isautoload?:boolean;
/** /**
* 界面UI服务对象 * 界面UI服务对象
* *
...@@ -591,34 +599,40 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -591,34 +599,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;
} }
// 分组 // 分组
...@@ -633,7 +647,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -633,7 +647,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;
...@@ -1191,6 +1205,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1191,6 +1205,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)) {
...@@ -2012,6 +2029,17 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2012,6 +2029,17 @@ export default class MainBase extends Vue implements ControlInterface {
} }
} }
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof MainBase
*/
public onPanelDataChange(item:any,$event:any) {
Object.assign(item, $event, {rowDataState:'update'});
}
} }
</script> </script>
......
...@@ -305,6 +305,14 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -305,6 +305,14 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public formKeyItemName: string = 'appid'; public formKeyItemName: string = 'appid';
/**
* 是否自动加载
*
* @type {boolean}
* @memberof MainBase
*/
@Prop({default:false}) public isautoload?:boolean;
/** /**
* 界面UI服务对象 * 界面UI服务对象
* *
...@@ -658,34 +666,40 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -658,34 +666,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;
} }
// 分组 // 分组
...@@ -700,7 +714,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -700,7 +714,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;
...@@ -1288,6 +1302,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1288,6 +1302,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)) {
...@@ -2109,6 +2126,17 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2109,6 +2126,17 @@ export default class MainBase extends Vue implements ControlInterface {
} }
} }
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof MainBase
*/
public onPanelDataChange(item:any,$event:any) {
Object.assign(item, $event, {rowDataState:'update'});
}
} }
</script> </script>
......
...@@ -305,6 +305,14 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -305,6 +305,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服务对象
* *
...@@ -654,34 +662,40 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -654,34 +662,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;
} }
// 分组 // 分组
...@@ -696,7 +710,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -696,7 +710,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;
...@@ -1284,6 +1298,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1284,6 +1298,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)) {
...@@ -2110,6 +2127,17 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2110,6 +2127,17 @@ export default class MainBase extends Vue implements ControlInterface {
} }
} }
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof MainBase
*/
public onPanelDataChange(item:any,$event:any) {
Object.assign(item, $event, {rowDataState:'update'});
}
} }
</script> </script>
......
...@@ -238,6 +238,14 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -238,6 +238,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服务对象
* *
...@@ -578,34 +586,40 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -578,34 +586,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;
} }
// 分组 // 分组
...@@ -620,7 +634,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -620,7 +634,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;
...@@ -1193,6 +1207,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1193,6 +1207,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)) {
...@@ -2013,6 +2030,17 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2013,6 +2030,17 @@ export default class MainBase extends Vue implements ControlInterface {
} }
} }
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof MainBase
*/
public onPanelDataChange(item:any,$event:any) {
Object.assign(item, $event, {rowDataState:'update'});
}
} }
</script> </script>
......
...@@ -231,6 +231,14 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -231,6 +231,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服务对象
* *
...@@ -564,34 +572,40 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -564,34 +572,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;
} }
// 分组 // 分组
...@@ -606,7 +620,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -606,7 +620,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;
...@@ -1134,6 +1148,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1134,6 +1148,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)) {
...@@ -1948,6 +1965,17 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1948,6 +1965,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>
......
package cn.ibizlab.core.extensions.service;
import cn.ibizlab.core.lite.service.impl.MetaEntityServiceImpl;
import lombok.extern.slf4j.Slf4j;
import cn.ibizlab.core.lite.domain.MetaEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Primary;
import java.util.*;
/**
* 实体[实体] 自定义服务对象
*/
@Slf4j
@Primary
@Service("MetaEntityExService")
public class MetaEntityExService extends MetaEntityServiceImpl {
@Override
protected Class currentModelClass() {
return com.baomidou.mybatisplus.core.toolkit.ReflectionKit.getSuperClassGenericType(this.getClass().getSuperclass(), 1);
}
/**
* [GetDefaultModel:GetDefaultModel] 行为扩展
* @param et
* @return
*/
@Override
@Transactional
public MetaEntity getDefaultModel(MetaEntity et) {
return super.getDefaultModel(et);
}
}
...@@ -34,6 +34,7 @@ public interface IDstSystemService extends IService<DstSystem> { ...@@ -34,6 +34,7 @@ public interface IDstSystemService extends IService<DstSystem> {
DstSystem get(String key); DstSystem get(String key);
DstSystem getDraft(DstSystem et); DstSystem getDraft(DstSystem et);
boolean checkKey(DstSystem et); boolean checkKey(DstSystem et);
DstSystem initDefaultDataSource(DstSystem et);
boolean save(DstSystem et); boolean save(DstSystem et);
void saveBatch(List<DstSystem> list); void saveBatch(List<DstSystem> list);
DstSystem syncSysModel(DstSystem et); DstSystem syncSysModel(DstSystem et);
......
...@@ -34,6 +34,7 @@ public interface IMetaEntityService extends IService<MetaEntity> { ...@@ -34,6 +34,7 @@ public interface IMetaEntityService extends IService<MetaEntity> {
MetaEntity get(String key); MetaEntity get(String key);
MetaEntity getDraft(MetaEntity et); MetaEntity getDraft(MetaEntity et);
boolean checkKey(MetaEntity et); boolean checkKey(MetaEntity et);
MetaEntity getDefaultModel(MetaEntity et);
boolean save(MetaEntity et); boolean save(MetaEntity et);
void saveBatch(List<MetaEntity> list); void saveBatch(List<MetaEntity> list);
Page<MetaEntity> searchDefault(MetaEntitySearchContext context); Page<MetaEntity> searchDefault(MetaEntitySearchContext context);
......
...@@ -136,6 +136,13 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem ...@@ -136,6 +136,13 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
public boolean checkKey(DstSystem et) { public boolean checkKey(DstSystem et) {
return (!ObjectUtils.isEmpty(et.getPssystemid())) && (!Objects.isNull(this.getById(et.getPssystemid()))); return (!ObjectUtils.isEmpty(et.getPssystemid())) && (!Objects.isNull(this.getById(et.getPssystemid())));
} }
@Override
@Transactional
public DstSystem initDefaultDataSource(DstSystem et) {
//自定义代码
return et;
}
@Override @Override
@Transactional @Transactional
public boolean save(DstSystem et) { public boolean save(DstSystem et) {
......
...@@ -163,6 +163,13 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -163,6 +163,13 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
public boolean checkKey(MetaEntity et) { public boolean checkKey(MetaEntity et) {
return (!ObjectUtils.isEmpty(et.getEntityId())) && (!Objects.isNull(this.getById(et.getEntityId()))); return (!ObjectUtils.isEmpty(et.getEntityId())) && (!Objects.isNull(this.getById(et.getEntityId())));
} }
@Override
@Transactional
public MetaEntity getDefaultModel(MetaEntity et) {
//自定义代码
return et;
}
@Override @Override
@Transactional @Transactional
public boolean save(MetaEntity et) { public boolean save(MetaEntity et) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册