Pārlūkot izejas kodu

质控列表字段居中

zhangxc 5 gadi atpakaļ
vecāks
revīzija
f8fcd3b5b1
3 mainītis faili ar 18 papildinājumiem un 3 dzēšanām
  1. 6 1
      src/js/qcList.js
  2. 6 1
      src/js/qcListDept.js
  3. 6 1
      src/js/qcListPerson.js

+ 6 - 1
src/js/qcList.js

@@ -221,7 +221,7 @@ function renderTab(data,hisId){
                 <td  class="recordScoreOperaBtn textCenter" style="opacity:${hasData('FUNC000017')?'1':'0.5'}">评分</td>`
         for(let j = 0; j < pageSet.length; j++){
             if(pageSet[j].status == 1){
-                str +=  `<td><span data-index=${i} class="${pageSet[j].val=='name'?'patientNameSpan':''}">${item[pageSet[j].val] || "-"}<span></td>`
+                str +=  `<td class="${isTextCenter(pageSet[j].val) ? 'textCenter':''}"><span data-index=${i} class="${pageSet[j].val=='name'?'patientNameSpan':'' } ">${item[pageSet[j].val] || "-"}<span></td>`
             }
         }
                 // <td >${item.behospitalCode || "-"}</td>
@@ -259,6 +259,11 @@ function renderTab(data,hisId){
     bindScoreDetail(hisId)
 }
 
+function isTextCenter(name){
+    const textCenterList = ['level', 'scoreRes', 'sex','age', 'behospitalDate', 'leaveHospitalDate', 'placefileDate', 'gradeTime']
+    return textCenterList.findIndex(item=> item==name) > -1
+}
+
 function scoreDetail(id,age,hid,code,name){
     window.open(`./qcScore.html?id=${id}&age=${age}&name=${name}&hid=${getCookie('hospitalid')}&code=${code}`)
 }

+ 6 - 1
src/js/qcListDept.js

@@ -240,7 +240,7 @@ function renderTab(data){
                 <td  class="recordScoreOperaBtn textCenter" style="opacity:${hasData('FUNC000017')?'1':'0.5'}">评分</td>`
         for(let j = 0; j < pageSet.length; j++){
             if(pageSet[j].status == 1){
-                str +=  `<td><span data-index=${i} class="${pageSet[j].val=='name'?'patientNameSpan':''}">${item[pageSet[j].val] || "-"}<span></td>`
+                str +=  `<td class="${isTextCenter(pageSet[j].val) ? 'textCenter':''}"><span data-index=${i} class="${pageSet[j].val=='name'?'patientNameSpan':''}">${item[pageSet[j].val] || "-"}<span></td>`
             }
         }
                 // <td >${item.behospitalCode || "-"}</td>
@@ -278,6 +278,11 @@ function renderTab(data){
     bindScoreDetail()
 }
 
+function isTextCenter(name){
+    const textCenterList = ['level', 'scoreRes', 'sex','age', 'behospitalDate', 'leaveHospitalDate', 'placefileDate', 'gradeTime']
+    return textCenterList.findIndex(item=> item==name) > -1
+}
+
 function scoreDetail(id,age,code,name){
     window.open(`./qcScore.html?id=${id}&age=${age}&code=${code}&hid=${getCookie('hospitalid')}&name=${name}`)
 }

+ 6 - 1
src/js/qcListPerson.js

@@ -243,7 +243,7 @@ function renderTab(data){
                 <td  class="recordScoreOperaBtn textCenter" style="opacity:${hasData('FUNC000017')?'1':'0.5'}">评分</td>`
         for(let j = 0; j < pageSet.length; j++){
             if(pageSet[j].status == 1){
-                str +=  `<td><span data-index=${i} class="${pageSet[j].val=='name'?'patientNameSpan':''}">${item[pageSet[j].val] || "-"}<span></td>`
+                str +=  `<td  class="${isTextCenter(pageSet[j].val) ? 'textCenter':''}"><span data-index=${i} class="${pageSet[j].val=='name'?'patientNameSpan':''}">${item[pageSet[j].val] || "-"}<span></td>`
             }
         }
                 // <td >${item.behospitalCode || "-"}</td>
@@ -281,6 +281,11 @@ function renderTab(data){
     bindScoreDetail()
 }
 
+function isTextCenter(name){
+    const textCenterList = ['level', 'scoreRes', 'sex','age', 'behospitalDate', 'leaveHospitalDate', 'placefileDate', 'gradeTime']
+    return textCenterList.findIndex(item=> item==name) > -1
+}
+
 function scoreDetail(id,age,code,name){
     window.open(`./qcScore.html?id=${id}&age=${age}&code=${code}&hid=${getCookie('hospitalid')}&name=${name}`)
 }