Ver Fonte

模板表单同步

shenqilong há 1 ano atrás
pai
commit
dde0b6e732

+ 18 - 0
src/api/upload/zip.js

@@ -0,0 +1,18 @@
+import request from '@/utils/request'
+import { BUSINESS_BASE_URL } from '@/api/baseUrl'
+
+/**
+ * 导入文件
+ * @param {*} file
+ */
+export function upload (file, uploadUrl) {
+    const data = new FormData() // 创建form对象
+    data.append('file', file)
+    return request({
+        url: BUSINESS_BASE_URL() + uploadUrl,
+        method: 'post',
+        data: data,
+        isLoading: true,
+        gateway: true
+    })
+}

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

@@ -0,0 +1,83 @@
+<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 v-if="dialogTableVisible" class="boxOn" :style="{height: height}">
+            <onLineEditing :id="xlsxId" @addClick="addClick" />
+            <i class="el-icon-circle-close iBox" @click="close" />
+        </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>

+ 37 - 0
src/business/platform/form/formbuilder/right-aside/field-types/ibps-field-current-position.vue

@@ -0,0 +1,37 @@
+<template>
+  <div>
+    <el-form v-bind="$attrs" v-on="$listeners" @submit.native.prevent>
+      <!-- 基本属性 -->
+      <editor-base
+        :field-item="fieldItem"
+        :bo-data="boData"
+        :fields="fields"
+        types="switchFieldType,label,name,desc,display"
+      />
+      <!-- 参数设置 -->
+      <editor-field-selector
+        :field-item="fieldItem"
+        types="store"
+      />
+      <!-- 字段权限 -->
+      <editor-rights
+        :field-item="fieldItem"
+        types="hide"
+      />
+      <!-- 布局设置 -->
+      <editor-layout
+        :field-item="fieldItem"
+        types="hideLabel,labelWidth,width,customClass,mobile"
+      />
+    </el-form>
+  </div>
+
+</template>
+<script>
+import typeMixin from '../mixins/type'
+
+export default {
+  name: 'ibps-field-current-position',
+  mixins: [typeMixin]
+}
+</script>

+ 137 - 0
src/business/platform/form/formrender/dynamic-form/components/import-zip.vue

@@ -0,0 +1,137 @@
+<template>
+    <el-dialog
+        :title="title"
+        :visible.sync="dialogVisible"
+        :close-on-click-modal="false"
+        :close-on-press-escape="false"
+        append-to-body
+        class="dialog"
+        @opened="openedDialog"
+        @close="closeDialog"
+    >
+        <el-form
+            ref="importForm"
+            v-loading="dialogLoading"
+            :element-loading-text="$t('common.loading')"
+            :label-width="formLabelWidth"
+            class="import-form"
+            @submit.native.prevent
+        >
+
+            <el-form-item label="选择文件:" required>
+                <el-upload
+                    ref="upload"
+                    action="https://www.bpmhome.cn/post"
+                    :accept="accept"
+                    :file-list="fileList"
+                    :on-change="handleChange"
+                    :before-upload="handleUpload"
+                    :auto-upload="false"
+                >
+                    <el-button type="primary" icon="el-icon-upload">选择文件</el-button>
+                    <div slot="tip" class="el-upload__tip"> {{ uploadTitle }}</div>
+                </el-upload>
+            </el-form-item>
+            <!-- <el-form-item label="格式数据:">
+        <el-switch
+          v-model="options.raw"
+          active-text="原始"
+          inactive-text="格式化"
+        />
+      </el-form-item> -->
+        </el-form>
+        <div slot="footer" class="el-dialog--center">
+            <ibps-toolbar
+                :actions="toolbars"
+                @action-event="handleActionEvent"
+            />
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+import ActionUtils from '@/utils/action'
+
+export default {
+    props: {
+        uploadTitle: {
+            type: String
+        },
+        accept: {
+            type: String
+        },
+        visible: {
+            type: Boolean,
+            default: false
+        },
+        title: {
+            type: String
+        }
+    },
+    data () {
+        return {
+            formName: 'importForm',
+            formLabelWidth: '120px',
+            dialogVisible: this.visible,
+            dialogLoading: false,
+            fileList: [],
+            options: {
+                raw: false
+            },
+            toolbars: [
+                { key: 'import' },
+                { key: 'cancel' }
+            ]
+        }
+    },
+    watch: {
+        visible: {
+            handler: function (val, oldVal) {
+                this.dialogVisible = this.visible
+            },
+            immediate: true
+        }
+    },
+    methods: {
+        openedDialog () {
+            this.fileList = []
+        },
+        handleActionEvent ({ key }) {
+            switch (key) {
+                case 'import':
+                    this.handleImport()
+                    break
+                case 'cancel':
+                    this.closeDialog()
+                    break
+                default:
+                    break
+            }
+        },
+        handleChange (file, fileList) {
+            if (fileList.length > 1) {
+                fileList.splice(0, 1)
+            }
+        },
+        handleUpload (file) {
+            // this.file = file
+            // 判断是否是Excel
+        },
+        async handleImport () {
+            const files = this.$refs['upload'].uploadFiles
+            if (this.$utils.isEmpty(files)) {
+                ActionUtils.warning('请上传要导入的文件')
+                return
+            }
+            console.log(files[0].raw)
+            this.$emit('action-event', files[0].raw, this.options)
+        },
+        // 关闭当前窗口
+        closeDialog () {
+            this.$emit('close', false)
+            this.$refs[this.formName].resetFields()
+        }
+    }
+
+}
+</script>

+ 9 - 0
src/utils/seal.js

@@ -0,0 +1,9 @@
+// 微签接口
+
+import { seal,sealPre,getSigPageUrl } from '@/api/platform/form/seal'
+
+export default {
+    seal,
+    sealPre,
+    getSigPageUrl
+}

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

@@ -0,0 +1,386 @@
+<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>

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

@@ -0,0 +1,1401 @@
+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;
+
+}

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

@@ -0,0 +1,1418 @@
+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 }

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

@@ -0,0 +1,80 @@
+<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>
+

+ 220 - 0
src/views/system/jbdScan/approve/approve.vue

