Browse Source

1. 界面调整
2. 导入指标模板调整
3. 全局参数调整
4. ajax方式post等待时长设为25s

MaiXinRong 7 năm trước cách đây
mục cha
commit
b2195de1f1

BIN
app/const/global_params.xls


+ 1 - 1
app/public/js/global.js

@@ -66,7 +66,7 @@ const postData = function (url, data, successCallback, errorCallBack) {
         data: {'data': JSON.stringify(data)},
         dataType: 'json',
         cache: false,
-        timeout: 5000,
+        timeout: 25000,
         beforeSend: function(xhr) {
             let csrfToken = Cookies.get('csrfToken');
             xhr.setRequestHeader('x-csrf-token', csrfToken);

+ 1 - 1
app/public/js/lib_detail.js

@@ -77,7 +77,7 @@ $(document).ready(function() {
         for(let i in index_list) {
             index_html += '<tr> <td>'+ index_list[i].code +'</td> <td>'+ index_list[i].name +'</td>' +
                 '<td>'+ (index_list[i].unit1 !== null ? index_list[i].unit1 : '') +'</td>' +
-                '<td>'+ (index_list[i].unit2 !== null ? index_list[i].unit2 : '') +'</td>' +
+                '<td width="75">'+ (index_list[i].unit2 !== null ? index_list[i].unit2 : '') +'</td>' +
                 '<td>'+ index_list[i].rule +'</td> <td class="text-right">'+ (index_list[i].eval_rule !== null ? index_list[i].eval_rule : '') +'</td>' +
                 '<td class="text-right">'+ (index_list[i].value !== null ? index_list[i].value : '') +'</td> </tr>';
         }

+ 3 - 2
app/service/template_node.js

@@ -155,14 +155,15 @@ module.exports = app => {
                 if (!row[0]) { continue; }
                 if (this.ctx.helper.ValidTemplateNodeCode(row[0])) {
                     if (!this.ctx.helper.findObj(nodes, 'code', row[0])) {
+                        const isMatchCode = row[11] && row[11] !== '' && this.ctx.helper.validMatchCode(row[11]);
                         const node = {
                             template_id: templateId,
                             node_id: nodes.length + 1,
                             node_pid: this._findParentId(row[0], nodes) || -1,
                             code: row[0],
                             name: row[1],
-                            match_type: row[11] && row[11] !== '' ? nodeConst.matchType.code : nodeConst.matchType.name,
-                            match_key: row[11] && row[11] !== '' ? row[11] : row[1],
+                            match_type: isMatchCode ? nodeConst.matchType.code : nodeConst.matchType.name,
+                            match_key: isMatchCode ? row[11] : row[1],
                         };
                         nodes.push(node);
                     }