Bladeren bron

透析机管理

xiaoming_global 5 jaren geleden
bovenliggende
commit
910cc44409

+ 1 - 1
.idea/codeStyles/Project.xml Bestand weergeven

@@ -1,6 +1,6 @@
1 1
 <component name="ProjectCodeStyleConfiguration">
2 2
   <code_scheme name="Project" version="173">
3
-    <JSCodeStyleSettings version="0">
3
+    <JSCodeStyleSettings>
4 4
       <option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
5 5
       <option name="FORCE_SEMICOLON_STYLE" value="true" />
6 6
       <option name="SPACE_BEFORE_GENERATOR_MULT" value="true" />

+ 18 - 0
src/api/manage.js Bestand weergeven

@@ -0,0 +1,18 @@
1
+import request from '@/utils/request'
2
+
3
+export function getAllSubregion(params) {
4
+  return request({
5
+    url: '/api/management/getallsubregion',
6
+    method: 'Get',
7
+    params: params
8
+  })
9
+}
10
+
11
+export function SaveManageInfo(data) {
12
+  console.log('data是什么', data)
13
+  return request({
14
+    url: '/api/management/savemanageinfo',
15
+    method: 'Post',
16
+    data: data
17
+  })
18
+}

+ 3 - 0
src/api/patient.js Bestand weergeven

@@ -317,6 +317,9 @@ export function UpdateDryWeightData(params) {
317 317
 }
318 318
 
