Pārlūkot izejas kodu

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

csx 5 gadus atpakaļ
vecāks
revīzija
1912a5bff6

+ 5 - 5
src/xt_pages/dialysis/details/DialysisPrescription.vue Parādīt failu

@@ -172,11 +172,11 @@
172 172
           <span class="content" v-if="getValueStr('anticoagulant','anticoagulant') != 1">{{anticoagulant_weichi != '0'?anticoagulant_weichi:""}}</span>
173 173
           <span class="content" v-if="getValueStr('anticoagulant','anticoagulant') == 1"></span>
174 174
 
175
-          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 2">{{anticoagulant_weichi != '0'?"iu":""}}</span>
176
-          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 3">{{anticoagulant_weichi != '0'?"iu":""}}</span>
177
-          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 1">{{anticoagulant_weichi != '0'?"mg":""}}</span>
178
-          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 4">{{anticoagulant_weichi != '0'?"mg":""}}</span>
179
-          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 5">{{anticoagulant_weichi != '0'?"ml":""}}</span>
175
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 2">{{anticoagulant_weichi != '0'?"iu/h":""}}</span>
176
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 3">{{anticoagulant_weichi != '0'?"iu/h":""}}</span>
177
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 1">{{anticoagulant_weichi != '0'?"mg/h":""}}</span>
178
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 4">{{anticoagulant_weichi != '0'?"mg/h":""}}</span>
179
+          <span class="unit" v-if="getValueStr('anticoagulant','anticoagulant') == 5">{{anticoagulant_weichi != '0'?"ml/h":""}}</span>
180 180
         </li>
181 181
 
182 182
         <li v-if="isShow('钙')">

+ 1 - 0
src/xt_pages/dialysis/details/NavIgation.vue Parādīt failu

@@ -67,6 +67,7 @@
67 67
                                   :admin_users="admin_users" :targetAdvices="longAdvices"
68 68
                                   :waitUploadAdvices="waitUploadAdvices" :is_open="is_open"
69 69
 
70
+
70 71
                                   :predialysis="predialysis_evaluation"
71 72
                                   :last_predialysis="last_predialysis_evaluation"
72 73
                                   :record="assessment_after_dislysis"

+ 37 - 35
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Parādīt failu

@@ -558,6 +558,9 @@
558 558
     name: 'dialysisPrescriptionDialog',
559 559
     components: { MsgTip },
560 560
     props: {
561
+      schedual: {
562
+        type: Object
563
+      },
561 564
       is_open: {
562 565
         type: Number,
563 566
         default: () => {
@@ -738,6 +741,11 @@
738 741
         default: () => {
739 742
           return { id: 0 }
740 743
         }
744
+      },last_prescription: {
745
+        type: Object,
746
+        default: () => {
747
+          return { id: 0 }
748
+        }
741 749
       },
742 750
 
743 751
     },
@@ -1985,6 +1993,32 @@
1985 1993
 
1986 1994
       var date = this.$route.query && this.$route.query.date
1987 1995
       this.record_date = uParseTime(date, '{y}-{m}-{d}')
1996
+
1997
+
1998
+
1999
+      if (this.prescription != null && typeof (this.prescription.id) != 'undefined' && this.prescription.id > 0) {
2000
+        for (const key in this.prescription) {
2001
+          this.dialysisPrescription[key] = this.prescription[key]
2002
+        }
2003
+      } else if (this.solution != null && typeof this.solution.id != 'undefined' && this.solution.id) {
2004
+        for (const key in this.solution) {
2005
+          if(key != "target_ultrafiltration") {
2006
+            this.dialysisPrescription[key] = this.solution[key]
2007
+          }
2008
+        }
2009
+      } else if (this.last_prescription != null && typeof this.last_prescription.id != 'undefined' && this.last_prescription.id) {
2010
+        for (const key in this.last_prescription) {
2011
+          if(key != "target_ultrafiltration") {
2012
+            this.dialysisPrescription[key] = this.last_prescription[key]
2013
+          }
2014
+        }
2015
+      } else {
2016
+        this.dialysisPrescription.mode_id = this.schedual.mode_id
2017
+
2018
+      }
2019
+
2020
+
2021
+
1988 2022
     },
