Sfoglia il codice sorgente

Merge branch 'master' of http://git.shengws.com/csx/Vue_New

See999 4 anni fa
parent
commit
3cf3cc92cf

+ 1 - 2
config/dev.env.js Vedi File

@@ -6,9 +6,8 @@
6 6
 module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9
-  //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
9
+  BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10 10
   // BASE_API:'"http://localhost:9531"',
11
-  BASE_API: '"http://api.xt.test.sgjyun.com"',
12 11
   SSO_HOST: '"http://testsso.sgjyun.com"',
13 12
   SRCM_HOST: '"http://test1.sgjyun.com"',
14 13
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 10 - 0
src/api/config.js Vedi File

@@ -109,6 +109,16 @@ export function changeOrg(params) {
109 109
 
110 110
 
111 111
 
112
+export function generateLog(params) {
113
+  return request({
114
+    url: '/api/log/generate',
115
+    method: 'get',
116
+    params:params,
117
+  })
118
+}
119
+
120
+
121
+
112 122
 
113 123
 
114 124
 

+ 19 - 0
src/api/patient.js Vedi File

@@ -344,3 +344,22 @@ export function getAllData(id, page, limit) {
344 344
     params: params
345 345
   })
346 346
 }
347
+
348
+
349
+export function postExportPatients(params) {
350
+  return request({
351
+    url: '/api/patients/export',
352
+    method: 'Post',
353
+    data: params,
354
+  })
355
+}
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+

+ 27 - 0
src/api/schedule.js Vedi File

@@ -86,3 +86,30 @@ export function getScheduleWeekDay(params) {
86 86
     params: params
87 87
   })
88 88
 }
89
+
90
+
91
+export function exportSchedule(params,date) {
92
+  return request({
93
+    url: '/api/schedule/export?date='+date,
94
+    method: 'Post',
95
+    data: params
96
+  })
97
+}
98
+
99
+
100
+export function initDate() {
101
+  return request({
102
+    url: '/api/excel_date/init',
103
+    method: 'Get',
104
+  })
105
+}
106
+
107
+
108
+export function exportScheduleTemplate(params) {
109
+  return request({
110
+    url: '/api/schedule_template/export',
111
+    method: 'Post',
112
+    data: params
113
+  })
114
+}
115
+

+ 20 - 5
src/vendor/Export2Excel.js Vedi File

@@ -1,6 +1,5 @@
1 1
 /* eslint-disable */
2
-require('script-loader!file-saver');
3
-require('script-loader!@/vendor/Blob');
2
+import { saveAs } from 'file-saver'
4 3
 import XLSX from 'xlsx'
5 4
 
