Browse Source

病历模版分页无法显示下一页id修复完成

李帅 3 weeks ago
parent
commit
315a4c7de6

+ 11 - 0
src/views/system/medicalRecord/addTemplateDialog.vue

@@ -223,6 +223,10 @@ export default {
223 223
       type: String,
224 224
       default: ''
225 225
     },
226
+    diagnosisManageName: {
227
+      type: String,
228
+      default: ''
229
+    },
226 230
     lookDetail: {
227 231
       type: Object,
228 232
       default: {}
@@ -340,6 +344,13 @@ export default {
340 344
       })
341 345
       if (res.code !== 200) return this.$message.error(res.msg)
342 346
       this.diagnosisNameOptions = res.rows
347
+      if(this.diagnosisNameOptions.findIndex(item => item.diagnosisName === this.diagnosisManageName) === -1){
348
+        this.diagnosisNameOptions.unshift({
349
+          diagnosisName: this.diagnosisManageName,
350
+          id: this.ruleForm.diagnosisManageId
351
+        })
352
+        this.total = res.total + 1
353
+      }
343 354
       this.total = res.total
344 355
     },
345 356
     /** 查询科室下拉树结构 */

+ 4 - 0
src/views/system/medicalRecord/index.vue

@@ -240,6 +240,7 @@
240 240
       ref="addTemplateDialogRef"
241 241
       :listInId="listInId"
242 242
       :treeName="treeName"
243
+      :diagnosisManageName="diagnosisManageName"
243 244
     />
244 245
   </div>
245 246
 </template>
@@ -296,6 +297,7 @@ export default {
296 297
       pageSize: 10,
297 298
       pageNum: 1,
298 299
       total: 0,
300
+      diagnosisManageName:""
299 301
     }
300 302
   },
301 303
 
@@ -365,6 +367,8 @@ export default {
365 367
       if (title == '编辑') {
366 368
         const req = await diagnosisTypetemplateDetail({ id })
367 369
         this.lookDetail = req.data
370
+        this.diagnosisManageName = req.data.diagnosisManageName
371
+        this.$refs.addTemplateDialogRef.initOptions()
368 372
       } else {
369 373
         this.lookDetail = {
370 374
         templateName: '',