wfprocess-definition-grid-view-base.vue 57.3 KB
Newer Older
ibizdev's avatar
ibizdev committed
1
<template>
2
<div class='view-container degridview wfprocess-definition-grid-view'>
3
    <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="wfprocessdefinitiongridview"></app-studioaction>
ibizdev's avatar
ibizdev committed
4
    <card class='view-card '  :dis-hover="true" :bordered="false">
5
        <div slot='title' class="header-container">
6
        <span class='caption-info'>{{$t(model.srfCaption)}}</span>
7
        </div>
ibizdev's avatar
ibizdev committed
8 9 10
        <div class='content-container'>
            <div class='view-top-messages'>
            </div>
ibizdev's avatar
ibizdev committed
11
            <div style='margin-bottom: 6px;'>
12
                <i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' placeholder="流程定义名称" />
ibizdev's avatar
ibizdev committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
                <div class='pull-right'>
                    <div class='toolbar-container'>
                        <tooltip :transfer="true" :max-width="600">
                                <i-button v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' @click="toolbar_click({ tag: 'tbitem3' }, $event)">
                                    <i class='fa fa-file-text-o'></i>
                                    <span class='caption'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem3.caption')}}</span>
                                </i-button>
                            <div slot='content'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem3.tip')}}</div>
                        </tooltip>
                        <tooltip :transfer="true" :max-width="600">
                                <i-button v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)">
                                    <i class='fa fa-edit'></i>
                                    <span class='caption'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem4.caption')}}</span>
                                </i-button>
                            <div slot='content'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem4.tip')}}</div>
                        </tooltip>
                        <tooltip :transfer="true" :max-width="600">
                                <i-button v-show="toolBarModels.tbitem6.visabled" :disabled="toolBarModels.tbitem6.disabled" class='' @click="toolbar_click({ tag: 'tbitem6' }, $event)">
                                    <i class='fa fa-copy'></i>
                                    <span class='caption'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem6.caption')}}</span>
                                </i-button>
                            <div slot='content'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem6.tip')}}</div>
                        </tooltip>
                        <span class='seperator'>|</span>    <tooltip :transfer="true" :max-width="600">
                                <i-button v-show="toolBarModels.tbitem8.visabled" :disabled="toolBarModels.tbitem8.disabled" class='' @click="toolbar_click({ tag: 'tbitem8' }, $event)">
                                    <i class='fa fa-remove'></i>
                                    <span class='caption'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem8.caption')}}</span>
                                </i-button>
                            <div slot='content'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem8.tip')}}</div>
                        </tooltip>
                        <span class='seperator'>|</span>    <tooltip :transfer="true" :max-width="600">
                            <app-export-excel :item="toolBarModels.tbitem13" :caption="$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem13.caption')" @exportexcel="toolbar_click({ tag: 'tbitem13' }, $event)"></app-export-excel>
                            <div slot='content'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem13.tip')}}</div>
                        </tooltip>
                        <span class='seperator'>|</span>    <dropdown v-show="toolBarModels.tbitem16.visabled" trigger='click'>
                            <tooltip :transfer="true" :max-width="600">
                                    <i-button class=''>
                                        <i class=''></i>
                                        <span class='caption'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem16.caption')}}</span>
                                        <icon type="ios-arrow-down"></icon>
                                    </i-button>
                                <div slot='content'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem16.tip')}}</div>
                            </tooltip>
                            <dropdown-menu slot='list'>
                                <dropdown-item>
                                    <tooltip :transfer="true" :max-width="600">
                                <i-button v-show="toolBarModels.tbitem21.visabled" :disabled="toolBarModels.tbitem21.disabled" class='' @click="toolbar_click({ tag: 'tbitem21' }, $event)">
                                    <i class='fa fa-download'></i>
                                    <span class='caption'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem21.caption')}}</span>
                                </i-button>
                            <div slot='content'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem21.tip')}}</div>
                        </tooltip>
                        
                        
                                </dropdown-item>
                                <dropdown-item>
                                    <tooltip :transfer="true" :max-width="600">
                                <i-button v-show="toolBarModels.tbitem23.visabled" :disabled="toolBarModels.tbitem23.disabled" class='' @click="toolbar_click({ tag: 'tbitem23' }, $event)">
                                    <i class='fa fa-upload'></i>
                                    <span class='caption'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem23.caption')}}</span>
                                </i-button>
                            <div slot='content'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem23.tip')}}</div>
                        </tooltip>
                        
                        
                                </dropdown-item>
                            </dropdown-menu>
                        </dropdown>
                        <span class='seperator'>|</span>    <tooltip :transfer="true" :max-width="600">
                                <i-button v-show="toolBarModels.tbitem19.visabled" :disabled="toolBarModels.tbitem19.disabled" class='' @click="toolbar_click({ tag: 'tbitem19' }, $event)">
                                    <i class='fa fa-filter'></i>
                                    <span class='caption'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem19.caption')}}</span>
                                </i-button>
                            <div slot='content'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem19.tip')}}</div>
                        </tooltip>
                        <tooltip :transfer="true" :max-width="600">
                                <i-button v-show="toolBarModels.tbitem18.visabled" :disabled="toolBarModels.tbitem18.disabled" class='' @click="toolbar_click({ tag: 'tbitem18' }, $event)">
                                    <i class='fa fa-question'></i>
                                    <span class='caption'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem18.caption')}}</span>
                                </i-button>
                            <div slot='content'>{{$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem18.tip')}}</div>
                        </tooltip>
                    </div>
                </div>
ibizdev's avatar
ibizdev committed
97
            </div>
ibizdev's avatar
ibizdev committed
98 99 100 101 102 103 104 105
            <view_searchform 
                :viewState="viewState"  
                :viewparams="viewparams" 
                :context="context" 
                :showBusyIndicator="true"
                v-show="isExpandSearchForm"
                loaddraftAction="FilterGetDraft"
                loadAction="FilterGet"
ibizdev's avatar
ibizdev committed
106
            
ibizdev's avatar
ibizdev committed
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
                name="searchform"  
                ref='searchform' 
                @save="searchform_save($event)"  
                @search="searchform_search($event)"  
                @load="searchform_load($event)"  
                @closeview="closeView($event)">
            </view_searchform>
            <view_grid 
                :viewState="viewState"  
                :viewparams="viewparams" 
                :context="context" 
                :isSingleSelect="isSingleSelect"
                :showBusyIndicator="true"
                :isOpenEdit="false"
                :gridRowActiveMode="gridRowActiveMode"
                @save="onSave"
                updateAction=""
                removeAction="Remove"
                loaddraftAction=""
                loadAction=""
                createAction=""
                fetchAction="FetchDefault"
                :newdata="newdata"
                :opendata="opendata"
                name="grid"  
                ref='grid' 
                @selectionchange="grid_selectionchange($event)"  
                @beforeload="grid_beforeload($event)"  
                @rowdblclick="grid_rowdblclick($event)"  
                @remove="grid_remove($event)"  
                @load="grid_load($event)"  
                @closeview="closeView($event)">
            </view_grid>
            <div class='view-bottom-messages'>
            </div>
        </div>
    </card>
</div>
</template>

ibizdev's avatar
ibizdev committed
147

ibizdev's avatar
ibizdev committed
148
<script lang='tsx'>
149
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
ibizdev's avatar
ibizdev committed
150
import { UIActionTool,Util } from '@/utils';
151
import NavDataService from '@/service/app/navdata-service';
152
import { Subject,Subscription } from 'rxjs';
ibizdev's avatar
ibizdev committed
153
import WFProcessDefinitionService from '@/service/wfprocess-definition/wfprocess-definition-service';
154
import WFProcessDefinitionAuthService from '@/authservice/wfprocess-definition/wfprocess-definition-auth-service';
ibizdev's avatar
ibizdev committed
155 156 157 158

import GridViewEngine from '@engine/view/grid-view-engine';


159
import WFProcessDefinitionUIService from '@/uiservice/wfprocess-definition/wfprocess-definition-ui-service';
ibizdev's avatar
ibizdev committed
160 161
import CodeListService from "@service/app/codelist-service";

ibizdev's avatar
ibizdev committed
162 163 164 165 166 167 168 169 170 171 172 173 174

@Component({
    components: {
    },
})
export default class WFProcessDefinitionGridViewBase extends Vue {

    /**
     * 实体服务对象
     *
     * @type {WFProcessDefinitionService}
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
175
    public appEntityService: WFProcessDefinitionService = new WFProcessDefinitionService;
ibizdev's avatar
ibizdev committed
176

177
    /**
178
     * 实体UI服务对象
179
     *
180
     * @type WFProcessDefinitionUIService
181 182
     * @memberof WFProcessDefinitionGridViewBase
     */
183
    public appUIService: WFProcessDefinitionUIService = new WFProcessDefinitionUIService(this.$store);
184

ibizdev's avatar
ibizdev committed
185 186 187 188 189 190 191

    /**
     * 计数器服务对象集合
     *
     * @type {Array<*>}
     * @memberof WFProcessDefinitionGridViewBase
     */    
ibizdev's avatar
ibizdev committed
192
    public counterServiceArray:Array<any> = [];
ibizdev's avatar
ibizdev committed
193 194 195 196 197 198 199 200 201
    
    /**
     * 数据变化
     *
     * @param {*} val
     * @returns {*}
     * @memberof WFProcessDefinitionGridViewBase
     */
    @Emit() 
ibizdev's avatar
ibizdev committed
202
    public viewDatasChange(val: any):any {
ibizdev's avatar
ibizdev committed
203 204 205 206 207 208 209 210 211
        return val;
    }

    /**
     * 传入视图上下文
     *
     * @type {string}
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
212
    @Prop() public viewdata!: string;
ibizdev's avatar
ibizdev committed
213 214 215 216 217 218 219

    /**
     * 传入视图参数
     *
     * @type {string}
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
220
    @Prop() public viewparam!: string;
ibizdev's avatar
ibizdev committed
221 222 223 224 225 226 227

    /**
     * 视图默认使用
     *
     * @type {boolean}
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
228
    @Prop({ default: true }) public viewDefaultUsage!: boolean;
ibizdev's avatar
ibizdev committed
229

230 231 232 233 234 235
    /**
     * 视图默认使用
     *
     * @type {string}
     * @memberof WFProcessDefinitionGridViewBase
     */
236
    @Inject({from:'navModel',default: 'tab'})
237 238
    public navModel!:string;

ibizdev's avatar
ibizdev committed
239 240 241 242 243 244
	/**
	 * 视图标识
	 *
	 * @type {string}
	 * @memberof WFProcessDefinitionGridViewBase
	 */
ibizdev's avatar
ibizdev committed
245
	public viewtag: string = 'a06aed382ebc28e6521b4398880388cd';
ibizdev's avatar
ibizdev committed
246 247 248 249 250 251 252

	/**
	 * 自定义视图导航上下文集合
	 *
	 * @type {*}
	 * @memberof WFProcessDefinitionGridViewBase
	 */
ibizdev's avatar
ibizdev committed
253
    public customViewNavContexts:any ={
ibizdev's avatar
ibizdev committed
254 255 256 257 258 259 260 261
    };

	/**
	 * 自定义视图导航参数集合
	 *
	 * @type {*}
	 * @memberof WFProcessDefinitionGridViewBase
	 */
ibizdev's avatar
ibizdev committed
262
    public customViewParams:any ={
ibizdev's avatar
ibizdev committed
263 264 265 266 267 268 269 270
    };

    /**
     * 视图模型数据
     *
     * @type {*}
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
271
    public model: any = {
ibizdev's avatar
ibizdev committed
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
        srfCaption: 'entities.wfprocessdefinition.views.gridview.caption',
        srfTitle: 'entities.wfprocessdefinition.views.gridview.title',
        srfSubTitle: 'entities.wfprocessdefinition.views.gridview.subtitle',
        dataInfo: ''
    }

    /**
     * 视图参数变化
     *
     * @param {*} newVal
     * @param {*} oldVal
     * @memberof WFProcessDefinitionGridViewBase
     */
    @Watch('viewparam',{immediate: true, deep: true})
    onParamData(newVal: any, oldVal: any) {
        if(newVal){
            for(let key in this.viewparams){
                delete this.viewparams[key];
            }
            Object.assign(this.viewparams, JSON.parse(this.viewparam));
            
        } 
    }

    /**
     * 处理应用上下文变化
     *
     * @param {*} newVal
     * @param {*} oldVal
     * @memberof WFProcessDefinitionGridViewBase
     */
    @Watch('viewdata')
    onViewData(newVal: any, oldVal: any) {
        const _this: any = this;
        if (!Object.is(newVal, oldVal) && _this.engine) {
307 308 309 310 311
            this.$nextTick(()=>{
              _this.parseViewParam();
              _this.engine.load();
              
            });
ibizdev's avatar
ibizdev committed
312 313 314 315 316 317 318 319 320
        }
    }

    /**
     * 容器模型
     *
     * @type {*}
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
321
    public containerModel: any = {
ibizdev's avatar
ibizdev committed
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345
        view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
        view_grid: { name: 'grid', type: 'GRID' },
        view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
    };

    /**
     *  计数器刷新
     *
     * @memberof WFProcessDefinitionGridViewBase
     */
    public counterRefresh(){
        const _this:any =this;
        if(_this.counterServiceArray && _this.counterServiceArray.length >0){
            _this.counterServiceArray.forEach((item:any) =>{
                if(item.refreshData && item.refreshData instanceof Function){
                    item.refreshData();
                }
            })
        }
    }

    /**
     * 视图状态订阅对象
     *
ibizdev's avatar
ibizdev committed
346
     * @public
ibizdev's avatar
ibizdev committed
347 348 349
     * @type {Subject<{action: string, data: any}>}
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
350
    public viewState: Subject<ViewState> = new Subject();
ibizdev's avatar
ibizdev committed
351 352 353 354 355 356 357
    /**
     * 工具栏模型
     *
     * @type {*}
     * @memberof WFProcessDefinitionGridView
     */
    public toolBarModels: any = {
358
        tbitem3: { name: 'tbitem3', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '' } },
ibizdev's avatar
ibizdev committed
359

360
        tbitem4: { name: 'tbitem4', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
ibizdev's avatar
ibizdev committed
361

362
        tbitem6: { name: 'tbitem6', caption: '拷贝', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' } },
ibizdev's avatar
ibizdev committed
363 364

        tbitem7: {  name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
365
        tbitem8: { name: 'tbitem8', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } },
ibizdev's avatar
ibizdev committed
366 367

        tbitem9: {  name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
368
        tbitem13: { name: 'tbitem13', caption: '导出', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000  },
ibizdev's avatar
ibizdev committed
369 370 371

        tbitem10: {  name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
        tbitem16: { name: 'tbitem16', caption: '其它', disabled: false, type: 'ITEMS', visabled: true, dataaccaction: '', uiaction: { } }, 
372
 tbitem21: { name: 'tbitem21', caption: '导出数据模型', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportModel', target: '' } },
ibizdev's avatar
ibizdev committed
373

374
 tbitem23: { name: 'tbitem23', caption: '数据导入', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Import', target: '' } },
ibizdev's avatar
ibizdev committed
375 376 377


        tbitem17: {  name: 'tbitem17', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
378
        tbitem19: { name: 'tbitem19', caption: '过滤', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '' } },
ibizdev's avatar
ibizdev committed
379

380
        tbitem18: { name: 'tbitem18', caption: '帮助', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Help', target: '' } },
ibizdev's avatar
ibizdev committed
381 382 383 384 385 386

    };




ibizdev's avatar
ibizdev committed
387

ibizdev's avatar
ibizdev committed
388 389 390
    /**
     * 视图引擎
     *
ibizdev's avatar
ibizdev committed
391
     * @public
ibizdev's avatar
ibizdev committed
392 393 394
     * @type {Engine}
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
395
    public engine: GridViewEngine = new GridViewEngine();
ibizdev's avatar
ibizdev committed
396 397 398 399

    /**
     * 引擎初始化
     *
ibizdev's avatar
ibizdev committed
400
     * @public
ibizdev's avatar
ibizdev committed
401 402
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
403
    public engineInit(): void {
ibizdev's avatar
ibizdev committed
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419
        this.engine.init({
            view: this,
            opendata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
                this.opendata(args,fullargs, params, $event, xData);
            },
            newdata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
                this.newdata(args,fullargs, params, $event, xData);
            },
            grid: this.$refs.grid,
            searchform: this.$refs.searchform,
            keyPSDEField: 'wfprocessdefinition',
            majorPSDEField: 'definitionname',
            isLoadDefault: true,
        });
    }

420 421 422 423 424 425
    /**
     * 应用导航服务
     *
     * @type {*}
     * @memberof WFProcessDefinitionGridViewBase
     */
426 427 428 429 430 431 432 433 434 435
    public  navDataService = NavDataService.getInstance(this.$store);

    /**
    * 导航服务事件
    *
    * @public
    * @type {(Subscription | undefined)}
    * @memberof WFProcessDefinitionGridViewBase
    */
    public serviceStateEvent: Subscription | undefined;
436

ibizdev's avatar
ibizdev committed
437 438 439 440 441 442
    /**
     * 应用上下文
     *
     * @type {*}
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
443
    public context:any = {};
ibizdev's avatar
ibizdev committed
444 445 446 447 448 449 450

    /**
     * 视图参数
     *
     * @type {*}
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
451
    public viewparams:any = {};
ibizdev's avatar
ibizdev committed
452

453 454 455 456 457 458 459 460
    /**
     * 视图缓存数据
     *
     * @type {*}
     * @memberof WFProcessDefinitionGridViewBase
     */
    public viewCacheData:any;

ibizdev's avatar
ibizdev committed
461 462 463
    /**
     * 解析视图参数
     *
ibizdev's avatar
ibizdev committed
464
     * @public
ibizdev's avatar
ibizdev committed
465 466
     * @memberof WFProcessDefinitionGridViewBase
     */
467
    public parseViewParam(inputvalue:any = null): void {
ibizdev's avatar
ibizdev committed
468 469 470 471 472 473 474 475 476 477 478
        for(let key in this.context){
            delete this.context[key];
        }
        if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
            Object.assign(this.context, JSON.parse(this.viewdata));
            if(this.context && this.context.srfparentdename){
                Object.assign(this.viewparams,{srfparentdename:this.context.srfparentdename});
            }
            if(this.context && this.context.srfparentkey){
                Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
            }
479 480 481
            if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
                Object.assign(this.context,this.$store.getters.getAppData().context);
            }
ibizdev's avatar
ibizdev committed
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496
            this.handleCustomViewData();
            return;
        }
        const path = (this.$route.matched[this.$route.matched.length - 1]).path;
        const keys: Array<any> = [];
        const curReg = this.$pathToRegExp.pathToRegexp(path, keys);
        const matchArray = curReg.exec(this.$route.path);
        let tempValue: Object = {};
        keys.forEach((item: any, index: number) => {
            Object.defineProperty(tempValue, item.name, {
                enumerable: true,
                value: matchArray[index + 1]
            });
        });
        this.$viewTool.formatRouteParams(tempValue,this.$route,this.context,this.viewparams);
497 498 499
        if(inputvalue){
            Object.assign(this.context,{'wfprocessdefinition':inputvalue});
        }
ibizdev's avatar
ibizdev committed
500 501 502 503 504 505
        if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
            Object.assign(this.context,this.$store.getters.getAppData().context);
        }
        //初始化视图唯一标识
        Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
        this.handleCustomViewData();
506
        //初始化导航数据
507
        this.initNavDataWithRoute();
ibizdev's avatar
ibizdev committed
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542
    }

    /**
     * 处理自定义视图数据
     *
     * @memberof WFProcessDefinitionGridViewBase
     */
	public handleCustomViewData(){
		if(Object.keys(this.customViewNavContexts).length > 0){
			Object.keys(this.customViewNavContexts).forEach((item:any) =>{
				let tempContext:any = {};
				let curNavContext:any = this.customViewNavContexts[item];
				this.handleCustomDataLogic(curNavContext,tempContext,item);
				Object.assign(this.context,tempContext);
			})
		}
		if(Object.keys(this.customViewParams).length > 0){
			Object.keys(this.customViewParams).forEach((item:any) =>{
				let tempParam:any = {};
				let curNavParam:any = this.customViewParams[item];
				this.handleCustomDataLogic(curNavParam,tempParam,item);
				Object.assign(this.viewparams,tempParam);
			})
		}
	}

    /**
     * 处理自定义视图数据逻辑
     *
     * @memberof WFProcessDefinitionGridViewBase
     */
	public handleCustomDataLogic(curNavData:any,tempData:any,item:string){
		// 直接值直接赋值
		if(curNavData.isRawValue){
			if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
ibizdev's avatar
ibizdev committed
543
                Object.defineProperty(tempData, item.toLowerCase(), {
ibizdev's avatar
ibizdev committed
544 545 546 547 548 549
                    value: null,
                    writable : true,
                    enumerable : true,
                    configurable : true
                });
            }else{
ibizdev's avatar
ibizdev committed
550
                Object.defineProperty(tempData, item.toLowerCase(), {
ibizdev's avatar
ibizdev committed
551 552 553 554 555 556 557 558
                    value: curNavData.value,
                    writable : true,
                    enumerable : true,
                    configurable : true
                });
            }
		}else{
			// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
559
			if(this.context[(curNavData.value).toLowerCase()] != null){
ibizdev's avatar
ibizdev committed
560
				Object.defineProperty(tempData, item.toLowerCase(), {
ibizdev's avatar
ibizdev committed
561
					value: this.context[(curNavData.value).toLowerCase()],
ibizdev's avatar
ibizdev committed
562 563 564 565 566
					writable : true,
					enumerable : true,
					configurable : true
				});
			}else{
567
				if(this.viewparams[(curNavData.value).toLowerCase()] != null){
ibizdev's avatar
ibizdev committed
568
					Object.defineProperty(tempData, item.toLowerCase(), {
ibizdev's avatar
ibizdev committed
569
						value: this.viewparams[(curNavData.value).toLowerCase()],
ibizdev's avatar
ibizdev committed
570 571 572 573 574
						writable : true,
						enumerable : true,
						configurable : true
					});
				}else{
ibizdev's avatar
ibizdev committed
575
					Object.defineProperty(tempData, item.toLowerCase(), {
ibizdev's avatar
ibizdev committed
576 577 578 579 580 581 582 583 584
						value: null,
						writable : true,
						enumerable : true,
						configurable : true
					});
				}
			}
		}
	}
585 586

    /**
587
     * 初始化导航数据(路由模式)
588 589 590
     *
     * @memberof WFProcessDefinitionGridViewBase
     */
591 592
    public initNavDataWithRoute(data:any = null, isNew:boolean = false,  isAlways:boolean = false){
        if( isAlways || (this.viewDefaultUsage && Object.is(this.navModel,"route")) ){
593
            this.navDataService.addNavData({id:'wfprocess-definition-grid-view',tag:this.viewtag,srfkey:isNew ? null : this.context.wfprocessdefinition,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
594 595 596 597 598 599 600 601
        }
    }

    /**
     * 初始化导航数据(分页模式)
     *
     * @memberof WFProcessDefinitionGridViewBase
     */
602 603
    public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true, isAlways:boolean = false){
        if( isAlways || (this.viewDefaultUsage && !Object.is(this.navModel,"route")) ){
604
            this.navDataService.addNavDataByOnly({id:'wfprocess-definition-grid-view',tag:this.viewtag,srfkey:this.context.wfprocessdefinition,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd);
605 606
        }
    }
ibizdev's avatar
ibizdev committed
607 608 609 610 611 612 613
	

    /**
     * Vue声明周期
     *
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
614
    public created() {
ibizdev's avatar
ibizdev committed
615 616 617 618 619 620 621 622
        this.afterCreated();
    }

    /**
     * 执行created后的逻辑
     *
     * @memberof WFProcessDefinitionGridViewBase
     */    
ibizdev's avatar
ibizdev committed
623
    public afterCreated(){
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641
        let _this:any = this;
        const secondtag = _this.$util.createUUID();
        _this.$store.commit('viewaction/createdView', { viewtag: _this.viewtag, secondtag: secondtag });
        _this.viewtag = secondtag;
        _this.parseViewParam();
        _this.serviceStateEvent = _this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
            if(!Object.is(name,'wfprocess-definition-grid-view')){
                return;
            }
            if (Object.is(action, 'viewrefresh')) {
                _this.$nextTick(()=>{
                    _this.parseViewParam(data);
                    if(_this.engine){
                        _this.engine.load();
                    }
                }); 
            }
        });
ibizdev's avatar
ibizdev committed
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660
        if(this.formDruipart){
            this.formDruipart.subscribe((res:any) =>{
                if(Object.is(res.action,'save')){
                    this.viewState.next({ tag:'grid', action: 'save', data: this.viewparams });
                }
                if(Object.is(res.action,'load')){
                    const _this: any = this;
                    _this.engine.load(res.data,true);
                }
            });
        }

    }

    /**
     * 销毁之前
     *
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
661
    public beforeDestroy() {
ibizdev's avatar
ibizdev committed
662 663 664 665 666 667 668 669
        this.$store.commit('viewaction/removeView', this.viewtag);
    }

    /**
     * Vue声明周期(组件初始化完毕)
     *
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
670
    public mounted() {
ibizdev's avatar
ibizdev committed
671 672 673 674 675 676 677 678
        this.afterMounted();
    }

    /**
     * 执行mounted后的逻辑
     * 
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
679
    public afterMounted(){
ibizdev's avatar
ibizdev committed
680 681 682 683 684 685
        const _this: any = this;
        _this.engineInit();
        if (_this.loadModel && _this.loadModel instanceof Function) {
            _this.loadModel();
        }
        
ibizdev's avatar
ibizdev committed
686

ibizdev's avatar
ibizdev committed
687 688 689 690 691 692 693 694 695 696
    }


    /**
     * toolbar 部件 click 事件
     *
     * @param {*} [args={}]
     * @param {*} $event
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
697
    public toolbar_click($event: any, $event2?: any) {
ibizdev's avatar
ibizdev committed
698
        if (Object.is($event.tag, 'tbitem3')) {
699
            this.toolbar_tbitem3_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
700 701
        }
        if (Object.is($event.tag, 'tbitem4')) {
702
            this.toolbar_tbitem4_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
703 704
        }
        if (Object.is($event.tag, 'tbitem5')) {
705
            this.toolbar_tbitem5_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
706 707
        }
        if (Object.is($event.tag, 'tbitem6')) {
708
            this.toolbar_tbitem6_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
709 710
        }
        if (Object.is($event.tag, 'tbitem24')) {
711
            this.toolbar_tbitem24_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
712 713
        }
        if (Object.is($event.tag, 'tbitem25')) {
714
            this.toolbar_tbitem25_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
715 716
        }
        if (Object.is($event.tag, 'tbitem8')) {
717
            this.toolbar_tbitem8_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
718 719
        }
        if (Object.is($event.tag, 'tbitem13')) {
720
            this.toolbar_tbitem13_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
721 722
        }
        if (Object.is($event.tag, 'tbitem11')) {
723
            this.toolbar_tbitem11_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
724 725
        }
        if (Object.is($event.tag, 'tbitem21')) {
726
            this.toolbar_tbitem21_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
727 728
        }
        if (Object.is($event.tag, 'tbitem23')) {
729
            this.toolbar_tbitem23_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
730 731
        }
        if (Object.is($event.tag, 'tbitem19')) {
732
            this.toolbar_tbitem19_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
733 734
        }
        if (Object.is($event.tag, 'tbitem18')) {
735
            this.toolbar_tbitem18_click(null, '', $event2);
ibizdev's avatar
ibizdev committed
736 737 738 739 740 741 742 743 744 745 746
        }
    }


    /**
     * grid 部件 selectionchange 事件
     *
     * @param {*} [args={}]
     * @param {*} $event
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
747
    public grid_selectionchange($event: any, $event2?: any) {
ibizdev's avatar
ibizdev committed
748 749 750 751 752 753 754 755 756 757 758
        this.engine.onCtrlEvent('grid', 'selectionchange', $event);
    }


    /**
     * grid 部件 beforeload 事件
     *
     * @param {*} [args={}]
     * @param {*} $event
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
759
    public grid_beforeload($event: any, $event2?: any) {
ibizdev's avatar
ibizdev committed
760 761 762 763 764 765 766 767 768 769 770
        this.engine.onCtrlEvent('grid', 'beforeload', $event);
    }


    /**
     * grid 部件 rowdblclick 事件
     *
     * @param {*} [args={}]
     * @param {*} $event
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
771
    public grid_rowdblclick($event: any, $event2?: any) {
ibizdev's avatar
ibizdev committed
772 773 774 775 776 777 778 779 780 781 782
        this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
    }


    /**
     * grid 部件 remove 事件
     *
     * @param {*} [args={}]
     * @param {*} $event
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
783
    public grid_remove($event: any, $event2?: any) {
ibizdev's avatar
ibizdev committed
784 785 786 787 788 789 790 791 792 793 794
        this.engine.onCtrlEvent('grid', 'remove', $event);
    }


    /**
     * grid 部件 load 事件
     *
     * @param {*} [args={}]
     * @param {*} $event
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
795
    public grid_load($event: any, $event2?: any) {
ibizdev's avatar
ibizdev committed
796 797 798 799 800 801 802 803 804 805 806
        this.engine.onCtrlEvent('grid', 'load', $event);
    }


    /**
     * searchform 部件 save 事件
     *
     * @param {*} [args={}]
     * @param {*} $event
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
807
    public searchform_save($event: any, $event2?: any) {
ibizdev's avatar
ibizdev committed
808 809 810 811 812 813 814 815 816 817 818
        this.engine.onCtrlEvent('searchform', 'save', $event);
    }


    /**
     * searchform 部件 search 事件
     *
     * @param {*} [args={}]
     * @param {*} $event
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
819
    public searchform_search($event: any, $event2?: any) {
ibizdev's avatar
ibizdev committed
820 821 822 823 824 825 826 827 828 829 830
        this.engine.onCtrlEvent('searchform', 'search', $event);
    }


    /**
     * searchform 部件 load 事件
     *
     * @param {*} [args={}]
     * @param {*} $event
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
831
    public searchform_load($event: any, $event2?: any) {
ibizdev's avatar
ibizdev committed
832 833 834 835 836 837 838 839 840 841 842 843 844
        this.engine.onCtrlEvent('searchform', 'load', $event);
    }



    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
845
    public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
846 847 848 849 850 851 852 853 854 855 856 857
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
858 859 860
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
861 862 863 864 865 866 867 868 869 870 871 872
        // 界面行为
        this.New(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
873
    public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
874 875 876 877 878 879 880 881 882 883 884 885
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
886 887 888
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
889 890 891 892 893 894 895 896 897 898 899 900
        // 界面行为
        this.Edit(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
901
    public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
902 903 904 905 906 907 908 909 910 911 912 913
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
914 915 916
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
917 918 919 920 921 922 923 924 925 926 927 928
        // 界面行为
        this.View(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
929
    public toolbar_tbitem6_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
930 931 932 933 934 935 936 937 938 939 940 941
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
942 943 944
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
945 946 947 948 949 950 951 952 953 954 955 956
        // 界面行为
        this.Copy(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
957
    public toolbar_tbitem24_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
958 959 960 961 962 963 964 965 966 967 968 969
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
970 971 972
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
973 974 975 976 977 978 979 980 981 982 983 984
        // 界面行为
        this.ToggleRowEdit(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
985
    public toolbar_tbitem25_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
986 987 988 989 990 991 992 993 994 995 996 997
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
998 999 1000
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012
        // 界面行为
        this.NewRow(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
1013
    public toolbar_tbitem8_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
1026 1027 1028
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
        // 界面行为
        this.Remove(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
1041
    public toolbar_tbitem13_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
1054 1055 1056
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068
        // 界面行为
        this.ExportExcel(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
1069
    public toolbar_tbitem11_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
1082 1083 1084
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096
        // 界面行为
        this.Print(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
1097
    public toolbar_tbitem21_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
1110 1111 1112
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124
        // 界面行为
        this.ExportModel(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
1125
    public toolbar_tbitem23_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
1138 1139 1140
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152
        // 界面行为
        this.Import(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
1153
    public toolbar_tbitem19_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
1166 1167 1168
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180
        // 界面行为
        this.ToggleFilter(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 逻辑事件
     *
     * @param {*} [params={}]
     * @param {*} [tag]
     * @param {*} [$event]
     * @memberof 
     */
ibizdev's avatar
ibizdev committed
1181
    public toolbar_tbitem18_click(params: any = {}, tag?: any, $event?: any) {
ibizdev's avatar
ibizdev committed
1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193
        // 参数
        // 取数
        let datas: any[] = [];
        let xData: any = null;
        // _this 指向容器对象
        const _this: any = this;
        let paramJO:any = {};
        let contextJO:any = {};
        xData = this.$refs.grid;
        if (xData.getDatas && xData.getDatas instanceof Function) {
            datas = [...xData.getDatas()];
        }
1194 1195 1196
        if(params){
          datas = [params];
        }
ibizdev's avatar
ibizdev committed
1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
        // 界面行为
        this.Help(datas, contextJO,paramJO,  $event, xData,this,"WFProcessDefinition");
    }

    /**
     * 打开新建数据视图
     *
     * @param {any[]} args
     * @param {*} [params]
     * @param {*} [fullargs]
     * @param {*} [$event]
     * @param {*} [xData]
     * @memberof WFProcessDefinitionGridView
     */
ibizdev's avatar
ibizdev committed
1211
    public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
1212 1213
        let localContext:any = null;
        let localViewParam:any =null;
ibizdev's avatar
ibizdev committed
1214
        const data: any = {};
ibizdev's avatar
ibizdev committed
1215 1216 1217
        if(args[0].srfsourcekey){
            data.srfsourcekey = args[0].srfsourcekey;
        }
1218 1219
        let tempContext = JSON.parse(JSON.stringify(this.context));
        delete tempContext.wfprocessdefinition;
ibizdev's avatar
ibizdev committed
1220
        if(args.length >0){
1221
            Object.assign(tempContext,args[0]);
ibizdev's avatar
ibizdev committed
1222 1223 1224 1225 1226 1227 1228 1229 1230 1231
        }
        const deResParameters: any[] = [];
        const parameters: any[] = [
            { pathName: 'wfprocessdefinitions', parameterName: 'wfprocessdefinition' },
            { pathName: 'editview', parameterName: 'editview' },
        ];
        const _this: any = this;
        const openIndexViewTab = (data: any) => {
            const _data: any = { w: (new Date().getTime()) };
            Object.assign(_data, data);
1232
            const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
ibizdev's avatar
ibizdev committed
1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248
            this.$router.push(routePath);
        }
        openIndexViewTab(data);
    }


    /**
     * 打开编辑数据视图
     *
     * @param {any[]} args
     * @param {*} [params]
     * @param {*} [fullargs]
     * @param {*} [$event]
     * @param {*} [xData]
     * @memberof WFProcessDefinitionGridView
     */
1249
    public opendata(args: any[],fullargs?:any,params?: any, $event?: any, xData?: any) {
1250 1251 1252 1253 1254 1255 1256
        if(!this.viewDefaultUsage){
            if(Object.is(this.navModel,"route")){
                this.initNavDataWithRoute(this.viewCacheData, false, true);
            }else{
                this.initNavDataWithTab(this.viewCacheData, false, true);
            }
        }
1257 1258
        let localContext:any = null;
        let localViewParam:any =null;
ibizdev's avatar
ibizdev committed
1259
        const data: any = {};
1260
        let tempContext = JSON.parse(JSON.stringify(this.context));
ibizdev's avatar
ibizdev committed
1261
        if(args.length >0){
1262
            Object.assign(tempContext,args[0]);
ibizdev's avatar
ibizdev committed
1263 1264 1265 1266 1267 1268 1269
        }
        const deResParameters: any[] = [];
        const parameters: any[] = [
            { pathName: 'wfprocessdefinitions', parameterName: 'wfprocessdefinition' },
            { pathName: 'editview', parameterName: 'editview' },
        ];
        const _this: any = this;
1270 1271 1272
        if(fullargs && fullargs.copymode){
            Object.assign(data,{copymode:true});
        }
ibizdev's avatar
ibizdev committed
1273
        const openIndexViewTab = (data: any) => {
1274
            const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
ibizdev's avatar
ibizdev committed
1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291
            this.$router.push(routePath);
        }
        openIndexViewTab(data);
    }


    /**
     * 新建
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1292
    public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1293 1294 1295
         const _this: any = this;
        if (_this.newdata && _this.newdata instanceof Function) {
            const data: any = {};
ibizdev's avatar
ibizdev committed
1296
            _this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
ibizdev's avatar
ibizdev committed
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311
        } else {
            _this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
        }
    }
    /**
     * 编辑
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1312
    public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337
        if (args.length === 0) {
            return;
        }
        const _this: any = this;
        if (_this.opendata && _this.opendata instanceof Function) {
            const data: any = { };
            if (args.length > 0) {
                Object.assign(data, { wfprocessdefinition: args[0].wfprocessdefinition })
            }
            _this.opendata([{ ...data }], params, $event, xData);
        } else {
            _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
        }
    }
    /**
     * 查看
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1338
    public View(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363
        if (args.length === 0) {
            return;
        }
        const _this: any = this;
        if (_this.opendata && _this.opendata instanceof Function) {
            const data: any = { };
            if (args.length > 0) {
                Object.assign(data, { wfprocessdefinition: args[0].wfprocessdefinition })
            }
            _this.opendata([{ ...data }], params, $event, xData);
        } else {
            _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
        }
    }
    /**
     * 拷贝
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1364
    public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1365 1366 1367 1368
        if (args.length === 0) {
            return;
        }
        const _this: any = this;
1369 1370
        if (_this.opendata && _this.opendata instanceof Function) {
            const data: any = { };
ibizdev's avatar
ibizdev committed
1371
            if (args.length > 0) {
1372
                Object.assign(data, { wfprocessdefinition: args[0].wfprocessdefinition });
ibizdev's avatar
ibizdev committed
1373
            }
1374 1375 1376
            if(!params) params = {};
            Object.assign(params,{copymode:true});
            _this.opendata([{ ...data }], params, $event, xData);
ibizdev's avatar
ibizdev committed
1377
        } else {
1378
            Object.assign(this.viewparams,{copymode:true});
ibizdev's avatar
ibizdev committed
1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391
        }
    }
    /**
     * 行编辑
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1392
    public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405
        xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
    }
    /**
     * 新建行
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1406
    public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1407 1408
        const _this: any = this;
        const data: any = {};
1409
        if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
ibizdev's avatar
ibizdev committed
1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427
            _this.newRow([{ ...data }], params, $event, xData);
        } else if(xData.newRow && xData.newRow instanceof Function) {
            xData.newRow([{ ...data }], params, $event, xData);
        }else{
            _this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
        }
    }
    /**
     * 删除
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1428
    public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446
        const _this: any = this;
        if (!xData || !(xData.remove instanceof Function)) {
            return ;
        }
        xData.remove(args);
    }

    /**
     * 导出
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1447
    public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464
        const _this: any = this;
        if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
            return ;
        }
        xData.exportExcel($event.exportparms);
    }
    /**
     * 打印
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1465
    public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482
        let _this:any = this;
        if (!xData || !(xData.print instanceof Function) || !$event) {
            return ;
        }
        xData.print();
    }
    /**
     * 导出数据模型
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1483
    public ExportModel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496
        this.$Notice.error({ title: '错误', desc: '导出数据模型未支持' });
    }
    /**
     * 数据导入
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1497
    public Import(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514
        const _this: any = this;
        if (!xData || !(xData.importExcel instanceof Function) || !$event) {
            return ;
        }
        xData.importExcel(params);
    }
    /**
     * 过滤
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1515
    public ToggleFilter(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531
        const _this: any = this;
        if (_this.hasOwnProperty('isExpandSearchForm')) {
            _this.isExpandSearchForm = !_this.isExpandSearchForm;
        }
    }
    /**
     * 帮助
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1532
    public Help(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
ibizdev's avatar
ibizdev committed
1533 1534 1535 1536 1537 1538 1539 1540 1541
        this.$Notice.error({ title: '错误', desc: '帮助未支持' });
    }

    /**
     * 关闭视图
     *
     * @param {any[]} args
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1542
    public closeView(args: any[]): void {
ibizdev's avatar
ibizdev committed
1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556
        let _view: any = this;
        if (_view.viewdata) {
            _view.$emit('viewdataschange', [args]);
            _view.$emit('close', [args]);
        } else if (_view.$tabPageExp) {
            _view.$tabPageExp.onClose(_view.$route.fullPath);
        }
    }

    /**
     * 销毁视图回调
     *
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1557
    public destroyed(){
ibizdev's avatar
ibizdev committed
1558 1559 1560 1561 1562 1563 1564 1565
        this.afterDestroyed();
    }

    /**
     * 执行destroyed后的逻辑
     * 
     * @memberof WFProcessDefinitionGridViewBase
     */
ibizdev's avatar
ibizdev committed
1566
    public afterDestroyed(){
ibizdev's avatar
ibizdev committed
1567 1568 1569 1570 1571 1572 1573 1574 1575
        if(this.viewDefaultUsage){
            let localStoreLength = Object.keys(localStorage);
            if(localStoreLength.length > 0){
                localStoreLength.forEach((item:string) =>{
                if(item.startsWith(this.context.srfsessionid)){
                    localStorage.removeItem(item);
                }
                })
            }
1576 1577 1578
            if(Object.is(this.navModel,"tab")){
                this.navDataService.removeNavDataByTag(this.viewtag);
            }
1579 1580 1581
            if (this.serviceStateEvent) {
                this.serviceStateEvent.unsubscribe();
            }
ibizdev's avatar
ibizdev committed
1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592
        }
    }

    /**
     * 是否单选
     *
     * @type {boolean}
     * @memberof WFProcessDefinitionGridViewBase
     */
    public isSingleSelect: boolean = false;

ibizdev's avatar
ibizdev committed
1593

ibizdev's avatar
ibizdev committed
1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699
    /**
    * 是否嵌入关系界面
    *
    * @type {boolean}
    * @memberof WFProcessDefinitionGridViewBase
    */
    @Prop({default:false}) public isformDruipart?: boolean;

    /**
    * 界面关系通讯对象
    *
    * @type {Subject<ViewState>}
    * @memberof WFProcessDefinitionGridViewBase
    */
    @Prop() public formDruipart?: Subject<ViewState>;

    /**
     * 搜索值
     *
     * @type {string}
     * @memberof WFProcessDefinitionGridViewBase
     */
    public query: string = '';

    /**
     * 是否展开搜索表单
     *
     * @type {boolean}
     * @memberof WFProcessDefinitionGridViewBase
     */
    public isExpandSearchForm: boolean = false;

    /**
     * 表格行数据默认激活模式
     * 0 不激活
     * 1 单击激活
     * 2 双击激活
     *
     * @type {(number | 0 | 1 | 2)}
     * @memberof WFProcessDefinitionGridViewBase
     */
    public gridRowActiveMode: number | 0 | 1 | 2 = 2;

    /**
     * 快速搜索
     *
     * @param {*} $event
     * @memberof WFProcessDefinitionGridViewBase
     */
    public onSearch($event: any): void {
        const grid: any = this.$refs.grid;
        if (grid) {
            grid.load(this.context, true);
        }
    }

    /**
     * grid 部件 save 事件
     *
     * @param {*} [args={}]
     * @param {*} $event
     * @memberof ENTITYTEST1Usr2GridViewBase
     */
    public onSave($event: any) {
        this.$emit('drdatasaved', $event);
    }

    /**
     * 刷新数据
     *
     * @readonly
     * @type {(number | null)}
     * @memberof WFProcessDefinitionGridViewBase
     */
    get refreshdata(): number | null {
        return this.$store.getters['viewaction/getRefreshData'](this.viewtag);
    }

    /**
     * 监控数据变化
     *
     * @param {*} newVal
     * @param {*} oldVal
     * @returns
     * @memberof WFProcessDefinitionGridViewBase
     */
    @Watch('refreshdata')
    onRefreshData(newVal: any, oldVal: any) {
        if (newVal === null || newVal === undefined) {
            return;
        }
        if (newVal === 0) {
            return;
        }
        const grid: any = this.$refs.grid;
        if (grid) {
            grid.load({});
        }
    }

}
</script>

<style lang='less'>
@import './wfprocess-definition-grid-view.less';
</style>