6 5
 function generateArray(table) {
@@ -146,19 +145,35 @@ export function export_table_to_excel(id) {
146 145
 }
147 146
 
148 147
 export function export_json_to_excel({
148
+  multiHeader = [],
149 149
   header,
150 150
   data,
151 151
   filename,
152
-  autoWidth = true
152
+  merges = [],
153
+  autoWidth = true,
154
+  bookType = 'xlsx'
153 155
 } = {}) {
154 156
   /* original data */
155 157
   filename = filename || 'excel-list'
156 158
   data = [...data]
157 159
   data.unshift(header);
160
+
161
+  for (let i = multiHeader.length - 1; i > -1; i--) {
162
+    data.unshift(multiHeader[i])
163
+  }
164
+
158 165
   var ws_name = "SheetJS";
159 166
   var wb = new Workbook(),
160 167
     ws = sheet_from_array_of_arrays(data);
161 168
 
169
+  if (merges.length > 0) {
170
+    if (!ws['!merges']) ws['!merges'] = [];
171
+    merges.forEach(item => {
172
+      console.log(XLSX.utils.decode_range(item))
173
+      ws['!merges'].push(XLSX.utils.decode_range(item))
174
+    })
175
+  }
176
+
162 177
   if (autoWidth) {
163 178
     /*设置worksheet每列的最大宽度*/
164 179
     const colWidth = data.map(row => row.map(val => {
@@ -196,11 +211,11 @@ export function export_json_to_excel({
196 211
   wb.Sheets[ws_name] = ws;
197 212
 
198 213
   var wbout = XLSX.write(wb, {
199
-    bookType: 'xlsx',
214
+    bookType: bookType,
200 215
     bookSST: false,
201 216
     type: 'binary'
202 217
   });
203 218
   saveAs(new Blob([s2ab(wbout)], {
204 219
     type: "application/octet-stream"
205
-  }), filename + ".xlsx");
220
+  }), `${filename}.${bookType}`);
206 221
 }

+ 143 - 0
src/xt_pages/components/UploadExcel/index.vue Vedi File

@@ -0,0 +1,143 @@
1
+<template>
2
+  <div>
3
+    <input id="excel-upload-input" ref="excel-upload-input" type="file" accept=".xlsx, .xls, .xltx" @change="handleClick">
4
+    <el-button :loading="loading" style="margin-left:16px;" size="mini" type="primary" @click="handleUpload">点击导入
5
+    </el-button>
6
+  </div>
7
+</template>
8
+
9
+<script>
10
+  import XLSX from 'xlsx'
11
+
12
+  export default {
13
+    props: {
14
+      beforeUpload: Function,
15
+      onSuccess: Function
16
+    },
17
+    data() {
18
+      return {
19
+        loading: false,
20
+        excelData: {
21
+          header: null,
22
+          results: null
23
+        }
24
+      }
25
+    },
26
+    methods: {
27
+      generateDate({ header, results }) {
28
+        console.log("11111111")
29
+        this.excelData.header = header
30
+        this.excelData.results = results
31
+        this.onSuccess && this.onSuccess(this.excelData)
32
+      },
33
+      handleDrop(e) {
34
+        e.stopPropagation()
35
+        e.preventDefault()
36
+        if (this.loading) return
37
+        const files = e.dataTransfer.files
38
+        if (files.length !== 1) {
39
+          this.$message.error('Only support uploading one file!')
40
+          return
41
+        }
42
+        const rawFile = files[0] // only use files[0]
43
+
44
+        if (!this.isExcel(rawFile)) {
45
+          this.$message.error('Only supports upload .xlsx, .xls, .csv suffix files')
46
+          return false
47
+        }
48
+        this.upload(rawFile)
49
+        e.stopPropagation()
50
+        e.preventDefault()
51
+      },
52
+      handleDragover(e) {
53
+        e.stopPropagation()
54
+        e.preventDefault()
55
+        e.dataTransfer.dropEffect = 'copy'
56
+      },
57
+      handleUpload() {
58
+        document.getElementById('excel-upload-input').click()
59
+      },
60
+      handleClick(e) {
61
+        const files = e.target.files
62
+        const rawFile = files[0] // only use files[0]
63
+        if (!rawFile) return
64
+        this.upload(rawFile)
65
+      },
66
+      upload(rawFile) {
67
+        this.$refs['excel-upload-input'].value = null // fix can't select the same excel
68
+
69
+        if (!this.beforeUpload) {
70
+          this.readerData(rawFile)
71
+          return
72
+        }
73
+        const before = this.beforeUpload(rawFile)
74
+        if (before) {
75
+          this.readerData(rawFile)
76
+        }
77
+      },
78
+      readerData(rawFile) {
79
+        this.loading = true
80
+        return new Promise((resolve, reject) => {
81
+          const reader = new FileReader()
82
+          reader.onload = e => {
83
+            const data = e.target.result
84
+            const fixedData = this.fixdata(data)
85
+            const workbook = XLSX.read(btoa(fixedData), { type: 'base64' })
86
+            const firstSheetName = workbook.SheetNames[0]
87
+            const worksheet = workbook.Sheets[firstSheetName]
88
+            const header = this.get_header_row(worksheet)
89
+            const results = XLSX.utils.sheet_to_json(worksheet)
90
+            this.generateDate({ header, results })
91
+            this.loading = false
92
+            resolve()
93
+          }
94
+          reader.readAsArrayBuffer(rawFile)
95
+        })
96
+      },
97
+      fixdata(data) {
98
+        let o = ''
99
+        let l = 0
100
+        const w = 10240
101
+        for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
102
+        o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
103
+        return o
104
+      },
105
+      get_header_row(sheet) {
106
+        const headers = []
107
+        const range = XLSX.utils.decode_range(sheet['!ref'])
108
+        let C
109
+        const R = range.s.r /* start in the first row */
110
+        for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */
111
+          var cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })] /* find the cell in the first row */
112
+          var hdr = 'UNKNOWN ' + C // <-- replace with your desired default
113
+          if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
114
+          headers.push(hdr)
115
+        }
116
+        return headers
117
+      },
118
+      isExcel(file) {
119
+        return /\.(xlsx|xls|csv)$/.test(file.name)
120
+      }
121
+    }
122
+  }
123
+</script>
124
+
125
+<style scoped>
126
+  #excel-upload-input {
127
+    display: none;
128
+    z-index: -9999;
129
+  }
130
+
131
+  #drop {
132
+    border: 2px dashed #bbb;
133
+    width: 600px;
134
+    height: 160px;
135
+    line-height: 160px;
136
+    margin: 0 auto;
137
+    font-size: 24px;
138
+    border-radius: 5px;
139
+    text-align: center;
140
+    color: #bbb;
141
+    position: relative;
142
+  }
143
+</style>

+ 1 - 1
src/xt_pages/data/prescription.vue Vedi File

