Browse Source

dialog提交

xiaoming_global 5 years ago
parent
commit
365722368c
4 changed files with 820 additions and 626 deletions
  1. 84 76
      src/api/manage.js
  2. 29 29
      src/router/modules/device.js
  3. 299 235
      src/xt_pages/home/index.vue
  4. 408 286
      src/xt_pages/management/home.vue

+ 84 - 76
src/api/manage.js View File

@@ -1,20 +1,20 @@
1
-import request from "@/utils/request";
1
+import request from '@/utils/request'
2 2
 
3 3
 export function getAllSubregion(params) {
4 4
   return request({
5
-    url: "/api/management/getallsubregion",
6
-    method: "Get",
5
+    url: '/api/management/getallsubregion',
6
+    method: 'Get',
7 7
     params: params
8
-  });
8
+  })
9 9
 }
10 10
 
11 11
 export function SaveManageInfo(data) {
12
-  console.log("data是什么", data);
12
+  console.log('data是什么', data)
13 13
   return request({
14
-    url: "/api/management/savemanageinfo",
15
-    method: "Post",
14
+    url: '/api/management/savemanageinfo',
15
+    method: 'Post',
16 16
     data: data
17
-  });
17
+  })
18 18
 }
19 19
 
20 20
 export function getAllMachineInfo(
@@ -25,12 +25,12 @@ export function getAllMachineInfo(
25 25
   equipmentid,
26 26
   statusid
27 27
 ) {
28
-  console.log("page", page);
29
-  console.log("limit", limit);
30
-  console.log("zoneid", zoneid);
31
-  console.log("equipmentid", equipmentid);
32
-  console.log("statusid", statusid);
33
-  console.log("seacherkey", searchKey);
28
+  console.log('page', page)
29
+  console.log('limit', limit)
30
+  console.log('zoneid', zoneid)
31
+  console.log('equipmentid', equipmentid)
32
+  console.log('statusid', statusid)
33
+  console.log('seacherkey', searchKey)
34 34
   const params = {
35 35
     page: page,
36 36
     limit: limit,
@@ -38,158 +38,166 @@ export function getAllMachineInfo(
38 38
     zoneid: zoneid,
39 39
     equipmentid: equipmentid,
40 40
     statusid: statusid
41
-  };
41
+  }
42 42
   return request({
43
-    url: "/api/management/getallmachineinfo",
44
-    method: "Get",
43
+    url: '/api/management/getallmachineinfo',
44
+    method: 'Get',
45 45
     params: params
46
-  });
46
+  })
47 47
 }
48 48
 
49 49
 export function getAllMachine(zoneid, classid, deviceid) {
50
-  console.log("zoneid", zoneid);
51
-  console.log("classid", classid);
52
-  console.log("deviceid", deviceid);
50
+  console.log('zoneid', zoneid)
51
+  console.log('classid', classid)
52
+  console.log('deviceid', deviceid)
53 53
   const params = {
54 54
     zoneid: zoneid,
55 55
     classid: classid,
56 56
     deviceid: deviceid
57
-  };
57
+  }
58 58
   return request({
59
-    url: "/api/management/getallmachine",
60
-    method: "Get",
59
+    url: '/api/management/getallmachine',
60
+    method: 'Get',
61 61
     params: params
62
-  });
62
+  })
63 63
 }
64 64
 
65 65
 export function getMachineDetailById(id, params) {
66 66
   return request({
67
-    url: "/api/management/getmachinedetail?id=" + id,
68
-    method: "Get",
67
+    url: '/api/management/getmachinedetail?id=' + id,
68
+    method: 'Get',
69 69
     params: params
70
-  });
70
+  })
71 71
 }
72 72
 
73 73
 export function UpdateMachineInfo(data) {
74 74
   return request({
75
-    url: "/api/management/updatemachineinfo",
76
-    method: "Post",
75
+    url: '/api/management/updatemachineinfo',
76
+    method: 'Post',
77 77
     data: data
78
-  });
78
+  })
79 79
 }
80 80
 
81 81
 export function getAllEquimentName(params) {
82 82
   return request({
83
-    url: "/api/management/getallequimentname",
84
-    method: "Get",
83
+    url: '/api/management/getallequimentname',
84
+    method: 'Get',
85 85
     params: params
86
-  });
86
+  })
87 87
 }
88 88
 
89 89
 export function savePlan(data, id) {
90
-  console.log("data是什么", data);
91
-  console.log("id", id);
90
+  console.log('data是什么', data)
91
+  console.log('id', id)
92 92
   return request({
93
-    url: "/api/management/saveplan?id=" + id,
94
-    method: "Post",
93
+    url: '/api/management/saveplan?id=' + id,
94
+    method: 'Post',
95 95
     data: data
96
-  });
96
+  })
97 97
 }
98 98
 
99 99
 export function getAllPlan(params) {
100 100
   return request({
101
-    url: "/api/management/getallplan",
102
-    method: "Get",
101
+    url: '/api/management/getallplan',
102
+    method: 'Get',
103 103
     params: params
104
-  });
104
+  })
105 105
 }
106 106
 
107 107
 export function getAllPlanDetail(id, params) {
108 108
   return request({
109
-    url: "/api/management/getallplandetail?id=" + id,
110
-    method: "Get",
109
+    url: '/api/management/getallplandetail?id=' + id,
110
+    method: 'Get',
111 111
     params: params
112
-  });
112
+  })
113 113
 }
114 114
 
115 115
 export function getEditMachine(id, params) {
116 116
   return request({
117
-    url: "/api/management/geteditmachine?id=" + id,
118
-    method: "Get",
117
+    url: '/api/management/geteditmachine?id=' + id,
118
+    method: 'Get',
119 119
     params: params
120
-  });
120
+  })
121 121
 }
122 122
 
123 123
 export function DeletePlans(data) {
124 124
   return request({
125
-    url: "/api/staff/deleteplans",
126
-    method: "delete",
125
+    url: '/api/staff/deleteplans',
126
+    method: 'delete',
127 127
     data: data
128
-  });
128
+  })
129 129
 }
130 130
 
131 131
 export function EditPlanDetail(id, params) {
132 132
   return request({
133
-    url: "/api/manage/editplandetail?id=" + id,
134
-    method: "get",
133
+    url: '/api/manage/editplandetail?id=' + id,
134
+    method: 'get',
135 135
     params: params
136
-  });
136
+  })
137 137
 }
138 138
 
139 139
 export function UpdatePlanInfo(data) {
140 140
   return request({
141
-    url: "/api/manage/updateplaninfo",
142
-    method: "Post",
141
+    url: '/api/manage/updateplaninfo',
142
+    method: 'Post',
143 143
     data: data
144
-  });
144
+  })
145 145
 }
146 146
 
147 147
 export function getComprehensive(params) {
148 148
   return request({
149
-    url: "/api/manage/getcomprehensive",
150
-    method: "Get",
149
+    url: '/api/manage/getcomprehensive',
150
+    method: 'Get',
151 151
     params: params
152
-  });
152
+  })
153 153
 }
154 154
 
155 155
 export function SaveInformation(data) {
156 156
   return request({
157
-    url: "/api/manage/saveinformation",
158
-    method: "Post",
157
+    url: '/api/manage/saveinformation',
158
+    method: 'Post',
159 159
     data: data
160
-  });
160
+  })
161 161
 }
162 162
 
163 163
 export function getPatientInfo(id, params) {
164 164
   return request({
165
-    url: "/api/manage/getpatientinfo?id=" + id,
166
-    method: "Get",
165
+    url: '/api/manage/getpatientinfo?id=' + id,
166
+    method: 'Get',
167 167
     params: params
168
-  });
168
+  })
169 169
 }
170 170
 
171 171
 export function ChangeClass(equitid, id) {
172 172
   const params = {
173 173
     equitid: equitid,
174 174
     id: id
175
-  };
175
+  }
176 176
   return request({
177
-    url: "/api/manage/changeclass",
178
-    method: "Get",
177
+    url: '/api/manage/changeclass',
178
+    method: 'Get',
179 179
     params: params
180
-  });
180
+  })
181 181
 }
182 182
 
183 183
 export function changePatient(equitid, id) {
184
-  console.log("equitid", equitid);
185
-  console.log("id", id);
184
+  console.log('equitid', equitid)
185
+  console.log('id', id)
186 186
   const params = {
187 187
     equitid: equitid,
188 188
     id: id
189
-  };
189
+  }
190 190
   return request({
191
-    url: "/api/manage/changepatient",
192
-    method: "Get",
191
+    url: '/api/manage/changepatient',
192
+    method: 'Get',
193 193
     params: params
194
-  });
194
+  })
195
+}
196
+
197
+export function getAllOrganization(params) {
198
+  return request({
199
+    url: '/api/manage/getallorganization',
200
+    method: 'Get',
201
+    params: params
202
+  })
195 203
 }

+ 29 - 29
src/router/modules/device.js View File

@@ -1,59 +1,59 @@
1
-import Layout from '@/views/layout/Layout'
2
-import { S_IFMT } from 'constants'
1
+import Layout from "@/views/layout/Layout";
2
+import { S_IFMT } from "constants";
3 3
 
