CONTROL-BASE.vue.ftl 22.5 KB
Newer Older
1 2 3 4
<template>
<#if quick_menus??>
  ${quick_menus}
<#else>
5
<div class="app-app-menu<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>">
6
<#if ctrl.getAppMenuStyle?? && ctrl.getAppMenuStyle() == "ICONVIEW">
7
          <app-icon-menus :menus = "menus" :ctrlName = "'${ctrl.codeName?lower_case}'" @menuClick="select"></app-icon-menus>  
8
        <#else>
9 10
    <el-menu
      class="app-menu"
11
      <#if view.getMainMenuAlign()?? && view.getMainMenuAlign()!="TOP">:default-openeds="defaultOpeneds"</#if>
12 13 14 15 16
      :mode="mode"
      :menu-trigger="trigger"
      :collapse="isCollapse"
      @select="select"
      :default-active="defaultActive">
17
      
18
      <template v-if="Object.is(mode,'horizontal')">
19 20
            <template v-for="item0 in menus">
                <template v-if="item0.items && Array.isArray(item0.items) && item0.items.length > 0">
Shine-zwj's avatar
Shine-zwj committed
21
                    <el-submenu v-show="!item0.hidden" :index="item0.name" :popper-class="popperClass" :key="item0.id" :class="item0.textcls">
22 23 24 25 26 27 28 29 30 31
                        <template slot='title'>
                            <template v-if="item0.icon && item0.icon != ''">
                                <img :src="item0.icon" class='app-menu-icon' />
                            </template>
                            <template v-else-if="item0.iconcls && item0.iconcls != ''">
                                <i :class="[item0.iconcls, 'app-menu-icon']"></i>
                            </template>
                            <template v-else>
                                <i class='fa fa-cogs app-menu-icon'></i>
                            </template>
32
                            <span class='text' :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)}}</span>
33 34 35
                        </template>
                        <template v-for="item1 in item0.items">
                            <template v-if="item1.items && Array.isArray(item1.items) && item1.items.length > 0">
Shine-zwj's avatar
Shine-zwj committed
36
                                <el-submenu v-show="!item1.hidden" :index="item1.name" :popper-class="popperClass" :key="item1.id" :class="item1.textcls">
37 38 39 40 41 42 43
                                    <template slot='title'>
                                        <template v-if="item1.icon && item1.icon != ''">
                                            <img :src="item1.icon" class='app-menu-icon' />
                                        </template>
                                        <template v-else-if="item1.iconcls && item1.iconcls != ''">
                                            <i :class="[item1.iconcls, 'app-menu-icon']"></i>
                                        </template>
44
                                        <span class='text' :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name)}}</span>
45 46 47
                                    </template>
                                    <template v-for="item2 in item1.items">
                                        <template v-if="item2.type =='MENUITEM'">
Shine-zwj's avatar
Shine-zwj committed
48
                                            <el-menu-item v-show="!item2.hidden" :index="item2.name" :key="item2.id" :class="item2.textcls">
49 50 51 52 53 54 55
                                                <template v-if="item2.icon && item2.icon != ''">
                                                    <img :src="item2.icon" class='app-menu-icon' />
                                                </template>
                                                <template v-else-if="item2.iconcls && item2.iconcls != ''">
                                                    <i :class="[item2.iconcls, 'app-menu-icon']"></i>
                                                </template>
                                                <template slot="title">
56
                                                    <span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item2.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item2.name)}}</span>
57 58 59 60 61 62 63 64 65 66 67 68 69
                                                    <template v-if="counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0">
                                                        <span class="pull-right">
                                                            <badge :count="counterdata[item2.counterid]" :overflow-count="9999"></badge>
                                                        </span>
                                                    </template>
                                                </template>
                                            </el-menu-item>
                                        </template>
                                    </template>
                                </el-submenu>
                            </template>
                            <template v-else>
                                <template v-if="item1.type =='MENUITEM'">
Shine-zwj's avatar
Shine-zwj committed
70
                                    <el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id" :class="item1.textcls">
71 72 73 74 75 76 77
                                        <template v-if="item1.icon && item1.icon != ''">
                                            <img :src="item1.icon" class='app-menu-icon' />
                                        </template>
                                        <template v-else-if="item1.iconcls && item1.iconcls != ''">
                                            <i :class="[item1.iconcls, 'app-menu-icon']"></i>
                                        </template>
                                        <template slot="title">
