Selaa lähdekoodia

fix:牙齿号对应不上;书写模版报错

李帅 2 viikkoa sitten
vanhempi
commit
804d4f19c4

+ 16 - 16
src/utils/initName.js

@@ -95,37 +95,37 @@ export default {
95 95
     initToothPosition(val){
96 96
       switch (val) {
97 97
         case "upLeft1":
98
-          return "21";
98
+          return "11";
99 99
         case "upLeft2":
100
-          return "22";
100
+          return "12";
101 101
         case "upLeft3":
102
-          return "23";
102
+          return "13";
103 103
         case "upLeft4":
104
-          return "24";
104
+          return "14";
105 105
         case "upLeft5":
106
-          return "25";
106
+          return "15";
107 107
         case "upLeft6":
108
-          return "26";
108
+          return "16";
109 109
         case "upLeft7":
110
-          return "27";
110
+          return "17";
111 111
         case "upLeft8":
112
-          return "28";
112
+          return "18";
113 113
         case "upRight1":
114
-          return "11";
114
+          return "21";
115 115
         case "upRight2":
116
-          return "12";
116
+          return "22";
117 117
         case "upRight3":
118
-          return "13";
118
+          return "23";
119 119
         case "upRight4":
120
-          return "14";
120
+          return "24";
121 121
         case "upRight5":
122
-          return "15";
122
+          return "25";
123 123
         case "upRight6":
124
-          return "16";
124
+          return "26";
125 125
         case "upRight7":
126
-          return "17";
126
+          return "27";
127 127
         case "upRight8":
128
-          return "18";
128
+          return "28";
129 129
         case "downLeft1":
130 130
           return "41";
131 131
         case "downLeft2":

+ 5 - 0
src/views/patientCenter/index.vue

@@ -511,6 +511,7 @@
511 511
               :MedicalRecordetailsFlag="MedicalRecordetailsFlag"
512 512
               @closeMedicalRecordetails="closeMedicalRecordetails"
513 513
               @cancelNote="cancelNote"
514
+              @removetool="removetool"
514 515
             />
515 516
           </div>
516 517
         </div>
@@ -1548,6 +1549,10 @@ export default {
1548 1549
     changeNote(name){
1549 1550
       this.noteContent = name;
1550 1551
     },
1552
+    removetool(val){
1553
+      this.yaAllList.splice(this.yaAllList.findIndex(item=>item.toothStatus==val.toothStatus),1)
1554
+      this.$refs.addMedicalDialogRef.initList()
1555
+    }
1551 1556
   }
1552 1557
 }
1553 1558
 </script>

+ 6 - 4
src/views/patientCenter/medical/addMedicalTreeDialog.vue

@@ -88,7 +88,7 @@
88 88
                 <span>
89 89
                   {{ item.diagnosisName }} - {{ item.templateDesc }}
90 90
                 </span>
91
-                <i class="el-icon-close" @click.stop="doDel(index)"></i>
91
+                <i class="el-icon-close" @click.stop="doDel(index,item.id)"></i>
92 92
               </el-radio>
93 93
             </el-radio-group>
94 94
         </div>
@@ -181,9 +181,11 @@ export default {
181 181
       }
182 182
       this.dataList.unshift(row)
183 183
     },
184
-    doDel(index) {
184
+    doDel(index,id) {
185
+      if(this.mainDiagnosis === id) {
186
+        this.mainDiagnosis = ""
187
+      }
185 188
       this.dataList.splice(index, 1)
186
-      console.log(this.mainDiagnosis,213123);
187 189
     },
188 190
     async initAiagnosisTypeTree() {
189 191
       let str = ""
@@ -213,8 +215,8 @@ export default {
213 215
       this.$emit('cancelAll', '3')
214 216
     },
215 217
     async doSubmit() {
218
+      if (!this.dataList.length) return this.$message.error('至少需要一个诊断!')
216 219
       if (!this.mainDiagnosis) return this.$message.error('至少需要一个主诊断!')
217
-
218 220
       let arr = this.dataList.filter(item=>item.id !== this.mainDiagnosis).map(item=>item.id)
219 221
 
220 222
       // 生成模版

+ 4 - 4
src/views/patientCenter/medical/yaChi.vue

@@ -2418,7 +2418,7 @@
2418 2418
             style="margin-left: 10px;margin-top: 10px;"
2419 2419
              v-for="(item, index1) in tagList"
2420 2420
             :key="index1"
2421
-            @close="removeTool(item.toothPosition)"
2421
+            @close="removetool(item,index1)"
2422 2422
           >
2423 2423
             <span>
2424 2424
               {{ initToothPosition(item.toothPosition) }}:
@@ -3725,9 +3725,9 @@ export default {
3725 3725
       this.$emit('changeVisit', val)
3726 3726
     },
3727 3727
     // 关闭tag
3728
-    removeTool(index) {
3729
-      this.tagList.splice(index, 1)
3730
-      console.log(this.tagList)
3728
+    removetool(item,index1) {
3729
+      this.tagList.splice(index1, 1)
3730
+      this.$parent.$parent.$parent.removetool(item)
3731 3731
     },
3732 3732
     parseText(val) {
3733 3733
       const regex = /\{([^}]+)\}/g