28169 2 vuotta sitten
vanhempi
commit
b71443f0ec

+ 216 - 60
src/xt_pages/management/components/WaterFormList.vue Näytä tiedosto

@@ -1018,29 +1018,29 @@
1018 1018
             this.form.id = detail.id
1019 1019
             this.form.record_date = this.getTime(detail.record_date)
1020 1020
             this.form.machine_status = detail.machine_status.toString()
1021
-            this.form.fault_description = detail.fault_description
1022
-            this.form.water_pressure= detail.water_pressure
1023
-            this.form.water_conductivity = detail.water_conductivity
1024
-            this.form.temperature = detail.temperature
1021
+            this.form.fault_description = detail.fault_description?detail.fault_description:""
1022
+            this.form.water_pressure= detail.water_pressure? detail.water_pressure:""
1023
+            this.form.water_conductivity = detail.water_conductivity?detail.water_conductivity:""
1024
+            this.form.temperature = detail.temperature?detail.temperature:""
1025 1025
             this.form.force_pump_status = detail.force_pump_status.toString()
1026
-            this.form.first_ro_membrane_water = detail.first_ro_membrane_water
1027
-            this.form.first_ro_film_thick_water = detail.first_ro_film_thick_water
1028
-            this.form.first_ro_membrane_effluent = detail.first_ro_membrane_effluent
1029
-            this.form.first_production_of_water_conductivity = detail.first_production_of_water_conductivity
1030
-            this.form.first_water_yield = detail.first_water_yield
1031
-            this.form.last_ro_membrane_water = detail.last_ro_membrane_water
1032
-            this.form.last_ro_membrane_effluent  =detail.last_ro_membrane_effluent
1033
-            this.form.last_ro_film_thick_water = detail.last_ro_film_thick_water
1034
-            this.form.last_production_of_water_conductivity = detail.last_production_of_water_conductivity
1035
-            this.form.last_water_yield= detail.last_water_yield
1036
-            this.form.carbon_tank = detail.carbon_tank
1037
-            this.form.snd_tank = detail.snd_tank
1038
-            this.form.resin_tank = detail.resin_tank
1039
-            this.form.ultrafilter = detail.ultrafilter
1040
-            this.form.hardness_monitoring = detail.hardness_monitoring
1041
-            this.form.total_chlorine_detection= detail.total_chlorine_detection
1042
-            this.form.ph_detection = detail.ph_detection
1043
-            this.form.concentration_of_peroxyacetic_acid = detail.concentration_of_peroxyacetic_acid
1026
+            this.form.first_ro_membrane_water = detail.first_ro_membrane_water?detail.first_ro_film_thick_water:""
1027
+            this.form.first_ro_film_thick_water = detail.first_ro_film_thick_water?detail.first_ro_film_thick_water:""
1028
+            this.form.first_ro_membrane_effluent = detail.first_ro_membrane_effluent?detail.first_ro_membrane_effluent:""
1029
+            this.form.first_production_of_water_conductivity = detail.first_production_of_water_conductivity?detail.first_production_of_water_conductivity:""
1030
+            this.form.first_water_yield = detail.first_water_yield?detail.first_water_yield:""
1031
+            this.form.last_ro_membrane_water = detail.last_ro_membrane_water?detail.last_ro_membrane_water:""
1032
+            this.form.last_ro_membrane_effluent  = detail.last_ro_membrane_effluent?detail.last_ro_membrane_effluent:""
1033
+            this.form.last_ro_film_thick_water = detail.last_ro_film_thick_water?detail.last_ro_film_thick_water:""
1034
+            this.form.last_production_of_water_conductivity = detail.last_production_of_water_conductivity? detail.last_production_of_water_conductivity:""
1035
+            this.form.last_water_yield= detail.last_water_yield?detail.last_water_yield:""
1036
+            this.form.carbon_tank = detail.carbon_tank?detail.carbon_tank:""
1037
+            this.form.snd_tank = detail.snd_tank?detail.snd_tank:""
1038
+            this.form.resin_tank = detail.resin_tank?detail.resin_tank:""
1039
+            this.form.ultrafilter = detail.ultrafilter?detail.ultrafilter:""
1040
+            this.form.hardness_monitoring = detail.hardness_monitoring?detail.hardness_monitoring:""
1041
+            this.form.total_chlorine_detection= detail.total_chlorine_detection?detail.total_chlorine_detection:""
1042
+            this.form.ph_detection = detail.ph_detection?detail.ph_detection:""
1043
+            this.form.concentration_of_peroxyacetic_acid = detail.concentration_of_peroxyacetic_acid?detail.concentration_of_peroxyacetic_acid:""
1044 1044
             if(detail.reverse_osmosis_membrane_disinfection == 1){
1045 1045
               this.form.reverse_osmosis_membrane_disinfection  = true
1046 1046
             }else{
@@ -1052,12 +1052,12 @@
1052 1052
             }else{
1053 1053
               this.form.disinfection_of_water_pipeline = false
1054 1054
             }