78
                                            <span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name)}} </span>
79 80 81 82 83 84 85 86 87 88 89 90 91 92
                                            <template v-if="counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0">
                                                <span class="pull-right">
                                                    <badge :count="counterdata[item1.counterid]" :overflow-count="9999"></badge>
                                                </span>
                                            </template>
                                        </template>
                                    </el-menu-item>
                                </template>
                            </template>
                        </template>
                    </el-submenu>
                </template>
                <template v-else>
                    <template v-if="item0.type =='MENUITEM'">
Shine-zwj's avatar
Shine-zwj committed
93
                        <el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id" :class="item0.textcls">
94 95 96 97 98 99 100 101 102 103
                            <template v-if="item0.icon && item0.icon != ''">
                                <img :src="item0.icon" class='app-menu-icon' />
                            </template>
                            <template v-else-if="item0.iconcls && item0.iconcls != ''">
                                <i :class="[item0.iconcls, 'app-menu-icon']"></i>
                            </template>
                            <template v-else>
                                <i class='fa fa-cogs app-menu-icon'></i>
                            </template>
                            <template slot="title">
104
                                <span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)}}</span>
105 106 107 108 109 110 111 112 113
                                <template v-if="counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0">
                                    <span class="pull-right">
                                        <badge :count="counterdata[item0.counterid]" :overflow-count="9999"></badge>
                                    </span>
                                </template>
                            </template>
                        </el-menu-item>
                    </template>
                </template>
114
            </template>  
115
        </template> 
116
        <app-menu-item v-else :isCollapse="isCollapse" :menus="menus" :ctrlName="'${ctrl.getCodeName()?lower_case}'" :isFirst="true" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item>
117
   
118
    </el-menu>
119
    </#if> 
120 121 122 123 124 125
</div>
</#if>
</template>

<#assign import_block>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
tony001's avatar
tony001 committed
126
import { Environment } from '@/environments/environment';
tony001's avatar
tony001 committed
127
import AuthService from '@/authservice/auth-service';
128 129 130 131 132 133 134 135 136
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>

    /**
     * 获取多项数据
     *
     * @returns {any[]}
KK's avatar
KK committed
137
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
138 139 140 141 142 143 144 145 146
     */
    public getDatas(): any[] {
        return [];
    }

    /**
     * 获取单项树
     *
     * @returns {*}
KK's avatar
KK committed
147
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
148 149 150 151 152
     */
    public getData(): any {
        return null;
    }

tony001's avatar
tony001 committed
153 154 155 156
    /**
     * 导航模式(route:面包屑模式、tab:分页导航模式)
     *
     * @type {string}
KK's avatar
KK committed
157
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
tony001's avatar
tony001 committed
158 159 160
     */
    @Prop({default:'tab'}) public navModel?:string;

tony001's avatar
tony001 committed
161 162 163 164
    /**
     * 视图标识
     *
     * @type {string}
KK's avatar
KK committed
165
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
tony001's avatar
tony001 committed
166 167 168
     */
    @Prop() public viewtag!:string;

169 170 171
    /**
     * 菜单模型
     *
172
     * @public
173
     * @type {${srfclassname('${ctrl.codeName}')}Model}
KK's avatar
KK committed
174
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
175
     */
176
    public menuMode: ${srfclassname('${ctrl.codeName}')}Model = new ${srfclassname('${ctrl.codeName}')}Model();
177 178 179 180 181

    /**
     * 显示处理提示
     *
     * @type {boolean}
KK's avatar
KK committed
182
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
183
     */
184
    @Prop({ default: true }) public showBusyIndicator?: boolean;
185 186 187 188

    /**
     * 菜单数据
     *
189
     * @public
190
     * @type {any[]}
KK's avatar
KK committed
191
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
192 193
     */
    @Provide()
194
    public menus: any[] = [];
195 196 197 198 199

    /**
     * 菜单收缩改变
     *
     * @type {boolean}
KK's avatar
KK committed
200
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
201
     */
202
    @Model() public collapsechange?: boolean;