@@ -0,0 +1,220 @@
+<template>
+    <div>
+        <el-dialog
+            :title="`核查计划进度情况(核查计划编号:${generalList[0].bian_hao_})`"
+            :visible.sync="generalShow"
+            width="80%"
+            top="0"
+            append-to-body
+            custom-class="customClass"
+            @close="close"
+        >
+            <div>
+                <div class="step">
+                    <el-steps :active="activeIndex" finish-status="success" align-center>
+                        <el-step v-for="(item,index) in stepList" :key="index" :title="item.title" :description="item.post" @click.native="activeClick(index + 1)" />
+                    </el-steps>
+                </div>
+                <div class="stopCenter">
+                    <div>
+                        <div class="tableTop">
+                            <el-alert
+                                title="核查完成进度仪表"
+                                type="success"
+                                :description="description"
+                                :closable="false"
+                            />
+                        </div>
+                        <div style="display: flex;justify-content: space-between;width: 100%;">
+                            <!-- <div v-if="activeIndex != 5" style="width: 100%">
+                                <div ref="Echart" class="chart" />
+                            </div>
+                            <div v-if="activeIndex == 5" style="width:40%;position: relative;">
+                                <div ref="Echart" class="chart" />
+                            </div>
+                            <div v-if="activeIndex == 5" style="width: 60%;position: relative;">
+                                <div ref="Echart2" class="chart" />
+                            </div> -->
+                            <div style="width:30%;position: relative;">
+                                <div ref="Echart" class="chart" />
+                            </div>
+                            <div style="width: 70%;position: relative;">
+                                <div ref="Echart2" class="chart" />
+                            </div>
+
+                        </div>
+
+                    </div>
+                </div>
+                <div v-if="activeIndex == 5" class="tableLin">
+                    <div class="tableTop">
+                        <el-alert
+                            title="不符合条款清单"
+                            type="success"
+                            :closable="false"
+                        />
+                    </div>
+                    <div>
+                        <appComOne ref="appBuCom" :click-index="7" :table-data="buTableData" :type="false" />
+                    </div>
+                </div>
+                <div class="tableLin">
+                    <div class="tableTop">
+                        <el-alert
+                            :title="getIndexName(clickIndex)"
+                            type="success"
+                            :closable="false"
+                        />
+                    </div>
+                    <div>
+                        <appComOne ref="appCom" :type="true" :general-list="generalList" :click-index="clickIndex" :active-index="activeIndex" :table-data="tableData" />
+                    </div>
+                </div>
+                <div v-if="activeIndex != 5" class="tyongj">
+                    暂无不符合项统计,请等待本次认可准则条款确认结束后统计
+                </div>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import approveJS from './approveJS'
+import appComOne from './compnent/appComOne'
+export default {
+    components: { appComOne },
+    mixins: [approveJS],
+    props: {
+        show: {
+            type: Boolean,
+            default: false
+        },
+        generalList: {
+            type: Array,
+            default: () => {
+                return []
+            }
+        }
+    },
+    data () {
+        return {
+            generalShow: this.show,
+            id: '',
+            clickIndex: 2,
+            activeIndex: 5,
+            stepList: [
+                {
+                    stepIndex: 11,
+                    title: '计划编制',
+                    post: '质量负责人'
+                },
+                {
+                    stepIndex: 22,
+                    title: '实施计划编制',
+                    post: '组长'
+                },
+                {
+                    stepIndex: 33,
+                    title: '条款核查',
+                    post: '组员'
+                },
+                {
+                    stepIndex: 44,
+                    title: '实施计划审核',
+                    post: '组长'
+                },
+                {
+                    stepIndex: 55,
+                    title: '结果确认',
+                    post: '质量负责人'
+                }
+            ],
+            tableData: [],
+            description: `核查计划项目进度计分:'待分配'计1分, '待核查'计2分, '待审核'计3分, '待确认'计4分, '已结束'计5分,核查进度率 = 各项计划项目进度计分之和 / 计划项目总数 / 5 * 100`,
+            buTableData: [],
+            show1: false,
+            show2: false,
+            innerWidth
+        }
+    },
+    watch: {
+        show: {
+            handler () {
+                // this.generalShow = this.show
+            },
+            deep: true,
+            immediate: true
+        }
+    },
+    created () {
+        this.getPosition()
+        this.id = this.generalList[0].id_
+        this.getJiHuaZhuangTai(this.id)
+        this.innerWidth = window.innerWidth / 2
+    },
+    methods: {
+        close () {
+            this.$emit('generalClose', false)
+        },
+        activeClick (index) {
+            if (this.activeIndex < index - 1) {
+                return this.$message.error('任务进度没到,请点击其他节点切换')
+            }
+            this.getShiShiData(this.id)
+            this.$refs.appCom.switchWatch(index)
+            this.clickIndex = index
+        },
+        getIndexName (index) {
+            const name = this.stepList[this.clickIndex - 1 === 5 ? 4 : this.clickIndex - 1].title || ''
+            return name
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+/deep/ .customClass .el-dialog__header{
+    border-bottom: none;
+}
+/deep/ .customClass .el-dialog__footer{
+    border-top: none;
+}
+.step{
+    position: relative;
+    margin: 20px 30px;
+}
+.tableLin{
+    margin: 0 30px 20px 30px;
+}
+.stopCenter{
+    margin: 0 30px 20px 30px;
+}
+.tableTop{
+    margin-bottom: 10px;
+}
+.chart{
+    width: 100%;
+    height: 300px;
+}
+
+.tyongj{
+    color: #606266;
+    margin: 20px auto;
+    text-align: center;
+    font-size: 16px;
+}
+
+.buFuHu{
+    display: flex;
+    justify-content: space-between;
+    margin: 20px 30px;
+    .buLeft{
+        width: 100%;
+
+        .textLeft{
+            color: #606266;
+            margin-bottom: 20px;
+        }
+    }
+}
+</style>

+ 467 - 0
src/views/system/jbdScan/approve/approveJS.js

@@ -0,0 +1,467 @@
+import * as echarts from 'echarts'
+export default {
+    data () {
+        return {
+            typeList: ['待分配', '待核查', '待审核', '待确认', '已结束'],
+            posiList: [],
+            positionList: [],
+            barLable: {
+                show: true,
+                position: 'top',
+                textStyle: { // 数值样式
+                    color: 'black',
+                    fontSize: 12
+                },
+                formatter: (params) => {
+                    // 这个回调函数不起作用了
+                    return params.value === '0' ? '' : params.value
+                }
+
+            }
+        }
+    },
+
+    methods: {
+        getPosition () {
+            const second = this.$store.getters.level.second
+            const sql = `select * from ibps_party_entity where party_type_ = 'position' and PATH_ like '%${second}%' and DEPTH_ = '4' order by ID_ desc`
+            this.$common.request('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                if (data.length > 0) {
+                    const list = []
+                    const list2 = []
+                    data.forEach(item => {
+                        list.push(item.NAME_)
+                        list2.push(item.NAME_)
+                    })
+                    this.posiList = list
+                    this.positionList = list2
+                }
+            })
+        },
+        getColorRe (list) {
+            const colors = [
+                '#d20962',
+                '#f47721',
+                '#7ac143',
+                '#00a78e',
+                '#00bce4',
+                '#7d3f98',
+                '#037ef3',
+                '#f85a40',
+                '#00c16e',
+                '#ffd900',
+                '#0cb9c1',
+                '#7552cc'
+            ]
+
+            const colorList = []
+
+            const res = []
+            list.forEach((item, index) => {
+                const random = parseInt(Math.random() * 12)
+                const obj = {
+                    name: item.name,
+                    value: item.count,
+                    textStyle: {
+                        color: colors[index > 12 ? index - 11 : index]
+                    }
+                }
+                res.push(obj)
+                colorList.push(colors[index > 12 ? index - 11 : index])
+            })
+            const dt = {
+                res,
+                colorList
+            }
+            return dt
+        },
+        getJiHuaZhuangTai (id) {
+            const sql = `select * from t_rkzztkhcjh where id_ = '${id}'`
+            this.$common.request('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                if (data.length > 0) {
+                    const index = this.typeList.findIndex(item => item === data[0].shi_fou_guo_shen_)
+                    const addIndex = index + 1
+                    this.activeIndex = addIndex
+                    this.clickIndex = addIndex + 1
+                    this.getShiShiData(id, this.activeIndex)
+                    this.getJiHuaZiBiaoJiSuan(id)
+                    // this.getOption()
+                    if (index === 4) {
+                        this.getBuFuHeXiangMu(id)
+                        this.getBuFuHeTuBiao(id)
+                    } else {
+                        this.getHeChaList(id)
+                    }
+                }
+            })
+        },
+        getJiHuaZiBiaoJiSuan (id) {
+            const sql = `select * from t_rkzztkhcjhzb where ji_hua_de_id_ = '${id}'`
+            this.$common.request('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                if (data.length > 0) {
+                    const list = []
+                    data.forEach(item => {
+                        const showIndex = this.typeList.findIndex(it => it === item.shi_fou_guo_shen_)
+                        list.push(showIndex + 1)
+                    })
+                    const sum = list.reduce((total, current) => total + current)
+                    const dataLength = data.length
+                    const totalMs = sum / dataLength / 5 * 100
+                    this.getOption(parseInt(totalMs))
+                }
+            })
+        },
+        getShiShiData (id, activeIndex) {
+            const sql = `select a.*,c.NAME_ as zuYuanPosiName,d.NAME_ as zuYuanName,e.NAME_ as zuZhangName,g.NAME_ as zuZhangBnMen,h.NAME_ as yuanZuZhangBuMen,i.NAME_ as yuanZuZhangName from t_rkzztkhcjhzb a left join t_rkzztkhcjhzb b on a.id_ = b.ji_hua_zi_biao_id left join ibps_party_position c on a.bian_zhi_bu_men_ = c.ID_ left join ibps_party_position h on a.bu_men_ = h.ID_ left join ibps_party_employee i on a.zu_chang_ = i.ID_ left join ibps_party_employee d on a.zu_yuan_ = d.ID_ left join t_hcssjhb f on b.parent_id_ = f.id_ left join ibps_party_position g on f.bian_zhi_bu_men_ = g.ID_ left join ibps_party_employee e on f.bian_zhi_ren_ = e.ID_ where a.ji_hua_de_id_ = '${id}' order by a.tiao_kuan_hao_`
+
+            // if (activeIndex === 1) {
+            //     sql = `select * from t_rkzztkhcjhzb where parent_id_ = '${id}' order by tiao_kuan_hao_`
+            // }
+            // if (activeIndex === 2 || activeIndex === 3 || activeIndex === 4) {
+            // }
+            this.$common.request('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                if (data.length > 0) {
+                    this.tableData = data
+                }
+            })
+        },
+        getBuFuHeXiangMu (id) {
+            const sql = `select a.*,c.NAME_ as zuYuanPosiName,d.NAME_ as zuYuanName,e.NAME_ as zuZhangName,g.NAME_ as zuZhangBnMen from t_rkzztkhcjhzb a left join t_rkzztkhcjhzb b on a.id_ = b.ji_hua_zi_biao_id left join ibps_party_position c on a.bian_zhi_bu_men_ = c.ID_ left join ibps_party_employee d on a.zu_yuan_ = d.ID_ left join t_hcssjhb f on b.parent_id_ = f.id_ left join ibps_party_position g on f.bian_zhi_bu_men_ = g.ID_ left join ibps_party_employee e on f.bian_zhi_ren_ = e.ID_ where a.ji_hua_de_id_ = '${id}' and a.he_cha_jie_guo_ = 'N' order by a.tiao_kuan_hao_`
+
+            this.$common.request('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                if (data.length > 0) {
+                    this.buTableData = data
+                }
+            })
+        },
+        getBuFuHeTuBiao (id) {
+            const second = this.$store.getters.level.second
+            const sql1 = `select a.NAME_ as name,COALESCE(COUNT(b.id_), 0) AS value FROM ibps_party_entity a LEFT JOIN t_rkzztkhcjhzb b ON a.ID_ = b.bu_men_ AND b.ji_hua_de_id_ = '${id}' AND b.he_cha_jie_guo_ = 'N' WHERE a.party_type_ = 'position' AND a.PATH_ LIKE '%${second}%' AND a.DEPTH_ = '4' GROUP BY a.NAME_ order by a.ID_ desc`
+            const sql2 = `select a.NAME_ as name,COALESCE(COUNT(b.id_), 0) AS value FROM ibps_party_entity a LEFT JOIN t_rkzztkhcjhzb b ON a.ID_ = b.bu_men_ AND b.ji_hua_de_id_ = '${id}' AND b.he_cha_jie_guo_ = 'Y' WHERE a.party_type_ = 'position' AND a.PATH_ LIKE '%${second}%' AND a.DEPTH_ = '4' GROUP BY a.NAME_ order by a.ID_ desc`
+            const sql3 = `select a.NAME_ as name,COALESCE(COUNT(b.id_), 0) AS value FROM ibps_party_entity a LEFT JOIN t_rkzztkhcjhzb b ON a.ID_ = b.bu_men_ AND b.ji_hua_de_id_ = '${id}' AND b.he_cha_jie_guo_ = 'N/A' WHERE a.party_type_ = 'position' AND a.PATH_ LIKE '%${second}%' AND a.DEPTH_ = '4' GROUP BY a.NAME_ order by a.ID_ desc`
+            const sql4 = `select a.NAME_ as name,COALESCE(COUNT(b.id_), 0) AS value FROM ibps_party_entity a LEFT JOIN t_rkzztkhcjhzb b ON a.ID_ = b.bu_men_ AND b.ji_hua_de_id_ = '${id}' WHERE a.party_type_ = 'position' AND a.PATH_ LIKE '%${second}%' AND a.DEPTH_ = '4' GROUP BY a.NAME_ order by a.ID_ desc`
+
+            Promise.all([this.$common.request('sql', sql1), this.$common.request('sql', sql2), this.$common.request('sql', sql3), this.$common.request('sql', sql4)]).then(res => {
+                if (res.length > 0) {
+                    const data1 = res[0].variables.data
+                    const data2 = res[1].variables.data
+                    const data3 = res[2].variables.data
+                    const data4 = res[3].variables.data
+                    const list1 = data1.map(item => {
+                        return item.value === 0 ? '' : item.value
+                    })
+                    const list2 = data2.map(item => {
+                        return item.value === 0 ? '' : item.value
+                    })
+                    const list3 = data3.map(item => {
+                        return item.value === 0 ? '' : item.value
+                    })
+                    const list4 = data4.map(item => {
+                        return item.value === 0 ? '' : item.value
+                    })
+                    const accept = echarts.init(this.$refs.Echart2)
+                    accept.setOption({...this.barData(list1, list2, list3, list4)})
+                }
+            })
+        },
+        getHeChaList (id) {
+            const second = this.$store.getters.level.second
+            const sql1 = `select a.NAME_ as name,COALESCE(COUNT(b.id_), 0) AS value FROM ibps_party_entity a LEFT JOIN t_rkzztkhcjhzb b ON a.ID_ = b.bu_men_ AND b.ji_hua_de_id_ = '${id}' WHERE a.party_type_ = 'position' AND a.PATH_ LIKE '%${second}%' AND a.DEPTH_ = '4' GROUP BY a.NAME_ order by a.ID_ desc`
+            const sql2 = `select a.NAME_ as name,COALESCE(COUNT(b.id_), 0) AS value FROM ibps_party_entity a LEFT JOIN t_rkzztkhcjhzb b ON a.ID_ = b.bu_men_ AND b.ji_hua_de_id_ = '${id}' and (b.shi_fou_guo_shen_ = '待审核' or b.shi_fou_guo_shen_ = '待确认' or b.shi_fou_guo_shen_ = '已结束') WHERE a.party_type_ = 'position' AND a.PATH_ LIKE '%${second}%' AND a.DEPTH_ = '4' GROUP BY a.NAME_ order by a.ID_ desc`
+            const sql3 = `select a.NAME_ as name,COALESCE(COUNT(b.id_), 0) AS value FROM ibps_party_entity a LEFT JOIN t_rkzztkhcjhzb b ON a.ID_ = b.bu_men_ AND b.ji_hua_de_id_ = '${id}' and (b.shi_fou_guo_shen_ = '待分配' or b.shi_fou_guo_shen_ = '待核查') WHERE a.party_type_ = 'position' AND a.PATH_ LIKE '%${second}%' AND a.DEPTH_ = '4' GROUP BY a.NAME_ order by a.ID_ desc`
+
+            Promise.all([this.$common.request('sql', sql1), this.$common.request('sql', sql2), this.$common.request('sql', sql3)]).then(res => {
+                if (res.length > 0) {
+                    const data1 = res[0].variables.data
+                    const data2 = res[1].variables.data
+                    const data3 = res[2].variables.data
+                    const list1 = data1.map(item => {
+                        return item.value === 0 ? '' : item.value
+                    })
+                    const list2 = data2.map(item => {
+                        return item.value === 0 ? '' : item.value
+                    })
+                    const list3 = data3.map(item => {
+                        return item.value === 0 ? '' : item.value
+                    })
+                    const accept = echarts.init(this.$refs.Echart2)
+                    accept.setOption({...this.barDataPlan(list1, list2, list3)})
+                }
+            })
+        },
+        linHeg (value) {
+            // rowMAx 控制一行多少字
+            const rowMAx = 1
+            let overValue = ''
+            for (let i = 0; i < value.length; i++) {
+                if ((i % rowMAx === 0) && (i !== 0)) {
+                    overValue += '\n'
+                    overValue += value[i]
+                } else {
+                    overValue += value[i]
+                }
+            }
+            return overValue
+        },
+        getOption (totalMs = 0) {
+            const option = {
+                series: [
+                    {
+                        type: 'gauge',
+                        min: 0,
+                        max: 100,
+                        animationDuration: 3000,
+                        axisLine: {
+                            lineStyle: {
+                                width: 30,
+                                color: [
+                                    [0.3, '#fd666d'],
+                                    [0.7, '#37a2da'],
+                                    [1, '#67e0e3']
+                                ]
+                            }
+                        },
+                        pointer: {
+                            itemStyle: {
+                                color: 'auto'
+                            }
+                        },
+                        axisTick: {
+                            distance: -30,
+                            length: 8,
+                            lineStyle: {
+                                color: '#fff',
+                                width: 2
+                            }
+                        },
+                        splitLine: {
+                            distance: -30,
+                            length: 30,
+                            lineStyle: {
+                                color: '#fff',
+                                width: 4
+                            }
+                        },
+                        axisLabel: {
+                            show: true
+                        },
+                        detail: {
+                            valueAnimation: true,
+                            formatter: '{value} %',
+                            color: 'auto',
+                            top: '100%',
+                            offsetCenter: [0, '75%']
+                        },
+                        title: {
+                            offsetCenter: [0, '100%'],
+                            fontWeight: 'bold',
+                            fontSize: 20
+                        },
+                        data: [{ value: totalMs, name: '条款核查完成进度仪表盘', top: '100%' }]
+                    }
+                ]
+            }
+            const accept = echarts.init(this.$refs.Echart)
+            accept.setOption(JSON.parse(JSON.stringify(option)))
+            // this.show1 = true
+        },
+        barData (data1, data2, data3, data4) {
+            const barDataTy = {
+                // 图例设置
+                legend: {
+                    textStyle: {
+                        fontSize: 12,
+                        color: '#333'
+                    }
+                },
+                title: {
+                    show: true,
+                    text: '条款清单',
+                    textStyle: {
+                        // color: '#fff',
+                        fontSize: 20,
+                        fontWeight: '600'
+                    },
+                    textAlign: 'center',
+                    left: '50%',
+                    top: '20px'
+                },
+                xAxis: {
+                    name: '部门',
+                    type: 'category',
+                    data: this.positionList,
+                    axisTick: {
+                        alignWithLabel: true
+                    },
+                    axisLabel: {
+                        rotate: 30,
+                        interval: 0,
+                        margin: 10
+                    }
+                },
+                yAxis: {
+                    type: 'value',
+                    name: '条款核查数量',
+                    minInterval: 1,
+                    nameTextStyle: {
+                        fontSize: 14
+                    },
+                    splitLine: {
+                        show: false
+                    }
+                },
+                series: [{
+                    name: '计划条款总数',
+                    type: 'bar',
+                    barGap: 0,
+                    emphasis: {
+                        focus: 'series'
+                    },
+                    data: data4,
+                    label: this.barLable
+                }, {
+                    name: '条款自查通过数',
+                    type: 'bar',
+                    barGap: 0,
+                    emphasis: {
+                        focus: 'series'
+                    },
+                    data: data2,
+                    label: this.barLable
+                },
+                {
+                    name: '自查未通过数',
+                    type: 'bar',
+                    barGap: 0,
+                    emphasis: {
+                        focus: 'series'
+                    },
+                    data: data1,
+                    label: this.barLable
+                }, {
+                    name: '不适用',
+                    type: 'bar',
+                    barGap: 0,
+                    emphasis: {
+                        focus: 'series'
+                    },
+                    data: data3,
+                    label: this.barLable
+                }],
+                color: ['#7552cc', '#00c16e', '#fd666d', '#64C7BF'],
+                tooltip: {
+                    show: true,
+                    trigger: 'axis',
+                    formatter:function(params){
+                        let val0 = params[0].value==''? 0:params[0].value
+                        let val1 = params[1].value==''? 0:params[1].value
+                        let val2 = params[2].value==''? 0:params[2].value
+                        let val3 = params[3].value==''? 0:params[3].value
+                        let str = `${params[0].name}<br>${params[0].seriesName}:${val0}
+                                                    <br>${params[1].seriesName}:${val1}
+                                                    <br>${params[2].seriesName}:${val2}
+                                                    <br>${params[3].seriesName}:${val3}`
+                        return str
+                    }
+                }
+            }
+            return barDataTy
+        },
+        barDataPlan (data1, data2, data3) {
+            const barDataTy = {
+                // 图例设置
+                legend: {
+                    textStyle: {
+                        fontSize: 12,
+                        color: '#333'
+                    }
+                },
+                title: {
+                    show: true,
+                    text: '核查进度',
+                    textStyle: {
+                        // color: '#fff',
+                        fontSize: 20,
+                        fontWeight: '600'
+                    },
+                    textAlign: 'center',
+                    left: '50%',
+                    top: '20px'
+                },
+                xAxis: {
+                    name: '部门',
+                    type: 'category',
+                    data: this.positionList,
+                    axisTick: {
+                        alignWithLabel: true
+                    },
+                    axisLabel: {
+                        rotate: 30,
+                        interval: 0,
+                        margin: 10
+                    }
+                },
+                yAxis: {
+                    type: 'value',
+                    name: '数量(项目)',
+                    minInterval: 1,
+                    nameTextStyle: {
+                        fontSize: 14
+                    },
+                    splitLine: {
+                        show: false
+                    }
+                },
+                series: [{
+                    name: '总数',
+                    type: 'bar',
+                    barGap: 0,
+                    emphasis: {
+                        focus: 'series'
+                    },
+                    data: data1,
+                    label: this.barLable
+                },
+                {
+                    name: '已核查',
+                    type: 'bar',
+                    barGap: 0,
+                    emphasis: {
+                        focus: 'series'
+                    },
+                    data: data2,
+                    label: this.barLable
+                }, {
+                    name: '未核查',
+                    type: 'bar',
+                    barGap: 0,
+                    emphasis: {
+                        focus: 'series'
+                    },
+                    data: data3,
+                    label: this.barLable
+                }],
+                color: ['rgb(55, 162, 218)', 'rgb(103, 224, 227)', 'rgb(253, 102, 109)'],
+                tooltip: {
+                    show: true,
+                    trigger: 'axis',
+                    formatter:function(params){
+                        let val0 = params[0].value==''? 0:params[0].value
+                        let val1 = params[1].value==''? 0:params[1].value
+                        let val2 = params[2].value==''? 0:params[2].value
+                        let str = `${params[0].name}<br>${params[0].seriesName}:${val0}
+                                                    <br>${params[1].seriesName}:${val1}
+                                                    <br>${params[2].seriesName}:${val2}`
+                        return str
+                    }
+                }
+            }
+            return barDataTy
+        }
+    }
+}

