Browse Source

软件版本信息

zhongzewei 7 năm trước cách đây
mục cha
commit
931f434246

+ 2 - 0
modules/all_models/compilation.js

@@ -66,6 +66,8 @@ let modelSchema = {
     },
     // 名称
     name: String,
+    //描述
+    description: String,
     // 创建时间
     create_time: Number,
     // 创建者id

+ 1 - 1
modules/users/models/compilation_model.js

@@ -28,7 +28,7 @@ class CompilationModel extends BaseModel {
      */
     async getList() {
         // 筛选字段
-        let field = {_id: 1, name: 1, is_release: 1};
+        let field = {_id: 1, name: 1, is_release: 1, description: 1};
         let compilationData = await this.findDataByCondition({name: {$ne: ''}, is_release: true}, field, false);
 
         return compilationData === null ? [] : compilationData;

+ 1 - 0
public/web/tree_sheet/tree_sheet_helper.js

@@ -302,6 +302,7 @@ var TREE_SHEET_HELPER = {
             };
             // Draw Text
             x = x + (node.depth() + 1) * indent +  node.depth() * levelIndent;
+            w = w - (node.depth() + 1) * indent - node.depth() * levelIndent;
             GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);
         };
         TreeNodeCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {

+ 3 - 1
web/building_saas/main/js/views/glj_view.js

@@ -1311,7 +1311,9 @@ var gljOprObj = {
                     offset = drowSubItem(ctx, x, y, w, h, offset, data[options.row + 1]);
                     offset += 1;
                 }
-                ctx.fillText(value, x + offset + ctx.measureText(value).width, y + h - 5);
+                x = x + offset;
+                w = w - offset;
+                GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);
             }
         };
         // override getHitInfo to allow cell type get mouse messages

+ 4 - 1
web/building_saas/main/js/views/project_property_basicInfo.js

@@ -350,7 +350,10 @@ let basicInfoView = {
                     offset= drowSubItem(ctx,x,y,w,h,offset,data[options.row+1]);
                     offset+=1;
                 }
-                ctx.fillText(value,x+offset+ctx.measureText(value).width,y+h-5);
+                x = x + offset;
+                w = w - offset;
+                GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);
+
             }
         };
         // override getHitInfo to allow cell type get mouse messages

+ 3 - 1
web/building_saas/main/js/views/project_property_projFeature.js

@@ -357,7 +357,9 @@ let projFeatureView = {
                     offset= drowSubItem(ctx,x,y,w,h,offset,data[options.row+1]);
                     offset+=1;
                 }
-                ctx.fillText(value,x+offset+ctx.measureText(value).width,y+h-5);
+                x = x + offset;
+                w = w - offset;
+                GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);
             }
         };
         // override getHitInfo to allow cell type get mouse messages

+ 1 - 0
web/building_saas/pm/js/pm_gc.js

@@ -333,6 +333,7 @@ const gcTreeObj = {
             // Draw Text
             //x = x + (node.depth() + 1) * indent +  node.depth() * levelIndent;
             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);
         };
         TreeNodeCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {

+ 1 - 0
web/building_saas/pm/js/pm_newMain.js

@@ -664,6 +664,7 @@ const projTreeObj = {
             // Draw Text
             //x = x + (node.depth() + 1) * indent +  node.depth() * levelIndent;
             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);
         };
         TreeNodeCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {

+ 3 - 1
web/users/js/login.js

@@ -32,6 +32,7 @@ $(document).ready(function () {
                             location.href = url;
                             return false;
                         }
+                        console.log(response.compilation_list);
                         setVersion(response.compilation_list);
                         $('#ver').modal('show');
                     }
@@ -247,10 +248,11 @@ function cleanError() {
 function setVersion(versionData) {
     let html = '';
     for (let version of versionData) {
+        let description = version.description ? version.description : 'With supporting text below as a natural lead-in to additional content.';
         let tmpHtml = '<div class="col-sm-6">' +
             '<div class="card card-block">' +
             '<h3 class="card-title">'+ version.name +'</h3>' +
-            '<p class="card-text">With supporting text below as a natural lead-in to additional content.</p>' +
+            '<p class="card-text">' + description + '</p>' +
             '<a class="btn btn-primary" href="/boot/'+ version._id.toString() +'">开始使用</a>' +
             '</div>' +
             '</div>';