瀏覽代碼

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

28169 1 年之前
父節點
當前提交
390fd582d1

+ 25 - 0
src/api/inspection.js 查看文件

78
 }
78
 }
79
 
79
 
80
 
80
 
81
+export function setRemind(params) {
82
+  return request({
83
+    url: '/api/patient/inspection_remind/set',
84
+    method: 'get',
85
+    params: params
86
+
87
+  })
88
+}
89
+
90
+export function setRemindDialog(id,is_open) {
91
+  return request({
92
+    url: '/api/checkremind/config/commit?is_open='+is_open+"&id="+id,
93
+    method: 'post'
94
+  })
95
+}
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
81
 
106
 
82
 
107
 
83
 
108
 

+ 1 - 1
src/views/layout/components/Sidebar/index.vue 查看文件

48
   },
48
   },
49
   created(){
49
   created(){
50
     if(this.navTitle == '透析管理'){
50
     if(this.navTitle == '透析管理'){
51
-      let nameArr = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control','dialysis_index'];
51
+      let nameArr = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control','dialysis_index','Dialysisanalysis'];
52
       // console.log('permission_routers',this.permission_routers)
52
       // console.log('permission_routers',this.permission_routers)
53
       let routerArr = [];
53
       let routerArr = [];
54
       this.permission_routers.map(item => {
54
       this.permission_routers.map(item => {

+ 196 - 24
src/xt_pages/user/inspection.vue 查看文件

40
         </el-col>
40
         </el-col>
41
         <el-col :span="17" v-loading="itemLoading">
41
         <el-col :span="17" v-loading="itemLoading">
42
           <div class="filter-container" style="float:right">
42
           <div class="filter-container" style="float:right">
43
+
44
+            <el-button
45
+              size="small"
46
+              class="filter-item"
47
+              type="primary"
48
+              @click="setRemindDialog()"
49
+              v-if="project && project.project_id != 14"
50
+              icon="el-icon-circle-plus-outline"
51
+              :disabled="project ? false : true"
52
+            >设置提醒弹窗
53
+            </el-button>
54
+
55
+            <el-button
56
+              size="small"
57
+              class="filter-item"
58
+              type="primary"
59
+              @click="setRemind()"
60
+              v-if="project && project.project_id != 14"
61
+              icon="el-icon-circle-plus-outline"
62
+              :disabled="project ? false : true"
63
+            >设置提醒周期
64
+            </el-button>
65
+
43
             <el-button
66
             <el-button
44
               size="small"
67
               size="small"
45
               class="filter-item"
68
               class="filter-item"
196
       </el-row>
219
       </el-row>
197
     </div>
220
     </div>
198
 
221
 
222
+    <el-dialog
223
+      :title="formTitle"
224
+      :visible.sync="dialogRemindFormVisible"
225
+      width="1000px"
226
+      id="user-inspection-form"
227
+    >
228
+      <el-form :model="form" ref="form" label-position="top">
229
+        <el-row>
230
+          <el-col :span="24">
231
+            <el-form-item label="周期提醒: ">
232
+              <el-radio-group v-model="temp_remind_cycle">
233
+                <el-radio :label="1">一月一次</el-radio>
234
+                <el-radio :label="2">两月一次</el-radio>
235
+                <el-radio :label="3">三月一次</el-radio>
236
+                <el-radio :label="4">半年一次</el-radio>
237
+                <el-radio :label="5">一年一次</el-radio>
238
+              </el-radio-group>
239
+            </el-form-item>
240
+          </el-col>
241
+        </el-row>
242
+      </el-form>
243
+      <div slot="footer" class="dialog-footer">
244
+        <el-button @click="dialogRemindFormVisible = false">取 消</el-button>
245
+        <el-button
246
+          type="primary"
247
+          @click="submitNewRemind()"
248
+        >保 存
249
+        </el-button
250
+        >
251
+      </div>
252
+    </el-dialog>
253
+
254
+    <el-dialog
255
+      :visible.sync="dialogRemindDialogFormVisible"
256
+      width="1000px"
257
+      id="user-inspection-form"
258
+    >
259
+      <el-col :span="24">
260
+        <p style="margin-top:20px;">是否弹窗提醒:
261
+          <el-switch v-model="is_open"></el-switch>
262
+        </p>
263
+      </el-col>
264
+      <div slot="footer" class="dialog-footer">
265
+        <el-button @click="dialogRemindDialogFormVisible = false">取 消</el-button>
266
+        <el-button
267
+          type="primary"
268
+          @click="submitRemindDialog()"
269
+        >保 存
270
+        </el-button
271
+        >
272
+      </div>
273
+    </el-dialog>
274
+
275
+
276
+
199
     <el-dialog
277
     <el-dialog
200
       :title="formTitle"
278
       :title="formTitle"
201
       :visible.sync="dialogFormVisible"
279
       :visible.sync="dialogFormVisible"
216
               </el-radio-group>
294
               </el-radio-group>
217
             </el-form-item>
295
             </el-form-item>
218
           </el-col>
296
           </el-col>
219
-
220
           <el-col :span="7">
297
           <el-col :span="7">
221
             <el-form-item
298
             <el-form-item
222
               label="检验日期"
299
               label="检验日期"
390
   DeletePatientInspection,
467
   DeletePatientInspection,
391
   EditPatientInspection,
468
   EditPatientInspection,
392
   fetchInspectionReference,
469
   fetchInspectionReference,
393
-  fetchPatientInspections
470
+  fetchPatientInspections,
471
+  setRemind,
472
+  setRemindDialog
394
 } from '@/api/inspection'
473
 } from '@/api/inspection'
395
 import { getFileExtension, uParseTime } from '@/utils/tools'
474
 import { getFileExtension, uParseTime } from '@/utils/tools'
396
 
475
 
399
   components: { PatientSidebar },
478
   components: { PatientSidebar },
400
   data() {
479
   data() {
401
     return {
480
     return {
481
+      temp_remind_cycle:"",
482
+      is_open:false,
483
+      record_id:0,
402
       total: 0,
484
       total: 0,
403
       qiniuDomain: 'https://images.shengws.com/',
485
       qiniuDomain: 'https://images.shengws.com/',
404
       isPic:false,
486
       isPic:false,
414
       },
496
       },
415
       itemName: '请选择项目',
497
       itemName: '请选择项目',
416
       formTitle: '',
498
       formTitle: '',
499
+      dialogRemindFormVisible:false,
500
+      dialogRemindDialogFormVisible:false,
417
       dialogPicFormVisible: false,
501
       dialogPicFormVisible: false,
418
       dialogFormVisible: false,
502
       dialogFormVisible: false,
419
       patient_info: null,
503
       patient_info: null,
579
         })
663
         })
580
         .catch(() => {
664
         .catch(() => {
581
         })
665
         })
582
-    },
583
-    openEdit() {
666
+    },submitRemindDialog(){
667
+      var temp_is_open = 0
668
+      if(this.is_open){
669
+        temp_is_open = 1
670
+      }else{
671
+        temp_is_open = 0
672
+      }
673
+      setRemindDialog(this.record_id,temp_is_open).then(response => {
674
+        if (response.data.state == 0) {
675
+          this.$message.error(response.data.msg)
676
+          return false
677
+        } else {
678
+          this.record_id = response.data.data.config.id
679
+          if(response.data.data.config.is_open == 1){
680
+            this.is_open = true
681
+          }else{
682
+            this.is_open = false
683
+          }
684
+          this.$notify({
685
+            title: '成功',
686
+            message: '设置成功',
687
+            type: 'success',
688
+            duration: 2000
689
+          })
690
+          this.dialogRemindDialogFormVisible = false
691
+        }
692
+      })
693
+    },submitNewRemind(){
694
+      // console.log(this.is_open)
695
+      var params = {
696
+        patient: this.patientID,
697
+        project_id: this.project.project_id,
698
+        remind_cycle: this.temp_remind_cycle
699
+      }
700
+      setRemind(params).then(response => {
701
+        if (response.data.state == 0) {
702
+          this.$message.error(response.data.msg)
703
+          return false
704
+        } else {
705
+          this.$notify({
706
+            title: '成功',
707
+            message: '设置成功',
708
+            type: 'success',
709
+            duration: 2000
710
+          })
711
+          this.dialogRemindFormVisible = false
712
+        }
713
+      })
714
+    }, openEdit() {
584
 
715
 
585
       if (this.project == null) {
716
       if (this.project == null) {
586
         this.$message.error('请先选择项目')
717
         this.$message.error('请先选择项目')
610
         this.form.project_id = this.project.project_id
741
         this.form.project_id = this.project.project_id
611
         this.form.inspect_date = this.itemDate
742
         this.form.inspect_date = this.itemDate
612
         this.form.old_inspect_date = this.itemDate
743
         this.form.old_inspect_date = this.itemDate
613
-        this.form.remind_cycle = this.patient_info.remind_cycle
744
+        if(this.form.project_id == 14) {
745
+          this.form.remind_cycle = this.patient_info.remind_cycle
746
+        }else{
747
+          this.form.remind_cycle =""
748
+        }
614
         console.log(this.form.remind_cycle)
749
         console.log(this.form.remind_cycle)
615
 
750
 
616
         this.form.formItem = []
751
         this.form.formItem = []
633
 
768
 
634
       }
769
       }
635
 
770
 
636
-    }, openPic() {
771
+    },setRemindDialog(){
772
+      this.dialogRemindDialogFormVisible = true
773
+
774
+
775
+    },setRemind(){
776
+      this.dialogRemindFormVisible = true
777
+      // this.temp_remind_cycle = this.
778
+
779
+    },openPic() {
637
       if (this.project == null) {
780
       if (this.project == null) {
638
         this.$message.error('请先选择项目')
781
         this.$message.error('请先选择项目')
639
         return false
782
         return false
644
       this.form.project_id = this.project.project_id
787
       this.form.project_id = this.project.project_id
645
       this.form.imgs=[]
788
       this.form.imgs=[]
646
       this.form.delete_imgs=[]
789
       this.form.delete_imgs=[]
647
-      this.form.remind_cycle = this.patient_info.remind_cycle
790
+      if(this.form.project_id == 14) {
791
+        this.form.remind_cycle = this.patient_info.remind_cycle
792
+      }
648
       var today = new Date()
793
       var today = new Date()
649
       this.form.inspect_date = uParseTime(today, '{y}-{m}-{d} {h}:{i}')
794
       this.form.inspect_date = uParseTime(today, '{y}-{m}-{d} {h}:{i}')
650
       this.form.formItem = []
795
       this.form.formItem = []
681
       this.form.method = 'add'
826
       this.form.method = 'add'
682
       this.formTitle = '新增' + this.project.project_name
827
       this.formTitle = '新增' + this.project.project_name
683
       this.form.project_id = this.project.project_id
828
       this.form.project_id = this.project.project_id
684
-      this.form.remind_cycle = this.patient_info.remind_cycle
829
+      if(this.form.project_id == 14) {
830
+        this.form.remind_cycle = this.patient_info.remind_cycle
831
+      }
832
+      // this.form.remind_cycle = this.patient_info.remind_cycle
685
       var today = new Date()
833
       var today = new Date()
686
       this.form.inspect_date = uParseTime(today, '{y}-{m}-{d} {h}:{i}')
834
       this.form.inspect_date = uParseTime(today, '{y}-{m}-{d} {h}:{i}')
687
       this.form.formItem = []
835
       this.form.formItem = []
734
               this.itemDate = this.form.inspect_date
882
               this.itemDate = this.form.inspect_date
735
               this.items = []
883
               this.items = []
736
               var inspections = response.data.data.inspections
884
               var inspections = response.data.data.inspections
737
-             
738
-              
885
+
886
+
739
               this.inspections = response.data.data.inspections
887
               this.inspections = response.data.data.inspections
740
               if (inspections == null) {
888
               if (inspections == null) {
741
                 this.inspections = []
889
                 this.inspections = []
749
                 this.inspectionsMap[inspections[index].item_id] =
897
                 this.inspectionsMap[inspections[index].item_id] =
750
                   inspections[index]
898
                   inspections[index]
751
               }
899
               }
752
-             
900
+
753
               var items = this.project.inspection_reference
901
               var items = this.project.inspection_reference
754
               console.log('itmes', items)
902
               console.log('itmes', items)
755
               for (var index in items) {
903
               for (var index in items) {
1012
       fetchInspectionReference(this.patientID).then(response => {
1160
       fetchInspectionReference(this.patientID).then(response => {
1013
           if (response.data.state == 1) {
1161
           if (response.data.state == 1) {
1014
             var reference = response.data.data.reference
1162
             var reference = response.data.data.reference
1015
-           
1163
+
1016
             var patient_info = response.data.data.patient_info
1164
             var patient_info = response.data.data.patient_info
1017
             this.projects = reference
1165
             this.projects = reference
1018
             this.patient_info = patient_info
1166
             this.patient_info = patient_info
1019
             this.pageLoading = false
1167
             this.pageLoading = false
1020
-            this.form.remind_cycle = this.patient_info.remind_cycle
1168
+
1169
+            // this.form.remind_cycle = this.patient_info.remind_cycle
1021
           } else {
1170
           } else {
1022
             this.$message.error(response.data.msg)
1171
             this.$message.error(response.data.msg)
1023
             return false
1172
             return false
1068
             console.log("inspections=========",inspections)
1217
             console.log("inspections=========",inspections)
1069
             console.log("时间",this.project.inspection_reference)
1218
             console.log("时间",this.project.inspection_reference)
1070
             var obj = {created_time:0,inspect_date:0,inspect_desc:"",inspect_tips:"",inspect_type:1,inspect_value:"",item_id:11063,item_name:"",org_id:0,patient_id:"",project_id:4,project_name:"",updated_time:"",status:1}
1219
             var obj = {created_time:0,inspect_date:0,inspect_desc:"",inspect_tips:"",inspect_type:1,inspect_value:"",item_id:11063,item_name:"",org_id:0,patient_id:"",project_id:4,project_name:"",updated_time:"",status:1}
1071
-           
1220
+
1072
             this.total = response.data.data.total
1221
             this.total = response.data.data.total
1073
             this.itemDate = response.data.data.date
1222
             this.itemDate = response.data.data.date
1223
+            let remind = response.data.data.remind
1224
+
1225
+            let config = response.data.data.config
1226
+            this.record_id = config.id
1227
+            if(config.id > 0){
1228
+
1229
+              if(config.is_open == 1){
1230
+                this.is_open = true
1231
+              }else{
1232
+                this.is_open = false
1233
+
1234
+              }
1235
+            }else{
1236
+              this.is_open = false
1237
+            }
1238
+
1239
+
1240
+            if(remind.id > 0 && remind.remind_cycle > 0){
1241
+              this.temp_remind_cycle = remind.remind_cycle
1242
+            }else{
1243
+              this.temp_remind_cycle = ""
1244
+            }
1245
+
1074
             this.inspections = response.data.data.inspections
1246
             this.inspections = response.data.data.inspections
1075
             if (inspections == null) {
1247
             if (inspections == null) {
1076
               this.inspections = []
1248
               this.inspections = []
1079
             var inspectionsMap = {}
1251
             var inspectionsMap = {}
1080
             this.inspectionsMap = {}
1252
             this.inspectionsMap = {}
1081
             for (var index in inspections) {
1253
             for (var index in inspections) {
1082
-             
1254
+
1083
               inspectionsMap[inspections[index].item_id] = inspections[index]
1255
               inspectionsMap[inspections[index].item_id] = inspections[index]
1084
               this.inspectionsMap[inspections[index].item_id] = inspections[index]
1256
               this.inspectionsMap[inspections[index].item_id] = inspections[index]
1085
             }
1257
             }
1086
-           
1258
+
1087
             var items = this.project.inspection_reference
1259
             var items = this.project.inspection_reference
1088
-           
1260
+
1089
             for (var index in items) {
1261
             for (var index in items) {
1090
               var item = {}
1262
               var item = {}
1091
               for (var key in items[index]) {
1263
               for (var key in items[index]) {
1092
-               
1264
+
1093
                 item[key] = items[index][key]
1265
                 item[key] = items[index][key]
1094
               }
1266
               }
1095
-             
1267
+
1096
               if (item.item_id > 0) {
1268
               if (item.item_id > 0) {
1097
-                
1269
+
1098
                 if (inspectionsMap[items[index].item_id] == undefined) {
1270
                 if (inspectionsMap[items[index].item_id] == undefined) {
1099
                   item.value = inspectionsMap[items[index].id].inspect_value
1271
                   item.value = inspectionsMap[items[index].id].inspect_value
1100
                   item.item_name = inspectionsMap[items[index].id].item_name
1272
                   item.item_name = inspectionsMap[items[index].id].item_name
1105
 
1277
 
1106
                 }
1278
                 }
1107
               } else {
1279
               } else {
1108
-              
1280
+
1109
                 item.value = inspectionsMap[items[index].id].inspect_value
1281
                 item.value = inspectionsMap[items[index].id].inspect_value
1110
                 item.item_name = inspectionsMap[items[index].id].item_name
1282
                 item.item_name = inspectionsMap[items[index].id].item_name
1111
 
1283
 
1112
               }
1284
               }
1113
-              
1285
+
1114
               item.value_direction = ''
1286
               item.value_direction = ''
1115
-           
1287
+
1116
               if (item.range_type == 1) {
1288
               if (item.range_type == 1) {
1117
                 var value = parseFloat(item.value)
1289
                 var value = parseFloat(item.value)
1118
                 var range_min = parseFloat(item.range_min)
1290
                 var range_min = parseFloat(item.range_min)
1123
                   item.value_direction = '↑'
1295
                   item.value_direction = '↑'
1124
                 }
1296
                 }
1125
               }
1297
               }
1126
-            
1298
+
1127
               this.items.push(item)
1299
               this.items.push(item)
1128
               console.log("item233333333333wo",this.items)
1300
               console.log("item233333333333wo",this.items)
1129
 
1301
 

+ 72 - 2
src/xt_pages/user/inspectionCheck.vue 查看文件

40
         </el-col>
40
         </el-col>
41
         <el-col :span="17" v-loading="itemLoading">
41
         <el-col :span="17" v-loading="itemLoading">
42
           <div class="filter-container" style="float:right">
42
           <div class="filter-container" style="float:right">
43
+            <el-button
44
+              size="small"
45
+              class="filter-item"
46
+              type="primary"
47
+              @click="setRemind()"
48
+              v-if="project && project.project_id != 14"
49
+              icon="el-icon-circle-plus-outline"
50
+              :disabled="project ? false : true"
51
+            >设置提醒周期
52
+            </el-button>
43
             <el-button
53
             <el-button
44
               size="small"
54
               size="small"
45
               class="filter-item"
55
               class="filter-item"
280
         </el-button>
290
         </el-button>
281
       </div>
291
       </div>
282
     </el-dialog>
292
     </el-dialog>
293
+
294
+    <el-dialog
295
+      :title="formTitle"
296
+      :visible.sync="dialogRemindFormVisible"
297
+      width="1000px"
298
+      id="user-inspection-form"
299
+    >
300
+      <el-form :model="form" ref="form" label-position="top">
301
+        <el-row>
302
+          <el-col :span="24">
303
+            <el-form-item label="周期提醒: ">
304
+              <el-radio-group v-model="temp_remind_cycle">
305
+                <el-radio :label="1">一月一次</el-radio>
306
+                <el-radio :label="2">两月一次</el-radio>
307
+                <el-radio :label="3">三月一次</el-radio>
308
+                <el-radio :label="4">半年一次</el-radio>
309
+                <el-radio :label="5">一年一次</el-radio>
310
+              </el-radio-group>
311
+            </el-form-item>
312
+          </el-col>
313
+        </el-row>
314
+      </el-form>
315
+      <div slot="footer" class="dialog-footer">
316
+        <el-button @click="dialogRemindFormVisible = false">取 消</el-button>
317
+        <el-button
318
+          type="primary"
319
+          @click="submitNewRemind()"
320
+        >保 存
321
+        </el-button
322
+        >
323
+      </div>
324
+    </el-dialog>
325
+
283
   </div>
326
   </div>
284
 
327
 
285
 </template>
328
 </template>
295
   DeletePatientInspection,
338
   DeletePatientInspection,
296
   EditPatientInspection,
339
   EditPatientInspection,
297
   fetchInspectionReference,
340
   fetchInspectionReference,
298
-  fetchPatientInspections
341
+  fetchPatientInspections,
342
+  setRemind
299
 } from '@/api/inspection'
343
 } from '@/api/inspection'
300
 import { getFileExtension, uParseTime } from '@/utils/tools'
344
 import { getFileExtension, uParseTime } from '@/utils/tools'
301
 
345
 
304
   components: { PatientSidebar },
348
   components: { PatientSidebar },
305
   data() {
349
   data() {
306
     return {
350
     return {
351
+      temp_remind_cycle:"",
307
       total: 0,
352
       total: 0,
308
       check_content:"",
353
       check_content:"",
309
       qiniuDomain: 'https://images.shengws.com/',
354
       qiniuDomain: 'https://images.shengws.com/',
322
       formTitle: '',
367
       formTitle: '',
323
       dialogPicFormVisible: false,
368
       dialogPicFormVisible: false,
324
       dialogFormVisible: false,
369
       dialogFormVisible: false,
370
+      dialogRemindFormVisible:false,
325
       patient_info: null,
371
       patient_info: null,
326
 
372
 
327
       form: {
373
       form: {
411
       this.$message.error(err)
457
       this.$message.error(err)
412
       this.loading.close()
458
       this.loading.close()
413
       return false
459
       return false
460
+    },submitNewRemind(){
461
+      var params = {
462
+        patient: this.patientID,
463
+        project_id: this.project.project_id,
464
+        remind_cycle: this.temp_remind_cycle
465
+      }
466
+      setRemind(params).then(response => {
467
+        if (response.data.state == 0) {
468
+          this.$message.error(response.data.msg)
469
+          return false
470
+        } else {
471
+          this.$notify({
472
+            title: '成功',
473
+            message: '设置成功',
474
+            type: 'success',
475
+            duration: 2000
476
+          })
477
+          this.dialogRemindFormVisible = false
478
+        }
479
+      })
414
     },
480
     },
415
     handleAvatarSuccess(res, file) {
481
     handleAvatarSuccess(res, file) {
416
       this.form.imgs.push({
482
       this.form.imgs.push({
539
 
605
 
540
       }
606
       }
541
 
607
 
542
-    }, openPic() {
608
+    }, setRemind(){
609
+      this.dialogRemindFormVisible = true
610
+      // this.temp_remind_cycle = this.
611
+
612
+    },openPic() {
543
       if (this.project == null) {
613
       if (this.project == null) {
544
         this.$message.error('请先选择项目')
614
         this.$message.error('请先选择项目')
545
         return false
615
         return false