Your Name 2 lat temu
rodzic
commit
8f71030039
2 zmienionych plików z 64 dodań i 37 usunięć
  1. 30 24
      src/components/DocIndex.vue
  2. 34 13
      src/components/SolutionPkLine.vue

+ 30 - 24
src/components/DocIndex.vue

@@ -44,7 +44,7 @@
       goPage(path) {
         this.$router.push(path)
       },
-      logout(){
+      logout() {
         window.localStorage.removeItem('token')
         window.localStorage.removeItem('authinfo')
         window.location.reload()
@@ -56,28 +56,34 @@
           }
         })
       },
-      regNew(){
-        this.$api.getPatientDoingCase({doctor_id:this.doctorInfo.id}).then(res=>{
-          if(res.data.code==0 && res.data.data.id){
-            MessageBox({
+      regNew() {
+        this.$api.getPatientDoingCase({
+          doctor_id: this.doctorInfo.id
+        }).then(res => {
+          if (res.data.code == 0 && res.data.data.id) {
+            MessageBox.confirm("", {
               title: '提示',
               message: '您有一个病例未完成',
               showCancelButton: true,
-              confirmButtonText:"继续录入",
-              cancelButtonText:"重新录入",
-              cancelButtonClass:"cancelBtn"
-            },action=>{
+              confirmButtonText: "继续录入",
+              cancelButtonText: "重新录入",
+              cancelButtonClass: "cancelBtn",
+              confirmButtonClass: "confirmButtonClass"
+            }, action => {
               console.log(action)
-              if(action=="confirm"){
+              if (action == "confirm") {
                 this.$router.push({
-                  path:"/diagcalc",
-                  query:{id:res.data.data.id,patid:res.data.data.patient_id}
+                  path: "/diagcalc",
+                  query: {
+                    id: res.data.data.id,
+                    patid: res.data.data.patient_id
+                  }
                 })
-              }else{
+              } else {
                 this.$router.push("regpatinfo")
               }
             });
-          }else{
+          } else {
             this.$router.push("regpatinfo")
           }
         })
@@ -90,7 +96,7 @@
 
 </script>
 
-<style scoped lang="scss">
+<style lang="scss">
   .container {
     .bgcolor {
       width: 100%;
@@ -114,9 +120,10 @@
 
     .docinfo {
       position: absolute;
-      top:30%;
-      left:0;
+      top: 30%;
+      left: 0;
       right: 0;
+
       .docavatar {
         border-radius: 60rem;
       }
@@ -139,18 +146,17 @@
         border-radius: 1rem;
         background: #595758;
         color: #fff;
-        margin:2rem 1rem;
+        margin: 2rem 1rem;
       }
 
     }
-    /deep/.cancelBtn{
-    color:red!important;
-  }
+
   }
-  /deep/ .mint-msgbox-cancel{
-    font-size: 24px!important;
+
+  .cancelBtn {
+    font-size: 24px;
+    /* color: red !important; */
   }
 
-  
 
 </style>

+ 34 - 13
src/components/SolutionPkLine.vue

@@ -106,7 +106,7 @@
             axisLabel: {
               interval:0,
               formatter: (v,i)=>{
-                return v 
+                // return v 
                 if(i===0){
                   return 0;
                 }
@@ -135,13 +135,13 @@
                 return v
               }
             },
-            // max:30,
+            max:140,
             // min:0,
             // interval:1,  
-            // splitNumber:5,
-            axisTick:{ //坐标轴刻度相关设置。
-              show :true,
-            },
+            splitNumber:7,
+            // axisTick:{ //坐标轴刻度相关设置。
+            //   show :true,
+            // },
           }],
           series: [{
             name: '最低气温',
@@ -155,28 +155,28 @@
               },
               data: [{
                   name: '1',
-                  yAxis: 1,
+                  yAxis: 20,
                   lineStyle: {
                     color: '#ab6cef'
                   }
                 },
                 {
                   name: '3',
-                  yAxis: 3,
+                  yAxis: 40,
                   lineStyle: {
                     color: '#4caf50'
                   }
                 },
                 {
                   name: '5',
-                  yAxis: 5,
+                  yAxis: 60,
                   lineStyle: {
                     color: '#AC4C44'
                   }
                 },
                 {
                   name: '15',
-                  yAxis: 15,
+                  yAxis: 80,
                   lineStyle: {
                     color: '#AC4C44'
                   }
@@ -371,13 +371,34 @@
             //  3.寻找 min_v 所在的下标
             const index = this.dataInterval.findIndex((v) => v === min_v);
             //  4.计算该amount在y轴上应该展示的位置
-            const y_value = ((yxlData[i] - min_v) / (max_v - min_v)) * 10 + index * 10;
+            // const y_value = ((yxlData[i] - min_v) / (max_v - min_v)) * 20 + index * 20;
+
+            let y_value = yxlData[i];
+            if(y_value>=0 & y_value<=20){
+              y_value = y_value/20*y_value
+            }
+            if(y_value>20 & y_value<=40){
+              y_value = y_value/40*y_value
+              // y_value = 1+(y_value-20)/20*y_value
+              
+            }
+            if(y_value>40 & y_value<=60){
+              y_value = y_value/60*y_value
+              // y_value = 3 + (y_value-40)/20*y_value
+            }
+            if(y_value>60 & y_value<=80){
+              y_value = y_value/80*y_value
+              // y_value = 5 + (y_value-60)/20*y_value
+            }
+            if(y_value>80 & y_value<=100){
+              y_value = y_value/100*y_value
+            }
             yxlData2[i] = y_value;
           }
 
           console.log(yxlData2,2222222222222)
-          this.pklineOption.series[0].data = res.data.data.pk_ydata
-          // this.pklineOption.series[0].data = yxlData2
+          // this.pklineOption.series[0].data = res.data.data.pk_ydata
+          this.pklineOption.series[0].data = yxlData2
           // this.yxlData2 = yxlData2
         })
       }