作者 xuqiang

提交

... ... @@ -73,7 +73,6 @@
url:this.apiUrl + 'license/count',
method:'post',
success: (res) => {
console.log('督查数值',res)
this.check = res.data.data
}
})
... ...
... ... @@ -27,10 +27,10 @@
<view class="subRadioItem">
({{thIndex + 1}}){{thItem.title}}
<view class="subRadioRight">
<view class="yc" :class="{active:thItem.choose == 0}" @click="choose('yc',index,subIndex,thIndex)">
<view class="yc" :class="{active:thItem.FILEDSTATICS == 0}" @click="choose('yc',index,subIndex,thIndex)">
异常
</view>
<view class="yz" :class="{active:thItem.choose == 1}" @click="choose('yz',index,subIndex,thIndex)">
<view class="yz" :class="{active:thItem.FILEDSTATICS == 1}" @click="choose('yz',index,subIndex,thIndex)">
一致
</view>
</view>
... ... @@ -59,9 +59,9 @@
methods: {
choose(type,index,subIndex,thIndex){
if(type == 'yc'){
this.keyList[index].subKeyList[subIndex].thKeyList[thIndex].choose = 0
this.keyList[index].subKeyList[subIndex].thKeyList[thIndex].FILEDSTATICS = 0
}else{
this.keyList[index].subKeyList[subIndex].thKeyList[thIndex].choose = 1
this.keyList[index].subKeyList[subIndex].thKeyList[thIndex].FILEDSTATICS = 1
}
}
}
... ...
function getLocalFilePath(path) {
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) {
return path
}
if (path.indexOf('file://') === 0) {
return path
}
if (path.indexOf('/storage/emulated/0/') === 0) {
return path
}
if (path.indexOf('/') === 0) {
var localFilePath = plus.io.convertAbsoluteFileSystem(path)
if (localFilePath !== path) {
return localFilePath
} else {
path = path.substr(1)
}
}
return '_www/' + path
}
var index = 0
function getNewFileId() {
return Date.now() + String(index++)
}
function biggerThan(v1, v2) {
var v1Array = v1.split('.')
var v2Array = v2.split('.')
var update = false
for (var index = 0; index < v2Array.length; index++) {
var diff = v1Array[index] - v2Array[index]
if (diff !== 0) {
update = diff > 0
break
}
}
return update
}
export function pathToBase64(path) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
if (typeof FileReader === 'function') {
var xhr = new XMLHttpRequest()
xhr.open('GET', path, true)
xhr.responseType = 'blob'
xhr.onload = function() {
if (this.status === 200) {
let fileReader = new FileReader()
fileReader.onload = function(e) {
resolve(e.target.result)
}
fileReader.onerror = reject
fileReader.readAsDataURL(this.response)
}
}
xhr.onerror = reject
xhr.send()
return
}
var canvas = document.createElement('canvas')
var c2x = canvas.getContext('2d')
var img = new Image
img.onload = function() {
canvas.width = img.width
canvas.height = img.height
c2x.drawImage(img, 0, 0)
resolve(canvas.toDataURL())
canvas.height = canvas.width = 0
}
img.onerror = reject
img.src = path
return
}
if (typeof plus === 'object') {
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
entry.file(function(file) {
var fileReader = new plus.io.FileReader()
fileReader.onload = function(data) {
resolve(data.target.result)
}
fileReader.onerror = function(error) {
reject(error)
}
fileReader.readAsDataURL(file)
}, function(error) {
reject(error)
})
}, function(error) {
reject(error)
})
return
}
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
wx.getFileSystemManager().readFile({
filePath: path,
encoding: 'base64',
success: function(res) {
resolve('data:image/png;base64,' + res.data)
},
fail: function(error) {
reject(error)
}
})
return
}
reject(new Error('not support'))
})
}
export function base64ToPath(base64) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
base64 = base64.split(',')
var type = base64[0].match(/:(.*?);/)[1]
var str = atob(base64[1])
var n = str.length
var array = new Uint8Array(n)
while (n--) {
array[n] = str.charCodeAt(n)
}
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type })))
}
var extName = base64.match(/data\:\S+\/(\S+);/)
if (extName) {
extName = extName[1]
} else {
reject(new Error('base64 error'))
}
var fileName = getNewFileId() + '.' + extName
if (typeof plus === 'object') {
var basePath = '_doc'
var dirPath = 'uniapp_temp'
var filePath = basePath + '/' + dirPath + '/' + fileName
if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime.innerVersion)) {
plus.io.resolveLocalFileSystemURL(basePath, function(entry) {
entry.getDirectory(dirPath, {
create: true,
exclusive: false,
}, function(entry) {
entry.getFile(fileName, {
create: true,
exclusive: false,
}, function(entry) {
entry.createWriter(function(writer) {
writer.onwrite = function() {
resolve(filePath)
}
writer.onerror = reject
writer.seek(0)
writer.writeAsBinary(base64.replace(/^data:\S+\/\S+;base64,/, ''))
}, reject)
}, reject)
}, reject)
}, reject)
return
}
var bitmap = new plus.nativeObj.Bitmap(fileName)
bitmap.loadBase64Data(base64, function() {
bitmap.save(filePath, {}, function() {
bitmap.clear()
resolve(filePath)
}, function(error) {
bitmap.clear()
reject(error)
})
}, function(error) {
bitmap.clear()
reject(error)
})
return
}
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
var filePath = wx.env.USER_DATA_PATH + '/' + fileName
wx.getFileSystemManager().writeFile({
filePath: filePath,
data: base64.replace(/^data:\S+\/\S+;base64,/, ''),
encoding: 'base64',
success: function() {
resolve(filePath)
},
fail: function(error) {
reject(error)
}
})
return
}
reject(new Error('not support'))
})
}
\ No newline at end of file
... ...
... ... @@ -111,7 +111,6 @@
},
methods: {
getData(){
console.log('查询参数',this.param)
uni.showLoading({
title:'加载中'
})
... ... @@ -119,7 +118,6 @@
url:this.apiUrl+'license/list',
data:this.param,
success: (res) => {
console.log('厂家',res)
this.list = res.data.data
uni.hideLoading()
}
... ... @@ -147,7 +145,6 @@
},
onConfirm(e,pickerType){
if(pickerType == 'year'){
console.log('e.result',e.result)
if(e.result == '全'){
this.param.year = ''
this.yearTxt = '全'
... ...
... ... @@ -82,6 +82,7 @@
import checkTemp from '@/components/checkTemp.vue'
import typeRadioTemp from '@/components/typeRadioTemp.vue'
import subRadioTemp from '@/components/subRadioTemp.vue'
import { pathToBase64, base64ToPath } from '@/js_sdk/mmmm-image-tools/index.js'
export default {
data() {
return {
... ... @@ -109,7 +110,6 @@
onLoad(option){
this.param = JSON.parse(option.param)
this.companyId = option.companyid
console.log('option',option)
//基本情况
if(this.param.code == 'jbqk'){
this.checkList=[
... ... @@ -118,7 +118,12 @@
keyList:[
{
titleDesc:'一.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'单位名称',
moreBtn:true,//是否显示更多按钮
check:0,
... ... @@ -136,7 +141,12 @@
},
{
titleDesc:'二.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'生产经营地址',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -154,7 +164,12 @@
},
{
titleDesc:'三.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'技术负责人',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -173,7 +188,12 @@
},
{
titleDesc:'四.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'生产设施运行',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -191,7 +211,12 @@
},
{
titleDesc:'五.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'治理设施运行',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -209,7 +234,12 @@
},
{
titleDesc:'六.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'正本规范悬挂',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -227,7 +257,12 @@
},
{
titleDesc:'七.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'其他变更事项',
more:false,
moreBtn:true,//是否显示更多按钮
... ... @@ -279,7 +314,12 @@
tempType:'radio',
keyList:[
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'二.',
title:'未登记排口',
moreBtn:true,//是否显示更多按钮
... ... @@ -296,7 +336,12 @@
]
},
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'三.',
title:'雨水排口',
moreBtn:true,//是否显示更多按钮
... ... @@ -323,7 +368,12 @@
tempType:'radio',
keyList:[
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'一.',
title:'坐标及实况',
moreBtn:true,//是否显示更多按钮
... ... @@ -341,7 +391,12 @@
]
},
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'二.',
title:'排放口类型',
moreBtn:true,//是否显示更多按钮
... ... @@ -359,7 +414,12 @@
]
},
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'三.',
title:'排放去向',
moreBtn:true,//是否显示更多按钮
... ... @@ -377,7 +437,12 @@
]
},
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'四.',
title:'排放规律',
moreBtn:true,//是否显示更多按钮
... ... @@ -419,7 +484,12 @@
tempType:'radio',
keyList:[
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'七.',
title:'未登记污染物',
moreBtn:true,//是否显示更多按钮
... ... @@ -437,7 +507,12 @@
]
},
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'八.',
title:'执法监测',
moreBtn:true,//是否显示更多按钮
... ... @@ -508,7 +583,12 @@
tempType:'radio',
keyList:[
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'三.',
title:'未登记排口',
moreBtn:true,
... ... @@ -535,7 +615,12 @@
tempType:'radio',
keyList:[
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'一.',
title:'产污环节',
moreBtn:true,//是否显示更多按钮
... ... @@ -570,7 +655,12 @@
tempType:'radio',
keyList:[
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'三.',
title:'未登记污染物',
more:false,
... ... @@ -589,7 +679,12 @@
]
},
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'四.',
title:'执法监测',
moreBtn:false,
... ... @@ -617,7 +712,12 @@
tempType:'radio',
keyList:[
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'一.',
title:'产污环节',
moreBtn:false,
... ... @@ -653,7 +753,12 @@
tempType:'radio',
keyList:[
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'三.',
title:'执行标准',
more:false,
... ... @@ -690,7 +795,12 @@
tempType:'radio',
keyList:[
{
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
titleDesc:'五.',
title:'噪声类别',
check:-1,
... ... @@ -744,7 +854,12 @@
{
titleDesc:'一.',
title:'类别',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
moreBtn:false,
last:false,
check:-1,
... ... @@ -806,7 +921,12 @@
title:'委托单位',
moreBtn:true,//是否显示更多按钮
check:-1,
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
last:false,
subKeyList:[
{
... ... @@ -824,7 +944,12 @@
title:'未登记污染物',
moreBtn:true,//是否显示更多按钮
check:-1,
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
last:true,
subKeyList:[
{
... ... @@ -882,7 +1007,12 @@
title:'自行监测报告',
moreBtn:true,//是否显示更多按钮
check:-1,
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
last:false,
subKeyList:[
{
... ... @@ -900,7 +1030,12 @@
title:'委托第三方监测',
moreBtn:true,//是否显示更多按钮
check:-1,
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
last:false,
subKeyList:[
{
... ... @@ -936,7 +1071,12 @@
title:'纸质保存三年',
moreBtn:false,
check:-1,
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
last:true,
subKeyList:[
{
... ... @@ -1024,7 +1164,12 @@
title:'自行检测报告',
moreBtn:true,//是否显示更多按钮
check:-1,
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
last:false,
subKeyList:[
{
... ... @@ -1075,7 +1220,12 @@
title:'纸质保存三年',
moreBtn:false,//是否显示更多按钮
check:-1,
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
last:true,
subKeyList:[
{
... ... @@ -1101,7 +1251,12 @@
keyList:[
{
titleDesc:'一.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'生产设施运行管理信息',
moreBtn:true,//是否显示更多按钮
check:-1,//是否显示更多按钮
... ... @@ -1119,7 +1274,12 @@
},
{
titleDesc:'二.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'污染防治设置运行管理信息',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -1137,7 +1297,12 @@
},
{
titleDesc:'三.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'监测记录信息',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -1155,7 +1320,12 @@
},
{
titleDesc:'四.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'特殊时段管理要求执行情况',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -1173,7 +1343,12 @@
},
{
titleDesc:'五.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'纸质、电子齐备',
moreBtn:false,
check:-1,
... ... @@ -1191,7 +1366,12 @@
},
{
titleDesc:'六.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'保存时间不少于3年',
moreBtn:false,
check:-1,
... ... @@ -1209,7 +1389,12 @@
},
{
titleDesc:'七.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'专人专档管理',
moreBtn:false,
check:-1,
... ... @@ -1237,7 +1422,12 @@
keyList:[
{
titleDesc:'一.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'内容是否满足要求',
moreBtn:true,//是否显示更多按钮
check:-1,//是否显示更多按钮
... ... @@ -1255,7 +1445,12 @@
},
{
titleDesc:'二.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'上报频次时间是否满足要求',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -1273,7 +1468,12 @@
},
{
titleDesc:'三.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'登记与排放总量是否一致',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -1301,7 +1501,12 @@
keyList:[
{
titleDesc:'一.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'公开方式是否满足要求',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -1319,8 +1524,13 @@
},
{
titleDesc:'二.',
moreInfo:{},
title:'上报频次时间是否满足要求',
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'时间节点是否满足要求',
moreBtn:true,//是否显示更多按钮
check:-1,
last:false,
... ... @@ -1337,8 +1547,13 @@
},
{
titleDesc:'三.',
moreInfo:{},
title:'登记与排放总量是否一致',
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'公开内容是否满足要求',
moreBtn:true,//是否显示更多按钮
check:-1,
last:false,
... ... @@ -1365,8 +1580,13 @@
keyList:[
{
titleDesc:'一.',
moreInfo:{},
title:'这边更改要求事项',
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'整改要求事项',
moreBtn:true,//是否显示更多按钮
check:-1,//是否显示更多按钮
last:false,//是否最后一项
... ... @@ -1383,7 +1603,12 @@
},
{
titleDesc:'二.',
moreInfo:{},
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'整改落实情况是否满足要求',
moreBtn:true,//是否显示更多按钮
check:-1,
... ... @@ -1411,8 +1636,13 @@
keyList:[
{
titleDesc:'一.',
moreInfo:{},
title:'这边更改要求事项',
moreInfo:{
LAT:'',
LON:'',
NOTE:'',
IMGS:[]
},
title:'其他许可内容',
moreBtn:true,//是否显示更多按钮
check:-1,
last:false,//是否最后一项
... ... @@ -1578,7 +1808,6 @@
}
}
console.log('checkList',this.checkList)
}
//水污染情况-排口
... ... @@ -1588,7 +1817,6 @@
method:'get',
data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
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++){
... ... @@ -1596,9 +1824,23 @@
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){
... ... @@ -1626,10 +1868,23 @@
for(var j = 0; j < res.data.data.base.length; j ++){
if(this.checkList[k].keyList[i].title == res.data.data.base[j].FIELDCN){
if(this.checkList[k].keyList[i].title == '受纳自然水体'){
console.log('受纳自然水体',res.data.data.snst)
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
}
}
... ... @@ -1648,12 +1903,12 @@
method:'get',
data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
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++){
for(var j = 0; j < res.data.data.airbase.length; j ++){
if(this.checkList[k].keyList[i].title == res.data.data.airbase[j].FIELDCN){
this.checkList[k].keyList[i].id = res.data.data.airbase[j].ID
if(res.data.data.airbase[j].FILEDSTATICS){
this.checkList[k].keyList[i].check = parseInt(res.data.data.airbase[j].FILEDSTATICS)
}else{
... ... @@ -1679,6 +1934,13 @@
for(var j = 0; j < res.data.data.airbase.length; j ++){
if(this.checkList[k].keyList[i].title == res.data.data.airbase[j].FIELDCN){
if(this.checkList[k].keyList[i].title == '污染物种类'){
for(var l = 0;l < res.data.data.airwrw.length; l++){
if(res.data.data.airwrw[l].FILEDSTATICS){
res.data.data.airwrw[l].FILEDSTATICS = parseInt(res.data.data.airwrw[l].FILEDSTATICS)
}else{
res.data.data.airwrw[l].FILEDSTATICS = -1
}
}
this.checkList[k].keyList[i].subKeyList = res.data.data.airwrw
}
}
... ... @@ -1699,8 +1961,10 @@
success: (res)=>{
for(var k = 0; k < res.data.data.length; k ++){
this.checkList[1].keyList[0].subKeyList.push({
ID:res.data.data[k].ID,
FIELDCN:res.data.data[k].TITLE,
CONTENT:res.data.data[k].LIMIT_VALUE
CONTENT:res.data.data[k].LIMIT_VALUE,
FILEDSTATICS:res.data.data[k].FILEDSTATICS ? parseInt(res.data.data.solidwrw[l].FILEDSTATICS) : -1
})
}
}
... ... @@ -1712,8 +1976,10 @@
success: (res)=>{
for(var k = 0; k < res.data.data.length; k ++){
this.checkList[3].keyList[0].subKeyList.push({
ID:res.data.data[k].ID,
FIELDCN:res.data.data[k].TITLE,
CONTENT:res.data.data[k].LIMIT_VALUE
CONTENT:res.data.data[k].LIMIT_VALUE,
FILEDSTATICS:res.data.data[k].FILEDSTATICS ? parseInt(res.data.data.solidwrw[l].FILEDSTATICS) : -1
})
}
}
... ... @@ -1727,12 +1993,12 @@
method:'get',
data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
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++){
for(var j = 0; j < res.data.data.solidbase.length; j ++){
if(this.checkList[k].keyList[i].title == res.data.data.solidbase[j].FIELDCN){
this.checkList[k].keyList[i].id = res.data.data.solidbase[j].ID
if(this.checkList[k].keyList[i].title == '受纳自然水体'){
this.checkList[k].keyList[i].subKeyList = res.data.data.snst
}
... ... @@ -1764,7 +2030,13 @@
for(var j = 0; j < res.data.data.solidbase.length; j ++){
if(this.checkList[k].keyList[i].title == res.data.data.solidbase[j].FIELDCN){
if(this.checkList[k].keyList[i].title == '名称及产量'){
console.log('名称及产量',res.data.data.solidwrw)
for(var l = 0;l < res.data.data.solidwrw.length; l++){
if(res.data.data.solidwrw[l].FILEDSTATICS){
res.data.data.solidwrw[l].FILEDSTATICS = parseInt(res.data.data.solidwrw[l].FILEDSTATICS)
}else{
res.data.data.solidwrw[l].FILEDSTATICS = -1
}
}
this.checkList[k].keyList[i].subKeyList = res.data.data.solidwrw
}
}
... ... @@ -1783,7 +2055,6 @@
method:'get',
data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
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++){
... ... @@ -1812,7 +2083,6 @@
if(this.checkList[k].tempType == 'check'){
for(var i = 0; i < this.checkList[k].keyList.length; i++){
for(var j = 0; j < res.data.data.length; j ++){
console.log(this.checkList[k].keyList[i].title,res.data.data[j].FIELDCN)
if(this.checkList[k].keyList[i].title == '三.监测内容' && res.data.data[j].FIELDCN =='监测内容'){
var keyList = this.checkList[k].keyList[i]
uni.request({
... ... @@ -1820,7 +2090,6 @@
method:'get',
data:{id:res.data.data[j].ID},
success: (res) => {
console.log('废水-排口-监测内容',res)
for(var l = 0; l < res.data.data.length; l ++){
keyList.subKeyList.push({
title:res.data.data[l].FIELDCN,
... ... @@ -1923,7 +2192,6 @@
method:'get',
data:{companyId:this.companyId,pdoCd:this.param.pdoCd},
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++){
... ... @@ -1953,9 +2221,7 @@
}
if(this.checkList[k].tempType == 'subRadio'){
for(var i = 0; i < this.checkList[k].keyList.length; i++){
console.log('res.data.data',res.data.data.length)
for(var j = 0; j < res.data.data.length; j ++){
console.log(this.checkList[k].keyList[i].title,res.data.data[j].FIELDCN)
if(this.checkList[k].keyList[i].title == '三.监测内容' && res.data.data[j].FIELDCN =='监测内容'){
var keyList = this.checkList[k].keyList[i]
uni.request({
... ... @@ -1963,7 +2229,6 @@
method:'get',
data:{id:res.data.data[j].ID},
success: (subKeyRes) => {
console.log('废气-排口-监测内容',subKeyRes)
for(var l = 0; l < subKeyRes.data.data.length; l ++){
this.setSubKeyList(subKeyRes.data.data[l],keyList)
}
... ... @@ -2084,7 +2349,6 @@
thKeyList:(await this.getSubKeyList(subKeyObj.ID)).thKeyList
}
keyList.subKeyList.push(subKey)
console.log('keyList',keyList)
},
getSubKeyList(id){
return new Promise((resolve,reject) => {
... ... @@ -2093,7 +2357,6 @@
method:'get',
data:{id:id},
success: (res) => {
console.log('废气-排口-监测内容-子项',res)
var thKeyList = []
for(var i = 0; i < res.data.data.length; i ++){
var choose = -1
... ... @@ -2112,7 +2375,6 @@
})
},
save(){
console.log('保存数据',this.checkList)
uni.showLoading({
title:'保存中...'
})
... ... @@ -2139,7 +2401,6 @@
method:'post',
data:saveParam,
success: (res) => {
console.log('保存检测内容',res)
uni.hideLoading()
uni.showToast({
title:'保存成功'
... ... @@ -2172,7 +2433,6 @@
method:'post',
data:saveParam,
success: (res) => {
console.log('保存检测内容',res)
uni.hideLoading()
uni.showToast({
title:'保存成功'
... ... @@ -2188,14 +2448,145 @@
|| this.param.code == 'xxgk'
|| this.param.code == 'xglsqk'
|| this.param.code == 'qtxknr'
|| this.param.code == 'swrqk'
){
var saveParam = []
//基础信息修改
for(var i = 0; i < this.checkList.length; i ++){
if(this.checkList[i].tempType == 'radio'){
for(var j = 0; j < this.checkList[i].keyList.length; j ++){
var check = this.checkList[i].keyList[j].check
var id = this.checkList[i].keyList[j].id
var moreInfo = this.checkList[i].keyList[j].moreInfo
var imgs = []
console.log('moreInfo',moreInfo)
console.log(moreInfo.IMGS.length)
if(moreInfo.IMGS.length > 0){
console.log('进来了')
this.returnImgs(moreInfo.IMGS)
}
console.log('imgs',imgs)
if(check != -1){
saveParam.push({
filedstatic:check.toString(),
id:id,
lon:moreInfo.LON,
lat:moreInfo.LAT,
note:moreInfo.NOTE,
imgs:imgs
})
}
}
}
}
console.log('saveParam',saveParam)
if(saveParam.length == 0){
uni.showToast({
title:'请选择检查项',
icon:'none'
})
uni.hideLoading()
return
}
uni.request({
url:this.apiUrl + 'license/baseinfoupdate',
method:'post',
data:saveParam,
success: (res) => {
uni.hideLoading()
uni.showToast({
title:'保存成功'
})
}
})
uni.hideLoading()
}
//水污染情况-排口
if(this.param.code == 'swrqk_pk'){
if(this.param.code == 'swrqk_pk' || this.param.code == 'dqwrqk_pc' || this.param.code == 'wtcz' || this.param.code == 'zspf'){
var saveParam = {
base:[],
other:[]
}
//基础信息修改
for(var i = 0; i < this.checkList.length; i ++){
if(this.checkList[i].tempType == 'radio'){
for(var j = 0; j < this.checkList[i].keyList.length; j ++){
var check = this.checkList[i].keyList[j].check
var id = this.checkList[i].keyList[j].id
var moreInfo = this.checkList[i].keyList[j].moreInfo
var imgs = []
console.log(moreInfo.IMGS.length)
if(moreInfo.IMGS.length > 0){
this.returnImgs(moreInfo.IMGS)
}
console.log('imgs',imgs)
if(check != -1){
saveParam.base.push({
filedstatic:check.toString(),
id:id,
lon:moreInfo.LON,
lat:moreInfo.LAT,
note:moreInfo.NOTE,
imgs:imgs
})
}
}
}
if(this.checkList[i].tempType == 'typeRadio'){
for(var j = 0; j < this.checkList[i].keyList.length; j ++){
for(var k = 0; k < this.checkList[i].keyList[j].subKeyList.length; k ++){
var FILEDSTATICS = this.checkList[i].keyList[j].subKeyList[k].FILEDSTATICS
var id = this.checkList[i].keyList[j].subKeyList[k].ID
if(FILEDSTATICS != -1){
saveParam.other.push({
filedstatic:FILEDSTATICS.toString(),
id:id
})
}
}
}
}
}
console.log('saveParam',saveParam)
if(saveParam.length == 0){
uni.showToast({
title:'请选择检查项',
icon:'none'
})
uni.hideLoading()
return
}
uni.request({
url:this.apiUrl + 'license/pdosave',
method:'post',
data:saveParam,
success: (res) => {
uni.hideLoading()
uni.showToast({
title:'保存成功'
})
}
})
uni.hideLoading()
}
},
async returnImgs(IMGS){
for(var j = 0; j < moreInfo.IMGS.length; j ++){
var base64 = (await this.imgToBase(moreInfo.IMGS[j])).base64
console.log(base64)
}
},
imgToBase(imgUrl){
return new Promise((reslove,reject) => {
pathToBase64(imgUrl).then(base64 => {
reslove({base64:base64})
}).catch(error => {
reject(error)
})
})
}
}
}
... ...
... ... @@ -196,13 +196,14 @@
return true
}
},
onShow() {
this.getData()
},
onLoad(option) {
console.log('option',option)
this.companyid = option.companyid
uni.setNavigationBarTitle({
title: option.factoryName //这是修改后的导航栏文字
})
this.getData()
},
methods: {
getData(){
... ... @@ -210,7 +211,14 @@
url:this.apiUrl + 'license/step',
data:{companyId:this.companyid},
success: (res) => {
console.log('步骤是否保存获取',res)
this.keyList[0].complete = res.data.data.one
this.keyList[1].complete = res.data.data.two
this.keyList[2].complete = res.data.data.three
this.keyList[3].complete = res.data.data.four
this.keyList[4].complete = res.data.data.five
this.keyList[5].complete = res.data.data.six
this.keyList[6].complete = res.data.data.seven
this.keyList[7].complete = res.data.data.eight
}
})
},
... ... @@ -221,12 +229,6 @@
this.checkTime = e.result
},
showSubCheck(index){
if(this.keyList[index].complete == 0){
this.keyList[index].complete = 1
}else{
this.keyList[index].complete = 0
}
if(this.keyList[index].subKeyList.length > 0){
if(this.keyList[index].show == 0){
this.keyList[index].show = 1
... ...