Browse Source

Merge branch '20200710_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20200710_pc_vue_new_branch

See999 4 years ago
parent
commit
8e238381f1

+ 21 - 1
src/api/schedule_template/patient.js View File

30
     method: 'post',
30
     method: 'post',
31
     params: params,
31
     params: params,
32
   })
32
   })
33
-}
33
+}
34
+
35
+export function getTemplateScheduleSearchResult(params) {
36
+  return request({
37
+    url: '/api/schedule_template/search',
38
+    method: 'Get',
39
+    params: params
40
+  })
41
+}
42
+
43
+
44
+export function cancelScheduleTemplate(params) {
45
+  return request({
46
+    url: '/api/schedule_template/cancel',
47
+    method: 'Post',
48
+    params: params
49
+  })
50
+}
51
+
52
+
53
+

+ 1 - 1
src/router/index.js View File

101
 var _asy_router_map = [
101
 var _asy_router_map = [
102
   patient,
102
   patient,
103
   workforce,
103
   workforce,
104
-  medicalScheduling,
104
+  // medicalScheduling,
105
   weight_sign,
105
   weight_sign,
106
   dialysis,
106
   dialysis,
107
   stock,
107
   stock,

+ 153 - 0
src/xt_pages/data/components/dialysisComputer.vue View File

1
+<template>
2
+  <div class="">
3
+    <el-table
4
+      :row-style="{ color: '#303133' }"
5
+      :header-cell-style="{
6
+        backgroundColor: 'rgb(245, 247, 250)',
7
+        color: '#606266'
8
+      }"
9
+      :data="dialysis_computer_data"
10
+      border
11
+      fit
12
+      highlight-current-row
13
+      style="width: 100%;min-height:500px;"
14
+    >
15
+      <el-table-column align="center" label="字段名">
16
+        <template slot-scope="scope">
17
+          <span>{{ scope.row.filed_name_cn }}</span>
18
+        </template>
19
+      </el-table-column>
20
+      <el-table-column align="center" label="字段">
21
+        <template slot-scope="scope">
22
+          <span>{{ scope.row.filed_name }}</span>
23
+        </template>
24
+      </el-table-column>
25
+
26
+      <el-table-column align="center" label="是否显示">
27
+        <template slot-scope="scope">
28
+          <span v-if="scope.row.is_show == 1">是</span>
29
+          <span v-if="scope.row.is_show == 2">否</span>
30
+        </template>
31
+      </el-table-column>
32
+
33
+      <el-table-column label="操作" align="center">
34
+        <template slot-scope="scope">
35
+          <el-tooltip
36
+            class="item"
37
+            effect="dark"
38
+            content="不展示"
39
+            placement="top"
40
+            v-if="scope.row.is_show == 1"
41
+          >
42
+            <el-button
43
+              size="small"
44
+              type="danger"
45
+              icon="el-icon-remove-outline"
46
+              @click="handleHide(scope.$index, scope.row)"
47
+            >
48
+            </el-button>
49
+          </el-tooltip>
50
+
51
+          <el-tooltip
52
+            class="item"
53
+            effect="dark"
54
+            content="展示"
55
+            placement="top"
56
+            v-if="scope.row.is_show == 2"
57
+          >
58
+            <el-button
59
+              size="small"
60
+              type="primary"
61
+              icon="el-icon-view"
62
+              @click="handleShow(scope.$index, scope.row)"
63
+            >
64
+            </el-button>
65
+          </el-tooltip>
66
+        </template>
67
+      </el-table-column>
68
+    </el-table>
69
+  </div>
70
+</template>
71
+
72
+<script>
73
+  import { updateFieldIsShow } from "@/api/data";
74
+  import store from "@/store";
75
+
76
+  export default {
77
+    name: "dialysisComputer",
78
+
79
+    props: {
80
+      dialysis_computer_data: {
81
+        type: Array
82
+      }
83
+    },
84
+    methods: {
85
+      handleHide: function(index, row) {
86
+        this.$confirm("是否将该字段设为不可见?", "提示", {
87
+          confirmButtonText: "确 定",
88
+          cancelButtonText: "取 消",
89
+          type: "warning"
90
+        })
91
+          .then(() => {
92
+            updateFieldIsShow(row.id, 2).then(response => {
93
+              if (response.data.state == 1) {
94
+                let params = {
95
+                  id: response.data.data.id,
96
+                  is_show: response.data.data.is_show
97
+                };
98
+                store.dispatch("updateFiledConfigList", params).then(() => {});
99
+                this.$emit("change", params);
100
+              }
101
+            });
102
+            this.$message({
103
+              type: "success",
104
+              message: "设置成功!"
105
+            });
106
+          })
107
+          .catch(() => {});
108
+      },
109
+      handleShow: function(index, row) {
110
+        this.$confirm("是否将该字段设为可见?", "提示", {
111
+          confirmButtonText: "确 定",
112
+          cancelButtonText: "取 消",
113
+          type: "warning"
114
+        })
115
+          .then(() => {
116
+            updateFieldIsShow(row.id, 1).then(response => {
117
+              if (response.data.state == 1) {
118
+                let params = {
119
+                  id: response.data.data.id,
120
+                  is_show: response.data.data.is_show
121
+                };
122
+                store.dispatch("updateFiledConfigList", params).then(() => {});
123
+                this.$emit("change", params);
124
+              }
125
+            });
126
+            this.$message({
127
+              type: "success",
128
+              message: "设置成功!"
129
+            });
130
+          })
131
+          .catch(() => {});
132
+      }
133
+    },
134
+    watch: {
135
+
136
+    },
137
+  };
138
+</script>
139
+
140
+<style scoped></style>
141
+<style>
142
+  .el-table td,
143
+  .el-table th.is-leaf,
144
+  .el-table--border,
145
+  .el-table--group {
146
+    border-color: #d0d3da;
147
+  }
148
+  .el-table--border::after,
149
+  .el-table--group::after,
150
+  .el-table::before {
151
+    background-color: #d0d3da;
152
+  }
153
+</style>

+ 17 - 1
src/xt_pages/data/showConfig.vue View File

24
               @change="changeBeforeData"
24
               @change="changeBeforeData"
25
             ></dialysis-before>
25
             ></dialysis-before>
26
           </el-tab-pane>
26
           </el-tab-pane>
27
+          <el-tab-pane label="透析上机">
28
+            <dialysis-computer
29
+              :dialysis_monitor_data="dialysis_computer_data"
30
+              @change="changeComputerData"
31
+            ></dialysis-computer>
32
+          </el-tab-pane>
27
           <el-tab-pane label="透析监测">
33
           <el-tab-pane label="透析监测">
28
             <dialysis-monitor
34
             <dialysis-monitor
29
               :dialysis_monitor_data="dialysis_monitor_data"
35
               :dialysis_monitor_data="dialysis_monitor_data"
42
               @change="changeSummaryData"
48
               @change="changeSummaryData"
43
             ></dialysis-summary>
49
             ></dialysis-summary>
44
           </el-tab-pane>
50
           </el-tab-pane>
51
+
45
         </el-tabs>
52
         </el-tabs>
46
       </div>
53
       </div>
47
     </div>
54
     </div>
58
 import DialysisSummary from "./components/dialysisSummary";
65
 import DialysisSummary from "./components/dialysisSummary";
59
 import { getFiledConfigList } from "@/utils/data_config"; // getConfigList from sessionStorage
66
 import { getFiledConfigList } from "@/utils/data_config"; // getConfigList from sessionStorage
60
 import store from "@/store";
67
 import store from "@/store";
68
+import DialysisComputer from './components/dialysisComputer'
61
 
69
 
62
 export default {
70
 export default {
63
   name: "showConfig",
71
   name: "showConfig",
64
   components: {
72
   components: {
73
+    DialysisComputer,
65
     ReceiveTreatmentAsses,
74
     ReceiveTreatmentAsses,
66
     DialysisMonitor,
75
     DialysisMonitor,
67
     DialysisBefore,
76
     DialysisBefore,
82
       dialysis_before_data: [],
91
       dialysis_before_data: [],
83
       dialysis_monitor_data: [],
92
       dialysis_monitor_data: [],
84
       dialysis_after_data: [],
93
       dialysis_after_data: [],
85
-      dialysis_summary_data: []
94
+      dialysis_summary_data: [],
95
+      dialysis_computer_data:[],
86
     };
96
     };
87
   },
97
   },
88
   methods: {
98
   methods: {
109
           this.dialysis_before_data[i].is_show = object.is_show;
119
           this.dialysis_before_data[i].is_show = object.is_show;
110
         }
120
         }
111
       }
