Browse Source

表格初版,成功提示

zhouna 5 năm trước cách đây
mục cha
commit
48c1cc3074
5 tập tin đã thay đổi với 89 bổ sung3 xóa
  1. 27 0
      src/css/qcScore.less
  2. 3 0
      src/css/reset.less
  3. 55 0
      src/html/qcScore.html
  4. BIN
      src/images/empty.png
  5. 4 3
      src/js/qcScore.js

+ 27 - 0
src/css/qcScore.less

@@ -2,6 +2,11 @@
 .main-part{
   height: 100%;
 }
+.waring {
+  color: #FF4D4F;
+  margin-top: 18px;
+  height: 18px;
+}
 .patient-info{
   height: 50px;
   line-height: 50px;
@@ -99,6 +104,28 @@
       display: inline-block;
       min-width: 33%;
       margin-bottom: 15px;
+      table{
+        width: 100%;
+        border:1px @tableBorderColor solid;
+      }
+      th{
+        table{
+          border:none;
+        }
+        border:1px @tableBorderColor solid;
+        background: @thBgColor;
+        line-height: 20px;
+        padding: 7px 8px;
+      }
+      td{
+        text-align: center;
+        border:1px @tableBorderColor solid;
+        padding:7px  8px;
+        height: 20px;
+        table,td{
+          border:none;
+        }
+      }
       span{
         line-height: 20px;
         vertical-align: middle;

+ 3 - 0
src/css/reset.less

@@ -99,6 +99,9 @@ textarea {
 @borderColor:#E2E5EF; /**边框颜色**/
 @frameBdColor:#F0F0F0;/***框架边框颜色**/
 @warnColor:#FF4D4F;  /**重点红色**/
+@thBgColor:#EFF0F9; /**标题背景色**/
+@tableBorderColor:#E2E5EF;  /**表格边框**/
+
 
 /****弹窗样式*****/
 .modal{

+ 55 - 0
src/html/qcScore.html

@@ -35,7 +35,55 @@
                 {{each(k,text) val}}
                 <div class="cont">
                     <span class="label">${k}:</span>
+                    {{if text.substr(0,3)==='[{"'}}
+                    <table>
+                        {{if k==="出院诊断"}}
+                        <tr>
+                            <th>出院诊断</th>
+                            <th>疾病编码</th>
+                            <th>入院病情</th>
+                        </tr>
+                        {{each(i,v) JSON.parse(text)}}
+                        <tr>
+                            <td>${诊断名称}</td>
+                            <td>${诊断编码}</td>
+                            <td>${入院情况}</td>
+                        </tr>
+                        {{/each}}
+                        <tr><td colspan="6" style="text-align: left;">入院病情:1.有,2.临床未确定,3.情况不明,4.无。</td></tr>
+                        {{else}}
+                        <tr>
+                            <th rowspan="2">手术及操作编码</th>
+                            <th rowspan="2">手术及操作日期</th>
+                            <th rowspan="2">手术级别</th>
+                            <th rowspan="2">手术及操作名称</th>
+                            <th colspan="3">手术及操作医生</th>
+                            <th rowspan="2">切口等级</th>
+                            <th rowspan="2">愈合等级</th>
+                            <th rowspan="2">麻醉方式</th>
+                            <th rowspan="2">麻醉医师</th>
+                        </tr>
+                        <tr><th>术者</th><th>I助</th><th>II助</th></tr>
+                        {{each JSON.parse(text)}}
+                        <tr>
+                            <td>${手术编码}</td>
+                            <td>${手术日期}</td>
+                            <td>${手术级别}</td>
+                            <td>${手术名称}</td>
+                            <td>${手术医生ID}</td>
+                            <td>${一助医生ID}</td>
+                            <td>${二助医生ID}</td>
+                            <td>${切口等级}</td>
+                            <td>${愈合等级}</td>
+                            <td>${麻醉方式}</td>
+                            <td>${麻醉医师}</td>
+                        </tr>
+                        {{/each}}
+                        {{/if}}
+                    </table>
+                    {{else}}
                     <span>${text}</span>
+                    {{/if}}
                 </div>
                 {{/each}}
                 {{/each}}
@@ -43,6 +91,12 @@
         </div>
     </script>
     <script type="text/html" id="flawTmpl">
+        {{if isEmpty}}
+        <div class="empty">
+            <img src="../images/empty.png" alt="空"/>
+            <p>暂无详情~</p>
+        </div>
+        {{else}}
         <div class="flaw-item" code="${modelName}">
             <div class="title">${msg}</div>
             <div class="opers">
@@ -57,6 +111,7 @@
                 </div>
             </div>
         </div>
+        {{/if}}
     </script>
     <script type="text/html" id="editTmpl">
         <div class="edit-box">

BIN
src/images/empty.png


+ 4 - 3
src/js/qcScore.js

@@ -1,6 +1,7 @@
 require("../css/qcScore.less");
 const $ = require('jquery');
 require('jquery-templates');
+require('./modal.js');
 const {api,post,getUrlArgObject} = require('./utils.js');
 //本页全局变量
 let global_flawData = {};    //缺陷数据
@@ -33,7 +34,7 @@ function initMenu(data){
     const code=$(this).attr("code");
     global_activeTab=code;
     $(".content-item,.flaw-item").hide();
-    $(".content-item[code="+code+"],.flaw-item[code="+code+"]").show();
+    $(".content-item[code='"+code+"'],.flaw-item[code='"+code+"']").show();
   });
 }
 
@@ -106,7 +107,7 @@ function delScore(id){
     if(res.data.code==='0'){
       $("#delModal").hide();
       updateFlaws();
-      alert('删除成功');
+      $.alerModal({"message":"删除成功",type:"tip",time:'1000'});
     }
   });
 }
@@ -120,7 +121,7 @@ function editScore(info){
     if(res.data.code==='0'){
       $("#delModal").hide();
       updateFlaws();
-      alert("修改成功");
+      $.alerModal({"message":"修改成功",type:"tip",time:'1000'});
     }
   });
 }