1989 2023
     watch: {
1990 2024
       "dialysisPrescription.dialysis_duration_hour":function(){
@@ -2057,13 +2091,11 @@
2057 2091
         let  dialysis_duration_minute = 0
2058 2092
         let dialysis_duration_hour = 0
2059 2093
         let duration = 0
2060
-
2061 2094
         if (this.dialysisPrescription.dialysis_duration_minute == ''){
2062 2095
           dialysis_duration_minute = 0
2063 2096
         }else{
2064 2097
           dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
2065 2098
         }
2066
-
2067 2099
         if (this.dialysisPrescription.dialysis_duration_hour == ''){
2068 2100
           dialysis_duration_hour = 0
2069 2101
 
@@ -2073,10 +2105,6 @@
2073 2105
 
2074 2106
         }
2075 2107
         duration = parseFloat(dialysis_duration_hour) * 60 + parseFloat(dialysis_duration_minute)
2076
-
2077
-
2078
-        console.log(duration)
2079
-
2080 2108
         this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2081 2109
           this.dialysisPrescription.anticoagulant_shouji,
2082 2110
           duration,
@@ -2107,8 +2135,6 @@
2107 2135
         }
2108 2136
         duration = parseFloat(dialysis_duration_hour) * 60 + parseFloat(dialysis_duration_minute)
2109 2137
 
2110
-        console.log(duration)
2111
-
2112 2138
         this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2113 2139
           this.dialysisPrescription.anticoagulant_shouji,
2114 2140
           duration,
@@ -2123,25 +2149,16 @@
2123 2149
             this.dialysisPrescription[index] = this.prescription[index]
2124 2150
           }
2125 2151
 
2126
-          // console.log(this.prescription['dialysate_formulation'])
2127 2152
 
2128 2153
           if (this.prescription['dialysate_formulation'] == 0) {
2129 2154
             this.dialysisPrescription['dialysate_formulation'] = ''
2130 2155
           }
2131 2156
 
2132
-          // else{
2133
-          //   this.dialysisPrescription['dialysate_formulation']  = this.prescription['dialysate_formulation']
2134
-          //
2135
-          // }
2136
-          //
2137
-          //
2157
+
2138 2158
           if (this.prescription['anticoagulant'] == 0) {
2139 2159
             this.dialysisPrescription['anticoagulant'] = ''
2140 2160
           }
2141
-          // else{
2142
-          //   this.dialysisPrescription['anticoagulant']  = this.prescription['anticoagulant']
2143
-          //
2144
-          // }
2161
+
2145 2162
 
2146 2163
           if (this.prescription['dialysis_duration_hour'] == 0) {
2147 2164
             this.dialysisPrescription['dialysis_duration_hour'] = ''
@@ -2208,21 +2225,9 @@
2208 2225
             if (this.prescription['dialysate_formulation'] == 0) {
2209 2226
               this.dialysisPrescription['dialysate_formulation'] = ''
2210 2227
             }
2211
-
2212
-            // else{
2213
-            //   this.dialysisPrescription['dialysate_formulation']  = this.prescription['dialysate_formulation']+''
2214
-            //
2215
-            // }
2216
-            //
2217
-            //
2218 2228
             if (this.prescription['anticoagulant'] == 0) {
2219 2229
               this.dialysisPrescription['anticoagulant'] = ''
2220 2230
             }
2221
-            //
2222
-            // else{
2223
-            //   this.dialysisPrescription['anticoagulant']  = this.prescription['anticoagulant']+''
2224
-            //
2225
-            // }
2226 2231
 
2227 2232
             if (this.prescription['dialysis_duration_hour'] == 0) {
2228 2233
               this.dialysisPrescription['dialysis_duration_hour'] = ''
@@ -2286,10 +2291,7 @@
2286 2291
             if (this.solution['dialysate_formulation'] == 0) {
2287 2292
               this.dialysisPrescription['dialysate_formulation'] = ''
2288 2293
             }
2289
-            // else{
2290
-            //   this.dialysisPrescription['dialysate_formulation']  = this.solution['dialysate_formulation']+''
2291
-            //
2292
-            // }
2294
+
2293 2295
 
2294 2296
             if (this.solution['anticoagulant'] == 0) {
2295 2297
               this.dialysisPrescription['anticoagulant'] = ''

+ 8 - 5
src/xt_pages/role/components/AdminInfoForm.vue Parādīt failu

@@ -19,9 +19,9 @@
19 19
                     </el-select>
20 20
                 </el-form-item>
21 21
 
22
-                <el-form-item label="角色 : ">
22
+                <el-form-item label="角色 : " prop="role">
23 23
                     <el-select v-model="form.role" placeholder="角色">
24
-                        <el-option v-for="item in roles" :key="item.id" :label="item.name" :value="item.id"></el-option>
24
+                        <el-option v-for="(item,index) in roles" :key="index" :label="item.name" :value="item.id"></el-option>
25 25
                     </el-select>
26 26
                 </el-form-item>
27 27
 
@@ -107,11 +107,14 @@ export default {
107 107
       },
108 108
       rules: {
109 109
         mobile: [
110
-          { validator: checkMobile, trigger: 'blur' }
110
+          { required: true,validator: checkMobile, trigger: 'blur' }
111 111
         ],
112 112
         name: [
113
-          { validator: checkName, trigger: 'blur' }
114
-        ]
113
+          {required: true, validator: checkName, trigger: 'blur' }
114
+        ],
115
+        role: [
116
+          { required: true, message: '请选择角色', trigger: 'change' }
117
+        ],
115 118
       }
116 119
     }
117 120
   },

+ 24 - 16
src/xt_pages/role/components/EditAdminInfo.vue Parādīt failu

@@ -20,9 +20,9 @@
20 20
                     </el-select>