+ 137 - 0
src/views/system/jbdScan/approve/approveJSON.json

@@ -0,0 +1,137 @@
+{
+    "list1": [{
+        "name": "条款号",
+        "value": "tiao_kuan_hao_",
+        "width": "100"
+    },{
+        "name": "条款名称",
+        "value": "tiao_kuan_ming_ch",
+        "width": "150"
+    },{
+        "name": "实施状态",
+        "value": "shi_fou_guo_shen_",
+        "width": "100"
+    }],
+    "list2": [{
+        "name": "条款号",
+        "value": "tiao_kuan_hao_",
+        "width": "100"
+    },{
+        "name": "条款名称",
+        "value": "tiao_kuan_ming_ch",
+        "width": "150"
+    },{
+        "name": "实施状态",
+        "value": "shi_fou_guo_shen_",
+        "width": "100"
+    },{
+        "name": "实施部门",
+        "value": "yuanZuZhangBuMen", 
+        "valueV": "zuZhangBnMen",
+        "width": "100"
+    },{
+        "name": "实施组长",
+        "value": "yuanZuZhangName", 
+        "valueV": "zuZhangName",
+        "width": "100"
+    }],
+    "list3": [{
+        "name": "条款号",
+        "value": "tiao_kuan_hao_",
+        "width": "100"
+    },{
+        "name": "条款名称",
+        "value": "tiao_kuan_ming_ch",
+        "width": "150"
+    },{
+        "name": "实施状态",
+        "value": "shi_fou_guo_shen_",
+        "width": "100"
+    },{
+        "name": "核查部门",
+        "value": "zuYuanPosiName",
+        "width": "100"
+    },{
+        "name": "核查人",
+        "value": "zuYuanName",
+        "width": "100"
+    },{
+        "name": "核查结果",
+        "value": "he_cha_jie_guo_",
+        "width": "100"
+    },{
+        "name": "核查情况说明",
+        "value": "he_cha_qing_kuang",
+        "width": ""
+    }],
+    "list4": [{
+        "name": "条款号",
+        "value": "tiao_kuan_hao_",
+        "width": "100"
+    },{
+        "name": "条款名称",
+        "value": "tiao_kuan_ming_ch",
+        "width": "150"
+    },{
+        "name": "实施状态",
+        "value": "shi_fou_guo_shen_",
+        "width": "100"
+    },{
+        "name": "核查部门",
+        "value": "zuYuanPosiName",
+        "width": "100"
+    },{
+        "name": "核查人",
+        "value": "zuYuanName",
+        "width": "100"
+    },{
+        "name": "核查结果",
+        "value": "he_cha_jie_guo_",
+        "width": "100"
+    },{
+        "name": "核查情况说明",
+        "value": "he_cha_qing_kuang",
+        "width": ""
+    },{
+        "name": "审核结果",
+        "value": "shen_he_jie_guo_",
+        "width": "100"
+    },{
+        "name": "审核备注",
+        "value": "shen_he_yi_jian_",
+        "width": ""
+    }],
+    "list7": [{
+        "name": "核查部门",
+        "value": "zuYuanPosiName",
+        "width": "100"
+    },{
+        "name": "核查人",
+        "value": "zuYuanName",
+        "width": "100"
+    },{
+        "name": "条款号",
+        "value": "tiao_kuan_hao_",
+        "width": "100"
+    },{
+        "name": "条款名称",
+        "value": "tiao_kuan_ming_ch",
+        "width": "150"
+    },{
+        "name": "核查结果",
+        "value": "he_cha_jie_guo_",
+        "width": "100"
+    },{
+        "name": "核查情况说明",
+        "value": "he_cha_qing_kuang",
+        "width": ""
+    },{
+        "name": "审核结果",
+        "value": "shen_he_jie_guo_",
+        "width": "100"
+    },{
+        "name": "审核备注",
+        "value": "shen_he_yi_jian_",
+        "width": ""
+    }]
+}