319 319
 export function getAllData(id, page, limit) {
320
+  console.log('id是什么', id)
321
+  console.log('page是什么', page)
322
+  console.log('limit是什么', limit)
320 323
   const params = {
321 324
     id: id,
322 325
     page: page,

+ 1 - 0
src/router/index_路由未分离前.js Bestand weergeven

@@ -942,6 +942,7 @@ export const xt_asyncRouterMap = [
942 942
       { path: '/device/main', component: () => import('@/xt_pages/device/main'), name: 'dialysisMachineManage', meta: { title: 'dialysisMachineManage' }}
943 943
     ]
944 944
   },
945
+
945 946
   // /////////////////////////////////////线在end
946 947
   {
947 948
     path: '/role',

+ 1 - 1
src/router/modules/device.js Bestand weergeven

@@ -36,7 +36,7 @@ export default {
36 36
   },
37 37
   {
38 38
     path: '/device/main',
39
-    component: () => import('@/xt_pages/device/main'),
39
+    component: () => import('@/xt_pages/management/index'),
40 40
     name: 'dialysisMachineManage',
41 41
     meta: {
42 42
       title: 'dialysisMachineManage'

+ 299 - 0
src/xt_pages/management/components/ManageForm.vue Bestand weergeven

@@ -0,0 +1,299 @@
1
+<template>
2
+    <div id = "manage-form">
3
+      <el-dialog
4
+       title="新增设备"
5
+       :visible.sync="dialogVisible"
6
+       width="50%"
7
+       align="center">
8
+       <el-form ref="form" :model="form" :rules="rules">
9
+            <el-row>
10
+              <el-col :span="8">
11
+                 <el-form-item label="序列号:" prop="serial_number">
12
+                   <el-input style="width:135px" v-model="form.serial_number"></el-input>
13
+                 </el-form-item>
14
+              </el-col>
15
+              <el-col :span="8">
16
+                <el-form-item label="分区:" prop="device_type">
17
+                    <el-select style="width:135px" v-model="form.device_type">
18
+                      <el-option v-for="item in this.deviceType" :key="item.id" :label="item.name" :value="item.id" ></el-option>
19
+                    </el-select>
20
+                </el-form-item>
21
+              </el-col>
22
+              <el-col :span="8">
23
+                 <el-form-item label="床位号:" prop="bed_number">
24
+                    <el-select style="width:135px" v-model="form.bed_number">
25
+                      <el-option v-for="item in this.bedNumber" :key="item.id" :label="item.number" :value="item.id"></el-option>
26
+                    </el-select>
27
+                 </el-form-item>
28
+              </el-col>
29
+            </el-row>
30
+            <el-row>
31
+              <el-col :span="8">
32
+                  <el-form-item label="设备名称:" prop="device_name">
33
+                     <el-input style="width:135px" v-model="form.device_name"></el-input>
34
+                  </el-form-item>
35
+              </el-col>
36
+              <el-col :span="8">
37
+                <el-form-item label="生产厂家:" prop="manufacture_factory">
38
+                   <el-input style="width:135px" v-model="form.manufacture_factory"></el-input>
39
+                </el-form-item>
40
+              </el-col>
41
+              <el-col :span="8">
42
+                <el-form-item label="维修厂家:" prop="service_manufacturer">
43
+                   <el-input style="width:135px" v-model="form.service_manufacturer"></el-input>
44
+                </el-form-item>
45
+              </el-col>
46
+            </el-row>
47
+              <el-row>
48
+              <el-col :span="8">
49
+                  <el-form-item label="设备型号:" prop="unit_type">
50
+                     <el-input style="width:135px" v-model="form.unit_type"></el-input>
51
+                  </el-form-item>
52
+              </el-col>
53
+              <el-col :span="8">
54
+                <el-form-item label="使用科室:" prop="use_section">
55
+                   <el-input style="width:135px" v-model="form.use_section"></el-input>
56
+                </el-form-item>
57
+              </el-col>
58
+              <el-col :span="8">
59
+                <el-form-item label="科室编号:" prop="section_number">
60
+                   <el-input style="width:135px" v-model="form.section_number"></el-input>
61
+                </el-form-item>
62
+              </el-col>
63
+            </el-row>
64
+              <el-row>
65
+              <el-col :span="8">
66
+                  <el-form-item label="购买日期:" prop="buy_date">
67
+                    <el-date-picker type="date" value-format="timestamp" size="small" style="width: 135px;" v-model="form.buy_date"></el-date-picker>
68
+                  </el-form-item>
69
+              </el-col>
70
+              <el-col :span="8">
71
+                <el-form-item label="安装日期:" prop="install_date">
72
+                   <el-date-picker type="date" value-format="timestamp" size="small" style="width: 135px;" v-model="form.install_date"></el-date-picker>
73
+                </el-form-item>
74
+              </el-col>
75
+              <el-col :span="8">
76
+                <el-form-item label="启用日期:" prop="start_date">
77
+                    <el-date-picker type="date" value-format="timestamp" size="small" style="width: 135px;" v-model="form.start_date"></el-date-picker>
78
+                </el-form-item>
79
+              </el-col>
80
+            </el-row>
81
+              <el-row>
82
+              <el-col :span="8">
83
+                  <el-form-item label="维修工程师:" prop="maintenance_engineer">
84
+                     <el-input style="width:135px" v-model="form.maintenance_engineer"></el-input>
85
+                  </el-form-item>
86
+              </el-col>
87
+              <el-col :span="8">
88
+                <el-form-item label="联系电话:" prop="telephone">
89
+                   <el-input style="width:135px" v-model="form.telephone"></el-input>
90
+                </el-form-item>
91
+              </el-col>
92
+              <el-col :span="8">
93
+                <el-form-item label="保修期限:" prop="guarantee_date">
94
+                   <el-input style="width:135px" v-model="form.guarantee_date"></el-input>
95
+                </el-form-item>
96
+              </el-col>
97
+            </el-row>
98
+            <el-row>
99
+               <el-col :span="8">
100
+                <el-form-item label="机器状态:" prop="machine_Status">
101
+                  <el-select style="width:135px"  v-model="form.machine_status">
102
+                      <el-option v-for="item in machineStatus" :key="item.id" :label="item.name" :value="item.id"></el-option>
103
+                    </el-select>
104
+                </el-form-item>
105
+              </el-col>
106
+               <el-col :span="8">
107
+                <el-form-item label="初次使用次数:" prop="user_total">
108
+                    <el-input v-model="form.user_total" style="width:135px"></el-input>
109
+                </el-form-item>
110
+              </el-col>
111
+               <el-col :span="8">
112
+                <el-form-item label="备注:" prop="remarks">
113
+                   <el-input style="width:135px" v-model="form.remarks"></el-input>
114
+                </el-form-item>
115
+              </el-col>
116
+            </el-row>
117
+            <el-row>
118
+               <el-col :span="8">
119
+                 <el-form-item label="报废日期:" prop="rubbish_date">
120
+                     <el-date-picker type="date" value-format="timestamp" size="small" style="width: 135px;" v-model="form.rubbish_date"></el-date-picker>
121
+                 </el-form-item>
122
+               </el-col>
123
+               <el-col :span="8">
124
+                  <el-form-item label="报废原因:" prop="remarks">
125
+                      <el-input style="width:135px" v-model="form.remarks"></el-input>
126
+                  </el-form-item>
127
+               </el-col>
128
+               <el-col :span="8">
129
+                 <el-form-item label="使用年限(年)" prop="user_year">
130
+                     <el-input style="width:135px" v-model="form.user_year"></el-input>
131
+                 </el-form-item>
132
+               </el-col>
133
+            </el-row>
134
+            <el-row>
135
+              <el-col  :span="8">
136
+                 <el-form-item label="工作时长(h)" prop="work_time">
137
+                   <el-input style="width:135px" v-model="form.work_time"></el-input>
138
+                 </el-form-item>
139
+              </el-col>      
140
+            </el-row>
141
+            <el-row>
142
+              <el-col :span="24">
143
+                <el-form-item label="治疗模式:" prop="treat_mode">
144
+                  <el-checkbox-group  v-model="form.treat_mode"  @change="changetreatmentmode"> 
145
+                     <el-checkbox  style="min-width:50px" v-for="item in  treatmentmode" :key="item"  :label="item" :value="item">{{item}}</el-checkbox>
146
+                  </el-checkbox-group>
147
+                </el-form-item>     
148
+              </el-col>
149
+            </el-row>
150
+            <el-row>
151
+              <el-col :span="4" >
152
+                <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
153
+              </el-col>
154
+            </el-row>
155
+       </el-form>
156
+      <span slot="footer" class="dialog-footer">
157
+      <el-button @click="dialogVisible = false">取 消</el-button>
158
+       <el-button type="primary" @click="SaveManageInfo('form')">保存</el-button>
159
+      </span>
160
+    </el-dialog>
161
+    </div> 
162
+</template>
163
+
164
+<script>
165
+  import { getAllSubregion, SaveManageInfo } from '@/api/manage'
166
+  const treatmentmodes = ['HD', 'HDF', 'HD+HP', 'HP', 'HF', 'SCUF', 'IUF', 'HFHD+HP', 'HFR', 'HDF+HP', 'GRRT', '腹水回收']
167
+  export default {
168
+  
169
+    name: 'ManageForm',
170
+    data() {
171
+      return {
172
+        dialogVisible: false,
173
+        // treatmentmode: [
174
+        //   { id: 1, name: 'HD' },
175
+        //   { id: 2, name: 'HDF' },
176
+        //   { id: 3, name: 'HD+HP' },
177
+        //   { id: 4, name: 'HP' },
178
+        //   { id: 5, name: 'HF' },
179
+        //   { id: 6, name: 'SCUF' },
180
+        //   { id: 7, name: 'IUF' },
181
+        //   { id: 8, name: 'HFHD+HP' },
182
+        //   { id: 9, name: 'HFR' },
183
+        //   { id: 10, name: 'HDF+HP' },
184
+        //   { id: 11, name: 'GRRT' },
185
+        //   { id: 12, name: '腹水回收' }
186
+        // ],
187
+        checked1: '',
188
+        form: {
189
+          serial_number: '',
190
+          device_type: '',
191
+          bed_number: '',
192
+          device_name: '',
193
+          manufacture_factory: '',
194
+          service_manufacturer: '',
195
+          unit_type: '',
196
+          use_section: '',
197
+          section_number: '',
198
+          buy_date: '',
199
+          install_date: '',
200
+          start_date: '',
201
+          maintenance_engineer: '',
202
+          telephone: '',
203
+          guarantee_date: '',
204
+          machine_status: '',
205
+          user_total: '',
206
+          remarks: '',
207
+          rubbish_date: '',
208
+          rubbish_reason: '',
209
+          user_year: '',
210
+          work_time: '',
211
+          treat_mode: [],
212
+          treat_type: []
213
+        },
214
+        deviceType: [],
215
+        bedNumber: [],
216
+        machineStatus: [
217
+          { id: 1, name: '使用机' },
218
+          { id: 2, name: '备用机' },
219
+          { id: 3, name: '急诊机' },
220
+          { id: 4, name: '报废机' }
221
+        ],
222
+        checkAll: false,
223
+        isIndeterminate: true,
224
+        treatmentmode: treatmentmodes,
225
+        rules: {
226
+          serial_number: [{ required: true, messeage: '请填写序列号' }],
227
+          device_name: [{ required: true, messeage: '请填写序列号' }]
228
+        }
229
+      }
230
+    },
231
+    methods: {
232
+      open: function() {
233
+        this.dialogVisible = true
234
+      },
235
+      changetreatmentmode(val) {
236
+        console.log('val是什么', val.length)
237
+        console.log(this.form.treat_mode)
238
+        const checkedCount = val.length
239
+        this.checkAll = checkedCount === this.treatmentmode.length
240
+        this.isIndeterminate = checkedCount > 0 && checkedCount < this.treatmentmode.length
241
+      },
242
+      handleCheckAllChange(val) {
243
+        console.log('val是什么东西', val)
244
+        this.form.treat_mode = val ? this.treatmentmode : []
245
+        this.isIndeterminate = false
246
+      },
247
+      getAllSubregion() {
248
+        getAllSubregion().then(response => {
249
+          if (response.data.state === 1) {
250
+            var zones = response.data.data.zones
251
+            console.log('zones', zones)
252
+            this.deviceType = zones
253
+            var numbers = response.data.data.numbers
254
+            console.log('numbers', numbers)
255
+            this.bedNumber = numbers
256
+          }
257
+        })
258
+      },
259
+      SaveManageInfo(formName) {
260
+        console.log('是什么', this.form.treat_mode)
261
+        const arr1 = []
262
+        this.form.treat_mode.map((item, index) => {
263
+          const obj = {}
264
+          obj.id = index + 1
265
+          // obj.name = item
266
+          arr1.push(obj.id)
267
+        })
268
+        this.form.treat_type = arr1
269
+        console.log('arr1', arr1)
270
+        console.log('arr2', this.form.treat_type)
271
+        this.$refs[formName].validate(valid => {
272
+          if (valid) {
273
+            SaveManageInfo(this.form).then(response => {
274
+  
275
+            })
276
+          }
277
+        })
278
+      }
279
+  
280
+    },
281
+    created() {
282
+      this.getAllSubregion()
283
+    }
284
+  }
285
+</script>
286
+
287
+<style lang="scss">
288
+  .el-form-item__label{
289
+    width: 100px;
290
+    font-size: 14px;
291
+  }
292
+.el-form-item {
293
+    margin-bottom: 4px;
294
+}
295
+.el-checkbox{
296
+  line-height: 26px;
297
+  height: 26px;
298
+}
299
+</style>

+ 39 - 0
src/xt_pages/management/home.vue Bestand weergeven

@@ -0,0 +1,39 @@
1
+<template>
2
+    <div class="main-container">
3
+        <div class="app-container">
4
+              <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
5
+              <div style="margin: 15px 0;"></div>
6
+              <el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
7
+                <el-checkbox v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox>
8
+               </el-checkbox-group>
9
+        </div>
10
+    </div>
11
+  
12
+</template>
13
+
14
+<script>
15
+  const cityOptions = ['上海', '北京', '广州', '深圳']
16
+export default {
17
+    name: 'home',
18
+    data() {
19
+      return {
20
+  
21
+      }
22
+    },
23
+    methods: {
24
+      handleCheckAllChange(val) {
25
+        this.checkedCities = val ? cityOptions : []
26
+      this.isIndeterminate = false
27
+    },
28
+      handleCheckedCitiesChange(value) {
29
+        const checkedCount = value.length
30
+      this.checkAll = checkedCount === this.cities.length
31
+      this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length
32
+    }
33
+    }
34
+  }
35
+</script>
36
+
37
+<style scoped>
38
+
39
+</style>

+ 141 - 0
src/xt_pages/management/index.vue Bestand weergeven

@@ -0,0 +1,141 @@
1
+<template>
2
+    <div class="main-contain">
3
+      <div class="position">
4
+           <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+            <el-button class="filter-item" style="float:right;" type="primary" icon="el-icon-circle-plus-outline" size="small" @click="AddManage()">新增</el-button>
6
+      </div>
7
+      <div class="app-container">
8
+         <div class="cell clearfix">
9
+            <el-input   style="width: 400px;" v-model="searchKey" class="filter-item" placeholder="输入序列号/设备名/型号/床位搜索" size="small"/>
10
+            <el-button  class="filter-item" type="primary" icon="el-icon-search"  size="small" >搜索</el-button>
11
+         </div>
12
+
13
+         <div class="cell clearfix">
14
+            <label class="title"><span class="name">分区:</span></label>
15
+             <div class="time">
16
+                <ul class="">
17
+                    <li :class="item.id==schedulType?'active':''" v-for="item in this.zones" :key="item.id"  @click='selectSchedulType(item.id)'>{{item.name}}</li>
18
+                </ul>
19
+             </div>
20
+         </div>
21
+
22
+         
23
+         <div class="cell clearfix">
24
+            <label class="title"><span class="name">状态:</span></label>
25
+             <div class="time">
26
+                <ul class="">
27
+                    <li :class="item.id==schedulType?'active':''" v-for="item in this.AllStatus" :key="item.id"  @click='selectSchedulType(item.id)'>{{item.name}}</li>
28
+                </ul>
29
+             </div>
30
+         </div>
31
+
32
+          <el-table
33
+           :data="tableData"
34
+            border
35
+            style="width: 100%">
36
+            <el-table-column
37
+           
38
+             label="序列号"
39
+             width="180"
40
+             align="center">
41
+            
42
+           </el-table-column>
43
+            <el-table-column
44
+            
45
+             label="设备名"
46
+             width="180"
47
+             align="center">
48
+            </el-table-column>
49
+            <el-table-column
50
+           
51
+              label="型号"
52
+              align="center">
53
+             </el-table-column>
54
+              <el-table-column
55
+            
56
+              label="分区"
57
+              align="center">
58
+             </el-table-column>
59
+              <el-table-column
60
+             
61
+              label="床位号"
62
+              align="center">
63
+             </el-table-column>
64
+              <el-table-column
65
+           
66
+              label="操作"
67
+              align="center">
68
+             </el-table-column>
69
+            </el-table>
70
+            <!-- 新增设备 -->
71
+            <manage-form ref="manageForm"> </manage-form>
72
+      </div>
73
+    </div>
74
+</template>
75
+
76
+<script>
77
+import BreadCrumb from '../components/bread-crumb'
78
+import { getAllSubregion } from '@/api/manage'
79
+import ManageForm from './components/ManageForm'
80
+export default {
81
+  name: 'index.vue',
82
+  components: {
83
+    BreadCrumb,
84
+    ManageForm
85
+  },
86
+  data() {
87
+    return {
88
+      crumbs: [
89
+        { path: false, name: '透析机管理' },
90
+        { path: false, name: '设备管理' }
91
+      ],
92
+      searchKey: '',
93
+      zones: [
94
+        { id: 0, name: '全部' }
95
+      ],
96
+      schedulType: 0,
97
+      AllStatus: [
98
+        { id: 0, name: '全部' },
99
+        { id: 1, name: '使用机' },
100
+        { id: 2, name: '备用机' },
101
+        { id: 3, name: '急诊机' },
102
+        { id: 4, name: '报废机' }
103
+      ],
104
+      tableData: []
105
+
106
+    }
107
+  },
108
+  methods: {
109
+    getAllSubregion() {
110
+      getAllSubregion().then(response => {
111
+        if (response.data.state === 1) {
112
+          var zone = response.data.data.zones
113
+          var zones = [{ id: 0, name: '全部' }]
114
+          for (let i = 0; i < zone.length; i++) {
115
+            const item = zone[i]
116
+            console.log('呵呵', item)
117
+            zones.push({ id: item.id, name: item.name })
118
+          }
119
+          console.log('zones', zones)
120
+          this.zones = zones
121
+        }
122
+      })
123
+    },
124
+    selectSchedulType(scheduleType) {
125
+      this.schedulType = scheduleType
126
+    },
127
+    AddManage() {
128
+      console.log(this.$refs.ManageForm)
129
+      this.$refs.manageForm.open()
130
+    }
131
+  },
132
+  created() {
133
+    // 获取所有的分区
134
+    this.getAllSubregion()
135
+  }
136
+}
137
+</script>
138
+
139
+<style scoped>
140
+
141
+</style>

+ 45 - 68
src/xt_pages/user/doctorAdvice.vue Bestand weergeven

@@ -1187,7 +1187,7 @@
1187 1187
   import { getDataConfig } from '@/utils/data'
1188 1188
 
1189 1189
   let rowIndex = 1
1190
-  let rowKey = 0
1190
+  const rowKey = 0
1191 1191
 
1192 1192
   export default {
1193 1193
     name: 'doctorAdvice',
@@ -1413,7 +1413,6 @@
1413 1413
                   duration: 2000
1414 1414
                 })
1415 1415
 
1416
-
1417 1416
                 this.dialogFormVisible = false
1418 1417
                 this.resetForm(formName)
1419 1418
                 var advice = response.data.data.advice
@@ -1490,8 +1489,8 @@
1490 1489
                       continue
1491 1490
                     }
1492 1491
                     if (
1493
-                      false ===
1494
-                      response.data.data.advices[index].parent_id in childMap
1492
+                      response.data.data.advices[index].parent_id in childMap ===
1493
+                    false
1495 1494
                     ) {
1496 1495
                       childMap[response.data.data.advices[index].parent_id] = []
1497 1496
                     }
@@ -1671,19 +1670,17 @@
1671 1670
         this.templateForm = { id: '' }
1672 1671
         this.selectedTemp = { id: 0, name: '', org_id: 0, list: [], rows: [] }
1673 1672
         this.selectedTemplate = []
1674
-        if (typeof this.$refs.templatetable != 'undefined') {
1673
+        if (typeof this.$refs.templatetable !== 'undefined') {
1675 1674
           this.$refs.templatetable.setCurrentRow(null)
1676 1675
         }
1677 1676
         this.templateFormVisible = true
1678 1677
       },
1679 1678
       openGroupChild() {
1680 1679
         if (this.groupSelectRow === null) {
1681
-
1682 1680
           this.$message.error('未选择医嘱内容,无法添加子药')
1683 1681
 
1684 1682
           return
1685 1683
         } else if (this.groupSelectRow.parent_row > 0) {
1686
-
1687 1684
           this.$message.error('子药不能添加子药')
1688 1685
 
1689 1686
           return
@@ -1712,11 +1709,9 @@
1712 1709
         this.isChild = false
1713 1710
         if (isEdit) {
1714 1711
           if (this.groupSelectRow === null) {
1715
-
1716 1712
             this.$message.error('未选择要修改的医嘱内容')
1717 1713
 
1718 1714
             return
1719
-
1720 1715
           }
1721 1716
           if (this.groupSelectRow.parent_row) {
1722 1717
             this.isChild = true
@@ -1767,7 +1762,7 @@
1767 1762
             day_count: '',
1768 1763
             week_days: '',
1769 1764
             frequency_type: 0,
1770
-            template_id:'',
1765
+            template_id: '',
1771 1766
             isEdit: 0,
1772 1767
             index: 0,
1773 1768
             id: 0,
@@ -1790,7 +1785,7 @@
1790 1785
           content = '确认删除此医嘱内容?'
1791 1786
         }
1792 1787
 
1793
-        var isChild = this.groupSelectRow.parent_row ? true : false
1788
+        var isChild = !!this.groupSelectRow.parent_row
1794 1789
         var title = isChild ? '删除子药内容' : '删除医嘱内容'
1795 1790
         var msg = isChild ? '确认删除此子药内容?' : content
1796 1791
         this.$confirm(msg, title, {
@@ -2037,7 +2032,7 @@
2037 2032
           if (groups[index].parent_id == 0) {
2038 2033
             continue
2039 2034
           }
2040
-          if (false === groups[index].parent_id in childMap) {
2035
+          if (groups[index].parent_id in childMap === false) {
2041 2036
             childMap[groups[index].parent_id] = []
2042 2037
           }
2043 2038
           childMap[groups[index].parent_id].push(groups[index])
@@ -2156,20 +2151,20 @@
2156 2151
           this.adviceForm.advice_desc = this.adviceTemplateMaps[key].advice_desc
2157 2152
           this.adviceForm.single_dose_unit = this.adviceTemplateMaps[
2158 2153
             key
2159
-            ].single_dose_unit
2154
+          ].single_dose_unit
2160 2155
           this.adviceForm.single_dose =
2161 2156
             this.adviceTemplateMaps[key].single_dose + ''
2162 2157
           this.adviceForm.prescribing_number_unit = this.adviceTemplateMaps[
2163 2158
             key
2164
-            ].prescribing_number_unit
2159
+          ].prescribing_number_unit
2165 2160
           this.adviceForm.prescribing_number =
2166 2161
             this.adviceTemplateMaps[key].prescribing_number + ''
2167 2162
           this.adviceForm.delivery_way = this.adviceTemplateMaps[
2168 2163
             key
2169
-            ].delivery_way
2164
+          ].delivery_way
2170 2165
           this.adviceForm.execution_frequency = this.adviceTemplateMaps[
2171 2166
             key
2172
-            ].execution_frequency
2167
+          ].execution_frequency
2173 2168
         }
2174 2169
       },
2175 2170
       indexMethod(index) {
@@ -2349,7 +2344,7 @@
2349 2344
         var name = ''
2350 2345
         if (
2351 2346
           this.doctorOptions == null ||
2352
-          typeof this.doctorOptions.length == 'undefined'
2347
+          typeof this.doctorOptions.length === 'undefined'
2353 2348
         ) {
2354 2349
           return name
2355 2350
         }
@@ -2372,7 +2367,7 @@
2372 2367
         var name = ''
2373 2368
         if (
2374 2369
           this.adminUserOptions == null ||
2375
-          typeof this.adminUserOptions.length == 'undefined'
2370
+          typeof this.adminUserOptions.length === 'undefined'
2376 2371
         ) {
2377 2372
           return name
2378 2373
         }
@@ -2389,7 +2384,6 @@
2389 2384
         return name
2390 2385
       },
2391 2386
       setAdviceForm(row) {
2392
-
2393 2387
         this.adviceForm = {
2394 2388
           advice_type: row.advice_type,
2395 2389
           advice_date: uParseTime(row.advice_date, '{y}-{m}-{d}'),
@@ -2415,6 +2409,7 @@
2415 2409
         getDoctorAdviceList(this.listQuery).then(response => {
2416 2410
           if (response.data.state == 1) {
2417 2411
             this.adviceTableData = response.data.data.advices
2412
+            console.log('数据是什么', this.adviceTableData)
2418 2413
             this.operators = response.data.data.operators
2419 2414
             if (this.operators.length > 0) {
2420 2415
               var operatorsLen = this.operators.length
@@ -2575,7 +2570,7 @@
2575 2570
             )
2576 2571
           }
2577 2572
         }
2578
-        //下面两步的作用是为了上选中的数据的输出顺序不变
2573
+        // 下面两步的作用是为了上选中的数据的输出顺序不变
2579 2574
         for (const index in this.selectedTemp.list) {
2580 2575
           this.$refs.selecttemplatetable.toggleRowSelection(
2581 2576
             this.selectedTemp.list[index]
@@ -2651,10 +2646,10 @@
2651 2646
             var item = {
2652 2647
               advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2653 2648
                 index
2654
-                ].advice_name,
2649
+              ].advice_name,
2655 2650
               advice_desc: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2656 2651
                 index
2657
-                ].advice_desc,
2652
+              ].advice_desc,
2658 2653
               single_dose:
2659 2654
                 '' +
2660 2655
                 this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
@@ -2667,7 +2662,7 @@
2667 2662
                   .drug_spec,
2668 2663
               drug_spec_unit: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2669 2664
                 index
2670
-                ].drug_spec_unit,
2665
+              ].drug_spec_unit,
2671 2666
               prescribing_number:
2672 2667
                 '' +
2673 2668
                 this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
@@ -2676,15 +2671,15 @@
2676 2671
                 .DoctorAdviceTemplate[index].prescribing_number_unit,
2677 2672
               delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2678 2673
                 index
2679
-                ].delivery_way,
2674
+              ].delivery_way,
2680 2675
               execution_frequency: this.adviceTemplateMaps[mapid]
