提交 61ff9297 编写于 作者: ibizdev's avatar ibizdev

lab_gzf 部署微服务应用

上级 9ca9ab83
## 修复请参考主模板,目前于2020-07-12合并master。[链接](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7plus/blob/master/CHANGELOG.md)
## 修复请参考主模板,目前于2020-08-03合并master。[链接](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7plus/blob/master/CHANGELOG.md)
## 0.0.1-alpha.1「2020-07-15」
......
{
"name": "ibiz-studio-ftl",
"version": "0.0.1",
"license": "MIT",
"scripts": {
"serve": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service serve --mode development",
"dev-serve": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service serve --mode development",
......@@ -49,16 +50,13 @@
},
"devDependencies": {
"@types/echarts": "^4.4.3",
"@types/jest": "^24.0.19",
"@types/mockjs": "^1.0.2",
"@types/qs": "^6.9.0",
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-typescript": "^4.1.0",
"@vue/cli-plugin-unit-jest": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/test-utils": "1.0.0-beta.29",
"@vue/cli-plugin-babel": "^4.4.6",
"@vue/cli-plugin-router": "^4.4.6",
"@vue/cli-plugin-typescript": "^4.4.6",
"@vue/cli-plugin-vuex": "^4.4.6",
"@vue/cli-service": "^4.4.6",
"axios-mock-adapter": "^1.17.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
......
<template>
<div class="appAddressSelection">
<el-cascader
style="width:100%"
:disabled="disabled"
size ="medium"
v-model="CurrentVal"
......@@ -14,6 +15,7 @@ import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import axios from 'axios';
import { cityCode } from './city_code'
@Component({})
export default class AppAddressSelection extends Vue {
......@@ -63,12 +65,7 @@ export default class AppAddressSelection extends Vue {
* @memberof AppAddressSelection
*/
public getcity() {
axios.get("../../assets/json/city_code.json").then((response: any) => {
this.format(response.data);
}).catch((response: any) => {
console.log((this.$t('components.appAddressSelection.loadDataFail') as string));
});
this.format(cityCode);
}
/**
......@@ -86,11 +83,11 @@ export default class AppAddressSelection extends Vue {
* @memberof AppAddressSelection
*/
public format(data :any) {
let data1 = JSON.parse(JSON.stringify(data).replace(/city/g, 'children'))
let data2 = JSON.parse(JSON.stringify(data1).replace(/name/g, 'label'))
let data3 = JSON.parse(JSON.stringify(data2).replace(/area/g, 'children'))
let data4 = JSON.parse(JSON.stringify(data3).replace(/code/g, 'value'))
this.city = data4;
let town = JSON.parse(JSON.stringify(data).replace(/city/g, 'children'))
let county = JSON.parse(JSON.stringify(town).replace(/name/g, 'label'))
let city = JSON.parse(JSON.stringify(county).replace(/area/g, 'children'))
let province = JSON.parse(JSON.stringify(city).replace(/code/g, 'value'))
this.city = province;
}
}
......
......@@ -7,6 +7,7 @@
size='small'
:trigger-on-focus="true"
:fetch-suggestions="onSearch"
:sort="sort"
@select="onACSelect"
@input="onInput"
@blur="onBlur"
......@@ -123,6 +124,15 @@ export default class AppAutocomplete extends Vue {
*/
@Prop() public valueitem?: string;
/**
* 排序
*
* @type {string}
* @memberof AppAutocomplete
*/
@Prop() public sort?: string;
/**
* 值
*
......@@ -196,6 +206,9 @@ export default class AppAutocomplete extends Vue {
query = '';
}
this.inputState = false;
if(this.sort && !Object.is(this.sort, "")) {
Object.assign(_param, { sort: this.sort });
}
Object.assign(_param, { query: query });
// 错误信息国际化
let error: string = (this.$t('components.appAutocomplete.error') as any);
......
......@@ -30,6 +30,22 @@ export default class AppColumnLink extends Vue {
*/
@Prop() public linkview?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localParam!:any;
/**
* 值项名称
*
......@@ -54,14 +70,6 @@ export default class AppColumnLink extends Vue {
*/
@Prop({default:{}}) public viewparams?:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localParam!:any;
/**
* 应用实体主键属性名称
*
......@@ -289,9 +297,13 @@ export default class AppColumnLink extends Vue {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,JSON.parse(JSON.stringify(this.localParam)));
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
return true;
......
<template>
<div class="app-data-upload-view">
<el-row :gutter="20">
<el-row style="margin-top:24px" :gutter="20">
<el-col :span="4">
<el-button type="primary" @click="handleUpLoad">{{$t('components.appDataUploadView.selectfile')}}</el-button>
<input ref="inputUpLoad" type="file" style="display: none" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" @change="importFile"/>
......@@ -13,12 +13,12 @@
</el-col>
</el-row>
<el-divider></el-divider>
<el-row style="height:calc(100% - 128px);padding: 0px 12px;">
<el-row style="height:480px;padding: 0px 12px;">
<div class="data-info-content" >
<template v-if="importDataArray.length >0 && isUploading === false">
<ul>
<li v-for="(item,index) in importDataArray" :key="index" class="font-class">
{{$t('components.appDataUploadView.dataid')+item[importUniqueItem]+$t('components.appDataUploadView.read')+'......'}}
{{item[importUniqueItem]?$t('components.appDataUploadView.dataid')+item[importUniqueItem]+$t('components.appDataUploadView.read')+'......':$t('components.appDataUploadView.read')+'......'}}
</li>
</ul>
</template>
......@@ -285,7 +285,7 @@ export default class AppDataUploadView extends Vue {
this.importDataArray = [];
try{
this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{
service.ImportData(this.viewdata,{name:this.importId,data:tempDataArray}).then((res:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:tempDataArray}).then((res:any) =>{
const result:any = res.data;
if(result && result.rst !== 0){
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -295,6 +295,10 @@ export default class AppDataUploadView extends Vue {
this.importSuccessData = result.data;
this.promptInfo = (this.$t('components.appDataUploadView.completed') as string);
this.isUploading = false;
}).catch((error:any) =>{
this.isUploading = false;
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
console.error(error);
})
}).catch((error:any) =>{
this.isUploading = false;
......
.ivu-dropdown{
.ivu-dropdown-rel{
.tree-input{
.ivu-input-suffix{
width: auto;
text-align: right;
.icon-arrow{
margin-right: 4px;
.app-department-select{
.ivu-dropdown{
.ivu-dropdown-rel{
.tree-input{
.ivu-input-suffix{
width: auto;
text-align: right;
.icon-arrow{
margin-right: 4px;
}
}
.el-icon-circle-close{
display: none;
}
}
.el-icon-circle-close{
display: none;
.tree-input:hover{
.el-icon-circle-close{
display: inline-block;
}
}
}
.tree-input:hover{
.el-icon-circle-close{
display: inline-block;
.ivu-select-dropdown{
max-height: 200px;
overflow: scroll;
.tree-contant{
overflow:inherit;
}
}
}
.ivu-select-dropdown{
max-height: 200px;
overflow: scroll;
.tree-contant{
overflow:inherit;
}
.el-input__inner{
height: 32px;
line-height: 32px
}
.el-input__icon{
line-height: 32px;
}
}
......@@ -6,12 +6,16 @@
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
@viewdataschange="setValue(args)"
@viewdataschange="setValue($event)"
style="height:100%;">
</component>
</div>
<template v-if="placeholder">
<div v-if="value" class="app-embed-value">{{value}}</div>
<div v-if="value" class="app-embed-value">
<span v-for="(item,index) in value" :key="index">
{{item}}
</span>
</div>
<div v-else class="app-embed-placeholder">{{placeholder}}</div>
</template>
</div>
......@@ -174,8 +178,8 @@ export default class AppEmbedPicker extends Vue {
}
let arg: any = {};
// 合并视图上下文参数和视图参数
let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context));
arg.param = JSON.parse(JSON.stringify(this.viewparams));
arg.context = JSON.parse(JSON.stringify(this.context));
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
......@@ -185,8 +189,8 @@ export default class AppEmbedPicker extends Vue {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
this.viewdata = JSON.stringify(context);
this.viewparam = JSON.stringify(param);
this.viewdata = JSON.stringify(arg.context);
this.viewparam = JSON.stringify(arg.param);
}
/**
......@@ -243,11 +247,21 @@ export default class AppEmbedPicker extends Vue {
* @memberof AppEmbedPicker
*/
public setValue(item: any) {
if (this.valueItem) {
this.$emit('formitemvaluechange', { name: this.valueItem, value: item[0].srfkey });
}
if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: item[0].srfmajortext });
let selectsrfkey: Array<any> = [];
let selectsrfmajortext: Array<any> = [];
if(item && Array.isArray(item)){
item.forEach((select: any)=>{
selectsrfkey.push(select.srfkey);
selectsrfmajortext.push(select.srfmajortext);
})
if (this.valueItem) {
let value = selectsrfkey.length > 0 ? selectsrfkey : '';
this.$emit('formitemvaluechange', { name: this.valueItem, value: value });
}
if (this.name) {
let value = selectsrfmajortext.length > 0 ? selectsrfmajortext : '';
this.$emit('formitemvaluechange', { name: this.name, value: value });
}
}
}
......
.ivu-dropdown{
cursor: pointer;
}
\ No newline at end of file
<template>
<dropdown trigger='click' @on-click="selectLang">
<dropdown v-if="localList.length > 1" trigger='click' @on-click="selectLang">
<span>
{{title}}
<icon size='18' type='md-arrow-dropdown'></icon>
......
<template>
<div class="app-menu-item">
<template v-for="item in menus">
<template v-if="item.items && Array.isArray(item.items) && item.items.length > 0">
<el-submenu :class="[{'isCollpase' : appMenuCollapseFlag},item.textcls]" v-show="!item.hidden" :index="item.name" :popper-class="popperClass" :key="item.id">
<template slot='title'>
<template v-if="item.icon && item.icon != ''">
<img :src="item.icon" class='app-menu-icon' />
</template>
<template v-else-if="item.iconcls && item.iconcls != ''">
<i :class="[item.iconcls, 'app-menu-icon']"></i>
</template>
<template v-else>
<i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i>
</template>
<span ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template>
<app-menu-item :isCollapse="isCollapse" :menus="item.items" :ctrlName="ctrlName" :isFirst="false" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item>
</el-submenu>
</template>
<template v-else>
<template v-if="item.type =='MENUITEM'">
<el-menu-item :class="[{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id">
<template v-if="item.icon && item.icon != ''">
<img :src="item.icon" class='app-menu-icon' />
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template>
<template v-else-if="item.iconcls && item.iconcls != ''">
<i :class="[item.iconcls, 'app-menu-icon']"></i>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template>
<template v-else>
<i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template>
<template slot="title">
<span :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<template v-if="counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item.counterid]" :overflow-count="9999"></badge>
</span>
</template>
</template>
</el-menu-item>
</template>
<template v-if="item.type =='SEPERATOR'">
<divider :key="item.id" />
</template>
</template>
</template>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator';
@Component({})
export default class AppMenuItem extends Vue {
/**
* 菜单数据
*
* @type {*}
* @memberof AppMenuItem
*/
@Prop( {default: []} ) public menus!: any;
/**
* 部件名称
*
* @type {*}
* @memberof AppMenuItem
*/
@Prop() public ctrlName!: string;
/**
* 计数器数据
*
* @type {*}
* @memberof AppMenuItem
*/
@Prop() public counterdata!: any;
/**
* 提示框主题样式
*
* @type {*}
* @memberof AppMenuItem
*/
@Prop() public popperClass!: any;
/**
* 是否是一级菜单
*
* @type {*}
* @memberof AppMenuItem
*/
@Prop() public isFirst!: boolean;
/**
* 菜单是否缩进
*
* @type {*}
* @memberof AppMenuItem
*/
@Prop() public isCollapse!: boolean;
/**
* 菜单缩进,元素类名标记
*
* @type {*}
* @memberof AppMenuItem
*/
public appMenuCollapseFlag: boolean = false;
/**
* vue 生命周期
*
* @memberof AppIndexViewBase
*/
public mounted() {
this.onCollapsechangeChange();
}
/**
* 根据菜单缩进状态修改菜单项值
*/
onCollapsechangeChange() {
if(this.isCollapse && this.isFirst) {
this.appMenuCollapseFlag = true;
let appMenuCircle: any[] = this.$refs.circleText as any[];
if(appMenuCircle) {
appMenuCircle.forEach((item: any) => {
let text: string = (item.innerText as string).slice(0,1);
item.innerText = text;
})
}
}
}
}
</script>
\ No newline at end of file
.app-org-select {
width: 100%;
.el-input__inner{
height: 32px !important;
line-height: 32px !important;
}
.el-input__icon{
line-height: 32px;
}
}
\ No newline at end of file
......@@ -65,14 +65,36 @@ export default class AppOrgSector extends Vue {
* @memberof AppOrgSector
*/
public mounted() {
this.getData();
}
/**
* 获取数据
*
* @memberof AppOrgSector
*/
public getData(){
if (this.$store.getters.getAppData()) {
if (this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srforgsectorid && this.$store.getters.getAppData().context.srforgsectorname) {
let _context = this.$store.getters.getAppData().context;
let _srforgname = this.$store.getters.getAppData().context.srforgname;
let _srforgsectorname = this.$store.getters.getAppData().context.srforgsectorname;
if (_context && this.$store.getters.getAppData().context.srforgsectorid ){
this.selectedOrgId = this.$store.getters.getAppData().context.srforgsectorid;
this.selectedOrgName = this.$store.getters.getAppData().context.srforgsectorname;
} else {
return false;
}
if(_context && _srforgname && _srforgsectorname){
this.selectedOrgName = _srforgname + '-' + _srforgsectorname;
} else if (_context && _srforgname) {
this.selectedOrgName = _srforgname;
} else if (_context && _srforgsectorname) {
this.selectedOrgName = _srforgsectorname;
}
if (this.$store.getters.getAppData().srforgsections) {
this.selectedOrgArray = this.$store.getters.getAppData().srforgsections;
}
}
}
......
......@@ -8,14 +8,17 @@
:trigger-on-focus="true" :fetch-suggestions="(query, callback) => { this.onSearch(query, callback, true) }" @select="onACSelect"
@input="onInput" @blur="onBlur" style='width:100%;'>
<template v-slot:default="{item}">
<template v-if="item.isNew">
<!-- <template v-if="item.isNew">
<div v-if="linkview" @click="newAndEdit">{{$t('components.appPicker.newAndEdit')}}</div>
</template> -->
<template v-if="item.tag">
<div @click="clickAction(item.tag)">{{item.caption}}</div>
</template>
<slot v-else name="default" :item="item"></slot>
</template>
<template v-slot:suffix>
<i v-if="curvalue && !disabled" class='el-icon-circle-close' @click="onClear"></i>
<i v-if="!Object.is(editortype, 'ac')" class='el-icon-search' @click="openView"></i>
<i v-if="!Object.is(editortype, 'ac') && showButton" class='el-icon-search' @click="openView"></i>
<icon v-if="linkview" type="ios-open-outline" @click="openLinkView"/>
</template>
</el-autocomplete>
......@@ -37,7 +40,10 @@
@change="onSelect" :disabled="disabled" style='width:100%;' clearable
@clear="onClear" @visible-change="onSelectOpen">
<template v-if="items">
<el-option v-for="_item in items" :key="_item[deKeyField]" :value="_item[deKeyField]" :label="_item[deMajorField]" :disabled="_item.disabled"></el-option>
<template v-for="_item in items">
<el-option v-if="!_item.tag" :key="_item[deKeyField]" :value="_item[deKeyField]" :label="_item[deMajorField]" :disabled="_item.disabled"></el-option>
<el-option v-else :key="_item[deKeyField]" value="action"><span @click="clickAction(_item.tag)" style="float: left; width: 100%;">{{ _item.caption }}</span></el-option>
</template>
</template>
</el-select>
<span style='position: absolute;right: 5px;color: #c0c4cc;top:0;font-size: 13px;'>
......@@ -55,7 +61,6 @@ import { AppModal } from '@/utils';
@Component({
})
export default class AppPicker extends Vue {
/**
* 视图上下文
*
......@@ -128,13 +133,21 @@ export default class AppPicker extends Vue {
*/
@Prop() public disabled?: boolean;
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof AppPicker
*/
@Prop({default:true}) public showButton?: boolean;
/**
* 类型
*
* @type {string}
* @memberof AppPicker
*/
@Prop({ default: '' }) public editortype?: string;
@Prop() public editortype?: string;
/**
* 视图参数(如:视图name,title,width,height)
......@@ -177,19 +190,21 @@ export default class AppPicker extends Vue {
@Prop() public valueitem!: string;
/**
* 编辑器额外填充参数
* 排序
*
* @type {string}
* @memberof AppPicker
*/
@Prop() public extraFillParams?: any;
@Prop() public sort?: string;
/**
* 值格式
*
* 行为组
*
* @type {Array<any>}
* @memberof AppPicker
*/
@Prop() public valFormat?: any;
@Prop() public actionDetails?:Array<any>;
/**
* 值
......@@ -237,6 +252,14 @@ export default class AppPicker extends Vue {
*/
public selectValue = this.value;
/**
* 值格式
*
* @type {*}
* @memberof AppPicker
*/
@Prop() public valFormat?: any;
/**
* 获取关联数据项值
*
......@@ -260,7 +283,7 @@ export default class AppPicker extends Vue {
* @param {*} oldVal
* @memberof AppPicker
*/
@Watch('value')
@Watch('value',{immediate:true})
public onValueChange(newVal: any, oldVal: any) {
this.curvalue = newVal;
if (Object.is(this.editortype, 'dropdown') && this.valueitem) {
......@@ -283,9 +306,6 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public created() {
if(Object.is(this.editortype, 'dropdown')){
this.onSearch("", null, true);
}
if(!Object.is(this.editortype, 'pickup-no-ac') && !Object.is(this.editortype, 'dropdown')){
this.curvalue = this.value;
}
......@@ -338,6 +358,9 @@ export default class AppPicker extends Vue {
query = '';
}
this.inputState = false;
if(this.sort && !Object.is(this.sort, "")) {
Object.assign(_param, { sort: this.sort });
}
Object.assign(_param, { query: query, size: 1000 });
// 错误信息国际化
let error: string = (this.$t('components.appPicker.error') as any);
......@@ -356,8 +379,11 @@ export default class AppPicker extends Vue {
} else {
this.items = [...response];
}
if(this.acParams && this.linkview){
this.items.push({ isNew :true });
// if(this.acParams && this.linkview){
// this.items.push({ isNew :true });
// }
if(this.acParams && this.actionDetails && this.actionDetails.length >0){
this.items = [...this.items,...this.actionDetails];
}
if (callback) {
callback(this.items);
......@@ -376,16 +402,6 @@ export default class AppPicker extends Vue {
*/
public onACSelect(item: any): void {
this.selectValue = item[this.deMajorField];
if (isExist(this.extraFillParams)) {
for (const key in this.extraFillParams) {
if (this.extraFillParams.hasOwnProperty(key)) {
const self = this.extraFillParams[key];
if (isExist(item[self.key])) {
this.$emit('formitemvaluechange', { name: self.value, value: item[self.key]});
}
}
}
}
if (this.valueitem) {
this.$emit('formitemvaluechange', { name: this.valueitem, value: item[this.deKeyField] });
}
......@@ -419,14 +435,6 @@ export default class AppPicker extends Vue {
* 清除
*/
public onClear($event: any): void {
if (isExist(this.extraFillParams)) {
for (const key in this.extraFillParams) {
if (this.extraFillParams.hasOwnProperty(key)) {
const self = this.extraFillParams[key];
this.$emit('formitemvaluechange', { name: self.value, value: ''});
}
}
}
if (this.valueitem) {
this.$emit('formitemvaluechange', { name: this.valueitem, value: '' });
}
......@@ -667,22 +675,13 @@ export default class AppPicker extends Vue {
if (result.datas && Array.isArray(result.datas)) {
Object.assign(item, result.datas[0]);
}
if (this.data) {
if (isExist(this.extraFillParams)) {
for (const key in this.extraFillParams) {
if (this.extraFillParams.hasOwnProperty(key)) {
const self = this.extraFillParams[key];
if (isExist(item[self.key])) {
this.$emit('formitemvaluechange', { name: self.value, value: item[self.key]});
}
}
}
}
if (this.valueitem) {
this.$emit('formitemvaluechange', { name: this.valueitem, value: item[this.deKeyField] ? item[this.deKeyField] : item["srfkey"] });
this.$emit('formitemvaluechange', { name: this.valueitem, value: item[this.deKeyField]?item[this.deKeyField]:item["srfkey"] });
}
if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: item[this.deMajorField] ? item[this.deMajorField] : item["srfmajortext"] });
this.$emit('formitemvaluechange', { name: this.name, value: item[this.deMajorField]?item[this.deMajorField]:item["srfmajortext"] });
}
}
}
......@@ -714,6 +713,17 @@ export default class AppPicker extends Vue {
return true;
}
/**
* 触发界面行为
*
* @param {*} arg
* @returns
* @memberof AppPicker
*/
public clickAction(arg:any){
this.$emit('editoractionclick',arg);
}
/**
* 创建并编辑
*
......@@ -784,6 +794,7 @@ export default class AppPicker extends Vue {
appPicker.blur();
}
}
}
</script>
......
......@@ -340,6 +340,7 @@ export default class AppRichTextEditor extends Vue {
branding: false,
plugins: ['link', 'paste', 'table', 'image', 'codesample', 'code', 'fullscreen', 'preview', 'quickbars', 'fullscreen'],
toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | link image | preview code fullscreen',
contextmenu:'cut copy paste pastetext inserttable link ',
quickbars_insert_toolbar: false,
quickbars_selection_toolbar: 'forecolor fontsizeselect fontselect',
codesample_languages: [
......@@ -414,7 +415,9 @@ export default class AppRichTextEditor extends Vue {
},
init_instance_callback: (editor: any) => {
richtexteditor.editor = editor;
const url = richtexteditor.downloadUrl.substring(3);
let value = (richtexteditor.value && richtexteditor.value.length > 0) ? richtexteditor.value : '';
value = value.replace(/\{(\d+)\.(bmp|jpg|jpeg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp)\}/g, `${url}/$1`);
if (richtexteditor.editor) {
richtexteditor.editor.setContent(value);
}
......@@ -513,4 +516,7 @@ export default class AppRichTextEditor extends Vue {
transform: translateX(200%);
}
}
.tox-menu {
min-width: 300px !important;
}
</style>
\ No newline at end of file
......@@ -123,6 +123,12 @@ export default class DropDownListDynamic extends Vue {
*/
@Prop() public placeholder?: string;
/**
* 属性类型
* @type {string}
* @memberof DropDownList
*/
@Prop() public valueType?: string;
/**
* 计算属性(当前值)
......@@ -199,9 +205,10 @@ export default class DropDownListDynamic extends Vue {
if(this.tag && Object.is(this.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
this.items = [...JSON.parse(JSON.stringify(codelist.items))];
let items: Array<any> = [...JSON.parse(JSON.stringify(codelist.items))];
this.formatCodeList(items);
} else {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${this.tag}----代码表不存在`);
}
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
// 公共参数处理
......@@ -211,9 +218,10 @@ export default class DropDownListDynamic extends Vue {
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
let items: Array<any> = [...res];
this.formatCodeList(items);
}).catch((error:any) => {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${this.tag}----代码表不存在`);
});
}
}
......@@ -234,14 +242,51 @@ export default class DropDownListDynamic extends Vue {
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
let items: Array<any> = [...res];
this.formatCodeList(items);
}).catch((error:any) => {
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
console.log(`----${this.tag}----代码表不存在`);
});
}
}
}
/**
* 代码表类型和属性匹配
*
* @param {*} items
* @memberof DropDownList
*/
public formatCodeList(items: Array<any>){
let matching: boolean = true;
this.items = [];
try{
if(this.valueType){
items.forEach((item: any)=>{
const type = this.$util.typeOf(item.value);
if(type != this.valueType){
matching = false;
if(type == 'number'){
item.value = item.value.toString();
}else{
if(item.value.indexOf('.') == -1){
item.value = parseInt(item.value);
}else{
item.value = parseFloat(item.value);
}
}
}
this.items.push(item);
});
if(!matching){
console.warn(`代码表 ${ this.tag } 值类型和属性类型不匹配,已自动强制转换,请修正代码表值类型和属性类型匹配`);
}
}else{
this.items = items;
}
}catch(error){
console.warn('代码表值类型和属性类型不匹配,自动强制转换异常,请修正代码表值类型和属性类型匹配');
}
}
}
</script>
......
......@@ -11,9 +11,9 @@
@on-open-change="onClick"
:placeholder="$t('components.dropDownListMpicker.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value.toString()" :label="item.text">
<Checkbox :value = "(currentVal.indexOf(item.value.toString()))==-1?false:true">
{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}
</Checkbox>
<el-checkbox :value = "(currentVal.indexOf(item.value.toString()))==-1?false:true" :disabled="true">
{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}
</el-checkbox>
</i-option>
</i-select>
</template>
......
......@@ -26,7 +26,9 @@
<filter-mode class="filter-item-mode" v-model="data.mode" :modes="getModes(data.field)" @on-change="onModeChange($event, data)"></filter-mode>
<div class="filter-item-value">
<i-input v-if="!data.editor"></i-input>
<slot v-else :data="data"></slot>
<div v-else :key="data.editor">
<slot :data="data"></slot>
</div>
</div>
<div class="filter-tree-action">
<icon type="md-close" @click="onRemoveItem(node, data)"/>
......
......@@ -9,7 +9,7 @@
width: 100%;
}
.ivu-input-number-input{
text-align: right;
text-align: left;
}
.ivu-input-number-input:hover{
padding-right:22px;
......
......@@ -7,8 +7,7 @@
:precision="precision"
v-model="CurrentVal"
:disabled="disabled ? true : false"
:formatter="formatter"
:parser="parser"
:active-change="false"
></InputNumber>
<i-input v-else
:placeholder="placeholder"
......@@ -176,41 +175,22 @@ export default class InputBox extends Vue {
*/
public addEvent(){
if(Object.is(this.type, "number")){
let inputNumber :any = document.getElementById(this.numberId);
let handlerWrap :any = inputNumber.firstElementChild;
handlerWrap.onmouseover=()=>{
inputNumber.style.paddingRight="15px";
inputNumber.style.transition="all 0.2s linear";
}
handlerWrap.onmouseout=()=>{
inputNumber.style.paddingRight="0px";
}
// 整个页面渲染完之后再去执行
this.$nextTick(() => {
let inputNumber :any = document.getElementById(this.numberId);
let handlerWrap :any = inputNumber.firstElementChild;
handlerWrap.onmouseover=()=>{
inputNumber.style.paddingRight="15px";
inputNumber.style.transition="all 0.2s linear";
}
handlerWrap.onmouseout=()=>{
inputNumber.style.paddingRight="0px";
}
});
}
}
/**
* 指定输入框展示值的格式
*/
public formatter(value:any){
if(this.precision===0) return this.CurrentVal;
if(value.indexOf('.')!==-1){
let arr:Array<any> = value.split('.');
if(arr[1]==='00'){
return arr[0];
}
if(parseInt(arr[1])%10===0){
return arr[0]+'.'+parseInt(arr[1])/10;
}
}
return value;
}
/**
* 指定从 formatter 里转换回数字的方式
*/
public parser(value:any){
return value;
}
}
</script>
......
......@@ -70,17 +70,14 @@ export default class DataViewEngine extends MDViewEngine {
* @memberof DataViewEngine
*/
public doRemove(): void {
let selectedData = this.getMDCtrl() && this.getMDCtrl().getSelection();
if (!selectedData || selectedData == null || selectedData.length === 0) {
return;
}
let dataInfo = '';
selectedData.forEach((record: any, index: number) => {
let srfmajortext = record.srfmajortext;
if (index < 5) {
let srfmajortext = record.srfmajortext;
if (index < 5) {
if (!Object.is(dataInfo, '')) {
dataInfo += '、';
}
......@@ -88,18 +85,13 @@ export default class DataViewEngine extends MDViewEngine {
} else {
return false;
}
});
if (selectedData.length < 5) {
dataInfo = dataInfo + '共' + selectedData.length + '条数据';
} else {
dataInfo = dataInfo + '...' + '共' + selectedData.length + '条数据';
}
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
// 询问框
this.view.$Modal.confirm({
title:'警告',
......@@ -107,9 +99,7 @@ export default class DataViewEngine extends MDViewEngine {
onOk:() => {
this.removeData(null);
},
onCancel: () => {
}
onCancel: () => {}
});
}
......@@ -124,15 +114,6 @@ export default class DataViewEngine extends MDViewEngine {
if (!arg) {
arg = {};
}
// if (this.getParentMode()) {
// Object.assign(arg, this.getParentMode());
// }
// if (this.getParentData()) {
// Object.assign(arg, this.getParentData());
// }
if (!arg.srfkeys) {
// 获取要删除的数据集合
const selectedData: Array<any> = this.getMDCtrl() && this.getMDCtrl().getSelection();
......
......@@ -123,15 +123,6 @@ export default class ListViewEngine extends MDViewEngine {
if (!arg) {
arg = {};
}
// if (this.getParentMode()) {
// Object.assign(arg, this.getParentMode());
// }
// if (this.getParentData()) {
// Object.assign(arg, this.getParentData());
// }
if (!arg.srfkeys) {
// 获取要删除的数据集合
const selectedData: Array<any> = this.getMDCtrl() && this.getMDCtrl().getSelection();
......
......@@ -396,7 +396,7 @@ export default class MDViewEngine extends ViewEngine {
if (this.getSearchForm() && this.view.isExpandSearchForm) {
Object.assign(arg, this.getSearchForm().getData());
}
if (this.view && this.view.$refs.searchbar) {
if (this.view && this.view.$refs.searchbar && this.view.isExpandSearchForm) {
Object.assign(arg, this.view.$refs.searchbar.getData());
}
if (this.view && !this.view.isExpandSearchForm) {
......
......@@ -193,7 +193,7 @@ export default class ViewEngine {
if(_item && _item['dataaccaction'] && _this.view.appUIService && data && Object.keys(data).length >0){
let dataActionResult:any = _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
// 无权限:0;有权限:1
if(!dataActionResult){
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_this.view.toolBarModels[key].disabled = true;
......@@ -203,8 +203,10 @@ export default class ViewEngine {
}else{
_this.view.toolBarModels[key].visabled = true;
}
}else{
}
if(dataActionResult === 1){
_this.view.toolBarModels[key].visabled = true;
_this.view.toolBarModels[key].disabled = false;
}
}
}
......
......@@ -35,6 +35,7 @@ export default {
deleteError: "Failed to delete",
delDataFail: "Failed to delete data",
noData: "No data",
startsuccess:"Start successful"
},
local:{
new: "New",
......
......@@ -35,6 +35,7 @@ export default {
deleteError: "删除失败!",
delDataFail: "删除数据失败",
noData: "暂无数据",
startsuccess:"启动成功"
},
local:{
new: "新建",
......
......@@ -511,16 +511,27 @@ export class EAMAssetChildGridViewBase extends GridViewBase {
}
const parameters: any[] = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = this.$appmodal.openModal(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
openIndexViewTab(data);
const view: any = {
viewname: 'eamasset-edit-view',
height: 0,
width: 0,
title: this.$t('entities.eamasset.views.editview.title'),
};
openPopupModal(view, data);
}
......@@ -550,14 +561,27 @@ export class EAMAssetChildGridViewBase extends GridViewBase {
}
const parameters: any[] = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = this.$appmodal.openModal(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'eamasset-edit-view',
height: 0,
width: 0,
title: this.$t('entities.eamasset.views.editview.title'),
};
openPopupModal(view, data);
}
......@@ -623,20 +647,16 @@ export class EAMAssetChildGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamasset: args[0].eamasset });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -616,20 +616,16 @@ export class EAMAssetGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamasset: args[0].eamasset });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -511,16 +511,27 @@ export class EAMAssetLocationAssetGridViewBase extends GridViewBase {
}
const parameters: any[] = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = this.$appmodal.openModal(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
openIndexViewTab(data);
const view: any = {
viewname: 'eamasset-edit-view',
height: 0,
width: 0,
title: this.$t('entities.eamasset.views.editview.title'),
};
openPopupModal(view, data);
}
......@@ -623,20 +634,16 @@ export class EAMAssetLocationAssetGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamasset: args[0].eamasset });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -613,20 +613,16 @@ export class EAMAssetStateGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamassetstate: args[0].eamassetstate });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -834,20 +834,16 @@ export class EAMAssetStateModelGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamassetstatemodel: args[0].eamassetstatemodel });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -501,20 +501,16 @@ export class EAMAssetStateModelLineGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamassetstatemodelline: args[0].eamassetstatemodelline });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -613,20 +613,16 @@ export class EAMAssetTypeGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamassettype: args[0].eamassettype });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -613,20 +613,16 @@ export class EAMLocationChildGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamlocation: args[0].eamlocation });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -613,20 +613,16 @@ export class EAMLocationGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamlocation: args[0].eamlocation });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -613,20 +613,16 @@ export class EAMLocationStateModelGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamlocationstatemodel: args[0].eamlocationstatemodel });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -525,20 +525,16 @@ export class EAMLocationStateModelLineGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamlocationstatemodelline: args[0].eamlocationstatemodelline });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -613,20 +613,16 @@ export class EAMLocationTreeChildGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamlocation: args[0].eamlocation });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -613,20 +613,16 @@ export class EAMLocationTypeGridViewBase extends GridViewBase {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
Object.assign(data, { eamlocationtype: args[0].eamlocationtype });
}
xData.copy(args[0].srfkey);
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
Object.assign(this.viewparams,{copymode:true});
}
}
/**
......
......@@ -48,7 +48,9 @@ export default class EAMApplyStateModelLineServiceBase extends EntityService {
* @memberof EAMApplyStateModelLineServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamapplystatemodellines/${context.eamapplystatemodelline}/select`,isloading);
let res:any = Http.getInstance().get(`/eamapplystatemodellines/${context.eamapplystatemodelline}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMApplyStateModelLineServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamapplystatemodellines`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMApplyStateModelLineServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamapplystatemodellines/${context.eamapplystatemodelline}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMApplyStateModelLineServiceBase extends EntityService {
* @memberof EAMApplyStateModelLineServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamapplystatemodellines/${context.eamapplystatemodelline}`,isloading);
let res:any = Http.getInstance().delete(`/eamapplystatemodellines/${context.eamapplystatemodelline}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMApplyStateModelLineServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamapplystatemodellines/${context.eamapplystatemodelline}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMApplyStateModelLineServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamapplystatemodellines/getdraft`,isloading);
res.data.eamapplystatemodelline = data.eamapplystatemodelline;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMApplyStateModelLineServiceBase extends EntityService {
* @memberof EAMApplyStateModelLineServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamapplystatemodellines/${context.eamapplystatemodelline}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamapplystatemodellines/${context.eamapplystatemodelline}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMApplyStateModelLineServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamapplystatemodellines/${context.eamapplystatemodelline}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMApplyStateModelLineServiceBase extends EntityService {
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamapplystatemodellines/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamapplystatemodellines/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -48,7 +48,9 @@ export default class EAMApplyStateServiceBase extends EntityService {
* @memberof EAMApplyStateServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamapplystates/${context.eamapplystate}/select`,isloading);
let res:any = Http.getInstance().get(`/eamapplystates/${context.eamapplystate}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMApplyStateServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamapplystates`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMApplyStateServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamapplystates/${context.eamapplystate}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMApplyStateServiceBase extends EntityService {
* @memberof EAMApplyStateServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamapplystates/${context.eamapplystate}`,isloading);
let res:any = Http.getInstance().delete(`/eamapplystates/${context.eamapplystate}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMApplyStateServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamapplystates/${context.eamapplystate}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMApplyStateServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamapplystates/getdraft`,isloading);
res.data.eamapplystate = data.eamapplystate;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMApplyStateServiceBase extends EntityService {
* @memberof EAMApplyStateServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamapplystates/${context.eamapplystate}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamapplystates/${context.eamapplystate}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMApplyStateServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamapplystates/${context.eamapplystate}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMApplyStateServiceBase extends EntityService {
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamapplystates/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamapplystates/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -48,7 +48,9 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamapplies/${context.eamapply}/select`,isloading);
let res:any = Http.getInstance().get(`/eamapplies/${context.eamapply}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMApplyServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamapplies`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMApplyServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamapplies/${context.eamapply}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamapplies/${context.eamapply}`,isloading);
let res:any = Http.getInstance().delete(`/eamapplies/${context.eamapply}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMApplyServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamapplies/${context.eamapply}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMApplyServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamapplies/getdraft`,isloading);
res.data.eamapply = data.eamapply;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamapplies/${context.eamapply}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamapplies/${context.eamapply}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMApplyServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamapplies/${context.eamapply}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMApplyServiceBase extends EntityService {
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamapplies/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamapplies/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -48,7 +48,9 @@ export default class EAMAssetStateModelLineServiceBase extends EntityService {
* @memberof EAMAssetStateModelLineServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamassetstatemodellines/${context.eamassetstatemodelline}/select`,isloading);
let res:any = Http.getInstance().get(`/eamassetstatemodellines/${context.eamassetstatemodelline}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMAssetStateModelLineServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamassetstatemodellines`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMAssetStateModelLineServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassetstatemodellines/${context.eamassetstatemodelline}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMAssetStateModelLineServiceBase extends EntityService {
* @memberof EAMAssetStateModelLineServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamassetstatemodellines/${context.eamassetstatemodelline}`,isloading);
let res:any = Http.getInstance().delete(`/eamassetstatemodellines/${context.eamassetstatemodelline}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMAssetStateModelLineServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamassetstatemodellines/${context.eamassetstatemodelline}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMAssetStateModelLineServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamassetstatemodellines/getdraft`,isloading);
res.data.eamassetstatemodelline = data.eamassetstatemodelline;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMAssetStateModelLineServiceBase extends EntityService {
* @memberof EAMAssetStateModelLineServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamassetstatemodellines/${context.eamassetstatemodelline}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamassetstatemodellines/${context.eamassetstatemodelline}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMAssetStateModelLineServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassetstatemodellines/${context.eamassetstatemodelline}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMAssetStateModelLineServiceBase extends EntityService {
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamassetstatemodellines/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamassetstatemodellines/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -48,7 +48,9 @@ export default class EAMAssetStateModelServiceBase extends EntityService {
* @memberof EAMAssetStateModelServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamassetstatemodels/${context.eamassetstatemodel}/select`,isloading);
let res:any = Http.getInstance().get(`/eamassetstatemodels/${context.eamassetstatemodel}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMAssetStateModelServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamassetstatemodels`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMAssetStateModelServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassetstatemodels/${context.eamassetstatemodel}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMAssetStateModelServiceBase extends EntityService {
* @memberof EAMAssetStateModelServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamassetstatemodels/${context.eamassetstatemodel}`,isloading);
let res:any = Http.getInstance().delete(`/eamassetstatemodels/${context.eamassetstatemodel}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMAssetStateModelServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamassetstatemodels/${context.eamassetstatemodel}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMAssetStateModelServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamassetstatemodels/getdraft`,isloading);
res.data.eamassetstatemodel = data.eamassetstatemodel;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMAssetStateModelServiceBase extends EntityService {
* @memberof EAMAssetStateModelServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamassetstatemodels/${context.eamassetstatemodel}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamassetstatemodels/${context.eamassetstatemodel}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMAssetStateModelServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassetstatemodels/${context.eamassetstatemodel}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMAssetStateModelServiceBase extends EntityService {
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamassetstatemodels/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamassetstatemodels/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -48,7 +48,9 @@ export default class EAMAssetStateServiceBase extends EntityService {
* @memberof EAMAssetStateServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamassetstates/${context.eamassetstate}/select`,isloading);
let res:any = Http.getInstance().get(`/eamassetstates/${context.eamassetstate}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMAssetStateServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamassetstates`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMAssetStateServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassetstates/${context.eamassetstate}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMAssetStateServiceBase extends EntityService {
* @memberof EAMAssetStateServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamassetstates/${context.eamassetstate}`,isloading);
let res:any = Http.getInstance().delete(`/eamassetstates/${context.eamassetstate}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMAssetStateServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamassetstates/${context.eamassetstate}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMAssetStateServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamassetstates/getdraft`,isloading);
res.data.eamassetstate = data.eamassetstate;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMAssetStateServiceBase extends EntityService {
* @memberof EAMAssetStateServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamassetstates/${context.eamassetstate}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamassetstates/${context.eamassetstate}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMAssetStateServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassetstates/${context.eamassetstate}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMAssetStateServiceBase extends EntityService {
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamassetstates/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamassetstates/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -48,7 +48,9 @@ export default class EAMAssetTypeServiceBase extends EntityService {
* @memberof EAMAssetTypeServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamassettypes/${context.eamassettype}/select`,isloading);
let res:any = Http.getInstance().get(`/eamassettypes/${context.eamassettype}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMAssetTypeServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamassettypes`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMAssetTypeServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassettypes/${context.eamassettype}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMAssetTypeServiceBase extends EntityService {
* @memberof EAMAssetTypeServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamassettypes/${context.eamassettype}`,isloading);
let res:any = Http.getInstance().delete(`/eamassettypes/${context.eamassettype}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMAssetTypeServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamassettypes/${context.eamassettype}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMAssetTypeServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamassettypes/getdraft`,isloading);
res.data.eamassettype = data.eamassettype;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMAssetTypeServiceBase extends EntityService {
* @memberof EAMAssetTypeServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamassettypes/${context.eamassettype}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamassettypes/${context.eamassettype}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMAssetTypeServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassettypes/${context.eamassettype}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMAssetTypeServiceBase extends EntityService {
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamassettypes/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamassettypes/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -48,7 +48,9 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
* @memberof EAMLocationStateModelLineServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}/select`,isloading);
let res:any = Http.getInstance().get(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocationstatemodellines`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
* @memberof EAMLocationStateModelLineServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}`,isloading);
let res:any = Http.getInstance().delete(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstatemodellines/getdraft`,isloading);
res.data.eamlocationstatemodelline = data.eamlocationstatemodelline;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
* @memberof EAMLocationStateModelLineServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocationstatemodellines/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamlocationstatemodellines/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -48,7 +48,9 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
* @memberof EAMLocationStateModelServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamlocationstatemodels/${context.eamlocationstatemodel}/select`,isloading);
let res:any = Http.getInstance().get(`/eamlocationstatemodels/${context.eamlocationstatemodel}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocationstatemodels`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocationstatemodels/${context.eamlocationstatemodel}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
* @memberof EAMLocationStateModelServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamlocationstatemodels/${context.eamlocationstatemodel}`,isloading);
let res:any = Http.getInstance().delete(`/eamlocationstatemodels/${context.eamlocationstatemodel}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstatemodels/${context.eamlocationstatemodel}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstatemodels/getdraft`,isloading);
res.data.eamlocationstatemodel = data.eamlocationstatemodel;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
* @memberof EAMLocationStateModelServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamlocationstatemodels/${context.eamlocationstatemodel}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamlocationstatemodels/${context.eamlocationstatemodel}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocationstatemodels/${context.eamlocationstatemodel}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocationstatemodels/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamlocationstatemodels/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -48,7 +48,9 @@ export default class EAMLocationStateServiceBase extends EntityService {
* @memberof EAMLocationStateServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamlocationstates/${context.eamlocationstate}/select`,isloading);
let res:any = Http.getInstance().get(`/eamlocationstates/${context.eamlocationstate}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMLocationStateServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocationstates`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMLocationStateServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocationstates/${context.eamlocationstate}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMLocationStateServiceBase extends EntityService {
* @memberof EAMLocationStateServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamlocationstates/${context.eamlocationstate}`,isloading);
let res:any = Http.getInstance().delete(`/eamlocationstates/${context.eamlocationstate}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMLocationStateServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstates/${context.eamlocationstate}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMLocationStateServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstates/getdraft`,isloading);
res.data.eamlocationstate = data.eamlocationstate;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMLocationStateServiceBase extends EntityService {
* @memberof EAMLocationStateServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamlocationstates/${context.eamlocationstate}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamlocationstates/${context.eamlocationstate}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMLocationStateServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocationstates/${context.eamlocationstate}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMLocationStateServiceBase extends EntityService {
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocationstates/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamlocationstates/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -48,7 +48,9 @@ export default class EAMLocationTypeServiceBase extends EntityService {
* @memberof EAMLocationTypeServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/eamlocationtypes/${context.eamlocationtype}/select`,isloading);
let res:any = Http.getInstance().get(`/eamlocationtypes/${context.eamlocationtype}/select`,isloading);
return res;
}
/**
......@@ -71,6 +73,7 @@ export default class EAMLocationTypeServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocationtypes`,data,isloading);
return res;
}
......@@ -87,6 +90,7 @@ export default class EAMLocationTypeServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocationtypes/${context.eamlocationtype}`,data,isloading);
return res;
}
......@@ -100,7 +104,8 @@ export default class EAMLocationTypeServiceBase extends EntityService {
* @memberof EAMLocationTypeServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamlocationtypes/${context.eamlocationtype}`,isloading);
let res:any = Http.getInstance().delete(`/eamlocationtypes/${context.eamlocationtype}`,isloading);
return res;
}
/**
......@@ -114,6 +119,7 @@ export default class EAMLocationTypeServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationtypes/${context.eamlocationtype}`,isloading);
return res;
}
......@@ -129,6 +135,7 @@ export default class EAMLocationTypeServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationtypes/getdraft`,isloading);
res.data.eamlocationtype = data.eamlocationtype;
return res;
}
......@@ -142,7 +149,8 @@ export default class EAMLocationTypeServiceBase extends EntityService {
* @memberof EAMLocationTypeServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamlocationtypes/${context.eamlocationtype}/checkkey`,data,isloading);
let res:any = Http.getInstance().post(`/eamlocationtypes/${context.eamlocationtype}/checkkey`,data,isloading);
return res;
}
/**
......@@ -158,6 +166,7 @@ export default class EAMLocationTypeServiceBase extends EntityService {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocationtypes/${context.eamlocationtype}/save`,data,isloading);
return res;
}
......@@ -172,6 +181,7 @@ export default class EAMLocationTypeServiceBase extends EntityService {
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocationtypes/fetchdefault`,tempData,isloading);
let res:any = Http.getInstance().get(`/eamlocationtypes/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -9,5 +9,5 @@ declare module '@fullcalendar/list';
declare module '@fullcalendar/interaction';
declare module 'vue-grid-layout';
declare module 'vue-print-nb';
declare module 'ibiz-vue-pivottable';
declare module 'vuedraggable';
\ No newline at end of file
declare module 'vuedraggable';
declare module 'ibiz-vue-pivottable';
\ No newline at end of file
import { ViewBase } from './ViewBase';
import { events } from '../global';
/**
* 看板视图基类
......@@ -9,4 +10,53 @@ import { ViewBase } from './ViewBase';
*/
export class DashboardViewBase extends ViewBase {
/**
* 应用实体服务
*
* @protected
* @type {*}
* @memberof DashboardViewBase
*/
protected appEntityService: any;
/**
* 视图挂载完毕
*
* @protected
* @memberof DashboardViewBase
*/
protected viewMounted(): void {
super.viewMounted();
this.accLocalTags.push(this.$acc.commandLocal(() => {
this.loadModel();
}, 'update', this.appDeName.toUpperCase()));
}
/**
* 加载模型
*
* @protected
* @memberof DashboardViewBase
*/
protected async loadModel(): Promise<any> {
if (this.appEntityService && this.context[this.appDeName]) {
this.appEntityService.getDataInfo(this.context, {}, false).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data } = response;
if (data && data[this.appDeMajor]) {
data[this.appDeName] = data[this.appDeKey];
this.$appService.contextStore.setContextData(this.context, this.appDeName, { data });
Object.assign(this.model, { dataInfo: data[this.appDeMajor] });
if (this.$route) {
this.$route.meta.info = this.model.dataInfo;
}
Object.assign(this.model, { srfTitle: `${this.$t(this.model.srfCaption)} - ${this.model.dataInfo}` });
this.$appService.navHistory.setCaption({ tag: this.viewtag, info: this.model.dataInfo });
this.$emit(events.view.MODEL_LOADED, data);
}
})
}
}
}
\ No newline at end of file
......@@ -9,4 +9,21 @@ import { MDViewBase } from './MDViewBase';
*/
export class IndexPickupDataViewBase extends MDViewBase {
/**
* 是否单选
*
* @type {boolean}
* @memberof IndexPickupDataViewBase
*/
public isSingleSelect: boolean = true;
/**
* 数据选中抛值
*
* @param {*} args
* @memberof IndexPickupDataViewBase
*/
public dataviewDataSeletionchange(args: any) {
this.$emit('viewdataschange', [...args]);
}
}
\ No newline at end of file
......@@ -531,9 +531,9 @@ export class ViewBase extends Vue {
} else {
const itemKey: string = curNavData.value.toLowerCase();
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if (this.context[itemKey]) {
if (this.context[itemKey] != null) {
data[key] = this.context[itemKey];
} else if (this.viewparams[itemKey]) {
} else if (this.viewparams[itemKey] != null) {
data[key] = this.viewparams[itemKey];
} else {
data[key] = null;
......
......@@ -261,7 +261,7 @@ export class EditFormControlBase extends FormControlBase {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if (!action) {
let actionName: any = Object.is(data.srfuf, '1') ? "updateAction" : "createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg, { viewparams: this.viewparams });
......@@ -333,10 +333,13 @@ export class EditFormControlBase extends FormControlBase {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if (!action) {
let actionName: any = Object.is(data.srfuf, '1') ? "updateAction" : "createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg, { viewparams: this.viewparams });
if (this.viewparams && this.viewparams.copymode) {
data.srfuf = '0';
}
const post: Promise<any> = Object.is(data.srfuf, '1') ? this.service.update(action, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator) : this.service.add(action, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
......@@ -345,7 +348,7 @@ export class EditFormControlBase extends FormControlBase {
}
return;
}
this.viewparams.copymode = false;
const data = response.data;
this.onFormLoad(data, 'save');
this.$emit('save', data);
......@@ -431,6 +434,8 @@ export class EditFormControlBase extends FormControlBase {
const post: Promise<any> = _this.save({}, false);
post.then((response: any) => {
const arg: any = response.data;
// 准备工作流数据,填充未存库数据
Object.assign(arg, this.getData());
if (this.viewparams) {
Object.assign(arg, { viewparams: this.viewparams });
}
......@@ -498,6 +503,8 @@ export class EditFormControlBase extends FormControlBase {
this.$nextTick(() => {
this.formState.next({ type: 'save', data: arg });
});
// 准备工作流数据,填充未存库数据
Object.assign(arg, this.getData());
// 准备提交参数
if (this.viewparams) {
Object.assign(arg, { viewparams: this.viewparams });
......@@ -713,4 +720,14 @@ export class EditFormControlBase extends FormControlBase {
this.$acc.send[type](this.data, this.appDeName.toUpperCase());
}
/**
* 编辑器行为触发
*
* @param {*} arg
* @memberof EditFormControlBase
*/
public onFormItemActionClick(arg: any) {
if (arg && (arg instanceof Function)) arg();
}
}
\ No newline at end of file
......@@ -22,6 +22,14 @@ export class FormControlBase extends MainControlBase {
*/
public formState: Subject<any> = new Subject();
/**
* 实体值规则
*
* @type {*}
* @memberof FormControlBase
*/
public deRules: any = {};
/**
* 忽略表单项值变化
*
......@@ -362,7 +370,7 @@ export class FormControlBase extends MainControlBase {
* @memberof FormControlBase
*/
public async checkItem(name: string): Promise<any> {
const validator = new schema({ [name]: this.rules[name] });
const validator = new schema({ [name]: this.rules()[name] });
try {
await validator.validate({ [name]: this.data[name] });
return true;
......@@ -463,7 +471,7 @@ export class FormControlBase extends MainControlBase {
*/
public load(opt: any = {}): void {
if (!this.loadAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.notconfig.loadaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -542,4 +550,72 @@ export class FormControlBase extends MainControlBase {
});
}
/**
* 校验属性值规则
*
* @param {string} name
* @param {*} [rule=this.deRules]
* @param {string} [op="AND"]
* @returns {{isPast:boolean,infoMessage:string}}
* @memberof FormControlBase
*/
public verifyDeRules(name: string, rule: any = this.deRules, op: string = "AND"): { isPast: boolean, infoMessage: string } {
let falg: any = { infoMessage: "" };
if (!rule[name]) {
return falg;
}
let opValue = op == 'AND' ? true : false;
let startOp = (val: boolean) => {
if (falg.isPast) {
if (opValue) {
falg.isPast = falg && val;
} else {
falg.isPast = falg || val;
}
} else {
falg.isPast = val;
}
}
rule[name].forEach((item: any) => {
let dataValue = item.deName ? this.data[this.service.getItemNameByDeName(item.deName)] : "";
// 常规规则
if (item.type == 'SIMPLE') {
startOp(!this.$verify.checkFieldSimpleRule(dataValue, item.condOP, item.paramValue, item.ruleInfo, item.paramType, this.data, item.isKeyCond));
falg.infoMessage = item.ruleInfo;
}
// 数值范围
if (item.type == 'VALUERANGE2') {
startOp(!this.$verify.checkFieldValueRangeRule(dataValue, item.minValue, item.isIncludeMinValue, item.maxValue, item.isIncludeMaxValue, item.ruleInfo, item.isKeyCond));
falg.infoMessage = item.ruleInfo;
}
// 正则式
if (item.type == "REGEX") {
startOp(!this.$verify.checkFieldRegExRule(dataValue, item.regExCode, item.ruleInfo, item.isKeyCond));
falg.infoMessage = item.ruleInfo;
}
// 长度
if (item.type == "STRINGLENGTH") {
startOp(!this.$verify.checkFieldStringLengthRule(dataValue, item.minValue, item.isIncludeMinValue, item.maxValue, item.isIncludeMaxValue, item.ruleInfo, item.isKeyCond));
falg.infoMessage = item.ruleInfo;
}
// 系统值规则
if (item.type == "SYSVALUERULE") {
startOp(!this.$verify.checkFieldSysValueRule(dataValue, item.sysRule.regExCode, item.ruleInfo, item.isKeyCond));
falg.infoMessage = item.ruleInfo;
}
// 分组
if (item.type == 'GROUP') {
falg = this.verifyDeRules('group', item)
if (item.isNotMode) {
falg.isPast = !falg.isPast;
}
}
});
if (!falg.hasOwnProperty("isPast")) {
falg.isPast = true;
}
return falg;
}
}
\ No newline at end of file
......@@ -257,11 +257,11 @@ export class GridControlBase extends MDControlBase {
protected ctrlCreated(): void {
super.ctrlCreated();
this.setColState();
this.$acc.commandLocal(() => {
this.accLocalTags.push(this.$acc.commandLocal(() => {
if (this.isActive) {
this.load();
}
}, 'all', this.appDeName.toUpperCase());
}, 'all', this.appDeName.toUpperCase()));
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
......
......@@ -213,7 +213,8 @@ div::-webkit-scrollbar-thumb {
background-color: var(--form-editor-background-color);
border: 1px solid var(--form-editor-border-color);
}
>.el-checkbox__inner::after{
>.el-checkbox__inner::after {
border: 1px solid var(--form-editor-font-color);
border-left: 0;
border-top: 0;
......@@ -258,12 +259,13 @@ div::-webkit-scrollbar-thumb {
background-color: var(--form-editor-background-color);
border: 1px solid var(--view-background-color-bright);
}
>.el-checkbox__inner::after{
border: 1px solid var(--form-editor-font-color);
border-left: 0;
border-top: 0;
>.el-checkbox__inner::after {
border: 1px solid var(--form-editor-font-color);
border-left: 0;
border-top: 0;
}
}
}
}
......@@ -421,17 +423,49 @@ div::-webkit-scrollbar-thumb {
>.ivu-select-item {
color: var(--form-editor-font-color);
.el-checkbox.is-disabled {
.el-checkbox__inner {
cursor: pointer;
border-color: #409EFF;
}
.el-checkbox__inner::after {
cursor: pointer;
border-color: #409EFF;
}
.el-checkbox__label {
color: var(--form-editor-font-color);
}
}
}
>.ivu-select-item:hover {
color: #fff;
background: var(--form-editor-active-color);
.el-checkbox.is-disabled {
.el-checkbox__label {
color: #fff;
cursor: pointer;
}
}
}
>.ivu-select-item.ivu-select-item-selected,
>.ivu-select-item.ivu-select-item-focus {
background: var(--form-editor-background-color);
}
>.ivu-select-item.ivu-select-item-selected {
color: #fff;
background: var(--form-editor-active-color);
.el-checkbox.is-disabled {
.el-checkbox__label {
color: #fff;
}
}
}
}
}
......@@ -667,7 +701,8 @@ div::-webkit-scrollbar-thumb {
>.ivu-select-selection {
background: var(--form-editor-background-color);
border-color: var(--form-editor-border-color);;
border-color: var(--form-editor-border-color);
;
.ivu-select-placeholder {
color: var(--form-editor-placeholder-font-color);
......@@ -689,14 +724,16 @@ div::-webkit-scrollbar-thumb {
}
// 数值编辑器
.ivu-input-number, .ivu-input-number-input, .ivu-input-number-handler-wrap {
.ivu-input-number,
.ivu-input-number-input,
.ivu-input-number-handler-wrap {
background-color: var(--form-editor-background-color);
color: var(--form-editor-font-color);
}
.ivu-input-number {
border-color: var(--form-editor-border-color);
.ivu-input-number-input {
text-align: left;
}
......@@ -704,8 +741,9 @@ div::-webkit-scrollbar-thumb {
.ivu-input-number-handler {
color: var(--form-editor-placeholder-font-color);
}
.ivu-input-number-handler-wrap, .ivu-input-number-handler.ivu-input-number-handler-down {
.ivu-input-number-handler-wrap,
.ivu-input-number-handler.ivu-input-number-handler-down {
border-color: var(--form-editor-active-color);
}
}
......@@ -1158,11 +1196,11 @@ div::-webkit-scrollbar-thumb {
padding: 5px;
.data-view-container {
.ivu-col {
margin-bottom: 10px;
}
.single-card-data {
height: 100%;
width: 100%;
......@@ -1211,10 +1249,13 @@ div::-webkit-scrollbar-thumb {
// 列表导航栏样式
.app-list-exp-bar {
> .ivu-split-horizontal {
> .left-pane {
>.ivu-split-horizontal {
>.left-pane {
padding-right: 8px;
> .container-header {
>.container-header {
margin-bottom: 6px;
}
}
......
......@@ -198,7 +198,7 @@ export default class EAMApplyStateModelLineUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -200,7 +200,7 @@ export default class EAMApplyStateUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -198,7 +198,7 @@ export default class EAMApplyUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -200,7 +200,7 @@ export default class EAMAssetStateModelLineUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -202,7 +202,7 @@ export default class EAMAssetStateModelUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -202,7 +202,7 @@ export default class EAMAssetStateUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -202,7 +202,7 @@ export default class EAMAssetTypeUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -161,18 +161,28 @@ export default class EAMAssetUIServiceBase extends UIService {
}
const parameters: any[] = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
{ pathName: 'editview', parameterName: 'editview' },
];
actionContext.closeView(null);
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appmodal.openModal(view, context, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
const _this: any = actionContext;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
return result.datas;
});
}
return null;
}
openIndexViewTab(data);
const view: any = {
viewname: 'eamasset-edit-view',
height: 0,
width: 0,
title: actionContext.$t('entities.eamasset.views.editview.title'),
};
openPopupModal(view, data);
}
/**
......@@ -349,11 +359,7 @@ export default class EAMAssetUIServiceBase extends UIService {
}
const _this: any = actionContext;
if (this.EAMAsset_OpenInfo_MainView && this.EAMAsset_OpenInfo_MainView instanceof Function) {
this.EAMAsset_OpenInfo_MainView(result.datas,context,params, $event, xData,actionContext);
}
if(window.opener){
window.opener.postMessage({status:'OK',identification:'WF'},Environment.uniteAddress);
window.close();
this.EAMAsset_OpenInfo_MainView(result.datas[0],context,params, $event, xData,actionContext);
}
return result.datas;
});
......@@ -459,7 +465,7 @@ export default class EAMAssetUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -200,7 +200,7 @@ export default class EAMLocationStateModelLineUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -202,7 +202,7 @@ export default class EAMLocationStateModelUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -203,7 +203,7 @@ export default class EAMLocationStateUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -202,7 +202,7 @@ export default class EAMLocationTypeUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
......@@ -208,7 +208,7 @@ export default class EAMLocationUIServiceBase extends UIService {
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
......
import { Notice } from 'view-design';
export function Errorlog(target: Object, propertyKey: string, descriptor: TypedPropertyDescriptor<any>){
let origin=descriptor.value;
let $Notice: any = Notice;
descriptor.value=function(...args:any[]){
return new Promise((resolve: any, reject: any) => {
// 原方法调用方法
......@@ -12,7 +9,7 @@ export function Errorlog(target: Object, propertyKey: string, descriptor: TypedP
}).catch((error:any)=>{
// 开发模式下页面报错
if (process.env.NODE_ENV === 'development') {
$Notice.error({ title: '错误', desc: target.constructor.name+'类'+propertyKey+'方法产生异常' });
console.error(target.constructor.name+'类'+propertyKey+'方法产生异常');
}
// 控制台报错
console.error(error);
......
......@@ -114,6 +114,12 @@ export class Interceptors {
if (res.status === 401) {
this.doNoLogin(_data.data);
}
if(res.status === 403){
if(res.data && res.data.status && Object.is(res.data.status,"FORBIDDEN")){
let alertMessage:string ="非常抱歉,您无权操作此数据,如需操作请联系管理员!";
Object.assign(res.data,{localizedMessage:alertMessage,message:alertMessage});
}
}
// if (res.status === 404) {
// this.router.push({ path: '/404' });
// } else if (res.status === 500) {
......@@ -139,27 +145,27 @@ export class Interceptors {
if(localStorage.getItem('token')){
localStorage.removeItem('token');
}
const leftTime = new Date();
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
if (data.loginurl && !Object.is(data.loginurl, '') && data.originurl && !Object.is(data.originurl, '')) {
let _url = encodeURIComponent(encodeURIComponent(window.location.href));
let loginUrl: string = data.loginurl;
const originUrl: string = data.originurl;
let loginurl: string = data.loginurl;
const originurl: string = data.originurl;
if (originUrl.indexOf('?') === -1) {
if (originurl.indexOf('?') === -1) {
_url = `${encodeURIComponent('?RU=')}${_url}`;
} else {
_url = `${encodeURIComponent('&RU=')}${_url}`;
}
loginUrl = `${loginUrl}${_url}`;
loginurl = `${loginurl}${_url}`;
window.location.href = loginUrl;
window.location.href = loginurl;
} else {
if (Object.is(this.router.currentRoute.name, 'login')) {
return;
}
this.router.push({ name: 'login', query: { redirect: encodeURIComponent(location.href) } });
this.router.push({ name: 'login', query: { redirect: this.router.currentRoute.fullPath } });
}
}
......
......@@ -52,9 +52,9 @@ export class UIActionTool {
return;
}
let value: string | null = _params[name];
if (value && value.startsWith('%') && value.endsWith('%')) {
if (value && typeof(value) === 'string' && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1);
if (arg && arg.hasOwnProperty(key)) {
if (arg && arg.hasOwnProperty(key) && Object.is(actionTarget, 'SINGLEKEY')) {
value = (arg[key] !== null && arg[key] !== undefined) ? arg[key] : null;
} else if(parentContext && parentContext.hasOwnProperty(key)){
value = (parentContext[key] !== null && parentContext[key] !== undefined) ? parentContext[key] : null;
......@@ -76,7 +76,7 @@ export class UIActionTool {
}
let value: string | null = _params[name];
let values: any[] = [];
if (value && value.startsWith('%') && value.endsWith('%')) {
if (value && typeof(value) === 'string' && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1);
args.forEach((arg: any) => {
if (arg && arg.hasOwnProperty(key)) {
......
......@@ -116,6 +116,12 @@ export class Verify {
* @memberof Verify
*/
public static compareNumber(value: number, value2: number): number {
if(isNaN(value)){
value = 0;
}
if(isNaN(value2)){
value2 = 0;
}
if (value > value2) {
return 1;
} else if (value < value2) {
......@@ -270,12 +276,8 @@ export class Verify {
}
if (Object.is(paramType, 'ENTITYFIELD')) {
value2 = value2 ? value2.toLowerCase() : '';
const _value2Field = form.findFormItem(value2);
if (!_value2Field) {
this.errorInfo = `表单项${value2}未配置`;
return true;
}
value2 = _value2Field.getValue();
const _value2Field = form[value2]?form[value2]:value2;
value2 = _value2Field;
}
if (Util.isEmpty(errorInfo)) {
errorInfo = '内容必须符合值规则';
......@@ -284,7 +286,7 @@ export class Verify {
const result = this.testCond(value, op, value2);
if (!result) {
if (primaryModel) {
throw new Error(this.errorInfo);
// throw new Error(this.errorInfo);
}
}
return !result;
......
......@@ -43,7 +43,7 @@ export class ViewTool {
// 视图常规参数
Object.assign(viewdata, data);
// 传入父视图的srfsessionid
Object.assign(viewdata, { srfsessionid: viewParam['srfsessionid'] });
Object.assign(viewdata, {srfsessionid:viewParam['srfsessionid']});
return viewdata;
}
......@@ -63,7 +63,7 @@ export class ViewTool {
public static buildUpRoutePath(route: Route, viewParam: any = {}, deResParameters: any[], parameters: any[], args: any[], data: any): string {
const indexRoutePath = this.getIndexRoutePath(route);
const deResRoutePath = this.getDeResRoutePath(viewParam, deResParameters, args);
const deRoutePath = this.getActiveRoutePath(parameters, args, data, viewParam);
const deRoutePath = this.getActiveRoutePath(parameters, args, data,viewParam);
return `${indexRoutePath}${deResRoutePath}${deRoutePath}`;
}
......@@ -79,10 +79,10 @@ export class ViewTool {
const { parameters: _parameters }: { parameters: any[] } = route.meta;
const { pathName: _pathName, parameterName: _parameterName }: { pathName: string, parameterName: string } = _parameters[0];
const param = route.params[_parameterName];
if (isExistAndNotEmpty(param)) {
if (param && !Object.is(param, '')) {
return `/${_pathName}/${param}`;
}
return `/${_pathName}`;
return `/${_pathName}/null`;
}
/**
......@@ -99,15 +99,15 @@ export class ViewTool {
let routePath: string = '';
let [arg] = args;
arg = arg ? arg : {};
if (deResParameters && deResParameters.length > 0) {
if(deResParameters && deResParameters.length >0){
deResParameters.forEach(({ pathName, parameterName }: { pathName: string, parameterName: string }) => {
let value: any = null;
let value:any = null;
if (viewParam[parameterName] && !Object.is(viewParam[parameterName], '') && !Object.is(viewParam[parameterName], 'null')) {
value = viewParam[parameterName];
} else if (arg[parameterName] && !Object.is(arg[parameterName], '') && !Object.is(arg[parameterName], 'null')) {
value = arg[parameterName];
}
routePath = `${routePath}/${pathName}` + (isExistAndNotEmpty(value) ? `/${value}` : '');
routePath = `${routePath}/${pathName}/${value}`;
});
}
return routePath;
......@@ -123,10 +123,10 @@ export class ViewTool {
* @returns {string}
* @memberof ViewTool
*/
public static getActiveRoutePath(parameters: any[], args: any[], data: any, viewParam: any = {}): string {
public static getActiveRoutePath(parameters: any[], args: any[], data: any,viewParam: any = {}): string {
let routePath: string = '';
// 不存在应用实体
if (parameters && parameters.length > 0) {
if(parameters && parameters.length >0){
if (parameters.length === 1) {
const [{ pathName, parameterName }] = parameters;
routePath = `/${pathName}`;
......@@ -138,7 +138,7 @@ export class ViewTool {
arg = arg ? arg : {};
const [{ pathName: _pathName, parameterName: _parameterName }, { pathName: _pathName2, parameterName: _parameterName2 }] = parameters;
const _value: any = arg[_parameterName] || viewParam[_parameterName] || null;
routePath = `/${_pathName}${isExistAndNotEmpty(_value) ? `/${_value}` : ''}/${_pathName2}`;
routePath = `/${_pathName}/${_value}/${_pathName2}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
}
......@@ -155,8 +155,8 @@ export class ViewTool {
* @returns {*}
* @memberof ViewTool
*/
public static formatRouteParams(params: any, route: any, context: any, viewparams: any): void {
Object.keys(params).forEach((key: string, index: number) => {
public static formatRouteParams(params: any,route:any,context:any,viewparams:any): void {
Object.keys(params).forEach((key: string,index:number) => {
const param: string | null | undefined = params[key];
if (!param || Object.is(param, '') || Object.is(param, 'null')) {
return;
......@@ -168,11 +168,11 @@ export class ViewTool {
Object.assign(context, { [key]: param });
}
});
if (route && route.fullPath && route.fullPath.indexOf("?") > -1) {
const _viewparams: any = route.fullPath.slice(route.fullPath.indexOf("?") + 1);
const _viewparamArray: Array<string> = decodeURIComponent(_viewparams).split(";")
if (_viewparamArray.length > 0) {
_viewparamArray.forEach((item: any) => {
if(route && route.fullPath && route.fullPath.indexOf("?") > -1){
const _viewparams:any = route.fullPath.slice(route.fullPath.indexOf("?")+1);
const _viewparamArray:Array<string> = decodeURIComponent(_viewparams).split(";")
if(_viewparamArray.length > 0){
_viewparamArray.forEach((item:any) =>{
Object.assign(viewparams, qs.parse(item));
})
}
......@@ -251,30 +251,31 @@ export class ViewTool {
* @param {*} [UIService] 界面行为服务
* @memberof ViewTool
*/
public static calcActionItemAuthState(data: any, ActionModel: any, UIService: any) {
public static calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if (_item && _item['dataaccaction'] && UIService && data && Object.keys(data).length > 0) {
let dataActionResult: any = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
if(_item && _item['dataaccaction'] && UIService && data && Object.keys(data).length >0){
let dataActionResult:any = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
// 无权限:0;有权限:1
if (!dataActionResult) {
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if (_item.noprivdisplaymode === 1) {
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if ((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)) {
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
} else {
}else{
_item.visabled = true;
}
} else {
}
if(dataActionResult === 1){
_item.visabled = true;
_item.disabled = false;
}
}
}
}
}
}
\ No newline at end of file
......@@ -80,6 +80,8 @@ export default class DefaultService extends ControlService {
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
......@@ -148,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
......@@ -363,4 +364,25 @@ export default class DefaultService extends ControlService {
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
......@@ -49,7 +49,6 @@ export class MainEditFormBase extends EditFormControlBase {
* @memberof MainEditFormBase
*/
protected appDeName: string = 'eamassetstatemodelline';
/**
* 界面UI服务对象
*
......@@ -91,6 +90,15 @@ export class MainEditFormBase extends EditFormControlBase {
public rules: any = {
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public deRules:any = {
};
/**
* 详情模型集合
*
......
......@@ -98,6 +98,8 @@ export default class MainService extends ControlService {
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
if (Object.is(serviceName, 'EAMAssetStateModelService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamassetstatemodelService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamassetstatemodelid', 'eamassetstatemodel');
}
......@@ -172,7 +174,6 @@ export default class MainService extends ControlService {
});
}
/**
* 添加数据
*
......@@ -392,4 +393,25 @@ export default class MainService extends ControlService {
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
......@@ -80,6 +80,8 @@ export default class DefaultService extends ControlService {
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
......@@ -148,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
......@@ -363,4 +364,25 @@ export default class DefaultService extends ControlService {
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
......@@ -49,7 +49,6 @@ export class MainEditFormBase extends EditFormControlBase {
* @memberof MainEditFormBase
*/
protected appDeName: string = 'eamassetstatemodel';
/**
* 界面UI服务对象
*
......@@ -101,6 +100,15 @@ export class MainEditFormBase extends EditFormControlBase {
],
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public deRules:any = {
};
/**
* 详情模型集合
*
......
......@@ -80,6 +80,8 @@ export default class MainService extends ControlService {
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
......@@ -148,7 +150,6 @@ export default class MainService extends ControlService {
});
}
/**
* 添加数据
*
......@@ -369,4 +370,25 @@ export default class MainService extends ControlService {
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
......@@ -8,13 +8,29 @@
<row>
<i-col class="form-layout-container" v-show="detailsModel.eamassetstatemodelid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamassetstatemodelid' :itemRules="this.rules.eamassetstatemodelid" class='' :caption="$t('entities.eamassetstatemodel.main_form.details.eamassetstatemodelid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamassetstatemodelid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamassetstatemodelid" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamassetstatemodelid.disabled" type='text' style=""></input-box>
<input-box
v-model="data.eamassetstatemodelid"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamassetstatemodelid.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamassetstatemodelname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamassetstatemodelname' :itemRules="this.rules.eamassetstatemodelname" class='' :caption="$t('entities.eamassetstatemodel.main_form.details.eamassetstatemodelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamassetstatemodelname.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamassetstatemodelname" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamassetstatemodelname.disabled" type='text' style=""></input-box>
<input-box
v-model="data.eamassetstatemodelname"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamassetstatemodelname.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
......
......@@ -80,6 +80,8 @@ export default class DefaultService extends ControlService {
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
......@@ -148,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
......@@ -363,4 +364,25 @@ export default class DefaultService extends ControlService {
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
......@@ -49,7 +49,6 @@ export class MainEditFormBase extends EditFormControlBase {
* @memberof MainEditFormBase
*/
protected appDeName: string = 'eamassetstate';
/**
* 界面UI服务对象
*
......@@ -93,6 +92,15 @@ export class MainEditFormBase extends EditFormControlBase {
],
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public deRules:any = {
};
/**
* 详情模型集合
*
......
......@@ -80,6 +80,8 @@ export default class MainService extends ControlService {
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
......@@ -148,7 +150,6 @@ export default class MainService extends ControlService {
});
}
/**
* 添加数据
*
......@@ -369,4 +370,25 @@ export default class MainService extends ControlService {
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
......@@ -8,13 +8,29 @@
<row>
<i-col class="form-layout-container" v-show="detailsModel.eamassetstateid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamassetstateid' :itemRules="this.rules.eamassetstateid" class='' :caption="$t('entities.eamassetstate.main_form.details.eamassetstateid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamassetstateid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamassetstateid" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamassetstateid.disabled" type='text' style=""></input-box>
<input-box
v-model="data.eamassetstateid"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamassetstateid.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamassetstatename.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamassetstatename' :itemRules="this.rules.eamassetstatename" class='' :caption="$t('entities.eamassetstate.main_form.details.eamassetstatename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamassetstatename.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamassetstatename" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamassetstatename.disabled" type='text' style=""></input-box>
<input-box
v-model="data.eamassetstatename"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamassetstatename.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
......
......@@ -80,6 +80,8 @@ export default class DefaultService extends ControlService {
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
......@@ -148,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
......@@ -363,4 +364,25 @@ export default class DefaultService extends ControlService {
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
......@@ -49,7 +49,6 @@ export class MainEditFormBase extends EditFormControlBase {
* @memberof MainEditFormBase
*/
protected appDeName: string = 'eamassettype';
/**
* 界面UI服务对象
*
......@@ -103,6 +102,15 @@ export class MainEditFormBase extends EditFormControlBase {
],
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public deRules:any = {
};
/**
* 详情模型集合
*
......
......@@ -89,6 +89,8 @@ export default class MainService extends ControlService {
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
if (Object.is(serviceName, 'EAMAssetStateModelService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamassetstatemodelService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamassetstatemodelid', 'eamassetstatemodel');
}
......@@ -160,7 +162,6 @@ export default class MainService extends ControlService {
});
}
/**
* 添加数据
*
......@@ -380,4 +381,25 @@ export default class MainService extends ControlService {
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
......@@ -8,13 +8,29 @@
<row>
<i-col class="form-layout-container" v-show="detailsModel.assettypenumber.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='assettypenumber' :itemRules="this.rules.assettypenumber" class='' :caption="$t('entities.eamassettype.main_form.details.assettypenumber')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.assettypenumber.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.assettypenumber" @enter="onEnter($event)" unit="" :disabled="detailsModel.assettypenumber.disabled" type='text' style=""></input-box>
<input-box
v-model="data.assettypenumber"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.assettypenumber.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamassettypename.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamassettypename' :itemRules="this.rules.eamassettypename" class='' :caption="$t('entities.eamassettype.main_form.details.eamassettypename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamassettypename.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamassettypename" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamassettypename.disabled" type='text' style=""></input-box>
<input-box
v-model="data.eamassettypename"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamassettypename.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
......
......@@ -98,6 +98,8 @@ export default class DefaultService extends ControlService {
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
if (Object.is(serviceName, 'EAMAssetTypeService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamassettypeService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamassettypeid', 'eamassettype');
}
......@@ -172,7 +174,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
......@@ -387,4 +388,25 @@ export default class DefaultService extends ControlService {
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册