203 204 205 206 207 208

    /**
     * 监听菜单收缩
     *
     * @param {*} newVal
     * @param {*} oldVal
KK's avatar
KK committed
209
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
210 211 212 213 214 215 216 217 218 219 220 221
     */
    @Watch('collapsechange')
    onCollapsechangeChange(newVal: any, oldVal: any) {
        if (newVal !== this.isCollapse) {
            this.isCollapse = !this.isCollapse;
        }
    }

    /**
     * 当前模式,菜单在顶部还是在底部
     *
     * @type {*}
KK's avatar
KK committed
222
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
223 224 225 226
     */
    @Prop() mode: any;

    /**
227
     * 应用起始页面
228
     *
229
     * @type {boolean}
KK's avatar
KK committed
230
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
231 232 233
     */
    @Prop({ default: false }) isDefaultPage?: boolean;

234 235 236 237 238 239
    /**
     * 空白视图模式
     *
     * @type {boolean}
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
     */
240
    @Prop({ default: false }) isBlankMode?:boolean;
241

242 243 244 245
    /**
     * 默认打开视图
     *
     * @type {*}
KK's avatar
KK committed
246
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
247 248 249 250 251 252 253
     */
    @Prop() defPSAppView: any;

    /**
     * 默认激活的index
     *
     * @type {*}
KK's avatar
KK committed
254
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
255 256 257 258 259 260 261
     */
    @Provide() defaultActive: any = null;

    /**
     * 当前选中主题
     *
     * @type {*}
KK's avatar
KK committed
262
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
263 264 265 266 267 268 269
     */
    @Prop() selectTheme: any;

    /**
     * 默认打开的index数组
     *
     * @type {any[]}
KK's avatar
KK committed
270
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
271
     */
272
    @Provide() public defaultOpeneds: any[] = [];
273 274 275 276 277

    /**
     * 是否展开
     *
     * @type {boolean}
KK's avatar
KK committed
278
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
279
     */
280
    @Provide() public isCollapse: boolean = false;
281 282 283 284 285

    /**
     * 触发方式,默认click
     *
     * @type {string}
KK's avatar
KK committed
286
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
287 288 289 290 291 292 293
     */
    @Provide() trigger: string = 'click';

    /**
     * 计数器数据
     *
     * @type {*}
KK's avatar
KK committed
294
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
295
     */
296
    public counterdata: any = {};
tony001's avatar
tony001 committed
297 298 299 300 301 302 303 304 305

    /**
     * 建构权限服务对象
     *
     * @type {AuthService}
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
     */
    public authService:AuthService = new AuthService({ $store: this.$store });

306 307 308
    /**
     * vue  生命周期
     *
KK's avatar
KK committed
309
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
310
     */
311
    public created() {
312 313 314 315 316 317
        this.afterCreated();
    }

    /**
     * 执行created后的逻辑
     *
KK's avatar
KK committed
318
     *  @memberof ${srfclassname('${ctrl.codeName}')}Base
319
     */    
320
    public afterCreated(){
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336
        if (Object.is(this.mode, 'horizontal')) {
            this.trigger = 'hover';
        }
        if (this.viewState) {
            this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
                if (!Object.is(tag, this.name)) {
                    return;
                }
                this.load(data);
            });
        }
    }

    /**
     * vue 生命周期
     *
KK's avatar
KK committed
337
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
338
     */
339
    public destroyed() {
340 341 342 343 344 345
        this.afterDestroy();
    }

    /**
     * 执行destroyed后的逻辑
     *
KK's avatar
KK committed
346
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
347
     */
348
    public afterDestroy() {
349 350 351 352 353 354 355 356 357 358 359 360 361
        if (this.viewStateEvent) {
            this.viewStateEvent.unsubscribe();
        }
        <#if destroyed_block??>
        ${destroyed_block}
        </#if>
    }

<#if view.isDefaultPage?? && view.isDefaultPage()>

    /**
     * 处理菜单默认选中项
     *
362
     * @public
KK's avatar
KK committed
363
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
364
     */
