作者 xuqiang

提交

@@ -44,6 +44,9 @@ @@ -44,6 +44,9 @@
44 props:{ 44 props:{
45 keyList:{ 45 keyList:{
46 type:Array 46 type:Array
  47 + },
  48 + checkIndex:{
  49 + type:Number
47 } 50 }
48 }, 51 },
49 methods: { 52 methods: {
@@ -58,8 +61,9 @@ @@ -58,8 +61,9 @@
58 this.keyList[index].check = this.keyList[index].subKeyList[subIndex].check 61 this.keyList[index].check = this.keyList[index].subKeyList[subIndex].check
59 }, 62 },
60 showRecordMore(index){ 63 showRecordMore(index){
61 - this.keyList[index].more = !this.keyList[index].more  
62 - this.$emit('showRecordMore') 64 + /* this.keyList[index].moreInfo.LON = '111'
  65 + this.keyList[index].moreInfo.LAT = '222' */
  66 + this.$emit('showRecordMore',{checkIndex:this.checkIndex,keyIndex:index})
63 } 67 }
64 } 68 }
65 } 69 }
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 <view v-if="item.show" v-for="(subItem,subIndex) in item.subKeyList" :key="subIndex"> 15 <view v-if="item.show" v-for="(subItem,subIndex) in item.subKeyList" :key="subIndex">
16 <view class="subCheckWrap"> 16 <view class="subCheckWrap">
17 <view class="subCheckItem" @click="subItem.show = !subItem.show"> 17 <view class="subCheckItem" @click="subItem.show = !subItem.show">
18 - {{subItem.title}} 18 + {{subIndex + 1}}.{{subItem.title}}
19 <view class="subCheckRight"> 19 <view class="subCheckRight">
20 {{subItem.name}} 20 {{subItem.name}}
21 <image v-if="subItem.show" src="../static/image/icon_arrow_up.png" mode=""></image> 21 <image v-if="subItem.show" src="../static/image/icon_arrow_up.png" mode=""></image>
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 </view> 25 </view>
26 <view class="subRadioWrap" v-if="subItem.show" v-for="(thItem,thIndex) in subItem.thKeyList" :key="thIndex"> 26 <view class="subRadioWrap" v-if="subItem.show" v-for="(thItem,thIndex) in subItem.thKeyList" :key="thIndex">
27 <view class="subRadioItem"> 27 <view class="subRadioItem">
28 - {{thItem.title}} 28 + ({{thIndex + 1}}){{thItem.title}}
29 <view class="subRadioRight"> 29 <view class="subRadioRight">
30 <view class="yc" :class="{active:thItem.choose == 0}" @click="choose('yc',index,subIndex,thIndex)"> 30 <view class="yc" :class="{active:thItem.choose == 0}" @click="choose('yc',index,subIndex,thIndex)">
31 异常 31 异常
1 <template> 1 <template>
2 <view> 2 <view>
3 <!-- 顶部区域 --> 3 <!-- 顶部区域 -->
4 - <check-top-wrap @changeParamType="changeParamType" :yearVal="param.year" :keyword="keyword" :cityVal="param.basin" @showPicker="showPicker"></check-top-wrap> 4 + <check-top-wrap @changeParamType="changeParamType" :yearVal="param.year" :keyword="keyword" :cityVal="basinTxt" @showPicker="showPicker"></check-top-wrap>
5 <w-picker 5 <w-picker
6 :visible.sync="visibleYear" 6 :visible.sync="visibleYear"
7 mode="date" 7 mode="date"
@@ -55,11 +55,13 @@ @@ -55,11 +55,13 @@
55 export default { 55 export default {
56 data() { 56 data() {
57 return { 57 return {
  58 + basinTxt:'全流域',
58 param:{ 59 param:{
59 // 恢复位置 60 // 恢复位置
60 - // year:new Date().getFullYear().toString(),  
61 - // basin:'全流域',  
62 - type:'' 61 + year:new Date().getFullYear().toString(),
  62 + basin:'',
  63 + type:'',
  64 + companyName:this.$store.state.keyword
63 }, 65 },
64 list:[], 66 list:[],
65 visibleYear:false, 67 visibleYear:false,
@@ -92,14 +94,14 @@ @@ -92,14 +94,14 @@
92 geocode: true, 94 geocode: true,
93 success: (res) => { 95 success: (res) => {
94 this.param.basin = res.address.city 96 this.param.basin = res.address.city
  97 + this.basinTxt = res.address.city
95 this.defaultRegion = [res.address.province,res.address.city] 98 this.defaultRegion = [res.address.province,res.address.city]
96 } 99 }
97 }); 100 });
98 //#endif 101 //#endif
99 //#ifdef H5 102 //#ifdef H5
100 // 恢复位置 103 // 恢复位置
101 - // this.param.basin = '全流域'  
102 - // this.defaultRegion = ['全流域',''] 104 + this.defaultRegion = ['全流域','']
103 //#endif 105 //#endif
104 this.getData() 106 this.getData()
105 }, 107 },
@@ -121,11 +123,7 @@ @@ -121,11 +123,7 @@
121 }, 123 },
122 changeParamType(e){ 124 changeParamType(e){
123 if(e.tabIndex == -1){ 125 if(e.tabIndex == -1){
124 - this.param = {  
125 - year:new Date().getFullYear().toString(),  
126 - basin:'全流域',  
127 - type:''  
128 - } 126 + this.param.type = ''
129 this.getData() 127 this.getData()
130 }else{ 128 }else{
131 this.param.type = e.tabIndex.toString() 129 this.param.type = e.tabIndex.toString()
@@ -150,8 +148,10 @@ @@ -150,8 +148,10 @@
150 if(pickerType == 'region'){ 148 if(pickerType == 'region'){
151 if(e.obj.city.label != ''){ 149 if(e.obj.city.label != ''){
152 this.param.basin = e.obj.city.label 150 this.param.basin = e.obj.city.label
  151 + this.basinTxt = e.obj.city.label
153 }else{ 152 }else{
154 - this.param.basin = '全流域' 153 + this.param.basin = ''
  154 + this.basinTxt = '全流域'
155 } 155 }
156 } 156 }
157 this.getData() 157 this.getData()
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <view> 2 <view>
3 <view v-for="(item,index) in checkList" :key="index"> 3 <view v-for="(item,index) in checkList" :key="index">
4 <check-temp v-if="item.tempType == 'check'" :companyid="companyId" :checkIndex="index" :checkLength="checkList.length" :keyList="item.keyList"></check-temp> 4 <check-temp v-if="item.tempType == 'check'" :companyid="companyId" :checkIndex="index" :checkLength="checkList.length" :keyList="item.keyList"></check-temp>
5 - <radio-temp v-if="item.tempType == 'radio'" @showRecordMore="showRecordMore = true" :keyList="item.keyList"></radio-temp> 5 + <radio-temp v-if="item.tempType == 'radio'" :checkIndex="index" @showRecordMore="editRecordMore" :keyList="item.keyList"></radio-temp>
6 <type-radio-temp v-if="item.tempType == 'typeRadio'" :keyList="item.keyList"></type-radio-temp> 6 <type-radio-temp v-if="item.tempType == 'typeRadio'" :keyList="item.keyList"></type-radio-temp>
7 <sub-radio-temp v-if="item.tempType == 'subRadio'" :keyList="item.keyList"></sub-radio-temp> 7 <sub-radio-temp v-if="item.tempType == 'subRadio'" :keyList="item.keyList"></sub-radio-temp>
8 </view> 8 </view>
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 记录更多 19 记录更多
20 </view> 20 </view>
21 <view class="recordTypeList"> 21 <view class="recordTypeList">
22 - <view class="recordTypeItem"> 22 + <view class="recordTypeItem" @click="getLocation">
23 <view class="typeImg"> 23 <view class="typeImg">
24 <image src="../../../static/image/icon_loc.png" mode=""></image> 24 <image src="../../../static/image/icon_loc.png" mode=""></image>
25 </view> 25 </view>
@@ -72,7 +72,9 @@ @@ -72,7 +72,9 @@
72 param:{}, 72 param:{},
73 pdoCd:'', 73 pdoCd:'',
74 showRecordMore:false, 74 showRecordMore:false,
75 - checkList:[] 75 + checkList:[],
  76 + checkIndex:0,
  77 + keyIndex:0,
76 } 78 }
77 }, 79 },
78 components:{ 80 components:{
@@ -899,58 +901,7 @@ @@ -899,58 +901,7 @@
899 pdoType:'1', 901 pdoType:'1',
900 organization:0, 902 organization:0,
901 type:'airpull', 903 type:'airpull',
902 - subKeyList:[  
903 - {  
904 - title:'1.pH',  
905 - code:'fs_dw_ph',  
906 - name:'自动'  
907 - },  
908 - {  
909 - title:'2.色度',  
910 - code:'fs_dw_sd',  
911 - name:'手工'  
912 - },  
913 - {  
914 - title:'3.悬浮物',  
915 - code:'fs_dw_xfw',  
916 - name:'手工'  
917 - },  
918 - {  
919 - title:'4.五日生化需氧量',  
920 - code:'fs_dw_wrshxyl',  
921 - name:'手工'  
922 - },  
923 - {  
924 - title:'5.化学需氧量(COD)',  
925 - code:'fs_dw_hxxyl',  
926 - name:'自动'  
927 - },  
928 - {  
929 - title:'6.氨氮',  
930 - code:'fs_dw_ad',  
931 - name:'自动'  
932 - },  
933 - {  
934 - title:'7.总氨',  
935 - code:'fs_dw_zd',  
936 - name:'自动'  
937 - },  
938 - {  
939 - title:'8.总磷',  
940 - code:'fs_dw_zl',  
941 - name:'自动'  
942 - },  
943 - {  
944 - title:'9.可吸附有机卤素',  
945 - code:'fs_dw_kxfyjls',  
946 - name:'自动'  
947 - },  
948 - {  
949 - title:'10.二噁英',  
950 - code:'fs_dw_eey',  
951 - name:'自动'  
952 - }  
953 - ] 904 + subKeyList:[]
954 } 905 }
955 ] 906 ]
956 }, 907 },
@@ -980,188 +931,12 @@ @@ -980,188 +931,12 @@
980 ] 931 ]
981 } 932 }
982 933
983 - //PH、化学需氧量(COD)、氨氮、总氮、总磷、可吸附有机卤素、二噁英  
984 - if(this.code == 'fs_dw_ph' || this.code == 'fs_dw_hxxyl' || this.code == 'fs_dw_ad' || this.code == 'fs_dw_zd' || this.code == 'fs_dw_zl' || this.code == 'fs_dw_kxfyjls' || this.code == 'fs_dw_eey'){  
985 - this.checkList = [  
986 - {  
987 - tempType:'radio',  
988 - keyList:[  
989 - {  
990 - title:'一.仪器名称',  
991 - moreBtn:false,  
992 - more:false,  
993 - check:-1,  
994 - last:false,  
995 - subKeyList:[  
996 - {  
997 - title:'异常',  
998 - check:0  
999 - },  
1000 - {  
1001 - title:'一致',  
1002 - check:1  
1003 - }  
1004 - ]  
1005 - },  
1006 - {  
1007 - title:'二.安装位置',  
1008 - moreBtn:false,  
1009 - more:false,  
1010 - check:-1,  
1011 - last:false,  
1012 - subKeyList:[  
1013 - {  
1014 - title:'异常',  
1015 - check:0  
1016 - },  
1017 - {  
1018 - title:'一致',  
1019 - check:1  
1020 - }  
1021 - ]  
1022 - },  
1023 - {  
1024 - title:'三.是否联网',  
1025 - moreBtn:false,  
1026 - more:false,  
1027 - check:-1,  
1028 - last:false,  
1029 - subKeyList:[  
1030 - {  
1031 - title:'否',  
1032 - check:0  
1033 - },  
1034 - {  
1035 - title:'是',  
1036 - check:1  
1037 - }  
1038 - ]  
1039 - },  
1040 - {  
1041 - title:'四.是否符合要求',  
1042 - moreBtn:false,  
1043 - check:-1,  
1044 - more:false,  
1045 - last:false,  
1046 - subKeyList:[  
1047 - {  
1048 - title:'否',  
1049 - check:0  
1050 - },  
1051 - {  
1052 - title:'是',  
1053 - check:1  
1054 - }  
1055 - ]  
1056 - },  
1057 - {  
1058 - title:'五.对比手工数据',  
1059 - moreBtn:false,  
1060 - check:-1,  
1061 - more:false,  
1062 - last:true,  
1063 - subKeyList:[  
1064 - {  
1065 - title:'异常',  
1066 - check:0  
1067 - },  
1068 - {  
1069 - title:'一致',  
1070 - check:1  
1071 - }  
1072 - ]  
1073 - }  
1074 - ]  
1075 - }  
1076 - ]  
1077 - }  
1078 -  
1079 - //色度、悬浮物、五日生化需氧量  
1080 - if(this.code == 'fs_dw_sd' || this.code == 'fs_dw_xfw' || this.code == 'fs_dw_wrshxyl'){  
1081 - let title = ''  
1082 - if(this.code == 'fs_dw_sd'){  
1083 - title = '色度'  
1084 - }else if(this.code == 'fs_dw_xfw'){  
1085 - title = '悬浮物'  
1086 - }else if(this.code == 'fs_dw_wrshxyl'){  
1087 - title = '五日生化需氧量'  
1088 - }  
1089 - uni.setNavigationBarTitle({  
1090 - title:title  
1091 - }) 934 + //废水-排口-监测内容
  935 + if(this.param.code == 'fs_pk_jcnr'){
1092 this.checkList = [ 936 this.checkList = [
1093 { 937 {
1094 tempType:'radio', 938 tempType:'radio',
1095 - keyList:[  
1096 - {  
1097 - title:'一.采样方法',  
1098 - moreBtn:false,  
1099 - more:false,  
1100 - check:-1,  
1101 - last:false,  
1102 - subKeyList:[  
1103 - {  
1104 - title:'异常',  
1105 - check:0  
1106 - },  
1107 - {  
1108 - title:'一致',  
1109 - check:1  
1110 - }  
1111 - ]  
1112 - },  
1113 - {  
1114 - title:'二.采样个数',  
1115 - moreBtn:false,  
1116 - more:false,  
1117 - check:-1,  
1118 - last:false,  
1119 - subKeyList:[  
1120 - {  
1121 - title:'异常',  
1122 - check:0  
1123 - },  
1124 - {  
1125 - title:'一致',  
1126 - check:1  
1127 - }  
1128 - ]  
1129 - },  
1130 - {  
1131 - title:'三.监测频次',  
1132 - moreBtn:false,  
1133 - check:-1,  
1134 - more:false,  
1135 - last:false,  
1136 - subKeyList:[  
1137 - {  
1138 - title:'异常',  
1139 - check:0  
1140 - },  
1141 - {  
1142 - title:'一致',  
1143 - check:1  
1144 - }  
1145 - ]  
1146 - },  
1147 - {  
1148 - title:'四.测定方法',  
1149 - moreBtn:false,  
1150 - check:-1,  
1151 - more:false,  
1152 - last:false,  
1153 - subKeyList:[  
1154 - {  
1155 - title:'异常',  
1156 - check:0  
1157 - },  
1158 - {  
1159 - title:'一致',  
1160 - check:1  
1161 - }  
1162 - ]  
1163 - }  
1164 - ] 939 + keyList:[]
1165 } 940 }
1166 ] 941 ]
1167 } 942 }
@@ -1216,7 +991,7 @@ @@ -1216,7 +991,7 @@
1216 } 991 }
1217 992
1218 //废气-排口、厂界 993 //废气-排口、厂界
1219 - if(this.code == 'fq_pc'){ 994 + if(this.param.code == 'fq_pc'){
1220 this.checkList = [ 995 this.checkList = [
1221 { 996 {
1222 tempType:'radio', 997 tempType:'radio',
@@ -1265,77 +1040,7 @@ @@ -1265,77 +1040,7 @@
1265 { 1040 {
1266 title:'三.监测内容', 1041 title:'三.监测内容',
1267 show:false, 1042 show:false,
1268 - subKeyList:[  
1269 - {  
1270 - title:'1.硫化氢',  
1271 - show:false,  
1272 - name:'手工',  
1273 - thKeyList:[  
1274 - {  
1275 - title:'(1) 采样方法',  
1276 - choose:-1  
1277 - },  
1278 - {  
1279 - title:'(2) 采样个数',  
1280 - choose:-1  
1281 - },  
1282 - {  
1283 - title:'(4) 监测频次',  
1284 - choose:-1  
1285 - },  
1286 - {  
1287 - title:'(5) 测定方法',  
1288 - choose:-1  
1289 - }  
1290 - ]  
1291 - },  
1292 - {  
1293 - title:'2.臭气浓度',  
1294 - name:'手工',  
1295 - show:false,  
1296 - thKeyList:[  
1297 - {  
1298 - title:'(1) 采样方法',  
1299 - choose:-1  
1300 - },  
1301 - {  
1302 - title:'(2) 采样个数',  
1303 - choose:-1  
1304 - },  
1305 - {  
1306 - title:'(4) 监测频次',  
1307 - choose:-1  
1308 - },  
1309 - {  
1310 - title:'(5) 测定方法',  
1311 - choose:-1  
1312 - }  
1313 - ]  
1314 - },  
1315 - {  
1316 - title:'3.氨 (氨气)',  
1317 - name:'手工',  
1318 - show:false,  
1319 - thKeyList:[  
1320 - {  
1321 - title:'(1) 采样方法',  
1322 - choose:-1  
1323 - },  
1324 - {  
1325 - title:'(2) 采样个数',  
1326 - choose:-1  
1327 - },  
1328 - {  
1329 - title:'(4) 监测频次',  
1330 - choose:-1  
1331 - },  
1332 - {  
1333 - title:'(5) 测定方法',  
1334 - choose:-1  
1335 - }  
1336 - ]  
1337 - }  
1338 - ] 1043 + subKeyList:[]
1339 } 1044 }
1340 ] 1045 ]
1341 }, 1046 },
@@ -1345,7 +1050,7 @@ @@ -1345,7 +1050,7 @@
1345 { 1050 {
1346 titleDesc:'四.', 1051 titleDesc:'四.',
1347 title:'纸质保存三年', 1052 title:'纸质保存三年',
1348 - moreBtn:true,//是否显示更多按钮 1053 + moreBtn:false,//是否显示更多按钮
1349 check:-1, 1054 check:-1,
1350 moreInfo:{}, 1055 moreInfo:{},
1351 last:true, 1056 last:true,
@@ -1725,47 +1430,17 @@ @@ -1725,47 +1430,17 @@
1725 title:'产排污环节对应排放口' 1430 title:'产排污环节对应排放口'
1726 }) 1431 })
1727 } 1432 }
1728 - //水污染情况-排口、大气污染情况-排口、厂界、委托处置、废水-排口、废水-排口、厂界  
1729 - if(this.param.code == 'swrqk_pk' || this.param.code == 'dqwrqk_pc' || this.param.code == 'wtcz' || this.param.code == 'fs_pk' || this.param.code == 'fs_pc'){ 1433 + //水污染情况-排口、大气污染情况-排口、厂界、委托处置、废水-排口、废气-排口、厂界
  1434 + if(this.param.code == 'swrqk_pk' || this.param.code == 'dqwrqk_pc' || this.param.code == 'wtcz' || this.param.code == 'fs_pk' || this.param.code == 'fq_pc'){
1730 uni.setNavigationBarTitle({ 1435 uni.setNavigationBarTitle({
1731 title:this.param.pdoCd 1436 title:this.param.pdoCd
1732 }) 1437 })
1733 } 1438 }
1734 1439
1735 - //PH、化学需氧量(COD)、氨氮、总氮、总磷、可吸附有机卤素、二噁英  
1736 - if(this.code == 'fs_dw_ph' || this.code == 'fs_dw_hxxyl' || this.code == 'fs_dw_ad' || this.code == 'fs_dw_zd' || this.code == 'fs_dw_zl' || this.code == 'fs_dw_kxfyjls' || this.code == 'fs_dw_eey'){  
1737 - let title = ''  
1738 - if(this.code == 'fs_dw_ph'){  
1739 - title = 'pH'  
1740 - }else if(this.code == 'fs_dw_hxxyl'){  
1741 - title = '化学需氧量(COD)'  
1742 - }else if(this.code == 'fs_dw_ad'){  
1743 - title = '氨氮'  
1744 - }else if(this.code == 'fs_dw_zd'){  
1745 - title = '总氮'  
1746 - }else if(this.code == 'fs_dw_zl'){  
1747 - title = '总磷'  
1748 - }else if(this.code == 'fs_dw_kxfyjls'){  
1749 - title = '可吸附有机卤素'  
1750 - }else if(this.code == 'fs_dw_eey'){  
1751 - title = '二噁英'  
1752 - }  
1753 - uni.setNavigationBarTitle({  
1754 - title:title  
1755 - })  
1756 - }  
1757 - //色度、悬浮物、五日生化需氧量  
1758 - if(this.code == 'fs_dw_sd' || this.code == 'fs_dw_xfw' || this.code == 'fs_dw_wrshxyl'){  
1759 - let title = ''  
1760 - if(this.code == 'fs_dw_sd'){  
1761 - title = '色度'  
1762 - }else if(this.code == 'fs_dw_xfw'){  
1763 - title = '悬浮物'  
1764 - }else if(this.code == 'fs_dw_wrshxyl'){  
1765 - title = '五日生化需氧量'  
1766 - } 1440 + //废水-排口-监测内容
  1441 + if(this.param.code == 'fs_pk_jcnr'){
1767 uni.setNavigationBarTitle({ 1442 uni.setNavigationBarTitle({
1768 - title:title 1443 + title:this.param.navBarTitle
1769 }) 1444 })
1770 } 1445 }
1771 1446
@@ -1819,6 +1494,7 @@ @@ -1819,6 +1494,7 @@
1819 for(var i = 0; i < this.checkList[k].keyList.length; i++){ 1494 for(var i = 0; i < this.checkList[k].keyList.length; i++){
1820 for(var j = 0; j < res.data.data.length; j ++){ 1495 for(var j = 0; j < res.data.data.length; j ++){
1821 if(this.checkList[k].keyList[i].title == res.data.data[j].FIELDCN){ 1496 if(this.checkList[k].keyList[i].title == res.data.data[j].FIELDCN){
  1497 + this.checkList[k].keyList[i].id = res.data.data[j].ID
1822 if(res.data.data[j].FILEDSTATICS){ 1498 if(res.data.data[j].FILEDSTATICS){
1823 this.checkList[k].keyList[i].check = parseInt(res.data.data[j].FILEDSTATICS) 1499 this.checkList[k].keyList[i].check = parseInt(res.data.data[j].FILEDSTATICS)
1824 }else{ 1500 }else{
@@ -1851,7 +1527,14 @@ @@ -1851,7 +1527,14 @@
1851 for(var j = 0; j < this.checkList[i].keyList.length; j ++){ 1527 for(var j = 0; j < this.checkList[i].keyList.length; j ++){
1852 var keyList = this.checkList[i].keyList[j] 1528 var keyList = this.checkList[i].keyList[j]
1853 var type = keyList.type 1529 var type = keyList.type
1854 - var code = this.param.code == 'swrqk' ? 'swrqk_pk' : this.param.code == 'gtfwpf' ? 'wtcz' : 'dqwrqk_pc' 1530 + var code = ''
  1531 + switch(this.param.code){
  1532 + case 'swrqk' : code = 'swrqk_pk'; break;
  1533 + case 'dqwrqk' : code = 'dqwrqk_pc'; break;
  1534 + case 'gtfwpf' : code = 'wtcz'; break;
  1535 + case 'fs' : code = 'fs_pk'; break;
  1536 + default : code = 'fq_pc'; break;
  1537 + }
1855 uni.request({ 1538 uni.request({
1856 url:this.apiUrl + 'license/pdos', 1539 url:this.apiUrl + 'license/pdos',
1857 method:'get', 1540 method:'get',
@@ -1888,6 +1571,7 @@ @@ -1888,6 +1571,7 @@
1888 for(var i = 0; i < this.checkList[k].keyList.length; i++){ 1571 for(var i = 0; i < this.checkList[k].keyList.length; i++){
1889 for(var j = 0; j < res.data.data.base.length; j ++){ 1572 for(var j = 0; j < res.data.data.base.length; j ++){
1890 if(this.checkList[k].keyList[i].title == res.data.data.base[j].FIELDCN){ 1573 if(this.checkList[k].keyList[i].title == res.data.data.base[j].FIELDCN){
  1574 + this.checkList[k].keyList[i].id = res.data.data.base[j].ID
1891 if(this.checkList[k].keyList[i].title == '受纳自然水体'){ 1575 if(this.checkList[k].keyList[i].title == '受纳自然水体'){
1892 this.checkList[k].keyList[i].subKeyList = res.data.data.snst 1576 this.checkList[k].keyList[i].subKeyList = res.data.data.snst
1893 } 1577 }
@@ -2069,11 +1753,355 @@ @@ -2069,11 +1753,355 @@
2069 }) 1753 })
2070 } 1754 }
2071 1755
  1756 + //废水-排口
  1757 + if(this.param.code == 'fs_pk'){
  1758 + uni.request({
  1759 + url:this.apiUrl + 'license/selfWater',
  1760 + method:'get',
  1761 + data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
  1762 + success: (res) => {
  1763 + console.log('废水-排口',res)
  1764 + for(var k = 0; k < this.checkList.length; k ++){
  1765 + if(this.checkList[k].tempType == 'radio'){
  1766 + for(var i = 0; i < this.checkList[k].keyList.length; i++){
  1767 + for(var j = 0; j < res.data.data.length; j ++){
  1768 + if(this.checkList[k].keyList[i].title == res.data.data[j].FIELDCN){
  1769 + if(res.data.data[j].FILEDSTATICS){
  1770 + this.checkList[k].keyList[i].check = parseInt(res.data.data[j].FILEDSTATICS)
  1771 + }else{
  1772 + this.checkList[k].keyList[i].check = -1
  1773 + }
  1774 + if(res.data.data[j].IMGS){
  1775 + this.checkList[k].keyList[i].moreInfo.IMGS = res.data.data[j].IMGS
  1776 + }
  1777 + if(res.data.data[j].NOTE){
  1778 + this.checkList[k].keyList[i].moreInfo.NOTE = res.data.data[j].NOTE
  1779 + }
  1780 + if(res.data.data[j].LON){
  1781 + this.checkList[k].keyList[i].moreInfo.LON = res.data.data[j].LON
  1782 + this.checkList[k].keyList[i].moreInfo.LAT = res.data.data[j].LAT
  1783 + }
  1784 + break;
  1785 + }
  1786 + }
  1787 + }
  1788 + }
  1789 + if(this.checkList[k].tempType == 'check'){
  1790 + for(var i = 0; i < this.checkList[k].keyList.length; i++){
  1791 + for(var j = 0; j < res.data.data.length; j ++){
  1792 + console.log(this.checkList[k].keyList[i].title,res.data.data[j].FIELDCN)
  1793 + if(this.checkList[k].keyList[i].title == '三.监测内容' && res.data.data[j].FIELDCN =='监测内容'){
  1794 + var keyList = this.checkList[k].keyList[i]
  1795 + uni.request({
  1796 + url:this.apiUrl + 'license/selfMonitInfo',
  1797 + method:'get',
  1798 + data:{id:res.data.data[j].ID},
  1799 + success: (res) => {
  1800 + console.log('废水-排口-监测内容',res)
  1801 + for(var l = 0; l < res.data.data.length; l ++){
  1802 + keyList.subKeyList.push({
  1803 + title:res.data.data[l].FIELDCN,
  1804 + param:JSON.stringify({id:res.data.data[l].ID,code:'fs_pk_jcnr',navBarTitle:res.data.data[l].FIELDCN}),
  1805 + name:res.data.data[l].CONTENT
  1806 + })
  1807 + }
  1808 + }
  1809 + })
  1810 + break
  1811 + }
  1812 + }
  1813 + }
  1814 + }
  1815 + }
  1816 + }
  1817 + })
  1818 + }
  1819 +
  1820 + //废水-排口-监测内容
  1821 + if(this.param.code == 'fs_pk_jcnr'){
  1822 + uni.request({
  1823 + url:this.apiUrl + 'license/selfMonitValue',
  1824 + method:'get',
  1825 + data:{id:this.param.id},
  1826 + success: (res) => {
  1827 + for(var j = 0; j < res.data.data.length; j ++){
  1828 + var check = -1
  1829 + var moreInfo = {}
  1830 + var titleDesc = ''
  1831 + var last = false
  1832 + var subKeyList = [
  1833 + {
  1834 + title:'异常',
  1835 + check:0
  1836 + },
  1837 + {
  1838 + title:'一致',
  1839 + check:1
  1840 + }
  1841 + ]
  1842 + if(res.data.data[j].FILEDSTATICS){
  1843 + check = parseInt(res.data.data[j].FILEDSTATICS)
  1844 + }
  1845 + if(res.data.data[j].IMGS){
  1846 + moreInfo.IMGS = res.data.data[j].IMGS
  1847 + }
  1848 + if(res.data.data[j].NOTE){
  1849 + moreInfo.NOTE = res.data.data[j].NOTE
  1850 + }
  1851 + if(res.data.data[j].LON){
  1852 + moreInfo.LON = res.data.data[j].LON
  1853 + moreInfo.LAT = res.data.data[j].LAT
  1854 + }
  1855 +
  1856 +
  1857 + if(j == res.data.data.length - 1){
  1858 + last = true
  1859 + }
  1860 + if(res.data.data[j].FIELDCN == '是否联网' || res.data.data[j].FIELDCN == '是否符合要求'){
  1861 + subKeyList = [
  1862 + {
  1863 + title:'否',
  1864 + check:0
  1865 + },
  1866 + {
  1867 + title:'是',
  1868 + check:1
  1869 + }
  1870 + ]
  1871 + }
  1872 + switch(j){
  1873 + case 0 : titleDesc = '一.'; break;
  1874 + case 1 : titleDesc = '二.'; break;
  1875 + case 2 : titleDesc = '三.'; break;
  1876 + case 3 : titleDesc = '四.'; break;
  1877 + case 4 : titleDesc = '五.'; break;
  1878 + case 5 : titleDesc = '六.'; break;
  1879 + default : titleDesc = '七.'; break;
  1880 + }
  1881 + this.checkList[0].keyList.push({
  1882 + id:res.data.data[j].ID,
  1883 + titleDesc:titleDesc,
  1884 + title:res.data.data[j].FIELDCN,
  1885 + moreBtn:false,
  1886 + moreInfo:moreInfo,
  1887 + check:check,
  1888 + last:last,
  1889 + subKeyList:subKeyList
  1890 + })
  1891 + }
  1892 + }
  1893 + })
  1894 + }
  1895 +
  1896 + //废气-排口、厂界
  1897 + if(this.param.code == 'fq_pc'){
  1898 + uni.request({
  1899 + url:this.apiUrl + 'license/selfGas',
  1900 + method:'get',
  1901 + data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
  1902 + success: (res) => {
  1903 + console.log('废气-排口、厂界',res)
  1904 + for(var k = 0; k < this.checkList.length; k ++){
  1905 + if(this.checkList[k].tempType == 'radio'){
  1906 + for(var i = 0; i < this.checkList[k].keyList.length; i++){
  1907 + for(var j = 0; j < res.data.data.length; j ++){
  1908 + if(this.checkList[k].keyList[i].title == res.data.data[j].FIELDCN){
  1909 + this.checkList[k].keyList[i].id = res.data.data[j].ID
  1910 + if(res.data.data[j].FILEDSTATICS){
  1911 + this.checkList[k].keyList[i].check = parseInt(res.data.data[j].FILEDSTATICS)
  1912 + }else{
  1913 + this.checkList[k].keyList[i].check = -1
  1914 + }
  1915 +
  1916 + if(res.data.data[j].IMGS != undefined && res.data.data[j].IMGS.length > 0){
  1917 + this.checkList[k].keyList[i].moreInfo.IMGS = res.data.data[j].IMGS
  1918 + }
  1919 + if(res.data.data[j].NOTE){
  1920 + this.checkList[k].keyList[i].moreInfo.NOTE = res.data.data[j].NOTE
  1921 + }
  1922 + if(res.data.data[j].LON){
  1923 + this.checkList[k].keyList[i].moreInfo.LON = res.data.data[j].LON
  1924 + this.checkList[k].keyList[i].moreInfo.LAT = res.data.data[j].LAT
  1925 + }
  1926 + break;
  1927 + }
  1928 + }
  1929 + }
  1930 + }
  1931 + if(this.checkList[k].tempType == 'subRadio'){
  1932 + for(var i = 0; i < this.checkList[k].keyList.length; i++){
  1933 + console.log('res.data.data',res.data.data.length)
  1934 + for(var j = 0; j < res.data.data.length; j ++){
  1935 + console.log(this.checkList[k].keyList[i].title,res.data.data[j].FIELDCN)
  1936 + if(this.checkList[k].keyList[i].title == '三.监测内容' && res.data.data[j].FIELDCN =='监测内容'){
  1937 + var keyList = this.checkList[k].keyList[i]
  1938 + uni.request({
  1939 + url:this.apiUrl + 'license/selfMonitInfo',
  1940 + method:'get',
  1941 + data:{id:res.data.data[j].ID},
  1942 + success: (subKeyRes) => {
  1943 + console.log('废气-排口-监测内容',subKeyRes)
  1944 + for(var l = 0; l < subKeyRes.data.data.length; l ++){
  1945 + this.setSubKeyList(subKeyRes.data.data[l],keyList)
  1946 + }
  1947 + }
  1948 + })
  1949 + break
  1950 + }
  1951 + }
  1952 + }
  1953 + }
  1954 + }
  1955 + }
  1956 + })
  1957 + }
  1958 +
  1959 +
  1960 + },
  1961 + getLocation(){
  1962 + console.log('111')
2072 1963
  1964 + uni.getLocation({
  1965 + type: 'wgs84',
  1966 + success: (res) => {
  1967 + var moreInfo = {
  1968 + LAT : res.latitude,
  1969 + LON : res.longitude
  1970 + }
  1971 + this.checkList[this.checkIndex].keyList[this.keyIndex].moreInfo = moreInfo
  1972 + console.log(this.checkList[this.checkIndex].keyList[this.keyIndex])
  1973 + this.showRecordMore = false
  1974 + }
  1975 + });
2073 1976
2074 }, 1977 },
  1978 + editRecordMore(e){
  1979 + console.log('e',e)
  1980 + this.checkIndex = e.checkIndex
  1981 + this.keyIndex = e.keyIndex
  1982 + this.showRecordMore = true
  1983 + // this.checkList[e.checkIndex].keyList[e.keyIndex].
  1984 + },
  1985 + async setSubKeyList(subKeyObj,keyList){
  1986 + var subKey = {
  1987 + title:subKeyObj.FIELDCN,
  1988 + show:false,
  1989 + name:subKeyObj.CONTENT,
  1990 + thKeyList:(await this.getSubKeyList(subKeyObj.ID)).thKeyList
  1991 + }
  1992 + keyList.subKeyList.push(subKey)
  1993 + console.log('keyList',keyList)
  1994 + },
  1995 + getSubKeyList(id){
  1996 + return new Promise((resolve,reject) => {
  1997 + uni.request({
  1998 + url:this.apiUrl + 'license/selfMonitValue',
  1999 + method:'get',
  2000 + data:{id:id},
  2001 + success: (res) => {
  2002 + console.log('废气-排口-监测内容-子项',res)
  2003 + var thKeyList = []
  2004 + for(var i = 0; i < res.data.data.length; i ++){
  2005 + var choose = -1
  2006 + if(res.data.data[i].FILEDSTATICS){
  2007 + choose = parseInt(res.data.data[i].FILEDSTATICS)
  2008 + }
  2009 + thKeyList.push({
  2010 + id:res.data.data[i].ID,
  2011 + title:res.data.data[i].FIELDCN,
  2012 + choose:choose
  2013 + })
  2014 + }
  2015 + resolve({thKeyList:thKeyList})
  2016 + }
  2017 + })
  2018 + })
  2019 + },
2075 save(){ 2020 save(){
2076 - console.log(this.checkList) 2021 + console.log('保存数据',this.checkList)
  2022 + uni.showLoading({
  2023 + title:'保存中...'
  2024 + })
  2025 + //废气-排口、厂界
  2026 + if(this.param.code == 'fq_pc'){
  2027 + var saveParam = []
  2028 + //保存检测内容
  2029 + for(var i = 0; i < this.checkList.length; i ++){
  2030 + if(this.checkList[i].tempType == 'subRadio'){
  2031 + for(var j = 0; j < this.checkList[i].keyList.length; j ++){
  2032 + for(var k = 0; k < this.checkList[i].keyList[j].subKeyList.length; k ++){
  2033 + for(var l = 0; l < this.checkList[i].keyList[j].subKeyList[k].thKeyList.length; l ++){
  2034 + var choose = this.checkList[i].keyList[j].subKeyList[k].thKeyList[l].choose
  2035 + var id = this.checkList[i].keyList[j].subKeyList[k].thKeyList[l].id
  2036 + if(choose != -1){
  2037 + saveParam.push({
  2038 + filedstatic:choose.toString(),
  2039 + id:id
  2040 + })
  2041 + }
  2042 + }
  2043 + uni.request({
  2044 + url:this.apiUrl + 'license/updateSelfMonitInfo',
  2045 + method:'post',
  2046 + data:saveParam,
  2047 + success: (res) => {
  2048 + console.log('保存检测内容',res)
  2049 + uni.hideLoading()
  2050 + uni.showToast({
  2051 + title:'保存成功'
  2052 + })
  2053 + }
  2054 + })
  2055 + }
  2056 + }
  2057 + }
  2058 + }
  2059 + }
  2060 +
  2061 + //废水-排口-检测内容
  2062 + if(this.param.code == 'fs_pk_jcnr'){
  2063 + var saveParam = []
  2064 + //保存检测内容
  2065 + for(var i = 0; i < this.checkList.length; i ++){
  2066 + for(var j = 0; j < this.checkList[i].keyList.length; j ++){
  2067 + var check = this.checkList[i].keyList[j].check
  2068 + var id = this.checkList[i].keyList[j].id
  2069 + if(check != -1){
  2070 + saveParam.push({
  2071 + filedstatic:check.toString(),
  2072 + id:id
  2073 + })
  2074 + }
  2075 + }
  2076 + uni.request({
  2077 + url:this.apiUrl + 'license/updateSelfMonitInfo',
  2078 + method:'post',
  2079 + data:saveParam,
  2080 + success: (res) => {
  2081 + console.log('保存检测内容',res)
  2082 + uni.hideLoading()
  2083 + uni.showToast({
  2084 + title:'保存成功'
  2085 + })
  2086 + }
  2087 + })
  2088 + }
  2089 + }
  2090 +
  2091 + if(this.param.code == 'jbqk'
  2092 + || this.param.code == 'hjgltz'
  2093 + || this.param.code == 'zxbg'
  2094 + || this.param.code == 'xxgk'
  2095 + || this.param.code == 'xglsqk'
  2096 + || this.param.code == 'qtxknr'
  2097 + ){
  2098 + uni.hideLoading()
  2099 + }
  2100 +
  2101 + //水污染情况-排口
  2102 + if(this.param.code == 'swrqk_pk'){
  2103 + uni.hideLoading()
  2104 + }
2077 } 2105 }
2078 } 2106 }
2079 } 2107 }
@@ -202,10 +202,17 @@ @@ -202,10 +202,17 @@
202 uni.setNavigationBarTitle({ 202 uni.setNavigationBarTitle({
203 title: option.factoryName //这是修改后的导航栏文字 203 title: option.factoryName //这是修改后的导航栏文字
204 }) 204 })
  205 + this.getData()
205 }, 206 },
206 methods: { 207 methods: {
207 - onCancel(){  
208 - 208 + getData(){
  209 + uni.request({
  210 + url:this.apiUrl + 'license/step',
  211 + data:{companyId:this.companyid},
  212 + success: (res) => {
  213 + console.log('步骤是否保存获取',res)
  214 + }
  215 + })
209 }, 216 },
210 onConfirm(e,pickerType){ 217 onConfirm(e,pickerType){
211 this.checkTime = e.result 218 this.checkTime = e.result