提交 7955bbdc 编写于 作者: laowang's avatar laowang

合并分支 'dev' 到 'master'

Dev

查看合并请求 !2
# General .DS_Store
*.DS_Store node_modules
.AppleDouble /dist
.LSOverride /www
# Icon must end with two \r # native app default file
Icon
/tests/e2e/videos/
/tests/e2e/screenshots/
# Thumbnails # local env files
._* .env.local
.env.*.local
# Files that might appear in the root of a volume # Log files
.DocumentRevisions-V100 npm-debug.log*
.fseventsd yarn-debug.log*
.Spotlight-V100 yarn-error.log*
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share # Editor directories and files
.AppleDB .idea
.AppleDesktop .vscode
Network Trash Folder *.suo
Temporary Items *.ntvs*
.apdisk *.njsproj
*.sln
*.sw?
...@@ -4,5 +4,10 @@ ...@@ -4,5 +4,10 @@
"bundledWebRuntime": false, "bundledWebRuntime": false,
"npmClient": "yarn", "npmClient": "yarn",
"webDir": "www", "webDir": "www",
"plugins": {
"SplashScreen": {
"launchShowDuration": 0
}
},
"cordova": {} "cordova": {}
} }
...@@ -7,7 +7,7 @@ buildscript { ...@@ -7,7 +7,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.6.3' classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
......
{ {
"appId": "com.example.app", "appId": "com.example.app",
"appName": "app", "appName": "app",
"bundledWebRuntime": false, "bundledWebRuntime": false,
"npmClient": "yarn", "npmClient": "yarn",
"webDir": "www", "webDir": "www",
"cordova": {}, "plugins": {
"overrideUserAgent": "my custom user agent", "SplashScreen": {
"appendUserAgent": "string to append", "launchShowDuration": 0
"backgroundColor": "#ffffffff",
"hideLogs": true,
"server": {
"url": "http://192.168.1.2:8080"
},
"android": {
"overrideUserAgent": "my custom user agent for Android",
"appendUserAgent": "string to append for Android",
"backgroundColor": "#ffffffff",
"allowMixedContent": true,
"captureInput": true,
"webContentsDebuggingEnabled": true
},
"ios": {
"overrideUserAgent": "my custom user agent for iOS",
"appendUserAgent": "string to append for iOS",
"backgroundColor": "#ffffffff",
"contentInset": "always",
"cordovaSwiftVersion": "4.2",
"minVersion": "11.3",
"cordovaLinkerFlags": [
"-ObjC"
],
"allowsLinkPreview": false,
"hideLogs": true
} }
} },
\ No newline at end of file "cordova": {}
}
...@@ -11,20 +11,19 @@ ...@@ -11,20 +11,19 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"@capacitor/android": "2.0.1", "@capacitor/android": "2.1.0",
"@capacitor/cli": "^2.0.1", "@capacitor/cli": "^2.1.0",
"@capacitor/core": "^2.0.1", "@capacitor/core": "^2.1.0",
"@capacitor/ios": "2.0.1", "@capacitor/ios": "2.1.0",
"@ionic/core": "^5.0.5", "@ionic/core": "^5.1.1",
"axios": "^0.19.2", "axios": "^0.19.2",
"core-js": "^3.6.4", "core-js": "^3.6.4",
"dingtalk-jsapi": "^2.9.14", "dingtalk-jsapi": "^2.9.14",
"echarts": "^4.6.0", "echarts": "^4.6.0",
"font-awesome": "4.7.0", "font-awesome": "4.7.0",
"ibiz-mobile-components": "^0.0.1", "ibiz-mobile-components": "^0.0.4",
"ionicons": "^5.0.1", "ionicons": "^5.0.1",
"moment": "^2.24.0", "moment": "^2.24.0",
"mpvue-calendar": "^2.3.1",
"path-to-regexp": "^6.1.0", "path-to-regexp": "^6.1.0",
"qs": "^6.9.1", "qs": "^6.9.1",
"recorder-core": "^1.0.20040700", "recorder-core": "^1.0.20040700",
......
...@@ -86,6 +86,8 @@ export const AppComponents = { ...@@ -86,6 +86,8 @@ export const AppComponents = {
v.component('app-mob-menu-list-view', () => import('@/components/app-mob-menu-list-view/app-mob-menu-list-view.vue')); v.component('app-mob-menu-list-view', () => import('@/components/app-mob-menu-list-view/app-mob-menu-list-view.vue'));
// 图片滑动视图 // 图片滑动视图
v.component('app-mob-menu-swiper-view', () => import('@/components/app-mob-menu-swiper-view/app-mob-menu-swiper-view.vue')); v.component('app-mob-menu-swiper-view', () => import('@/components/app-mob-menu-swiper-view/app-mob-menu-swiper-view.vue'));
//快速分组组件
v.component('app-van-select', () => import('@/components/app-van-select/app-van-select.vue'));
// 默认样式视图 // 默认样式视图
v.component('app-mob-menu-default-view', () => import('@/components/app-mob-menu-default-view/app-mob-menu-default-view.vue')); v.component('app-mob-menu-default-view', () => import('@/components/app-mob-menu-default-view/app-mob-menu-default-view.vue'));
// 菜单样式 END // 菜单样式 END
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
}, },
data() { data() {
return { return {
changebtntop: false, changebtntop: true,
years: [], years: [],
yearsShow: false, yearsShow: false,
year: 0, year: 0,
...@@ -353,10 +353,10 @@ ...@@ -353,10 +353,10 @@
methods: { methods: {
itemStyle() { itemStyle() {
return { return {
width: `50px`, width: `${this.itemWidth}px`,
height: `50px`, height: `${this.itemWidth}px`,
fontSize: `${50 / 4}px`, fontSize: `${this.itemWidth / 4}px`,
lineHeight: `50px` lineHeight: this.lunar ? `${this.itemWidth / 1.5}px` : `${this.itemWidth}px`
}; };
}, },
changeStyle(){ changeStyle(){
......
...@@ -3,6 +3,24 @@ ...@@ -3,6 +3,24 @@
.app-form-item-label-required { .app-form-item-label-required {
color: red; color: red;
} }
.prompt_text{
position: absolute;
right: 25px;
opacity: 0.8;
font-size: 12px;
bottom: 0px;
color: red;
z-index: 10;
}
.prompt_text_right{
position: absolute;
left: 0px;
opacity: 0.8;
font-size: 12px;
bottom: 0px;
color: red;
z-index: 10;
}
} }
.app-form-item.item-has-value { .app-form-item.item-has-value {
>ion-label { >ion-label {
...@@ -23,4 +41,9 @@ ...@@ -23,4 +41,9 @@
} }
.required{ .required{
color: red; color: red;
} }
\ No newline at end of file .left{
.app-form-item-input{
text-align: right;
}
}
<template> <template>
<ion-item :class="classes"> <ion-item :class="[classes,labelPos.toLowerCase()]">
<template v-if="uiStyle == 'STYLE2'"> <template v-if="uiStyle == 'STYLE2'">
<ion-label :style="{minWidth:labelWidth+'px'}" position="floating" v-if="isShowCaption && labelWidth > 0"><span v-if="required" class="required">* </span>{{isEmptyCaption ? '' : caption}}</ion-label> <ion-label :style="{minWidth:labelWidth+'px'}" position="floating" v-if="isShowCaption && labelWidth > 0"><span v-if="required" class="required">* </span>{{isEmptyCaption ? '' : caption}}</ion-label>
<slot></slot> <slot></slot>
...@@ -7,21 +7,23 @@ ...@@ -7,21 +7,23 @@
<template v-else> <template v-else>
<template v-if="labelPos == 'LEFT'"> <template v-if="labelPos == 'LEFT'">
<ion-label :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0"><span v-if="required" class="required">* </span>{{isEmptyCaption ? '' : caption}}</ion-label> <ion-label :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0"><span v-if="required" class="required">* </span>{{isEmptyCaption ? '' : caption}}</ion-label>
<div :style="contentStyle"> <div :style="contentStyle" style="display: flex;align-items: center;">
<slot></slot> <slot></slot>
</div> </div>
<div class="prompt_text">{{errorText}}</div>
</template> </template>
<template v-if="labelPos == 'TOP'"> <template v-if="labelPos == 'TOP'">
<ion-label <ion-label
:style="{minWidth:labelWidth+'px'}" :style="{minWidth:labelWidth+'px'}"
position="floating" position="floating"
v-if="isShowCaption && labelWidth > 0" v-if="isShowCaption && labelWidth > 0"
>{{isEmptyCaption ? '' : caption}}</ion-label> ><span v-if="required" class="required">* </span>{{isEmptyCaption ? '' : caption}}</ion-label>
<ion-label>*</ion-label>
<slot></slot> <slot></slot>
<div class="prompt_text">{{errorText}}</div>
</template> </template>
<template v-if="labelPos == 'RIGHT' "> <template v-if="labelPos == 'RIGHT' ">
<slot></slot> <slot></slot>
<div class="prompt_text_right">{{errorText}}</div>
<ion-label :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0"><span v-if="required" class="required">* </span> {{isEmptyCaption ? '' : caption}}</ion-label> <ion-label :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0"><span v-if="required" class="required">* </span> {{isEmptyCaption ? '' : caption}}</ion-label>
</template> </template>
<template v-if="labelPos == 'NONE'" > <template v-if="labelPos == 'NONE'" >
...@@ -65,6 +67,62 @@ export default class AppFormItem extends Vue { ...@@ -65,6 +67,62 @@ export default class AppFormItem extends Vue {
*/ */
@Prop() public error?: string; @Prop() public error?: string;
/**
* 表单项值
*
* @type {string}
* @memberof AppFormItem
*/
@Prop() public checkValue?: any;
/**
* 校验值规则
*
* @type {string}
* @memberof AppFormItem
*/
@Watch('checkValue')
checkValueChange(){
this.checkRule();
}
public checkRule(): boolean {
let _this = this
let erro_text :any = "";
let isCheck :boolean = true;
let required :boolean = true;
this.rules.forEach((item:any)=>{
if(item.hasOwnProperty('pattern') && item.trigger == 'change' && _this.checkValue){
let pattern: any = item.pattern;
if(!pattern.test( _this.checkValue)){
erro_text = item.message;
isCheck = false;
}
}
if(item.hasOwnProperty('required') && item.trigger == 'change'){
if(item.required && ! _this.checkValue){
erro_text = item.message;
required = false;
}
}
});
this.errorText = erro_text;
if(isCheck && required){
return true
}else{
return false
}
}
/**
* 错误信息
*
* @type {string}
* @memberof AppFormItem
*/
public errorText = "";
/** /**
* label样式 * label样式
* *
...@@ -171,6 +229,7 @@ export default class AppFormItem extends Vue { ...@@ -171,6 +229,7 @@ export default class AppFormItem extends Vue {
} }
} }
/** /**
* 计算样式 * 计算样式
* *
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
width: 100%; width: 100%;
text-align: right; text-align: right;
ion-datetime{ ion-datetime{
padding-right: 36px; // padding-right: 36px;
--padding-end: 0;
} }
ion-icon{ ion-icon{
position: absolute; position: absolute;
...@@ -10,4 +11,10 @@ ...@@ -10,4 +11,10 @@
top: 42px; top: 42px;
z-index:2; z-index:2;
} }
} }
.picker-col {
padding-inline-start: 5px;
padding-inline-end: 0px;
}
\ No newline at end of file
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<div class="app-mobile-datetime-picker"> <div class="app-mobile-datetime-picker">
<ion-icon v-if="curValue" name="close-circle-outline" @click="clear"></ion-icon> <ion-icon v-if="curValue" name="close-circle-outline" @click="clear"></ion-icon>
<ion-datetime <ion-datetime
display-format="YYYY-MM-DD HH:mm:ss" :max="max"
:min="min"
display-format="YYYY-MM-DD hh:mm"
:value="value" :value="value"
:placeholder="placeholder" :placeholder="placeholder"
:disabled="disabled" :disabled="disabled"
...@@ -49,6 +51,21 @@ export default class AppDateTimePicker extends Vue { ...@@ -49,6 +51,21 @@ export default class AppDateTimePicker extends Vue {
*/ */
public curValue:any = this.value; public curValue:any = this.value;
/**
* 当前日期
* @type {*}
* @memberof MOBILEENTITY3Canlen
*/
protected currentDate:any = new Date().getFullYear();
/**
* 当前选中值
* @memberof AppDateTimePicker
*/
public min:any = this.currentDate - 100;
public max:any = this.currentDate + 100;
/** /**
* 是否禁用 * 是否禁用
* *
...@@ -84,6 +101,10 @@ export default class AppDateTimePicker extends Vue { ...@@ -84,6 +101,10 @@ export default class AppDateTimePicker extends Vue {
this.curValue = null; this.curValue = null;
this.$emit('change','') this.$emit('change','')
} }
created(){
console.log(this.currentDate);
}
} }
</script> </script>
<style lang="less"> <style lang="less">
......
...@@ -18,4 +18,7 @@ ...@@ -18,4 +18,7 @@
.file { .file {
color: #108cee; color: #108cee;
} }
ion-item{
--inner-border-width: 0;
}
} }
<template> <template>
<ion-input debounce="300" :type="type" :value="value" :placeholder="placeholder" :disabled = "disabled" @ionChange="change"></ion-input> <ion-input debounce="300" :type="type" :value="value" :placeholder="placeholder" :disabled = "disabled" @ionChange="change" @ionBlur="()=>{this.$emit('blur')}"></ion-input>
</template> </template>
<script lang="ts"> <script lang="ts">
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
z-index: 3; z-index: 3;
} }
>ion-input { >ion-input {
min-height: 44px;
.native-input { .native-input {
display: none; display: none;
} }
......
...@@ -184,8 +184,8 @@ export default class AppMobMpicker extends Vue { ...@@ -184,8 +184,8 @@ export default class AppMobMpicker extends Vue {
* @param {*} data * @param {*} data
* @memberof AppMobMpicker * @memberof AppMobMpicker
*/ */
private openDrawer(view: any, context: any, param: any): void { private async openDrawer(view: any, context: any, param: any): Promise<any> {
let container: Subject<any> = this.$appdrawer.openDrawer( let container: Subject<any> = await this.$appdrawer.openDrawer(
view, view,
context, context,
param param
......
...@@ -2,4 +2,12 @@ ...@@ -2,4 +2,12 @@
.van-uploader__upload { .van-uploader__upload {
display: none; display: none;
} }
}
.van-uploader__preview {
position: relative;
margin: 8px 8px 8px 0;
cursor: pointer;
}
.van-uploader__upload {
margin: 8px 8px 8px 0;
} }
\ No newline at end of file
<template> <template>
<ion-list class="app-mobile-radio-list"> <ion-list class="app-mobile-radio-list">
<ion-radio-group :value="value" @ionChange="change"> <ion-radio-group :value="value" @ionChange="change">
<ion-item v-for="(item,index) in options" :key="index"> <ion-item class="app-mobile-radio-list-item" v-for="(item,index) in options" :key="index">
<ion-label>{{item.text}}</ion-label> <ion-label>{{item.text}}</ion-label>
<ion-radio :disabled="item.disabled" color="success" :value="item.value"></ion-radio> <ion-radio :disabled="item.disabled" color="success" :value="item.value"></ion-radio>
</ion-item> </ion-item>
...@@ -154,4 +154,7 @@ export default class AppMobRadio extends Vue { ...@@ -154,4 +154,7 @@ export default class AppMobRadio extends Vue {
</script> </script>
<style lang="less"> <style lang="less">
.app-mobile-radio-list-item{
--inner-border-width:0;
}
</style> </style>
\ No newline at end of file
...@@ -556,11 +556,13 @@ export default class AppMobRecorder extends Vue { ...@@ -556,11 +556,13 @@ export default class AppMobRecorder extends Vue {
* @memberof AppMobRecorder * @memberof AppMobRecorder
*/ */
public changeLabelStyle() { public changeLabelStyle() {
document.querySelectorAll(".app-mobile-picture").forEach((element: any) => { document.querySelectorAll(".app-mobile-picture").forEach((element: any) => {
let prev = this.getNearEle(element, 1); let prev = this.getNearEle(element, 1);
prev.style.transform = 'none'; if (prev) {
prev.style.marginBottom = "10px"; prev.style.transform = 'none';
}) prev.style.marginBottom = "10px";
}
});
} }
/** /**
......
...@@ -458,8 +458,8 @@ export default class AppSelectDropDown extends Vue { ...@@ -458,8 +458,8 @@ export default class AppSelectDropDown extends Vue {
* @param {*} data * @param {*} data
* @memberof AppSelectDropDown * @memberof AppSelectDropDown
*/ */
private openDrawer(view: any, context: any, param: any): void { private async openDrawer(view: any, context: any, param: any): Promise<any> {
let container: Subject<any> = this.$appdrawer.openDrawer(view, context, param); let container: Subject<any> = await this.$appdrawer.openDrawer(view, context, param);
container.subscribe((result: any) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
......
...@@ -50,7 +50,9 @@ export default class AppMobSlider extends Vue { ...@@ -50,7 +50,9 @@ export default class AppMobSlider extends Vue {
public changeLabelStyle() { public changeLabelStyle() {
document.querySelectorAll(".app-mobile-slider").forEach((element: any) => { document.querySelectorAll(".app-mobile-slider").forEach((element: any) => {
let prev = this.getNearEle(element, 1); let prev = this.getNearEle(element, 1);
prev.style.transform = 'none'; if(prev && prev.style){
prev.style.transform = 'none';
}
}) })
} }
...@@ -78,8 +80,5 @@ export default class AppMobSlider extends Vue { ...@@ -78,8 +80,5 @@ export default class AppMobSlider extends Vue {
<style lang="less"> <style lang="less">
.app-mobile-slider{ .app-mobile-slider{
width: 100%; width: 100%;
ion-range{
padding-top:10px;
}
} }
</style> </style>
\ No newline at end of file
...@@ -47,7 +47,9 @@ export default class AppStepper extends Vue { ...@@ -47,7 +47,9 @@ export default class AppStepper extends Vue {
public changeLabelStyle() { public changeLabelStyle() {
document.querySelectorAll(".app-mobile-stepper").forEach((element: any) => { document.querySelectorAll(".app-mobile-stepper").forEach((element: any) => {
let prev = this.getNearEle(element, 1); let prev = this.getNearEle(element, 1);
prev.style.transform = 'none'; if(prev && prev.style){
prev.style.transform = 'none';
}
}) })
} }
......
.app-form-item-switch { .app-form-item-switch {
position: absolute; position: absolute;
right: 10px; right: 10px;
top: 50%; top: calc(50% - 16px);
} }
\ No newline at end of file
<template>
<van-dropdown-menu active-color="#323233" :class="showTitle === title?'':'dropdown-menu-ative'" class="dropdown-menu">
<van-dropdown-item :title="showTitle" ref="item" >
<div class="dropdown-box">
<div v-for="(item,index) in items" :key="index" class="dropdown-item" @click="itemClick(item)">
<div v-show="selectItem == item" class="dropdown-item-icon"><van-icon name="success" /></div>
<div class="dropdown-item-text">{{item.label}}</div>
</div>
</div>
<van-button class="dropdown-btn" @click="onReset" >重置</van-button>
<van-button class="dropdown-btn" type="info" @click="onConfirm">确定</van-button>
</van-dropdown-item>
</van-dropdown-menu>
</template>
<script lang="ts">
import {
Vue,
Component,
Prop,
Provide,
Emit,
Watch
} from "vue-property-decorator";
@Component({
components: {}
})
export default class AppVanSelect extends Vue {
/**
* 数据集
*
* @type {any}
* @memberof AppVanMenu
*/
@Prop() public items?: any;
/**
* 名称
*
* @type {any}
* @memberof AppVanMenu
*/
@Prop() public title?: any;
/**
* 展示信息
*
* @type {any}
* @memberof AppVanMenu
*/
public showTitle :any = "";
/**
* 重置按钮
*
* @type {string}
* @memberof AppVanMenu
*/
public onReset(){
this.selectItem = {};
this.showTitle = this.title;
this.closeDropdown();
}
/**
* 当前选中数据
*
* @type {any}
* @memberof AppVanMenu
*/
public selectItem: any ={};
/**
* 数据点击事件
*
* @type {any}
* @memberof AppVanMenu
*/
public itemClick(item:any){
this.selectItem = item;
}
/**
* 生命周期
*
* @memberof AppVanMenu
*/
created(){
this.showTitle = this.title ;
}
/**
* 收起数据
*
* @type {any}
* @memberof AppVanMenu
*/
public closeDropdown() {
let dropdown: any =this.$refs.item;
if(dropdown.toggle && dropdown.toggle instanceof Function){
dropdown.toggle();
}
}
/**
* 提交事件
*
* @type {any}
* @memberof AppVanMenu
*/
public onConfirm() {
if(this.selectItem.label){
this.showTitle = this.selectItem.label;
}
this.closeDropdown();
}
}
</script>
<style lang="less">
.dropdown-box {
display: flex;
flex-wrap: wrap;
padding: 15px 0;
background: #f4f4f4;
.dropdown-item {
width: 50%;
display: flex;
padding: 8px 12px;
.dropdown-item-icon {
color: #e2676d;
padding: 0 5px;
position: absolute;
}
.dropdown-item-text {
margin-left: 35px;
}
}
}
.dropdown-btn{
width: 50%;
}
.dropdown-menu{
min-width: 100px;
max-width: 100px;
height: 30px;
border: solid #ccc 1px;
border-radius: 30px;
margin: 5px;
background: #f2f2f2;
.van-ellipsis {
padding-right: 15px;
}
.van-dropdown-menu__title::after {
right: 6px;
}
}
.van-dropdown-item__content {
border-radius: 0 0 15px 15px;
}
.dropdown-menu-ative{
border-color: #ee0a24;
background: #ffe9ec;
.van-ellipsis{
color: #ee0a24;
}
.van-dropdown-menu__title::after {
color: #ee0a24;
}
}
</style>
\ No newline at end of file
...@@ -37,6 +37,13 @@ export default class MobChartViewEngine extends SearchViewEngine { ...@@ -37,6 +37,13 @@ export default class MobChartViewEngine extends SearchViewEngine {
*/ */
public load(opts: any = {}): void { public load(opts: any = {}): void {
super.load(opts); super.load(opts);
if (this.getChart()) {
const tag = this.getChart().name;
const data: any = {};
let action: string = 'load';
Object.assign(data, this.view.viewParam);
this.setViewState2({ tag: tag, action: action, viewdata: data });
}
} }
/** /**
......
...@@ -279,5 +279,21 @@ export class Util { ...@@ -279,5 +279,21 @@ export class Util {
_str = _str.replace(/---/g, '-').replace(/--/g, '-'); _str = _str.replace(/---/g, '-').replace(/--/g, '-');
return _str; return _str;
} }
/**
* 深度合并对象
*
* @param FirstOBJ 目标对象
* @param SecondOBJ 原对象
* @returns {Object}
* @memberof Util
*/
public static deepObjectMerge(FirstOBJ:any, SecondOBJ:any) {
for (var key in SecondOBJ) {
FirstOBJ[key] = FirstOBJ[key] && FirstOBJ[key].toString() === "[object Object]" ?
this.deepObjectMerge(FirstOBJ[key], SecondOBJ[key]) : FirstOBJ[key] = SecondOBJ[key];
}
return FirstOBJ;
}
} }
\ No newline at end of file
import { ChartSeries } from './chart-series';
/**
* 柱状图序列模型
*
* @export
* @class ChartBarSeries
*/
export class ChartBarSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartBarSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartBarSeries
*/
public valueField: string = '';
/**
* 分类代码表
*
* @type {string}
* @memberof ChartBarSeries
*/
public categorCodeList: any = null;
/**
* 维度定义
*
* @type {string}
* @memberof ChartBarSeries
*/
public dimensions:Array<string> = [];
/**
* 维度编码
*
* @type {*}
* @memberof ChartBarSeries
*/
public encode:any = null;
/**
* 序列模板
*
* @type {*}
* @memberof ChartBarSeries
*/
public seriesTemp:any = null;
/**
* Creates an instance of ChartBarSeries.
* ChartBarSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartBarSeries
*/
constructor(opts: any = {}) {
super(opts);
this.categorField = !Object.is(opts.categorField, '') ? opts.categorField : '';
this.categorCodeList = opts.categorCodeList ? opts.categorCodeList : null;
this.valueField = !Object.is(opts.valueField, '') ? opts.valueField : '';
this.dimensions = opts.dimensions ? opts.dimensions :'';
this.encode = opts.encode ? opts.encode : null;
this.seriesTemp = opts.seriesTemp ? opts.seriesTemp:null;
}
/**
* 设置分类属性
*
* @param {string} state
* @memberof ChartBarSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartBarSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartBarSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 维度定义
*
* @param {*} state
* @memberof ChartBarSeries
*/
public setDimensions(state: any): void {
this.dimensions = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartBarSeries
*/
public setEncode(state: any): void {
this.encode = state;
}
/**
* 设置序列模板
*
* @param {*} state
* @memberof ChartBarSeries
*/
public setSeriesTemp(state: any): void {
this.seriesTemp = state;
}
}
\ No newline at end of file
/**
* 图表数据集属性模型
*
* @export
* @class ChartDataSetField
*/
export class ChartDataSetField {
/**
* 图表属性名称
*
* @type {string}
* @memberof ChartDataSetField
*/
public name: string = '';
/**
* 图表属性代码表
*
* @type {*}
* @memberof ChartDataSetField
*/
public codelist: any = null;
/**
* 是否分组属性
*
* @type {boolean}
* @memberof ChartDataSetField
*/
public isGroupField: boolean = false;
/**
* 分组模式
*
* @type {string}
* @memberof ChartDataSetField
*/
public groupMode:string ="";
/**
* Creates an instance of ChartDataSetField.
* ChartDataSetField 实例
*
* @param {*} [opts={}]
* @memberof ChartDataSetField
*/
constructor(opts: any = {}) {
this.name = !Object.is(opts.name, '') ? opts.name : '';
this.codelist = opts.codelist?opts.codelist:null;
this.isGroupField = opts.isGroupField?opts.isGroupField:false;
this.groupMode = !Object.is(opts.groupMode, '') ? opts.groupMode : '';
}
/**
* 设置图表属性名称
*
* @param {string} state
* @memberof ChartDataSetField
*/
public setName(state: string): void {
this.name = state;
}
/**
* 设置图表属性代码表
*
* @param {*} state
* @memberof ChartDataSetField
*/
public setCodeList(state: any): void {
this.codelist = state;
}
/**
* 设置分组属性
*
* @param {boolean} state
* @memberof ChartDataSetField
*/
public setisGroupField(state: boolean): void {
this.isGroupField = state;
}
/**
* 设置属性分组模式
*
* @param {string} state
* @memberof ChartDataSetField
*/
public setGroupMode(state: string): void {
this.groupMode = state;
}
}
\ No newline at end of file
import { ChartSeries } from './chart-series';
/**
* 漏斗图序列模型
*
* @export
* @class ChartFunnelSeries
*/
export class ChartFunnelSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public valueField: string = '';
/**
* 分类代码表
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public categorCodeList: any = null;
/**
* 维度定义
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public dimensions:Array<string> = [];
/**
* 维度编码
*
* @type {*}
* @memberof ChartFunnelSeries
*/
public encode:any = null;
/**
* Creates an instance of ChartFunnelSeries.
* ChartFunnelSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartFunnelSeries
*/
constructor(opts: any = {}) {
super(opts);
this.categorField = !Object.is(opts.categorField, '') ? opts.categorField : '';
this.categorCodeList = opts.categorCodeList ? opts.categorCodeList : null;
this.valueField = !Object.is(opts.valueField, '') ? opts.valueField : '';
this.dimensions = opts.dimensions ? opts.dimensions :'';
this.encode = opts.encode ? opts.encode : null;
}
/**
* 设置分类属性
*
* @param {string} state
* @memberof ChartFunnelSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartFunnelSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartFunnelSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 维度定义
*
* @param {*} state
* @memberof ChartFunnelSeries
*/
public setDimensions(state: any): void {
this.dimensions = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartFunnelSeries
*/
public setEncode(state: any): void {
this.encode = state;
}
}
\ No newline at end of file
import { ChartSeries } from './chart-series';
/**
* 折线图序列模型
*
* @export
* @class ChartLineSeries
*/
export class ChartLineSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartLineSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartLineSeries
*/
public valueField: string = '';
/**
* 分类代码表
*
* @type {string}
* @memberof ChartLineSeries
*/
public categorCodeList: any = null;
/**
* 维度定义
*
* @type {string}
* @memberof ChartLineSeries
*/
public dimensions:Array<string> = [];
/**
* 维度编码
*
* @type {*}
* @memberof ChartLineSeries
*/
public encode:any = null;
/**
* 序列模板
*
* @type {*}
* @memberof ChartLineSeries
*/
public seriesTemp:any = null;
/**
* Creates an instance of ChartLineSeries.
* ChartLineSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartLineSeries
*/
constructor(opts: any = {}) {
super(opts);
this.categorField = !Object.is(opts.categorField, '') ? opts.categorField : '';
this.categorCodeList = opts.categorCodeList ? opts.categorCodeList : null;
this.valueField = !Object.is(opts.valueField, '') ? opts.valueField : '';
this.dimensions = opts.dimensions ? opts.dimensions :'';
this.encode = opts.encode ? opts.encode : null;
this.seriesTemp = opts.seriesTemp ? opts.seriesTemp:null;
}
/**
* 设置分类属性
*
* @param {string} state
* @memberof ChartLineSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartLineSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 维度定义
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setDimensions(state: any): void {
this.dimensions = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setEncode(state: any): void {
this.encode = state;
}
/**
* 设置序列模板
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setSeriesTemp(state: any): void {
this.seriesTemp = state;
}
}
\ No newline at end of file
import { ChartSeries } from './chart-series';
/**
* 饼图序列模型
*
* @export
* @class ChartPieSeries
*/
export class ChartPieSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartPieSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartPieSeries
*/
public valueField: string = '';
/**
* 分类代码表
*
* @type {string}
* @memberof ChartPieSeries
*/
public categorCodeList: any = null;
/**
* 维度定义
*
* @type {string}
* @memberof ChartPieSeries
*/
public dimensions:Array<string> = [];
/**
* 维度编码
*
* @type {*}
* @memberof ChartPieSeries
*/
public encode:any = null;
/**
* Creates an instance of ChartPieSeries.
* ChartPieSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartPieSeries
*/
constructor(opts: any = {}) {
super(opts);
this.categorField = !Object.is(opts.categorField, '') ? opts.categorField : '';
this.categorCodeList = opts.categorCodeList ? opts.categorCodeList : null;
this.valueField = !Object.is(opts.valueField, '') ? opts.valueField : '';
this.dimensions = opts.dimensions ? opts.dimensions :'';
this.encode = opts.encode ? opts.encode : null;
}
/**
* 设置分类属性
*
* @param {string} state
* @memberof ChartPieSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartPieSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartPieSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 维度定义
*
* @param {*} state
* @memberof ChartPieSeries
*/
public setDimensions(state: any): void {
this.dimensions = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartPieSeries
*/
public setEncode(state: any): void {
this.encode = state;
}
}
\ No newline at end of file
import { ChartDataSetField } from './chart-dataset-field';
/**
* 图表序列模型
*
* @export
* @class ChartSeries
*/
export class ChartSeries {
/**
* 序列类型
*
* @type {string}
* @memberof ChartSeries
*/
public type: string = '';
/**
* 图表对象
*
* @type {*}
* @memberof ChartSeries
*/
public chart: any = null;
/**
* 序列名称
*
* @type {string}
* @memberof ChartSeries
*/
public name: string = '';
/**
* 序列标题
*
* @type {string}
* @memberof ChartSeries
*/
public caption: string = '';
/**
* 序列标识属性
*
* @type {string}
* @memberof ChartSeries
*/
public seriesIdField: string = '';
/**
* 序列名称属性
*
* @type {string}
* @memberof ChartSeries
*/
public seriesNameField: string = '';
/**
* 序列标识名称键值对
*
* @type {any}
* @memberof ChartSeries
*/
public seriesMap:any = null;
/**
* 对象索引
*
* @type {number}
* @memberof ChartSeries
*/
public index: number = 0;
/**
* 序列映射数据
*
* @type {*}
* @memberof ChartSeries
*/
public dataSet: any = [];
/**
* 预置配置
*
* @type {number}
* @memberof ChartSeries
*/
public ecxObject:any;
/**
* 用户自定义配置
*
* @type {number}
* @memberof ChartSeries
*/
public ecObject:any;
/**
* 序列索引
*
* @type {number}
* @memberof ChartSeries
*/
public seriesIndex:number = 0;
/**
* 数据集属性集合
*
* @type {Array<ChartDataSetField>}
* @memberof ChartSeries
*/
public dataSetFields:Array<ChartDataSetField> = [];
/**
* 取值方式
* 'column':默认,dataset 的列对应于系列,从而 dataset 中每一列是一个维度(dimension)
* 'row':dataset 的行对应于系列,从而 dataset 中每一行是一个维度(dimension
*
* @type {string}
* @memberof ChartSeries
*/
public seriesLayoutBy:string = "column";
/**
* Creates an instance of ChartSeries.
* ChartSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartSeries
*/
constructor(opts: any = {}) {
this.type = !Object.is(opts.type, '') ? opts.type : '';
this.name = !Object.is(opts.name, '') ? opts.name : '';
this.caption = !Object.is(opts.caption, '') ? opts.caption : '';
this.seriesIdField = (opts.seriesIdField && !Object.is(opts.seriesIdField, '')) ? opts.seriesIdField : (opts.seriesNameField && !Object.is(opts.seriesNameField, '')) ? opts.seriesNameField : '';
this.seriesNameField = !Object.is(opts.seriesNameField, '') ? opts.seriesNameField : '';
this.index = this.index ? this.index : 0;
this.chart = opts.chart ? opts.chart : null;
this.dataSet = opts.dataSet ? opts.dataSet : [];
this.ecxObject = opts.ecxObject ? opts.ecxObject : null;
this.ecObject = opts.ecObject ? opts.ecObject : null;
this.seriesLayoutBy = opts.seriesLayoutBy ? opts.seriesLayoutBy:"column";
this.dataSetFields = opts.dataSetFields ? opts.dataSetFields:[];
this.seriesMap = opts.seriesMap ? opts.seriesMap:null;
this.seriesIndex = opts.seriesIndex? opts.seriesIndex:0;
}
/**
* 设置序列类型
*
* @param {string} state
* @memberof ChartSeries
*/
public setType(state: string): void {
this.type = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartSeries
*/
public setCaption(state: string): void {
this.caption = state;
}
/**
* 设置序列标题
*
* @param {string} state
* @memberof ChartSeries
*/
public setName(state: string): void {
this.name = state;
}
/**
* 设置数据集
*
* @param {*} state
* @memberof ChartSeries
*/
public setDataSet(state: any): void {
this.dataSet = state;
}
/**
* 设置序列标识名称键值对
*
* @param {*} state
* @memberof ChartSeries
*/
public setSeriesMap(state: any): void {
this.seriesMap = state;
}
/**
* 设置序列映射的图表
*
* @param {*} state
* @memberof ChartSeries
*/
public setChart(state: any): void {
this.chart = state;
}
/**
* 设置序列标识属性
*
* @param {*} state
* @memberof ChartSeries
*/
public setSeriesIdField(state: any): void {
this.seriesIdField = state;
}
/**
* 设置序列名称属性
*
* @param {*} state
* @memberof ChartSeries
*/
public setSeriesNameField(state: any): void {
this.seriesNameField = state;
}
/**
* 设置对象索引
*
* @param {number} state
* @memberof ChartSeries
*/
public setIndex(state: number): void {
this.index = state;
}
/**
* 设置预置配置
*
* @param {*} state
* @memberof ChartSeries
*/
public setECXObject(state: any): void {
this.ecxObject = state;
}
/**
* 设置用户自定义参数
*
* @param {*} state
* @memberof ChartSeries
*/
public setECObject(state: any): void {
this.ecObject = state;
}
/**
* 设置取值方式
*
* @param {string} state
* @memberof ChartSeries
*/
public setSeriesLayoutBy(state: string): void {
this.seriesLayoutBy = state;
}
/**
* 设置数据集属性集合
*
* @param {Array<ChartDataSetField>} state
* @memberof ChartSeries
*/
public setDataSetFields(state: Array<ChartDataSetField>): void {
this.dataSetFields = state;
}
/**
* 设置序列索引
*
* @param {number} state
* @memberof ChartSeries
*/
public setSeriesIndex(state: number): void {
this.seriesIndex = state;
}
}
\ No newline at end of file
export { ChartDataSetField } from './chart-dataset-field';
export { ChartLineSeries } from './chart-line-series';
export { ChartFunnelSeries } from './chart-funnel-series';
export { ChartPieSeries } from './chart-pie-series';
export { ChartBarSeries } from './chart-bar-series';
\ No newline at end of file
...@@ -21,6 +21,8 @@ export class AppDrawer { ...@@ -21,6 +21,8 @@ export class AppDrawer {
*/ */
private static readonly $drawer = new AppDrawer(); private static readonly $drawer = new AppDrawer();
private $refs :any= {equipmentForm: HTMLFormElement,upload: HTMLFormElement}
/** /**
* 构造方法 * 构造方法
* *
...@@ -63,7 +65,7 @@ export class AppDrawer { ...@@ -63,7 +65,7 @@ export class AppDrawer {
* @returns {Subject<any>} * @returns {Subject<any>}
* @memberof AppDrawer * @memberof AppDrawer
*/ */
private createVueExample(view: { viewname: string, title: string, width?: number, height?: number, placement?: any }, context: any = {}, viewparams: any = {}, uuid: string): Subject<any> { private createVueExample(view: { viewname: string, title: string, width?: number, height?: number, placement?: any }, context: any = {}, viewparams: any = {}, uuid: string): Promise<any>{
try { try {
let props = { view: view, context: context, viewparams: viewparams, uuid: uuid }; let props = { view: view, context: context, viewparams: viewparams, uuid: uuid };
let component = AppDrawerCompponent; let component = AppDrawerCompponent;
...@@ -75,12 +77,30 @@ export class AppDrawer { ...@@ -75,12 +77,30 @@ export class AppDrawer {
} }
}).$mount(); }).$mount();
this.vueExample = vm; this.vueExample = vm;
document.body.appendChild(vm.$el); let app = document.getElementById("app");
if(app){
app.appendChild(vm.$el);
}
const comp: any = vm.$children[0]; const comp: any = vm.$children[0];
return comp.getSubject(); let subject = comp.getSubject()
return new Promise((reaolve, reject) => {
subject.subscribe((result: any) => {
if (vm && app) {
app.removeChild(vm.$el);
}
}, () => {
if (vm && app) {
app.removeChild(vm.$el);
}
}, () => {
if (vm && app) {
app.removeChild(vm.$el);
}
});
});
} catch (error) { } catch (error) {
console.error(error); console.error(error);
return new Subject<any>(); return new Promise(()=>{});
} }
} }
...@@ -93,18 +113,19 @@ export class AppDrawer { ...@@ -93,18 +113,19 @@ export class AppDrawer {
* @returns {Subject<any>} * @returns {Subject<any>}
* @memberof AppDrawer * @memberof AppDrawer
*/ */
public openDrawer(view: { viewname: string, title: string, width?: number, height?: number, placement?: 'DRAWER_LEFT' | 'DRAWER_RIGHT' }, context: any = {}, viewparams: any = {}): Subject<any> { public openDrawer(view: { viewname: string, title: string, width?: number, height?: number, placement?: 'DRAWER_LEFT' | 'DRAWER_RIGHT' }, context: any = {}, viewparams: any = {}): Promise<any> {
try { try {
let _context: any = {}; let _context: any = {};
Object.assign(_context, context); Object.assign(_context, context);
const uuid = this.getUUID(); const uuid = this.getUUID();
const subject = this.createVueExample(view, _context, viewparams, uuid); const promise = this.createVueExample(view, _context, viewparams, uuid);
return subject; return promise;
} catch (error) { } catch (error) {
console.log(error); console.log(error);
return new Subject<any>(); return new Promise(()=>{});
} }
} }
/** /**
* 生成uuid * 生成uuid
......
<template> <template>
<drawer <div >
:placement="placement" <div :id="uuid"></div>
:closable="false" <ibiz-drawer
v-model="isShow" :content-id="uuid"
:width="width" :ref="this.uuid+'drawer'"
@dropClick="close"
:close-view="closeView"
@on-visible-change="onVisibleChange($event)"> @on-visible-change="onVisibleChange($event)">
<component <component
:is="viewname" :is="viewname"
...@@ -16,8 +18,11 @@ ...@@ -16,8 +18,11 @@
@close="close($event)" @close="close($event)"
:ref="viewname"> :ref="viewname">
</component> </component>
</drawer> </ibiz-drawer>
</div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Vue, Component, Prop, Provide, Emit, Watch } from "vue-property-decorator"; import { Vue, Component, Prop, Provide, Emit, Watch } from "vue-property-decorator";
import { Subject } from "rxjs"; import { Subject } from "rxjs";
...@@ -34,6 +39,15 @@ export default class AppDrawerCompponent extends Vue { ...@@ -34,6 +39,15 @@ export default class AppDrawerCompponent extends Vue {
*/ */
@Prop() public view!: any; @Prop() public view!: any;
/**
* 是否关闭view
*
* @type {any}
* @memberof AppDrawerCompponent
*/
public closeView = false;
/** /**
* 视图上下文 * 视图上下文
* *
...@@ -42,6 +56,14 @@ export default class AppDrawerCompponent extends Vue { ...@@ -42,6 +56,14 @@ export default class AppDrawerCompponent extends Vue {
*/ */
@Prop({ default: {} }) public context?: any; @Prop({ default: {} }) public context?: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppDrawerCompponent
*/
@Prop() public uuid?: any;
/** /**
* 视图参数 * 视图参数
* *
...@@ -56,7 +78,8 @@ export default class AppDrawerCompponent extends Vue { ...@@ -56,7 +78,8 @@ export default class AppDrawerCompponent extends Vue {
* @type {(null | Subject<any>)} * @type {(null | Subject<any>)}
* @memberof AppDrawerCompponent * @memberof AppDrawerCompponent
*/ */
public subject: null | Subject<any> = new Subject<any>(); public subject: Subject<any> = new Subject<any>();
/** /**
* 抽屉弹出位置 * 抽屉弹出位置
...@@ -157,6 +180,10 @@ export default class AppDrawerCompponent extends Vue { ...@@ -157,6 +180,10 @@ export default class AppDrawerCompponent extends Vue {
public mounted() { public mounted() {
this.isShow = true; this.isShow = true;
this.handleZIndex('ivu-drawer-mask', 'ivu-drawer-wrap'); this.handleZIndex('ivu-drawer-mask', 'ivu-drawer-wrap');
let drawer :any = this.$refs[this.uuid+'drawer'];
if(drawer){
drawer.open()
}
} }
/** /**
...@@ -177,16 +204,16 @@ export default class AppDrawerCompponent extends Vue { ...@@ -177,16 +204,16 @@ export default class AppDrawerCompponent extends Vue {
* @memberof AppDrawerCompponent * @memberof AppDrawerCompponent
*/ */
public handleZIndex(mask: string, wrap: string) { public handleZIndex(mask: string, wrap: string) {
const zIndex = this.$store.getters.getZIndex(); // const zIndex = this.$store.getters.getZIndex();
if (zIndex) { // if (zIndex) {
this.zIndex = zIndex + 100; // this.zIndex = zIndex + 100;
this.$store.commit('updateZIndex', this.zIndex); // this.$store.commit('updateZIndex', this.zIndex);
} // }
const element: Element = this.$el; // const element: Element = this.$el;
const maskTag: any = element.getElementsByClassName(mask)[0]; // const maskTag: any = element.getElementsByClassName(mask)[0];
const warpTag: any = element.getElementsByClassName(wrap)[0]; // const warpTag: any = element.getElementsByClassName(wrap)[0];
maskTag.style.zIndex = this.zIndex; // maskTag.style.zIndex = this.zIndex;
warpTag.style.zIndex = this.zIndex; // warpTag.style.zIndex = this.zIndex;
} }
/** /**
...@@ -199,6 +226,8 @@ export default class AppDrawerCompponent extends Vue { ...@@ -199,6 +226,8 @@ export default class AppDrawerCompponent extends Vue {
Object.assign(this.tempResult, { ret: 'OK' }, { datas: JSON.parse(JSON.stringify(result)) }); Object.assign(this.tempResult, { ret: 'OK' }, { datas: JSON.parse(JSON.stringify(result)) });
} }
this.isShow = false; this.isShow = false;
this.onVisibleChange(true);
} }
/** /**
...@@ -229,7 +258,7 @@ export default class AppDrawerCompponent extends Vue { ...@@ -229,7 +258,7 @@ export default class AppDrawerCompponent extends Vue {
* *
* @memberof AppDrawerCompponent * @memberof AppDrawerCompponent
*/ */
public onVisibleChange($event: any) { public async onVisibleChange($event: any) {
const component: any = this.$refs[this.viewname]; const component: any = this.$refs[this.viewname];
if (component) { if (component) {
const { viewtag: _viewtag } = component; const { viewtag: _viewtag } = component;
...@@ -238,19 +267,21 @@ export default class AppDrawerCompponent extends Vue { ...@@ -238,19 +267,21 @@ export default class AppDrawerCompponent extends Vue {
this.isShow = true; this.isShow = true;
const title: any = this.$t('app.tabpage.sureclosetip.title'); const title: any = this.$t('app.tabpage.sureclosetip.title');
const contant: any = this.$t('app.tabpage.sureclosetip.content'); const contant: any = this.$t('app.tabpage.sureclosetip.content');
// this.$Modal.confirm({ const result = await this.$notice.confirm(title, contant);
// title: title, if (result) {
// content: contant, this.$store.commit('viewaction/setViewDataChange', { viewtag: _viewtag, viewdatachange: false });
// onOk: () => { this.isShow = false;
// this.$store.commit('viewaction/setViewDataChange', { viewtag: _viewtag, viewdatachange: false }); this.handleShowState($event);
// this.isShow = false; this.closeView = true;
// }, } else {
// onCancel: () => { this.closeView = false;
// this.isShow = true; this.isShow = true;
// } let drawer :any = this.$refs[this.uuid+'drawer'];
// });
} else { }
}else{
this.handleShowState($event); this.handleShowState($event);
this.closeView = true;
} }
} }
} }
...@@ -261,19 +292,18 @@ export default class AppDrawerCompponent extends Vue { ...@@ -261,19 +292,18 @@ export default class AppDrawerCompponent extends Vue {
* @memberof AppDrawerCompponent * @memberof AppDrawerCompponent
*/ */
public handleShowState($event: any) { public handleShowState($event: any) {
if ($event) { if (!$event) {
return; return;
} }
if (this.subject) { if (this.subject && this.subject!=null) {
if (this.tempResult && Object.is(this.tempResult.ret, 'OK')) { if (this.tempResult && Object.is(this.tempResult.ret, 'OK')) {
this.subject.next(this.tempResult);
} }
} setTimeout(() => {
setTimeout(() => { this.subject.next(this.tempResult);
document.body.removeChild(this.$el);
this.$destroy();
this.subject = null;
}, 500) }, 500)
}
} }
} }
</script> </script>
......
...@@ -117,6 +117,16 @@ export declare interface Util { ...@@ -117,6 +117,16 @@ export declare interface Util {
* @memberof Util * @memberof Util
*/ */
srfFilePath2(name: string): string; srfFilePath2(name: string): string;
/**
* 深度合并对象
*
* @param FirstOBJ 目标对象
* @param SecondOBJ 原对象
* @returns {Object}
* @memberof Util
*/
deepObjectMerge(FirstOBJ:any, SecondOBJ:any) :any;
} }
declare module "vue/types/vue" { declare module "vue/types/vue" {
......
...@@ -135,14 +135,7 @@ export class ViewOpenService { ...@@ -135,14 +135,7 @@ export class ViewOpenService {
* @memberof ViewOpenService * @memberof ViewOpenService
*/ */
public async openDrawer(view: any, context: any, param: any): Promise<any> { public async openDrawer(view: any, context: any, param: any): Promise<any> {
return new Promise((resolve, reject) => { return await AppDrawer.getInstance().openDrawer(view, context, param);
AppDrawer.getInstance().openDrawer(view, context, param).subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
resolve(result.datas);
});
});
} }
/** /**
......
...@@ -770,15 +770,15 @@ ...@@ -770,15 +770,15 @@
lodash "^4.17.13" lodash "^4.17.13"
to-fast-properties "^2.0.0" to-fast-properties "^2.0.0"
"@capacitor/android@2.0.1": "@capacitor/android@2.1.0":
version "2.0.1" version "2.1.0"
resolved "https://registry.yarnpkg.com/@capacitor/android/-/android-2.0.1.tgz#551c87703b8f798120769e7a6a04d3a0ee5bce5e" resolved "https://registry.yarnpkg.com/@capacitor/android/-/android-2.1.0.tgz#09dd063bb90424fb7fda9a86113584ace6072c88"
integrity sha512-UKjeY34BlLGvRzDdPLk3/u0j9Ufmyy1gtHGKP6uZ3Qh0ciHFFKnL7PVw5Tf+H19HHPfZIal4rGTndvAWQsCMeA== integrity sha512-20t6Ep4cVp6X/7tz3BzvNyqv6WEMfZr4VLA3nQC7WxTLfrYSWWaP8vaKvTFn8u56qCSoCUwYmYlpkib38ptwJg==
"@capacitor/cli@^2.0.1": "@capacitor/cli@^2.1.0":
version "2.0.1" version "2.1.0"
resolved "https://registry.yarnpkg.com/@capacitor/cli/-/cli-2.0.1.tgz#db820e192f94d3bb70a238e98591a6d9f73dfb90" resolved "https://registry.yarnpkg.com/@capacitor/cli/-/cli-2.1.0.tgz#de77a4303e2af76fe5438b8851e3c67b7170f979"
integrity sha512-G6+Wk8Q7V8+rDcIj1Nk3iMnCGgMbl3gSFyL8aMsuvSJ4XSXLex43TJLWSNECuRv4OwyEPqUFH0g5eqEolaTSwQ== integrity sha512-j7TPvnQ++xFlZ5hhvdntwK79/Xx+Bns6Y11b5Cco8ydVO4HokQresBRqpU2LaHzABZtWmtrSsFJMF3OqZotguQ==
dependencies: dependencies:
chalk "^2.3.0" chalk "^2.3.0"
commander "^2.12.2" commander "^2.12.2"
...@@ -792,17 +792,17 @@ ...@@ -792,17 +792,17 @@
which "^1.3.0" which "^1.3.0"
xml2js "^0.4.19" xml2js "^0.4.19"
"@capacitor/core@^2.0.1": "@capacitor/core@^2.1.0":
version "2.0.1" version "2.1.0"
resolved "https://registry.yarnpkg.com/@capacitor/core/-/core-2.0.1.tgz#d5ad065924602646128102078d55c3d9d633be40" resolved "https://registry.yarnpkg.com/@capacitor/core/-/core-2.1.0.tgz#11178b082c9f00bcff7c7f13f5cb68d07a85aad6"
integrity sha512-6GoklVQdHZ6jBAkVgPySaTBw+/zz4P+U1yFZkNTVdYAEGze4Zv5cGlUF6OpvlZRiCk3p7ZWt4kC8baIh/Zxu3A== integrity sha512-KIDj067PGaNSIODqzDp99vPs7CVpx+SRVrfgcQ9MNvpTUFsnDx/taRixbucizj8lLH2mhK12dH/4TjU7eqXQ4A==
dependencies: dependencies:
tslib "^1.9.0" tslib "^1.9.0"
"@capacitor/ios@2.0.1": "@capacitor/ios@2.1.0":
version "2.0.1" version "2.1.0"
resolved "https://registry.yarnpkg.com/@capacitor/ios/-/ios-2.0.1.tgz#1f1cd3736dcf00373e3303d89a0164f2f168d24e" resolved "https://registry.yarnpkg.com/@capacitor/ios/-/ios-2.1.0.tgz#490a9a58896f911f80727fa2e9e86b31e84d9d9e"
integrity sha512-KzrWZAfLYe+eyJjvj1IjueIr0goigEREi4GkidKkGQdlP2EM4gHvzpkspD2L+HUP5c6dkReU5qkTzL2857TZ4w== integrity sha512-KE5hGQiv86Ply/WvT5OvrRBcbM+XdqbGkfp03hK8TG8tYNvJw4mXT3+bH5QsOVOI23o4LVzRWtwPmDyxCw+Pyw==
"@hapi/address@2.x.x": "@hapi/address@2.x.x":
version "2.1.4" version "2.1.4"
...@@ -845,18 +845,10 @@ ...@@ -845,18 +845,10 @@
cssnano-preset-default "^4.0.0" cssnano-preset-default "^4.0.0"
postcss "^7.0.0" postcss "^7.0.0"
"@ionic/core@^5.0.5": "@ionic/core@^5.1.1":
version "5.0.5" version "5.1.1"
resolved "https://registry.yarnpkg.com/@ionic/core/-/core-5.0.5.tgz#d099b3ccddedb818354a233419671d2ace749a07" resolved "https://registry.yarnpkg.com/@ionic/core/-/core-5.1.1.tgz#8e89e2fb93050a1a77431283e487bf78bf890805"
integrity sha512-k0O5V/3sFB55E+hKSqio1iDfwibZdlI97PuaI4PcGQDytzUCyGTlGAZn6iLi82NZqBRWWLOpwy+8N/cySiTWKg== integrity sha512-mmQL7hzwwReqFCJlRyxo3sNoI7r63GYnZD6QBXbYmCp83POvL89fQYegUfURM1Fcw0JiAZ3BsCoMYxuFXa7+cA==
dependencies:
ionicons "^5.0.1"
tslib "^1.10.0"
"@ionic/core@^5.0.7":
version "5.0.7"
resolved "https://registry.yarnpkg.com/@ionic/core/-/core-5.0.7.tgz#fbb8877991204a721ebfdd56600e6e3931efda7e"
integrity sha512-94Ebr4Uw/2aOqweGr4Xmo5csjTQwLcDuHraMC+VuQWNoCztuJI9cX/yhsAS2Yftor+vXC/uGZkubK+P+RFh1jQ==
dependencies: dependencies:
ionicons "^5.0.1" ionicons "^5.0.1"
tslib "^1.10.0" tslib "^1.10.0"
...@@ -2516,7 +2508,7 @@ core-js@^2.4.0: ...@@ -2516,7 +2508,7 @@ core-js@^2.4.0:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c"
integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==
core-js@^3.4.4, core-js@^3.6.4: core-js@^3.6.4:
version "3.6.4" version "3.6.4"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647"
integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw== integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==
...@@ -4118,14 +4110,14 @@ human-signals@^1.1.1: ...@@ -4118,14 +4110,14 @@ human-signals@^1.1.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
ibiz-mobile-components@^0.0.1: ibiz-mobile-components@^0.0.4:
version "0.0.1" version "0.0.4"
resolved "https://registry.yarnpkg.com/ibiz-mobile-components/-/ibiz-mobile-components-0.0.1.tgz#8c10fe44fd4b11968d5cf4b708739b017e0ebf7a" resolved "https://registry.yarnpkg.com/ibiz-mobile-components/-/ibiz-mobile-components-0.0.4.tgz#a8eb0af2f2be1d33b7047de24a04fae321a28de7"
integrity sha512-8W92Vgs+C6had9RPPgJsSRRrpfnWyyfyNDYdedGkTwTLhGChZI9wQ+JvEu2enu34yGtYLruN4+ZMWXKzg6GHnw== integrity sha512-FOSIyfcvyrQO7LrA1jsw8ZZsIDg6w3OgiDxRNLiKHZgCRsNtCOqnH9InN/AnvZ1gTlqbfmX4f/+cJ02b/NAjLA==
dependencies: dependencies:
"@ionic/core" "^5.0.7" "@ionic/core" "^5.1.1"
ionicons "^5.0.1" ionicons "^5.0.1"
moment "^2.24.0" moment "^2.26.0"
iconv-lite@0.4.24, iconv-lite@^0.4.24: iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24" version "0.4.24"
...@@ -5257,6 +5249,11 @@ moment@^2.24.0: ...@@ -5257,6 +5249,11 @@ moment@^2.24.0:
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
moment@^2.26.0:
version "2.26.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.26.0.tgz#5e1f82c6bafca6e83e808b30c8705eed0dcbd39a"
integrity sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw==
move-concurrently@^1.0.1: move-concurrently@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
...@@ -5269,14 +5266,6 @@ move-concurrently@^1.0.1: ...@@ -5269,14 +5266,6 @@ move-concurrently@^1.0.1:
rimraf "^2.5.4" rimraf "^2.5.4"
run-queue "^1.0.3" run-queue "^1.0.3"
mpvue-calendar@^2.3.1:
version "2.3.4"
resolved "https://registry.yarnpkg.com/mpvue-calendar/-/mpvue-calendar-2.3.4.tgz#7014846e5e5d988adc82bdcd91cc789c2bbaaffa"
integrity sha512-2hLLGBpizqzXrR890O2bFby9SHc9pDqpgr6y0/q1Pejl1EHxgqtJLFXT4PHmH8S8hYwp2HX2Fp+2vuz+sufT+A==
dependencies:
core-js "^3.4.4"
vue "^2.6.10"
ms@2.0.0: ms@2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
...@@ -8020,7 +8009,7 @@ vue-template-es2015-compiler@^1.9.0: ...@@ -8020,7 +8009,7 @@ vue-template-es2015-compiler@^1.9.0:
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825" resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825"
integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw== integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==
vue@^2.6.10, vue@^2.6.11: vue@^2.6.11:
version "2.6.11" version "2.6.11"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5" resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5"
integrity sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ== integrity sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册