Parcourir la source

Merge branch 'superman' of http://git.shengws.com/zhangbj/xt_vue into superman

csx il y a 5 ans
Parent
révision
f767ca2b90

+ 1 - 1
.idea/codeStyles/Project.xml Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -1188,7 +1188,7 @@
1188 1188
   import { getDataConfig } from '@/utils/data'
1189 1189
 
1190 1190
   let rowIndex = 1
1191
-  let rowKey = 0
1191
+  const rowKey = 0
1192 1192
 
1193 1193
   export default {
1194 1194
     name: 'doctorAdvice',
@@ -1415,7 +1415,6 @@
1415 1415
                   duration: 2000
1416 1416
                 })
1417 1417
 
1418
-
1419 1418
                 this.dialogFormVisible = false
1420 1419
                 this.resetForm(formName)
1421 1420
                 var advice = response.data.data.advice
@@ -1498,8 +1497,8 @@
1498 1497
                       continue
1499 1498
                     }
1500 1499
                     if (
1501
-                      false ===
1502
-                      response.data.data.advices[index].parent_id in childMap
1500
+                      response.data.data.advices[index].parent_id in childMap ===
1501
+                    false
1503 1502
                     ) {
1504 1503
                       childMap[response.data.data.advices[index].parent_id] = []
1505 1504
                     }
@@ -1687,19 +1686,17 @@
1687 1686
         this.templateForm = { id: '' }
1688 1687
         this.selectedTemp = { id: 0, name: '', org_id: 0, list: [], rows: [] }
1689 1688
         this.selectedTemplate = []
1690
-        if (typeof this.$refs.templatetable != 'undefined') {
1689
+        if (typeof this.$refs.templatetable !== 'undefined') {
1691 1690
           this.$refs.templatetable.setCurrentRow(null)
1692 1691
         }
1693 1692
         this.templateFormVisible = true
1694 1693
       },
1695 1694
       openGroupChild() {
1696 1695
         if (this.groupSelectRow === null) {
1697
-
1698 1696
           this.$message.error('未选择医嘱内容,无法添加子药')
1699 1697
 
1700 1698
           return
1701 1699
         } else if (this.groupSelectRow.parent_row > 0) {
1702
-
1703 1700
           this.$message.error('子药不能添加子药')
1704 1701
 
1705 1702
           return
@@ -1728,11 +1725,9 @@
1728 1725
         this.isChild = false
1729 1726
         if (isEdit) {
1730 1727
           if (this.groupSelectRow === null) {
1731
-
1732 1728
             this.$message.error('未选择要修改的医嘱内容')
1733 1729
 
1734 1730
             return
1735
-
1736 1731
           }
1737 1732
           if (this.groupSelectRow.parent_row) {
1738 1733
             this.isChild = true
@@ -1783,7 +1778,7 @@
1783 1778
             day_count: '',
1784 1779
             week_days: '',
1785 1780
             frequency_type: 0,
1786
-            template_id:'',
1781
+            template_id: '',
1787 1782
             isEdit: 0,
1788 1783
             index: 0,
1789 1784
             id: 0,
@@ -1806,7 +1801,7 @@
1806 1801
           content = '确认删除此医嘱内容?'
1807 1802
         }
1808 1803
 
1809
-        var isChild = this.groupSelectRow.parent_row ? true : false
1804
+        var isChild = !!this.groupSelectRow.parent_row
1810 1805
         var title = isChild ? '删除子药内容' : '删除医嘱内容'
1811 1806
         var msg = isChild ? '确认删除此子药内容?' : content
1812 1807
         this.$confirm(msg, title, {
@@ -2053,7 +2048,7 @@
2053 2048
           if (groups[index].parent_id == 0) {
2054 2049
             continue
2055 2050
           }
2056
-          if (false === groups[index].parent_id in childMap) {
2051
+          if (groups[index].parent_id in childMap === false) {
2057 2052
             childMap[groups[index].parent_id] = []
2058 2053
           }
2059 2054
           childMap[groups[index].parent_id].push(groups[index])
@@ -2172,20 +2167,20 @@
2172 2167
           this.adviceForm.advice_desc = this.adviceTemplateMaps[key].advice_desc
2173 2168
           this.adviceForm.single_dose_unit = this.adviceTemplateMaps[
2174 2169
             key
2175
-            ].single_dose_unit
2170
+          ].single_dose_unit
2176 2171
           this.adviceForm.single_dose =
2177 2172
             this.adviceTemplateMaps[key].single_dose + ''
2178 2173
           this.adviceForm.prescribing_number_unit = this.adviceTemplateMaps[
2179 2174
             key
2180
-            ].prescribing_number_unit
2175
+          ].prescribing_number_unit
2181 2176
           this.adviceForm.prescribing_number =
2182 2177
             this.adviceTemplateMaps[key].prescribing_number + ''
2183 2178
           this.adviceForm.delivery_way = this.adviceTemplateMaps[
2184 2179
             key
2185
-            ].delivery_way
2180
+          ].delivery_way
2186 2181
           this.adviceForm.execution_frequency = this.adviceTemplateMaps[
2187 2182
             key
2188
-            ].execution_frequency
2183
+          ].execution_frequency
2189 2184
         }
2190 2185
       },
