Browse Source

Merge branch 'vue_statistics_branch'

csx 4 years ago
parent
commit
9e6fd6ffaa

+ 2 - 2
config/dev.env.js View File

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

+ 2 - 2
config/index.js View File

@@ -19,8 +19,8 @@ module.exports = {
19 19
 
20 20
     // host: 'xt.test.sgjyun.com',
21 21
     // host: 'xt.kuyicloud.com',
22
-    host: 'xt.test.sgjyun.com',
23
-    // host:'localhost',
22
+    // host: 'xt.test.sgjyun.com',
23
+    host:'localhost',
24 24
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
25 25
     autoOpenBrowser: true,
26 26
     errorOverlay: true,

+ 103 - 1
src/api/common/common.js View File

@@ -34,10 +34,112 @@ export function saveConfiguration(data) {
34 34
   })
35 35
 }
36 36
 
37
-export function getConfigurationList(params) {
37
+export function getConfigurationList(limit, page) {
38
+  const params = {
39
+    limit: limit,
40
+    page: page
41
+  }
38 42
   return request({
39 43
     url: 'com/api/getconfigurationlist',
40 44
     method: 'get',
41 45
     params: params
42 46
   })
43 47
 }
48
+
49
+export function getConfigurationDetail(id, params) {
50
+  return request({
51
+    url: 'com/api/getconfigurationdetail?id=' + id,
52
+    method: 'get',
53
+    params: params
54
+  })
55
+}
56
+
57
+export function getAllInspectionMinor(params) {
58
+  return request({
59
+    url: 'com/api/getallinspectionminor',
60
+    method: 'get',
61
+    params: params
62
+  })
63
+}
64
+
65
+export function UpdateConfiguration(id, data) {
66
+  console.log('data', data)
67
+  return request({
68
+    url: 'com/api/updateconfiguration?id=' + id,
69
+    method: 'post',
70
+    data: data
71
+  })
72
+}
73
+
74
+export function DeleteConfiguration(id, params) {
75
+  return request({
76
+    url: 'com/api/deleteconfiguration?id=' + id,
77
+    method: 'delete',
78
+    params: params
79
+  })
80
+}
81
+
82
+export function getAllInspectionData(params) {
83
+  return request({
84
+    url: 'com/api/getallinspectiondata',
85
+    method: 'get',
86
+    params: params
87
+  })
88
+}
89
+
90
+export function SaveCheckConfiguration(data) {
91
+  console.log('data', data)
92
+  return request({
93
+    url: '/com/api/savecheckconfiguration',
94
+    method: 'post',
95
+    data: data
96
+  })
97
+}
98
+
99
+export function getAllCheckList(page, limit) {
100
+  const params = {
101
+    page: page,
102
+    limit: limit
103
+  }
104
+  return request({
105
+    url: '/com/api/getallchecklist',
106
+    method: 'get',
107
+    params: params
108
+  })
109
+}
110
+
111
+export function getCheckDetail(id, params) {
112
+  return request({
113
+    url: '/com/api/getcheckdetail?id=' + id,
114
+    method: 'get',
115
+    params: params
116
+  })
117
+}
118
+
119
+export function UpdateCheck(id, data) {
120
+  return request({
121
+    url: '/com/api/updatecheck?id=' + id,
122
+    method: 'post',
123
+    data: data
124
+  })
125
+}
126
+
127
+export function DeleteCheck(id, params) {
128
+  return request({
129
+    url: '/com/api/deletecheck?id=' + id,
130
+    method: 'delete',
131
+    params: params
132
+  })
133
+}
134
+
135
+export function getDialysisModeType(startime, endtime) {
136
+  const params = {
137
+    startime: startime,
138
+    endtime: endtime
139
+  }
140
+  return request({
141
+    url: '/com/api/getdialysismodetype',
142
+    method: 'get',
143
+    params: params
144
+  })
145
+}

File diff suppressed because it is too large
+ 1395 - 1410
src/store/modules/globalConfig.js


+ 13 - 11
src/xt_pages/data/prescription.vue View File

@@ -813,7 +813,6 @@ export default {
813 813
       row.index = rowIndex;
814 814
     },
815 815
     onRowClicks(row, event, column) {
816
-      console.log("row------", row.id);
817 816
       this.current_select = row.id;
818 817
       this.mode_name = row.name;
819 818
       this.isEdit = false;
@@ -883,13 +882,19 @@ export default {
883 882
       );
884 883
 
885 884
       getSystemPrescription(params).then(response => {
885
+        
886 886
         if (response.data.state == 0) {
887 887
           this.$message.error(response.data.msg);
888 888
           return false;
889 889
         } else {
890
-          if (response.data.data.prescription.id > 0) {
891
-            for (const key in response.data.data.prescription) {
892
-              this.addPlan[key] = response.data.data.prescription[key];
890
+           var prescription =  response.data.data.prescription
891
+           if(prescription.anticoagulant == 3){
892
+              prescription.anticoagulant = "低分子肝素"
893
+           }
894
+          if (prescription.id > 0) {
895
+            
896
+            for (const key in prescription) {
897
+              this.addPlan[key] = prescription[key];
893 898
             }
894 899
 
895 900
             this.dialysisTimeShow = new Date(
@@ -922,6 +927,8 @@ export default {
922 927
           return false;
923 928
         } else {
924 929
           this.system_prescription = response.data.data.prescriptions;
930
+          console.log("为什么",this.system_prescription)
931
+          
925 932
           for (let i = 0; i < this.system_prescription.length; i++) {
926 933
             if (this.system_prescription[i].mode == 1) {
927 934
               this.isEdit = true;
@@ -931,12 +938,6 @@ export default {
931 938
       });
932 939
     },
933 940
     selectnDialysisTime(val) {
934
-      console.log(val);
935
-
936
-      console.log(this.addPlan.dialysis_duration);
937
-      console.log(this.addPlan.dialysis_duration_hour);
938
-      console.log(this.addPlan.dialysis_duration_minute);
939
-
940 941
       var valTime = val.split(":");
941 942
       this.addPlan.dialysis_duration =
942 943
         parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2));
@@ -945,7 +946,7 @@ export default {
945 946
     },
946 947
     changeThisAnticoagulant() {
947 948
       var thismode = parseInt(this.addPlan.anticoagulant);
948
-      console.log("------", thismode);
949
+     
949 950
       if (isNaN(thismode) || thismode <= 0) {
950 951
         return false;
951 952
       }
@@ -974,6 +975,7 @@ export default {
974 975
             this.isEdit = true;
975 976
             this.system_prescription = [];
976 977
             this.system_prescription = response.data.data.prescriptions;
978
+            console.log("触发了吗",this.system_prescription)
977 979
             this.addPlan.id = response.data.data.prescription.id;
978 980
             return false;
979 981
           }

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

@@ -86,13 +86,13 @@
86 86
           (<label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-左') > -1 ? true : false" showValue="左"></label-box>
87 87
               <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-右') > -1 ? true : false" showValue="右"></label-box>)部位
88 88
           &nbsp;
89
-          <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('颈内') > -1 ? true : false" showValue="颈内"></label-box>
89
+          <label-box :isChecked="predialysis.blood_access_part_id ? (getPartName(predialysis.blood_access_part_id).indexOf('颈内') > -1 ? true : false) : false" showValue="颈内"></label-box>
90 90
           &nbsp;
91
-          <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('锁骨下') > -1 ? true : false" showValue="锁骨下"></label-box>
91
+          <label-box :isChecked="predialysis.blood_access_part_id ? (getPartName(predialysis.blood_access_part_id).indexOf('锁骨下') > -1 ? true : false) : false" showValue="锁骨下"></label-box>
92 92
           &nbsp;
93
-          <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('股') > -1 ? true : false" showValue="股"></label-box>
93
+          <label-box :isChecked="predialysis.blood_access_part_id ? (getPartName(predialysis.blood_access_part_id).indexOf('股') > -1 ? true : false) : false" showValue="股"></label-box>
94 94
           &nbsp;
95
-          <label-box :isChecked="['内瘘-左','内瘘-右','中心静脉置管-左','中心静脉置管-右','颈内','锁骨下','股'].indexOf(predialysis.blood_access_part_opera_name) == -1? true : false" showValue="其他"></label-box>
95
+          <label-box :isChecked="predialysis.blood_access_part_id ? (getPartName(predialysis.blood_access_part_id).indexOf('其他') > -1? true : false) :false" showValue="其他"></label-box>
96 96
           &nbsp;
97 97
         </div>
98 98
       </div>
@@ -187,6 +187,31 @@
187 187
               </div>kg
188 188
           </div>
189 189
       </div>
190
+      <div class="row">
191
+        透前评估 
192
+        <div class="inline_block under_line" style="width:93%;text-align: left;">
193
+          <div class="inline_block" style="margin-right:30px;">
194
+            体温
195
+            <div class="inline_block" style="width:50px;text-align:center">
196
+              {{ predialysis.temperature ? predialysis.temperature : "" }}
197
+            </div>℃
198
+          </div>
199
+          <div class="inline_block" style="margin-right:30px;">
200
+            血压
201
+            <div class="inline_block" style="width:100px;text-align:center">
202
+              {{ predialysis.systolic_blood_pressure ? predialysis.systolic_blood_pressure : "" }}/
203
+              {{ predialysis.diastolic_blood_pressure ? predialysis.diastolic_blood_pressure : "" }}
204
+            </div>mmHg
205
+          </div>
206
+          <div class="inline_block" style="margin-right:30px;">
207
+            脉搏
208
+            <div class="inline_block" style="width:50px;text-align:center">
209
+              {{ predialysis.pulse_frequency ? predialysis.pulse_frequency : "" }}
210
+            </div>次/分
211
+          </div>
212
+ 
213
+        </div>
214
+      </div>
190 215
 
191 216
       <table class="print-table" border="1">
192 217
         <tr>
@@ -283,6 +308,53 @@
283 308
         </tbody>
284 309
       </table>
285 310
 
311
+      <table class="print-table" border="1">
312
+        <tbody>
313
+          <tr>
314
+            <td width="50" style="padding-left:5px;border:none;border-right:1px solid #000;">
315
+              透后评估
316
+            </td>
317
+
318
+            <td width="30" style="border:none;padding-left:5px;">
319
+              体温:
320
+            </td>
321
+            <td width="50" style="text-align:left;border:none;">
322
+              <div>
323
+                <span class="under_line" style="width:50px;display:inline-block;">
324
+                  {{ afterdialysis.temperature ? afterdialysis.temperature : "" }}
325
+                </span>℃
326
+              </div>
327
+            </td>
328
+            <!-- <td width="10" style="border:none;"></td> -->
329
+
330
+            <td width="30" style="border:none;padding-left:5px;">血压:</td>
331
+            <td width="100" style="text-align:left;border:none;line-height: 30px;">
332
+              <div>
333
+                <span class="under_line" style="width:100px;display:inline-block">
334
+                  {{ afterdialysis.systolic_blood_pressure ? afterdialysis.systolic_blood_pressure : "" }}/
335
+                  {{ afterdialysis.diastolic_blood_pressure ? afterdialysis.diastolic_blood_pressure : "" }}
336
+                </span>mmHg
337
+              </div>
338
+            </td>
339
+            <td width="30" style="border:none;padding-left:5px">脉搏:</td>
340
+            <td width="50" style="text-align:left;border:none;">
341
+              <div>
342
+                <span class="under_line" style="width:50px;display:inline-block">
343
+                  {{ predialysis.pulse_frequency ? predialysis.pulse_frequency : "" }}
344
+                </span>次/分
345
+              </div>
346
+            </td>
347
+            <td width="50" style="border:none;padding-left:5px">透析器凝血:</td>
348
+            <td width="120" style="text-align:left;border:none;">
349
+              <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-0度') > -1 ? true : false" showValue="0"></label-box>
350
+              <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-Ⅰ度') > -1 ? true : false" showValue="+"></label-box>
351
+              <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-Ⅱ度') > -1" showValue="+ +"></label-box>
352
+              <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-Ⅲ度') > -1 ? true : false" showValue="+ + +"></label-box>
353
+            </td>
354
+          </tr>
355
+        </tbody>
356
+      </table>
357
+
286 358
       <table class="print-table" border="1">
287 359
         <tr style="height:36px;text-align:left;border:none;">
288 360
           <td style="padding-left:5px;border:none">
@@ -1130,6 +1202,13 @@ export default {
1130 1202
           // checker: 0,
1131 1203
         }
1132 1204
       );
1205
+    },
1206
+    getPartName(id) {
1207
+      for (let i = 0; i < this.vascularAccess.length; i++) {
1208
+        if (this.vascularAccess[i].id == id) {
1209
+          return this.vascularAccess[i].name;
1210
+        }
1211
+      }
1133 1212
     }
1134 1213
   },
1135 1214
   watch: {
@@ -1177,6 +1256,13 @@ export default {
1177 1256
     this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
1178 1257
     this.displaceLiquiPartOptions = this.$store.getters.displace_liqui;
1179 1258
     // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
1259
+    var vascularAccess = getDataConfig("hemodialysis", "vascular_access");
1260
+    this.vascularAccess = vascularAccess;
1261
+    //console.log("hhe", vascularAccess);
1262
+    console.log(
1263
+      "血管通路部位",
1264
+      getDataConfig("hemodialysis", "vascular_access")
1265
+    );
1180 1266
 
1181 1267
     var bloodAccessParOpera = getDataConfig(
1182 1268
       "hemodialysis",

+ 86 - 19
src/xt_pages/qcd/basicInformationAnalysis.vue View File

@@ -53,25 +53,14 @@
53 53
             <div class="infoOne">
54 54
               <div class="titleBox">
55 55
                 <span class="point"></span>
56
-                <p class="infoTitle">透析总量(100次)</p>
56
+                <p class="infoTitle">透析总量({{total}}次)</p>
57 57
               </div>
58
+            
58 59
               <div class="borderBox">
59
-                <p>HD:64次(64%)</p>
60
-                <el-progress :percentage="70"></el-progress>
61
-                <p>HD:64次(64%)</p>
62
-                <el-progress :percentage="70"></el-progress>
63
-                <p>HD:64次(64%)</p>
64
-                <el-progress :percentage="70"></el-progress>
65
-                <p>HD:64次(64%)</p>
66
-                <el-progress :percentage="70"></el-progress>
67
-                <p>HD:64次(64%)</p>
68
-                <el-progress :percentage="70"></el-progress>
69
-                <p>HD:64次(64%)</p>
70
-                <el-progress :percentage="70"></el-progress>
71
-                <p>HD:64次(64%)</p>
72
-                <el-progress :percentage="70"></el-progress>
73
-                <p>HD:64次(64%)</p>
60
+               <div v-for="(item,index) in modetype" :key="index">
61
+                <p>{{item.mode_id}}:{{getTotalCount(item.mode_id)}}次(64%)</p>
74 62
                 <el-progress :percentage="70"></el-progress>
63
+               </div>
75 64
                 <p>HD:64次(64%)</p>
76 65
                 <el-progress :percentage="70"></el-progress>
77 66
               </div>
@@ -158,10 +147,12 @@
158 147
 
159 148
 
160 149
 <script>
150
+const moment = require('moment')
161 151
 import { GetOICData } from "@/api/qcd";
162 152
 import PieChart from "../qcd/components/BarChart";
163 153
 import { uParseTime } from "@/utils/tools";
164 154
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
155
+import {getDialysisModeType} from "@/api/common/common"
165 156
 export default {
166 157
   name: "dialysisTotal",
167 158
   components: {
@@ -186,11 +177,16 @@ export default {
186 177
         { value: 1, label: "近三个月", state: 1 },
187 178
         { value: 2, label: "近半年", state: 2 },
188 179
         { value: 3, label: "近一年", state: 3 }
189
-      ]
180
+      ],
181
+      modetype:[],
182
+      total:0,
190 183
     };
191 184
   },
192
-  created() {},
193 185
   methods: {
186
+    getTimestamp(time) {
187
+      // 把时间日期转成时间戳
188
+      return new Date(time).getTime() / 1000;
189
+    },
194 190
     changeTime() {},
195 191
     changeEndTime(val) {
196 192
       var time =
@@ -204,8 +200,79 @@ export default {
204 200
     selectLapseTo(state) {
205 201
       this.stateType = state;
206 202
       this.listQuery.state = state;
203
+    },
204
+    getDialysisModeType(startDate,endDate){
205
+      getDialysisModeType(startDate,endDate).then(response=>{
206
+         if(response.data.state == 1){
207
+           var modetype =  response.data.data.modetype
208
+            var total =  response.data.data.total
209
+            console.log("total",total)
210
+            this.total = total
211
+           for(let i=0;i<modetype.length;i++){
212
+             if(modetype[i].mode_id == 1){
213
+               modetype[i].mode_id = "HD"
214
+             }
215
+             if(modetype[i].mode_id == 2){
216
+               modetype[i].mode_id = "HDF"
217
+             }
218
+             if(modetype[i].mode_id == 3){
219
+               modetype[i].mode_id = "HD+HP"
220
+             }
221
+              if(modetype[i].mode_id == 4){
222
+               modetype[i].mode_id = "HP"
223
+             }
224
+              if(modetype[i].mode_id == 5){
225
+               modetype[i].mode_id = "HF"
226
+             }
227
+             if(modetype[i].mode_id == 6){
228
+               modetype[i].mode_id = "SCUF"
229
+             }
230
+             if(modetype[i].mode_id == 7){
231
+               modetype[i].mode_id = "IUF"
232
+             }
233
+              if(modetype[i].mode_id == 8){
234
+               modetype[i].mode_id = "HFHD"
235
+             }
236
+             if(modetype[i].mode_id == 9){
237
+               modetype[i].mode_id = "HFHD+HP"
238
+             }
239
+             if(modetype[i].mode_id == 10){
240
+               modetype[i].mode_id = "PHF"
241
+             }
242
+             if(modetype[i].mode_id == 11){
243
+               modetype[i].mode_id = "HFR"
244
+             }
245
+            if(modetype[i].mode_id == 12){
246
+               modetype[i].mode_id = "HDF+HP"
247
+             }
248
+              if(modetype[i].mode_id == 13){
249
+               modetype[i].mode_id = "HFHD+HP"
250
+             }
251
+              if(modetype[i].mode_id == 14){
252
+               modetype[i].mode_id = "腹水回输"
253
+             }
254
+            if(modetype[i].mode_id == 19){
255
+               modetype[i].mode_id = "IUF+HD"
256
+             }
257
+           }
258
+           this.modetype = modetype
259
+           console.log("modetype",modetype)
260
+           
261
+         }
262
+      })
263
+    },
264
+    getTotalCount(id){
265
+      console.log("id",id)
207 266
     }
208
-  }
267
+  },
268
+  created() {
269
+     //获取本月当前机构的透析模式
270
+      const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
271
+      console.log("开始时间",startDate)
272
+      const endDate = moment(new Date()).format('YYYY-MM-DD')
273
+      console.log("结束时间",endDate)
274
+      this.getDialysisModeType(startDate,endDate)
275
+  },
209 276
 };
210 277
 </script>
211 278
 

+ 193 - 58
src/xt_pages/qcd/checkStatistical.vue View File

@@ -14,57 +14,87 @@
14 14
         </el-col>
15 15
       </el-row>
16 16
       <div class="configTable">
17
-        <el-table :data="tableData" border style="width: 100%">
18
-          <el-table-column prop="date" label="日期" width="180"></el-table-column>
19
-          <el-table-column prop="name" label="姓名" width="180"></el-table-column>
20
-          <el-table-column prop="address" label="地址"></el-table-column>
17
+        <el-table :data="checkList" border style="width: 100%">
18
+          <el-table-column prop="date" label="检验检查项">
19
+              <template slot-scope="scope">{{ scope.row.project_name }}</template>
20
+          </el-table-column>
21
+          <el-table-column prop="name" label="检查频次(天)">
22
+              <template slot-scope="scope">{{ scope.row.inspection_frequency }}</template>
23
+          </el-table-column>
24
+          <el-table-column prop="address" label="排序">
25
+             <template slot-scope="scope">{{ scope.row.sort }}</template>
26
+          </el-table-column>
21 27
           <el-table-column label="操作" width="180">
22 28
             <template slot-scope="scope">
23
-              <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
24
-              <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
29
+              <el-button size="mini" type="primary" @click="handleEdit(scope.row.id)">编辑</el-button>
30
+              <el-button size="mini" type="danger" @click="handleDelete(scope.row.id,scope.$index)">删除</el-button>
25 31
             </template>
26 32
           </el-table-column>
27 33
         </el-table>
34
+
35
+          <el-pagination
36
+              @size-change="handleSizeChange"
37
+              @current-change="handleCurrentChange"
38
+              :page-sizes="[10, 20, 30, 100]"
39
+              :page-size="10"
40
+              background
41
+              style="margin-top:20px;float: right"
42
+              layout="total, sizes, prev, pager, next, jumper"
43
+              :total="total">
44
+          </el-pagination>
28 45
       </div>
29 46
 
30 47
       <el-dialog title="新增" :visible.sync="newDialog">
31
-        <el-form :model="form">
32
-          <el-form-item label="检查大项" :label-width="formLabelWidth">
33
-            <el-select v-model="form.region" placeholder="请选择活动区域">
34
-              <el-option label="区域一" value="shanghai"></el-option>
35
-              <el-option label="区域二" value="beijing"></el-option>
48
+        <el-form :model="form" ref="form" :rules="rules">
49
+          <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
50
+            <el-select v-model="form.inspectionMajor" placeholder="请选择检查大项">
51
+                <el-option
52
+                  v-for="it in InspectionMajor"
53
+                  :key="it.project_id"
54
+                  :value="it.project_id"
55
+                  :label="it.project_name"
56
+                  >
57
+                </el-option>
36 58
             </el-select>
37 59
           </el-form-item>
38
-          <el-form-item label="检查频次(天)" :label-width="formLabelWidth">
39
-            <el-input style="width:200px" v-model="form.name"></el-input>
60
+          <el-form-item label="检查频次(天)" :label-width="formLabelWidth" required prop="frequency">
61
+            <el-input style="width:200px" v-model="form.frequency"></el-input>
40 62
           </el-form-item>
41 63
           <el-form-item label="排序" :label-width="formLabelWidth">
42
-            <el-input style="width:200px" v-model="form.name"></el-input>
64
+            <el-input style="width:200px" v-model="form.sort"></el-input>
43 65
           </el-form-item>
44 66
         </el-form>
45 67
         <div slot="footer" class="dialog-footer">
46 68
           <el-button @click="newDialog = false">取 消</el-button>
47
-          <el-button type="primary" @click="newDialog = false">确 定</el-button>
69
+          <el-button type="primary" @click="SaveCheckConfiguration('form')">保 存</el-button>
48 70
         </div>
49 71
       </el-dialog>
72
+
73
+
74
+
50 75
       <el-dialog title="编辑" :visible.sync="editDialog">
51
-        <el-form :model="form">
52
-          <el-form-item label="检查大项" :label-width="formLabelWidth">
53
-            <el-select v-model="form.region" placeholder="请选择活动区域">
54
-              <el-option label="区域一" value="shanghai"></el-option>
55
-              <el-option label="区域二" value="beijing"></el-option>
76
+        <el-form :model="editform" ref="editform" :rules="rules">
77
+          <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
78
+            <el-select v-model="editform.inspectionMajor" placeholder="请选择检查大项">
79
+                <el-option
80
+                  v-for="it in InspectionMajor"
81
+                  :key="it.project_id"
82
+                  :value="it.project_id"
83
+                  :label="it.project_name"
84
+                  >
85
+                </el-option>
56 86
             </el-select>
57 87
           </el-form-item>
58
-          <el-form-item label="检查频次(天)" :label-width="formLabelWidth">
59
-            <el-input style="width:200px" v-model="form.name"></el-input>
88
+          <el-form-item label="检查频次(天)" :label-width="formLabelWidth" required prop="frequency">
89
+            <el-input style="width:200px" v-model="editform.frequency"></el-input>
60 90
           </el-form-item>
61
-          <el-form-item label="排序" :label-width="formLabelWidth">
62
-            <el-input style="width:200px" v-model="form.name"></el-input>
91
+          <el-form-item label="排序" :label-width="formLabelWidth" >
92
+            <el-input style="width:200px" v-model="editform.sort"></el-input>
63 93
           </el-form-item>
64 94
         </el-form>
65 95
         <div slot="footer" class="dialog-footer">
66 96
           <el-button @click="editDialog = false">取 消</el-button>
67
-          <el-button type="primary" @click="editDialog = false">确 定</el-button>
97
+          <el-button type="primary" @click="UpdateCheck('editform')">保 存</el-button>
68 98
         </div>
69 99
       </el-dialog>
70 100
     </div>
@@ -78,6 +108,7 @@ import { GetOICData } from "@/api/qcd";
78 108
 import PieChart from "../qcd/components/BarChart";
79 109
 import { uParseTime } from "@/utils/tools";
80 110
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
111
+import {getAllInspectionData,SaveCheckConfiguration,getAllCheckList,getCheckDetail,UpdateCheck,DeleteCheck} from "@/api/common/common"
81 112
 export default {
82 113
   name: "dialysisTotal",
83 114
   data() {
@@ -88,52 +119,156 @@ export default {
88 119
         { path: false, name: "检验检查统计配置" }
89 120
       ],
90 121
       tabActiveName: "query",
91
-      tableData: [
92
-        {
93
-          date: "2016-05-02",
94
-          name: "王小虎",
95
-          address: "上海市普陀区金沙江路 1518 弄"
96
-        },
97
-        {
98
-          date: "2016-05-04",
99
-          name: "王小虎",
100
-          address: "上海市普陀区金沙江路 1517 弄"
101
-        },
102
-        {
103
-          date: "2016-05-01",
104
-          name: "王小虎",
105
-          address: "上海市普陀区金沙江路 1519 弄"
106
-        },
107
-        {
108
-          date: "2016-05-03",
109
-          name: "王小虎",
110
-          address: "上海市普陀区金沙江路 1516 弄"
111
-        }
112
-      ],
113 122
       newDialog: false,
114 123
       editDialog: false,
115 124
       formLabelWidth: "120px",
116 125
       form: {
117
-        name: "",
118
-        region: "",
119
-        date1: "",
120
-        date2: "",
121
-        delivery: false,
122
-        type: [],
123
-        resource: "",
124
-        desc: ""
125
-      }
126
+        inspectionMajor:"",
127
+        frequency:"",
128
+        sort:"",
129
+      },
130
+      editform:{
131
+        id:0,
132
+        inspectionMajor:"",
133
+        frequency:"",
134
+        sort:"",
135
+      },
136
+     InspectionMajor:[],
137
+     rules: {
138
+        inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
139
+        frequency: [{ required: true, message: "检查频次不能为空" }],
140
+      },
141
+      limit:10,
142
+      page:1,
143
+      total:0,
144
+      checkList:[],
126 145
     };
127 146
   },
128
-  created() {},
147
+  created() {
148
+    //获取大项
149
+    this.getAllInspectionData(),
150
+    this.getAllCheckList()
151
+  },
129 152
   methods: {
130 153
     handleTabClick(tab, event) {
131 154
       if (this.tabActiveName == "control") {
132 155
         this.$router.push({ path: "/qcd/patientanalysis/statisticalConfig" });
133 156
       }
134 157
     },
135
-    handleEdit() {
158
+    handleEdit(id) {
136 159
       this.editDialog = true;
160
+       getCheckDetail(id).then(response=>{
161
+         if(response.data.state == 1){
162
+           var checkdetail = response.data.data.checkdetail
163
+           console.log("checkdetail",checkdetail)
164
+           this.editform.id = checkdetail.id
165
+           this.editform.inspectionMajor = checkdetail.inspection_major
166
+           this.editform.frequency = checkdetail.inspection_frequency
167
+           if(checkdetail.sort == 0){
168
+             this.editform.sort = ""
169
+             return 
170
+           }
171
+           this.editform.sort = checkdetail.sort
172
+         }
173
+       })
174
+    },
175
+    getAllInspectionData(){
176
+      getAllInspectionData().then(response=>{
177
+        if(response.data.state == 1){
178
+          var inspection =  response.data.data.inspection
179
+          //console.log("列表",inspection)
180
+          this.InspectionMajor = inspection
181
+        }
182
+      })
183
+    },
184
+    //新增
185
+    SaveCheckConfiguration(formName){
186
+       this.$refs[formName].validate(valid=>{
187
+         if(valid){
188
+           SaveCheckConfiguration(this.form).then(response=>{
189
+              if(response.data.state === 1){
190
+                var configuration =  response.data.data.configuration
191
+                this.$message.success("保存成功")
192
+                this.newDialog = false
193
+                this.form.inspectionMajor = ""
194
+                this.form.frequency = ""
195
+                this.form.sort = ""
196
+              }else{
197
+                this.$message.error("检验检查项已存在,不能重复添加")
198
+              }
199
+           })
200
+         }
201
+       })
202
+    },
203
+    handleSizeChange(limit) {
204
+      this.limit = limit;
205
+      this.getAllCheckList()
206
+    },
207
+    handleCurrentChange(page) {
208
+      this.page = page;
209
+      this.getAllCheckList()
210
+    },
211
+    getAllCheckList(){
212
+      getAllCheckList(this.page,this.limit).then(response=>{
213
+        if(response.data.state == 1){
214
+          var checklist = response.data.data.checklist
215
+          for(let i=0;i<checklist.length;i++){
216
+            if(checklist[i].sort == 0){
217
+              checklist[i].sort = ""
218
+            }
219
+          }
220
+          console.log("列表",checklist)
221
+          this.checkList = checklist
222
+          this.total = response.data.data.total
223
+          console.log("total",this.total)
224
+        }
225
+      })
226
+    },
227
+    UpdateCheck(formName){
228
+       if(this.editform.sort == ""){
229
+         this.editform.sort = 0
230
+       }
231
+       if(this.editform.sort !=""){
232
+         var sort = this.editform.sort 
233
+         var sorts = parseInt(sort)
234
+         this.editform.sort = sorts
235
+       }
236
+     
237
+      this.$refs[formName].validate(valid=>{
238
+        if(valid){
239
+          UpdateCheck(this.editform.id,this.editform).then(response=>{
240
+           
241
+            if(response.data.state == 1){
242
+              var configuration =  response.data.data.configuration
243
+               this.editDialog = false
244
+               this.getAllCheckList()
245
+               this.$message.success("保存成功")
246
+            }else{
247
+              this.$message.error("检验检查项已存在")
248
+            }
249
+          })
250
+        }
251
+      })
252
+    },
253
+    handleDelete(id,index){
254
+        this.$confirm(
255
+        "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
256
+        "删除提示",
257
+        {
258
+          dangerouslyUseHTMLString: true,
259
+          confirmButtonText: "确定",
260
+          cancelButtonText: "取消",
261
+          type: "warning"
262
+        }
263
+      ).then(() => {
264
+        DeleteCheck(id,index).then(response => {
265
+          if (response.data.state === 1) {
266
+           var msg =  response.data.data.msg
267
+           console.log("msg",msg)
268
+           this.checkList.splice(index,1)
269
+          }
270
+        });
271
+      });
137 272
     }
138 273
   },
139 274
   components: {

+ 1 - 6
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressure.vue View File

@@ -64,12 +64,7 @@
64 64
               <line-chart :options="chart"></line-chart>
65 65
             </div>
66 66
             <div class="cell clearfix" style="margin:0;margin-bottom:10px">
67
-              <div class="tableTitle" style="margin:0 20px 0 0;">统计表</div>
68
-              <el-input v-model="input" placeholder="收缩压" style="width: 80px;"></el-input>&nbsp;-&nbsp;
69
-              <el-input v-model="input" placeholder="收缩压" style="width: 80px;"></el-input>&nbsp;/&nbsp;
70
-              <el-input v-model="input" placeholder="舒张压" style="width: 80px;"></el-input>&nbsp;-&nbsp;
71
-              <el-input v-model="input" placeholder="舒张压" style="width: 80px;"></el-input>
72
-              <el-button type="primary">查询</el-button>
67
+              <div class="tableTitle">统计表</div>
73 68
             </div>
74 69
             <div>
75 70
               <el-table :data="tableData1" style="width: 100%" border>

+ 163 - 34
src/xt_pages/qcd/statisticalConfiguration.vue View File

@@ -16,31 +16,44 @@
16 16
       <div class="configTable">
17 17
         <el-table :data="configuraData" border style="width: 100%">
18 18
           <el-table-column prop="date" label="检验检查大项" width="180">
19
-              <template slot-scope="scope">{{ scope.row.inspection_major }}</template>
19
+              <template slot-scope="scope">{{ scope.row.project_name }}</template>
20 20
           </el-table-column>
21
-          <el-table-column prop="name" label="检查小项" width="180">
22
-             <template slot-scope="scope">{{ scope.row.inspection_minor }}</template>
21
+          <el-table-column prop="name" label="检查小项" width="300">
22
+             <template slot-scope="scope">{{ scope.row.item_name }}</template>
23 23
           </el-table-column>
24 24
           <el-table-column prop="address" label="范围">
25 25
              <template slot-scope="scope">{{ scope.row.min_range }} - {{scope.row.large_range}}</template>
26 26
           </el-table-column>
27 27
            <el-table-column prop="address" label="单位">
28
-              <template slot-scope="scope">{{ scope.row.min_range }}</template>
28
+              <template slot-scope="scope">{{ scope.row.unit }}</template>
29
+            </el-table-column>
30
+            <el-table-column prop="address" label="排序">
31
+                <template slot-scope="scope">{{ scope.row.sort }}</template>
29 32
             </el-table-column>
30
-            <el-table-column prop="address" label="排序"></el-table-column>
31 33
           <el-table-column label="操作" width="180">
32 34
             <template slot-scope="scope">
33
-              <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
34
-              <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
35
+              <el-button size="mini" type="primary" @click="handleEdit(scope.row.id)">编辑</el-button>
36
+              <el-button size="mini" type="danger" @click="handleDelete(scope.row.id,scope.$index)">删除</el-button>
35 37
             </template>
36 38
           </el-table-column>
37 39
         </el-table>
40
+
41
+          <el-pagination
42
+              @size-change="handleSizeChange"
43
+              @current-change="handleCurrentChange"
44
+              :page-sizes="[10, 20, 30, 100]"
45
+              :page-size="10"
46
+              background
47
+              style="margin-top:20px;float: right"
48
+              layout="total, sizes, prev, pager, next, jumper"
49
+              :total="total">
50
+          </el-pagination>
38 51
       </div>
39 52
 
40 53
       <el-dialog title="新增" :visible.sync="newDialog">
41 54
         <el-form :model="form" ref="form" :rules="rules">
42 55
           <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
43
-            <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域" @change="changeInspection">
56
+            <el-select v-model="form.inspectionMajor" placeholder="请选择检查大项" @change="changeInspection">
44 57
                <el-option
45 58
                   v-for="item in InspectionMajor"
46 59
                   :key="item.project_id"
@@ -51,7 +64,7 @@
51 64
             </el-select>
52 65
           </el-form-item>
53 66
           <el-form-item label="检查小项" :label-width="formLabelWidth" required prop="inspectionMinor">
54
-            <el-select v-model="form.inspectionMinor" placeholder="请选择活动区域" @change="changeInspectionMonior">
67
+            <el-select v-model="form.inspectionMinor" placeholder="请选择检查小项" @change="changeInspectionMonior">
55 68
                 <el-option
56 69
                   v-for="it in InspectionMinor"
57 70
                   :key="it.id"
@@ -72,45 +85,48 @@
72 85
         </el-form>
73 86
         <div slot="footer" class="dialog-footer">
74 87
           <el-button @click="newDialog = false">取 消</el-button>
75
-          <el-button type="primary" @click="saveInspection('form')">保存</el-button>
88
+          <el-button type="primary" @click="saveInspection('form')">保 存</el-button>
76 89
         </div>
77 90
       </el-dialog>
91
+
92
+
93
+
78 94
       <el-dialog title="编辑" :visible.sync="editDialog">
79
-        <el-form :model="form">
80
-          <el-form-item label="检查大项" :label-width="formLabelWidth">
81
-            <el-select v-model="form.inspectionMajor" placeholder="请选择活动区域">
95
+        <el-form :model="editform" ref="editform" :rules="rules">
96
+          <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
97
+            <el-select v-model="editform.inspectionMajor" placeholder="请选择检查大项" @change="changeInspectionTwo">
82 98
               <el-option
83 99
                   v-for="patient in InspectionMajor"
84
-                  :key="patient.id"
85
-                  :value="patient.id"
100
+                  :key="patient.project_id"
101
+                  :value="patient.project_id"
86 102
                   :label="patient.project_name"
87 103
                   >
88 104
                </el-option>
89 105
             </el-select>
90 106
           </el-form-item>
91
-          <el-form-item label="检查小项" :label-width="formLabelWidth">
92
-            <el-select v-model="form.inspectionMinor" placeholder="请选择活动区域">
107
+          <el-form-item label="检查小项" :label-width="formLabelWidth" required prop="inspectionMinor">
108
+            <el-select v-model="editform.inspectionMinor" placeholder="请选择检查小项"  @change="changeInspectionMonior">
93 109
                <el-option
94
-                  v-for="item in InspectionMinor"
95
-                  :key="item.project_id"
96
-                  :value="item.project_id"
110
+                  v-for="item in InspectionMinorTwo"
111
+                  :key="item.id"
112
+                  :value="item.id"
97 113
                   :label="item.item_name"
98 114
                   >
99 115
                 </el-option>
100 116
             </el-select>
101 117
           </el-form-item>
102
-          <el-form-item label="指控范围" :label-width="formLabelWidth">
103
-            <el-input style="width:200px" v-model="form.min_range"></el-input>&nbsp;
118
+          <el-form-item label="指控范围" :label-width="formLabelWidth" required prop="large_range">
119
+            <el-input style="width:200px" v-model="editform.min_range"></el-input>&nbsp;
104 120
             -
105
-            <el-input style="width:200px" v-model="form.large_range"></el-input>
121
+            <el-input style="width:200px" v-model="editform.large_range"></el-input>
106 122
           </el-form-item>
107 123
           <el-form-item label="排序" :label-width="formLabelWidth">
108
-            <el-input style="width:200px" v-model="form.sort"></el-input>
124
+            <el-input style="width:200px" v-model="editform.sort"></el-input>
109 125
           </el-form-item>
110 126
         </el-form>
111 127
         <div slot="footer" class="dialog-footer">
112 128
           <el-button @click="editDialog = false">取 消</el-button>
113
-          <el-button type="primary" @click="editDialog = false">保存</el-button>
129
+          <el-button type="primary" @click="EditConfiguration('editform')">保 存</el-button>
114 130
         </div>
115 131
       </el-dialog>
116 132
     </div>
@@ -124,7 +140,7 @@ import { GetOICData } from "@/api/qcd";
124 140
 import PieChart from "../qcd/components/BarChart";
125 141
 import { uParseTime } from "@/utils/tools";
126 142
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
127
-import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList }from "@/api/common/common";
143
+import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList,getConfigurationDetail,getAllInspectionMinor,UpdateConfiguration,DeleteConfiguration }from "@/api/common/common";
128 144
 export default {
129 145
   name: "dialysisTotal",
130 146
   data() {
@@ -137,6 +153,7 @@ export default {
137 153
       tabActiveName: "control",
138 154
       InspectionMajor:[],
139 155
       InspectionMinor:[],
156
+      InspectionMinorTwo:[],
140 157
       configuraData: [],
141 158
       newDialog: false,
142 159
       editDialog: false,
@@ -148,11 +165,22 @@ export default {
148 165
         large_range: "",
149 166
         sort:"",
150 167
       },
168
+      editform:{
169
+         id:0,
170
+         inspectionMajor: "",
171
+         inspectionMinor: "",
172
+         min_range: "",
173
+         large_range: "",
174
+         sort:"",
175
+      },
151 176
       rules: {
152 177
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
153 178
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
154 179
         large_range:[{required:true,message:"指控范围不能为空"}]
155
-      }
180
+      },
181
+      page:1,
182
+      limit:10,
183
+      total:0,
156 184
     };
157 185
   },
158 186
   methods: {
@@ -161,8 +189,26 @@ export default {
161 189
         this.$router.push({ path: "/qcd/patientanalysis/checkStatistical" });
162 190
       }
163 191
     },
164
-    handleEdit() {
192
+
193
+    //编辑
194
+    handleEdit(id) {
165 195
       this.editDialog = true;
196
+      getConfigurationDetail(id).then(response=>{
197
+         if(response.data.state == 1){
198
+           var configurationdetail = response.data.data.configurationdetail
199
+           console.log("详情",configurationdetail)
200
+           this.editform.id = configurationdetail.id
201
+           this.editform.inspectionMajor = configurationdetail.inspection_major
202
+           this.editform.inspectionMinor = configurationdetail.inspection_minor
203
+           this.editform.large_range = configurationdetail.large_range
204
+           this.editform.min_range = configurationdetail.min_range
205
+           if(configurationdetail.sort == 0){
206
+            this.editform.sort = ""
207
+            return
208
+           }
209
+           this.editform.sort = configurationdetail.sort
210
+         }
211
+      })
166 212
     },
167 213
     
168 214
     //获取大项数据来源
@@ -170,23 +216,32 @@ export default {
170 216
       getInspectionMajor().then(response=>{
171 217
         if(response.data.state == 1){
172 218
           var inspection =  response.data.data.inspection
173
-          console.log("inspection",inspection)
219
+          console.log("大项",inspection)
174 220
           this.InspectionMajor = inspection
175
-
221
+         
176 222
         }
177 223
       })
178 224
     },
179 225
     //获取小项
180 226
     changeInspection(id){
181
-      console.log("id----",id)
182 227
       getInspectionMinor(id).then(response=>{
183 228
         if(response.data.state == 1){
184 229
          var inspection =  response.data.data.inspection
185
-         console.log("inspection",inspection)
230
+         console.log("小项",inspection)
186 231
          this.InspectionMinor = inspection
187 232
         }
188 233
       })
189 234
     },
235
+    changeInspectionTwo(id){
236
+      this.InspectionMinorTwo = []
237
+       getInspectionMinor(id).then(response=>{
238
+        if(response.data.state == 1){
239
+         var inspection =  response.data.data.inspection
240
+         console.log("小项",inspection)
241
+         this.InspectionMinorTwo = inspection
242
+        }
243
+      })
244
+    },
190 245
     // 获取指控范围
191 246
     changeInspectionMonior(id){
192 247
        getInspectionRange(id).then(response=>{
@@ -211,20 +266,91 @@ export default {
211 266
              this.form.large_range = ""
212 267
              this.form.min_range = ""
213 268
              this.form.sort = ""
269
+             this.getConfigurationList()
270
+            }else{
271
+             this.$message.error("检查小项已存在")
214 272
             }
215 273
           })
216 274
         }
217 275
       })
218 276
     },
277
+   handleSizeChange(limit) {
278
+      this.limit = limit;
279
+      this.getConfigurationList();
280
+    },
281
+    handleCurrentChange(page) {
282
+      this.page = page;
283
+      this.getConfigurationList();
284
+    },
219 285
     getConfigurationList(){
220
-      getConfigurationList().then(response=>{
286
+      getConfigurationList(this.limit,this.page).then(response=>{
221 287
         if(response.data.state === 1){
222 288
           var configurationlist = response.data.data.configurationlist
289
+          for(let i=0;i<configurationlist.length;i++){
290
+            if(configurationlist[i].sort === 0){
291
+              configurationlist[i].sort = ""
292
+            }
293
+          }
223 294
           console.log("列表",configurationlist)
224 295
           this.configuraData = configurationlist
296
+          var total = response.data.data.total
297
+          console.log("total",total)
298
+          this.total = total
225 299
         }
226 300
       })
227
-    }
301
+    },
302
+    //获取小项
303
+    getAllInspectionMinor(){
304
+      getAllInspectionMinor().then(response=>{
305
+        if(response.data.state == 1){
306
+          var minor =  response.data.data.minor
307
+          this.InspectionMinorTwo = minor
308
+          console.log("minor",minor)
309
+        }
310
+      })
311
+    },
312
+    EditConfiguration(formName){
313
+       if(this.editform.sort == ""){
314
+         this.editform.sort = 0
315
+       }
316
+       if(this.editform.sort!=""){
317
+        var sorts =  this.editform.sort
318
+        var sort = parseInt(sorts)
319
+        this.editform.sort = sort
320
+       }
321
+     
322
+      UpdateConfiguration(this.editform.id,this.editform).then(response=>{
323
+        if(response.data.state == 1){
324
+         var standard =  response.data.data.standard
325
+         console.log("standard",standard)
326
+         this.$message.success("保存成功")
327
+         this.editDialog = false
328
+         this.getConfigurationList()
329
+        }else{
330
+         this.$message.error("检查小项已存在")
331
+        }
332
+      })
333
+    },
334
+   handleDelete(id,index) {
335
+      this.$confirm(
336
+        "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
337
+        "删除提示",
338
+        {
339
+          dangerouslyUseHTMLString: true,
340
+          confirmButtonText: "确定",
341
+          cancelButtonText: "取消",
342
+          type: "warning"
343
+        }
344
+      ).then(() => {
345
+        DeleteConfiguration(id,index).then(response => {
346
+          if (response.data.state === 1) {
347
+           var msg =  response.data.data.msg
348
+           console.log("msg",msg)
349
+           this.configuraData.splice(index,1)
350
+          }
351
+        });
352
+      });
353
+    },
228 354
   },
229 355
   components: {
230 356
     PieChart,
@@ -235,7 +361,10 @@ export default {
235 361
        this.getInspectionMajor()
236 362
     //获取表格里面的数据
237 363
     this.getConfigurationList()
364
+    //获取所有小项的数据
365
+    this.getAllInspectionMinor()
238 366
    },
367
+
239 368
 };
240 369
 </script>
241 370
 <style lang="scss">

+ 10 - 4
src/xt_pages/user/dialysisSolution.vue View File

@@ -1248,9 +1248,9 @@ export default {
1248 1248
       this.fetchPatientDialysisSolutions();
1249 1249
     },
1250 1250
     openEdit(index, row) {
1251
-      console.log(row);
1251
+     
1252 1252
       this.current_index = index;
1253
-
1253
+     
1254 1254
       this.addPlan.id = row.id;
1255 1255
       this.addPlan.mode = row.mode_id;
1256 1256
       this.addPlan.mode_name = row.mode_name;
@@ -1262,7 +1262,12 @@ export default {
1262 1262
       this.addPlan.hemodialysis_machine = row.hemodialysis_machine + "";
1263 1263
       this.addPlan.perfusion_apparatus = row.perfusion_apparatus + "";
1264 1264
       this.addPlan.blood_flow_volume = row.blood_flow_volume.toString();
1265
-      this.addPlan.anticoagulant = row.anticoagulant;
1265
+      if(row.anticoagulant == 3){
1266
+        this.addPlan.anticoagulant = "低分子肝素"
1267
+      }
1268
+      if(row.anticoagulant != 3){
1269
+         this.addPlan.anticoagulant = row.anticoagulant;
1270
+      }
1266 1271
       this.addPlan.replacement_total = row.replacement_total;
1267 1272
 
1268 1273
       this.addPlan.target_ktv = row.target_ktv.toString();
@@ -1292,7 +1297,7 @@ export default {
1292 1297
       this.addPlan.displace_liqui_value = row.displace_liqui_value.toString();
1293 1298
       this.addPlan.ultrafiltration = row.ultrafiltration.toString();
1294 1299
       this.addPlan.blood_access = row.blood_access;
1295
-
1300
+     
1296 1301
       this.addPlan.registrars_id = row.registrars_id;
1297 1302
 
1298 1303
       this.dialogVisible = true;
@@ -1655,6 +1660,7 @@ export default {
1655 1660
     // this.fetchAllDoctorAndNurse();
1656 1661
     this.fetchAllAdminUsers();
1657 1662
     this.fetchPatientDialysisSolutions();
1663
+   
1658 1664
   }
1659 1665
 };
1660 1666
 </script>

+ 1 - 7
src/xt_pages/user/patients.vue View File

@@ -590,6 +590,7 @@
590 590
         isIndeterminate: true,
591 591
         dialogVisible: false,
592 592
         exportLogVisible: false,
593
+        exportVisible:false,
593 594
         phoneVisible:false,
594 595
         idCardNoVisible:false,
595 596
         wechatbindimg: '',
@@ -1023,7 +1024,6 @@
1023 1024
               }
1024 1025
 
1025 1026
 
1026
-              console.log(this.export_date)
1027 1027
 
1028 1028
               var tempExportDate = this.export_date
1029 1029
               var tempExportDateOne = this.export_date
@@ -1068,15 +1068,11 @@
1068 1068
                 return cur
1069 1069
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1070 1070
 
1071
-
1072
-
1073 1071
               if (tempExportDateTwo.length < this.export_date.length){
1074 1072
                 this.idCardNoVisible = true
1075 1073
                 return
1076 1074
               }
1077 1075
 
1078
-
1079
-
1080 1076
               // this.exportVisible = true
1081 1077
               this.$alert('您提交的患者名单已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果', '上传成功', {
1082 1078
                 confirmButtonText: '确定',
@@ -1084,7 +1080,6 @@
1084 1080
 
1085 1081
                 }
1086 1082
               });
1087
-
1088 1083
               this.isShow = false
1089 1084
               let params = {
1090 1085
                 'patients': this.export_date
@@ -1110,7 +1105,6 @@
1110 1105
 
1111 1106
       },
1112 1107
       getCount(row) {
1113
-        console.log(row)
1114 1108
         return row.total_dialysis + row.user_sys_before_count
1115 1109
       },
1116 1110
       EditLapseto() {

+ 54 - 51
src/xt_pages/workforce/appointment.vue View File

@@ -1,5 +1,22 @@
1 1
 <template>
2 2
   <div class="main-contain">
3
+    <el-dialog
4
+      title="提示"
5
+      :visible.sync="exportVisible"
6
+      width="40%"
7
+    >
8
+
9
+      <div>
10
+        您提交的排班信息已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果
11
+      </div>
12
+
13
+      <span slot="footer" class="dialog-footer">
14
+    <el-button @click="exportVisible = false">取 消</el-button>
15
+    <el-button type="primary" @click="exportVisible = false">确 定</el-button>
16
+  </span>
17
+    </el-dialog>
18
+
19
+
3 20
     <el-dialog
4 21
       title="提示"
5 22
       :visible.sync="exportLogVisible"
@@ -11,8 +28,8 @@
11 28
         <br/>
12 29
         <br/>
13 30
         <span>{{getContent(item)}}</span>
14
-        <span style="color:blue" @click="generateTxt(item)">点击</span>
15
-        <span>查看详情</span>
31
+        <span >点击</span>
32
+        <span style="color:blue" @click="generateTxt(item)">查看详情</span>
16 33
         <br/>
17 34
         <br/>
18 35
       </div>
@@ -123,6 +140,7 @@
123 140
         msgTipVisible: false,
124 141
         dialogVisible: false,
125 142
         isExistRepeatVisible: false,
143
+        exportVisible:false,
126 144
         exportLogVisible: false,
127 145
         theWeek: {
128 146
           lastWeek: 0,
@@ -158,7 +176,7 @@
158 176
         }
159 177
         const aLink = document.createElement('a')
160 178
         aLink.href = url
161
-        aLink.download = this.timestampToTime(log.export_time) + '错误日志.txt'
179
+        aLink.download = this.timestampToTime(log.export_time) + '临时排班导入日志.txt'
162 180
         aLink.click()
163 181
 
164 182
       },
@@ -472,57 +490,29 @@
472 490
         }
473 491
         return isShow
474 492
       }, handleSuccess({ results, header }) {
475
-
493
+        let headers = []
494
+        for (let key in results[0]) {
495
+          headers.push(key)
496
+        }
497
+        console.log(headers)
476 498
         if (results.length > 0) {
477
-          let headers = []
478
-          for (let key in results[0]) {
479
-            headers.push(key)
480
-          }
499
+
481 500
 
482 501
           var isHas_1 = headers.includes('区号')
483
-          console.log(isHas_1)
484 502
           var isHas_2 = headers.includes('机号')
485
-          console.log(isHas_2)
486
-
487 503
           var isHas_3 = headers.includes('周一')
488
-          console.log(isHas_3)
489
-
490 504
           var isHas_4 = headers.includes('')
491
-          console.log(isHas_4)
492
-
493 505
           var isHas_5 = headers.includes('_1')
494
-          console.log(isHas_5)
495
-
496 506
           var isHas_6 = headers.includes('周二')
497
-          console.log(isHas_6)
498
-
499 507
           var isHas_7 = headers.includes('_2')
500
-          console.log(isHas_7)
501
-
502 508
           var isHas_8 = headers.includes('_3')
503
-          console.log(isHas_8)
504
-
505 509
           var isHas_9 = headers.includes('周三')
506
-          console.log(isHas_9)
507
-
508 510
           var isHas_10 = headers.includes('_4')
509
-          console.log(isHas_1)
510
-
511 511
           var isHas_11 = headers.includes('_5')
512
-          console.log(isHas_1)
513
-
514 512
           var isHas_12 = headers.includes('周四')
515
-          console.log(isHas_1)
516
-
517 513
           var isHas_13 = headers.includes('_6')
518
-          console.log(isHas_1)
519
-
520 514
           var isHas_14 = headers.includes('_7')
521
-          console.log(isHas_1)
522
-
523 515
           var isHas_15 = headers.includes('周五')
524
-          console.log(isHas_1)
525
-
526 516
           var isHas_16 = headers.includes('_8')
527 517
           console.log(isHas_1)
528 518
 
@@ -603,10 +593,13 @@
603 593
             isHas_51 && isHas_52 && isHas_53 && isHas_54 && isHas_55 &&
604 594
             isHas_56 && isHas_57 && isHas_58 && isHas_59 && isHas_60 &&
605 595
             isHas_61 && isHas_62 && isHas_63 && isHas_64 && isHas_65)) {
596
+            console.log("1111111")
606 597
             this.dialogVisible = true
607 598
             return
608 599
           }
609 600
         } else {
601
+          console.log("2222222222")
602
+
610 603
           this.dialogVisible = true
611 604
           return
612 605
         }
@@ -617,10 +610,10 @@
617 610
         let deviceNumber = []
618 611
 
619 612
         for (let i = 0; i < results.length; i++) {
620
-          if (results[i + 1] && results[i + 1]['区号'] != undefined) {
613
+          if (results[i + 1]) {
621 614
             zones.push(results[i + 1]['区号'])
622 615
           }
623
-          if (results[i + 1] && results[i + 1]['机号'] != undefined) {
616
+          if (results[i + 1]) {
624 617
             deviceNumber.push(results[i + 1]['机号'])
625 618
           }
626 619
 
@@ -638,6 +631,8 @@
638 631
           return cur
639 632
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
640 633
 
634
+
635
+
641 636
         var total_zones = []
642 637
         var total_device_number = []
643 638
 
@@ -647,7 +642,6 @@
647 642
 
648 643
         for (let key in this.partitions) {
649 644
           var jihaos = this.partitions[key].jihaos
650
-          console.log(jihaos)
651 645
 
652 646
           for (let i = 0; i < jihaos.length; i++) {
653 647
             total_device_number.push(jihaos[i].number)
@@ -660,8 +654,7 @@
660 654
           }
661 655
         }
662 656
 
663
-        console.log(deviceNumber)
664
-        console.log(total_device_number)
657
+
665 658
 
666 659
         for (let i = 0; i < deviceNumber.length; i++) {
667 660
           if (!total_device_number.includes(deviceNumber[i])) {
@@ -678,6 +671,8 @@
678 671
         }
679 672
 
680 673
         let datas = []
674
+        let failed_datas = []
675
+
681 676
         for (let i = 0; i < results.length; i++) {
682 677
           for (let key in results[i + 1]) {
683 678
             let tempObjTwo = { partition_name: '', device_number_name: '' }
@@ -713,11 +708,11 @@
713 708
               var m_month = current_date.getMonth() + 1
714 709
               m_month = m_month < 10 ? '0' + m_month.toString() : m_month.toString()
715 710
               var m_date = current_date.getDate() < 10 ? '0' + current_date.getDate().toString() : current_date.getDate().toString()
716
-
717 711
               var current_date_two = new Date(m_year + '-' + m_month + '-' + m_date)
718
-
719
-              if (new Date(tempObjTwo['schedule_date']).getTime() >= new Date(current_date_two).getTime()) {
712
+              if (new Date(tempObjTwo['schedule_date']).getTime() > new Date(current_date_two).getTime()) {
720 713
                 datas.push(tempObjTwo)
714
+              }else{
715
+                failed_datas.push(tempObjTwo)
721 716
               }
722 717
             }
723 718
           }
@@ -799,11 +794,8 @@
799 794
           }
800 795
         }
801 796
 
802
-        console.log(header.length)
803
-        console.log(is_system_zone)
804
-        console.log(is_device_number)
805 797
 
806
-        if (header.length > 65 || !is_system_zone || !is_device_number) {
798
+        if (headers.length > 65 || !is_system_zone || !is_device_number) {
807 799
           this.dialogVisible = true
808 800
           return
809 801
         } else {
@@ -811,8 +803,20 @@
811 803
             this.isExistRepeatVisible = true
812 804
             return
813 805
           } else {
806
+            // this.exportVisible = true
807
+
808
+            this.$alert('您提交的排班信息已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果', '上传成功', {
809
+              confirmButtonText: '确定',
810
+              callback: action => {
811
+
812
+              }
813
+            });
814
+
815
+
814 816
             let params = {
815
-              schedule: datas
817
+              schedule: datas,
818
+              failed_schedule: failed_datas
819
+
816 820
             }
817 821
 
818 822
             //今天的时间
@@ -820,7 +824,6 @@
820 824
             day2.setTime(day2.getTime())
821 825
             var month = day2.getMonth() + 1 < 10 ? '0' + (day2.getMonth() + 1).toString() : (day2.getMonth() + 1).toString()
822 826
             var day = day2.getDate() < 10 ? '0' + (day2.getDate()).toString() : (day2.getMonth() + 1).toString()
823
-
824 827
             var date = day2.getFullYear() + '-' + month + '-' + day
825 828
             exportSchedule(params, date).then(response => {
826 829
               if (response.data.state == 0) {

+ 1 - 1
src/xt_pages/workforce/components/scheduleTemplateUploadExcel/index.vue View File

@@ -16,7 +16,7 @@
16 16
       :visible.sync="msgTipVisible"
17 17
       width="40%"
18 18
     >
19
-      <span>如果导入成功,会将当前已有的排版模版会被全部清除,是否继续导入排版模版数据</span>
19
+      <span>若执行排班导入,系统将会清除当前已有排班模板数据,是否继续导入?</span>
20 20
       <span slot="footer" class="dialog-footer">
21 21
     <el-button @click="msgTipVisible = false">取 消</el-button>
22 22
     <el-button type="primary" @click="handleUpload()">确 定</el-button>

+ 1 - 1
src/xt_pages/workforce/components/scheduleUploadExcel/index.vue View File

@@ -4,7 +4,7 @@
4 4
       :visible.sync="msgTipVisible"
5 5
       width="40%"
6 6
     >
7
-      <span>如果导入成功,会将当前已有的排版会被全部清除,是否继续导入排版数据</span>
7
+      <span>若执行排班导入,系统将会清除当前已有临时排班数据,是否继续导入?</span>
8 8
       <span slot="footer" class="dialog-footer">
9 9
     <el-button @click="msgTipVisible = false">取 消</el-button>
10 10
     <el-button type="primary" @click="handleUpload()">确 定</el-button>

+ 1 - 2
src/xt_pages/workforce/components/tableData.vue View File

@@ -1020,8 +1020,7 @@ export default {
1020 1020
                 }
1021 1021
               });
1022 1022
             }
1023
-            console.log("hhhh", that.scheduleZone);
1024
-            console.log(theSchedules);
1023
+
1025 1024
           });
1026 1025
         } else {
1027 1026
           this.$message.error("网络错误");

+ 66 - 18
src/xt_pages/workforce/template.vue View File

@@ -1,5 +1,23 @@
1 1
 <template>
2 2
   <div class="main-contain">
3
+
4
+    <el-dialog
5
+      title="提示"
6
+      :visible.sync="exportVisible"
7
+      width="40%"
8
+    >
9
+
10
+      <div>
11
+        您提交的排班信息已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果
12
+      </div>
13
+
14
+      <span slot="footer" class="dialog-footer">
15
+    <el-button @click="exportVisible = false">取 消</el-button>
16
+    <el-button type="primary" @click="exportVisible = false">确 定</el-button>
17
+  </span>
18
+    </el-dialog>
19
+
20
+
3 21
     <el-dialog
4 22
       title="提示"
5 23
       :visible.sync="exportLogVisible"
@@ -11,8 +29,8 @@
11 29
         <br/>
12 30
         <br/>
13 31
         <span>{{getContent(item)}}</span>
14
-        <span style="color:blue"  @click="generateTxt(item)">点击</span>
15
-        <span>查看详情</span>
32
+        <span>点击</span>
33
+        <span  style="color:blue" @click="generateTxt(item)">查看详情</span>
16 34
         <br/>
17 35
         <br/>
18 36
       </div>
@@ -76,6 +94,7 @@
76 94
           class="filter-item"
77 95
           type="primary"
78 96
           size="small"
97
+          v-loading="generateLoading"
79 98
         >下载日志
80 99
         </el-button>
81 100
 
@@ -146,8 +165,9 @@
146 165
         downloadLoading: false,
147 166
         isExistRepeatVisible:false,
148 167
         exportLogVisible:false,
168
+        exportVisible:false,
149 169
         logs:[],
150
-
170
+        generateLoading:false,
151 171
 
152 172
         days:[],
153 173
         msgTipVisible: false,
@@ -238,7 +258,7 @@
238 258
         }
239 259
         const aLink = document.createElement('a')
240 260
         aLink.href = url
241
-        aLink.download = this.timestampToTime(log.export_time)+'错误日志.txt'
261
+        aLink.download = this.timestampToTime(log.export_time)+'排班模板导入日志.txt'
242 262
         aLink.click()
243 263
 
244 264
       },
@@ -256,19 +276,26 @@
256 276
         return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
257 277
       },
258 278
       generateLog() {
279
+        this.generateLoading = true
259 280
         let params = {
260 281
           'log_type': 3
261 282
         }
262 283
         generateLog(params).then(
263 284
           response => {
264 285
             if (response.data.state === 1) {
286
+              this.generateLoading = false
287
+
265 288
               this.logs = response.data.data.logs
266 289
               this.exportLogVisible = true
267 290
             } else {
268 291
               this.$message.error(response.data.msg)
292
+              this.generateLoading = false
293
+
269 294
             }
270 295
           }
271
-        )
296
+        ).catch(error => {
297
+          this.generateLoading = false
298
+        })
272 299
 
273 300
       },
274 301
       getInitDate(){
@@ -285,13 +312,13 @@
285 312
       },
286 313
       handleSuccess({ results, header }) {
287 314
 
288
-        console.log(this.template_mode.mode)
315
+        let headers = []
316
+        for (let key in results[0]) {
317
+          headers.push(key)
318
+        }
289 319
         if (this.template_mode.mode == 1) {
290 320
           if(results.length > 0) {
291
-            let headers = []
292
-            for (let key in results[0]) {
293
-              headers.push(key)
294
-            }
321
+
295 322
             var isHas_1 = headers.includes('区号')
296 323
             console.log(isHas_1)
297 324
             var isHas_2 = headers.includes('机号')
@@ -375,12 +402,7 @@
375 402
           }
376 403
 
377 404
         }else if(this.template_mode.mode == 2){
378
-
379 405
           if(results.length > 0) {
380
-            let headers = []
381
-            for (let key in results[0]) {
382
-              headers.push(key)
383
-            }
384 406
 
385 407
             var isHas_1 = headers.includes('区号')
386 408
             console.log(isHas_1)
@@ -505,10 +527,10 @@
505 527
         let deviceNumber = []
506 528
 
507 529
         for (let i = 0; i < results.length; i++) {
508
-          if (results[i + 1] && results[i + 1]['区号'] != undefined) {
530
+          if (results[i + 1] ) {
509 531
             zones.push(results[i + 1]['区号'])
510 532
           }
511
-          if (results[i + 1] && results[i + 1]['机号'] != undefined) {
533
+          if (results[i + 1] ) {
512 534
             deviceNumber.push(results[i + 1]['机号'])
513 535
           }
514 536
 
@@ -525,6 +547,9 @@
525 547
           obj2[next] ? '' : obj2[next] = true && cur.push(next)
526 548
           return cur
527 549
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
550
+        console.log("1111111111")
551
+        console.log(deviceNumber)
552
+        console.log("1111111111")
528 553
 
529 554
         var total_zones = []
530 555
         var total_device_number = []
@@ -676,7 +701,21 @@
676 701
           }
677 702
         }
678 703
 
679
-        if (!is_system_zone || !is_device_number) {
704
+        let isHeader = true
705
+
706
+        if(this.template_mode.mode == 1){
707
+          if(headers.length > 23){
708
+            isHeader = false
709
+          }
710
+
711
+        }else if(this.template_mode.mode == 2){
712
+          if(headers.length > 44){
713
+            isHeader = false
714
+          }
715
+
716
+        }
717
+
718
+        if (!isHeader || !is_system_zone || !is_device_number) {
680 719
           this.dialogVisible = true
681 720
           return
682 721
         } else {
@@ -684,6 +723,14 @@
684 723
             this.isExistRepeatVisible = true
685 724
             return
686 725
           } else {
726
+
727
+            this.$alert('您提交的排班信息已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果', '上传成功', {
728
+              confirmButtonText: '确定',
729
+              callback: action => {
730
+
731
+              }
732
+            });
733
+
687 734
             let params = {
688 735
               schedule: datas
689 736
             }
@@ -692,6 +739,7 @@
692 739
             day2.setTime(day2.getTime())
693 740
             var month = day2.getMonth() + 1 < 10 ? '0' + (day2.getMonth() + 1).toString() : (day2.getMonth() + 1).toString()
694 741
             var day = day2.getDate() < 10 ? '0' + (day2.getDate()).toString() : (day2.getMonth() + 1).toString()
742
+
695 743
             exportScheduleTemplate(params).then(response => {
696 744
               if (response.data.state == 0) {
697 745
                 return false