+ 280 - 0
src/views/system/jbdScan/approve/compnent/appComOne.vue

@@ -0,0 +1,280 @@
+<template>
+    <div>
+        <div v-if="activeIndex !== 5 && type && activeIndex+1 === clickIndex" class="ma15">
+            <el-row :gutter="20">
+                <el-col :span="12">
+                    <el-input
+                        v-model="search"
+                        placeholder="输入关键字搜索(条款名称/条款号/实施状态)"
+                        clearable
+                    />
+                </el-col>
+                <el-col :span="12">
+                    <div class="tableTab">
+                        <el-button type="info" @click="selectClike()">全部催办</el-button>
+                        <el-button type="info" @click="xuanClike()">选择催办</el-button>
+                    </div>
+
+                </el-col>
+            </el-row>
+
+        </div>
+        <el-table :data="tableData.filter(data => !search || data.tiao_kuan_ming_ch.toLowerCase().includes(search.toLowerCase()) || data.tiao_kuan_hao_.toLowerCase().includes(search.toLowerCase()) || data.shi_fou_guo_shen_.toLowerCase().includes(search.toLowerCase()))" :border="true" style="with: 100%" @selection-change="handleSelectionChange">
+            <el-table-column
+                v-if="type && activeIndex !== 4"
+                type="selection"
+                width="55"
+            />
+            <el-table-column
+                label="序号"
+                type="index"
+                width="50"
+                align="center"
+            />
+            <el-table-column v-for="(item,index) in jiHuaList" :key="index" :prop="item.value" :label="item.name" :width="item.width" align="center">
+                <template slot-scope="scope">
+                    <div v-if="item.value == 'yuanZuZhangName'">
+                        {{ scope.row['zuZhangName'] || scope.row['yuanZuZhangName'] }}
+                    </div>
+                    <div v-else-if="item.value == 'zuYuanPosiName'">
+                        {{ scope.row['zuYuanPosiName'] || scope.row['yuanZuZhangBuMen'] }}
+                    </div>
+                    <div v-else>{{ scope.row[item.value] }}</div>
+                </template>
+            </el-table-column>
+        </el-table>
+    </div>
+</template>
+<script>
+import approveJS from '../approveJS'
+import approveJSON from '../approveJSON.json'
+export default {
+    mixins: [approveJS],
+    props: {
+        tableData: {
+            type: Array,
+            default: () => {
+                return []
+            }
+        },
+        activeIndex: {
+            type: Number,
+            default: 1
+        },
+        clickIndex: {
+            type: Number,
+            default: 2
+        },
+        type: {
+            type: Boolean,
+            default: true
+        },
+        generalList: {
+            type: Array,
+            default: () => {
+                return []
+            }
+        }
+    },
+    data () {
+        return {
+            jiHuaList: approveJSON.list2,
+            selection: [],
+            selectShow: true,
+            selectData: [],
+            search: ''
+        }
+    },
+    computed: {
+        getShow () {
+            return this.type && this.activeIndex !== 4 && this.clickIndex !== 1
+        }
+    },
+    watch: {
+        clickIndex: {
+            handler (newVal, oldVal) {
+                this.switchWatch(this.clickIndex)
+            },
+            deep: true,
+            immediate: true
+        }
+    },
+    methods: {
+        switchWatch (index) {
+            switch (index) {
+                case 1:
+                    this.jiHuaList = approveJSON.list1
+                    break
+                case 2:
+                    this.jiHuaList = approveJSON.list2
+                    break
+                case 3:
+                    this.jiHuaList = approveJSON.list3
+                    break
+                case 4:
+                case 5:
+                case 6:
+                    this.jiHuaList = approveJSON.list4
+                    break
+                case 7:
+                    this.jiHuaList = approveJSON.list7
+                    break
+            }
+        },
+        handleSelectionChange (selection) {
+            console.log(selection)
+            this.selection = selection
+        },
+        selectClike () {
+            const statusMap = {
+                1: '待核查/待审核/待确认/已结束',
+                2: '待审核/待确认/已结束',
+                3: '待确认/已结束',
+                4: '已结束'
+            }
+            this.selectData = this.tableData.filter(item =>
+                statusMap[this.activeIndex].indexOf(item.shi_fou_guo_shen_) === -1 && (!this.search || item.tiao_kuan_ming_ch.indexOf(this.search) !== -1 || item.tiao_kuan_hao_.indexOf(this.search) !== -1 || item.shi_fou_guo_shen_.indexOf(this.search) !== -1)
+            )
+            if (this.selectData.length === 0) {
+                return this.$message.error(`过滤实施状态:${statusMap[this.activeIndex]},所以暂无数据需要消息`)
+            }
+            this.$message.warning(`过滤实施状态:${statusMap[this.activeIndex]},发送消息`)
+            this.cuiBanClike(this.selectData)
+        },
+        xuanClike () {
+            this.cuiBanClike(this.selection)
+        },
+        cuiBanClike (selectionList) {
+            if (selectionList.length === 0 && this.activeIndex !== '4') {
+                this.$message.warning('请选择数据')
+            }
+            // console.log(this.selection)
+            const selectMessList = []
+            let selection = []
+            const list = []
+            switch (this.activeIndex) {
+                case 1:
+                    selection = selectionList.filter(item =>
+                        item.shi_fou_guo_shen_ === '待分配'
+                    )
+                    if (selectionList.length !== selection.length) {
+                        return this.$message.warning(`请选择实施状态为待分配的数据`)
+                    }
+                    if (selection.length > 0) {
+                        selection.forEach(item => {
+                            const conont = `,条款号:${item.tiao_kuan_hao_},条款名称:${item.tiao_kuan_ming_ch}`
+                            selectMessList.push(this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, '认可准则条款核查核查实施计划', '认可准则条款核查核查实施计划已编制', conont))
+                        })
+                    }
+                    break
+                case 2:
+                    selection = selectionList.filter(item =>
+                        item.shi_fou_guo_shen_ === '待分配' || item.shi_fou_guo_shen_ === '待核查'
+                    )
+                    if (selectionList.length !== selection.length) {
+                        return this.$message.warning(`请选择实施状态为待分配或者待核查的数据`)
+                    }
+                    if (selection.length > 0) {
+                        selection.forEach(item => {
+                            const conont = `,条款号:${item.tiao_kuan_hao_},条款名称:${item.tiao_kuan_ming_ch}`
+                            let title = ''
+                            let content = ''
+                            if (item.shi_fou_guo_shen_ === '待分配') {
+                                title = '认可准则条款核查核查实施计划'
+                                content = '认可准则条款核查核查实施计划已编制'
+                            }
+                            if (item.shi_fou_guo_shen_ === '待核查') {
+                                title = '认可准则条款核查'
+                                content = '认可准则条款核查核查实施计划编制'
+                            }
+                            selectMessList.push(this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, title, content, conont))
+                        })
+                    }
+                    break
+                case 3:
+                    selection = selectionList.filter(item =>
+                        item.shi_fou_guo_shen_ === '待分配' || item.shi_fou_guo_shen_ === '待核查' || item.shi_fou_guo_shen_ === '待审核'
+                    )
+                    if (selectionList.length !== selection.length) {
+                        return this.$message.warning(`请选择实施状态为待分配、待核查、的数据、待审核`)
+                    }
+                    if (selection.length > 0) {
+                        selection.forEach(item => {
+                            if (item.shi_fou_guo_shen_ === '待分配' || item.shi_fou_guo_shen_ === '待核查') {
+                                const conont = `,条款号:${item.tiao_kuan_hao_},条款名称:${item.tiao_kuan_ming_ch}`
+                                let title = ''
+                                let content = ''
+                                if (item.shi_fou_guo_shen_ === '待分配') {
+                                    title = '认可准则条款核查核查实施计划'
+                                    content = '认可准则条款核查核查实施计划已编制'
+                                }
+                                if (item.shi_fou_guo_shen_ === '待核查') {
+                                    title = '认可准则条款核查'
+                                    content = '认可准则条款核查核查实施计划编制'
+                                }
+                                selectMessList.push(this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, title, content, conont))
+                            } else {
+                                list.push(item)
+                            }
+                        })
+                        this.getDataSet(list).then(res => {
+                            res.forEach(item => {
+                                selectMessList.push(this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, '认可准则条款核查审核', '认可准则条款核查已完成,请尽快审核'))
+                            })
+                        })
+                    }
+                    break
+                case 4:
+                    selection = selectionList.filter(item =>
+                        item.shi_fou_guo_shen_ !== '已结束'
+                    )
+                    if (selection.length > 0) {
+                        selectMessList.push(this.setXiaoXin(this.generalList[0].bian_zhi_ren_, this.generalList[0].bian_hao_, '认可准则条款核查确认', '认可准则条款核查审核已完成'))
+                    }
+                    break
+            }
+            if (selectMessList.length > 0) {
+                Promise.all(selectMessList).then(res => {
+                    this.$message.success(`一共发送${selectMessList.length}条消息,消息发送完毕`)
+                })
+            }
+        },
+        setXiaoXin (name, ji_hua_bian_hao_, title, content, conont = '') {
+            return new Promise((resolve, reject) => {
+                const xiaoxi = {
+                    subject: title, // 主题,不可更改,在消息通知列表有根据这个文本做校验逻辑
+                    receiverId: name, // 接收人id
+                    receiver: '', // 接收人id
+                    // groupId: i.tongzhiBM,// 接收人id
+                    groupName: '', // 接收人id
+                    fileMsg: '', // 附件
+                    content: `${content},请尽快确认,计划编号:${ji_hua_bian_hao_}${conont}` // 正文
+                }
+                this.$common.sendMsg(xiaoxi).then(res => {
+                    resolve(res)
+                    // this.$message.warning(`${content},还没有确认的人员请及时通知${conont}`)
+                })
+            })
+        },
+        getDataSet (data) {
+            return new Promise((resolve, reject) => {
+                const qc = data.filter((item, index, self) => {
+                    return index === self.findIndex((t) => (
+                        t.zu_chang_ === item.zu_chang_
+                    ))
+                })
+                resolve(qc)
+            })
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+.tableTab{
+    display: flex;
+    justify-content: flex-end
+}
+.ma15{
+    margin-bottom: 10px;
+}
+</style>

+ 50 - 0
src/views/system/jbdScan/generalModules.vue

@@ -0,0 +1,50 @@
+<template>
+    <div>
+        <component :is="currentType" :show.sync="show" :general-list="generalList" @generalClose="generalClose" />
+    </div>
+</template>
+
+<script>
+/* 共同调用类, 与脚本统一调用。*/
+import satisfaction from './satisfaction/satisfaction.vue'
+import approve from './approve/approve.vue'
+import orderOpen from './goods/orderOpen.vue'
+import planImplementation from './planImplementation/planImplementation.vue'
+
+export default {
+    components: {
+        satisfaction,
+        approve,
+        orderOpen,
+        planImplementation
+    },
+    props: {
+        currentType: {
+            type: String,
+            default: 'satisfaction'
+        },
+        generalShow: {
+            type: Boolean,
+            default: false
+        },
+        generalList: {
+            type: Array,
+            default: () => {
+                return []
+            }
+        }
+    },
+    data () {
+        return {
+            show: this.generalShow
+
+        }
+    },
+    methods: {
+        generalClose (val) {
+            this.show = val
+            this.$emit('generalClose', val)
+        }
+    }
+}
+</script>

+ 162 - 0
src/views/system/jbdScan/planImplementation/planImplementation.vue

@@ -0,0 +1,162 @@
+<template>
+    <div>
+        <el-dialog
+            :title="generalData.title || '计划进度'"
+            :visible.sync="generalShow"
+            width="80%"
+            top="5vh"
+            append-to-body
+            :center="generalData.titleCenter || false"
+            custom-class="customClass"
+            @close="close"
+        >
+            <div class="stopCenter">
+                <div v-if="generalData.alertShow" class="tableTop">
+                    <el-alert
+                        :title="generalData.alert.title || ''"
+                        type="success"
+                        :description="generalData.alert.description || ''"
+                        :closable="false"
+                    />
+                </div>
+
+                <el-row>
+                    <el-col :span="5">
+                        <div :style="{ height: height + 'px'}">
+                            <div ref="chart1" class="chart" />
+                            <div class="leftContent">
+                                {{ generalData.leftData.leftContent || '' }}
+                            </div>
+                        </div>
+
+                    </el-col>
+                    <el-col :span="19">
+                        <div id="chart2" ref="chart2" class="chart2" :style="{ height: height + 'px'}" />
+                    </el-col>
+                </el-row>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import planImplementationJS from './planImplementationJS'
+export default {
+    mixins: [planImplementationJS],
+    props: {
+        show: {
+            type: Boolean,
+            default: false
+        },
+        generalList: {
+            type: Array,
+            default: () => {
+                return []
+            }
+        }
+    },
+    data () {
+        return {
+            generalShow: this.show,
+            id: '',
+            generalData: {
+                title: '', // 弹出框标题
+                titleCentr: false, // 弹出框标题是否区中
+                alertShow: false, // 提示是否显示
+                alert: {
+                    title: '', // 提示标题
+                    description: '' // 提示内容
+                },
+                leftData: {
+                    leftTotal: 0, // 左图数量
+                    title: '', // 左图标题,默认"完成率"
+                    leftContent: ''
+                },
+                rightCustomShow: false, // 右图自定义
+                rightData: {
+                    direction: 'x',
+                    title: '人数', // 右图标题
+                    xAxisName: '', // 右图x轴标题
+                    yAxisName: '', // 右图y轴标题
+                    yAxisData: ['金源信通'], // 右图y轴项
+                    series: [{
+                        name: '总数', // 右图x轴项
+                        data: [''], // 右图x轴数量
+                        label: {
+                            show: true,
+                            position: 'right',
+                            textStyle: { // 数值样式
+                                color: 'black',
+                                fontSize: 12
+                            },
+                            formatter: (params) => {
+                                // 这个回调函数不起作用了
+                                return params.value === '0' ? '' : params.value
+                            }
+
+                        }
+                    }],
+                    color: ['rgb(55, 162, 218)', 'rgb(103, 224, 227)', 'rgb(253, 102, 109)'], // 颜色
+                    tooltip: { // 右图弹出框
+                        show: true,
+                        trigger: 'axis'
+                    }
+                }
+            },
+            height: 300
+        }
+    },
+    watch: {
+        show: {
+            handler () {
+                // this.generalShow = this.show
+            },
+            deep: true,
+            immediate: true
+        }
+    },
+    created () {
+        this.generalData = this.generalList[0]
+        const height = this.generalData.rightData.yAxisData.length * 100
+        this.height = this.generalData.rightData.direction === 'x' ? 400 : height > 300 ? height : 300
+
+        setTimeout(() => {
+            this.getOption(this.generalData.leftData)
+            this.barDataPlan(this.generalData.rightData, this.generalData.rightCustomShow, this.generalData.rightData.direction)
+        }, 100)
+    },
+    methods: {
+        close () {
+            this.$emit('generalClose', false)
+        }
+    }
+}
+</script>
+
+<style  scoped>
+.stopCenter{
+    min-height: 350px;
+    max-height: 800px;
+    margin: 20px 30px 20px 30px;
+}
+
+.tableTop{
+    margin: 0 0 10px 0;
+}
+
+.chart{
+    width: 100%;
+    height: 250px;
+}
+
+.chart2{
+    width: 100%;
+    min-height: 300px;
+}
+.leftContent{
+    font-size: 20px;
+    line-height: 30px;
+    padding: 10px;
+    text-align: center;
+}
+</style>

+ 157 - 0
src/views/system/jbdScan/planImplementation/planImplementationJS.js

@@ -0,0 +1,157 @@
+import * as echarts from 'echarts'
+export default {
+    data () {
+        return {
+            barLable: {
+                show: true,
+                position: 'right',
+                textStyle: { // 数值样式
+                    color: 'black',
+                    fontSize: 12
+                },
+                formatter: (params) => {
+                    // 这个回调函数不起作用了
+                    return params.value === '0' ? '' : params.value
+                }
+
+            },
+            tooltip: {
+                show: true,
+                trigger: 'axis'
+                // axisPointer: {
+                //     type: 'none'
+                // }
+            }
+        }
+    },
+    methods: {
+        getOption (leftData) {
+            const option = {
+                series: [
+                    {
+                        type: 'gauge',
+                        min: 0,
+                        max: 100,
+                        animationDuration: 3000,
+                        center: ['50%', '65%'],
+                        axisLine: {
+                            lineStyle: {
+                                width: 30,
+                                color: [
+                                    [0.3, '#fd666d'],
+                                    [0.7, '#37a2da'],
+                                    [1, '#67e0e3']
+                                ]
+                            }
+                        },
+                        pointer: {
+                            itemStyle: {
+                                color: 'auto'
+                            }
+                        },
+                        axisTick: {
+                            distance: -30,
+                            length: 8,
+                            lineStyle: {
+                                color: '#fff',
+                                width: 2
+                            }
+                        },
+                        splitLine: {
+                            distance: -30,
+                            length: 30,
+                            lineStyle: {
+                                color: '#fff',
+                                width: 4
+                            }
+                        },
+                        axisLabel: {
+                            show: true
+                        },
+                        detail: {
+                            valueAnimation: true,
+                            formatter: '{value} %',
+                            color: 'auto',
+                            top: '100%',
+                            offsetCenter: [0, '65%']
+                        },
+                        title: {
+                            offsetCenter: [0, '-120%'],
+                            fontWeight: 'bold',
+                            fontSize: 20
+                        },
+                        data: [{ value: leftData.leftTotal <= 100 ? leftData.leftTotal : 100, name: leftData.title || '', top: '100%' }]
+                    }
+                ]
+            }
+            const accept = echarts.init(this.$refs.chart1)
+            accept.setOption(JSON.parse(JSON.stringify(option)))
+            // this.show1 = true
+        },
+        barDataPlan (data, rightShow, direction) {
+            let barDataTy = null
+            if (!rightShow) {
+                data.series.forEach(item => {
+                    item.label = item.label || this.barLable
+                    item.type = 'bar'
+                    item.barGap = 0
+                    item.emphasis = {
+                        focus: 'series'
+                    }
+                })
+                const xAxis = {
+                    type: 'value',
+                    name: data.xAxisName || '数量(个)',
+                    minInterval: 1,
+                    axisTick: {
+                        alignWithLabel: true
+                    }
+                }
+                const yAxis = {
+                    type: 'category',
+                    name: data.yAxisName || '部门',
+                    nameTextStyle: {
+                        fontSize: 14
+                    },
+                    splitLine: {
+                        show: false
+                    },
+                    data: data.yAxisData
+                }
+                barDataTy = {
+                    // 图例设置
+                    legend: {
+                        textStyle: {
+                            fontSize: 12,
+                            color: '#333'
+                        }
+                    },
+                    title: {
+                        show: true,
+                        text: data.title,
+                        textStyle: {
+                            // color: '#fff',
+                            fontSize: 20,
+                            fontWeight: '600'
+                        },
+                        textAlign: 'center',
+                        left: '50%',
+                        top: '20px'
+                    },
+                    xAxis: direction === 'x' ? yAxis : xAxis,
+                    yAxis: direction === 'x' ? xAxis : yAxis,
+                    series: data.series,
+                    color: data.color,
+                    tooltip: data.tooltip || this.tooltip
+                }
+            } else {
+                barDataTy = data
+            }
+
+            const accept = echarts.init(this.$refs.chart2)
+            accept.setOption(JSON.parse(JSON.stringify(barDataTy)))
+        }
+    }
+
+}
+

+ 137 - 0
src/views/system/jbdScan/satisfaction/satisfaction.vue

@@ -0,0 +1,137 @@
+<template>
+    <div>
+        <el-dialog
+            :title="`满意度统计(时间范围:${generalList[0].kai_shi_shi_jian_} - ${generalList[0].jie_shu_shi_jian_})`"
+            :visible.sync="generalShow"
+            width="80%"
+            top="0"
+            append-to-body
+            custom-class="customClass"
+            @close="close"
+        >
+            <div>
+                <div class="topBorder">
+                    <div ref="Echart" class="chart" />
+                </div>
+                <div class="centerBorder">
+                    <div class="cenSin" style="border-right: 1px solid #ccc">
+                        <div v-if="show1" ref="Echart1" class="chart" />
+                        <div v-else class="chart">
+                            <div class="chartName" style="color: #00c16e">住院患者</div>
+                            <div class="chartA">
+                                暂无数据
+                            </div>
+                        </div>
+
+                    </div>
+                    <div class="cenSin">
+                        <div v-if="show2" ref="Echart2" class="chart" />
+                        <div v-else class="chart">
+                            <div class="chartName" style="color: #d20962">门诊患者</div>
+                            <div class="chartA">
+                                暂无数据
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="centerBorder">
+                    <div class="cenSin" style="border-right: 1px solid #ccc">
+                        <div v-if="show3" ref="Echart3" class="chart" />
+                        <div v-else class="chart">
+                            <div class="chartName" style="color: #0cb9c1">医务人员</div>
+                            <div class="chartA">
+                                暂无数据
+                            </div>
+                        </div>
+                    </div>
+                    <div class="cenSin">
+                        <div v-if="show4" ref="Echart4" class="chart" />
+                        <div v-else class="chart">
+                            <div class="chartName" style="color: #7552cc">员工</div>
+                            <div class="chartA">
+                                暂无数据
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import satisfactionJS from './satisfactionJS'
+export default {
+    mixins: [satisfactionJS],
+    props: {
+        show: {
+            type: Boolean,
+            default: false
+        },
+        generalList: {
+            type: Array,
+            default: () => {
+                return []
+            }
+        }
+    },
+    data () {
+        return {
+            generalShow: this.show,
+            id: ''
+        }
+    },
+    watch: {
+        show: {
+            handler () {
+                // this.generalShow = this.show
+            },
+            deep: true,
+            immediate: true
+        }
+    },
+    methods: {
+        close () {
+            this.$emit('generalClose', false)
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+/deep/ .customClass .el-dialog__header{
+    border-bottom: none;
+}
+/deep/ .customClass .el-dialog__footer{
+    border-top: none;
+}
+
+.topBorder{
+    // border-bottom: 1px solid #ccc;
+}
+.chart{
+    width: 100%;
+    height: 300px;
+}
+.centerBorder{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    border-top: 1px solid #ccc;
+    .cenSin{
+        width: 48%;
+    }
+}
+.chartA{
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.chartName{
+    text-align: center;
+    font-size: 20px;
+    padding: 15px 0;
+    font-weight: bold;
+}
+</style>

+ 209 - 0
src/views/system/jbdScan/satisfaction/satisfactionJS.js

@@ -0,0 +1,209 @@
+import { datasetTypeOptions } from '@/business/platform/data/constants/index'
+import * as echarts from 'echarts'
+const radius = window.innerWidth > 1600 ? '55%' : '45%'
+export default {
+    data () {
+        return {
+            show1: true,
+            show2: true,
+            show3: true,
+            show4: true
+        }
+    },
+    created () {
+        this.id = this.generalList[0].id_
+        this.getManYiDuZiBiao(this.id)
+    },
+    methods: {
+        getManYIDuPeiZhi () {
+            const second = this.$store.getters.level.second
+            return new Promise((resolve, reject) => {
+                const sql = `select * from t_myddcpzb where di_dian_ = '${second}' order by create_time_ desc LIMIT 1`
+                this.$common.request('sql', sql).then(res => {
+                    const { data = [] } = res.variables || {}
+                    if (data.length > 0) {
+                        const list = []
+                        list.push('1.' + data[0].pei_zhi_1_)
+                        list.push('2.' + data[0].pei_zhi_2_)
+                        list.push('3.' + data[0].pei_zhi_3_)
+                        list.push('4.' + data[0].pei_zhi_4_)
+                        list.push('5.' + data[0].pei_zhi_5_)
+                        resolve(list)
+                    } else {
+                        const list = ['1.服务态度', '2.检验服务能力', '3.检验报告及时性', '4.检验结果准确率', '5.工作规范性']
+                        resolve(list)
+                    }
+                })
+            })
+        },
+        getManYiDuZiBiao (id) {
+            this.getManYIDuPeiZhi().then(resData => {
+                const legendData = []
+                resData.forEach(item => {
+                    const obj = {
+                        name: item
+                    }
+                    legendData.push(obj)
+                })
+                const sql = `select * from t_yhmyddctjzb where parent_id_ = '${id}' order by xu_hao_`
+                this.$common.request('sql', sql).then((res) => {
+                    const { data = [] } = res.variables || {}
+                    if (data.length > 0) {
+                        const list = []
+                        const list1 = []
+                        const list2 = []
+                        const list3 = []
+                        const list4 = []
+                        const titleData = {
+                            title: '总计',
+                            color: '#ff6347'
+                        }
+                        const titleData1 = {
+                            title: '住院患者',
+                            color: '#00c16e'
+                        }
+                        const titleData2 = {
+                            title: '门诊患者',
+                            color: '#d20962'
+                        }
+                        const titleData3 = {
+                            title: '医务人员',
+                            color: '#0cb9c1'
+                        }
+                        const titleData4 = {
+                            title: '员工',
+                            color: '#7552cc'
+                        }
+                        data.forEach((item, index) => {
+                            const obj = {
+                                name: resData[index],
+                                value: item.xiao_ji_
+                            }
+                            list.push(obj)
+                            const obj1 = {
+                                name: resData[index],
+                                value: parseInt(item.fen_shu_1_)
+                            }
+                            list1.push(obj1)
+                            const obj2 = {
+                                name: resData[index],
+                                value: parseInt(item.fen_shu_2_)
+                            }
+                            list2.push(obj2)
+
+                            const obj3 = {
+                                name: resData[index],
+                                value: parseInt(item.fen_shu_3_)
+                            }
+                            list3.push(obj3)
+
+                            const obj4 = {
+                                name: resData[index],
+                                value: parseInt(item.fen_shu_4_)
+                            }
+                            list4.push(obj4)
+                        })
+
+                        const accept = echarts.init(this.$refs.Echart)
+                        accept.setOption(JSON.parse(JSON.stringify(this.barData(legendData, list, titleData))))
+
+                        this.show1 = list1.some(item => item.value !== 0)
+                        if (this.show1) {
+                            const accept1 = echarts.init(this.$refs.Echart1)
+                            accept1.setOption(JSON.parse(JSON.stringify(this.barData(legendData, list1, titleData1))))
+                        }
+
+                        this.show2 = list2.some(item => item.value !== 0)
+                        if (this.show2) {
+                            const accept2 = echarts.init(this.$refs.Echart2)
+                            accept2.setOption(JSON.parse(JSON.stringify(this.barData(legendData, list2, titleData2))))
+                        }
+
+                        this.show3 = list3.some(item => item.value !== 0)
+                        if (this.show3) {
+                            const accept3 = echarts.init(this.$refs.Echart3)
+                            accept3.setOption(JSON.parse(JSON.stringify(this.barData(legendData, list3, titleData3))))
+                        }
+
+                        this.show4 = list4.some(item => item.value !== 0)
+                        if (this.show4) {
+                            const accept4 = echarts.init(this.$refs.Echart4)
+                            accept4.setOption(JSON.parse(JSON.stringify(this.barData(legendData, list4, titleData4))))
+                        }
+                    } else {
+                        this.close()
+                        this.$message.error('统计的数据已经被清除,请检查数据是否被清除')
+                    }
+                })
+            })
+        },
+        barData (legendData, seriesData, titleData) {
+            const barData = {
+                title: {
+                    show: true,
+                    text: titleData.title,
+                    textStyle: {
+                        color: titleData.color,
+                        fontSize: 20,
+                        fontWeight: '600'
+                    },
+                    textAlign: 'center',
+                    left: '50%',
+                    top: '10px'
+                },
+                legend: {
+                    orient: 'horizontal',
+                    show: true,
+                    left: 'center',
+                    bottom: 10,
+                    z: 3,
+                    // itemWidth: 25,
+                    // itemHeight: 14,
+                    // itemGap: 10,
+                    data: legendData
+                },
+                series: [
+                    {
+                        name: '任务完成情况',
+                        stillShowZeroSum: false,
+                        type: 'pie',
+                        radius,
+                        center: ['50%', '50%'],
+                        data: seriesData,
+                        itemStyle: {
+                            emphasis: {
+                                shadowBlur: 10,
+                                shadowOffsetX: 0,
+                                shadowColor: 'rgba(0, 0, 0, 0.5)'
+                            },
+                            normal: {
+                                label: {
+                                    show: true,
+                                    position: 'outer',
+                                    // formatter: `占比:{d}%\n\n\r{b}:{c}`,
+                                    formatter: `{b}(分数):{c}\n占比:{d}%`,
+                                    fontSize: 14
+                                },
+                                labelLine: {
+                                    show: true
+                                }
+                            }
+                        },
+                        startAngle: 10
+                    }
+                ],
+                color: ['#f85a40',
+                    '#00c16e',
+                    '#d20962',
+                    '#0cb9c1',
+                    '#7552cc'],
+                tooltip: {
+                    show: true,
+                    trigger: 'item',
+                    formatter: '评价内容<br/>{b}:{c}<br/>占比:{d}%'
+                }
+            }
+            return barData
+        }
+    }
+}