21 21
                 </el-form-item>
22 22
 
23
-                <el-form-item label="角色">
24
-                    <el-select v-model="form.role" placeholder="角色">
25
-                        <el-option v-for="item in roles" :key="item.id" :label="item.name" :value="item.id"></el-option>
23
+                <el-form-item label="角色" prop="role">
24
+                    <el-select v-model="form.role" placeholder="角色" >
25
+                        <el-option v-for="(item,index) in roles" :key="index" :label="item.name" :value="item.id"></el-option>
26 26
                     </el-select>
27 27
                 </el-form-item>
28 28
 
@@ -54,6 +54,7 @@ export default {
54 54
     },
55 55
     data() {
56 56
         var checkMobile = (rule, value, callback) => {
57
+           console.log(value)
57 58
             if (!value || value.length == 0) {
58 59
                 return callback(new Error('手机号不能为空'))
59 60
             }
@@ -109,7 +110,10 @@ export default {
109 110
                 ],
110 111
                 name: [
111 112
                     {validator: checkName, trigger: 'blur'}
112
-                ]
113
+                ],
114
+               role: [
115
+                  { required: true, message: '请选择角色', trigger: 'change' }
116
+                ],
113 117
             }
114 118
         }
115 119
     },
@@ -125,7 +129,6 @@ export default {
125 129
             this.loading = false
126 130
             return
127 131
         }
128
-
129 132
         this.form.id = this.admin_id
130 133
         if (this.admin_id === 0) {
131 134
             this.form.user_type = this.user_types[0].index
@@ -134,7 +137,9 @@ export default {
134 137
                 this.loading = false
135 138
                 var resp = rs.data
136 139
                 if (resp.state === 1) {
137
-                    this.roles.push(...resp.data.roles)
140
+                  this.roles = []
141
+
142
+                  this.roles.push(...resp.data.roles)
138 143
                     this.qntoken = resp.data.qntoken
139 144
                     if (this.roles.length > 0) {
140 145
                         this.form.role = this.roles[0].id
@@ -148,15 +153,14 @@ export default {
148 153
                 this.loading = false
149 154
                 this.$message.error(err)
150 155
             })
151
-            
152 156
         } else {
153
-            getModifyAdminInitData(this.form.id).then(rs => {
157
+          getModifyAdminInitData(this.form.id).then(rs => {
154 158
                 this.loading = false
155 159
                 var resp = rs.data
156 160
                 if (resp.state === 1) {
157
-                    this.roles.push(...resp.data.roles)
161
+                  this.roles = []
162
+                  this.roles.push(...resp.data.roles)
158 163
                     this.qntoken = resp.data.qntoken
159
-                    
160 164
                     var admin = resp.data.admin
161 165
                     this.form.name = admin.user_name
162 166
                     this.form.mobile = admin.mobile
@@ -164,11 +168,9 @@ export default {
164 168
                     this.form.user_title = admin.user_title
165 169
                     this.form.role = admin.role_id
166 170
                     this.form.intro = admin.intro
167
-                    
168 171
                 } else {
169 172
                     this.$message.error(resp.msg)
170 173
                 }
171
-
172 174
             }).catch(err => {
173 175
                 this.loading = false
174 176
                 this.$message.error(err)
@@ -180,6 +182,12 @@ export default {
180 182
             if (this.admin_id < 0) {
181 183
                 return
182 184
             }
185
+            console.log(this.form)
186
+
187
+            if (this.form.role <= 0 || this.form.role == '' ){
188
+              this.$message.error("请选择角色")
189
+              return
190
+            }
183 191
             this.$refs.form.validate((valid) => {
184 192
                 if (valid) {
185 193
                     this.loading = true
@@ -194,7 +202,7 @@ export default {
194 202
                                     _this.$store.dispatch('RecoverAdminsChangeState')
195 203
                                 }, 500)
196 204
                                 _this.$router.back(-1)
197
-                                
205
+
198 206
                             } else {
199 207
                                 this.$message.error(resp.msg)
200 208
                             }
@@ -203,7 +211,7 @@ export default {
203 211
                             this.loading = false
204 212
                             this.$message.error(err)
205 213
                         })
206
-                        
214
+
207 215
                     } else {
208 216
                         modifyAdmin(this.form.id, this.form.name, this.form.user_type, this.form.user_title, this.form.role, this.form.intro).then(rs => {
209 217
                             this.loading = false
@@ -215,7 +223,7 @@ export default {
215 223
                                     _this.$store.dispatch('RecoverAdminsChangeState')
216 224
                                 }, 500)
217 225
                                 _this.$router.back(-1)
218
-                                
226
+
219 227
                             } else {
220 228
                                 this.$message.error(resp.msg)
221 229
                             }
@@ -225,7 +233,7 @@ export default {
225 233
                             this.$message.error(err)
226 234
                         })
227 235
                     }
228
-                    
236
+
229 237
                 } else {
230 238
                     return false
231 239
                 }