Prechádzať zdrojové kódy

Merge branch 'dev-online-excel-new' into dev-online-excel-market

# Conflicts:
#	src/pages/main/onlineExcel/index.vue
fan 2 rokov pred
rodič
commit
073420d901

+ 170 - 59
public/static/views/onlineShareExcel.html

@@ -73,7 +73,14 @@
         </form>
         </form>
     </div>
     </div>
     <div style="float: right;padding-right: 10px" id="shareBtn">
     <div style="float: right;padding-right: 10px" id="shareBtn">
-        <button id="share" class="btn btn-primary" style="padding:3px 6px;font-size: 18px;margin-right: 10px;width: 100px">分享</button>
+        <button id="share" class="btn btn-primary"
+                style="padding:3px 6px;font-size: 18px;margin-right: 10px;width: 100px">分享
+        </button>
+    </div>
+    <div style="float: right;padding-right: 10px" id="newShareBtn">
+        <button id="newShare" class="btn btn-primary"
+                style="padding:3px 6px;font-size: 18px;margin-right: 10px;width: 100px">分享
+        </button>
     </div>
     </div>
 </div>
 </div>
 <div style="height:90%;width: 100%;">
 <div style="height:90%;width: 100%;">
@@ -117,6 +124,7 @@
     var toolBar = '';
     var toolBar = '';
     var type = '';
     var type = '';
     var emptyExcel = false;
     var emptyExcel = false;
+    var fullScreenState = false;
     $(function () {
     $(function () {
         userId = JSON.parse(window.top.sessionStorage.userInfo).loginNo
         userId = JSON.parse(window.top.sessionStorage.userInfo).loginNo
     })
     })
@@ -168,11 +176,11 @@
                     initExcel(res.body.excelJson);
                     initExcel(res.body.excelJson);
                 }
                 }
             });
             });
-            initExcel()
+            //initExcel()
         }
         }
 
 
         // 表格初始化
         // 表格初始化
-        function initExcel(data,name) {
+        function initExcel(data, name) {
             if (type == '1') {
             if (type == '1') {
                 flag = false
                 flag = false
             } else {
             } else {
@@ -182,7 +190,7 @@
                 adminFlag = true;
                 adminFlag = true;
             }
             }
             var fileName = excelInfo.fileName;
             var fileName = excelInfo.fileName;
-            if ($.trim(name)!=''){
+            if ($.trim(name) != '') {
                 fileName = name;
                 fileName = name;
             }
             }
             try {
             try {
@@ -241,7 +249,7 @@
                     allowEdit: flag, // 是否允许前台编辑
                     allowEdit: flag, // 是否允许前台编辑
                     title: fileName, // 文件名称
                     title: fileName, // 文件名称
                     lang: 'zh',
                     lang: 'zh',
-                    enableAddRow: adminFlag,
+                    enableAddRow: true,
                     showstatisticBar: false, // 底部计数
                     showstatisticBar: false, // 底部计数
                     showstatisticBarConfig: {
                     showstatisticBarConfig: {
                         count: false, // 计数栏
                         count: false, // 计数栏
@@ -253,10 +261,10 @@
                         copy: false, // 复制
                         copy: false, // 复制
                         copyAs: false, // 复制为
                         copyAs: false, // 复制为
                         paste: false, // 粘贴
                         paste: false, // 粘贴
-                        insertRow: adminFlag, // 插入行
-                        insertColumn: adminFlag, // 插入列
-                        deleteRow: adminFlag, // 删除选中行
-                        deleteColumn: adminFlag, // 删除选中列
+                        insertRow: true, // 插入行
+                        insertColumn: true, // 插入列
+                        deleteRow: true, // 删除选中行
+                        deleteColumn: true, // 删除选中列
                         deleteCell: false, // 删除单元格
                         deleteCell: false, // 删除单元格
                         hideRow: false, // 隐藏选中行和显示选中行
                         hideRow: false, // 隐藏选中行和显示选中行
                         hideColumn: false, // 隐藏选中列和显示选中列
                         hideColumn: false, // 隐藏选中列和显示选中列
@@ -286,8 +294,7 @@
 
 
                         },
                         },
                         rangePasteBefore: function (range, data) {
                         rangePasteBefore: function (range, data) {
-                            //禁止选区粘贴
-                            return false;
+
                         },
                         },
                     },
                     },
                 })
                 })
@@ -299,18 +306,95 @@
                 $("#editFrom").attr('disabled', true);
                 $("#editFrom").attr('disabled', true);
                 $("#editTo").attr('disabled', true);
                 $("#editTo").attr('disabled', true);
                 $("#shareBtn").hide();
                 $("#shareBtn").hide();