@@ -688,7 +688,7 @@ export default {
688 688
         // },
689 689
         // {
690 690
         //   id: 17,
691
-        //   name: "HDF前置换", 
691
+        //   name: "HDF前置换",
692 692
         //   dialysis_duration: 1,
693 693
         //   replacement_way: 1,
694 694
         //   hemodialysis_machine: 2,

+ 1 - 3
src/xt_pages/data/printTemplate.vue Vedi File

@@ -227,9 +227,7 @@ export default {
227 227
               // 同步
228 228
               // console.log(response.data.data.fileds)
229 229
               this.loading = false;
230
-              // store
231
-              //   .dispatch("updateAllFiledConfigList", response.data.data.fileds)
232
-              //   .then(() => {});
230
+               store.dispatch("updateAllFiledConfigList", response.data.data.fileds).then(() => {});
233 231
               this.$message({
234 232
                 type: "success",
235 233
                 message: "切换成功"

+ 24 - 16
src/xt_pages/dialysis/batch_print/batch_print_order_eight.vue Vedi File

@@ -31,12 +31,12 @@
31 31
                       {{ getTime(record.schedule_date, "{y}-{m}-{d}") }}
32 32
                     </span>
33 33
                   </td>
34
-                  <td style="text-align:center;">
34
+                  <td style="text-align:center">
35 35
                     姓名:<span style="display:inline-block;margin-left:10px;">
36 36
                        {{ record.patient.name }}
37 37
                     </span>
38 38
                   </td>
39
-                  <td style="text-align:center;">
39
+                  <td style="text-align:center;width:100px">
40 40
                     性别:<span
41 41
                       style="display:inline-block;margin-left:10px;"
42 42
                     >
@@ -55,7 +55,7 @@
55 55
                    &nbsp;
56 56
                      <check-box text="住院" :checked="record.receive_assessment.condition == 2"></check-box>
57 57
                   </td>
58
-                  <td style="text-align:center;">
58
+                  <td style="text-align:center;width:160px"">
59 59
                     住院号:<span style="display:inline-block;margin-left:10px;">
60 60
                        {{record.receive_assessment.admission_number?record.receive_assessment.admission_number:"/"}}
61 61
                     </span>
@@ -132,7 +132,7 @@
132 132
                       }}kg</span
133 133
                     >
134 134
                   </td>
135
-                  <td style="text-align:left;" colspan="1">
135
+                  <td style="text-align:left;" colspan="2">
136 136
                     <span style="display:inline-block;margin-left:15px;"
137 137
                       >电导率:{{record.prescription.conductivity?record.prescription.conductivity:"0"}}(mS/cm)</span
138 138
                     >
@@ -223,7 +223,7 @@
223 223
                       {{record.assessment_after_dislysis.actual_ultrafiltration?record.assessment_after_dislysis.actual_ultrafiltration:"0"}}
224 224
                       </span>&nbsp;L
225 225
                   </td>
226
-                   <td style="text-align:left;" colspan="2">
226
+                   <td style="text-align:left;" colspan="3">
227 227
                     <span style="display:inline-block;margin-left:15px;"
228 228
                       >透析时间:
229 229
                      {{
@@ -247,7 +247,7 @@
247 247
                         }}
248 248
                       </span>&nbsp;L
249 249
                   </td>
250
-                   <td style="text-align:left;" colspan="2">
250
+                   <td style="text-align:left;" colspan="1">
251 251
                     <span style="display:inline-block;margin-left:15px;"
252 252
                       >置换方式:
253 253
                        <label-box
@@ -273,7 +273,7 @@
273 273
                 </tr>
274 274
                 <tr>
275 275
                   <td style="text-align:left;">
276
-                    <span style="display:inline-block;margin-left:15px;"
276
+                    <span style="display:inline-block;margin-left:15px;display:flex;align-items:center;height:36px;"
277 277
                       >责任护士:
278 278
                        <span
279 279
                             v-if="
@@ -359,9 +359,10 @@
359 359
                       </span>
360 360
                   </td>
361 361
                   <td style="text-align:left;" colspan="3">
362
-                    <span style="display:inline-block;margin-left:15px;"
362
+                    <span style="display:inline-block;margin-left:15px;display:flex;align-items:center;height:36px;"
363 363
                       >医生签名:
364 364
                        <span
365
+                           
365 366
                             v-if="
366 367
                               !record.advices ||
367 368
                                 typeof record.advices[0] == 'undefined' ||
@@ -382,7 +383,9 @@
382 383
                               )
383 384
                             }}</span
384 385
                           >
386
+                          
385 387
                           <img
388
+                            v-else
386 389
                             class="es-img"
387 390
                             :src="