4 4
 export default {
5
-  path: '/device',
5
+  path: "/device",
6 6
   component: Layout,
7
-  redirect: '/device/main',
8
-  name: 'device',
7
+  redirect: "/device/main",
8
+  name: "device",
9 9
   alwaysShow: true,
10 10
   meta: {
11
-    title: 'deviceManage',
12
-    icon: 'shebei'
11
+    title: "deviceManage",
12
+    icon: "shebei"
13 13
   },
14 14
   children: [
15 15
     {
16
-      path: '/device/zones',
17
-      component: () => import('@/xt_pages/device/zone_main'),
18
-      name: 'deviceZoneManage',
16
+      path: "/device/zones",
17
+      component: () => import("@/xt_pages/device/zone_main"),
18
+      name: "deviceZoneManage",
19 19
       meta: {
20
-        title: 'deviceZoneManage'
20
+        title: "deviceZoneManage"
21 21
       }
22 22
     },
23 23
     {
24
-      path: '/device/groups',
25
-      component: () => import('@/xt_pages/device/group_main'),
26
-      name: 'deviceGroupManage',
24
+      path: "/device/groups",
25
+      component: () => import("@/xt_pages/device/group_main"),
26
+      name: "deviceGroupManage",
27 27
       meta: {
28
-        title: 'deviceGroupManage'
28
+        title: "deviceGroupManage"
29 29
       }
30 30
     },
31 31
     {
32
-      path: '/device/numbers',
33
-      component: () => import('@/xt_pages/device/number_main'),
34
-      name: 'deviceNumberManage',
32
+      path: "/device/numbers",
33
+      component: () => import("@/xt_pages/device/number_main"),
34
+      name: "deviceNumberManage",
35 35
       meta: {
36
-        title: 'deviceNumberManage'
36
+        title: "deviceNumberManage"
37 37
       }
38 38
     },
39 39
     {
40
-      path: '/device/main',
41
-      // component: () => import("@/xt_pages/management/index"),
42
-      component: () => import('@/xt_pages/device/main'),
43
-      name: 'dialysisMachineManage',
40
+      path: "/device/main",
41
+      component: () => import("@/xt_pages/management/index"),
42
+      // component: () => import('@/xt_pages/device/main'),
43
+      name: "dialysisMachineManage",
44 44
       meta: {
45
-        title: 'dialysisMachineManage'
45
+        title: "dialysisMachineManage"
46 46
       }
47 47
     },
48 48
     {
49
-      path: '/device/home',
50
-      component: () => import('@/xt_pages/management/home'),
51
-      name: 'managementHome',
49
+      path: "/device/home",
50
+      component: () => import("@/xt_pages/management/home"),
51
+      name: "managementHome",
52 52
       is_menu: false,
53 53
       hidden: true,
54 54
       meta: {
55
-        title: '设备管理详情页'
55
+        title: "设备管理详情页"
56 56
       }
57 57
     }
58 58
   ]
59
-}
59
+};

+ 299 - 235
src/xt_pages/home/index.vue View File

@@ -1,43 +1,51 @@
1 1
 <template>
2
-<div class="main-contain">
3
-  <!-- <div class="position">
2
+  <div class="main-contain">
3
+    <!-- <div class="position">
4 4
     <bread-crumb></bread-crumb>
5
-  </div> -->
6
-  <section class=" app-container app-main-bg">
7
-    <div class="home-page">
8
-      <div class="search clearfix">
9
-        <input type="text" class="search-input" placeholder="病人姓名/透析号" v-model="searchKey" >
10
-        <button class="search-button" @click="clickSearch">搜索</button>
11
-      </div>
12
-      <div class="ui-step clearfix">
13
-        <h2 class="ui-step-tit">病人透析治疗流程</h2>
14
-        <ul class="ui-step-ul">
15
-          <li v-for="(item, index) in steps" :key="index" class="ui-step-done">
16
-            <div class="ui-step-number"><i /></div>
17
-            <div class="ui-step-title">{{ item.title }}</div>
18
-          </li>
19
-        </ul>
20
-      </div>
21
-      <!-- <el-steps :active="5" align-center>
5
+    </div>-->
6
+    <section class="app-container app-main-bg">
7
+      <div class="home-page">
8
+        <div class="search clearfix">
9
+          <input type="text" class="search-input" placeholder="病人姓名/透析号" v-model="searchKey" />
10
+          <button class="search-button" @click="clickSearch">搜索</button>
11
+        </div>
12
+        <div class="ui-step clearfix">
13
+          <h2 class="ui-step-tit">病人透析治疗流程</h2>
14
+          <ul class="ui-step-ul">
15
+            <li v-for="(item, index) in steps" :key="index" class="ui-step-done">
16
+              <div class="ui-step-number">
17
+                <i />
18
+              </div>
19
+              <div class="ui-step-title">{{ item.title }}</div>
20
+            </li>
21
+          </ul>
22
+        </div>
23
+        <!-- <el-steps :active="5" align-center>
22 24
           <el-step  v-for="(item, index) in steps" :key="index" :title="item.title"></el-step>
23
-      </el-steps> -->
24
-      <div class="config-process">
25
-        <h2 class="title">系统使用配置流程</h2>
26
-        <ul class="process">
27
-          <router-link v-for="(item, index) in process" tag="li" class="items" :key="index" :to="item.link">
28
-              <img :src="item.imgUrl" >
25
+        </el-steps>-->
26
+        <div class="config-process">
27
+          <h2 class="title">系统使用配置流程</h2>
28
+          <ul class="process">
29
+            <router-link
30
+              v-for="(item, index) in process"
31
+              tag="li"
32
+              class="items"
33
+              :key="index"
34
+              :to="item.link"
35
+            >
36
+              <img :src="item.imgUrl" />
29 37
               <p class="name">{{ item.name }}</p>
30
-          </router-link>
31
-        </ul>
38
+            </router-link>
39
+          </ul>
40
+        </div>
32 41
       </div>
33
-    </div>
34
-    <div class="main-r">
42
+      <div class="main-r">
35 43
         <div class="res-widget">
36 44
           <ul>
37 45
             <li class="taocan-title clearfix">
38
-              <div class="taocan-h2 ">{{subscibeBan.used}}</div>
46
+              <div class="taocan-h2">{{subscibeBan.used}}</div>
39 47
               <div class="bar"></div>
40
-              <div class="taocan-h1 ">{{subscibeBan.name}}</div>
48
+              <div class="taocan-h1">{{subscibeBan.name}}</div>
41 49
             </li>
42 50
             <li class="taocan-item">
43 51
               <div class="ng-binding" :title="subscibeBan.desc">{{subscibeBan.desc}}</div>
@@ -56,18 +64,16 @@
56 64
                 <div class="taocan-use clearfix" :style="subscibeBan.pce"></div>
57 65
               </div>
58 66
                 <a class="btn clearfix" v-if="subscibeBan.pay_status" href="javascript:0" @click="openPay">立即购买</a>
59
-            </li> -->
67
+            </li>-->
60 68
           </ul>
61 69
         </div>
62 70
 
63 71
         <div class="res-widget" v-if="patientData.length > 0">
64
-
65 72
           <ul>
66 73
             <li class="taocan-title clearfix">
67 74
               <div class="bar"></div>
68
-              <div class="taocan-h1 ">传染病检查提醒通知</div>
75
+              <div class="taocan-h1">传染病检查提醒通知</div>
69 76
             </li>
70
-
71 77
           </ul>
72 78
           <el-table
73 79
             :data="patientData"
@@ -75,30 +81,25 @@
75 81
             highlight-current-row
76 82
             :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
77 83
           >
78
-
79 84
             <el-table-column label="姓名" align="center">
80
-              <template slot-scope="scope">
81
-                {{scope.row.name}}
82
-              </template>
85
+              <template slot-scope="scope">{{scope.row.name}}</template>
83 86
             </el-table-column>
84 87
 
85
-
86 88
             <el-table-column label="检查日期" align="center">
87 89
               <template slot-scope="scope">