+                $("#newShareBtn").hide();
             } else {
             } else {
                 $("#editStatus").attr('disabled', false);
                 $("#editStatus").attr('disabled', false);
                 $("#editFrom").attr('disabled', false);
                 $("#editFrom").attr('disabled', false);
                 $("#editTo").attr('disabled', false);
                 $("#editTo").attr('disabled', false);
                 $("#shareBtn").show();
                 $("#shareBtn").show();
+                $("#newShareBtn").show();
             }
             }
             if (emptyExcel == true) {
             if (emptyExcel == true) {
                 $("#shareBtn").show();
                 $("#shareBtn").show();
                 $("#saves").hide();
                 $("#saves").hide();
+                $("#newShareBtn").hide();
             } else {
             } else {
                 $("#shareBtn").hide();
                 $("#shareBtn").hide();
                 $("#saves").show();
                 $("#saves").show();
+                if (isAdmin) {
+                    $("#newShareBtn").show();
+                }
+                console.log("执行自动保存定时器")
+                var t1 = window.setInterval(function autoSave() {
+                    console.log("执行自动保存")
+                    var excelId = $(window.parent.document).find("#excelId").attr("value");
+                    var sheetName = luckysheet.getSheet().name;
+                    var excelData = luckysheet.getSheet(sheetName);
+                    var urlsave = '/market/cOnlineExcel/saveExcel';
+                    var editFrom = $("#editFrom").val();
+                    var editTo = $("#editTo").val();
+                    var editStatus = $("#editStatus").val();
+                    var excelName = luckysheet.toJson().title;
+                    if ($.trim(editFrom) == '' && $.trim(editTo) == '') {
+
+                    } else if (/^\d*$/.test(editFrom) && /^\d*$/.test(editTo)) {
+                        if (editFrom == 0) {
+                            window.top.$vm.$message({
+                                message: '自动保存出错:可编辑列开始不能为0',
+                                type: 'info'
+                            })
+                            return;
+                        }
+                        if (editFrom > editTo) {
+                            window.top.$vm.$message({
+                                message: '自动保存出错:可编辑列的起始列不能大于结束列',
+                                type: 'info'
+                            })
+                            return;
+                        }
+                    } else if (/^[a-zA-Z]+$/.test(editFrom) && /^[a-zA-Z]+$/.test(editTo)) {
+
+                    } else {
+                        window.top.$vm.$message({
+                            message: '自动保存出错:可编辑列必须全部为字母或数字',
+                            type: 'info'
+                        });
+                        return;
+                    }
+                    util.ajaxJson(null, ctx + '/market/cOnlineExcel/checkExcelEmpty', {
+                        data: excelData,
+                    }, function (data) {
+                        if (data.result == 1) {
+                            window.top.$vm.$message({
+                                message: data.desc,
+                                type: 'error'
+                            });
+                        } else {
+                            util.ajaxJson(null, ctx + urlsave, {
+                                data: excelData,
+                                id: excelId,
+                                editConStart: editFrom,
+                                editConEnd: editTo,
+                                excelName: excelName,
+                                editStatus: editStatus
+                            }, function (data) {
+                                if (data.result == 1) {
+                                    window.top.$vm.$message({
+                                        message: data.desc,
+                                        type: 'error'
+                                    })
+                                } else {
+                                    // window.top.$vm.$message({
+                                    //     message: '自动保存成功',
+                                    //     type: 'info'
+                                    // });
+                                    //console.log(data);
+                                    //getData()
+                                }
+                            });
+                        }
+                    });
+                }, 15000)
             }
             }
             if (excelInfo.shareStatus == '1') {
             if (excelInfo.shareStatus == '1') {
                 $("#editTo").attr('disabled', true);
                 $("#editTo").attr('disabled', true);
@@ -333,13 +417,73 @@
             }
             }
         }
         }
 
 
