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

ibizdev提交

上级 3863d5a0
tinymce.addI18n('en_US',{
"Cut": "Cut",
"Heading 5": "Heading 5",
"Header 2": "Header 2",
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.",
"Heading 4": "Heading 4",
"Div": "Div",
"Heading 2": "Heading 2",
"Paste": "Paste",
"Close": "Close",
"Font Family": "Font Family",
"Pre": "Pre",
"Align right": "Align right",
"New document": "New document",
"Blockquote": "Blockquote",
"Numbered list": "Numbered list",
"Heading 1": "Heading 1",
"Headings": "Headings",
"Increase indent": "Increase indent",
"Formats": "Formats",
"Headers": "Headers",
"Select all": "Select all",
"Header 3": "Header 3",
"Blocks": "Blocks",
"Undo": "Undo",
"Strikethrough": "Strike-through",
"Bullet list": "Bullet list",
"Header 1": "Header 1",
"Superscript": "Superscript",
"Clear formatting": "Clear formatting",
"Font Sizes": "Font Sizes",
"Subscript": "Subscript",
"Header 6": "Header 6",
"Redo": "Redo",
"Paragraph": "Paragraph",
"Ok": "Ok",
"Bold": "Bold",
"Code": "Code",
"Italic": "Italic",
"Align center": "Align centre",
"Header 5": "Header 5",
"Heading 6": "Heading 6",
"Heading 3": "Heading 3",
"Decrease indent": "Decrease indent",
"Header 4": "Header 4",
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.",
"Underline": "Underline",
"Cancel": "Cancel",
"Justify": "Justify",
"Inline": "Inline",
"Copy": "Copy",
"Align left": "Align left",
"Visual aids": "Visual aids",
"Lower Greek": "Lower Greek",
"Square": "Square",
"Default": "Default",
"Lower Alpha": "Lower Alpha",
"Circle": "Circle",
"Disc": "Disc",
"Upper Alpha": "Upper Alpha",
"Upper Roman": "Upper Roman",
"Lower Roman": "Lower Roman",
"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.",
"Name": "Name",
"Anchor": "Anchor",
"Id": "ID",
"You have unsaved changes are you sure you want to navigate away?": "You have unsaved changes are you sure you want to navigate away?",
"Restore last draft": "Restore last draft",
"Special character": "Special character",
"Source code": "Source code",
"Language": "Language",
"Insert\/Edit code sample": "Insert\/Edit code sample",
"B": "B",
"R": "R",
"G": "G",
"Color": "Colour",
"Right to left": "Right to left",
"Left to right": "Left to right",
"Emoticons": "Emoticons",
"Robots": "Robots",
"Document properties": "Document properties",
"Title": "Title",
"Keywords": "Keywords",
"Encoding": "Encoding",
"Description": "Description",
"Author": "Author",
"Fullscreen": "Full-screen",
"Horizontal line": "Horizontal line",
"Horizontal space": "Horizontal space",
"Insert\/edit image": "Insert\/edit image",
"General": "General",
"Advanced": "Advanced",
"Source": "Source",
"Border": "Border",
"Constrain proportions": "Constrain proportions",
"Vertical space": "Vertical space",
"Image description": "Image description",
"Style": "Style",
"Dimensions": "Dimensions",
"Insert image": "Insert image",
"Image": "Image",
"Zoom in": "Zoom in",
"Contrast": "Contrast",
"Back": "Back",
"Gamma": "Gamma",
"Flip horizontally": "Flip horizontally",
"Resize": "Resize",
"Sharpen": "Sharpen",
"Zoom out": "Zoom out",
"Image options": "Image options",
"Apply": "Apply",
"Brightness": "Brightness",
"Rotate clockwise": "Rotate clockwise",
"Rotate counterclockwise": "Rotate counterclockwise",
"Edit image": "Edit image",
"Color levels": "Colour levels",
"Crop": "Crop",
"Orientation": "Orientation",
"Flip vertically": "Flip vertically",
"Invert": "Invert",
"Date\/time": "Date\/time",
"Insert date\/time": "Insert date\/time",
"Remove link": "Remove link",
"Url": "URL",
"Text to display": "Text to display",
"Anchors": "Anchors",
"Insert link": "Insert link",
"Link": "Link",
"New window": "New window",
"None": "None",
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?",
"Paste or type a link": "Paste or type a link",
"Target": "Target",
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",
"Insert\/edit link": "Insert\/edit link",
"Insert\/edit video": "Insert\/edit video",
"Media": "Media",
"Alternative source": "Alternative source",
"Paste your embed code below:": "Paste your embed code below:",
"Insert video": "Insert video",
"Poster": "Poster",
"Insert\/edit media": "Insert\/edit media",
"Embed": "Embed",
"Nonbreaking space": "Non-breaking space",
"Page break": "Page break",
"Paste as text": "Paste as text",
"Preview": "Preview",
"Print": "Print",
"Save": "Save",
"Could not find the specified string.": "Could not find the specified string.",
"Replace": "Replace",
"Next": "Next",
"Whole words": "Whole words",
"Find and replace": "Find and replace",
"Replace with": "Replace with",
"Find": "Find",
"Replace all": "Replace all",
"Match case": "Match case",
"Prev": "Prev",
"Spellcheck": "Spell-check",
"Finish": "Finish",
"Ignore all": "Ignore all",
"Ignore": "Ignore",
"Add to Dictionary": "Add to Dictionary",
"Insert row before": "Insert row before",
"Rows": "Rows",
"Height": "Height",
"Paste row after": "Paste row after",
"Alignment": "Alignment",
"Border color": "Border colour",
"Column group": "Column group",
"Row": "Row",
"Insert column before": "Insert column before",
"Split cell": "Split cell",
"Cell padding": "Cell padding",
"Cell spacing": "Cell spacing",
"Row type": "Row type",
"Insert table": "Insert table",
"Body": "Body",
"Caption": "Caption",
"Footer": "Footer",
"Delete row": "Delete row",
"Paste row before": "Paste row before",
"Scope": "Scope",
"Delete table": "Delete table",
"H Align": "H Align",
"Top": "Top",
"Header cell": "Header cell",
"Column": "Column",
"Row group": "Row group",
"Cell": "Cell",
"Middle": "Middle",
"Cell type": "Cell type",
"Copy row": "Copy row",
"Row properties": "Row properties",
"Table properties": "Table properties",
"Bottom": "Bottom",
"V Align": "V Align",
"Header": "Header",
"Right": "Right",
"Insert column after": "Insert column after",
"Cols": "Cols",
"Insert row after": "Insert row after",
"Width": "Width",
"Cell properties": "Cell properties",
"Left": "Left",
"Cut row": "Cut row",
"Delete column": "Delete column",
"Center": "Centre",
"Merge cells": "Merge cells",
"Insert template": "Insert template",
"Templates": "Templates",
"Background color": "Background colour",
"Custom...": "Custom...",
"Custom color": "Custom colour",
"No color": "No colour",
"Text color": "Text colour",
"Table of Contents": "Table of Contents",
"Show blocks": "Show blocks",
"Show invisible characters": "Show invisible characters",
"Words: {0}": "Words: {0}",
"Insert": "Insert",
"File": "File",
"Edit": "Edit",
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help",
"Tools": "Tools",
"View": "View",
"Table": "Table",
"Format": "Format"
});
\ No newline at end of file
<template>
<div id='app'>
<app-debug-actions />
<router-view v-if="isRouterAlive"/>
</div>
</template>
......
......@@ -60,6 +60,12 @@ import AppActionBar from './components/app-actionbar/app-actionbar.vue'
import AppOrgSector from './components/app-orgsector/app-orgsector.vue'
import AppBuild from './components/app-build/app-build.vue'
import AppStudioAction from './components/app-studioaction/app-studioaction.vue'
import AppDebugActions from './components/app-debug-actions/app-debug-actions.vue'
import AppHeaderMenus from './components/app-header-menus/app-header-menus.vue'
import AppColumnLink from './components/app-column-link/app-column-link.vue'
import AppDataUploadView from './components/app-data-upload/app-data-upload.vue'
import DropDownListDynamic from './components/dropdown-list-dynamic/dropdown-list-dynamic.vue'
import AppImagePreview from './components/app-image-preview/app-image-preview.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -129,5 +135,11 @@ export const AppComponents = {
v.component('app-orgsector', AppOrgSector);
v.component('app-build', AppBuild);
v.component('app-studioaction', AppStudioAction);
v.component('app-debug-actions', AppDebugActions);
v.component('app-header-menus', AppHeaderMenus);
v.component('app-column-link', AppColumnLink);
v.component('app-data-upload', AppDataUploadView);
v.component('dropdown-list-dynamic', DropDownListDynamic);
v.component('app-image-preview', AppImagePreview);
},
};
\ No newline at end of file
app_Web/src/assets/img/logo.png

6.7 KB | W: | H:

app_Web/src/assets/img/logo.png

2.0 KB | W: | H:

