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

ibizdev提交

上级 59212962
......@@ -5,7 +5,6 @@ html, body {
.app-error-view {
height: 100%;
width: 100%;
position: relative;
.app-error-container {
height: 380px;
width: 670px;
......
......@@ -3,8 +3,8 @@
<div class="app-error-container">
<img src="/assets/img/404.png" />
<div class="error-text">
<div class="error-text1">抱歉,您访问的页面不存在!</div>
<div class="error-text2">您要找的页面存在,请返回 <a on-click={this.gotoIndexView}>首页</a> 继续浏览</div>
<div class="error-text1">{{$t('errorInfo.errorText1')}}</div>
<div class="error-text2">{{$t('errorInfo.errorText2')}} <a @click="gotoIndexView">{{$t('errorInfo.indexPage')}}</a> {{$t('errorInfo.continue')}}</div>
</div>
</div>
</div>
......@@ -13,7 +13,28 @@
<script lang="ts">
import { Vue, Component } from 'vue-property-decorator';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
errorInfo: {
errorText1: '抱歉,您访问的页面不存在!',
errorText2: '您要找的页面不存在,请返回',
indexPage: '首页',
continue: '继续浏览',
}
},
'en-US': {
errorInfo: {
errorText1: 'sorry,the page you visited is not exist!',
errorText2: 'The page you visited is not exist,please return to',
indexPage: 'home page',
continue: 'to continue browsing',
}
}
}
}
})
export default class Error404 extends Vue {
/**
......
html, body {
height: 100%;
}
.app-error-view {
height: 100%;
width: 100%;
position: relative;
.app-error-container {
height: 380px;
width: 670px;
......
......@@ -3,8 +3,8 @@
<div class="app-error-container">
<img src="/assets/img/500.png" />
<div class="error-text">
<div class="error-text1">抱歉,服务器出错了!</div>
<div class="error-text2">服务器出错了,请返回 <a on-click={this.gotoIndexView}>首页</a> 继续浏览</div>
<div class="error-text1">{{$t('errorInfo.errorText1')}}</div>
<div class="error-text2">{{$t('errorInfo.errorText2')}} <a @click="gotoIndexView">{{$t('errorInfo.indexPage')}}</a> {{$t('errorInfo.continue')}}</div>
</div>
</div>
</div>
......@@ -13,7 +13,28 @@
<script lang="ts">
import { Vue, Component } from 'vue-property-decorator';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
errorInfo: {
errorText1: '抱歉,服务器出错了!',
errorText2: '服务器出错了,请返回 ',
indexPage: '首页',
continue: '继续浏览',
}
},
'en-US': {
errorInfo: {
errorText1: "sorry,there's something wrong with the server!",
errorText2: "There's something wrong with the server,please return to",
indexPage: 'home page',
continue: 'to continue browsing',
}
}
}
}
})
export default class Error404 extends Vue {
/**
......
......@@ -23,7 +23,26 @@ import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
errorInfo: {
error: '错误',
miss: '缺少参数',
requestException: '请求异常!',
}
},
'en-US': {
errorInfo: {
error: 'Error',
miss: 'Missing parameter ',
requestException: 'Request Exception!',
}
}
}
}
})
export default class AppAutocomplete extends Vue {
/**
......@@ -195,16 +214,21 @@ export default class AppAutocomplete extends Vue {
let _parentdata = this.$util.formatData(this.data,this.itemParam.parentdata);
Object.assign(param,_parentdata);
}
// 错误信息国际化
let error: string = (this.$t('errorInfo.error') as any);
let miss: string = (this.$t('errorInfo.miss') as any);
let requestException: string = (this.$t('errorInfo.requestException') as any);
if(!this.service){
this.$Notice.error({ title: '错误', desc: '缺少参数service' });
this.$Notice.error({ title: error, desc: miss+'service' });
} else if(!this.acParams.serviceName) {
this.$Notice.error({ title: '错误', desc: '缺少参数serviceName' });
this.$Notice.error({ title: error, desc: miss+'serviceName' });
} else if(!this.acParams.interfaceName) {
this.$Notice.error({ title: '错误', desc: '缺少参数interfaceName' });
this.$Notice.error({ title: error, desc: miss+'interfaceName' });
} else {
this.service.getItems(this.acParams.serviceName,this.acParams.interfaceName, context, param).then((response: any) => {
if (!response) {
this.$Notice.error({ title: '错误', desc: '请求异常' });
this.$Notice.error({ title: error, desc: requestException });
} else {
this.items = [...response];
}
......
......@@ -6,7 +6,7 @@
</i-button>
</button-group>
<button-group v-show="showTypeDir">
<el-tooltip content="定制">
<el-tooltip :content="$t('info.custom')">
<i-button icon="md-build" type="primary" @click="handleClick"></i-button>
</el-tooltip>
<i-button class="collapse-btn" type="primary" @click="clickCollapse('right')">
......@@ -21,7 +21,19 @@ import {Vue, Component, Prop, Watch} from 'vue-property-decorator';
@Component({
components: {
i18n: {
messages: {
'zh-CN': {
info: {
custom: '定制',
}
},
'en-US': {
info: {
custom: 'Customize',
}
}
}
}
})
export default class AppBuild extends Vue {
......
......@@ -10,7 +10,22 @@
import { Component, Vue, Prop, Model } from 'vue-property-decorator';
import CodeListService from "@service/app/codelist-service";
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
errorInfo: {
notExist: '代码表不存在',
}
},
'en-US': {
errorInfo: {
notExist: 'codelist is not existed',
}
}
}
}
})
export default class AppCheckBox extends Vue {
/**
* 代码表服务对象
......@@ -191,13 +206,13 @@ export default class AppCheckBox extends Vue {
if (codelist) {
this.items = [...JSON.parse(JSON.stringify(codelist.items))];
} else {
console.log(`----${this.tag}----代码表不存在`);
console.log(`----${this.tag}----$t('errorInfo.notExist')`);
}
} else if (Object.is(this.codelistType,"DYNAMIC")) {
this.codeListService.getItems(this.tag).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
console.log(`----${this.tag}----$t('errorInfo.notExist')`);
});
}
}
......
......@@ -5,12 +5,12 @@
<input-box :disabled="disabled" v-model="editorvalue" @change="($event)=>{onEditorValueChange($event)}"></input-box>
</template>
<template v-else-if="Object.is(type,'dropdown')">
<i-select v-model="editorvalue" :disabled="disabled" :clearable="true" placeholder='请选择...' >
<i-select v-model="editorvalue" :disabled="disabled" :clearable="true" :placeholder="$t('info.select')" >
<i-option v-for="(item, index) in codelist" :key="index" :value="item.value">{{item.text}}</i-option>
</i-select>
</template>
<template v-else>
<span>{{type}}不支持</span>
<span>{{type}}{{$t('info.unsupported')}}</span>
</template>
</div>
</template>
......@@ -20,7 +20,24 @@ import { Vue, Component, Prop, Model, Emit, Watch } from "vue-property-decorator
import { Subject } from "rxjs";
import { debounceTime, distinctUntilChanged } from "rxjs/operators";
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
select: '请选择...',
unsupported: '不支持',
}
},
'en-US': {
info: {
select: 'please select...',
unsupported: '不支持',
}
}
}
}
})
export default class AppColumnRender extends Vue {
/**
* 值
......
......@@ -10,7 +10,7 @@
<el-menu v-show="!filterVal" :unique-opened="true">
<template v-for="(item, index) of list">
<el-submenu :key="item.type + index" :index="item.type + index">
<div slot="title">{{item.name}}</div>
<div slot="title">{{Object.is(item.type, 'app') ? $t('info.global') : item.name}}</div>
<template v-for="(item2, index2) of item.children">
<el-submenu :key="item2.type + index2" :index="item2.type + index2">
<div slot="title">{{item2.name}}</div>
......@@ -89,6 +89,20 @@ import { Http } from '../../utils/http/http';
import { Subject, Subscription } from 'rxjs';
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
global: '全局',
}
},
'en-US': {
info: {
global: 'Global',
}
}
}
},
components: {
GridLayout: VueGridLayout.GridLayout,
GridItem: VueGridLayout.GridItem
......@@ -225,9 +239,9 @@ export default class AppDashboardDesign extends Vue {
* @memberof AppDashboardDesign
*/
public created() {
this.loadList();
this.load();
if (this.viewState) {
this.loadList();
this.load();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (Object.is('save', action)) {
this.save();
......
......@@ -2,7 +2,7 @@
<div class="app-debug-actions">
<div class="actions">
<button-group vertical>
<i-button title="开启配置模式" :type="sdc.isShowTool ? 'warning' : 'info'" ghost @click="() => sdc.showToolChange()" :icon="sdc.isShowTool ? 'ios-bug' : 'ios-bug-outline'" ></i-button>
<i-button :title="$t('info.button')" :type="sdc.isShowTool ? 'warning' : 'info'" ghost @click="() => sdc.showToolChange()" :icon="sdc.isShowTool ? 'ios-bug' : 'ios-bug-outline'" ></i-button>
</button-group>
</div>
<div class="show-buttons">
......@@ -21,7 +21,22 @@ import { Environment } from '@/environments/environment';
* @class AppDebugActions
* @extends {Vue}
*/
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
button: '开启配置模式',
}
},
'en-US': {
info: {
button: 'Open Configuration Mode',
}
}
}
}
})
export default class AppDebugActions extends Vue {
/**
......
......@@ -11,8 +11,8 @@
</component>
</div>
<template v-if="placeholder">
<div v-if="value" class="app-embed-value">{this.value}</div>
<div v-else class="app-embed-placeholder">{this.placeholder}</div>
<div v-if="value" class="app-embed-value">{{value}}</div>
<div v-else class="app-embed-placeholder">{{placeholder}}</div>
</template>
</div>
<div v-else>{{emptyText}}</div>
......
......@@ -2,7 +2,7 @@
<div class="app-file-upload">
<el-row>
<el-col v-if="rowPreview && files.length > 0" :span="12" class="upload-col">
<el-button size='small' class="button-preview" icon='el-icon-view' :disabled="disabled" @click="()=>{this.dialogVisible = true;}">查看<Badge :count="files.length" type="info"></Badge></el-button>
<el-button size='small' class="button-preview" icon='el-icon-view' :disabled="disabled" @click="()=>{this.dialogVisible = true;}">{{$t('info.preview')}}<Badge :count="files.length" type="info"></Badge></el-button>
</el-col>
<el-col :span="(rowPreview && files.length > 0) ? 12 : 24" class="upload-col">
<el-upload
......@@ -20,7 +20,7 @@
>
<el-button v-if="!isdrag" size='small' icon='el-icon-upload' :disabled="disabled">{{this.$t('app.fileUpload.caption')}}</el-button>
<i v-if="isdrag" class="el-icon-upload"></i>
<div v-if="isdrag" class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div v-if="isdrag" class="el-upload__text" v-html="$t('info.uploadText')"></div>
</el-upload>
</el-col>
</el-row>
......@@ -55,7 +55,29 @@ import { Environment } from '@/environments/environment';
import { CreateElement } from 'vue';
import { Subject, Unsubscribable } from 'rxjs';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
preview: '查看',
uploadText: '将文件拖到此处,或<em>点击上传</em>',
uploadError: '上传失败',
fileTypeErrorTitle: '文件类型错误',
fileTypeErrorInfo: '请选择图片类型的文件,如JPEG,GIF,PNG,BMP',
}
},
'en-US': {
info: {
preview: 'preview',
uploadText: 'Drag files here,or <em>Click</em> to upload',
fileTypeErrorTitle: 'File type incorrect',
fileTypeErrorInfo: 'Please select files with picture types,such as JPEG,GIF,PNG,BMP',
}
}
}
}
})
export default class AppFileUpload extends Vue {
/**
......@@ -338,7 +360,7 @@ export default class AppFileUpload extends Vue {
const imageTypes = ["image/jpeg" , "image/gif" , "image/png" , "image/bmp"];
const isImage = imageTypes.some((type: any)=> Object.is(type, file.type));
if (!isImage) {
this.$Notice.error({ title: '文件类型错误' ,desc: '请选择图片类型的文件,如JPEG,GIF,PNG,BMP'});
this.$Notice.error({ title: (this.$t('info.fileTypeErrorTitle') as any) ,desc: (this.$t('info.fileTypeErrorInfo') as any)});
}
return isImage;
}
......@@ -376,7 +398,7 @@ export default class AppFileUpload extends Vue {
* @memberof AppFileUpload
*/
public onError(error: any, file: any, fileList: any) {
this.$Notice.error({ title: '上传失败' });
this.$Notice.error({ title: (this.$t('info.uploadError') as any) });
}
/**
......
......@@ -13,13 +13,28 @@
@viewdataschange="viewdataschange"
@viewload="viewload">
</component>
<spin v-if="blockUI" class='app-druipart-spin' fix >{{ blockUITipInfo }}</spin>
<spin v-if="blockUI" class='app-druipart-spin' fix >{{ $t('info.blockUITipInfo') }}</spin>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
import { Subject, Unsubscribable } from 'rxjs';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
blockUITipInfo: '请先保存主数据',
}
},
'en-US': {
info: {
blockUITipInfo: 'Please save the major data first',
}
}
}
}
})
export default class AppFormDRUIPart extends Vue {
/**
......@@ -183,14 +198,6 @@ export default class AppFormDRUIPart extends Vue {
*/
public blockUI: boolean = false;
/**
* 遮罩提示信息
*
* @type {string}
* @memberof AppFormDRUIPart
*/
public blockUITipInfo: string = '请先保存主数据';
/**
* 是否刷新关系数据
*
......
......@@ -15,7 +15,26 @@ import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { AppModal } from '@/utils';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
errorInfo: {
error: '错误',
miss: '缺少参数',
requestException: '请求异常!',
}
},
'en-US': {
errorInfo: {
error: 'Error',
miss: 'Missing parameter ',
requestException: 'Request Exception!',
}
}
}
}
})
export default class AppMpicker extends Vue {
/**
......@@ -150,16 +169,20 @@ export default class AppMpicker extends Vue {
if (this.activeData) {
Object.assign(param, { srfreferdata: this.activeData });
}
// 错误信息国际化
let error: string = (this.$t('errorInfo.error') as any);
let miss: string = (this.$t('errorInfo.miss') as any);
let requestException: string = (this.$t('errorInfo.requestException') as any);
if(!this.service){
this.$Notice.error({ title: '错误', desc: '缺少参数service' });
this.$Notice.error({ title: error, desc: miss+'service' });
} else if(!this.acParams.serviceName) {
this.$Notice.error({ title: '错误', desc: '缺少参数serviceName' });
this.$Notice.error({ title: error, desc: miss+'serviceName' });
} else if(!this.acParams.interfaceName) {
this.$Notice.error({ title: '错误', desc: '缺少参数interfaceName' });
this.$Notice.error({ title: error, desc: miss+'interfaceName' });
} else {
this.service.getItems(this.acParams.serviceName,this.acParams.interfaceName, param).then((response: any) => {
if (!response) {
this.$Notice.error({ title: '错误', desc: '请求异常' });
this.$Notice.error({ title: error, desc: requestException });
} else {
this.items = [...response];
}
......
<template>
<div class="app-picker-select-view">
<Dropdown :visible="visible" trigger="custom" style="left:0px;width: 100%" @on-clickoutside="() => {triggerMenu(false);}" >
<Input v-if="isSingleSelect" v-model="queryValue" class="tree-input" type="text" :placeholder="placeholder" :disabled="disabled" @on-change="OnInputChange" @on-focus="()=>{triggerMenu(true);}" >
<Input v-if="isSingleSelect" v-model="queryValue" class="tree-input" type="text" :placeholder="placeholder ? placeholder : $t('errorInfo.placeholder')" :disabled="disabled" @on-change="OnInputChange" @on-focus="()=>{triggerMenu(true);}" >
<template v-slot:suffix>
<i v-if="queryValue && !disabled" class='el-icon-circle-close' @click="onClear"></i>
<Icon :type="visible ? 'ios-arrow-up' : 'ios-arrow-down'" class="icon-arrow" @click="() => {triggerMenu();}"></Icon>
......@@ -32,7 +32,28 @@ import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ViewTool } from '@/utils/view-tool/view-tool';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
errorInfo: {
error: '错误',
valueitemException: '值项异常!',
formdataException: '表单数据异常!',
placeholder: '请选择...',
}
},
'en-US': {
errorInfo: {
error: 'Error',
valueitemException: 'valueitem Error!',
formdataException: 'formdata Error!',
placeholder: 'Please select...',
}
}
}
}
})
export default class AppPickerSelectView extends Vue {
/**
* 视图上下文
......@@ -176,7 +197,7 @@ export default class AppPickerSelectView extends Vue {
* @type {string}
* @memberof AppTreePicker
*/
@Prop({default:"请选择..."}) public placeholder!: string;
@Prop() public placeholder!: string;
/**
* 属性项名称
......@@ -250,7 +271,7 @@ export default class AppPickerSelectView extends Vue {
return true;
}
if (!this.data) {
this.$Notice.error({ title: '错误', desc: '表单数据异常' });
this.$Notice.error({ title: (this.$t('errorInfo.error') as any), desc: (this.$t('errorInfo.formdataException') as any) });
return false;
}
// 合并表单参数
......@@ -304,7 +325,7 @@ export default class AppPickerSelectView extends Vue {
if(this.isSingleSelect){
this.queryValue = newVal;
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$Notice.error({ title: '错误', desc: "编辑器"+this.name+'值项异常' });
this.$Notice.error({ title: (this.$t('errorInfo.error') as any), desc: (this.$t('errorInfo.editor') as any)+this.name+(this.$t('errorInfo.valueitemException') as any) });
}else{
let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = [{srfkey: this.data[this.valueitem], srfmajortext: this.value }];
......@@ -416,7 +437,7 @@ export default class AppPickerSelectView extends Vue {
*/
public openLinkView($event: any): void {
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
console.error({ title: '错误', desc: '值项异常!' });
console.error({ title: (this.$t('errorInfo.error') as any), desc: (this.$t('errorInfo.editor') as any)+this.name+(this.$t('errorInfo.valueitemException') as any) });
return;
}
// 公共参数处理
......
......@@ -9,7 +9,7 @@
@input="onInput" @blur="onBlur" style='width:100%;'>
<template v-slot:default="{item}">
<template v-if="item.isNew">
<div v-if="linkview" @click="newAndEdit">创建并编辑...</div>
<div v-if="linkview" @click="newAndEdit">{{$t('errorInfo.newAndEdit')}}</div>
</template>
<slot v-else name="default" :item="item"></slot>
</template>
......@@ -52,7 +52,34 @@ import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { AppModal } from '@/utils';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
errorInfo: {
error: '错误',
miss: '缺少参数',
requestException: '请求异常!',
newAndEdit: '创建并编辑...',
systemException: '系统异常!',
valueitemException: '值项异常!',
formdataException: '表单数据异常!',
}
},
'en-US': {
errorInfo: {
error: 'Error',
miss: 'Missing parameter ',
requestException: 'Request Exception!',
newAndEdit: 'Create And Edit...',
systemException: 'System Error!',
valueitemException: 'valueitem Error!',
formdataException: 'formdata Error!',
}
}
}
}
})
export default class AppPicker extends Vue {
/**
......@@ -309,16 +336,20 @@ export default class AppPicker extends Vue {
}
this.inputState = false;
Object.assign(_param, { query: query });
// 错误信息国际化
let error: string = (this.$t('errorInfo.error') as any);
let miss: string = (this.$t('errorInfo.miss') as any);
let requestException: string = (this.$t('errorInfo.requestException') as any);
if(!this.service){
this.$Notice.error({ title: '错误', desc: '缺少参数service' });
this.$Notice.error({ title: error, desc: miss+'service' });
} else if(!this.acParams.serviceName) {
this.$Notice.error({ title: '错误', desc: '缺少参数serviceName' });
this.$Notice.error({ title: error, desc: miss+'serviceName' });
} else if(!this.acParams.interfaceName) {
this.$Notice.error({ title: '错误', desc: '缺少参数interfaceName' });
this.$Notice.error({ title: error, desc: miss+'interfaceName' });
} else {
this.service.getItems(this.acParams.serviceName,this.acParams.interfaceName, _context, _param).then((response: any) => {
if (!response) {
this.$Notice.error({ title: '错误', desc: '请求异常' });
this.$Notice.error({ title: error, desc: requestException });
} else {
this.items = [...response];
}
......@@ -506,7 +537,7 @@ export default class AppPicker extends Vue {
private openRedirectView($event: any, view: any, data: any): void {
this.$http.get(view.url, data).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '请求异常' });
this.$Notice.error({ title: (this.$t('errorInfo.error') as any), desc: (this.$t('errorInfo.requestException') as any) });
}
if (response.status === 401) {
return;
......@@ -558,7 +589,7 @@ export default class AppPicker extends Vue {
}
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常!' });
this.$Notice.error({ title: (this.$t('errorInfo.error') as any), desc: (this.$t('errorInfo.systemException') as any) });
return;
}
if (response.status === 401) {
......@@ -574,7 +605,7 @@ export default class AppPicker extends Vue {
*/
public openLinkView($event: any): void {
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
console.error({ title: '错误', desc: '值项异常!' });
console.error({ title: (this.$t('errorInfo.error') as any), desc: (this.$t('errorInfo.valueitemException') as any) });
return;
}
// 公共参数处理
......@@ -638,7 +669,7 @@ export default class AppPicker extends Vue {
return true;
}
if (!this.data) {
this.$Notice.error({ title: '错误', desc: '表单数据异常' });
this.$Notice.error({ title: (this.$t('errorInfo.error') as any), desc: (this.$t('errorInfo.formdataException') as any) });
return false;
}
// 合并表单参数
......
<template>
<card class="app-portal-design" :dis-hover="true" :padding="0" :bordered="false">
<p slot="title">
自定义门户
{{$t('info.customPortal')}}
</p>
<div class="design-toolbar" slot="extra">
<i-button @click="click">保存</i-button>
<i-button @click="click">{{$t('info.save')}}</i-button>
</div>
<div class="design-container">
<app-dashboard-design :viewState="viewState" :context="context" :viewparams="viewparams" :utilServiceName="utilServiceName" @save="onSaved"></app-dashboard-design>
......@@ -18,6 +18,22 @@ import { Subject } from "rxjs";
import AppDashboardDesign from '@components/app-dashboard-design/app-dashboard-design.vue';
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
customPortal: '自定义门户',
save: '保存',
}
},
'en-US': {
info: {
customPortal: 'Custom portal',
save: 'Save',
}
}
}
},
components: {
AppDashboardDesign
}
......
<template>
<div class="app-range-date">
<span class="editor-span"></span>
<span class="editor-span">{{$t('info.from')}}</span>
<template v-for="(item, index) in refFormItem">
<span v-if="index > 0" class="editor-space" :key="index">日 0 时 起 至</span>
<span v-if="index > 0" class="editor-space" :key="index">{{$t('info.daystart')}}</span>
<date-picker
:key="index + '-onlydate'"
v-if="Object.is(editorType, 'DATEPICKEREX') || Object.is(editorType, 'DATEPICKEREX_NOTIME') && index == 0"
type="date"
:transfer="true"
:format="valFormat"
placeholder="请选择时间..."
:placeholder="$t('info.placeholder')"
:value="activeData[item]"
:disabled="disabled"
@on-change="startOnValueChange"
......@@ -21,7 +21,7 @@
type="datetime"
:transfer="true"
:format="valFormat"
placeholder="请选择时间..."
:placeholder="$t('info.placeholder')"
:value="activeData[item]"
:disabled="disabled"
@on-change="startOnValueChange"
......@@ -33,7 +33,7 @@
type="date"
:transfer="true"
:format="valFormat"
placeholder="请选择时间..."
:placeholder="$t('info.placeholder')"
:value="activeData[item]"
:disabled="disabled"
@on-change="endOnValueChange"
......@@ -45,12 +45,12 @@
type="datetime"
:transfer="true"
:format="valFormat"
placeholder="请选择时间..."
:placeholder="$t('info.placeholder')"
:value="activeData[item]"
:disabled="disabled"
@on-change="endOnValueChange"
></date-picker>
<span v-if="index > 0" :key="index + '-only'" class="editor-space">日 24 时 止</span>
<span v-if="index > 0" :key="index + '-only'" class="editor-space">{{$t('info.dayend')}}</span>
</template>
</div>
</template>
......@@ -60,7 +60,28 @@ import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
import { Subject } from "rxjs";
import { debounceTime, distinctUntilChanged } from "rxjs/operators";
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
placeholder: '请选择时间...',
from: '自',
daystart: '日 0 时 起 至',
dayend: '日 24 时 止',
}
},
'en-US': {
info: {
placeholder: 'Please select time...',
from: 'from',
daystart: '00:00:00 to',
dayend: '24:00:00',
}
}
}
}
})
export default class AppRangDate extends Vue {
/**
* 编辑项名称
......
......@@ -8,7 +8,7 @@
type="date"
:transfer="true"
:format="valFormat"
placeholder="请选择时间..."
:placeholder="$t('info.placeholder')"
:value="activeData[item]"
:disabled="disabled"
@on-change="onValueChange">
......@@ -18,7 +18,7 @@
v-else-if="editorType.startsWith('DATEPICKEREX')"
:transfer="true"
:format="valFormat"
placeholder="请选择时间..."
:placeholder="$t('info.placeholder')"
:value="activeData[item]"
:disabled="disabled"
@on-change="onValueChange">
......@@ -29,7 +29,7 @@
type="number"
:value="getValue(item)"
:disabled="disabled"
placeholder="请输入"
:placeholder="$t('info.input')"
@on-change="setValue">
</i-input>
</template>
......@@ -41,7 +41,24 @@ import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
placeholder: '请选择时间...',
input: '请输入...',
}
},
'en-US': {
info: {
placeholder: 'Please select time...',
input: 'Please input...',
}
}
}
}
})
export default class AppPicker extends Vue {
/**
......
<template>
<div class="app-stepper">
<el-input-number :value="currentVal" :disabled="disabled" @change="onChange" :min="min" :max="max" :step="step" label="描述文字"></el-input-number>
<el-input-number :value="currentVal" :disabled="disabled" @change="onChange" :min="min" :max="max" :step="step"></el-input-number>
</div>
</template>
......
......@@ -5,11 +5,11 @@
{{viewTitle}}
</div>
<div class="actions">
<div class="action-item" title="进入当前视图配置界面">
<i-button type="text" ghost @click="configView()">配置</i-button>
<div class="action-item" :title="$t('info.configTitle')">
<i-button type="text" ghost @click="configView()">{{$t('info.configButton')}}</i-button>
</div>
<div class="action-item" title="建立当前界面的issues">
<i-button type="text" ghost @click="createIssues()">新建issues</i-button>
<div class="action-item" :title="$t('info.issueTitle')">
<i-button type="text" ghost @click="createIssues()">{{$t('info.issueButton')}}</i-button>
</div>
</div>
</div>
......@@ -20,7 +20,28 @@ import { Vue, Component, Inject, Prop } from "vue-property-decorator";
import { Environment } from '@/environments/environment';
import { StudioActionUtil } from '@/utils';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
configTitle: '进入当前视图配置界面',
configButton: '配置',
issueTitle: '建立当前界面的issues',
issueButton: '新建issues',
}
},
'en-US': {
info: {
configTitle: 'Enter the configuration of current view',
configButton: 'Configuration',
issueTitle: 'Create issues of current view',
issueButton: 'Create issues',
}
}
}
}
})
export default class AppStudioAction extends Vue {
/**
......
......@@ -4,7 +4,7 @@
:title="$t('caption.theme')"
popper-class='app-app-theme'
placement='bottom-end'
:width="Object.is($i18n.locale, 'zh-CN') ? 180 : 240">
:width="Object.is($i18n.locale, 'zh-CN') ? 180 : 250">
<a>
<icon class='app-theme-icon' type='md-settings' :size="22" />
</a>
......
<template>
<div v-if="refviewname" class="app-tree-picker">
<Dropdown :visible="visible" trigger="custom" style="left:0px;width: 100%" @on-clickoutside="() => {triggerMenu(false);}" >
<Input v-model="inputValue" class="tree-input" type="text" :placeholder="placeholder" :disabled="disabled" @on-change="OnInputChange" @on-focus="()=>{triggerMenu();}" >
<Input v-model="inputValue" class="tree-input" type="text" :placeholder="placeholder ? placeholder : $t('placeholder')" :disabled="disabled" @on-change="OnInputChange" @on-focus="()=>{triggerMenu();}" >
<template v-slot:suffix>
<i v-if="inputValue && !disabled" class='el-icon-circle-close' @click="onClear"></i>
<Icon :type="visible ? 'ios-arrow-up' : 'ios-arrow-down'" class="icon-arrow" @click="() => {triggerMenu();}"></Icon>
......@@ -28,7 +28,18 @@ import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
placeholder: '请选择...'
},
'en-US': {
placeholder: 'please select...'
}
}
}
})
export default class AppTreePicker extends Vue {
/**
......@@ -118,7 +129,7 @@ export default class AppTreePicker extends Vue {
* @type {string}
* @memberof AppTreePicker
*/
@Prop({default:"请选择..."}) public placeholder!: string;
@Prop() public placeholder?: string;
/**
* 属性项名称
......
<template>
<div class="ibiz-date-picker">
<div class="date-picker-text">保险期限 : 自</div>
<div class="date-picker-text">{{$t('info.startText')}}</div>
<el-date-picker
v-model="value"
type="daterange"
:range-separator="rangeSeparatorr"
:start-placeholder="startPlaceholder"
:end-placeholder="endPlaceholder"
:range-separator="rangeSeparatorr ? rangeSeparatorr : $t('info.rangeSeparatorr')"
:start-placeholder="startPlaceholder ? startPlaceholder : $t('info.startPlaceholder')"
:end-placeholder="endPlaceholder ? endPlaceholder : $t('info.endPlaceholder')"
:disabled="disabled"
value-format="yyyy-MM-dd"
@change="change"
:format="format"
></el-date-picker>
<div class="date-picker-text">日 24 时 止</div>
<div class="date-picker-text">{{$t('info.endText')}}</div>
</div>
</template>
<script lang = 'ts'>
import { Component, Vue, Model, Prop } from "vue-property-decorator";
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
startText: '保险期限 : 自',
endText: '日 24 时 止',
startPlaceholder: '开始日期',
rangeSeparatorr: ' 0 时起 至',
endPlaceholder: '结束日期',
}
},
'en-US': {
info: {
startText: 'Insurance period : From',
endText: '24:00:00',
startPlaceholder: 'Begin Date',
rangeSeparatorr: ' 00:00:00 To',
endPlaceholder: 'End Dat4e',
}
}
}
}
})
export default class DateRange extends Vue {
/**
* 日期格式
* @type {any}
......@@ -48,7 +65,7 @@ export default class DateRange extends Vue {
* @type {*}
* @memberof DateRange
*/
@Prop({ default: "结束日期" }) public endPlaceholder?: string;
@Prop() public endPlaceholder?: string;
/**
* 中间Placeholder
......@@ -56,7 +73,7 @@ export default class DateRange extends Vue {
* @type {*}
* @memberof DateRange
*/
@Prop({ default: "日 0 时起 至" }) public rangeSeparatorr?: string;
@Prop() public rangeSeparatorr?: string;
/**
* 开始日期Placeholder
......@@ -64,7 +81,7 @@ export default class DateRange extends Vue {
* @type {*}
* @memberof DateRange
*/
@Prop({ default: "开始日期" }) public startPlaceholder?: string;
@Prop() public startPlaceholder?: string;
/**
* 双向绑定值
......
......@@ -8,7 +8,7 @@
:clearable="true"
:filterable="filterable === true ? true : false"
@on-open-change="onClick"
:placeholder="placeholder ? this.placeholder : '请选择'">
:placeholder="placeholder ? this.placeholder : $t('placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value" :label="item.text">
<Checkbox :value = "(currentVal.indexOf(item.value))==-1?false:true">
{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}
......@@ -20,7 +20,18 @@
<script lang="ts">
import { Vue, Component, Prop, Model } from 'vue-property-decorator';
import CodeListService from "@service/app/codelist-service";
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
placeholder: '请选择...'
},
'en-US': {
placeholder: 'please select...'
}
}
}
})
export default class DropDownList extends Vue {
/**
* 代码表服务对象
......
......@@ -7,7 +7,7 @@
:clearable="true"
:filterable="filterable === true ? true : false"
@on-open-change="onClick"
:placeholder="placeholder ? this.placeholder : '请选择'">
:placeholder="placeholder ? this.placeholder : $t('placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value">{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
</template>
......@@ -16,7 +16,18 @@
import { Vue, Component, Prop, Model } from 'vue-property-decorator';
import CodeListService from "@service/app/codelist-service";
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
placeholder: '请选择...'
},
'en-US': {
placeholder: 'please select...'
}
}
}
})
export default class DropDownList extends Vue {
/**
* 代码表服务对象
......
......@@ -42,7 +42,7 @@
</template>
<script lang="ts">
import { Vue, Component } from 'vue-property-decorator';
import { Vue, Component, Watch } from 'vue-property-decorator';
import { Environment } from '@/environments/environment';
@Component({
......@@ -50,6 +50,7 @@ import { Environment } from '@/environments/environment';
messages: {
'zh-CN': {
login: {
error: '错误',
caption: '欢迎登录',
name: '登录',
tip: '输入用户名和密码',
......@@ -66,6 +67,7 @@ import { Environment } from '@/environments/environment';
},
'en-US': {
login: {
error: 'Error',
caption: 'Welcome to login',
name: 'Login',
tip: 'Enter username and password',
......@@ -99,15 +101,43 @@ export default class Login extends Vue {
* @type {*}
* @memberof Login
*/
public rules: any = {
loginname: [
{ required: true, message: '用户名不能为空', trigger: 'change' },
],
password: [
{ required: true, message: '密码不能为空', trigger: 'change' },
],
public rules = {};
/**
* 设置值规则
*
* @memberof Login
*/
public setRules(){
this.rules = {
loginname: [
{ required: true, message: this.$t('login.loginname.message'), trigger: 'change' },
],
password: [
{ required: true, message: this.$t('login.password.message'), trigger: 'change' },
],
}
};
/**
* 生命周期Create
*
* @memberof Login
*/
public created(){
this.setRules();
}
/**
* 监听语言变化
*
* @memberof Login
*/
@Watch('$i18n.locale')
onLocaleChange(newval: any, val: any) {
this.setRules();
}
/**
* 登陆处理
*
......@@ -133,7 +163,7 @@ export default class Login extends Vue {
}
}).catch((error: any) => {
const loginfailed: any = this.$t('login.loginfailed');
this.$Notice.error({ title: '错误', desc: loginfailed });
this.$Notice.error({ title: (this.$t('login.error') as any), desc: loginfailed });
});
}
......
import ibzdictitem_en_US from '@locale/lanres/ibzdict-item/ibzdict-item_en_US';
import ibzdictitem_en_US from '@locale/lanres/ibzdictitem/ibzdictitem_en_US';
import ibzdict_en_US from '@locale/lanres/ibzdict/ibzdict_en_US';
import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
......
import ibzdictitem_zh_CN from '@locale/lanres/ibzdict-item/ibzdict-item_zh_CN';
import ibzdictitem_zh_CN from '@locale/lanres/ibzdictitem/ibzdictitem_zh_CN';
import ibzdict_zh_CN from '@locale/lanres/ibzdict/ibzdict_zh_CN';
import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
......
export default {
views: {
gridview: {
caption: "字典项目",
title: '字典项目',
},
editview: {
caption: "字典项目",
title: '字典项目',
},
},
main_form: {
details: {
group1: "字典项目基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "字典项目标识",
srfmajortext: "栏目显示值",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
dictid: "字典标识",
ibzdictitemname: "栏目显示值",
dictitemval: "栏目值",
pitemval: "父栏目值",
itemfilter: "过滤项",
itemcls: "栏目样式",
itemicon: "图标",
showorder: "排序",
ibzdictitemid: "字典项目标识",
},
uiactions: {
},
},
main_grid: {
columns: {
ibzdictitemname: "栏目显示值",
dictitemval: "栏目值",
pitemval: "父栏目值",
itemfilter: "过滤项",
itemcls: "栏目样式",
itemicon: "图标",
showorder: "排序",
updatedate: "更新时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
n_ibzdictitemname_like: "栏目显示值(文本包含(%))",
n_dictitemval_like: "栏目值(文本包含(%))",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit",
},
tbitem6: {
caption: "Copy",
tip: "Copy",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
tbitem18: {
caption: "Help",
tip: "Help",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "New",
tip: "New",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "Copy",
tip: "Copy",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "Help",
tip: "Help",
},
},
};
\ No newline at end of file
export default {
views: {
gridview: {
caption: '字典项目',
title: '字典项目',
},
editview: {
caption: '字典项目',
title: '字典项目',
},
},
main_form: {
details: {
group1: '字典项目基本信息',
formpage1: '基本信息',
srfupdatedate: '更新时间',
srforikey: '',
srfkey: '字典项目标识',
srfmajortext: '栏目显示值',
srftempmode: '',
srfuf: '',
srfdeid: '',
srfsourcekey: '',
dictid: '字典标识',
ibzdictitemname: '栏目显示值',
dictitemval: '栏目值',
pitemval: '父栏目值',
itemfilter: '过滤项',
itemcls: '栏目样式',
itemicon: '图标',
showorder: '排序',
ibzdictitemid: '字典项目标识',
},
uiactions: {
},
},
main_grid: {
columns: {
ibzdictitemname: '栏目显示值',
dictitemval: '栏目值',
pitemval: '父栏目值',
itemfilter: '过滤项',
itemcls: '栏目样式',
itemicon: '图标',
showorder: '排序',
updatedate: '更新时间',
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: '常规条件',
n_ibzdictitemname_like: '栏目显示值(文本包含(%))',
n_dictitemval_like: '栏目值(文本包含(%))',
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: '新建',
tip: '新建',
},
tbitem4: {
caption: '编辑',
tip: '编辑',
},
tbitem6: {
caption: '拷贝',
tip: '拷贝',
},
tbitem7: {
caption: '-',
tip: '',
},
tbitem8: {
caption: '删除',
tip: '删除',
},
tbitem9: {
caption: '-',
tip: '',
},
tbitem13: {
caption: '导出',
tip: '导出',
},
tbitem10: {
caption: '-',
tip: '',
},
tbitem16: {
caption: '其它',
tip: '其它',
},
tbitem21: {
caption: '导出数据模型',
tip: '导出数据模型',
},
tbitem23: {
caption: '数据导入',
tip: '数据导入',
},
tbitem17: {
caption: '-',
tip: '',
},
tbitem19: {
caption: '过滤',
tip: '过滤',
},
tbitem18: {
caption: '帮助',
tip: '帮助',
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: '保存',
tip: '保存',
},
tbitem4: {
caption: '保存并新建',
tip: '保存并新建',
},
tbitem5: {
caption: '保存并关闭',
tip: '保存并关闭',
},
tbitem6: {
caption: '-',
tip: '',
},
tbitem7: {
caption: '删除并关闭',
tip: '删除并关闭',
},
tbitem8: {
caption: '-',
tip: '',
},
tbitem12: {
caption: '新建',
tip: '新建',
},
tbitem13: {
caption: '-',
tip: '',
},
tbitem14: {
caption: '拷贝',
tip: '拷贝',
},
tbitem16: {
caption: '-',
tip: '',
},
tbitem23: {
caption: '第一个记录',
tip: '第一个记录',
},
tbitem24: {
caption: '上一个记录',
tip: '上一个记录',
},
tbitem25: {
caption: '下一个记录',
tip: '下一个记录',
},
tbitem26: {
caption: '最后一个记录',
tip: '最后一个记录',
},
tbitem21: {
caption: '-',
tip: '',
},
tbitem22: {
caption: '帮助',
tip: '帮助',
},
},
};
\ No newline at end of file
import qs from 'qs';
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
// 模拟数据
const mockDatas: Array<any> = [
];
......@@ -7,5 +7,5 @@ import './login/login';
import './upload/upload';
// 实体级接口对象
import './entity/ibzdict-items/ibzdict-items';
import './entity/ibzdictitems/ibzdictitems';
import './entity/ibzdicts/ibzdicts';
......@@ -99,11 +99,11 @@
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction=""
removeAction=""
loaddraftAction=""
loadAction=""
createAction=""
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
......@@ -357,6 +357,7 @@ export default class IBZDictEditViewBase extends Vue {
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'ibzdict',
majorPSDEField: 'dictname',
isLoadDefault: true,
});
}
......
......@@ -101,8 +101,8 @@
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction=""
loadAction=""
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
......@@ -120,11 +120,11 @@
:gridRowActiveMode="gridRowActiveMode"
@save="onSave"
updateAction=""
removeAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction=""
fetchAction="FetchDefault"
:newdata="newdata"
:opendata="opendata"
name="grid"
......@@ -383,6 +383,7 @@ export default class IBZDictGridViewBase extends Vue {
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'ibzdict',
majorPSDEField: 'dictname',
isLoadDefault: true,
});
}
......
......@@ -99,11 +99,11 @@
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction=""
removeAction=""
loaddraftAction=""
loadAction=""
createAction=""
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
......@@ -125,7 +125,7 @@
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import { Subject } from 'rxjs';
import IBZDictItemService from '@/service/ibzdict-item/ibzdict-item-service';
import IBZDICTITEMService from '@/service/ibzdictitem/ibzdictitem-service';
import EditViewEngine from '@engine/view/edit-view-engine';
......@@ -140,10 +140,10 @@ export default class IBZDictItemEditViewBase extends Vue {
/**
* 实体服务对象
*
* @type {IBZDictItemService}
* @type {IBZDICTITEMService}
* @memberof IBZDictItemEditViewBase
*/
protected appEntityService: IBZDictItemService = new IBZDictItemService;
protected appEntityService: IBZDICTITEMService = new IBZDICTITEMService;
/**
......@@ -357,6 +357,7 @@ export default class IBZDictItemEditViewBase extends Vue {
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'ibzdictitem',
majorPSDEField: 'itemname',
isLoadDefault: true,
});
}
......@@ -651,7 +652,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Save(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -677,7 +678,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -703,7 +704,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -729,7 +730,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -755,7 +756,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -781,7 +782,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -807,7 +808,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -833,7 +834,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -859,7 +860,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -885,7 +886,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.FirstRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.FirstRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -911,7 +912,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.PrevRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.PrevRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -937,7 +938,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.NextRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.NextRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -963,7 +964,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.LastRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.LastRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -989,7 +990,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -1329,33 +1330,6 @@ export default class IBZDictItemEditViewBase extends Vue {
}
}
/**
* 销毁视图回调
*
* @memberof IBZDictItemEditViewBase
*/
protected destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBZDictItemEditViewBase
*/
protected afterDestroyed(){
if(this.viewDefaultUsage){
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
if(item.startsWith(this.context.srfsessionid)){
localStorage.removeItem(item);
}
})
}
}
}
}
</script>
......
......@@ -2,7 +2,7 @@
import { Component } from 'vue-property-decorator';
import IBZDictItemEditViewBase from './ibzdict-item-edit-view-base.vue';
import view_form from '@widgets/ibzdict-item/main-form/main-form.vue';
import view_form from '@widgets/ibzdictitem/main-form/main-form.vue';
@Component({
components: {
view_form,
......
......@@ -101,8 +101,8 @@
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction=""
loadAction=""
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
......@@ -120,11 +120,11 @@
:gridRowActiveMode="gridRowActiveMode"
@save="onSave"
updateAction=""
removeAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction=""
fetchAction="FetchDefault"
:newdata="newdata"
:opendata="opendata"
name="grid"
......@@ -147,7 +147,7 @@
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import { Subject } from 'rxjs';
import IBZDictItemService from '@/service/ibzdict-item/ibzdict-item-service';
import IBZDICTITEMService from '@/service/ibzdictitem/ibzdictitem-service';
import GridViewEngine from '@engine/view/grid-view-engine';
......@@ -162,10 +162,10 @@ export default class IBZDictItemGridViewBase extends Vue {
/**
* 实体服务对象
*
* @type {IBZDictItemService}
* @type {IBZDICTITEMService}
* @memberof IBZDictItemGridViewBase
*/
protected appEntityService: IBZDictItemService = new IBZDictItemService;
protected appEntityService: IBZDICTITEMService = new IBZDICTITEMService;
/**
......@@ -383,6 +383,7 @@ export default class IBZDictItemGridViewBase extends Vue {
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'ibzdictitem',
majorPSDEField: 'itemname',
isLoadDefault: true,
});
}
......@@ -745,7 +746,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -771,7 +772,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -797,7 +798,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.View(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.View(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -823,7 +824,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -849,7 +850,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -875,7 +876,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -901,7 +902,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Remove(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -927,7 +928,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -953,7 +954,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -979,7 +980,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -1005,7 +1006,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Import(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Import(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -1031,7 +1032,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -1057,7 +1058,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -1076,7 +1077,10 @@ export default class IBZDictItemGridViewBase extends Vue {
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
deResParameters = [
{ pathName: 'ibzdicts', parameterName: 'ibzdict' },
];
const parameters: any[] = [
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
{ pathName: 'editview', parameterName: 'editview' },
......@@ -1108,7 +1112,10 @@ export default class IBZDictItemGridViewBase extends Vue {
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
deResParameters = [
{ pathName: 'ibzdicts', parameterName: 'ibzdict' },
];
const parameters: any[] = [
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
{ pathName: 'editview', parameterName: 'editview' },
......@@ -1393,33 +1400,6 @@ export default class IBZDictItemGridViewBase extends Vue {
}
}
/**
* 销毁视图回调
*
* @memberof IBZDictItemGridViewBase
*/
protected destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBZDictItemGridViewBase
*/
protected afterDestroyed(){
if(this.viewDefaultUsage){
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
if(item.startsWith(this.context.srfsessionid)){
localStorage.removeItem(item);
}
})
}
}
}
/**
* 是否单选
*
......
......@@ -2,8 +2,8 @@
import { Component } from 'vue-property-decorator';
import IBZDictItemGridViewBase from './ibzdict-item-grid-view-base.vue';
import view_grid from '@widgets/ibzdict-item/main-grid/main-grid.vue';
import view_searchform from '@widgets/ibzdict-item/default-searchform/default-searchform.vue';
import view_grid from '@widgets/ibzdictitem/main-grid/main-grid.vue';
import view_searchform from '@widgets/ibzdictitem/default-searchform/default-searchform.vue';
@Component({
components: {
view_grid,
......
......@@ -39,7 +39,7 @@ export class EntityServiceRegister {
* @memberof EntityServiceRegister
*/
protected init(): void {
this.allEntityService.set('ibzdictitem', () => import('@/service/ibzdict-item/ibzdict-item-service'));
this.allEntityService.set('ibzdictitem', () => import('@/service/ibzdictitem/ibzdictitem-service'));
this.allEntityService.set('ibzdict', () => import('@/service/ibzdict/ibzdict-service'));
}
......
!!!!模版产生代码错误:----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${item.getKeyPSAppDEField().getCodeNa... [in template "TEMPLCODE_zh_CN" at line 410, column 26]
----
\ No newline at end of file
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 数据字典服务对象基类
*
* @export
* @class IBZDictServiceBase
* @extends {EntityServie}
*/
export default class IBZDictServiceBase extends EntityService {
/**
* Creates an instance of IBZDictServiceBase.
*
* @param {*} [opts={}]
* @memberof IBZDictServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof IBZDictServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='ibzdict';
this.APPDEKEY = 'dictid';
this.APPDENAME = 'ibzdicts';
this.APPDETEXT = 'dictname';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDictServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/ibzdicts/${context.ibzdict}/select`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDictServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/ibzdicts/${context.ibzdict}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_ibzdictitems',JSON.stringify(res.data.ibzdictitems));
return res;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDictServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let ibzdictitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_ibzdictitems'),'undefined')){
ibzdictitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_ibzdictitems') as any);
}
masterData.ibzdictitems = ibzdictitemsData;
Object.assign(data,masterData);
data[this.APPDEKEY] = null;
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/ibzdicts`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_ibzdictitems',JSON.stringify(res.data.ibzdictitems));
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDictServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/ibzdicts/${context.ibzdict}/checkkey`,data,isloading);
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDictServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/ibzdicts/getdraft`,isloading);
res.data.ibzdict = data.ibzdict;
this.tempStorage.setItem(context.srfsessionkey+'_ibzdictitems',JSON.stringify(res.data.ibzdictitems));
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDictServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let ibzdictitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_ibzdictitems'),'undefined')){
ibzdictitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_ibzdictitems') as any);
}
masterData.ibzdictitems = ibzdictitemsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/ibzdicts/${context.ibzdict}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_ibzdictitems',JSON.stringify(res.data.ibzdictitems));
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDictServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/ibzdicts/${context.ibzdict}`,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDictServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let ibzdictitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_ibzdictitems'),'undefined')){
ibzdictitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_ibzdictitems') as any);
}
masterData.ibzdictitems = ibzdictitemsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibzdicts/${context.ibzdict}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_ibzdictitems',JSON.stringify(res.data.ibzdictitems));
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDictServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/ibzdicts/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 字典项目服务对象基类
*
* @export
* @class IBZDICTITEMServiceBase
* @extends {EntityServie}
*/
export default class IBZDICTITEMServiceBase extends EntityService {
/**
* Creates an instance of IBZDICTITEMServiceBase.
*
* @param {*} [opts={}]
* @memberof IBZDICTITEMServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof IBZDICTITEMServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='ibzdictitem';
this.APPDEKEY = 'itemid';
this.APPDENAME = 'ibzdictitems';
this.APPDETEXT = 'itemname';
}
// 实体接口
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDICTITEMServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
// FetchDefault ---FETCH
if(context.srfsessionkey && !Object.is(this.tempStorage.getItem(context.srfsessionkey+'_ibzdictitems'),'undefined')){
let result:any = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_ibzdictitems') as any);
if(result){
return {"status":200,"data":result};
}else{
return {"status":200,"data":[]};
}
}else{
return {"status":200,"data":[]};
}
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import IBZDICTITEMServiceBase from './ibzdictitem-service-base';
/**
* 字典项目服务对象
*
* @export
* @class IBZDICTITEMService
* @extends {IBZDICTITEMServiceBase}
*/
export default class IBZDICTITEMService extends IBZDICTITEMServiceBase {
/**
* Creates an instance of IBZDICTITEMService.
*
* @param {*} [opts={}]
* @memberof IBZDICTITEMService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import IBZDICTITEMService from '@/service/ibzdictitem/ibzdictitem-service';
/**
* 字典项目UI服务对象基类
*
* @export
* @class IBZDICTITEMUIServiceBase
*/
export default class IBZDICTITEMUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof IBZDICTITEMUIServiceBase
*/
protected isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof IBZDICTITEMUIServiceBase
*/
protected dataService:IBZDICTITEMService = new IBZDICTITEMService();
/**
* 所有关联视图
*
* @memberof IBZDICTITEMUIServiceBase
*/
protected allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof IBZDICTITEMUIServiceBase
*/
protected stateValue: number = 0;
/**
* 状态属性
*
* @memberof IBZDICTITEMUIServiceBase
*/
protected stateField: string = "";
/**
* 主状态属性集合
*
* @memberof IBZDICTITEMUIServiceBase
*/
protected mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof IBZDICTITEMUIServiceBase
*/
protected allDeMainStateMap:Map<string,string> = new Map();
/**
* Creates an instance of IBZDICTITEMUIServiceBase.
*
* @param {*} [opts={}]
* @memberof IBZDICTITEMUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.initViewMap();
this.initDeMainStateMap();
}
/**
* 初始化视图Map
*
* @memberof IBZDICTITEMUIServiceBase
*/
public initViewMap(){
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'ibzdictitems'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'ibzdictitems'});
}
/**
* 初始化主状态集合
*
* @memberof IBZDICTITEMUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof IBZDICTITEMUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({ibzdictitem:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof IBZDICTITEMUIServiceBase
*/
protected getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof IBZDICTITEMUIServiceBase
*/
protected async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof IBZDICTITEMUIServiceBase
*/
protected async getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
}
})
let strTag:String = "";
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
}
\ No newline at end of file
import IBZDICTITEMUIServiceBase from './ibzdictitem-ui-service-base';
/**
* 字典项目UI服务对象
*
* @export
* @class IBZDICTITEMUIService
*/
export default class IBZDICTITEMUIService extends IBZDICTITEMUIServiceBase {
/**
* Creates an instance of IBZDICTITEMUIService.
*
* @param {*} [opts={}]
* @memberof IBZDICTITEMUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export class UIServiceRegister {
* @memberof UIServiceRegister
*/
protected init(): void {
this.allUIService.set('ibzdictitem', () => import('@/uiservice/ibzdict-item/ibzdict-item-ui-service'));
this.allUIService.set('ibzdictitem', () => import('@/uiservice/ibzdictitem/ibzdictitem-ui-service'));
this.allUIService.set('ibzdict', () => import('@/uiservice/ibzdict/ibzdict-ui-service'));
}
......
......@@ -29,6 +29,11 @@ export default class DefaultModel {
prop: 'dictname',
dataType: 'TEXT',
},
{
name: 'ibzdict',
prop: 'dictid',
dataType: 'FONTKEY',
},
]
}
......
......@@ -59,6 +59,11 @@ export default class MainModel {
prop: 'dictname',
dataType: 'TEXT',
},
{
name: 'ibzdict',
prop: 'dictid',
dataType: 'FONTKEY',
},
]
}
......
......@@ -59,6 +59,11 @@ export default class MainModel {
prop: 'n_ibzdictname_like',
dataType: 'TEXT',
},
{
name: 'ibzdict',
prop: 'dictid',
dataType: 'FONTKEY',
},
{
name:'size',
......
/**
* Default 部件模型
*
* @export
* @class DefaultModel
*/
export default class DefaultModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DefaultModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
{
name: 'n_ibzdictitemname_like',
prop: 'itemname',
dataType: 'TEXT',
},
{
name: 'n_dictitemval_like',
prop: 'itemval',
dataType: 'TEXT',
},
{
name: 'ibzdict',
prop: 'dictid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
.ivu-tabs-no-animation>.ivu-tabs-content{
padding: 0 16px;
}
.ivu-card-head{
padding: 14px 0;
}
.app-search-form {
padding: 0 14px;
.search_reset {
margin-right: 12px;
}
}
.app-search-form-flex {
height: 100%;
> .ivu-row {
height: 100%;
> .ivu-tabs {
height: 100%;
display: flex;
flex-direction: column;
> .ivu-tabs-content {
flex-grow: 1;
overflow: auto;
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
}
}
.app-tabpanel-flex {
height: 100%;
> .ivu-tabs-content {
height: calc(100% - 52px);
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
// this is less
<script lang='ts'>
import { Component } from 'vue-property-decorator';
import DefaultBase from './default-searchform-base.vue';
@Component({
components: {
}
})
export default class Default extends DefaultBase {
}
</script>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册