2681 2676
                 .DoctorAdviceTemplate[index].execution_frequency,
2682 2677
               advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2683 2678
                 index
2684
-                ].id,
2679
+              ].id,
2685 2680
               selection: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2686 2681
                 index
2687
-                ].selection,
2682
+              ].selection,
2688 2683
 
2689 2684
               day_count: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].day_count,
2690 2685
               week_days: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].week_days,
@@ -2704,7 +2699,7 @@
2704 2699
               var parentRow = thisRowKey
2705 2700
               var children = this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2706 2701
                 index
2707
-                ].children
2702
+              ].children
2708 2703
               for (const key in children) {
2709 2704
                 thisRowKey++
2710 2705
                 var child = {
@@ -2740,7 +2735,7 @@
2740 2735
         this.allSelectedTemplate = []
2741 2736
         var thisRowKey = 0
2742 2737
         for (const indexs in this.adviceTemplateMaps) {
2743
-          let adviceTemplate = this.adviceTemplateMaps[indexs]
2738
+          const adviceTemplate = this.adviceTemplateMaps[indexs]
2744 2739
           for (const index in adviceTemplate.DoctorAdviceTemplate) {
2745 2740
             if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
2746 2741
               thisRowKey++
@@ -2774,7 +2769,7 @@
2774 2769
                 day_count: adviceTemplate.DoctorAdviceTemplate[index].day_count,
2775 2770
                 frequency_type: adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
2776 2771
                 week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
2777
-                template_id:"T"+adviceTemplate.DoctorAdviceTemplate[index].id,
2772
+                template_id: 'T' + adviceTemplate.DoctorAdviceTemplate[index].id,
2778 2773
 
2779 2774
                 isEdit: 0,
2780 2775
                 id: 0,
@@ -2793,7 +2788,7 @@
2793 2788
                   thisRowKey++
2794 2789
                   var child = {
2795 2790
                     advice_id: children[key].id,
2796
-                    template_id:"T"+children[key].id,
2791
+                    template_id: 'T' + children[key].id,
2797 2792
 
2798 2793
                     advice_name: children[key].advice_name,
2799 2794
                     advice_desc: children[key].advice_desc,
@@ -2903,9 +2898,8 @@
2903 2898
 
2904 2899
         console.log(this.groupForm)
2905 2900
 
2906
-
2907 2901
         this.templateFormVisible = false
2908
-        //清除数据源的选中记录
2902
+        // 清除数据源的选中记录
2909 2903
       },
2910 2904
       addTempForm(formName) {
2911 2905
         var _this = this
@@ -3024,41 +3018,41 @@
3024 3018
                       if (_this.groupSelectRow.row_key == children[j].row_key) {
3025 3019
                         _this.groupForm.adviceNames[index].children[
3026 3020
                           j
3027
-                          ].advice_name =
3021
+                        ].advice_name =
3028 3022
                           _this.nameForm.advice_name
3029 3023
                         _this.groupForm.adviceNames[index].children[
3030 3024
                           j
3031
-                          ].advice_desc =
3025
+                        ].advice_desc =
3032 3026
                           _this.nameForm.advice_desc
3033 3027
                         _this.groupForm.adviceNames[index].children[
3034 3028
                           j
3035
-                          ].single_dose =
3029
+                        ].single_dose =
3036 3030
                           '' + _this.nameForm.single_dose
3037 3031
                         _this.groupForm.adviceNames[index].children[
3038 3032
                           j
3039
-                          ].single_dose_unit =
3033
+                        ].single_dose_unit =
3040 3034
                           _this.nameForm.single_dose_unit
3041 3035
                         _this.groupForm.adviceNames[index].children[j].drug_spec =
3042 3036
                           '' + _this.nameForm.drug_spec
3043 3037
                         _this.groupForm.adviceNames[index].children[
3044 3038
                           j
3045
-                          ].drug_spec_unit =
3039
+                        ].drug_spec_unit =
3046 3040
                           _this.nameForm.drug_spec_unit
3047 3041
                         _this.groupForm.adviceNames[index].children[
3048 3042
                           j
3049
-                          ].prescribing_number =
3043
+                        ].prescribing_number =
3050 3044
                           '' + _this.nameForm.prescribing_number
