Browse Source

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

csx 5 years ago
parent
commit
ec937acbf0

+ 115 - 61
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,112 +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
-  console.log("data是什么", data);
75 74
   return request({
76
-    url: "/api/management/updatemachineinfo",
77
-    method: "Post",
75
+    url: '/api/management/updatemachineinfo',
76
+    method: 'Post',
78 77
     data: data
79
-  });
78
+  })
80 79
 }
81 80
 
82 81
 export function getAllEquimentName(params) {
83 82
   return request({
84
-    url: "/api/management/getallequimentname",
85
-    method: "Get",
83
+    url: '/api/management/getallequimentname',
84
+    method: 'Get',
86 85
     params: params
87
-  });
86
+  })
88 87
 }
89 88
 
90 89
 export function savePlan(data, id) {
91
-  console.log("data是什么", data);
92
-  console.log("id", id);
90
+  console.log('data是什么', data)
91
+  console.log('id', id)
93 92
   return request({
94
-    url: "/api/management/saveplan?id=" + id,
95
-    method: "Post",
93
+    url: '/api/management/saveplan?id=' + id,
94
+    method: 'Post',
96 95
     data: data
97
-  });
96
+  })
98 97
 }
99 98
 
100 99
 export function getAllPlan(params) {
101 100
   return request({
102
-    url: "/api/management/getallplan",
103
-    method: "Get",
101
+    url: '/api/management/getallplan',
102
+    method: 'Get',
104 103
     params: params
105
-  });
104
+  })
106 105
 }
107 106
 
108 107
 export function getAllPlanDetail(id, params) {
109 108
   return request({
110
-    url: "/api/management/getallplandetail?id=" + id,
111
-    method: "Get",
109
+    url: '/api/management/getallplandetail?id=' + id,
110
+    method: 'Get',
112 111
     params: params
113
-  });
112
+  })
114 113
 }
115 114
 
116 115
 export function getEditMachine(id, params) {
117
-  console.log("id", id);
118 116
   return request({
119
-    url: "/api/management/geteditmachine?id=" + id,
120
-    method: "Get",
117
+    url: '/api/management/geteditmachine?id=' + id,
118
+    method: 'Get',
121 119
     params: params
122
-  });
120
+  })
123 121
 }
124 122
 
125 123
 export function DeletePlans(data) {
126
-  console.log("删除的数据是?", data);
127 124
   return request({
128
-    url: "/api/staff/deleteplans",
129
-    method: "delete",
125
+    url: '/api/staff/deleteplans',
126
+    method: 'delete',
130 127
     data: data
131
-  });
128
+  })
132 129
 }
133 130
 
134 131
 export function EditPlanDetail(id, params) {
135 132
   return request({
136
-    url: "/api/manage/editplandetail?id=" + id,
137
-    method: "get",
133
+    url: '/api/manage/editplandetail?id=' + id,
134
+    method: 'get',
138 135
     params: params
139
-  });
136
+  })
140 137
 }
141 138
 
142 139
 export function UpdatePlanInfo(data) {
143
-  console.log("data是什么", data);
144 140
   return request({
145
-    url: "/api/manage/updateplaninfo",
146
-    method: "Post",
141
+    url: '/api/manage/updateplaninfo',
142
+    method: 'Post',
147 143
     data: data
148
-  });
144
+  })
145
+}
146
+
147
+export function getComprehensive(params) {
148
+  return request({
149
+    url: '/api/manage/getcomprehensive',
150
+    method: 'Get',
151
+    params: params
152
+  })
153
+}
154
+
155
+export function SaveInformation(data) {
156
+  return request({
157
+    url: '/api/manage/saveinformation',
158
+    method: 'Post',
159
+    data: data
160
+  })
161
+}
162
+
163
+export function getPatientInfo(id, params) {
164
+  return request({
165
+    url: '/api/manage/getpatientinfo?id=' + id,
166
+    method: 'Get',
167
+    params: params
168
+  })
169
+}
170
+
171
+export function ChangeClass(equitid, id) {
172
+  const params = {
173
+    equitid: equitid,
174
+    id: id
175
+  }
176
+  return request({
177
+    url: '/api/manage/changeclass',
178
+    method: 'Get',
179
+    params: params
180
+  })
181
+}
182
+
183
+export function changePatient(equitid, id) {
184
+  console.log('equitid', equitid)
185
+  console.log('id', id)
186
+  const params = {
187
+    equitid: equitid,
188
+    id: id
189
+  }
190
+  return request({
191
+    url: '/api/manage/changepatient',
192
+    method: 'Get',
193
+    params: params
194
+  })
195
+}
196
+
197
+export function getAllOrganization(params) {
198
+  return request({
199
+    url: '/api/manage/getallorganization',
200
+    method: 'Get',
201
+    params: params
202
+  })
149 203
 }

+ 1 - 0
src/router/modules/device.js View File