388 391
                               setAdminUserES(
@@ -392,10 +395,7 @@
392 395
                             "
393 396
                             alt=""
394 397
                             srcset=""
395
-                            v-else
396
-                            style="height: 30px;"
397
-                          />  </span
398
-                    >
398
+                            style="height: 30px;"/> </span> 
399 399
                   </td>
400 400
                 </tr>
401 401
                 <tr>
@@ -607,13 +607,13 @@
607 607
                             <label-box
608 608
                               showValue="好"
609 609
                               :isChecked="
610
-                                record.assessment_before_dislysis.catheter.indexOf('畅度-好') > -1 ? true : false
610
+                                record.assessment_before_dislysis.catheter.indexOf('畅度-好') > -1 ? true : false
611 611
                               "
612 612
                             ></label-box>
613 613
                             <label-box
614 614
                               showValue="差"
615 615
                               :isChecked="
616
-                                record.assessment_before_dislysis.catheter.indexOf('畅度-差') > -1 ? true : false
616
+                                record.assessment_before_dislysis.catheter.indexOf('畅度-差') > -1 ? true : false
617 617
                               "
618 618
                             ></label-box>
619 619
                             &nbsp;&nbsp;溶栓:
@@ -992,6 +992,14 @@
992 992
                     : false
993 993
                 "
994 994
                 showValue="腹痛"
995
+              ></label-box>
996
+                <label-box
997
+                :isChecked="
998
+                  record.assessment_after_dislysis.complication.indexOf('肌肉痉挛') > -1
999
+                    ? true
1000
+                    : false
1001
+                "
1002
+                showValue="肌肉痉挛"
995 1003
               ></label-box>
996 1004
               <label-box
997 1005
                 :isChecked="
@@ -1070,8 +1078,8 @@
1070 1078
            </span>
1071 1079
          </td>
1072 1080
          <td style="text-align:left;" >
1073
-           <span>下机护士:
1074
-              <span v-if="setAdminUserES(record.dialysis_order, 'finish_nurse') == ''">{{getAdminUser(record.dialysis_order, 'finish_nurse')}}</span>
1081
+           <span style="display:flex;align-items:center;height:36px;">下机护士:
1082
+              <span  v-if="setAdminUserES(record.dialysis_order, 'finish_nurse') == ''">{{getAdminUser(record.dialysis_order, 'finish_nurse')}}</span>
1075 1083
                 <img class="es-img" :src="setAdminUserES(record.dialysis_order, 'finish_nurse')" alt=""
1076 1084
               srcset="" v-else style="height: 30px;">
1077 1085
            </span>

+ 1 - 0
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue Vedi File

@@ -952,6 +952,7 @@
952 952
       this.hemorrhage = getDataConfig('hemodialysis', 'hemorrhage')
953 953
       this.blood_access_part = getDataConfig('hemodialysis', 'vascular_access')
954 954
       this.blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
955
+      //console.log("血管通路部位",this.blood_access_part_opera)
955 956
       this.internal_fistula = getDataConfig('hemodialysis', 'internal_fistula')
956 957
       this.internal_fistula_skin = getDataConfig('hemodialysis', 'internal_fistula_skin')
957 958
       this.puncture_method = getDataConfig('hemodialysis', 'puncture_method')

+ 0 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Vedi File

@@ -1602,7 +1602,6 @@ export default {
1602 1602
       //入口
1603 1603
       var pre = pre;
1604 1604
       console.log("pre是----", pre);
1605
-      console.log("pre-------------", pre.mode_id);
1606 1605
       if (pre.mode_id == 2 || pre.mode_id == 5 || pre.mode_id == 12) {
1607 1606
         this.zhiShow = true;
1608 1607
         this.huShow = true;

+ 18 - 0
src/xt_pages/dialysis/details/index.vue Vedi File

@@ -540,9 +540,21 @@ export default {
540 540
           var patient = resp.data.patient; // 患者信息
541 541
           var schedual = resp.data.schedual; // 患者排班信息
542 542
           var prescription = resp.data.prescription; // 透析处方
543
+          if(prescription!=null){
544
+              if(prescription.body_fluid == -2 ){
545
+                 prescription.body_fluid = 0
546
+             }
547
+          }
548
+          console.log("透析处方",prescription)
543 549
           var solution = resp.data.solution; // 透析方案
544 550
           var receiver_treatment_access = resp.data.receiver_treatment_access; // 接诊评估
545 551
           var predialysis_evaluation = resp.data.predialysis_evaluation; // 透前评估
552
+          console.log("透前评估",predialysis_evaluation)
553
+           if(predialysis_evaluation !=null){
554
+             if(predialysis_evaluation.blood_access_part_id == -2){
555
+                predialysis_evaluation.blood_access_part_id = 0
556
+             }
557
+           }
546 558
           var doctor_advices = resp.data.doctor_advices; // 临时医嘱
547 559
           //console.log("力气-------", doctor_advices);
548 560
           var double_check = resp.data.double_check; // 双人核对
@@ -567,6 +579,12 @@ export default {
567 579
           var aliquid_info = resp.data.aliquid_info;
568 580
 
569 581
           var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation;
582
+          console.log("上次透前评估",lastPredialysisEvaluation)
583
+          if(lastPredialysisEvaluation !=null){
584
+             if(lastPredialysisEvaluation.blood_access_part_id == -2){
585
+               lastPredialysisEvaluation.blood_access_part_id = 0
586
+             }
587
+          }
570 588
           var lastMonitorRecord = resp.data.lastMonitorRecord;
571 589
           var lastAssessmentAfterDislysis =
572 590
             resp.data.lastAssessmentAfterDislysis;

File diff suppressed because it is too large
+ 654 - 134
src/xt_pages/dialysis/template/DialysisPrintOrderEight.vue


+ 109 - 37
src/xt_pages/qcd/statisticalConfiguration.vue Vedi File

@@ -15,9 +15,11 @@
15 15
       </el-row>
16 16
       <div class="configTable">
17 17
         <el-table :data="tableData" border style="width: 100%">
18
-          <el-table-column prop="date" label="日期" width="180"></el-table-column>
19
-          <el-table-column prop="name" label="姓名" width="180"></el-table-column>
20
-          <el-table-column prop="address" label="地址"></el-table-column>
18
+          <el-table-column prop="date" label="检验检查大项" width="180"></el-table-column>
19
+          <el-table-column prop="name" label="检查小项" width="180"></el-table-column>
20
+          <el-table-column prop="address" label="范围"></el-table-column>
21
+           <el-table-column prop="address" label="单位"></el-table-column>
22
+            <el-table-column prop="address" label="排序"></el-table-column>
21 23
           <el-table-column label="操作" width="180">
22 24
             <template slot-scope="scope">
23 25
               <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
@@ -28,59 +30,79 @@
28 30
       </div>
29 31
 
30 32
       <el-dialog title="新增" :visible.sync="newDialog">
31
-        <el-form :model="form">
32
-          <el-form-item label="检查大项" :label-width="formLabelWidth">
33
-            <el-select v-model="form.region" placeholder="请选择活动区域">
34
-              <el-option label="区域一" value="shanghai"></el-option>
35
-              <el-option label="区域二" value="beijing"></el-option>
33
+        <el-form :model="form" ref="form" :rules="rules">
34
+          <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
35
+            <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域" @change="changeInspection">
36
+               <el-option
37
+                  v-for="item in InspectionMajor"
38
+                  :key="item.project_id"
39
+                  :value="item.project_id"
40
+                  :label="item.project_name"
41
+                  >
42
+               </el-option>
36 43
             </el-select>
37 44
           </el-form-item>
38
-          <el-form-item label="检查小项" :label-width="formLabelWidth">
39
-            <el-select v-model="form.region" placeholder="请选择活动区域">
40
-              <el-option label="区域一" value="shanghai"></el-option>
41
-              <el-option label="区域二" value="beijing"></el-option>
45
+          <el-form-item label="检查小项" :label-width="formLabelWidth" required prop="inspectionMinor">
46
+            <el-select v-model="form.inspectionMinor" placeholder="请选择活动区域" @change="changeInspectionMonior">
47
+                <el-option
48
+                  v-for="it in InspectionMinor"
49
+                  :key="it.id"
50
+                  :value="it.id"
51
+                  :label="it.item_name"
52
+                  >
53
+                </el-option>
42 54
             </el-select>
43 55
           </el-form-item>
44
-          <el-form-item label="指控范围" :label-width="formLabelWidth">
45
-            <el-input style="width:200px" v-model="form.name"></el-input>&nbsp;
56
+          <el-form-item label="指控范围" :label-width="formLabelWidth" required prop="large_range">
57
+            <el-input style="width:200px" v-model="form.min_range"></el-input>&nbsp;
46 58
             -
47
-            <el-input style="width:200px" v-model="form.name"></el-input>
59
+            <el-input style="width:200px" v-model="form.large_range"></el-input>
48 60
           </el-form-item>
49 61
           <el-form-item label="排序" :label-width="formLabelWidth">
50
-            <el-input style="width:200px" v-model="form.name"></el-input>
62
+            <el-input style="width:200px" v-model="form.sort"></el-input>
51 63
           </el-form-item>
52 64
         </el-form>
53 65
         <div slot="footer" class="dialog-footer">
54 66
           <el-button @click="newDialog = false">取 消</el-button>
55
-          <el-button type="primary" @click="newDialog = false">确 定</el-button>
67
+          <el-button type="primary" @click="saveInspection('form')">保存</el-button>
56 68
         </div>
57 69
       </el-dialog>
58 70
       <el-dialog title="编辑" :visible.sync="editDialog">
59 71
         <el-form :model="form">
60 72
           <el-form-item label="检查大项" :label-width="formLabelWidth">
61
-            <el-select v-model="form.region" placeholder="请选择活动区域">
62
-              <el-option label="区域一" value="shanghai"></el-option>
63
-              <el-option label="区域二" value="beijing"></el-option>
73
+            <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域">
74
+              <el-option
75
+                  v-for="patient in InspectionMajor"
76
+                  :key="patient.id"
77
+                  :value="patient.id"
78
+                  :label="patient.project_name"
79
+                  >
80
+               </el-option>
64 81
             </el-select>
65 82
           </el-form-item>
66 83
           <el-form-item label="检查小项" :label-width="formLabelWidth">
67
-            <el-select v-model="form.region" placeholder="请选择活动区域">
68
-              <el-option label="区域一" value="shanghai"></el-option>
69
-              <el-option label="区域二" value="beijing"></el-option>
84
+            <el-select v-model="form.inspectionMinor" placeholder="请选择活动区域">
85
+               <el-option
86
+                  v-for="item in InspectionMinor"
87
+                  :key="item.project_id"
88
+                  :value="item.project_id"
89
+                  :label="item.item_name"
90
+                  >
91
+                </el-option>
70 92
             </el-select>
71 93
           </el-form-item>
72 94
           <el-form-item label="指控范围" :label-width="formLabelWidth">
73
-            <el-input style="width:200px" v-model="form.name"></el-input>&nbsp;
95
+            <el-input style="width:200px" v-model="form.min_range"></el-input>&nbsp;
74 96
             -
75
-            <el-input style="width:200px" v-model="form.name"></el-input>
97
+            <el-input style="width:200px" v-model="form.large_range"></el-input>
76 98
           </el-form-item>
77 99
           <el-form-item label="排序" :label-width="formLabelWidth">
78
-            <el-input style="width:200px" v-model="form.name"></el-input>
100
+            <el-input style="width:200px" v-model="form.sort"></el-input>
79 101
           </el-form-item>
80 102
         </el-form>
81 103
         <div slot="footer" class="dialog-footer">
82 104
           <el-button @click="editDialog = false">取 消</el-button>
83
-          <el-button type="primary" @click="editDialog = false">确 定</el-button>
105
+          <el-button type="primary" @click="editDialog = false">保存</el-button>
84 106
         </div>
85 107
       </el-dialog>
86 108
     </div>
@@ -94,6 +116,7 @@ import { GetOICData } from "@/api/qcd";
94 116
 import PieChart from "../qcd/components/BarChart";
95 117
 import { uParseTime } from "@/utils/tools";
96 118
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
119
+import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveInspection }from "@/api/common/common";
97 120
 export default {
98 121
   name: "dialysisTotal",
99 122
   data() {
@@ -104,6 +127,8 @@ export default {
104 127
         { path: false, name: "质控达标统计配置" }
105 128
       ],
106 129
       tabActiveName: "control",
130
+      InspectionMajor:[],
131
+      InspectionMinor:[],
107 132
       tableData: [
108 133
         {
109 134
           date: "2016-05-02",
@@ -130,18 +155,19 @@ export default {
130 155
       editDialog: false,
131 156
       formLabelWidth: "120px",
132 157
       form: {
133
-        name: "",
134
-        region: "",
135
-        date1: "",
136
-        date2: "",
137
-        delivery: false,
138
-        type: [],
139
-        resource: "",
140
-        desc: ""
158
+        inspectionMajor: "",
159
+        inspectionMinor: "",
160
+        min_range: "",
161
+        large_range: "",
162
+        sort:"",
163
+      },
164
+      rules: {
165
+        inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
166
+        inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
167
+        large_range:[{required:true,message:"指控范围不能为空"}]
141 168
       }
142 169
     };
143 170
   },
144
-  created() {},
145 171
   methods: {
146 172
     handleTabClick(tab, event) {
147 173
       if (this.tabActiveName == "query") {
@@ -150,12 +176,58 @@ export default {
150 176
     },
151 177
     handleEdit() {
152 178
       this.editDialog = true;
179
+    },
180
+    
181
+    //获取大项数据来源
182
+    getInspectionMajor(){
183
+      getInspectionMajor().then(response=>{
184
+        if(response.data.state == 1){
185
+          var inspection =  response.data.data.inspection
186
+          console.log("inspection",inspection)
187
+          this.InspectionMajor = inspection
188
+
189
+        }
190
+      })
191
+    },
192
+    //获取小项
193
+    changeInspection(id){
194
+      console.log("id----",id)
195
+      getInspectionMinor(id).then(response=>{
196
+        if(response.data.state == 1){
197
+         var inspection =  response.data.data.inspection
198
+         console.log("inspection",inspection)
199
+         this.InspectionMinor = inspection
200
+        }
201
+      })
202
+    },
203
+    // 获取指控范围
204
+    changeInspectionMonior(id){
205
+       getInspectionRange(id).then(response=>{
206
+         if(response.data.state == 1){
207
+           var inspectionRange =  response.data.data.inspectionRange
208
+           console.log("inspectionRange",inspectionRange)
209
+           this.form.min_range = inspectionRange.range_min
210
+           this.form.large_range = inspectionRange.range_max
211
+         }
212
+      })
213
+    },
214
+    saveInspection(formName){
215
+      this.$refs[formName].validate(valid=>{
216
+        if(valid){
217
+          saveInspection(this.form).then(response=>{
218
+          })
219
+        }
220
+      })
153 221
     }
154 222
   },
155 223
   components: {
156 224
     PieChart,
157 225
     BreadCrumb
158
-  }
226
+  },
227
+   created() {
228
+     //获取检查大项数据来源
229
+       this.getInspectionMajor()
230
+   },
159 231
 };
160 232
 </script>
161 233
 <style lang="scss">

+ 1 - 0
src/xt_pages/user/components/PatientForm.vue Vedi File

@@ -1382,6 +1382,7 @@ export default {
1382 1382
         return false;
1383 1383
       }
1384 1384
 
1385
+      this.form.user_sys_before_count =  this.form.user_sys_before_count.toString()
1385 1386
       this.$refs[formName].validate(valid => {
1386 1387
         if (valid) {
1387 1388
           this.formSubmit = false;

File diff suppressed because it is too large
+ 768 - 439
src/xt_pages/user/patients.vue


File diff suppressed because it is too large
+ 1577 - 255
src/xt_pages/workforce/appointment.vue


+ 166 - 0
src/xt_pages/workforce/components/scheduleTemplateUploadExcel/index.vue Vedi File

@@ -0,0 +1,166 @@
1
+<template>
2
+  <div>
3
+    <el-dialog
4
+      :visible.sync="msgTipVisible"
5
+      width="40%"
6
+    >
7
+      <span>如果导入成功,会将当前已有的排版模版会被全部清除,是否继续导入排版模版数据</span>
8
+      <span slot="footer" class="dialog-footer">
9
+    <el-button @click="msgTipVisible = false">取 消</el-button>
10
+    <el-button type="primary" @click="handleUpload()">确 定</el-button>
11
+  </span>
12
+    </el-dialog>
13
+    <input id="excel-upload-input" ref="excel-upload-input" type="file" accept=".xlsx, .xls, .xltx" @change="handleClick">
14
+    <el-button :loading="loading" style="margin-left:16px;" size="mini" type="primary" @click="msgTipVisible = true">点击导入
15
+    </el-button>
16
+  </div>
17
+</template>
18
+
19
+<script>
20
+  import XLSX from 'xlsx'
21
+
22
+  export default {
23
+    name: "scheduleTemplateUploadExcel",
24
+    props: {
25
+      beforeUpload: Function,
26
+      onSuccess: Function
27
+    },
28
+    data() {
29
+      return {
30
+        loading: false,
31
+        msgTipVisible:false,
32
+        excelData: {
33
+          header: null,
34
+          results: null
35
+        }
36
+      }
37
+    },
38
+    methods: {
39
+      generateDate({ header, results }) {
40
+
41
+        console.log(header)
42
+        console.log(results)
43
+
44
+        this.excelData.header = header
45
+        this.excelData.results = results
46
+
47
+        this.onSuccess && this.onSuccess(this.excelData)
48
+      },
49
+      handleDrop(e) {
50
+        e.stopPropagation()
51
+        e.preventDefault()
52
+        if (this.loading) return
53
+        const files = e.dataTransfer.files
54
+        if (files.length !== 1) {
55
+          this.$message.error('Only support uploading one file!')
56
+          return
57
+        }
58
+        const rawFile = files[0] // only use files[0]
59
+
60
+        if (!this.isExcel(rawFile)) {
61
+          this.$message.error('Only supports upload .xlsx, .xls, .csv suffix files')
62
+          return false
63
+        }
64
+        this.upload(rawFile)
65
+        e.stopPropagation()
66
+        e.preventDefault()
67
+      },
68
+      handleDragover(e) {
69
+        e.stopPropagation()
70
+        e.preventDefault()
71
+        e.dataTransfer.dropEffect = 'copy'
72
+      },
73
+      handleUpload() {
74
+        this.msgTipVisible = false
75
+        console.log("1111111")
76
+        document.getElementById('excel-upload-input').click()
77
+      },
78
+      handleClick(e) {
79
+        console.log("1111")
80
+        const files = e.target.files
81
+        const rawFile = files[0] // only use files[0]
82
+        console.log(rawFile)
83
+
84
+        if (!rawFile) return
85
+        this.upload(rawFile)
86
+      },
87
+      upload(rawFile) {
88
+        this.$refs['excel-upload-input'].value = null // fix can't select the same excel
89
+        console.log("12121212")
90
+        if (!this.beforeUpload) {
91
+          this.readerData(rawFile)
92
+          return
93
+        }
94
+        const before = this.beforeUpload(rawFile)
95
+        if (before) {
96
+          this.readerData(rawFile)
97
+        }
98
+      },
99
+      readerData(rawFile) {
100
+        console.log("2222222")
101
+
102
+        this.loading = true
103
+        return new Promise((resolve, reject) => {
104
+          const reader = new FileReader()
105
+          reader.onload = e => {
106
+            const data = e.target.result
107
+            const fixedData = this.fixdata(data)
108
+            const workbook = XLSX.read(btoa(fixedData), { type: 'base64' })
109
+            const firstSheetName = workbook.SheetNames[0]
110
+            const worksheet = workbook.Sheets[firstSheetName]
111
+            const header = this.get_header_row(worksheet)
112
+            const results = XLSX.utils.sheet_to_json(worksheet)
113
+            this.generateDate({ header, results })
114
+            this.loading = false
115
+            resolve()
116
+          }
117
+          reader.readAsArrayBuffer(rawFile)
118
+        })
119
+      },
120
+      fixdata(data) {
121
+        let o = ''
122
+        let l = 0
123
+        const w = 10240
124
+        for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
125
+        o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
126
+        return o
127
+      },
128
+      get_header_row(sheet) {
129
+        const headers = []
130
+        const range = XLSX.utils.decode_range(sheet['!ref'])
131
+        let C
132
+        const R = range.s.r /* start in the first row */
133
+        for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */
134
+          var cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })] /* find the cell in the first row */
135
+          var hdr = 'UNKNOWN ' + C // <-- replace with your desired default
136
+          if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
137
+          headers.push(hdr)
138
+        }
139
+        return headers
140
+      },
141
+      isExcel(file) {
142
+        return /\.(xlsx|xls|csv)$/.test(file.name)
143
+      }
144
+    }
145
+  }
146
+</script>
147
+
148
+<style scoped>
149
+  #excel-upload-input {
150
+    display: none;
151
+    z-index: -9999;
152
+  }
153
+
154
+  #drop {
155
+    border: 2px dashed #bbb;
156
+    width: 600px;
157
+    height: 160px;
158
+    line-height: 160px;
159
+    margin: 0 auto;
160
+    font-size: 24px;
161
+    border-radius: 5px;
162
+    text-align: center;
163
+    color: #bbb;
164
+    position: relative;
165
+  }
166
+</style>

+ 166 - 0
src/xt_pages/workforce/components/scheduleUploadExcel/index.vue Vedi File

@@ -0,0 +1,166 @@
1
+<template>
2
+  <div>
3
+    <el-dialog
4
+      :visible.sync="msgTipVisible"
5
+      width="40%"
6
+    >
7
+      <span>如果导入成功,会将当前已有的排版会被全部清除,是否继续导入排版数据</span>
8
+      <span slot="footer" class="dialog-footer">
9
+    <el-button @click="msgTipVisible = false">取 消</el-button>
10
+    <el-button type="primary" @click="handleUpload()">确 定</el-button>
11
+  </span>
12
+    </el-dialog>
13
+    <input id="excel-upload-input" ref="excel-upload-input" type="file" accept=".xlsx, .xls, .xltx" @change="handleClick">
14
+    <el-button :loading="loading" style="margin-left:16px;" size="mini" type="primary" @click="msgTipVisible = true">点击导入
15
+    </el-button>
16
+  </div>
17
+</template>
18
+
19
+<script>
20
+  import XLSX from 'xlsx'
21
+
22
+  export default {
23
+    name: "scheduleUploadExcel",
24
+    props: {
25
+      beforeUpload: Function,
26
+      onSuccess: Function
27
+    },
28
+    data() {
29
+      return {
30
+        loading: false,
31
+        msgTipVisible:false,
32
+        excelData: {
33
+          header: null,
34
+          results: null
35
+        }
36
+      }
37
+    },
38
+    methods: {
39
+      generateDate({ header, results }) {
40
+
41
+        console.log(header)
42
+        console.log(results)
43
+
44
+        this.excelData.header = header
45
+        this.excelData.results = results
46
+
47
+        this.onSuccess && this.onSuccess(this.excelData)
48
+      },
49
+      handleDrop(e) {
50
+        e.stopPropagation()
51
+        e.preventDefault()
52
+        if (this.loading) return
53
+        const files = e.dataTransfer.files
54
+        if (files.length !== 1) {
55
+          this.$message.error('Only support uploading one file!')
56
+          return
57
+        }
58
+        const rawFile = files[0] // only use files[0]
59
+
60
+        if (!this.isExcel(rawFile)) {
61
+          this.$message.error('Only supports upload .xlsx, .xls, .csv suffix files')
62
+          return false
63
+        }
64
+        this.upload(rawFile)
65
+        e.stopPropagation()
66
+        e.preventDefault()
67
+      },
68
+      handleDragover(e) {
69
+        e.stopPropagation()
70
+        e.preventDefault()
71
+        e.dataTransfer.dropEffect = 'copy'
72
+      },
73
+      handleUpload() {
74
+        this.msgTipVisible = false
75
+        console.log("1111111")
76
+        document.getElementById('excel-upload-input').click()
77
+      },
78
+      handleClick(e) {
79
+        console.log("1111")
80
+        const files = e.target.files
81
+        const rawFile = files[0] // only use files[0]
82
+        console.log(rawFile)
83
+
84
+        if (!rawFile) return
85
+        this.upload(rawFile)
86
+      },
87
+      upload(rawFile) {
88
+        this.$refs['excel-upload-input'].value = null // fix can't select the same excel
89
+        console.log("12121212")
90
+        if (!this.beforeUpload) {
91
+          this.readerData(rawFile)
92
+          return
93
+        }
94
+        const before = this.beforeUpload(rawFile)
95
+        if (before) {
96
+          this.readerData(rawFile)
97
+        }
98
+      },
99
+      readerData(rawFile) {
100
+        console.log("2222222")
101
+
102
+        this.loading = true
103
+        return new Promise((resolve, reject) => {
104
+          const reader = new FileReader()
105
+          reader.onload = e => {
106
+            const data = e.target.result
107
+            const fixedData = this.fixdata(data)
108
+            const workbook = XLSX.read(btoa(fixedData), { type: 'base64' })
109
+            const firstSheetName = workbook.SheetNames[0]
110
+            const worksheet = workbook.Sheets[firstSheetName]
111
+            const header = this.get_header_row(worksheet)
112
+            const results = XLSX.utils.sheet_to_json(worksheet)
113
+            this.generateDate({ header, results })
114
+            this.loading = false
115
+            resolve()
116
+          }
117
+          reader.readAsArrayBuffer(rawFile)
118
+        })
119
+      },
120
+      fixdata(data) {
121
+        let o = ''
122
+        let l = 0
123
+        const w = 10240
124
+        for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
125
+        o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
126
+        return o
127
+      },
128
+      get_header_row(sheet) {
129
+        const headers = []
130
+        const range = XLSX.utils.decode_range(sheet['!ref'])
131
+        let C
132
+        const R = range.s.r /* start in the first row */
133
+        for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */
134
+          var cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })] /* find the cell in the first row */
135
+          var hdr = 'UNKNOWN ' + C // <-- replace with your desired default
136
+          if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
137
+          headers.push(hdr)
138
+        }
139
+        return headers
140
+      },
141
+      isExcel(file) {
142
+        return /\.(xlsx|xls|csv)$/.test(file.name)
143
+      }
144
+    }
145
+  }
146
+</script>
147
+
148
+<style scoped>
149
+  #excel-upload-input {
150
+    display: none;
151
+    z-index: -9999;
152
+  }
153
+
154
+  #drop {
155
+    border: 2px dashed #bbb;
156
+    width: 600px;
157
+    height: 160px;
158
+    line-height: 160px;
159
+    margin: 0 auto;
160
+    font-size: 24px;
161
+    border-radius: 5px;
162
+    text-align: center;
163
+    color: #bbb;
164
+    position: relative;
165
+  }
166
+</style>