3051 3045
                         _this.groupForm.adviceNames[index].children[
3052 3046
                           j
3053
-                          ].prescribing_number_unit =
3047
+                        ].prescribing_number_unit =
3054 3048
                           _this.nameForm.prescribing_number_unit
3055 3049
                         _this.groupForm.adviceNames[index].children[
3056 3050
                           j
3057
-                          ].delivery_way =
3051
+                        ].delivery_way =
3058 3052
                           _this.nameForm.delivery_way
3059 3053
                         _this.groupForm.adviceNames[index].children[
3060 3054
                           j
3061
-                          ].execution_frequency =
3055
+                        ].execution_frequency =
3062 3056
                           _this.nameForm.execution_frequency
3063 3057
 
3064 3058
                         _this.$set(
@@ -3083,8 +3077,6 @@
3083 3077
                     _this.groupForm.adviceNames[index].advice_desc =
3084 3078
                       _this.nameForm.advice_desc
3085 3079
 
3086
-
3087
-
3088 3080
                     _this.groupForm.adviceNames[index].single_dose =
3089 3081
                       '' + _this.nameForm.single_dose
3090 3082
                     _this.groupForm.adviceNames[index].single_dose_unit =
@@ -3106,15 +3098,11 @@
3106 3098
                       _this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
3107 3099
                       _this.groupForm.adviceNames[index].day_count = '0'
3108 3100
                       _this.groupForm.adviceNames[index].week_days = ''
3109
-
3110 3101
                     } else if (_this.nameForm.frequency_type == 2) {
3111
-
3112 3102
                       _this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
3113 3103
                       _this.groupForm.adviceNames[index].day_count = _this.nameForm.day_count
3114 3104
                       _this.groupForm.adviceNames[index].week_days = ''
3115
-
3116 3105
                     } else if (_this.nameForm.frequency_type == 3) {
3117
-
3118 3106
                       _this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
3119 3107
                       _this.groupForm.adviceNames[index].day_count = '0'
3120 3108
                       _this.groupForm.adviceNames[index].week_days = this.weeks.filter(function(s) {
@@ -3159,28 +3147,22 @@
3159 3147
                   }
3160 3148
                 }
3161 3149
               } else {
3162
-
3163
-                _this.nameForm.template_id =  "D" + new Date().getTime() + this.getRandValue()
3150
+                _this.nameForm.template_id = 'D' + new Date().getTime() + this.getRandValue()
3164 3151
 
3165 3152
                 if (_this.nameForm.frequency_type == 1) {
3166 3153
                   _this.nameForm.frequency_type = _this.nameForm.frequency_type
3167 3154
                   _this.nameForm.day_count = '0'
3168 3155
                   _this.nameForm.week_days = ''
3169
-
3170 3156
                 } else if (this.nameForm.frequency_type == 2) {
3171
-
3172 3157
                   _this.nameForm.frequency_type = _this.nameForm.frequency_type
3173 3158
                   _this.nameForm.day_count = _this.nameForm.day_count
3174 3159
                   _this.nameForm.week_days = ''
3175
-
3176 3160
                 } else if (this.nameForm.frequency_type == 3) {
3177
-
3178 3161
                   _this.nameForm.frequency_type = _this.nameForm.frequency_type
3179 3162
                   _this.nameForm.day_count = '0'
3180 3163
                   _this.nameForm.week_days = this.weeks.filter(function(s) {
3181 3164
                     return s && s.trim()
3182 3165
                   }).join(',')
3183
-
3184 3166
                 }
3185 3167
 
3186 3168
                 this.weeks = []
@@ -3287,13 +3269,13 @@
3287 3269
         this.templateFormVisible = false
3288 3270
         this.weeks = []
3289 3271
         for (const indexs in this.adviceTemplateMaps) {
3290
-          let adviceTemplate = this.adviceTemplateMaps[indexs]
3272
+          const adviceTemplate = this.adviceTemplateMaps[indexs]
3291 3273
           for (const index in adviceTemplate.DoctorAdviceTemplate) {
3292 3274
             adviceTemplate.DoctorAdviceTemplate[index].selection = false
3293 3275
           }
3294 3276
         }
3295 3277
       }, changeRemind(val) {
3296
-        let params = {
3278
+        const params = {
3297 3279
           'is_open_remind': val,
3298 3280
           'id': this.patientID
3299 3281
         }
@@ -3307,10 +3289,8 @@
3307 3289
             }
3308 3290
           } else {
3309 3291
             this.$message.error(response.data.msg)
3310
-
3311 3292
           }
