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

4月11号提交

上级 d93b26ab
{
"name": "app",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"adler-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz",
"integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=",
"requires": {
"exit-on-epipe": "~1.0.1",
"printj": "~1.1.0"
}
},
"cfb": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.1.4.tgz",
"integrity": "sha512-rwFkl3aFO3f+ljR27YINwC0x8vPjyiEVbYbrTCKzspEf7Q++3THdfHVgJYNUbxNcupJECrLX+L40Mjm9hm/Bgw==",
"requires": {
"adler-32": "~1.2.0",
"commander": "^2.16.0",
"crc-32": "~1.2.0",
"printj": "~1.1.2"
}
},
"codepage": {
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/codepage/-/codepage-1.14.0.tgz",
"integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=",
"requires": {
"commander": "~2.14.1",
"exit-on-epipe": "~1.0.1"
},
"dependencies": {
"commander": {
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz",
"integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw=="
}
}
},
"commander": {
"version": "2.17.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
"integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg=="
},
"crc-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz",
"integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==",
"requires": {
"exit-on-epipe": "~1.0.1",
"printj": "~1.1.0"
}
},
"exit-on-epipe": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz",
"integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw=="
},
"file-saver": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.2.tgz",
"integrity": "sha512-Wz3c3XQ5xroCxd1G8b7yL0Ehkf0TC9oYC6buPFkNnU9EnaPlifeAFCyCh+iewXTyFRcg0a6j3J7FmJsIhlhBdw=="
},
"frac": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA=="
},
"printj": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz",
"integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ=="
},
"raw-loader": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz",
"integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=",
"dev": true
},
"script-loader": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/script-loader/-/script-loader-0.7.2.tgz",
"integrity": "sha512-UMNLEvgOAQuzK8ji8qIscM3GIrRCWN6MmMXGD4SD5l6cSycgGsCo0tX5xRnfQcoghqct0tjHjcykgI1PyBE2aA==",
"dev": true,
"requires": {
"raw-loader": "~0.5.1"
}
},
"ssf": {
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.10.3.tgz",
"integrity": "sha512-pRuUdW0WwyB2doSqqjWyzwCD6PkfxpHAHdZp39K3dp/Hq7f+xfMwNAWIi16DyrRg4gg9c/RvLYkJTSawTPTm1w==",
"requires": {
"frac": "~1.1.2"
}
},
"wmf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
},
"xlsx": {
"version": "0.15.6",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.15.6.tgz",
"integrity": "sha512-7vD9eutyLs65iDjNFimVN+gk/oDkfkCgpQUjdE82QgzJCrBHC4bGPH7fzKVyy0UPp3gyFVQTQEFJaWaAvZCShQ==",
"requires": {
"adler-32": "~1.2.0",
"cfb": "^1.1.4",
"codepage": "~1.14.0",
"commander": "~2.17.1",
"crc-32": "~1.2.0",
"exit-on-epipe": "~1.0.1",
"ssf": "~0.10.3",
"wmf": "~1.0.1"
}
}
}
}
......@@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service serve --mode production",
"serve": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service serve --mode test",
"dev-serve": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service serve --mode development",
"build": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service build",
"dev-build": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service build --mode development",
......@@ -12,10 +12,19 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@fullcalendar/core": "^4.4.0",
"@fullcalendar/daygrid": "^4.4.0",
"@fullcalendar/interaction": "^4.4.0",
"@fullcalendar/list": "^4.4.0",
"@fullcalendar/timegrid": "^4.4.0",
"@fullcalendar/vue": "^4.4.0",
"axios": "^0.19.1",
"core-js": "^3.4.4",
"echarts": "^4.6.0",
"element-ui": "^2.13.0",
"file-saver": "^2.0.2",
"font-awesome": "^4.7.0",
"interactjs": "^1.9.4",
"path-to-regexp": "^6.1.0",
"qs": "^6.9.1",
"rxjs": "^6.5.4",
......@@ -23,12 +32,15 @@
"view-design": "^4.1.0",
"vue": "^2.6.10",
"vue-class-component": "^7.0.2",
"vue-grid-layout": "^2.3.7",
"vue-i18n": "^8.15.3",
"vue-property-decorator": "^8.3.0",
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
"vuex": "^3.1.2",
"xlsx": "^0.15.6"
},
"devDependencies": {
"@types/echarts": "^4.4.3",
"@types/jest": "^24.0.19",
"@types/mockjs": "^1.0.2",
"@types/qs": "^6.9.0",
......@@ -44,6 +56,7 @@
"less": "^3.0.4",
"less-loader": "^5.0.0",
"mockjs": "^1.1.0",
"script-loader": "^0.7.2",
"typescript": "~3.5.3",
"vue-template-compiler": "^2.6.10"
}
......
.loader {
position: relative;
width: 12.5em;
height: 12.5em;
transform: rotate(165deg);
}
.loader:before, .loader:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
display: block;
width: 2.5em;
height: 2.5em;
border-radius: 1.25em;
transform: translate(-50%, -50%);
}
.loader:before {
animation: before 2s infinite;
}
.loader:after {
animation: after 2s infinite;
}
@keyframes before {
0% {
width: 2.5em;
box-shadow: 5em -2.5em rgba(88, 163, 243, 0.75), -5em 2.5em rgba(153, 202, 255, 0.75);
}
35% {
width: 12.5em;
box-shadow: 0 -2.5em rgba(88, 163, 243, 0.75), 0 2.5em rgba(153, 202, 255, 0.75);
}
70% {
width: 2.5em;
box-shadow: -5em -2.5em rgba(88, 163, 243, 0.75), 5em 2.5em rgba(153, 202, 255, 0.75);
}
100% {
box-shadow: 5em -2.5em rgba(88, 163, 243, 0.75), -5em 2.5em rgba(153, 202, 255, 0.75);
}
}
@keyframes after {
0% {
height: 2.5em;
box-shadow: 2.5em 5em rgba(224, 224, 224, 0.75), -2.5em -5em rgba(198, 200, 210, 0.75);
}
35% {
height: 12.5em;
box-shadow: 2.5em 0 rgba(224, 224, 224, 0.75), -2.5em 0 rgba(198, 200, 210, 0.75);
}
70% {
height: 2.5em;
box-shadow: 2.5em -5em rgba(224, 224, 224, 0.75), -2.5em 5em rgba(198, 200, 210, 0.75);
}
100% {
box-shadow: 2.5em 5em rgba(224, 224, 224, 0.75), -2.5em -5em rgba(198, 200, 210, 0.75);
}
}
/** * Attempt to center the whole thing! */
html, body {
height: 100%;
}
.loader {
position: absolute;
top: calc(50% - 6.25em);
left: calc(50% - 6.25em);
}
<template>
<div id='app'>
<router-view/>
<app-debug-actions />
<router-view v-if="isRouterAlive"/>
</div>
</template>
+<script lang='ts'>
import { Vue, Component, Provide } from 'vue-property-decorator';
import store from '@/store';
import { LoadAppData } from '@/utils';
@Component({
})
export default class App extends Vue {
/**
* 控制视图是否显示
*/
public isRouterAlive:boolean = false;
/**
* 向后代注入加载行为
*/
@Provide()
public reload = this.viewreload;
/**
* vue生命周期
*/
public created(){
this.loadAppData();
}
/**
* 视图重新加载
*/
public viewreload () {
this.isRouterAlive = false;
this.$nextTick(function () {
this.isRouterAlive = true;
})
}
/**
* 视图加载代码表
*/
public async loadAppData(){
const _store:any = store;
if(_store.state && _store.state.codelists && _store.state.codelists.length >0){
this.isRouterAlive = true;
return;
}else{
await LoadAppData.getInstance().load(store);
this.isRouterAlive = true;
}
}
}
</script>
<style lang='less'>
@import './styles/default.less';
</style>
......@@ -3,9 +3,14 @@ import { UIActionTool } from './utils/uiaction-tool/uiaction-tool';
import { Verify } from './utils/verify/verify';
import { Util } from './utils/util/util';
import { Http } from './utils/http/http';
import { exportExcel } from './utils/export/export';
import { AppPopover } from './utils/app-popover/app-popover';
import { AppModal } from './utils/app-modal/app-modal';
import { AppDrawer } from './utils/app-drawer/app-drawer';
import { uiServiceRegister } from '@/uiservice/ui-service-register';
import { utilServiceRegister } from '@/utilservice/util-service-register';
import { entityServiceRegister } from '@/service/entity-service-register';
import { counterServiceRegister } from '@/counter/counter-service-register';
import InputBox from './components/input-box/input-box.vue'
import AppKeepAlive from './components/app-keep-alive/app-keep-alive.vue'
......@@ -45,15 +50,35 @@ import AppSpan from './components/app-span/app-span.vue'
import AppAddressSelection from './components/app-address-selection/app-address-selection.vue'
import DropdownListMpicker from './components/dropdown-list-mpicker/dropdown-list-mpicker.vue'
import AppRate from './components/app-rate/app-rate.vue'
import appInputNumber from './components/app-input-number/app-input-number.vue'
import AppSwitch from './components/app-switch/app-switch.vue'
import AppFileUploadDrag from './components/app-file-upload-drag/app-file-upload-drag.vue'
import AppSlider from './components/app-slider/app-slider.vue'
import AppStepper from './components/app-stepper/app-stepper.vue'
import AppPortalDesign from './components/app-portal-design/app-portal-design.vue'
import DatePickerRange from './components/date-picker-range/date-picker-range.vue'
import AppRangeDate from './components/app-range-date/app-range-date.vue'
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;
// 全局挂载功能服务注册中心
window['utilServiceRegister'] = utilServiceRegister;
// 全局挂载数据服务注册中心
window['entityServiceRegister'] = entityServiceRegister;
// 全局挂载计数器服务注册中心
window['counterServiceRegister'] = counterServiceRegister;
export const AppComponents = {
install(v: any, opt: any) {
v.prototype.$appdrawer = AppDrawer.getInstance();
v.prototype.$appmodal = AppModal.getInstance();
v.prototype.$apppopover = AppPopover.getInstance();
v.prototype.$http = Http.getInstance();
v.prototype.$export = exportExcel.getInstance();
v.prototype.$util = Util;
v.prototype.$verify = Verify;
v.prototype.$viewTool = ViewTool;
......@@ -96,8 +121,17 @@ export const AppComponents = {
v.component('app-address-selection', AppAddressSelection);
v.component('dropdown-list-mpicker', DropdownListMpicker);
v.component('app-rate', AppRate);
v.component('app-input-number', appInputNumber);
v.component('app-switch', AppSwitch);
v.component('app-file-upload-drag', AppFileUploadDrag);
v.component('app-slider', AppSlider);
v.component('app-stepper', AppStepper);
v.component('app-portal-design',AppPortalDesign);
v.component('date-picker-range',DatePickerRange);
v.component('app-range-date', AppRangeDate);
v.component('app-actionbar', AppActionBar);
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
.app-actionbar {
padding: 12px;
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.app-actionbar-item{
margin-right:10px;
margin-bottom: 10px;
}
}
\ No newline at end of file
<template>
<div class="app-actionbar">
<div class="app-actionbar-item" v-for="(item,index) in items" :key="index">
<Badge v-if="item.counterService&&item.counterService.counterData" :count="item.counterService.counterData[item.counterId]" type="primary">
<i-button @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button>
</Badge>
<i-button v-else @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button>
</div>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Model, Emit } from "vue-property-decorator";
import { Subject } from "rxjs";
@Component({})
export default class AppActionBar extends Vue {
/**
* 传入操作栏模型数据
*
* @type {any}
* @memberof AppActionBar
*/
@Prop() public items!:any;
/**
* 触发界面行为
*
* @memberof AppActionBar
*/
public handleClick($event:any){
this.$emit('itemClick',$event);
}
}
</script>
<style lang='less'>
@import "./app-actionbar.less";
</style>
\ No newline at end of file
.show-type {
text-align: right;
position: absolute;
z-index: 99;
right: 0;
top: 2px;
.ivu-btn-group {
.collapse-btn {
padding: 0;
}
}
}
\ No newline at end of file
<template>
<div class='show-type'>
<button-group v-show="!showTypeDir">
<i-button class="collapse-btn" type="primary" @click="clickCollapse('left')">
<icon type="ios-arrow-back"/>
</i-button>
</button-group>
<button-group v-show="showTypeDir">
<el-tooltip content="定制">
<i-button icon="md-build" type="primary" @click="handleClick"></i-button>
</el-tooltip>
<i-button class="collapse-btn" type="primary" @click="clickCollapse('right')">
<icon type="ios-arrow-forward"/>
</i-button>
</button-group>
</div>
</template>
<script lang="ts">
import {Vue, Component, Prop, Watch} from 'vue-property-decorator';
@Component({
components: {
}
})
export default class AppBuild extends Vue {
/**
* 工具栏伸缩
*
* @protected
* @type {boolean}
* @memberof AppBuild
*/
public showTypeDir: boolean = false;
/**
* 点击伸缩
*
* @param {*} type
* @memberof AppBuild
*/
public clickCollapse(type: string) {
this.showTypeDir = Object.is(type, 'left') ? true : false;
}
/**
* 工具点击
*
*@memberof AppBuild
*/
public handleClick(){
this.$emit("handleClick")
}
}
</script>
<style lang="less">
@import './app-build.less';
</style>
\ No newline at end of file
<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>
......
import { Http } from './../../utils/http/http';
import UtilService from '@/utilservice/util-service';
export default class AppDashboardDesignService {
/**
* 工具服务对象
*
* @protected
* @type {UtilService}
* @memberof AppDashboardDesignService
*/
protected utilService: UtilService = new UtilService();
/**
* 加载数据模型
*
* @param {string} serviceName
* @param {*} context
* @param {*} viewparams
* @memberof AppDashboardDesignService
*/
public loadModel(serviceName: string, context: any, viewparams: any) {
return new Promise((resolve: any, reject: any) => {
this.utilService.getService(serviceName).then((service: any) => {
service.loadModelData(JSON.stringify(context), viewparams).then((response: any) => {
resolve(response);
}).catch((response: any) => {
reject(response);
});
}).catch((response: any) => {
reject(response);
});
});
}
/**
* 保存模型
*
* @param {string} serviceName
* @param {*} context
* @param {*} viewparams
* @returns
* @memberof AppDashboardDesignService
*/
public saveModel(serviceName: string, context: any, viewparams: any) {
return new Promise((resolve: any, reject: any) => {
this.utilService.getService(serviceName).then((service: any) => {
service.saveModelData(JSON.stringify(context), '', viewparams).then((response: any) => {
resolve(response);
}).catch((response: any) => {
reject(response);
});
}).catch((response: any) => {
reject(response);
});
});
}
/**
* 加载门户部件集合
*
* @memberof AppDashboardDesignService
*/
public loadPortletList(context: any, viewparams: any): Promise<any> {
return new Promise((resolve: any, reject: any) => {
Http.getInstance().get('./assets/json/portlet-data.json').then((response: any) => {
if (response && response.status === 200 && response.data && Array.isArray(response.data)) {
const datas: any[] = this.filterData(response.data, viewparams.appdeName);
const list = this.prepareList(datas);
const groups = this.prepareGroup(datas);
resolve({data: datas, result: list.reverse(), groups: groups});
}
}).catch((response: any) => {
console.log(response.status);
});
});
}
/**
* 过滤数据
*
* @param {any[]} datas
* @memberof AppDashboardDesignService
*/
public filterData(datas: any[] = [], dataType: string): any[] {
let items: any[] = [];
datas.forEach((data: any) => {
if(Object.is(data.type, 'app')) {
items.push(data);
}
if(Object.is(data.appCodeName, dataType)) {
items.push(data);
}
});
return items;
}
/**
* 分组集合
*
* @param {any[]} [datas=[]]
* @returns {any[]}
* @memberof AppDashboardDesignService
*/
public prepareGroup(datas: any[] = []): any[] {
let items: any[] = [];
datas.forEach((data: any) => {
let item = items.find((item: any) => Object.is(item.value, data.groupCodeName));
if(item) {
let _item = item.children.find((a: any) => Object.is(a.portletCodeName, data.portletCodeName));
if(!_item) {
item.children.push(data);
}
} else {
items.push({name: data.groupName, value: data.groupCodeName, children: [data]});
}
});
return items;
}
/**
* 准备list集合
*
* @memberof AppDashboardDesignService
*/
public prepareList(datas: any[] = []): any[] {
let list: any[] = [];
datas.forEach((data: any) => {
let item = list.find((item: any) => Object.is(data.type, item.type));
if(!item) {
item = {};
Object.assign(item, {
type: data.type,
name: Object.is(data.type, 'app') ? "全局" : data.appName,
children: []
});
list.push(item);
}
this.prepareList2(item.children, data);
})
return list
}
/**
* 准备list项集合
*
* @param {any[]} [children=[]]
* @param {*} [data={}]
* @memberof AppDashboardDesignService
*/
public prepareList2(children: any[] = [], data: any = {}) {
let item = children.find((item: any) => Object.is(data.groupCodeName, item.type));
if(!item) {
item = {};
Object.assign(item, {
type: data.groupCodeName,
name: data.groupName,
children: []
});
children.push(item);
}
let _item = item.children.find((a: any) => Object.is(a.portletCodeName, data.portletCodeName));
if(!_item) {
item.children.push(data);
}
}
}
\ No newline at end of file
.app-dashboard-design {
width: 100%;
height: 100%;
border: 1px solid #ccc;
display: flex;
.design-tree {
width: 300px;
height: 100%;
padding: 5px;
overflow: auto;
.design-filter {
width: 100%;
}
.design-tree-content {
height: calc(100% - 40px);
overflow: auto;
.el-menu {
width: 100%;
border-right: 0;
.drag-div-item {
height: 40px;
line-height: 40px;
background-color: #f7fafc;
margin-bottom: 5px;
border: 1px dashed transparent;
cursor: move;
}
.drag-div-item:hover {
border-color: #107fff;
}
.el-menu-item.is-active {
color: initial;
}
.is-disable {
background-color: #e8eaef;
color: #c9ccd8;
cursor: no-drop !important;
}
}
}
.drag-tree-item {
opacity: .7;
z-index: 1;
position: fixed;
}
}
.design-panel {
flex-grow: 1;
height: 100%;
overflow: auto;
background: #efefef;
.app-grid-layout {
.app-grid-layout-mask {
height: calc(100% + 180px);
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
background: -webkit-linear-gradient(top, #ddd 10px, transparent 10px),-webkit-linear-gradient(left, #ddd 10px, transparent 10px);
}
.app-grid-layout-item {
height: 100%;
.el-icon-close {
font-size: 16px;
float: right;
margin-top: 4px;
cursor: pointer;
}
}
}
.layout-draging {
.vue-grid-placeholder {
display: initial !important;
}
}
}
}
\ 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="开启配置模式" :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>
<el-upload
:disabled="disabled"
:file-list="files"
:action="uploadUrl"
:headers="{}"
:before-upload="beforeUpload"
:before-remove="onRemove"
:on-success="onSuccess"
:on-error="onError"
:on-preview="onDownload">
<el-button size='small' icon='el-icon-upload' :disabled="disabled">{{this.$t('app.fileUpload.caption')}}</el-button>
</el-upload>
<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"
:action="uploadUrl"
:headers="{}"
:before-upload="beforeUpload"
:before-remove="onRemove"
:on-success="onSuccess"
: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">
......@@ -38,6 +74,14 @@ export default class AppFileUpload extends Vue {
*/
@Prop() public ignorefieldvaluechange?: boolean;
/**
* 是否支持拖拽
*
* @type {boolean}
* @memberof AppFileUpload
*/
@Prop() public isdrag?: boolean;
/**
* 表单状态事件
*
......@@ -75,12 +119,8 @@ export default class AppFileUpload extends Vue {
if (this.ignorefieldvaluechange) {
return;
}
if (newval) {
this.files = JSON.parse(newval);
this.dataProcess();
} else {
this.files = [];
}
this.setFiles(newval)
this.dataProcess();
}
/**
......@@ -176,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 = [];
}
}
/**
* 数据处理
*
......@@ -218,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();
}
});
......@@ -239,15 +292,17 @@ export default class AppFileUpload extends Vue {
let uploadparams: string = '';
let exportparams: string = '';
let upload_keys: Array<string> = [];
let export_keys: Array<string> = [];
let custom_arr: Array<string> = [];
if (this.uploadparams && !Object.is(this.uploadparams, '')) {
uploadparams = this.uploadparams;
upload_keys = uploadparams.split(';');
}
if (this.exportparams && !Object.is(this.exportparams, '')) {
exportparams = this.exportparams;
export_keys = exportparams.split(';');
}
let upload_keys: Array<string> = uploadparams.split(';');
let export_keys: Array<string> = exportparams.split(';');
let custom_arr: Array<string> = [];
if (this.customparams && !Object.is(this.customparams, '')) {
Object.keys(this.customparams).forEach((name: string) => {
custom_arr.push(`${name}=${this.customparams[name]}`);
......@@ -257,9 +312,7 @@ export default class AppFileUpload extends Vue {
this.export_keys = export_keys;
this.custom_arr = custom_arr;
if (this.value) {
this.files = JSON.parse(this.value);
}
this.setFiles(this.value);
this.dataProcess();
}
......@@ -281,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;
}
}
/**
......@@ -296,7 +356,7 @@ export default class AppFileUpload extends Vue {
if (!response) {
return;
}
const data = { name: response.name, id: response.id };
const data = { name: response.filename, id: response.fileid };
let arr: Array<any> = [];
this.files.forEach((_file:any) => {
arr.push({name: _file.name, id: _file.id})
......@@ -334,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 });
}
......@@ -347,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>
......
......@@ -3,9 +3,10 @@
<component
:is="viewname"
class="viewcontainer2"
:viewdata ="JSON.stringify(this.viewdata)"
:viewdata ="viewdata"
:viewDefaultUsage="false"
:formDruipart="formDruipart"
:formDruipart="formDruipart"
:isformDruipart="true"
@mditemsload="mditemsload"
@drdatasaved="drdatasaved"
@drdatachange="drdatachange"
......@@ -93,13 +94,21 @@ export default class AppFormDRUIPart extends Vue {
*/
@Prop() public parameters!: any[];
/**
* 视图上下文
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewParam!: any;
@Prop() public viewparams!: any;
/**
* 应用实体参数名称
......@@ -109,6 +118,14 @@ export default class AppFormDRUIPart extends Vue {
*/
@Prop() public parameterName!: string;
/**
* 应用实体参数名称(区分大小写)
*
* @type {string}
* @memberof AppFormDRUIPart
*/
@Prop() public parentName!: string;
/**
* 关系界面向视图下发指令对象
*
......@@ -200,6 +217,14 @@ export default class AppFormDRUIPart extends Vue {
*/
public viewdata: any = {};
/**
* 父视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
public viewparam: any = {};
/**
* 刷新关系页面
*
......@@ -212,24 +237,22 @@ export default class AppFormDRUIPart extends Vue {
if (Object.is(this.parentdata.SRFPARENTTYPE, 'CUSTOM')) {
this.isRelationalData = false;
}
const formData: any = data?data:JSON.parse(this.data);
const _paramitem = formData[this.paramItem];
this.viewdata = {};
Object.assign(this.viewdata, this.parentdata);
Object.assign(this.viewdata, this.$viewTool.getIndexViewParam());
let viewdata = {srfparentdename:this.parentName,srfparentkey:_paramitem};
Object.assign(viewdata, this.$viewTool.getIndexViewParam());
const _parameters: any[] = [...this.$viewTool.getIndexParameters(), ...this.parameters];
_parameters.forEach((parameter: any) => {
const { pathName, parameterName }: { pathName: string, parameterName: string } = parameter;
if (this.viewParam[parameterName] && !Object.is(this.viewParam[parameterName], '')) {
Object.assign(this.viewdata, { [parameterName]: this.viewParam[parameterName] });
if (formData[parameterName] && !Object.is(formData[parameterName], '')) {
Object.assign(viewdata, { [parameterName]: formData[parameterName] });
}
});
Object.assign(this.viewdata, { [this.paramItem]: _paramitem });
Object.assign(viewdata, { [this.paramItem]: _paramitem });
//设置顶层视图唯一标识
Object.assign(this.viewdata,{srfsessionid:this.viewParam.srfsessionid});
Object.assign(viewdata,this.context);
this.viewdata = JSON.stringify(viewdata);
this.viewparam = JSON.stringify(this.viewparams);
if (this.isRelationalData) {
if (!_paramitem || _paramitem == null || Object.is(_paramitem, '')) {
this.blockUIStart();
......@@ -238,8 +261,7 @@ export default class AppFormDRUIPart extends Vue {
this.blockUIStop();
}
}
this.formDruipart.next({action:'load',data:[]});
// this.$forceUpdate();
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}});
}
/**
......
......@@ -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.dataProcess();
} else {
this.files = [];
}
this.setFiles(newval)
this.dataProcess();
}
/**
......@@ -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();
}
});
......@@ -283,15 +291,17 @@ export default class AppImageUpload extends Vue {
let uploadparams: string = '';
let exportparams: string = '';
let upload_keys: Array<string> = [];
let export_keys: Array<string> = [];
let custom_arr: Array<string> = [];
if (this.uploadparams && !Object.is(this.uploadparams, '')) {
uploadparams = this.uploadparams;
upload_keys = uploadparams.split(';');
}
if (this.exportparams && !Object.is(this.exportparams, '')) {
exportparams = this.exportparams;
export_keys = exportparams.split(';');
}
let upload_keys: Array<string> = uploadparams.split(';');
let export_keys: Array<string> = exportparams.split(';');
let custom_arr: Array<string> = [];
if (this.customparams && !Object.is(this.customparams, '')) {
Object.keys(this.customparams).forEach((name: string) => {
custom_arr.push(`${name}=${this.customparams[name]}`);
......@@ -301,9 +311,7 @@ export default class AppImageUpload extends Vue {
this.export_keys = export_keys;
this.custom_arr = custom_arr;
if (this.value) {
this.files = JSON.parse(this.value);
}
this.setFiles(this.value);
this.dataProcess();
}
......@@ -341,7 +349,7 @@ export default class AppImageUpload extends Vue {
if (!response) {
return;
}
const data = { name: response.name, id: response.id };
const data = { name: response.filename, id: response.fileid };
let arr: Array<any> = [];
this.files.forEach((_file: any) => {
arr.push({ name: _file.name, id: _file.id })
......
<template>
<dropdown trigger='click' on-click="selectLang">
<dropdown trigger='click' @on-click="selectLang">
<span>
{{title}}
<icon size='18' type='md-arrow-dropdown'></icon>
......
......@@ -47,6 +47,14 @@ export default class AppMpicker extends Vue {
* 表单项名称
*/
@Prop() name: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public context!: any;
/**
* 视图参数
......@@ -54,7 +62,7 @@ export default class AppMpicker extends Vue {
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewParam!: any;
@Prop() public viewparams!: any;
/**
* AC参数
......@@ -216,10 +224,18 @@ export default class AppMpicker extends Vue {
if (this.pickupView && Object.keys(this.pickupView).length > 0) {
// 参数处理
const view = { ...this.pickupView };
let _viewParam = this.viewParam;
let data = { srfparentdata: { srfparentkey: this.activeData[this.deKeyField] }, selectedData: [...this.selectItems], };
let _viewparams = JSON.parse(JSON.stringify(this.viewparams));
let _context = JSON.parse(JSON.stringify(this.context));
let _selectItems = JSON.parse(JSON.stringify(this.selectItems));
if(!Object.is(this.deKeyField,"srfkey")){
_selectItems.forEach((item:any, index:number)=>{
_selectItems[index].srfkey = item[this.deKeyField];
});
}
_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, _viewParam, data)
const modal: Subject<any> = this.$appmodal.openModal(view, _context, _viewparams)
modal.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
......
.app-org-sector {
.orgsector{
font-size: 15px;
cursor: pointer;
margin-right: 10px;
padding: 0 5px;
}
}
\ No newline at end of file
<template>
<div class="app-org-sector">
<dropdown @on-click="orgSelect" :transfer="true">
<div class="orgsector">
<span>{{selectedOrgName}}</span>
<icon size="18" type="md-arrow-dropdown" v-if="selectedOrgArray.length > 0"></icon>
</div>
<dropdown-menu
class="menu"
slot="list"
style="font-size: 15px !important;"
v-if="selectedOrgArray.length > 0"
>
<dropdown-item
:name="item.srforgsectorid"
style="font-size: 15px !important;"
v-for="(item, index) in selectedOrgArray"
:key="index"
>{{item.srforgsectorname}}</dropdown-item>
</dropdown-menu>
</dropdown>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Inject } from "vue-property-decorator";
@Component({})
export default class AppOrgSector extends Vue {
/**
* 注入加载行为
*
* @memberof AppOrgSector
*/
@Inject("reload")
reload!: any;
/**
* 选中组织部门id
*
* @type {string}
* @memberof AppOrgSector
*/
public selectedOrgId: string = "";
/**
* 选中组织部门名称
*
* @type {string}
* @memberof AppOrgSector
*/
public selectedOrgName: string = "";
/**
* 组织部门名称数组
*
* @type {Array<any>}
* @memberof AppOrgSector
*/
public selectedOrgArray: Array<any> = [];
/**
* 组件初始化数据,vue生命周期
*
* @memberof AppOrgSector
*/
public mounted() {
if (this.$store.getters.getAppData()) {
if (this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srforgsectorid && this.$store.getters.getAppData().context.srforgsectorname) {
this.selectedOrgId = this.$store.getters.getAppData().context.srforgsectorid;
this.selectedOrgName = this.$store.getters.getAppData().context.srforgsectorname;
}
if (this.$store.getters.getAppData().srforgsections) {
this.selectedOrgArray = this.$store.getters.getAppData().srforgsections;
}
}
}
/**
* 选择组织部门回调
*
* @memberof AppOrgSector
*/
public orgSelect(data: string) {
if(Object.is(data,this.selectedOrgId)){
return;
}
let item: any = this.selectedOrgArray.find((_item: any) => {
return _item.srforgsectorid === data;
});
if (item.srforgsectorid && item.srforgsectorname) {
this.selectedOrgId = item.srforgsectorid;
this.selectedOrgName = item.srforgsectorname;
this.reload();
}
this.updateStoreOrgData(item);
}
/**
* 更新仓库Org信息
*
* @memberof AppOrgSector
*/
public updateStoreOrgData(data: any) {
let _appdata: any = this.$store.getters.getAppData();
let _context: any = _appdata.context;
Object.assign(_context,data);
Object.assign(_appdata, {context:_context});
this.$store.commit("updateAppData", _appdata);
}
}
</script>
<style lang="less">
@import "./app-orgsector.less";
</style>
\ No newline at end of file
......@@ -26,6 +26,8 @@
overflow:inherit;
}
}
}
}
.select-no-dropdown.el-select-dropdown{
display: none;
}
\ No newline at end of file
......@@ -165,7 +165,7 @@ export default class AppPicker extends Vue {
* @type {string}
* @memberof AppPicker
*/
@Prop() public valueitem?: string;
@Prop() public valueitem!: string;
/**
* 值
......@@ -256,7 +256,9 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public created() {
this.onSearch("", null, true);
if(Object.is(this.editortype, 'dropdown')){
this.onSearch("", null, true);
}
}
/**
......@@ -399,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')) {
......@@ -420,9 +423,8 @@ export default class AppPicker extends Vue {
* @param {*} data
* @memberof AppPicker
*/
private openIndexViewTab(view: any, data: any): void {
let args = [Object.assign({}, this.data, data)];
const routePath = this.$viewTool.buildUpRoutePath(this.$route, this.context, view.deResParameters, view.parameters, args, data);
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);
}
......@@ -523,7 +525,7 @@ export default class AppPicker extends Vue {
Object.assign(data, data.srfparentdata);
delete data.srfparentdata;
}
this.openIndexViewTab(view, data);
this.openIndexViewTab(view, null, data);
} else if (Object.is(result.openmode, 'POPUPMODAL')) {
const viewname = this.$util.srfFilePath2(result.viewname);
const view: any = {
......@@ -562,8 +564,6 @@ export default class AppPicker extends Vue {
if (response.status === 401) {
return;
}
const { data: _data } = response;
this.$Notice.error({ title: _data.title, desc: _data.message });
});
}
......@@ -573,29 +573,34 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public openLinkView($event: any): void {
let srfkey: string;
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$Notice.error({ title: '错误', desc: '值项异常!' });
console.error({ title: '错误', desc: '值项异常!' });
return;
}
srfkey = this.data[this.valueitem];
let data = { [this.deKeyField]: srfkey };
// 公共参数处理
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, data);
this.openIndexViewTab(view, _context, _param);
} else if (Object.is(view.placement, 'POPOVER')) {
view.viewname = viewname2;
this.openPopOver($event, view, null, data);
this.openPopOver($event, view, _context, _param);
} else if (Object.is(view.placement, 'POPUPMODAL')) {
view.viewname = viewname2;
this.openPopupModal(view, null, data);
this.openPopupModal(view, _context, _param);
} else if (view.placement.startsWith('DRAWER')) {
view.viewname = viewname2;
this.openDrawer(view, null, data);
this.openDrawer(view, _context, _param);
}
}
......
.app-portal-design{
width:100%;
height: 100%;
.design-toolbar {
margin-top: -5px;
}
.ivu-card-body {
height: calc(100% - 51px);
.design-container {
height: 100%;
}
}
}
\ No newline at end of file
<template>
<card class="app-portal-design" :dis-hover="true" :padding="0" :bordered="false">
<p slot="title">
自定义门户
</p>
<div class="design-toolbar" slot="extra">
<i-button @click="click">保存</i-button>
</div>
<div class="design-container">
<app-dashboard-design :viewState="viewState" :context="context" :viewparams="viewparams" :utilServiceName="utilServiceName" @save="onSaved"></app-dashboard-design>
</div>
</card>
</template>
<script lang="ts">
import { Vue, Component, Prop, Model, Emit,Watch } from "vue-property-decorator";
import { Subject } from "rxjs";
import AppDashboardDesign from '@components/app-dashboard-design/app-dashboard-design.vue';
@Component({
components: {
AppDashboardDesign
}
})
export default class AppPortalDesign extends Vue {
/**
* 传入视图上下文
*
* @type {string}
* @memberof AppPortalDesign
*/
@Prop() protected viewdata!: string;
/**
* 传入视图参数
*
* @type {string}
* @memberof AppPortalDesign
*/
@Prop() protected viewparam!: string;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof AppPortalDesign
*/
@Prop({ default: true }) protected viewDefaultUsage!: boolean;
/**
* 应用上下文
*
* @type {*}
* @memberof AppPortalDesign
*/
protected context:any = {};
/**
* 视图参数
*
* @type {*}
* @memberof AppPortalDesign
*/
protected viewparams:any = {};
/**
* modelId
*
* @type {*}
* @memberof AppPortalDesign
*/
protected modelId:string = "";
/**
* 功能服务名称
*
* @type {*}
* @memberof AppPortalDesign
*/
protected utilServiceName:string = "";
/**
* 视图状态订阅对象
*
* @private
* @type {Subject<{action: string, data: any}>}
* @memberof AppPortalDesign
*/
protected viewState: Subject<ViewState> = new Subject();
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPortalDesign
*/
@Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) {
this.prepareViewparam();
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPortalDesign
*/
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
this.prepareContext();
}
/**
* 生命周期
*
* @memberof AppPortalDesign
*/
public created() {
this.prepareViewparam();
this.prepareContext();
}
/**
* 准备视图参数
*
* @memberof AppPortalDesign
*/
public prepareViewparam() {
if(this.viewparam){
Object.assign(this.viewparams, JSON.parse(this.viewparam));
if(this.viewparams && this.viewparams.modelid){
this.modelId = this.viewparams.modelid;
}
if(this.viewparams && this.viewparams.utilServiceName){
this.utilServiceName = this.viewparams.utilServiceName;
}
}
}
/**
* 准备视图上下文参数
*
* @memberof AppPortalDesign
*/
public prepareContext() {
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
Object.assign(this.context, JSON.parse(this.viewdata));
return;
}
}
/**
* 点击保存
*
* @memberof AppPortalDesign
*/
public click() {
this.viewState.next({ tag: "", action: "save", data: {} })
}
/**
* 保存完成
*
* @memberof AppPortalDesign
*/
public onSaved($event: any) {
this.$emit("close", $event);
}
}
</script>
<style lang='less'>
@import "./app-portal-design.less";
</style>
\ No newline at end of file
<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>
<el-rate
:value ="CurrentVal"
:value ="currentVal"
:disabled="disabled"
:max="max"
@change="change"
>
</el-rate>
......@@ -28,13 +29,19 @@ export default class AppRate extends Vue {
*/
@Prop() public disabled?: boolean;
/**
* 最大值
* @type {number}
* @memberof AppRate
*/
@Prop({default:5}) public max!: number;
/**
* 当前值
*
* @memberof AppRate
*/
get CurrentVal() {
get currentVal() {
return this.value;
}
......
<template>
<div>
<el-slider
v-model ="currentVal"
:disabled="disabled"
:step="step"
:min="min"
:max="max"
@change="change">
</el-slider >
</div>
</template>
<script lang='ts'>
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
@Component({})
export default class AppSlider extends Vue {
/**
* 传入值
* @type {any}
* @memberof AppSlider
*/
@Prop() public value?:any;
/**
* 是否禁用
* @type {boolean}
* @memberof AppSlider
*/
@Prop() public disabled?: boolean;
/**
* 属性项名称
*
* @type {string}
* @memberof AppPicker
*/
@Prop() public name!: string;
/**
* 步长
* @type {number}
* @memberof AppSlider
*/
@Prop({default:1}) public step!: number;
/**
* 最小值
* @type {number}
* @memberof AppSlider
*/
@Prop({default:0}) public min!: number;
/**
* 最大值
* @type {number}
* @memberof AppSlider
*/
@Prop({default:100}) public max!: number;
/**
* 当前值
*
* @memberof AppSlider
*/
currentVal: number = 0;
/**
* 值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPicker
*/
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
this.currentVal = parseInt(newVal);
}
/**
* change事件
*
* @param {*} val
* @memberof AppPicker
*/
public change(val: any) {
this.$emit('change', { name: this.name, value: val });
}
}
</script>
<style lang='less'>
@import "./app-slider.less";
</style>
\ No newline at end of file
<template>
<span>{{text}}</span>
<span>{{isUseLangres ? $t(text) : text}}</span>
</template>
<script lang="ts">
......@@ -24,6 +24,7 @@ export default class DropDownList extends Vue {
*/
@Prop() public data?: any;
/**
* 监控表单属性 data 值
*
......@@ -32,7 +33,7 @@ export default class DropDownList extends Vue {
@Watch('data')
onDataChange(newVal: any, oldVal: any) {
if(newVal !== oldVal){
this.setText();
this.load();
}
}
......@@ -43,6 +44,14 @@ export default class DropDownList extends Vue {
*/
public text:any = '';
/**
* 编辑器类型
*
* @type {string}
* @memberof AppSpan
*/
@Prop() public editorType?: string;
/**
* 代码表标识
*
......@@ -73,21 +82,49 @@ export default class DropDownList extends Vue {
* @memberof AppSpan
*/
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).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
});
}
this.setText();
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) {
this.items = [...JSON.parse(JSON.stringify(codelist.items))];
this.setText();
} else {
console.log(`----${this.tag}----代码表不存在`);
}
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag).then((res:any) => {
this.items = res;
this.setText();
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
});
}else{
this.setText();
}
}
}
/**
......@@ -95,13 +132,24 @@ 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;
});
this.text = currentItem ;
if(currentItem){
if(Object.is(this.codelistType,'STATIC')){
this.isUseLangres = true;
this.text = 'codelist.'+this.tag+'.'+this.data;
}else{
this.text = currentItem.label;
}
}else{
this.isUseLangres = true;
this.text = 'codelist.'+this.tag+'.empty';
}
}else{
this.text = this.data;
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>
</div>
</template>
<script lang='ts'>
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
@Component({})
export default class AppStepper extends Vue {
/**
* 传入值
* @type {any}
* @memberof AppStepper
*/
@Prop() public value?:any;
/**
* 属性项名称
*
* @type {string}
* @memberof AppPicker
*/
@Prop() public name!: string;
/**
* 是否禁用
* @type {boolean}
* @memberof AppStepper
*/
@Prop() public disabled?: boolean;
/**
* 步长
* @type {number}
* @memberof AppStepper
*/
@Prop({default:1}) public step!: number;
/**
* 最小值
* @type {number}
* @memberof AppStepper
*/
@Prop({default:0}) public min!: number;
/**
* 最大值
* @type {number}
* @memberof AppStepper
*/
@Prop({default:100}) public max!: number;
/**
* 当前值
*
* @memberof AppStepper
*/
get currentVal() {
return this.value ? this.value : 0;
}
/**
* change
*/
public onChange(val: any) {
this.$emit('change', { name: this.name, value: val });
}
}
</script>
<style lang='less'>
@import "./app-stepper.less";
</style>
\ No newline at end of file
.app-studioaction {
.studio-config-container {
position: absolute;
top: 10px;
right: 30px;
z-index: 1;
background: rgba(22, 22, 22, 0.6);
border-radius: 5px;
display: flex;
>.title {
color: white;
border-right: 1px solid #333;
padding: 5px;
text-align: center;
}
>.actions {
display: flex;
}
}
}
\ No newline at end of file
<template>
<div class="app-studioaction" v-if="isDevMode">
<div v-show="sdc.isShowTool" class="studio-config-container">
<div class="title">
{{viewTitle}}
</div>
<div class="actions">
<div class="action-item" title="进入当前视图配置界面">
<i-button type="text" ghost @click="configView()">配置</i-button>
</div>
<div class="action-item" title="建立当前界面的issues">
<i-button type="text" ghost @click="createIssues()">新建issues</i-button>
</div>
</div>
</div>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Inject, Prop } from "vue-property-decorator";
import { Environment } from '@/environments/environment';
import { StudioActionUtil } from '@/utils';
@Component({})
export default class AppStudioAction extends Vue {
/**
* 视图标题
*
* @type {string}
* @memberof AppStudioAction
*/
@Prop() public viewTitle!:string;
/**
* 视图名称
*
* @type {string}
* @memberof AppStudioAction
*/
@Prop() public viewName!:string;
/**
* 是否开发为环境
*
* @type {boolean}
* @memberof AppStudioAction
*/
public isDevMode:boolean = Environment.devMode;
/**
* 配置平台操作控制器
*
* @type {StudioActionController}
* @memberof AppStudioAction
*/
public sdc: StudioActionUtil = StudioActionUtil.getInstance();
/**
* 触发配置
*
* @protected
* @memberof AppStudioAction
*/
protected configView(): void {
this.sdc.openStudioConfigView(this.viewName);
}
/**
* 新建issues
*
* @protected
* @memberof AppStudioAction
*/
protected createIssues(): void {
this.sdc.createdIssues(this.viewName);
}
}
</script>
<style lang="less">
@import "./app-studioaction.less";
</style>
\ No newline at end of file
......@@ -21,7 +21,7 @@ export default class AppSwitch extends Vue {
}
set curValue(value:any){
let emitValue = value == true ? '1':'0';
let emitValue = value == true ? 1:0;
this.$emit('change',emitValue);
}
......
......@@ -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>{{$t('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',
}
......@@ -73,13 +73,18 @@ export default class AppUser extends Vue {
* @memberof AppUser
*/
public mounted() {
if (window.localStorage.getItem('user')) {
const _user: any = window.localStorage.getItem('user') ? window.localStorage.getItem('user') : '';
const user = JSON.parse(_user);
Object.assign(this.user, user, {
time: +new Date
});
let _user:any = {};
if(this.$store.getters.getAppData()){
if(this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srfusername){
_user.name = this.$store.getters.getAppData().context.srfusername;
}
if(this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srfusericonpath){
_user.avatar = this.$store.getters.getAppData().context.srfusericonpath;
}
}
Object.assign(this.user,_user,{
time: +new Date
});
}
/**
......
<template>
<div class="codelist">
<span v-if="ifEmpty">{{emtpytext}}</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>
......@@ -66,7 +66,7 @@ export default class CodeList extends Vue {
* @type {boolean}
* @memberof SelectPicker
*/
@Prop() public emtpytext?: string;
@Prop() public emptytext?: string;
/**
* 绘制模式
......@@ -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;
......@@ -198,9 +208,10 @@ export default class CodeList extends Vue {
}
// 设置items
if(result.length != 0){
_this.items = result;
_this.items = result;
}else{
_this.items = [{text:"不匹配"}];
this.isUseLangres = true;
_this.items = [{text:'codelist.'+this.srfkey+'.empty'}];
}
}
}
......@@ -216,15 +227,23 @@ export default class CodeList extends Vue {
*/
private getItem(items: any[], value: any): any {
let result: any = {};
const arr: Array<any> = items.filter(item => Object.is(item.value, value));
const arr: Array<any> = items.filter(item => {return item.value == value});
if (arr.length !== 1) {
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>
......
......@@ -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>
......@@ -83,7 +83,8 @@ export default class DropDownList extends Vue {
set currentVal(val: any) {
const type: string = this.$util.typeOf(val);
val = Object.is(type, 'null') || Object.is(type, 'undefined') ? [] : val;
this.$emit('change', val);
let value = val.length > 0 ? val.join(',') : '';
this.$emit('change', value);
}
/**
......@@ -92,7 +93,7 @@ export default class DropDownList extends Vue {
* @memberof DropDownListMpicker
*/
get currentVal() {
return this.itemValue?this.itemValue:[];
return this.itemValue? this.itemValue.split(','):[];
}
/**
......@@ -109,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>
......
......@@ -3,6 +3,7 @@
<i-input
:placeholder="placeholder"
:size="size"
:type="type"
v-model="CurrentVal"
:disabled="disabled ? true : false"
@on-enter="enter"
......
......@@ -4,7 +4,6 @@
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import { VNode } from 'vue';
@Component({})
export default class ViewShell extends Vue {
......
import { Store } from 'vuex';
/**
* 计数器服务基类
*
* @export
* @class CounterService
*/
export default class CounterService {
/**
* Vue 状态管理器
*
* @private
* @type {(any | null)}
* @memberof CounterService
*/
private $store: Store<any> | null = null;
/**
* Creates an instance of CounterService.
*
* @param {*} [opts={}]
* @memberof CounterService
*/
constructor(opts: any = {}) {
this.$store = opts.$store;
}
/**
* 获取状态管理器
*
* @returns {(any | null)}
* @memberof CounterService
*/
public getStore(): Store<any> | null {
return this.$store;
}
/**
* 获取计数器服务
*
* @protected
* @param {string} name 实体名称
* @returns {Promise<any>}
* @memberof CounterService
*/
public getService(name: string): Promise<any> {
return (window as any)['counterServiceRegister'].getService(name);
}
}
\ No newline at end of file
import ViewEngine from './view-engine';
/**
* 日历导航视图界面引擎
*
* @export
* @class CalendarExpViewEngine
* @extends {ViewEngine}
*/
export default class CalendarExpViewEngine extends ViewEngine {
/**
* 日历导航栏部件
*
* @type {*}
* @memberof CalendarExpViewEngine
*/
public calendarExpBar: any = null;
/**
* Creates an instance of CalendarExpViewEngine.
*
* @memberof CalendarExpViewEngine
*/
constructor() {
super();
}
/**
* 初始化引擎
*
* @param {*} options
* @memberof CalendarExpViewEngine
*/
public init(options: any): void {
this.calendarExpBar = options.calendarexpbar;
super.init(options);
}
/**
* 引擎加载
*
* @memberof CalendarExpViewEngine
*/
public load(): void {
super.load();
if (this.getCalendarExpBar() && this.isLoadDefault) {
const tag = this.getCalendarExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof CalendarExpViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'calendarexpbar')) {
this.calendarExpBarEvent(eventName, args);
}
}
/**
* 日历导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof CalendarExpViewEngine
*/
public calendarExpBarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof CalendarExpViewEngine
*/
public getCalendarExpBar(): any {
return this.calendarExpBar;
}
}
\ No newline at end of file
......@@ -37,11 +37,6 @@ export default class ChartViewEngine extends SearchViewEngine {
*/
public load(opts: any = {}): void {
super.load(opts);
if (!this.getSearchForm() && this.isLoadDefault) {
const tag = this.getChart().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.context });
}
this.isLoadDefault = true;
}
/**
......
......@@ -10,4 +10,21 @@ import ChartViewEngine from './chart-view-engine';
*/
export default class ChartView9Engine extends ChartViewEngine {
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof ChartView9Engine
*/
public load(opts: any = {},isnotify:boolean=false): void {
if(!this.view.isformDruipart){
super.load(opts);
}else{
if(isnotify){
super.load(opts);
}
}
}
}
\ No newline at end of file
import ViewEngine from './view-engine';
/**
* 卡片视图导航视图界面引擎
*
* @export
* @class DataViewExpViewEngine
* @extends {ViewEngine}
*/
export default class DataViewExpViewEngine extends ViewEngine {
/**
* 卡片导航栏部件
*
* @type {*}
* @memberof DataViewExpViewEngine
*/
public dataviewExpBar: any = null;
/**
* Creates an instance of DataViewExpViewEngine.
*
* @memberof DataViewExpViewEngine
*/
constructor() {
super();
}
/**
* 初始化引擎
*
* @param {*} options
* @memberof DataViewExpViewEngine
*/
public init(options: any): void {
this.dataviewExpBar = options.dataviewexpbar;
super.init(options);
}
/**
* 引擎加载
*
* @memberof DataViewExpViewEngine
*/
public load(): void {
super.load();
if (this.getDataviewExpBar() && this.isLoadDefault) {
const tag = this.getDataviewExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof DataViewExpViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'dataviewexpbar')) {
this.dataviewExpBarEvent(eventName, args);
}
}
/**
* 卡片导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof DataViewExpViewEngine
*/
public dataviewExpBarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof DataViewExpViewEngine
*/
public getDataviewExpBar(): any {
return this.dataviewExpBar;
}
}
\ No newline at end of file
import DataViewEngine from './data-view-engine';
/**
*
*
* @export
* @class EditView9Engine
* @extends {EditViewEngine}
*/
export default class DataView9Engine extends DataViewEngine {
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof DataView9Engine
*/
public load(opts: any = {},isnotify:boolean=false): void {
if(!this.view.isformDruipart){
super.load(opts);
}else{
if(isnotify){
super.load(opts);
}
}
}
}
......@@ -38,19 +38,6 @@ export default class EditView2Engine extends EditViewEngine {
super.init(options);
}
/**
* 部件加载
*
* @param {*} [opts={}]
* @memberof EditView2Engine
*/
public load(opts: any = {}): void {
if (this.getDRBar()) {
const tag = this.getDRBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
}
}
/**
* 部件事件机制
*
......@@ -77,19 +64,6 @@ export default class EditView2Engine extends EditViewEngine {
if (Object.is(eventName, 'selectionchange')) {
this.drBarSelectionChange(args);
}
if (Object.is(eventName, 'load')) {
this.drBarLoad(args);
}
}
/**
* 关系部件加载完成
*
* @param {any[]} args
* @memberof EditView2Engine
*/
public drBarLoad(args: any[]): void {
super.load();
}
/**
......
import EditViewEngine from './edit-view-engine';
/**
* 实体编辑视图(上下关系)界面引擎
*
* @export
* @class EditView4Engine
* @extends {EditViewEngine}
*/
export default class EditView4Engine extends EditViewEngine {
/**
* 数据关系栏
*
* @protected
* @type {*}
* @memberof EditView4Engine
*/
protected drTab: any;
/**
* Creates an instance of EditView4Engine.
*
* @memberof EditView4Engine
*/
constructor() {
super();
}
/**
* 初始化引擎
*
* @param {*} [options={}]
* @memberof EditView4Engine
*/
public init(options: any = {}): void {
this.drTab = options.drtab;
super.init(options);
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof EditView4Engine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'drtab')) {
this.drTabEvent(eventName, args);
}
}
/**
* 数据关系栏事件
*
* @param {string} eventName
* @param {any[]} args
* @memberof EditView4Engine
*/
public drTabEvent(eventName: string, args: any[]): void {
if (Object.is(eventName, 'selectionchange')) {
this.drTabSelectionChange(args);
}
}
/**
* 数据关系栏选中
*
* @param {any[]} args
* @memberof EditView4Engine
*/
public drTabSelectionChange(args: any[]): void {
const item = args[0];
if (!item || Object.keys(item).length === 0) {
return;
}
this.view.selection = {};
Object.assign(this.view.selection, JSON.parse(JSON.stringify(item)));
}
/**
* 表单加载完成
*
* @param {*} [arg={}]
* @memberof EditView4Engine
*/
public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg);
if (this.getDrTab()) {
const tag = this.getDrTab().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
}
}
/**
* 表单保存完成
*
* @param {*} [arg={}]
* @memberof EditView4Engine
*/
public onFormSave(arg: any = {}): void {
super.onFormSave(arg);
if (this.getDrTab()) {
const tag = this.getDrTab().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
}
}
/**
* 获取关系
*
* @returns {*}
* @memberof EditView4Engine
*/
public getDrTab(): any {
return this.drTab;
}
}
\ No newline at end of file
import ViewEngine from './view-engine';
/**
* 表格导航视图界面引擎
*
* @export
* @class GridExpViewEngine
* @extends {ViewEngine}
*/
export default class GridExpViewEngine extends ViewEngine {
/**
* 表格导航栏部件
*
* @type {*}
* @memberof GridExpViewEngine
*/
public gridExpBar: any = null;
/**
* Creates an instance of GridExpViewEngine.
*
* @memberof GridExpViewEngine
*/
constructor() {
super();
}
/**
* 初始化引擎
*
* @param {*} options
* @memberof GridExpViewEngine
*/
public init(options: any): void {
this.gridExpBar = options.gridexpbar;
super.init(options);
}
/**
* 引擎加载
*
* @memberof GridExpViewEngine
*/
public load(): void {
super.load();
if (this.getGridExpBar() && this.isLoadDefault) {
const tag = this.getGridExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof GridExpViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'gridexpbar')) {
this.gridExpBarEvent(eventName, args);
}
}
/**
* 表格导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof GridExpViewEngine
*/
public gridExpBarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof GridExpViewEngine
*/
public getGridExpBar(): any {
return this.gridExpBar;
}
}
\ No newline at end of file
......@@ -37,6 +37,22 @@ export default class GridViewEngine extends MDViewEngine {
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof GridViewEngine
*/
public load(opts: any = {},isnotify:boolean=false): void {
if(!this.view.isformDruipart){
super.load(opts);
}else{
if(isnotify){
super.load(opts);
}
}
}
/**
* 部件事件
*
......
import ViewEngine from './view-engine';
/**
* 列表导航视图界面引擎
*
* @export
* @class ListExpViewEngine
* @extends {ViewEngine}
*/
export default class ListExpViewEngine extends ViewEngine {
/**
* 列表导航栏部件
*
* @type {*}
* @memberof ListExpViewEngine
*/
public listExpBar: any = null;
/**
* Creates an instance of ListExpViewEngine.
*
* @memberof ListExpViewEngine
*/
constructor() {
super();
}
/**
* 初始化引擎
*
* @param {*} options
* @memberof ListExpViewEngine
*/
public init(options: any): void {
this.listExpBar = options.listexpbar;
super.init(options);
}
/**
* 引擎加载
*
* @memberof ListExpViewEngine
*/
public load(): void {
super.load();
if (this.getListExpBar() && this.isLoadDefault) {
const tag = this.getListExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof ListExpViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'listexpbar')) {
this.listExpBarEvent(eventName, args);
}
}
/**
* 列表导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof ListExpViewEngine
*/
public listExpBarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof ListExpViewEngine
*/
public getListExpBar(): any {
return this.listExpBar;
}
}
\ No newline at end of file
import ListViewEngine from './list-view-engine';
/**
*
*
* @export
* @class EditView9Engine
* @extends {EditViewEngine}
*/
export default class ListView9Engine extends ListViewEngine {
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof ListView9Engine
*/
public load(opts: any = {},isnotify:boolean=false): void {
if(!this.view.isformDruipart){
super.load(opts);
}else{
if(isnotify){
super.load(opts);
}
}
}
}
......@@ -40,7 +40,7 @@ export default class MDViewEngine extends ViewEngine {
* @protected
* @memberof MDViewEngine
*/
protected openData?: (args: any[], params?: any, $event?: any, xData?: any) => void;
protected openData?: (args: any[], fullargs?: any[], params?: any, $event?: any, xData?: any) => void;
/**
* 新建数据
......@@ -48,7 +48,7 @@ export default class MDViewEngine extends ViewEngine {
* @protected
* @memberof GridViewEngine
*/
protected newData?: (args: any[], params?: any, $event?: any, xData?: any) => void;
protected newData?: (args: any[], fullargs?: any[], params?: any, $event?: any, xData?: any) => void;
/**
* Creates an instance of GridViewEngine.
......@@ -85,7 +85,7 @@ export default class MDViewEngine extends ViewEngine {
this.setViewState2({ tag: tag, action: 'loaddraft', viewdata: this.view.viewparams });
} else if (this.getMDCtrl() && this.isLoadDefault) {
const tag = this.getMDCtrl().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
this.setViewState2({ tag: tag, action: 'load', viewdata: Object.assign(this.view.viewparams,opts) });
} else {
this.isLoadDefault = true;
}
......@@ -269,7 +269,7 @@ export default class MDViewEngine extends ViewEngine {
}
if (this.openData && this.isFunc(this.openData)) {
this.openData([loadParam], null, null, this.getMDCtrl());
this.openData([loadParam],[data], null, null, this.getMDCtrl());
}
}
......@@ -319,7 +319,7 @@ export default class MDViewEngine extends ViewEngine {
public openDataView(view: any = {}): boolean {
if (this.newData && this.isFunc(this.newData)) {
this.newData([], null, null, this.getMDCtrl());
this.newData([],[],null, null, this.getMDCtrl());
}
return true;
......
......@@ -51,7 +51,7 @@ export default class MPickupViewEngine extends ViewEngine {
super.load();
if (this.getPickupViewPanel()) {
const tag = this.getPickupViewPanel().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.context });
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
}
}
......@@ -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]);
}
}
/**
......
......@@ -48,7 +48,7 @@ export default class PickupViewEngine extends ViewEngine {
super.load();
if (this.getPickupViewPanel()) {
const tag = this.getPickupViewPanel().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.context });
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
}
}
......@@ -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]);
}
}
......
import ViewEngine from './view-engine';
/**
* 实体数据看板视图界面引擎
*
* @export
* @class PortalViewEngine
* @extends {ViewEngine}
*/
export default class PortalViewEngine extends ViewEngine {
/**
* 数据面板部件
*
* @type {*}
* @memberof PortalViewEngine
*/
public dashboard: any = null;
/**
* Creates an instance of PortalViewEngine.
*
* @memberof PortalViewEngine
*/
constructor() {
super();
}
/**
* 初始化引擎
*
* @param {*} options
* @memberof PortalViewEngine
*/
public init(options: any): void {
this.dashboard = options.dashboard;
super.init(options);
}
/**
* 引擎加载
*
* @memberof PortalViewEngine
*/
public load(): void {
super.load();
if (this.getDashboard() && this.isLoadDefault) {
const tag = this.getDashboard().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof PortalViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'dashboard')) {
this.DashboardEvent(eventName, args);
}
}
/**
* 实体数据看板事件
*
* @param {string} eventName
* @param {*} args
* @memberof PortalViewEngine
*/
public DashboardEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof PortalViewEngine
*/
public getDashboard(): any {
return this.dashboard;
}
}
\ No newline at end of file
import PortalViewEngine from './portal-view-engine';
/**
* 实体数据看板视图(部件视图)界面引擎
*
* @export
* @class PortalViewEngine
* @extends {PortalViewEngine}
*/
export default class PortalView9Engine extends PortalViewEngine {
/**
* 引擎加载
*
* @memberof PortalView9Engine
*/
public load(opts: any = {},isnotify:boolean=false): void {
if(!this.view.isformDruipart){
super.load();
}else{
if(isnotify){
super.load();
}
}
}
}
\ No newline at end of file
......@@ -40,7 +40,7 @@ export class SearchViewEngine extends ViewEngine {
super.load(opts);
if (this.getSearchForm()) {
const tag = this.getSearchForm().name;
this.setViewState2({ tag: tag, action: 'loaddraft', viewdata: this.view.context });
this.setViewState2({ tag: tag, action: 'loaddraft', viewdata: this.view.viewparams });
}
}
......@@ -88,8 +88,8 @@ export class SearchViewEngine extends ViewEngine {
* @memberof SearchViewEngine
*/
public dataCtrlBeforeLoad(arg: any = {}): void {
if (this.view.context && Object.keys(this.view.context).length > 0) {
Object.assign(arg, this.view.context);
if (this.view.viewparams && Object.keys(this.view.viewparams).length > 0) {
Object.assign(arg, this.view.viewparams);
}
if (this.getSearchForm()) {
Object.assign(arg, this.getSearchForm().getData());
......
......@@ -46,7 +46,7 @@ export default class TreeViewEngine extends ViewEngine {
super.load();
if (this.getTreeView() && this.isLoadDefault) {
const tag = this.getTreeView().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.context });
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
......
......@@ -9,4 +9,19 @@ import TreeViewEngine from './tree-view-engine';
*/
export default class TreeView9Engine extends TreeViewEngine {
/**
* 引擎加载
*
* @memberof TreeView9Engine
*/
public load(opts: any = {},isnotify:boolean=false): void {
if(!this.view.isformDruipart){
super.load();
}else{
if(isnotify){
super.load();
}
}
}
}
\ No newline at end of file
import { UIServiceRegister } from '@/uiservice/ui-service-register';
import { UtilServiceRegister } from '@/utilservice/util-service-register';
import { EntityServiceRegister } from '@/service/entity-service-register';
import { CounterServiceRegister } from '@/counter/counter-service-register';
declare global {
interface Window {
uiServiceRegister: UIServiceRegister,
utilServiceRegister:UtilServiceRegister,
entityServiceRegister:EntityServiceRegister,
counterServiceRegister:CounterServiceRegister
}
}
\ No newline at end of file
// 用户自定义语言资源 英文
export default {
};
\ No newline at end of file
// 用户自定义语言资源 中文
export default {
};
\ No newline at end of file
import { MockAdapter } from '../mock-adapter';
const mock = MockAdapter.getInstance();
import Mock from 'mockjs'
const Random = Mock.Random;
import Mock from 'mockjs';
// 获取应用数据
mock.onGet('v7/appdata').reply((config: any) => {
mock.onGet('/appdata').reply((config: any) => {
let status = MockAdapter.mockStatus(config);
return [status, {
remotetag: Random.string('upper', 128),
localdata: {
pk1: Random.guid(),
pk2: Random.guid(),
pk3: Random.guid(),
}
}];
return [status,{
context:{
// 用户标识
srfuserid:'5ffafc68-eccd-a5be-0bce-40215334cee3',
// 用户名称
srfusername:'xignzi006',
// 用户图像路径
srfusericonpath:null,
// 当前的用户模式
srfusermode:'default',
// 登录名称
srfloginname:'xignzi006',
// 本地化(Spring变量)
srflocale:'zh',
// 当前用户时区标识
srftimezone:'Asia/Shanghai',
// 当前用户组织标识
srforgid:"a1494aa93f1d1226f7aae63db6f15aa5",
//当前用户组织名称
srforgname:"上海公司",
// 当前用户组织部门标识
srforgsectorid:"5bd1ecf4d3c31e31cb66373df56b852f",
// 当前用户组织部门名称
srforgsectorname:"项目一部",
// 当前用户条线代码
srfsectorbc:""
},
//当前用户所有组织部门标识
srforgsections:[{"srforgsectorid":"5bd1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目一部"},{"srforgsectorid":"2ad1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目二部"}]
}];
});
......@@ -27,7 +27,7 @@ export class MockAdapter {
*/
public static getInstance(): mockAdapter1 {
if (!MockAdapter.mockAdapter) {
MockAdapter.mockAdapter = new mockAdapter1(axios);
MockAdapter.mockAdapter = new mockAdapter1(axios,{delayResponse:500});
}
return this.mockAdapter;
}
......@@ -43,7 +43,7 @@ export class MockAdapter {
public static mockStatus(config: any): number {
let status = 200;
const { headers: _headers } = config;
status = _headers.Authorization && !Object.is(_headers.Authorization, '') ? 200 : 401;
// status = _headers.Authorization && !Object.is(_headers.Authorization, '') ? 200 : 401;
return status;
}
......
......@@ -6,7 +6,7 @@ Mock.mock(RegExp(new RegExp(/^\.\.\/ibizutil\/upload.*$/)),"post",(ops:any) => {
console.log(ops) // 先看一下这个ops是什么
console.log(ops.body)
return {
"name": "xxx.png",
"id": Random.string(128)
"filename": "xxx.png",
"fileid": Random.string("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",32)
};
});
\ 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
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
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
此差异已折叠。
......@@ -2,3 +2,10 @@ declare module '*.vue' {
import Vue from 'vue';
export default Vue;
}
declare module '@fullcalendar/vue';
declare module '@fullcalendar/timegrid';
declare module '@fullcalendar/list';
declare module '@fullcalendar/interaction';
declare module 'vue-grid-layout';
declare module 'vue-print-nb';
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册