Forráskód Böngészése

Merge branch 'version1.4.5' into test

luolei 4 éve
szülő
commit
3f47b93ced
2 módosított fájl, 11 hozzáadás és 13 törlés
  1. 10 12
      src/js/uncorrectedCopy.js
  2. 1 1
      src/js/utils.js

+ 10 - 12
src/js/uncorrectedCopy.js

@@ -145,6 +145,7 @@ function formatTableData(data){
 function renderTab(data,hisId,activePage){
   data = data.records;
   let str = ''
+  // console.log(orderList)
   for(let i = 0; i < data.length; i++){
     const item = data[i]
     // console.log(item,'=====================item');
@@ -153,12 +154,10 @@ function renderTab(data,hisId,activePage){
             <td  class="textCenter">${(activePage-1)*15 + i+1}</td>`
       for(var j = 0; j < orderTitle.length; j++) {
         let tmpKey = orderTitle[j]
-
         if(tmpKey=='deptName'||tmpKey=='doctorName'){
-          str += `<td dept-id="${item.deptId || ""}" data-tid="${orderList[j].id}" data-doc="${item.doctorName}" dept-name="${item.deptName || ""}" data-id="${item.numId || ""}" data-name="${orderKey[j] || ""}">${item[tmpKey]+'' || "-"}</td>`
+          str += `<td dept-id="${item.deptId || ""}" data-tid="${item[tmpKey.replace('name','id')]}" data-doc="${item.doctorName}" dept-name="${item.deptName || ""}" data-id="${item.numId || ""}" data-name="${item[tmpKey] || ""}">${item[tmpKey.replace('name','num')]+'' || "-"}</td>`
         }else{
-          // str += `<td class="goHomeDetail" data-tid="${orderList[j].id}" data-doc="${item.doctorName}" dept-id="${item.deptId || ""}" dept-name="${item.deptName || ""}" data-id="${item.numId || ""}" data-name="${orderKey[j] || ""}">${item[tmpKey]+'' || "-"}</td>`
-          str += `<td class="goHomeDetail" data-tid="${orderList[j].id}" dept-id="${item.deptId || ""}" dept-name="${item.deptName || ""}" data-id="${item.numId || ""}" data-name="${orderKey[j] || ""}"   data-doctor="${item.doctorName || ""}">${item[tmpKey]+'' || "-"}</td>`
+          str += `<td class="goHomeDetail" data-tid="${item[tmpKey.replace('name','id')]}" dept-id="${item.deptId || ""}" dept-name="${item.deptName || ""}" data-id="${item.numId || ""}" data-name="${item[tmpKey] || ""}"   data-doctor="${item.doctorName || ""}">${item[tmpKey.replace('name','num')]+'' || "-"}</td>`
         }
       }      
     str += `</tr>`
@@ -209,20 +208,19 @@ function getDeptList(){
 // 渲染table表头
 function renderTabTitle(data){
   isfirstRenderTitle = true
-  let str = `
-  <th class="moduleName" style="width: 65px;">序号</th>`
+  let str = `<th class="moduleName" style="width: 65px;">序号</th>`
+  // data.sort(des)
   for(let i = 0; i < data.length; i++){
       const item = data[i]
       if(item.isShow == 1){
-          // str += `<th class="textCenter beHospitalId" code="${item.fieldName}">${item.columnName}</th>`
           str += `<th class="textCenter beHospitalId">${item.columnName}</th>`
           orderList.push(item)
       }
   }
-  orderList.sort(des)
-  function des(a,b){
-    return a['orderNo']-b['orderNo']
-  }
+  // orderList.sort(des)
+  // function des(a,b){
+  //   return a['orderNo']-b['orderNo']
+  // }
   orderTitleLis(orderList)
   $(".tabTitle").html(str)
   // bindOrder()
@@ -230,7 +228,7 @@ function renderTabTitle(data){
 function orderTitleLis(data){
   for(let i = 0;i < data.length;i++){
     let key = data[i].columnName
-    orderTitle.push(explainTitle[key])
+    orderTitle.push(data[i].fieldName)
     orderKey.push(key)
   }
 }

+ 1 - 1
src/js/utils.js

@@ -3,7 +3,7 @@ const $ = require("jquery");
 const axios = require("axios")
 var Utils = require('./rePromise');
 require('./scrollBar.js');
-const baseUrl = "http://192.168.2.241:5858"
+const baseUrl = "http://192.168.2.236:5858"
 //页面映射
 const pageMap={
   'YH-KZT':'console.html',