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

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

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