365
    public doMenuSelect(): void {
366
        if (!this.isDefaultPage || this.isBlankMode) {
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
            return;
        }
        const appFuncs: any[] = this.menuMode.getAppFuncs();
        if (this.$route && this.$route.matched && this.$route.matched.length == 2) { // 存在二级路由
            const [{ }, matched] = this.$route.matched;
            const appfunc: any = appFuncs.find((_appfunc: any) => Object.is(_appfunc.routepath, matched.path) && Object.is(_appfunc.appfuncyype, 'APPVIEW'));
            if (appfunc) {
                this.computeMenuSelect(this.menus, appfunc.appfunctag);
            }
            return;
        } else if (this.defPSAppView && Object.keys(this.defPSAppView).length > 0) { // 存在默认视图
            const appfunc: any = appFuncs.find((_appfunc: any) => Object.is(_appfunc.routepath, this.defPSAppView.routepath) && Object.is(_appfunc.appfuncyype, 'APPVIEW'));
            if (appfunc) {
                this.computeMenuSelect(this.menus, appfunc.appfunctag);
            }
            const viewparam: any = {};
            const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, this.defPSAppView.deResParameters, this.defPSAppView.parameters, [], viewparam);
            this.$router.push(path);
            return;
        }

        this.computeMenuSelect(this.menus, '');
        let item = this.compute(this.menus, this.defaultActive);
        if (Object.keys(item).length === 0) {
            return;
        }
tony001's avatar
tony001 committed
393 394 395
        if(!item.hidden){
            this.click(item);
        }
396 397 398 399 400
    }

    /**
     * 计算菜单选中项
     *
401
     * @public
402 403 404
     * @param {any[]} items
     * @param {string} appfunctag
     * @returns {boolean}
KK's avatar
KK committed
405
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
406
     */
407
    public computeMenuSelect(items: any[], appfunctag: string): boolean {
408 409
        const appFuncs: any[] = this.menuMode.getAppFuncs();
        return items.some((item: any) => {
tony001's avatar
tony001 committed
410
            if (Object.is(appfunctag, '') && !Object.is(item.appfunctag, '') && item.opendefault) {
411 412 413 414 415 416 417
                const appfunc = appFuncs.find((_appfunc: any) => Object.is(_appfunc.appfunctag, item.appfunctag));
                if (appfunc.routepath) {
                    this.defaultActive = item.name;
                    this.setHideSideBar(item);
                    return true;
                }
            }
tony001's avatar
tony001 committed
418
            if (Object.is(item.appfunctag, appfunctag) && item.opendefault) {
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
                this.setHideSideBar(item);
                this.defaultActive = item.name;
                return true;
            }
            if (item.items && item.items.length > 0) {
                const state = this.computeMenuSelect(item.items, appfunctag);
                if (state) {
                    this.defaultOpeneds.push(item.name);
                    return true;
                }
            }
            return false;
        });
    }
</#if>

    /**
     * 获取菜单项数据
     *
438
     * @public
439 440 441
     * @param {any[]} items
     * @param {string} name
     * @returns
KK's avatar
KK committed
442
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
443
     */
444
    public compute(items: any[], name: string) {
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466
        const item: any = {};
        items.some((_item: any) => {
            if (name && Object.is(_item.name, name)) {
                Object.assign(item, _item);
                this.setHideSideBar(_item);
                return true;
            }
            if (_item.items && Array.isArray(_item.items)) {
                const subItem = this.compute(_item.items, name);
                if (Object.keys(subItem).length > 0) {
                    Object.assign(item, subItem);
                    return true;
                }
            }
            return false;
        });
        return item;
    }

    /**
     * 设置是否隐藏菜单栏
     *
467
     * @public
468
     * @param {*} item
KK's avatar
KK committed
469
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
470
     */
471
    public setHideSideBar(item: any): void {
472 473 474 475 476 477 478 479 480 481 482 483 484
        <#if view.isDefaultPage?? && view.isDefaultPage()>
        if (item.hidesidebar) {
            this.$emit('collapsechange', true);
        }
        </#if>
    }

    /**
     * 菜单项选中处理
     *
     * @param {*} index
     * @param {any[]} indexs
     * @returns
KK's avatar
KK committed
485
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
486
     */
487
    public select(index: any, indexs: any[]) {
488 489 490 491 492 493 494 495 496 497
        let item = this.compute(this.menus, index);
        if (Object.keys(item).length === 0) {
            return;
        }
        this.click(item);
    }

    /**
     * 菜单点击
     *
498
     * @public
499
     * @param {*} item 菜单数据
KK's avatar
KK committed
500
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
501
     */
