李帅 пре 1 месец
родитељ
комит
470a8f43df
3 измењених фајлова са 85 додато и 62 уклоњено
  1. 1 1
      src/utils/request.js
  2. 83 58
      src/views/patientCenter/medical/yaChi.vue
  3. 1 3
      vue.config.js

+ 1 - 1
src/utils/request.js

@@ -20,7 +20,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
20 20
 const service = axios.create({
21 21
   baseURL: process.env.VUE_APP_BASE_API,
22 22
   headers: {
23
-    'X-Frame-Options': 'SAMEORIGIN'
23
+    'X-Frame-Options': 'DENY'
24 24
   },
25 25
   // baseURL: "http://39.105.121.97:8080/api",
26 26
   // baseURL: "http://106.74.15.131:80/api",

+ 83 - 58
src/views/patientCenter/medical/yaChi.vue

@@ -3332,60 +3332,79 @@ export default {
3332 3332
       const ele = this.$refs.chiefComplaintText
3333 3333
       let text = null
3334 3334
       let newVal = ''
3335
-      Array.from(ele.children).forEach((item) => {
3336
-        const child = item.children[0]
3337
-        if (item.children[0].className === 'string') {
3338
-          newVal = newVal + child.textContent
3339
-        } else if (item.children[0].className === 'select') {
3340
-          newVal = newVal + child.children[0].value
3341
-        }
3342
-      })
3343
-      text = newVal.replace(/\s/g, '')
3335
+      if(JSON.stringify(this.chiefComplaintOptions) === "{}" && ele.innerText){
3336
+        text = ele.innerText
3337
+      }else {
3338
+        Array.from(ele.children).forEach((item) => {
3339
+          const child = item.children[0]
3340
+          if (item.children[0].className === 'string') {
3341
+            newVal = newVal + child.textContent
3342
+          } else if (item.children[0].className === 'select') {
3343
+            newVal = newVal + child.children[0].value
3344
+          }
3345
+        })
3346
+        text = newVal.replace(/\s/g, '')
3347
+      }
3348
+
3344 3349
       this.$emit('changeChiefComplaint', text)
3345 3350
     },
3346 3351
     changePresentIllness() {
3347 3352
       const ele = this.$refs.presentIllnessText
3348 3353
       let text = null
3349 3354
       let newVal = ''
3350
-      Array.from(ele.children).forEach((item) => {
3351
-        const child = item.children[0]
3352
-        if (item.children[0].className === 'string') {
3353
-          newVal = newVal + child.textContent
3354
-        } else if (item.children[0].className === 'select') {
3355
-          newVal = newVal + child.children[0].value
3356
-        }
3357
-      })
3358
-      text = newVal.replace(/\s/g, '')
3355
+
3356
+      if(JSON.stringify(this.presentIllnessOptions) === "{}" && ele.innerText){
3357
+        text = ele.innerText
3358
+      }else {
3359
+        Array.from(ele.children).forEach((item) => {
3360
+          const child = item.children[0]
3361
+          if (item.children[0].className === 'string') {
3362
+            newVal = newVal + child.textContent
3363
+          } else if (item.children[0].className === 'select') {
3364
+            newVal = newVal + child.children[0].value
3365
+          }
3366
+        })
3367
+        text = newVal.replace(/\s/g, '')
3368
+      }
3369
+
3359 3370
       this.$emit('changePresentIllness', text)
3360 3371
     },
3361 3372
     changeInspect() {
3362 3373
       const ele = this.$refs.inspectText
3363 3374
       let text = null
3364 3375
       let newVal = ''
3365
-      Array.from(ele.children).forEach((item) => {
3366
-        const child = item.children[0]
3367
-        if (item.children[0].className === 'string') {
3368
-          newVal = newVal + child.textContent
3369
-        } else if (item.children[0].className === 'select') {
3370
-          newVal = newVal + child.children[0].value
3371
-        }
3372
-      })
3373
-      text = newVal.replace(/\s/g, '')
3376
+      if(JSON.stringify(this.inspectOptions) === "{}" && ele.innerText){
3377
+        text = ele.innerText
3378
+      }else {
3379
+        Array.from(ele.children).forEach((item) => {
3380
+          const child = item.children[0]
3381
+          if (item.children[0].className === 'string') {
3382
+            newVal = newVal + child.textContent
3383
+          } else if (item.children[0].className === 'select') {
3384
+            newVal = newVal + child.children[0].value
3385
+          }
3386
+        })
3387
+        text = newVal.replace(/\s/g, '')
3388
+      }
3374 3389
       this.$emit('changeInspect', text)
3375 3390
     },
3376 3391
     changeDiagnosis() {
3377 3392
       const ele = this.$refs.diagnosisText
3378 3393
       let text = null
3379 3394
       let newVal = ''
3380
-      Array.from(ele.children).forEach((item) => {
3381
-        const child = item.children[0]
3382
-        if (item.children[0].className === 'string') {
3383
-          newVal = newVal + child.textContent
3384
-        } else if (item.children[0].className === 'select') {
3385
-          newVal = newVal + child.children[0].value
3386
-        }
3387
-      })
3388
-      text = newVal.replace(/\s/g, '')
3395
+      if(JSON.stringify(this.diagnosisOptions) === "{}" && ele.innerText){
3396
+        text = ele.innerText
3397
+      }else {
3398
+        Array.from(ele.children).forEach((item) => {
3399
+          const child = item.children[0]
3400
+          if (item.children[0].className === 'string') {
3401
+            newVal = newVal + child.textContent
3402
+          } else if (item.children[0].className === 'select') {
3403
+            newVal = newVal + child.children[0].value
3404
+          }
3405
+        })
3406
+        text = newVal.replace(/\s/g, '')
3407
+      }
3389 3408
       this.$emit('changeDiagnosis', text)
3390 3409
     },
3391 3410
     changeImageingInspect() {
@@ -3393,13 +3412,12 @@ export default {
3393 3412
       let text = null
3394 3413
       let newVal = ''
3395 3414
       
3396
-      if(ele.innerText){
3415
+      if(JSON.stringify(this.imageInspectOption) === "{}" && ele.innerText){
3397 3416
         text = ele.innerText
3398 3417
       }else {
3399 3418
         Array.from(ele.children).forEach((item) => {
3400 3419
           const child = item.children[0]
3401 3420
           if (item.children[0].className === 'string') {
3402
-            console.log(item.children[0],"newVal + child.textContent");
3403 3421
             newVal = newVal + child.textContent
3404 3422
           } else if (item.children[0].className === 'select') {
3405 3423
             newVal = newVal + child.children[0].value
@@ -3413,43 +3431,50 @@ export default {
3413 3431
       const ele = this.$refs.treatmentPlanningText
3414 3432
       let text = null
3415 3433
       let newVal = ''
3416
-      Array.from(ele.children).forEach((item) => {
3417
-        const child = item.children[0]
3418
-        if (item.children[0].className === 'string') {
3419
-          newVal = newVal + child.textContent
3420
-        } else if (item.children[0].className === 'select') {
3421
-          newVal = newVal + child.children[0].value
3422
-        }
3423
-      })
3424
-      text = newVal.replace(/\s/g, '')
3434
+      if(JSON.stringify(this.treatmentPlanningOptions) === "{}" && ele.innerText){
3435
+        text = ele.innerText
3436
+      }else {
3437
+        Array.from(ele.children).forEach((item) => {
3438
+          const child = item.children[0]
3439
+          if (item.children[0].className === 'string') {
3440
+            newVal = newVal + child.textContent
3441
+          } else if (item.children[0].className === 'select') {
3442
+            newVal = newVal + child.children[0].value
3443
+          }
3444
+        })
3445
+        text = newVal.replace(/\s/g, '')
3446
+      }
3425 3447
       this.$emit('changeTreatmentPlanning', text)
3426 3448
     },
3427 3449
     changeDispose() {
3428 3450
       const ele = this.$refs.disposeText
3429 3451
       let text = null
3430 3452
       let newVal = ''
3431
-      Array.from(ele.children).forEach((item) => {
3432
-        const child = item.children[0]
3433
-        if (item.children[0].className === 'string') {
3434
-          newVal = newVal + child.textContent
3435
-        } else if (item.children[0].className === 'select') {
3436
-          newVal = newVal + child.children[0].value
3437
-        }
3438
-      })
3439
-      text = newVal.replace(/\s/g, '')
3453
+      if(JSON.stringify(this.disposeOptions) === "{}" && ele.innerText){
3454
+        text = ele.innerText
3455
+      }else {
3456
+        Array.from(ele.children).forEach((item) => {
3457
+          const child = item.children[0]
3458
+          if (item.children[0].className === 'string') {
3459
+            newVal = newVal + child.textContent
3460
+          } else if (item.children[0].className === 'select') {
3461
+            newVal = newVal + child.children[0].value
3462
+          }
3463
+        })
3464
+        text = newVal.replace(/\s/g, '')
3465
+      }
3440 3466
       this.$emit('changeDispose', text)
3441 3467
     },
3442 3468
     changeNote() {
3443 3469
       const ele = this.$refs.noteText
3444 3470
       let text = null
3445 3471
       let newVal = ''
3446
-      if(ele.innerText){
3472
+      if(JSON.stringify(this.noteOptions) === "{}" && ele.innerText){
3447 3473
         text = ele.innerText
3448 3474
       }else {
3449 3475
         Array.from(ele.children).forEach((item) => {
3450 3476
           const child = item.children[0]
3451 3477
           if (item.children[0].className === 'string') {
3452
-            console.log(item.children[0],"newVal + child.textContent");
3453 3478
             newVal = newVal + child.textContent
3454 3479
           } else if (item.children[0].className === 'select') {
3455 3480
             newVal = newVal + child.children[0].value

+ 1 - 3
vue.config.js

@@ -33,9 +33,7 @@ module.exports = {
33 33
     port: port,
34 34
     open: true,
35 35
     headers: {
36
-      'X-Frame-Options': 'SAMEORIGIN', // 只允许同源嵌套
37
-      // 或者使用ALLOW-FROM
38
-      // 'X-Frame-Options': 'ALLOW-FROM https://your-allowed-domain.com/'
36
+      'X-Frame-Options': 'DENY', // 只允许同源嵌套
39 37
     },
40 38
     proxy: {
41 39
       // detail: https://cli.vuejs.org/config/#devserver-proxy