|
|
|
@ -95,7 +95,25 @@ Page({
|
|
|
|
|
Guids: this.data.Guid,
|
|
|
|
|
}).then(res => {
|
|
|
|
|
// todo: 回显预警信息
|
|
|
|
|
console.log(res)
|
|
|
|
|
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(',');
|
|
|
|
|
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-1].isSelect = !that.data.affList[ele-1].isSelect
|
|
|
|
|
});
|
|
|
|
|
this.setData({
|
|
|
|
|
qgList: that.data.qgList,
|
|
|
|
|
wjList: that.data.wjList,
|
|
|
|
|
});
|
|
|
|
|
//
|
|
|
|
|
if (res.DetailsData) {
|
|
|
|
|
if (res.DetailsData[0].IsAdvancedQuery == 1) {
|
|
|
|
|
this.setData({
|
|
|
|
@ -187,60 +205,6 @@ Page({
|
|
|
|
|
wjList: that.data.wjList
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getApi() {
|
|
|
|
|
app.globalData.request({
|
|
|
|
|
action: 'getQuDao', //获取所有渠道
|
|
|
|
|
token: wx.getStorageSync('token') || 't%2BrswgjvzGM=',
|
|
|
|
|
}).then(res => {
|
|
|
|
|
res.forEach(ele => {
|
|
|
|
|
ele.isSelect = false;
|
|
|
|
|
})
|
|
|
|
|
this.setData({
|
|
|
|
|
affList: res
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
changeSource(event) {
|
|
|
|
|
let that = this;
|
|
|
|
|
let val = event.currentTarget.dataset.value;
|
|
|
|
|
if (val.key == -1 && val.isSelect == false) {
|
|
|
|
|
that.data.affList.forEach(ele => {
|
|
|
|
|
ele.isSelect = true;
|
|
|
|
|
})
|
|
|
|
|
} else if (val.key == -1 && val.isSelect == true) {
|
|
|
|
|
that.data.affList.forEach(ele => {
|
|
|
|
|
ele.isSelect = false;
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
that.data.affList[0].isSelect = false;
|
|
|
|
|
}
|
|
|
|
|
if (val.key == -1) {
|
|
|
|
|
this.setData({
|
|
|
|
|
affList: that.data.affList
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
that.data.affList[val.key].isSelect = !that.data.affList[val.key].isSelect;
|
|
|
|
|
this.setData({
|
|
|
|
|
affList: that.data.affList
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
changeQingGan(event) {
|
|
|
|
|
let that = this;
|
|
|
|
|
let val = event.currentTarget.dataset.value;
|
|
|
|
|
that.data.qgList[val.key - 1].isSelect = !that.data.qgList[val.key - 1].isSelect;
|
|
|
|
|
this.setData({
|
|
|
|
|
qgList: that.data.qgList
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
changeWeiJi(event) {
|
|
|
|
|
let that = this;
|
|
|
|
|
let val = event.currentTarget.dataset.value;
|
|
|
|
|
that.data.wjList[val.key - 1].isSelect = !that.data.wjList[val.key - 1].isSelect;
|
|
|
|
|
this.setData({
|
|
|
|
|
wjList: that.data.wjList
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//表单
|
|
|
|
|
themeNameInput(event) {
|
|
|
|
|
this.setData({
|
|
|
|
|