Browse Source

Merge branch 'vue_statistics_branch'

csx 5 years ago
parent
commit
9e6fd6ffaa

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

6
 module.exports = {
6
 module.exports = {
7
   NODE_ENV: '"development"',
7
   NODE_ENV: '"development"',
8
   ENV_CONFIG: '"dev"',
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
   SSO_HOST: '"http://testsso.sgjyun.com"',
11
   SSO_HOST: '"http://testsso.sgjyun.com"',
12
   SRCM_HOST: '"http://test1.sgjyun.com"',
12
   SRCM_HOST: '"http://test1.sgjyun.com"',
13
   XT_HOST: '"http://xt.test.sgjyun.com"',
13
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 2 - 2
config/index.js View File

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

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

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
   return request({
42
   return request({
39
     url: 'com/api/getconfigurationlist',
43
     url: 'com/api/getconfigurationlist',
40
     method: 'get',
44
     method: 'get',
41
     params: params
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
       row.index = rowIndex;
813
       row.index = rowIndex;
814
     },
814
     },
815
     onRowClicks(row, event, column) {
815
     onRowClicks(row, event, column) {
816
-      console.log("row------", row.id);
817
       this.current_select = row.id;
816
       this.current_select = row.id;
818
       this.mode_name = row.name;
817
       this.mode_name = row.name;
819
       this.isEdit = false;
818
       this.isEdit = false;
883
       );
882
       );
884
 
883
 
885
       getSystemPrescription(params).then(response => {
884
       getSystemPrescription(params).then(response => {
885
+        
886
         if (response.data.state == 0) {
886
         if (response.data.state == 0) {
887
           this.$message.error(response.data.msg);
887
           this.$message.error(response.data.msg);
888
           return false;
888
           return false;
889
         } else {
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
             this.dialysisTimeShow = new Date(
900
             this.dialysisTimeShow = new Date(
922
           return false;
927
           return false;
923
         } else {
928
         } else {
924
           this.system_prescription = response.data.data.prescriptions;
929
           this.system_prescription = response.data.data.prescriptions;
930
+          console.log("为什么",this.system_prescription)
931
+          
925
           for (let i = 0; i < this.system_prescription.length; i++) {
932
           for (let i = 0; i < this.system_prescription.length; i++) {
926
             if (this.system_prescription[i].mode == 1) {
933
             if (this.system_prescription[i].mode == 1) {
927
               this.isEdit = true;
934
               this.isEdit = true;
931
       });
938
       });
932
     },
939
     },
933
     selectnDialysisTime(val) {
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
       var valTime = val.split(":");
941
       var valTime = val.split(":");
941
       this.addPlan.dialysis_duration =
942
       this.addPlan.dialysis_duration =
942
         parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2));
943
         parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2));
945
     },
946
     },
946
     changeThisAnticoagulant() {
947
     changeThisAnticoagulant() {
947
       var thismode = parseInt(this.addPlan.anticoagulant);
948
       var thismode = parseInt(this.addPlan.anticoagulant);
948
-      console.log("------", thismode);
949
+     
949
       if (isNaN(thismode) || thismode <= 0) {
950
       if (isNaN(thismode) || thismode <= 0) {
950
         return false;
951
         return false;
951
       }
952
       }
974
             this.isEdit = true;
975
             this.isEdit = true;
975
             this.system_prescription = [];
976
             this.system_prescription = [];
976
             this.system_prescription = response.data.data.prescriptions;
977
             this.system_prescription = response.data.data.prescriptions;
978
+            console.log("触发了吗",this.system_prescription)
977
             this.addPlan.id = response.data.data.prescription.id;
979
             this.addPlan.id = response.data.data.prescription.id;
978
             return false;
980
             return false;
979
           }
981
           }

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

86
           (<label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-左') > -1 ? true : false" showValue="左"></label-box>
86
           (<label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-左') > -1 ? true : false" showValue="左"></label-box>
87
               <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-右') > -1 ? true : false" showValue="右"></label-box>)部位
87
               <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-右') > -1 ? true : false" showValue="右"></label-box>)部位
88
           &nbsp;
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
           &nbsp;
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
           &nbsp;
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
           &nbsp;
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
           &nbsp;
96
           &nbsp;
97
         </div>
97
         </div>
98
       </div>
98
       </div>
187
               </div>kg
187
               </div>kg
188
           </div>
188
           </div>
189
       </div>
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
       <table class="print-table" border="1">
216
       <table class="print-table" border="1">
192
         <tr>
217
         <tr>
283
         </tbody>
308
         </tbody>
284
       </table>
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
       <table class="print-table" border="1">
358
       <table class="print-table" border="1">
287
         <tr style="height:36px;text-align:left;border:none;">
359
         <tr style="height:36px;text-align:left;border:none;">
288
           <td style="padding-left:5px;border:none">
360
           <td style="padding-left:5px;border:none">
1130
           // checker: 0,
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
   watch: {
1214
   watch: {
1177
     this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
1256
     this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
1178
     this.displaceLiquiPartOptions = this.$store.getters.displace_liqui;
1257
     this.displaceLiquiPartOptions = this.$store.getters.displace_liqui;
1179
     // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
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
     var bloodAccessParOpera = getDataConfig(
1267
     var bloodAccessParOpera = getDataConfig(
1182
       "hemodialysis",
1268
       "hemodialysis",

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

53
             <div class="infoOne">
53
             <div class="infoOne">
54
               <div class="titleBox">
54
               <div class="titleBox">
55
                 <span class="point"></span>
55
                 <span class="point"></span>
56
-                <p class="infoTitle">透析总量(100次)</p>
56
+                <p class="infoTitle">透析总量({{total}}次)</p>
57
               </div>
57
               </div>
58
+            
58
               <div class="borderBox">
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
                 <el-progress :percentage="70"></el-progress>
62
                 <el-progress :percentage="70"></el-progress>
63
+               </div>
75
                 <p>HD:64次(64%)</p>
64
                 <p>HD:64次(64%)</p>
76
                 <el-progress :percentage="70"></el-progress>
65
                 <el-progress :percentage="70"></el-progress>
77
               </div>
66
               </div>
158
 
147
 
159
 
148
 
160
 <script>
149
 <script>
150
+const moment = require('moment')
161
 import { GetOICData } from "@/api/qcd";
151
 import { GetOICData } from "@/api/qcd";
162
 import PieChart from "../qcd/components/BarChart";
152
 import PieChart from "../qcd/components/BarChart";
163
 import { uParseTime } from "@/utils/tools";
153
 import { uParseTime } from "@/utils/tools";
164
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
154
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
155
+import {getDialysisModeType} from "@/api/common/common"
165
 export default {
156
 export default {
166
   name: "dialysisTotal",
157
   name: "dialysisTotal",
167
   components: {
158
   components: {
186
         { value: 1, label: "近三个月", state: 1 },
177
         { value: 1, label: "近三个月", state: 1 },
187
         { value: 2, label: "近半年", state: 2 },
178
         { value: 2, label: "近半年", state: 2 },
188
         { value: 3, label: "近一年", state: 3 }
179
         { value: 3, label: "近一年", state: 3 }
189
-      ]
180
+      ],
181
+      modetype:[],
182
+      total:0,
190
     };
183
     };
191
   },
184
   },
192
-  created() {},
193
   methods: {
185
   methods: {
186
+    getTimestamp(time) {
187
+      // 把时间日期转成时间戳
188
+      return new Date(time).getTime() / 1000;
189
+    },
194
     changeTime() {},
190
     changeTime() {},
195
     changeEndTime(val) {
191
     changeEndTime(val) {
196
       var time =
192
       var time =
204
     selectLapseTo(state) {
200
     selectLapseTo(state) {
205
       this.stateType = state;
201
       this.stateType = state;
206
       this.listQuery.state = state;
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
 </script>
277
 </script>
211
 
278
 

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

14
         </el-col>
14
         </el-col>
15
       </el-row>
15
       </el-row>
16
       <div class="configTable">
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
           <el-table-column label="操作" width="180">
27
           <el-table-column label="操作" width="180">
22
             <template slot-scope="scope">
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
             </template>
31
             </template>
26
           </el-table-column>
32
           </el-table-column>
27
         </el-table>
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
       </div>
45
       </div>
29
 
46
 
30
       <el-dialog title="新增" :visible.sync="newDialog">
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
             </el-select>
58
             </el-select>
37
           </el-form-item>
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
           </el-form-item>
62
           </el-form-item>
41
           <el-form-item label="排序" :label-width="formLabelWidth">
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
           </el-form-item>
65
           </el-form-item>
44
         </el-form>
66
         </el-form>
45
         <div slot="footer" class="dialog-footer">
67
         <div slot="footer" class="dialog-footer">
46
           <el-button @click="newDialog = false">取 消</el-button>
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
         </div>
70
         </div>
49
       </el-dialog>
71
       </el-dialog>
72
+
73
+
74
+
50
       <el-dialog title="编辑" :visible.sync="editDialog">
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
             </el-select>
86
             </el-select>
57
           </el-form-item>
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
           </el-form-item>
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
           </el-form-item>
93
           </el-form-item>
64
         </el-form>
94
         </el-form>
65
         <div slot="footer" class="dialog-footer">
95
         <div slot="footer" class="dialog-footer">
66
           <el-button @click="editDialog = false">取 消</el-button>
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
         </div>
98
         </div>
69
       </el-dialog>
99
       </el-dialog>
70
     </div>
100
     </div>
78
 import PieChart from "../qcd/components/BarChart";
108
 import PieChart from "../qcd/components/BarChart";
79
 import { uParseTime } from "@/utils/tools";
109
 import { uParseTime } from "@/utils/tools";
80
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
110
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
111
+import {getAllInspectionData,SaveCheckConfiguration,getAllCheckList,getCheckDetail,UpdateCheck,DeleteCheck} from "@/api/common/common"
81
 export default {
112
 export default {
82
   name: "dialysisTotal",
113
   name: "dialysisTotal",
83
   data() {
114
   data() {
88
         { path: false, name: "检验检查统计配置" }
119
         { path: false, name: "检验检查统计配置" }
89
       ],
120
       ],
90
       tabActiveName: "query",
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
       newDialog: false,
122
       newDialog: false,
114
       editDialog: false,
123
       editDialog: false,
115
       formLabelWidth: "120px",
124
       formLabelWidth: "120px",
116
       form: {
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
   methods: {
152
   methods: {
130
     handleTabClick(tab, event) {
153
     handleTabClick(tab, event) {
131
       if (this.tabActiveName == "control") {
154
       if (this.tabActiveName == "control") {
132
         this.$router.push({ path: "/qcd/patientanalysis/statisticalConfig" });
155
         this.$router.push({ path: "/qcd/patientanalysis/statisticalConfig" });
133
       }
156
       }
134
     },
157
     },
135
-    handleEdit() {
158
+    handleEdit(id) {
136
       this.editDialog = true;
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
   components: {
274
   components: {

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

64
               <line-chart :options="chart"></line-chart>
64
               <line-chart :options="chart"></line-chart>
65
             </div>
65
             </div>
66
             <div class="cell clearfix" style="margin:0;margin-bottom:10px">
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
             </div>
68
             </div>
74
             <div>
69
             <div>
75
               <el-table :data="tableData1" style="width: 100%" border>
70
               <el-table :data="tableData1" style="width: 100%" border>

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

16
       <div class="configTable">
16
       <div class="configTable">
17
         <el-table :data="configuraData" border style="width: 100%">
17
         <el-table :data="configuraData" border style="width: 100%">
18
           <el-table-column prop="date" label="检验检查大项" width="180">
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
           </el-table-column>
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
           </el-table-column>
23
           </el-table-column>
24
           <el-table-column prop="address" label="范围">
24
           <el-table-column prop="address" label="范围">
25
              <template slot-scope="scope">{{ scope.row.min_range }} - {{scope.row.large_range}}</template>
25
              <template slot-scope="scope">{{ scope.row.min_range }} - {{scope.row.large_range}}</template>
26
           </el-table-column>
26
           </el-table-column>
27
            <el-table-column prop="address" label="单位">
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
             </el-table-column>
32
             </el-table-column>
30
-            <el-table-column prop="address" label="排序"></el-table-column>
31
           <el-table-column label="操作" width="180">
33
           <el-table-column label="操作" width="180">
32
             <template slot-scope="scope">
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
             </template>
37
             </template>
36
           </el-table-column>
38
           </el-table-column>
37
         </el-table>
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
       </div>
51
       </div>
39
 
52
 
40
       <el-dialog title="新增" :visible.sync="newDialog">
53
       <el-dialog title="新增" :visible.sync="newDialog">
41
         <el-form :model="form" ref="form" :rules="rules">
54
         <el-form :model="form" ref="form" :rules="rules">
42
           <el-form-item label="检查大项" :label-width="formLabelWidth" required prop="inspectionMajor">
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
                <el-option
57
                <el-option
45
                   v-for="item in InspectionMajor"
58
                   v-for="item in InspectionMajor"
46
                   :key="item.project_id"
59
                   :key="item.project_id"
51
             </el-select>
64
             </el-select>
52
           </el-form-item>
65
           </el-form-item>
53
           <el-form-item label="检查小项" :label-width="formLabelWidth" required prop="inspectionMinor">
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
                 <el-option
68
                 <el-option
56
                   v-for="it in InspectionMinor"
69
                   v-for="it in InspectionMinor"
57
                   :key="it.id"
70
                   :key="it.id"
72
         </el-form>
85
         </el-form>
73
         <div slot="footer" class="dialog-footer">
86
         <div slot="footer" class="dialog-footer">
74
           <el-button @click="newDialog = false">取 消</el-button>
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
         </div>
89
         </div>
77
       </el-dialog>
90
       </el-dialog>
91
+
92
+
93
+
78
       <el-dialog title="编辑" :visible.sync="editDialog">
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
               <el-option
98
               <el-option
83
                   v-for="patient in InspectionMajor"
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
                   :label="patient.project_name"
102
                   :label="patient.project_name"
87
                   >
103
                   >
88
                </el-option>
104
                </el-option>
89
             </el-select>
105
             </el-select>
90
           </el-form-item>
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
                <el-option
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
                   :label="item.item_name"
113
                   :label="item.item_name"
98
                   >
114
                   >
99
                 </el-option>
115
                 </el-option>
100
             </el-select>
116
             </el-select>
101
           </el-form-item>
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
           </el-form-item>
122
           </el-form-item>
107
           <el-form-item label="排序" :label-width="formLabelWidth">
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
           </el-form-item>
125
           </el-form-item>
110
         </el-form>
126
         </el-form>
111
         <div slot="footer" class="dialog-footer">
127
         <div slot="footer" class="dialog-footer">
112
           <el-button @click="editDialog = false">取 消</el-button>
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
         </div>
130
         </div>
115
       </el-dialog>
131
       </el-dialog>
116
     </div>
132
     </div>
124
 import PieChart from "../qcd/components/BarChart";
140
 import PieChart from "../qcd/components/BarChart";
125
 import { uParseTime } from "@/utils/tools";
141
 import { uParseTime } from "@/utils/tools";
126
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
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
 export default {
144
 export default {
129
   name: "dialysisTotal",
145
   name: "dialysisTotal",
130
   data() {
146
   data() {
137
       tabActiveName: "control",
153
       tabActiveName: "control",
138
       InspectionMajor:[],
154
       InspectionMajor:[],
139
       InspectionMinor:[],
155
       InspectionMinor:[],
156
+      InspectionMinorTwo:[],
140
       configuraData: [],
157
       configuraData: [],
141
       newDialog: false,
158
       newDialog: false,
142
       editDialog: false,
159
       editDialog: false,
148
         large_range: "",
165
         large_range: "",
149
         sort:"",
166
         sort:"",
150
       },
167
       },
168
+      editform:{
169
+         id:0,
170
+         inspectionMajor: "",
171
+         inspectionMinor: "",
172
+         min_range: "",
173
+         large_range: "",
174
+         sort:"",
175
+      },
151
       rules: {
176
       rules: {
152
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
177
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
153
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
178
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
154
         large_range:[{required:true,message:"指控范围不能为空"}]
179
         large_range:[{required:true,message:"指控范围不能为空"}]
155
-      }
180
+      },
181
+      page:1,
182
+      limit:10,
183
+      total:0,
156
     };
184
     };
157
   },
185
   },
158
   methods: {
186
   methods: {
161
         this.$router.push({ path: "/qcd/patientanalysis/checkStatistical" });
189
         this.$router.push({ path: "/qcd/patientanalysis/checkStatistical" });
162
       }
190
       }
163
     },
191
     },
164
-    handleEdit() {
192
+
193
+    //编辑
194
+    handleEdit(id) {
165
       this.editDialog = true;
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
       getInspectionMajor().then(response=>{
216
       getInspectionMajor().then(response=>{
171
         if(response.data.state == 1){
217
         if(response.data.state == 1){
172
           var inspection =  response.data.data.inspection
218
           var inspection =  response.data.data.inspection
173
-          console.log("inspection",inspection)
219
+          console.log("大项",inspection)
174
           this.InspectionMajor = inspection
220
           this.InspectionMajor = inspection
175
-
221
+         
176
         }
222
         }
177
       })
223
       })
178
     },
224
     },
179
     //获取小项
225
     //获取小项
180
     changeInspection(id){
226
     changeInspection(id){
181
-      console.log("id----",id)
182
       getInspectionMinor(id).then(response=>{
227
       getInspectionMinor(id).then(response=>{
183
         if(response.data.state == 1){
228
         if(response.data.state == 1){
184
          var inspection =  response.data.data.inspection
229
          var inspection =  response.data.data.inspection
185
-         console.log("inspection",inspection)
230
+         console.log("小项",inspection)
186
          this.InspectionMinor = inspection
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
     changeInspectionMonior(id){
246
     changeInspectionMonior(id){
192
        getInspectionRange(id).then(response=>{
247
        getInspectionRange(id).then(response=>{
211
              this.form.large_range = ""
266
              this.form.large_range = ""
212
              this.form.min_range = ""
267
              this.form.min_range = ""
213
              this.form.sort = ""
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
     getConfigurationList(){
285
     getConfigurationList(){
220
-      getConfigurationList().then(response=>{
286
+      getConfigurationList(this.limit,this.page).then(response=>{
221
         if(response.data.state === 1){
287
         if(response.data.state === 1){
222
           var configurationlist = response.data.data.configurationlist
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
           console.log("列表",configurationlist)
294
           console.log("列表",configurationlist)
224
           this.configuraData = configurationlist
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
   components: {
355
   components: {
230
     PieChart,
356
     PieChart,
235
        this.getInspectionMajor()
361
        this.getInspectionMajor()
236
     //获取表格里面的数据
362
     //获取表格里面的数据
237
     this.getConfigurationList()
363
     this.getConfigurationList()
364
+    //获取所有小项的数据
365
+    this.getAllInspectionMinor()
238
    },
366
    },
367
+
239
 };
368
 };
240
 </script>
369
 </script>
241
 <style lang="scss">
370
 <style lang="scss">

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

1248
       this.fetchPatientDialysisSolutions();
1248
       this.fetchPatientDialysisSolutions();
1249
     },
1249
     },
1250
     openEdit(index, row) {
1250
     openEdit(index, row) {
1251
-      console.log(row);
1251
+     
1252
       this.current_index = index;
1252
       this.current_index = index;
1253
-
1253
+     
1254
       this.addPlan.id = row.id;
1254
       this.addPlan.id = row.id;
1255
       this.addPlan.mode = row.mode_id;
1255
       this.addPlan.mode = row.mode_id;
1256
       this.addPlan.mode_name = row.mode_name;
1256
       this.addPlan.mode_name = row.mode_name;
1262
       this.addPlan.hemodialysis_machine = row.hemodialysis_machine + "";
1262
       this.addPlan.hemodialysis_machine = row.hemodialysis_machine + "";
1263
       this.addPlan.perfusion_apparatus = row.perfusion_apparatus + "";
1263
       this.addPlan.perfusion_apparatus = row.perfusion_apparatus + "";
1264
       this.addPlan.blood_flow_volume = row.blood_flow_volume.toString();
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
       this.addPlan.replacement_total = row.replacement_total;
1271
       this.addPlan.replacement_total = row.replacement_total;
1267
 
1272
 
1268
       this.addPlan.target_ktv = row.target_ktv.toString();
1273
       this.addPlan.target_ktv = row.target_ktv.toString();
1292
       this.addPlan.displace_liqui_value = row.displace_liqui_value.toString();
1297
       this.addPlan.displace_liqui_value = row.displace_liqui_value.toString();
1293
       this.addPlan.ultrafiltration = row.ultrafiltration.toString();
1298
       this.addPlan.ultrafiltration = row.ultrafiltration.toString();
1294
       this.addPlan.blood_access = row.blood_access;
1299
       this.addPlan.blood_access = row.blood_access;
1295
-
1300
+     
1296
       this.addPlan.registrars_id = row.registrars_id;
1301
       this.addPlan.registrars_id = row.registrars_id;
1297
 
1302
 
1298
       this.dialogVisible = true;
1303
       this.dialogVisible = true;
1655
     // this.fetchAllDoctorAndNurse();
1660
     // this.fetchAllDoctorAndNurse();
1656
     this.fetchAllAdminUsers();
1661
     this.fetchAllAdminUsers();
1657
     this.fetchPatientDialysisSolutions();
1662
     this.fetchPatientDialysisSolutions();
1663
+   
1658
   }
1664
   }
1659
 };
1665
 };
1660
 </script>
1666
 </script>

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

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

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

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

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

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

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

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

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

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

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

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