<template>
    <ap-container>
        <ap-header margin="1111">
            <el-form ref="searchForm" :model="searchForm" :rules="searchFormRules"
                     :inline="true" class="layout-header-form">
                <el-form-item label="" class="layout-header-form-item" prop="type">
                    <el-radio-group v-model="searchForm.type">
                        <el-radio :label="1">单页看板</el-radio>
                        <el-radio :label="2">轮播看板</el-radio>
                        <el-radio :label="3">设备配置</el-radio>
                        <el-radio :label="4">跳转配置</el-radio>
                    </el-radio-group>
                </el-form-item>
                <!--                    <el-form-item label="搜索:" class="layout-header-form-item" prop="likeStr">-->
                <!--                        <el-input v-model="searchForm.likeStr" placeholder="请输入搜索值"></el-input>-->
                <!--                    </el-form-item>-->
            </el-form>
            <!--                <el-button type="primary" @click="searchEvent">查询</el-button>-->

        </ap-header>
        <ap-main margin="0111">
            <div v-show="searchForm.type == 1" class="flex-justify-start" style="height: 100%">
                <ap-aside-tree :options.sync="boardTreeOptions" style="width: 250px;">
                    <el-form slot="form" ref="tSysBoardType" :inline="true" label-width="80px"
                             :model="tSysBoardTypeForm" :rules="tSysBoardTypeRules">
                        <el-form-item label='父id' prop='fdParentId'>
                            <el-select v-model="tSysBoardTypeForm.fdParentId" filterable placeholder="请选择父节点">
                                <el-option label="无" value=""></el-option>
                                <el-option v-if="item.fdIsGroup == 1" v-for="item in boardTypeList" :key="item.fdId" :label="item.fdName" :value="item.fdId"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="分组">
                            <el-radio v-model="tSysBoardTypeForm.fdIsGroup" :label="1">是
                            </el-radio>
                            <el-radio v-model="tSysBoardTypeForm.fdIsGroup" :label="0">否
                            </el-radio>
                        </el-form-item>
                        <el-form-item label='名称' prop='fdName'>
                            <el-input v-model='tSysBoardTypeForm.fdName'></el-input>
                        </el-form-item>
                        <el-form-item label='排序' prop='fdSort'>
                            <el-input v-model='tSysBoardTypeForm.fdSort'></el-input>
                        </el-form-item>
                        <el-form-item label='备注' prop='fdComment'>
                            <el-input v-model='tSysBoardTypeForm.fdComment'></el-input>
                        </el-form-item>
                    </el-form>
                    <div slot="tree" slot-scope="scope" style="width: 100%">
                        <div class="tree-node">
                            <span v-if="scope.data.fdIsGroup == 1" style="color: #2e6d91">{{ scope.data.fdName }}</span>
                            <span v-else style="color: #1890FF"><i class="el-icon-guide"/>
                                &nbsp {{ scope.data.fdName }}
                            </span>
                        </div>
                    </div>
                </ap-aside-tree>
                <ap-table ref="tSysBoardRef" :options.sync="tSysBoardOpt" class="flex-1" style="margin-left: 10px"></ap-table>
            </div>
            <div v-show="searchForm.type == 2" class="flex-justify-start" style="height: 100%">
                <ap-aside-tree :options.sync="boardGroupTreeOptions" style="width: 200px">
                    <el-form slot="form" ref="tSysBoardGroupType" :inline="true" label-width="80px"
                             :model="tSysBoardGroupTypeForm" :rules="tSysBoardGroupTypeRules">
                        <el-form-item label='父id' prop='fdParentId'>
                            <el-select v-model="tSysBoardGroupTypeForm.fdParentId" filterable placeholder="请选择父节点">
                                <el-option label="无" value=""></el-option>
                                <el-option v-if="item.fdIsGroup == 1" v-for="item in boardGroupTypeList" :key="item.fdId" :label="item.fdName" :value="item.fdId"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="分组">
                            <el-radio v-model="tSysBoardGroupTypeForm.fdIsGroup" :label="1">是
                            </el-radio>
                            <el-radio v-model="tSysBoardGroupTypeForm.fdIsGroup" :label="0">否
                            </el-radio>
                        </el-form-item>
                        <el-form-item label='名称' prop='fdName'>
                            <el-input v-model='tSysBoardGroupTypeForm.fdName'></el-input>
                        </el-form-item>
                        <el-form-item label='排序' prop='fdSort'>
                            <el-input v-model='tSysBoardGroupTypeForm.fdSort'></el-input>
                        </el-form-item>
                        <el-form-item label='备注' prop='fdComment'>
                            <el-input v-model='tSysBoardGroupTypeForm.fdComment'></el-input>
                        </el-form-item>
                    </el-form>
                    <div slot="tree" slot-scope="scope" style="width: 100%">
                        <div class="tree-node">
                            <span v-if="scope.data.fdIsGroup == 1" style="color: #2e6d91">{{ scope.data.fdName }}</span>
                            <span v-else style="color: #1890FF"><i class="el-icon-guide"/>
                                &nbsp {{ scope.data.fdName }}
                            </span>
                        </div>
                    </div>
                </ap-aside-tree>
                <div class="flex-1 flex-col" style="margin-left: 10px;height: 100%;">
                    <ap-table ref="tSysBoardGroupRef" :options.sync="tSysBoardGroupOpt" style="height: 50%;"></ap-table>
                    <ap-table ref="tSysBoardGroupDetailRef" :options.sync="tSysBoardGroupDetailOpt" class="flex-1"></ap-table>
                </div>
            </div>
            <div v-show="searchForm.type == 3" style="height: 100%">
                <ap-table ref="tSysBoardDeviceRef" :options.sync="tSysBoardDeviceOpt"></ap-table>
            </div>
            <div v-show="searchForm.type == 4" style="height: 100%">
                <ap-table ref="tSysBoardRedirectRef" :options.sync="tSysBoardRedirectOpt"></ap-table>
            </div>
        </ap-main>
    </ap-container>
