// 每次上传气体警告之前先将数据转成json
this.gasLevelSettingJson = JSON.stringify(this.gasLevelSetting)
console.log(this.gasLevelSettingJson)
提交时候使用encodeURIComponent(jsonStr, ‘utf-8’)方法
// 保存设置--气体警告等级
export function saveGasLevelSetting(jsonStr) {
return request({
url: '/rangSetting/updateRangIdByLevelId?jsonStr=' + encodeURIComponent(jsonStr, 'utf-8'),
method: 'put',
data: jsonStr
})
}