+ 9 - 7
src/xt_pages/workforce/components/template_table.vue Vedi File

@@ -11,7 +11,7 @@
11 11
                 </div>
12 12
             </el-col>
13 13
         </el-row>
14
-      
14
+
15 15
       <div id="table_data" >
16 16
         <el-table :height="tableContainHeight" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" ref="table"   :data="opera_device_numbers" :span-method="spanMethod" row-class-name="table-row-new-class schedule-table-row" @cell-click="itemClick">
17 17
             <el-table-column label="分区" width="80" align="center" fixed style="width: 100px; background-color: red; display: block;">
@@ -61,7 +61,7 @@
61 61
                     </template>
62 62
                 </el-table-column>
63 63
             </el-table-column>
64
-            
64
+
65 65
             <el-table-column label="周三" width="215" align="center">
66 66
                 <el-table-column prop="3_1" label="上" width="70" align="center">
67 67
                     <template slot-scope="scope">
@@ -79,7 +79,7 @@
79 79
                     </template>
80 80
                 </el-table-column>
81 81
             </el-table-column>
82
-            
82
+
83 83
             <el-table-column label="周四" width="215" align="center">
84 84
                 <el-table-column prop="4_1" label="上" width="70" align="center">
85 85
                     <template slot-scope="scope">