app_Web/src/assets/img/logo.png
app_Web/src/assets/img/logo.png
app_Web/src/assets/img/logo.png
app_Web/src/assets/img/logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -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 {
......
<template>
<checkbox-group class="app-checkbox-list" v-model="selectArray">
<checkbox v-for="(item,index) in items" :key="index" :label="item.value" :disabled="isDisabled || item.disabled">
<span>{{item.text}}</span>
<span>{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}</span>
</checkbox>
</checkbox-group >
</template>
......@@ -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')`);
});
}
}
......
.app-column-link{
display: inline-block;
cursor:pointer;
}
\ No newline at end of file
<template>
<a class="app-column-link" @click="openLinkView($event)">
<slot></slot>
</a>
</template>
<script lang="ts">
import { Vue, Component,Prop } from 'vue-property-decorator';
import { Subject } from 'rxjs';
/**
* 表格列链接
*/
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
error: '错误',
valueItemException:"值项异常",
rowDataException:"表格行数据异常"
}
},
'en-US': {
info: {
error: 'error',
valueItemException:"value item exception",
rowDataException:"table row data exception"
}
}
}
}
})
export default class AppColumnLink extends Vue {
/**
* 表格行数据
*
* @type {*}
* @memberof AppColumnLink
*/
@Prop() public data!: any;
/**
* 数据链接视图
*
* @type {*}
* @memberof AppColumnLink
*/
@Prop() public linkview?: any;
/**
* 值项名称
*
* @type {string}
* @memberof AppColumnLink
*/
@Prop() public valueitem?: string;
/**
* 导航上下文
*
* @type {*}
* @memberof AppColumnLink
*/
@Prop({default:{}}) public context?:any;
/**
* 导航参数
*
* @type {*}
* @memberof AppColumnLink
*/
@Prop({default:{}}) public viewparams?:any;
/**
* 应用实体主键属性名称
*
* @type {string}
* @memberof AppColumnLink
*/
@Prop() public deKeyField!:string;
/**
* 打开链接视图
*
* @memberof AppColumnLink
*/
public openLinkView($event: any): void {
$event.stopPropagation();
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$Notice.error({ title: (this.$t('info.error') as string), desc: (this.$t('info.valueItemException') as string) });
return;
}
// 公共参数处理
let data: any = {};
const bcancel: boolean = this.handlePublicParams(data);
if (!bcancel) {
return;
}
// 参数处理
let _context = data.context;
let _param = data.param;
Object.assign(_context, { [this.deKeyField]: this.data[this.valueitem] });
const view = JSON.parse(JSON.stringify(this.linkview));
const viewname2: string = this.$util.srfFilePath2(view.viewname);
view.viewname = viewname2;
if (view.isRedirectView) {
this.openRedirectView($event, view, data);
} else if (Object.is(view.placement, 'INDEXVIEWTAB') || Object.is(view.placement, '')) {
this.openIndexViewTab(view, _context, _param);
} else if (Object.is(view.placement, 'POPOVER')) {
this.openPopOver($event, view, _context, _param);
} else if (Object.is(view.placement, 'POPUPMODAL')) {
this.openPopupModal(view, _context, _param);
} else if (view.placement.startsWith('DRAWER')) {
this.openDrawer(view, _context, _param);
}
}
/**
* 路由模式打开视图
*
* @private
* @param {string} viewpath
* @param {*} data
* @memberof AppColumnLink
*/
private openIndexViewTab(view: any, context: any, param: any): void {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, this.context, view.deResParameters, view.parameters, [context] , param);
this.$router.push(routePath);
}
/**
* 模态模式打开视图
*
* @private
* @param {*} view
* @param {*} data
* @memberof AppColumnLink
*/
private openPopupModal(view: any, context: any, param: any): void {
let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
this.openViewClose(result);
});
}
/**
* 抽屉模式打开视图
*
* @private
* @param {*} view
* @param {*} data
* @memberof AppColumnLink
*/
private openDrawer(view: any, context: any, param: any): void {
let container: Subject<any> = this.$appdrawer.openDrawer(view, context, param);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
this.openViewClose(result);
});
}
/**
* 气泡卡片模式打开
*
* @private
* @param {*} $event
* @param {*} view
* @param {*} data
* @memberof AppColumnLink
*/
private openPopOver($event: any, view: any, context: any, param: any): void {
let container: Subject<any> = this.$apppopover.openPop($event, view, context, param);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
this.openViewClose(result);
});
}
/**
* 独立里面弹出
*
* @private
* @param {string} url
* @memberof AppColumnLink
*/
private openPopupApp(url: string): void {
window.open(url, '_blank');
}
/**
* 打开重定向视图
*
* @private
* @param {*} $event
* @param {*} view
* @param {*} data
* @memberof AppColumnLink
*/
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: '请求异常' });
}
if (response.status === 401) {
return;
}
const { data: result } = response;
if (result.viewparams && !Object.is(result.viewparams.srfkey, '')) {
Object.assign(data, { srfkey: result.viewparams.srfkey });
}
if (Object.is(result.openmode, 'POPUPAPP') && result.url && !Object.is(result.url, '')) {
this.openPopupApp(result.url);
} else if (Object.is(result.openmode, 'INDEXVIEWTAB') || Object.is(result.openmode, '')) {
// 所有数据保持在同一级
if (data.srfparentdata) {
Object.assign(data, data.srfparentdata);
delete data.srfparentdata;
}
this.openIndexViewTab(view, null, data);
} else if (Object.is(result.openmode, 'POPUPMODAL')) {
const viewname = this.$util.srfFilePath2(result.viewname);
const view: any = {
viewname: viewname,
title: result.title,
width: result.width,
height: result.height,
}
this.openPopupModal(view, null,data);
} else if (result.openmode.startsWith('DRAWER')) {
const viewname = this.$util.srfFilePath2(result.viewname);
const view: any = {
viewname: viewname,
title: result.title,
width: result.width,
height: result.height,
placement: result.openmode,
}
this.openDrawer(view, null, data);
} else if (Object.is(result.openmode, 'POPOVER')) {
const viewname = this.$util.srfFilePath2(result.viewname);
const view: any = {
viewname: viewname,
title: result.title,
width: result.width,
height: result.height,
placement: result.openmode,
}
this.openPopOver($event, view, null, data);
}
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常!' });
return;
}
if (response.status === 401) {
return;
}
});
}
/**
* 打开页面关闭
*
* @param {*} result
* @memberof AppColumnLink
*/
public openViewClose(result: any) {
let item: any = {};
if (result.datas && Array.isArray(result.datas)) {
Object.assign(item, result.datas[0]);
}
console.log(item);
}
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppColumnLink
*/
public handlePublicParams(arg: any): boolean {
if (!this.data) {
this.$Notice.error({ title: (this.$t('info.error') as string), desc: (this.$t('info.rowDataException') as string) });
return false;
}
// 合并表单参数
arg.param = JSON.parse(JSON.stringify(this.viewparams));
arg.context = JSON.parse(JSON.stringify(this.context));
return true;
}
}
</script>
<style lang='less'>
@import './app-column-link.less';
</style>
\ No newline at end of file
......@@ -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();
......
.app-data-upload-view{
width: 100%;
height: 100%;
padding: 16px;
.import-temp{
text-align: right;
vertical-align: middle;
color: #409EFF;
}
.data-info-content{
height: 100%;
width: 100%;
overflow: auto;
}
}
\ No newline at end of file
.app-debug-actions {
position: absolute;
top: 0px;
left: 50%;
z-index: 10000;
text-align: center;
transition: all 0.3s;
margin-top: -32px;
>.actions {
.ivu-btn {
width: 100%;
}
}
>.show-buttons {
width: 100%;
height: 18px;
border-width: 0px 1px 1px 1px;
border-style: solid;
border-color: #8893a7;
text-align: center;
color: #8893a7;
cursor: pointer;
>.button {
margin-top: -5px;
}
}
}
.app-debug-actions:hover {
margin-top: 0px;
}
\ No newline at end of file
<template>
<div class="app-debug-actions">
<div class="actions">
<button-group vertical>
<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">
<div class="button"><i class="ivu-icon ivu-icon-ios-arrow-down" /></div>
</div>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component } from 'vue-property-decorator';
import { StudioActionUtil } from '@/utils';
import { Environment } from '@/environments/environment';
/**
* 开发模式控制行为组
*
* @export
* @class AppDebugActions
* @extends {Vue}
*/
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
button: '开启配置模式',
}
},
'en-US': {
info: {
button: 'Open Configuration Mode',
}
}
}
}
})
export default class AppDebugActions extends Vue {
/**
* 配置平台操作控制器
*
* @type {StudioActionController}
* @memberof AppDebugActions
*/
public sdc: StudioActionUtil = StudioActionUtil.getInstance();
}
</script>
<style lang = "less">
@import "./app-debug-actions.less";
</style>
\ No newline at end of file
......@@ -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,17 +2,17 @@
<dropdown v-if="itemLevel === 0" :transfer="true" trigger='click'>
<i-button :disabled="item.disabled">
<i class='fa fa-file-excel-o'></i>
<span class='caption'>{{item.caption}}</span>
<span class='caption'>{{caption}}</span>
</i-button>
<dropdown-menu slot='list'>
<dropdown-item>
<p @click="exportExcel($event, 'maxRowCount')">
{{item.caption}}全部(最大{{item.caption}}{{item.MaxRowCount}})
{{caption}}{{$t('info.total')}}({{$t('info.max')}}{{caption}}{{item.MaxRowCount}}{{$t('info.row')}})
</p>
</dropdown-item>
<dropdown-item>
<p @click="exportExcel($event, 'activatedPage')">
{{this.item.caption}}当前页
{{caption}}{{$t('info.currentPage')}}
</p>
</dropdown-item>
</dropdown-menu>
......@@ -29,7 +29,28 @@ import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
* @class AppExportExcel
* @extends {Vue}
*/
@Component({})
@Component({
i18n: {
messages: {
'zh-CN': {
info: {
total: '全部',
max: '最大',
row: '行',
currentPage: '当前页',
}
},
'en-US': {
info: {
total: 'All',
max: 'At Most',
row: 'Lines',
currentPage: 'Current Page',
}
}
}
}
})
export default class AppExportExcel extends Vue {
/**
......@@ -40,6 +61,14 @@ export default class AppExportExcel extends Vue {
*/
@Prop() public item?: any;
/**
* 工具栏项
*
* @type {*}
* @memberof AppExportExcel
*/
@Prop() public caption?: any;
/**
* 工具栏项层级
*
......@@ -128,4 +157,4 @@ export default class AppExportExcel extends Vue {
<style lang='less'>
@import './app-export-excel.less';
</style>
\ No newline at end of file
</style>
......@@ -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 = '请先保存主数据';
/**
* 是否刷新关系数据
*
......
.app-header-menus {
display: flex;
align-items: center;
height: 100%;
line-height: 20px;
>.app-header-menu-item{
height: 24px;
display: flex;
align-items: center;
margin-right: 16px;
color: #8893a7;
border: 1px solid rgba(0, 0, 0, 0);
cursor: pointer;
}
>.app-header-menu-item.icon {
>.app-header-menu-item-icon {
font-size: 20px;
}
>.app-header-menu-item-img {
height: 20px;
width: 20px;
>img {
height: 100%;
width: 100%;
}
}
}
>.app-header-menu-item.icon:hover{
color: #68758e;
text-decoration: none;
}
>.app-header-menu-item.text {
border-radius: 4px;
border: 1px solid #8893a7;
text-align: center;
font-size: 12px;
padding: 2px 4px;
>.app-header-menu-item-icon {
width: 20px;
height: 20px;
overflow: hidden;
font-size: 16px;
margin-right: 3px;
margin-top: -3px;
}
>.app-header-menu-item-img {
height: 16px;
width: 16px;
margin-right: 3px;
>img {
height: 100%;
width: 100%;
}
}
}
>.app-header-menu-item.text:hover {
color: #107fff;
border: 1px solid #107fff;
}
}
.app-header-menus:hover {
background: none !important;
}
\ No newline at end of file
<template>
<div class="app-header-menus">
<div v-for="(menu,index) in menus" :key="index" class="app-header-menu-item text" @click="openWindow(menu)">
<div class="app-header-menu-item-icon">
<i :class="menu.iconcls" :aria-hidden="true" />
</div>
<div class="app-header-menu-item-text">{{$t(menu.title)}}</div>
</div>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Model, Emit } from "vue-property-decorator";
import { Subject } from "rxjs";
import { Environment } from '@/environments/environment';
@Component({
i18n: {
messages: {
'zh-CN': {
menus: {
ibizlab:{
title: 'iBiz开放平台',
},
publishProject:{
title: '项目文件',
},
ibizstudio:{
title: '模型设计工具',
},
ibizbbs:{
title: 'iBiz论坛',
},
}
},
'en-US': {
menus: {
ibizlab:{
title: 'iBizLab',
},
publishProject:{
title: 'Publish Project',
},
ibizstudio:{
title: 'Model Design Tools',
},
ibizbbs:{
title: 'iBizBBS',
},
}
}
}
}
})
export default class AppHeaderMenus extends Vue {
/**
* 菜单数据
*
* @type {any}
* @memberof AppHeaderMenus
*/
public menus:any = [
{
name: "ibizlab",
title: "menus.ibizlab.title",
url: Environment.ibizlabtUrl,
iconcls: 'fa fa-home',
},
{
name: "publishProject",
title: "menus.publishProject.title",
url: Environment.PublishProjectUrl,
iconcls: 'fa fa-folder-open-o',
},
{
name: "ibizstudio",
title: "menus.ibizstudio.title",
url: `${Environment.StudioUrl}?#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview`,
iconcls: 'fa fa-wrench',
},
{
name: "ibizbbs",
title: "menus.ibizbbs.title",
url: Environment.ibizbbstUrl,
iconcls: 'fa fa-comments-o',
},
];
/**
* 触发界面行为
*
* @memberof AppHeaderMenus
*/
public openWindow(menu:any){
window.open(menu.url, '_blank');
}
}
</script>
<style lang='less'>
@import "./app-header-menus.less";
</style>
\ No newline at end of file
/*** BEGIN:图片上传 ***/
.app-picture-preview {
.preview-file-list-item{
margin: 0 8px 8px 0;
display: inline-block;
position: relative;
}
.preview-file-list-img{
display: inline-block;
position: relative;
width: 148px;
height: 148px;
.el-image{
width: 100%;
height: 100%;
.image-slot{
width: 100%;
height: 100%;
}
}
}
.preview-file-list-actions{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
font-size: 20px;
text-align: center;
color: #fff;
opacity: 0;
transition: opacity .3s;
.action-download{
margin-left: 15px;
}
}
.preview-file-list-actions:hover{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
font-size: 20px;
text-align: center;
color: #fff;
opacity: 1;
background-color: rgba(0,0,0,.5);
}
.preview-file-list-actions::after{
display: inline-block;
content: "";
height: 100%;
vertical-align: middle;
}
>div{
display: inline;
}
}
.app-image-preview-model {
width: 100%;
height: 100%;
text-align: center;
.ivu-modal{
top: 50%;
transform: translateY(-50%);
display: inline-block;
.ivu-modal-content{
display: inline-block;
.ivu-modal-close{
display: none;
}
.ivu-modal-body{
display: inline-block;
line-height: 0;
.el-image {
width: auto;
height: auto;
line-height: 0;
.image-slot {
width: auto;
height: auto;
line-height: 0;
img{
max-width: 1200px;
max-height: 1600px;
}
}
}
}
}
}
}
/*** END:图片上传 ***/
\ No newline at end of file
<template>
<div class='app-picture-preview'>
<ul class="">
<li v-for="(file,index) in files" :key="index" class="preview-file-list-item">
<div class='preview-file-list-img'>
<el-image :src="file.url" class='' style=''>
<div slot='error' class='image-slot'>
<img src="/assets/img/picture.png" style='width:100%;height:100%;'>
</div>
</el-image>
<div class='preview-file-list-actions'>
<span class='action-preview'>
<i class='el-icon-zoom-in' @click="onPreview(file)"></i>
</span>
<span class='action-download'>
<i class='el-icon-download' @click="onDownload(file)"></i>
</span>
</div>
</div>
</li>
</ul>
<!-- 预览 -->
<modal v-model="dialogVisible" footer-hide width="auto" class-name='app-image-preview-model'>
<el-image src="dialogImageUrl">
<div slot='error' class='image-slot'>
<img src="/assets/img/picture.png">
</div>
</el-image>
</modal>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Watch, Provide } from 'vue-property-decorator';
import { Environment } from '@/environments/environment';
import { Subject, Unsubscribable } from 'rxjs';
@Component({})
export default class AppImageUpload extends Vue {
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof AppImageUpload
*/
@Prop() public formState?: Subject<any>
/**
* 表单状态事件
*
* @private
* @type {(Unsubscribable | undefined)}
* @memberof AppImageUpload
*/
private formStateEvent: Unsubscribable | undefined;
/**
* 初始化值
*
* @type {*}
* @memberof AppImageUpload
*/
@Prop() public value?: any;
/**
* 数据值变化
*
* @param {*} newval
* @param {*} val
* @returns
* @memberof AppImageUpload
*/
@Watch('value')
onValueChange(newval: any, val: any) {
this.setFiles(newval)
}
/**
* 所属表单项名称
*
* @type {string}
* @memberof AppImageUpload
*/
@Prop() public name!: string;
/**
* 上传文件路径
*
* @memberof AppImageUpload
*/
public uploadUrl = Environment.BaseUrl + Environment.UploadFile;
/**
* 下载文件路径
*
* @memberof AppImageUpload
*/
public downloadUrl = Environment.BaseUrl + Environment.ExportFile;
/**
* 文件列表
*
* @memberof AppImageUpload
*/
@Provide() public files = [];
/**
* 设置files
*
* @private
* @memberof AppImageUpload
*/
private setFiles(value:any): void {
let _files = JSON.parse(value);
if (value && Object.prototype.toString.call(_files)=='[object Array]') {
this.files = _files;
this.files.forEach((file: any) => {
let url = `${this.downloadUrl}/${file.id}`;
file.url = url;
});
} else {
this.files = [];
}
}
/**
* vue 生命周期
*
* @memberof AppImageUpload
*/
public created() {
if (this.formState) {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if (Object.is($event.type, 'load')) {
this.setFiles(this.value);
}
});
}
}
/**
* vue 生命周期
*
* @memberof AppImageUpload
*/
public mounted() {
this.setFiles(this.value);
}
/**
* 组件销毁
*
* @memberof AppImageUpload
*/
public destroyed(): void {
if (this.formStateEvent) {
this.formStateEvent.unsubscribe();
}
}
/**
* 下载文件
*
* @param {*} file
* @memberof AppImageUpload
*/
public onDownload(file: any) {
window.open(file.url);
}
/**
* 预览图片地址
*
* @type {string}
* @memberof AppImageUpload
*/
public dialogImageUrl: string = '';
/**
* 是否显示预览界面
*
* @type {boolean}
* @memberof AppImageUpload
*/
public dialogVisible: boolean = false;
/**
* 预览
*
* @param {*} file
* @memberof AppImageUpload
*/
public onPreview(file: any) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
}
}
</script>
<style lang = "less">
@import './app-image-preview.less';
</style>
\ No newline at end of file
<template>
<dropdown trigger='click' on-click="selectLang">
<dropdown trigger='click' @on-click="selectLang">
<span>
{{title}}
<icon size='18' type='md-arrow-dropdown'></icon>
......
......@@ -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>
<radio-group class="app-radio-group" v-model="value" >
<radio v-for="(_item,index) in items" :key = "index" :label="_item.value" :disabled="isDisabled || _item.disabled">
<span>{{_item.text}}</span>
<span>{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+_item.value) : _item.text}}</span>
</radio>
</radio-group>
</template>
......
<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 {
/**
......
......@@ -44,6 +44,7 @@ export default class AppRichTextEditor extends Vue {
this.init(newval);
}
}
/**
* 输入name
......@@ -63,17 +64,38 @@ export default class AppRichTextEditor extends Vue {
/**
* 当前语言,默认中文
*/
@Prop() langu?: string;
public langu: any = localStorage.getItem('local') ? localStorage.getItem('local') : 'zh_CN' ;
/**
* 监听语言变化
*/
@Watch('$i18n.locale')
onLocaleChange(newval: any, val: any) {
console.log("语言变更"+newval)
this.langu = newval;
if(this.editor){
tinymceCode.remove('#' + this.id);
}
this.init('');
}
/**
* 语言映射文件
*/
public languMap:any = {
'zh-CN': 'zh_CN',
'en-US': 'en_US',
};
/**
* 上传文件路径
*/
public uploadUrl = '/' + Environment.BaseUrl + Environment.UploadFile;
public uploadUrl = Environment.BaseUrl + Environment.UploadFile;
/**
* 下载路径
*/
public downloadUrl = '/' + Environment.BaseUrl + Environment.ExportFile;
public downloadUrl = Environment.BaseUrl + Environment.ExportFile;
/**
* 当前富文本
......@@ -154,7 +176,8 @@ export default class AppRichTextEditor extends Vue {
paste_data_images: true,
codesample_content_css: 'assets/tinymce/prism.css',
skin_url: './assets/tinymce/skins/lightgray',
language_url: './assets/tinymce/langs/' + (this.langu ? this.langu : 'zh_CN') + '.js',
language_url: './assets/tinymce/langs/' + this.languMap[this.langu] + '.js',
language:this.languMap[this.langu],
setup: (editor: any) => {
this.editor = editor;
editor.on('blur', () => {
......@@ -166,14 +189,15 @@ export default class AppRichTextEditor extends Vue {
const formData = new FormData();
formData.append('file', bolbinfo.blob(), bolbinfo.filename());
const _url = richtexteditor.uploadUrl;
richtexteditor.uploadFile(_url, formData).subscribe((response: any) => {
if (response.ret === 0 && response.files.length > 0) {
const id: string = response.files[0].id;
const url: string = `${richtexteditor.downloadUrl}?fileid=${id}`
richtexteditor.uploadFile(_url, formData).subscribe((file: any) => {
if (file.filename) {
const id: string = file.fileid;
const url: string = `${richtexteditor.downloadUrl}/${id}`
success(url);
}
}, (error: any) => {
console.log(error);
failure('HTTP Error: ' + error.status);
});
},
init_instance_callback: (editor: any) => {
......
<template>
<span>{{text}}</span>
<span>{{isUseLangres ? $t(text) : text}}</span>
</template>
<script lang="ts">
......@@ -85,6 +85,13 @@ export default class DropDownList extends Vue {
this.load();
}
/**
* 是否使用多语言资源
* @type {boolean}
* @memberof AppSpan
*/
public isUseLangres:boolean = false;
/**
* 加载代码表
*
......@@ -125,12 +132,26 @@ export default class DropDownList extends Vue {
* @memberof AppSpan
*/
public setText(){
this.isUseLangres = false;
if(this.items.length>0){
let currentItem:any = this.items.find((item:any)=>{
return item.value == this.data;
});
if(currentItem){
this.text = currentItem.label;
if(Object.is(this.codelistType,'STATIC')){
this.isUseLangres = true;
this.text = 'codelist.'+this.tag+'.'+this.data;
}else{
this.text = currentItem.label;
}
}else{
// 不匹配显示原值,不存在显示空值
if(this.data){
this.text = this.data;
}else{
this.isUseLangres = true;
this.text = 'codelist.'+this.tag+'.empty';
}
}
}else{
this.text = this.data;
......
<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;
/**
* 属性项名称
......
......@@ -2,7 +2,7 @@
<div class='app-header-user'>
<dropdown @on-click="userSelect" :transfer="true">
<div class='user'>
<span>{{user.name}}</span>
<span>{{user.name ? user.name : $t('user.name')}}</span>
&nbsp;&nbsp;<avatar :src="user.avatar" />
</div>
<dropdown-menu class='menu' slot='list' style='font-size: 15px !important;'>
......@@ -22,14 +22,14 @@ import { Vue, Component } from 'vue-property-decorator';
messages: {
'zh-CN': {
user: {
name: '匿名访问',
name: '系统管理员',
logout: '退出登陆',
surelogout: '确认要退出登陆?',
}
},
'en-US': {
user: {
name: 'Anonymous access',
name: 'System',
logout: 'Logout',
surelogout: 'Are you sure logout?',
}
......@@ -45,7 +45,7 @@ export default class AppUser extends Vue {
* @memberof AppUser
*/
public user = {
name: 'user.name',
name: '',
avatar: './assets/img/avatar.png',
}
......
<template>
<div class="codelist">
<span v-if="ifEmpty">{{emptytext}}</span>
<span v-if="ifEmpty">{{$t('codelist.'+srfkey+'.empty')}}</span>
<template v-if="!ifEmpty">
<template v-if="renderMode == 'string'">
<template v-for="(val, index) in items">
......@@ -8,7 +8,7 @@
<template v-for="(item, index) in val">
{{ index != 0 ? "、" : ''}}
<i v-if="item.iconCls" :class="item.iconCls"></i>
<span :class="item.textCls" :style="{color:item.color}">{{item.text}}</span>
<span :class="item.textCls" :style="{color:item.color}">{{isUseLangres ? $t(item.text) : item.text}}</span>
</template>
</template>
</template>
......@@ -16,7 +16,7 @@
<template v-for="(item, index) in items">
{{ index != 0 ? textSeparator : ''}}
<i v-if="item.iconCls" :class="item.iconCls"></i>
<span :class="item.textCls" :style="{color:item.color}">{{item.text}}</span>
<span :class="item.textCls" :style="{color:item.color}">{{isUseLangres ? $t(item.text) : item.text}}</span>
</template>
</template>
</template>
......@@ -113,6 +113,13 @@ export default class CodeList extends Vue {
this.dataHandle();
}
/**
* 是否使用多语言资源
* @type {boolean}
* @memberof CodeList
*/
public isUseLangres:boolean = false;
/**
* 数据值变化
*
......@@ -133,6 +140,7 @@ export default class CodeList extends Vue {
* @memberof CodeList
*/
private dataHandle(){
this.isUseLangres = false;
let _this = this;
// 空值判断
if(Object.is(this.$util.typeOf(this.value), 'undefined') || Object.is(this.$util.typeOf(this.value), 'null')){
......@@ -150,6 +158,7 @@ export default class CodeList extends Vue {
});
// 静态处理
} else if(Object.is(this.codelistType, "STATIC")){
this.isUseLangres = true;
let items = this.$store.getters.getCodeListItems(this.srfkey);
_this.setItems(items, _this);
}
......@@ -168,6 +177,7 @@ export default class CodeList extends Vue {
if (items) {
let result:any = [];
if(Object.is(this.renderMode,"number")){
this.isUseLangres = false;
items.map((_item: any, index: number)=>{
const nValue = parseInt((_this.value as any), 10);
const codevalue = _item.value;
......@@ -186,6 +196,9 @@ export default class CodeList extends Vue {
result[index].push(item);
}
});
if(result[index].length == 0){
result.splice(index,1);
}
});
} else {
let values: any[] = Object.is(this.$util.typeOf(this.value), 'number') ? [this.value] : [...(this.value as any).split(this.valueSeparator)];
......@@ -198,9 +211,13 @@ export default class CodeList extends Vue {
}
// 设置items
if(result.length != 0){
_this.items = result;
_this.items = result;
}else{
_this.items = [{text:"不匹配"}];
if(Object.is(this.renderMode,"string")){
_this.items = [[{text:this.value}]];
} else {
_this.items = [{text:this.value}];
}
}
}
}
......@@ -221,10 +238,18 @@ export default class CodeList extends Vue {
return undefined;
}
result = { ...arr[0] };
return result;
if(Object.is(this.codelistType,'STATIC')){
let value = JSON.parse(JSON.stringify(result));
value.text = 'codelist.'+this.srfkey+'.'+value.value;
return value;
}else{
return result;
}
}
}
</script>
......
<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;
/**
* 双向绑定值
......
<template>
<i-select
class='dropdown-list-dynamic'
:transfer="true"
v-model="currentVal"
:disabled="disabled === true ? true : false"
:clearable="true"
:filterable="filterable === true ? true : false"
@on-open-change="onClick"
:placeholder="placeholder ? this.placeholder : $t('placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value">{{($t('userCustom.'+tag+'.'+item.value)!== ('userCustom.'+tag+'.'+item.value))?$t('userCustom.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
</template>
<script lang="ts">
import { Vue, Component, Watch, Prop, Model } from 'vue-property-decorator';
import CodeListService from "@service/app/codelist-service";
@Component({
i18n: {
messages: {
'zh-CN': {
placeholder: '请选择...'
},
'en-US': {
placeholder: 'please select...'
}
}
}
})
export default class DropDownListDynamic extends Vue {
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof DropDownListDynamic
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 额外参数
*
* @type {*}
* @memberof DropDownListDynamic
*/
public otherParam:any;
/**
* 查询参数
* @type {*}
* @memberof DropDownListDynamic
*/
public queryParam:any;
/**
* 当前选中值
* @type {any}
* @memberof DropDownListDynamic
*/
@Model('change') readonly itemValue!: any;
/**
* 代码表标识
*
* @type {string}
* @memberof DropDownListDynamic
*/
@Prop() public tag?: string;
/**
* 代码表类型
*
* @type {string}
* @memberof DropDownListDynamic
*/
@Prop() public codelistType?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof DropDownListDynamic
*/
@Prop() public data?: any;
/**
* 监听表单数据
*
* @memberof DropDownListDynamic
*/
@Watch('data',{ deep: true })
onDataChange(newVal: any, val: any){
if(newVal){
this.handleOtherParam();
}
}
/**
* 传入额外参数
*
* @type {*}
* @memberof DropDownListDynamic
*/
@Prop() public itemParam?: any;
/**
* 是否禁用
* @type {any}
* @memberof DropDownListDynamic
*
*/
@Prop() public disabled?: any;
/**
* 是否支持过滤
* @type {boolean}
* @memberof DropDownListDynamic
*/
@Prop() public filterable?: boolean;
/**
* 下拉选提示内容
* @type {string}
* @memberof DropDownListDynamic
*/
@Prop() public placeholder?: string;
/**
* 计算属性(当前值)
* @type {any}
* @memberof DropDownListDynamic
*/
set currentVal(val: any) {
const type: string = this.$util.typeOf(val);
val = Object.is(type, 'null') || Object.is(type, 'undefined') ? undefined : val;
this.$emit('change', val);
}
/**
* 获取值对象
*
* @memberof DropDownListDynamic
*/
get currentVal() {
return this.itemValue;
}
/**
* 代码表
*
* @type {any[]}
* @memberof DropDownListDynamic
*/
public items: any[] = [];
/**
* 处理额外参数
*/
public handleOtherParam(){
if(this.itemParam){
this.queryParam = {};
this.otherParam = this.itemParam.parentdata;
if(this.otherParam && Object.keys(this.otherParam).length >0){
Object.keys(this.otherParam).forEach((item:any) =>{
let value: string | null = this.otherParam[item];
if (value && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1);
if (this.data && this.data.hasOwnProperty(key)) {
value = (this.data[key] !== null && this.data[key] !== undefined) ? this.data[key] : null;
} else {
value = null;
}
}
Object.assign(this.queryParam,{[item]:value});
})
}
}
}
/**
* vue 生命周期
*
* @memberof DropDownListDynamic
*/
public created() {
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))];
} else {
console.log(`----${this.tag}----代码表不存在`);
}
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag,{},this.queryParam).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
});
}
}
/**
* 下拉点击事件
*
* @param {*} $event
* @memberof DropDownListDynamic
*/
public onClick($event:any){
if($event){
if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag,{},this.queryParam).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
});
}
}
}
}
</script>
<style lang='less'>
@import './dropdown-list-dynamic.less';
</style>
\ No newline at end of file
......@@ -8,10 +8,10 @@
: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">
{{item.text}}
{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}
</Checkbox>
</i-option>
</i-select>
......@@ -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 {
/**
* 代码表服务对象
......@@ -110,7 +121,6 @@ export default class DropDownList extends Vue {
* @memberof DropDownListMpicker
*/
public created() {
this.currentVal = [];
if(this.tag && Object.is(this.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
......
......@@ -7,16 +7,27 @@
:clearable="true"
:filterable="filterable === true ? true : false"
@on-open-change="onClick"
:placeholder="placeholder ? this.placeholder : '请选择'">
<i-option v-for="(item, index) in items" :key="index" :value="item.value">{{item.text}}</i-option>
:placeholder="placeholder ? this.placeholder : $t('placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value">{{($t('codelist.'+tag+'.'+item.value)!== ('codelist.'+tag+'.'+item.value))?$t('codelist.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
</template>
<script lang="ts">
import { Vue, Component, Prop, Model } from 'vue-property-decorator';
import { Vue, Component, Watch, 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 {
/**
* 代码表服务对象
......@@ -26,6 +37,21 @@ export default class DropDownList extends Vue {
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 额外参数
*
* @type {*}
* @memberof DropDownList
*/
public otherParam:any;
/**
* 查询参数
* @type {*}
* @memberof DropDownList
*/
public queryParam:any;
/**
* 当前选中值
* @type {any}
......@@ -45,14 +71,42 @@ export default class DropDownList extends Vue {
* 代码表类型
*
* @type {string}
* @memberof AppCheckBox
* @memberof DropDownList
*/
@Prop() public codelistType?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public data?: any;
/**
* 监听表单数据
*
* @memberof DropDownList
*/
@Watch('data',{ deep: true })
onDataChange(newVal: any, val: any){
if(newVal){
this.handleOtherParam();
}
}
/**
* 传入额外参数
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public itemParam?: any;
/**
* 是否禁用
* @type {any}
* @memberof SelectPicker
* @memberof DropDownList
*
*/
@Prop() public disabled?: any;
......@@ -60,21 +114,22 @@ export default class DropDownList extends Vue {
/**
* 是否支持过滤
* @type {boolean}
* @memberof SelectPicker
* @memberof DropDownList
*/
@Prop() public filterable?: boolean;
/**
* 下拉选提示内容
* @type {string}
* @memberof SelectPicker
* @memberof DropDownList
*/
@Prop() public placeholder?: string;
/**
* 计算属性(当前值)
* @type {any}
* @memberof SelectPicker
* @memberof DropDownList
*/
set currentVal(val: any) {
const type: string = this.$util.typeOf(val);
......@@ -99,6 +154,30 @@ export default class DropDownList extends Vue {
*/
public items: any[] = [];
/**
* 处理额外参数
*/
public handleOtherParam(){
if(this.itemParam){
this.queryParam = {};
this.otherParam = this.itemParam.parentdata;
if(this.otherParam && Object.keys(this.otherParam).length >0){
Object.keys(this.otherParam).forEach((item:any) =>{
let value: string | null = this.otherParam[item];
if (value && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1);
if (this.data && this.data.hasOwnProperty(key)) {
value = (this.data[key] !== null && this.data[key] !== undefined) ? this.data[key] : null;
} else {
value = null;
}
}
Object.assign(this.queryParam,{[item]:value});
})
}
}
}
/**
* vue 生命周期
*
......@@ -113,7 +192,7 @@ export default class DropDownList extends Vue {
console.log(`----${this.tag}----代码表不存在`);
}
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag).then((res:any) => {
this.codeListService.getItems(this.tag,{},this.queryParam).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
......@@ -128,12 +207,14 @@ export default class DropDownList extends Vue {
* @memberof DropDownList
*/
public onClick($event:any){
if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
});
if($event){
if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag,{},this.queryParam).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
});
}
}
}
......
......@@ -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 });
});
}
......
......@@ -26,9 +26,15 @@ export const Environment = {
// 配置平台地址
StudioUrl: "http://172.16.170.145/slnstudio/",
// 中心标识
DCId: "B4BF5C84-D020-4D9A-A986-8FA4FD72816C",
SlnId: "B4BF5C84-D020-4D9A-A986-8FA4FD72816C",
// 系统标识
SysId: "B428B5BE-EA90-4101-A493-BA7085D89F0A",
// 前端应用标识
AppId: "6e0b7357169ef4eba84e1347ed94bd84"
AppId: "6e0b7357169ef4eba84e1347ed94bd84",
// 项目发布文件地址
PublishProjectUrl: 'http://oauth2:cTux_e7Aoz1PrasP5dDq@demo.ibizlab.cn/ibizpoc_20003/ps.git',
// ibiz开放平台地址
ibizlabtUrl: 'https://www.ibizlab.cn',
// ibiz论坛地址
ibizbbstUrl: 'https://bbs.ibizlab.cn',
};
\ No newline at end of file
......@@ -3,6 +3,8 @@ import orguser_en_US from '@locale/lanres/org-user/org-user_en_US';
import org_en_US from '@locale/lanres/org/org_en_US';
import ps_en_US from '@locale/lanres/ps/ps_en_US';
import orgdept_en_US from '@locale/lanres/org-dept/org-dept_en_US';
import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
export default {
app: {
......@@ -28,10 +30,18 @@ export default {
search: 'Search',
reset: 'Reset',
},
calendar:{
today: 'today',
month: 'month',
week: 'week',
day: 'day',
list: 'list'
},
// 非实体视图
views: {
appindexview: {
caption: '首页',
title: '首页',
},
},
menus: {
......@@ -40,9 +50,11 @@ export default {
},
},
},
codelist: codelist_en_US,
orgdeptuser: orgdeptuser_en_US,
orguser: orguser_en_US,
org: org_en_US,
ps: ps_en_US,
orgdept: orgdept_en_US,
userCustom: userCustom_en_US,
};
\ No newline at end of file
......@@ -3,6 +3,8 @@ import orguser_zh_CN from '@locale/lanres/org-user/org-user_zh_CN';
import org_zh_CN from '@locale/lanres/org/org_zh_CN';
import ps_zh_CN from '@locale/lanres/ps/ps_zh_CN';
import orgdept_zh_CN from '@locale/lanres/org-dept/org-dept_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 {
app: {
......@@ -28,10 +30,18 @@ export default {
search: '搜索',
reset: '重置',
},
calendar:{
today: '今天',
month: '月',
week: '周',
day: '天',
list: '列'
},
// 非实体视图
views: {
appindexview: {
caption: '首页',
title: '首页',
},
},
menus: {
......@@ -40,9 +50,11 @@ export default {
},
},
},
codelist: codelist_zh_CN,
orgdeptuser: orgdeptuser_zh_CN,
orguser: orguser_zh_CN,
org: org_zh_CN,
ps: ps_zh_CN,
orgdept: orgdept_zh_CN,
userCustom: userCustom_zh_CN,
};
\ No newline at end of file
export default {
SysOperator: {
empty: '',
},
};
\ No newline at end of file
export default {
SysOperator: {
empty: '',
},
};
\ No newline at end of file
......@@ -3,9 +3,11 @@ export default {
views: {
gridview: {
caption: "采购单",
title: '采购单',
},
editview: {
caption: "采购单",
title: '采购单',
},
},
main_form: {
......@@ -51,53 +53,53 @@ export default {
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "tbitem3",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "tbitem4",
tip: "Edit",
},
tbitem6: {
caption: "Copy",
tip: "tbitem6",
tip: "Copy",
},
tbitem26: {
caption: "-",
tip: "tbitem26",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "tbitem8",
tip: "Remove",
},
tbitem9: {
caption: "-",
tip: "tbitem9",
tip: "",
},
tbitem14_createandstartim: {
caption: "导出结果",
tip: "tbitem14_createandstartim",
tip: "导出结果",
},
tbitem19: {
caption: "Filter",
tip: "tbitem19",
tip: "Filter",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "tbitem3",
tip: "Save",
},
tbitem5: {
caption: "Save And Close",
tip: "tbitem5",
tip: "Save And Close",
},
tbitem8: {
caption: "-",
tip: "tbitem8",
tip: "",
},
tbitem17_createandstartim: {
caption: "导出结果",
tip: "tbitem17_createandstartim",
tip: "导出结果",
},
},
};
\ No newline at end of file
......@@ -2,9 +2,11 @@ export default {
views: {
gridview: {
caption: '采购单',
title: '采购单',
},
editview: {
caption: '采购单',
title: '采购单',
},
},
main_form: {
......
// 用户自定义语言资源 英文
export default {
};
\ No newline at end of file
// 用户自定义语言资源 中文
export default {
};
\ No newline at end of file
......@@ -179,7 +179,7 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser$/)).reply((config: a
});
// FetchGetorgdeptuser
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: FetchGetorgdeptuser");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
......@@ -223,7 +223,7 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault$/)).reply((config: any) =>
});
// FetchDefault
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
......
......@@ -217,7 +217,7 @@ mock.onGet(new RegExp(/^\/orgdepts\/fetchdefault$/)).reply((config: any) => {
});
// FetchDefault
mock.onGet(new RegExp(/^\/orgdepts\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/orgdepts\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdept 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
......@@ -261,7 +261,7 @@ mock.onGet(new RegExp(/^\/orgdepts\/fetchcur_org$/)).reply((config: any) => {
});
// FetchCUR_ORG
mock.onGet(new RegExp(/^\/orgdepts\/fetchcur_org(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/orgdepts\/fetchcur_org(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdept 方法: FetchCUR_ORG");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
......
......@@ -179,7 +179,7 @@ mock.onGet(new RegExp(/^\/orgusers\/fetchdefault$/)).reply((config: any) => {
});
// FetchDefault
mock.onGet(new RegExp(/^\/orgusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/orgusers\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
......
......@@ -217,7 +217,7 @@ mock.onGet(new RegExp(/^\/orgs\/fetchdefault$/)).reply((config: any) => {
});
// FetchDefault
mock.onGet(new RegExp(/^\/orgs\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/orgs\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:org 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
......
......@@ -283,7 +283,7 @@ mock.onGet(new RegExp(/^\/ps\/fetchdefault$/)).reply((config: any) => {
});
// FetchDefault
mock.onGet(new RegExp(/^\/ps\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/ps\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
......
import Mock from 'mockjs'
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
const Random = Mock.Random;
// 上传
// ajax上传
Mock.mock(RegExp(new RegExp(/^\.\.\/ibizutil\/upload.*$/)),"post",(ops:any) => { // 拦截ajax请求,调用函数
console.log(ops) // 先看一下这个ops是什么
console.log(ops.body)
......@@ -9,4 +11,12 @@ Mock.mock(RegExp(new RegExp(/^\.\.\/ibizutil\/upload.*$/)),"post",(ops:any) => {
"filename": "xxx.png",
"fileid": Random.string("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",32)
};
});
// axios上传
mock.onPost(new RegExp(/^\.\.\/ibizutil\/upload.*$/)).reply((config: any) => {
return [200, {
"filename": "xxx.png",
"fileid": Random.string("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",32)
}];
});
\ No newline at end of file
import { ChartSeries } from './chart-series';
/**
* 柱状图序列模型
*
* @export
* @class ChartBarSeries
*/
export class ChartBarSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartBarSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartBarSeries
*/
public valueField: string = '';
/**
* 分类代码表
*
* @type {string}
* @memberof ChartBarSeries
*/
public categorCodeList: any = null;
/**
* 维度定义
*
* @type {string}
* @memberof ChartBarSeries
*/
public dimensions:Array<string> = [];
/**
* 维度编码
*
* @type {*}
* @memberof ChartBarSeries
*/
public encode:any = null;
/**
* 序列模板
*
* @type {*}
* @memberof ChartBarSeries
*/
public seriesTemp:any = null;
/**
* Creates an instance of ChartBarSeries.
* ChartBarSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartBarSeries
*/
constructor(opts: any = {}) {
super(opts);
this.categorField = !Object.is(opts.categorField, '') ? opts.categorField : '';
this.categorCodeList = opts.categorCodeList ? opts.categorCodeList : null;
this.valueField = !Object.is(opts.valueField, '') ? opts.valueField : '';
this.dimensions = opts.dimensions ? opts.dimensions :'';
this.encode = opts.encode ? opts.encode : null;
this.seriesTemp = opts.seriesTemp ? opts.seriesTemp:null;
}
/**
* 设置分类属性
*
* @param {string} state
* @memberof ChartBarSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartBarSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartBarSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 维度定义
*
* @param {*} state
* @memberof ChartBarSeries
*/
public setDimensions(state: any): void {
this.dimensions = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartBarSeries
*/
public setEncode(state: any): void {
this.encode = state;
}
/**
* 设置序列模板
*
* @param {*} state
* @memberof ChartBarSeries
*/
public setSeriesTemp(state: any): void {
this.seriesTemp = state;
}
}
\ No newline at end of file
/**
* 图表数据集属性模型
*
* @export
* @class ChartDataSetField
*/
export class ChartDataSetField {
/**
* 图表属性名称
*
* @type {string}
* @memberof ChartDataSetField
*/
public name: string = '';
/**
* 图表属性代码表
*
* @type {*}
* @memberof ChartDataSetField
*/
public codelist: any = null;
/**
* 是否分组属性
*
* @type {boolean}
* @memberof ChartDataSetField
*/
public isGroupField: boolean = false;
/**
* 分组模式
*
* @type {string}
* @memberof ChartDataSetField
*/
public groupMode:string ="";
/**
* Creates an instance of ChartDataSetField.
* ChartDataSetField 实例
*
* @param {*} [opts={}]
* @memberof ChartDataSetField
*/
constructor(opts: any = {}) {
this.name = !Object.is(opts.name, '') ? opts.name : '';
this.codelist = opts.codelist?opts.codelist:null;
this.isGroupField = opts.isGroupField?opts.isGroupField:false;
this.groupMode = !Object.is(opts.groupMode, '') ? opts.groupMode : '';
}
/**
* 设置图表属性名称
*
* @param {string} state
* @memberof ChartDataSetField
*/
public setName(state: string): void {
this.name = state;
}
/**
* 设置图表属性代码表
*
* @param {*} state
* @memberof ChartDataSetField
*/
public setCodeList(state: any): void {
this.codelist = state;
}
/**
* 设置分组属性
*
* @param {boolean} state
* @memberof ChartDataSetField
*/
public setisGroupField(state: boolean): void {
this.isGroupField = state;
}
/**
* 设置属性分组模式
*
* @param {string} state
* @memberof ChartDataSetField
*/
public setGroupMode(state: string): void {
this.groupMode = state;
}
}
\ No newline at end of file
......@@ -48,6 +48,14 @@ export class ChartLineSeries extends ChartSeries{
*/
public encode:any = null;
/**
* 序列模板
*
* @type {*}
* @memberof ChartLineSeries
*/
public seriesTemp:any = null;
/**
* Creates an instance of ChartLineSeries.
......@@ -63,6 +71,7 @@ export class ChartLineSeries extends ChartSeries{
this.valueField = !Object.is(opts.valueField, '') ? opts.valueField : '';
this.dimensions = opts.dimensions ? opts.dimensions :'';
this.encode = opts.encode ? opts.encode : null;
this.seriesTemp = opts.seriesTemp ? opts.seriesTemp:null;
}
/**
......@@ -115,4 +124,14 @@ export class ChartLineSeries extends ChartSeries{
this.encode = state;
}
/**
* 设置序列模板
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setSeriesTemp(state: any): void {
this.seriesTemp = state;
}
}
\ No newline at end of file
import { ChartSeries } from './chart-series';
/**
* 饼图序列模型
*
* @export
* @class ChartPieSeries
*/
export class ChartPieSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartPieSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartPieSeries
*/
public valueField: string = '';
/**
* 分类代码表
*
* @type {string}
* @memberof ChartPieSeries
*/
public categorCodeList: any = null;
/**
* 维度定义
*
* @type {string}
* @memberof ChartPieSeries
*/
public dimensions:Array<string> = [];
/**
* 维度编码
*
* @type {*}
* @memberof ChartPieSeries
*/
public encode:any = null;
/**
* Creates an instance of ChartPieSeries.
* ChartPieSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartPieSeries
*/
constructor(opts: any = {}) {
super(opts);
this.categorField = !Object.is(opts.categorField, '') ? opts.categorField : '';
this.categorCodeList = opts.categorCodeList ? opts.categorCodeList : null;
this.valueField = !Object.is(opts.valueField, '') ? opts.valueField : '';
this.dimensions = opts.dimensions ? opts.dimensions :'';
this.encode = opts.encode ? opts.encode : null;
}
/**
* 设置分类属性
*
* @param {string} state
* @memberof ChartPieSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartPieSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartPieSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 维度定义
*
* @param {*} state
* @memberof ChartPieSeries
*/
public setDimensions(state: any): void {
this.dimensions = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartPieSeries
*/
public setEncode(state: any): void {
this.encode = state;
}
}
\ No newline at end of file
import { ChartDataSetField } from './chart-dataset-field';
/**
* 图表序列模型
*
......@@ -38,13 +40,29 @@ export class ChartSeries {
*/
public caption: string = '';
/**
* 序列标识属性
*
* @type {string}
* @memberof ChartSeries
*/
public seriesIdField: string = '';
/**
* 序列名称属性
*
* @type {string}
* @memberof ChartSeries
*/
public seriesField: string = '';
public seriesNameField: string = '';
/**
* 序列标识名称键值对
*
* @type {any}
* @memberof ChartSeries
*/
public seriesMap:any = null;
/**
* 对象索引
......@@ -78,6 +96,22 @@ export class ChartSeries {
*/
public ecObject:any;
/**
* 序列索引
*
* @type {number}
* @memberof ChartSeries
*/
public seriesIndex:number = 0;
/**
* 数据集属性集合
*
* @type {Array<ChartDataSetField>}
* @memberof ChartSeries
*/
public dataSetFields:Array<ChartDataSetField> = [];
/**
* 取值方式
* 'column':默认,dataset 的列对应于系列,从而 dataset 中每一列是一个维度(dimension)
......@@ -99,13 +133,17 @@ export class ChartSeries {
this.type = !Object.is(opts.type, '') ? opts.type : '';
this.name = !Object.is(opts.name, '') ? opts.name : '';
this.caption = !Object.is(opts.caption, '') ? opts.caption : '';
this.seriesField = !Object.is(opts.seriesField, '') ? opts.seriesField : '';
this.seriesIdField = !Object.is(opts.seriesIdField, '') ? opts.seriesIdField : '';
this.seriesNameField = !Object.is(opts.seriesNameField, '') ? opts.seriesNameField : '';
this.index = this.index ? this.index : 0;
this.chart = opts.chart ? opts.chart : null;
this.dataSet = opts.dataSet ? opts.dataSet : [];
this.ecxObject = opts.ecxObject ? opts.ecxObject : null;
this.ecObject = opts.ecObject ? opts.ecObject : null;
this.seriesLayoutBy = opts.seriesLayoutBy ? opts.seriesLayoutBy:"column";
this.dataSetFields = opts.dataSetFields ? opts.dataSetFields:[];
this.seriesMap = opts.seriesMap ? opts.seriesMap:null;
this.seriesIndex = opts.seriesIndex? opts.seriesIndex:0;
}
/**
......@@ -148,6 +186,16 @@ export class ChartSeries {
this.dataSet = state;
}
/**
* 设置序列标识名称键值对
*
* @param {*} state
* @memberof ChartSeries
*/
public setSeriesMap(state: any): void {
this.seriesMap = state;
}
/**
* 设置序列映射的图表
*
......@@ -158,14 +206,24 @@ export class ChartSeries {
this.chart = state;
}
/**
* 设置序列标识属性
*
* @param {*} state
* @memberof ChartSeries
*/
public setSeriesIdField(state: any): void {
this.seriesIdField = state;
}
/**
* 设置序列名称属性
*
* @param {*} state
* @memberof ChartSeries
*/
public setSeriesField(state: any): void {
this.seriesField = state;
public setSeriesNameField(state: any): void {
this.seriesNameField = state;
}
/**
......@@ -177,4 +235,54 @@ export class ChartSeries {
public setIndex(state: number): void {
this.index = state;
}
/**
* 设置预置配置
*
* @param {*} state
* @memberof ChartSeries
*/
public setECXObject(state: any): void {
this.ecxObject = state;
}
/**
* 设置用户自定义参数
*
* @param {*} state
* @memberof ChartSeries
*/
public setECObject(state: any): void {
this.ecObject = state;
}
/**
* 设置取值方式
*
* @param {string} state
* @memberof ChartSeries
*/
public setSeriesLayoutBy(state: string): void {
this.seriesLayoutBy = state;
}
/**
* 设置数据集属性集合
*
* @param {Array<ChartDataSetField>} state
* @memberof ChartSeries
*/
public setDataSetFields(state: Array<ChartDataSetField>): void {
this.dataSetFields = state;
}
/**
* 设置序列索引
*
* @param {number} state
* @memberof ChartSeries
*/
public setSeriesIndex(state: number): void {
this.seriesIndex = state;
}
}
\ No newline at end of file
export { ChartDataSetField } from './chart-dataset-field';
export { ChartLineSeries } from './chart-line-series';
export { ChartFunnelSeries } from './chart-funnel-series';
export { ChartPieSeries } from './chart-pie-series';
export { ChartBarSeries } from './chart-bar-series';
\ No newline at end of file
<template>
<div class="view-container psedit-view">
<app-studioaction viewTitle="采购单编辑视图" viewName="pseditview"></app-studioaction>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="pseditview"></app-studioaction>
<card class='view-card ' :disHover="true" :bordered="false">
<p slot='title'>
<span class='caption-info'>{{$t(model.srfCaption)}}</span>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</p>
<div slot="extra">
......@@ -143,6 +143,24 @@ export default class PSEditViewBase extends Vue {
*/
protected viewtag: string = 'cbe3b85eb51cf165ed3bffc22c8f37e9';
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof PSEditViewBase
*/
protected customViewNavContexts:any ={
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof PSEditViewBase
*/
protected customViewParams:any ={
};
/**
* 视图模型数据
*
......@@ -150,9 +168,9 @@ export default class PSEditViewBase extends Vue {
* @memberof PSEditViewBase
*/
protected model: any = {
srfTitle: '采购单编辑视图',
srfCaption: 'ps.views.editview.caption',
srfSubCaption: '',
srfTitle: 'ps.views.editview.title',
srfSubTitle: 'ps.views.editview.subtitle',
dataInfo: ''
}
......@@ -300,6 +318,7 @@ export default class PSEditViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
this.handleCustomViewData();
return;
}
const path = (this.$route.matched[this.$route.matched.length - 1]).path;
......@@ -319,8 +338,86 @@ export default class PSEditViewBase extends Vue {
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
}
/**
* 处理自定义视图数据
*
* @memberof PSEditViewBase
*/
public handleCustomViewData(){
if(Object.keys(this.customViewNavContexts).length > 0){
Object.keys(this.customViewNavContexts).forEach((item:any) =>{
let tempContext:any = {};
let curNavContext:any = this.customViewNavContexts[item];
this.handleCustomDataLogic(curNavContext,tempContext,item);
Object.assign(this.context,tempContext);
})
}
if(Object.keys(this.customViewParams).length > 0){
Object.keys(this.customViewParams).forEach((item:any) =>{
let tempParam:any = {};
let curNavParam:any = this.customViewParams[item];
this.handleCustomDataLogic(curNavParam,tempParam,item);
Object.assign(this.viewparams,tempParam);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof PSEditViewBase
*/
public handleCustomDataLogic(curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
Object.defineProperty(tempData, item, {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item, {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[curNavData.value]){
Object.defineProperty(tempData, item, {
value: this.context[curNavData.value],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(this.viewparams[curNavData.value]){
Object.defineProperty(tempData, item, {
value: this.viewparams[curNavData.value],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item, {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
/**
* Vue声明周期
*
......
<template>
<div class='view-container psgrid-view'>
<app-studioaction viewTitle="采购单表格视图" viewName="psgridview"></app-studioaction>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="psgridview"></app-studioaction>
<card class='view-card' :dis-hover="true" :bordered="false">
<p slot='title'>
<span class='caption-info'>{{$t(model.srfCaption)}}</span>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</p>
<div class='content-container'>
<div class='view-top-messages'>
......@@ -183,6 +183,24 @@ export default class PSGridViewBase extends Vue {
*/
protected viewtag: string = '1f3439519475b1efe65b5f980ca4caa6';
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof PSGridViewBase
*/
protected customViewNavContexts:any ={
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof PSGridViewBase
*/
protected customViewParams:any ={
};
/**
* 视图模型数据
*
......@@ -190,9 +208,9 @@ export default class PSGridViewBase extends Vue {
* @memberof PSGridViewBase
*/
protected model: any = {
srfTitle: '采购单表格视图',
srfCaption: 'ps.views.gridview.caption',
srfSubCaption: '',
srfTitle: 'ps.views.gridview.title',
srfSubTitle: 'ps.views.gridview.subtitle',
dataInfo: ''
}
......@@ -354,6 +372,7 @@ export default class PSGridViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
this.handleCustomViewData();
return;
}
const path = (this.$route.matched[this.$route.matched.length - 1]).path;
......@@ -373,8 +392,86 @@ export default class PSGridViewBase extends Vue {
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
}
/**
* 处理自定义视图数据
*
* @memberof PSGridViewBase
*/
public handleCustomViewData(){
if(Object.keys(this.customViewNavContexts).length > 0){
Object.keys(this.customViewNavContexts).forEach((item:any) =>{
let tempContext:any = {};
let curNavContext:any = this.customViewNavContexts[item];
this.handleCustomDataLogic(curNavContext,tempContext,item);
Object.assign(this.context,tempContext);
})
}
if(Object.keys(this.customViewParams).length > 0){
Object.keys(this.customViewParams).forEach((item:any) =>{
let tempParam:any = {};
let curNavParam:any = this.customViewParams[item];
this.handleCustomDataLogic(curNavParam,tempParam,item);
Object.assign(this.viewparams,tempParam);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof PSGridViewBase
*/
public handleCustomDataLogic(curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
Object.defineProperty(tempData, item, {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item, {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[curNavData.value]){
Object.defineProperty(tempData, item, {
value: this.context[curNavData.value],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(this.viewparams[curNavData.value]){
Object.defineProperty(tempData, item, {
value: this.viewparams[curNavData.value],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item, {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
/**
* Vue声明周期
*
......@@ -753,7 +850,6 @@ export default class PSGridViewBase extends Vue {
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"PS");
}
/**
* 打开新建数据视图
*
......
<template>
<div class="index_view app-index-view">
<app-studioaction viewTitle="应用首页视图" viewName="appindexview"></app-studioaction>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="appindexview"></app-studioaction>
<layout :class="themeClasses" :style="themeStyle">
<header class="index_header">
<div class="page-logo">
<img src="../../../assets/img/logo2.png" height="22" />
<span style="display: inline-block;margin-left: 10px;font-size: 22px;">首页</span>
<div class="header-left" >
<div class="page-logo">
<img src="../../../assets/img/logo.png" height="32" />
<span style="display: inline-block;margin-left: 10px;font-size: 22px;">{{$t(model.srfTitle)}}</span>
</div>
</div>
<div class="header-right" style="display: flex;align-items: center;justify-content: space-between;">
<div>
<icon type="md-notifications-outline" style="font-size: 25px;margin: 0 10px;" />
</div>
<div>
<icon type="ios-mail-open-outline" style="font-size: 25px;margin: 0 10px;" />
</div>
<app-header-menus />
<app-lang style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-orgsector></app-orgsector>
<app-user></app-user>
......@@ -119,6 +116,24 @@ export default class AppIndexViewBase extends Vue {
*/
protected viewtag: string = '2530708d453013b497aebeb7a0a9cd7c';
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof AppIndexViewBase
*/
protected customViewNavContexts:any ={
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof AppIndexViewBase
*/
protected customViewParams:any ={
};
/**
* 视图模型数据
*
......@@ -126,9 +141,9 @@ export default class AppIndexViewBase extends Vue {
* @memberof AppIndexViewBase
*/
protected model: any = {
srfTitle: '应用首页视图',
srfCaption: 'app.views.appindexview.caption',
srfSubCaption: '',
srfTitle: 'app.views.appindexview.title',
srfSubTitle: 'app.views.appindexview.subtitle',
dataInfo: ''
}
......@@ -242,6 +257,7 @@ export default class AppIndexViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
this.handleCustomViewData();
return;
}
const path = (this.$route.matched[this.$route.matched.length - 1]).path;
......@@ -259,8 +275,86 @@ export default class AppIndexViewBase extends Vue {
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
}
/**
* 处理自定义视图数据
*
* @memberof AppIndexViewBase
*/
public handleCustomViewData(){
if(Object.keys(this.customViewNavContexts).length > 0){
Object.keys(this.customViewNavContexts).forEach((item:any) =>{
let tempContext:any = {};
let curNavContext:any = this.customViewNavContexts[item];
this.handleCustomDataLogic(curNavContext,tempContext,item);
Object.assign(this.context,tempContext);
})
}
if(Object.keys(this.customViewParams).length > 0){
Object.keys(this.customViewParams).forEach((item:any) =>{
let tempParam:any = {};
let curNavParam:any = this.customViewParams[item];
this.handleCustomDataLogic(curNavParam,tempParam,item);
Object.assign(this.viewparams,tempParam);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof AppIndexViewBase
*/
public handleCustomDataLogic(curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
Object.defineProperty(tempData, item, {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item, {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[curNavData.value]){
Object.defineProperty(tempData, item, {
value: this.context[curNavData.value],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(this.viewparams[curNavData.value]){
Object.defineProperty(tempData, item, {
value: this.viewparams[curNavData.value],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item, {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
/**
* Vue声明周期
*
......
......@@ -15,6 +15,10 @@
display: flex;
align-items: center;
justify-content: space-between;
.page-logo{
display: flex;
align-items: center;
}
.header-left{
display: flex;
align-items: center;
......
......@@ -51,9 +51,37 @@ export default class CodeListService {
*/
public getItems(tag: string,context:any = {}, data?: any, isloading?: boolean,): Promise<any[]> {
let _this: any = this;
if (_this[tag]) {
return _this[tag].getItems(context,data,isloading);
}
return Promise.reject([]);
return new Promise((resolve:any,reject:any) =>{
if(!data){
if(this.$store && _this.$store.getters){
let items:any = _this.$store.getters.getCodeListItems(tag);
if(items.length >0){
return resolve(items);
}
}
if (_this[tag]) {
_this[tag].getItems(context,data,isloading).then((result:any) =>{
if(result.length > 0){
_this.$store.commit('updateCodeList',{srfkey:tag,items:result});
return resolve(result);
}else{
return resolve([]);
}
}).catch((result:any) =>{
return reject(result);
})
}
}else{
if (_this[tag]) {
_this[tag].getItems(context,data,isloading).then((result:any) =>{
resolve(result);
}).catch((error:any) =>{
Promise.reject([]);
})
}else{
return Promise.reject([]);
}
}
})
}
}
\ No newline at end of file
......@@ -552,6 +552,19 @@ export default class EntityService {
return this.FetchDefault(context,data,isloading);
}
/**
* ImportData接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async ImportData(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/${this.APPDENAME}/import`,data,isloading);
}
/**
* WFStart接口方法
*
......
......@@ -10,9 +10,6 @@
color: #fff;
}
.header-right {
.app-header-user {
background: #28547c;
}
> div:hover {
background: #3774aa;
}
......
......@@ -10,9 +10,6 @@
color: #fff;
}
.header-right {
.app-header-user {
background: #232c37;
}
> div:hover {
background: #3b4a5c;
}
......
......@@ -10,9 +10,6 @@
color: #535c70;
}
.header-right {
.app-header-user {
background: #d9d9d9;
}
> div:hover {
background: #d4d4d4;
}
......
......@@ -75,7 +75,7 @@ export class StudioActionUtil {
if (Environment.devMode) {
on(window, 'keydown', (e: KeyboardEvent) => {
if ((e.ctrlKey || e.metaKey) && e.keyCode === 123) {
this.isShowTool = !this.isShowTool;
this.showToolChange();
}
});
}
......@@ -119,8 +119,8 @@ export class StudioActionUtil {
}, '*');
Vue.prototype.$message.warning('请在已打开的配置平台查看!');
} else {
console.log(`${Environment.StudioUrl}?ov=${JSON.stringify(params)}#/common_slnindex/srfkeys=${Environment.DCId}/sysdesign_psdevslnsysmodeltreeexpview/srfkey=${Environment.SysId}`);
this.studioWin = window.open(`${Environment.StudioUrl}?ov=${encodeURIComponent(JSON.stringify(params))}#/common_slnindex/srfkeys=${Environment.DCId}/sysdesign_psdevslnsysmodeltreeexpview/srfkey=${Environment.SysId}`, '_blank');
console.log(`${Environment.StudioUrl}?ov=${JSON.stringify(params)}#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview/srfkey=${Environment.SysId}`);
this.studioWin = window.open(`${Environment.StudioUrl}?ov=${encodeURIComponent(JSON.stringify(params))}#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview/srfkey=${Environment.SysId}`, '_blank');
}
}
}
......@@ -156,6 +156,15 @@ export class StudioActionUtil {
}
}
/**
* 展示配置工具栏状态变更
*
* @memberof StudioActionController
*/
public showToolChange(): void {
this.isShowTool = !this.isShowTool;
}
/**
* 获取实例
*
......
......@@ -3,6 +3,10 @@
overflow-y: auto;
overflow-x: hidden;
height: calc(100% - 58px);
.ivu-divider{
background-color: #b3b3b3;
height: 2px;
}
> .el-menu {
border-right: 0;
.el-menu-item {
......
......@@ -175,7 +175,7 @@ export default class MainService extends ControlService {
}
/**
* 查询数据
* 获取数据
*
* @param {string} action
* @param {*} [context={}]
......@@ -237,6 +237,7 @@ export default class MainService extends ControlService {
});
}
/**
* 加载草稿
*
......
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册