Преглед изворни кода

主干取消同步医学快照功能

cfort пре 2 година
родитељ
комит
f95d4b554e

+ 0 - 7
src/business/platform/data/constants/buttons.js

@@ -92,13 +92,6 @@ const buttons = {
         icon: 'ibps-icon-export',
         scope: ['toolbar'],
     },
-    'consult': {
-      label: '表单',
-      type: 'primary',
-      icon: 'ibps-icon-table',
-      scope: ['manage'],
-      contextmenu: 'sub'
-    },
     'close': {
         label: '关闭',
         type: 'default',

+ 2 - 2
src/business/platform/data/templatebuilder/right-aside/constants/default-value.js

@@ -91,7 +91,7 @@ export const fucntionButtonDefaultValue = {
     position: 'all'
 }
 
-export const functionListButtonTypes = ['search', 'resetSearch', 'add', 'remove', 'edit', 'detail', 'print', 'import', 'export','consult', 'sefStartFlow', 'custom', 'exportMuBan']
+export const functionListButtonTypes = ['search', 'resetSearch', 'add', 'remove', 'edit', 'detail', 'print', 'import', 'export', 'sefStartFlow', 'custom', 'exportMuBan']
 // export const functionListButtonTypes = ['search', 'resetSearch', 'add', 'remove', 'edit', 'detail', 'sefStartFlow', 'custom']
 
 // export const functionTreeButtonTypes = ['refresh', 'expand', 'compress', 'custom']
@@ -99,5 +99,5 @@ export const functionTreeButtonTypes = ['refresh', 'expand', 'compress']
 
 export const contextmenuButtonTypes = ['add', 'remove', 'edit', 'detail']
 
-export const editButtonTypes = ['close', 'save', 'print', 'sefStartFlow', 'custom','consult']
+export const editButtonTypes = ['close', 'save', 'print', 'sefStartFlow', 'custom']
 // ['close', 'save', 'print', 'sefStartFlow']

+ 1 - 8
src/business/platform/data/templatebuilder/right-aside/editors/editor-button.vue

@@ -48,14 +48,7 @@
     <el-form-item v-if="formData && formData.button_type === 'export'" label="导出字段" prop="icon">
       <el-button size="small" type="primary" @click="handleExportFields">设置导出字段</el-button>
     </el-form-item>
-    <el-form-item
-            v-if="formData && (formData.button_type === 'consult' || formData.button_type === 'download')"
-            label="报表路径"
-            required
-            prop="label"
-        >
-            <el-input v-model="formData.reportPath" placeholder="请填写润乾报表完整路径" />
-        </el-form-item>
+
     <el-form-item v-if="formData && formData.button_type === 'sefStartFlow'" prop="deflow">
       <label slot="label">
         绑定流程

+ 0 - 83
src/business/platform/data/templaterender/templates/compenent/xlsxFile.vue

@@ -1,83 +0,0 @@
-<template>
-    <div class="bg">
-        <!-- <el-dialog title="收货地址" :visible.sync="dialogTableVisible" append-to-body  fullscreen @close="close" style="z-index:100">
-            <div class="boxOn" v-if="dialogTableVisible" :style="{height: height}">
-                <onLineEditing :id="xlsxId" @addClick="addClick"></onLineEditing>
-            </div>
-        </el-dialog> -->
-
-        <div class="boxOn" v-if="dialogTableVisible" :style="{height: height}">
-            <onLineEditing :id="xlsxId" @addClick="addClick"></onLineEditing>
-            <i class="el-icon-circle-close iBox" @click="close"></i>
-        </div>
-    </div>
-</template>
-
-<script>
-import LuckyExcel from 'luckyexcel'
-import onLineEditing from '@/views/onLineEditing/index'
-export default({
-    components:{
-        onLineEditing
-    },
-    props:{
-        visible: {
-            type: Boolean,
-            default: false
-        },
-        xlsxId:{
-            type: String,
-            default: ''
-
-        },
-    },
-    data(){
-        return{
-            dialogTableVisible: false,
-            height: document.documentElement.clientHeight  + 'px'
-            // document.documentElement.clientHeight - 60 + 'px'
-        }
-    },
-    watch: {
-        visible: {
-            handler: function (val, oldVal) {
-                this.dialogTableVisible = this.visible
-            },
-            immediate: true
-        }
-    },
-    methods: {
-        addClick(id,option){
-            this.$emit('addClick', id, option)
-        },
-        close(){
-            this.dialogTableVisible = false
-            this.$emit('xlsxFileClose');
-        }
-    }
-})
-</script>
-<style lang="scss" scoped>
-.bg{
-    background:#FFFFFF;
-    position: fixed;
-    left: 0;
-    bottom: 0;
-    top: 0;
-    right: 0;
-    background:#FFFFFF;
-    z-index: 100;
-}
-
-.iBox{
-    position: fixed;
-    right: 20px;
-    top: 10px;
-    font-size: 24px;
-    color: #666666;
-}
-.boxOn{
-
-    // z-index: 1009;
-}
-</style>

+ 5 - 63
src/business/platform/data/templaterender/templates/list.vue

@@ -256,20 +256,6 @@
             @close="(visible) => (importTableDialogVisible = visible)"
             @action-event="handleImportTableActionEvent"
         />
-        <xlsxFile
-            v-if="xlsxFileVisible"
-            :visible="xlsxFileVisible"
-            @xlsxFileClose="xlsxFileClose"
-        />
-
-        <ibps-attachment
-            ref="snapshot"
-            v-model="snapshotFile"
-            style="display: none;"
-            :download="false"
-            :readonly="true"
-        />
-        <on-line-index :groove-data="grooveData" :groove-list="grooveList" :dialog-visible.sync="grooveDialogVisible" style="z-index: 9999;" />
     </div>
 </template>
 <script>
@@ -315,9 +301,6 @@ import IbpsExport from '@/plugins/export'
 import IbpsImport from '@/plugins/import'
 import Vue from 'vue'
 Vue.component('ibps-data-template-render-dialog', () => import('@/business/platform/data/templaterender/preview/dialog.vue'))
-import xlsxFile from '@/business/platform/data/templaterender/templates/compenent/xlsxFile.vue'
-import onLineIndex from '@/views/onLineEditing/onLineIndex'
-import { preview } from '@/business/platform/form/utils/custom/preview'
 
 export default {
     name: 'list',
@@ -338,9 +321,8 @@ export default {
         Scan,
         importTable,
         Print: () => import('../components/print'),
-        LabelPrint: () => import('../components/labelPrint'),
-        xlsxFile,
-        onLineIndex
+        LabelPrint: () => import('../components/labelPrint')
+
         // BpmnFormrender
         // DataTemplateFormat
     },
@@ -365,8 +347,7 @@ export default {
         preview: {
             type: Boolean,
             default: false
-        },
-        xlsxFileVisible: false
+        }
     },
     data () {
         return {
@@ -440,18 +421,7 @@ export default {
             importTableDialogVisible: false,
             position: null,
             importList: [],
-            importVlaue: null,
-            snapshotFile: '',
-            generalShow: false,
-            currentType: '',
-            generalList: [],
-
-            grooveDialogVisible: false,
-            grooveData: {
-                title: ''
-            },
-            grooveList: [],
-            hadDoSearch: false
+            importVlaue: null
         }
     },
     computed: {
@@ -895,7 +865,6 @@ export default {
 
             // 前置事件
             this.beforeScript(command, position, selection, data, () => {
-                let src = ''
                 this.readonly = false
                 switch (buttonType) {
                     case 'search': // 查询
@@ -941,22 +910,6 @@ export default {
                         break
                     case 'custom': // 自定义按钮
                         break
-                    case 'consult': // 查阅
-                        this.snapshotFile = ''
-                        if (data.kuai_zhao_) {
-                            this.snapshotFile = data.kuai_zhao_
-                            setTimeout(() => {
-                                this.$refs.snapshot.handleActionEvent('preview', 0)
-                            }, 500)
-                        } else {
-                            if (!button.reportPath) {
-                                this.$message.warning('请先配置对应报表路径!')
-                                return
-                            }
-                            src = `${this.$reportPash.replace('show', 'pdf')}${button.reportPath}&id_=${selection}`
-                            preview(this, src)
-                        }
-                        break
                     case 'print': // 打印
                         ActionUtils.selectedRecord(selection).then((id) => {
                             this.handlePrint(id)
@@ -1288,7 +1241,6 @@ export default {
                 icon: rf.icon ? 'ibps-icon-' + rf.icon : defaultButton.icon,
                 type: rf.style || defaultButton.type,
                 deflow: rf.deflow || null,
-                reportPath: rf.reportPath,
                 mode: mode,
                 rightIcon: rightIcon,
                 menus: menus,
@@ -1662,17 +1614,7 @@ export default {
                 return obj
             }
         },
-        xlsxFileClick () {
-            this.xlsxFileVisible = true
-        },
-        xlsxFileClose () {
-            this.xlsxFileVisible = false
-        },
-        getGroo (data, list) {
-            this.grooveData = data
-            this.grooveList = list
-            this.grooveDialogVisible = true
-        },
+
         // =================================处理脚本================================
         /**
          * 初始化脚本

+ 1 - 2
src/business/platform/data/templaterender/utils/JTreeTemplate.js

@@ -18,7 +18,7 @@ import getserial from '../../../form/utils/custom/serialNumber' //编码规则
 import pintText from '../../../form/utils/custom/pintText.js' //打印规则
 import repostCurd from '../../../form/utils/custom/joinCURD.js' //增删改查规则
 import getDate from '../../../form/utils/custom/getDateRule.js' //获取年月日
-import { preview } from '@/business/platform/form/utils/custom/preview' // 图片预览
+
 // 定义全局
 var JTreeTemplate
 if (!window.JTreeTemplate) {
@@ -45,7 +45,6 @@ _.extend(JTreeTemplate, {
     this.$getNumBer = getserial //封装获取流水号
     this.$getPint =  pintText //封装打开报表
     this.$curdPost = repostCurd //封装通用增删改查
-    this.$preview = preview // 图片预览
     this._ = _
     this._isInitialization = true
   },

+ 0 - 144
src/business/platform/form/utils/custom/preview.js

@@ -1,144 +0,0 @@
-import dialog from '@/utils/dialog'
-import Pdfh5 from 'pdfh5'
-import 'pdfh5/css/pdfh5.css'
-import { snapshoot, download } from '@/api/platform/file/attachment' // 印章,快照
-import ActionUtils from '@/utils/action'
-import store from '@/store'
-
-export const preview = (tableForm, url) => {
-    let isMobile = false
-    if (/Mobi|Android|iPhone|iPad/i.test(navigator.userAgent)) {
-        isMobile = true
-    }
-    if (!isMobile) {
-        dialog(
-            {
-                data () {
-                    return {
-                        readonly: false,
-                        data: ''
-                    }
-                },
-
-                template: `<div style="height:100%"><iframe src="${url}" id="myiframe" frameborder="0" scrolling="no" height="100%" width="100%"></iframe></div>`
-            },
-            {
-                dialog: {
-                    appendToBody: true,
-                    width: '90%',
-                    top: '3vh',
-                    center: true,
-                    title: '',
-                    showClose: true,
-                    closeOnClickModal: false,
-                    'custom-class': 'ibps-dialog-91 btn-cover'
-                },
-            },
-            (tpl) => {
-                tableForm.dialogTemplate = tpl
-                const { role } = store.getters.userInfo || {}
-                // 系统管理角色、检验科主任、检验科副主任、文件管理员、技术负责人、质量负责人可下载打印
-                const hasRole = role.some(item => ['xtgljs', 'syszr', 'jykfzr', 'wjgly', 'jsfzr', 'zlfzr'].includes(item.alias))
-                if (hasRole) {
-                    return
-                }
-                setTimeout(() => {
-                    const toolbarCover = document.createElement('div')
-                    toolbarCover.classList.add('toolbar-cover')
-                    toolbarCover.addEventListener('click', () => {
-                        confirm('无权操作,请联系管理员开放相关权限!', '提示')
-                    })
-                    document.querySelector('.btn-cover').children[1].appendChild(toolbarCover)
-                }, 1000)
-            }
-        ).catch((_this) => {
-            _this.visible = false
-            tableForm.dialogTemplate = null
-        })
-    } else {
-        dialog(
-            {
-                data () {
-                    return {
-                        readonly: false,
-                        data: '',
-                        pdfh5: null,
-                        name: '',
-                        url: ''
-                    }
-                },
-                mounted () {
-                    this.getFile()
-                },
-                methods: {
-                    getFile () {
-                        const urlList = url.split('rpx=')[1].split('&id_=')
-                        const name = urlList[0].split('/')
-                        this.name = name[name.length - 1]
-                        const params = {
-                            url: tableForm.$getReportFile(urlList[0], `id_=${urlList[1]}`),
-                            name: name[name.length - 1] || '未命名',
-                            type: 'pdf'
-                        }
-                        snapshoot(params).then(res => {
-                            const { data = null } = res
-                            if (!data) {
-                                tableForm.$message.error('获取文件信息失败!')
-                                return
-                            }
-                            this.getDownload(data.id)
-                        })
-                    },
-                    getDownload (id) {
-                        download({ attachmentId: id }).then(res => {
-                            this.render(res.data)
-                            this.url = res.data
-                        })
-                    },
-                    render (url) {
-                        this.$nextTick(() => {
-                            this.pdfh5 = new Pdfh5('#demo', {
-                                // pdfurl: window.location.origin + '/' + url,
-                                data: url
-                                // lazy: true
-                            })
-                            this.pdfh5.on('complete', (status, msg, time) => {
-                                // console.log(status, msg, time)
-                            })
-                        })
-                    },
-                    close () {
-                        tableForm.dialogTemplate = null
-                        this.visible = false
-                    },
-                    downloadFile () {
-                        ActionUtils.exportFile(this.url, `${this.name}.pdf`)
-                    }
-                },
-                template:
-                `<div style="height:100%">
-                    <div id="demo"></div>
-                    <div style="position:absolute;right: 17px;top: 15px;" >
-                        <i class="el-icon-download" style="font-size: 24px;margin-right:15px" @click="downloadFile"></i>
-                        <i class="el-icon-close" style="font-size: 24px;" @click="close"></i>
-                    </div>
-                </div>`
-            },
-            {
-                dialog: {
-                    appendToBody: true,
-                    width: '90%',
-                    top: '1vh',
-                    center: true,
-                    title: '',
-                    'custom-class': 'ibps-dialog-91'
-                }
-            }, (tpl) => {
-                tableForm.dialogTemplate = tpl
-            }
-        ).catch((_this) => {
-            _this.visible = false
-            tableForm.dialogTemplate = null
-        })
-    }
-}

+ 2 - 2
src/components/ibps-file-viewer/index.vue

@@ -15,7 +15,7 @@
                 custom-class="ibps-file-preview-dialog"
                 @close="closeDialog"
             >
-                <editor v-if="dialogVisible" :option="option" />
+                <editor :option="option" v-if="dialogVisible" />
                 <pdf-viewer v-if="fileType === 'pdf'" ref="viewer" />
 
                 <txt-viewer
@@ -134,7 +134,7 @@
                     this.zIndex = this.fixZIndex()
                     this.fileUrl = this.url
                     this.fileType = 'image'
-                } else if(flag && pdfType.includes(this.fileExt)){
+                } else if(flag && pdfType.includes(this.fileExt) && this.optionFile.previewType === 'PDFH5'){
                     // 仅特定字段的PDF文件用PDFh5预览,其余PDF文件使用onlyoffice预览
                     // this.fileType = 'pdf'
                     this.$nextTick(() => {

+ 0 - 386
src/views/onLineEditing/index.vue

@@ -1,386 +0,0 @@
-<template>
-    <div class="test2">
-        <div class="mb-md">
-            <div v-if="grooveData.xlsxTitleShow" class="demo-input-suffix">
-                表格名称:
-                <el-input v-model="title" placeholder="请输入表格名称" style="width: 400px" />
-            </div>
-            <div v-if="grooveData.saveShow" class="demo-input-suffix">
-                <el-button type="success" @click="save">保存</el-button>
-            </div>
-            <div v-if="grooveData.clickHandleShow" class="demo-input-suffix">
-                <el-button type="warning" @click="clickHandle">上传xlsx</el-button>
-            </div>
-            <div class="demo-input-suffix">
-                <el-button type="info" @click="exportExcelBtn">导出xlsx</el-button>
-            </div>
-            <input ref="inputFile" type="file" style="display: none" @change="chageFile">
-            <!-- <div v-if="!grooveData.xlsxTitleShow && !grooveData.saveShow && !grooveData.clickHandleShow && !grooveData.exportExcelShow" style="height: 30px"></div> -->
-        </div>
-        <!--web spreadsheet组件-->
-        <div class="excel" :style="{height: height + 'px'}">
-            <div id="luckysheetDom" ref="luckysheet" style="margin: 0px; padding: 0px; width:100%; height: 100%;z-index: 100;" />
-
-            <!-- <div id="luckysheetDom" ref="luckysheet" style="margin: 0px; padding: 0px; width: calc(100% + 200px); height: calc(100% + 50px);z-index: 100;" /> -->
-        </div>
-    </div>
-</template>
-
-<script>
-// 引入依赖包
-import LuckyExcel from 'luckyexcel'
-const luckysheet = window.luckysheet
-// 代码见下
-import { exportExcel } from './js/export'
-import { upload } from '@/api/detection/jtsjpz'
-import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
-export default {
-    name: 'xspreadsheet-demo',
-    props: {
-        id: {
-            type: String,
-            default: ''
-        },
-        dialogShow: {
-            type: Boolean,
-            default: false
-        },
-        grooveData: {
-            type: Object,
-            default: function () {
-                return {
-                    title: '提示',
-                    saveShow: true,
-                    exportExcelShow: true,
-                    clickHandleShow: true,
-                    xlsxTitleShow: true,
-                    readOnly: true,
-                    showtoolbarConfig: null,
-                    cellRightClickConfig: null,
-                    showstatisticBarConfig: null
-                }
-            }
-        },
-        grooveList: {
-            type: Array,
-            default: () => {
-                return []
-            }
-        }
-    },
-    data () {
-        return {
-            option: null,
-
-            showtoolbarConfig: {
-                // //自定义配置工具栏
-                undoRedo: true, // 撤销重做,注意撤消重做是两个按钮,由这一个配置决定显示还是隐藏
-                paintFormat: true, // 格式刷
-                currencyFormat: true, // 货币格式
-                percentageFormat: true, // 百分比格式
-                numberDecrease: true, // '减少小数位数'
-                numberIncrease: true, // '增加小数位数
-                moreFormats: true, // '更多格式'
-                font: true, // '字体'
-                fontSize: true, // '字号大小'
-                bold: true, // '粗体 (Ctrl+B)'
-                italic: true, // '斜体 (Ctrl+I)'
-                strikethrough: true, // '删除线 (Alt+Shift+5)'
-                underline: true, // '下划线 (Alt+Shift+6)'
-                textColor: true, // '文本颜色'
-                fillColor: true, // '单元格颜色'
-                border: true, // '边框'
-                mergeCell: true, // '合并单元格'
-                horizontalAlignMode: true, // '水平对齐方式'
-                verticalAlignMode: true, // '垂直对齐方式'
-                textWrapMode: true, // '换行方式'
-                textRotateMode: false, // '文本旋转方式'
-                image: false, // '插入图片'
-                link: false, // '插入链接'
-                chart: false, // '图表'(图标隐藏,但是如果配置了chart插件,右击仍然可以新建图表)
-                postil: false, // '批注'
-                pivotTable: false, // '数据透视表'
-                function: true, // '公式'
-                frozenMode: false, // '冻结方式'
-                sortAndFilter: false, // '排序和筛选'
-                conditionalFormat: false, // '条件格式'
-                dataVerification: false, // '数据验证'
-                splitColumn: false, // '分列'
-                screenshot: true, // '截图'
-                findAndReplace: true, // '查找替换'
-                protection: false, // '工作表保护'
-                print: false // '打印'
-            },
-            cellRightClickConfig: {
-                // 右键单元格菜单设置
-                copy: true, // 复制
-                copyAs: true, // 复制为
-                paste: true, // 粘贴
-                insertRow: true, // 插入行
-                insertColumn: true, // 插入列
-                deleteRow: true, // 删除选中行
-                deleteColumn: true, // 删除选中列
-                deleteCell: true, // 删除单元格
-                hideRow: false, // 隐藏选中行和显示选中行
-                hideColumn: false, // 隐藏选中列和显示选中列
-                rowHeight: true, // 行高
-                columnWidth: true, // 列宽
-                clear: true, // 清除内容
-                matrix: false, // 矩阵操作选区
-                sort: false, // 排序选区
-                filter: false, // 筛选选区
-                chart: false, // 图表生成
-                image: false, // 插入图片
-                link: false, // 插入链接
-                data: false, // 数据验证
-                cellFormat: true // 设置单元格格式
-            },
-            showstatisticBarConfig: {
-                // 自定义配置底部计数栏
-                count: false, // 计数栏
-                view: true, // 打印视图
-                zoom: true // 缩放
-            },
-            title: this.grooveData.title,
-            height: ''
-        }
-    },
-    created () {
-        if (this.dialogShow) {
-            this.height = window.innerHeight - 110
-        } else {
-            this.height = window.innerHeight - 150
-        }
-
-        if (this.grooveData.showtoolbarConfig && Object.keys(this.grooveData.showtoolbarConfig).length > 0) {
-            Object.keys(this.grooveData.showtoolbarConfig).forEach(item => {
-                this.showtoolbarConfig[item] = this.grooveData.showtoolbarConfig[item]
-            })
-        }
-
-        if (this.grooveData.cellRightClickConfig && Object.keys(this.grooveData.cellRightClickConfig).length > 0) {
-            Object.keys(this.grooveData.cellRightClickConfig).forEach(item => {
-                this.cellRightClickConfig[item] = this.grooveData.cellRightClickConfig[item]
-            })
-        }
-
-        if (this.grooveData.showstatisticBarConfig && Object.keys(this.grooveData.showstatisticBarConfig).length > 0) {
-            Object.keys(this.grooveData.showstatisticBarConfig).forEach(item => {
-                this.showstatisticBarConfig[item] = this.grooveData.showstatisticBarConfig[item]
-            })
-        }
-    },
-    mounted () {
-        if (this.id) {
-            this.getInitData(this.id)
-            // this.init()
-        } else {
-            this.init()
-        }
-    },
-    destroyed () {
-        luckysheet.destroy()
-        // this.$refs.luckysheet.remove()
-    },
-    methods: {
-        init () {
-            let options = ''
-            if (!options) {
-                options = {
-                    container: 'luckysheetDom',
-                    title: '',
-                    lang: 'zh',
-                    data: [
-                        {
-                            name: 'sheet1'
-                        }
-                    ],
-                    showtoolbarConfig: this.showtoolbarConfig,
-                    showinfobar: false,
-                    cellRightClickConfig: this.cellRightClickConfig,
-                    showstatisticBarConfig: this.showstatisticBarConfig
-                }
-            }
-            if (this.grooveList.length > 0) {
-                this.grooveList.forEach((item, index) => {
-                    if (!item.name) {
-                        item.name = 'sheet' + index
-                    }
-                })
-                options.data = this.grooveList
-            }
-            // 可开启只读模式
-            // options.allowEdit = false
-            // this.option = options
-            luckysheet.create(options)
-        },
-        // 获取数据表的数据
-        getInitData (id) {
-            const sql = `select * from t_pbgl where id_ = '${id}'`
-            curdPost('sql', sql).then((res) => {
-                if (res.state === '200') {
-                    const dataItem = res.variables.data[0]
-                    this.title = dataItem.shu_ju_ming_cheng
-                    const options = JSON.parse(dataItem.shu_ju_cun_chu_)
-                    luckysheet.create(options)
-                }
-            })
-        },
-        save () {
-            const data = luckysheet.toJson()
-            if (this.id) {
-                this.updateSumbit(data)
-            } else {
-                this.getSumbit(data)
-            }
-        },
-        // 下载文档
-        exportExcelBtn () {
-            console.log(luckysheet.toJson())
-            const title = this.title ? this.title : '下载'
-            exportExcel(luckysheet.getluckysheetfile(), title)
-        },
-
-        // 上传文档
-        clickHandle () {
-            this.$refs.inputFile.click()
-        },
-        chageFile () {
-            this.importExcel(this.$refs.inputFile.files[0])
-        },
-        importExcel (file) {
-            const name = file.name
-            this.title = name.split('.xlsx')[0]
-            // 获取文件后缀
-            const suffixArr = name.split('.')
-            const suffix = suffixArr[suffixArr.length - 1]
-            if (suffix !== 'xlsx') {
-                alert('目前只能导入xlsx类型的文件')
-                return
-            }
-            LuckyExcel.transformExcelToLucky(file, this.fileCb, this.errorCb)
-        },
-        fileCb (exportJson, luckysheetfile) {
-            // 转换后获取工作表数据
-            if (exportJson.sheets === null || exportJson.sheets.length === 0) {
-                alert('无法读取excel文件的内容,当前不支持xls文件!')
-                return
-            }
-
-            luckysheet.destroy()
-
-            luckysheet.create({
-                container: 'luckysheetDom', // luckysheet is the container id
-                data: exportJson.sheets,
-                title: exportJson.info.name,
-                userInfo: exportJson.info.name.creator,
-                lang: 'zh',
-                showtoolbarConfig: this.showtoolbarConfig,
-                showinfobar: false,
-                cellRightClickConfig: this.cellRightClickConfig,
-                showstatisticBarConfig: this.showstatisticBarConfig
-            })
-        },
-        errorCb (error) {},
-        printFn () {
-            // 1. 实现全选
-            $('#luckysheet-left-top').click()
-            // 2. 生成选区的截图
-            const src = luckysheet.getScreenshot()
-            const $img = `<img src=${src} style="max-width: 90%;" />`
-            this.$nextTick(() => {
-                document.querySelector('#print_html').innerHTML = $img
-            })
-            // 3. 调用系统打印:已经用v-print指令绑定在打印按钮上
-        },
-
-        getSumbit (option) {
-            if (this.title === '') {
-                this.$message({
-                    showClose: true,
-                    message: '请填写表格名称',
-                    type: 'warning'
-                })
-                return
-            }
-            const data = {
-                shu_ju_cun_chu_: JSON.stringify(option),
-                shu_ju_lei_xing_: '在线编辑',
-                shu_ju_ming_cheng: this.title,
-                bao_cun_dao_chu_s: JSON.stringify(luckysheet.getluckysheetfile())
-            }
-            const params = {
-                tableName: 't_pbgl',
-                paramWhere: [data]
-            }
-            curdPost('add', params).then((res) => {
-                if (res.state == '200') {
-                    const dataItem = res.variables.cont[0]
-                    this.id = dataItem.id_
-                    this.$emit('addClick', dataItem.id_, dataItem)
-                    this.$message({
-                        showClose: true,
-                        message: this.title + '的文档' + '保存成功',
-                        type: 'success'
-                    })
-                }
-            })
-        },
-        updateSumbit (option) {
-            if (this.title === '') {
-                this.$message({
-                    showClose: true,
-                    message: '请填写表格名称',
-                    type: 'warning'
-                })
-                return
-            }
-            const data = {
-                where: {
-                    id_: this.id
-                },
-                param: {
-                    shu_ju_cun_chu_: JSON.stringify(option),
-                    shu_ju_lei_xing_: '在线编辑',
-                    shu_ju_ming_cheng: this.title,
-                    bao_cun_dao_chu_s: JSON.stringify(luckysheet.getluckysheetfile())
-                }
-            }
-            const allSampleParams = {
-                tableName: 't_pbgl',
-                updList: [data]
-            }
-            curdPost('update', allSampleParams).then((res) => {
-                if (res.state === '200') {
-                    this.$emit('addClick', this.id, option)
-                    this.$message({
-                        showClose: true,
-                        message: this.title + '的文档' + '修改成功',
-                        type: 'success'
-                    })
-                }
-            })
-        }
-    }
-}
-</script>
-<style scoped lang="less">
-.mb-md {
-    padding: 10px;
-    display: flex;
-}
-.demo-input-suffix {
-    margin-right: 10px;
-}
-.test2 {
-    // width: 100%;
-    // height: 100%;
-    // display: flex;
-    // flex-direction: column;
-    .excel {
-        flex: 1;
-        height: 500px;
-    }
-}
-
-</style>

+ 0 - 1401
src/views/onLineEditing/js/export copy.js

@@ -1,1401 +0,0 @@
-const Excel = require('exceljs')
-export  async function exportExcel(luckysheet,name="file") { // 参数为luckysheet.getluckysheetfile()获取的对象
-    // 1.创建工作簿,可以为工作簿添加属性
-    const workbook = new Excel.Workbook();
-    // 2.创建表格,第二个参数可以配置创建什么样的工作表
-    luckysheet.every(function (table) {
-        if (table.data.length === 0) return true;
-        const worksheet = workbook.addWorksheet(name);
-        // 3.设置单元格合并,设置单元格边框,设置单元格样式,设置值
-        setStyleAndValue(table.data, worksheet);
-        setMerge(table.config.merge, worksheet);
-        setBorder(table, worksheet);
-        setImages(table, worksheet, workbook);
-        return true;
-    })
-    // 4.写入 buffer
-    const buffer = await workbook.xlsx.writeBuffer();
-    // 5.保存为文件
-    saveFile(buffer,name);
-}
-
-var saveFile = function(buf,name) {
-  let blob = new Blob([buf], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' });
-  const downloadElement = document.createElement('a');
-  let href = window.URL.createObjectURL(blob);
-  downloadElement.href = href;
-  downloadElement.download = name+".xlsx"; // 文件名字
-  document.body.appendChild(downloadElement);
-  downloadElement.click();
-  document.body.removeChild(downloadElement); // 下载完成移除元素
-  window.URL.revokeObjectURL(href); // 释放掉blob对象
-}
-
-
-var setMerge = function (luckyMerge = {}, worksheet) {
-  const mergearr = Object.values(luckyMerge);
-  mergearr.forEach(function (elem) { // elem格式:{r: 0, c: 0, rs: 1, cs: 2}
-    // 按开始行,开始列,结束行,结束列合并(相当于 K10:M12)
-    worksheet.mergeCells(elem.r + 1, elem.c + 1, elem.r + elem.rs, elem.c + elem.cs);
-  });
-}
-
-//获取图片在单元格的位置
-var  getImagePosition =function(num,arr){
-  let index = 0;
-  let minIndex;
-  let maxIndex;
-  for (let i = 0; i < arr.length; i++) {
-    if (num < arr[i]) {
-        index = i;
-        break;
-    }
-  }
-
-  if(index==0){
-    minIndex = 0;
-    maxIndex = 1;
-    return  Math.abs((num-0)/(arr[maxIndex]-arr[minIndex]))+index;
-  }
-  else if(index == arr.length-1){
-    minIndex = arr.length-2;
-    maxIndex = arr.length-1;
-  }
-  else{
-    minIndex = index-1;
-    maxIndex = index;
-  }
-  let min = arr[minIndex];
-  let max = arr[maxIndex];
-  let radio = Math.abs((num-min)/(max-min))+index
-  return radio;
-}
-
-var setImages = function (table, worksheet, workbook) {
-    let {
-      images,
-      visibledatacolumn,//所有行的位置
-      visibledatarow //所有列的位置
-    } = {...table}
-    if (typeof images != 'object') return;
-    for (let key in images) {
-    // 通过 base64  将图像添加到工作簿
-        const myBase64Image = images[key].src;
-        //开始行 开始列 结束行 结束列
-        const item = images[key];
-        const imageId = workbook.addImage({
-            base64: myBase64Image,
-            extension: 'png'
-        });
-
-        const col_st = getImagePosition(item.default.left,visibledatacolumn);
-        const row_st = getImagePosition(item.default.top,visibledatarow);
-
-        //模式1,图片左侧与luckysheet位置一样,像素比例保持不变,但是,右侧位置可能与原图所在单元格不一致
-        worksheet.addImage(imageId, {
-            tl: { col: col_st, row: row_st},
-            ext: { width: item.default.width, height: item.default.height },
-        });
-        //模式2,图片四个角位置没有变动,但是图片像素比例可能和原图不一样
-        // const w_ed = item.default.left+item.default.width;
-        // const h_ed = item.default.top+item.default.height;
-        // const col_ed = getImagePosition(w_ed,visibledatacolumn);
-        // const row_ed = getImagePosition(h_ed,visibledatarow);
-        // worksheet.addImage(imageId, {
-        //   tl: { col: col_st, row: row_st},
-        //   br: { col: col_ed, row: row_ed},
-        // });
-    }
-};
-
-var setBorder = function (lucksheetfile, worksheet) {
-  if (!lucksheetfile) return;
-  const luckyToExcel = {
-    style: {
-      0: 'none',
-      1: 'thin',
-      2: 'hair',
-      3: 'dotted',
-      4: 'dashDot', // 'Dashed',
-      5: 'dashDot',
-      6: 'dashDotDot',
-      7: 'double',
-      8: 'medium',
-      9: 'mediumDashed',
-      10: 'mediumDashDot',
-      11: 'mediumDashDotDot',
-      12: 'slantDashDot',
-      13: 'thick'
-    }
-  }
-  //获取所有的单元格边框的信息
-  const borderInfoCompute = getBorderInfo(lucksheetfile);
-  for (let x in borderInfoCompute) {
-    let border = {};
-    let info = borderInfoCompute[x];
-    let row = parseInt(x.substr(0, x.indexOf('_')));
-    let column = parseInt(x.substr(x.indexOf('_') + 1));
-    if(info.t!=undefined){
-      const tcolor = info.t.color.indexOf('rgb')>-1 ?rgb2hex(info.t.color):info.t.color;
-      border['top'] = {style:luckyToExcel.style[info.t.style],color: {argb: tcolor.replace('#', '')}};
-    }
-    if(info.r!=undefined){
-      const rcolor = info.r.color.indexOf('rgb')>-1 ?rgb2hex(info.r.color):info.r.color;
-      border['right'] = {style:luckyToExcel.style[info.r.style],color: {argb: rcolor.replace('#', '')}};
-    }
-    if(info.b!=undefined){
-      const bcolor = info.b.color.indexOf('rgb')>-1 ?rgb2hex(info.b.color):info.b.color;
-      border['bottom'] = {style:luckyToExcel.style[info.b.style],color: {argb: bcolor.replace('#', '')}};
-    }
-    if(info.l!=undefined){
-      const lcolor = info.l.color.indexOf('rgb')>-1 ?rgb2hex(info.l.color):info.l.color;
-      border['left'] = {style:luckyToExcel.style[info.l.style],color: {argb: lcolor.replace('#', '')}};
-    }
-    worksheet.getCell(row + 1, column + 1).border = border;
-  }
-}
-
-var getBorderInfo=function(luckysheetfile){
-  let borderInfoCompute = {};
-  let cfg = luckysheetfile.config;
-  let data = luckysheetfile.data;
-  let borderInfo = cfg["borderInfo"];
-  //设置需要计算边框的区域
-  let dataset_row_st = 0,dataset_row_ed = data.length,dataset_col_st=0,dataset_col_ed=data[0].length;
-  if(borderInfo != null && borderInfo.length > 0){
-    for(let i = 0; i < borderInfo.length; i++){
-        let rangeType = borderInfo[i].rangeType;
-
-        if(rangeType == "range"){
-            let borderType = borderInfo[i].borderType;
-            let borderColor = borderInfo[i].color;
-            let borderStyle = borderInfo[i].style;
-
-            let borderRange = borderInfo[i].range;
-
-            for(let j = 0; j < borderRange.length; j++){
-                let bd_r1 = borderRange[j].row[0], bd_r2 = borderRange[j].row[1];
-                let bd_c1 = borderRange[j].column[0], bd_c2 = borderRange[j].column[1];
-
-                if(bd_r1<dataset_row_st){
-                    bd_r1 = dataset_row_st;
-                }
-
-                if(bd_r2>dataset_row_ed){
-                    bd_r2 = dataset_row_ed;
-                }
-
-                if(bd_c1<dataset_col_st){
-                    bd_c1 = dataset_col_st;
-                }
-
-                if(bd_c2>dataset_col_ed){
-                    bd_c2 = dataset_col_ed;
-                }
-
-                if(borderType == "border-left"){
-                    for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                        if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                            continue;
-                        }
-
-                        if(borderInfoCompute[bd_r + "_" + bd_c1] == null){
-                            borderInfoCompute[bd_r + "_" + bd_c1] = {};
-                        }
-
-                        borderInfoCompute[bd_r + "_" + bd_c1].l = { "color": borderColor, "style": borderStyle };
-
-                        let bd_c_left = bd_c1 - 1;
-
-                        if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                            if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){
-                                let cell_left = data[bd_r][bd_c_left];
-
-                                let mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c];
-
-                                if(mc.c + mc.cs - 1 == bd_c_left){
-                                    borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                            }
-                        }
-
-                        let mc = cfg["merge"] || {};
-                        for (const key in mc) {
-                            let {c,r,cs,rs} = mc[key];
-                            if(bd_c1 <= c + cs - 1 && bd_c1 > c && bd_r >= r && bd_r <= r + rs -1){
-                                borderInfoCompute[bd_r + "_" + bd_c1].l = null;
-                            }
-                        }
-                    }
-                }
-                else if(borderType == "border-right"){
-                    for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                        if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                            continue;
-                        }
-
-                        if(borderInfoCompute[bd_r + "_" + bd_c2] == null){
-                            borderInfoCompute[bd_r + "_" + bd_c2] = {};
-                        }
-
-                        borderInfoCompute[bd_r + "_" + bd_c2].r = { "color": borderColor, "style": borderStyle };
-
-                        let bd_c_right = bd_c2 + 1;
-
-                        if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                            if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){
-                                let cell_right = data[bd_r][bd_c_right];
-
-                                let mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c];
-
-                                if(mc.c == bd_c_right){
-                                    borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                            }
-                        }
-                        let mc = cfg["merge"] || {};
-                        for (const key in mc) {
-                            let {c,r,cs,rs} = mc[key];
-                            if(bd_c2 < c + cs - 1 && bd_c2 >= c && bd_r >= r && bd_r <= r + rs -1){
-                                borderInfoCompute[bd_r + "_" + bd_c2].r = null;
-                            }
-                        }
-                    }
-                }
-                else if(borderType == "border-top"){
-                    if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r1] != null) {
-                        continue;
-                    }
-
-                    for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                        if(borderInfoCompute[bd_r1 + "_" + bd_c] == null){
-                            borderInfoCompute[bd_r1 + "_" + bd_c] = {};
-                        }
-
-                        borderInfoCompute[bd_r1 + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-
-                        let bd_r_top = bd_r1 - 1;
-
-                        if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                            if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){
-                                let cell_top = data[bd_r_top][bd_c];
-
-                                let mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
-                                if(mc.r + mc.rs - 1 == bd_r_top){
-                                    borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                            }
-                        }
-
-                        let mc = cfg["merge"] || {};
-                        for (const key in mc) {
-                            let {c,r,cs,rs} = mc[key];
-                            if(bd_r1 <= r + rs - 1 && bd_r1 > r && bd_c >= c && bd_c <= c + cs -1){
-                                borderInfoCompute[bd_r1 + "_" + bd_c].t = null;
-                            }
-                        }
-                    }
-                }
-                else if(borderType == "border-bottom"){
-                    if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r2] != null) {
-                        continue;
-                    }
-
-                    for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                        if(borderInfoCompute[bd_r2 + "_" + bd_c] == null){
-                            borderInfoCompute[bd_r2 + "_" + bd_c] = {};
-                        }
-
-                        borderInfoCompute[bd_r2 + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-
-                        let bd_r_bottom = bd_r2 + 1;
-
-                        if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                            if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){
-                                let cell_bottom = data[bd_r_bottom][bd_c];
-
-                                let mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c];
-
-                                if(mc.r == bd_r_bottom){
-                                    borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                            }
-                        }
-
-                        let mc = cfg["merge"] || {};
-                        for (const key in mc) {
-                            let {c,r,cs,rs} = mc[key];
-                            if(bd_r2 < r + rs - 1 && bd_r2 >= r && bd_c >= c && bd_c <= c + cs -1){
-                                borderInfoCompute[bd_r2 + "_" + bd_c].b = null;
-                            }
-                        }
-                    }
-                }
-                else if(borderType == "border-all"){
-                    for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                        if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                            continue;
-                        }
-
-                        for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                            if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                let cell = data[bd_r][bd_c];
-
-                                let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-                                if(mc==undefined || mc==null){
-                                    continue
-                                };
-                                if(mc.r == bd_r){
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                }
-
-                                if(mc.r + mc.rs - 1 == bd_r){
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-
-                                if(mc.c == bd_c){
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                }
-
-                                if(mc.c + mc.cs - 1 == bd_c){
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else{
-                                if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                    borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                }
-
-                                borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                            }
-
-                            if(bd_r == bd_r1){
-                                let bd_r_top = bd_r1 - 1;
-
-                                if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                                    if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){
-                                        let cell_top = data[bd_r_top][bd_c];
-
-                                        let mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
-                                        if(mc.r + mc.rs - 1 == bd_r_top){
-                                            borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-
-                            if(bd_r == bd_r2){
-                                let bd_r_bottom = bd_r2 + 1;
-
-                                if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                                    if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){
-                                        let cell_bottom = data[bd_r_bottom][bd_c];
-
-                                        let mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c];
-
-                                        if(mc.r == bd_r_bottom){
-                                            borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-
-                            if(bd_c == bd_c1){
-                                let bd_c_left = bd_c1 - 1;
-
-                                if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){
-                                        let cell_left = data[bd_r][bd_c_left];
-
-                                        let mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c];
-
-                                        if(mc.c + mc.cs - 1 == bd_c_left){
-                                            borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-
-                            if(bd_c == bd_c2){
-                                let bd_c_right = bd_c2 + 1;
-
-                                if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){
-                                        let cell_right = data[bd_r][bd_c_right];
-
-                                        let mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c];
-
-                                        if(mc.c == bd_c_right){
-                                            borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-                else if(borderType == "border-outside"){
-                    for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                        if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                            continue;
-                        }
-
-                        for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                            if(!(bd_r == bd_r1 || bd_r == bd_r2 || bd_c == bd_c1 || bd_c == bd_c2)){
-                                continue;
-                            }
-
-                            if(bd_r == bd_r1){
-                                if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                    borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                }
-
-                                borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-
-                                let bd_r_top = bd_r1 - 1;
-
-                                if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                                    if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){
-                                        let cell_top = data[bd_r_top][bd_c];
-
-                                        let mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
-                                        if(mc.r + mc.rs - 1 == bd_r_top){
-                                            borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-
-                            if(bd_r == bd_r2){
-                                if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                    borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                }
-
-                                borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-
-                                let bd_r_bottom = bd_r2 + 1;
-
-                                if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                                    if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){
-                                        let cell_bottom = data[bd_r_bottom][bd_c];
-
-                                        let mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c];
-
-                                        if(mc.r == bd_r_bottom){
-                                            borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-
-                            if(bd_c == bd_c1){
-                                if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                    borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                }
-
-                                borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-
-                                let bd_c_left = bd_c1 - 1;
-
-                                if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){
-                                        let cell_left = data[bd_r][bd_c_left];
-
-                                        let mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c];
-
-                                        if(mc.c + mc.cs - 1 == bd_c_left){
-                                            borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-
-                            if(bd_c == bd_c2){
-                                if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                    borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                }
-
-                                borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-
-                                let bd_c_right = bd_c2 + 1;
-
-                                if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){
-                                        let cell_right = data[bd_r][bd_c_right];
-
-                                        let mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c];
-
-                                        if(mc.c == bd_c_right){
-                                            borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-                else if(borderType == "border-inside"){
-                    for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                        if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                            continue;
-                        }
-
-                        for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                            if(bd_r == bd_r1 && bd_c == bd_c1){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else if(bd_r == bd_r2 && bd_c == bd_c1){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else if(bd_r == bd_r1 && bd_c == bd_c2){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else if(bd_r == bd_r2 && bd_c == bd_c2){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else if(bd_r == bd_r1){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                    let cell = data[bd_r][bd_c];
-
-                                    let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                    if(mc.c == bd_c){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    }
-                                    else if(mc.c + mc.cs - 1 == bd_c){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else if(bd_r == bd_r2){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                    let cell = data[bd_r][bd_c];
-
-                                    let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                    if(mc.c == bd_c){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    }
-                                    else if(mc.c + mc.cs - 1 == bd_c){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else if(bd_c == bd_c1){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                    let cell = data[bd_r][bd_c];
-
-                                    let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                    if(mc.r == bd_r){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                    else if(mc.r + mc.rs - 1 == bd_r){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else if(bd_c == bd_c2){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                    let cell = data[bd_r][bd_c];
-
-                                    let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                    if(mc.r == bd_r){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                    else if(mc.r + mc.rs - 1 == bd_r){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else{
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                    let cell = data[bd_r][bd_c];
-
-                                    let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                    if(mc.r == bd_r){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                    else if(mc.r + mc.rs - 1 == bd_r){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-
-                                    if(mc.c == bd_c){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    }
-                                    else if(mc.c + mc.cs - 1 == bd_c){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                        }
-                    }
-                }
-                else if(borderType == "border-horizontal"){
-                    for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                        if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                            continue;
-                        }
-
-                        for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                            if(bd_r == bd_r1){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else if(bd_r == bd_r2){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else{
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                    let cell = data[bd_r][bd_c];
-
-                                    let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                    if(mc.r == bd_r){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                    else if(mc.r + mc.rs - 1 == bd_r){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                        }
-                    }
-                }
-                else if(borderType == "border-vertical"){
-                    for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                        if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                            continue;
-                        }
-
-                        for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                            if(bd_c == bd_c1){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else if(bd_c == bd_c2){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            else{
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                    let cell = data[bd_r][bd_c];
-
-                                    let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c] || {};
-
-                                    if(mc.c == bd_c){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    }
-                                    else if(mc.c + mc.cs - 1 == bd_c){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                        }
-                    }
-                }
-                else if(borderType == "border-none"){
-                    for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                        if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                            continue;
-                        }
-
-                        for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                            if(borderInfoCompute[bd_r + "_" + bd_c] != null){
-                                delete borderInfoCompute[bd_r + "_" + bd_c];
-                            }
-
-                            if(bd_r == bd_r1){
-                                let bd_r_top = bd_r1 - 1;
-
-                                if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                                    delete borderInfoCompute[bd_r_top + "_" + bd_c].b;
-                                }
-                            }
-
-                            if(bd_r == bd_r2){
-                                let bd_r_bottom = bd_r2 + 1;
-
-                                if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                                    delete borderInfoCompute[bd_r_bottom + "_" + bd_c].t;
-                                }
-                            }
-
-                            if(bd_c == bd_c1){
-                                let bd_c_left = bd_c1 - 1;
-
-                                if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                                    delete borderInfoCompute[bd_r + "_" + bd_c_left].r;
-                                }
-                            }
-
-                            if(bd_c == bd_c2){
-                                let bd_c_right = bd_c2 + 1;
-
-                                if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                                    delete borderInfoCompute[bd_r + "_" + bd_c_right].l;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        else if(rangeType == "cell"){
-            let value = borderInfo[i].value;
-
-            let bd_r = value.row_index, bd_c = value.col_index;
-
-            if(bd_r < dataset_row_st || bd_r > dataset_row_ed || bd_c < dataset_col_st || bd_c > dataset_col_ed){
-                continue;
-            }
-
-            if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                continue;
-            }
-
-            if(value.l != null || value.r != null || value.t != null || value.b != null){
-                if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                    borderInfoCompute[bd_r + "_" + bd_c] = {};
-                }
-
-                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                    let cell = data[bd_r][bd_c];
-                    let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c] || {};
-
-                    if(value.l != null && bd_c == mc.c){ //左边框
-                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": value.l.color, "style": value.l.style };
-
-                        let bd_c_left = bd_c - 1;
-
-                        if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                            if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){
-                                let cell_left = data[bd_r][bd_c_left];
-
-                                let mc_l = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c];
-
-                                if(mc_l.c + mc_l.cs - 1 == bd_c_left){
-                                    borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style };
-                            }
-                        }
-                    }
-                    else{
-                        borderInfoCompute[bd_r + "_" + bd_c].l = null;
-                    }
-
-                    if(value.r != null && bd_c == mc.c + mc.cs - 1){ //右边框
-                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": value.r.color, "style": value.r.style };
-
-                        let bd_c_right = bd_c + 1;
-
-                        if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                            if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){
-                                let cell_right = data[bd_r][bd_c_right];
-
-                                let mc_r = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c];
-
-                                if(mc_r.c == bd_c_right){
-                                    borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style };
-                            }
-                        }
-                    }
-                    else{
-                        borderInfoCompute[bd_r + "_" + bd_c].r = null;
-                    }
-
-                    if(value.t != null && bd_r == mc.r){ //上边框
-                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": value.t.color, "style": value.t.style };
-
-                        let bd_r_top = bd_r - 1;
-
-                        if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                            if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){
-                                let cell_top = data[bd_r_top][bd_c];
-
-                                let mc_t = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
-                                if(mc_t.r + mc_t.rs - 1 == bd_r_top){
-                                    borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style };
-                            }
-                        }
-                    }
-                    else{
-                        borderInfoCompute[bd_r + "_" + bd_c].t = null;
-                    }
-
-                    if(value.b != null && bd_r == mc.r + mc.rs - 1){ //下边框
-                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": value.b.color, "style": value.b.style };
-
-                        let bd_r_bottom = bd_r + 1;
-
-                        if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                            if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){
-                                let cell_bottom = data[bd_r_bottom][bd_c];
-
-                                let mc_b = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c];
-
-                                if(mc_b.r == bd_r_bottom){
-                                    borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style };
-                            }
-                        }
-                    }
-                    else{
-                        borderInfoCompute[bd_r + "_" + bd_c].b = null;
-                    }
-                }
-                else{
-                    if(value.l != null){ //左边框
-                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": value.l.color, "style": value.l.style };
-
-                        let bd_c_left = bd_c - 1;
-
-                        if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                            if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){
-                                let cell_left = data[bd_r][bd_c_left];
-
-                                let mc_l = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c];
-
-                                if(mc_l.c + mc_l.cs - 1 == bd_c_left){
-                                    borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style };
-                            }
-                        }
-                    }
-                    else{
-                        borderInfoCompute[bd_r + "_" + bd_c].l = null;
-                    }
-
-                    if(value.r != null){ //右边框
-                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": value.r.color, "style": value.r.style };
-
-                        let bd_c_right = bd_c + 1;
-
-                        if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                            if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){
-                                let cell_right = data[bd_r][bd_c_right];
-
-                                let mc_r = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c];
-
-                                if(mc_r.c == bd_c_right){
-                                    borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style };
-                            }
-                        }
-                    }
-                    else{
-                        borderInfoCompute[bd_r + "_" + bd_c].r = null;
-                    }
-
-                    if(value.t != null){ //上边框
-                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": value.t.color, "style": value.t.style };
-
-                        let bd_r_top = bd_r - 1;
-
-                        if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                            if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){
-                                let cell_top = data[bd_r_top][bd_c];
-
-                                let mc_t = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
-                                if(mc_t.r + mc_t.rs - 1 == bd_r_top){
-                                    borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style };
-                            }
-                        }
-                    }
-                    else{
-                        borderInfoCompute[bd_r + "_" + bd_c].t = null;
-                    }
-
-                    if(value.b != null){ //下边框
-                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": value.b.color, "style": value.b.style };
-
-                        let bd_r_bottom = bd_r + 1;
-
-                        if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                            if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){
-                                let cell_bottom = data[bd_r_bottom][bd_c];
-
-                                let mc_b = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c];
-
-                                if(mc_b.r == bd_r_bottom){
-                                    borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style };
-                                }
-                            }
-                            else{
-                                borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style };
-                            }
-                        }
-                    }
-                    else{
-                        borderInfoCompute[bd_r + "_" + bd_c].b = null;
-                    }
-                }
-            }
-            else{
-                delete borderInfoCompute[bd_r + "_" + bd_c];
-            }
-        }
-    }
-  }
-  return borderInfoCompute;
-}
-
-//获取数据类型
-var getObjType = function (obj) {
-  let toString = Object.prototype.toString;
-
-  let map = {
-      '[object Boolean]': 'boolean',
-      '[object Number]': 'number',
-      '[object String]': 'string',
-      '[object Function]': 'function',
-      '[object Array]': 'array',
-      '[object Date]': 'date',
-      '[object RegExp]': 'regExp',
-      '[object Undefined]': 'undefined',
-      '[object Null]': 'null',
-      '[object Object]': 'object'
-  }
-  return map[toString.call(obj)];
-}
-
-
-var setStyleAndValue = function (cellArr, worksheet) {
-  if (!Array.isArray(cellArr)) return;
-
-  cellArr.forEach(function (row, rowid) {
-    const dbrow = worksheet.getRow(rowid+1);
-    //设置单元格行高,默认乘以1.2倍
-    dbrow.height=luckysheet.getRowHeight([rowid])[rowid]*1;
-    row.every(function (cell, columnid) {
-      if (!cell) return true;
-      if(rowid==0){
-        const dobCol = worksheet.getColumn(columnid+1);
-         //设置单元格列宽除以8
-        dobCol.width=luckysheet.getColumnWidth([columnid])[columnid]/8;
-      }
-      let fill = fillConvert(cell.bg);
-      let font = fontConvert(cell.ff, cell.fc, cell.bl, cell.it, cell.fs, cell.cl, cell.ul);
-      let alignment = alignmentConvert(cell.vt, cell.ht, cell.tb, cell.tr);
-      let value;
-
-      var v='';
-      if(cell.ct&&cell.ct.t=='inlineStr'){
-        var s=cell.ct.s;
-        s.forEach(function(val,num){
-          v+=val.v;
-        })
-      }else{
-        v=cell.v;
-      }
-      if (cell.f) {
-        value = { formula: cell.f, result: v };
-      } else {
-        value = v;
-      }
-      let target = worksheet.getCell(rowid + 1, columnid + 1);
-      target.fill = fill;
-      target.font = font;
-      target.alignment = alignment;
-      target.value = value;
-      return true;
-    })
-  })
-}
-
-//转换颜色
-var rgb2hex =function(rgb) {
-    if (rgb.charAt(0) == '#'){
-      return rgb;
-    }
-
-    var ds = rgb.split(/\D+/);
-    var decimal = Number(ds[1]) * 65536 + Number(ds[2]) * 256 + Number(ds[3]);
-    return "#" + zero_fill_hex(decimal, 6);
-
-    function zero_fill_hex(num, digits) {
-      var s = num.toString(16);
-      while (s.length < digits)
-        s = "0" + s;
-      return s;
-   }
-}
-
-var fillConvert = function (bg) {
-  if (!bg) {
-    return null;
-    // return {
-	// 	type: 'pattern',
-	// 	pattern: 'solid',
-	// 	fgColor:{argb:'#ffffff'.replace('#','')}
-	// }
-  }
-  bg  = bg.indexOf('rgb')>-1 ?rgb2hex(bg):bg;
-  let fill = {
-    type: 'pattern',
-    pattern: 'solid',
-    fgColor: {argb: bg.replace('#', '')}
-  }
-  return fill
-}
-
-var fontConvert = function (ff = 0, fc = '#000000', bl = 0, it = 0, fs = 10, cl = 0, ul = 0) { // luckysheet:ff(样式), fc(颜色), bl(粗体), it(斜体), fs(大小), cl(删除线), ul(下划线)
-  const luckyToExcel = {
-    0: '微软雅黑',
-    1: '宋体(Song)',
-    2: '黑体(ST Heiti)',
-    3: '楷体(ST Kaiti)',
-    4: '仿宋(ST FangSong)',
-    5: '新宋体(ST Song)',
-    6: '华文新魏',
-    7: '华文行楷',
-    8: '华文隶书',
-    9: 'Arial',
-    10: 'Times New Roman ',
-    11: 'Tahoma ',
-    12: 'Verdana',
-    num2bl: function (num) {
-      return num === 0 ? false : true
-    }
-  }
-  let color = fc?'':(fc+"").indexOf('rgb')>-1?util.rgb2hex(fc):fc;
-
-  let font = {
-    name:ff,
-    family: 1,
-    size: fs,
-    color: {argb: color.replace('#', '')},
-    bold: luckyToExcel.num2bl(bl),
-    italic: luckyToExcel.num2bl(it),
-    underline: luckyToExcel.num2bl(ul),
-    strike: luckyToExcel.num2bl(cl)
-  }
-
-  return font;
-}
-
-var alignmentConvert = function (vt = 'default', ht = 'default', tb = 'default', tr = 'default') { // luckysheet:vt(垂直), ht(水平), tb(换行), tr(旋转)
-  const luckyToExcel = {
-    vertical: {
-      0: 'middle',
-      1: 'top',
-      2: 'bottom',
-      default: 'top'
-    },
-    horizontal: {
-      0: 'center',
-      1: 'left',
-      2: 'right',
-      default: 'left'
-    },
-    wrapText: {
-      0: false,
-      1: false,
-      2: true,
-      default: false
-    },
-    textRotation: {
-      0: 0,
-      1: 45,
-      2: -45,
-      3: 'vertical',
-      4: 90,
-      5: -90,
-      default: 0
-    }
-  }
-
-  let alignment = {
-    vertical: luckyToExcel.vertical[vt],
-    horizontal: luckyToExcel.horizontal[ht],
-    wrapText: luckyToExcel.wrapText[tb],
-    textRotation: luckyToExcel.textRotation[tr]
-  }
-  return alignment;
-
-}

+ 0 - 1418
src/views/onLineEditing/js/export.js

@@ -1,1418 +0,0 @@
-import ExcelJS from 'exceljs'
-
-import FileSaver from 'file-saver'
-
-const exportExcel = function(luckysheet,name) { // 参数为luckysheet.getluckysheetfile()获取的对象
-    // 1.创建工作簿,可以为工作簿添加属性
-    const workbook = new ExcelJS.Workbook();
-    // 2.创建表格,第二个参数可以配置创建什么样的工作表
-    // 2.创建表格,第二个参数可以配置创建什么样的工作表
-    if (Object.prototype.toString.call(luckysheet) === '[object Object]') {
-        luckysheet = [luckysheet]
-    }
-    console.log(luckysheet)
-    //var tableArr=luckysheet.getAllSheets();
-    luckysheet.forEach(function(table) {
-        if (table.data.length === 0) return  true
-        // ws.getCell('B2').fill = fills.
-        const worksheet = workbook.addWorksheet(table.name)
-        setStyleAndValue(table.data, worksheet);
-        setMerge(table.config.merge, worksheet);
-        setBorder(table, worksheet);
-        setImages(table, worksheet, workbook);
-        return true
-    })
-
-    // return
-    // 4.写入 buffer
-    const buffer = workbook.xlsx.writeBuffer().then(data => {
-        // console.log('data', data)
-        const blob = new Blob([data], {
-            type: 'application/vnd.ms-excel;charset=utf-8'
-        })
-        console.log("导出成功!")
-        saveFile(blob, name)
-    })
-}
-
-var saveFile = function(buf,name) {
-    let blob = new Blob([buf], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' });
-    const downloadElement = document.createElement('a');
-    let href = window.URL.createObjectURL(blob);
-    downloadElement.href = href;
-    downloadElement.download = name+".xlsx"; // 文件名字
-    document.body.appendChild(downloadElement);
-    downloadElement.click();
-    document.body.removeChild(downloadElement); // 下载完成移除元素
-    window.URL.revokeObjectURL(href); // 释放掉blob对象
-}
-
-
-var setMerge = function (luckyMerge = {}, worksheet) {
-    const mergearr = Object.values(luckyMerge);
-    mergearr.forEach(function (elem) { // elem格式:{r: 0, c: 0, rs: 1, cs: 2}
-        // 按开始行,开始列,结束行,结束列合并(相当于 K10:M12)
-        worksheet.mergeCells(elem.r + 1, elem.c + 1, elem.r + elem.rs, elem.c + elem.cs);
-    });
-}
-
-//获取图片在单元格的位置
-var  getImagePosition =function(num,arr){
-    let index = 0;
-    let minIndex;
-    let maxIndex;
-    for (let i = 0; i < arr.length; i++) {
-        if (num < arr[i]) {
-            index = i;
-            break;
-        }
-    }
-
-    if(index==0){
-        minIndex = 0;
-        maxIndex = 1;
-    }
-    else if(index == arr.length-1){
-        minIndex = arr.length-2;
-        maxIndex = arr.length-1;
-    }
-    else{
-        minIndex = index-1;
-        maxIndex = index;
-    }
-    let min = arr[minIndex];
-    let max = arr[maxIndex];
-    let radio = Math.abs((num-min)/(max-min))+index
-    return radio;
-}
-
-var setImages = function (table, worksheet, workbook) {
-    let {
-        images,
-        visibledatacolumn,//所有行的位置
-        visibledatarow //所有列的位置
-    } = {...table}
-    if (typeof images != 'object') return;
-    for (let key in images) {
-        // 通过 base64  将图像添加到工作簿
-        const myBase64Image = images[key].src;
-        //开始行 开始列 结束行 结束列
-        const item = images[key];
-        const imageId = workbook.addImage({
-            base64: myBase64Image,
-            extension: 'png'
-        });
-
-        const col_st = getImagePosition(item.default.left,visibledatacolumn);
-        const row_st = getImagePosition(item.default.top,visibledatarow);
-
-        //模式1,图片左侧与luckysheet位置一样,像素比例保持不变,但是,右侧位置可能与原图所在单元格不一致
-        worksheet.addImage(imageId, {
-            tl: { col: col_st, row: row_st},
-            ext: { width: item.default.width, height: item.default.height },
-        });
-        //模式2,图片四个角位置没有变动,但是图片像素比例可能和原图不一样
-        // const w_ed = item.default.left+item.default.width;
-        // const h_ed = item.default.top+item.default.height;
-        // const col_ed = getImagePosition(w_ed,visibledatacolumn);
-        // const row_ed = getImagePosition(h_ed,visibledatarow);
-        // worksheet.addImage(imageId, {
-        //   tl: { col: col_st, row: row_st},
-        //   br: { col: col_ed, row: row_ed},
-        // });
-    }
-};
-
-var setBorder = function (lucksheetfile, worksheet) {
-    if (!lucksheetfile) return;
-    const luckyToExcel = {
-        style: {
-            0: 'none',
-            1: 'thin',
-            2: 'hair',
-            3: 'dotted',
-            4: 'dashDot', // 'Dashed',
-            5: 'dashDot',
-            6: 'dashDotDot',
-            7: 'double',
-            8: 'medium',
-            9: 'mediumDashed',
-            10: 'mediumDashDot',
-            11: 'mediumDashDotDot',
-            12: 'slantDashDot',
-            13: 'thick'
-        }
-    }
-    //获取所有的单元格边框的信息
-    const borderInfoCompute = getBorderInfo(lucksheetfile);
-    for (let x in borderInfoCompute) {
-        let border = {};
-        let info = borderInfoCompute[x];
-        let row = parseInt(x.substr(0, x.indexOf('_')));
-        let column = parseInt(x.substr(x.indexOf('_') + 1));
-        if(info.t!=undefined){
-            const tcolor = info.t.color.indexOf('rgb')>-1 ?rgb2hex(info.t.color):info.t.color;
-            border['top'] = {style:luckyToExcel.style[info.t.style],color: {argb: tcolor.replace('#', '')}};
-        }
-        if(info.r!=undefined){
-            const rcolor = info.r.color.indexOf('rgb')>-1 ?rgb2hex(info.r.color):info.r.color;
-            border['right'] = {style:luckyToExcel.style[info.r.style],color: {argb: rcolor.replace('#', '')}};
-        }
-        if(info.b!=undefined){
-            const bcolor = info.b.color.indexOf('rgb')>-1 ?rgb2hex(info.b.color):info.b.color;
-            border['bottom'] = {style:luckyToExcel.style[info.b.style],color: {argb: bcolor.replace('#', '')}};
-        }
-        if(info.l!=undefined){
-            const lcolor = info.l.color.indexOf('rgb')>-1 ?rgb2hex(info.l.color):info.l.color;
-            border['left'] = {style:luckyToExcel.style[info.l.style],color: {argb: lcolor.replace('#', '')}};
-        }
-        worksheet.getCell(row + 1, column + 1).border = border;
-    }
-}
-
-var getBorderInfo=function(luckysheetfile){
-    let borderInfoCompute = {};
-    let cfg = luckysheetfile.config;
-    let data = luckysheetfile.data;
-    let borderInfo = cfg["borderInfo"];
-    //设置需要计算边框的区域
-    let dataset_row_st = 0,dataset_row_ed = data.length,dataset_col_st=0,dataset_col_ed=data[0].length;
-    if(borderInfo != null && borderInfo.length > 0){
-        for(let i = 0; i < borderInfo.length; i++){
-            let rangeType = borderInfo[i].rangeType;
-
-            if(rangeType == "range"){
-                let borderType = borderInfo[i].borderType;
-                let borderColor = borderInfo[i].color;
-                let borderStyle = borderInfo[i].style;
-
-                let borderRange = borderInfo[i].range;
-
-                for(let j = 0; j < borderRange.length; j++){
-                    let bd_r1 = borderRange[j].row[0], bd_r2 = borderRange[j].row[1];
-                    let bd_c1 = borderRange[j].column[0], bd_c2 = borderRange[j].column[1];
-
-                    if(bd_r1<dataset_row_st){
-                        bd_r1 = dataset_row_st;
-                    }
-
-                    if(bd_r2>dataset_row_ed){
-                        bd_r2 = dataset_row_ed;
-                    }
-
-                    if(bd_c1<dataset_col_st){
-                        bd_c1 = dataset_col_st;
-                    }
-
-                    if(bd_c2>dataset_col_ed){
-                        bd_c2 = dataset_col_ed;
-                    }
-
-                    if(borderType == "border-left"){
-                        for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                            if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                                continue;
-                            }
-
-                            if(borderInfoCompute[bd_r + "_" + bd_c1] == null){
-                                borderInfoCompute[bd_r + "_" + bd_c1] = {};
-                            }
-
-                            borderInfoCompute[bd_r + "_" + bd_c1].l = { "color": borderColor, "style": borderStyle };
-
-                            let bd_c_left = bd_c1 - 1;
-
-                            if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){
-                                    let cell_left = data[bd_r][bd_c_left];
-
-                                    let mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c];
-
-                                    if(mc.c + mc.cs - 1 == bd_c_left){
-                                        borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-
-                            let mc = cfg["merge"] || {};
-                            for (const key in mc) {
-                                let {c,r,cs,rs} = mc[key];
-                                if(bd_c1 <= c + cs - 1 && bd_c1 > c && bd_r >= r && bd_r <= r + rs -1){
-                                    borderInfoCompute[bd_r + "_" + bd_c1].l = null;
-                                }
-                            }
-                        }
-                    }
-                    else if(borderType == "border-right"){
-                        for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                            if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                                continue;
-                            }
-
-                            if(borderInfoCompute[bd_r + "_" + bd_c2] == null){
-                                borderInfoCompute[bd_r + "_" + bd_c2] = {};
-                            }
-
-                            borderInfoCompute[bd_r + "_" + bd_c2].r = { "color": borderColor, "style": borderStyle };
-
-                            let bd_c_right = bd_c2 + 1;
-
-                            if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){
-                                    let cell_right = data[bd_r][bd_c_right];
-
-                                    let mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c];
-
-                                    if(mc.c == bd_c_right){
-                                        borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-                            let mc = cfg["merge"] || {};
-                            for (const key in mc) {
-                                let {c,r,cs,rs} = mc[key];
-                                if(bd_c2 < c + cs - 1 && bd_c2 >= c && bd_r >= r && bd_r <= r + rs -1){
-                                    borderInfoCompute[bd_r + "_" + bd_c2].r = null;
-                                }
-                            }
-                        }
-                    }
-                    else if(borderType == "border-top"){
-                        if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r1] != null) {
-                            continue;
-                        }
-
-                        for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                            if(borderInfoCompute[bd_r1 + "_" + bd_c] == null){
-                                borderInfoCompute[bd_r1 + "_" + bd_c] = {};
-                            }
-
-                            borderInfoCompute[bd_r1 + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-
-                            let bd_r_top = bd_r1 - 1;
-
-                            if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                                if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){
-                                    let cell_top = data[bd_r_top][bd_c];
-
-                                    let mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
-                                    if(mc.r + mc.rs - 1 == bd_r_top){
-                                        borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-
-                            let mc = cfg["merge"] || {};
-                            for (const key in mc) {
-                                let {c,r,cs,rs} = mc[key];
-                                if(bd_r1 <= r + rs - 1 && bd_r1 > r && bd_c >= c && bd_c <= c + cs -1){
-                                    borderInfoCompute[bd_r1 + "_" + bd_c].t = null;
-                                }
-                            }
-                        }
-                    }
-                    else if(borderType == "border-bottom"){
-                        if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r2] != null) {
-                            continue;
-                        }
-
-                        for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                            if(borderInfoCompute[bd_r2 + "_" + bd_c] == null){
-                                borderInfoCompute[bd_r2 + "_" + bd_c] = {};
-                            }
-
-                            borderInfoCompute[bd_r2 + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-
-                            let bd_r_bottom = bd_r2 + 1;
-
-                            if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                                if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){
-                                    let cell_bottom = data[bd_r_bottom][bd_c];
-
-                                    let mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c];
-
-                                    if(mc.r == bd_r_bottom){
-                                        borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                }
-                            }
-
-                            let mc = cfg["merge"] || {};
-                            for (const key in mc) {
-                                let {c,r,cs,rs} = mc[key];
-                                if(bd_r2 < r + rs - 1 && bd_r2 >= r && bd_c >= c && bd_c <= c + cs -1){
-                                    borderInfoCompute[bd_r2 + "_" + bd_c].b = null;
-                                }
-                            }
-                        }
-                    }
-                    else if(borderType == "border-all"){
-                        for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                            if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                                continue;
-                            }
-
-                            for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                    let cell = data[bd_r][bd_c];
-
-                                    let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-                                    if(mc==undefined || mc==null){
-                                        continue
-                                    };
-                                    if(mc.r == bd_r){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-
-                                    if(mc.r + mc.rs - 1 == bd_r){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-
-                                    if(mc.c == bd_c){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    }
-
-                                    if(mc.c + mc.cs - 1 == bd_c){
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                }
-
-                                if(bd_r == bd_r1){
-                                    let bd_r_top = bd_r1 - 1;
-
-                                    if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                                        if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){
-                                            let cell_top = data[bd_r_top][bd_c];
-
-                                            let mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
-                                            if(mc.r + mc.rs - 1 == bd_r_top){
-                                                borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                            }
-                                        }
-                                        else{
-                                            borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                }
-
-                                if(bd_r == bd_r2){
-                                    let bd_r_bottom = bd_r2 + 1;
-
-                                    if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                                        if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){
-                                            let cell_bottom = data[bd_r_bottom][bd_c];
-
-                                            let mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c];
-
-                                            if(mc.r == bd_r_bottom){
-                                                borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                            }
-                                        }
-                                        else{
-                                            borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                }
-
-                                if(bd_c == bd_c1){
-                                    let bd_c_left = bd_c1 - 1;
-
-                                    if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                                        if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){
-                                            let cell_left = data[bd_r][bd_c_left];
-
-                                            let mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c];
-
-                                            if(mc.c + mc.cs - 1 == bd_c_left){
-                                                borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                            }
-                                        }
-                                        else{
-                                            borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                }
-
-                                if(bd_c == bd_c2){
-                                    let bd_c_right = bd_c2 + 1;
-
-                                    if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                                        if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){
-                                            let cell_right = data[bd_r][bd_c_right];
-
-                                            let mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c];
-
-                                            if(mc.c == bd_c_right){
-                                                borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                            }
-                                        }
-                                        else{
-                                            borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    else if(borderType == "border-outside"){
-                        for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                            if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                                continue;
-                            }
-
-                            for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                                if(!(bd_r == bd_r1 || bd_r == bd_r2 || bd_c == bd_c1 || bd_c == bd_c2)){
-                                    continue;
-                                }
-
-                                if(bd_r == bd_r1){
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-
-                                    let bd_r_top = bd_r1 - 1;
-
-                                    if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                                        if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){
-                                            let cell_top = data[bd_r_top][bd_c];
-
-                                            let mc = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
-                                            if(mc.r + mc.rs - 1 == bd_r_top){
-                                                borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                            }
-                                        }
-                                        else{
-                                            borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                }
-
-                                if(bd_r == bd_r2){
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-
-                                    let bd_r_bottom = bd_r2 + 1;
-
-                                    if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                                        if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){
-                                            let cell_bottom = data[bd_r_bottom][bd_c];
-
-                                            let mc = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c];
-
-                                            if(mc.r == bd_r_bottom){
-                                                borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                            }
-                                        }
-                                        else{
-                                            borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                }
-
-                                if(bd_c == bd_c1){
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-
-                                    let bd_c_left = bd_c1 - 1;
-
-                                    if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                                        if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){
-                                            let cell_left = data[bd_r][bd_c_left];
-
-                                            let mc = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c];
-
-                                            if(mc.c + mc.cs - 1 == bd_c_left){
-                                                borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                            }
-                                        }
-                                        else{
-                                            borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                }
-
-                                if(bd_c == bd_c2){
-                                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                    }
-
-                                    borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-
-                                    let bd_c_right = bd_c2 + 1;
-
-                                    if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                                        if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){
-                                            let cell_right = data[bd_r][bd_c_right];
-
-                                            let mc = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c];
-
-                                            if(mc.c == bd_c_right){
-                                                borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                            }
-                                        }
-                                        else{
-                                            borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    else if(borderType == "border-inside"){
-                        for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                            if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                                continue;
-                            }
-
-                            for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                                if(bd_r == bd_r1 && bd_c == bd_c1){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else if(bd_r == bd_r2 && bd_c == bd_c1){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else if(bd_r == bd_r1 && bd_c == bd_c2){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else if(bd_r == bd_r2 && bd_c == bd_c2){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else if(bd_r == bd_r1){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                        let cell = data[bd_r][bd_c];
-
-                                        let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                        if(mc.c == bd_c){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        }
-                                        else if(mc.c + mc.cs - 1 == bd_c){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else if(bd_r == bd_r2){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                        let cell = data[bd_r][bd_c];
-
-                                        let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                        if(mc.c == bd_c){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        }
-                                        else if(mc.c + mc.cs - 1 == bd_c){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else if(bd_c == bd_c1){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                        let cell = data[bd_r][bd_c];
-
-                                        let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                        if(mc.r == bd_r){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        }
-                                        else if(mc.r + mc.rs - 1 == bd_r){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else if(bd_c == bd_c2){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                        let cell = data[bd_r][bd_c];
-
-                                        let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                        if(mc.r == bd_r){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        }
-                                        else if(mc.r + mc.rs - 1 == bd_r){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                        let cell = data[bd_r][bd_c];
-
-                                        let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                        if(mc.r == bd_r){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        }
-                                        else if(mc.r + mc.rs - 1 == bd_r){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                        }
-
-                                        if(mc.c == bd_c){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        }
-                                        else if(mc.c + mc.cs - 1 == bd_c){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    else if(borderType == "border-horizontal"){
-                        for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                            if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                                continue;
-                            }
-
-                            for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                                if(bd_r == bd_r1){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else if(bd_r == bd_r2){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                        let cell = data[bd_r][bd_c];
-
-                                        let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c];
-
-                                        if(mc.r == bd_r){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        }
-                                        else if(mc.r + mc.rs - 1 == bd_r){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].t = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].b = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    else if(borderType == "border-vertical"){
-                        for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                            if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                                continue;
-                            }
-
-                            for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                                if(bd_c == bd_c1){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else if(bd_c == bd_c2){
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                                else{
-                                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                                        let cell = data[bd_r][bd_c];
-
-                                        let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c] || {};
-
-                                        if(mc.c == bd_c){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        }
-                                        else if(mc.c + mc.cs - 1 == bd_c){
-                                            if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                                borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                            }
-
-                                            borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                        }
-                                    }
-                                    else{
-                                        if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                                            borderInfoCompute[bd_r + "_" + bd_c] = {};
-                                        }
-
-                                        borderInfoCompute[bd_r + "_" + bd_c].l = { "color": borderColor, "style": borderStyle };
-                                        borderInfoCompute[bd_r + "_" + bd_c].r = { "color": borderColor, "style": borderStyle };
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    else if(borderType == "border-none"){
-                        for(let bd_r = bd_r1; bd_r <= bd_r2; bd_r++){
-                            if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                                continue;
-                            }
-
-                            for(let bd_c = bd_c1; bd_c <= bd_c2; bd_c++){
-                                if(borderInfoCompute[bd_r + "_" + bd_c] != null){
-                                    delete borderInfoCompute[bd_r + "_" + bd_c];
-                                }
-
-                                if(bd_r == bd_r1){
-                                    let bd_r_top = bd_r1 - 1;
-
-                                    if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                                        delete borderInfoCompute[bd_r_top + "_" + bd_c].b;
-                                    }
-                                }
-
-                                if(bd_r == bd_r2){
-                                    let bd_r_bottom = bd_r2 + 1;
-
-                                    if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                                        delete borderInfoCompute[bd_r_bottom + "_" + bd_c].t;
-                                    }
-                                }
-
-                                if(bd_c == bd_c1){
-                                    let bd_c_left = bd_c1 - 1;
-
-                                    if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                                        delete borderInfoCompute[bd_r + "_" + bd_c_left].r;
-                                    }
-                                }
-
-                                if(bd_c == bd_c2){
-                                    let bd_c_right = bd_c2 + 1;
-
-                                    if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                                        delete borderInfoCompute[bd_r + "_" + bd_c_right].l;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            else if(rangeType == "cell"){
-                let value = borderInfo[i].value;
-
-                let bd_r = value.row_index, bd_c = value.col_index;
-
-                if(bd_r < dataset_row_st || bd_r > dataset_row_ed || bd_c < dataset_col_st || bd_c > dataset_col_ed){
-                    continue;
-                }
-
-                if (cfg["rowhidden"] != null && cfg["rowhidden"][bd_r] != null) {
-                    continue;
-                }
-
-                if(value.l != null || value.r != null || value.t != null || value.b != null){
-                    if(borderInfoCompute[bd_r + "_" + bd_c] == null){
-                        borderInfoCompute[bd_r + "_" + bd_c] = {};
-                    }
-
-                    if(data[bd_r] != null && getObjType(data[bd_r][bd_c]) == "object" && data[bd_r][bd_c].mc != null){
-                        let cell = data[bd_r][bd_c];
-                        let mc = cfg["merge"][cell.mc.r + "_" + cell.mc.c] || {};
-
-                        if(value.l != null && bd_c == mc.c){ //左边框
-                            borderInfoCompute[bd_r + "_" + bd_c].l = { "color": value.l.color, "style": value.l.style };
-
-                            let bd_c_left = bd_c - 1;
-
-                            if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){
-                                    let cell_left = data[bd_r][bd_c_left];
-
-                                    let mc_l = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c];
-
-                                    if(mc_l.c + mc_l.cs - 1 == bd_c_left){
-                                        borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style };
-                                }
-                            }
-                        }
-                        else{
-                            borderInfoCompute[bd_r + "_" + bd_c].l = null;
-                        }
-
-                        if(value.r != null && bd_c == mc.c + mc.cs - 1){ //右边框
-                            borderInfoCompute[bd_r + "_" + bd_c].r = { "color": value.r.color, "style": value.r.style };
-
-                            let bd_c_right = bd_c + 1;
-
-                            if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){
-                                    let cell_right = data[bd_r][bd_c_right];
-
-                                    let mc_r = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c];
-
-                                    if(mc_r.c == bd_c_right){
-                                        borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style };
-                                }
-                            }
-                        }
-                        else{
-                            borderInfoCompute[bd_r + "_" + bd_c].r = null;
-                        }
-
-                        if(value.t != null && bd_r == mc.r){ //上边框
-                            borderInfoCompute[bd_r + "_" + bd_c].t = { "color": value.t.color, "style": value.t.style };
-
-                            let bd_r_top = bd_r - 1;
-
-                            if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                                if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){
-                                    let cell_top = data[bd_r_top][bd_c];
-
-                                    let mc_t = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
-                                    if(mc_t.r + mc_t.rs - 1 == bd_r_top){
-                                        borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style };
-                                }
-                            }
-                        }
-                        else{
-                            borderInfoCompute[bd_r + "_" + bd_c].t = null;
-                        }
-
-                        if(value.b != null && bd_r == mc.r + mc.rs - 1){ //下边框
-                            borderInfoCompute[bd_r + "_" + bd_c].b = { "color": value.b.color, "style": value.b.style };
-
-                            let bd_r_bottom = bd_r + 1;
-
-                            if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                                if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){
-                                    let cell_bottom = data[bd_r_bottom][bd_c];
-
-                                    let mc_b = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c];
-
-                                    if(mc_b.r == bd_r_bottom){
-                                        borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style };
-                                }
-                            }
-                        }
-                        else{
-                            borderInfoCompute[bd_r + "_" + bd_c].b = null;
-                        }
-                    }
-                    else{
-                        if(value.l != null){ //左边框
-                            borderInfoCompute[bd_r + "_" + bd_c].l = { "color": value.l.color, "style": value.l.style };
-
-                            let bd_c_left = bd_c - 1;
-
-                            if(bd_c_left >= 0 && borderInfoCompute[bd_r + "_" + bd_c_left]){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c_left]) == "object" && data[bd_r][bd_c_left].mc != null){
-                                    let cell_left = data[bd_r][bd_c_left];
-
-                                    let mc_l = cfg["merge"][cell_left.mc.r + "_" + cell_left.mc.c];
-
-                                    if(mc_l.c + mc_l.cs - 1 == bd_c_left){
-                                        borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r + "_" + bd_c_left].r = { "color": value.l.color, "style": value.l.style };
-                                }
-                            }
-                        }
-                        else{
-                            borderInfoCompute[bd_r + "_" + bd_c].l = null;
-                        }
-
-                        if(value.r != null){ //右边框
-                            borderInfoCompute[bd_r + "_" + bd_c].r = { "color": value.r.color, "style": value.r.style };
-
-                            let bd_c_right = bd_c + 1;
-
-                            if(bd_c_right < data[0].length && borderInfoCompute[bd_r + "_" + bd_c_right]){
-                                if(data[bd_r] != null && getObjType(data[bd_r][bd_c_right]) == "object" && data[bd_r][bd_c_right].mc != null){
-                                    let cell_right = data[bd_r][bd_c_right];
-
-                                    let mc_r = cfg["merge"][cell_right.mc.r + "_" + cell_right.mc.c];
-
-                                    if(mc_r.c == bd_c_right){
-                                        borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r + "_" + bd_c_right].l = { "color": value.r.color, "style": value.r.style };
-                                }
-                            }
-                        }
-                        else{
-                            borderInfoCompute[bd_r + "_" + bd_c].r = null;
-                        }
-
-                        if(value.t != null){ //上边框
-                            borderInfoCompute[bd_r + "_" + bd_c].t = { "color": value.t.color, "style": value.t.style };
-
-                            let bd_r_top = bd_r - 1;
-
-                            if(bd_r_top >= 0 && borderInfoCompute[bd_r_top + "_" + bd_c]){
-                                if(data[bd_r_top] != null && getObjType(data[bd_r_top][bd_c]) == "object" && data[bd_r_top][bd_c].mc != null){
-                                    let cell_top = data[bd_r_top][bd_c];
-
-                                    let mc_t = cfg["merge"][cell_top.mc.r + "_" + cell_top.mc.c];
-
-                                    if(mc_t.r + mc_t.rs - 1 == bd_r_top){
-                                        borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r_top + "_" + bd_c].b = { "color": value.t.color, "style": value.t.style };
-                                }
-                            }
-                        }
-                        else{
-                            borderInfoCompute[bd_r + "_" + bd_c].t = null;
-                        }
-
-                        if(value.b != null){ //下边框
-                            borderInfoCompute[bd_r + "_" + bd_c].b = { "color": value.b.color, "style": value.b.style };
-
-                            let bd_r_bottom = bd_r + 1;
-
-                            if(bd_r_bottom < data.length && borderInfoCompute[bd_r_bottom + "_" + bd_c]){
-                                if(data[bd_r_bottom] != null && getObjType(data[bd_r_bottom][bd_c]) == "object" && data[bd_r_bottom][bd_c].mc != null){
-                                    let cell_bottom = data[bd_r_bottom][bd_c];
-
-                                    let mc_b = cfg["merge"][cell_bottom.mc.r + "_" + cell_bottom.mc.c];
-
-                                    if(mc_b.r == bd_r_bottom){
-                                        borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style };
-                                    }
-                                }
-                                else{
-                                    borderInfoCompute[bd_r_bottom + "_" + bd_c].t = { "color": value.b.color, "style": value.b.style };
-                                }
-                            }
-                        }
-                        else{
-                            borderInfoCompute[bd_r + "_" + bd_c].b = null;
-                        }
-                    }
-                }
-                else{
-                    delete borderInfoCompute[bd_r + "_" + bd_c];
-                }
-            }
-        }
-    }
-    return borderInfoCompute;
-}
-
-//获取数据类型
-var getObjType = function (obj) {
-    let toString = Object.prototype.toString;
-
-    let map = {
-        '[object Boolean]': 'boolean',
-        '[object Number]': 'number',
-        '[object String]': 'string',
-        '[object Function]': 'function',
-        '[object Array]': 'array',
-        '[object Date]': 'date',
-        '[object RegExp]': 'regExp',
-        '[object Undefined]': 'undefined',
-        '[object Null]': 'null',
-        '[object Object]': 'object'
-    }
-    return map[toString.call(obj)];
-}
-
-
-var setStyleAndValue = function (cellArr, worksheet) {
-    if (!Array.isArray(cellArr)) return;
-
-    cellArr.forEach(function (row, rowid) {
-        const dbrow = worksheet.getRow(rowid+1);
-        //设置单元格行高,默认乘以1倍
-        dbrow.height=luckysheet.getRowHeight([rowid])[rowid]
-        row.every(function (cell, columnid) {
-            if (!cell) return true;
-            if(rowid==0){
-                const dobCol = worksheet.getColumn(columnid+1);
-                //设置单元格列宽除以8
-                dobCol.width=luckysheet.getColumnWidth([columnid])[columnid]/8
-            }
-            let fill = fillConvert(cell.bg);
-            let font = fontConvert(cell.ff, cell.fc, cell.bl, cell.it, cell.fs, cell.cl, cell.ul);
-            let alignment = alignmentConvert(cell.vt, cell.ht, cell.tb, cell.tr);
-            let value;
-
-            var v='';
-            if(cell.ct&&cell.ct.t=='inlineStr'){
-                var s=cell.ct.s;
-                s.forEach(function(val,num){
-                    v+=val.v;
-                })
-            }else{
-                v=cell.v;
-            }
-            if (cell.f) {
-                value = { formula: cell.f, result: v };
-            } else {
-                value = v;
-            }
-            let target = worksheet.getCell(rowid + 1, columnid + 1);
-            target.fill = fill;
-            target.font = font;
-            target.alignment = alignment;
-            target.value = value;
-            return true;
-        })
-    })
-}
-
-//转换颜色
-var rgb2hex =function(rgb) {
-    if (rgb.charAt(0) == '#'){
-        return rgb;
-    }
-
-    var ds = rgb.split(/\D+/);
-    var decimal = Number(ds[1]) * 65536 + Number(ds[2]) * 256 + Number(ds[3]);
-    return "#" + zero_fill_hex(decimal, 6);
-
-    function zero_fill_hex(num, digits) {
-        var s = num.toString(16);
-        while (s.length < digits)
-            s = "0" + s;
-        return s;
-    }
-}
-
-var fillConvert = function (bg) {
-    if (!bg) {
-        return null;
-        // return {
-        // 	type: 'pattern',
-        // 	pattern: 'solid',
-        // 	fgColor:{argb:'#ffffff'.replace('#','')}
-        // }
-    }
-    bg  = bg.indexOf('rgb')>-1 ?rgb2hex(bg):bg;
-    let fill = {
-        type: 'pattern',
-        pattern: 'solid',
-        fgColor: {argb: bg.replace('#', '')}
-    }
-    return fill
-}
-
-var fontConvert = function (ff = 0, fc = '#000000', bl = 0, it = 0, fs = 10, cl = 0, ul = 0) { // luckysheet:ff(样式), fc(颜色), bl(粗体), it(斜体), fs(大小), cl(删除线), ul(下划线)
-    const luckyToExcel = {
-        0: '微软雅黑',
-        1: '宋体(Song)',
-        2: '黑体(ST Heiti)',
-        3: '楷体(ST Kaiti)',
-        4: '仿宋(ST FangSong)',
-        5: '新宋体(ST Song)',
-        6: '华文新魏',
-        7: '华文行楷',
-        8: '华文隶书',
-        9: 'Arial',
-        10: 'Times New Roman ',
-        11: 'Tahoma ',
-        12: 'Verdana',
-        num2bl: function (num) {
-            return num === 0 ? false : true
-        }
-    }
-
-    let font = {
-        name:ff,
-        family: 1,
-        size: fs,
-        color: {argb: fc.replace('#', '')},
-        bold: luckyToExcel.num2bl(bl),
-        italic: luckyToExcel.num2bl(it),
-        underline: luckyToExcel.num2bl(ul),
-        strike: luckyToExcel.num2bl(cl)
-    }
-
-    return font;
-}
-
-var alignmentConvert = function (vt = 'default', ht = 'default', tb = 'default', tr = 'default') { // luckysheet:vt(垂直), ht(水平), tb(换行), tr(旋转)
-    const luckyToExcel = {
-        vertical: {
-            0: 'middle',
-            1: 'top',
-            2: 'bottom',
-            default: 'middle'
-        },
-        horizontal: {
-            0: 'center',
-            1: 'left',
-            2: 'right',
-            default: 'left'
-        },
-        wrapText: {
-            0: false,
-            1: false,
-            2: true,
-            default: false
-        },
-        textRotation: {
-            0: 0,
-            1: 45,
-            2: -45,
-            3: 'vertical',
-            4: 90,
-            5: -90,
-            default: 0
-        }
-    }
-
-    let alignment = {
-        vertical: luckyToExcel.vertical[vt],
-        horizontal: luckyToExcel.horizontal[ht],
-        wrapText: luckyToExcel.wrapText[tb],
-        textRotation: luckyToExcel.textRotation[tr]
-    }
-    return alignment;
-
-}
-
-
-export { exportExcel }

+ 0 - 80
src/views/onLineEditing/onLineIndex.vue

@@ -1,80 +0,0 @@
-<template>
-    <div>
-        <el-dialog
-            :title="grooveData.title || '提示'"
-            :visible.sync="show"
-            append-to-body
-            fullscreen
-            width="100%"
-            custom-class="customClass"
-            z-index="1000"
-        >
-            <on-line-editing :groove-data="grooveData" :groove-list="grooveList" :dialog-show="true" style="width: 100%;height: 100;" />
-        </el-dialog>
-        <!-- <div class="elDea">
-            <on-line-editing :groove-data="grooveData" :groove-list="grooveList" :dialog-show="true" style="width: 100%;height: 100;" />
-        </div> -->
-    </div>
-</template>
-<script>
-
-import onLineEditing from '@/views/onLineEditing/index'
-export default {
-    components: {
-        onLineEditing
-    },
-    props: {
-        dialogVisible: {
-            type: Boolean,
-            default: false
-        },
-        grooveData: {
-            type: Object,
-            default: function () {
-                return {
-                    title: '提示',
-                    saveShow: true,
-                    exportExcelShow: true,
-                    clickHandleShow: true,
-                    xlsxTitleShow: true,
-                    readOnly: true,
-                    showtoolbarConfig: null,
-                    cellRightClickConfig: null,
-                    showstatisticBarConfig: null
-                }
-            }
-        },
-        grooveList: {
-            type: Array,
-            default: () => {
-                return []
-            }
-        }
-    },
-    data () {
-        return {
-            show: this.dialogVisible
-        }
-    },
-    methods: {
-
-    }
-}
-</script>
-<style  scoped>
-
-/deep/ .customClass .el-dialog__body{
-    z-index: 10;
-}
-
-.elDea{
-    background: #fff;
-    position: fixed;
-    left: 0;
-    right: 0;
-    top: 0;
-    bottom: 0;
-    z-index: 10;
-}
-</style>
-

+ 35 - 74
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -4,6 +4,7 @@
             <ibps-type-tree
                 :width="width"
                 :height="height"
+                title="事务分类"
                 :location="location"
                 category-key="FLOW_TYPE"
                 :has-permission="hasPermission"
@@ -11,9 +12,7 @@
                 @expand-collapse="handleExpandCollapse"
             />
         </div>
-        <template-list v-if="templateShow" :template-data="templateData" />
         <ibps-crud
-            v-else
             ref="crud"
             :style="{ marginLeft: width + 'px' }"
             :height="height"
@@ -33,7 +32,6 @@
             @column-link-click="handleLinkClick"
             @pagination-change="handlePaginationChange"
         >
-            <template slot="creator" slot-scope="scope">{{ scope.row.createBy | getUserName(userList) }}</template>
             <template slot="selectCont" slot-scope="scope">
                 <el-popover
                     :ref="'popover2-' + scope.row.id"
@@ -46,7 +44,7 @@
                     <div slot="reference" class="div_operation el-icon-s-order">查阅记录</div>
                     <div v-loading="fileLoading" class="div_content">
                         <!-- 获取所有输出报告-->
-                        <!-- <template v-if="record.report.length && record.report[0]">
+                        <template v-if="record.report.length && record.report[0]">
                             <div v-for="(item, index) in record.report" :key="index" class="content_item">
                                 <span style="cursor: pointer;" @click="openReport(item, record.bizKey)">
                                     <i class="el-icon-tickets" style="font-size: 18px;" />
@@ -54,12 +52,12 @@
                                 </span>
                                 <br>
                             </div>
-                        </template> -->
+                        </template>
                         <div v-if="record.file.length && snapshotId" class="content_item">
                             <!-- <div class="sub_operation">快照</div> -->
                             <ibps-attachment
                                 v-model="snapshotId"
-                                download
+                                :download="hasRole"
                                 readonly
                                 multiple
                                 upload-type="attachment"
@@ -71,7 +69,7 @@
                             <div class="sub_operation ibps-icon-folder-open-o">附件</div>
                             <ibps-attachment
                                 v-model="fileId"
-                                download
+                                :download="hasRole"
                                 readonly
                                 multiple
                                 upload-type="attachment"
@@ -79,7 +77,7 @@
                                 style="width: 100%; height: 100%; max-height: 180px; overflow-y: auto;"
                             />
                         </div>
-                        <div v-if="!record.file.length || (!fileId && !snapshotId)">无快照及附件数据</div>
+                        <!-- <div v-if="(!record.report.length || !record.report[0]) && (!record.file.length || !fileId)">无报表及附件数据</div> -->
                         <!-- 二级菜单,内审管审特有 -->
                         <template v-if="specialType.hasOwnProperty(typeId)">
                             <el-popover
@@ -129,7 +127,7 @@
                                             <div class="content_item">
                                                 <span style="cursor: pointer;" @click="openReport(specialBtn[typeId].path, item.id_)">
                                                     <i class="el-icon-tickets" style="font-size: 14px;" />
-                                                    {{ specialBtn[typeId].path | getReportName }}
+                                                    {{ specialBtn[typeId].name }}
                                                 </span>
                                             </div>
                                         </div>
@@ -177,24 +175,18 @@ import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
 import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
 import IbpsAttachment from '@/business/platform/file/attachment/selector'
 import { specialType, specialBtn, specialParams, specialTable, stateTable, stateField, specialField } from './corresponding/index'
-import TemplateList from './templateList'
 
 export default {
     components: {
         IbpsTypeTree,
         BpmnFormrender,
-        IbpsAttachment,
-        TemplateList
+        IbpsAttachment
     },
     filters: {
         // 截取报表名称
         getReportName (value) {
             // 通过/与.截取,eg: 43罗湖/L13-LHXBJY-QP-6.4-04 标准菌株管理程序/LHXBJY-QP-6.4-04-FQ-03 标准菌株鉴定验收记录表.rpx
             return value.slice(-value.split('').reverse().join('').indexOf('/'), -value.split('').reverse().join('').indexOf('.') - 1)
-        },
-         getUserName (v, list) {
-            const user = list.find(i => i.userId === v)
-            return user ? user.userName : ''
         }
     },
     mixins: [FixHeight],
@@ -238,12 +230,7 @@ export default {
             loading: true,
             fileLoading: false,
             height: document.clientHeight,
-             reportAll: {
-                process: [],
-                template: []
-            },
-            templateShow: false,
-            templateData: {},
+            reportAll: [],
             listData: [],
             pagination: {},
             sorts: { END_TIME_: 'DESC' },
@@ -344,24 +331,16 @@ export default {
         },
         // 获取所有流程的报表配置数据
         getConfig () {
-            const sql = `select * from t_lcidglbdbb`
+            const sql = 'select bao_biao_lu_jing_, fu_jian_nei_rong_, guan_lian_zi_duan, liu_cheng_xuan_ze, shi_fou_zi_biao_ from t_lcidglbdbb'
             curdPost('sql', sql).then((res) => {
-                const { data = [] } = res.variables || {}
-                data.forEach(i => {
-                    if (!i.gui_dang_lei_xing) {
-                        this.reportAll.process.push(i)
-                    } else {
-                        this.reportAll[i.gui_dang_lei_xing].push(i)
-                    }
-                })
-            }).catch(err => {
-                this.$message.error('获取流程配置报表数据失败!')
-                console.log(err)
+                this.reportAll = res.variables && res.variables.data
+            }).catch(error => {
+                console.log('获取流程配置报表数据失败!')
             })
         },
         // 获取报表数据及附件数据
         getReportAndFile ({ procDefKey, bizKey, subject }) {
-         // 每次获取前先清除原先数据
+            // 每次获取前先清除原先数据
             this.record = {
                 report: [],
                 file: [],
@@ -387,22 +366,31 @@ export default {
                 special: [],
                 bizKey
             }
-            let typeIndex = ''
+            let typeIndex = 1
             // 特殊类型处理
             if (this.specialType.hasOwnProperty(this.typeId)) {
-                this.specialType[this.typeId].forEach((item, index) => {
-                    // 判断当前流程在哪一步,以此决定报表展示
-                    if (subject.includes(item)) {
-                        // 数组下标+2为当前报表文件排序
-                        typeIndex = index + 2
+                // 获取内审管审全局状态,根据此状态过滤报表显示
+                const sql = `select zhuang_tai_jie_di as state from ${stateTable[this.typeId]} where ${stateField[this.typeId]} = '${bizKey}'`
+                curdPost('sql', sql).then((res) => {
+                    const { data = [] } = res.variables || {}
+                    if (data.length) {
+                        console.log(data[0].state)
+                        this.specialType[this.typeId].forEach((item, index) => {
+                            // 判断当前流程在哪一步,以此决定报表展示
+                            if (data[0].state === item) {
+                                // 数组下标+2为当前报表文件排序
+                                typeIndex = index + 2
+                            }
+                        })
                     }
+                    console.log(typeIndex)
+                    this.record.report = this.record.report.slice(0, typeIndex)
+                }).catch(error => {
+                    console.log('获取管审内审全局状态数据失败!')
+                    this.record.report = this.record.report.slice(0, typeIndex)
                 })
                 this.getSpecicalFile(bizKey)
             }
-            // console.log(typeIndex)
-            if (typeIndex !== '') {
-                this.record.report = this.record.report.slice(0, typeIndex)
-            }
             // console.log(this.record)
             if (this.record.file.length && this.record.table.length) {
                 this.getAllFile(this.record)
@@ -651,16 +639,7 @@ export default {
         handleNodeClick (typeId, typeName) {
             this.tableTitle = typeName.name
             this.typeId = typeId
-            this.templateData = this.reportAll.template.find(i => i.fen_lei_id_ === typeId) || {}
-            console.log(' this.templateData653', this.templateData)
-            if (!this.templateData.templateid_) {
-                this.templateShow = false
-                this.loadData()
-            } else {
-                this.templateShow = true
-                this.templateData.typeId = typeId
-                this.templateData.typeName = typeName.name
-            }
+            this.loadData()
         },
         handleExpandCollapse (isExpand) {
             this.width = isExpand ? 230 : 30
@@ -674,24 +653,6 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-.js-custom-dialog {
-        .el-dialog__body {
-            height: calc(100vh) !important;
-            margin: -9px !important;
-            padding: 0px !important;
-            overflow: hidden;
-        }
-        .el-dialog__header {
-            padding: 0px;
-        }
-        .el-dialog__headerbtn i {
-            font-size: 28px;
-            font-weight: bold;
-            background-color: #ffffff;
-            border-radius: 8px;
-            margin-top: -8px;
-        }
-    }
     .div_operation {
         cursor: pointer;
     }
@@ -728,7 +689,7 @@ export default {
         }
     }
     .content_item {
-        max-height: 200px;
+        // max-height: 200px;
         margin-bottom: 4px;
         &:first-child{
             .sub_content .title {

+ 0 - 54
src/views/platform/bpmn/bpmInstHis/templateList.vue

@@ -1,54 +0,0 @@
-<template>
-    <div class="template-container">
-        <template-list
-            :template-id="templateId"
-            :dynamic-params="dynamicParams"
-            :filter-params="filterParams"
-            :type-name="typeName"
-        />
-    </div>
-</template>
-
-<script>
-import TemplateList from '@/views/platform/data/dataTemplate/template-list.vue'
-export default {
-    components: {
-        TemplateList
-    },
-    props: {
-        templateData: {
-            type: Object,
-            default: () => {}
-        }
-    },
-    data () {
-        const { templateid_, guo_lv_can_shu_, typeName } = this.templateData
-        return {
-            typeName,
-            templateId: templateid_,
-            filterParams: guo_lv_can_shu_ ? JSON.parse(guo_lv_can_shu_) : [],
-            dynamicParams: {}
-        }
-    },
-    watch: {
-        templateData (v) {
-            const { templateid_, guo_lv_can_shu_, typeName } = v
-            this.typeName = typeName
-            this.templateId = templateid_
-            this.filterParams = guo_lv_can_shu_ ? JSON.parse(guo_lv_can_shu_) : []
-        }
-    }
-    // methods: {
-
-    // }
-}
-</script>
-
-<style lang="scss" scoped>
-    .template-container{
-        ::v-deep .container-component{
-            margin-left: 210px;
-        }
-    }
-</style>
-

+ 1 - 1
src/views/platform/cat/type/import-xml.vue

@@ -91,7 +91,7 @@ export default {
     },
     fileList: {
       handler: function(val, oldVal) {
-        console.log(val)
+        // console.log(val)
       },
       deep: true
     }

+ 3 - 37
src/views/platform/data/dataTemplate/template-list.vue

@@ -28,10 +28,6 @@ export default {
       type: String,
       default: ''
     },
-    typeName: {
-      type: String,
-      default: ''
-    }
   },
   data() {
     return {
@@ -68,7 +64,7 @@ export default {
       deep: true,
       immediate: true
     },
-    templateId: {
+ /*   templateId: {
       handler(val) {
         if (this.$utils.isNotEmpty(val)) {
           this.dataTemplateId = val
@@ -76,7 +72,7 @@ export default {
         }
       },
       immediate: true
-    } 
+    } */
   },
   // created(){
   //   this.loadDataTemplate()
@@ -103,9 +99,6 @@ export default {
             const datasets = buildFelds(formData.fields, data.datasets)
             data.datasets = datasets
             this.dataTemplate = data
-            if (this.typeName) {
-              this.dataTemplate.templates = this.dealData(this.dataTemplate)
-            }
             setTimeout(() => {
               loading.close()
             }, 1000)
@@ -145,34 +138,7 @@ export default {
         rtn.push(dataset)
       })
       return rtn
-    },
-    dealData ({ showType, templates }) {
-            if (showType !== 'list') {
-                return templates
-            }
-            const data = templates[0]
-            // 替换列表标题
-            data.attrs.display_field = this.typeName
-            // 替换按钮
-            data.buttons.function_buttons = this.dealButtom(data.buttons.function_buttons)
-            // 增加过滤信息
-            data.filter_conditions = this.dealFilter(data.filter_conditions)
-            return [data]
-        },
-    dealButtom (buttons) {
-            const keys = ['search', 'remove', 'consult']
-            if (!buttons.length) {
-                return []
-            }
-            const btn = buttons.filter(i => keys.includes(i.button_type))
-            btn.push({
-                button_type: 'detail',
-                label: '明细',
-                position: 'manage',
-                type: 'info'
-            })
-            return btn
-        },
+    }
   }
 }
 </script>