|
|
|
@ -81,7 +81,7 @@ Page({
|
|
|
|
|
isSelect: false
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
show:false
|
|
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
onLoad: function (options) {
|
|
|
|
|
this.setData({
|
|
|
|
@ -96,17 +96,37 @@ Page({
|
|
|
|
|
Guids: this.data.Guid,
|
|
|
|
|
}).then(res => {
|
|
|
|
|
// todo: 回显预警信息
|
|
|
|
|
if (typeof (res.Warning.Es) == "string") {
|
|
|
|
|
let warning = JSON.parse(res.Warning.Es);
|
|
|
|
|
let that = this;
|
|
|
|
|
let qudaos = warning.QuDao == "" ? [] : warning.QuDao.split(',');
|
|
|
|
|
let crisises = warning.Crisis == "" ? [] : warning.Crisis.split(',');
|
|
|
|
|
let qinggans = warning.QingGan == "" ? [] : warning.QingGan.split(',');
|
|
|
|
|
crisises.forEach(ele => {
|
|
|
|
|
that.data.wjList[ele - 1].isSelect = !that.data.wjList[ele - 1].isSelect
|
|
|
|
|
});
|
|
|
|
|
qinggans.forEach(ele => {
|
|
|
|
|
that.data.qgList[ele - 1].isSelect = !that.data.qgList[ele - 1].isSelect
|
|
|
|
|
});
|
|
|
|
|
qudaos.forEach(ele => {
|
|
|
|
|
that.data.affList[ele].isSelect = !that.data.affList[ele].isSelect
|
|
|
|
|
});
|
|
|
|
|
this.setData({
|
|
|
|
|
qgList: that.data.qgList,
|
|
|
|
|
wjList: that.data.wjList,
|
|
|
|
|
affList: that.data.affList,
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
let warning = res.Warning.Es || {};
|
|
|
|
|
let that = this;
|
|
|
|
|
let qudaos = warning.QuDao == ""?[]:warning.QuDao.split(',');
|
|
|
|
|
let crisises = warning.Crisis == ""?[]:warning.Crisis.split(',');
|
|
|
|
|
let qinggans = warning.QingGan == ""?[]:warning.QingGan.split(',');
|
|
|
|
|
let qudaos = warning.QuDao == "" ? [] : warning.QuDao.split(',');
|
|
|
|
|
let crisises = warning.Crisis == "" ? [] : warning.Crisis.split(',');
|
|
|
|
|
let qinggans = warning.QingGan == "" ? [] : warning.QingGan.split(',');
|
|
|
|
|
crisises.forEach(ele => {
|
|
|
|
|
console.log('vcfx',crisises)
|
|
|
|
|
that.data.wjList[ele-1].isSelect = !that.data.wjList[ele-1].isSelect
|
|
|
|
|
that.data.wjList[ele - 1].isSelect = !that.data.wjList[ele - 1].isSelect
|
|
|
|
|
});
|
|
|
|
|
qinggans.forEach(ele => {
|
|
|
|
|
that.data.qgList[ele-1].isSelect = !that.data.qgList[ele-1].isSelect
|
|
|
|
|
that.data.qgList[ele - 1].isSelect = !that.data.qgList[ele - 1].isSelect
|
|
|
|
|
});
|
|
|
|
|
qudaos.forEach(ele => {
|
|
|
|
|
that.data.affList[ele].isSelect = !that.data.affList[ele].isSelect
|
|
|
|
@ -114,8 +134,11 @@ Page({
|
|
|
|
|
this.setData({
|
|
|
|
|
qgList: that.data.qgList,
|
|
|
|
|
wjList: that.data.wjList,
|
|
|
|
|
affList:that.data.affList,
|
|
|
|
|
affList: that.data.affList,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// let warnings = JSON.parse(res.Warning.Es);
|
|
|
|
|
|
|
|
|
|
if (res.DetailsData) {
|
|
|
|
|
if (res.DetailsData[0].IsAdvancedQuery == 1) {
|
|
|
|
|
this.setData({
|
|
|
|
@ -150,7 +173,7 @@ Page({
|
|
|
|
|
end: res.EndTime,
|
|
|
|
|
startShow: new Date(res.StartTime).valueOf(),
|
|
|
|
|
endShow: new Date(res.EndTime).valueOf(),
|
|
|
|
|
Statu:res.Warning.Statu
|
|
|
|
|
Statu: res.Warning.Statu
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -423,7 +446,7 @@ Page({
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
let dtData = {
|
|
|
|
|
"AnalyzeWord": this.data.AnalyzeWord.replace("+","%2B"),
|
|
|
|
|
"AnalyzeWord": this.data.AnalyzeWord.replace("+", "%2B"),
|
|
|
|
|
"HuoWord": this.data.HuoWord,
|
|
|
|
|
"PaiChu": this.data.PaiChu,
|
|
|
|
|
"IsAdvancedQuery": this.data.totalMode == 0 && this.data.currWordType == '必选词和的关系' ? 0 : this.data.totalMode == 1 ? 1 : 2,
|
|
|
|
@ -453,7 +476,7 @@ Page({
|
|
|
|
|
token: wx.getStorageSync('token') || 't%2BrswgjvzGM=',
|
|
|
|
|
DataJson: dtJson,
|
|
|
|
|
}).then(res => {
|
|
|
|
|
if(res !=[])
|
|
|
|
|
if (res != [])
|
|
|
|
|
wx.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '编辑成功',
|
|
|
|
|