Browse Source

提交代码

陈少旭 1 year ago
parent
commit
b3e6420112
3 changed files with 112 additions and 23 deletions
  1. 25 0
      src/api/inspection.js
  2. 15 21
      src/xt_pages/user/inspection.vue
  3. 72 2
      src/xt_pages/user/inspectionCheck.vue

+ 25 - 0
src/api/inspection.js View File

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
 

+ 15 - 21
src/xt_pages/user/inspection.vue View File

238
               </el-radio-group>
238
               </el-radio-group>
239
             </el-form-item>
239
             </el-form-item>
240
           </el-col>
240
           </el-col>
241
-
242
-          <el-col :span="24">
243
-            <p style="margin-top:20px;">是否弹窗提醒:
244
-              <el-switch v-model="is_open"></el-switch>
245
-            </p>
246
-          </el-col>
247
         </el-row>
241
         </el-row>
248
       </el-form>
242
       </el-form>
249
       <div slot="footer" class="dialog-footer">
243
       <div slot="footer" class="dialog-footer">
888
               this.itemDate = this.form.inspect_date
882
               this.itemDate = this.form.inspect_date
889
               this.items = []
883
               this.items = []
890
               var inspections = response.data.data.inspections
884
               var inspections = response.data.data.inspections
891
-             
892
-              
885
+
886
+
893
               this.inspections = response.data.data.inspections
887
               this.inspections = response.data.data.inspections
894
               if (inspections == null) {
888
               if (inspections == null) {
895
                 this.inspections = []
889
                 this.inspections = []
903
                 this.inspectionsMap[inspections[index].item_id] =
897
                 this.inspectionsMap[inspections[index].item_id] =
904
                   inspections[index]
898
                   inspections[index]
905
               }
899
               }
906
-             
900
+
907
               var items = this.project.inspection_reference
901
               var items = this.project.inspection_reference
908
               console.log('itmes', items)
902
               console.log('itmes', items)
909
               for (var index in items) {
903
               for (var index in items) {
1166
       fetchInspectionReference(this.patientID).then(response => {
1160
       fetchInspectionReference(this.patientID).then(response => {
1167
           if (response.data.state == 1) {
1161
           if (response.data.state == 1) {
1168
             var reference = response.data.data.reference
1162
             var reference = response.data.data.reference
1169
-           
1163
+
1170
             var patient_info = response.data.data.patient_info
1164
             var patient_info = response.data.data.patient_info
1171
             this.projects = reference
1165
             this.projects = reference
1172
             this.patient_info = patient_info
1166
             this.patient_info = patient_info
1223
             console.log("inspections=========",inspections)
1217
             console.log("inspections=========",inspections)
1224
             console.log("时间",this.project.inspection_reference)
1218
             console.log("时间",this.project.inspection_reference)
1225
             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}
1226
-           
1220
+
1227
             this.total = response.data.data.total
1221
             this.total = response.data.data.total
1228
             this.itemDate = response.data.data.date
1222
             this.itemDate = response.data.data.date
1229
             let remind = response.data.data.remind
1223
             let remind = response.data.data.remind
1257
             var inspectionsMap = {}
1251
             var inspectionsMap = {}
1258
             this.inspectionsMap = {}
1252
             this.inspectionsMap = {}
1259
             for (var index in inspections) {
1253
             for (var index in inspections) {
1260
-             
1254
+
1261
               inspectionsMap[inspections[index].item_id] = inspections[index]
1255
               inspectionsMap[inspections[index].item_id] = inspections[index]
1262
               this.inspectionsMap[inspections[index].item_id] = inspections[index]
1256
               this.inspectionsMap[inspections[index].item_id] = inspections[index]
1263
             }
1257
             }
1264
-           
1258
+
1265
             var items = this.project.inspection_reference
1259
             var items = this.project.inspection_reference
1266
-           
1260
+
1267
             for (var index in items) {
1261
             for (var index in items) {
1268
               var item = {}
1262
               var item = {}
1269
               for (var key in items[index]) {
1263
               for (var key in items[index]) {
1270
-               
1264
+
1271
                 item[key] = items[index][key]
1265
                 item[key] = items[index][key]
1272
               }
1266
               }
1273
-             
1267
+
1274
               if (item.item_id > 0) {
1268
               if (item.item_id > 0) {
1275
-                
1269
+
1276
                 if (inspectionsMap[items[index].item_id] == undefined) {
1270
                 if (inspectionsMap[items[index].item_id] == undefined) {
1277
                   item.value = inspectionsMap[items[index].id].inspect_value
1271
                   item.value = inspectionsMap[items[index].id].inspect_value
1278
                   item.item_name = inspectionsMap[items[index].id].item_name
1272
                   item.item_name = inspectionsMap[items[index].id].item_name
1283
 
1277
 
1284
                 }
1278
                 }
1285
               } else {
1279
               } else {
1286
-              
1280
+
1287
                 item.value = inspectionsMap[items[index].id].inspect_value
1281
                 item.value = inspectionsMap[items[index].id].inspect_value
1288
                 item.item_name = inspectionsMap[items[index].id].item_name
1282
                 item.item_name = inspectionsMap[items[index].id].item_name
1289
 
1283
 
1290
               }
1284
               }
1291
-              
1285
+
1292
               item.value_direction = ''
1286
               item.value_direction = ''
1293
-           
1287
+
1294
               if (item.range_type == 1) {
1288
               if (item.range_type == 1) {
1295
                 var value = parseFloat(item.value)
1289
                 var value = parseFloat(item.value)
1296
                 var range_min = parseFloat(item.range_min)
1290
                 var range_min = parseFloat(item.range_min)
1301
                   item.value_direction = '↑'
1295
                   item.value_direction = '↑'
1302
                 }
1296
                 }
1303
               }
1297
               }
1304
-            
1298
+
1305
               this.items.push(item)
1299
               this.items.push(item)
1306
               console.log("item233333333333wo",this.items)
1300
               console.log("item233333333333wo",this.items)
1307
 
1301
 

+ 72 - 2
src/xt_pages/user/inspectionCheck.vue View File

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