Browse Source

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

杨青 1 year ago
parent
commit
af0a1017d0
28 changed files with 2905 additions and 507 deletions
  1. 11 30
      package-lock.json
  2. 2 1
      package.json
  3. 9 0
      src/api/qcd.js
  4. 625 204
      src/xt_pages/Dialysisanalysis/albumin/albuminall.vue
  5. 2 1
      src/xt_pages/Dialysisanalysis/albumin/albuminalone.vue
  6. 319 13
      src/xt_pages/Dialysisanalysis/bloodPhosphorus/phosphorusall.vue
  7. 320 14
      src/xt_pages/Dialysisanalysis/bloodPotassium/potassiumall.vue
  8. 320 13
      src/xt_pages/Dialysisanalysis/calcium/calciumall.vue
  9. 179 14
      src/xt_pages/Dialysisanalysis/hemoglobin/hemoglobinall.vue
  10. 318 14
      src/xt_pages/Dialysisanalysis/platelets/plateletsall.vue
  11. 318 114
      src/xt_pages/Dialysisanalysis/qualitycontrol/totalSstatistics.vue
  12. 2 2
      src/xt_pages/dialysis/batch_print/batch_print_order_thirteen.vue
  13. 85 69
      src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue
  14. 2 2
      src/xt_pages/dialysis/dialysisFlow.vue
  15. 2 2
      src/xt_pages/dialysis/template/DialysisPrintOrderThirteen.vue
  16. 1 0
      src/xt_pages/outpatientCharges/settlementTemplate/printOne.vue
  17. 53 0
      src/xt_pages/outpatientCharges/summary.vue
  18. 3 0
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  19. 2 0
      src/xt_pages/outpatientTool/components/settle.vue
  20. 197 1
      src/xt_pages/outpatientTool/labelPrint.vue
  21. 48 4
      src/xt_pages/user/components/PatientDetail.vue
  22. 49 1
      src/xt_pages/user/components/PatientForm.vue
  23. 1 1
      src/xt_pages/user/courseOfDisease.vue
  24. 3 2
      src/xt_pages/user/firstDisease.vue
  25. 1 1
      src/xt_pages/user/hospitalSummary.vue
  26. 31 2
      src/xt_pages/user/patients.vue
  27. 1 1
      src/xt_pages/user/rescueRecord.vue
  28. 1 1
      src/xt_pages/user/templateSummary.vue

+ 11 - 30
package-lock.json View File

@@ -4759,8 +4759,7 @@
4759 4759
         "ansi-regex": {
4760 4760
           "version": "2.1.1",
4761 4761
           "bundled": true,
4762
-          "dev": true,
4763
-          "optional": true
4762
+          "dev": true
4764 4763
         },