2191 2186
       indexMethod(index) {
@@ -2365,7 +2360,7 @@
2365 2360
         var name = ''
2366 2361
         if (
2367 2362
           this.doctorOptions == null ||
2368
-          typeof this.doctorOptions.length == 'undefined'
2363
+          typeof this.doctorOptions.length === 'undefined'
2369 2364
         ) {
2370 2365
           return name
2371 2366
         }
@@ -2388,7 +2383,7 @@
2388 2383
         var name = ''
2389 2384
         if (
2390 2385
           this.adminUserOptions == null ||
2391
-          typeof this.adminUserOptions.length == 'undefined'
2386
+          typeof this.adminUserOptions.length === 'undefined'
2392 2387
         ) {
2393 2388
           return name
2394 2389
         }
@@ -2405,7 +2400,6 @@
2405 2400
         return name
2406 2401
       },
2407 2402
       setAdviceForm(row) {
2408
-
2409 2403
         this.adviceForm = {
2410 2404
           advice_type: row.advice_type,
2411 2405
           advice_date: uParseTime(row.advice_date, '{y}-{m}-{d}'),
@@ -2431,6 +2425,7 @@
2431 2425
         getDoctorAdviceList(this.listQuery).then(response => {
2432 2426
           if (response.data.state == 1) {
2433 2427
             this.adviceTableData = response.data.data.advices
2428
+            console.log('数据是什么', this.adviceTableData)
2434 2429
             this.operators = response.data.data.operators
2435 2430
             if (this.operators.length > 0) {
2436 2431
               var operatorsLen = this.operators.length
@@ -2591,7 +2586,7 @@
2591 2586
             )
2592 2587
           }
2593 2588
         }
2594
-        //下面两步的作用是为了上选中的数据的输出顺序不变
2589
+        // 下面两步的作用是为了上选中的数据的输出顺序不变
2595 2590
         for (const index in this.selectedTemp.list) {
2596 2591
           this.$refs.selecttemplatetable.toggleRowSelection(
2597 2592
             this.selectedTemp.list[index]
@@ -2667,10 +2662,10 @@
2667 2662
             var item = {
2668 2663
               advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2669 2664
                 index
2670
-                ].advice_name,
2665
+              ].advice_name,
2671 2666
               advice_desc: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2672 2667
                 index
2673
-                ].advice_desc,
2668
+              ].advice_desc,
2674 2669
               single_dose:
2675 2670
                 '' +
2676 2671
                 this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
@@ -2683,7 +2678,7 @@
2683 2678
                   .drug_spec,
2684 2679
               drug_spec_unit: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2685 2680
                 index
2686
-                ].drug_spec_unit,
2681
+              ].drug_spec_unit,
2687 2682
               prescribing_number:
2688 2683
                 '' +
2689 2684
                 this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
@@ -2692,15 +2687,15 @@
2692 2687
                 .DoctorAdviceTemplate[index].prescribing_number_unit,
2693 2688
               delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2694 2689
                 index
2695
-                ].delivery_way,
2690
+              ].delivery_way,
2696 2691
               execution_frequency: this.adviceTemplateMaps[mapid]
2697 2692
                 .DoctorAdviceTemplate[index].execution_frequency,
2698 2693
               advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2699 2694
                 index
2700
-                ].id,
2695
+              ].id,
2701 2696
               selection: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2702 2697
                 index
2703
-                ].selection,
2698
+              ].selection,
2704 2699
 
2705 2700
               day_count: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].day_count,
2706 2701
               week_days: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].week_days,
@@ -2720,7 +2715,7 @@
2720 2715
               var parentRow = thisRowKey
2721 2716
               var children = this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
2722 2717
                 index
