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

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/YangHuCost

zhangweicheng пре 6 година
родитељ
комит
005dd5ecec

+ 5 - 0
web/building_saas/css/custom.css

@@ -391,4 +391,9 @@ input.text-right{
 .annotate-color-7::before{
     color:#ECE0F5 !important;
     -webkit-text-stroke:.5px #ced4da;
+}
+.text-ellipsis {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
 }

+ 2 - 2
web/building_saas/pm/html/project-management.html

@@ -47,7 +47,7 @@
 <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">
 <img src="/web/dest/css/img/copy.png" id="copy_pic" style="display: none">
-<img src="/web/dest/css/img/work.png" id="work_pic" style="display: none">
+<img src="/web/dest/css/img/edit.png" id="edit_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;">
@@ -614,7 +614,7 @@
                 </div>
                 <table class="table table-sm" id="shareFindDiv">
                     <tbody style="display: block">
-                    <tr><th style="width: 112px;">姓名</th><th style="width: 165px;">公司</th><th style="width: 136px;">手机</th><th style="width: 160px;">邮箱</th><th style="width: 90px;">允许拷贝</th><th style="width: 90px;">允许协作</th><th style="width: 90px;">添加分享</th></tr>
+                    <tr><th style="width: 112px;">姓名</th><th style="width: 165px;">公司</th><th style="width: 136px;">手机</th><th style="width: 160px;">邮箱</th><th style="width: 90px;">允许拷贝</th><th style="width: 90px;">允许编辑</th><th style="width: 90px;">添加分享</th></tr>
                     <tr><td id="user_name">张三</td><td id="user_company">XX公司</td><td id="user_mobile">12345678900</td><td id="user_email"></td><td><input id="allowCopy" type="checkbox"></td><td><input id="allowCooperate" type="checkbox"></td><td><a id="share-confirm" href="javascript:void(0)" class="btn btn-sm btn-primary">添加分享</a></td></tr>
                     </tbody>
                 </table>

+ 2 - 2
web/building_saas/pm/js/pm_newMain.js

@@ -2640,7 +2640,7 @@ function setProjOptions(projs, selected){
         $("#poj-name").val(firstProj.data.name);
         setFileOptions(firstProj.data.ID);
         for(let i = 0, len = projs.length; i < len; i++){
-            let $proj = $("<a>").val(projs[i].data.ID).text(projs[i].data.name);
+            let $proj = $(`<a class='text-ellipsis' title="${projs[i].data.name}">`).val(projs[i].data.ID).text(projs[i].data.name);
             $proj.addClass("dropdown-item");
             $proj.attr("href", "javascript:void(0);");
             $proj.click(function () {
@@ -3783,7 +3783,7 @@ function setShareToModal(selected){
                                           <th style="width: 136px;">手机</th>
                                           <th style="width: 136px;">邮箱</th>
                                           <th style="width: 90px;">允许拷贝</th>
-                                          <th style="width: 90px;">允许协作</th>
+                                          <th style="width: 90px;">允许编辑</th>
                                           <th style="width: 90px;">取消分享</th>
                                </tr>`;
         infoArr.push(theadHtml);

+ 7 - 6
web/building_saas/pm/js/pm_share.js

@@ -429,9 +429,9 @@ const pmShare = (function () {
     }
     //互动单元格
     function getInteractionCell() {
-        let workImg = document.getElementById('work_pic'),
-            workImgWidth = 13,
-            workImgHeight = 13,
+        let editImg = document.getElementById('edit_pic'),
+            editImgWidth = 13,
+            editImgHeight = 13,
             copyImg = document.getElementById('copy_pic'),
             copyImgWidth = 13,
             copyImgHeight = 13;
@@ -455,11 +455,12 @@ const pmShare = (function () {
                 let acStyle = options.sheet.getActualStyle(options.row, options.col),
                     zoom = options.sheet.zoom();
                 let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {sheet: options.sheet, row: options.row, col: options.col, sheetArea: GC.Spread.Sheets.SheetArea.viewport});
-                let nowX  = Math.floor(x) + textLength + 3,
+                const imgIndent = 5;
+                let nowX  = Math.floor(x) + textLength + imgIndent,
                     nowY = Math.floor((y + (y + h)) / 2) - 7;
                 if (node.data.allowCooperate) {
-                    ctx.drawImage(workImg, nowX, nowY, workImgWidth, workImgHeight);
-                    nowX += workImgWidth;
+                    ctx.drawImage(editImg, nowX, nowY, editImgWidth, editImgHeight);
+                    nowX += editImgWidth;
                 }
                 if (node.data.allowCopy) {
                     ctx.drawImage(copyImg, nowX, nowY, copyImgWidth, copyImgHeight);

+ 5 - 0
web/building_saas/pm/js/pm_tree.js

@@ -251,6 +251,10 @@ const pmTree = {
                     node.parent.children.splice(iIndex, 1);
                 }
                 sortTreeItems(this);
+                this.sourceData = this.items.reduce((acc, cur) => {
+                    acc.push(cur.data);
+                    return acc;
+                }, []);
             };
 
             Tree.prototype.loadData = function (arrData) {
@@ -320,6 +324,7 @@ const pmTree = {
             };
 
             Tree.prototype.addNodeData = function (data, parent, nextSibling, nodeState = null) {
+                this.sourceData.push(data);
                 var node = null;
                 var pNode = parent ? parent : this._root;
                 if (!nextSibling || (nextSibling.parent === pNode && pNode.childIndex(nextSibling) > -1)) {

BIN
web/dest/css/img/edit.png