@@ -97,7 +97,7 @@
97 97
                     </template>
98 98
                 </el-table-column>
99 99
             </el-table-column>
100
-            
100
+
101 101
             <el-table-column label="周五" width="215" align="center">
102 102
                 <el-table-column prop="5_1" label="上" width="70" align="center">
103 103
                     <template slot-scope="scope">
@@ -115,7 +115,7 @@
115 115
                     </template>
116 116
                 </el-table-column>
117 117
             </el-table-column>
118
-            
118
+
119 119
             <el-table-column label="周六" width="215" align="center">
120 120
                 <el-table-column prop="6_1" label="上" width="70" align="center">
121 121
                     <template slot-scope="scope">
@@ -151,7 +151,7 @@
151 151
                     </template>
152 152
                 </el-table-column>
153 153
             </el-table-column>
154
-            
154
+
155 155
             <el-table-column prop="total" label="总数" width="60" align="center" fixed="right">
156 156
                 <template slot-scope="scope">
157 157
                     {{ scope.row.total }}
@@ -159,7 +159,7 @@
159 159
             </el-table-column>
160 160
         </el-table>
161 161
       </div>
162
-      
162
+
163 163
         <schedule-selector-dialog ref="selector_dialog" :patients="patients" @did_selected="will_add_schedule_action" @did_cancel="cancel_schedule_action"></schedule-selector-dialog>
164 164
     </div>
165 165
 </template>
@@ -355,6 +355,8 @@ export default {
355 355
 
356 356
         maked_device_numbers.push(device)
357 357
       }
358
+
359
+      console.log(maked_device_numbers)
358 360
       return maked_device_numbers
359 361
     },
360 362
     spanMethod({ row, column, rowIndex, columnIndex }) {

File diff suppressed because it is too large
+ 1856 - 23
src/xt_pages/workforce/template.vue