소스 검색

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

李帅 2 주 전
부모
커밋
804d4f19c4
4개의 변경된 파일31개의 추가작업 그리고 24개의 파일을 삭제
  1. 16 16
      src/utils/initName.js
  2. 5 0
      src/views/patientCenter/index.vue
  3. 6 4
      src/views/patientCenter/medical/addMedicalTreeDialog.vue
  4. 4 4
      src/views/patientCenter/medical/yaChi.vue

+ 16 - 16
src/utils/initName.js

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

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

@@ -511,6 +511,7 @@
511
               :MedicalRecordetailsFlag="MedicalRecordetailsFlag"
511
               :MedicalRecordetailsFlag="MedicalRecordetailsFlag"
512
               @closeMedicalRecordetails="closeMedicalRecordetails"
512
               @closeMedicalRecordetails="closeMedicalRecordetails"
513
               @cancelNote="cancelNote"
513
               @cancelNote="cancelNote"
514
+              @removetool="removetool"
514
             />
515
             />
515
           </div>
516
           </div>
516
         </div>
517
         </div>
@@ -1548,6 +1549,10 @@ export default {
1548
     changeNote(name){
1549
     changeNote(name){
1549
       this.noteContent = name;
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
 </script>
1558
 </script>

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

@@ -88,7 +88,7 @@
88
                 <span>
88
                 <span>
89
                   {{ item.diagnosisName }} - {{ item.templateDesc }}
89
                   {{ item.diagnosisName }} - {{ item.templateDesc }}
90
                 </span>
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
               </el-radio>
92
               </el-radio>
93
             </el-radio-group>
93
             </el-radio-group>
94
         </div>
94
         </div>
@@ -181,9 +181,11 @@ export default {
181
       }
181
       }
182
       this.dataList.unshift(row)
182
       this.dataList.unshift(row)
183
     },
183
     },
184
-    doDel(index) {
184
+    doDel(index,id) {
185
+      if(this.mainDiagnosis === id) {
186
+        this.mainDiagnosis = ""
187
+      }
185
       this.dataList.splice(index, 1)
188
       this.dataList.splice(index, 1)
186
-      console.log(this.mainDiagnosis,213123);
187
     },
189
     },
188
     async initAiagnosisTypeTree() {
190
     async initAiagnosisTypeTree() {
189
       let str = ""
191
       let str = ""
@@ -213,8 +215,8 @@ export default {
213
       this.$emit('cancelAll', '3')
215
       this.$emit('cancelAll', '3')
214
     },
216
     },
215
     async doSubmit() {
217
     async doSubmit() {
218
+      if (!this.dataList.length) return this.$message.error('至少需要一个诊断!')
216
       if (!this.mainDiagnosis) return this.$message.error('至少需要一个主诊断!')
219
       if (!this.mainDiagnosis) return this.$message.error('至少需要一个主诊断!')
217
-
218
       let arr = this.dataList.filter(item=>item.id !== this.mainDiagnosis).map(item=>item.id)
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
             style="margin-left: 10px;margin-top: 10px;"
2418
             style="margin-left: 10px;margin-top: 10px;"
2419
              v-for="(item, index1) in tagList"
2419
              v-for="(item, index1) in tagList"
2420
             :key="index1"
2420
             :key="index1"
2421
-            @close="removeTool(item.toothPosition)"
2421
+            @close="removetool(item,index1)"
2422
           >
2422
           >
2423
             <span>
2423
             <span>
2424
               {{ initToothPosition(item.toothPosition) }}:
2424
               {{ initToothPosition(item.toothPosition) }}:
@@ -3725,9 +3725,9 @@ export default {
3725
       this.$emit('changeVisit', val)
3725
       this.$emit('changeVisit', val)
3726
     },
3726
     },
3727
     // 关闭tag
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
     parseText(val) {
3732
     parseText(val) {
3733
       const regex = /\{([^}]+)\}/g
3733
       const regex = /\{([^}]+)\}/g