+        function processShare(type) {
+            //  当前工作表名
+            var excelId = $(window.parent.document).find("#excelId").attr("value");
+            var sheetName = luckysheet.getSheet().name;
+            var excelData = luckysheet.getSheet(sheetName);
+            var urlsave = '/market/cOnlineExcel/saveExcel';
+            var editFrom = $("#editFrom").val();
+            var editTo = $("#editTo").val();
+            var editStatus = $("#editStatus").val();
+            var excelName = luckysheet.toJson().title;
+            //校验可编辑列
+            if ($.trim(editFrom) == '' && $.trim(editTo) == '') {
+
+            } else if (/^\d*$/.test(editFrom) && /^\d*$/.test(editTo)) {
+                if (editFrom == 0) {
+                    window.top.$vm.$message({
+                        message: '可编辑列开始不能为0',
+                        type: 'info'
+                    })
+                    return;
+                }
+                if (editFrom > editTo) {
+                    window.top.$vm.$message({
+                        message: '可编辑列的起始列不能大于结束列',
+                        type: 'info'
+                    })
+                    return;
+                }
+            } else if (/^[a-zA-Z]+$/.test(editFrom) && /^[a-zA-Z]+$/.test(editTo)) {
+
+            } else {
+                window.top.$vm.$message({
+                    message: '可编辑列必须全部为字母或数字',
+                    type: 'info'
+                })
+                return;
+            }
+            util.ajaxJson("正在加载中", ctx + '/market/cOnlineExcel/checkExcelEmpty', {
+                data: excelData,
+            }, function (data) {
+                if (data.result == 1) {
+                    window.top.$vm.$message({
+                        message: data.desc,
+                        type: 'error'
+                    });
+                } else {
+                    //excelJson, editFrom, editTo, editStatus, excelName, excelId, type
+                    window.parent['shareExcel'](excelData, editFrom, editTo, editStatus, excelName, excelId, type);
+                }
+            });
+        }
+
         // 绑定按钮事件
         // 绑定按钮事件
         function initHandel() {
         function initHandel() {
             $("#closeExcel").on("click", function () {
             $("#closeExcel").on("click", function () {
                 window.parent['backToExcelList']('true');
                 window.parent['backToExcelList']('true');
             })
             })
             $("#fullScreen").on("click", function () {
             $("#fullScreen").on("click", function () {
-                fullScreen();
+                if (fullScreenState) {
+                    fullScreenState = false;
+                    $("#fullScreen").html('全屏显示');
+                } else {
+                    fullScreenState = true;
+                    $("#fullScreen").html('退出全屏');
+                }
+                window.parent['fullScreen']('true');
+                //fullScreen();
             })
             })
             //退出全屏
             //退出全屏
             $("#exitFullScreen").on("click", function () {
             $("#exitFullScreen").on("click", function () {
@@ -347,54 +491,21 @@
             })
             })
             //分享
             //分享
             $('#share').off("click").click(function () {
             $('#share').off("click").click(function () {
-                //  当前工作表名
-                var excelId = $(window.parent.document).find("#excelId").attr("value");
-                var sheetName = luckysheet.getSheet().name;
-                var excelData = luckysheet.getSheet(sheetName);
-                var urlsave = '/market/cOnlineExcel/saveExcel';
-                var editFrom = $("#editFrom").val();
-                var editTo = $("#editTo").val();
-                var editStatus = $("#editStatus").val();
-                var excelName = luckysheet.toJson().title;
-                //校验可编辑列
-                if ($.trim(editFrom) == '' && $.trim(editTo) == '') {
-
-                } else if (/^\d*$/.test(editFrom) && /^\d*$/.test(editTo)) {
-                    if (editFrom == 0) {
-                        window.top.$vm.$message({
-                            message: '可编辑列开始不能为0',
-                            type: 'info'
-                        })
-                        return;
-                    }
-                    if (editFrom > editTo) {
-                        window.top.$vm.$message({
-                            message: '可编辑列的起始列不能大于结束列',
-                            type: 'info'
-                        })
-                        return;
-                    }
-                } else if (/^[a-zA-Z]+$/.test(editFrom) && /^[a-zA-Z]+$/.test(editTo)) {
-
-                } else {
-                    window.top.$vm.$message({
-                        message: '可编辑列必须全部为字母或数字',
-                        type: 'info'
-                    })
-                    return;
+                if (fullScreenState) {
+                    fullScreenState = false;
+                    $("#fullScreen").html('全屏显示');
+                    window.parent['fullScreen']('true');
                 }
                 }
-                util.ajaxJson("正在加载中", ctx + '/market/cOnlineExcel/checkExcelEmpty', {
-                    data: excelData,
-                }, function (data) {
-                    if (data.result == 1) {
-                        window.top.$vm.$message({
-                            message: data.desc,
-                            type: 'error'
-                        });
-                    } else {
-                        window.parent['shareExcel'](excelData, editFrom, editTo, editStatus, excelName,excelId);
-                    }
-                });
+                processShare(1);
+            });
+            //新增分享
+            $('#newShare').off("click").click(function () {
+                if (fullScreenState) {
+                    fullScreenState = false;
+                    $("#fullScreen").html('全屏显示');
+                    window.parent['fullScreen']('true');
+                }
+                processShare(2);
             });
             });
             // 保存
             // 保存
             $('#saves').off("click").click(function () {
             $('#saves').off("click").click(function () {

+ 183 - 165
src/pages/main/onlineExcel/index.vue

@@ -1,24 +1,25 @@
 <template>
 <template>
     <fullscreen :fullscreen.sync="fullscreen" class="container">
     <fullscreen :fullscreen.sync="fullscreen" class="container">
-    <div class="container">
-        <div class="main-box container-box">
-            <input type="hidden" id="excelId"/>
-            <div class="inner-left" style="overflow: hidden">
-                <!--                <div class="button-list">-->
-                <!--                    <el-button type="primary" @click="showExcel = true" plain>excel</el-button>-->
-                <!--                    <el-button type="primary" @click="showExcel = false" plain>不excel</el-button>-->
-                <!--                </div>-->
-                <div style="margin: 10px 0">
-                    <el-input placeholder="请输入内容" v-model="filterText" class="input-with-select" clearable
-                              @change="() => {if (!filterText) {searchMenu();}}">
-                        <el-button slot="append" @click="searchMenu" icon="el-icon-search"></el-button>
-                    </el-input>
-                </div>
-                <div v-loading="loading" style="height: calc(100% - 100px);overflow-y: scroll;overflow-x: scroll">
-                    <el-tree ref="tree" class="tree-line" :expand-on-click-node="false" :auto-expand-parent="true"
-                             :default-expand-all="true" :default-checked-keys="checkedMenu" :data="menuList"
-                             @check="checkChange"
-                             @node-click="nodeClick" :filter-node-method="filterNode" node-key="functionCode" style="width: 300px">
+        <div class="container">
+            <div class="main-box container-box">
+                <input type="hidden" id="excelId"/>
+                <div class="inner-left" style="overflow: hidden">
+                    <!--                <div class="button-list">-->
+                    <!--                    <el-button type="primary" @click="showExcel = true" plain>excel</el-button>-->
+                    <!--                    <el-button type="primary" @click="showExcel = false" plain>不excel</el-button>-->
+                    <!--                </div>-->
+                    <div style="margin: 10px 0">
+                        <el-input placeholder="请输入内容" v-model="filterText" class="input-with-select" clearable
+                                  @change="() => {if (!filterText) {searchMenu();}}">
+                            <el-button slot="append" @click="searchMenu" icon="el-icon-search"></el-button>
+                        </el-input>
+                    </div>
+                    <div v-loading="loading" style="height: calc(100% - 100px);overflow-y: scroll;overflow-x: scroll">
+                        <el-tree ref="tree" class="tree-line" :expand-on-click-node="false" :auto-expand-parent="true"
+                                 :default-expand-all="true" :default-checked-keys="checkedMenu" :data="menuList"
+                                 @check="checkChange"
+                                 @node-click="nodeClick" :filter-node-method="filterNode" node-key="functionCode"
+                                 style="width: 300px">
                         <span class="custom-tree-node" slot-scope="{ node }">
                         <span class="custom-tree-node" slot-scope="{ node }">
                             <span>
                             <span>
                                 <span v-if="node.data.type == 4"
                                 <span v-if="node.data.type == 4"
@@ -30,142 +31,149 @@
                                     }}</span>
                                     }}</span>
                             </span>
                             </span>
                         </span>
                         </span>
-                    </el-tree>
-                </div>
-                <div class="tree-action"></div>
-            </div>
-            <div class="inner-right">
-                <div style="overflow: hidden;" v-if="showExcel == false">
-                    <toolList @iconCli='iconCli' :tooltit='tooltit' style="margin: 10px"></toolList>
-                    <div style="margin-top: 20px;float: left;" class="bigbtns">
-                        <el-button style="margin-left: 20px;" class="btn-check" size="medium" type="primary"
-                                   @click="addNewStatus = true">新建
-                        </el-button>
-                    </div>
-                    <div style="margin-top: 20px;float: right;margin-right: 20px" class="bigbtns"
-                         v-if="selectionSize != 0">
-                        <el-button style="margin-left: 5px;" class="btn-check" size="small" type="primary"
-                                   @click="delExcel()">删除
-                        </el-button>
-                        <el-button style="margin-left: 5px;" class="btn-check" size="small" type="primary"
-                                   @click="cancelSelection()">取消
-                        </el-button>
-                        <el-button style="margin-left: 5px;" class="btn-check" size="small" type="primary"
-                                   @click="moveStatus = true">移动到
-                        </el-button>
+                        </el-tree>
                     </div>
                     </div>
+                    <div class="tree-action"></div>
                 </div>
                 </div>
-                <div class="tabbox" v-if="showExcel == false">
-                    <div id="selectionList" style="height: 30px">
-                        <span v-if="selectionSize != 0">已选{{ selectionSize }}项</span>
+                <div class="inner-right">
+                    <div style="overflow: hidden;" v-if="showExcel == false">
+                        <toolList @iconCli='iconCli' :tooltit='tooltit' style="margin: 10px"></toolList>
+                        <div style="margin-top: 20px;float: left;" class="bigbtns">
+                            <el-button style="margin-left: 20px;" class="btn-check" size="medium" type="primary"
+                                       @click="addNewStatus = true">新建
+                            </el-button>
+                        </div>
+                        <div style="margin-top: 20px;float: right;margin-right: 20px" class="bigbtns"
+                             v-if="selectionSize != 0">
+                            <el-button style="margin-left: 5px;" class="btn-check" size="small" type="primary"
+                                       @click="delExcel()">删除
+                            </el-button>
+                            <el-button style="margin-left: 5px;" class="btn-check" size="small" type="primary"
+                                       @click="cancelSelection()">取消
+                            </el-button>
+                            <el-button style="margin-left: 5px;" class="btn-check" size="small" type="primary"
+                                       @click="moveStatus = true">移动到
+                            </el-button>
+                        </div>
                     </div>
                     </div>
-                    <el-table height="calc(100% - 60px)" class="com-table" ref="multipleTable" :data="tableData"
-                              tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading"
-                              @selection-change="handleSelectionChange">
-                        <el-table-column type="selection" width="45"></el-table-column>
-                        <el-table-column prop="fileName" label="名称">
-                        </el-table-column>
-                        <el-table-column prop="opTime" label="创建时间">
-                        </el-table-column>
-                        <el-table-column prop="addUserDept" label="创建科室">
-                        </el-table-column>
-                        <el-table-column prop="addUserName" label="创建人">
-                        </el-table-column>
-                        <el-table-column prop="shareEditStatus" label="权限状态">
-                            <template slot-scope="scope">
-                                <span v-if="scope.row.editStatus == 0">开</span>
-                                <span v-if="scope.row.editStatus == 1">关</span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="操作" width="180px" align="center" fixed="right">
-                            <template slot-scope="scope">
-                                <el-button size="mini" type="primary" @click="moveToEdit(scope.row)"
-                                           :disabled="scope.row.shareEditStatus==1">编辑
-                                </el-button>
-                            </template>
-                        </el-table-column>
-                    </el-table>
-                    <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
-                                   :total="total">
-                    </el-pagination>
-                </div>
-                <div class="container" id="container" v-else>
-                    <iframe id="excelIframe" height="100%" width="100%" src="/marketfront/static/views/onlineShareExcel.html"
-                            frameborder="0"></iframe>
-                </div>
-            </div>
-        </div>
-        <el-dialog :title="'新建'" :visible.sync="addNewStatus" width="300px" :destroy-on-close="true"
-                   :modal-append-to-body="false" :close-on-click-modal="false">
-            <div>
-<!--                <el-button type="primary" @click="addExcel()" plain class="iconfont icon-wenjian">在线文档</el-button>-->
-<!--                <el-button type="primary" @click="addFolderStatus = true" plain class="iconfont icon-wenjianjia">文件夹</el-button>-->
-                <div style="padding-bottom: 30px">
-                    <div style="width: 85px;display: inline-block;cursor: pointer" @click="addExcel()">
-                        <span class="iconfont icon-wenjian" style="font-size: 80px;color: dodgerblue"></span>
-                        <p style="margin-left: 20px;margin-top: 10px">在线文档</p>
+                    <div class="tabbox" v-if="showExcel == false">
+                        <div id="selectionList" style="height: 30px">
+                            <span v-if="selectionSize != 0">已选{{ selectionSize }}项</span>
+                        </div>
+                        <el-table height="calc(100% - 60px)" class="com-table" ref="multipleTable" :data="tableData"
+                                  tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading"
+                                  @selection-change="handleSelectionChange">
+                            <el-table-column type="selection" width="45"></el-table-column>
+                            <el-table-column prop="fileName" label="名称">
+                            </el-table-column>
+                            <el-table-column prop="opTime" label="创建时间">
+                            </el-table-column>
+                            <el-table-column prop="addUserDept" label="创建科室">
+                            </el-table-column>
+                            <el-table-column prop="addUserName" label="创建人">
+                            </el-table-column>
+                            <el-table-column prop="shareEditStatus" label="权限状态">
+                                <template slot-scope="scope">
+                                    <span v-if="scope.row.editStatus == 0">开</span>
+                                    <span v-if="scope.row.editStatus == 1">关</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="操作" width="180px" align="center" fixed="right">
+                                <template slot-scope="scope">
+                                    <el-button size="mini" type="primary" @click="moveToEdit(scope.row)"
+                                               :disabled="scope.row.shareEditStatus==1">编辑
+                                    </el-button>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                        <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next"
+                                       background
+                                       :total="total">
+                        </el-pagination>
                     </div>
                     </div>
-                    <div style="width: 85px;display: inline-block;margin-left: 70px;cursor: pointer" @click="addFolderStatus = true">
-                        <span class="iconfont icon-wenjianjia" style="font-size: 80px;color: dodgerblue"></span>
-                        <p style="margin-left: 20px;margin-top: 10px">文件夹</p>
+
+                    <div class="container" id="container" v-else>
+                        <fullscreen :fullscreen.sync="excelFullScreen" class="container">
+                            <iframe id="excelIframe" height="100%" width="100%"
+                                    src="/marketfront/static/views/onlineShareExcel.html"
+                                    frameborder="0"></iframe>
+                        </fullscreen>
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
-        </el-dialog>
-        <el-dialog :title="'新增文件夹'" :visible.sync="addFolderStatus" width="50%" :destroy-on-close="true"
-                   :modal-append-to-body="false" :close-on-click-modal="false">
-            <div v-loading="loading">
-                <el-form :model="infolist" ref="infolist">
-                    <div class="online">
-                        <el-form-item prop="name">
-                            <span>文件夹名称</span>
-                            <el-input v-model="infolist.name" placeholder="文件夹名称" :disabled="disableStatus"></el-input>
-                        </el-form-item>
+            <el-dialog :title="'新建'" :visible.sync="addNewStatus" width="300px" :destroy-on-close="true"
+                       :modal-append-to-body="false" :close-on-click-modal="false">
+                <div>
+                    <!--                <el-button type="primary" @click="addExcel()" plain class="iconfont icon-wenjian">在线文档</el-button>-->
+                    <!--                <el-button type="primary" @click="addFolderStatus = true" plain class="iconfont icon-wenjianjia">文件夹</el-button>-->
+                    <div style="padding-bottom: 30px">
+                        <div style="width: 85px;display: inline-block;cursor: pointer" @click="addExcel()">
+                            <span class="iconfont icon-wenjian" style="font-size: 80px;color: dodgerblue"></span>
+                            <p style="margin-left: 20px;margin-top: 10px">在线文档</p>
+                        </div>
+                        <div style="width: 85px;display: inline-block;margin-left: 70px;cursor: pointer"
+                             @click="addFolderStatus = true">
+                            <span class="iconfont icon-wenjianjia" style="font-size: 80px;color: dodgerblue"></span>
+                            <p style="margin-left: 20px;margin-top: 10px">文件夹</p>
+                        </div>
                     </div>
                     </div>
-                </el-form>
-                <div slot="footer" class="dialog-footer myfooter">
-                    <el-button type="primary" @click="addNewFolder()">确 定</el-button>
-                    <el-button @click="addFolderStatus = false">取 消</el-button>
                 </div>
                 </div>
-            </div>
-        </el-dialog>
-        <el-dialog :title="'分享选项'" :visible.sync="shareStatus" width="550px" :destroy-on-close="true"
-                   :modal-append-to-body="false" :close-on-click-modal="false">
-            <div style="margin-left: 30px;padding-bottom: 20px" v-loading = 'shareLoading'>
-                <el-button type="primary" @click="processExcelShare(1)" plain>仅我可编辑</el-button>
-                <el-button type="primary" @click="openOADialog(2)" plain>部门内所有人可编辑</el-button>
-                <el-button type="primary" @click="checkexa = true" plain>指定人可编辑</el-button>
-            </div>
-        </el-dialog>
-        <el-dialog title="选择填报人" :visible.sync="checkexa" width="50%" :destroy-on-close="true"
-                   :modal-append-to-body="false" :close-on-click-modal="false">
-            <div>
-                <el-form :model="exaList" ref="addInfoList">
-                    <el-form-item prop="processUserId" class="info-line online">
-                        <span style="width: 80px;margin-right: 20px">审批人员</span>
-                        <deptTreeUserNew class="tree" @treeCheck="treeCheckonly" :defaultList="defaultList"
-                                         :type="depttype" :closeList="closeList"></deptTreeUserNew>
-                        <div class="tree treeUser">
-                            <p v-for="(item,index) in treeList" :key="index">{{ item.receiveName }}
-                                <i @click="deletes(item,index)" class="el-icon-error"></i>
-                            </p>
+            </el-dialog>
+            <el-dialog :title="'新增文件夹'" :visible.sync="addFolderStatus" width="50%" :destroy-on-close="true"
+                       :modal-append-to-body="false" :close-on-click-modal="false">
+                <div v-loading="loading">
+                    <el-form :model="infolist" ref="infolist">
+                        <div class="online">
+                            <el-form-item prop="name">
+                                <span>文件夹名称</span>
+                                <el-input v-model="infolist.name" placeholder="文件夹名称"
+                                          :disabled="disableStatus"></el-input>
+                            </el-form-item>
                         </div>
                         </div>
-                    </el-form-item>
-                </el-form>
+                    </el-form>
+                    <div slot="footer" class="dialog-footer myfooter">
+                        <el-button type="primary" @click="addNewFolder()">确 定</el-button>
+                        <el-button @click="addFolderStatus = false">取 消</el-button>
+                    </div>
+                </div>
+            </el-dialog>
+            <el-dialog :title="'分享选项'" :visible.sync="shareStatus" width="550px" :destroy-on-close="true"
+                       :modal-append-to-body="false" :close-on-click-modal="false">
+                <div style="margin-left: 30px;padding-bottom: 20px" v-loading='shareLoading'>
+                    <el-button type="primary" @click="processExcelShare(1)" plain>仅我可编辑</el-button>
+                    <el-button type="primary" @click="openOADialog(2)" plain>部门内所有人可编辑</el-button>
+                    <el-button type="primary" @click="checkexa = true" plain>指定人可编辑</el-button>
+                </div>
+            </el-dialog>
+            <el-dialog title="选择填报人" :visible.sync="checkexa" width="50%" :destroy-on-close="true"
+                       :modal-append-to-body="false" :close-on-click-modal="false">
+                <div>
+                    <el-form :model="exaList" ref="addInfoList">
+                        <el-form-item prop="processUserId" class="info-line online">
+                            <span style="width: 80px;margin-right: 20px">审批人员</span>
+                            <deptTreeUserNew class="tree" @treeCheck="treeCheckonly" :defaultList="defaultList"
+                                             :type="depttype" :closeList="closeList"></deptTreeUserNew>
+                            <div class="tree treeUser">
+                                <p v-for="(item,index) in treeList" :key="index">{{ item.receiveName }}
+                                    <i @click="deletes(item,index)" class="el-icon-error"></i>
+                                </p>
+                            </div>
+                        </el-form-item>
+                    </el-form>
 
 
-                <div slot="footer" style="text-align: right;padding-bottom: 20px">
-                    <el-button type="primary" @click="checkProcessUser(3)">确 定</el-button>
-                    <el-button @click="checkexa = false">取 消</el-button>
+                    <div slot="footer" style="text-align: right;padding-bottom: 20px">
+                        <el-button type="primary" @click="checkProcessUser(3)">确 定</el-button>
+                        <el-button @click="checkexa = false">取 消</el-button>
+                    </div>
                 </div>
                 </div>
-            </div>
-        </el-dialog>
-        <el-dialog title="移动到" :visible.sync="moveStatus" width="500px" :destroy-on-close="true"
-                   :modal-append-to-body="false" :close-on-click-modal="false">
-            <div>
-                <el-tree ref="tree" class="tree-line" :expand-on-click-node="false" :auto-expand-parent="true"
-                         :default-expand-all="true" :default-checked-keys="checkedMenu" :data="moveMenuList"
-                         @check="checkChange"
-                         @node-click="folderNodeClick" node-key="functionCode" @expand-on-click-node="false">
+            </el-dialog>
+            <el-dialog title="移动到" :visible.sync="moveStatus" width="500px" :destroy-on-close="true"
+                       :modal-append-to-body="false" :close-on-click-modal="false">
+                <div>
+                    <el-tree ref="tree" class="tree-line" :expand-on-click-node="false" :auto-expand-parent="true"
+                             :default-expand-all="true" :default-checked-keys="checkedMenu" :data="moveMenuList"
+                             @check="checkChange"
+                             @node-click="folderNodeClick" node-key="functionCode" @expand-on-click-node="false">
                         <span class="custom-tree-node" slot-scope="{ node }">
                         <span class="custom-tree-node" slot-scope="{ node }">
                             <span>
                             <span>
                                 <span v-if="node.data.type == 4"
                                 <span v-if="node.data.type == 4"
@@ -177,20 +185,20 @@
                                     }}</span>
                                     }}</span>
                             </span>
                             </span>
                         </span>
                         </span>