@@ -39,6 +39,7 @@ export default {
39 39
     {
40 40
       path: "/device/main",
41 41
       component: () => import("@/xt_pages/management/index"),
42
+      // component: () => import('@/xt_pages/device/main'),
42 43
       name: "dialysisMachineManage",
43 44
       meta: {
44 45
         title: "dialysisMachineManage"

+ 39 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

@@ -194,6 +194,45 @@
194 194
                     <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==5">
195 195
                       HF
196 196
                     </div>
197
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==6">
198
+                      SCUF
199
+                    </div>
200
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==7">
201
+                      IUF
202
+                    </div>
203
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==8">
204
+                      HFHD
205
+                    </div>
206
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==9">
207
+                      HFHD+HP
208
+                    </div>
209
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==10">
210
+                      PHF
211
+                    </div>
212
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==11">
213
+                      HFR
214
+                    </div>
215
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==12">
216
+                      HDF+HP
217
+                    </div>
218
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==13">
219
+                      CRRT
220
+                    </div>
221
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==14">
222
+                      腹水回输
223
+                    </div>
224
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==15">
225
+                      HD前置换
226
+                    </div>
227
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==16">
228
+                      HD后置换
229
+                    </div>
230
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==17">
231
+                      HDF前置换
232
+                    </div>
233
+                    <div class="under_line" style="width: 100px;text-align: center;font-weight:600;" v-if="prescription.mode_id==18">
234
+                      HDF后置换
235
+                    </div>
197 236
                   </div>
198 237
 
199 238
                   <div class="inline_block" style="margin-left:10px;flex:1;">

+ 2 - 2
src/xt_pages/dialysis/template/dialysisPrintOrderTwo.vue View File

@@ -820,8 +820,8 @@
820 820
               </div>
821 821
               <div class="inline_block">
822 822
                 &emsp;实际超滤量:
823
-                <div class="under_line" style="width: 70px;text-align: left" v-if="getFloat(afterdialysis.actual_ultrafiltration)">
824
-                  {{getFloat(afterdialysis.actual_ultrafiltration)}}
823
+                <div class="under_line" style="width: 70px;text-align: left" v-if="getFloat(prescription.ultrafiltration)">
824
+                  {{getFloat(prescription.ultrafiltration)}}
825 825
                 </div>
826 826
                 <div class="under_line" style="width: 70px;" v-else>
827 827
                   {{'/'}}

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

+ 79 - 19
src/xt_pages/management/components/ManageForm.vue View File

@@ -1,17 +1,29 @@
1 1
 <template>
2 2
   <div id="manage-form">
3
-    <el-dialog title="新增设备" :visible.sync="dialogVisible" width="50%" align="center">
3
+    <el-dialog
4
+      title="新增设备"
5
+      :visible.sync="dialogVisible"
6
+      width="50%"
7
+      align="center"
8
+    >
4 9
       <el-form ref="form" :model="form" :rules="rules">
5 10
         <el-row>
6 11
           <el-col :span="8">
7 12
             <el-form-item label="序列号:" required prop="serial_number">
8
-              <el-input style="width:135px" v-model="form.serial_number"></el-input>
13
+              <el-input
14
+                style="width:135px"
15
+                v-model="form.serial_number"
16
+              ></el-input>
9 17
             </el-form-item>
10 18
           </el-col>
11 19
 
12 20
           <el-col :span="8">
13 21
             <el-form-item label="设备类型:" required prop="device_type">
14
-              <el-select style="width:135px" v-model="form.device_type" @change="changeDeviceType">
22
+              <el-select
23
+                style="width:135px"
24
+                v-model="form.device_type"
25
+                @change="changeDeviceType"
26
+              >
15 27
                 <el-option
16 28
                   v-for="item in this.DeviceType"
17 29
                   :key="item.id"
@@ -23,7 +35,12 @@
23 35
           </el-col>
24 36
 
25 37
           <el-col :span="8">
26
-            <el-form-item label="机位号:" prop="bed_number" v-show="bedShow">
38
+            <el-form-item
39
+              label="机位号:"
40
+              required
41
+              prop="bed_number"
42
+              v-show="bedShow"
43
+            >
27 44
               <el-select style="width:135px" v-model="form.bed_number">
28 45
                 <el-option
29 46
                   v-for="item in this.bedNumber"
@@ -38,17 +55,26 @@
38 55
         <el-row>
39 56
           <el-col :span="8">
40 57
             <el-form-item label="设备名称:" required prop="device_name">
41
-              <el-input style="width:135px" v-model="form.device_name"></el-input>
58
+              <el-input
59
+                style="width:135px"
60
+                v-model="form.device_name"
61
+              ></el-input>
42 62
             </el-form-item>
43 63
           </el-col>
44 64
           <el-col :span="8">
45 65
             <el-form-item label="生产厂家:" prop="manufacture_factory">
46
-              <el-input style="width:135px" v-model="form.manufacture_factory"></el-input>
66
+              <el-input
67
+                style="width:135px"
68
+                v-model="form.manufacture_factory"
69
+              ></el-input>
47 70
             </el-form-item>
48 71
           </el-col>
49 72
           <el-col :span="8">
50 73
             <el-form-item label="维修厂家:" prop="service_manufacturer">
51
-              <el-input style="width:135px" v-model="form.service_manufacturer"></el-input>
74
+              <el-input
75
+                style="width:135px"
76
+                v-model="form.service_manufacturer"
77
+              ></el-input>
52 78
             </el-form-item>
53 79
           </el-col>
54 80
         </el-row>
@@ -60,12 +86,18 @@
60 86
           </el-col>
61 87
           <el-col :span="8">
62 88
             <el-form-item label="使用科室:" prop="use_section">
63
-              <el-input style="width:135px" v-model="form.use_section"></el-input>
89
+              <el-input
90
+                style="width:135px"
91
+                v-model="form.use_section"
92
+              ></el-input>
64 93
             </el-form-item>
65 94
           </el-col>
66 95
           <el-col :span="8">
67 96
             <el-form-item label="科室编号:" prop="section_number">
68
-              <el-input style="width:135px" v-model="form.section_number"></el-input>
97
+              <el-input
98
+                style="width:135px"
99
+                v-model="form.section_number"
100
+              ></el-input>
69 101
             </el-form-item>
70 102
           </el-col>
71 103
         </el-row>
@@ -113,7 +145,10 @@
113 145
         <el-row>
114 146
           <el-col :span="8">
115 147
             <el-form-item label="维修工程师:" prop="maintenance_engineer">
116
-              <el-input style="width:135px" v-model="form.maintenance_engineer"></el-input>
148
+              <el-input
149
+                style="width:135px"
150
+                v-model="form.maintenance_engineer"
151
+              ></el-input>
117 152
             </el-form-item>
118 153
           </el-col>
119 154
           <el-col :span="8">
@@ -123,7 +158,10 @@
123 158
           </el-col>
124 159
           <el-col :span="8">
125 160
             <el-form-item label="保修期限:" prop="guarantee_date">
126
-              <el-input style="width:135px" v-model="form.guarantee_date"></el-input>
161
+              <el-input
162
+                style="width:135px"
163
+                v-model="form.guarantee_date"
164
+              ></el-input>
127 165
             </el-form-item>
128 166
           </el-col>
129 167
         </el-row>
@@ -145,8 +183,15 @@
145 183
             </el-form-item>
146 184
           </el-col>
147 185
           <el-col :span="8">
148
-            <el-form-item label="初次使用次数:" prop="user_total" v-show="totalShow">
149
-              <el-input v-model="form.user_total" style="width:135px"></el-input>
186
+            <el-form-item
187
+              label="初次使用次数:"
188
+              prop="user_total"
189
+              v-show="totalShow"
190
+            >
191
+              <el-input
192
+                v-model="form.user_total"
193
+                style="width:135px"
194
+              ></el-input>
150 195
             </el-form-item>
151 196
           </el-col>
152 197
           <el-col :span="8" v-show="DisinfectionShow">
@@ -223,8 +268,15 @@
223 268
         </el-row>
224 269
         <el-row>
225 270
           <el-col :span="24">
226
-            <el-form-item label="治疗模式:" prop="treat_mode" v-show="treatShow">
227
-              <el-checkbox-group v-model="form.treat_mode" @change="changetreatmentmode">
271
+            <el-form-item
272
+              label="治疗模式:"
273
+              prop="treat_mode"
274
+              v-show="treatShow"
275
+            >
276
+              <el-checkbox-group
277
+                v-model="form.treat_mode"
278
+                @change="changetreatmentmode"
279
+              >
228 280
                 <el-checkbox
229 281
                   style="min-width:50px"
230 282
                   v-for="item in treatmentmode"
@@ -242,13 +294,16 @@
242 294
               :indeterminate="isIndeterminate"
243 295
               v-model="checkAll"
244 296
               @change="handleCheckAllChange"
245
-            >全选</el-checkbox>
297
+              >全选</el-checkbox
298
+            >
246 299
           </el-col>
247 300
         </el-row>
248 301
       </el-form>
249 302
       <span slot="footer" class="dialog-footer">
250 303
         <el-button @click="dialogVisible = false">取 消</el-button>
251
-        <el-button type="primary" @click="SaveManageInfo('form')">保存</el-button>
304
+        <el-button type="primary" @click="SaveManageInfo('form')"
305
+          >保存</el-button
306
+        >
252 307
       </span>
253 308
     </el-dialog>
254 309
   </div>
@@ -344,12 +399,16 @@ export default {
344 399
         { id: 2, name: "水处理机" },
345 400
         { id: 3, name: "其他" }
346 401
       ],
347
-      reverseMode: [{ id: 1, name: "单级反渗" }, { id: 2, name: "双级反渗" }],
402
+      reverseMode: [
403
+        { id: 1, name: "单级反渗" },
404
+        { id: 2, name: "双级反渗" }
405
+      ],
348 406
       rules: {
349 407
         serial_number: [{ required: true, message: "请填写序列号" }],
350 408
         device_name: [{ required: true, message: "请填写序列号" }],
351 409
         device_type: [{ required: true, message: "请填写设备类型" }],
352
-        unit_type: [{ required: true, message: "请填写设备型号" }]
410
+        unit_type: [{ required: true, message: "请填写设备型号" }],
411
+        bed_number: [{ required: true, message: "请填写机位号" }]
353 412
       },
354 413
       DisinfectionShow: false,
355 414
       reverseShow: false,
@@ -400,6 +459,7 @@ export default {
400 459
         this.allShow = false;
401 460
         this.treatShow = false;
402 461
         this.reverseShow = true;
462
+        this.bedShow = true;
403 463
       }
404 464
 
405 465
       if (val === 3) {

+ 275 - 117
src/xt_pages/management/components/MultipleForm.vue View File

@@ -1,11 +1,16 @@
1 1
 <template>
2 2
   <div>
3
-    <el-dialog title="综合查询" :visible.sync="dialogVisible" width="99%" center>
3
+    <el-dialog
4
+      title="综合查询"
5
+      :visible.sync="dialogVisible"
6
+      width="95%"
7
+      center
8
+    >
4 9
       <el-form>
5 10
         <el-row :gutter="20">
6 11
           <el-col :span="6">
7 12
             <el-form-item label="透析分区:">
8
-              <el-select style="width:120px" v-model="form.device_type">
13
+              <el-select style="width:120px" v-model="form.zone">
9 14
                 <el-option
10 15
                   v-for="item in this.DeviceType"
11 16
                   :key="item.id"
@@ -17,7 +22,7 @@
17 22
           </el-col>
18 23
           <el-col :span="6">
19 24
             <el-form-item label="机号:">
20
-              <el-select style="width:120px" v-model="form.device_type">
25
+              <el-select style="width:120px" v-model="form.device_number">
21 26
                 <el-option
22 27
                   v-for="item in this.Numbers"
23 28
                   :key="item.id"
@@ -41,7 +46,7 @@
41 46
           </el-col>
42 47
           <el-col :span="6">
43 48
             <el-form-item label="设备型号:">
44
-              <el-select style="width:120px" v-model="form.device_type">
49
+              <el-select style="width:120px" v-model="form.device_model">
45 50
                 <el-option
46 51
                   v-for="item in this.EquitmentName"
47 52
                   :key="item.id"
@@ -66,191 +71,289 @@
66 71
             </el-form-item>
67 72
           </el-col>
68 73
           <el-col :span="10">
69
-            <el-form-item label="维修期限:">
74
+            <div class="cell clearfix">
75
+              <label class="title"><span class="name">日期查询</span> : </label>
70 76
               <el-date-picker
71
-                v-model="form.time_limit"
72
-                type="daterange"
73
-                range-separator="至"
74
-                start-placeholder="开始日期"
75
-                end-placeholder="结束日期"
76
-                style="width:400px"
77
-              ></el-date-picker>
78
-            </el-form-item>
77
+                size="small"
78
+                clearable
79
+                v-model="form.start_time"
80
+                prefix-icon="el-icon-date"
81
+                :editable="false"
82
+                style="width: 196px;"
83
+                type="date"
84
+                placeholder="选择日期时间"
85
+                align="right"
86
+                format="yyyy-MM-dd"
87
+                value-format="yyyy-MM-dd"
88
+              >
89
+              </el-date-picker>
90
+              <span class="cellLine"> - </span>
91
+              <el-date-picker
92
+                size="small"
93
+                clearable
94
+                v-model="form.end_time"
95
+                prefix-icon="el-icon-date"
96
+                :editable="false"
97
+                style="width: 196px;"
98
+                type="date"
99
+                placeholder="选择日期时间"
100
+                align="right"
101
+                format="yyyy-MM-dd"
102
+                value-format="yyyy-MM-dd"
103
+              >
104
+              </el-date-picker>
105
+            </div>
79 106
           </el-col>
80 107
           <el-col :span="4">
81 108
             <el-form-item label="合计:">
82 109
               故障次数
83
-              <span>0</span>次
110
+              <span>{{ failure_times }}</span
111
+              >次
84 112
               <!-- <el-input style="width:90px"></el-input> -->
85 113
             </el-form-item>
86 114
           </el-col>
87 115
           <el-col :span="4">
88
-            <el-button type="primary" size="medium" @click="ToQuery()">查询</el-button>
116
+            <el-button type="primary" size="medium" @click="getComprehensive()"
117
+              >查询</el-button
118
+            >
89 119
           </el-col>
90 120
         </el-row>
91 121
         <el-row>
92 122
           <el-table :data="tableData" border style="width: 100%">
93
-            <el-table-column prop="date" label="序号" width="80">
94
-              <template slot-scope="scope"></template>
123
+            <el-table-column prop="date" label="序号" width="80" align="center">
124
+              <template slot-scope="scope">
125
+                {{ scope.row.id }}
126
+              </template>
95 127
             </el-table-column>
96
-            <el-table-column prop="name" label="分区" width="80">
97
-              <template slot-scope="scope"></template>
128
+            <el-table-column prop="name" label="分区" width="80" align="center">
129
+              <template slot-scope="scope">
130
+                {{ scope.row.name }}
131
+              </template>
98 132
             </el-table-column>
99
-            <el-table-column prop="address" label="序列号" width="80">
100
-              <template slot-scope="scope"></template>
133
+            <el-table-column
134
+              prop="address"
135
+              label="序列号"
136
+              width="80"
137
+              align="center"
138
+            >
139
+              <template slot-scope="scope">
140
+                {{ scope.row.serial_number }}
141
+              </template>
101 142
             </el-table-column>
102
-            <el-table-column prop="address" label="设备类型" width="100">
103
-              <template slot-scope="scope"></template>
143
+            <el-table-column
144
+              prop="address"
145
+              label="设备类型"
146
+              width="100"
147
+              align="center"
148
+            >
149
+              <template slot-scope="scope">
150
+                {{ scope.row.device_type }}
151
+              </template>
104 152
             </el-table-column>
105
-            <el-table-column prop="address" label="机号" width="80">
106
-              <template slot-scope="scope"></template>
153
+            <el-table-column
154
+              prop="address"
155
+              label="机号"
156
+              width="80"
157
+              align="center"
158
+            >
159
+              <template slot-scope="scope">
160
+                {{ scope.row.bed_number }}
161
+              </template>
107 162
             </el-table-column>
108
-            <el-table-column prop="address" label="设备名称" width="100">
109
-              <template slot-scope="scope"></template>
163
+            <el-table-column
164
+              prop="address"
165
+              label="设备名称"
166
+              width="100"
167
+              align="center"
168
+            >
169
+              <template slot-scope="scope">
170
+                {{ scope.row.device_name }}
171
+              </template>
110 172
             </el-table-column>
111
-            <el-table-column prop="address" label="设备型号" width="100">
112
-              <template slot-scope="scope"></template>
173
+            <el-table-column
174
+              prop="address"
175
+              label="设备型号"
176
+              width="100"
177
+              align="center"
178
+            >
179
+              <template slot-scope="scope">
180
+                {{ scope.row.device_type }}
181
+              </template>
113 182
             </el-table-column>
114
-            <el-table-column prop="address" label="启用日期" width="100">
115
-              <template slot-scope="scope"></template>
183
+            <el-table-column
184
+              prop="address"
185
+              label="启用日期"
186
+              width="100"
187
+              align="center"
188
+            >
189
+              <template slot-scope="scope">
190
+                {{ getTime(scope.row.start_date) }}
191
+              </template>
116 192
             </el-table-column>
117
-            <el-table-column prop="address" label="保修日期" width="100">
118
-              <template slot-scope="scope"></template>
193
+            <el-table-column
194
+              prop="address"
195
+              label="保修期限"
196
+              width="100"
197
+              align="center"
198
+            >
199
+              <template slot-scope="scope">
200
+                {{ scope.row.guarantee_date }}
201
+              </template>
119 202
             </el-table-column>
120
-            <el-table-column prop="address" label="机器状态" width="100">
121
-              <template slot-scope="scope"></template>
203
+            <el-table-column
204
+              prop="address"
205
+              label="机器状态"
206
+              width="100"
207
+              align="center"
208
+            >
209
+              <template slot-scope="scope">
210
+                {{ scope.row.machine_status }}
211
+              </template>
122 212
             </el-table-column>
123
-            <el-table-column prop="address" label="报废日期" width="100">
124
-              <template slot-scope="scope"></template>
213
+            <el-table-column
214
+              prop="address"
215
+              label="报废日期"
216
+              width="100"
217
+              align="center"
218
+            >
219
+              <template slot-scope="scope">
220
+                {{ getTime(scope.row.rubbish_date) }}
221
+              </template>
125 222
             </el-table-column>
126
-            <el-table-column prop="address" label="报废日期" width="100">
127
-              <template slot-scope="scope"></template>
223
+            <el-table-column
224
+              prop="address"
225
+              label="报废原因"
226
+              width="100"
227
+              align="center"
228
+            >
229
+              <template slot-scope="scope">
230
+                {{ scope.row.rubbish_reason }}
231
+              </template>
128 232
             </el-table-column>
129
-            <el-table-column prop="address" label="报废原因" width="100">
130
-              <template slot-scope="scope"></template>
233
+            <el-table-column
234
+              prop="address"
235
+              label="使用年限"
236
+              width="100"
237
+              align="center"
238
+            >
239
+              <template slot-scope="scope">
240
+                {{ scope.row.user_year }}
241
+              </template>
131 242
             </el-table-column>
132
-            <el-table-column prop="address" label="使用年限" width="100">
133
-              <template slot-scope="scope"></template>
243
+            <el-table-column
244
+              prop="address"
245
+              label="工作时长"
246
+              width="100"
247
+              align="center"
248
+            >
249
+              <template slot-scope="scope">
250
+                {{ scope.row.work_time }}
251
+              </template>
134 252
             </el-table-column>
135
-            <el-table-column prop="address" label="工作时长" width="100">
136
-              <template slot-scope="scope"></template>
253
+            <el-table-column
254
+              prop="address"
255
+              label="使用次数"
256
+              width="100"
257
+              align="center"
258
+            >
259
+              <template slot-scope="scope">
260
+                {{ scope.row.user_total }}
261
+              </template>
137 262
             </el-table-column>
138
-            <el-table-column prop="address" label="使用次数" width="100">
139
-              <template slot-scope="scope"></template>
140
-            </el-table-column>
141
-            <el-table-column prop="address" label="故障次数" width="100">
142
-              <template slot-scope="scope"></template>
263
+            <el-table-column
264
+              prop="address"
265
+              label="故障次数"
266
+              width="100"
267
+              align="center"
268
+            >
269
+              <template slot-scope="scope">
270
+                {{ failure_times }}
271
+              </template>
143 272
             </el-table-column>
144 273
           </el-table>
145 274
         </el-row>
146 275
       </el-form>
147 276
       <span slot="footer" class="dialog-footer">
148 277
         <el-button @click="dialogVisible = false">取 消</el-button>
149
-        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
278
+        <el-button type="primary" @click="dialogVisible = false"
279
+          >确 定</el-button
280
+        >
150 281
       </span>
151 282
     </el-dialog>
152 283
   </div>
153 284
 </template>
154 285
 
155 286
 <script>
156
-import { getAllSubregion, getAllEquimentName } from "@/api/manage";
287
+import {
288
+  getAllSubregion,
289
+  getAllEquimentName,
290
+  getComprehensive
291
+} from "@/api/manage";
292
+import { uParseTime } from "@/utils/tools";
157 293
 export default {
158 294
   name: "MultipleForm",
159 295
   data() {
160 296
     return {
297
+      failure_times: 0,
161 298
       dialogVisible: false,
162 299
       form: {
163 300
         zone: "",
164 301
         device_number: "",
165 302
         device_type: "",
303
+        device_model: "",
166 304
         user_year: "",
167
-        time_limit: ""
305
+        start_time: "",
306
+        end_time: ""
168 307
       },
169 308
       userYear: [
309
+        { id: 0, name: "全部" },
170 310
         { id: 1, name: "0~1" },
171 311
         { id: 2, name: "1~3" },
172 312
         { id: 3, name: "3~10" },
173 313
         { id: 4, name: "10年以上" }
174 314
       ],
175
-      pickerOptions: {
176
-        shortcuts: [
177
-          {
178
-            text: "最近一周",
179
-            onClick(picker) {
180
-              const end = new Date();
181
-              const start = new Date();
182
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
183
-              picker.$emit("pick", [start, end]);
184
-            }
185
-          },
186
-          {
187
-            text: "最近一个月",
188
-            onClick(picker) {
189
-              const end = new Date();
190
-              const start = new Date();
191
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
192
-              picker.$emit("pick", [start, end]);
193
-            }
194
-          },
195
-          {
196
-            text: "最近三个月",
197
-            onClick(picker) {
198
-              const end = new Date();
199
-              const start = new Date();
200
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
201
-              picker.$emit("pick", [start, end]);
202
-            }
203
-          }
204
-        ]
205
-      },
206 315
       value1: "",
207 316
       value2: "",
208
-      tableData: [
209
-        {
210
-          date: "2016-05-02",
211
-          name: "王小虎",
212
-          address: "上海市普陀区金沙江路 1518 弄"
213
-        },
214
-        {
215
-          date: "2016-05-04",
216
-          name: "王小虎",
217
-          address: "上海市普陀区金沙江路 1517 弄"
218
-        },
219
-        {
220
-          date: "2016-05-01",
221
-          name: "王小虎",
222
-          address: "上海市普陀区金沙江路 1519 弄"
223
-        },
224
-        {
225
-          date: "2016-05-03",
226
-          name: "王小虎",
227
-          address: "上海市普陀区金沙江路 1516 弄"
228
-        }
229
-      ],
317
+      tableData: [],
230 318
       EquitmentType: [
319
+        { id: 0, name: "全部" },
231 320
         { id: 1, name: "透析机" },
232 321
         { id: 2, name: "水处理机" },
233 322
         { id: 3, name: "其他" }
234 323
       ],
235
-      DeviceType: [],
236
-      Numbers: [],
237
-      EquitmentName: []
324
+      DeviceType: [{ id: 0, name: "不限" }],
325
+      Numbers: [{ id: 0, number: "不限" }],
326
+      EquitmentName: [{ id: 0, equitment_name: "全部" }],
327
+      runOptions: [
328
+        { value: "1", label: "正常" },
329
+        { value: "2", label: "故障" }
330
+      ]
238 331
     };
239 332
   },
240 333
   methods: {
241 334
     open: function() {
242 335
       this.dialogVisible = true;
243 336
     },
244
-    ToQuery() {},
245 337
     getAllSubregion() {
246 338
       getAllSubregion().then(response => {
247 339
         if (response.data.state === 1) {
248
-          var zones = response.data.data.zones;
340
+          var zone = response.data.data.zones;
341
+          var zones = [{ id: 0, name: "不限" }];
342
+          for (let i = 0; i < zone.length; i++) {
343
+            const item = zone[i];
344
+            zones.push({ id: item.id, name: item.name });
345
+          }
249 346
           this.DeviceType = zones;
250
-          console.log("zones是什么", zones);
251
-          var numbers = response.data.data.numbers;
347
+          console.log("zones是什么", zone);
348
+
349
+          var number = response.data.data.numbers;
350
+          var numbers = [{ id: 0, number: "不限" }];
351
+          for (let index = 0; index < number.length; index++) {
352
+            const item = number[index];
353
+            numbers.push({ id: item.id, number: item.number });
354
+          }
252 355
           this.Numbers = numbers;
253
-          console.log("numbers", numbers);
356
+          console.log("numbers", number);
254 357
         }
255 358
       });
256 359
     },
@@ -258,9 +361,65 @@ export default {
258 361
       getAllEquimentName().then(response => {
259 362
         if (response.data.state == 1) {
260 363
           var equit = response.data.data.equit;
261
-          this.EquitmentName = equit;
364
+          var equits = [{ id: 0, equitment_name: "全部" }];
365
+          for (let index = 0; index < equit.length; index++) {
366
+            const item = equit[index];
367
+            equits.push({ id: item.id, equitment_name: item.equitment_name });
368
+          }
369
+          this.EquitmentName = equits;
262 370
         }
263 371
       });
372
+    },
373
+    getComprehensive() {
374
+      const params = {
375
+        zone: this.form.zone,
376
+        number: this.form.device_number,
377
+        devicetype: this.form.device_type,
378
+        year: this.form.user_year,
379
+        starttime: this.form.start_time,
380
+        endtime: this.form.end_time
381
+      };
382
+      getComprehensive(params).then(response => {
383
+        if (response.data.state === 1) {
384
+          var macher = response.data.data.macher;
385
+          for (let index = 0; index < macher.length; index++) {
386
+            if (macher[index].device_type === 1) {
387
+              macher[index].device_type = "透析机";
388
+            }
389
+            if (macher[index].device_type === 2) {
390
+              macher[index].device_type = "水处理机";
391
+            }
392
+            if (macher[index].device_type === 3) {
393
+              macher[index].device_type = "其他";
394
+            }
395
+
396
+            if (macher[index].machine_status === 1) {
397
+              macher[index].machine_status = "使用机";
398
+            }
399
+            if (macher[index].machine_status === 2) {
400
+              macher[index].machine_status = "备用机";
401
+            }
402
+            if (macher[index].machine_status === 3) {
403
+              macher[index].machine_status = "急诊机";
404
+            }
405
+            if (macher[index].machine_status === 4) {
406
+              macher[index].machine_status = "报废机";
407
+            }
408
+
409
+            if (macher[index].start_date === 0) {
410
+              macher[index].start_date = "";
411
+            }
412
+            if (macher[index].rubbish_date === 0) {
413
+              macher[index].rubbish_date = "";
414
+            }
415
+          }
416
+          console.log("macher", macher);
417
+          this.tableData = macher;
418
+        }
419
+      });
420
+    },
421
+    getTime(time) {
422
+      return uParseTime(time, "{y}-{m}-{d}");
264 423
     }
265 424
   },
266 425
   created() {
@@ -270,5 +429,4 @@ export default {
270 429
 };
271 430
 </script>
272 431
 
273
-<style scoped>
274
-</style>
432
+<style scoped></style>

+ 14 - 4
src/xt_pages/management/components/PlanForm.vue View File

@@ -1,6 +1,11 @@
1 1
 <template>
2 2
   <div id="plan-form">
3
-    <el-dialog title="新增计划" :visible.sync="dialogVisible" width="44%" center>
3
+    <el-dialog
4
+      title="新增计划"
5
+      :visible.sync="dialogVisible"
6
+      width="50%"
7
+      center
8
+    >
4 9
       <el-form ref="form" :model="form">
5 10
         <el-row>
6 11
           <el-col :span="10">
@@ -17,7 +22,10 @@
17 22
           </el-col>
18 23
           <el-col :span="10">
19 24
             <el-form-item label="消毒时长:">
20
-              <el-input style="width:135px" v-model="form.disinfec_time"></el-input>
25
+              <el-input
26
+                style="width:135px"
27
+                v-model="form.disinfec_time"
28
+              ></el-input>
21 29
               <span>分钟</span>
22 30
             </el-form-item>
23 31
           </el-col>
@@ -80,7 +88,6 @@
80 88
               <el-select
81 89
                 style="width:135px"
82 90
                 v-model="form.machine_disinfectant"
83
-                @change="changeDeviceType"
84 91
               >
85 92
                 <el-option
86 93
                   v-for="item in this.disinfectantType"
@@ -163,7 +170,10 @@ export default {
163 170
         { id: 3, name: "晚上" }
164 171
       ],
165 172
       // 基表消毒方式
166
-      disinfectType: [{ id: 1, name: "擦拭" }, { id: 2, name: "化学消毒" }],
173
+      disinfectType: [
174
+        { id: 1, name: "擦拭" },
175
+        { id: 2, name: "化学消毒" }
176
+      ],
167 177
       // 基表消毒液
168 178
       disinfectantType: [
169 179
         { id: 1, name: "0.22%季铵盐" },

+ 101 - 0
src/xt_pages/management/components/UserForm.vue View File

@@ -0,0 +1,101 @@
1
+<template>
2
+  <div id="user-form">
3
+    <el-row>
4
+      <el-col :span="2">
5
+        <el-checkbox
6
+          :indeterminate="isIndeterminate"
7
+          v-model="checkAll"
8
+          @change="handleCheckAllChange"
9
+          >全选</el-checkbox
10
+        >
11
+      </el-col>
12
+      <el-col :span="2">
13
+        <el-button size="small">删除</el-button>
14
+      </el-col>
15
+      <el-col :span="4">
16
+        <el-form-item label="机号:">
17
+          <el-select style="width:135px" v-model="value">
18
+            <el-option
19
+              v-for="item in this.fluidPathType"
20
+              :key="item.id"
21
+              :label="item.name"
22
+              :value="item.id"
23
+            ></el-option>
24
+          </el-select>
25
+        </el-form-item>
26
+      </el-col>
27
+    </el-row>
28
+  </div>
29
+</template>
30
+
31
+<script>
32
+export default {
33
+  name: "UserForm",
34
+  data() {
35
+    return {
36
+      tableData: [
37
+        {
38
+          date: "2016-05-03",
39
+          name: "王小虎",
40
+          province: "上海",
41
+          city: "普陀区",
42
+          address: "上海市普陀区金沙江路 1518 弄",
43
+          zip: 200333
44
+        },
45
+        {
46
+          date: "2016-05-02",
47
+          name: "王小虎",
48
+          province: "上海",
49
+          city: "普陀区",
50
+          address: "上海市普陀区金沙江路 1518 弄",
51
+          zip: 200333
52
+        },
53
+        {
54
+          date: "2016-05-04",
55
+          name: "王小虎",
56
+          province: "上海",
57
+          city: "普陀区",
58
+          address: "上海市普陀区金沙江路 1518 弄",
59
+          zip: 200333
60
+        },
61
+        {
62
+          date: "2016-05-01",
63
+          name: "王小虎",
64
+          province: "上海",
65
+          city: "普陀区",
66
+          address: "上海市普陀区金沙江路 1518 弄",
67
+          zip: 200333
68
+        },
69
+        {
70
+          date: "2016-05-08",
71
+          name: "王小虎",
72
+          province: "上海",
73
+          city: "普陀区",
74
+          address: "上海市普陀区金沙江路 1518 弄",
75
+          zip: 200333
76
+        },
77
+        {
78
+          date: "2016-05-06",
79
+          name: "王小虎",
80
+          province: "上海",
81
+          city: "普陀区",
82
+          address: "上海市普陀区金沙江路 1518 弄",
83
+          zip: 200333
84
+        },
85
+        {
86
+          date: "2016-05-07",
87
+          name: "王小虎",
88
+          province: "上海",
89
+          city: "普陀区",
90
+          address: "上海市普陀区金沙江路 1518 弄",
91
+          zip: 200333
92
+        }
93
+      ],
94
+      fluidPathType: [{ id: 1, name: "zs" }],
95
+      value: ""
96
+    };
97
+  }
98
+};
99
+</script>
100
+
101
+<style scoped></style>

File diff suppressed because it is too large
+ 675 - 216
src/xt_pages/management/home.vue