1055
-            this.form.first_disinfection_method = detail.first_disinfection_method
1056
-            this.form.last_disinfection_method = detail.last_disinfection_method
1057
-            this.form.first_disinfection_time = detail.first_disinfection_time
1058
-            this.form.last_disinfection_time = detail.last_disinfection_time
1059
-            this.form.remark = detail.remark
1060
-            this.form.filter_replacement = detail.filter_replacement
1055
+            this.form.first_disinfection_method = detail.first_disinfection_method?detail.first_disinfection_method:""
1056
+            this.form.last_disinfection_method = detail.last_disinfection_method?detail.last_disinfection_method:""
1057
+            this.form.first_disinfection_time = detail.first_disinfection_time?detail.first_disinfection_time:""
1058
+            this.form.last_disinfection_time = detail.last_disinfection_time?detail.last_disinfection_time:""
1059
+            this.form.remark = detail.remark? detail.remark:""
1060
+            this.form.filter_replacement = detail.filter_replacement?detail.filter_replacement:""
1061 1061
             this.form.admin_user_id = detail.admin_user_id
1062 1062
             var adminRole = response.data.data.adminRole
1063 1063
             for(let i=0;i<adminRole.length;i++){
@@ -1073,8 +1073,14 @@
1073 1073
 
1074 1074
       UpdateDilaysisWater(formName){
1075 1075
         console.log("form",this.form,this.equimentid)
1076
-        this.form.force_pump_status = parseInt(this.form.force_pump_status)
1077
-        this.form.machine_status = parseInt(this.form.machine_status)
1076
+        if(this.form.force_pump_status!=""){
1077
+          this.form.force_pump_status = parseInt(this.form.force_pump_status)
1078
+        }
1079
+        if(this.form.machine_status!=""){
1080
+          this.form.machine_status = parseInt(this.form.machine_status)
1081
+        }
1082
+      
1083
+       
1078 1084
         if(this.form.reverse_osmosis_membrane_disinfection == true){
1079 1085
            this.form.reverse_osmosis_membrane_disinfection = 1
1080 1086
         }
@@ -1087,37 +1093,187 @@
1087 1093
         if(this.form.disinfection_of_water_pipeline == false){
1088 1094
           this.form.disinfection_of_water_pipeline = 2
1089 1095
         }
1096
+        if(this.form.water_conductivity!=""){
1097
+          this.form.water_conductivity = parseFloat(this.form.water_conductivity)== NaN ? 0:parseFloat(this.form.water_conductivity)
1098
+        }else{
1099
+           this.form.water_conductivity = 0 
1100
+        }
1101
+        
1102
+        if(this.form.water_pressure!=""){
1103
+          this.form.water_pressure = parseFloat(this.form.water_pressure) == NaN ? 0:parseFloat(this.form.water_pressure)
1104
+        }else{
1105
+            this.form.water_pressure=  0
1106
+        }
1107
+
1108
+        if(this.form.temperature!=""){
1109
+          this.form.temperature = parseFloat(this.form.temperature)== NaN ? 0:parseFloat(this.form.temperature)
1110
+        }else{
1111
+          this.form.temperature = 0    
1112
+        }
1113
+        
1114
+        if(this.form.force_pump_status!=""){
1115
+          this.form.force_pump_status = parseFloat(this.form.force_pump_status) ==  NaN ? 0: parseFloat(this.form.force_pump_status)
1116
+        }else{
1117
+            this.form.force_pump_status = 0
1118
+        }
1119
+        
1120
+        if(this.form.first_ro_membrane_water!=""){
1121
+          this.form.first_ro_membrane_water = parseFloat(this.form.first_ro_membrane_water) == NaN?0:parseFloat(this.form.first_ro_membrane_water)
1122
+        }else{
1123
+          this.form.first_ro_membrane_water = 0
1124
+        }
1125
+
1126
+        if(this.form.first_ro_film_thick_water!=""){
1127
+          this.form.first_ro_film_thick_water = parseFloat(this.form.first_ro_film_thick_water) ==NaN?0:parseFloat(this.form.first_ro_film_thick_water)
1128
+        }else{
1129
+          this.form.first_ro_film_thick_water = 0
1130
+        }
1131
+        
1132
+        if(this.form.first_ro_membrane_effluent!=""){
1133
+          this.form.first_ro_membrane_effluent =parseFloat(this.form.first_ro_membrane_effluent) == NaN?0:parseFloat(this.form.first_ro_membrane_effluent) 
1134
+        }else{
1135
+           this.form.first_ro_membrane_effluent = 0 
1136
+        }
1137
+
1138
+        if(this.form.first_production_of_water_conductivity!=""){
1139
+          this.form.first_production_of_water_conductivity = parseFloat(this.form.first_production_of_water_conductivity) == NaN?0: parseFloat(this.form.first_production_of_water_conductivity)
1140
+        }else{
1141
+          this.form.first_production_of_water_conductivity = 0
1142
+        }
1143
+        
1144
+        if(this.form.first_water_yield !=""){
1145
+           this.form.first_water_yield = parseFloat(this.form.first_water_yield) == NaN?0:parseFloat(this.form.first_water_yield)  
1146
+        }else{
1147
+            this.form.first_water_yield =0
1148
+        }
1149
+       
1150
+        if(this.form.last_ro_membrane_water!=""){
1151
+          this.form.last_ro_membrane_water = parseFloat(this.form.last_ro_membrane_water) ==NaN?0:parseFloat(this.form.last_ro_membrane_water)  
1152
+        }else{
1153
+          this.form.last_ro_membrane_water = 0
1154
+        }
1155
+      
1156
+        if(this.form.last_ro_membrane_effluent!=""){
1157
+          this.form.last_ro_membrane_effluent = parseFloat(this.form.last_ro_membrane_effluent) == NaN?0:parseFloat(this.form.last_ro_membrane_effluent)
1158
+        }else{
1159
+          this.form.last_ro_membrane_effluent = 0
1160
+        }
1161
+      
1162
+        if(this.form.last_ro_film_thick_water!=""){
1163
+            this.form.last_ro_film_thick_water = parseFloat(this.form.last_ro_film_thick_water) == NaN?0:parseFloat(this.form.last_ro_film_thick_water)
1164
+        }else{
1165
+          this.form.last_ro_film_thick_water = 0
1166
+        }
1167
+   
1168
+        if( this.form.last_production_of_water_conductivity!=""){
1169
+            this.form.last_production_of_water_conductivity = parseFloat(this.form.last_production_of_water_conductivity) == NaN?0:parseFloat(this.form.last_production_of_water_conductivity)
1170
+        }else{
1171
+            this.form.last_production_of_water_conductivity =0
1172
+        }
1173
+       
1174
+        if(this.form.last_water_yield!=""){
1175
+            this.form.last_water_yield = parseFloat(this.form.last_water_yield)==NaN?0: parseFloat(this.form.last_water_yield)
1176
+        }else{
1177
+            this.form.last_water_yield = 0
1178
+        }
1179
+
1180
+        if(this.form.carbon_tank!=""){
1181
+            this.form.carbon_tank = parseFloat(this.form.carbon_tank) == NaN?0:parseFloat(this.form.carbon_tank)
1182
+        }else{
1183
+            this.form.carbon_tank = 0
1184
+        }
1185
+        
1186
+        if( this.form.snd_tank!=""){
1187
+            this.form.snd_tank = parseFloat(this.form.snd_tank) == NaN?0:parseFloat(this.form.snd_tank)
1188
+        }else{
1189
+            this.form.snd_tank = 0
1190
+        }
1191
+         
1192
+        if(this.form.resin_tank!=""){
1193
+            this.form.resin_tank= parseFloat(this.form.resin_tank) ==NaN?0:parseFloat(this.form.resin_tank)
1194
+        }else{
1195
+            this.form.resin_tank= 0
1196
+        }
1197
+      
1198
+        if( this.form.ultrafilter!=""){
1199
+            this.form.ultrafilter = parseFloat(this.form.ultrafilter)== NaN?0:parseFloat(this.form.ultrafilter)
1200
+        }else{
1201
+          this.form.ultrafilter = 0
1202
+        }
1203
+        
1204
+        if(this.form.hardness_monitoring !=""){
1205
+            this.form.hardness_monitoring = parseFloat(this.form.hardness_monitoring) ==NaN?0: parseFloat(this.form.hardness_monitoring)
1206
+        }else{
1207
+           this.form.hardness_monitoring= 0
1208
+        }
1209
+
1210
+        if( this.form.total_chlorine_detection!=""){
1211
+            this.form.total_chlorine_detection = parseFloat(this.form.total_chlorine_detection)==NaN?0: parseFloat(this.form.total_chlorine_detection)
1212
+        }else{
1213
+            this.form.total_chlorine_detection = 0
1214
+        }
1215
+        
1216
+        if( this.form.ph_detection!=""){
1217
+            this.form.ph_detection = parseFloat(this.form.ph_detection) == NaN?0:parseFloat(this.form.ph_detection)
1218
+        }else{
1219
+            this.form.ph_detection = 0
1220
+        }
1221
+
1222
+        if(this.form.concentration_of_peroxyacetic_acid!="" ){
1223
+            this.form.concentration_of_peroxyacetic_acid = parseFloat(this.form.concentration_of_peroxyacetic_acid) == NaN?0: parseFloat(this.form.concentration_of_peroxyacetic_acid)   
1224
+        }else{
1225
+            this.form.concentration_of_peroxyacetic_acid = 0
1226
+        }
1090 1227
 
1091
-        this.form.water_conductivity = parseFloat(this.form.water_conductivity)
1092
-        this.form.water_pressure = parseFloat(this.form.water_pressure)
1093
-        this.form.temperature = parseFloat(this.form.temperature)
1094
-        this.form.force_pump_status = parseFloat(this.form.force_pump_status)
1095
-        this.form.first_ro_membrane_water = parseFloat(this.form.first_ro_membrane_water)
1096
-        this.form.first_ro_film_thick_water = parseFloat(this.form.first_ro_film_thick_water)
1097
-        this.form.first_ro_membrane_effluent =parseFloat(this.form.first_ro_membrane_effluent)
1098
-        this.form.first_production_of_water_conductivity = parseFloat(this.form.first_production_of_water_conductivity)
1099
-        this.form.first_water_yield = parseFloat(this.form.first_water_yield)
1100
-        this.form.last_ro_membrane_water = parseFloat(this.form.last_ro_membrane_water)
1101
-        this.form.last_ro_membrane_effluent = parseFloat(this.form.last_ro_membrane_effluent)
1102
-        this.form.last_ro_film_thick_water = parseFloat(this.form.last_ro_film_thick_water)
1103
-        this.form.last_production_of_water_conductivity = parseFloat(this.form.last_production_of_water_conductivity)
1104
-        this.form.last_water_yield = parseFloat(this.form.last_water_yield)
1105
-        this.form.carbon_tank = parseFloat(this.form.carbon_tank)
1106
-        this.form.snd_tank = parseFloat(this.form.snd_tank)
1107
-        this.form.resin_tank= parseFloat(this.form.resin_tank)
1108
-        this.form.ultrafilter = parseFloat(this.form.ultrafilter)
1109
-        this.form.hardness_monitoring = parseFloat(this.form.hardness_monitoring)
1110
-        this.form.total_chlorine_detection = parseFloat(this.form.total_chlorine_detection)
1111
-        this.form.ph_detection = parseFloat(this.form.ph_detection)
1112
-        this.form.concentration_of_peroxyacetic_acid = parseFloat(this.form.concentration_of_peroxyacetic_acid)
1113
-        this.form.reverse_osmosis_membrane_disinfection= parseFloat(this.form.reverse_osmosis_membrane_disinfection)
1114
-        this.form.first_disinfection_method = parseFloat(this.form.first_disinfection_method)
1115
-        this.form.last_disinfection_method = parseFloat(this.form.last_disinfection_method)
1116
-        this.form.first_disinfection_time = parseFloat(this.form.first_disinfection_time)
1117
-        this.form.last_disinfection_time = parseFloat(this.form.last_disinfection_time)
1118
-        this.form.filter_replacement = parseFloat(this.form.filter_replacement)
1119
-        this.form.admin_user_id = parseFloat(this.form.admin_user_id)
1120
-        this.form.disinfection_of_water_pipeline = parseFloat(this.form.disinfection_of_water_pipeline)
1228
+        if( this.form.reverse_osmosis_membrane_disinfection!=""){
1229
+            this.form.reverse_osmosis_membrane_disinfection= parseFloat(this.form.reverse_osmosis_membrane_disinfection) == NaN?0:parseFloat(this.form.reverse_osmosis_membrane_disinfection)
1230
+        }else{
1231
+            this.form.reverse_osmosis_membrane_disinfection=  0
1232
+        }
1233
+
1234
+        if(this.form.first_disinfection_method !=""){
1235
+            this.form.first_disinfection_method = parseFloat(this.form.first_disinfection_method) == NaN?0:parseFloat(this.form.first_disinfection_method)
1236
+        }else{
1237
+            this.form.first_disinfection_method = 0
1238
+        }
1239
+      
1240
+       
1241
+        if(this.form.last_disinfection_method !=""){
1242
+           this.form.last_disinfection_method = parseFloat(this.form.last_disinfection_method) == NaN?0:parseFloat(this.form.last_disinfection_method)
1243
+        }else{
1244
+            this.form.last_disinfection_method = 0
1245
+        }
1246
+       
1247
+        if(this.form.first_disinfection_time !=""){
1248
+          this.form.first_disinfection_time = parseFloat(this.form.first_disinfection_time) == NaN?0:parseFloat(this.form.first_disinfection_time)
1249
+        }else{
1250
+            this.form.first_disinfection_time = 0
1251
+        }
1252
+        
1253
+        if( this.form.last_disinfection_time!=""){
1254
+            this.form.last_disinfection_time = parseFloat(this.form.last_disinfection_time) == NaN?0:parseFloat(this.form.last_disinfection_time)
1255
+        }else{
1256
+            this.form.last_disinfection_time = 0  
1257
+        }
1258
+      
1259
+        if(this.form.filter_replacement!=""){
1260
+            this.form.filter_replacement = parseFloat(this.form.filter_replacement) == NaN?0:parseFloat(this.form.filter_replacement)
1261
+        }else{
1262
+            this.form.filter_replacement= 0
1263
+        }
1264
+
1265
+        if( this.form.admin_user_id != ""){
1266
+            this.form.admin_user_id = parseFloat(this.form.admin_user_id) == NaN?0:parseFloat(this.form.admin_user_id)
1267
+        }else{
1268
+            this.form.admin_user_id =0
1269
+        }
1270
+        
1271
+        if(this.form.disinfection_of_water_pipeline !=""){
1272
+            this.form.disinfection_of_water_pipeline = parseFloat(this.form.disinfection_of_water_pipeline) == NaN?0:parseFloat(this.form.disinfection_of_water_pipeline)
1273
+        }else{
1274
+            this.form.disinfection_of_water_pipeline =0
1275
+        }
1276
+      
1121 1277
          this.$refs[formName].validate((valid) => {
1122 1278
           if (valid) {
1123 1279
             UpdateDilaysisWater(this.form,this.equimentid).then(response=>{

+ 4 - 1
src/xt_pages/management/home.vue Näytä tiedosto

@@ -2868,7 +2868,7 @@ export default {
2868 2868
         },
2869 2869
         repirRules: {
2870 2870
           guarantee_date: [{ required: true, message: '请填写保修日期' }],
2871
-          fault_description: [{ required: true, message: '请填写故障描述' }]
2871
+          fault_description: [{ required: true, message: '请填写故障描述', trigger: ['blur', 'change']}]
2872 2872
         },
2873 2873
         ruleThree: {
2874 2874
           detection_unit: [{ required: true, message: '请填写检测单位' }],
@@ -3252,6 +3252,7 @@ export default {
3252 3252
           imageName: '',
3253 3253
           function_accessories_inspection:"",
3254 3254
           other_information:'',
3255
+          admin_user_id:this.$store.getters.xt_user.user.id,
3255 3256
         },
3256 3257
 
3257 3258
         filename: '',
@@ -4953,6 +4954,8 @@ export default {
4953 4954
                 this.guaForm.exclude = 0
4954 4955
                 this.guaForm.images = ''
4955 4956
                 this.guaForm.treatment_process = ''
4957
+                this.guaForm.function_accessories_inspection= ""
4958
+                this.guaForm.other_information= ""
4956 4959
                 this.classShow = false
4957 4960
                 this.guaForm.imageName = ''
4958 4961
               }