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

chitanda 部署微服务应用 [TrainSys,网页端]

上级 3f813f12
...@@ -20,4 +20,13 @@ export class CalendarExpViewEngine extends ExpViewEngine { ...@@ -20,4 +20,13 @@ export class CalendarExpViewEngine extends ExpViewEngine {
super.init(options); super.init(options);
} }
/**
* @description 视图销毁
* @memberof CalendarExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
} }
\ No newline at end of file
...@@ -53,4 +53,13 @@ export class CalendarViewEngine extends MDViewEngine { ...@@ -53,4 +53,13 @@ export class CalendarViewEngine extends MDViewEngine {
public getMDCtrl(): any { public getMDCtrl(): any {
return this.calendar; return this.calendar;
} }
/**
* @description 视图销毁
* @memberof CalendarViewEngine
*/
public destroyed() {
super.destroyed();
this.calendar = null;
}
} }
\ No newline at end of file
...@@ -20,4 +20,13 @@ export class ChartExpViewEngine extends ExpViewEngine { ...@@ -20,4 +20,13 @@ export class ChartExpViewEngine extends ExpViewEngine {
super.init(options); super.init(options);
} }
/**
* @description 视图销毁
* @memberof ChartExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
} }
\ No newline at end of file
...@@ -52,4 +52,13 @@ export class ChartViewEngine extends MDViewEngine { ...@@ -52,4 +52,13 @@ export class ChartViewEngine extends MDViewEngine {
public getMDCtrl(): any { public getMDCtrl(): any {
return this.chart; return this.chart;
} }
/**
* @description 视图销毁
* @memberof ChartViewEngine
*/
public destroyed() {
super.destroyed();
this.chart = null;
}
} }
\ No newline at end of file
...@@ -192,4 +192,13 @@ export class CommonViewEngine extends ViewEngine { ...@@ -192,4 +192,13 @@ export class CommonViewEngine extends ViewEngine {
return { triggerCtrlName: triggerCtrl?.ctrlName, triggerType: 'CtrlLoad', targetCtrlName: targetCtrl.ctrlName }; return { triggerCtrlName: triggerCtrl?.ctrlName, triggerType: 'CtrlLoad', targetCtrlName: targetCtrl.ctrlName };
} }
/**
* @description 视图销毁
* @memberof CommonViewEngine
*/
public destroyed() {
super.destroyed();
this.viewCtrlMap.clear();
}
} }
\ No newline at end of file
...@@ -105,4 +105,13 @@ export class DataPanelEngine extends ViewEngine { ...@@ -105,4 +105,13 @@ export class DataPanelEngine extends ViewEngine {
} }
} }
} }
/**
* @description 视图销毁
* @memberof DataPanelEngine
*/
public destroyed() {
super.destroyed();
this.dataPanel = null;
}
} }
...@@ -87,7 +87,7 @@ export class DataViewEngine extends MDViewEngine { ...@@ -87,7 +87,7 @@ export class DataViewEngine extends MDViewEngine {
// 询问框 // 询问框
this.view.$Modal.confirm({ this.view.$Modal.confirm({
title: this.view.$t('app.commonwords.warning'), title: this.view.$t('app.commonwords.warning'),
content: this.view.$t('app.grid.confirmdel') + dataInfo + ',' + this.view.$t('app.grid.notrecoverable'), content: this.view.$t('app.grid.confirmdel') + dataInfo + ',' + this.view.$t('app.grid.norecoverable'),
onOk: () => { onOk: () => {
this.removeData(null); this.removeData(null);
}, },
...@@ -130,4 +130,13 @@ export class DataViewEngine extends MDViewEngine { ...@@ -130,4 +130,13 @@ export class DataViewEngine extends MDViewEngine {
} }
} }
/**
* @description 视图销毁
* @memberof DataViewEngine
*/
public destroyed() {
super.destroyed();
this.dataView = null;
}
} }
\ No newline at end of file
...@@ -20,4 +20,13 @@ export class DataViewExpViewEngine extends ExpViewEngine { ...@@ -20,4 +20,13 @@ export class DataViewExpViewEngine extends ExpViewEngine {
super.init(options); super.init(options);
} }
/**
* @description 视图销毁
* @memberof DataViewExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
} }
\ No newline at end of file
...@@ -221,4 +221,14 @@ export class DeIndexViewEngine extends ViewEngine { ...@@ -221,4 +221,14 @@ export class DeIndexViewEngine extends ViewEngine {
return this.drBar; return this.drBar;
} }
/**
* @description 视图销毁
* @memberof DeIndexViewEngine
*/
public destroyed() {
super.destroyed();
this.form = null;
this.drBar = null;
}
} }
\ No newline at end of file
...@@ -246,4 +246,13 @@ export class EditViewEngine extends ViewEngine { ...@@ -246,4 +246,13 @@ export class EditViewEngine extends ViewEngine {
} }
return this.getForm().transformData(arg); return this.getForm().transformData(arg);
} }
/**
* @description 视图销毁
* @memberof EditViewEngine
*/
public destroyed() {
super.destroyed();
this.form = null;
}
} }
...@@ -128,4 +128,13 @@ export class EditView2Engine extends EditViewEngine { ...@@ -128,4 +128,13 @@ export class EditView2Engine extends EditViewEngine {
public getDRBar(): any { public getDRBar(): any {
return this.drBar; return this.drBar;
} }
/**
* @description 视图销毁
* @memberof EditView2Engine
*/
public destroyed() {
super.destroyed();
this.drBar = null;
}
} }
\ No newline at end of file
...@@ -128,4 +128,13 @@ export class EditView3Engine extends EditViewEngine { ...@@ -128,4 +128,13 @@ export class EditView3Engine extends EditViewEngine {
public getDrTab(): any { public getDrTab(): any {
return this.drTab; return this.drTab;
} }
/**
* @description 视图销毁
* @memberof EditView3Engine
*/
public destroyed() {
super.destroyed();
this.drTab = null;
}
} }
\ No newline at end of file
...@@ -128,4 +128,13 @@ export class EditView4Engine extends EditViewEngine { ...@@ -128,4 +128,13 @@ export class EditView4Engine extends EditViewEngine {
public getDrTab(): any { public getDrTab(): any {
return this.drTab; return this.drTab;
} }
/**
* @description 视图销毁
* @memberof EditView4Engine
*/
public destroyed() {
super.destroyed();
this.drTab = null;
}
} }
\ No newline at end of file
...@@ -152,4 +152,13 @@ export class ExpViewEngine extends ViewEngine { ...@@ -152,4 +152,13 @@ export class ExpViewEngine extends ViewEngine {
public getExpBar() { public getExpBar() {
return this.expBar; return this.expBar;
} }
/**
* @description 视图销毁
* @memberof ExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
} }
\ No newline at end of file
...@@ -62,4 +62,13 @@ export class FormPickupDataViewEngine extends MDViewEngine { ...@@ -62,4 +62,13 @@ export class FormPickupDataViewEngine extends MDViewEngine {
return this.dataview; return this.dataview;
} }
/**
* @description 视图销毁
* @memberof GridViewEngine
*/
public destroyed() {
super.destroyed();
this.dataview = null;
}
} }
\ No newline at end of file
...@@ -113,5 +113,12 @@ export class GanttViewEngine extends MDViewEngine { ...@@ -113,5 +113,12 @@ export class GanttViewEngine extends MDViewEngine {
return this.gantt; return this.gantt;
} }
/**
* @description 视图销毁
* @memberof GanttViewEngine
*/
public destroyed() {
super.destroyed();
this.gantt = null;
}
} }
\ No newline at end of file
...@@ -20,4 +20,13 @@ export class GridExpViewEngine extends ExpViewEngine { ...@@ -20,4 +20,13 @@ export class GridExpViewEngine extends ExpViewEngine {
super.init(options); super.init(options);
} }
/**
* @description 视图销毁
* @memberof GridExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
} }
\ No newline at end of file
...@@ -112,4 +112,13 @@ export class GridViewEngine extends MDViewEngine { ...@@ -112,4 +112,13 @@ export class GridViewEngine extends MDViewEngine {
viewContent.style.height = `calc(100% - ${viewHeader.offsetHeight}px)` viewContent.style.height = `calc(100% - ${viewHeader.offsetHeight}px)`
} }
} }
/**
* @description 视图销毁
* @memberof GridViewEngine
*/
public destroyed() {
super.destroyed();
this.grid = null;
}
} }
\ No newline at end of file
...@@ -89,4 +89,13 @@ export class GridView4Engine extends GridViewEngine { ...@@ -89,4 +89,13 @@ export class GridView4Engine extends GridViewEngine {
return this.drTab; return this.drTab;
} }
/**
* @description 视图销毁
* @memberof GridView4Engine
*/
public destroyed() {
super.destroyed();
this.drTab = null;
}
} }
\ No newline at end of file
...@@ -285,4 +285,14 @@ export class GridView8Engine extends GridViewEngine { ...@@ -285,4 +285,14 @@ export class GridView8Engine extends GridViewEngine {
this.removeData(items); this.removeData(items);
} }
} }
/**
* @description 视图销毁
* @memberof Grid8ViewEngine
*/
public destroyed() {
super.destroyed();
this.grid = null;
this.totalgrid = null;
}
} }
...@@ -66,4 +66,13 @@ export class IndexPickupDataViewEngine extends MDViewEngine { ...@@ -66,4 +66,13 @@ export class IndexPickupDataViewEngine extends MDViewEngine {
getMDCtrl() { getMDCtrl() {
return this.dataView; return this.dataView;
} }
/**
* @description 视图销毁
* @memberof IndexPickupDataViewEngine
*/
public destroyed() {
super.destroyed();
this.dataView = null;
}
} }
\ No newline at end of file
...@@ -55,4 +55,13 @@ export class KanBanViewEngine extends DataViewEngine { ...@@ -55,4 +55,13 @@ export class KanBanViewEngine extends DataViewEngine {
public getMDCtrl(): any { public getMDCtrl(): any {
return this.kanban; return this.kanban;
} }
/**
* @description 视图销毁
* @memberof DataViewEngine
*/
public destroyed() {
super.destroyed();
this.kanban = null;
}
} }
\ No newline at end of file
...@@ -20,4 +20,13 @@ export class ListExpViewEngine extends ExpViewEngine { ...@@ -20,4 +20,13 @@ export class ListExpViewEngine extends ExpViewEngine {
super.init(options); super.init(options);
} }
/**
* @description 视图销毁
* @memberof ListExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
} }
\ No newline at end of file
...@@ -93,7 +93,7 @@ export class ListViewEngine extends MDViewEngine { ...@@ -93,7 +93,7 @@ export class ListViewEngine extends MDViewEngine {
// 询问框 // 询问框
this.view.$Modal.confirm({ this.view.$Modal.confirm({
title: this.view.$t('app.commonwords.warning'), title: this.view.$t('app.commonwords.warning'),
content: this.view.$t('app.grid.confirmdel') + dataInfo + ',' + this.view.$t('app.grid.notrecoverable'), content: this.view.$t('app.grid.confirmdel') + dataInfo + ',' + this.view.$t('app.grid.norecoverable'),
onOk: () => { onOk: () => {
this.removeData(null); this.removeData(null);
}, },
...@@ -138,4 +138,13 @@ export class ListViewEngine extends MDViewEngine { ...@@ -138,4 +138,13 @@ export class ListViewEngine extends MDViewEngine {
} }
} }
/**
* @description 视图销毁
* @memberof ListViewEngine
*/
public destroyed() {
super.destroyed();
this.list = null;
}
} }
\ No newline at end of file
...@@ -20,4 +20,13 @@ export class MapExpViewEngine extends ExpViewEngine { ...@@ -20,4 +20,13 @@ export class MapExpViewEngine extends ExpViewEngine {
super.init(options); super.init(options);
} }
/**
* @description 视图销毁
* @memberof MapExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
} }
\ No newline at end of file
...@@ -70,4 +70,13 @@ export class MapViewEngine extends MDViewEngine { ...@@ -70,4 +70,13 @@ export class MapViewEngine extends MDViewEngine {
super.MDCtrlEvent(eventName, args); super.MDCtrlEvent(eventName, args);
} }
/**
* @description 视图销毁
* @memberof MapViewEngine
*/
public destroyed() {
super.destroyed();
this.map = null;
}
} }
\ No newline at end of file
...@@ -570,4 +570,16 @@ export class MDViewEngine extends ViewEngine { ...@@ -570,4 +570,16 @@ export class MDViewEngine extends ViewEngine {
public MDCtrlSave(arg: any = {}): void { public MDCtrlSave(arg: any = {}): void {
this.emitViewEvent("drdatasaved", arg); this.emitViewEvent("drdatasaved", arg);
} }
/**
* @description 视图销毁
* @memberof MDViewEngine
*/
public destroyed() {
super.destroyed();
this.propertypanel = null;
this.searchBar = null;
this.searchForm = null;
this.quickSearchForm = null;
}
} }
\ No newline at end of file
...@@ -63,4 +63,13 @@ export class MEditViewEngine extends MDViewEngine { ...@@ -63,4 +63,13 @@ export class MEditViewEngine extends MDViewEngine {
return this.mEditViewPanel; return this.mEditViewPanel;
} }
/**
* @description 视图销毁
* @memberof MEditViewEngine
*/
public destroyed() {
super.destroyed();
this.mEditViewPanel = null;
}
} }
\ No newline at end of file
...@@ -301,4 +301,13 @@ export class MPickupViewEngine extends ViewEngine { ...@@ -301,4 +301,13 @@ export class MPickupViewEngine extends ViewEngine {
public getPickupViewPanel(): any { public getPickupViewPanel(): any {
return this.pickupViewPanel; return this.pickupViewPanel;
} }
/**
* @description 视图销毁
* @memberof MPickupViewEngine
*/
public destroyed() {
super.destroyed();
this.pickupViewPanel = null;
}
} }
\ No newline at end of file
...@@ -359,4 +359,14 @@ export class MPickupView2Engine extends ViewEngine { ...@@ -359,4 +359,14 @@ export class MPickupView2Engine extends ViewEngine {
public getTreeExpBar(): any { public getTreeExpBar(): any {
return this.treeExpBar; return this.treeExpBar;
} }
/**
* @description 视图销毁
* @memberof MPickupView2Engine
*/
public destroyed() {
super.destroyed();
this.pickupViewPanel = null;
this.treeExpBar = null;
}
} }
\ No newline at end of file
...@@ -64,4 +64,13 @@ export class PanelViewEngine extends ViewEngine { ...@@ -64,4 +64,13 @@ export class PanelViewEngine extends ViewEngine {
public getPanel(): any { public getPanel(): any {
return this.panel; return this.panel;
} }
/**
* @description 视图销毁
* @memberof PanelViewEngine
*/
public destroyed() {
super.destroyed();
this.panel = null;
}
} }
\ No newline at end of file
...@@ -62,4 +62,13 @@ export class PickupDataViewEngine extends MDViewEngine { ...@@ -62,4 +62,13 @@ export class PickupDataViewEngine extends MDViewEngine {
return this.dataview; return this.dataview;
} }
/**
* @description 视图销毁
* @memberof GridViewEngine
*/
public destroyed() {
super.destroyed();
this.dataview = null;
}
} }
\ No newline at end of file
...@@ -98,4 +98,13 @@ export class PickupViewEngine extends ViewEngine { ...@@ -98,4 +98,13 @@ export class PickupViewEngine extends ViewEngine {
public getPickupViewPanel(): any { public getPickupViewPanel(): any {
return this.pickupViewPanel; return this.pickupViewPanel;
} }
/**
* @description 视图销毁
* @memberof PickupViewEngine
*/
public destroyed() {
super.destroyed();
this.pickupViewPanel = null;
}
} }
\ No newline at end of file
...@@ -154,4 +154,14 @@ export class PickupView2Engine extends ViewEngine { ...@@ -154,4 +154,14 @@ export class PickupView2Engine extends ViewEngine {
public getPickupViewPanel(): any { public getPickupViewPanel(): any {
return this.pickupViewPanel; return this.pickupViewPanel;
} }
/**
* @description 视图销毁
* @memberof PickupView2Engine
*/
public destroyed() {
super.destroyed();
this.pickupViewPanel = null;
this.treeExpBar = null;
}
} }
\ No newline at end of file
...@@ -206,4 +206,14 @@ export class PortalViewEngine extends ViewEngine { ...@@ -206,4 +206,14 @@ export class PortalViewEngine extends ViewEngine {
return this.searchform; return this.searchform;
} }
/**
* @description 视图销毁
* @memberof PortalViewEngine
*/
public destroyed() {
super.destroyed();
this.dashboard = null;
this.searchform = null;
}
} }
\ No newline at end of file
...@@ -53,4 +53,13 @@ export class ReportViewEngine extends MDViewEngine { ...@@ -53,4 +53,13 @@ export class ReportViewEngine extends MDViewEngine {
public getMDCtrl(): any { public getMDCtrl(): any {
return this.reportPanel; return this.reportPanel;
} }
/**
* @description 视图销毁
* @memberof GridViewEngine
*/
public destroyed() {
super.destroyed();
this.reportPanel = null;
}
} }
\ No newline at end of file
...@@ -132,4 +132,13 @@ export class SearchViewEngine extends ViewEngine { ...@@ -132,4 +132,13 @@ export class SearchViewEngine extends ViewEngine {
*/ */
public getDataCtrl(): any {} public getDataCtrl(): any {}
/**
* @description 视图销毁
* @memberof SearchViewEngine
*/
public destroyed() {
super.destroyed();
this.searchForm = null;
}
} }
\ No newline at end of file
...@@ -103,4 +103,13 @@ export class TabExpViewEngine extends ViewEngine { ...@@ -103,4 +103,13 @@ export class TabExpViewEngine extends ViewEngine {
this.calcToolbarItemState(state); this.calcToolbarItemState(state);
this.calcToolbarItemAuthState(data); this.calcToolbarItemAuthState(data);
} }
/**
* @description 视图销毁
* @memberof TabExpViewEngine
*/
public destroyed() {
super.destroyed();
this.tabExpPanel = null;
}
} }
\ No newline at end of file
...@@ -137,4 +137,13 @@ export class TabSearchViewEngine extends MDViewEngine { ...@@ -137,4 +137,13 @@ export class TabSearchViewEngine extends MDViewEngine {
return this.tabExpPanel; return this.tabExpPanel;
} }
/**
* @description 视图销毁
* @memberof TabSearchViewEngine
*/
public destroyed() {
super.destroyed();
this.tabExpPanel = null;
}
} }
\ No newline at end of file
...@@ -20,4 +20,13 @@ export class TreeExpViewEngine extends ExpViewEngine { ...@@ -20,4 +20,13 @@ export class TreeExpViewEngine extends ExpViewEngine {
super.init(options); super.init(options);
} }
/**
* @description 视图销毁
* @memberof TreeExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
} }
\ No newline at end of file
...@@ -88,4 +88,13 @@ export class TreeGridExViewEngine extends MDViewEngine { ...@@ -88,4 +88,13 @@ export class TreeGridExViewEngine extends MDViewEngine {
public gridRowAllowActive(mode: number): boolean { public gridRowAllowActive(mode: number): boolean {
return this.view.gridRowActiveMode === mode ? true : false; return this.view.gridRowActiveMode === mode ? true : false;
} }
/**
* @description 视图销毁
* @memberof TreeGridExViewEngine
*/
public destroyed() {
super.destroyed();
this.treegridex = null;
}
} }
\ No newline at end of file
...@@ -177,5 +177,12 @@ export class TreeViewEngine extends MDViewEngine { ...@@ -177,5 +177,12 @@ export class TreeViewEngine extends MDViewEngine {
return this.tree; return this.tree;
} }
/**
* @description 视图销毁
* @memberof TreeViewEngine
*/
public destroyed() {
super.destroyed();
this.tree = null;
}
} }
\ No newline at end of file
...@@ -241,4 +241,12 @@ export class ViewEngine { ...@@ -241,4 +241,12 @@ export class ViewEngine {
this.view.navDataService.setNavDataByTag(this.view.viewInstance.codeName, isSingleMode, arg); this.view.navDataService.setNavDataByTag(this.view.viewInstance.codeName, isSingleMode, arg);
} }
} }
/**
* @description 视图销毁
* @memberof ViewEngine
*/
public destroyed() {
this.view = null;
}
} }
\ No newline at end of file
...@@ -94,4 +94,13 @@ export class WizardViewEngine extends ViewEngine { ...@@ -94,4 +94,13 @@ export class WizardViewEngine extends ViewEngine {
public getWizardPanel(): any { public getWizardPanel(): any {
return this.wizardpanel; return this.wizardpanel;
} }
/**
* @description 视图销毁
* @memberof WizardViewEngine
*/
public destroyed() {
super.destroyed();
this.wizardpanel = null;
}
} }
\ No newline at end of file
...@@ -141,4 +141,12 @@ export class FormDetailModel { ...@@ -141,4 +141,12 @@ export class FormDetailModel {
public setShowCaption(state: boolean): void { public setShowCaption(state: boolean): void {
this.isShowCaption = state; this.isShowCaption = state;
} }
/**
* @description 部件销毁
* @memberof FormDetailModel
*/
public destroyed() {
this.form = null;
}
} }
\ No newline at end of file
...@@ -9,6 +9,15 @@ import { PluralizeRule } from './pluralizeRule'; ...@@ -9,6 +9,15 @@ import { PluralizeRule } from './pluralizeRule';
* @class Util * @class Util
*/ */
export class Util { export class Util {
/**
* @description PluralizeRule对象
* @private
* @type {PluralizeRule}
* @memberof Util
*/
public static pluralizeRule: PluralizeRule = new PluralizeRule();
/** /**
* 创建 UUID * 创建 UUID
* *
...@@ -55,15 +64,14 @@ export class Util { ...@@ -55,15 +64,14 @@ export class Util {
if (wordStr.length == 0) { if (wordStr.length == 0) {
return wordStr; return wordStr;
} }
const pluralizeRule = new PluralizeRule(); if (this.pluralizeRule.isUncountable(wordStr)) {
if (pluralizeRule.isUncountable(wordStr)) {
return wordStr; return wordStr;
} }
const newWordStr = pluralizeRule.irregularChange(wordStr); const newWordStr = this.pluralizeRule.irregularChange(wordStr);
if (newWordStr) { if (newWordStr) {
return newWordStr; return newWordStr;
} else { } else {
return pluralizeRule.ruleChange(wordStr);; return this.pluralizeRule.ruleChange(wordStr);
} }
} }
......
...@@ -211,14 +211,19 @@ export default class AppPresetRawitem extends Vue { ...@@ -211,14 +211,19 @@ export default class AppPresetRawitem extends Vue {
protected handleDynaImg() { protected handleDynaImg() {
this.contentType = 'IMAGE'; this.contentType = 'IMAGE';
if (this.value && typeof this.value == 'string') { if (this.value && typeof this.value == 'string') {
const _files = JSON.parse(this.value); // 默认识别文件对象形式,识别失败则为全路径模式
const file = _files instanceof Array ? _files[0] : null; try {
const url = file && file.id ? `${this.downloadUrl}/${file.id}` : ''; const _files = JSON.parse(this.value);
ImgurlBase64.getInstance() const file = _files instanceof Array ? _files[0] : null;
const url = file && file.id ? `${this.downloadUrl}/${file.id}` : '';
ImgurlBase64.getInstance()
.getImgURLOfBase64(url) .getImgURLOfBase64(url)
.then((res: any) => { .then((res: any) => {
this.dynaImgUrl = res; this.dynaImgUrl = res;
}); });
} catch (error) {
this.dynaImgUrl = this.value;
}
} }
} }
......
...@@ -77,7 +77,7 @@ export class AppBackEndAction extends AppDEUIAction { ...@@ -77,7 +77,7 @@ export class AppBackEndAction extends AppDEUIAction {
} }
} }
if (Object.is(actionTarget, 'MULTIDATA')) { if (Object.is(actionTarget, 'MULTIDATA')) {
actionContext.$throw(actionContext.$t('app.commonwords.nosupportmultile'), 'AppBackEndAction'); actionContext.$throw(actionContext.$t('app.commonwords.nosupportmultiple'), 'AppBackEndAction');
} else { } else {
let data: any = {}; let data: any = {};
let tempData: any = {}; let tempData: any = {};
......
...@@ -55,7 +55,7 @@ export class AppFrontAction extends AppDEUIAction { ...@@ -55,7 +55,7 @@ export class AppFrontAction extends AppDEUIAction {
} }
const actionTarget: string | null = this.actionModel.actionTarget; const actionTarget: string | null = this.actionModel.actionTarget;
if (Object.is(actionTarget, 'MULTIDATA')) { if (Object.is(actionTarget, 'MULTIDATA')) {
actionContext.$throw(actionContext.$t('app.commonwords.nosupportmultile'), 'AppFrontAction'); actionContext.$throw(actionContext.$t('app.commonwords.nosupportmultiple'), 'AppFrontAction');
} else { } else {
// 处理数据 // 处理数据
let data: any = {}; let data: any = {};
......
...@@ -104,7 +104,7 @@ export default class AppActionBar extends Vue { ...@@ -104,7 +104,7 @@ export default class AppActionBar extends Vue {
* *
* @memberof AppActionBar * @memberof AppActionBar
*/ */
public destory() { public destroyed() {
if (this.viewStateEvent) { if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe(); this.viewStateEvent.unsubscribe();
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<script lang="ts"> <script lang="ts">
import { Vue, Component, Prop, Watch, Model } from 'vue-property-decorator'; import { Vue, Component, Prop, Watch, Model } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import moment from 'moment'; import moment from 'moment';
@Component({}) @Component({})
...@@ -72,6 +72,15 @@ export default class AppAfterTime extends Vue { ...@@ -72,6 +72,15 @@ export default class AppAfterTime extends Vue {
*/ */
public diffTime:any=''; public diffTime:any='';
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ActionlinetestBase
*/
public viewStateEvent: Subscription | undefined;
/** /**
* 值变化 * 值变化
* *
...@@ -91,7 +100,7 @@ export default class AppAfterTime extends Vue { ...@@ -91,7 +100,7 @@ export default class AppAfterTime extends Vue {
*/ */
public created(){ public created(){
if(this.formState){ if(this.formState){
this.formState.subscribe(({type,data})=>{ this.viewStateEvent = this.formState.subscribe(({type,data})=>{
if(Object.is('load',type)){ if(Object.is('load',type)){
this.transTime(); this.transTime();
} }
...@@ -128,7 +137,19 @@ export default class AppAfterTime extends Vue { ...@@ -128,7 +137,19 @@ export default class AppAfterTime extends Vue {
} }
} }
} }
/**
* 组件销毁
*
* @memberof AppAfterTime
*/
public destroyed() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
} }
</script> </script>
<style> <style>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<script lang="ts"> <script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator'; import { Vue, Component, Prop } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { UIServiceHelp, Util, ViewTool } from 'ibiz-core'; import { UIServiceHelp, Util, ViewTool } from 'ibiz-core';
import { import {
IPSAppDataEntity, IPSAppDataEntity,
...@@ -100,6 +100,15 @@ export default class AppColumnLink extends Vue { ...@@ -100,6 +100,15 @@ export default class AppColumnLink extends Vue {
*/ */
@Prop() public modelService!: any; @Prop() public modelService!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ActionlinetestBase
*/
public viewStateEvent: Subscription | undefined;
/** /**
* 打开链接视图 * 打开链接视图
* *
...@@ -165,7 +174,7 @@ export default class AppColumnLink extends Vue { ...@@ -165,7 +174,7 @@ export default class AppColumnLink extends Vue {
*/ */
private openPopupModal(view: any, context: any, param: any): void { private openPopupModal(view: any, context: any, param: any): void {
let container: Subject<any> = this.$appmodal.openModal(view, context, param); let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => { this.viewStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -185,7 +194,7 @@ export default class AppColumnLink extends Vue { ...@@ -185,7 +194,7 @@ export default class AppColumnLink extends Vue {
const _conetxt = Util.deepCopy(context); const _conetxt = Util.deepCopy(context);
_conetxt.viewpath = view.viewpath; _conetxt.viewpath = view.viewpath;
let container: Subject<any> = this.$appdrawer.openDrawer(view, Util.getViewProps(_conetxt, param)); let container: Subject<any> = this.$appdrawer.openDrawer(view, Util.getViewProps(_conetxt, param));
container.subscribe((result: any) => { this.viewStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -204,7 +213,7 @@ export default class AppColumnLink extends Vue { ...@@ -204,7 +213,7 @@ export default class AppColumnLink extends Vue {
*/ */
private openPopOver($event: any, view: any, context: any, param: any): void { private openPopOver($event: any, view: any, context: any, param: any): void {
let container: Subject<any> = this.$apppopover.openPop($event, view, context, param); let container: Subject<any> = this.$apppopover.openPop($event, view, context, param);
container.subscribe((result: any) => { this.viewStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -379,6 +388,17 @@ export default class AppColumnLink extends Vue { ...@@ -379,6 +388,17 @@ export default class AppColumnLink extends Vue {
} }
return true; return true;
} }
/**
* @description: 组件销毁
*
* @return {*}
*/
public destroyed(){
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
} }
</script> </script>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
import { Vue, Component, Prop, Watch } from "vue-property-decorator"; import { Vue, Component, Prop, Watch } from "vue-property-decorator";
import { LogUtil } from 'ibiz-core'; import { LogUtil } from 'ibiz-core';
import axios from 'axios'; import axios from 'axios';
import { Subject } from "rxjs"; import { Subject, Subscription } from "rxjs";
@Component({}) @Component({})
export default class AppCommonMicrocom extends Vue { export default class AppCommonMicrocom extends Vue {
...@@ -182,6 +182,14 @@ export default class AppCommonMicrocom extends Vue { ...@@ -182,6 +182,14 @@ export default class AppCommonMicrocom extends Vue {
*/ */
public selectArray: any[] = []; public selectArray: any[] = [];
/**
* 状态事件
*
* @type {*}
* @memberof AppCommonMicrocom
*/
public contextStateEvent: Subscription | undefined;
/** /**
* 值变化 * 值变化
* *
...@@ -224,7 +232,7 @@ export default class AppCommonMicrocom extends Vue { ...@@ -224,7 +232,7 @@ export default class AppCommonMicrocom extends Vue {
*/ */
public created() { public created() {
if (this.contextState) { if (this.contextState) {
this.contextState.subscribe(({ type, data }: any) => { this.contextStateEvent = this.contextState.subscribe(({ type, data }: any) => {
if (type === 'load') { if (type === 'load') {
this.load(); this.load();
} }
...@@ -430,6 +438,18 @@ export default class AppCommonMicrocom extends Vue { ...@@ -430,6 +438,18 @@ export default class AppCommonMicrocom extends Vue {
} }
} }
} }
/**
* 组件销毁
*
* @type {*}
* @memberof AppCommonMicrocom
*/
public destroyed() {
if (this.contextStateEvent) {
this.contextStateEvent.unsubscribe();
}
}
} }
</script> </script>
......
...@@ -232,6 +232,14 @@ export default class AppDashboardDesign extends Vue { ...@@ -232,6 +232,14 @@ export default class AppDashboardDesign extends Vue {
*/ */
public filterVal: string = ''; public filterVal: string = '';
/**
* interact对象
*
* @type {string}
* @memberof AppDashboardDesign
*/
public interactObj: any;
/** /**
* 生命周期 * 生命周期
* *
...@@ -261,6 +269,9 @@ export default class AppDashboardDesign extends Vue { ...@@ -261,6 +269,9 @@ export default class AppDashboardDesign extends Vue {
* @memberof AppDashboardDesign * @memberof AppDashboardDesign
*/ */
protected afterDestroy() { protected afterDestroy() {
if (this.interactObj) {
this.interactObj.unset();
}
if (this.viewStateEvent) { if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe(); this.viewStateEvent.unsubscribe();
} }
...@@ -368,9 +379,9 @@ export default class AppDashboardDesign extends Vue { ...@@ -368,9 +379,9 @@ export default class AppDashboardDesign extends Vue {
if (this.$refs.dragDivItem) { if (this.$refs.dragDivItem) {
let dragDivItems: any = this.$refs.dragDivItem; let dragDivItems: any = this.$refs.dragDivItem;
dragDivItems.forEach((dragDivItem: any) => { dragDivItems.forEach((dragDivItem: any) => {
let interactObj = interact(dragDivItem.$el); this.interactObj = interact(dragDivItem.$el);
interactObj.draggable({}); this.interactObj.draggable({});
interactObj.on("dragstart dragmove dragend", (event:any) => { this.interactObj.on("dragstart dragmove dragend", (event:any) => {
this.handleDrag(event); this.handleDrag(event);
}); });
}); });
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'; import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { LogUtil, CodeListService } from 'ibiz-core'; import { LogUtil, CodeListService } from 'ibiz-core';
import axios from 'axios'; import axios from 'axios';
...@@ -167,6 +167,15 @@ export default class AppDepartmentPersonnel extends Vue { ...@@ -167,6 +167,15 @@ export default class AppDepartmentPersonnel extends Vue {
*/ */
public filtervalue: string = ''; public filtervalue: string = '';
/**
* 状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ActionlinetestBase
*/
public viewStateEvent: Subscription | undefined;
/** /**
* 获取需要过滤的部门id * 获取需要过滤的部门id
* *
...@@ -353,7 +362,7 @@ export default class AppDepartmentPersonnel extends Vue { ...@@ -353,7 +362,7 @@ export default class AppDepartmentPersonnel extends Vue {
requestMode: this.requestMode, requestMode: this.requestMode,
}); });
let container: Subject<any> = this.$appmodal.openModal(view, context, param); let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => { this.viewStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -454,6 +463,17 @@ export default class AppDepartmentPersonnel extends Vue { ...@@ -454,6 +463,17 @@ export default class AppDepartmentPersonnel extends Vue {
// 抛出值项 // 抛出值项
this.$emit('formitemvaluechange', { name: this.valueitem, value: item.id || item[this.valueitem] }); this.$emit('formitemvaluechange', { name: this.valueitem, value: item.id || item[this.valueitem] });
} }
/**
* @description: 组件销毁
*
* @return {*}
*/
public destroyed(){
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
} }
</script> </script>
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'; import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { AppServiceBase, getSessionStorage, Util, ImgurlBase64, Http } from 'ibiz-core'; import { AppServiceBase, getSessionStorage, Util, ImgurlBase64, Http } from 'ibiz-core';
import { getCookie } from 'qx-util'; import { getCookie } from 'qx-util';
import { Subject, Unsubscribable } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
@Component({ @Component({
}) })
...@@ -115,10 +115,10 @@ export default class AppFileUpload extends Vue { ...@@ -115,10 +115,10 @@ export default class AppFileUpload extends Vue {
* 表单状态事件 * 表单状态事件
* *
* @private * @private
* @type {(Unsubscribable | undefined)} * @type {(Subscription | undefined)}
* @memberof AppFileUpload * @memberof AppFileUpload
*/ */
private formStateEvent: Unsubscribable | undefined; private formStateEvent: Subscription | undefined;
/** /**
* 表单数据 * 表单数据
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</template> </template>
<script lang = 'ts'> <script lang = 'ts'>
import { Vue, Component, Prop, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
import { Subject, Unsubscribable } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { LogUtil, Util, ViewTool } from 'ibiz-core'; import { LogUtil, Util, ViewTool } from 'ibiz-core';
@Component({}) @Component({})
export default class AppFormDRUIPart extends Vue { export default class AppFormDRUIPart extends Vue {
...@@ -213,10 +213,10 @@ export default class AppFormDRUIPart extends Vue { ...@@ -213,10 +213,10 @@ export default class AppFormDRUIPart extends Vue {
* 表单状态事件 * 表单状态事件
* *
* @private * @private
* @type {(Unsubscribable | undefined)} * @type {(Subscription | undefined)}
* @memberof AppFormDRUIPart * @memberof AppFormDRUIPart
*/ */
private formStateEvent: Unsubscribable | undefined; private formStateEvent: Subscription | undefined;
/** /**
* 定时器实例 * 定时器实例
......
...@@ -211,14 +211,6 @@ export default class AppFormItem extends Vue { ...@@ -211,14 +211,6 @@ export default class AppFormItem extends Vue {
*/ */
public iconInfo: any = {}; public iconInfo: any = {};
/**
* 表单项实例
*
* @type {*}
* @memberof AppFormItem
*/
public itemRef: any = null;
/** /**
* 是否显示表单项Label提示 * 是否显示表单项Label提示
* *
...@@ -355,7 +347,6 @@ export default class AppFormItem extends Vue { ...@@ -355,7 +347,6 @@ export default class AppFormItem extends Vue {
* @memberof AppFormItem * @memberof AppFormItem
*/ */
public mounted() { public mounted() {
this.itemRef = this.$refs[this.name];
if (this.itemRules) { if (this.itemRules) {
try { try {
const _rules: any[] = this.itemRules; const _rules: any[] = this.itemRules;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'; import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { CodeListService, LogUtil } from 'ibiz-core'; import { CodeListService, LogUtil } from 'ibiz-core';
@Component({}) @Component({})
...@@ -153,6 +153,15 @@ export default class AppGroupSelect extends Vue { ...@@ -153,6 +153,15 @@ export default class AppGroupSelect extends Vue {
*/ */
protected selects: any[] = []; protected selects: any[] = [];
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ActionlinetestBase
*/
public viewStateEvent: Subscription | undefined;
/** /**
* 值变化 * 值变化
* *
...@@ -251,7 +260,7 @@ export default class AppGroupSelect extends Vue { ...@@ -251,7 +260,7 @@ export default class AppGroupSelect extends Vue {
requestMode: this.requestMode, requestMode: this.requestMode,
}); });
let container: Subject<any> = this.$appmodal.openModal(view, context, param); let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => { this.viewStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -354,6 +363,12 @@ export default class AppGroupSelect extends Vue { ...@@ -354,6 +363,12 @@ export default class AppGroupSelect extends Vue {
}) })
} }
} }
public destroyed() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
} }
</script> </script>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<script lang = 'ts'> <script lang = 'ts'>
import { Vue, Component, Prop, Watch, Provide } from 'vue-property-decorator'; import { Vue, Component, Prop, Watch, Provide } from 'vue-property-decorator';
import { Environment } from '@/environments/environment'; import { Environment } from '@/environments/environment';
import { Subject, Unsubscribable } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { AppServiceBase, Http, ImgurlBase64 } from 'ibiz-core'; import { AppServiceBase, Http, ImgurlBase64 } from 'ibiz-core';
@Component({}) @Component({})
...@@ -51,10 +51,10 @@ export default class AppImagePreview extends Vue { ...@@ -51,10 +51,10 @@ export default class AppImagePreview extends Vue {
* 表单状态事件 * 表单状态事件
* *
* @private * @private
* @type {(Unsubscribable | undefined)} * @type {(Subscription | undefined)}
* @memberof AppImagePreview * @memberof AppImagePreview
*/ */
private formStateEvent: Unsubscribable | undefined; private formStateEvent: Subscription | undefined;
/** /**
* 初始化值 * 初始化值
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</template> </template>
<script lang = 'ts'> <script lang = 'ts'>
import { Vue, Component, Prop, Watch, Provide } from 'vue-property-decorator'; import { Vue, Component, Prop, Watch, Provide } from 'vue-property-decorator';
import { Subject, Unsubscribable } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
@Component({}) @Component({})
export default class AppImageRomate extends Vue { export default class AppImageRomate extends Vue {
...@@ -55,10 +55,10 @@ export default class AppImageRomate extends Vue { ...@@ -55,10 +55,10 @@ export default class AppImageRomate extends Vue {
* 表单状态事件 * 表单状态事件
* *
* @private * @private
* @type {(Unsubscribable | undefined)} * @type {(Subscription | undefined)}
* @memberof AppImageUpload * @memberof AppImageUpload
*/ */
private formStateEvent: Unsubscribable | undefined; private formStateEvent: Subscription | undefined;
/** /**
* Vue生命周期 * Vue生命周期
......
...@@ -21,7 +21,20 @@ ...@@ -21,7 +21,20 @@
} }
} }
} }
.app-picture-upload.single {
.el-upload-list--picture-card .el-upload-list__item{
width: calc(100% + 2px);
height: calc(100% + 2px);
}
.el-upload--picture-card {
width: calc(100% + 2px);
height: calc(100% + 2px);
display: flex;
align-items: center;
justify-content: center;
}
}
.app-image-upload-model { .app-image-upload-model {
.el-image { .el-image {
width: 100%; width: 100%;
......
<template> <template>
<div class='app-picture-upload'> <div :class="{'app-picture-upload': true, 'single': !multiple}">
<ul class='el-upload-list el-upload-list--picture-card'> <ul class='el-upload-list el-upload-list--picture-card'>
<!-- 绘制缩略图 Start --> <!-- 绘制缩略图 Start -->
<li v-for="(file,index) in files" :key="index" class='el-upload-list__item is-success'> <li v-for="(file,index) in files" :key="index" class='el-upload-list__item is-success'>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
import { Vue, Component, Prop, Watch, Provide } from 'vue-property-decorator'; import { Vue, Component, Prop, Watch, Provide } from 'vue-property-decorator';
import { AppServiceBase, getSessionStorage, Http, Util } from 'ibiz-core'; import { AppServiceBase, getSessionStorage, Http, Util } from 'ibiz-core';
import { getCookie } from 'qx-util'; import { getCookie } from 'qx-util';
import { Subject, Unsubscribable } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
@Component({}) @Component({})
export default class AppImageUpload extends Vue { export default class AppImageUpload extends Vue {
...@@ -90,10 +90,10 @@ export default class AppImageUpload extends Vue { ...@@ -90,10 +90,10 @@ export default class AppImageUpload extends Vue {
* 表单状态事件 * 表单状态事件
* *
* @private * @private
* @type {(Unsubscribable | undefined)} * @type {(Subscription | undefined)}
* @memberof AppImageUpload * @memberof AppImageUpload
*/ */
private formStateEvent: Unsubscribable | undefined; private formStateEvent: Subscription | undefined;
/** /**
* 表单数据 * 表单数据
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<script lang='ts'> <script lang='ts'>
import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator'; import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
@Component({ @Component({
}) })
...@@ -135,6 +135,15 @@ export default class AppInputIp extends Vue { ...@@ -135,6 +135,15 @@ export default class AppInputIp extends Vue {
* @memberof AppInputIp * @memberof AppInputIp
*/ */
public forIp: any = ''; public forIp: any = '';
/**
* 表单状态事件
*
* @private
* @type {(Subscription | undefined)}
* @memberof AppImagePreview
*/
private formStateEvent: Subscription | undefined;
/** /**
* Vue声明周期(处理组件的输入属性) * Vue声明周期(处理组件的输入属性)
...@@ -143,7 +152,7 @@ export default class AppInputIp extends Vue { ...@@ -143,7 +152,7 @@ export default class AppInputIp extends Vue {
*/ */
public created(){ public created(){
if(this.formState){ if(this.formState){
this.formState.subscribe(({type,data})=>{ this.formStateEvent = this.formState.subscribe(({type,data})=>{
if(Object.is('load',type)){ if(Object.is('load',type)){
this.loadData(); this.loadData();
} }
...@@ -152,6 +161,17 @@ export default class AppInputIp extends Vue { ...@@ -152,6 +161,17 @@ export default class AppInputIp extends Vue {
this.loadData(); this.loadData();
} }
/**
* @description: 组件销毁
*
* @return {*}
*/
public destroyed(){
if (this.formStateEvent) {
this.formStateEvent.unsubscribe();
}
}
/** /**
* 加载数据 * 加载数据
* *
......
...@@ -317,6 +317,12 @@ export default class AppListBox extends Vue { ...@@ -317,6 +317,12 @@ export default class AppListBox extends Vue {
} }
} }
public destroyed() {
if (this.formStateEvent) {
this.formStateEvent.unsubscribe();
}
}
/** /**
* 公共参数处理 * 公共参数处理
* *
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Model } from 'vue-property-decorator'; import { Vue, Component, Prop, Model } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { AMapManager } from 'vue-amap'; import { AMapManager } from 'vue-amap';
import { LogUtil } from 'ibiz-core'; import { LogUtil } from 'ibiz-core';
...@@ -198,6 +198,15 @@ export default class AppMapPosition extends Vue { ...@@ -198,6 +198,15 @@ export default class AppMapPosition extends Vue {
*/ */
public resultShow: boolean = false; public resultShow: boolean = false;
/**
* 表单状态事件
*
* @private
* @type {(Subscription | undefined)}
* @memberof AppImagePreview
*/
private formStateEvent: Subscription | undefined;
/** /**
* Vue生命周期 * Vue生命周期
* *
...@@ -206,7 +215,7 @@ export default class AppMapPosition extends Vue { ...@@ -206,7 +215,7 @@ export default class AppMapPosition extends Vue {
public created() { public created() {
this.win = window as any; this.win = window as any;
if(this.formState) { if(this.formState) {
this.formState.subscribe(({ type, data }) => { this.formStateEvent = this.formState.subscribe(({ type, data }) => {
if(Object.is('load', type)) { if(Object.is('load', type)) {
this.initMap(); this.initMap();
} }
...@@ -229,6 +238,17 @@ export default class AppMapPosition extends Vue { ...@@ -229,6 +238,17 @@ export default class AppMapPosition extends Vue {
this.initMapEvents(); this.initMapEvents();
} }
/**
* @description: 组件销毁
*
* @return {*}
*/
public destroyed(){
if (this.formStateEvent) {
this.formStateEvent.unsubscribe();
}
}
/** /**
* 根据当前模式初始化地图 * 根据当前模式初始化地图
* *
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</template> </template>
<script lang = 'ts'> <script lang = 'ts'>
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'; import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { Util } from 'ibiz-core'; import { Util } from 'ibiz-core';
@Component({}) @Component({})
...@@ -136,6 +136,15 @@ export default class AppMpickerImportability extends Vue { ...@@ -136,6 +136,15 @@ export default class AppMpickerImportability extends Vue {
*/ */
public selectItems: Array<any> = []; public selectItems: Array<any> = [];
/**
* 状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ActionlinetestBase
*/
public viewStateEvent: Subscription | undefined;
/** /**
* 监听curvalue值 * 监听curvalue值
* @param newVal * @param newVal
...@@ -309,7 +318,7 @@ export default class AppMpickerImportability extends Vue { ...@@ -309,7 +318,7 @@ export default class AppMpickerImportability extends Vue {
} }
let formdata = this.data; let formdata = this.data;
const modal: Subject<any> = this.$appmodal.openModal(view, _context, _viewparams); const modal: Subject<any> = this.$appmodal.openModal(view, _context, _viewparams);
modal.subscribe((result: any) => { this.viewStateEvent = modal.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -379,6 +388,17 @@ export default class AppMpickerImportability extends Vue { ...@@ -379,6 +388,17 @@ export default class AppMpickerImportability extends Vue {
} }
return result; return result;
} }
/**
* @description: 组件销毁
*
* @return {*}
*/
public destroyed(){
if(this.viewStateEvent){
this.viewStateEvent.unsubscribe();
}
}
} }
</script> </script>
<style lang="less"> <style lang="less">
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</template> </template>
<script lang = 'ts'> <script lang = 'ts'>
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'; import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { LogUtil } from 'ibiz-core'; import { LogUtil } from 'ibiz-core';
@Component({ @Component({
...@@ -159,6 +159,14 @@ export default class AppMpicker extends Vue { ...@@ -159,6 +159,14 @@ export default class AppMpicker extends Vue {
*/ */
public loading: boolean = false; public loading: boolean = false;
/**
* 模态事件
*
* @type {Subscription | undefined}
* @memberof AppMpicker
*/
public modalEvent: Subscription | undefined;
/** /**
* 监听curvalue值 * 监听curvalue值
* @param newVal * @param newVal
...@@ -356,7 +364,7 @@ export default class AppMpicker extends Vue { ...@@ -356,7 +364,7 @@ export default class AppMpicker extends Vue {
} }
let formdata = this.data; let formdata = this.data;
const modal: Subject<any> = this.$appmodal.openModal(view, _context, _viewparams) const modal: Subject<any> = this.$appmodal.openModal(view, _context, _viewparams)
modal.subscribe((result: any) => { this.modalEvent = modal.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -414,6 +422,11 @@ export default class AppMpicker extends Vue { ...@@ -414,6 +422,11 @@ export default class AppMpicker extends Vue {
return result; return result;
} }
public destroyed() {
if (this.modalEvent) {
this.modalEvent.unsubscribe();
}
}
} }
</script> </script>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</template> </template>
<script lang = 'ts'> <script lang = 'ts'>
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'; import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { Util } from 'ibiz-core'; import { Util } from 'ibiz-core';
@Component({}) @Component({})
...@@ -144,6 +144,15 @@ export default class AppPickerImportability extends Vue { ...@@ -144,6 +144,15 @@ export default class AppPickerImportability extends Vue {
*/ */
public curValueId: any; public curValueId: any;
/**
* 订阅对象
*
* @protected
* @type {(Subscription | undefined)}
* @memberof AppListBox
*/
protected formStateEvent: Subscription | undefined;
/** /**
* 监听value * 监听value
* *
...@@ -258,7 +267,7 @@ export default class AppPickerImportability extends Vue { ...@@ -258,7 +267,7 @@ export default class AppPickerImportability extends Vue {
_context.viewpath = view.viewpath; _context.viewpath = view.viewpath;
} }
const modal: Subject<any> = this.$appmodal.openModal(view, _context, _viewparams); const modal: Subject<any> = this.$appmodal.openModal(view, _context, _viewparams);
modal.subscribe((result: any) => { this.formStateEvent = modal.subscribe((result: any) => {
if (result && Object.is(result.ret, 'OK')) { if (result && Object.is(result.ret, 'OK')) {
let item: any = {}; let item: any = {};
if (result.datas && Array.isArray(result.datas)) { if (result.datas && Array.isArray(result.datas)) {
...@@ -275,6 +284,12 @@ export default class AppPickerImportability extends Vue { ...@@ -275,6 +284,12 @@ export default class AppPickerImportability extends Vue {
} }
} }
public destroyed() {
if (this.formStateEvent) {
this.formStateEvent.unsubscribe();
}
}
} }
</script> </script>
<style lang="less"> <style lang="less">
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<script lang="ts"> <script lang="ts">
import { Vue, Component, Prop, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { Util } from 'ibiz-core'; import { Util } from 'ibiz-core';
@Component({ @Component({
...@@ -256,6 +256,15 @@ export default class AppPickerSelectView extends Vue { ...@@ -256,6 +256,15 @@ export default class AppPickerSelectView extends Vue {
*/ */
public srfparentdata: any = {}; public srfparentdata: any = {};
/**
* 表单状态事件
*
* @private
* @type {(Subscription | undefined)}
* @memberof AppImagePreview
*/
private formStateEvent: Subscription | undefined;
/** /**
* 输入框change事件 * 输入框change事件
* *
...@@ -407,7 +416,9 @@ export default class AppPickerSelectView extends Vue { ...@@ -407,7 +416,9 @@ export default class AppPickerSelectView extends Vue {
* @memberof AppPickerSelectView * @memberof AppPickerSelectView
*/ */
public destroyed() { public destroyed() {
if(this.formStateEvent){
this.formStateEvent.unsubscribe();
}
} }
/** /**
...@@ -530,7 +541,7 @@ export default class AppPickerSelectView extends Vue { ...@@ -530,7 +541,7 @@ export default class AppPickerSelectView extends Vue {
*/ */
private openPopOver($event: any, view: any, context: any, param: any): void { private openPopOver($event: any, view: any, context: any, param: any): void {
let container: Subject<any> = this.$apppopover.openPop($event, view, context, param); let container: Subject<any> = this.$apppopover.openPop($event, view, context, param);
container.subscribe((result: any) => { this.formStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -549,7 +560,7 @@ export default class AppPickerSelectView extends Vue { ...@@ -549,7 +560,7 @@ export default class AppPickerSelectView extends Vue {
*/ */
private openPopupModal(view: any, context: any, param: any): void { private openPopupModal(view: any, context: any, param: any): void {
let container: Subject<any> = this.$appmodal.openModal(view, context, param); let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => { this.formStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -567,7 +578,7 @@ export default class AppPickerSelectView extends Vue { ...@@ -567,7 +578,7 @@ export default class AppPickerSelectView extends Vue {
*/ */
private openDrawer(view: any, context: any, param: any): void { private openDrawer(view: any, context: any, param: any): void {
let container: Subject<any> = this.$appdrawer.openDrawer(view, Util.getViewProps(context, param)); let container: Subject<any> = this.$appdrawer.openDrawer(view, Util.getViewProps(context, param));
container.subscribe((result: any) => { this.formStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<script lang = 'ts'> <script lang = 'ts'>
import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator'; import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { Util, throttle, ModelTool, ViewTool, LogUtil, UIServiceHelp } from 'ibiz-core'; import { Util, throttle, ModelTool, ViewTool, LogUtil, UIServiceHelp } from 'ibiz-core';
import { import {
IPSAppDataEntity, IPSAppDataEntity,
...@@ -388,6 +388,14 @@ export default class AppPicker extends Vue { ...@@ -388,6 +388,14 @@ export default class AppPicker extends Vue {
*/ */
public loading: boolean = false; public loading: boolean = false;
/**
* 模态事件
*
* @type {Subscription | undefined}
* @memberof AppMpicker
*/
public viewStateEvent: Subscription | undefined;
/** /**
* 获取关联数据项值 * 获取关联数据项值
* *
...@@ -467,7 +475,11 @@ export default class AppPicker extends Vue { ...@@ -467,7 +475,11 @@ export default class AppPicker extends Vue {
* *
* @memberof AppPicker * @memberof AppPicker
*/ */
public destroyed(): void {} public destroyed() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/** /**
* 下拉切换回调 * 下拉切换回调
...@@ -686,7 +698,7 @@ export default class AppPicker extends Vue { ...@@ -686,7 +698,7 @@ export default class AppPicker extends Vue {
Object.assign(context, { viewpath: view.viewpath }); Object.assign(context, { viewpath: view.viewpath });
} }
let container: Subject<any> = this.$appmodal.openModal(view, context, param); let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => { this.viewStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -707,7 +719,7 @@ export default class AppPicker extends Vue { ...@@ -707,7 +719,7 @@ export default class AppPicker extends Vue {
Object.assign(context, { viewpath: view.viewpath }); Object.assign(context, { viewpath: view.viewpath });
} }
let container: Subject<any> = this.$appdrawer.openDrawer(view, Util.getViewProps(context, param)); let container: Subject<any> = this.$appdrawer.openDrawer(view, Util.getViewProps(context, param));
container.subscribe((result: any) => { this.viewStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -729,7 +741,7 @@ export default class AppPicker extends Vue { ...@@ -729,7 +741,7 @@ export default class AppPicker extends Vue {
Object.assign(context, { viewpath: view.viewpath }); Object.assign(context, { viewpath: view.viewpath });
} }
let container: Subject<any> = this.$apppopover.openPop($event, view, context, param); let container: Subject<any> = this.$apppopover.openPop($event, view, context, param);
container.subscribe((result: any) => { this.viewStateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -1123,6 +1135,7 @@ export default class AppPicker extends Vue { ...@@ -1123,6 +1135,7 @@ export default class AppPicker extends Vue {
} }
} }
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
......
...@@ -278,6 +278,21 @@ export default class AppPQGrid extends Vue { ...@@ -278,6 +278,21 @@ export default class AppPQGrid extends Vue {
} }
} }
/**
* @description 组件销毁
* @memberof AppPQGrid
*/
destroyed() {
if (this.pqGrid) {
this.pqGrid.destroy();
}
if (this.pqPager) {
this.pqPager.destroy();
}
this.pqGrid = null;
this.pqPager = null;
}
/** /**
* 初始化PQGrid * 初始化PQGrid
* *
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator'; import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { LogUtil, CodeListService } from 'ibiz-core'; import { LogUtil, CodeListService } from 'ibiz-core';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
@Component({}) @Component({})
export default class AppRadioGroup extends Vue { export default class AppRadioGroup extends Vue {
...@@ -182,7 +182,7 @@ export default class AppRadioGroup extends Vue { ...@@ -182,7 +182,7 @@ export default class AppRadioGroup extends Vue {
* @type {*} * @type {*}
* @memberof AppRadioGroup * @memberof AppRadioGroup
*/ */
public contextStateEvents: any; public contextStateEvents: Subscription | undefined;
/** /**
* 是否禁用 * 是否禁用
...@@ -252,6 +252,17 @@ export default class AppRadioGroup extends Vue { ...@@ -252,6 +252,17 @@ export default class AppRadioGroup extends Vue {
} }
} }
/**
* @description: 组件销毁
*
* @return {*}
*/
public destroyed(){
if(this.contextStateEvents){
this.contextStateEvents.unsubscribe();
}
}
public handleData() { public handleData() {
if (this.tag && this.codelistType) { if (this.tag && this.codelistType) {
// 公共参数处理 // 公共参数处理
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator"; import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
import { Subject } from "rxjs"; import { Subject, Subscription } from "rxjs";
import { debounceTime, distinctUntilChanged } from "rxjs/operators"; import { debounceTime, distinctUntilChanged } from "rxjs/operators";
@Component({ @Component({
...@@ -163,13 +163,22 @@ export default class AppRangDate extends Vue { ...@@ -163,13 +163,22 @@ export default class AppRangDate extends Vue {
this.inputDataChang.next({ name: name, value: val }); this.inputDataChang.next({ name: name, value: val });
} }
/**
* 表单状态事件
*
* @private
* @type {(Subscription | undefined)}
* @memberof AppImagePreview
*/
private formStateEvent: Subscription | undefined;
/** /**
* vue 声明周期 debounceTime * vue 声明周期 debounceTime
* *
* @memberof AppRangDate * @memberof AppRangDate
*/ */
public created() { public created() {
this.inputDataChang this.formStateEvent = this.inputDataChang
.pipe(debounceTime(500), distinctUntilChanged()) .pipe(debounceTime(500), distinctUntilChanged())
.subscribe((data: any) => { .subscribe((data: any) => {
this.$emit("formitemvaluechange", { this.$emit("formitemvaluechange", {
...@@ -179,6 +188,17 @@ export default class AppRangDate extends Vue { ...@@ -179,6 +188,17 @@ export default class AppRangDate extends Vue {
}); });
} }
/**
* @description:组件销毁
*
* @return {*}
*/
public destroyed(){
if(this.formStateEvent){
this.formStateEvent.unsubscribe();
}
}
/** /**
* 开始时间值改变 * 开始时间值改变
* *
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator'; import { Component, Vue, Prop } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
@Component({ @Component({
...@@ -126,6 +126,15 @@ export default class AppRangeEditor extends Vue { ...@@ -126,6 +126,15 @@ export default class AppRangeEditor extends Vue {
*/ */
private inputDataChang: Subject<any> = new Subject() private inputDataChang: Subject<any> = new Subject()
/**
* 表单状态事件
*
* @private
* @type {(Subscription | undefined)}
* @memberof AppImagePreview
*/
private formStateEvent: Subscription | undefined;
/** /**
* 处理值格式 * 处理值格式
* *
...@@ -164,7 +173,7 @@ export default class AppRangeEditor extends Vue { ...@@ -164,7 +173,7 @@ export default class AppRangeEditor extends Vue {
* @memberof InputBox * @memberof InputBox
*/ */
public created() { public created() {
this.inputDataChang this.formStateEvent = this.inputDataChang
.pipe( .pipe(
debounceTime(500), debounceTime(500),
distinctUntilChanged() distinctUntilChanged()
...@@ -173,6 +182,17 @@ export default class AppRangeEditor extends Vue { ...@@ -173,6 +182,17 @@ export default class AppRangeEditor extends Vue {
}); });
} }
/**
* @description: 组件销毁
*
* @return {*}
*/
public destroyed(){
if(this.formStateEvent){
this.formStateEvent.unsubscribe();
}
}
/** /**
* 值改变 * 值改变
* *
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { Environment } from '@/environments/environment'; import { Environment } from '@/environments/environment';
import { Http, ImgurlBase64, LogUtil } from 'ibiz-core'; import { Http, ImgurlBase64, LogUtil } from 'ibiz-core';
import tinymce from 'tinymce/tinymce'; import tinymce from 'tinymce/tinymce';
...@@ -216,6 +216,24 @@ export default class AppRichTextEditor extends Vue { ...@@ -216,6 +216,24 @@ export default class AppRichTextEditor extends Vue {
*/ */
public editorClass: string = 'app-rich-text-editor'; public editorClass: string = 'app-rich-text-editor';
/**
* 表单状态事件
*
* @private
* @type {(Subscription | undefined)}
* @memberof AppImagePreview
*/
private formStateEvent: Subscription | undefined;
/**
* 富文本事件
*
* @private
* @type {(Subscription | undefined)}
* @memberof AppImagePreview
*/
private richtextEvent: Subscription | undefined;
/** /**
* 生命周期 * 生命周期
* *
...@@ -223,7 +241,7 @@ export default class AppRichTextEditor extends Vue { ...@@ -223,7 +241,7 @@ export default class AppRichTextEditor extends Vue {
*/ */
public created() { public created() {
if (this.formState) { if (this.formState) {
this.formState.subscribe(({ type, data }) => { this.formStateEvent = this.formState.subscribe(({ type, data }) => {
if (Object.is('load', type)) { if (Object.is('load', type)) {
this.getParams(); this.getParams();
if (!this.value) { if (!this.value) {
...@@ -293,10 +311,16 @@ export default class AppRichTextEditor extends Vue { ...@@ -293,10 +311,16 @@ export default class AppRichTextEditor extends Vue {
* *
* @memberof AppRichTextEditor * @memberof AppRichTextEditor
*/ */
public destoryed() { public destroyed() {
if (this.editor) { if (this.editor) {
tinymceCode.remove('#' + this.id); tinymceCode.remove('#' + this.id);
} }
if(this.formStateEvent){
this.formStateEvent.unsubscribe();
}
if (this.richtextEvent) {
this.richtextEvent.unsubscribe();
}
} }
/** /**
...@@ -384,7 +408,7 @@ export default class AppRichTextEditor extends Vue { ...@@ -384,7 +408,7 @@ export default class AppRichTextEditor extends Vue {
* @memberof AppRichTextEditor * @memberof AppRichTextEditor
*/ */
public init() { public init() {
this.destoryed(); this.destroyed();
let richtexteditor = this; let richtexteditor = this;
tinymceCode.init({ tinymceCode.init({
selector: '#' + richtexteditor.id, selector: '#' + richtexteditor.id,
...@@ -449,7 +473,7 @@ export default class AppRichTextEditor extends Vue { ...@@ -449,7 +473,7 @@ export default class AppRichTextEditor extends Vue {
}); });
} }
// this.uploadUrl = _url; // this.uploadUrl = _url;
richtexteditor.uploadFile(_url, formData).subscribe( this.richtextEvent = richtexteditor.uploadFile(_url, formData).subscribe(
(file: any) => { (file: any) => {
let downloadUrl = richtexteditor.downloadUrl; let downloadUrl = richtexteditor.downloadUrl;
if (file.filename) { if (file.filename) {
......
...@@ -100,6 +100,14 @@ export default class AppStudioAction extends Vue { ...@@ -100,6 +100,14 @@ export default class AppStudioAction extends Vue {
*/ */
poptipValue: boolean = false; poptipValue: boolean = false;
/**
* Interactable对象
*
* @type {any}
* @memberof AppStudioAction
*/
Interactable: any;
/** /**
* 组件初始化 * 组件初始化
* *
...@@ -195,30 +203,38 @@ export default class AppStudioAction extends Vue { ...@@ -195,30 +203,38 @@ export default class AppStudioAction extends Vue {
this.poptipValue = false; this.poptipValue = false;
} }
public mounted(): void { public mounted(): void {
if (this.$refs.dragHandle) { if (this.isDevMode) {
interact(this.$refs.dragHandle as any).draggable({ if (this.$refs.dragHandle) {
inertia: true, this.Interactable = interact(this.$refs.dragHandle as any).draggable({
modifiers: [ inertia: true,
interact.modifiers.restrictRect({ modifiers: [
restriction: this.$refs.debugBar as any, interact.modifiers.restrictRect({
endOnly: true, restriction: this.$refs.debugBar as any,
}), endOnly: true,
], }),
autoScroll: true, ],
listeners: { autoScroll: true,
move: (event: any) => { listeners: {
const target = event.target; move: (event: any) => {
const x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx; const target = event.target;
const y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy; const x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;
const container: any = this.$refs.container; const y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;
container.style.webkitTransform = container.style.transform = const container: any = this.$refs.container;
'translate(' + x + 'px, ' + y + 'px)'; container.style.webkitTransform = container.style.transform =
target.setAttribute('data-x', x); 'translate(' + x + 'px, ' + y + 'px)';
target.setAttribute('data-y', y); target.setAttribute('data-x', x);
target.setAttribute('data-y', y);
},
}, },
}, });
}); }
}
}
public destroyed() {
if (this.Interactable) {
this.Interactable.unset();
} }
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</template> </template>
<script lang = 'ts'> <script lang = 'ts'>
import { Vue, Component, Prop } from 'vue-property-decorator'; import { Vue, Component, Prop } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { Environment } from '@/environments/environment'; import { Environment } from '@/environments/environment';
import { AppServiceBase, removeSessionStorage } from 'ibiz-core'; import { AppServiceBase, removeSessionStorage } from 'ibiz-core';
import { clearCookie, getCookie } from 'qx-util'; import { clearCookie, getCookie } from 'qx-util';
...@@ -62,6 +62,15 @@ export default class AppUser extends Vue { ...@@ -62,6 +62,15 @@ export default class AppUser extends Vue {
avatar: './assets/img/avatar.png', avatar: './assets/img/avatar.png',
}; };
/**
* 状态事件
*
* @private
* @type {(Subscription | undefined)}
* @memberof AppImagePreview
*/
private stateEvent: Subscription | undefined;
/** /**
* 下拉选选中回调 * 下拉选选中回调
* *
...@@ -88,7 +97,7 @@ export default class AppUser extends Vue { ...@@ -88,7 +97,7 @@ export default class AppUser extends Vue {
{}, {},
{}, {},
); );
container.subscribe((result: any) => { this.stateEvent = container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
...@@ -179,6 +188,12 @@ export default class AppUser extends Vue { ...@@ -179,6 +188,12 @@ export default class AppUser extends Vue {
const navHistory: any = AppServiceBase.getInstance().getAppNavDataService(); const navHistory: any = AppServiceBase.getInstance().getAppNavDataService();
navHistory.reset(); navHistory.reset();
} }
public destroyed() {
if (this.stateEvent) {
this.stateEvent.unsubscribe();
}
}
} }
</script> </script>
......
...@@ -470,7 +470,7 @@ export default class AppWFOpinion extends Vue { ...@@ -470,7 +470,7 @@ export default class AppWFOpinion extends Vue {
* *
* @memberof AppWFOpinion * @memberof AppWFOpinion
*/ */
public destoryed() { public destroyed() {
if (this.mode === 'POPOVER') { if (this.mode === 'POPOVER') {
window.removeEventListener('resize', () => {}); window.removeEventListener('resize', () => {});
} }
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
import {Component, Vue, Prop} from 'vue-property-decorator'; import {Component, Vue, Prop} from 'vue-property-decorator';
import {Message, MessageBox} from 'element-ui'; import {Message, MessageBox} from 'element-ui';
import Axios from 'axios'; import Axios from 'axios';
import {Unsubscribable} from 'rxjs'; import {Subscription} from 'rxjs';
import { getCookie } from 'qx-util'; import { getCookie } from 'qx-util';
import { AppServiceBase, getSessionStorage } from 'ibiz-core'; import { AppServiceBase, getSessionStorage } from 'ibiz-core';
...@@ -239,7 +239,7 @@ export default class DiskFileUpload extends Vue { ...@@ -239,7 +239,7 @@ export default class DiskFileUpload extends Vue {
* @type {*} * @type {*}
* @memberof DiskFileUpload * @memberof DiskFileUpload
*/ */
public formStateEvent: any | Unsubscribable | undefined; public formStateEvent: Subscription | undefined;
/** /**
* 批量更新标识,false为不更新,true才可以更新 * 批量更新标识,false为不更新,true才可以更新
...@@ -370,13 +370,24 @@ export default class DiskFileUpload extends Vue { ...@@ -370,13 +370,24 @@ export default class DiskFileUpload extends Vue {
}); });
} }
/**
* @description: 组件销毁
*
* @return {*}
*/
destroyed(){
if(this.formStateEvent){
this.formStateEvent.unsubscribe();
}
}
/** /**
* 设置请求头 * 设置请求头
* *
* @memberof AppFileUpload * @memberof AppFileUpload
*/ */
public setHeaders(){ public setHeaders(){
if (AppServiceBase.getInstance().getAppEnvironment().SaaSMode) { if (AppServiceBase.getInstance().getAppEnvironment().SaaSMode) {
let activeOrgData = getSessionStorage('activeOrgData'); let activeOrgData = getSessionStorage('activeOrgData');
this.headers['srforgid'] = activeOrgData?.orgid; this.headers['srforgid'] = activeOrgData?.orgid;
this.headers['srfsystemid'] = activeOrgData?.systemid; this.headers['srfsystemid'] = activeOrgData?.systemid;
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
import {Component, Vue, Prop} from 'vue-property-decorator'; import {Component, Vue, Prop} from 'vue-property-decorator';
import {Message, MessageBox} from 'element-ui'; import {Message, MessageBox} from 'element-ui';
import Axios from 'axios'; import Axios from 'axios';
import {Unsubscribable} from 'rxjs'; import {Subscription} from 'rxjs';
import { AppServiceBase, getSessionStorage } from 'ibiz-core'; import { AppServiceBase, getSessionStorage } from 'ibiz-core';
import { getCookie } from 'qx-util'; import { getCookie } from 'qx-util';
...@@ -201,7 +201,7 @@ export default class DiskImageUplaod extends Vue { ...@@ -201,7 +201,7 @@ export default class DiskImageUplaod extends Vue {
* @type {*} * @type {*}
* @memberof DiskImageUplaod * @memberof DiskImageUplaod
*/ */
public formStateEvent: any | Unsubscribable | undefined; public formStateEvent: Subscription | undefined;
/** /**
* 批量更新标识,false为不更新,true才可以更新 * 批量更新标识,false为不更新,true才可以更新
...@@ -359,13 +359,24 @@ export default class DiskImageUplaod extends Vue { ...@@ -359,13 +359,24 @@ export default class DiskImageUplaod extends Vue {
}); });
} }
/**
* @description: 组件销毁
*
* @return {*}
*/
destroyed(){
if(this.formStateEvent){
this.formStateEvent.unsubscribe();
}
}
/** /**
* 设置请求头 * 设置请求头
* *
* @memberof AppFileUpload * @memberof AppFileUpload
*/ */
public setHeaders(){ public setHeaders(){
if (AppServiceBase.getInstance().getAppEnvironment().SaaSMode) { if (AppServiceBase.getInstance().getAppEnvironment().SaaSMode) {
let activeOrgData = getSessionStorage('activeOrgData'); let activeOrgData = getSessionStorage('activeOrgData');
this.headers['srforgid'] = activeOrgData?.orgid; this.headers['srforgid'] = activeOrgData?.orgid;
this.headers['srfsystemid'] = activeOrgData?.systemid; this.headers['srfsystemid'] = activeOrgData?.systemid;
......
...@@ -2,6 +2,7 @@ import { Vue, Component } from 'vue-property-decorator'; ...@@ -2,6 +2,7 @@ import { Vue, Component } from 'vue-property-decorator';
import { VNode, CreateElement } from 'vue'; import { VNode, CreateElement } from 'vue';
import { FooterItemsService } from '../../../../app-service'; import { FooterItemsService } from '../../../../app-service';
import './app-footer.less'; import './app-footer.less';
import { Subscription } from 'rxjs';
/** /**
* 应用头部 * 应用头部
...@@ -20,17 +21,30 @@ export class AppFooter extends Vue { ...@@ -20,17 +21,30 @@ export class AppFooter extends Vue {
*/ */
private footerItemsService = new FooterItemsService(); private footerItemsService = new FooterItemsService();
/**
* @description 组件事件
* @type {(Subscription | undefined)}
* @memberof AppFooter
*/
public footerEvent: Subscription | undefined;
/** /**
* 组件创建完毕 * 组件创建完毕
* *
* @memberof AppFooter * @memberof AppFooter
*/ */
public created(): void { public created(): void {
this.footerItemsService.tickTrigger().subscribe(() => { this.footerEvent = this.footerItemsService.tickTrigger().subscribe(() => {
this.$nextTick(); this.$nextTick();
}); });
} }
public destroyed() {
if (this.footerEvent) {
this.footerEvent.unsubscribe();
}
}
/** /**
* 绘制内容 * 绘制内容
* *
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</template> </template>
<script lang = 'ts'> <script lang = 'ts'>
import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { Environment } from '@/environments/environment'; import { Environment } from '@/environments/environment';
import { CodeListService, Http, ImgurlBase64, LogUtil } from 'ibiz-core'; import { CodeListService, Http, ImgurlBase64, LogUtil } from 'ibiz-core';
import tinymce from "tinymce/tinymce"; import tinymce from "tinymce/tinymce";
...@@ -365,6 +365,24 @@ export default class RichTextEditor extends Vue { ...@@ -365,6 +365,24 @@ export default class RichTextEditor extends Vue {
*/ */
public editorClass: string = 'app-rich-text-editor'; public editorClass: string = 'app-rich-text-editor';
/**
* 表单状态事件
*
* @private
* @type {(Subscription | undefined)}
* @memberof RichTextEditor
*/
private formStateEvent: Subscription | undefined;
/**
* 富文本事件
*
* @private
* @type {(Subscription | undefined)}
* @memberof RichTextEditor
*/
private richtextEvent: Subscription | undefined;
/** /**
* 生命周期 * 生命周期
* *
...@@ -373,7 +391,7 @@ export default class RichTextEditor extends Vue { ...@@ -373,7 +391,7 @@ export default class RichTextEditor extends Vue {
public created() { public created() {
this.appTemplateData(); this.appTemplateData();
if(this.formState) { if(this.formState) {
this.formState.subscribe(({ type, data }) => { this.formStateEvent = this.formState.subscribe(({ type, data }) => {
if (Object.is('load', type)) { if (Object.is('load', type)) {
this.getParams(); this.getParams();
if (!this.value) { if (!this.value) {
...@@ -448,10 +466,16 @@ export default class RichTextEditor extends Vue { ...@@ -448,10 +466,16 @@ export default class RichTextEditor extends Vue {
* *
* @memberof RichTextEditor * @memberof RichTextEditor
*/ */
public destoryed(){ public destroyed(){
if(this.editor){ if(this.editor){
tinymceCode.remove('#' + this.id); tinymceCode.remove('#' + this.id);
} }
if(this.formStateEvent){
this.formStateEvent.unsubscribe();
}
if (this.richtextEvent) {
this.richtextEvent.unsubscribe();
}
} }
/** /**
...@@ -536,7 +560,7 @@ export default class RichTextEditor extends Vue { ...@@ -536,7 +560,7 @@ export default class RichTextEditor extends Vue {
* @memberof RichTextEditor * @memberof RichTextEditor
*/ */
public init() { public init() {
this.destoryed(); this.destroyed();
let richtexteditor = this; let richtexteditor = this;
tinymceCode.init({ tinymceCode.init({
selector: '#' + richtexteditor.id, selector: '#' + richtexteditor.id,
...@@ -654,7 +678,7 @@ export default class RichTextEditor extends Vue { ...@@ -654,7 +678,7 @@ export default class RichTextEditor extends Vue {
}) })
} }
// this.uploadUrl = _url; // this.uploadUrl = _url;
richtexteditor.uploadFile(_url, formData).subscribe((file: any) => { this.richtextEvent = richtexteditor.uploadFile(_url, formData).subscribe((file: any) => {
const item: any = { id: file.fileid, type: file.ext }; const item: any = { id: file.fileid, type: file.ext };
richtexteditor.imgsrc.push(item); richtexteditor.imgsrc.push(item);
let downloadUrl = richtexteditor.downloadUrl; let downloadUrl = richtexteditor.downloadUrl;
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<script lang="ts"> <script lang="ts">
import {Component, Vue, Prop} from 'vue-property-decorator'; import {Component, Vue, Prop} from 'vue-property-decorator';
import {Message, MessageBox} from 'element-ui'; import {Message, MessageBox} from 'element-ui';
import {Unsubscribable} from 'rxjs'; import {Subscription} from 'rxjs';
import { AppServiceBase, getSessionStorage } from 'ibiz-core'; import { AppServiceBase, getSessionStorage } from 'ibiz-core';
import { getCookie } from 'qx-util'; import { getCookie } from 'qx-util';
...@@ -288,7 +288,7 @@ export default class TextFileUpload extends Vue { ...@@ -288,7 +288,7 @@ export default class TextFileUpload extends Vue {
* @type {*} * @type {*}
* @memberof DiskFileUpload * @memberof DiskFileUpload
*/ */
public formStateEvent: any | Unsubscribable | undefined; public formStateEvent: Subscription | undefined;
/** /**
* 批量更新标识,false为不更新,true才可以更新 * 批量更新标识,false为不更新,true才可以更新
...@@ -432,6 +432,17 @@ export default class TextFileUpload extends Vue { ...@@ -432,6 +432,17 @@ export default class TextFileUpload extends Vue {
}); });
} }
/**
* @description: 组件销毁
*
* @return {*}
*/
destroyed(){
if(this.formStateEvent){
this.formStateEvent.unsubscribe();
}
}
/** /**
* 设置请求头 * 设置请求头
* *
......
...@@ -468,10 +468,11 @@ export class AppmenuBase extends AppMenuControlBase { ...@@ -468,10 +468,11 @@ export class AppmenuBase extends AppMenuControlBase {
scopedSlots: { scopedSlots: {
default: () => { default: () => {
return ( return (
<div calss='menu-item' style="display:flex;justify-content:space-between;align-items:center"> <div class='menu-item'>
<span>{ this.$tl(item.captionTag,item.caption) }</span> <menu-icon item={item} class="menu-icon"/>
<span style="position:relative" v-badge={{count: this.counterdata ? this.counterdata[item.counterid] : null, offset: [-30,0]}} /> <span class="menu-caption">{ this.$tl(item.captionTag,item.caption) }</span>
</div> <span style="position:relative" v-badge={{count: this.counterdata ? this.counterdata[item.counterid] : null, offset: [-30,0]}} />
</div>
) )
}, },
} }
......
...@@ -68,6 +68,15 @@ export class AppCalendarBase extends CalendarControlBase { ...@@ -68,6 +68,15 @@ export class AppCalendarBase extends CalendarControlBase {
@Emit('ctrl-event') @Emit('ctrl-event')
public ctrlEvent({ controlname, action, data }: { controlname: string; action: string; data: any }): void { } public ctrlEvent({ controlname, action, data }: { controlname: string; action: string; data: any }): void { }
/**
* 销毁视图回调
*
* @memberof AppCalendarBase
*/
public destroyed() {
this.ctrlDestroyed();
}
/** /**
* TODO绘制日历项 * TODO绘制日历项
......
...@@ -101,10 +101,11 @@ export class AppDataViewBase extends DataViewControlBase { ...@@ -101,10 +101,11 @@ export class AppDataViewBase extends DataViewControlBase {
*/ */
public hasChildrenRender(h: any, group: any) { public hasChildrenRender(h: any, group: any) {
if (group.children.length > 0) { if (group.children.length > 0) {
const { cardColXS, cardColSM, cardColMD, cardColLG } = this.controlInstance;
return group.children.map((groupChild: any, index: number) => { return group.children.map((groupChild: any, index: number) => {
return ( return (
<a href={groupChild.starturl}> <a href={groupChild.starturl}>
<i-col style='min-height: 170px;margin-bottom: 10px;'> <i-col style='min-height: 170px;margin-bottom: 10px;' xs={cardColXS} sm={cardColSM} md={cardColMD} lg={cardColLG}>
{this.renderCard(groupChild)} {this.renderCard(groupChild)}
</i-col> </i-col>
</a> </a>
...@@ -202,9 +203,10 @@ export class AppDataViewBase extends DataViewControlBase { ...@@ -202,9 +203,10 @@ export class AppDataViewBase extends DataViewControlBase {
*/ */
public renderDataViewContent(h: CreateElement) { public renderDataViewContent(h: CreateElement) {
if (!this.isEnableGroup) { if (!this.isEnableGroup) {
const { cardColXS, cardColSM, cardColMD, cardColLG } = this.controlInstance;
return this.items.map((item: any, index: number) => { return this.items.map((item: any, index: number) => {
return ( return (
<i-col style='margin-bottom: 10px'> <i-col style='margin-bottom: 10px' xs={cardColXS} sm={cardColSM} md={cardColMD} lg={cardColLG}>
{this.renderCard(item)} {this.renderCard(item)}
</i-col> </i-col>
); );
......
...@@ -66,6 +66,15 @@ export class AppDataViewExpBarBase extends DataViewExpBarControlBase { ...@@ -66,6 +66,15 @@ export class AppDataViewExpBarBase extends DataViewExpBarControlBase {
@Emit('ctrl-event') @Emit('ctrl-event')
public ctrlEvent({ controlname, action, data }: { controlname: string, action: string, data: any }): void { } public ctrlEvent({ controlname, action, data }: { controlname: string, action: string, data: any }): void { }
/**
* 销毁视图回调
*
* @memberof AppDataViewBase
*/
public destroyed() {
this.ctrlDestroyed();
}
/** /**
* 绘制数据视图导航栏 * 绘制数据视图导航栏
* *
......
...@@ -67,6 +67,15 @@ export class AppListExpBarBase extends ListExpBarControlBase { ...@@ -67,6 +67,15 @@ export class AppListExpBarBase extends ListExpBarControlBase {
this.initCtrlToolBar(); this.initCtrlToolBar();
} }
/**
* 销毁视图回调
*
* @memberof AppListExpBarBase
*/
public destroyed() {
this.ctrlDestroyed();
}
/** /**
* 部件事件 * 部件事件
* *
......
...@@ -71,6 +71,15 @@ export class AppSearchFormBase extends SearchFormControlBase { ...@@ -71,6 +71,15 @@ export class AppSearchFormBase extends SearchFormControlBase {
@Emit('ctrl-event') @Emit('ctrl-event')
public ctrlEvent({ controlname, action, data }: { controlname: string; action: string; data: any }): void { } public ctrlEvent({ controlname, action, data }: { controlname: string; action: string; data: any }): void { }
/**
* 销毁视图回调
*
* @memberof AppSearchFormBase
*/
public destroyed() {
this.ctrlDestroyed();
}
/** /**
* 绘制子表单成员,布局控制 * 绘制子表单成员,布局控制
* *
......
...@@ -190,10 +190,11 @@ ...@@ -190,10 +190,11 @@
} }
.el-menu--horizontal { .el-menu--horizontal {
display: flex; display: flex;
width: calc(100vw - 1100px); max-width: 800px;
height: 50px; height: 50px;
flex-wrap: nowrap; flex-wrap: nowrap;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden;
background-color: var(--app-background-color-bright); background-color: var(--app-background-color-bright);
.el-menu-item { .el-menu-item {
height: 50px; height: 50px;
...@@ -297,11 +298,20 @@ ...@@ -297,11 +298,20 @@
justify-content: flex-start; justify-content: flex-start;
flex-wrap: wrap; flex-wrap: wrap;
> .app-middle-menu-item { > .app-middle-menu-item {
width: 320px;
margin: 12px; margin: 12px;
cursor: pointer; cursor: pointer;
color: var(--ctrl-font-color); color: var(--ctrl-font-color);
border-left: 10px solid var(--ctrl-font-color-bright); border-left: 10px solid var(--ctrl-font-color-bright);
.menu-item{
display: flex;
align-items: center;
.menu-icon {
margin-right: 12px;
}
.menu-caption {
margin-right: 36px;
}
}
> .ivu-card-body { > .ivu-card-body {
font-size: 16px; font-size: 16px;
} }
......
...@@ -295,6 +295,7 @@ export class ViewToolbar extends Vue { ...@@ -295,6 +295,7 @@ export class ViewToolbar extends Vue {
<app-button <app-button
caption={item.caption} caption={item.caption}
icon={item.icon} icon={item.icon}
iconcls={item.iconcls}
classContent={this.getToolBarItemClass(item)} classContent={this.getToolBarItemClass(item)}
loading={this.isViewLoading}> loading={this.isViewLoading}>
<icon type='ios-arrow-down'></icon> <icon type='ios-arrow-down'></icon>
......
...@@ -202,6 +202,9 @@ export default class UploadEditor extends EditorBase { ...@@ -202,6 +202,9 @@ export default class UploadEditor extends EditorBase {
* @memberof UploadEditor * @memberof UploadEditor
*/ */
public render(): any { public render(): any {
if (!this.editorIsLoaded) {
return null;
}
this.customProps.formState = this.contextState; this.customProps.formState = this.contextState;
this.customProps.ignorefieldvaluechange = this.ignorefieldvaluechange; this.customProps.ignorefieldvaluechange = this.ignorefieldvaluechange;
this.customProps.rowPreview = this.rowPreview; this.customProps.rowPreview = this.rowPreview;
......
...@@ -181,6 +181,7 @@ export class AppDefaultViewLayout extends ControlContainer { ...@@ -181,6 +181,7 @@ export class AppDefaultViewLayout extends ControlContainer {
} }
}) })
} }
this.containerDestroyed();
this.destroyUIContainer(); this.destroyUIContainer();
} }
......
...@@ -59,6 +59,15 @@ export class AppMPickUpViewBase extends MPickUpViewBase { ...@@ -59,6 +59,15 @@ export class AppMPickUpViewBase extends MPickUpViewBase {
} }
} }
/**
* 销毁视图回调
*
* @memberof AppMPickUpViewBase
*/
public destroyed(){
this.viewDestroyed();
}
/** /**
* 绘制目标部件 * 绘制目标部件
* *
......
...@@ -49,6 +49,15 @@ export class AppMPickUpView2Base extends MPickUpView2Base { ...@@ -49,6 +49,15 @@ export class AppMPickUpView2Base extends MPickUpView2Base {
super.onStaticPropsChange(newVal, oldVal); super.onStaticPropsChange(newVal, oldVal);
} }
} }
/**
* 销毁视图回调
*
* @memberof AppMPickUpView2Base
*/
public destroyed(){
this.viewDestroyed();
}
/** /**
* 渲染树导航栏 * 渲染树导航栏
......
...@@ -60,6 +60,15 @@ export class AppTabSearchViewBase extends TabSearchViewBase { ...@@ -60,6 +60,15 @@ export class AppTabSearchViewBase extends TabSearchViewBase {
} }
} }
/**
* 销毁视图回调
*
* @memberof AppTabSearchViewBase
*/
public destroyed(){
this.viewDestroyed();
}
/** /**
* 绘制目标部件 * 绘制目标部件
* *
......
...@@ -196,6 +196,17 @@ export class ControlContainer extends Vue { ...@@ -196,6 +196,17 @@ export class ControlContainer extends Vue {
this.initDefaultToolBar(); this.initDefaultToolBar();
} }
/**
* @description 容器销毁
* @memberof ControlContainer
*/
public containerDestroyed() {
if (this.engine) {
this.engine.destroyed();
}
this.viewCtx = null;
}
/** /**
* 销毁容器 * 销毁容器
* *
...@@ -594,7 +605,8 @@ export class ControlContainer extends Vue { ...@@ -594,7 +605,8 @@ export class ControlContainer extends Vue {
visabled: true, visabled: true,
itemType: item.itemType, itemType: item.itemType,
dataaccaction: '', dataaccaction: '',
actionLevel: (item as any).actionLevel actionLevel: (item as any).actionLevel,
iconcls: item.getPSSysImage()?.cssClass
}; };
items.forEach((_item: any) => { items.forEach((_item: any) => {
models.push(this.initToolBarItems(_item)); models.push(this.initToolBarItems(_item));
...@@ -1384,7 +1396,7 @@ export class ControlContainer extends Vue { ...@@ -1384,7 +1396,7 @@ export class ControlContainer extends Vue {
// } // }
}); });
} else if (viewNewAppUIlogic.batchAddOnly) { } else if (viewNewAppUIlogic.batchAddOnly) {
LogUtil.warn(this.$t('app.warn.unbatchadd')); LogUtil.warn(this.$t('app.warn.onlybatchadd'));
} else if (viewNewAppUIlogic.getNewDataPSAppView()) { } else if (viewNewAppUIlogic.getNewDataPSAppView()) {
const _this: any = this; const _this: any = this;
const newviewRef: IPSAppUILogicRefView | null = viewNewAppUIlogic.getNewDataPSAppView(); const newviewRef: IPSAppUILogicRefView | null = viewNewAppUIlogic.getNewDataPSAppView();
......
...@@ -29,10 +29,10 @@ export class AppDesign { ...@@ -29,10 +29,10 @@ export class AppDesign {
* vue 实例 * vue 实例
* *
* @private * @private
* @type {Vue} * @type {Vue | null}
* @memberof AppDesign * @memberof AppDesign
*/ */
private vueExample!: Vue; private vueExample: Vue | null = null;
/** /**
* 获取实例对象 * 获取实例对象
...@@ -53,17 +53,16 @@ export class AppDesign { ...@@ -53,17 +53,16 @@ export class AppDesign {
private createVueExample(params:any): Subject<any> { private createVueExample(params:any): Subject<any> {
if(this.vueExample){ if(this.vueExample){
this.vueExample.$destroy(); this.vueExample.$destroy();
this.vueExample = null;
} }
try { try {
let component = AppDesignCompponent; this.vueExample = new Vue({
const vm = new Vue({
render(h) { render(h) {
return h(component, {props:params} ); return h(AppDesignCompponent, {props:params} );
} }
}).$mount(); }).$mount();
this.vueExample = vm; document.body.appendChild(this.vueExample.$el);
document.body.appendChild(vm.$el); const comp: any = this.vueExample.$children[0];
const comp: any = vm.$children[0];
return comp.getSubject(); return comp.getSubject();
} catch (error) { } catch (error) {
console.error(error); console.error(error);
...@@ -86,4 +85,15 @@ export class AppDesign { ...@@ -86,4 +85,15 @@ export class AppDesign {
} }
} }
/**
* @description 销毁临时vue对象
* @memberof AppDrawer
*/
destroyVueExample() {
if (this.vueExample) {
this.vueExample.$destroy();
this.vueExample = null;
}
}
} }
\ No newline at end of file
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<script lang="ts"> <script lang="ts">
import { AppServiceBase, StudioActionUtil, Util } from 'ibiz-core'; import { AppServiceBase, StudioActionUtil, Util } from 'ibiz-core';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { AppDesign } from './app-design';
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'; import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
@Component({}) @Component({})
...@@ -98,6 +99,10 @@ export default class AppModelSetting extends Vue { ...@@ -98,6 +99,10 @@ export default class AppModelSetting extends Vue {
// }); // });
} }
public destroyed() {
AppDesign.getInstance().destroyVueExample();
}
/** /**
* 处理按钮点击 * 处理按钮点击
* *
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册