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

4月16号提交

上级 895c023b
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,8 @@ 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'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -129,5 +131,7 @@ 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);
},
};
\ No newline at end of file
src/assets/img/logo.png

6.7 KB | W: | H:

src/assets/img/logo.png

2.0 KB | W: | H:

src/assets/img/logo.png
src/assets/img/logo.png
src/assets/img/logo.png
src/assets/img/logo.png
  • 2-up
  • Swipe
  • Onion skin
<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>
......
.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="开启配置模式" :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({})
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
......@@ -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,173 @@ export default class AppExportExcel extends Vue {
*/
@Prop() public item?: any;
/**
* 工具栏项
*
* @type {*}
* @memberof AppExportExcel
*/
@Prop() public caption?: any;
/**
* 工具栏项层级
*
* @type {number}
* @memberof AppExportExcel
*/
@Prop({ default: 0 }) public itemLevel!: number;
/**
* 起始页
*
* @type {(string | null)}
* @memberof AppExportExcel
*/
public startPage: string | null = null;
/**
* 结束页
*
* @type {(string | null)}
* @memberof AppExportExcel
*/
public endPage: string | null = null;
/**
* 是否显示下拉菜单
*
* @type {boolean}
* @memberof AppExportExcel
*/
public visible: boolean = false;
/**
* 点击触发相似
*
* @memberof AppExportExcel
*/
public clickVisible(): void {
this.visible = !this.visible
}
/**
* 导出数据
*
* @param {*} $event
* @param {string} type
* @returns {void}
* @memberof AppExportExcel
*/
public exportExcel($event: any, type: string): void {
const exportparms: any = { type: type };
if (Object.is(type, 'maxRowCount')) {
Object.assign(exportparms, { maxRowCount: this.item.MaxRowCount })
this.visible = false;
} else if (Object.is(type, 'activatedPage')) {
this.visible = false;
} else if (Object.is(type, 'custom')) {
if (!this.startPage || !this.endPage) {
this.$Notice.warning({ title: '警告', desc: '请输入起始页' });
return;
}
const startPage: any = Number.parseInt(this.startPage, 10);
const endPage: any = Number.parseInt(this.endPage, 10);
if (Number.isNaN(startPage) || Number.isNaN(endPage)) {
this.$Notice.warning({ title: '警告', desc: '请输入有效的起始页' });
return;
}
if (startPage < 1 || endPage < 1 || startPage > endPage) {
this.$Notice.warning({ title: '警告', desc: '请输入有效的起始页' });
return;
}
this.startPage = null;
this.endPage = null;
Object.assign(exportparms, { startPage: startPage, endPage: endPage });
this.visible = false;
}
if (!this.visible) {
Object.assign($event, { exportparms: exportparms });
this.$emit('exportexcel', $event);
}
}
}
</script>
<style lang='less'>
@import './app-export-excel.less';
</style><template>
<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'>{{caption}}</span>
</i-button>
<dropdown-menu slot='list'>
<dropdown-item>
<p @click="exportExcel($event, 'maxRowCount')">
{{caption}}{{$t('info.total')}}({{$t('info.max')}}{{caption}}{{item.MaxRowCount}}{{$t('info.row')}})
</p>
</dropdown-item>
<dropdown-item>
<p @click="exportExcel($event, 'activatedPage')">
{{caption}}{{$t('info.currentPage')}}
</p>
</dropdown-item>
</dropdown-menu>
</dropdown>
</template>
<script lang="ts">
import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
/**
* 数据导出组件
*
* @export
* @class AppExportExcel
* @extends {Vue}
*/
@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 {
/**
* 工具栏项
*
* @type {*}
* @memberof AppExportExcel
*/
@Prop() public item?: any;
/**
* 工具栏项
*
* @type {*}
* @memberof AppExportExcel
*/
@Prop() public caption?: any;
/**
* 工具栏项层级
*
......
.app-file-upload{
.upload-col{
text-align: center;
.button-preview{
padding: 8px 15px 8.5px 15px;
.ivu-badge{
margin-left: 2px;
.ivu-badge-count{
height: auto;
min-width: auto;
line-height: unset;
padding: 0 4px;
}
}
}
}
}
.upload-preview-modal{
.ivu-modal{
height: 86%;
.ivu-modal-content{
height: 100%;
overflow-y: scroll;
.preview-file-list-item{
margin: 0 8px 8px 0;
display: inline-block;
position: relative;
}
.preview-file-list-img{
display: inline-block;
position: relative;
}
.file-name{
text-align: center;
}
.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;
}
.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;
}
.action-delete{
margin-left:15px;
}
}
}
}
\ No newline at end of file
<template>
<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-col>
<el-col :span="(rowPreview && files.length > 0) ? 12 : 24" class="upload-col">
<el-upload
:disabled="disabled"
:file-list="files"
......@@ -10,11 +16,37 @@
:on-error="onError"
:on-preview="onDownload"
:drag="isdrag"
:show-file-list="!rowPreview"
>
<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>
</el-upload>
</el-col>
</el-row>
<modal width="80%" v-model="dialogVisible" footer-hide class-name='upload-preview-modal'>
<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' @mouseenter="()=>{showActions = true;}" @mouseleave="()=>{showActions = false;}">
<span v-show="showActions" class='action-download'>
<i class='el-icon-download' @click="onDownload(file)"></i>
</span>
<span v-show="showActions" :style="{ 'display': disabled? 'none' : 'inline-block' }" class='action-delete'>
<i class='el-icon-delete' @click="onRemove(file, files)"></i>
</span>
</div>
</div>
<div class="file-name">{{file.name}}</div>
</li>
</ul>
</modal>
</div>
</template>
<script lang="ts">
......@@ -87,12 +119,8 @@ export default class AppFileUpload extends Vue {
if (this.ignorefieldvaluechange) {
return;
}
if (newval) {
this.files = JSON.parse(newval);
this.setFiles(newval)
this.dataProcess();
} else {
this.files = [];
}
}
/**
......@@ -188,6 +216,21 @@ export default class AppFileUpload extends Vue {
*/
public appData: any;
/**
* 设置files
*
* @private
* @memberof AppFileUpload
*/
private setFiles(value:any): void {
let _files = JSON.parse(value);
if (value && Object.prototype.toString.call(_files)=='[object Array]') {
this.files = _files;
} else {
this.files = [];
}
}
/**
* 数据处理
*
......@@ -230,9 +273,7 @@ export default class AppFileUpload extends Vue {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if (Object.is($event.type, 'load')) {
if (this.value) {
this.files = JSON.parse(this.value);
}
this.setFiles(this.value);
this.dataProcess();
}
});
......@@ -271,12 +312,7 @@ export default class AppFileUpload extends Vue {
this.export_keys = export_keys;
this.custom_arr = custom_arr;
if (this.value) {
let _files = JSON.parse(this.value);
if(typeof _files === "object" ){
this.files = _files;
}
}
this.setFiles(this.value);
this.dataProcess();
}
......@@ -298,7 +334,14 @@ export default class AppFileUpload extends Vue {
* @memberof AppFileUpload
*/
public beforeUpload(file: any) {
// console.log('上传之前');
if(this.imageOnly){
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'});
}
return isImage;
}
}
/**
......@@ -351,6 +394,9 @@ export default class AppFileUpload extends Vue {
}
});
let value: any = arr.length > 0 ? JSON.stringify(arr) : null;
if(arr.length == 0){
this.dialogVisible = false;
}
this.$emit('formitemvaluechange', { name: this.name, value: value });
}
......@@ -364,6 +410,38 @@ export default class AppFileUpload extends Vue {
window.open(file.url);
}
/**
* 是否只支持图片上传
*
* @type {boolean}
* @memberof AppFileUpload
*/
@Prop({default: false}) public imageOnly!: boolean;
/**
* 是否开启行内预览
*
* @type {boolean}
* @memberof AppFileUpload
*/
@Prop({default: false}) public rowPreview!: boolean;
/**
* 是否开启行内预览
*
* @type {boolean}
* @memberof AppFileUpload
*/
public dialogVisible: boolean = false;
/**
* 是否开启行内预览
*
* @type {boolean}
* @memberof AppFileUpload
*/
public showActions: boolean = false;
}
</script>
......
......@@ -22,7 +22,7 @@
> .el-tabs {
height: 100%;
> .el-tabs__content {
height: calc(100% - 51px);
height: calc(100% - 62px);
> .el-tab-pane {
height: 100%;
overflow: auto;
......
.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 in menus" 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.DCId}/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
......@@ -3,7 +3,7 @@
<ul class='el-upload-list el-upload-list--picture-card'>
<!-- 绘制缩略图 Start -->
<li v-for="(file,index) in files" :key="index" class='el-upload-list__item is-success'>
<el-image src={file.url} class='el-upload-list__item-thumbnail' style='min-height:100px;min-width:100px;'>
<el-image :src="file.url" class='el-upload-list__item-thumbnail' style='min-height:100px;min-width:100px;'>
<div slot='error' class='image-slot'>
<i class='el-icon-picture-outline'></i>
</div>
......@@ -119,12 +119,8 @@ export default class AppImageUpload extends Vue {
if (this.ignorefieldvaluechange) {
return;
}
if (newval) {
this.files = JSON.parse(newval);
this.setFiles(newval)
this.dataProcess();
} else {
this.files = [];
}
}
/**
......@@ -220,6 +216,21 @@ export default class AppImageUpload extends Vue {
*/
public appData: any="";
/**
* 设置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;
} else {
this.files = [];
}
}
/**
* 数据处理
*
......@@ -262,10 +273,7 @@ export default class AppImageUpload extends Vue {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if (Object.is($event.type, 'load')) {
if (this.value) {
// console.log(this.value);
this.files = JSON.parse(this.value);
}
this.setFiles(this.value);
this.dataProcess();
}
});
......@@ -303,12 +311,7 @@ export default class AppImageUpload extends Vue {
this.export_keys = export_keys;
this.custom_arr = custom_arr;
if (this.value) {
let _files = JSON.parse(this.value);
if(typeof _files === "object" ){
this.files = _files;
}
}
this.setFiles(this.value);
this.dataProcess();
}
......
<template>
<dropdown trigger='click' on-click="selectLang">
<dropdown trigger='click' @on-click="selectLang">
<span>
{{title}}
<icon size='18' type='md-arrow-dropdown'></icon>
......
......@@ -232,7 +232,8 @@ export default class AppMpicker extends Vue {
_selectItems[index].srfkey = item[this.deKeyField];
});
}
_context = Object.assign(_context, { srfparentdata: { srfparentkey: this.activeData[this.deKeyField] }, selectedData: [..._selectItems], });
_context = Object.assign(_context, { srfparentdata: { srfparentkey: this.activeData[this.deKeyField] }, });
_viewparams = Object.assign(_viewparams,{ selectedData: [..._selectItems]});
let formdata = this.activeData;
const modal: Subject<any> = this.$appmodal.openModal(view, _context, _viewparams)
modal.subscribe((result: any) => {
......
......@@ -26,6 +26,8 @@
overflow:inherit;
}
}
}
}
.select-no-dropdown.el-select-dropdown{
display: none;
}
\ No newline at end of file
<template>
<div class="app-picker-select-view">
<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(true);}" >
<Input v-if="isSingleSelect" v-model="queryValue" class="tree-input" type="text" :placeholder="placeholder" :disabled="disabled" @on-change="OnInputChange" @on-focus="()=>{triggerMenu(true);}" >
<template v-slot:suffix>
<i v-if="inputValue && !disabled" class='el-icon-circle-close' @click="onClear"></i>
<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>
<icon v-if="linkview" type="ios-open-outline" @click="openLinkView"/>
</template>
</Input>
<el-select v-if="!isSingleSelect" popper-class="select-no-dropdown" :value="keySet" multiple filterable remote :remote-method="($event) => {this.queryValue = $event;}" size="small" style="width:100%;" @change="onSelectChange" @focus="() => {triggerMenu(true);}" :disabled="disabled">
<el-option v-for="(item, index) in items" :key="index" :label="item.srfmajortext" :value="item[deKeyField]"></el-option>
</el-select>
<DropdownMenu slot="list">
<component
:is="pickupView.viewname"
:viewdata="viewdata"
:viewparam="viewparam"
:ifShowButtons="false"
:isShowButton="false"
:viewDefaultUsage="false"
@viewdataschange="setValue"
@viewdataschange="onViewdatasChange"
style="height:100%;">
</component>
</DropdownMenu>
......@@ -47,13 +50,45 @@ export default class AppPickerSelectView extends Vue {
*/
@Prop() public viewparams!: any;
/**
* 是否单选
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop({default: 'true'}) public isSingleSelect!: any;
/**
* 当前多选框选中值的key集合
*
* @type {string}
* @memberof AppTreePicker
*/
public keySet: any = [];
/**
* 当前多选框选中项对象集合
*
* @type {string}
* @memberof AppTreePicker
*/
public selectItems: Array<any> = [];
/**
* 所有操作过的下拉选项对象集合
*
* @type {string}
* @memberof AppTreePicker
*/
public items: Array<any> = [];
/**
* 视图参数
*
* @type {string}
* @memberof AppTreePicker
*/
public viewparam: any = JSON.stringify(this.viewparams);;
public viewparam: any = JSON.stringify(this.viewparams);
/**
* 视图上下文
......@@ -104,12 +139,12 @@ export default class AppPickerSelectView extends Vue {
@Prop({default: 'srfkey'}) public deKeyField!: string;
/**
* 输入框值
* 输入框值(搜索值)
*
* @type {string}
* @memberof AppTreePicker
*/
public inputValue: any = '';
public queryValue: any = '';
/**
* 值项名称
......@@ -117,7 +152,7 @@ export default class AppPickerSelectView extends Vue {
* @type {string}
* @memberof AppPicker
*/
@Prop() public valueitem?: string;
@Prop() public valueitem!: string;
/**
* 关联视图名称
......@@ -182,7 +217,7 @@ export default class AppPickerSelectView extends Vue {
* @memberof AppTreePicker
*/
public OnInputChange($event: any){
let _viewdata = Object.assign({ query: this.inputValue }, JSON.parse(this.viewdata)) ;
let _viewdata = Object.assign({ query: this.queryValue }, JSON.parse(this.viewdata)) ;
this.viewdata = JSON.stringify(_viewdata);
}
......@@ -264,9 +299,35 @@ export default class AppPickerSelectView extends Vue {
* @param {*} oldVal
* @memberof AppPicker
*/
@Watch('value')
@Watch('value', { deep: true })
public onValueChange(newVal: any, oldVal: any) {
this.inputValue = newVal;
if(this.isSingleSelect){
this.queryValue = newVal;
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$Notice.error({ title: '错误', desc: "编辑器"+this.name+'值项异常' });
}else{
let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = [{srfkey: this.data[this.valueitem], srfmajortext: this.value }];
this.viewparam = JSON.stringify(_viewparam);
}
}else{
this.keySet = [];
this.selectItems = [];
if (newVal) {
this.selectItems = JSON.parse(newVal);
this.selectItems.forEach((item: any) => {
this.keySet.push(item.srfkey);
let index = this.items.findIndex((i) => Object.is(i.srfkey, item.srfkey));
if (index < 0) {
this.items.push({ srfmajortext : item.srfmajortext, srfkey: item.srfkey });
}
});
let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = this.selectItems;
this.viewparam = JSON.stringify(_viewparam);
}
}
this.$forceUpdate();
}
/**
......@@ -301,20 +362,37 @@ export default class AppPickerSelectView extends Vue {
* @param {*} item
* @memberof AppTreePicker
*/
public setValue(item: any) {
this.visible = false;
if(item.length == 0){
public onViewdatasChange($event: any) {
if($event.length == 0){
this.onClear(null);
return;
}
if(this.isSingleSelect){
this.visible = false;
if (this.valueitem) {
let tempvalue = item[0][this.deMajorField] ? item[0][this.deKeyField] : item[0].srfkey;
this.$emit('formitemvaluechange', { name: this.valueitem, value: item[0][this.deKeyField] });
let tempvalue = $event[0][this.deKeyField] ? $event[0][this.deKeyField] : $event[0].srfkey;
this.$emit('formitemvaluechange', { name: this.valueitem, value: tempvalue });
}
if (this.name) {
let tempvalue = item[0][this.deMajorField] ? item[0][this.deMajorField] : item[0].srfmajortext;
let tempvalue = $event[0][this.deMajorField] ? $event[0][this.deMajorField] : $event[0].srfmajortext;
this.$emit('formitemvaluechange', { name: this.name, value: tempvalue });
}
}else{
let selects: Array<any> = [];
if ($event && Array.isArray($event)) {
$event.forEach((select: any) => {
selects.push({ srfkey: select.srfkey, srfmajortext: select.srfmajortext });
let index = this.items.findIndex((item) => Object.is(item.srfkey, select.srfkey));
if (index < 0) {
this.items.push({ srfmajortext : select.srfmajortext, srfkey: select.srfkey });
}
});
}
if (this.name) {
let value = selects.length > 0 ? JSON.stringify(selects) : '';
this.$emit('formitemvaluechange', { name: this.name, value: value });
}
}
}
/**
......@@ -337,11 +415,8 @@ export default class AppPickerSelectView extends Vue {
* @memberof AppPicker
*/
public openLinkView($event: any): void {
if (this.disabled) {
return;
}
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$Notice.error({ title: '错误', desc: '值项异常!' });
console.error({ title: '错误', desc: '值项异常!' });
return;
}
// 公共参数处理
......@@ -460,6 +535,26 @@ export default class AppPickerSelectView extends Vue {
}
}
/**
* 下拉选中回调
*
* @param {*} selects 当前选中的key值集合
* @memberof AppMpicker
*/
public onSelectChange(selects: any) {
let val: Array<any> = [];
if (selects.length > 0) {
selects.forEach((select: any) => {
let index = this.items.findIndex((item) => Object.is(item[this.deKeyField], select));
if (index >= 0) {
val.push(this.items[index]);
}
});
}
let value = val.length > 0 ? JSON.stringify(val) : '';
this.$emit('formitemvaluechange', { name: this.name, value: value });
}
}
</script>
......
......@@ -165,7 +165,7 @@ export default class AppPicker extends Vue {
* @type {string}
* @memberof AppPicker
*/
@Prop() public valueitem?: string;
@Prop() public valueitem!: string;
/**
* 值
......@@ -401,6 +401,7 @@ export default class AppPicker extends Vue {
const view = { ...this.pickupView };
let _context = data.context;
let _param = data.param;
_param.selectedData = [{srfkey: this.data[this.valueitem], srfmajortext: this.curvalue }];
// 判断打开方式
if (view.placement && !Object.is(view.placement, '')) {
if (Object.is(view.placement, 'POPOVER')) {
......@@ -572,11 +573,8 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public openLinkView($event: any): void {
if (this.disabled) {
return;
}
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$Notice.error({ title: '错误', desc: '值项异常!' });
console.error({ title: '错误', desc: '值项异常!' });
return;
}
// 公共参数处理
......
<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>
......
......@@ -45,6 +45,7 @@ export default class AppRichTextEditor extends Vue {
}
}
/**
* 输入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">
......@@ -44,6 +44,14 @@ export default class DropDownList extends Vue {
*/
public text:any = '';
/**
* 编辑器类型
*
* @type {string}
* @memberof AppSpan
*/
@Prop() public editorType?: string;
/**
* 代码表标识
*
......@@ -77,12 +85,27 @@ export default class DropDownList extends Vue {
this.load();
}
/**
* 是否使用多语言资源
* @type {boolean}
* @memberof AppSpan
*/
public isUseLangres:boolean = false;
/**
* 加载代码表
*
* @memberof AppSpan
*/
public load(){
if(Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') ||Object.is(this.editorType,'FILEUPLOADER')){
let files: any[] = JSON.parse(this.data);
let names: any[] = [];
files.forEach((item:any) => {
names.push(item.name);
});
this.text = names.join(',');
}else{
if(this.tag && Object.is(this.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
......@@ -102,19 +125,34 @@ export default class DropDownList extends Vue {
this.setText();
}
}
}
/**
* 设置显示值
* @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){
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;
}
......
......@@ -13,7 +13,7 @@
:is="refviewname"
:viewdata="viewdata"
:viewparam="viewparam"
:ifShowButtons="false"
:isShowButton="false"
:viewDefaultUsage="false"
@viewdataschange="setValue"
style="height:100%;">
......
......@@ -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)];
......@@ -200,7 +213,11 @@ export default class CodeList extends Vue {
if(result.length != 0){
_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,8 +238,16 @@ export default class CodeList extends Vue {
return undefined;
}
result = { ...arr[0] };
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;
}
}
}
......
......@@ -11,7 +11,7 @@
:placeholder="placeholder ? this.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>
......@@ -110,7 +110,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) {
......
......@@ -8,7 +8,7 @@
: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>
<i-option v-for="(item, index) in items" :key="index" :value="item.value">{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
</template>
......
......@@ -95,6 +95,9 @@ export default class MPickupViewEngine extends ViewEngine {
});
const _disbaled: boolean = this.view.containerModel[`view_${ctrlName}`].selections.length > 0 ? true : false;
this.view.containerModel.view_rightbtn = _disbaled;
if(!this.view.isShowButton){
this.view.$emit('viewdataschange', [...args]);
}
}
/**
......
......@@ -82,7 +82,7 @@ export default class PickupViewEngine extends ViewEngine {
this.view.viewSelections = [...args]
const _disabled: boolean = this.view.viewSelections.length > 0 ? false : true;
this.view.containerModel.view_okbtn.disabled = _disabled;
if(!this.view.ifShowButtons){
if(!this.view.isShowButton){
this.view.$emit('viewdataschange', [...args]);
}
}
......
// 用户自定义语言资源 英文
export default {
};
\ No newline at end of file
// 用户自定义语言资源 中文
export default {
};
\ No newline at end of file
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)
return {
"name": "xxx.png",
"id": Random.string(128)
"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
import { ChartSeries } from './chart-series';
/**
* 漏斗图序列模型
*
* @export
* @class ChartFunnelSeries
*/
export class ChartFunnelSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public valueField: string = '';
/**
* 分类代码表
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public categorCodeList: any = null;
/**
* 维度定义
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public dimensions:Array<string> = [];
/**
* 维度编码
*
* @type {*}
* @memberof ChartFunnelSeries
*/
public encode:any = null;
/**
* Creates an instance of ChartFunnelSeries.
* ChartFunnelSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartFunnelSeries
*/
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 ChartFunnelSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartFunnelSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartFunnelSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 维度定义
*
* @param {*} state
* @memberof ChartFunnelSeries
*/
public setDimensions(state: any): void {
this.dimensions = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartFunnelSeries
*/
public setEncode(state: any): void {
this.encode = state;
}
}
\ No newline at end of file
import { ChartSeries } from './chart-series';
/**
* 折线图序列模型
*
* @export
* @class ChartLineSeries
*/
export class ChartLineSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartLineSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartLineSeries
*/
public valueField: string = '';
/**
* 分类代码表
*
* @type {string}
* @memberof ChartLineSeries
*/
public categorCodeList: any = null;
/**
* 维度定义
*
* @type {string}
* @memberof ChartLineSeries
*/
public dimensions:Array<string> = [];
/**
* 维度编码
*
* @type {*}
* @memberof ChartLineSeries
*/
public encode:any = null;
/**
* 序列模板
*
* @type {*}
* @memberof ChartLineSeries
*/
public seriesTemp:any = null;
/**
* Creates an instance of ChartLineSeries.
* ChartLineSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartLineSeries
*/
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 ChartLineSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartLineSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 维度定义
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setDimensions(state: any): void {
this.dimensions = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setEncode(state: any): void {
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';
/**
* 图表序列模型
*
* @export
* @class ChartSeries
*/
export class ChartSeries {
/**
* 序列类型
*
* @type {string}
* @memberof ChartSeries
*/
public type: string = '';
/**
* 图表对象
*
* @type {*}
* @memberof ChartSeries
*/
public chart: any = null;
/**
* 序列名称
*
* @type {string}
* @memberof ChartSeries
*/
public name: string = '';
/**
* 序列标题
*
* @type {string}
* @memberof ChartSeries
*/
public caption: string = '';
/**
* 序列标识属性
*
* @type {string}
* @memberof ChartSeries
*/
public seriesIdField: string = '';
/**
* 序列名称属性
*
* @type {string}
* @memberof ChartSeries
*/
public seriesNameField: string = '';
/**
* 序列标识名称键值对
*
* @type {any}
* @memberof ChartSeries
*/
public seriesMap:any = null;
/**
* 对象索引
*
* @type {number}
* @memberof ChartSeries
*/
public index: number = 0;
/**
* 序列映射数据
*
* @type {*}
* @memberof ChartSeries
*/
public dataSet: any = [];
/**
* 预置配置
*
* @type {number}
* @memberof ChartSeries
*/
public ecxObject:any;
/**
* 用户自定义配置
*
* @type {number}
* @memberof 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)
* 'row':dataset 的行对应于系列,从而 dataset 中每一行是一个维度(dimension
*
* @type {string}
* @memberof ChartSeries
*/
public seriesLayoutBy:string = "column";
/**
* Creates an instance of ChartSeries.
* ChartSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartSeries
*/
constructor(opts: any = {}) {
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.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;
}
/**
* 设置序列类型
*
* @param {string} state
* @memberof ChartSeries
*/
public setType(state: string): void {
this.type = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartSeries
*/
public setCaption(state: string): void {
this.caption = state;
}
/**
* 设置序列标题
*
* @param {string} state
* @memberof ChartSeries
*/
public setName(state: string): void {
this.name = state;
}
/**
* 设置数据集
*
* @param {*} state
* @memberof ChartSeries
*/
public setDataSet(state: any): void {
this.dataSet = state;
}
/**
* 设置序列标识名称键值对
*
* @param {*} state
* @memberof ChartSeries
*/
public setSeriesMap(state: any): void {
this.seriesMap = state;
}
/**
* 设置序列映射的图表
*
* @param {*} state
* @memberof ChartSeries
*/
public setChart(state: any): void {
this.chart = state;
}
/**
* 设置序列标识属性
*
* @param {*} state
* @memberof ChartSeries
*/
public setSeriesIdField(state: any): void {
this.seriesIdField = state;
}
/**
* 设置序列名称属性
*
* @param {*} state
* @memberof ChartSeries
*/
public setSeriesNameField(state: any): void {
this.seriesNameField = state;
}
/**
* 设置对象索引
*
* @param {number} state
* @memberof 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
......@@ -4,6 +4,65 @@
@import '../theme/default.theme.less';
@import './var.css';
.ibiz-page-tag .tags-body .tags-container .ivu-tag.tag-is-active .ivu-tag-text {
color: #1890ff;
}
.ibiz-page-tag .tags-body .tags-container .ivu-tag .ivu-icon-ios-close {
display: none;
}
.ibiz-page-tag .tags-body .tags-container .ivu-tag.tag-is-active .ivu-icon-ios-close,
.ibiz-page-tag .tags-body .tags-container .ivu-tag:hover .ivu-icon-ios-close {
display: inline-block;
}
.ivu-card-head p {
font-size: 14px;
color: #333;
font-weight: 400;
}
.app-app-menu .app-menus .ivu-card .ivu-card-body{
line-height: 22px;
margin-left: 10px;
font-weight: 400;
}
.app-app-menu .app-menus .ivu-card:hover{
box-shadow: none;
}
.ivu-card-body .grid>.el-table .el-table__header-wrapper thead>tr th {
background: rgb(245,245,245);
border-right: 1px solid rgb(250,250,250);
text-align: center;
}
.el-table td, .el-table th.is-leaf {
border-bottom: 1px solid #ebeef5;
}
.el-table th {
padding: 5px 0;
}
.grid .el-table__body-wrapper .el-table__row td{
border-left: 1px solid rgb(245,245,245);
border-top: 1px solid rgb(245,245,245);
text-align: center;
}
.el-table--enable-row-hover .el-table__body tr:hover>td {
background-color: #badfffba !important;
}
.grid .el-table__body-wrapper .grid-selected-row{
background-color: #badfffba !important;
}
.el-table th .sort-caret.ascending{
border-bottom-color: #f0f2f5;
}
.el-table th.ascending .sort-caret.ascending {
border-bottom-color: #909399;
}
.el-table th .sort-caret.descending{
border-top-color: #f0f2f5;
}
.el-table th.descending .sort-caret.descending {
border-top-color: #909399;
}
.view-container {
height: calc(100% - 38px);
......@@ -15,10 +74,26 @@
height: 100%;
// display: flex;
// flex-direction: column;
> .ivu-card-head{
height: 50px;
border-color: rgb(221, 221, 221);
border-style: solid;
border-width: 0px 0px 1px;
margin: 0px 0px 11px;
padding: 6px 0px;
> p{
height: 50px;
> .caption-info{
line-height: 50px;
font-size: 18px;
color: #1890ff;
}
}
}
> .ivu-card-body {
// height: 50%;
// flex-grow: 1;
height: calc(100% - 51px);
height: calc(100% - 62px);
padding: 0px;
> .content-container {
height: 100%;
......@@ -27,9 +102,6 @@
flex-direction: column;
}
}
>.ivu-card-head{
border:0;
}
}
> .view-card.view-no-caption.view-no-toolbar {
> .ivu-card-body {
......
......@@ -7,12 +7,9 @@
color: #6ba1d1;
}
.page-logo {
color: #ffffff;
color: #fff;
}
.header-right {
.app-header-user {
background: #28547c;
}
> div:hover {
background: #3774aa;
}
......
......@@ -7,12 +7,9 @@
color: #606d80;
}
.page-logo {
color: #ffffff;
color: #fff;
}
.header-right {
.app-header-user {
background: #232c37;
}
> div:hover {
background: #3b4a5c;
}
......
/*** BRGIN:默认亮色主题 ***/
.app-default-theme {
> header {
background-color: #e1e1e1;
background-color: #e8eaec;
color: #aaaaaa;
.app-theme-icon {
color: #aaaaaa;
......@@ -10,9 +10,6 @@
color: #535c70;
}
.header-right {
.app-header-user {
background: #d9d9d9;
}
> div:hover {
background: #d4d4d4;
}
......@@ -46,13 +43,13 @@
background-color: #f6f6f6;
.sider-top {
.ivu-icon {
background: #ccd3dd;
color: #fff;
background: #f6f6f6;
color: #aaaaaa;
}
}
.app-menu {
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
border-left: 4px solid #3fd5c0;
border-left: 4px solid #1890ff;
}
}
}
......@@ -60,18 +57,18 @@
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #f6f6f6;
.el-menu-item:hover, .el-menu-item.is-active {
background: #e9e9e9 !important;
color: #666666 !important;
background: #fff !important;
color: #1890ff !important;
i {
color: #666666;
color: #1890ff;
}
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #e9e9e9 !important;
color: #666666 !important;
background: #fff !important;
color: #1890ff !important;
i {
color: #666666;
color: #1890ff;
}
}
}
......
......@@ -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();
}
});
}
......@@ -156,6 +156,15 @@ export class StudioActionUtil {
}
}
/**
* 展示配置工具栏状态变更
*
* @memberof StudioActionController
*/
public showToolChange(): void {
this.isShowTool = !this.isShowTool;
}
/**
* 获取实例
*
......
......@@ -345,4 +345,21 @@ export class Util {
return fmt;
}
/**
* 深度合并对象
*
* @param FirstOBJ 目标对象
* @param SecondOBJ 原对象
* @returns {Object}
* @memberof Util
*/
public static deepObjectMerge(FirstOBJ:any, SecondOBJ:any) {
for (var key in SecondOBJ) {
FirstOBJ[key] = FirstOBJ[key] && FirstOBJ[key].toString() === "[object Object]" ?
this.deepObjectMerge(FirstOBJ[key], SecondOBJ[key]) : FirstOBJ[key] = SecondOBJ[key];
}
return FirstOBJ;
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册