4765 4764
         "aproba": {
4766 4765
           "version": "1.2.0",
@@ -4783,15 +4782,13 @@
4783 4782
         "balanced-match": {
4784 4783
           "version": "1.0.0",
4785 4784
           "bundled": true,
4786
-          "dev": true,
4787
-          "optional": true
4785
+          "dev": true
4788 4786
         },
4789 4787
         "brace-expansion": {
4790 4788
           "version": "1.1.11",
4791 4789
           "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
4792 4790
           "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
4793 4791
           "dev": true,
4794
-          "optional": true,
4795 4792
           "requires": {
4796 4793
             "balanced-match": "^1.0.0",
4797 4794
             "concat-map": "0.0.1"
@@ -4807,22 +4804,19 @@
4807 4804
         "code-point-at": {
4808 4805
           "version": "1.1.0",
4809 4806
           "bundled": true,
4810
-          "dev": true,
4811
-          "optional": true
4807
+          "dev": true
4812 4808
         },
4813 4809
         "concat-map": {
4814 4810
           "version": "0.0.1",
4815 4811
           "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
4816 4812
           "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
4817
-          "dev": true,
4818
-          "optional": true
4813
+          "dev": true
4819 4814
         },
4820 4815
         "console-control-strings": {
4821 4816
           "version": "1.1.0",
4822 4817
           "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
4823 4818
           "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
4824
-          "dev": true,
4825
-          "optional": true
4819
+          "dev": true
4826 4820
         },
4827 4821
         "core-util-is": {
4828 4822
           "version": "1.0.2",
@@ -4952,8 +4946,7 @@
4952 4946
         "inherits": {
4953 4947
           "version": "2.0.3",
4954 4948
           "bundled": true,
4955
-          "dev": true,
4956
-          "optional": true
4949
+          "dev": true
4957 4950
         },
4958 4951
         "ini": {
4959 4952
           "version": "1.3.5",
@@ -4967,7 +4960,6 @@
4967 4960
           "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
4968 4961
           "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
4969 4962
           "dev": true,
4970
-          "optional": true,
4971 4963
           "requires": {
4972 4964
             "number-is-nan": "^1.0.0"
4973 4965
           }
@@ -4984,7 +4976,6 @@
4984 4976
           "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
4985 4977
           "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
4986 4978
           "dev": true,
4987
-          "optional": true,
4988 4979
           "requires": {
4989 4980
             "brace-expansion": "^1.1.7"
4990 4981
           }
@@ -4992,15 +4983,13 @@
4992 4983
         "minimist": {
4993 4984
           "version": "0.0.8",
4994 4985
           "bundled": true,
4995
-          "dev": true,
4996
-          "optional": true
4986
+          "dev": true
4997 4987
         },
4998 4988
         "minipass": {
4999 4989
           "version": "2.3.5",
5000 4990
           "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
5001 4991
           "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
5002 4992
           "dev": true,
5003
-          "optional": true,
5004 4993
           "requires": {
5005 4994
             "safe-buffer": "^5.1.2",
5006 4995
             "yallist": "^3.0.0"
@@ -5021,7 +5010,6 @@
5021 5010
           "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
5022 5011
           "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
5023 5012
           "dev": true,
5024
-          "optional": true,
5025 5013
           "requires": {
5026 5014
             "minimist": "0.0.8"
5027 5015
           }
@@ -5109,8 +5097,7 @@
5109 5097
         "number-is-nan": {
5110 5098
           "version": "1.0.1",
5111 5099
           "bundled": true,
5112
-          "dev": true,
5113
-          "optional": true
5100
+          "dev": true
5114 5101
         },
5115 5102
         "object-assign": {
5116 5103
           "version": "4.1.1",
@@ -5124,7 +5111,6 @@
5124 5111
           "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
5125 5112
           "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
5126 5113
           "dev": true,
5127
-          "optional": true,
5128 5114
           "requires": {
5129 5115
             "wrappy": "1"
5130 5116
           }
@@ -5219,8 +5205,7 @@
5219 5205
         "safe-buffer": {
5220 5206
           "version": "5.1.2",
5221 5207
           "bundled": true,
5222
-          "dev": true,
5223
-          "optional": true
5208
+          "dev": true
5224 5209
         },
5225 5210
         "safer-buffer": {
5226 5211
           "version": "2.1.2",
@@ -5262,7 +5247,6 @@
5262 5247
           "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
5263 5248
           "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
5264 5249
           "dev": true,
5265
-          "optional": true,
5266 5250
           "requires": {
5267 5251
             "code-point-at": "^1.0.0",
5268 5252
             "is-fullwidth-code-point": "^1.0.0",
@@ -5284,7 +5268,6 @@
5284 5268
           "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
5285 5269
           "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
5286 5270
           "dev": true,
5287
-          "optional": true,
5288 5271
           "requires": {
5289 5272
             "ansi-regex": "^2.0.0"
5290 5273
           }
@@ -5332,15 +5315,13 @@
5332 5315
         "wrappy": {
5333 5316
           "version": "1.0.2",
5334 5317
           "bundled": true,
5335
-          "dev": true,
5336
-          "optional": true
5318
+          "dev": true
5337 5319
         },
5338 5320
         "yallist": {
5339 5321
           "version": "3.0.3",
5340 5322
           "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
5341 5323
           "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
5342
-          "dev": true,
5343
-          "optional": true
5324
+          "dev": true
5344 5325
         }
5345 5326
       }
5346 5327
     },

+ 2 - 1
package.json View File

@@ -5,7 +5,8 @@
5 5
   "author": "Pan <panfree23@gmail.com>",
6 6
   "license": "MIT",
7 7
   "scripts": {
8
-    "dev": "cross-env BABEL_ENV=development webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
8
+
9
+    "dev": "cross-env BABEL_ENV=development webpack-dev-server  --inline --progress --config build/webpack.dev.conf.js ",
9 10
     "build:prod": "cross-env NODE_ENV=production env_config=prod node build/build.js",
10 11
     "build:sit": "cross-env NODE_ENV=production env_config=sit node build/build.js && npm run fixfont && npm run fiximg",
11 12
     "build-cdn": "node build/build-cdn.js",

+ 9 - 0
src/api/qcd.js View File

@@ -125,6 +125,15 @@ export function GetPersonQCStatistisData(params) {
125 125
   })
126 126
 }
127 127
 
128
+export function GetAllQCStatistisData(params) {
129
+  return request({
130
+    url: '/api/qc/patientstatistiscall/get',
131
+    method: 'get',
132
+    params: params
133
+  })
134
+}
135
+
136
+
128 137
 
129 138
 
130 139
 

+ 625 - 204
src/xt_pages/Dialysisanalysis/albumin/albuminall.vue View File

@@ -1,254 +1,675 @@
1 1
 <template>
2
-    <div>
3
-        <!-- <div class="content_top">
4
-            <div class="block">
5
-                <span>查询时间:</span>
6
-                <el-date-picker
7
-                v-model="time_month"
8
-                type="month"
9
-                placeholder="选择月">
10
-                </el-date-picker>
11
-            </div>
12
-            <div>
13
-                <el-date-picker
14
-                v-model="stat_time"
15
-                type="date"
16
-                placeholder="选择日期">
17
-                </el-date-picker>
18
-                <span>-</span>
19
-                <el-date-picker
20
-                v-model="end_time"
21
-                type="date"
22
-                placeholder="选择日期">
23
-                </el-date-picker>
24
-            </div>
25
-            <div style="width: 200px;">
26
-                <el-input v-model="input" placeholder="请输入内容"></el-input>
27
-            </div>
28
-            <el-button type="primary">查询</el-button>
29
-        </div> -->
30
-
31
-        <el-row :gutter="20">
2
+  <div>
3
+    <el-row :gutter="25">
4
+      <el-col :span="5">
5
+        <div class="block">
6
+          <span>查询时间:</span>
7
+          <el-select size="small" v-model="time_type" placeholder="请选择"
8
+                     style="width:150px;margin-left:10px;" @change="changeItem">
9
+            <el-option
10
+              v-for="item,index in times"
11
+              :key="index"
12
+              :label="item.label"
13
+              :value="item.value">
14
+            </el-option>
15
+          </el-select>
16
+        </div>
17
+      </el-col>
18
+      <el-col :span="8">
19
+        <div>
20
+          <el-date-picker
21
+            style="width: 200px"
22
+
23
+            v-model="start_time"
24
+            format="yyyy-MM-dd"
25
+            value-format="yyyy-MM-dd"
26
+            type="date"
27
+
28
+            placeholder="选择日期">
29
+          </el-date-picker>
30
+          <span>-</span>
31
+          <el-date-picker
32
+            style="width: 200px"
33
+            v-model="end_time"
34
+            format="yyyy-MM-dd"
35
+            value-format="yyyy-MM-dd"
36
+            type="date"
37
+            placeholder="选择日期">
38
+          </el-date-picker>
39
+        </div>
40
+      </el-col>
41
+      <el-col :span="5">
42
+        <div >
43
+          <el-input disabled v-model="input" placeholder="请输入内容"></el-input>
44
+        </div>
45
+      </el-col>
46
+      <el-col :span="3">
47
+        <el-button type="primary" @click="getData()">查询</el-button>
48
+      </el-col>
49
+    </el-row>
50
+    <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
51
+      <p class="chartTitle">统计图</p>
52
+    </div>
53
+    <div class="echart" id="mychart" :style={width:width,height:height}></div>
54
+    <div style="width: 80%;margin: auto;">
55
+      <el-table
56
+        :data="tableData"
57
+        border
58
+        style="width: 100%;">
59
+        <el-table-column
60
+          prop="name"
61
+          align="center"
62
+          label="白蛋白"
63
+        >
64
+        </el-table-column>
65
+        <el-table-column
66
+          prop="count"
67
+          label="人数"
68
+        >
69
+        </el-table-column>
70
+        <el-table-column
71
+          prop="address"
72
+          align="center"
73
+          label="操作">
74
+          <template slot-scope="scope">
75
+            <el-button @click="handleClick(scope.row)" style="font-size:16px;"
76
+                       type="text">查看详情
77
+            </el-button>
78
+          </template>
79
+        </el-table-column>
80
+      </el-table>
81
+    </div>
82
+
83
+    <el-dialog
84
+      width="1000px" class="registerDialog" :visible.sync="detailVisibility"
85
+      :close-on-click-modal="isClose"
86
+      :close-on-press-escape="isClose"
87
+    >
88
+      <el-row :gutter="25">
32 89
         <el-col :span="5">
33 90
           <div class="block">
34 91
             <span>查询时间:</span>
35
-            <el-date-picker
36
-            v-model="time_month"
37
-            type="month"
38
-            placeholder="选择月">
39
-            </el-date-picker>
92
+            <el-select size="small" v-model="time_type_two" placeholder="请选择"
93
+                       style="width:100px;margin-left:5px;" @change="changeItemTwo">
94
+              <el-option
95
+                v-for="item,index in times"
96
+                :key="index"
97
+                :label="item.label"
98
+                :value="item.value">
99
+              </el-option>
100
+            </el-select>
40 101
           </div>
41 102
         </el-col>
42
-        <el-col :span="8">
103
+        <el-col :span="10">
43 104
           <div>
44 105
             <el-date-picker
45
-            v-model="stat_time"
46
-            type="date"
47
-            placeholder="选择日期">
106
+              style="width: 120px"
107
+              v-model="start_time_one"
108
+              format="yyyy-MM-dd"
109
+              value-format="yyyy-MM-dd"
110
+              type="date"
111
+
112
+              placeholder="选择日期">
48 113
             </el-date-picker>
49 114
             <span>-</span>
50 115
             <el-date-picker
51
-            v-model="end_time"
52
-            type="date"
53
-            placeholder="选择日期">
116
+              style="width: 120px"
117
+              v-model="end_time_one"
118
+              format="yyyy-MM-dd"
119
+              value-format="yyyy-MM-dd"
120
+              type="date"
121
+              placeholder="选择日期">
54 122
             </el-date-picker>
55 123
           </div>
56 124
         </el-col>
57
-        <el-col :span="3">
58
-          <div style="width: 200px;">
59
-            <el-input v-model="input" placeholder="请输入内容"></el-input>
125
+
126
+        <el-col :span="4">
127
+          <div>
128
+
129
+            <el-select size="small" v-model="statistics_type" placeholder="请选择"
130
+                       style="width:100px;margin-left:5px;">
131
+              <el-option
132
+                v-for="item,index in statistics_types"
133
+                :key="index"
134
+                :label="item.label"
135
+                :value="item.value">
136
+              </el-option>
137
+            </el-select>
138
+
139
+          </div>
140
+        </el-col>
141
+
142
+<!--        <el-col :span="4">-->
143
+<!--          <div>-->
144
+<!--            <el-select size="small" v-model="sort_type" placeholder="请选择"-->
145
+<!--                       style="width:100px;margin-left:5px;">-->
146
+<!--              <el-option-->
147
+<!--                v-for="item,index in sort_types"-->
148
+<!--                :key="index"-->
149
+<!--                :label="item.label"-->
150
+<!--                :value="item.value">-->
151
+<!--              </el-option>-->
152
+<!--            </el-select>-->
153
+<!--          </div>-->
154
+<!--        </el-col>-->
155
+
156
+        <el-col :span="4">
157
+          <div >
158
+            <el-input v-model="keyword" placeholder="请输入患者姓名或透析号"></el-input>
159
+          </div>
160
+        </el-col>
161
+
162
+        <el-col :span="2">
163
+          <div>
164
+            <el-button @click="getDataTwo()">查询</el-button>
60 165
           </div>
61 166
         </el-col>
167
+
62 168
         <el-col :span="2">
63
-            <el-button type="primary">查询</el-button>
169
+          <div>
170
+            <el-button @click="exportAction()">导出</el-button>
171
+          </div>
64 172
         </el-col>
65
-        </el-row>
66 173
 
67
-        <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
68
-          <p class="chartTitle">统计图</p>
69
-        </div>
70
-        <div class="echart" id="mychart" :style={width:width,height:height}></div>
71
-        <div style="width: 80%;margin: auto;">
72
-            <el-table
73
-            :data="tableData"
74
-            :show-summary = true
75
-            border
76
-            style="width: 100%;">
77
-                <el-table-column
78
-                    prop="date"
79
-                    align="center"
80
-                    label="白蛋白"
81
-                    >
82
-                </el-table-column>
83
-                <el-table-column
84
-                    prop="name"
85
-
86
-                    label="人数"
87
-                    >
88
-                </el-table-column>
89
-                <el-table-column
90
-                    prop="address"
91
-                    align="center"
92
-                    label="操作">
93
-                    <template slot-scope="scope">
94
-                        <el-button @click="handleClick(scope.row)" style="font-size:16px;"
95
-                                type="text" >查看详情
96
-                        </el-button>
97
-                    </template>
98
-                </el-table-column>
99
-            </el-table>
100
-        </div>
101
-    </div>
174
+<!--        <el-col :span="2">-->
175
+<!--          <div>-->
176
+<!--            <el-button @click="getDataTwo()">打印</el-button>-->
177
+<!--          </div>-->
178
+<!--        </el-col>-->
179
+
180
+
181
+
182
+
183
+
184
+      </el-row>
185
+
186
+      <el-table
187
+        :data="patientTableData"
188
+        border
189
+        ref="table"
190
+        max-height="500px"
191
+        style="width: 100%">
192
+        <el-table-column
193
+          prop="dialysis_no"
194
+          align="center"
195
+          label="透析号"
196
+        >
197
+        </el-table-column>
198
+        <el-table-column
199
+          prop="name"
200
+          label="患者姓名"
201
+        >
202
+        </el-table-column>
203
+        <el-table-column
204
+          prop="date"
205
+          label="检查日期"
206
+        >
207
+        </el-table-column>
208
+
209
+        <el-table-column
210
+          prop="inspect_value"
211
+          label="结果"
212
+        >
213
+        </el-table-column>
214
+
215
+      </el-table>
216
+
217
+      <div slot="footer" class="dialog-footer">
218
+        <el-button @click="detailVisibility = false">取消</el-button>
219
+        <el-button type="primary" @click="detailVisibility = false">确定</el-button>
220
+      </div>
221
+    </el-dialog>
222
+
223
+
224
+  </div>
102 225
 </template>
103 226
 <script>
104
-import * as echarts from "echarts";
105
-export default{
106
-    props: {
227
+import * as echarts from 'echarts'
228
+import { GetQCStatistisData,GetAllQCStatistisData } from '../../../api/qcd'
229
+
230
+const moment = require('moment')
231
+
232
+export default {
233
+  props: {
107 234
 
108 235
     width: {
109 236
       type: String,
110
-      default: "100%"
237
+      default: '100%'
111 238
     },
112 239
     height: {
113 240
       type: String,
114
-      default: "400px"
115
-    },
241
+      default: '400px'
242
+    }
116 243
 
117 244
   },
118
-    data() {
119
-        return {
120
-            time_month:'',
121
-            stat_time:'',
122
-            end_time:'',
123
-            input:'',
124
-            myChart: {},
125
-            pieData : [
126
-            {
127
-          value: 463,
128
-          name: "不达标值患者"
129
-        },
130
-        {
131
-          value: 395,
132
-          name: "未检查患者"
133
-        },
134
-        {
135
-          value: 157,
136
-          name: "达标值患者"
137
-        },
138
-
139
-            ],
140
-            pieName: [],
141
-            // myChartStyle:{float: "right", width: "100%", height: "400px"},
142
-            tableData:[],
245
+  data() {
246
+    return {
247
+      statistics_types:[
248
+        { value: 1, label: '不达标患者' },
249
+        { value: 2, label: '未检查患者' },
250
+        { value: 3, label: '达标患者' },
251
+      ],
252
+      sort_types:[
253
+        { value: 1, label: '时间' },
254
+        { value: 2, label: '患者' },
255
+      ],
256
+      detailVisibility:false,
257
+      isClose:true,
258
+      time_type: 1,
259
+      time_type_two:1,
260
+      times: [
261
+        { value: 1, label: '本月' },
262
+        { value: 2, label: '上月' },
263
+        { value: 3, label: '今年' },
264
+        { value: 4, label: '上一年' },
265
+        { value: 5, label: '第一季度' },
266
+        { value: 6, label: '第二季度' },
267
+        { value: 7, label: '第三季度' },
268
+        { value: 8, label: '第四季度' },
269
+        { value: 9, label: '自定义' }
270
+
271
+      ],
272
+      time_month: '',
273
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
274
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
275
+
276
+      start_time_one: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
277
+      end_time_one: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
278
+
279
+      input: '',
280
+      myChart: {},
281
+      pieData: [],
282
+      pieName: [],
283
+      // myChartStyle:{float: "right", width: "100%", height: "400px"},
284
+      tableData: [],
285
+      reference:{},
286
+      statistics_type:1,
287
+      sort_type:"",
288
+      keyword:"",
289
+      patientTableData:[],
290
+    }
291
+  },
292
+  mounted() {
293
+    this.getData()
294
+  },
295
+  methods: {
296
+    exportAction(){
297
+      let list = []
298
+      for (let i = 0; i < this.patientTableData.length; i++) {
299
+        let order = this.patientTableData[i]
300
+        let name = order.name
301
+        let value = order.inspect_value
302
+        let inspect_date = order.date
303
+
304
+        let obj = {
305
+          '姓名': name,
306
+          '数值': value,
307
+          '日期': inspect_date,
143 308
         }
309
+        list.push(obj)
310
+      }
311
+      import('@/vendor/Export2Excel').then(excel => {
312
+        const tHeader = ['姓名', '数值', '日期']
313
+        const filterVal = ['姓名', '数值', '日期']
314
+        const data = this.formatJson(filterVal, list)
315
+        excel.export_json_to_excel1({
316
+          header: tHeader,
317
+          data,
318
+          filename: '明细',
319
+          ref: this.$refs['table'].$el
320
+        })
321
+      })
144 322
     },
145
-    mounted() {
146
-    this.initDate(); //数据初始化
147
-    this.initEcharts();
323
+    formatJson(filterVal, jsonData) {
324
+    return jsonData.map(v => filterVal.map(j => v[j]))
148 325
   },
149
-  methods: {
150
-    initDate() {
151
-      for (let i = 0; i < this.pieData.length; i++) {
152
-        this.pieName[i] = this.pieData[i].name;
326
+    getDataTwo() {
327
+      if(this.start_time_one.length == 0){
328
+        this.$message.error("请选择开始时间")
329
+      }
330
+      if(this.end_time_one.length == 0){
331
+        this.$message.error("请选择结束时间")
153 332
       }
333
+      let params = {
334
+        start_date: this.start_time_one,
335
+        end_date: this.end_time_one,
336
+        project_id: 2,
337
+        item_id: 35,
338
+        item_type:this.statistics_type,
339
+        order_type:this.sort_type,
340
+        keyword: this.keyword,
341
+      }
342
+      this.patientTableData = []
343
+      GetAllQCStatistisData(params).then(response => {
344
+        if (response.data.state == 1) {
345
+          this.detailVisibility = true
346
+          this.patientTableData  =  this.patientTableData.concat(response.data.data.list)
347
+        } else {
348
+          this.$message.error(response.data.msg)
349
+        }
350
+      })
351
+
154 352
     },
155
-    initEcharts() {
156
-      // 饼图
157
-      const option = {
158
-        legend: {
159
-          // 图例
160
-          data: this.pieName,
161
-          left: "10%",
162
-          top: "30%",
163
-          orient: "vertical"
164
-        },
165
-        color:['#ff7f9f','#fff67f','#1e5feb'],
166
-        title: {
167
-          // 设置饼图标题,位置设为顶部居中
168
-        //   text: "国内院士前五省份图示",
169
-          top: "0%",
170
-          left: "center"
171
-        },
172
-        series: [
173
-          {
174
-            type: "pie",
175
-            label: {
176
-              normal : {
177
-                formatter: '{b}:{c}: ({d}%)',
178
-                textStyle : {
179
-                    fontWeight : 'normal',
180
-                    fontSize : 15,
181
-                    color : "black"
182
-                }
183
-              }
184
-              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
353
+    getData() {
354
+      if(this.start_time.length == 0){
355
+        this.$message.error("请选择开始时间")
356
+      }
357
+      if(this.end_time.length == 0){
358
+        this.$message.error("请选择结束时间")
359
+      }
360
+      let params = {
361
+        start_date: this.start_time,
362
+        end_date: this.end_time,
363
+        project_id: 2,
364
+        item_id: 35
365
+      }
366
+      this.pieData = []
367
+      this.tableData = []
368
+      console.log("~~~~~~~~~~")
369
+      GetQCStatistisData(params).then(response => {
370
+        if (response.data.state == 1) {
371
+          this.reference =  response.data.data.reference
372
+
373
+          this.input = response.data.data.reference.range_min + "<=" + response.data.data.reference.item_name + "<=" + response.data.data.reference.range_max
374
+          let objone = {
375
+            value:  response.data.data.unusual_total / response.data.data.patient_count,
376
+            name: '不达标值患者',
377
+            count:response.data.data.unusual_total,
378
+          }
379
+          this.pieData.push(objone)
380
+          this.tableData.push(objone)
381
+
382
+          let objtwo = {
383
+            value:   response.data.data.normal_total / response.data.data.patient_count,
384
+            name: '达标值患者',
385
+            count:response.data.data.normal_total,
386
+
387
+          }
388
+          this.pieData.push(objtwo)
389
+          this.tableData.push(objtwo)
390
+
391
+          let objthree = {
392
+            value: response.data.data.patient_count / response.data.data.no_check_total,
393
+            name: '未检查患者',
394
+            count:response.data.data.no_check_total,
395
+
396
+          }
397
+          this.pieData.push(objthree)
398
+          this.tableData.push(objthree)
399
+
400
+          let objfour = {
401
+            value: response.data.data.patient_count,
402
+            name: '合计',
403
+            count:response.data.data.patient_count,
404
+          }
405
+          this.tableData.push(objfour)
406
+          for (let i = 0; i < this.pieData.length; i++) {
407
+            this.pieName[i] = this.pieData[i].name
408
+          }
409
+          this.myChart = echarts.init(document.getElementById('mychart'))
410
+          window.addEventListener('resize', () => {
411
+            this.myChart.resize()
412
+          })
413
+          const option = {
414
+            legend: {
415
+              // 图例
416
+              data: this.pieName,
417
+              left: '10%',
418
+              top: '30%',
419
+              orient: 'vertical'
185 420
             },
186
-            radius: "65%", //饼图半径
187
-            data: this.pieData,
188
-            itemStyle : {
189
-              emphasis: {
190
-                  shadowBlur: 10,
191
-                  shadowOffsetX: 0,
192
-                  shadowColor: 'rgba(0, 0, 0, 0.5)'
421
+            color: ['#ff7f9f', '#fff67f', '#1e5feb'],
422
+            title: {
423
+              // 设置饼图标题,位置设为顶部居中
424
+              //   text: "国内院士前五省份图示",
425
+              top: '0%',
426
+              left: 'center'
427
+            },
428
+            series: [
429
+              {
430
+                type: 'pie',
431
+                label: {
432
+                  show: true,
433
+                  formatter: '{b} : {d}% ({c})'
434
+                  // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
435
+                },
436
+                radius: '65%', //饼图半径
437
+                data: this.pieData
193 438
               }
194
-            }
439
+            ]
195 440
           }
196
-        ]
197
-      };
198
-    //   console.log(this.seriesData);
199
-      const optionFree = {
200
-        series: [
201
-          {
202
-            data: this.seriesData,
203
-            type: "line",
204
-            smooth: true
441
+          //   console.log(this.seriesData);
442
+          const optionFree = {
443
+            series: [
444
+              {
445
+                data: this.seriesData,
446
+                type: 'line',
447
+                smooth: true
448
+              }
449
+            ]
205 450
           }
206
-        ]
207
-      };
208
-      this.myChart = echarts.init(document.getElementById("mychart"));
209
-      this.myChart.setOption(option);
210
-      //随着屏幕大小调节图表
211
-      window.addEventListener("resize", () => {
212
-        this.myChart.resize();
213
-      });
451
+          this.myChart = echarts.init(document.getElementById('mychart'))
452
+          this.myChart.setOption(option)
453
+        } else {
454
+          this.$message.error(response.data.msg)
455
+        }
456
+      })
457
+
458
+    },
459
+    changeItem(val) {
460
+      const currentDate = new Date()
461
+      switch (val) {
462
+        case 1:
463
+
464
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
465
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
466
+
467
+          this.start_time = startOfMonth
468
+          this.end_time = endOfMonth
469
+          this.getData()
470
+
471
+          break
472
+        case 2:
473
+          // 上月的起始日期和结束日期
474
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
475
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
476
+
477
+          this.start_time = startOfLastMonth
478
+          this.end_time = endOfLastMonth
479
+          this.getData()
480
+
481
+          break
482
+        case 3:
483
+          // 今年的起始日期和结束日期
484
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
485
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
486
+
487
+          this.start_time = startOfYear
488
+          this.end_time = endOfYear
489
+          this.getData()
490
+
491
+          break
492
+        case 4:
493
+          // 上一年的起始日期和结束日期
494
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
495
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
496
+
497
+          this.start_time = startOfLastYear
498
+          this.end_time = endOfLastYear
499
+          this.getData()
500
+
501
+          break
502
+        case 5:
503
+          // 第一季度的起始日期和结束日期
504
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
505
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
506
+
507
+          this.start_time = startOfFirstQuarter
508
+          this.end_time = endOfFirstQuarter
509
+          this.getData()
510
+
511
+          break
512
+        case 6:
513
+          // 第二季度的起始日期和结束日期
514
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
515
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
516
+
517
+          this.start_time = startOfSecondQuarter
518
+          this.end_time = endOfSecondQuarter
519
+          this.getData()
520
+
521
+          break
522
+        case 7:
523
+          // 第三季度的起始日期和结束日期
524
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
525
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
526
+
527
+          this.start_time = startOfThirdQuarter
528
+          this.end_time = endOfThirdQuarter
529
+          this.getData()
530
+
531
+          break
532
+        case 8:
533
+          // 第四季度的起始日期和结束日期
534
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
535
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
536
+
537
+          this.start_time = startOfFourthQuarter
538
+          this.end_time = endOfFourthQuarter
539
+          this.getData()
540
+          break
541
+        case 9:
542
+          this.start_time = ''
543
+          this.end_time = ''
544
+          break
545
+      }
214 546
     },
547
+    changeItemTwo(val) {
548
+      const currentDate = new Date()
549
+      switch (val) {
550
+        case 1:
551
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
552
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
553
+          this.start_time_one = startOfMonth
554
+          this.end_time_one = endOfMonth
555
+          // this.getDataTwo()
556
+          break
557
+        case 2:
558
+          // 上月的起始日期和结束日期
559
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
560
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
561
+          this.start_time_one = startOfLastMonth
562
+          this.end_time_one = endOfLastMonth
563
+          // this.getDataTwo()
564
+          break
565
+        case 3:
566
+          // 今年的起始日期和结束日期
567
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
568
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
569
+
570
+          this.start_time_one = startOfYear
571
+          this.end_time_one = endOfYear
572
+          // this.getDataTwo()
573
+
574
+          break
575
+        case 4:
576
+          // 上一年的起始日期和结束日期
577
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
578
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
579
+
580
+          this.start_time_one = startOfLastYear
581
+          this.end_time_one = endOfLastYear
582
+          // this.getDataTwo()
583
+
584
+          break
585
+        case 5:
586
+          // 第一季度的起始日期和结束日期
587
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
588
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
589
+          this.start_time_one = startOfFirstQuarter
590
+          this.end_time_one = endOfFirstQuarter
591
+          // this.getDataTwo()
592
+          break
593
+        case 6:
594
+          // 第二季度的起始日期和结束日期
595
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
596
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
597
+          this.start_time_one = startOfSecondQuarter
598
+          this.end_time_one = endOfSecondQuarter
599
+          // this.getDataTwo()
600
+          break
601
+        case 7:
602
+          // 第三季度的起始日期和结束日期
603
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
604
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
605
+
606
+          this.start_time_one = startOfThirdQuarter
607
+          this.end_time_one = endOfThirdQuarter
608
+          // this.getDataTwo()
609
+
610
+          break
611
+        case 8:
612
+          // 第四季度的起始日期和结束日期
613
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
614
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
615
+
616
+          this.start_time_one = startOfFourthQuarter
617
+          this.end_time_one = endOfFourthQuarter
618
+          // this.getDataTwo()
619
+          break
620
+        case 9:
621
+          this.start_time_one = ''
622
+          this.end_time_one = ''
623
+          break
624
+      }
625
+    },
626
+
215 627
     getSummaries(param) {
216
-        const { columns, data } = param;
217
-        const sums = [];
218
-        columns.forEach((column, index) => {
219
-          if (index === 0) {
220
-            sums[index] = '总价';
221
-            return;
222
-          }
223
-          const values = data.map(item => Number(item[column.property]));
224
-          if (!values.every(value => isNaN(value))) {
225
-            sums[index] = values.reduce((prev, curr) => {
226
-              const value = Number(curr);
227
-              if (!isNaN(value)) {
228
-                return prev + curr;
229
-              } else {
230
-                return prev;
231
-              }
232
-            }, 0);
233
-            sums[index] += ' 元';
234
-          } else {
235
-            sums[index] = 'N/A';
236
-          }
237
-        });
628
+      const { columns, data } = param
629
+      const sums = []
630
+      columns.forEach((column, index) => {
631
+        if (index === 0) {
632
+          sums[index] = '总价'
633
+          return
634
+        }
635
+        const values = data.map(item => Number(item[column.property]))
636
+        if (!values.every(value => isNaN(value))) {
637
+          sums[index] = values.reduce((prev, curr) => {
638
+            const value = Number(curr)
639
+            if (!isNaN(value)) {
640
+              return prev + curr
641
+            } else {
642
+              return prev
643
+            }
644
+          }, 0)
645
+          sums[index] += ' 元'
646
+        } else {
647
+          sums[index] = 'N/A'
648
+        }
649
+      })
238 650
 
239
-        return sums;
651
+      return sums
240 652
     },
241
-    handleClick(id){
242
-        console.log(id);
653
+    handleClick(row) {
654
+      console.log(row)
655
+      if(row.name == "不达标值患者"){
656
+        this.statistics_type = 1
657
+      }else if(row.name == "达标值患者"){
658
+        this.statistics_type = 3
659
+      }else {
660
+        this.statistics_type = 2
661
+      }
662
+      this.getDataTwo()
663
+      // console.log(id)
243 664
     }
244 665
   }
245 666
 
246 667
 }
247 668
 </script>
248 669
 <style lang="scss" scoped>
249
-.content_top{
250
-    display: flex;
251
-    justify-content: space-around;
252
-    color: #1e5feb;
670
+.content_top {
671
+  display: flex;
672
+  justify-content: space-around;
673
+  color: #1e5feb;
253 674
 }
254 675
 </style>

+ 2 - 1
src/xt_pages/Dialysisanalysis/albumin/albuminalone.vue View File

@@ -354,7 +354,8 @@ export default {
354 354
         path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
355 355
       });
356 356
 
357
-    },exportAction(){
357
+    },
358
+    exportAction(){
358 359
       let list = []
359 360
       for (let i = 0; i < this.tableData.length; i++) {
360 361
         let order = this.tableData[i]

+ 319 - 13
src/xt_pages/Dialysisanalysis/bloodPhosphorus/phosphorusall.vue View File

@@ -68,23 +68,163 @@
68 68
           label="人数"
69 69
         >
70 70
         </el-table-column>
71
-<!--        <el-table-column-->
72
-<!--          prop="address"-->
73
-<!--          align="center"-->
74
-<!--          label="操作">-->
75
-<!--          <template slot-scope="scope">-->
76
-<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
77
-<!--                       type="text">查看详情-->
78
-<!--            </el-button>-->
79
-<!--          </template>-->
80
-<!--        </el-table-column>-->
71
+        <el-table-column
72
+          prop="address"
73
+          align="center"
74
+          label="操作">
75
+          <template slot-scope="scope">
76
+            <el-button @click="handleClick(scope.row)" style="font-size:16px;"
77
+                       type="text">查看详情
78
+            </el-button>
79
+          </template>
80
+        </el-table-column>
81 81
       </el-table>
82 82
     </div>
83
+    <el-dialog
84
+      width="1000px" class="registerDialog" :visible.sync="detailVisibility"
85
+      :close-on-click-modal="isClose"
86
+      :close-on-press-escape="isClose"
87
+    >
88
+      <el-row :gutter="25">
89
+        <el-col :span="5">
90
+          <div class="block">
91
+            <span>查询时间:</span>
92
+            <el-select size="small" v-model="time_type_two" placeholder="请选择"
93
+                       style="width:100px;margin-left:5px;" @change="changeItemTwo">
94
+              <el-option
95
+                v-for="item,index in times"
96
+                :key="index"
97
+                :label="item.label"
98
+                :value="item.value">
99
+              </el-option>
100
+            </el-select>
101
+          </div>
102
+        </el-col>
103
+        <el-col :span="10">
104
+          <div>
105
+            <el-date-picker
106
+              style="width: 120px"
107
+              v-model="start_time_one"
108
+              format="yyyy-MM-dd"
109
+              value-format="yyyy-MM-dd"
110
+              type="date"
111
+
112
+              placeholder="选择日期">
113
+            </el-date-picker>
114
+            <span>-</span>
115
+            <el-date-picker
116
+              style="width: 120px"
117
+              v-model="end_time_one"
118
+              format="yyyy-MM-dd"
119
+              value-format="yyyy-MM-dd"
120
+              type="date"
121
+              placeholder="选择日期">
122
+            </el-date-picker>
123
+          </div>
124
+        </el-col>
125
+
126
+        <el-col :span="4">
127
+          <div>
128
+
129
+            <el-select size="small" v-model="statistics_type" placeholder="请选择"
130
+                       style="width:100px;margin-left:5px;">
131
+              <el-option
132
+                v-for="item,index in statistics_types"
133
+                :key="index"
134
+                :label="item.label"
135
+                :value="item.value">
136
+              </el-option>
137
+            </el-select>
138
+
139
+          </div>
140
+        </el-col>
141
+
142
+        <!--        <el-col :span="4">-->
143
+        <!--          <div>-->
144
+        <!--            <el-select size="small" v-model="sort_type" placeholder="请选择"-->
145
+        <!--                       style="width:100px;margin-left:5px;">-->
146
+        <!--              <el-option-->
147
+        <!--                v-for="item,index in sort_types"-->
148
+        <!--                :key="index"-->
149
+        <!--                :label="item.label"-->
150
+        <!--                :value="item.value">-->
151
+        <!--              </el-option>-->
152
+        <!--            </el-select>-->
153
+        <!--          </div>-->
154
+        <!--        </el-col>-->
155
+
156
+        <el-col :span="4">
157
+          <div >
158
+            <el-input v-model="keyword" placeholder="请输入患者姓名或透析号"></el-input>
159
+          </div>
160
+        </el-col>
161
+
162
+        <el-col :span="2">
163
+          <div>
164
+            <el-button @click="getDataTwo()">查询</el-button>
165
+          </div>
166
+        </el-col>
167
+
168
+        <el-col :span="2">
169
+          <div>
170
+            <el-button @click="exportAction()">导出</el-button>
171
+          </div>
172
+        </el-col>
173
+
174
+        <!--        <el-col :span="2">-->
175
+        <!--          <div>-->
176
+        <!--            <el-button @click="getDataTwo()">打印</el-button>-->
177
+        <!--          </div>-->
178
+        <!--        </el-col>-->
179
+
180
+
181
+
182
+
183
+
184
+      </el-row>
185
+
186
+      <el-table
187
+        :data="patientTableData"
188
+        border
189
+        ref="table"
190
+        max-height="500px"
191
+        style="width: 100%">
192
+        <el-table-column
193
+          prop="dialysis_no"
194
+          align="center"
195
+          label="透析号"
196
+        >
197
+        </el-table-column>
198
+        <el-table-column
199
+          prop="name"
200
+          label="患者姓名"
201
+        >
202
+        </el-table-column>
203
+        <el-table-column
204
+          prop="date"
205
+          label="检查日期"
206
+        >
207
+        </el-table-column>
208
+
209
+        <el-table-column
210
+          prop="inspect_value"
211
+          label="结果"
212
+        >
213
+        </el-table-column>
214
+
215
+      </el-table>
216
+
217
+      <div slot="footer" class="dialog-footer">
218
+        <el-button @click="detailVisibility = false">取消</el-button>
219
+        <el-button type="primary" @click="detailVisibility = false">确定</el-button>
220
+      </div>
221
+    </el-dialog>
222
+
83 223
   </div>
84 224
 </template>
85 225
 <script>
86 226
 import * as echarts from 'echarts'
87
-import { GetQCStatistisData } from '../../../api/qcd'
227
+import { GetAllQCStatistisData, GetQCStatistisData } from '../../../api/qcd'
88 228
 
89 229
 const moment = require('moment')
90 230
 
@@ -103,6 +243,18 @@ export default {
103 243
   },
104 244
   data() {
105 245
     return {
246
+      statistics_types:[
247
+        { value: 1, label: '不达标患者' },
248
+        { value: 2, label: '未检查患者' },
249
+        { value: 3, label: '达标患者' },
250
+      ],
251
+      sort_types:[
252
+        { value: 1, label: '时间' },
253
+        { value: 2, label: '患者' },
254
+      ],
255
+      detailVisibility:false,
256
+      isClose:true,
257
+      time_type_two:1,
106 258
       time_type: 1,
107 259
       times: [
108 260
         { value: 1, label: '本月' },
@@ -119,6 +271,11 @@ export default {
119 271
       time_month: '',
120 272
       start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
121 273
       end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
274
+
275
+      start_time_one: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
276
+      end_time_one: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
277
+
278
+
122 279
       input: '',
123 280
       myChart: {},
124 281
       pieData: [],
@@ -126,12 +283,153 @@ export default {
126 283
       // myChartStyle:{float: "right", width: "100%", height: "400px"},
127 284
       tableData: [],
128 285
       reference:{},
286
+      statistics_type:1,
287
+      sort_type:"",
288
+      keyword:"",
289
+      patientTableData:[],
129 290
     }
130 291
   },
131 292
   mounted() {
132 293
     this.getData()
133 294
   },
134 295
   methods: {
296
+    exportAction(){
297
+      let list = []
298
+      for (let i = 0; i < this.patientTableData.length; i++) {
299
+        let order = this.patientTableData[i]
300
+        let name = order.name
301
+        let value = order.inspect_value
302
+        let inspect_date = order.date
303
+
304
+        let obj = {
305
+          '姓名': name,
306
+          '数值': value,
307
+          '日期': inspect_date,
308
+        }
309
+        list.push(obj)
310
+      }
311
+      import('@/vendor/Export2Excel').then(excel => {
312
+        const tHeader = ['姓名', '数值', '日期']
313
+        const filterVal = ['姓名', '数值', '日期']
314
+        const data = this.formatJson(filterVal, list)
315
+        excel.export_json_to_excel1({
316
+          header: tHeader,
317
+          data,
318
+          filename: '明细',
319
+          ref: this.$refs['table'].$el
320
+        })
321
+      })
322
+    },
323
+    formatJson(filterVal, jsonData) {
324
+      return jsonData.map(v => filterVal.map(j => v[j]))
325
+    },
326
+    getDataTwo() {
327
+      if(this.start_time_one.length == 0){
328
+        this.$message.error("请选择开始时间")
329
+      }
330
+      if(this.end_time_one.length == 0){
331
+        this.$message.error("请选择结束时间")
332
+      }
333
+      let params = {
334
+        start_date: this.start_time_one,
335
+        end_date: this.end_time_one,
336
+        project_id: 4,
337
+        item_id: 169,
338
+        item_type:this.statistics_type,
339
+        order_type:this.sort_type,
340
+        keyword: this.keyword,
341
+      }
342
+      this.patientTableData = []
343
+      GetAllQCStatistisData(params).then(response => {
344
+        if (response.data.state == 1) {
345
+          this.detailVisibility = true
346
+          this.patientTableData  =  this.patientTableData.concat(response.data.data.list)
347
+        } else {
348
+          this.$message.error(response.data.msg)
349
+        }
350
+      })
351
+
352
+    },
353
+    changeItemTwo(val) {
354
+      const currentDate = new Date()
355
+      switch (val) {
356
+        case 1:
357
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
358
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
359
+          this.start_time_one = startOfMonth
360
+          this.end_time_one = endOfMonth
361
+          // this.getDataTwo()
362
+          break
363
+        case 2:
364
+          // 上月的起始日期和结束日期
365
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
366
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
367
+          this.start_time_one = startOfLastMonth
368
+          this.end_time_one = endOfLastMonth
369
+          // this.getDataTwo()
370
+          break
371
+        case 3:
372
+          // 今年的起始日期和结束日期
373
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
374
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
375
+
376
+          this.start_time_one = startOfYear
377
+          this.end_time_one = endOfYear
378
+          // this.getDataTwo()
379
+
380
+          break
381
+        case 4:
382
+          // 上一年的起始日期和结束日期
383
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
384
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
385
+
386
+          this.start_time_one = startOfLastYear
387
+          this.end_time_one = endOfLastYear
388
+          // this.getDataTwo()
389
+
390
+          break
391
+        case 5:
392
+          // 第一季度的起始日期和结束日期
393
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
394
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
395
+          this.start_time_one = startOfFirstQuarter
396
+          this.end_time_one = endOfFirstQuarter
397
+          // this.getDataTwo()
398
+          break
399
+        case 6:
400
+          // 第二季度的起始日期和结束日期
401
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
402
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
403
+          this.start_time_one = startOfSecondQuarter
404
+          this.end_time_one = endOfSecondQuarter
405
+          // this.getDataTwo()
406
+          break
407
+        case 7:
408
+          // 第三季度的起始日期和结束日期
409
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
410
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
411
+
412
+          this.start_time_one = startOfThirdQuarter
413
+          this.end_time_one = endOfThirdQuarter
414
+          // this.getDataTwo()
415
+
416
+          break
417
+        case 8:
418
+          // 第四季度的起始日期和结束日期
419
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
420
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
421
+
422
+          this.start_time_one = startOfFourthQuarter
423
+          this.end_time_one = endOfFourthQuarter
424
+          // this.getDataTwo()
425
+          break
426
+        case 9:
427
+          this.start_time_one = ''
428
+          this.end_time_one = ''
429
+          break
430
+      }
431
+    },
432
+
135 433
     getData() {
136 434
       if(this.start_time.length == 0){
137 435
         this.$message.error("请选择开始时间")
@@ -353,8 +651,16 @@ export default {
353 651
 
354 652
       return sums
355 653
     },
356
-    handleClick(id) {
357
-      console.log(id)
654
+    handleClick(row) {
655
+      console.log(row)
656
+      if(row.name == "不达标值患者"){
657
+        this.statistics_type = 1
658
+      }else if(row.name == "达标值患者"){
659
+        this.statistics_type = 3
660
+      }else {
661
+        this.statistics_type = 2
662
+      }
663
+      this.getDataTwo()
358 664
     }
359 665
   }
360 666
 

+ 320 - 14
src/xt_pages/Dialysisanalysis/bloodPotassium/potassiumall.vue View File

@@ -67,23 +67,163 @@
67 67
           label="人数"
68 68
         >
69 69
         </el-table-column>
70
-<!--        <el-table-column-->
71
-<!--          prop="address"-->
72
-<!--          align="center"-->
73
-<!--          label="操作">-->
74
-<!--          <template slot-scope="scope">-->
75
-<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
76
-<!--                       type="text">查看详情-->
77
-<!--            </el-button>-->
78
-<!--          </template>-->
79
-<!--        </el-table-column>-->
70
+        <el-table-column
71
+          prop="address"
72
+          align="center"
73
+          label="操作">
74
+          <template slot-scope="scope">
75
+            <el-button @click="handleClick(scope.row)" style="font-size:16px;"
76
+                       type="text">查看详情
77
+            </el-button>
78
+          </template>
79
+        </el-table-column>
80 80
       </el-table>
81 81
     </div>
82
+    <el-dialog
83
+      width="1000px" class="registerDialog" :visible.sync="detailVisibility"
84
+      :close-on-click-modal="isClose"
85
+      :close-on-press-escape="isClose"
86
+    >
87
+      <el-row :gutter="25">
88
+        <el-col :span="5">
89
+          <div class="block">
90
+            <span>查询时间:</span>
91
+            <el-select size="small" v-model="time_type_two" placeholder="请选择"
92
+                       style="width:100px;margin-left:5px;" @change="changeItemTwo">
93
+              <el-option
94
+                v-for="item,index in times"
95
+                :key="index"
96
+                :label="item.label"
97
+                :value="item.value">
98
+              </el-option>
99
+            </el-select>
100
+          </div>
101
+        </el-col>
102
+        <el-col :span="10">
103
+          <div>
104
+            <el-date-picker
105
+              style="width: 120px"
106
+              v-model="start_time_one"
107
+              format="yyyy-MM-dd"
108
+              value-format="yyyy-MM-dd"
109
+              type="date"
110
+
111
+              placeholder="选择日期">
112
+            </el-date-picker>
113
+            <span>-</span>
114
+            <el-date-picker
115
+              style="width: 120px"
116
+              v-model="end_time_one"
117
+              format="yyyy-MM-dd"
118
+              value-format="yyyy-MM-dd"
119
+              type="date"
120
+              placeholder="选择日期">
121
+            </el-date-picker>
122
+          </div>
123
+        </el-col>
124
+
125
+        <el-col :span="4">
126
+          <div>
127
+
128
+            <el-select size="small" v-model="statistics_type" placeholder="请选择"
129
+                       style="width:100px;margin-left:5px;">
130
+              <el-option
131
+                v-for="item,index in statistics_types"
132
+                :key="index"
133
+                :label="item.label"
134
+                :value="item.value">
135
+              </el-option>
136
+            </el-select>
137
+
138
+          </div>
139
+        </el-col>
140
+
141
+        <!--        <el-col :span="4">-->
142
+        <!--          <div>-->
143
+        <!--            <el-select size="small" v-model="sort_type" placeholder="请选择"-->
144
+        <!--                       style="width:100px;margin-left:5px;">-->
145
+        <!--              <el-option-->
146
+        <!--                v-for="item,index in sort_types"-->
147
+        <!--                :key="index"-->
148
+        <!--                :label="item.label"-->
149
+        <!--                :value="item.value">-->
150
+        <!--              </el-option>-->
151
+        <!--            </el-select>-->
152
+        <!--          </div>-->
153
+        <!--        </el-col>-->
154
+
155
+        <el-col :span="4">
156
+          <div >
157
+            <el-input v-model="keyword" placeholder="请输入患者姓名或透析号"></el-input>
158
+          </div>
159
+        </el-col>
160
+
161
+        <el-col :span="2">
162
+          <div>
163
+            <el-button @click="getDataTwo()">查询</el-button>
164
+          </div>
165
+        </el-col>
166
+
167
+        <el-col :span="2">
168
+          <div>
169
+            <el-button @click="exportAction()">导出</el-button>
170
+          </div>
171
+        </el-col>
172
+
173
+        <!--        <el-col :span="2">-->
174
+        <!--          <div>-->
175
+        <!--            <el-button @click="getDataTwo()">打印</el-button>-->
176
+        <!--          </div>-->
177
+        <!--        </el-col>-->
178
+
179
+
180
+
181
+
182
+
183
+      </el-row>
184
+
185
+      <el-table
186
+        :data="patientTableData"
187
+        border
188
+        ref="table"
189
+        max-height="500px"
190
+        style="width: 100%">
191
+        <el-table-column
192
+          prop="dialysis_no"
193
+          align="center"
194
+          label="透析号"
195
+        >
196
+        </el-table-column>
197
+        <el-table-column
198
+          prop="name"
199
+          label="患者姓名"
200
+        >
201
+        </el-table-column>
202
+        <el-table-column
203
+          prop="date"
204
+          label="检查日期"
205
+        >
206
+        </el-table-column>
207
+
208
+        <el-table-column
209
+          prop="inspect_value"
210
+          label="结果"
211
+        >
212
+        </el-table-column>
213
+
214
+      </el-table>
215
+
216
+      <div slot="footer" class="dialog-footer">
217
+        <el-button @click="detailVisibility = false">取消</el-button>
218
+        <el-button type="primary" @click="detailVisibility = false">确定</el-button>
219
+      </div>
220
+    </el-dialog>
221
+
82 222
   </div>
83 223
 </template>
84 224
 <script>
85 225
 import * as echarts from 'echarts'
86
-import { GetQCStatistisData } from '../../../api/qcd'
226
+import { GetAllQCStatistisData, GetQCStatistisData } from '../../../api/qcd'
87 227
 
88 228
 const moment = require('moment')
89 229
 
@@ -102,7 +242,19 @@ export default {
102 242
   },
103 243
   data() {
104 244
     return {
245
+      statistics_types:[
246
+        { value: 1, label: '不达标患者' },
247
+        { value: 2, label: '未检查患者' },
248
+        { value: 3, label: '达标患者' },
249
+      ],
250
+      sort_types:[
251
+        { value: 1, label: '时间' },
252
+        { value: 2, label: '患者' },
253
+      ],
254
+      detailVisibility:false,
255
+      isClose:true,
105 256
       time_type: 1,
257
+      time_type_two:1,
106 258
       times: [
107 259
         { value: 1, label: '本月' },
108 260
         { value: 2, label: '上月' },
@@ -118,6 +270,11 @@ export default {
118 270
       time_month: '',
119 271
       start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
120 272
       end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
273
+
274
+      start_time_one: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
275
+      end_time_one: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
276
+
277
+
121 278
       input: '',
122 279
       myChart: {},
123 280
       pieData: [],
@@ -125,12 +282,74 @@ export default {
125 282
       // myChartStyle:{float: "right", width: "100%", height: "400px"},
126 283
       tableData: [],
127 284
       reference:{},
285
+      statistics_type:1,
286
+      sort_type:"",
287
+      keyword:"",
288
+      patientTableData:[],
128 289
     }
129 290
   },
130 291
   mounted() {
131 292
     this.getData()
132 293
   },
133 294
   methods: {
295
+    exportAction(){
296
+      let list = []
297
+      for (let i = 0; i < this.patientTableData.length; i++) {
298
+        let order = this.patientTableData[i]
299
+        let name = order.name
300
+        let value = order.inspect_value
301
+        let inspect_date = order.date
302
+
303
+        let obj = {
304
+          '姓名': name,
305
+          '数值': value,
306
+          '日期': inspect_date,
307
+        }
308
+        list.push(obj)
309
+      }
310
+      import('@/vendor/Export2Excel').then(excel => {
311
+        const tHeader = ['姓名', '数值', '日期']
312
+        const filterVal = ['姓名', '数值', '日期']
313
+        const data = this.formatJson(filterVal, list)
314
+        excel.export_json_to_excel1({
315
+          header: tHeader,
316
+          data,
317
+          filename: '明细',
318
+          ref: this.$refs['table'].$el
319
+        })
320
+      })
321
+    },
322
+
323
+    formatJson(filterVal, jsonData) {
324
+      return jsonData.map(v => filterVal.map(j => v[j]))
325
+    },
326
+    getDataTwo() {
327
+      if(this.start_time_one.length == 0){
328
+        this.$message.error("请选择开始时间")
329
+      }
330
+      if(this.end_time_one.length == 0){
331
+        this.$message.error("请选择结束时间")
332
+      }
333
+      let params = {
334
+        start_date: this.start_time_one,
335
+        end_date: this.end_time_one,
336
+        project_id: 4,
337
+        item_id: 48,
338
+        item_type:this.statistics_type,
339
+        order_type:this.sort_type,
340
+        keyword: this.keyword,
341
+      }
342
+      this.patientTableData = []
343
+      GetAllQCStatistisData(params).then(response => {
344
+        if (response.data.state == 1) {
345
+          this.detailVisibility = true
346
+          this.patientTableData  =  this.patientTableData.concat(response.data.data.list)
347
+        } else {
348
+          this.$message.error(response.data.msg)
349
+        }
350
+      })
351
+
352
+    },
134 353
     getData() {
135 354
       if(this.start_time.length == 0){
136 355
         this.$message.error("请选择开始时间")
@@ -142,7 +361,7 @@ export default {
142 361
         start_date: this.start_time,
143 362
         end_date: this.end_time,
144 363
         project_id: 4,
145
-        item_id: 48
364
+        item_id: 48,
146 365
       }
147 366
       this.pieData = []
148 367
       this.tableData = []
@@ -324,6 +543,85 @@ export default {
324 543
           break
325 544
       }
326 545
     },
546
+    changeItemTwo(val) {
547
+      const currentDate = new Date()
548
+      switch (val) {
549
+        case 1:
550
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
551
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
552
+          this.start_time_one = startOfMonth
553
+          this.end_time_one = endOfMonth
554
+          // this.getDataTwo()
555
+          break
556
+        case 2:
557
+          // 上月的起始日期和结束日期
558
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
559
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
560
+          this.start_time_one = startOfLastMonth
561
+          this.end_time_one = endOfLastMonth
562
+          // this.getDataTwo()
563
+          break
564
+        case 3:
565
+          // 今年的起始日期和结束日期
566
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
567
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
568
+
569
+          this.start_time_one = startOfYear
570
+          this.end_time_one = endOfYear
571
+          // this.getDataTwo()
572
+
573
+          break
574
+        case 4:
575
+          // 上一年的起始日期和结束日期
576
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
577
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
578
+
579
+          this.start_time_one = startOfLastYear
580
+          this.end_time_one = endOfLastYear
581
+          // this.getDataTwo()
582
+
583
+          break
584
+        case 5:
585
+          // 第一季度的起始日期和结束日期
586
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
587
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
588
+          this.start_time_one = startOfFirstQuarter
589
+          this.end_time_one = endOfFirstQuarter
590
+          // this.getDataTwo()
591
+          break
592
+        case 6:
593
+          // 第二季度的起始日期和结束日期
594
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
595
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
596
+          this.start_time_one = startOfSecondQuarter
597
+          this.end_time_one = endOfSecondQuarter
598
+          // this.getDataTwo()
599
+          break
600
+        case 7:
601
+          // 第三季度的起始日期和结束日期
602
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
603
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
604
+
605
+          this.start_time_one = startOfThirdQuarter
606
+          this.end_time_one = endOfThirdQuarter
607
+          // this.getDataTwo()
608
+
609
+          break
610
+        case 8:
611
+          // 第四季度的起始日期和结束日期
612
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
613
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
614
+
615
+          this.start_time_one = startOfFourthQuarter
616
+          this.end_time_one = endOfFourthQuarter
617
+          // this.getDataTwo()
618
+          break
619
+        case 9:
620
+          this.start_time_one = ''
621
+          this.end_time_one = ''
622
+          break
623
+      }
624
+    },
327 625
 
328 626
 
329 627
     getSummaries(param) {
@@ -352,8 +650,16 @@ export default {
352 650
 
353 651
       return sums
354 652
     },
355
-    handleClick(id) {
356
-      console.log(id)
653
+    handleClick(row) {
654
+      console.log(row)
655
+      if(row.name == "不达标值患者"){
656
+        this.statistics_type = 1
657
+      }else if(row.name == "达标值患者"){
658
+        this.statistics_type = 3
659
+      }else {
660
+        this.statistics_type = 2
661
+      }
662
+      this.getDataTwo()
357 663
     }
358 664
   }
359 665
 

+ 320 - 13
src/xt_pages/Dialysisanalysis/calcium/calciumall.vue View File

@@ -67,23 +67,163 @@
67 67
           label="人数"
68 68
         >
69 69
         </el-table-column>
70
-<!--        <el-table-column-->
71
-<!--          prop="address"-->
72
-<!--          align="center"-->
73
-<!--          label="操作">-->
74
-<!--          <template slot-scope="scope">-->
75
-<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
76
-<!--                       type="text">查看详情-->
77
-<!--            </el-button>-->
78
-<!--          </template>-->
79
-<!--        </el-table-column>-->
70
+        <el-table-column
71
+          prop="address"
72
+          align="center"
73
+          label="操作">
74
+          <template slot-scope="scope">
75
+            <el-button @click="handleClick(scope.row)" style="font-size:16px;"
76
+                       type="text">查看详情
77
+            </el-button>
78
+          </template>
79
+        </el-table-column>
80 80
       </el-table>
81 81
     </div>
82
+    <el-dialog
83
+      width="1000px" class="registerDialog" :visible.sync="detailVisibility"
84
+      :close-on-click-modal="isClose"
85
+      :close-on-press-escape="isClose"
86
+    >
87
+      <el-row :gutter="25">
88
+        <el-col :span="5">
89
+          <div class="block">
90
+            <span>查询时间:</span>
91
+            <el-select size="small" v-model="time_type_two" placeholder="请选择"
92
+                       style="width:100px;margin-left:5px;" @change="changeItemTwo">
93
+              <el-option
94
+                v-for="item,index in times"
95
+                :key="index"
96
+                :label="item.label"
97
+                :value="item.value">
98
+              </el-option>
99
+            </el-select>
100
+          </div>
101
+        </el-col>
102
+        <el-col :span="10">
103
+          <div>
104
+            <el-date-picker
105
+              style="width: 120px"
106
+              v-model="start_time_one"
107
+              format="yyyy-MM-dd"
108
+              value-format="yyyy-MM-dd"
109
+              type="date"
110
+
111
+              placeholder="选择日期">
112
+            </el-date-picker>
113
+            <span>-</span>
114
+            <el-date-picker
115
+              style="width: 120px"
116
+              v-model="end_time_one"
117
+              format="yyyy-MM-dd"
118
+              value-format="yyyy-MM-dd"
119
+              type="date"
120
+              placeholder="选择日期">
121
+            </el-date-picker>
122
+          </div>
123
+        </el-col>
124
+
125
+        <el-col :span="4">
126
+          <div>
127
+
128
+            <el-select size="small" v-model="statistics_type" placeholder="请选择"
129
+                       style="width:100px;margin-left:5px;">
130
+              <el-option
131
+                v-for="item,index in statistics_types"
132
+                :key="index"
133
+                :label="item.label"
134
+                :value="item.value">
135
+              </el-option>
136
+            </el-select>
137
+
138
+          </div>
139
+        </el-col>
140
+
141
+        <!--        <el-col :span="4">-->
142
+        <!--          <div>-->
143
+        <!--            <el-select size="small" v-model="sort_type" placeholder="请选择"-->
144
+        <!--                       style="width:100px;margin-left:5px;">-->
145
+        <!--              <el-option-->
146
+        <!--                v-for="item,index in sort_types"-->
147
+        <!--                :key="index"-->
148
+        <!--                :label="item.label"-->
149
+        <!--                :value="item.value">-->
150
+        <!--              </el-option>-->
151
+        <!--            </el-select>-->
152
+        <!--          </div>-->
153
+        <!--        </el-col>-->
154
+
155
+        <el-col :span="4">
156
+          <div >
157
+            <el-input v-model="keyword" placeholder="请输入患者姓名或透析号"></el-input>
158
+          </div>
159
+        </el-col>
160
+
161
+        <el-col :span="2">
162
+          <div>
163
+            <el-button @click="getDataTwo()">查询</el-button>
164
+          </div>
165
+        </el-col>
166
+
167
+        <el-col :span="2">
168
+          <div>
169
+            <el-button @click="exportAction()">导出</el-button>
170
+          </div>
171
+        </el-col>
172
+
173
+        <!--        <el-col :span="2">-->
174
+        <!--          <div>-->
175
+        <!--            <el-button @click="getDataTwo()">打印</el-button>-->
176
+        <!--          </div>-->
177
+        <!--        </el-col>-->
178
+
179
+
180
+
181
+
182
+
183
+      </el-row>
184
+
185
+      <el-table
186
+        :data="patientTableData"
187
+        border
188
+        ref="table"
189
+        max-height="500px"
190
+        style="width: 100%">
191
+        <el-table-column
192
+          prop="dialysis_no"
193
+          align="center"
194
+          label="透析号"
195
+        >
196
+        </el-table-column>
197
+        <el-table-column
198
+          prop="name"
199
+          label="患者姓名"
200
+        >
201
+        </el-table-column>
202
+        <el-table-column
203
+          prop="date"
204
+          label="检查日期"
205
+        >
206
+        </el-table-column>
207
+
208
+        <el-table-column
209
+          prop="inspect_value"
210
+          label="结果"
211
+        >
212
+        </el-table-column>
213
+
214
+      </el-table>
215
+
216
+      <div slot="footer" class="dialog-footer">
217
+        <el-button @click="detailVisibility = false">取消</el-button>
218
+        <el-button type="primary" @click="detailVisibility = false">确定</el-button>
219
+      </div>
220
+    </el-dialog>
221
+
82 222
   </div>
83 223
 </template>
84 224
 <script>
85 225
 import * as echarts from 'echarts'
86
-import { GetQCStatistisData } from '../../../api/qcd'
226
+import { GetAllQCStatistisData, GetQCStatistisData } from '../../../api/qcd'
87 227
 
88 228
 const moment = require('moment')
89 229
 
@@ -102,7 +242,19 @@ export default {
102 242
   },
103 243
   data() {
104 244
     return {
245
+      statistics_types:[
246
+        { value: 1, label: '不达标患者' },
247
+        { value: 2, label: '未检查患者' },
248
+        { value: 3, label: '达标患者' },
249
+      ],
250
+      sort_types:[
251
+        { value: 1, label: '时间' },
252
+        { value: 2, label: '患者' },
253
+      ],
254
+      detailVisibility:false,
255
+      isClose:true,
105 256
       time_type: 1,
257
+      time_type_two:1,
106 258
       times: [
107 259
         { value: 1, label: '本月' },
108 260
         { value: 2, label: '上月' },
@@ -118,6 +270,11 @@ export default {
118 270
       time_month: '',
119 271
       start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
120 272
       end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
273
+
274
+      start_time_one: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
275
+      end_time_one: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
276
+
277
+
121 278
       input: '',
122 279
       myChart: {},
123 280
       pieData: [],
@@ -125,12 +282,74 @@ export default {
125 282
       // myChartStyle:{float: "right", width: "100%", height: "400px"},
126 283
       tableData: [],
127 284
       reference:{},
285
+      statistics_type:1,
286
+      sort_type:"",
287
+      keyword:"",
288
+      patientTableData:[],
128 289
     }
129 290
   },
130 291
   mounted() {
131 292
     this.getData()
132 293
   },
133 294
   methods: {
295
+    exportAction(){
296
+      let list = []
297
+      for (let i = 0; i < this.patientTableData.length; i++) {
298
+        let order = this.patientTableData[i]
299
+        let name = order.name
300
+        let value = order.inspect_value
301
+        let inspect_date = order.date
302
+
303
+        let obj = {
304
+          '姓名': name,
305
+          '数值': value,
306
+          '日期': inspect_date,
307
+        }
308
+        list.push(obj)
309
+      }
310
+      import('@/vendor/Export2Excel').then(excel => {
311
+        const tHeader = ['姓名', '数值', '日期']
312
+        const filterVal = ['姓名', '数值', '日期']
313
+        const data = this.formatJson(filterVal, list)
314
+        excel.export_json_to_excel1({
315
+          header: tHeader,
316
+          data,
317
+          filename: '明细',
318
+          ref: this.$refs['table'].$el
319
+        })
320
+      })
321
+    },
322
+
323
+    formatJson(filterVal, jsonData) {
324
+      return jsonData.map(v => filterVal.map(j => v[j]))
325
+    },
326
+    getDataTwo() {
327
+      if(this.start_time_one.length == 0){
328
+        this.$message.error("请选择开始时间")
329
+      }
330
+      if(this.end_time_one.length == 0){
331
+        this.$message.error("请选择结束时间")
332
+      }
333
+      let params = {
334
+        start_date: this.start_time_one,
335
+        end_date: this.end_time_one,
336
+        project_id: 4,
337
+        item_id: 289,
338
+        item_type:this.statistics_type,
339
+        order_type:this.sort_type,
340
+        keyword: this.keyword,
341
+      }
342
+      this.patientTableData = []
343
+      GetAllQCStatistisData(params).then(response => {
344
+        if (response.data.state == 1) {
345
+          this.detailVisibility = true
346
+          this.patientTableData  =  this.patientTableData.concat(response.data.data.list)
347
+        } else {
348
+          this.$message.error(response.data.msg)
349
+        }
350
+      })
351
+
352
+    },
134 353
     getData() {
135 354
       if(this.start_time.length == 0){
136 355
         this.$message.error("请选择开始时间")
@@ -325,6 +544,86 @@ export default {
325 544
           break
326 545
       }
327 546
     },
547
+    changeItemTwo(val) {
548
+      const currentDate = new Date()
549
+      switch (val) {
550
+        case 1:
551
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
552
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
553
+          this.start_time_one = startOfMonth
554
+          this.end_time_one = endOfMonth
555
+          // this.getDataTwo()
556
+          break
557
+        case 2:
558
+          // 上月的起始日期和结束日期
559
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
560
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
561
+          this.start_time_one = startOfLastMonth
562
+          this.end_time_one = endOfLastMonth
563
+          // this.getDataTwo()
564
+          break
565
+        case 3:
566
+          // 今年的起始日期和结束日期
567
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
568
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
569
+
570
+          this.start_time_one = startOfYear
571
+          this.end_time_one = endOfYear
572
+          // this.getDataTwo()
573
+
574
+          break
575
+        case 4:
576
+          // 上一年的起始日期和结束日期
577
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
578
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
579
+
580
+          this.start_time_one = startOfLastYear
581
+          this.end_time_one = endOfLastYear
582
+          // this.getDataTwo()
583
+
584
+          break
585
+        case 5:
586
+          // 第一季度的起始日期和结束日期
587
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
588
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
589
+          this.start_time_one = startOfFirstQuarter
590
+          this.end_time_one = endOfFirstQuarter
591
+          // this.getDataTwo()
592
+          break
593
+        case 6:
594
+          // 第二季度的起始日期和结束日期
595
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
596
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
597
+          this.start_time_one = startOfSecondQuarter
598
+          this.end_time_one = endOfSecondQuarter
599
+          // this.getDataTwo()
600
+          break
601
+        case 7:
602
+          // 第三季度的起始日期和结束日期
603
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
604
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
605
+
606
+          this.start_time_one = startOfThirdQuarter
607
+          this.end_time_one = endOfThirdQuarter
608
+          // this.getDataTwo()
609
+
610
+          break
611
+        case 8:
612
+          // 第四季度的起始日期和结束日期
613
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
614
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
615
+
616
+          this.start_time_one = startOfFourthQuarter
617
+          this.end_time_one = endOfFourthQuarter
618
+          // this.getDataTwo()
619
+          break
620
+        case 9:
621
+          this.start_time_one = ''
622
+          this.end_time_one = ''
623
+          break
624
+      }
625
+    },
626
+
328 627
 
329 628
 
330 629
     getSummaries(param) {
@@ -353,8 +652,16 @@ export default {
353 652
 
354 653
       return sums
355 654
     },
356
-    handleClick(id) {
357
-      console.log(id)
655
+    handleClick(row) {
656
+      console.log(row)
657
+      if(row.name == "不达标值患者"){
658
+        this.statistics_type = 1
659
+      }else if(row.name == "达标值患者"){
660
+        this.statistics_type = 3
661
+      }else {
662
+        this.statistics_type = 2
663
+      }
664
+      this.getDataTwo()
358 665
     }
359 666
   }
360 667
 

+ 179 - 14
src/xt_pages/Dialysisanalysis/hemoglobin/hemoglobinall.vue View File

@@ -69,23 +69,23 @@
69 69
           label="人数"
70 70
         >
71 71
         </el-table-column>
72
-<!--        <el-table-column-->
73
-<!--          prop="address"-->
74
-<!--          align="center"-->
75
-<!--          label="操作">-->
76
-<!--          <template slot-scope="scope">-->
77
-<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
78
-<!--                       type="text">查看详情-->
79
-<!--            </el-button>-->
80
-<!--          </template>-->
81
-<!--        </el-table-column>-->
72
+        <el-table-column
73
+          prop="address"
74
+          align="center"
75
+          label="操作">
76
+          <template slot-scope="scope">
77
+            <el-button @click="handleClick(scope.row)" style="font-size:16px;"
78
+                       type="text">查看详情
79
+            </el-button>
80
+          </template>
81
+        </el-table-column>
82 82
       </el-table>
83 83
     </div>
84 84
   </div>
85 85
 </template>
86 86
 <script>
87 87
 import * as echarts from 'echarts'
88
-import { GetQCStatistisData } from '../../../api/qcd'
88
+import { GetAllQCStatistisData, GetQCStatistisData } from '../../../api/qcd'
89 89
 
90 90
 const moment = require('moment')
91 91
 
@@ -104,7 +104,19 @@ export default {
104 104
   },
105 105
   data() {
106 106
     return {
107
+      statistics_types:[
108
+        { value: 1, label: '不达标患者' },
109
+        { value: 2, label: '未检查患者' },
110
+        { value: 3, label: '达标患者' },
111
+      ],
112
+      sort_types:[
113
+        { value: 1, label: '时间' },
114
+        { value: 2, label: '患者' },
115
+      ],
116
+      detailVisibility:false,
117
+      isClose:true,
107 118
       time_type: 1,
119
+      time_type_two:1,
108 120
       times: [
109 121
         { value: 1, label: '本月' },
110 122
         { value: 2, label: '上月' },
@@ -121,18 +133,163 @@ export default {
121 133
       time_month: '',
122 134
       start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
123 135
       end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
136
+      start_time_one: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
137
+      end_time_one: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
138
+
124 139
       input: '',
125 140
       myChart: {},
126 141
       pieData: [],
127 142
       pieName: [],
128 143
       // myChartStyle:{float: "right", width: "100%", height: "400px"},
129
-      tableData: []
144
+      tableData: [],
145
+      statistics_type:1,
146
+      sort_type:"",
147
+      keyword:"",
148
+      patientTableData:[],
130 149
     }
131 150
   },
132 151
   mounted() {
133 152
     this.getData()
134 153
   },
135 154
   methods: {
155
+    exportAction(){
156
+      let list = []
157
+      for (let i = 0; i < this.patientTableData.length; i++) {
158
+        let order = this.patientTableData[i]
159
+        let name = order.name
160
+        let value = order.inspect_value
161
+        let inspect_date = order.date
162
+
163
+        let obj = {
164
+          '姓名': name,
165
+          '数值': value,
166
+          '日期': inspect_date,
167
+        }
168
+        list.push(obj)
169
+      }
170
+      import('@/vendor/Export2Excel').then(excel => {
171
+        const tHeader = ['姓名', '数值', '日期']
172
+        const filterVal = ['姓名', '数值', '日期']
173
+        const data = this.formatJson(filterVal, list)
174
+        excel.export_json_to_excel1({
175
+          header: tHeader,
176
+          data,
177
+          filename: '明细',
178
+          ref: this.$refs['table'].$el
179
+        })
180
+      })
181
+    },
182
+
183
+    formatJson(filterVal, jsonData) {
184
+      return jsonData.map(v => filterVal.map(j => v[j]))
185
+    },
186
+    changeItemTwo(val) {
187
+      const currentDate = new Date()
188
+      switch (val) {
189
+        case 1:
190
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
191
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
192
+          this.start_time_one = startOfMonth
193
+          this.end_time_one = endOfMonth
194
+          // this.getDataTwo()
195
+          break
196
+        case 2:
197
+          // 上月的起始日期和结束日期
198
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
199
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
200
+          this.start_time_one = startOfLastMonth
201
+          this.end_time_one = endOfLastMonth
202
+          // this.getDataTwo()
203
+          break
204
+        case 3:
205
+          // 今年的起始日期和结束日期
206
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
207
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
208
+
209
+          this.start_time_one = startOfYear
210
+          this.end_time_one = endOfYear
211
+          // this.getDataTwo()
212
+
213
+          break
214
+        case 4:
215
+          // 上一年的起始日期和结束日期
216
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
217
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
218
+
219
+          this.start_time_one = startOfLastYear
220
+          this.end_time_one = endOfLastYear
221
+          // this.getDataTwo()
222
+
223
+          break
224
+        case 5:
225
+          // 第一季度的起始日期和结束日期
226
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
227
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
228
+          this.start_time_one = startOfFirstQuarter
229
+          this.end_time_one = endOfFirstQuarter
230
+          // this.getDataTwo()
231
+          break
232
+        case 6:
233
+          // 第二季度的起始日期和结束日期
234
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
235
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
236
+          this.start_time_one = startOfSecondQuarter
237
+          this.end_time_one = endOfSecondQuarter
238
+          // this.getDataTwo()
239
+          break
240
+        case 7:
241
+          // 第三季度的起始日期和结束日期
242
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
243
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
244
+
245
+          this.start_time_one = startOfThirdQuarter
246
+          this.end_time_one = endOfThirdQuarter
247
+          // this.getDataTwo()
248
+
249
+          break
250
+        case 8:
251
+          // 第四季度的起始日期和结束日期
252
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
253
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
254
+
255
+          this.start_time_one = startOfFourthQuarter
256
+          this.end_time_one = endOfFourthQuarter
257
+          // this.getDataTwo()
258
+          break
259
+        case 9:
260
+          this.start_time_one = ''
261
+          this.end_time_one = ''
262
+          break
263
+      }
264
+    },
265
+
266
+    getDataTwo() {
267
+      if(this.start_time_one.length == 0){
268
+        this.$message.error("请选择开始时间")
269
+      }
270
+      if(this.end_time_one.length == 0){
271
+        this.$message.error("请选择结束时间")
272
+      }
273
+      let params = {
274
+        start_date: this.start_time_one,
275
+        end_date: this.end_time_one,
276
+        project_id: 1,
277
+        item_id: 17,
278
+        item_type:this.statistics_type,
279
+        order_type:this.sort_type,
280
+        keyword: this.keyword,
281
+      }
282
+      this.patientTableData = []
283
+      GetAllQCStatistisData(params).then(response => {
284
+        if (response.data.state == 1) {
285
+          this.detailVisibility = true
286
+          this.patientTableData  =  this.patientTableData.concat(response.data.data.list)
287
+        } else {
288
+          this.$message.error(response.data.msg)
289
+        }
290
+      })
291
+
292
+    },
136 293
     getData() {
137 294
       if(this.start_time.length == 0){
138 295
         this.$message.error("请选择开始时间")
@@ -354,8 +511,16 @@ export default {
354 511
 
355 512
       return sums
356 513
     },
357
-    handleClick(id) {
358
-      console.log(id)
514
+    handleClick(row) {
515
+      console.log(row)
516
+      if(row.name == "不达标值患者"){
517
+        this.statistics_type = 1
518
+      }else if(row.name == "达标值患者"){
519
+        this.statistics_type = 3
520
+      }else {
521
+        this.statistics_type = 2
522
+      }
523
+      this.getDataTwo()
359 524
     }
360 525
   }
361 526
 

+ 318 - 14
src/xt_pages/Dialysisanalysis/platelets/plateletsall.vue View File

@@ -68,23 +68,163 @@
68 68
           label="人数"
69 69
         >
70 70
         </el-table-column>
71
-<!--        <el-table-column-->
72
-<!--          prop="address"-->
73
-<!--          align="center"-->
74
-<!--          label="操作">-->
75
-<!--          <template slot-scope="scope">-->
76
-<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
77
-<!--                       type="text">查看详情-->
78
-<!--            </el-button>-->
79
-<!--          </template>-->
80
-<!--        </el-table-column>-->
71
+        <el-table-column
72
+          prop="address"
73
+          align="center"
74
+          label="操作">
75
+          <template slot-scope="scope">
76
+            <el-button @click="handleClick(scope.row)" style="font-size:16px;"
77
+                       type="text">查看详情
78
+            </el-button>
79
+          </template>
80
+        </el-table-column>
81 81
       </el-table>
82 82
     </div>
83
+    <el-dialog
84
+      width="1000px" class="registerDialog" :visible.sync="detailVisibility"
85
+      :close-on-click-modal="isClose"
86
+      :close-on-press-escape="isClose"
87
+    >
88
+      <el-row :gutter="25">
89
+        <el-col :span="5">
90
+          <div class="block">
91
+            <span>查询时间:</span>
92
+            <el-select size="small" v-model="time_type_two" placeholder="请选择"
93
+                       style="width:100px;margin-left:5px;" @change="changeItemTwo">
94
+              <el-option
95
+                v-for="item,index in times"
96
+                :key="index"
97
+                :label="item.label"
98
+                :value="item.value">
99
+              </el-option>
100
+            </el-select>
101
+          </div>
102
+        </el-col>
103
+        <el-col :span="10">
104
+          <div>
105
+            <el-date-picker
106
+              style="width: 120px"
107
+              v-model="start_time_one"
108
+              format="yyyy-MM-dd"
109
+              value-format="yyyy-MM-dd"
110
+              type="date"
111
+
112
+              placeholder="选择日期">
113
+            </el-date-picker>
114
+            <span>-</span>
115
+            <el-date-picker
116
+              style="width: 120px"
117
+              v-model="end_time_one"
118
+              format="yyyy-MM-dd"
119
+              value-format="yyyy-MM-dd"
120
+              type="date"
121
+              placeholder="选择日期">
122
+            </el-date-picker>
123
+          </div>
124
+        </el-col>
125
+
126
+        <el-col :span="4">
127
+          <div>
128
+
129
+            <el-select size="small" v-model="statistics_type" placeholder="请选择"
130
+                       style="width:100px;margin-left:5px;">
131
+              <el-option
132
+                v-for="item,index in statistics_types"
133
+                :key="index"
134
+                :label="item.label"
135
+                :value="item.value">
136
+              </el-option>
137
+            </el-select>
138
+
139
+          </div>
140
+        </el-col>
141
+
142
+        <!--        <el-col :span="4">-->
143
+        <!--          <div>-->
144
+        <!--            <el-select size="small" v-model="sort_type" placeholder="请选择"-->
145
+        <!--                       style="width:100px;margin-left:5px;">-->
146
+        <!--              <el-option-->
147
+        <!--                v-for="item,index in sort_types"-->
148
+        <!--                :key="index"-->
149
+        <!--                :label="item.label"-->
150
+        <!--                :value="item.value">-->
151
+        <!--              </el-option>-->
152
+        <!--            </el-select>-->
153
+        <!--          </div>-->
154
+        <!--        </el-col>-->
155
+
156
+        <el-col :span="4">
157
+          <div >
158
+            <el-input v-model="keyword" placeholder="请输入患者姓名或透析号"></el-input>
159
+          </div>
160
+        </el-col>
161
+
162
+        <el-col :span="2">
163
+          <div>
164
+            <el-button @click="getDataTwo()">查询</el-button>
165
+          </div>
166
+        </el-col>
167
+
168
+        <el-col :span="2">
169
+          <div>
170
+            <el-button @click="exportAction()">导出</el-button>
171
+          </div>
172
+        </el-col>
173
+
174
+        <!--        <el-col :span="2">-->
175
+        <!--          <div>-->
176
+        <!--            <el-button @click="getDataTwo()">打印</el-button>-->
177
+        <!--          </div>-->
178
+        <!--        </el-col>-->
179
+
180
+
181
+
182
+
183
+
184
+      </el-row>
185
+
186
+      <el-table
187
+        :data="patientTableData"
188
+        border
189
+        ref="table"
190
+        max-height="500px"
191
+        style="width: 100%">
192
+        <el-table-column
193
+          prop="dialysis_no"
194
+          align="center"
195
+          label="透析号"
196
+        >
197
+        </el-table-column>
198
+        <el-table-column
199
+          prop="name"
200
+          label="患者姓名"
201
+        >
202
+        </el-table-column>
203
+        <el-table-column
204
+          prop="date"
205
+          label="检查日期"
206
+        >
207
+        </el-table-column>
208
+
209
+        <el-table-column
210
+          prop="inspect_value"
211
+          label="结果"
212
+        >
213
+        </el-table-column>
214
+
215
+      </el-table>
216
+
217
+      <div slot="footer" class="dialog-footer">
218
+        <el-button @click="detailVisibility = false">取消</el-button>
219
+        <el-button type="primary" @click="detailVisibility = false">确定</el-button>
220
+      </div>
221
+    </el-dialog>
222
+
83 223
   </div>
84 224
 </template>
85 225
 <script>
86 226
 import * as echarts from 'echarts'
87
-import { GetQCStatistisData } from '../../../api/qcd'
227
+import { GetAllQCStatistisData, GetQCStatistisData } from '../../../api/qcd'
88 228
 
89 229
 const moment = require('moment')
90 230
 
@@ -103,7 +243,19 @@ export default {
103 243
   },
104 244
   data() {
105 245
     return {
246
+      statistics_types:[
247
+        { value: 1, label: '不达标患者' },
248
+        { value: 2, label: '未检查患者' },
249
+        { value: 3, label: '达标患者' },
250
+      ],
251
+      sort_types:[
252
+        { value: 1, label: '时间' },
253
+        { value: 2, label: '患者' },
254
+      ],
255
+      detailVisibility:false,
256
+      isClose:true,
106 257
       time_type: 1,
258
+      time_type_two:1,
107 259
       times: [
108 260
         { value: 1, label: '本月' },
109 261
         { value: 2, label: '上月' },
@@ -119,19 +271,84 @@ export default {
119 271
       time_month: '',
120 272
       start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
121 273
       end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
274
+      start_time_one: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
275
+      end_time_one: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
276
+
122 277
       input: '',
123 278
       myChart: {},
124 279
       pieData: [],
125 280
       pieName: [],
126 281
       reference:{},
127 282
       // myChartStyle:{float: "right", width: "100%", height: "400px"},
128
-      tableData: []
283
+      tableData: [],
284
+      statistics_type:1,
285
+      sort_type:"",
286
+      keyword:"",
287
+      patientTableData:[],
129 288
     }
130 289
   },
131 290
   mounted() {
132 291
     this.getData()
133 292
   },
134 293
   methods: {
294
+    exportAction(){
295
+      let list = []
296
+      for (let i = 0; i < this.patientTableData.length; i++) {
297
+        let order = this.patientTableData[i]
298
+        let name = order.name
299
+        let value = order.inspect_value
300
+        let inspect_date = order.date
301
+
302
+        let obj = {
303
+          '姓名': name,
304
+          '数值': value,
305
+          '日期': inspect_date,
306
+        }
307
+        list.push(obj)
308
+      }
309
+      import('@/vendor/Export2Excel').then(excel => {
310
+        const tHeader = ['姓名', '数值', '日期']
311
+        const filterVal = ['姓名', '数值', '日期']
312
+        const data = this.formatJson(filterVal, list)
313
+        excel.export_json_to_excel1({
314
+          header: tHeader,
315
+          data,
316
+          filename: '明细',
317
+          ref: this.$refs['table'].$el
318
+        })
319
+      })
320
+    },
321
+
322
+    formatJson(filterVal, jsonData) {
323
+      return jsonData.map(v => filterVal.map(j => v[j]))
324
+    },
325
+    getDataTwo() {
326
+      if(this.start_time_one.length == 0){
327
+        this.$message.error("请选择开始时间")
328
+      }
329
+      if(this.end_time_one.length == 0){
330
+        this.$message.error("请选择结束时间")
331
+      }
332
+      let params = {
333
+        start_date: this.start_time_one,
334
+        end_date: this.end_time_one,
335
+        project_id: 1,
336
+        item_id: 166,
337
+        item_type:this.statistics_type,
338
+        order_type:this.sort_type,
339
+        keyword: this.keyword,
340
+      }
341
+      this.patientTableData = []
342
+      GetAllQCStatistisData(params).then(response => {
343
+        if (response.data.state == 1) {
344
+          this.detailVisibility = true
345
+          this.patientTableData  =  this.patientTableData.concat(response.data.data.list)
346
+        } else {
347
+          this.$message.error(response.data.msg)
348
+        }
349
+      })
350
+
351
+    },
135 352
     getData() {
136 353
       if(this.start_time.length == 0){
137 354
         this.$message.error("请选择开始时间")
@@ -325,6 +542,85 @@ export default {
325 542
           break
326 543
       }
327 544
     },
545
+    changeItemTwo(val) {
546
+      const currentDate = new Date()
547
+      switch (val) {
548
+        case 1:
549
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
550
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
551
+          this.start_time_one = startOfMonth
552
+          this.end_time_one = endOfMonth
553
+          // this.getDataTwo()
554
+          break
555
+        case 2:
556
+          // 上月的起始日期和结束日期
557
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
558
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
559
+          this.start_time_one = startOfLastMonth
560
+          this.end_time_one = endOfLastMonth
561
+          // this.getDataTwo()
562
+          break
563
+        case 3:
564
+          // 今年的起始日期和结束日期
565
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
566
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
567
+
568
+          this.start_time_one = startOfYear
569
+          this.end_time_one = endOfYear
570
+          // this.getDataTwo()
571
+
572
+          break
573
+        case 4:
574
+          // 上一年的起始日期和结束日期
575
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
576
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
577
+
578
+          this.start_time_one = startOfLastYear
579
+          this.end_time_one = endOfLastYear
580
+          // this.getDataTwo()
581
+
582
+          break
583
+        case 5:
584
+          // 第一季度的起始日期和结束日期
585
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
586
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
587
+          this.start_time_one = startOfFirstQuarter
588
+          this.end_time_one = endOfFirstQuarter
589
+          // this.getDataTwo()
590
+          break
591
+        case 6:
592
+          // 第二季度的起始日期和结束日期
593
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
594
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
595
+          this.start_time_one = startOfSecondQuarter
596
+          this.end_time_one = endOfSecondQuarter
597
+          // this.getDataTwo()
598
+          break
599
+        case 7:
600
+          // 第三季度的起始日期和结束日期
601
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
602
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
603
+
604
+          this.start_time_one = startOfThirdQuarter
605
+          this.end_time_one = endOfThirdQuarter
606
+          // this.getDataTwo()
607
+
608
+          break
609
+        case 8:
610
+          // 第四季度的起始日期和结束日期
611
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
612
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
613
+
614
+          this.start_time_one = startOfFourthQuarter
615
+          this.end_time_one = endOfFourthQuarter
616
+          // this.getDataTwo()
617
+          break
618
+        case 9:
619
+          this.start_time_one = ''
620
+          this.end_time_one = ''
621
+          break
622
+      }
623
+    },
328 624
 
329 625
 
330 626
     getSummaries(param) {
@@ -353,8 +649,16 @@ export default {
353 649
 
354 650
       return sums
355 651
     },
356
-    handleClick(id) {
357
-      console.log(id)
652
+    handleClick(row) {
653
+      console.log(row)
654
+      if(row.name == "不达标值患者"){
655
+        this.statistics_type = 1
656
+      }else if(row.name == "达标值患者"){
657
+        this.statistics_type = 3
658
+      }else {
659
+        this.statistics_type = 2
660
+      }
661
+      this.getDataTwo()
358 662
     }
359 663
   }
360 664
 

+ 318 - 114
src/xt_pages/Dialysisanalysis/qualitycontrol/totalSstatistics.vue View File

@@ -67,124 +67,163 @@
67 67
           label="人数"
68 68
         >
69 69
         </el-table-column>
70
-<!--        <el-table-column-->
71
-<!--          prop="address"-->
72
-<!--          align="center"-->
73
-<!--          label="操作">-->
74
-<!--          <template slot-scope="scope">-->
75
-<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
76
-<!--                       type="text">查看详情-->
77
-<!--            </el-button>-->
78
-<!--          </template>-->
79
-<!--        </el-table-column>-->
70
+        <el-table-column
71
+          prop="address"
72
+          align="center"
73
+          label="操作">
74
+          <template slot-scope="scope">
75
+            <el-button @click="handleClick(scope.row)" style="font-size:16px;"
76
+                       type="text">查看详情
77
+            </el-button>
78
+          </template>
79
+        </el-table-column>
80 80
       </el-table>
81 81
     </div>
82
-<!--    <el-dialog class="centerDialog"-->
83
-<!--               title="打印"-->
84
-<!--              >-->
85
-<!--      <el-row :gutter="25">-->
86
-<!--        <el-col :span="5">-->
87
-<!--          <div class="block">-->
88
-<!--            <span>查询时间:</span>-->
89
-<!--            <el-select size="small" v-model="time_type" placeholder="请选择"-->
90
-<!--                       style="width:150px;margin-left:10px;" @change="changeItem">-->
91
-<!--              <el-option-->
92
-<!--                v-for="item,index in times"-->
93
-<!--                :key="index"-->
94
-<!--                :label="item.label"-->
95
-<!--                :value="item.value">-->
96
-<!--              </el-option>-->
97
-<!--            </el-select>-->
98
-<!--          </div>-->
99
-<!--        </el-col>-->
100
-<!--        <el-col :span="8">-->
101
-<!--          <div>-->
102
-<!--            <el-date-picker-->
103
-<!--              style="width: 200px"-->
104
-
105
-<!--              v-model="start_time"-->
106
-<!--              format="yyyy-MM-dd"-->
107
-<!--              value-format="yyyy-MM-dd"-->
108
-<!--              type="date"-->
109
-
110
-<!--              placeholder="选择日期">-->
111
-<!--            </el-date-picker>-->
112
-<!--            <span>-</span>-->
113
-<!--            <el-date-picker-->
114
-<!--              style="width: 200px"-->
115
-<!--              v-model="end_time"-->
116
-<!--              format="yyyy-MM-dd"-->
117
-<!--              value-format="yyyy-MM-dd"-->
118
-<!--              type="date"-->
119
-<!--              placeholder="选择日期">-->
120
-<!--            </el-date-picker>-->
121
-<!--          </div>-->
122
-<!--        </el-col>-->
123
-<!--        <el-col :span="5">-->
124
-<!--          <el-select-->
125
-<!--            placeholder="请选择类型"-->
126
-<!--            style="width:95%"-->
127
-<!--          >-->
128
-<!--            <el-option label="不达标患者" value="1"></el-option>-->
129
-<!--            <el-option label="未检查患者" value="2"></el-option>-->
130
-<!--            <el-option label="达标患者" value="3"></el-option>-->
131
-<!--            <el-option label="不限" value="0"></el-option>-->
132
-<!--          </el-select>-->
133
-<!--        </el-col>-->
134
-<!--        <el-col :span="5">-->
135
-<!--          <el-select-->
136
-<!--            placeholder="请选择排序"-->
137
-<!--            style="width:95%"-->
138
-<!--          >-->
139
-<!--            <el-option label="按时间" value="1"></el-option>-->
140
-<!--            <el-option label="按患者" value="2"></el-option>-->
141
-<!--            <el-option label="不限" value="0"></el-option>-->
142
-<!--          </el-select>-->
143
-<!--        </el-col>-->
144
-<!--        <el-col :span="3">-->
145
-<!--          <el-button type="primary" @click="getData()">查询</el-button>-->
146
-<!--          <el-button type="primary" @click="getData()">打印</el-button>-->
147
-<!--          <el-button type="primary" @click="getData()">导出</el-button>-->
148
-
149
-<!--        </el-col>-->
150
-<!--      </el-row>-->
151
-<!--      <div style="width: 80%;margin: auto;">-->
152
-<!--        <el-table-->
153
-<!--          :data="tableData"-->
154
-<!--          border-->
155
-<!--          style="width: 100%;">-->
156
-<!--          <el-table-column-->
157
-<!--            prop="name"-->
158
-<!--            align="center"-->
159
-<!--            label="透析号"-->
160
-<!--          >-->
161
-<!--          </el-table-column>-->
162
-<!--          <el-table-column-->
163
-<!--            prop="count"-->
164
-<!--            label="姓名"-->
165
-<!--          >-->
166
-<!--          </el-table-column>-->
167
-<!--          <el-table-column-->
168
-<!--            prop="address"-->
169
-<!--            align="center"-->
170
-<!--            label="检查日期">-->
171
-
172
-<!--          </el-table-column>-->
173
-<!--          <el-table-column-->
174
-<!--            prop="address"-->
175
-<!--            align="center"-->
176
-<!--            label="结果">-->
177
-
178
-<!--          </el-table-column>-->
179
-<!--        </el-table>-->
180
-<!--      </div>-->
181
-
182
-<!--    </el-dialog>-->
82
+    <el-dialog
83
+      width="1000px" class="registerDialog" :visible.sync="detailVisibility"
84
+      :close-on-click-modal="isClose"
85
+      :close-on-press-escape="isClose"
86
+    >
87
+      <el-row :gutter="25">
88
+        <el-col :span="5">
89
+          <div class="block">
90
+            <span>查询时间:</span>
91
+            <el-select size="small" v-model="time_type_two" placeholder="请选择"
92
+                       style="width:100px;margin-left:5px;" @change="changeItemTwo">
93
+              <el-option
94
+                v-for="item,index in times"
95
+                :key="index"
96
+                :label="item.label"
97
+                :value="item.value">
98
+              </el-option>
99
+            </el-select>
100
+          </div>
101
+        </el-col>
102
+        <el-col :span="10">
103
+          <div>
104
+            <el-date-picker
105
+              style="width: 120px"
106
+              v-model="start_time_one"
107
+              format="yyyy-MM-dd"
108
+              value-format="yyyy-MM-dd"
109
+              type="date"
110
+
111
+              placeholder="选择日期">
112
+            </el-date-picker>
113
+            <span>-</span>
114
+            <el-date-picker
115
+              style="width: 120px"
116
+              v-model="end_time_one"
117
+              format="yyyy-MM-dd"
118
+              value-format="yyyy-MM-dd"
119
+              type="date"
120
+              placeholder="选择日期">
121
+            </el-date-picker>
122
+          </div>
123
+        </el-col>
124
+
125
+        <el-col :span="4">
126
+          <div>
127
+
128
+            <el-select size="small" v-model="statistics_type" placeholder="请选择"
129
+                       style="width:100px;margin-left:5px;">
130
+              <el-option
131
+                v-for="item,index in statistics_types"
132
+                :key="index"
133
+                :label="item.label"
134
+                :value="item.value">
135
+              </el-option>
136
+            </el-select>
137
+
138
+          </div>
139
+        </el-col>
140
+
141
+        <!--        <el-col :span="4">-->
142
+        <!--          <div>-->
143
+        <!--            <el-select size="small" v-model="sort_type" placeholder="请选择"-->
144
+        <!--                       style="width:100px;margin-left:5px;">-->
145
+        <!--              <el-option-->
146
+        <!--                v-for="item,index in sort_types"-->
147
+        <!--                :key="index"-->
148
+        <!--                :label="item.label"-->
149
+        <!--                :value="item.value">-->
150
+        <!--              </el-option>-->
151
+        <!--            </el-select>-->
152
+        <!--          </div>-->
153
+        <!--        </el-col>-->
154
+
155
+        <el-col :span="4">
156
+          <div >
157
+            <el-input v-model="keyword" placeholder="请输入患者姓名或透析号"></el-input>
158
+          </div>
159
+        </el-col>
160
+
161
+        <el-col :span="2">
162
+          <div>
163
+            <el-button @click="getDataTwo()">查询</el-button>
164
+          </div>
165
+        </el-col>
166
+
167
+        <el-col :span="2">
168
+          <div>
169
+            <el-button @click="exportAction()">导出</el-button>
170
+          </div>
171
+        </el-col>
172
+
173
+        <!--        <el-col :span="2">-->
174
+        <!--          <div>-->
175
+        <!--            <el-button @click="getDataTwo()">打印</el-button>-->
176
+        <!--          </div>-->
177
+        <!--        </el-col>-->
178
+
179
+
180
+
181
+
182
+
183
+      </el-row>
184
+
185
+      <el-table
186
+        :data="patientTableData"
187
+        border
188
+        ref="table"
189
+        max-height="500px"
190
+        style="width: 100%">
191
+        <el-table-column
192
+          prop="dialysis_no"
193
+          align="center"
194
+          label="透析号"
195
+        >
196
+        </el-table-column>
197
+        <el-table-column
198
+          prop="name"
199
+          label="患者姓名"
200
+        >
201
+        </el-table-column>
202
+        <el-table-column
203
+          prop="date"
204
+          label="检查日期"
205
+        >
206
+        </el-table-column>
207
+
208
+        <el-table-column
209
+          prop="inspect_value"
210
+          label="结果"
211
+        >
212
+        </el-table-column>
213
+
214
+      </el-table>
215
+
216
+      <div slot="footer" class="dialog-footer">
217
+        <el-button @click="detailVisibility = false">取消</el-button>
218
+        <el-button type="primary" @click="detailVisibility = false">确定</el-button>
219
+      </div>
220
+    </el-dialog>
221
+
183 222
   </div>
184 223
 </template>
185 224
 <script>
186 225
 import * as echarts from 'echarts'
187
-import { GetQCStatistisData } from '../../../api/qcd'
226
+import { GetAllQCStatistisData, GetQCStatistisData } from '../../../api/qcd'
188 227
 
189 228
 const moment = require('moment')
190 229
 
@@ -203,7 +242,19 @@ export default {
203 242
   },
204 243
   data() {
205 244
     return {
245
+      statistics_types:[
246
+        { value: 1, label: '不达标患者' },
247
+        { value: 2, label: '未检查患者' },
248
+        { value: 3, label: '达标患者' },
249
+      ],
250
+      sort_types:[
251
+        { value: 1, label: '时间' },
252
+        { value: 2, label: '患者' },
253
+      ],
254
+      detailVisibility:false,
255
+      isClose:true,
206 256
       time_type: 1,
257
+      time_type_two:1,
207 258
       times: [
208 259
         { value: 1, label: '本月' },
209 260
         { value: 2, label: '上月' },
@@ -219,6 +270,11 @@ export default {
219 270
       time_month: '',
220 271
       start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
221 272
       end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
273
+
274
+      start_time_one: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
275
+      end_time_one: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
276
+
277
+
222 278
       input: '',
223 279
       myChart: {},
224 280
       pieData: [],
@@ -226,12 +282,74 @@ export default {
226 282
       // myChartStyle:{float: "right", width: "100%", height: "400px"},
227 283
       tableData: [],
228 284
       reference:{},
285
+      statistics_type:1,
286
+      sort_type:"",
287
+      keyword:"",
288
+      patientTableData:[],
229 289
     }
230 290
   },
231 291
   mounted() {
232 292
     this.getData()
233 293
   },
234 294
   methods: {
295
+    exportAction(){
296
+      let list = []
297
+      for (let i = 0; i < this.patientTableData.length; i++) {
298
+        let order = this.patientTableData[i]
299
+        let name = order.name
300
+        let value = order.inspect_value
301
+        let inspect_date = order.date
302
+
303
+        let obj = {
304
+          '姓名': name,
305
+          '数值': value,
306
+          '日期': inspect_date,
307
+        }
308
+        list.push(obj)
309
+      }
310
+      import('@/vendor/Export2Excel').then(excel => {
311
+        const tHeader = ['姓名', '数值', '日期']
312
+        const filterVal = ['姓名', '数值', '日期']
313
+        const data = this.formatJson(filterVal, list)
314
+        excel.export_json_to_excel1({
315
+          header: tHeader,
316
+          data,
317
+          filename: '明细',
318
+          ref: this.$refs['table'].$el
319
+        })
320
+      })
321
+    },
322
+
323
+    formatJson(filterVal, jsonData) {
324
+      return jsonData.map(v => filterVal.map(j => v[j]))
325
+    },
326
+    getDataTwo() {
327
+      if(this.start_time_one.length == 0){
328
+        this.$message.error("请选择开始时间")
329
+      }
330
+      if(this.end_time_one.length == 0){
331
+        this.$message.error("请选择结束时间")
332
+      }
333
+      let params = {
334
+        start_date: this.start_time_one,
335
+        end_date: this.end_time_one,
336
+        project_id: 20,
337
+        item_id: 171,
338
+        item_type:this.statistics_type,
339
+        order_type:this.sort_type,
340
+        keyword: this.keyword,
341
+      }
342
+      this.patientTableData = []
343
+      GetAllQCStatistisData(params).then(response => {
344
+        if (response.data.state == 1) {
345
+          this.detailVisibility = true
346
+          this.patientTableData  =  this.patientTableData.concat(response.data.data.list)
347
+        } else {
348
+          this.$message.error(response.data.msg)
349
+        }
350
+      })
351
+
352
+    },
235 353
     getData() {
236 354
       if(this.start_time.length == 0){
237 355
         this.$message.error("请选择开始时间")
@@ -425,6 +543,85 @@ export default {
425 543
           break
426 544
       }
427 545
     },
546
+    changeItemTwo(val) {
547
+      const currentDate = new Date()
548
+      switch (val) {
549
+        case 1:
550
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
551
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
552
+          this.start_time_one = startOfMonth
553
+          this.end_time_one = endOfMonth
554
+          // this.getDataTwo()
555
+          break
556
+        case 2:
557
+          // 上月的起始日期和结束日期
558
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
559
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
560
+          this.start_time_one = startOfLastMonth
561
+          this.end_time_one = endOfLastMonth
562
+          // this.getDataTwo()
563
+          break
564
+        case 3:
565
+          // 今年的起始日期和结束日期
566
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
567
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
568
+
569
+          this.start_time_one = startOfYear
570
+          this.end_time_one = endOfYear
571
+          // this.getDataTwo()
572
+
573
+          break
574
+        case 4:
575
+          // 上一年的起始日期和结束日期
576
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
577
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
578
+
579
+          this.start_time_one = startOfLastYear
580
+          this.end_time_one = endOfLastYear
581
+          // this.getDataTwo()
582
+
583
+          break
584
+        case 5:
585
+          // 第一季度的起始日期和结束日期
586
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
587
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
588
+          this.start_time_one = startOfFirstQuarter
589
+          this.end_time_one = endOfFirstQuarter
590
+          // this.getDataTwo()
591
+          break
592
+        case 6:
593
+          // 第二季度的起始日期和结束日期
594
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
595
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
596
+          this.start_time_one = startOfSecondQuarter
597
+          this.end_time_one = endOfSecondQuarter
598
+          // this.getDataTwo()
599
+          break
600
+        case 7:
601
+          // 第三季度的起始日期和结束日期
602
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
603
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
604
+
605
+          this.start_time_one = startOfThirdQuarter
606
+          this.end_time_one = endOfThirdQuarter
607
+          // this.getDataTwo()
608
+
609
+          break
610
+        case 8:
611
+          // 第四季度的起始日期和结束日期
612
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
613
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
614
+
615
+          this.start_time_one = startOfFourthQuarter
616
+          this.end_time_one = endOfFourthQuarter
617
+          // this.getDataTwo()
618
+          break
619
+        case 9:
620
+          this.start_time_one = ''
621
+          this.end_time_one = ''
622
+          break
623
+      }
624
+    },
428 625
 
429 626
 
430 627
     getSummaries(param) {
@@ -453,8 +650,15 @@ export default {
453 650
 
454 651
       return sums
455 652
     },
456
-    handleClick(id) {
457
-      console.log(id)
653
+    handleClick(row) {
654
+      if(row.name == "不达标值患者"){
655
+        this.statistics_type = 1
656
+      }else if(row.name == "达标值患者"){
657
+        this.statistics_type = 3
658
+      }else {
659
+        this.statistics_type = 2
660
+      }
661
+      this.getDataTwo()
458 662
     }
459 663
   }
460 664
 

+ 2 - 2
src/xt_pages/dialysis/batch_print/batch_print_order_thirteen.vue View File

@@ -438,9 +438,9 @@
438 438
                 <div class="row">
439 439
                   上机医生
440 440
                   <div class="inline_block under_line" style="width:150px;text-align: center;margin-right:30px;">
441
-                    <span v-if="setAdminUserES(record.prescription, 'prescription_doctor') == ''">{{getAdminUser(record.prescription, 'prescription_doctor')}}</span>
441
+                    <span v-if="setAdminUserES(record.prescription, 'creater') == ''">{{getAdminUser(record.prescription, 'creater')}}</span>
442 442
                     <span v-else>
443
-                      <img class="es-img" style="height:30px;" :src="setAdminUserES(record.prescription, 'prescription_doctor')" />
443
+                      <img class="es-img" style="height:30px;" :src="setAdminUserES(record.prescription, 'creater')" />
444 444
                     </span>
445 445
                   </div>
446 446
                   冲管护士

+ 85 - 69
src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue View File

@@ -1,5 +1,6 @@
1 1
 <template>
2
- <div>
2
+  <div>
3
+  <div>
3 4
   <el-dialog
4 5
     title="接诊评估"
5 6
     class="newDialog"
@@ -222,6 +223,10 @@
222 223
           v-if="isShow('跌倒风险预防措施')"
223 224
           style="display: inline-block;"
224 225
         >
226
+          <!--v-if="isShow('跌倒风险预防措施')" isFalldown prop="precautionTwo" @change="precautionchange" isCheckmust('跌倒风险预防措施')
227
+            :prop="isName('跌倒风险预防措施')" :rules="isCheckmust('跌倒风险预防措施')"
228
+            [{required: true, message: '请选择跌倒风险预防措施', trigger: 'change'}]-->
229
+
225 230
           <el-checkbox-group v-model="precautionTwo" @change="precautionchange" >
226 231
             <el-checkbox
227 232
               v-for="item in precaution_arr"
@@ -232,7 +237,6 @@
232 237
           </el-checkbox-group>
233 238
         </el-form-item>
234 239
       </div>
235
-
236 240
       <el-form-item
237 241
         label-width="200px"
238 242
         label="其他跌倒风险预防措施 : "
@@ -338,50 +342,48 @@
338 342
     </el-form>
339 343
     <div slot="footer" class="dialog-footer">
340 344
       <el-button @click="handleCancle">取 消</el-button>
341
-      <!--v-if="hasPermission" -->
342
-      <el-button type="primary"  @click="handleComfirm('receiveTreatmentAsses')"
345
+      <!-- v-if="hasPermission"-->
346
+      <el-button type="primary"   @click="handleComfirm('receiveTreatmentAsses')"
343 347
         >保 存</el-button
344 348
       >
345 349
     </div>
346 350
   </el-dialog>
347 351
 
348 352
 
349
- <el-dialog
350
-          title="提示"
351
-          :visible.sync="infoDialogVisible"
352
-          width="30%">
353
-          <span>
354
-           <el-form>
355
-             <el-row>
356
-               <span>申请日期:</span>
357
-                <span>
358
-                    <el-date-picker
359
-                      type="datetime"
360
-                      format="yyyy-MM-dd HH:mm"
361
-                      value-format="yyyy-MM-dd HH:mm"
362
-                      placeholder="选择时间"
363
-                      v-model="selected_date"
364
-                  ></el-date-picker>
365
-                </span>
366
-             </el-row>
367
-             <el-row>
368
-               <span>备注:</span>
369
-                <span>
370
-                   <el-input v-model="remark" style="width:200px"></el-input>
371
-                </span>
372
-             </el-row>
373
-           </el-form>
374
-
375
-          </span>
376
-          <span slot="footer" class="dialog-footer">
377
-            <el-button @click="infoDialogVisible = false">取 消</el-button>
378
-            <el-button type="primary" @click="saveInformation">确 定</el-button>
379
-          </span>
380
-        </el-dialog>
381
-
382
-  </div>
383
-
384
-
353
+  <el-dialog
354
+      title="提示"
355
+      :visible.sync="infoDialogVisible"
356
+      width="30%">
357
+      <span>
358
+        <el-form>
359
+          <el-row>
360
+            <span>申请日期:</span>
361
+            <span>
362
+                <el-date-picker
363
+                  type="datetime"
364
+                  format="yyyy-MM-dd HH:mm"
365
+                  value-format="yyyy-MM-dd HH:mm"
366
+                  placeholder="选择时间"
367
+                  v-model="selected_date"
368
+              ></el-date-picker>
369
+            </span>
370
+          </el-row>
371
+          <el-row>
372
+            <span>备注:</span>
373
+            <span>
374
+                <el-input v-model="remark" style="width:200px"></el-input>
375
+            </span>
376
+          </el-row>
377
+        </el-form>
378
+
379
+      </span>
380
+      <span slot="footer" class="dialog-footer">
381
+        <el-button @click="infoDialogVisible = false">取 消</el-button>
382
+        <el-button type="primary" @click="saveInformation">确 定</el-button>
383
+      </span>
384
+    </el-dialog>
385
+   </div>
386
+ </div>
385 387
 </template>
386 388
 
387 389
 <script>
@@ -431,12 +433,13 @@ export default {
431 433
         tumble: "",
432 434
         his_department: "",
433 435
         his_bed: "",
436
+        falldown:[],
434 437
       },
435 438
       precautionTwo: [],
439
+      arr:[],
436 440
       infoDialogVisible:false,
437 441
       selected_date:"",
438
-      remark:"",
439
-      arr:[],
442
+      remark:""
440 443
     };
441 444
   },
442 445
   methods: {
@@ -455,27 +458,40 @@ export default {
455 458
     },
456 459
     show(accepts) {
457 460
       console.log("accepts333333", accepts);
461
+    
462
+      console.log("入库时方式",this.way_arr)
463
+     
464
+      console.log("体委",this.posture_arr)
458 465
       if (accepts.id > 0) {
459 466
         accepts.tumble = accepts.tumble.toString();
467
+      }else{
468
+        console.log("hh2h3h2h3h32h23h23h32h23h")
469
+        // this.receiveTreatmentAsses.way = "1"
470
+        // this.receiveTreatmentAsses.posture ="1"
471
+        // this.receiveTreatmentAsses.condition = "2"
472
+
473
+        accepts.way =1
474
+        accepts.posture=1
475
+        accepts.condition =2
476
+
460 477
       }
461 478
       this.accepts = accepts;
462
-      // console.log("accepts", accepts);
463
-      var arr = [];
464
-      if (this.accepts.precaution) {
465
-        var precaution = this.accepts.precaution.split(",");
466
-        // console.log("precaution", precaution);
467
-        // console.log("hhh", this.precaution_arr);
468
-        for (let i = 0; i < precaution.length; i++) {
469
-          for (let j = 0; j < this.precaution_arr.length; j++) {
470
-            if (parseInt(precaution[i]) == this.precaution_arr[j].id) {
471
-              // console.log("aaaa");
472
-              arr.push(this.precaution_arr[j].name);
473
-            }
474
-          }
475
-        }
476
-        this.precautionTwo = arr;
477
-        // console.log("arr", arr);
478
-      }
479
+     console.log("accepts", accepts);
480
+      // var arr = [];
481
+      // if (this.accepts.precaution) {
482
+      //   var precaution = this.accepts.precaution.split(",");
483
+      //   // console.log("precaution", precaution);
484
+      //   // console.log("hhh", this.precaution_arr);
485
+      //   for (let i = 0; i < precaution.length; i++) {
486
+      //     for (let j = 0; j < this.precaution_arr.length; j++) {
487
+      //       if (parseInt(precaution[i]) == this.precaution_arr[j].id) {
488
+      //         // console.log("aaaa");
489
+      //         this.arr.push(this.precaution_arr[j].name);
490
+      //       }
491
+      //     }
492
+      //   }
493
+      //   this.precautionTwo = this.arr;
494
+      // }
479 495
 
480 496
       this.getPermission();
481 497
       for (var index in this.receiveTreatmentAsses) {
@@ -509,19 +525,16 @@ export default {
509 525
 
510 526
     handleComfirm: function (formName) {
511 527
       // var arr = [];
512
-        if(this.precaution_arr!=null && this.precaution_arr.length >0){
513
-        for (let i = 0; i < this.precaution_arr.length; i++) {
514
-          for (let j = 0; j < this.precautionTwo.length; j++) {
515
-            if (this.precaution_arr[i].name == this.precautionTwo[j]) {
516
-              this.arr.push(this.precaution_arr[i].id);
517
-            }
528
+      for (let i = 0; i < this.precaution_arr.length; i++) {
529
+        for (let j = 0; j < this.precautionTwo.length; j++) {
530
+          if (this.precaution_arr[i].name == this.precautionTwo[j]) {
531
+            this.arr.push(this.precaution_arr[i].id);
518 532
           }
519 533
         }
520
-        var obj = this.arr.join(",");
521 534
       }
522
-
535
+      // this.precautionchange()
536
+      var obj = this.arr.join(",");
523 537
       this.receiveTreatmentAsses.precaution = obj;
524
-
525 538
       let ParamsQuery = this.receiveTreatmentAsses;
526 539
 
527 540
       console.log("ParamsQuery", ParamsQuery);
@@ -544,6 +557,9 @@ export default {
544 557
           postAccepts(ParamsQuery).then((response) => {
545 558
             if (response.data.state == 0) {
546 559
               this.$message.error(response.data.msg);
560
+               if(response.data.code == 600000008){
561
+                 this.infoDialogVisible = true
562
+               }
547 563
               return false;
548 564
             } else {
549 565
               this.$notify({
@@ -696,7 +712,7 @@ export default {
696 712
         saveInformation(params).then(response=>{
697 713
            if(response.data.state == 1){
698 714
              var information = response.data.data.information
699
-             this.$message.success("审核成功!")
715
+             this.$message.success("提交成功!")
700 716
              this.infoDialogVisible = false
701 717
            }
702 718
         })

+ 2 - 2
src/xt_pages/dialysis/dialysisFlow.vue View File

@@ -568,10 +568,10 @@
568 568
         });
569 569
       },
570 570
       clickCurrent(val) {
571
-        console.log(val);
571
+        console.log("val23323223",val);
572 572
         this.$router.push({
573 573
           path: "/dialysis/details",
574
-          query: { patient_id: val.patient_id, date: val.sch_time_int,mode_id:val.mode_id }
574
+          query: { patient_id: val.patient_id, date: val.schedule_date,mode_id:val.mode_id }
575 575
         });
576 576
       },
577 577
       handleSelectionChange(val) {

+ 2 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderThirteen.vue View File

@@ -351,8 +351,8 @@
351 351
         <div class="row">
352 352
           上机医生
353 353
           <div class="inline_block under_line" style="width:150px;text-align: center;margin-right:30px;">
354
-            <span v-if="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) == ''"> {{ getAdminUser(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) }} </span>
355
-            <img style="height:30px;" :src="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:''))" alt="" srcset="" v-else />
354
+            <span v-if="setAdminUserES(prescription==null?0:(prescription.creater?prescription.creater:'')) == ''"> {{ getAdminUser(prescription==null?0:(prescription.creater?prescription.creater:'')) }} </span>
355
+            <img style="height:30px;" :src="setAdminUserES(prescription==null?0:(prescription.creater?prescription.creater:''))" alt="" srcset="" v-else />
356 356
           </div>
357 357
           冲管护士
358 358
           <div class="inline_block under_line" style="width:150px;text-align: center;margin-right:30px;">

+ 1 - 0
src/xt_pages/outpatientCharges/settlementTemplate/printOne.vue View File

@@ -336,6 +336,7 @@
336 336
                                         <td style="width:10%;">麻醉医师代码</td>
337 337
                                     </tr>
338 338
                                     <tr>
339
+
339 340
                                         <td style="text-align:left;">&nbsp;主要:</td>
340 341
                                         <td>&nbsp;</td>
341 342
                                         <td>&nbsp;</td>

+ 53 - 0
src/xt_pages/outpatientCharges/summary.vue View File

@@ -738,6 +738,59 @@ export default {
738 738
           })
739 739
           .catch(function (error) {
740 740
           });
741
+    },export_detail_zzzz(){
742
+      handleTeamData({}).then((response) => {
743
+        if (response.data.state == 0) {
744
+          this.$message.error(response.data.msg);
745
+          return false;
746
+        } else {
747
+          let list = [];
748
+          for (let i = 0; i < response.data.data.ps.length; i++) {
749
+            let order = response.data.data.ps[i];
750
+            let obj = {
751
+              id:order.team_id,
752
+              name:order.pn,
753
+              sub_id:order.project.id,
754
+              sub_name:order.project.project_name
755
+            }
756
+            list.push(obj)
757
+          }
758
+
759
+          var tarList = [];
760
+          for (let i = 0; i < list.length; i++) {
761
+            let obj = {
762
+              "大项id": list[i].id,
763
+              "大项名称": list[i].name,
764
+              "子项id": list[i].sub_id,
765
+              "子项名称": list[i].sub_name,
766
+            }
767
+            tarList.push(obj)
768
+          }
769
+
770
+          import("@/vendor/Export2Excel").then((excel) => {
771
+            const tHeader = [
772
+              "大项id",
773
+              "大项名称",
774
+              "子项id",
775
+              "子项名称",
776
+            ];
777
+            const filterVal = [
778
+              "大项id",
779
+              "大项名称",
780
+              "子项id",
781
+              "子项名称",
782
+            ];
783
+            const data = this.formatJson(filterVal, tarList);
784
+            excel.export_json_to_excel({
785
+              header: tHeader,
786
+              data,
787
+              filename: "消费明细",
788
+            });
789
+          });
790
+        }
791
+      });
792
+
793
+
741 794
     },
742 795
     queryData(row){
743 796
       var that = this;

+ 3 - 0
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -2416,6 +2416,7 @@ export default {
2416 2416
                   this.$emit('editKeepLoad', false)
2417 2417
                   return
2418 2418
                 }
2419
+                console.log("2o23o23o23o2o23",this.prescriptions[i].advices[b])
2419 2420
                 if(this.prescriptions[i].advices[b].day == NaN){
2420 2421
                   this.$message.error(`处方${i+1}的${this.prescriptions[i].advices[b].drug_name}天数未填写`)
2421 2422
                   this.$emit('editKeepLoad', false)
@@ -2426,6 +2427,8 @@ export default {
2426 2427
                   this.$emit('editKeepLoad', false)
2427 2428
                   return
2428 2429
                 }
2430
+          
2431
+
2429 2432
                 if(this.prescriptions[i].advices[b].prescribing_number == ""){
2430 2433
                   this.$message.error(`处方${i+1}的${this.prescriptions[i].advices[b].drug_name}总量未填写`)
2431 2434
                   this.$emit('editKeepLoad', false)

+ 2 - 0
src/xt_pages/outpatientTool/components/settle.vue View File

@@ -93,6 +93,8 @@
93 93
               <template slot-scope="scope">
94 94
                   <div v-if="scope.row.med_type == '14'">门诊特殊病</div>
95 95
                   <div v-if="scope.row.med_type == '11'">普通门诊</div>
96
+                  <div v-if="scope.row.med_type == '1112'">普通门诊</div>
97
+                
96 98
               </template>
97 99
           </el-table-column>
98 100
           <el-table-column align="center" prop="item_name" label="医疗费总额">

+ 197 - 1
src/xt_pages/outpatientTool/labelPrint.vue View File

@@ -47,11 +47,16 @@
47 47
 
48 48
                   <el-checkbox v-model="is_combination_print">是否组合打印</el-checkbox>
49 49
 
50
+<!--                  <el-checkbox v-model="is_combination_print">是否组合打印</el-checkbox>-->
51
+                  <el-button v-if="!is_combination_print" @click="printTwo()">组合打印</el-button>
52
+
50 53
                 </div>
51 54
             </div>
52 55
             <el-table :data="isShow?tableData:tableDataTwo" border :row-style="{ color: '#303133' }" ref="table"
53 56
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
57
+                      @selection-change="handleSelectionChange"
54 58
                       highlight-current-row>
59
+              <el-table-column align="center" type="selection" width="55"></el-table-column>
55 60
 
56 61
                 <el-table-column align="center" prop="name" label="患者名字">
57 62
                     <template slot-scope="scope">{{ scope.row.patient_name }}</template>
@@ -216,7 +221,7 @@
216 221
         current_number: '',
217 222
         current_project_name: '',
218 223
         current_name: '',
219
-
224
+        selecting_schs:[],
220 225
         labelVisible: false,
221 226
         crumbs: [
222 227
           { path: false, name: 'HIS工具' },
@@ -244,6 +249,182 @@
244 249
       }
245 250
     },
246 251
     methods: {
252
+      printTwo(){
253
+        let patient_ids = []
254
+        for(let i = 0; i < this.selecting_schs.length; i++){
255
+          patient_ids.push(this.selecting_schs[i].patient_id)
256
+        }
257
+        patient_ids =  this.uniqueTwo(patient_ids)
258
+        if(patient_ids.length != 0 && patient_ids.length > 1){
259
+          this.$message.error("请选择同一患者打印")
260
+          return
261
+        }else{
262
+          let ids = []
263
+          var name = ""
264
+          var patient_name = ""
265
+          var team_ids = ""
266
+          var project_ids = ""
267
+
268
+
269
+          for(let i = 0; i < this.selecting_schs.length; i++){
270
+            ids.push(this.selecting_schs[i].id)
271
+            patient_name = this.selecting_schs[0].patient_name
272
+            if(name.length == 0){
273
+              name = this.selecting_schs[i].project_name
274
+            }else{
275
+              name = name + "," + this.selecting_schs[i].project_name
276
+
277
+            }
278
+
279
+            if(team_ids.length == 0){
280
+              if(this.selecting_schs[i].team_id > 0) {
281
+                team_ids = this.selecting_schs[i].team_id
282
+              }
283
+            }else{
284
+              if(this.selecting_schs[i].team_id > 0) {
285
+                team_ids = team_ids + "," + this.selecting_schs[i].team_id
286
+              }
287
+            }
288
+
289
+            if(project_ids.length == 0){
290
+              if(this.selecting_schs[i].team_id > 0) {
291
+                project_ids = this.selecting_schs[i].project_ids
292
+              }
293
+            }else{
294
+              if(this.selecting_schs[i].team_id > 0) {
295
+                project_ids = project_ids + "," + this.selecting_schs[i].project_ids
296
+              }
297
+            }
298
+          }
299
+          let params = {
300
+            patient_id: patient_ids[0],
301
+            ids: ids,
302
+            record_date:this.chargeDate,
303
+          }
304
+          getPrintLable(params).then(response => {
305
+            if (response.data.state == 0) {
306
+              this.$message.error(response.data.msg)
307
+              return false
308
+            } else {
309
+              this.labelVisible = true
310
+              if(response.data.data.labels.id > 0){
311
+                this.current_ctime = response.data.data.labels.ctime
312
+                this.current_number = ""
313
+                this.current_project_name =name
314
+                this.current_name = patient_name
315
+                this.$nextTick(() => {
316
+                  JsBarcode('#barcode',response.data.data.labels.id, {
317
+                    format: 'CODE39',
318
+                    lineColor: '#000',
319
+                    background: '#EBEEF5',
320
+                    width: 3,
321
+                    height: 200,
322
+                    displayValue: false,
323
+                    fontOptions:"bold italic",//使文字加粗体或变斜体
324
+                    font:"fantasy",//设置文本的字体
325
+                    textAlign:"left",//设置文本的水平对齐方式
326
+                    textPosition:"top",//设置文本的垂直位置
327
+                    textMargin:5,//设置条形码和文本之间的间距
328
+                    fontSize:15,//设置文本的大小
329
+                    margin:15//设置条形码周围的空白边距
330
+                  })
331
+                });
332
+
333
+              }else{
334
+                let params = {
335
+                  is_combination_print:this.is_combination_print,
336
+                  patient_id: patient_ids[0],
337
+                  ids:ids,
338
+                  team_ids:team_ids,
339
+                  project_ids:project_ids,
340
+                  doctor_id:0,
341
+                  is_team:0,
342
+                  record_date:this.chargeDate,
343
+                }
344
+                this.current_params = params
345
+                console.log(this.current_params)
346
+                if(!this.current_params.is_combination_print){
347
+                  if(this.current_params.project_ids.toString().length > 0 && this.current_params.team_ids.toString().length == 0){
348
+                    this.current_params.is_team = 0
349
+                  }else if(this.current_params.project_ids.toString().length == 0 && this.current_params.team_ids.toString().length > 0){
350
+                    this.current_params.is_team= 1
351
+                  }
352
+                }else{
353
+                  this.current_params.is_team = 0
354
+
355
+                }
356
+
357
+
358
+                if(!this.isShow){
359
+                  createPrintLable(this.current_params).then(response => {
360
+                    if (response.data.state == 0) {
361
+                      this.$message.error(response.data.msg)
362
+                      return false
363
+                    } else {
364
+                      this.current_ctime = row.ctime
365
+                      this.current_number = row.number
366
+                      this.current_project_name = row.project_name
367
+                      this.current_name = row.patient_name
368
+                      this.$nextTick(() => {
369
+                        JsBarcode('#barcode',response.data.data.hlpsi.id, {
370
+                          format: 'CODE39',
371
+                          lineColor: '#000',
372
+                          background: '#EBEEF5',
373
+                          width: 3,
374
+                          height: 200,
375
+                          displayValue: false,
376
+                          fontOptions:"bold italic",//使文字加粗体或变斜体
377
+                          font:"fantasy",//设置文本的字体
378
+                          textAlign:"left",//设置文本的水平对齐方式
379
+                          textPosition:"top",//设置文本的垂直位置
380
+                          textMargin:5,//设置条形码和文本之间的间距
381
+                          fontSize:15,//设置文本的大小
382
+                          margin:15//设置条形码周围的空白边距
383
+                        })
384
+
385
+                      });
386
+                    }
387
+                  })
388
+
389
+                }else{
390
+                  createPrintLable(this.current_params).then(response => {
391
+                    if (response.data.state == 0) {
392
+                      this.$message.error(response.data.msg)
393
+                      return false
394
+                    } else {
395
+                      this.current_ctime = row.ctime
396
+                      this.current_number = row.number
397
+                      this.current_project_name = row.project_name
398
+                      this.current_name = row.patient_name
399
+                      this.$nextTick(() => {
400
+                        JsBarcode('#barcode',response.data.data.hlpsi.id, {
401
+                          format: 'CODE39',
402
+                          lineColor: '#000',
403
+                          background: '#EBEEF5',
404
+                          width: 5,
405
+                          height: 300,
406
+                          displayValue: false,
407
+                          fontOptions:"bold italic",//使文字加粗体或变斜体
408
+                          font:"fantasy",//设置文本的字体
409
+                          textAlign:"left",//设置文本的水平对齐方式
410
+                          textPosition:"top",//设置文本的垂直位置
411
+                          textMargin:5,//设置条形码和文本之间的间距
412
+                          fontSize:15,//设置文本的大小
413
+                          margin:15//设置条形码周围的空白边距
414
+                        })
415
+                      });
416
+                    }
417
+                  })
418
+                }
419
+              }
420
+            }
421
+          })
422
+        }
423
+      },
424
+      handleSelectionChange(val) {
425
+        this.selecting_schs = val
426
+        console.log(this.selecting_schs)
427
+      },
247 428
       getDictionaryDataConfig(module, filed_name) {
248 429
         return getDictionaryDataConfig(module, filed_name)
249 430
 
@@ -504,6 +685,21 @@
504 685
           }
505 686
         }
506 687
         return res
688
+      },uniqueTwo(array) {
689
+        // res用来存储结果
690
+        var res = []
691
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
692
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
693
+            if (array[i] === res[j]) {
694
+              break
695
+            }
696
+          }
697
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
698
+          if (j === resLen) {
699
+            res.push(array[i])
700
+          }
701
+        }
702
+        return res
507 703
       },
508 704
       getListTwo() {
509 705
         let params = {

+ 48 - 4
src/xt_pages/user/components/PatientDetail.vue View File

@@ -347,6 +347,39 @@
347 347
                 </el-radio-group>
348 348
               </el-form-item>
349 349
             </el-col>
350
+
351
+            <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
352
+                <el-form-item
353
+                  label="患者去向 : "
354
+                >
355
+                  <el-radio-group v-model="form.patient_source">
356
+                    <el-radio
357
+                     disabled
358
+                      v-for="item in patientSourceList"
359
+                      :key="item.value"
360
+                      :label="item.value"
361
+                      :value="item.value"
362
+                      >{{ item.label }}</el-radio
363
+                    >
364
+                  </el-radio-group>
365
+                </el-form-item>
366
+              </el-col>
367
+
368
+                <el-col :span="8" style="margin-bottom: 20px;">
369
+                <el-form-item
370
+                  label="备注 : "
371
+                  prop="sch_remark">
372
+                  <el-input
373
+                   disabled
374
+                    type="textarea"
375
+                    :rows="3"
376
+                    v-model="form.sch_remark"
377
+                    resize="none"
378
+                    placeholder
379
+                  ></el-input>
380
+                </el-form-item>
381
+              </el-col>
382
+
350 383
             <el-col :span="8" style="height: 59px">
351 384
               <el-form-item
352 385
                 label="治疗状态(转归) : "
@@ -1027,7 +1060,8 @@
1027 1060
                 </tr>
1028 1061
                 <tr>
1029 1062
                   <td>
1030
-                    <div class="td_proj_title">传<br />染<br />病</div>
1063
+                    <div class="td_proj_title" v-if="org_id !=10278 && org_id!=10138 && org_id!=0">传<br />染<br />病</div>
1064
+                    <div class="td_proj_title" v-if="org_id==10138 || org_id == 10278 || org_id == 0">过<br />敏<br />史</div>
1031 1065
                   </td>
1032 1066
                   <td colspan="7">
1033 1067
                     <div class="td_proj_content td_align_left">
@@ -1093,7 +1127,7 @@
1093 1127
               <div class="proj">
1094 1128
                 <span class="proj_title">日期:</span>
1095 1129
                 <!-- {{ getTime(patientPrint.created_time) }} -->
1096
-                <span v-if="org_id == 3907 || org_id == 9671|| org_id == 10138|| org_id == 9675 || org_id == 10394">{{
1130
+                <span v-if="org_id == 3907 || org_id == 9671|| org_id == 9675 || org_id == 10394">{{
1097 1131
                   getTime(patientPrint.created_time)
1098 1132
                 }}</span>
1099 1133
                 <span v-else>{{ printDate }}</span>
@@ -1237,6 +1271,7 @@ const defaultForm = {
1237 1271
   treatment_plan: "",
1238 1272
   doctor:"",
1239 1273
   record_number:"",
1274
+  patient_source:"",
1240 1275
 };
1241 1276
 
1242 1277
 export default {
@@ -1254,7 +1289,12 @@ export default {
1254 1289
         { id: 6, name: "军队医疗" },
1255 1290
         { id: 7, name: "其他" },
1256 1291
       ],
1257
-
1292
+      patientSourceList:[
1293
+        {value:1,label:"门诊"},
1294
+        {value:2,label:"住院"},
1295
+        {value:3,label:"请假"},
1296
+        {value:4,label:"备注"}
1297
+      ],
1258 1298
       generic_info_fold: true,
1259 1299
       treat_info_fold: true,
1260 1300
       dialogFormVisible: false,
@@ -1573,6 +1613,8 @@ export default {
1573 1613
               patietInfo.first_treatment_date,
1574 1614
               "{y}-{m}-{d}"
1575 1615
             );
1616
+            
1617
+            this.form.patient_source = patietInfo.patient_source
1576 1618
 
1577 1619
             // this.form.initial = patietInfo.initial_dialysis + "";
1578 1620
             // this.form.dialysisTotal = patietInfo.total_dialysis + "";
@@ -1861,7 +1903,7 @@ export default {
1861 1903
               }
1862 1904
               this.patientPrint.contagions = printContagions.join("、");
1863 1905
             } else {
1864
-              this.patientPrint.contagions = "";
1906
+              this.patientPrint.contagions = "阴性";
1865 1907
             }
1866 1908
 
1867 1909
             if (diseasesArr.length > 0) {
@@ -1907,6 +1949,8 @@ export default {
1907 1949
               this.patientPrint.hospital_first_dialysis_date = "";
1908 1950
             }
1909 1951
 
1952
+          
1953
+
1910 1954
             this.checkIdCardNo();
1911 1955
           } else {
1912 1956
             console.log("patient get err state");

+ 49 - 1
src/xt_pages/user/components/PatientForm.vue View File

@@ -394,7 +394,23 @@
394 394
                 </el-form-item>
395 395
               </el-col>
396 396
 
397
-              <el-col :span="8" style="margin-bottom: 20px;">
397
+              <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
398
+                <el-form-item
399
+                  label="患者去向 : "
400
+                >
401
+                  <el-radio-group v-model="form.patient_source">
402
+                    <el-radio
403
+                      v-for="item in patientSourceList"
404
+                      :key="item.value"
405
+                      :label="item.value"
406
+                      :value="item.value"
407
+                      >{{ item.label }}</el-radio
408
+                    >
409
+                  </el-radio-group>
410
+                </el-form-item>
411
+              </el-col>
412
+
413
+              <el-col :span="8" style="margin-bottom: 20px;" :style="isEdit ? 'width:360px' : ''">
398 414
                 <el-form-item
399 415
                   label="备注 : "
400 416
                   prop="sch_remark">
@@ -1061,6 +1077,7 @@ const defaultForm = {
1061 1077
   troble_shoot:2,
1062 1078
   zb_patient_id:"",
1063 1079
   doctor:"",
1080
+  patient_source:0,
1064 1081
   formItem: [
1065 1082
     {
1066 1083
       id: 0,
@@ -1307,6 +1324,12 @@ export default {
1307 1324
       // typeOptions: null,
1308 1325
       // styleOptions: null,
1309 1326
       sourceOptions: [{ value: 1, label: "门诊" }, { value: 2, label: "住院" }],
1327
+      patientSourceList:[
1328
+        {value:1,label:"门诊"},
1329
+        {value:2,label:"住院"},
1330
+        {value:3,label:"请假"},
1331
+        {value:4,label:"备注"}
1332
+      ],
1310 1333
       lapsetoOptions: [
1311 1334
         { value: 1, label: "留治" },
1312 1335
         { value: 2, label: "转出" }
@@ -1541,6 +1564,18 @@ export default {
1541 1564
             this.form.user_sys_before_count = this.form.user_sys_before_count.toString();
1542 1565
             this.form.troble_shoot = parseInt(this.form.troble_shoot)
1543 1566
             this.form.doctor = parseInt(this.form.doctor)
1567
+            if(this.form.patient_source >0){
1568
+              this.form.patient_source = parseInt(this.form.patient_source)
1569
+            }else{
1570
+              this.form.patient_source = 4
1571
+            }
1572
+
1573
+            if(this.form.patient_source == "NaN"){
1574
+              this.form.patient_source = 4
1575
+            }
1576
+            
1577
+          
1578
+            
1544 1579
             if(this.form.avatar.indexOf('?imageView2/2/w/500/h/500/q/90')!=-1){
1545 1580
                this.form.avatar = this.form.avatar
1546 1581
             }else{
@@ -1580,6 +1615,15 @@ export default {
1580 1615
             this.form.age = parseInt(this.form.age);
1581 1616
             this.form.troble_shoot = parseInt(this.form.troble_shoot)
1582 1617
             this.form.doctor = parseInt(this.form.doctor)
1618
+            if(this.form.patient_source >0){
1619
+              this.form.patient_source = parseInt(this.form.patient_source)
1620
+            }else{
1621
+              this.form.patient_source = 4
1622
+            }
1623
+
1624
+            if(this.form.patient_source == "NaN"){
1625
+              this.form.patient_source = 4
1626
+            }
1583 1627
             console.log("form233322332w",this.form)
1584 1628
 
1585 1629
             createPatient(this.form)
@@ -1911,6 +1955,10 @@ export default {
1911 1955
             if(this.form.doctor == 0){
1912 1956
               this.form.doctor = ""
1913 1957
             }
1958
+
1959
+         
1960
+            this.form.patient_source = patietInfo.patient_source
1961
+            
1914 1962
             this.checkIdCardNo();
1915 1963
           } else {
1916 1964
             this.$notify.error({

+ 1 - 1
src/xt_pages/user/courseOfDisease.vue View File

@@ -852,7 +852,7 @@
852 852
         '-' +
853 853
         (nowDay < 10 ? '0' + nowDay : nowDay)
854 854
       nowDate.setMonth(nowDate.getMonth() - 1)
855
-      nowYear = nowDate.getFullYear()
855
+      nowYear = nowDate.getFullYear() -1
856 856
       nowMonth = nowDate.getMonth() + 1
857 857
       nowDay = nowDate.getDate()
858 858
       this.start_time =

+ 3 - 2
src/xt_pages/user/firstDisease.vue View File

@@ -674,12 +674,13 @@
674 674
        tableList:[],
675 675
        projectList:[],
676 676
        inspectionList:[],
677
+       org_id:0
677 678
       }
678 679
     },
679 680
     created() {
680 681
 
681 682
       this.patient_id = this.$route.params && this.$route.params.id
682
-
683
+      
683 684
 
684 685
       var now = new Date()
685 686
       this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
@@ -696,7 +697,7 @@
696 697
         '-' +
697 698
         (nowDay < 10 ? '0' + nowDay : nowDay)
698 699
       nowDate.setMonth(nowDate.getMonth() - 1)
699
-      nowYear = nowDate.getFullYear()
700
+      nowYear = nowDate.getFullYear()-1
700 701
       nowMonth = nowDate.getMonth() + 1
701 702
       nowDay = nowDate.getDate()
702 703
       this.start_time =

+ 1 - 1
src/xt_pages/user/hospitalSummary.vue View File

@@ -633,7 +633,7 @@
633 633
         '-' +
634 634
         (nowDay < 10 ? '0' + nowDay : nowDay)
635 635
       nowDate.setMonth(nowDate.getMonth() - 1)
636
-      nowYear = nowDate.getFullYear()
636
+      nowYear = nowDate.getFullYear()-1
637 637
       nowMonth = nowDate.getMonth() + 1
638 638
       nowDay = nowDate.getDate()
639 639
       this.start_time =

+ 31 - 2
src/xt_pages/user/patients.vue View File

@@ -253,6 +253,21 @@
253 253
           </ul>
254 254
         </div>
255 255
       </div>
256
+      <div class="cell clearfix">
257
+        <label class="title"><span class="name">患者去向</span> : </label>
258
+        <div class="time ">
259
+          <ul class="">
260
+            <li
261
+              :class="item.source == patientSoureType ? 'active' : ''"
262
+              @click="selectPatientSource(item.source)"
263
+              v-for="item in patientSourceList"
264
+              :key="item.value"
265
+            >
266
+              {{ item.label }}
267
+            </li>
268
+          </ul>
269
+        </div>
270
+      </div>
256 271
       <div class="cell clearfix">
257 272
         <label class="title"><span class="name">其它查询</span> : </label>
258 273
         <el-select
@@ -686,6 +701,7 @@
686 701
           { value: 2, label: '未绑定' }
687 702
         ],
688 703
         sourceType: 0,
704
+        patientSoureType:0,
689 705
         sourceID: 0,
690 706
         lapsetoType: 1,
691 707
         sourceArr: [
@@ -695,6 +711,13 @@
695 711
           { value: 3, label: '门诊', source: 1, lapseto: 1 },
696 712
           { value: 4, label: '住院', source: 2, lapseto: 1 }
697 713
         ],
714
+        patientSourceList:[
715
+          {value:0,label:"全部",source:0,lapeseto:0},
716
+          {value:1,label:"门诊",source:1,lapeseto:1},
717
+          {value:2,label:"住院",source:2,lapeseto:2},
718
+          {value:3,label:"请假",source:3,lapeseto:3},
719
+          {value:4,label:"备注",source:4,lapeseto:4}
720
+       ],
698 721
         lapsetoArr: [
699 722
           { value: 0, label: '全部', source: 0, lapseto: 0 },
700 723
           { value: 1, label: '转出', source: 0, lapseto: 2 },
@@ -744,7 +767,8 @@
744 767
           contagion: '',
745 768
           reimbursement_way: '',
746 769
           isscheduling: '',
747
-          isprescription: ''
770
+          isprescription: '',
771
+          patientSoureType:'',
748 772
         },
749 773
         multipleSelection: [],
750 774
         bindWechatDialog: false,
@@ -1316,6 +1340,11 @@
1316 1340
         this.listQuery.source = source
1317 1341
         this.getList()
1318 1342
       },
1343
+      selectPatientSource(source){
1344
+        this.patientSoureType = source
1345
+        this.listQuery.patientSoureType = source
1346
+        this.getList()
1347
+      },
1319 1348
       changeTimeOne(val) {
1320 1349
         var time = this.getTimestamp(val) - this.end_time
1321 1350
         if (time > 0) {
@@ -1349,7 +1378,7 @@
1349 1378
         this.getList()
1350 1379
       },
1351 1380
       getList() {
1352
-
1381
+         console.log("query23323223wo",this.listQuery)
1353 1382
         fetchList(this.listQuery).then(response => {
1354 1383
           if (response.data.state === 0) {
1355 1384
             this.$message.error(response.data.msg)

+ 1 - 1
src/xt_pages/user/rescueRecord.vue View File

@@ -209,7 +209,7 @@ export default {
209 209
       "-" +
210 210
       (nowDay < 10 ? "0" + nowDay : nowDay);
211 211
     nowDate.setMonth(nowDate.getMonth() - 1);
212
-    nowYear = nowDate.getFullYear();
212
+    nowYear = nowDate.getFullYear()-1;
213 213
     nowMonth = nowDate.getMonth() + 1;
214 214
     nowDay = nowDate.getDate();
215 215
     this.start_time =

+ 1 - 1
src/xt_pages/user/templateSummary.vue View File

@@ -987,7 +987,7 @@
987 987
         '-' +
988 988
         (nowDay < 10 ? '0' + nowDay : nowDay)
989 989
       nowDate.setMonth(nowDate.getMonth() - 1)
990
-      nowYear = nowDate.getFullYear()
990
+      nowYear = nowDate.getFullYear()-1
991 991
       nowMonth = nowDate.getMonth() + 1
992 992
       nowDay = nowDate.getDate()
993 993
       this.start_time =