502
    public click(item: any) {
503
        if (item) {
504
            let navDataService = NavDataService.getInstance(this.$store);
tony001's avatar
tony001 committed
505 506 507
            if(Object.is(this.navModel,"route")){
                navDataService.removeNavData(this.viewtag);
            }
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
            switch (item.appfunctag) {
                <#if ctrl.getPSAppFuncs()??>
                <#assign appFuncs = ctrl.getPSAppFuncs()>
                <#list appFuncs as singFuncs>
                case '${singFuncs.getCodeName()}': 
                    this.click${singFuncs.codeName}(item);
                    return;
                </#list>
                </#if>
                default:
                    console.warn('未指定应用功能');
            }
        }
    }

<#if ctrl.getPSAppFuncs()??>
<@ibizindent blank=4>
<#list ctrl.getPSAppFuncs() as singleFuncs>

${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
</#list>
</@ibizindent>
</#if>

    /**
     * 数据加载
     *
     * @param {*} data
KK's avatar
KK committed
536
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
537
     */
538
    public load(data: any) {
tony001's avatar
tony001 committed
539 540 541 542 543 544 545
        this.handleMenusResource(this.menuMode.getAppMenuItems());
    }

    /**
     * 通过统一资源标识计算菜单
     *
     * @param {*} data
KK's avatar
KK committed
546
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
tony001's avatar
tony001 committed
547 548
     */
    public handleMenusResource(inputMenus:Array<any>){
tony001's avatar
tony001 committed
549
        if(this.$store.getters['authresource/getEnablePermissionValid']){
tony001's avatar
tony001 committed
550
            this.computedEffectiveMenus(inputMenus);
551
            this.computeParentMenus(inputMenus);
tony001's avatar
tony001 committed
552
        }
tony001's avatar
tony001 committed
553 554
        this.dataProcess(inputMenus);
        this.menus = inputMenus;
555 556 557 558 559
        <#if view.isDefaultPage?? && view.isDefaultPage()>
        this.doMenuSelect();
        </#if>
    }

tony001's avatar
tony001 committed
560 561 562
    /**
     * 计算有效菜单项
     *
563
     * @param {*} inputMenus
KK's avatar
KK committed
564
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
tony001's avatar
tony001 committed
565 566 567
     */
    public computedEffectiveMenus(inputMenus:Array<any>){
        inputMenus.forEach((_item:any) =>{
tony001's avatar
tony001 committed
568
            if(!this.authService.getMenusPermission(_item)){
tony001's avatar
tony001 committed
569 570 571 572 573 574 575 576
                _item.hidden = true;
                if (_item.items && _item.items.length > 0) {
                    this.computedEffectiveMenus(_item.items);
                }
            }
        })
    }

577 578 579 580 581 582 583 584 585 586 587 588 589
    /**
     * 计算父项菜单项是否隐藏
     *
     * @param {*} inputMenus
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
     */
    public computeParentMenus(inputMenus:Array<any>){
        if(inputMenus && inputMenus.length >0){
            inputMenus.forEach((item:any) =>{
                if(item.hidden && item.items && item.items.length >0){
                    item.items.map((singleItem:any) =>{
                        if(!singleItem.hidden){
                            item.hidden = false;
590 591 592 593 594 595 596 597
                        }else{
                            if(singleItem.items && singleItem.items.length >0){
                                singleItem.items.map((grandsonItem:any) =>{
                                    if(!grandsonItem.hidden){
                                        item.hidden = false;
                                    }
                                })
                            }
598
                        }
599 600
                        if(item.items && item.items.length >0){
                            this.computeParentMenus(item.items);
601 602 603 604 605 606 607
                        }
                    })
                }
            })
        }
    }

608 609 610
    /**
     * 数据处理
     *
611
     * @public
612
     * @param {any[]} items
KK's avatar
KK committed
613
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
614
     */
615
    public dataProcess(items: any[]): void {
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630
        items.forEach((_item: any) => {
            if (_item.expanded) {
                this.defaultOpeneds.push(_item.name);
            }
            if (_item.items && _item.items.length > 0) {
                this.dataProcess(_item.items)
            }
        });
    }

    /**
     * 提示框主题样式
     *
     * @readonly
     * @type {string}
KK's avatar
KK committed
631
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
632 633 634 635 636 637 638 639 640 641 642 643
     */
    get popperClass(): string {
        return 'app-popper-menu ' + this.selectTheme;
    }
    
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>

<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>