-                </el-tree>
-                <div slot="footer" style="text-align: right;padding-bottom: 20px">
-                    <el-button type="primary" @click="addFolderStatus = true" style="margin-right: 150px">+新建文件夹
-                    </el-button>
-                    <el-button type="primary" @click="moveExcel()">确 定</el-button>
-                    <el-button @click="moveStatus = false">取 消</el-button>
+                    </el-tree>
+                    <div slot="footer" style="text-align: right;padding-bottom: 20px">
+                        <el-button type="primary" @click="addFolderStatus = true" style="margin-right: 150px">+新建文件夹
+                        </el-button>
+                        <el-button type="primary" @click="moveExcel()">确 定</el-button>
+                        <el-button @click="moveStatus = false">取 消</el-button>
+                    </div>
                 </div>
                 </div>
-            </div>
-        </el-dialog>
-        <myMessage :messTit='messTit' @closeMessage="processDel" :centerDialogVisible="delVisible"
-                   v-if="delVisible"></myMessage>
-        <myMessageRadio :messTit='oaTitle' @closeMessage="processOa" :centerDialogVisible="oaVisible"
-                        v-if="oaVisible" yesBtnName="是" noBtnName="否" ok-btn-name="提交"></myMessageRadio>
-    </div>
+            </el-dialog>
+            <myMessage :messTit='messTit' @closeMessage="processDel" :centerDialogVisible="delVisible"
+                       v-if="delVisible"></myMessage>
+            <myMessageRadio :messTit='oaTitle' @closeMessage="processOa" :centerDialogVisible="oaVisible"
+                            v-if="oaVisible" yesBtnName="是" noBtnName="否" ok-btn-name="提交"></myMessageRadio>
+        </div>
     </fullscreen>
     </fullscreen>
 </template>
 </template>
 
 
