瀏覽代碼

变更令空白清单标记

laiguoran 4 年之前
父節點
當前提交
3eaa0356a3

+ 14 - 0
app/public/js/change_information_approval.js

@@ -28,6 +28,20 @@ $(document).ready(() => {
         headerFont: '12px 微软雅黑',
         font: '12px 微软雅黑',
         // readOnly: true,
+        rowHeader:[
+            {
+                rowHeaderType: 'circle',
+                setting: {
+                    size: 5,
+                    indent: 16,
+                    getColor: function (index, data) {
+                        if (!data) return;
+                        if(data.lid != 0) return;
+                        return '#007bff';
+                    }
+                },
+            },
+        ],
     };
     for (const aid of aidList) {
         const userinfo = _.find(auditList2, { 'uid': aid });

+ 21 - 1
app/public/js/change_information_set.js

@@ -81,6 +81,20 @@ $(document).ready(() => {
         headerFont: '12px 微软雅黑',
         font: '12px 微软雅黑',
         readOnly: readOnly,
+        rowHeader:[
+            {
+                rowHeaderType: 'circle',
+                setting: {
+                    size: 5,
+                    indent: 16,
+                    getColor: function (index, data) {
+                        if (!data) return;
+                        if(data.lid != 0) return;
+                        return '#007bff';
+                    }
+                },
+            },
+        ],
     };
 
     const changeCol = {
@@ -161,7 +175,7 @@ $(document).ready(() => {
             const sel = info.sheet.getSelections()[0];
             const col = info.sheet.zh_setting.cols[sel.col];
             const data = SpreadJsObj.getSelectObject(info.sheet);
-            if (col.field === 'del_list') {
+            if (col && col.field === 'del_list') {
                 changeSpreadObj.del();
             }
         },
@@ -371,6 +385,12 @@ $(document).ready(() => {
         SpreadJsObj.initSheet(changeSpreadSheet, changeSpreadSetting);
         SpreadJsObj.loadSheetData(changeSpreadSheet, SpreadJsObj.DataType.Data, changeList);
         changeSpreadObj.makeSjsFooter();
+        // for (const cl of changeList) {
+        //     if (cl.lid == 0) {
+        //         console.log(cl);
+        //         SpreadJsObj.repaintNodesRowHeader(changeSpreadSheet, cl);
+        //     }
+        // }
     });
 
     if (!readOnly) {

+ 14 - 0
app/public/js/change_information_show.js

@@ -30,6 +30,20 @@ $(document).ready(() => {
         headerFont: '12px 微软雅黑',
         font: '12px 微软雅黑',
         readOnly: true,
+        rowHeader:[
+            {
+                rowHeaderType: 'circle',
+                setting: {
+                    size: 5,
+                    indent: 16,
+                    getColor: function (index, data) {
+                        if (!data) return;
+                        if(data.lid != 0) return;
+                        return '#007bff';
+                    }
+                },
+            },
+        ],
     };
     for (const aid of aidList) {
         const userinfo = _.find(auditList2, { 'uid': aid });

+ 2 - 1
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -2392,6 +2392,7 @@ const SpreadJsObj = {
             CircleTagCellType.prototype = new spreadNS.CellTypes.RowHeader();
             const proto = CircleTagCellType.prototype;
             proto.indent = setting.indent || 16;
+            proto.size = setting.size || 6;
             proto.getTagColor = setting.getColor;
             proto.basePaint = proto.paint;
             proto.paint = function (canvas, value, x, y, w, h, style, options) {
@@ -2411,7 +2412,7 @@ const SpreadJsObj = {
                 let color = this.getTagColor(options.row, node);
                 color = color instanceof Array ? color : [color];
                 for (let i = color.length - 1; i >= 0; i--) {
-                    drawCircle2(canvas, x + w - this.indent + 5 + i*5 , y + h/2, 6, backColor, color[i]);
+                    drawCircle2(canvas, x + w - this.indent + 5 + i*5 , y + h/2, this.size, backColor, color[i]);
                 }
             };
             /**