Browse Source

pageSize 500/1000

luoyifan 3 năm trước cách đây
mục cha
commit
f603620e65
2 tập tin đã thay đổi với 27 bổ sung14 xóa
  1. 26 13
      dist/yvan-ext.js
  2. 1 1
      dist/yvan-ext.js.map

+ 26 - 13
dist/yvan-ext.js

@@ -117,7 +117,7 @@ define(['exports'], function (exports) { 'use strict';
         },
         pagination: true,
         pageSize: 50,
-        pageSizeOption: ['20', '50', '100', '200', '300'],
+        pageSizeOption: ['20', '50', '100', '200', '300', '500', '1000'],
         hideFootbar: false,
         hideRefresh: false,
         hideExport: false,
@@ -132220,23 +132220,36 @@ define(['exports'], function (exports) { 'use strict';
                 if (typeof v === 'string') {
                     v = parseInt(v);
                 }
-                v = v.toFixed(2);
-                var v1 = v > 100 ? 100 : v;
-                v1 = v1 < 0 ? 0 : v1;
-                //@ts-ignore
-                var v2 = parseInt(v1 * 2.55).toString(16);
-                if (v2.length == 1)
-                    v2 = '0' + v2;
+                var valueString = v.toFixed(2);
+                var valueFixed = v > 100 ? 100 : v;
+                valueFixed = valueFixed < 0 ? 0 : valueFixed;
+                var cls = '';
+                if (v < 90) {
+                    cls = 'danger';
+                }
+                else if (v < 100) {
+                    cls = 'warning';
+                }
+                else {
+                    cls = 'success';
+                }
                 return Ext.String
                     .format('<div>'
-                    + '<div style="float:left;border:1px solid #008000;height:15px;width:100%;">'
-                    + '<div style="float:left;text-align:center;width:100%;color:blue;">{0}%</div>'
-                    + '<div style="background: #FAB2{2};width:{1}%;height:13px;"></div>'
-                    + '</div></div>', v, v1, v2);
+                    + '<div style="float:left;width:100%; background:#ECECEC;border:none">'
+                    + '<div style="float:left;text-align:center;width:100%;color:#fff;line-height:24px;font-size:13px;">{0}%</div>'
+                    + '<div style="width:{1}%;height:24px;" class="progress-{2}"></div>'
+                    + '</div></div>', valueString, valueFixed, cls);
+                // return Ext.String
+                //     .format(
+                //         '<div>'
+                //         + '<div style="float:left;border:1px solid #008000;height:15px;width:100%;">'
+                //         + '<div style="float:left;text-align:center;width:100%;color:blue;">{0}%</div>'
+                //         + '<div style="background: #FAB2{2};width:{1}%;height:13px;"></div>'
+                //         + '</div></div>', v, valueFixed, valueString);
             },
             //button
             button: function (v, rd, model) {
-                return "<input type=\"button\" value=\"" + v + "\" />";
+                return "<input style=\"color:#fff\" type=\"button\" value=\"" + v + "\" class=\"area-tag\" />";
             }
         });
         initComponent();

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/yvan-ext.js.map