2723
-                ].children
2718
+              ].children
2724 2719
               for (const key in children) {
2725 2720
                 thisRowKey++
2726 2721
                 var child = {
@@ -2756,7 +2751,7 @@
2756 2751
         this.allSelectedTemplate = []
2757 2752
         var thisRowKey = 0
2758 2753
         for (const indexs in this.adviceTemplateMaps) {
2759
-          let adviceTemplate = this.adviceTemplateMaps[indexs]
2754
+          const adviceTemplate = this.adviceTemplateMaps[indexs]
2760 2755
           for (const index in adviceTemplate.DoctorAdviceTemplate) {
2761 2756
             if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
2762 2757
               thisRowKey++
@@ -2790,7 +2785,7 @@
2790 2785
                 day_count: adviceTemplate.DoctorAdviceTemplate[index].day_count,
2791 2786
                 frequency_type: adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
2792 2787
                 week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
2793
-                template_id:"T"+adviceTemplate.DoctorAdviceTemplate[index].id,
2788
+                template_id: 'T' + adviceTemplate.DoctorAdviceTemplate[index].id,
2794 2789
 
2795 2790
                 isEdit: 0,
2796 2791
                 id: 0,
@@ -2809,7 +2804,7 @@
2809 2804
                   thisRowKey++
2810 2805
                   var child = {
2811 2806
                     advice_id: children[key].id,
2812
-                    template_id:"T"+children[key].id,
2807
+                    template_id: 'T' + children[key].id,
2813 2808
 
2814 2809
                     advice_name: children[key].advice_name,
2815 2810
                     advice_desc: children[key].advice_desc,
@@ -2919,9 +2914,8 @@
2919 2914
 
2920 2915
         console.log(this.groupForm)
2921 2916
 
2922
-
2923 2917
         this.templateFormVisible = false
2924
-        //清除数据源的选中记录
2918
+        // 清除数据源的选中记录
2925 2919
       },
2926 2920
       addTempForm(formName) {
2927 2921
         var _this = this
@@ -3040,41 +3034,41 @@
3040 3034
                       if (_this.groupSelectRow.row_key == children[j].row_key) {
3041 3035
                         _this.groupForm.adviceNames[index].children[
3042 3036
                           j
3043
-                          ].advice_name =
3037
+                        ].advice_name =
3044 3038
                           _this.nameForm.advice_name
3045 3039
                         _this.groupForm.adviceNames[index].children[
3046 3040
                           j
3047
-                          ].advice_desc =
3041
+                        ].advice_desc =
3048 3042
                           _this.nameForm.advice_desc
3049 3043
                         _this.groupForm.adviceNames[index].children[
3050 3044
                           j
3051
-                          ].single_dose =
3045
+                        ].single_dose =
3052 3046
                           '' + _this.nameForm.single_dose
3053 3047
                         _this.groupForm.adviceNames[index].children[
3054 3048
                           j
3055
-                          ].single_dose_unit =
3049
+                        ].single_dose_unit =
3056 3050
                           _this.nameForm.single_dose_unit
3057 3051
                         _this.groupForm.adviceNames[index].children[j].drug_spec =
3058 3052
                           '' + _this.nameForm.drug_spec
3059 3053
                         _this.groupForm.adviceNames[index].children[
3060 3054
                           j
3061
-                          ].drug_spec_unit =
3055
+                        ].drug_spec_unit =
3062 3056
                           _this.nameForm.drug_spec_unit
3063 3057
                         _this.groupForm.adviceNames[index].children[
3064 3058
                           j
3065
-                          ].prescribing_number =
3059
+                        ].prescribing_number =
3066 3060
                           '' + _this.nameForm.prescribing_number
3067 3061
                         _this.groupForm.adviceNames[index].children[
3068 3062
                           j
3069
-                          ].prescribing_number_unit =
3063
+                        ].prescribing_number_unit =
3070 3064
                           _this.nameForm.prescribing_number_unit
3071 3065
                         _this.groupForm.adviceNames[index].children[
3072 3066
                           j
3073
-                          ].delivery_way =
3067
+                        ].delivery_way =
3074 3068
                           _this.nameForm.delivery_way
3075 3069
                         _this.groupForm.adviceNames[index].children[
3076 3070
                           j
3077
-                          ].execution_frequency =
3071
+                        ].execution_frequency =
3078 3072
                           _this.nameForm.execution_frequency
3079 3073
 