3312 3293
         })
3313
-
3314 3294
       }, getPatient(params) {
3315 3295
         fetchPatient(params.id).then(response => {
3316 3296
           if (response.data.state == 1) {
@@ -3320,18 +3300,15 @@
3320 3300
             this.$message.error(response.data.msg)
3321 3301
           }
3322 3302
         })
3303
+      }, getRandValue() {
3304
+        var charactors = '1234567890'
3323 3305
 
3324
-      },getRandValue(){
3325
-        var charactors="1234567890";
3326
-
3327
-        var value='',i;
3328
-
3329
-        for(let j=1;j<=4;j++){
3330
-
3331
-          i = parseInt(10*Math.random());
3306
+        var value = '', i
3332 3307
 
3333
-          value = value + charactors.charAt(i);
3308
+        for (let j = 1; j <= 4; j++) {
3309
+          i = parseInt(10 * Math.random())
3334 3310
 
3311
+          value = value + charactors.charAt(i)
3335 3312
         }
3336 3313
         return value
3337 3314
       }
@@ -3388,7 +3365,7 @@
3388 3365
       this.fetchAllAdminUsers()
3389 3366
       // this.getAdviceConfig()
3390 3367
       this.getList()
3391
-      let params = {
3368
+      const params = {
3392 3369
         id: this.patientID
3393 3370
 
3394 3371
       }

+ 0 - 1
src/xt_pages/user/patients.vue Bestand weergeven

@@ -145,7 +145,6 @@
145 145
           <el-tooltip class="item" effect="dark" content="预览" placement="top">
146 146
             <el-button type="danger" icon="el-icon-tickets" size="small" @click="OpenView(scope.row.name,scope.row.dialysis_no,scope.row.id)"></el-button>
147 147
           </el-tooltip>
148
-
149 148
         </template>
150 149
       </el-table-column>
151 150
     </el-table>