88
-               <span v-if="dateCompare(scope.row.infectious_next_record_time) == 1">{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span>
89
-                <span v-if="dateCompare(scope.row.infectious_next_record_time) == 2" style="color: red">{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span>
90
-
90
+                <span
91
+                  v-if="dateCompare(scope.row.infectious_next_record_time) == 1"
92
+                >{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span>
93
+                <span
94
+                  v-if="dateCompare(scope.row.infectious_next_record_time) == 2"
95
+                  style="color: red"
96
+                >{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span>
91 97
               </template>
92 98
             </el-table-column>
93 99
 
94 100
             <el-table-column label="操作" align="center">
95 101
               <template slot-scope="scope">
96
-                  <el-button
97
-                    size="mini"
98
-                    type="primary"
99
-                    @click="jump(scope.row.id)"
100
-                  >查看
101
-                  </el-button>
102
+                <el-button size="mini" type="primary" @click="jump(scope.row.id)">查看</el-button>
102 103
               </template>
103 104
             </el-table-column>
104 105
           </el-table>
@@ -108,297 +109,353 @@
108 109
             :page-size="5"
109 110
             background
110 111
             style="margin-top:20px;float: right"
111
-            :total="total">
112
-          </el-pagination>
112
+            :total="total"
113
+          ></el-pagination>
113 114
         </div>
114 115
 
115
-     </div>
116
-
117
-
118
-  </section>
116
+        <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>
117
+
118
+        <el-dialog
119
+          title="病人姓名"
120
+          :visible.sync="dialogVisible"
121
+          width="30%"
122
+          :before-close="handleClose"
123
+        >
124
+          <div class="newLine">
125
+            <span>本次透析日期</span>
126
+            <span>123</span>
127
+          </div>
128
+          <div class="newLine">
129
+            <span>透前体重(kg)</span>
130
+            <span>123</span>
131
+          </div>
132
+          <div class="newLine">
133
+            <span>干体重(kg)</span>
134
+            <span>123</span>
135
+          </div>
136
+          <div class="newLine">
137
+            <span>衣物重(kg)</span>
138
+            <span>123</span>
139
+          </div>
140
+          <div class="newLine">
141
+            <span>体重增加(kg)</span>
142
+            <span>123</span>
143
+          </div>
144
+          <div class="newLine">
145
+            <span>透后体重(kg)</span>
146
+            <span>123</span>
147
+          </div>
148
+          <div class="newLine">
149
+            <span>体重减少(kg)</span>
150
+            <span>123</span>
151
+          </div>
152
+          <div class="newLine">
153
+            <span>上次透后体重(kg)</span>
154
+            <span>123</span>
155
+          </div>
156
+
157
+          <span slot="footer" class="dialog-footer">
158
+            <el-button @click="dialogVisible = false">取 消</el-button>
159
+            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
160
+          </span>
161
+        </el-dialog>
162
+      </div>
163
+    </section>
119 164
   </div>
120
-
121 165
 </template>
122 166
 <script>
123
-import { GetServerTime } from '@/api/public'
124
-import { GetPatientTotal,GetRemind } from '@/api/patient'
125
-import BreadCrumb from '@/xt_pages/components/bread-crumb'
167
+import { GetServerTime } from "@/api/public";
168
+import { GetPatientTotal, GetRemind } from "@/api/patient";
169
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
126 170
 export default {
127
-  name: 'Home',
171
+  name: "Home",
128 172
   components: {
129 173
     BreadCrumb
130 174
   },
131 175
   data() {
132 176
     return {
133
-      searchKey: '',
177
+      dialogVisible: false,
178
+
179
+      searchKey: "",
134 180
       patientTotal: 0,
135
-      patientData:[],
181
+      patientData: [],
136 182
       steps: [
137
-        { title: '透析处方' },
138
-        { title: '接诊评估' },
139
-        { title: '透前评估' },
140
-        { title: '临时医嘱' },
141
-        { title: '双人核对' },
142
-        { title: '透析上机' },
143
-        { title: '透析监测' },
144
-        { title: '透析下机' },
145
-        { title: '透后评估' },
146
-        { title: '治疗小结' }
183
+        { title: "透析处方" },
184
+        { title: "接诊评估" },
185
+        { title: "透前评估" },
186
+        { title: "临时医嘱" },
187
+        { title: "双人核对" },
188
+        { title: "透析上机" },
189
+        { title: "透析监测" },
190
+        { title: "透析下机" },
191
+        { title: "透后评估" },
192
+        { title: "治疗小结" }
147 193
       ],
148 194
       process: [
149 195
         {
150
-          imgUrl: require('../../assets/home/equipment.png'),
151
-          name: '设备管理',
152
-          link: '/device/main'
196
+          imgUrl: require("../../assets/home/equipment.png"),
197
+          name: "设备管理",
198
+          link: "/device/main"
153 199
         },
154 200
         {
155
-          imgUrl: require('../../assets/home/user.png'),
156
-          name: '病人管理',
157
-          link: '/patients/patients'
201
+          imgUrl: require("../../assets/home/user.png"),
202
+          name: "病人管理",
203
+          link: "/patients/patients"
158 204
         },
159 205
         // { imgUrl: require('../../assets/home/sick.png'), name: '登记病人', link: '/patients/create' },
160 206
         // { imgUrl: require('../../assets/home/prescription.png'), name: '透析处方', link: '/dialysis/paper' },
161 207
         {
162
-          imgUrl: require('../../assets/home/scheduling.png'),
163
-          name: '病人排班',
164
-          link: '/workforce/appointment'
208
+          imgUrl: require("../../assets/home/scheduling.png"),
209
+          name: "病人排班",
210
+          link: "/workforce/appointment"
165 211
         },
166 212
         {
167
-          imgUrl: require('../../assets/home/record.png'),
168
-          name: '透析记录',
169
-          link: '/dialysis/dialysisrecord'
213
+          imgUrl: require("../../assets/home/record.png"),
214
+          name: "透析记录",
215
+          link: "/dialysis/dialysisrecord"
170 216
         },
171 217
         {
172
-          imgUrl: require('../../assets/home/analyze.png'),
173
-          name: '透析监控',
174
-          link: '/dialysis/watch'
218
+          imgUrl: require("../../assets/home/analyze.png"),
219
+          name: "透析监控",
220
+          link: "/dialysis/watch"
175 221
         }
176 222
       ],
177 223
       subscibe: {},
178 224
       subscibeBan: {
179
-        used: '已使用0天',
180
-        name: '免费版本',
181
-        desc: '当前为免费版',
182
-        detail: '可管理100位(含)以下患者',
183
-        leave: '剩余0天',
225
+        used: "已使用0天",
226
+        name: "免费版本",
227
+        desc: "当前为免费版",
228
+        detail: "可管理100位(含)以下患者",
229
+        leave: "剩余0天",
184 230
         pay_status: false
185 231
       },
186 232
       serverTime: 0,
187 233
       leftTime: false,
188
-      total:0,
234
+      total: 0,
189 235
       page: 0,
190
-      limit:5,
191
-    }
236
+      limit: 5
237
+    };
192 238
   },
193 239
   methods: {
194
-    dateCompare(date){
195
-      var date1 =  Date.parse(new Date())/1000;
196
-      console.log(date)
197
-      console.log(date1)
198
-     if (date > date1){
199
-       return 1
200
-     }else{
201
-       return 2
202
-
203
-     }
204
-
205
-
240
+    dateCompare(date) {
241
+      var date1 = Date.parse(new Date()) / 1000;
242
+      console.log(date);
243
+      console.log(date1);
244
+      if (date > date1) {
245
+        return 1;
246
+      } else {
247
+        return 2;
248
+      }
206 249
     },
207
-    jump(id){
208
-      this.$router.push({ path: "patients/inspection?id="+id});
250
+    jump(id) {
251
+      this.$router.push({ path: "patients/inspection?id=" + id });
209 252
     },
210
-    handleSizeChange(val) {
211
-
212
-    }, handleCurrentChange(val) {
213
-      this.page = val
214
-      let params = {
215
-        page : this.page,
216
-        limit: 5,
217
-      }
218
-      this.GetRemindPatientList(params)
253
+    handleSizeChange(val) {},
254
+    handleCurrentChange(val) {
255
+      this.page = val;
256
+      const params = {
257
+        page: this.page,
258
+        limit: 5
259
+      };
260
+      this.GetRemindPatientList(params);
219 261
     },
220
-    GetRemindPatientList(params){
221
-      GetRemind(params).then(response => {
222
-        if (response.data.state == 1) {
223
-          this.patientData = response.data.data.patients
224
-          this.total = response.data.data.total
225
-        } else {
226
-          this.$message.error(response.data.msg)
227
-        }
228
-      }).catch(e => {
229
-      })
262
+    GetRemindPatientList(params) {
263
+      GetRemind(params)
264
+        .then(response => {
265
+          if (response.data.state == 1) {
266
+            this.patientData = response.data.data.patients;
267
+            this.total = response.data.data.total;
268
+          } else {
269
+            this.$message.error(response.data.msg);
270
+          }
271
+        })
272
+        .catch(e => {});
230 273
     },
231 274
     GetPatientTotal() {
232
-      GetPatientTotal().then(response => {
233
-        if (response.data.state == 1) {
234
-          this.patientTotal = response.data.data.total
235
-        } else {
236
-          this.$message.error(response.data.msg)
237
-        }
238
-      }).catch(e => {
239
-
240
-      })
275
+      GetPatientTotal()
276
+        .then(response => {
277
+          if (response.data.state == 1) {
278
+            this.patientTotal = response.data.data.total;
279
+          } else {
280
+            this.$message.error(response.data.msg);
281
+          }
282
+        })
283
+        .catch(e => {});
241 284
     },
242 285
     clickSearch() {
243 286
       if (this.searchKey.length > 0) {
244
-        this.$router.push('/patients/patients?keyword=' + this.searchKey)
287
+        this.$router.push("/patients/patients?keyword=" + this.searchKey);
245 288
       } else {
246
-        this.$router.push('/patients/patients')
289
+        this.$router.push("/patients/patients");
247 290
       }
248 291
     },
249 292
     openPay() {
250
-      this.$router.push('/service/buy')
293
+      this.$router.push("/service/buy");
251 294
     },
252 295
     GetServerTime() {
253
-      GetServerTime().then(response => {
254
-        if (response.data.state == 1) {
255
-          this.serverTime = response.data.data.timestamp
256
-        } else {
257
-          this.serverTime = Math.round(new Date().getTime() / 1000)
258
-        }
259
-      }).catch(() => {
260
-        this.serverTime = Math.round(new Date().getTime() / 1000)
261
-      })
296
+      GetServerTime()
297
+        .then(response => {
298
+          if (response.data.state == 1) {
299
+            this.serverTime = response.data.data.timestamp;
300
+          } else {
301
+            this.serverTime = Math.round(new Date().getTime() / 1000);
302
+          }
303
+        })
304
+        .catch(() => {
305
+          this.serverTime = Math.round(new Date().getTime() / 1000);
306
+        });
262 307
     },
263 308
     initSubscibe() {
264 309
       // state:1正版(标准),2试用(免费),3其他无效状态,8专业,9(永久免费),标准版和专业版会过期
265
-      var used = Math.ceil((this.serverTime - this.subscibe.period_start) / 86400)
310
+      var used = Math.ceil(
311
+        (this.serverTime - this.subscibe.period_start) / 86400
312
+      );
266 313
 
267
-      var leave = ''
268
-      var pce = ''
314
+      var leave = "";
315
+      var pce = "";
269 316
 
270
-      var leaveTime = 0
317
+      var leaveTime = 0;
271 318
 
272
-      this.subscibe.state = 2// 强制改为免费版
319
+      this.subscibe.state = 2; // 强制改为免费版
273 320
 
274 321
       switch (this.subscibe.state) {
275 322
         case 9:
276 323
           this.subscibeBan = {
277
-            used: '已使用' + used + '天',
278
-            name: '永久版',
279
-            desc: '当前为永久免费版本',
280
-            detail: '该版本不会过期,并可使用所有功能',
281
-            leave: '',
324
+            used: "已使用" + used + "天",
325
+            name: "永久版",
326
+            desc: "当前为永久免费版本",
327
+            detail: "该版本不会过期,并可使用所有功能",
328
+            leave: "",
282 329
             pay_status: false,
283
-            pce: 'width:100%'
284
-          }
285
-          break
330
+            pce: "width:100%"
331
+          };
332
+          break;
286 333
         case 2:
287 334
           // 免费版本不会过期,但有人数限制,免费版,可以管理20位(含)以下患者,当患者数过了20位,系统不能正常使用,达到18位时,要提醒购买,超过60位,要购买专业版
288
-          pce = 0
335
+          pce = 0;
289 336
           if (this.patientTotal > 200) {
290
-            leave = '管理患者数已达' + this.patientTotal + '位,请购买专业版'
291
-            pce = 100
337
+            leave = "管理患者数已达" + this.patientTotal + "位,请购买专业版";
338
+            pce = 100;
292 339
           } else if (this.patientTotal > 100) {
293
-            leave = '管理患者数已达' + this.patientTotal + '位,请购买标准版'
294
-            pce = 100
340
+            leave = "管理患者数已达" + this.patientTotal + "位,请购买标准版";
341
+            pce = 100;
295 342
           } else if (this.patientTotal >= 90) {
296
-            leave = '管理患者数已达' + this.patientTotal + '位,建议购买标准版'
297
-            pce = Math.round(this.patientTotal / 100 * 100)
343
+            leave = "管理患者数已达" + this.patientTotal + "位,建议购买标准版";
344
+            pce = Math.round((this.patientTotal / 100) * 100);
298 345
           }
299
-          pce = 'width:' + pce + '%'
346
+          pce = "width:" + pce + "%";
300 347
           this.subscibeBan = {
301
-            used: '已使用' + used + '天',
302
-            name: '免费版',
303
-            desc: '当前为免费版',
304
-            detail: '可管理100位(含)以下患者',
348
+            used: "已使用" + used + "天",
349
+            name: "免费版",
350
+            desc: "当前为免费版",
351
+            detail: "可管理100位(含)以下患者",
305 352
             leave: leave,
306 353
             pay_status: !!leave,
307 354
             pce: pce
308
-          }
309
-          break
355
+          };
356
+          break;
310 357
         case 8:
311
-          leaveTime = this.subscibe.period_end - this.serverTime
312
-          this.leftTime = leaveTime
358
+          leaveTime = this.subscibe.period_end - this.serverTime;
359
+          this.leftTime = leaveTime;
313 360
           if (leaveTime < 0) {
314
-            leave = '已经过期'
315
-            pce = '100'
361
+            leave = "已经过期";
362
+            pce = "100";
316 363
           } else {
317
-            leave = Math.floor(leaveTime / 86400)
318
-            leave = leave > 30 ? '' : '剩余' + leave + '天'
319
-            pce = 100 - Math.round(leaveTime / (this.subscibe.period_end - this.subscibe.period_start) * 100)
364
+            leave = Math.floor(leaveTime / 86400);
365
+            leave = leave > 30 ? "" : "剩余" + leave + "天";
366
+            pce =
367
+              100 -
368
+              Math.round(
369
+                (leaveTime /
370
+                  (this.subscibe.period_end - this.subscibe.period_start)) *
371
+                  100
372
+              );
320 373
           }
321
-          pce = 'width:' + pce + '%'
374
+          pce = "width:" + pce + "%";
322 375
 
323 376
           this.subscibeBan = {
324
-            used: '已使用' + used + '天',
325
-            name: '专业版',
326
-            desc: '当前为专业版',
327
-            detail: '不限患者',
377
+            used: "已使用" + used + "天",
378
+            name: "专业版",
379
+            desc: "当前为专业版",
380
+            detail: "不限患者",
328 381
             leave: leave,
329 382
             pay_status: !!leave,
330 383
             pce: pce
331
-          }
332
-          break
384
+          };
385
+          break;
333 386
         case 1:
334
-          leaveTime = this.subscibe.period_end - this.serverTime
335
-          this.leftTime = leaveTime
387
+          leaveTime = this.subscibe.period_end - this.serverTime;
388
+          this.leftTime = leaveTime;
336 389
           if (leaveTime < 0) {
337
-            leave = '已经过期'
338
-            pce = '100'
390
+            leave = "已经过期";
391
+            pce = "100";
339 392
           } else if (this.patientTotal > 200) {
340
-            leave = '管理患者数已达' + this.patientTotal + '位,请购买专业版'
341
-            pce = 'width:100%'
393
+            leave = "管理患者数已达" + this.patientTotal + "位,请购买专业版";
394
+            pce = "width:100%";
342 395
           } else if (this.patientTotal >= 190) {
343
-            leave = '管理患者数已达' + this.patientTotal + '位,建议购买专业版'
344
-            pce = Math.round(this.patientTotal / 200 * 100)
396
+            leave = "管理患者数已达" + this.patientTotal + "位,建议购买专业版";
397
+            pce = Math.round((this.patientTotal / 200) * 100);
345 398
           } else {
346
-            leave = Math.floor(leaveTime / 86400)
347
-            leave = leave > 30 ? '' : '剩余' + leave + '天,建议购买标准版'
348
-            pce = 100 - Math.round(leaveTime / (this.subscibe.period_end - this.subscibe.period_start) * 100)
399
+            leave = Math.floor(leaveTime / 86400);
400
+            leave = leave > 30 ? "" : "剩余" + leave + "天,建议购买标准版";
401
+            pce =
402
+              100 -
403
+              Math.round(
404
+                (leaveTime /
405
+                  (this.subscibe.period_end - this.subscibe.period_start)) *
406
+                  100
407
+              );
349 408
           }
350
-          pce = 'width:' + pce + '%'
409
+          pce = "width:" + pce + "%";
351 410
 
352 411
           this.subscibeBan = {
353
-            used: '已使用' + used + '天',
354
-            name: '标准版',
355
-            desc: '当前为标准版',
356
-            detail: '可管理200位(含)以下患者',
412
+            used: "已使用" + used + "天",
413
+            name: "标准版",
414
+            desc: "当前为标准版",
415
+            detail: "可管理200位(含)以下患者",
357 416
             leave: leave,
358 417
             pay_status: !!leave,
359 418
             pce: pce
360
-          }
361
-          break
419
+          };
420
+          break;
362 421
 
363 422
         default:
364 423
           this.subscibeBan = {
365
-            used: '',
366
-            name: '未订阅服务',
367
-            desc: '当前未订阅服务',
368
-            detail: '无法使用血透系统',
369
-            leave: '',
424
+            used: "",
425
+            name: "未订阅服务",
426
+            desc: "当前未订阅服务",
427
+            detail: "无法使用血透系统",
428
+            leave: "",
370 429
             pay_status: true,
371
-            pce: ''
372
-          }
373
-          break
430
+            pce: ""
431
+          };
432
+          break;
374 433
       }
375 434
     }
376
-
377 435
   },
378 436
   created() {
379
-    this.subscibe = this.$store.getters.xt_user.subscibe
380
-    this.GetPatientTotal()
381
-    this.GetServerTime()
382
-    let params = {
383
-      page : this.page+1,
384
-      limit: this.limit,
385
-    }
386
-    this.GetRemindPatientList(params)
437
+    this.subscibe = this.$store.getters.xt_user.subscibe;
438
+    this.GetPatientTotal();
439
+    this.GetServerTime();
440
+    const params = {
441
+      page: this.page + 1,
442
+      limit: this.limit
443
+    };
444
+    this.GetRemindPatientList(params);
387 445
   },
388 446
   watch: {
389 447
     serverTime: function() {
390 448
       if (this.serverTime > 0 && this.patientTotal > 0) {
391
-        this.initSubscibe()
449
+        this.initSubscibe();
392 450
       }
393 451
     },
394 452
     patientTotal: function() {
395 453
       if (this.serverTime > 0 && this.patientTotal > 0) {
396
-        this.initSubscibe()
454
+        this.initSubscibe();
397 455
       }
398 456
     }
399 457
   }
400
-
401
-}
458
+};
402 459
 </script>
403 460
 
404 461
 <style rel="stylesheet/scss" lang="scss" scoped>
@@ -410,7 +467,7 @@ export default {
410 467
   display: -ms-flexbox;
411 468
   display: flex;
412 469
   padding: 10px;
413
-  margin-top:15px;
470
+  margin-top: 15px;
414 471
   .home-page {
415 472
     font-family: "Microsoft Yahei";
416 473
     -webkit-box-flex: 1;
@@ -483,7 +540,8 @@ export default {
483 540
             left: 0;
484 541
             top: 21px;
485 542
             display: block;
486
-            content: " ";content: " ";
543
+            content: " ";
544
+            content: " ";
487 545
             width: 50%;
488 546
             height: 1px;
489 547
             background: #409eff;
@@ -566,7 +624,7 @@ export default {
566 624
           flex: 1;
567 625
           margin: 0 6px;
568 626
           background: #fff;
569
-          padding: 22px 0 ;
627
+          padding: 22px 0;
570 628
           cursor: pointer;
571 629
           .name {
572 630
             font-size: 14px;
@@ -581,15 +639,14 @@ export default {
581 639
     min-width: 290px;
582 640
     margin: 0 0 0 10px;
583 641
     .res-widget {
584
-
585 642
       min-height: 80px;
586 643
       background: #fff;
587 644
       padding: 10px 20px;
588 645
       margin-bottom: 15px;
589 646
       border-radius: 2px;
590 647
       // box-shadow: 0 0 4px 0 rgba(200, 200, 200, 0.5);
591
-          -webkit-box-shadow: 0 4px 12px rgba(135, 135, 135, 0.15);
592
-    box-shadow: 0 4px 12px rgba(135, 135, 135, 0.15);
648
+      -webkit-box-shadow: 0 4px 12px rgba(135, 135, 135, 0.15);
649
+      box-shadow: 0 4px 12px rgba(135, 135, 135, 0.15);
593 650
       background-color: #fff;
594 651
       color: #34495e;
595 652
       font-size: 12px;
@@ -759,4 +816,11 @@ export default {
759 816
     width: 16.66666667%;
760 817
   }
761 818
 }
819
+.newLine {
820
+  display: flex;
821
+  justify-content: space-between;
822
+  height: 40px;
823
+  line-height: 40px;
824
+  border-bottom: 1px solid #ccc;
825
+}
762 826
 </style>

+ 408 - 286
src/xt_pages/management/home.vue View File

@@ -552,7 +552,7 @@
552 552
                                     <el-form-item label="透析方式:">
553 553
                                        <el-select v-model="userform.dialysis_mode" placeholder="请选择" class="a">
554 554
                                            <el-option
555
-                                            v-for="item in treatmentmodes"
555
+                                            v-for="item in treatmode"
556 556
                                            :key="item.id"
557 557
                                            :label="item.name"
558 558
                                            :value="item.id">
@@ -562,28 +562,26 @@
562 562
                                   </el-col>
563 563
                                   <el-col :span="8">
564 564
                                       <el-form-item label="上机时间:">
565
-                                         <el-date-picker
566
-                                           v-model="userform.start_time"
567
-                                           prefix-icon="none"
568
-                                           type="date"
569
-                                           placeholder="请选择"
570
-                                           format="yyyy-MM-dd"
571
-                                           value-format="yyyy-MM-dd"
572
-                                           style="width:150px">
573
-                                          </el-date-picker> 
565
+                                          <el-date-picker
566
+                                              type="datetime"
567
+                                              format="yyyy-MM-dd HH:mm"
568
+                                              value-format="yyyy-MM-dd HH:mm"
569
+                                               placeholder="选择时间"
570
+                                               v-model="userform.start_time"
571
+                                               style="width:200px;"
572
+                                          ></el-date-picker>
574 573
                                       </el-form-item>
575 574
                                   </el-col>
576 575
                                    <el-col :span="8">
577 576
                                       <el-form-item label="下机时间:">
578 577
                                          <el-date-picker
579
-                                           v-model="userform.end_time"
580
-                                           prefix-icon="none"
581
-                                           type="date"
582
-                                           placeholder="请选择"
583
-                                           format="yyyy-MM-dd"
584
-                                           value-format="yyyy-MM-dd"
585
-                                           style="width:150px">
586
-                                          </el-date-picker> 
578
+                                              type="datetime"
579
+                                              format="yyyy-MM-dd HH:mm"
580
+                                              value-format="yyyy-MM-dd HH:mm"
581
+                                               placeholder="选择时间"
582
+                                               v-model="userform.end_time"
583
+                                               style="width:200px;"
584
+                                          ></el-date-picker>
587 585
                                       </el-form-item>
588 586
                                   </el-col>
589 587
                                 </el-row>
@@ -600,7 +598,7 @@
600 598
                                   </el-col>
601 599
                                   <el-col :span="8">
602 600
                                      <el-form-item label="体重减少:">
603
-                                          <el-input style="width:180px" v-model="userform.weight_loss"></el-input>
601
+                                          <el-input style="width:180px" v-model="userform.weight_loss"></el-input> 
604 602
                                      </el-form-item>
605 603
                                   </el-col>
606 604
                                 </el-row>
@@ -618,7 +616,7 @@
618 616
                                   <el-col :span="8">
619 617
                                         <el-form-item label="运行:">
620 618
                                           <el-radio-group v-model="userform.run">
621
-                                             <el-radio v-for="item in runOption"  :label="item.label" :value="item.value" :key="item.value">{{item.label}}</el-radio>
619
+                                             <el-radio v-for="item in runOption"  :label="item.name" :value="item.id" :key="item.id">{{item.name}}</el-radio>
622 620
                                           </el-radio-group>
623 621
                                         </el-form-item> 
624 622
                                   </el-col>
@@ -710,7 +708,7 @@
710 708
                                        <el-form-item label="消毒方式:">
711 709
                                          <el-select v-model="userform.fluid_path" placeholder="请选择" >
712 710
                                            <el-option
713
-                                            v-for="item in disinfectType"
711
+                                            v-for="item in sterilizeType"
714 712
                                            :key="item.id"
715 713
                                            :label="item.name"
716 714
                                            :value="item.id"
@@ -723,7 +721,7 @@
723 721
                                        <el-form-item label="消毒液:">
724 722
                                         <el-select v-model="userform.disinfectant" placeholder="请选择" >
725 723
                                            <el-option
726
-                                            v-for="item in disinfectantType"
724
+                                            v-for="item in fluidPathType"
727 725
                                            :key="item.id"
728 726
                                            :label="item.name"
729 727
                                            :value="item.id"
@@ -750,7 +748,7 @@
750 748
                                   <el-col :span="8">
751 749
                                       <el-form-item label="消毒液残留:">
752 750
                                         <el-radio-group v-model="userform.disinfection_residue">
753
-                                           <el-radio v-for="item in Disinfectant"  :label="item.label" :value="item.value" :key="item.value">{{item.label}}</el-radio>
751
+                                           <el-radio v-for="item in Disinfectant"  :label="item.name" :value="item.id" :key="item.id">{{item.name}}</el-radio>
754 752
                                         </el-radio-group>
755 753
                                       </el-form-item>  
756 754
                                   </el-col>
@@ -763,38 +761,52 @@
763 761
                                     </el-col>
764 762
                                     <el-col :span="8">
765 763
                                        <el-form-item label="开始消毒时间:">
766
-                                         <el-date-picker
767
-                                             size="small"
768
-                                            clearable
769
-                                            v-model="userform.starttime"
770
-                                            prefix-icon="el-icon-date"
771
-                                            :editable="false"
772
-                                             style="width: 150px;"
773
-                                             type="date"
774
-                                             placeholder="选择日期时间"
775
-                                             align="right"
776
-                                              format="yyyy-MM-dd"
777
-                                              value-format="yyyy-MM-dd"
778
-                                             >
779
-                                           </el-date-picker>
764
+                                          <el-date-picker
765
+                                              type="datetime"
766
+                                              format="yyyy-MM-dd HH:mm"
767
+                                              value-format="yyyy-MM-dd HH:mm"
768
+                                               placeholder="选择时间"
769
+                                               v-model="userform.starttime"
770
+                                               style="width:200px;"
771
+                                                @change="changStartTime"
772
+                                          ></el-date-picker>                                   
773
+                                            <!-- <el-time-picker
774
+                                             v-model="userform.starttime"
775
+                                            :picker-options="{
776
+                                               selectableRange: '00:01:00 - 23:59:00'
777
+                                             }"
778
+                                             placeholder="请选择"
779
+                                             style="width:150px;"
780
+                                              value-format="H:m"
781
+                                              format="H:m"
782
+                                              @change="changStartTime"
783
+                                               >
784
+                                            </el-time-picker> -->
780 785
                                        </el-form-item>
781 786
                                     </el-col>
782 787
                                     <el-col :span="8">
783
-                                       <el-form-item label="结束消毒时间:">
784
-                                         <el-date-picker
785
-                                             size="small"
786
-                                            clearable
787
-                                            v-model="userform.endtime"
788
-                                            prefix-icon="el-icon-date"
789
-                                            :editable="false"
790
-                                             style="width: 150px;"
791
-                                             type="date"
792
-                                             placeholder="选择日期时间"
793
-                                             align="right"
794
-                                              format="yyyy-MM-dd"
795
-                                              value-format="yyyy-MM-dd"
796
-                                             >
797
-                                           </el-date-picker>
788
+                                       <el-form-item label="结束消毒时间:">                                  
789
+                                            <!-- <el-time-picker
790
+                                             v-model="userform.endtime"
791
+                                            :picker-options="{
792
+                                               selectableRange: '00:01:00 - 23:59:00'
793
+                                             }"
794
+                                             placeholder="请选择"
795
+                                             style="width:150px;"
796
+                                              value-format="H:m"
797
+                                              format="H:m"
798
+                                              @change="changeEndTime"
799
+                                               >
800
+                                            </el-time-picker>-->
801
+                                            <el-date-picker
802
+                                              type="datetime"
803
+                                              format="yyyy-MM-dd HH:mm"
804
+                                              value-format="yyyy-MM-dd HH:mm"
805
+                                               placeholder="选择时间"
806
+                                               v-model="userform.endtime"
807
+                                               style="width:200px;"
808
+                                                @change="changeEndTime"
809
+                                          ></el-date-picker>              
798 810
                                        </el-form-item>
799 811
                                     </el-col>
800 812
                                 </el-row>
@@ -828,7 +840,7 @@
828 840
                                    <el-col>
829 841
                                       <el-form-item label="浓度:">
830 842
                                           <el-radio-group v-model="userform.dialysis_concentration">
831
-                                           <el-radio v-for="item in potency"  :label="item.label" :value="item.value" :key="item.value">{{item.label}}</el-radio>
843
+                                           <el-radio v-for="item in potency"  :label="item.name" :value="item.id" :key="item.id">{{item.name}}</el-radio>
832 844
                                         </el-radio-group>
833 845
                                         <span style="color:red">您已一个月未更换,请注意检测</span>
834 846
                                       </el-form-item>
@@ -1039,7 +1051,7 @@
1039 1051
 
1040 1052
 <script>
1041 1053
   import BreadCrumb from '../components/bread-crumb'
1042
-  import { getAllSubregion, getAllMachine, getMachineDetailById, UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,getAllEquimentName,EditPlanDetail,UpdatePlanInfo,SaveInformation,getPatientInfo,ChangeClass,changePatient } from '@/api/manage'
1054
+  import { getAllSubregion, getAllMachine, getMachineDetailById, UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans, getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo, ChangeClass, changePatient, getAllOrganization } from '@/api/manage'
1043 1055
   import { uParseTime } from '@/utils/tools'
1044 1056
   import PlanForm from './components/PlanForm'
1045 1057
   import EditMachineForm from './components/EditMachineForm'
@@ -1122,17 +1134,17 @@ export default {
1122 1134
           { id: 2, name: '下午' },
1123 1135
           { id: 3, name: '晚上' }
1124 1136
         ],
1125
-        names:[
1126
-          {id:1,name:"20%柠檬酸"},
1127
-          {id:2,name:"50%柠檬酸"},
1128
-          {id:3,name:"次氯酸钠"}
1137
+        names: [
1138
+          { id: 1, name: '20%柠檬酸' },
1139
+          { id: 2, name: '50%柠檬酸' },
1140
+          { id: 3, name: '次氯酸钠' }
1141
+        ],
1142
+        germs: [
1143
+          { id: 1, name: '费森细菌过滤器' },
1144
+          { id: 2, name: '日机装细菌过滤器' },
1145
+          { id: 3, name: '贝朗机细菌过滤器' },
1146
+          { id: 4, name: '东丽机细菌过滤器' }
1129 1147
         ],
1130
-       germs:[
1131
-         {id:1,name:"费森细菌过滤器"},
1132
-         {id:2,name:"日机装细菌过滤器"},
1133
-         {id:3,name:"贝朗机细菌过滤器"},
1134
-         {id:4,name:"东丽机细菌过滤器"}
1135
-       ],
1136 1148
         forms: {
1137 1149
           zone_id: '', // 分区号
1138 1150
           class_id: '', // 班次
@@ -1151,9 +1163,9 @@ export default {
1151 1163
           devicetype: [{ required: true, message: '请填写设备类型' }],
1152 1164
           unit_type: [{ required: true, message: '请填写设备型号' }]
1153 1165
         },
1154
-        runOption:[
1155
-          {value:'1',label:'正常'},
1156
-          {value:'2',label:'故障'}
1166
+        runOption: [
1167
+          { id: 1, name: '正常' },
1168
+          { id: 2, name: '故障' }
1157 1169
         ],
1158 1170
         runOptions: [
1159 1171
           { value: '1', label: '达标' },
@@ -1166,23 +1178,23 @@ export default {
1166 1178
           { value: '4', label: '治疗' },
1167 1179
           { value: '5', label: '消毒' }
1168 1180
         ],
1169
-        Disinfectant:[
1170
-          { value:'1',label:'有'},
1171
-          { value:'2',label:'无'}
1181
+        Disinfectant: [
1182
+          { id: 1, name: '有' },
1183
+          { id: 2, name: '无' }
1172 1184
         ],
1173
-         potency:[
1174
-          {value:'1',label:'达标'},
1175
-          {value:"2",label:'未达标'}
1185
+        potency: [
1186
+          { id: 1, name: '达标' },
1187
+          { id: 2, name: '未达标' }
1176 1188
         ],
1177 1189
         equimentid: 0,
1178 1190
         checkAllStatus: false,
1179
-        checkAllStatusOne:false,
1191
+        checkAllStatusOne: false,
1180 1192
         selectMachines: [],
1181
-        selectMachinesOne:[],
1193
+        selectMachinesOne: [],
1182 1194
         machineIndex: -1,
1183 1195
         planid: 0,
1184 1196
         machineform: {
1185
-          id:'',
1197
+          id: '',
1186 1198
           device_type: '',
1187 1199
           disinfec_time: '',
1188 1200
           time: '',
@@ -1194,117 +1206,138 @@ export default {
1194 1206
         },
1195 1207
         dialogVisible: false,
1196 1208
         timeType: [
1197
-        { id: 1, name: "周一" },
1198
-        { id: 2, name: "周二" },
1199
-        { id: 3, name: "周三" },
1200
-        { id: 4, name: "周四" },
1201
-        { id: 5, name: "周五" },
1202
-        { id: 6, name: "周六" },
1203
-        { id: 7, name: "周日" }
1204
-      ],
1205
-      classType: [
1206
-        { id: 1, name: "上午" },
1207
-        { id: 2, name: "下午" },
1208
-        { id: 3, name: "晚上" }
1209
-      ],
1210
-      // 基表消毒方式
1211
-      disinfectType: [{ id: 1, name: "擦拭" }, { id: 2, name: "化学消毒" }],
1212
-      // 基表消毒液
1213
-      disinfectantType: [
1214
-        { id: 1, name: "0.22%季铵盐" },
1215
-        { id: 2, name: "500mg/l含氯消毒剂" },
1216
-        { id: 3, name: "1000mg/l含氯消毒剂" },
1217
-        { id: 4, name: "1500mg/l含氯消毒剂" }
1218
-      ],
1219
-      // 夜路消毒方式
1220
-      sterilizeType: [
1221
-        { id: 1, name: "热化学消毒" },
1222
-        { id: 2, name: "化学消毒 + 除钙" },
1223
-        { id: 3, name: "热化学消毒 + 除钙" },
1224
-        { id: 4, name: "热消毒" },
1225
-        { id: 5, name: "化学消毒" },
1226
-        { id: 6, name: "除钙" },
1227
-        { id: 7, name: "清洗" }
1228
-      ],
1229
-      // 夜路消毒液
1230
-      fluidPathType: [
1231
-        { id: 1, name: "20%柠檬酸" },
1232
-        { id: 2, name: "25%柠檬酸" },
1233
-        { id: 3, name: "50%柠檬酸" },
1234
-        { id: 4, name: "50%柠檬酸 + 5%次氯酸钠" },
1235
-        { id: 5, name: "20%柠檬酸 + 10%冰醋酸" },
1236
-        { id: 6, name: "0.2%过氧化乙酸" },
1237
-        { id: 7, name: "10%冰醋酸" },
1238
-        { id: 8, name: "50%冰醋酸" },
1239
-        { id: 9, name: "5%次氯酸钠" }
1240
-       ],
1241
-
1242
-       userform:{
1243
-         date:moment(new Date()).format('YYYY-MM-DD'), //日期
1244
-         classtype:"", //班次
1245
-         zone:"",//分区
1246
-         bed_number:"",//床位号
1247
-         patient_name:"",//患者
1248
-         contagion:"",//传染病
1249
-        dialysis_mode:"",//透析方式
1250
-        start_time:"",//上机时间
1251
-        end_time:"",//下机时间
1252
-        dialysis_time:"",//透析时长
1253
-        hyperfiltratio:"",// 实际超滤量
1254
-        weight_loss:"",//体重减少
1255
-        warning_value:"",//预警值
1256
-        user_total:"",//使用次数
1257
-        run:"",//运行
1258
-        failure_stage:"",//故事发生阶段
1259
-        fault_description:"",//故障描述
1260
-        code_information:"",//故障提示及代码
1261
-
1262
-        //机器消毒
1263
-        disinfect_type:"",//消毒方式
1264
-        disinfectant_type:"",//消毒液  
1265
-        disinfection:"",//消毒状态
1266
-        machine_run:"",//运行
1267
-      
1268
-      //液路
1269
-       fluid_path:"",//消毒方式
1270
-        disinfectant:"",//消毒液
1271
-         disinfection_status:"",//消毒状态
1272
-        disinfection_residue:"",//消毒液残留
1273
-        longtime:"",//消毒时长
1274
-        starttime:"",//开始消毒时间
1275
-        endtime:"",//结束消毒时间
1276
-        dialysis_checked:"",//更换 
1277
-         dialysis_name:"",//名称
1278
-         norms:"",//规格
1279
-        dialysis_concentration:"",//浓度
1280
-        germ_checked:"",//更换
1281
-        germ_name:"",//名称
1282
-        germ_number:"",//数量
1283
-        clean:"",//清洁
1284
-        sign_name:"",//签名
1285
-       },
1286
-       treatmentmodes:[
1287
-         {id:1,name:"HD"},
1288
-         {id:2,name:"HDF"},
1289
-         {id:3,name:"HD+HP"},
1290
-         {id:4,name:"HP"},
1291
-         {id:5,name:"HF"},
1292
-         {id:6,name:"SCUF"},
1293
-         {id:7,name:"IUF"},
1294
-         {id:8,name:"HFHD+HP"},
1295
-         {id:9,name:"HFR"},
1296
-         {id:10,name:"HDF+HP"},
1297
-         {id:11,name:"GRRT"},
1298
-         {id:12,name:"腹水回收"}
1299
-       ],
1300
-       disinfection:[
1301
-         {id:1,name:"已消毒"},
1302
-         {id:2,name:"未消毒"},
1303
-         {id:3,name:"消毒未完成"}
1304
-       ],
1305
-       patientName:[],
1306
-      }
1209
+          { id: 1, name: '周一' },
1210
+          { id: 2, name: '周二' },
1211
+          { id: 3, name: '周三' },
1212
+          { id: 4, name: '周四' },
1213
+          { id: 5, name: '周五' },
1214
+          { id: 6, name: '周六' },
1215
+          { id: 7, name: '周日' }
1216
+        ],
1217
+        classType: [
1218
+          { id: 1, name: '上午' },
1219
+          { id: 2, name: '下午' },
1220
+          { id: 3, name: '晚上' }
1221
+        ],
1222
+        // 基表消毒方式
1223
+        disinfectType: [{ id: 1, name: '擦拭' }, { id: 2, name: '化学消毒' }],
1224
+        // 基表消毒液
1225
+        disinfectantType: [
1226
+          { id: 1, name: '0.22%季铵盐' },
1227
+          { id: 2, name: '500mg/l含氯消毒剂' },
1228
+          { id: 3, name: '1000mg/l含氯消毒剂' },
1229
+          { id: 4, name: '1500mg/l含氯消毒剂' }
1230
+        ],
1231
+        // 夜路消毒方式
1232
+        sterilizeType: [
1233
+          { id: 1, name: '热化学消毒' },
1234
+          { id: 2, name: '化学消毒 + 除钙' },
1235
+          { id: 3, name: '热化学消毒 + 除钙' },
1236
+          { id: 4, name: '热消毒' },
1237
+          { id: 5, name: '化学消毒' },
1238
+          { id: 6, name: '除钙' },
1239
+          { id: 7, name: '清洗' }
1240
+        ],
1241
+        // 夜路消毒液
1242
+        fluidPathType: [
1243
+          { id: 1, name: '20%柠檬酸' },
1244
+          { id: 2, name: '25%柠檬酸' },
1245
+          { id: 3, name: '50%柠檬酸' },
1246
+          { id: 4, name: '50%柠檬酸 + 5%次氯酸钠' },
1247
+          { id: 5, name: '20%柠檬酸 + 10%冰醋酸' },
1248
+          { id: 6, name: '0.2%过氧化乙酸' },
1249
+          { id: 7, name: '10%冰醋酸' },
1250
+          { id: 8, name: '50%冰醋酸' },
1251
+          { id: 9, name: '5%次氯酸钠' }
1252
+        ],
1307 1253
 
1254
+        userform: {
1255
+          date: moment(new Date()).format('YYYY-MM-DD'), // 日期
1256
+          classtype: '', // 班次
1257
+          zone: '', // 分区
1258
+          bed_number: '', // 床位号
1259
+          patient_name: '', // 患者
1260
+          contagion: '', // 传染病
1261
+          dialysis_mode: '', // 透析方式
1262
+          start_time: '', // 上机时间
1263
+          end_time: '', // 下机时间
1264
+          dialysis_time: '', // 透析时长
1265
+          hyperfiltratio: '', // 实际超滤量
1266
+          weight_loss: '', // 体重减少
1267
+          warning_value: '', // 预警值
1268
+          user_total: '', // 使用次数
1269
+          run: '正常', // 运行
1270
+          failure_stage: '', // 故事发生阶段
1271
+          fault_description: '', // 故障描述
1272
+          code_information: '', // 故障提示及代码
1273
+
1274
+          // 机器消毒
1275
+          disinfect_type: 1, // 消毒方式
1276
+          disinfectant_type: 2, // 消毒液
1277
+          disinfection: 1, // 消毒状态
1278
+          machine_run: '达标', // 运行
1279
+  
1280
+          // 液路
1281
+          fluid_path: 3, // 消毒方式
1282
+          disinfectant: 3, // 消毒液
1283
+          disinfection_status: 1, // 消毒状态
1284
+          disinfection_residue: '无', // 消毒液残留
1285
+          longtime: '', // 消毒时长
1286
+          starttime: '', // 开始消毒时间
1287
+          endtime: '', // 结束消毒时间
1288
+          dialysis_checked: '', // 更换
1289
+          dialysis_name: '', // 名称
1290
+          norms: '', // 规格
1291
+          dialysis_concentration: '达标', // 浓度
1292
+          germ_checked: '', // 更换
1293
+          germ_name: '', // 名称
1294
+          germ_number: '', // 数量
1295
+          clean: '', // 清洁
1296
+          sign_name: ''// 签名
1297
+        },
1298
+        treatmentmodes: [
1299
+          { id: 1, name: 'HD' },
1300
+          { id: 2, name: 'HDF' },
1301
+          { id: 3, name: 'HD+HP' },
1302
+          { id: 4, name: 'HP' },
1303
+          { id: 5, name: 'HF' },
1304
+          { id: 6, name: 'SCUF' },
1305
+          { id: 7, name: 'IUF' },
1306
+          { id: 8, name: 'HFHD+HP' },
1307
+          { id: 9, name: 'HFR' },
1308
+          { id: 10, name: 'HDF+HP' },
1309
+          { id: 11, name: 'GRRT' },
1310
+          { id: 12, name: '腹水回收' }
1311
+        ],
1312
+        treatmode: [
1313
+          { id: 1, name: 'HD' },
1314
+          { id: 2, name: 'HDF' },
1315
+          { id: 3, name: 'HD + HP' },
1316
+          { id: 4, name: 'HP' },
1317
+          { id: 5, name: 'HF' },
1318
+          { id: 6, name: 'SCUF' },
1319
+          { id: 7, name: 'IUF' },
1320
+          { id: 8, name: 'HFHD' },
1321
+          { id: 9, name: 'HFHD+HP' },
1322
+          { id: 10, name: 'PHF' },
1323
+          { id: 11, name: 'HFR' },
1324
+          { id: 12, name: 'HDF+HP' },
1325
+          { id: 13, name: 'CRRT' },
1326
+          { id: 14, name: '腹水回输' },
1327
+          { id: 15, name: 'HD前置换' },
1328
+          { id: 16, name: 'HD后置换' },
1329
+          { id: 17, name: 'HDF前置换' },
1330
+          { id: 18, name: 'HDF后置换' }
1331
+        ],
1332
+        disinfection: [
1333
+          { id: 1, name: '已消毒' },
1334
+          { id: 2, name: '未消毒' },
1335
+          { id: 3, name: '消毒未完成' }
1336
+        ],
1337
+        patientName: [],
1338
+        start: '',
1339
+        end: ''
1340
+      }
1308 1341
     },
1309 1342
     methods: {
1310 1343
       handleClick(tab, event) {
@@ -1356,7 +1389,6 @@ export default {
1356 1389
             this.tableDatatwo = addmahcer
1357 1390
             var index = this.$route.query.index
1358 1391
             this.$refs.singleTable.setCurrentRow(this.tableDatatwo[index])
1359
-            
1360 1392
           }
1361 1393
         })
1362 1394
       },
@@ -1514,7 +1546,6 @@ export default {
1514 1546
             if (response.data.state === 1) {
1515 1547
               var addmacher = response.data.data.addmacher
1516 1548
               console.log('addmacher', addmacher)
1517
-
1518 1549
             }
1519 1550
           })
1520 1551
         })
@@ -1528,8 +1559,8 @@ export default {
1528 1559
           this.$refs.multipleTableOne.toggleAllSelection()
1529 1560
         }
1530 1561
       },
1531
-     handleSelectionChange(val){
1532
-         this.selectMachinesOne = val
1562
+      handleSelectionChange(val) {
1563
+        this.selectMachinesOne = val
1533 1564
       },
1534 1565
       changeCheckOne() {
1535 1566
         this.$refs.multipleTable.clearSelection()
@@ -1779,65 +1810,64 @@ export default {
1779 1810
       },
1780 1811
       EditMachine(id, index) {
1781 1812
         this.dialogVisible = true
1782
-        EditPlanDetail(id).then(response=>{
1783
-          if(response.data.state === 1 ){
1784
-             var plan = response.data.data.plan
1785
-             console.log("plan是什么东西", plan);
1786
-             this.machineform.id = plan.id
1787
-             this.machineform.device_type = plan.device_type
1788
-             this.machineform.disinfec_time = plan.disinfec_time
1789
-             this.machineform.time = plan.time
1790
-             this.machineform.class_time = plan.classtime
1791
-             this.machineform.way = plan.way
1792
-             this.machineform.machine_disinfectant = plan.machine_disinfectant
1793
-             this.machineform.disinfectant_way = plan.disinfectan_way
1794
-             this.machineform.disinfectant = plan.disinfectant
1813
+        EditPlanDetail(id).then(response => {
1814
+          if (response.data.state === 1) {
1815
+            var plan = response.data.data.plan
1816
+            console.log('plan是什么东西', plan)
1817
+            this.machineform.id = plan.id
1818
+            this.machineform.device_type = plan.device_type
1819
+            this.machineform.disinfec_time = plan.disinfec_time
1820
+            this.machineform.time = plan.time
1821
+            this.machineform.class_time = plan.classtime
1822
+            this.machineform.way = plan.way
1823
+            this.machineform.machine_disinfectant = plan.machine_disinfectant
1824
+            this.machineform.disinfectant_way = plan.disinfectan_way
1825
+            this.machineform.disinfectant = plan.disinfectant
1795 1826
           }
1796 1827
         })
1797 1828
       },
1798
-      UpdatePlanInfo(formName){
1799
-
1800
-          var devicetype = this.machineform.device_type;
1801
-          var devicetypes = parseInt(devicetype);
1802
-          this.machineform.device_type = devicetypes;
1803
-
1804
-            var disinfectimes = this.machineform.disinfec_time
1805
-           var disinfectime =   parseInt(disinfectimes)
1806
-          this.machineform.disinfec_time = disinfectime
1807
-          
1808
-         var times =  this.machineform.time
1809
-          var time = parseInt(times)
1810
-          this.machineform.time = time
1811
-
1812
-          var classtimes =  this.machineform.class_time
1813
-          var classtime =  parseInt(classtimes)
1814
-          this.machineform.class_time = classtime
1815
-
1816
-          var ways = this.machineform.way;
1817
-          var way = parseInt(ways);
1818
-          this.machineform.way = way;
1819
-
1820
-          var machinedisinfectant = this.machineform.machine_disinfectant;
1821
-          var machinedisinfectants = parseInt(machinedisinfectant);
1822
-          this.machineform.machine_disinfectant = machinedisinfectants;
1823
-
1824
-          var disinfectantways = this.machineform.disinfectant_way;
1825
-          var disinfectantway = parseInt(disinfectantways);
1826
-          this.machineform.disinfectant_way = disinfectantway;
1827
-
1828
-          var disinfectants = this.machineform.disinfectant;
1829
-          var disinfectant = parseInt(disinfectants);
1830
-          this.machineform.disinfectant = disinfectant;
1831
-         UpdatePlanInfo(this.machineform).then(response=>{
1832
-             if(response.data.state == 1){
1833
-                var plan =  response.data.data.plan
1834
-                this.dialogVisible = false
1835
-                this.$message.success("修改成功")
1836
-                console.log("this",this.equimentid)
1837
-               this.getAllPlanDetail(this.equimentid)
1838
-               this.getAllPlan()
1839
-             }
1840
-         })
1829
+      UpdatePlanInfo(formName) {
1830
+        var devicetype = this.machineform.device_type
1831
+        var devicetypes = parseInt(devicetype)
1832
+        this.machineform.device_type = devicetypes
1833
+
1834
+        var disinfectimes = this.machineform.disinfec_time
1835
+        var disinfectime = parseInt(disinfectimes)
1836
+        this.machineform.disinfec_time = disinfectime
1837
+  
1838
+        var times = this.machineform.time
1839
+        var time = parseInt(times)
1840
+        this.machineform.time = time
1841
+
1842
+        var classtimes = this.machineform.class_time
1843
+        var classtime = parseInt(classtimes)
1844
+        this.machineform.class_time = classtime
1845
+
1846
+        var ways = this.machineform.way
1847
+        var way = parseInt(ways)
1848
+        this.machineform.way = way
1849
+
1850
+        var machinedisinfectant = this.machineform.machine_disinfectant
1851
+        var machinedisinfectants = parseInt(machinedisinfectant)
1852
+        this.machineform.machine_disinfectant = machinedisinfectants
1853
+
1854
+        var disinfectantways = this.machineform.disinfectant_way
1855
+        var disinfectantway = parseInt(disinfectantways)
1856
+        this.machineform.disinfectant_way = disinfectantway
1857
+
1858
+        var disinfectants = this.machineform.disinfectant
1859
+        var disinfectant = parseInt(disinfectants)
1860
+        this.machineform.disinfectant = disinfectant
1861
+        UpdatePlanInfo(this.machineform).then(response => {
1862
+          if (response.data.state == 1) {
1863
+            var plan = response.data.data.plan
1864
+            this.dialogVisible = false
1865
+            this.$message.success('修改成功')
1866
+            console.log('this', this.equimentid)
1867
+            this.getAllPlanDetail(this.equimentid)
1868
+            this.getAllPlan()
1869
+          }
1870
+        })
1841 1871
       },
1842 1872
       openDeleteMahcine() {
1843 1873
         if (this.selectMachines.length == 0) {
@@ -1875,7 +1905,7 @@ export default {
1875 1905
                       this.planData.splice(index, 1)
1876 1906
                     }
1877 1907
                   }
1878
-                   var planDataLengths = this.tableData.length
1908
+                  var planDataLengths = this.tableData.length
1879 1909
                   for (let index = planDataLengths - 1; index >= 0; index--) {
1880 1910
                     if (this.tableData[index].id in idMap) {
1881 1911
                       this.tableData.splice(index, 1)
@@ -1892,8 +1922,8 @@ export default {
1892 1922
             return false
1893 1923
           })
1894 1924
       },
1895
-      openDeleteMahcineOne(){
1896
-         if (this.selectMachinesOne.length == 0) {
1925
+      openDeleteMahcineOne() {
1926
+        if (this.selectMachinesOne.length == 0) {
1897 1927
           this.$message.error('请选择要删除的会员')
1898 1928
           return false
1899 1929
         }
@@ -1928,7 +1958,7 @@ export default {
1928 1958
                       this.tableData.splice(index, 1)
1929 1959
                     }
1930 1960
                   }
1931
-                   var planDataLengths = this.planData.length
1961
+                  var planDataLengths = this.planData.length
1932 1962
                   for (let index = planDataLengths - 1; index >= 0; index--) {
1933 1963
                     if (this.planData[index].id in idMap) {
1934 1964
                       this.planData.splice(index, 1)
@@ -1947,58 +1977,150 @@ export default {
1947 1977
       },
1948 1978
       getAllEquimentName() {
1949 1979
         getAllEquimentName().then(response => {
1950
-           if (response.data.state === 1) {
1951
-           var equit = response.data.data.equit;
1952
-           console.log("equit", equit);
1953
-           this.DeviceType = equit;
1954
-         }
1955
-       });
1980
+          if (response.data.state === 1) {
1981
+            var equit = response.data.data.equit
1982
+            console.log('equit', equit)
1983
+            this.DeviceType = equit
1984
+          }
1985
+        })
1956 1986
       },
1957
-      clickQuery(){
1958
-         this.$refs.multipleform.open()
1987
+      clickQuery() {
1988
+        this.$refs.multipleform.open()
1959 1989
       },
1960
-      getPatientInfo(bedid){
1961
-        getPatientInfo(bedid).then(response=>{
1962
-          if(response.data.state === 1){
1963
-           var schedules =  response.data.data.schedules
1964
-           console.log("schedules",schedules)
1990
+      getPatientInfo(bedid) {
1991
+        getPatientInfo(bedid).then(response => {
1992
+          if (response.data.state === 1) {
1993
+            var schedules = response.data.data.schedules
1994
+            console.log('schedules', schedules)
1965 1995
             this.patientName = schedules
1966 1996
           }
1967 1997
         })
1968 1998
       },
1969
-      ChangeClass(id){
1970
-       ChangeClass(this.equimentid,id).then(response=>{
1971
-          if(response.data.state === 1){
1972
-            var patients = response.data.data.patients  
1973
-            console.log("patients",patients)
1974
-            if(patients.is_infectious === 0){
1975
-               this.userform.contagion = ""
1999
+      ChangeClass(id) {
2000
+        ChangeClass(this.equimentid, id).then(response => {
2001
+          if (response.data.state === 1) {
2002
+            var patients = response.data.data.patients
2003
+            console.log('patients', patients)
2004
+            if (patients.is_infectious === 0) {
2005
+              this.userform.contagion = ''
1976 2006
             }
1977
-            if(patients.is_infectious === 1){
1978
-               this.userform.contagion = "无"
1979
-            }    
1980
-            if(patients.is_infectious === 2){
1981
-              this.userform.contagion = "有"
2007
+            if (patients.is_infectious === 1) {
2008
+              this.userform.contagion = '无'
1982 2009
             }
1983
-            this.userform.patient_name = patients.name  
1984
-            var zone =  response.data.data.zone
1985
-            console.log("zone",zone)
2010
+            if (patients.is_infectious === 2) {
2011
+              this.userform.contagion = '有'
2012
+            }
2013
+            this.userform.patient_name = patients.name
2014
+            var zone = response.data.data.zone
2015
+            console.log('zone', zone)
1986 2016
             this.userform.zone = zone.name
1987 2017
             var number = response.data.data.number
1988
-            console.log("nubmer",number)
2018
+            console.log('nubmer', number)
1989 2019
             this.userform.bed_number = number.number
2020
+            var order = response.data.data.order
2021
+            console.log('orgder', order)
2022
+            this.userform.start_time = uParseTime(order.start_time, '{y}-{m}-{d} {h}:{i}')
2023
+            this.userform.end_time = uParseTime(order.end_time, '{y}-{m}-{d} {h}:{i}')
2024
+            var prescription = response.data.data.prescription
2025
+            console.log('prescription', prescription)
2026
+            if (prescription.mode_id === 1) {
2027
+              this.userform.dialysis_mode = 'HD'
2028
+            }
2029
+            if (prescription.mode_id === 2) {
2030
+              this.userform.dialysis_mode = 'HDF'
2031
+            }
2032
+            if (prescription.mode_id === 3) {
2033
+              this.userform.dialysis_mode = 'HD+HP'
2034
+            }
2035
+            if (prescription.mode_id === 4) {
2036
+              this.userform.dialysis_mode = 'HP'
2037
+            }
2038
+            if (prescription.mode_id === 5) {
2039
+              this.userform.dialysis_mode = 'HF'
2040
+            }
2041
+            if (prescription.mode_id === 6) {
2042
+              this.userform.dialysis_mode = 'SCUF'
2043
+            }
2044
+            if (prescription.mode_id === 7) {
2045
+              this.userform.dialysis_mode = 'IUF'
2046
+            }
2047
+            if (prescription.mode_id === 8) {
2048
+              this.userform.dialysis_mode = 'HFHD'
2049
+            }
2050
+            if (prescription.mode_id === 9) {
2051
+              this.userform.dialysis_mode = 'HFHD+HP'
2052
+            }
2053
+            if (prescription.mode_id === 10) {
2054
+              this.userform.dialysis_mode = 'PHF'
2055
+            }
2056
+            if (prescription.mode_id === 11) {
2057
+              this.userform.dialysis_mode = 'HFR'
2058
+            }
2059
+            if (prescription.mode_id === 12) {
2060
+              this.userform.dialysis_mode = 'HDF+HP'
2061
+            }
2062
+            if (prescription.mode_id === 13) {
2063
+              this.userform.dialysis_mode = 'CRRT'
2064
+            }
2065
+            if (prescription.mode_id === 14) {
2066
+              this.userform.dialysis_mode = '腹水回输'
2067
+            }
2068
+            if (prescription.mode_id === 15) {
2069
+              this.userform.dialysis_mode = 'HD前置换'
2070
+            }
2071
+            if (prescription.mode_id === 16) {
2072
+              this.userform.dialysis_mode = 'HD后置换'
2073
+            }
2074
+            if (prescription.mode_id === 17) {
2075
+              this.userform.dialysis_mode = 'HDF前置换'
2076
+            }
2077
+            if (prescription.mode_id === 18) {
2078
+              this.userform.dialysis_mode = 'HDF后置换'
2079
+            }
2080
+            var dislysis = response.data.data.dislysis
2081
+            console.log('dislysis', dislysis)
2082
+            this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
2083
+            this.userform.hyperfiltratio = dislysis.actual_ultrafiltration + 'L'
2084
+            this.userform.weight_loss = dislysis.weight_loss + 'kg'
1990 2085
           }
1991
-       })
2086
+        })
1992 2087
       },
1993
-      changePatient(id){
1994
-        changePatient(this.equimentid,id).then(response=>{
2088
+      changePatient(id) {
2089
+        changePatient(this.equimentid, id).then(response => {
1995 2090
 
1996 2091
         })
1997 2092
       },
1998
-      SaveInformation(formName){
1999
-        SaveInformation(this.userform).then(response=>{
2093
+      SaveInformation(formName) {
2094
+        SaveInformation(this.userform).then(response => {
2000 2095
 
2001 2096
         })
2097
+      },
2098
+      changStartTime(val) {
2099
+        this.userform.starttime = val
2100
+      },
2101
+      changeEndTime(val) {
2102
+        this.userform.endtime = val
2103
+        console.log('val', val)
2104
+        console.log('开始时间', this.userform.starttime)
2105
+        console.log('呵呵', this.formatDuring(val))
2106
+      },
2107
+      formatDuring(mss) {
2108
+        const days = parseInt(mss / (1000 * 60 * 60 * 24)) // 得到天数
2109
+        const hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) // 得到小时
2110
+        const minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60)) // 得到分钟数
2111
+        const seconds = (mss % (1000 * 60)) / 1000 // 得到秒数
2112
+        const str1 = hours < 10 ? ('0' + hours) : hours
2113
+        console.log('str1', str1)
2114
+        const str2 = minutes < 10 ? ('0' + minutes) : minutes
2115
+        return str1 + ':' + str2
2116
+      },
2117
+      getAllOrganization() {
2118
+        getAllOrganization().then(response => {
2119
+          if (response.data.state === 1) {
2120
+            var approle = response.data.data.approle
2121
+            console.log('机构用户', approle)
2122
+          }
2123
+        })
2002 2124
       }
2003 2125
 
2004 2126
     },
@@ -2010,8 +2132,8 @@ export default {
2010 2132
       // console.log('id是什么', id)
2011 2133
       // this.equimentid = id
2012 2134
       this.getAllPlan()
2013
-      this.getAllEquimentName();
2014
-
2135
+      this.getAllEquimentName()
2136
+      this.getAllOrganization()
2015 2137
     }
2016 2138
   }
2017 2139
 </script>