3080 3074
                         _this.$set(
@@ -3099,8 +3093,6 @@
3099 3093
                     _this.groupForm.adviceNames[index].advice_desc =
3100 3094
                       _this.nameForm.advice_desc
3101 3095
 
3102
-
3103
-
3104 3096
                     _this.groupForm.adviceNames[index].single_dose =
3105 3097
                       '' + _this.nameForm.single_dose
3106 3098
                     _this.groupForm.adviceNames[index].single_dose_unit =
@@ -3122,15 +3114,11 @@
3122 3114
                       _this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
3123 3115
                       _this.groupForm.adviceNames[index].day_count = '0'
3124 3116
                       _this.groupForm.adviceNames[index].week_days = ''
3125
-
3126 3117
                     } else if (_this.nameForm.frequency_type == 2) {
3127
-
3128 3118
                       _this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
3129 3119
                       _this.groupForm.adviceNames[index].day_count = _this.nameForm.day_count
3130 3120
                       _this.groupForm.adviceNames[index].week_days = ''
3131
-
3132 3121
                     } else if (_this.nameForm.frequency_type == 3) {
3133
-
3134 3122
                       _this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
3135 3123
                       _this.groupForm.adviceNames[index].day_count = '0'
3136 3124
                       _this.groupForm.adviceNames[index].week_days = this.weeks.filter(function(s) {
@@ -3175,28 +3163,22 @@
3175 3163
                   }
3176 3164
                 }
3177 3165
               } else {
3178
-
3179
-                _this.nameForm.template_id =  "D" + new Date().getTime() + this.getRandValue()
3166
+                _this.nameForm.template_id = 'D' + new Date().getTime() + this.getRandValue()
3180 3167
 
3181 3168
                 if (_this.nameForm.frequency_type == 1) {
3182 3169
                   _this.nameForm.frequency_type = _this.nameForm.frequency_type
3183 3170
                   _this.nameForm.day_count = '0'
3184 3171
                   _this.nameForm.week_days = ''
3185
-
3186 3172
                 } else if (this.nameForm.frequency_type == 2) {
3187
-
3188 3173
                   _this.nameForm.frequency_type = _this.nameForm.frequency_type
3189 3174
                   _this.nameForm.day_count = _this.nameForm.day_count
3190 3175
                   _this.nameForm.week_days = ''
3191
-
3192 3176
                 } else if (this.nameForm.frequency_type == 3) {
3193
-
3194 3177
                   _this.nameForm.frequency_type = _this.nameForm.frequency_type
3195 3178
                   _this.nameForm.day_count = '0'
3196 3179
                   _this.nameForm.week_days = this.weeks.filter(function(s) {
3197 3180
                     return s && s.trim()
3198 3181
                   }).join(',')
3199
-
3200 3182
                 }
3201 3183
 
3202 3184
                 this.weeks = []
@@ -3302,13 +3284,13 @@
3302 3284
         this.templateFormVisible = false
3303 3285
         this.weeks = []
3304 3286
         for (const indexs in this.adviceTemplateMaps) {
3305
-          let adviceTemplate = this.adviceTemplateMaps[indexs]
3287
+          const adviceTemplate = this.adviceTemplateMaps[indexs]
3306 3288
           for (const index in adviceTemplate.DoctorAdviceTemplate) {
3307 3289
             adviceTemplate.DoctorAdviceTemplate[index].selection = false
3308 3290
           }
3309 3291
         }
3310 3292
       }, changeRemind(val) {
3311
-        let params = {
3293
+        const params = {
3312 3294
           'is_open_remind': val,
3313 3295
           'id': this.patientID
3314 3296
         }
@@ -3322,10 +3304,8 @@
3322 3304
             }
3323 3305
           } else {
3324 3306
             this.$message.error(response.data.msg)
3325
-
3326 3307
           }
3327 3308
         })
3328
-
3329 3309
       }, getPatient(params) {
3330 3310
         fetchPatient(params.id).then(response => {
3331 3311
           if (response.data.state == 1) {
@@ -3335,18 +3315,15 @@
3335 3315
             this.$message.error(response.data.msg)
3336 3316
           }
3337 3317
         })
3318
+      }, getRandValue() {
3319
+        var charactors = '1234567890'
3338 3320
 
3339
-      },getRandValue(){
3340
-        var charactors="1234567890";
3341
-
3342
-        var value='',i;
3343
-
3344
-        for(let j=1;j<=4;j++){
3345
-
3346
-          i = parseInt(10*Math.random());
3321
+        var value = '', i
3347 3322
 
3348
-          value = value + charactors.charAt(i);
3323
+        for (let j = 1; j <= 4; j++) {
3324
+          i = parseInt(10 * Math.random())
3349 3325
 
3326
+          value = value + charactors.charAt(i)
3350 3327
         }
3351 3328
         return value
3352 3329
       },getAllAdviceConfig:function() {
@@ -3416,7 +3393,7 @@
3416 3393
       this.fetchAllAdminUsers()
3417 3394
       this.getAllAdviceConfig()
3418 3395
       this.getList()
3419
-      let params = {
3396
+      const params = {
3420 3397
         id: this.patientID
3421 3398
 
3422 3399
       }

+ 0 - 1
src/xt_pages/user/patients.vue Voir le fichier

@@ -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>