</template>

<script>
export default {
    name: 'SysBoardConfig',
    data() {

        let tSysBoardCols = [
            {
                prop: 'fdTypeId',
                label: '分组',
                type: "select",
                width: "120px",
                selectOptionsKey: {label: "fdName", value: "fdId"},
                selectOptionsRemote: "typeList",
                addDefaultValue: () => {
                    return this.boardTypeSelectValue;
                }
            }, {
                prop: 'fdCode',
                label: '编码',
                type: 'input',
                width: '80px',
                add: false,
                edit: false,
            }, {
                prop: 'fdName',
                label: '名称',
                type: 'input',
                width: '200px'
            }, {
                prop: 'fdPath',
                label: '地址/组件路径',
                type: 'input',
                minWidth: '200px'
            }, {
                prop: 'fdParameter',
                label: '参数',
                type: 'input',
                minWidth: '100px',
                help: `1、组件时：组件使用props接收参数<br>props: {parameter: {type: String,default: ''}}<br>
2、链接时：参数会直接拼接到路径上，网页通过地址栏获取参数。注意添加? &等`
            }, {
                prop: 'fdSort',
                label: '排序',
                type: 'input',
                width: '80px'
            }, {
                prop: 'fdComment',
                label: '备注',
                type: 'input',
                minWidth: '100px'
            },
        ];
        let tSysBoardOpt = {
            title: () => {
                return this.boardTableTitle
            },
            columns: tSysBoardCols,
            editPk: "fdId", //默认fdId
            deletePk: "fdId", // 默认fdId
            dataUrl: "/apm/sys/TSysBoard/getTSysBoardGridList",
            saveUrl: "/apm/sys/TSysBoard/saveTSysBoardGridData",
            deleteUrl: "/apm/sys/TSysBoard/deleteTSysBoardGridData",
            sortUrl: "/apm/sys/TSysBoard/updateTSysBoardSortList",
            toolbarBtn: [{btnType: "primary", text: "预览", icon: "el-icon-s-promotion", onClick: this.previewBoard},
                "separator", {btnType: "primary", text: "复制", icon: "el-icon-copy", onClick: this.copyBoard},
                "separator", "sortAuto", "sortDown", "sortUp", "separator", "add", "edit", "del", "refresh", "save"],
            initData: true, // 默认false
            params: () => {
                return {
                    likeStr: this.searchForm.likeStr,
                    typeId: this.boardTypeSelectValue
                }
            }
        };

        let tSysBoardGroupCols = [
            {
                prop: 'fdTypeId',
                label: '分组',
                type: "select",
                width: "100px",
                selectOptionsKey: {label: "fdName", value: "fdId"},
                selectOptionsRemote: "typeList",
                addDefaultValue: () => {
                    return this.boardGroupTypeSelectValue;
                }
            }, {
                prop: 'fdCode',
                label: '编码',
                type: 'input',
                width: '100px',
                add: false,
                edit: false,
            }, {
                prop: 'fdName',
                label: '名称',
                type: 'input'
            }, {
                prop: 'fdShowToolbar',
                label: '显示分页',
                type: 'select',
                align: "center",
                width: 80,
                selectOptions: [{label: "显示", value: 1}, {label: "隐藏", value: 0}],
                addDefaultValue: 0,
                help: '轮播顶部显示工具栏。[刷新][手动切换][上一页][下一页]'
            }, {
                prop: 'fdSort',
                label: '排序',
                type: 'input',
                width: '60px'
            }, {
                prop: 'fdComment',
                label: '备注',
                type: 'input'
            },
        ];
        let tSysBoardGroupOpt = {
            title: () => {
                return this.groupBoardTableTitle
            },
            columns: tSysBoardGroupCols,
            editPk: "fdId", //默认fdId
            deletePk: "fdId", // 默认fdId
            dataUrl: "/apm/sys/TSysBoardGroup/getTSysBoardGroupGridList",
            saveUrl: "/apm/sys/TSysBoardGroup/saveTSysBoardGroupGridData",
            deleteUrl: "/apm/sys/TSysBoardGroup/deleteTSysBoardGroupGridData",
            toolbarBtn: [{btnType: "primary", text: "预览", icon: "el-icon-s-promotion", onClick: this.previewBoardGroup},
                "separator",
                {btnType: "primary", text: "复制", icon: "el-icon-copy", onClick: this.copyBoardGroup},
                "separator", "add", "edit", "del", "refresh", "save"],
            initData: true, // 默认false
            rowClickEvent: (row, column, event) => {
                this.boardGroupSelectValue = row.fdId;
                this.$refs.tSysBoardGroupDetailRef.refresh();
            },
            params: () => {
                return {
                    likeStr: this.searchForm.likeStr,
                    typeId: this.boardGroupTypeSelectValue
                }
            }
        };

        let tSysBoardGroupDetailCols = [
            {
                prop: 'fdBoardGroupId',
                label: '轮播看板',
                type: "select",
                width: "120px",
                selectOptionsKey: {label: "fdName", value: "fdId"},
                selectOptionsRemote: "boardGroupList",
                addDefaultValue: () => {
                    return this.boardGroupSelectValue;
                }
            }, {
                prop: 'fdBoardId',
                label: '单页看板',
                type: "select",
                width: "120px",
                selectOptionsKey: {label: "fdName", value: "fdId"},
                selectOptionsRemote: "boardList"
            }, {
                prop: 'fdParameter',
                label: '参数',
                type: 'input',
                help: `参考【单页看板】的参数字段。<br>注意:轮播看板明细存在参数时，优先取轮播看板参数，单页看板参数失效。`
            }, {
                prop: 'fdCheckPath',
                label: '检查地址',
                type: 'input',
                help: '轮播前检查地址。<br>1、为空：不检查，直接跳转。<br>2、不为空：controller 返回 ResultUtil.success(true)，表示成功继续跳转。<br>返回 ResultUtil.success(false)，表示失败跳过改页跳转到下一页'
            }, {
                prop: 'fdDuration',
                label: '持续/秒',
                type: 'input',
                width: '80px',
                help: '轮播时，当前页停留时间。默认10秒，配置支持一位小数。'
            }, {
                prop: 'fdComment',
                label: '备注',
                type: 'input'
            }, {
                prop: 'fdSort',
                label: '排序',
                type: 'input',
                width: '80px'
            }, {
                prop: 'fdDisabled',
                label: '是否有效',
                type: 'select',
                align: "center",
                width: 80,
                selectOptions: [{label: "有效", value: 0}, {label: "失效", value: 1}],
                addDefaultValue: 0,
                html: function (value, row) {
                    if (value == 1) {
                        return '<div class="ap-tag-danger">禁用</div>'
                    } else if (value == 0) {
                        return '<div class="ap-tag-success">启用</el-tag>';
                    }
                }
            },
        ];
        let tSysBoardGroupDetailOpt = {
            title: "轮播看板明细",
            columns: tSysBoardGroupDetailCols,
            editPk: "fdId", //默认fdId
            deletePk: "fdId", // 默认fdId
            dataUrl: "/apm/sys/TSysBoardGroupDetail/getTSysBoardGroupDetailGridList",
            saveUrl: "/apm/sys/TSysBoardGroupDetail/saveTSysBoardGroupDetailGridData",
            deleteUrl: "/apm/sys/TSysBoardGroupDetail/deleteTSysBoardGroupDetailGridData",
            toolbarBtn: ["add", "edit", "del", "refresh", "save"],
            initData: false, // 默认false
            showPagination: false,
            params: () => {
                return {
                    boardGroupId: this.boardGroupSelectValue
                }
            }
        };

        let tSysBoardDeviceCols = [
            {
                prop: 'fdCode',
                label: '编码',
                type: 'input',
                width: "150px",
                help: `看板上显示的编码`
            }, {
                prop: 'fdLinkId',
                label: '看板',
                type: "select",
                width: "350px",
                selectOptionsKey: {label: "fdName", value: "fdId"},
                selectOptionsRemote: "boardList",
            }, {
                prop: 'fdScale',
                label: '缩放比例',
                type: 'input',
                width: "100px",
                help: `看板缩放比例：通常设为 0.5 到 1 之间 `
            }, {
                prop: 'fdAuth',
                label: '认证',
                type: 'select',
                align: "center",
                width: 100,
                selectOptions: [{label: "手动登录", value: 0}, {label: "自动认证", value: 1}],
                addDefaultValue: 0,
                html: function (value, row) {
                    if (value == 1) {
                        return '<div class="ap-tag-success">自动认证</div>'
                    } else if (value == 0) {
                        return '<div class="ap-tag-warning">手动登录</el-tag>';
                    }
                },
                help: `自动认证：适用于电视看板，无需登录直接显示页面。不支持页面上点击跳转(没有跳转页面的权限)。<br>手动认证：适用于触摸屏，需要登录系统。<br>`
            }, {
                prop: 'fdComment',
                label: '备注',
                type: 'input'
            }, {
                prop: 'fdSort',
                label: '排序',
                type: 'input',
                width: '80px'
            },
        ];
        let tSysBoardDeviceOpt = {
            title: "设备看板",
            columns: tSysBoardDeviceCols,
            editPk: "fdId", //默认fdId
            deletePk: "fdId", // 默认fdId
            dataUrl: "/apm/sys/TSysBoardDevice/getTSysBoardDeviceGridList",
            saveUrl: "/apm/sys/TSysBoardDevice/saveTSysBoardDeviceGridData",
            deleteUrl: "/apm/sys/TSysBoardDevice/deleteTSysBoardDeviceGridData",
            toolbarBtn: ["add", "edit", "del", "cancel", "refresh", "save"],
            initData: true, // 默认false
            params: {}
        };

        let tSysBoardRedirectCols = [
            {
                prop: 'fdCode',
                label: '设备编码',
                type: 'input',
                width: '150px'
            }, {
                prop: 'fdUrl',
                label: '跳转路径',
                type: 'input',
                help: `直接后台获取路径，不经过中台前端`
            }, {
                prop: 'fdSort',
                label: '排序',
                type: 'input',
                width: '60px'
            }, {
                prop: 'fdComment',
                label: '备注',
                type: 'input',
                width: '300px',

            }
        ];
        let tSysBoardRedirectOpt = {
            title: "跳转看板",
            columns: tSysBoardRedirectCols,
            editPk: "fdId", //默认fdId
            deletePk: "fdId", // 默认fdId
            dataUrl: "/apm/sys/TSysBoardRedirect/getTSysBoardRedirectGridList",
            saveUrl: "/apm/sys/TSysBoardRedirect/saveTSysBoardRedirectGridData",
            deleteUrl: "/apm/sys/TSysBoardRedirect/deleteTSysBoardRedirectGridData",
            toolbarBtn: ["add", "edit", "del", "cancel", "refresh", "save"],
            initData: true, // 默认false
            params: {}
        };
        return {
            // ----- 左侧树 -----
            boardTypeList: [],
            boardTreeOptions: this.getBoardTreeOption(),
            tSysBoardTypeForm: {
                fdParentId: '',
                fdIsGroup: 0,
                fdName: '',
                fdSort: '',
                fdComment: '',
            },
            tSysBoardTypeRules: {
                fdName: [
                    {required: true, message: '请输入名称', trigger: 'blur'},
                    {min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'}
                ]
            },
            boardTypeSelectValue: "",
            boardTypeSelectData: null,

            boardGroupTypeList: [],
            boardGroupTreeOptions: this.getBoardGroupTreeOption(),
            tSysBoardGroupTypeForm: {
                fdParentId: '',
                fdIsGroup: 0,
                fdName: '',
                fdSort: '',
                fdComment: '',
            },
            tSysBoardGroupTypeRules: {
                fdName: [
                    {required: true, message: '请输入名称', trigger: 'blur'},
                    {min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'}
                ]
            },
            boardGroupTypeSelectValue: "",
            boardGroupTypeSelectData: null,

            // ----- 右侧 -----
            searchForm: {
                type: 1,
                likeStr: ""
            },
            searchFormRules: {
                likeStr: [{min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur'}]
            },

            tSysBoardOpt: tSysBoardOpt,
            tSysBoardGroupOpt: tSysBoardGroupOpt,
            tSysBoardGroupDetailOpt: tSysBoardGroupDetailOpt,
            boardTableTitle: "单页看板列表",
            groupBoardTableTitle: "轮播看板列表",
            boardGroupSelectValue: "",

            tSysBoardDeviceOpt: tSysBoardDeviceOpt,
            tSysBoardRedirectOpt: tSysBoardRedirectOpt,
        }
    },
    methods: {
        // 左侧树：配置
        getBoardTreeOption() {
            let boardTreeOptions = {
                title: "单页看板分组",
                toolbarBtn: ["add", "edit", "del", "sort"],
                dialogTitle: "单页看板分组",
                defaultExpandAll: true,
                showCheckbox: false,
                sortByDrag: true,
                onClick: (data, node, comp) => {
                    this.boardTypeSelectData = data;
                    this.boardTypeSelectValue = data.fdId;
                    if (data.fdIsGroup == 1) {
                        return;
                    }
                    this.boardTableTitle = `单页看板列表 -【${data.fdName}】`;
                    this.$refs.tSysBoardRef.refresh();
                },
                loadOptions: {
                    url: "/apm/sys/TSysBoardType/getTSysBoardTypeList",
                    treeKey: {
                        idKey: "fdId",
                        parentKey: "fdParentId",
                        childrenKey: "children",
                        label: "fdName"
                    },
                    success: (response) => {
                        this.boardTypeList = response.data;
                    },
                },
                editOptions: {
                    url: "/apm/sys/TSysBoardType/getTSysBoardTypeByFdId",
                    data: (node) => {
                        return {
                            fdId: node.fdId
                        }
                    },
                    success: (response) => {
                        this.tSysBoardTypeForm = response.data;
                    },
                    error() {
                    },
                },
                insertUrl: "/apm/sys/TSysBoardType/insertTSysBoardType",
                insertData: () => {
                    return this.tSysBoardTypeForm
                },
                updateUrl: "/apm/sys/TSysBoardType/updateTSysBoardType",
                updateData: () => {
                    return this.tSysBoardTypeForm
                },
                deleteUrl: "/apm/sys/TSysBoardType/deleteTSysBoardTypeByFdId",
                deleteData: (node) => {
                    return {
                        fdId: node.fdId
                    }
                },
                updateSortUrl: '/apm/sys/TSysBoardType/updateTSysBoardTypeSort',
                updateSortListUrl: '/apm/sys/TSysBoardType/updateTSysBoardTypeSortList',
                resetForm: () => {
                    this.tSysBoardTypeForm = {
                        fdParentId: '',
                        fdIsGroup: 0,
                        fdName: '',
                        fdSort: '',
                        fdComment: '',
                    };
                },
                afterOpenAddDialog: (node) => {
                    this.tSysBoardTypeForm.fdParentId = node.fdId;
                },
            };
            return boardTreeOptions;
        },
        getBoardGroupTreeOption() {
            let boardGroupTreeOptions = {
                title: "轮播看板分组",
                toolbarBtn: ["add", "edit", "del", "sort"],
                dialogTitle: "轮播看板分组",
                defaultExpandAll: true,
                showCheckbox: false,
                sortByDrag: true,
                onClick: (data, node, comp) => {
                    this.boardGroupTypeSelectData = data;
                    this.boardGroupTypeSelectValue = data.fdId;
                    if (data.fdIsGroup == 1) {
                        return;
                    }
                    this.groupBoardTableTitle = `轮播看板列表 -【${data.fdName}】`;
                    this.$refs.tSysBoardGroupRef.refresh();
                },
                loadOptions: {
                    url: "/apm/sys/TSysBoardGroupType/getTSysBoardGroupTypeList",
                    treeKey: {
                        idKey: "fdId",
                        parentKey: "fdParentId",
                        childrenKey: "children",
                        label: "fdName"
                    },
                    success: (response) => {
                        this.boardGroupTypeList = response.data;
                    },
                },
                editOptions: {
                    url: "/apm/sys/TSysBoardGroupType/getTSysBoardGroupTypeByFdId",
                    data: (node) => {
                        return {
                            fdId: node.fdId
                        }
                    },
                    success: (response) => {
                        this.tSysBoardGroupTypeForm = response.data;
                    },
                    error() {
                    },
                },
                insertUrl: "/apm/sys/TSysBoardGroupType/insertTSysBoardGroupType",
                insertData: () => {
                    return this.tSysBoardGroupTypeForm
                },
                updateUrl: "/apm/sys/TSysBoardGroupType/updateTSysBoardGroupType",
                updateData: () => {
                    return this.tSysBoardGroupTypeForm
                },
                deleteUrl: "/apm/sys/TSysBoardGroupType/deleteTSysBoardGroupTypeByFdId",
                deleteData: (node) => {
                    return {
                        fdId: node.fdId
                    }
                },
                updateSortUrl: '/apm/sys/TSysBoardGroupType/updateTSysBoardGroupTypeSort',
                updateSortListUrl: '/apm/sys/TSysBoardGroupType/updateTSysBoardGroupTypeSortList',
                resetForm: () => {
                    this.tSysBoardGroupTypeForm = {
                        fdParentId: '',
                        fdIsGroup: 0,
                        fdName: '',
                        fdSort: '',
                        fdComment: '',
                    };
                },
                afterOpenAddDialog: (node) => {
                    this.tSysBoardGroupTypeForm.fdParentId = node.fdId;
                },
            };
            return boardGroupTreeOptions;
        },
        copyBoard() {
            let selectRow = this.$refs.tSysBoardRef.getSelectOne();
            if (selectRow == null) {
                return;
            }
            this.$request({
                url: '/apm/sys/TSysBoard/copyBoard',
                method: 'post',
                data: {
                    fdId: selectRow.fdId,
                }
            }).then(response => {
                this.$message.success("复制成功");
                this.$refs.tSysBoardRef.refresh();
            })
        },
        previewBoard() {
            let selectRow = this.$refs.tSysBoardRef.getSelectOne();
            if (selectRow == null) {
                return;
            }
            let code = selectRow.fdCode;
            if (code == null || code == "") {
                this.$message.error("编码为空");
                return;
            }
            let url = location.origin + "#/board?code=" + code;
            window.open(url, '_blank');
        },
        copyBoardGroup() {
            let selectRow = this.$refs.tSysBoardGroupRef.getSelectOne();
            if (selectRow == null) {
                return;
            }
            this.$request({
                url: '/apm/sys/TSysBoardGroup/copyBoardGroup',
                method: 'post',
                data: {
                    fdId: selectRow.fdId,
                }
            }).then(response => {
                this.$message.success("复制成功");
                this.$refs.tSysBoardGroupRef.refresh();
            })
        },
        previewBoardGroup() {
            let selectRow = this.$refs.tSysBoardGroupRef.getSelectOne();
            if (selectRow == null) {
                return;
            }
            let code = selectRow.fdCode;
            if (code == null || code == "") {
                this.$message.error("编码为空");
                return;
            }
            let url = location.origin + "#/board?code=" + code;
            window.open(url, '_blank');
        }
    }
}
</script>

<style scoped>
.tree-node {
    font-size: 15px;
}
</style>