@@ -258,9 +266,11 @@ export default {
             moveStatus: false,
             moveStatus: false,
             //移动文件夹tree相关
             //移动文件夹tree相关
             nowMoveFolder: {},
             nowMoveFolder: {},
-            shareLoading : false,
+            shareLoading: false,
             woNo: '',
             woNo: '',
             moveMenuList: [],
             moveMenuList: [],
+            addShareType: 0,
+            excelFullScreen: false,
         }
         }
     },
     },
     methods: {
     methods: {
@@ -355,7 +365,7 @@ export default {
             if (v == 1) {
             if (v == 1) {
                 this.oaType = 1;
                 this.oaType = 1;
                 this.processExcelShare(this.shareType);
                 this.processExcelShare(this.shareType);
-            } else if (v == 2){
+            } else if (v == 2) {
                 this.oaType = 0;
                 this.oaType = 0;
                 this.processExcelShare(this.shareType);
                 this.processExcelShare(this.shareType);
             }
             }
@@ -384,9 +394,9 @@ export default {
             console.log('oa:' + this.oaType);
             console.log('oa:' + this.oaType);
             console.log('share:' + shareType);
             console.log('share:' + shareType);
             //提交
             //提交
-            var url = '/market/cOnlineExcelMarket/saveExcelShare';
+            var url = '/market/cOnlineExcel/saveExcelShare';
             if (this.addShareType == '2') {
             if (this.addShareType == '2') {
-                url = '/market/cOnlineExcelMarket/reShare';
+                url = '/market/cOnlineExcel/reShare';
             }
             }
             this.$http({
             this.$http({
                 url: url,
                 url: url,
@@ -434,14 +444,15 @@ export default {
             this.treeList = v;
             this.treeList = v;
         },
         },
         //从excel页面调用来打开分享框
         //从excel页面调用来打开分享框
-        shareExcel(excelJson, editFrom, editTo, editStatus, excelName, excelId) {
-            console.log(excelJson, editFrom, editTo, editStatus, excelName, excelId);
+        shareExcel(excelJson, editFrom, editTo, editStatus, excelName, excelId, type) {
+            console.log(excelJson, editFrom, editTo, editStatus, excelName, excelId, type);
             this.excelJson = excelJson;
             this.excelJson = excelJson;
             this.editFrom = editFrom;
             this.editFrom = editFrom;
             this.editTo = editTo;
             this.editTo = editTo;
             this.editStatus = editStatus;
             this.editStatus = editStatus;
             this.excelName = excelName;
             this.excelName = excelName;
             this.excelId = excelId;
             this.excelId = excelId;
+            this.addShareType = type;
             this.shareStatus = true;
             this.shareStatus = true;
         },
         },
         //从excel页面调用来关闭excel
         //从excel页面调用来关闭excel
@@ -724,7 +735,7 @@ export default {
             this.menuList = arr;
             this.menuList = arr;
             //复制一份给移动文件夹用
             //复制一份给移动文件夹用
             this.moveMenuList = [];
             this.moveMenuList = [];
-            arr.map((o) =>{
+            arr.map((o) => {
                 if (o.type == '4') {
                 if (o.type == '4') {
                     this.moveMenuList.push(o);
                     this.moveMenuList.push(o);
                 }
                 }
@@ -741,6 +752,9 @@ export default {
                 ) || null
                 ) || null
             );
             );
         },
         },
+        processFullScreen() {
+            this.excelFullScreen = !this.excelFullScreen;
+        }
     },
     },
     mounted() {
     mounted() {
         this.woNo = this.getUrlKey("id")//获取地址栏参数
         this.woNo = this.getUrlKey("id")//获取地址栏参数
@@ -758,11 +772,15 @@ export default {
         this.getTreeData();
         this.getTreeData();
     },
     },
     created() {
     created() {
+        window['fullScreen'] = (rp) => {
+            this.processFullScreen(rp);
+        }
         window['backToExcelList'] = (rp) => {
         window['backToExcelList'] = (rp) => {
             this.closeExcel(rp);
             this.closeExcel(rp);
         }
         }
-        window['shareExcel'] = (a, b, c, d, e, f) => {
-            this.shareExcel(a, b, c, d, e, f);
+        //方法里写了字母含义
+        window['shareExcel'] = (a, b, c, d, e, f, g) => {
+            this.shareExcel(a, b, c, d, e, f, g);
         }
         }
     },
     },
     name: "index"
     name: "index"