作者 xuqiang

提交

... ... @@ -110,6 +110,7 @@
onLoad(option){
this.param = JSON.parse(option.param)
this.companyId = option.companyid
console.log('当前code',this.param.code)
//基本情况
if(this.param.code == 'jbqk'){
this.checkList=[
... ... @@ -296,18 +297,7 @@
selfmonitor:0,
show:false,
type:'waterpull',
subKeyList:[
{
title:'废水排放口1',
param:{code:'swrqk_pk'},
name:'DW001'
},
{
title:'废水排放口2',
param:{code:'swrqk_pk'},
name:'DW002'
}
]
subKeyList:[]
}
]
},
... ... @@ -547,18 +537,7 @@
organization:0,
selfmonitor:0,
type:'airpull',
subKeyList:[
{
title:'排口1',
param:{code:'dqwrqk_pc'},
name:'DA001'
},
{
title:'排口2',
param:{code:'dqwrqk_pc'},
name:'DA002'
}
]
subKeyList:[]
},
{
title:'二.无组织排口',
... ... @@ -567,18 +546,7 @@
organization:1,
selfmonitor:0,
type:'airpull',
subKeyList:[
{
title:'厂界1',
param:{code:'dqwrqk_pc'},
name:'CJ001'
},
{
title:'厂界2',
param:{code:'dqwrqk_pc'},
name:'CJ002'
}
]
subKeyList:[]
}
]
},
... ... @@ -836,13 +804,7 @@
organization:0,
type:'solidpull',
show:true,
subKeyList:[
{
title:'委托处置',
param:{code:'wtcz'},
name:'WTCZ'
}
]
subKeyList:[]
}
]
}
... ... @@ -982,18 +944,7 @@
selfmonitor:1,
show:false,
type:'waterpull',
subKeyList:[
{
title:'废水排放口1',
param:{code:'fs_pk'},
name:'DW001'
},
{
title:'废水排放口2',
param:{code:'fs_pk'},
name:'DW002'
}
]
subKeyList:[]
}
]
}
... ... @@ -1121,18 +1072,7 @@
organization:0,
selfmonitor:1,
type:'airpull',
subKeyList:[
{
title:'排口1',
param:{code:'fs_pk'},
name:'DA001'
},
{
title:'排口2',
param:{code:'fs_pk'},
name:'DA002'
}
]
subKeyList:[]
},
{
title:'二.无组织排口',
... ... @@ -1141,18 +1081,7 @@
organization:1,
selfmonitor:1,
type:'airpull',
subKeyList:[
{
title:'厂界1',
param:{code:'fs_pk'},
name:'CJ001'
},
{
title:'厂界2',
param:{code:'fs_pk'},
name:'CJ002'
}
]
subKeyList:[]
}
]
}
... ... @@ -1795,33 +1724,63 @@
case 'fs' : code = 'fs_pk'; break;
default : code = 'fq_pc'; break;
}
uni.request({
url:this.apiUrl + 'license/pdos',
method:'get',
//pdoType:排口类型,0 水,1 空气,2 固体排放物
//selfmonitor:0.非自行监测排口,1.自行监测排口
//organization:0.有组织排口 1.无组织排口
data:{
companyId:this.companyId,
pdoType:this.checkList[i].keyList[j].pdoType,
organization:this.checkList[i].keyList[j].organization,
selfmonitor:this.checkList[i].keyList[j].selfmonitor
},
success: (res) => {
console.log('排口信息',res)
for(var k = 0; k < keyList.subKeyList.length; k ++){
for(var l = 0; l < res.data.data.length; l ++){
if(keyList.subKeyList[k].title == res.data.data[l].PDO_NM){
keyList.subKeyList[k].param = JSON.stringify({type:type,pdoCd:res.data.data[l].PDO_CD,code:code})
break
console.log('code',code)
this.getPkInfo(keyList,type,code)
}
}
if(this.checkList[i].tempType == 'radio' && this.param.code == 'swrqk'){
uni.request({
url:this.apiUrl + 'license/otherInfo',
method:'get',
data:{companyId:this.companyId,type:'21'},
success: (res) => {
console.log('产污环节-水污染',res)
}
})
/* for(var i = 0; i < this.checkList[k].keyList.length; i++){
for(var j = 0; j < res.data.data.base.length; j ++){
if(this.checkList[k].keyList[i].title == res.data.data.base[j].FIELDCN){
this.checkList[k].keyList[i].id = res.data.data.base[j].ID
if(this.checkList[k].keyList[i].title == '受纳自然水体'){
for(var l = 0;l < res.data.data.snst.length; l++){
if(res.data.data.snst[l].FILEDSTATICS){
res.data.data.snst[l].FILEDSTATICS = parseInt(res.data.data.snst[l].FILEDSTATICS)
}else{
res.data.data.snst[l].FILEDSTATICS = -1
}
}
this.checkList[k].keyList[i].subKeyList = res.data.data.snst
}
if(this.checkList[k].keyList[i].title == '污染物种类'){
for(var l = 0;l < res.data.data.wrw.length; l++){
if(res.data.data.wrw[l].FILEDSTATICS){
res.data.data.wrw[l].FILEDSTATICS = parseInt(res.data.data.wrw[l].FILEDSTATICS)
}else{
res.data.data.wrw[l].FILEDSTATICS = -1
}
}
this.checkList[k].keyList[i].subKeyList = res.data.data.wrw
}
if(res.data.data.base[j].FILEDSTATICS){
this.checkList[k].keyList[i].check = parseInt(res.data.data.base[j].FILEDSTATICS)
}else{
this.checkList[k].keyList[i].check = -1
}
if(res.data.data.base[j].IMGS){
this.checkList[k].keyList[i].moreInfo.IMGS = res.data.data.base[j].IMGS
}
if(res.data.data.base[j].NOTE){
this.checkList[k].keyList[i].moreInfo.NOTE = res.data.data.base[j].NOTE
}
if(res.data.data.base[j].LON){
this.checkList[k].keyList[i].moreInfo.LON = res.data.data.base[j].LON
this.checkList[k].keyList[i].moreInfo.LAT = res.data.data.base[j].LAT
}
break;
}
})
}
}
} */
}
}
}
... ... @@ -1831,8 +1790,9 @@
uni.request({
url:this.apiUrl + 'license/waterpull',
method:'get',
data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
data:{companyId:this.companyId,pdoId:this.param.pdoId},
success: (res) => {
console.log('水污染情况-排口',res)
for(var k = 0; k < this.checkList.length; k ++){
if(this.checkList[k].tempType == 'radio'){
for(var i = 0; i < this.checkList[k].keyList.length; i++){
... ... @@ -1917,7 +1877,7 @@
uni.request({
url:this.apiUrl + 'license/airpull',
method:'get',
data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
data:{companyId:this.companyId,pdoId:this.param.pdoId},
success: (res) => {
for(var k = 0; k < this.checkList.length; k ++){
if(this.checkList[k].tempType == 'radio'){
... ... @@ -2052,7 +2012,7 @@
uni.request({
url:this.apiUrl + 'license/solidpull',
method:'get',
data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
data:{companyId:this.companyId,pdoId:this.param.pdoId},
success: (res) => {
for(var k = 0; k < this.checkList.length; k ++){
if(this.checkList[k].tempType == 'radio'){
... ... @@ -2114,8 +2074,9 @@
uni.request({
url:this.apiUrl + 'license/selfWater',
method:'get',
data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
data:{companyId:this.companyId,pdoId:this.param.pdoId},
success: (res) => {
console.log('废水-排口',res)
for(var k = 0; k < this.checkList.length; k ++){
if(this.checkList[k].tempType == 'radio'){
for(var i = 0; i < this.checkList[k].keyList.length; i++){
... ... @@ -2252,7 +2213,7 @@
uni.request({
url:this.apiUrl + 'license/selfGas',
method:'get',
data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
data:{companyId:this.companyId,pdoId:this.param.pdoId},
success: (res) => {
for(var k = 0; k < this.checkList.length; k ++){
if(this.checkList[k].tempType == 'radio'){
... ... @@ -2308,6 +2269,37 @@
},
async getPkInfo(keyList,type,code){
var res = await this.reqPkInfo(keyList)
for(var l = 0; l < res.data.data.length; l ++){
console.log('参数',JSON.stringify({type:type,pdoId:res.data.data[l].ID,pdoCd:res.data.data[l].PDO_CD,code:code}))
keyList.subKeyList.push({
title:res.data.data[l].PDO_NM,
param:JSON.stringify({type:type,pdoId:res.data.data[l].ID,pdoCd:res.data.data[l].PDO_CD,code:code}),
name:res.data.data[l].PDO_CD
})
}
},
reqPkInfo(keyList,type,code){
return new Promise((reslove,reject) => {
uni.request({
url:this.apiUrl + 'license/pdos',
method:'get',
//pdoType:排口类型,0 水,1 空气,2 固体排放物
//selfmonitor:0.非自行监测排口,1.自行监测排口
//organization:0.有组织排口 1.无组织排口
data:{
companyId:this.companyId,
pdoType:keyList.pdoType,
organization:keyList.organization,
selfmonitor:keyList.selfmonitor
},
success: (res) => {
reslove(res)
}
})
})
},
confirmDescInp(){
if(this.desc == ''){
uni.showToast({
... ... @@ -2441,6 +2433,8 @@
uni.showLoading({
title:'保存中...'
})
//全部保存状态
var allSaveStatus = true
//废气-排口、厂界
if(this.param.code == 'fq_pc'){
var saveParam = []
... ... @@ -2534,6 +2528,8 @@
note:this.checkList[i].keyList[j].moreInfo.NOTE,
imgs:this.checkList[i].keyList[j].moreInfo.IMGS
})
}else{
allSaveStatus = false
}
}
}
... ... @@ -2559,6 +2555,22 @@
})
}
})
if(allSaveStatus){
var four = 'one'
switch(this.param.code){
case 'jbqk' : four = '1';break;
default:four = 'six';break;
}
uni.request({
url:this.apiUrl + 'license/updateStep',
data:{companyId:this.companyId,four:four},
method:'post',
success:(res)=>{
console.log('保存成功!',res)
}
})
}
uni.hideLoading()
}
... ...