瀏覽代碼

Merge branch '1.0.0_online' of http://192.168.1.12:3000/SmartCost/ConstructionCost into 1.0.0_online

TonyKang 6 年之前
父節點
當前提交
9783df34d0

+ 10 - 5
modules/pm/controllers/pm_controller.js

@@ -514,17 +514,22 @@ module.exports = {
     share: async function(req, res){
         try{
             let data = JSON.parse(req.body.data);
+            let shareDate = moment(Date.now()).format('YYYY-MM-DD HH:mm:ss'),
+                shareUserIDs = [];
+            for (let data of data.shareData) {
+                shareUserIDs.push(data.userID);
+                data.shareDate = shareDate;
+            }
             //添加分享
             if(data.type === 'create'){
-                let shareData = {userID: data.userID, allowCopy: data.allowCopy, shareDate: moment(Date.now()).format('YYYY-MM-DD HH:mm:ss')};
-                //覆盖
-                await projectModel.update({ID: data.projectID, $or: [{deleteInfo: null}, {'deleteInfo.deleted': false}]}, {$pull: {shareInfo: {userID: data.userID}}});
                 //新增
-                await projectModel.update({ID: data.projectID, $or: [{deleteInfo: null}, {'deleteInfo.deleted': false}]}, {$addToSet: {shareInfo: shareData}});
+                for (let sData of data.shareData) {
+                    await projectModel.update({ID: data.projectID, $or: [{deleteInfo: null}, {'deleteInfo.deleted': false}]}, {$addToSet: {shareInfo: sData}});
+                }
             }
             //取消分享
             else {
-                await projectModel.update({ID: data.projectID, $or: [{deleteInfo: null}, {'deleteInfo.deleted': false}]}, {$pull: {shareInfo: {userID: data.userID}}});
+                await projectModel.update({ID: data.projectID, $or: [{deleteInfo: null}, {'deleteInfo.deleted': false}]}, {$pull: {shareInfo: {userID: {$in: shareUserIDs}}}});
             }
             callback(req, res, 0, 'success', null);
         }

+ 4 - 4
web/building_saas/complementary_glj_lib/html/tools-gongliaoji.html

@@ -34,18 +34,18 @@
             <div class="container-fluid">
                 <div class="row" id="dataRow">
                     <div id="leftContent" style="width: 25%;">
-                        <div class="print-list">
-                            <div class="form-list">
+                        <div class="print-list" >
+                            <div class="form-list" style="overflow: hidden">
                                 <div id="gljClassSpread" style="height: 100%; width: 100%;"></div>
                             </div>
                         </div>
                     </div>
-                    <div id="midContent" style="width: 50%">
+                    <div id="midContent" style="width: 50%; overflow: hidden">
                         <div id="leftResize" style="width: 1%; height: 100%; resize:horizontal; cursor: w-resize; float: left; background: #F1F1F1"></div>
                         <div id="GLJListSheet" class="p-0" style="height: 100%; width: 99%; float: left">
                         </div>
                     </div>
-                    <div id="rightContent" style="width: 25%" >
+                    <div id="rightContent" style="width: 25%; overflow:hidden;" >
                         <div id="rightResize" style="width: 1%; height: 100%; resize:horizontal; cursor: w-resize; float: left; background: #F1F1F1"></div>
                         <div id="gljComponentSheet" class="p-0" style="height: 100%; width: 99%; float: left">
                         </div>

+ 12 - 7
web/building_saas/main/js/views/block_lib.js

@@ -13,10 +13,10 @@ var blockLibObj = {
         "headRows":1,
         "headRowHeight":[30],
         "defaultRowHeight": 21,
-        "treeCol": 0,
+        "treeCol": 9,
         "cols":[{
             "width":400,
-            "readOnly": false,
+            "readOnly": true,
             "head":{
                 "titleNames":["名称"],
                 "spanCols":[1],
@@ -291,11 +291,16 @@ var blockLibObj = {
         let pID = (insertType == 1) ? select.getParentID() : select.getID();
         let nID = (insertType == 1) ? select.getNextSiblingID() : -1;
         let newNode = tree.insert(pID, nID);
-        newNode.data.name = '新建';
-        if (!newNode.parent)
-            newNode.data.type = 0
-        else
+
+        if (!newNode.parent){
+            newNode.data.type = 0;
+            newNode.data.name = '我的块模板库';
+        }
+        else{
             newNode.data.type = 1;
+            newNode.data.name = '分类';
+        }
+
         tree.selected = newNode;
 
         let sheet = blockLibObj.mainSheet;
@@ -304,7 +309,7 @@ var blockLibObj = {
 
         let idx = tree.items.indexOf(newNode);
         sheet.addRows(idx, 1);
-        sheet.getRange(idx, 0, 1, 1).locked(false);
+        sheet.getRange(idx, 0, 1, 1).locked(true);
         sheet.setValue(idx, 0, newNode.data.name);
         sheet.setSelection(idx, 0, 1, 1);
 

+ 0 - 42
web/building_saas/pm/html/project-management-share.html

@@ -63,48 +63,6 @@
         </div>
     </div>
 </div>
-<!--弹出分享给交互-->
-<div class="modal fade" id="shareTo" data-backdrop="static">
-    <div class="modal-dialog" role="document">
-        <div class="modal-content" style="width: 750px;">
-            <div class="modal-header">
-                <h5 class="modal-title">分享给...</h5>
-                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-                    <span aria-hidden="true">&times;</span>
-                </button>
-            </div>
-            <div class="modal-body modal-fixed-height">
-           <!--     <p>勾选需要恢复的文件,点“确定”按钮,确认从回收站中恢复。</p>-->
-                <table class="table table-hover table-sm mb-5">
-                    <thead>
-                    <tr style="display: block;">
-                        <th width="106px">姓名</th>
-                        <th width="146px">公司</th>
-                        <th width="146px">手机</th>
-                        <th width="156px">邮箱</th>
-                        <th width="70px">允许拷贝</th>
-                        <th width="70px">取消分享</th>
-                    </tr>
-                    </thead>
-                    <tbody id="shareToInfo" style="display:block; height: 300px; overflow: auto;">
-                    <tr>
-                        <td width="106px;">钟泽伟</td>
-                        <td width="146px;">珠海纵横创新软件有限公司</td>
-                        <td width="146px;">13160675110</td>
-                        <td width="156px;">707820685@qq.com</td>
-                        <td width="70px;" style="text-align: center"><input type="checkbox"></td>
-                        <td width="70px;" style="text-align: center"><input type="checkbox"></td>
-                    </tr>
-                    </tbody>
-                </table>
-            </div>
-            <div class="modal-footer">
-                <a href="javascript:void(0);" class="btn btn-primary" id="shareToConfirm" data-dismiss="modal">确定</a>
-                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
-            </div>
-        </div>
-    </div>
-</div>
 <!--取消分享-->
 <div class="modal fade" id="cancelShare" data-backdrop="static">
     <div class="modal-dialog" role="document">

+ 59 - 8
web/building_saas/pm/html/project-management.html

@@ -41,6 +41,7 @@
 <img src="/web/dest/css/img/engineering.png" id="eng_pic" style="display: none">
 <img src="/web/dest/css/img/tender.png" id="tender_pic" style="display: none">
 <img src="/web/dest/css/img/refresh.png" id="refresh_pic" style="display: none">
+<img src="/web/dest/css/img/share.png" id="share_pic" style="display: none">
 <div class="header">
     <div class="top-msg clearfix">
         <div class="alert alert-warning mb-0 py-0" role="alert" style="display: none;">
@@ -652,16 +653,24 @@
                     <ul class="list-group list-group-flush">
                         <li id="user_mobile" class="list-group-item" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="通行账号手机"><i class="fa fa-tablet"></i> 15812644017</li>
                         <li id="user_email" class="list-group-item" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="通行账号邮箱"><i class="fa fa-envelope-o "></i> 0756-3850891</li>
+                        <li class="list-group-item" data-toggle="tooltip" data-placement="bottom" title="">
+                            <div class="form-group my-1">
+                                <p class="m-0">分享后,该用户仅可查阅工程,不具备任何编辑修改功能。</p>
+                            </div>
+                            <div class="form-check mb-2">
+                                <input type="checkbox" class="form-check-input" id="allowCopy">
+                                <label class="form-check-label" for="allowCopy">允许该用户拷贝该工程</label>
+                                <!--打勾后出现提示-->
+                                <div id="allowCopyHint" class="form-text text-danger"><i class="fa fa-exclamation-triangle"></i> 该用户可以把你的项目拷贝成为他的数据,请谨慎勾选。 </div>
+                            </div>
+                            <a id="addShareUser" class="btn btn-sm btn-primary" href="javascript:void(0);"><i class="fa fa-plus"></i> 添加</a>
+                        </li>
                     </ul>
                 </div>
-                <div class="form-group mt-3">
-                    <p>分享后,对方仅可查阅工程,不能修改。</p>
-                </div>
-                <div class="form-check">
-                    <input type="checkbox" class="form-check-input" id="allowCopy">
-                    <label class="form-check-label" for="allowCopy">允许该用户拷贝该工程</label>
-                    <!--打勾后出现提示-->
-                    <div id="allowCopyHint" class="form-text text-danger"><i class="fa fa-exclamation-triangle"></i> 该用户可以把你的项目拷贝成为他的数据,请谨慎勾选。 </div>
+                <div class="form-group mt-3" id="shareUsers" style="overflow: auto; display: none">
+                    <p>确认分享 <b>文件夹</b> 给</p>
+                    <p><h4><span class="badge badge-light mr-3">张三(15812644017) <a href="" class="text-danger" title="移除分享"><i class="fa fa-remove"></i></a></span>
+                    <span class="badge badge-light mr-3">王五(15812644017) <a href="" class="text-danger" title="移除分享"><i class="fa fa-remove"></i></a></span></h4></p>
                 </div>
             </div>
             <div class="modal-footer">
@@ -671,6 +680,48 @@
         </div>
     </div>
 </div>
+<!--弹出分享给交互-->
+<div class="modal fade" id="shareTo" data-backdrop="static">
+    <div class="modal-dialog" role="document">
+        <div class="modal-content" style="width: 750px;">
+            <div class="modal-header">
+                <h5 class="modal-title">分享给...</h5>
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                    <span aria-hidden="true">&times;</span>
+                </button>
+            </div>
+            <div class="modal-body modal-fixed-height">
+                <!--     <p>勾选需要恢复的文件,点“确定”按钮,确认从回收站中恢复。</p>-->
+                <table class="table table-hover table-sm mb-5">
+                    <thead>
+                    <tr style="display: block;">
+                        <th width="106px">姓名</th>
+                        <th width="146px">公司</th>
+                        <th width="146px">手机</th>
+                        <th width="156px">邮箱</th>
+                        <th width="70px">允许拷贝</th>
+                        <th width="70px">取消分享</th>
+                    </tr>
+                    </thead>
+                    <tbody id="shareToInfo" style="display:block; height: 300px; overflow: auto;">
+                    <tr>
+                        <td width="106px;">钟泽伟</td>
+                        <td width="146px;">珠海纵横创新软件有限公司</td>
+                        <td width="146px;">13160675110</td>
+                        <td width="156px;">707820685@qq.com</td>
+                        <td width="70px;" style="text-align: center"><input type="checkbox"></td>
+                        <td width="70px;" style="text-align: center"><input type="checkbox"></td>
+                    </tr>
+                    </tbody>
+                </table>
+            </div>
+            <div class="modal-footer">
+                <a href="javascript:void(0);" class="btn btn-primary" id="shareToConfirm" data-dismiss="modal">确定</a>
+                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
+            </div>
+        </div>
+    </div>
+</div>
 <!-- JS. -->
 <script src = "/lib/spreadjs/sheets/gc.spread.sheets.all.11.1.2.min.js"></script>
 <script>GC.Spread.Sheets.LicenseKey = '<%- LicenseKey %>';</script>

+ 202 - 36
web/building_saas/pm/js/pm_newMain.js

@@ -35,6 +35,9 @@ let taxTypeMap = {
 * */
 let regions = [];
 
+//分享用户列表
+let shareUsers = [];
+
 function isDef(v) {
     return typeof v !== 'undefined' && v !== null;
 }
@@ -317,6 +320,19 @@ const projTreeObj = {
                         }, 200);
                     }
                 },
+                'cancelShare': {
+                    name: '取消分享',
+                    icon: 'fa-ban',
+                    disabled: function () {
+                        let selected = projTreeObj.tree.selected;
+                        return !(selected && selected.data.shareInfo && selected.data.shareInfo.length > 0);
+                    },
+                    callback: function () {
+                        let selected = projTreeObj.tree.selected;
+                        setShareToModal(selected);
+                        $('#shareTo').modal('show');
+                    }
+                },
                 "spr3": '--------',
                 "manageFiles": {
                     name: "管理相关文件",
@@ -655,6 +671,9 @@ const projTreeObj = {
         let halfExpandLength = 3;
         let imgWidth = 18;
         let imgHeight = 14;
+        let shareImg = document.getElementById('share_pic'),
+            shareImgWidth = 18,
+            shareImgHeight = 18;
         let TreeNodeCellType = function () {
         };
         TreeNodeCellType.prototype = new GC.Spread.Sheets.CellTypes.Text();
@@ -745,7 +764,6 @@ const projTreeObj = {
                         img = node.data.changeMark && node.data.changeMark!=""? document.getElementById('refresh_pic'):document.getElementById('tender_pic');
                         imgWidth = 14;
                     }
-
                     ctx.drawImage(img, centerX+indent/2+3, centerY - 7, imgWidth,imgHeight);
                 }
                 // Draw Vertical Line
@@ -780,6 +798,11 @@ const projTreeObj = {
             x = x + (node.depth() + 1) * indent +  node.depth() * levelIndent + imgWidth + 3;
             w = w - (node.depth() + 1) * indent - node.depth() * levelIndent - imgWidth - 3;
             GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);
+            if (node.data.shareInfo.length > 0) {
+                let nowX = Math.floor(x) + w - 20;
+                let nowY = Math.floor((y + (y + h)) / 2);
+                ctx.drawImage(shareImg, nowX + 3, nowY - 7, shareImgWidth,shareImgHeight);
+            }
         };
         TreeNodeCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {
             let info = {x: x, y: y, row: context.row, col: context.col, cellStyle: cellStyle, cellRect: cellRect, sheetArea: context.sheetArea};
@@ -811,30 +834,6 @@ const projTreeObj = {
                 return hitinfo.x > centerX + halfBoxLength && hitinfo.x < centerX + halfBoxLength + imgWidth + indent/2+3 + textLength;
             }
             if(hitinfo.sheet.name() != "copyToSheet"){//如果是复制到sheet,不用执行
-                //建设项目,侧滑汇总
-                /*if(node.data.projType === projectType.project && withingClickArea() && !$('.slide-sidebar').hasClass('open')){
-                    setDataToSideBar();
-                    $(".slide-sidebar").animate({width:"440"}).addClass("open");
-                    setTimeout(function () {
-                        $("body").bind('click', function (event) {
-                            var e = event || window.event; //浏览器兼容性
-                            if (!$(event.target).is('a')) {
-                                var elem = event.target || e.srcElement;
-                                while (elem) { //循环判断至跟节点,防止点击的是div子元素
-                                    if (elem.className == "open-sidebar" || elem.className == 'slide-sidebar open') {
-                                        return false;
-                                    }
-                                    if($(elem).attr('id') && $(elem).attr('id') === 'del-wj'){
-                                        return false;
-                                    }
-                                    elem = elem.parentNode;
-                                }
-                                $(".slide-sidebar").animate({width: "0"}).removeClass("open")// 关闭处理
-                                $('body').unbind('click');
-                            }
-                        });
-                    }, 500);
-                }*/
                 //单项文件,进入造价书界面
                  if(node.data.projType === projectType.tender && withingClickArea()){
                     let timeoutTime = 200;
@@ -3318,6 +3317,13 @@ function shareTender(){
     let phone = $('#sharePhone').val();
     const hintInfo = $('#share-info');
     const userInfo = $('#share').find('.card');
+    const addUser = $('#addShareUser');
+    const copyInput = $('#allowCopy');
+    //可分享才可添加用户
+    addUser.addClass('disabled');
+    if (hintInfo.is(':visible')) {
+        hintInfo.hide();
+    }
     if(!phone || phone.trim() === ''){
         setDangerInfo(hintInfo, '请输入手机号码。', true);
         if(userInfo.is(':visible')){
@@ -3347,6 +3353,8 @@ function shareTender(){
             $('#user_mobile').html(mobileHtml);
             let emailHtml = `<i class="fa fa-envelope-o"> ${userData.email ? userData.email : ''}</i>`;
             $('#user_email').html(emailHtml);
+            //默认可拷贝
+            copyInput.prop('checked', true);
             userInfo.show();
             //判断项目是否已经分享
             CommonAjax.post('/pm/api/getProjectShareInfo', {user_id: userID, projectID: shareSeleted.data.ID}, function (rstData) {
@@ -3356,6 +3364,7 @@ function shareTender(){
                         return;
                     }
                 }
+                addUser.removeClass('disabled');
                 canShare = true;
             });
         }
@@ -3366,26 +3375,109 @@ $('#sharePhone').on('keyup',function () {
         shareTender();
     });
 });
+
+//设置确认分享用户列表
+//@param {String}name {String}phone @return {void}
+function setUsersShareDiv(projName, users) {
+    //每行的数据
+    const perLineCount = 2;
+    let $users = $('#shareUsers');
+    //三行后限制死高度
+    if (Math.ceil(users.length / perLineCount) > 2) {
+        $users.height(164);
+    } else {
+        $users.height('');
+    }
+    $users.empty();
+    let $projInfo = $(`<p>确认分享 <b>${projName}</b> 给</p>`);
+    $users.append($projInfo);
+    let $preP = null,
+        $preH4 = null;
+    for (let i = 0; i < users.length; i++) {
+        let user = users[i];
+        let $span = $(`<span class="badge badge-light mr-3">${user.name}(${user.phone})</span>`),
+            $a = $(`<a href="javascript:void(0);" userID="${user.userID}" class="text-danger" title="移除分享"></a>`),
+            $i = $('<i class="fa fa-remove"></i>');
+        bindRemoveShare($a);
+        $a.append($i);
+        $span.append($a);
+        //另起一行
+        if (i % 2 === 0) {
+           $preP = $('<p>');
+           $preH4 = $('<h4>');
+           $preH4.append($span);
+           $preP.append($preH4);
+           $users.append($preP);
+        } else {//行内新增元素
+            $preH4.append($span);
+            $preP.append($preH4);
+        }
+    }
+    if (users.length > 0) {
+        $users.show();
+    }
+    //移除分享列表
+    function bindRemoveShare(a){
+        a.click(function () {
+            let theUserID = a.attr('userID');
+            //清除shareUsers数组相关数据
+            _.remove(shareUsers, {userID: theUserID});
+            a.parent().remove();
+            //如果行内只剩一个数据,则删除数据及行
+            if (a.parent().parent().children().length === 0) {
+                a.parent().parent().remove();
+            }
+            //如果所用用户数据只剩这一条,删除用户数据则隐藏分享用户列表容器
+            if (shareUsers.length === 0) {
+                $('#shareUsers').hide();
+            }
+            console.log(shareUsers);
+        });
+    }
+
+}
+//添加分享用户
+$('#addShareUser').click(function () {
+    //输入有效手机号的用户
+    if (shareUserID) {
+        const hintInfo = $('#share-info');
+        let allowCopy = $('#allowCopy').prop('checked'),
+            name = $('#user_name').text(),
+            phone = $('#user_mobile').text();
+        shareUsers.push({userID: shareUserID, name: name, phone: phone, allowCopy: allowCopy});
+        let selected = projTreeObj.tree.selected;
+        setUsersShareDiv(selected.data.name, shareUsers);
+        if (hintInfo.is(':visible')) {
+            hintInfo.hide();
+        }
+        //搜索的用户信息
+        $('#share').find('.card').hide();
+        $('#sharePhone').val('');
+        $('#sharePhone').focus();
+        shareUserID = null;
+    }
+    console.log(`shareUsers`);
+    console.log(shareUsers);
+});
 //确认分享
 $('#share-confirm').click(function(){
-    let phone = $('#sharePhone').val();
     const hintInfo = $('#share-info');
-    const userInfo = $('#share').find('.card');
-    if(!phone || phone.trim() === ''){
-        setDangerInfo(hintInfo, '请输入手机号码。', true);
-        if(userInfo.is(':visible')){
-            userInfo.hide();
-        }
-        return;
-    }
-    if(!canShare){
+    if (shareUsers.length === 0) {
+        setDangerInfo(hintInfo, '请添加分享');
         return;
     }
+    $('#shareUsers').hide();
     $('#share-confirm').addClass('disabled');
     $.bootstrapLoading.start();
     let allowCopy = $('#allowCopy').prop('checked');
+    let shareData = [];
+    for (let userData of shareUsers) {
+        shareData.push({userID: userData.userID, allowCopy: userData.allowCopy});
+    }
     //分享
-    CommonAjax.post('/pm/api/share', {user_id: userID, type: shareType.create,  projectID: shareSeleted.data.ID, userID: shareUserID, allowCopy: allowCopy}, function (rstData) {
+    CommonAjax.post('/pm/api/share', {user_id: userID, type: shareType.create,  projectID: shareSeleted.data.ID, shareData: shareData}, function (rstData) {
+        //更新缓存
+        shareSeleted.data.shareInfo = shareSeleted.data.shareInfo.concat(shareData);
         $.bootstrapLoading.end();
         $('#share-confirm').removeClass('disabled');
         $('#share').modal('hide');
@@ -3406,6 +3498,80 @@ $('#allowCopy').change(function () {
     }
 });
 
+//分享给...界面确认
+$('#shareToConfirm').click(function () {
+    let selected = projTreeObj.tree.selected;
+    if (!selected) {
+        return;
+    }
+    updateShareInfo(selected);
+});
+
+//设置分享给界面数据
+//@param {Object}selected @return {void}
+function setShareToModal(selected){
+    $('#shareToInfo').empty();
+    if(!selected){
+        return;
+    }
+    let userIDs = [];
+    for(let user of selected.data.shareInfo){
+        userIDs.push(user.userID);
+    }
+    CommonAjax.post('/user/getUsers', {userIDs: userIDs}, function (rstData) {
+        for(let userInfo of rstData){
+            for(let user of selected.data.shareInfo){
+                if(user.userID === userInfo._id){
+                    user.name = userInfo.real_name;
+                    user.company = userInfo.company;
+                    user.mobile = userInfo.mobile;
+                    user.email = userInfo.email;
+                }
+            }
+        }
+        let infoArr = [];
+        for(let user of selected.data.shareInfo){
+            let infoHtml = `<tr>
+                                          <td style="width: 106px;">${user.name}</td>
+                                          <td style="width: 146px;">${user.company}</td>
+                                          <td style="width: 146px;">${user.mobile}</td>
+                                          <td style="width: 156px;">${user.email}</td>
+                                          <td style="width: 70px;text-align: center"><input value="allowCopy" ${user.allowCopy ? 'checked' : ''} type="checkbox"></td>
+                                          <td style="width: 70px;text-align: center"><input value="cancelShare" type="checkbox"></td>
+                               </tr>`;
+            infoArr.push(infoHtml);
+        }
+        let infoHtml = infoArr.join('');
+        $('#shareToInfo').html(infoHtml);
+    });
+}
+//更新项目分享信息
+//@param {Object}selected
+function updateShareInfo(selected){
+    if(!selected){
+        return;
+    }
+    let usersTr = $('#shareToInfo').find('tr');
+    let newShareInfo = [];
+    for(let i = 0; i < usersTr.length; i++){
+        let userTr = usersTr[i];
+        let allowCopy = $(userTr).find('input:first').prop('checked');
+        let cancelShare = $(userTr).find('input:last').prop('checked');
+        selected.data.shareInfo[i].allowCopy = allowCopy;
+        if(!cancelShare){
+            newShareInfo.push(selected.data.shareInfo[i]);
+        }
+    }
+    CommonAjax.post('/pm/api/updateProjects', {user_id: userID, updateData: [{updateType: 'update', updateData: {ID: selected.data.ID, shareInfo: newShareInfo}}]}, function () {
+        selected.data.shareInfo = newShareInfo;
+        let sheet = projTreeObj.workBook.getSheet(0);
+        projTreeObj.renderSheetFuc(sheet, function () {
+            sheet.invalidateLayout();
+            sheet.repaint();
+        });
+    });
+}
+
 //刷新建设项目汇总金额信息
 function refreshProjSummary(project, summaryInfo) {
     let refreshNodes = [];

+ 1 - 5
web/building_saas/pm/js/pm_share.js

@@ -918,14 +918,10 @@ const pmShare = (function () {
             }
             copyShareProject(tree.selected, parseInt(selProj), parseInt(selEng));
         });
-        //分享给...界面确认
-        $('#shareToConfirm').click(function () {
-            updateShareInfo(tree.selected);
-        });
         //清除分享
         $('#cancelShareConfirm').click(function () {
             $.bootstrapLoading.start();
-            CommonAjax.post('/pm/api/share', {user_id: userID, type: oprType.cancel,  projectID: tree.selected.data.actualTreeInfo.ID, userID: userID}, function (rstData) {
+            CommonAjax.post('/pm/api/share', {user_id: userID, type: oprType.cancel,  projectID: tree.selected.data.actualTreeInfo.ID, shareData:[{userID: userID}]}, function (rstData) {
                 $.bootstrapLoading.end();
                 tree.removeNode(tree.selected);
                 showTreeData(tree.items, headers);

二進制
web/dest/css/img/share.png