121
       }
122
+    },changeComputerData:function(object){
123
+      for (let i = 0; i < this.dialysis_computer_data.length; i++) {
124
+        if (this.dialysis_computer_data[i].id == object.id) {
125
+          this.dialysis_computer_data[i].is_show = object.is_show;
126
+        }
127
+      }
112
     },
128
     },
113
     changeMonitorData: function(object) {
129
     changeMonitorData: function(object) {
114
       for (let i = 0; i < this.dialysis_monitor_data.length; i++) {
130
       for (let i = 0; i < this.dialysis_monitor_data.length; i++) {

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

1388
         return false;
1388
         return false;
1389
       }
1389
       }
1390
       this.form.user_sys_before_count =  this.form.user_sys_before_count.toString()
1390
       this.form.user_sys_before_count =  this.form.user_sys_before_count.toString()
1391
-      this.form.avatar =this.form.avatar.
1392
       this.$refs[formName].validate(valid => {
1391
       this.$refs[formName].validate(valid => {
1393
         if (valid) {
1392
         if (valid) {
1394
           this.formSubmit = false;
1393
           this.formSubmit = false;

File diff suppressed because it is too large
+ 729 - 539
src/xt_pages/workforce/components/template_table.vue


+ 49 - 2
src/xt_pages/workforce/template.vue View File

119
         <el-tab-pane name="first" :disabled="template_mode.mode == 0">
119
         <el-tab-pane name="first" :disabled="template_mode.mode == 0">
120
           <span slot="label"> 第一周 </span>
120
           <span slot="label"> 第一周 </span>
121
           <template-table :editable="true" :device_numbers="device_numbers" :template="first_template"
121
           <template-table :editable="true" :device_numbers="device_numbers" :template="first_template"
122
-                          :patients="patients"></template-table>
122
+                          :patients="patients" @cancel_sch="refresh"></template-table>
123
         </el-tab-pane>
123
         </el-tab-pane>
124
 
124
 
125
         <el-tab-pane name="second" :disabled="template_mode.mode != 2">
125
         <el-tab-pane name="second" :disabled="template_mode.mode != 2">
126
           <span slot="label"> 第二周 </span>
126
           <span slot="label"> 第二周 </span>
127
           <template-table :editable="true" :device_numbers="device_numbers" :template="second_template"
127
           <template-table :editable="true" :device_numbers="device_numbers" :template="second_template"
128
-                          :patients="patients"></template-table>
128
+                          :patients="patients" @cancel_sch="refresh"></template-table>
129
         </el-tab-pane>
129
         </el-tab-pane>
130
       </el-tabs>
130
       </el-tabs>
131
 
131
 
180
         patients: [],
180
         patients: [],
181
 
181
 
182
         first_template: {
182
         first_template: {
183
+          id: 1,
183
           items: []
184
           items: []
184
         },
185
         },
185
         second_template: {
186
         second_template: {
187
+          id: 2,
186
           items: []
188
           items: []
187
         },
189
         },
188
         this_week_schedules: {
190
         this_week_schedules: {
238
       })
240
       })
239
     },
241
     },
240
     methods: {
242
     methods: {
243
+      refresh(){
244
+        getTemplateInitData().then(rs => {
245
+          var resp = rs.data
246
+          if (resp.state == 1) {
247
+            var mode = resp.data.template_mode
248
+            var device_numbers = resp.data.device_numbers
249
+            var templates = resp.data.templates
250
+            var patients = resp.data.patients
251
+            var schedules = resp.data.schedules
252
+
253
+            this.template_mode = mode
254
+            this.origin_mode = mode.mode
255
+            this.device_numbers = device_numbers
256
+            console.log(this.device_numbers)
257
+            this.patients = patients
258
+
259
+            this.first_template = templates[0]
260
+            this.second_template = templates[1]
261
+
262
+            var fakeTemplateItems = []
263
+            for (let index = 0; index < schedules.length; index++) {
264
+              const schedule = schedules[index]
265
+              var item = {}
266
+              this.$set(item, 'id', schedule.id)
267
+              this.$set(item, 'template_id', 0)
268
+              this.$set(item, 'device_number_id', schedule.bed_id)
269
+              this.$set(item, 'treat_mode', schedule.mode_id)
270
+              this.$set(item, 'weekday', schedule.schedule_week)
271
+              this.$set(item, 'time_type', schedule.schedule_type)
272
+              var patient = {}
273
+              this.$set(patient, 'id', schedule.patient_id)
274
+              this.$set(patient, 'name', schedule.patient)
275
+              this.$set(item, 'patient', patient)
276
+
277
+              fakeTemplateItems.push(item)
278
+            }
279
+            this.this_week_schedules.items = fakeTemplateItems
280
+
281
+          } else {
282
+            this.$message(resp.msg)
283
+          }
284
+        })
285
+
286
+
287
+      },
241
       generateTxt:function(log) {
288
       generateTxt:function(log) {
242
         var content = ''
289
         var content = ''
243
         var errlog =  log.err_logs
290
         var errlog =  log.err_logs