优化护林员

master
刘妍 2023-08-26 08:42:06 +08:00
parent 024ac0c288
commit ebac38299f
1 changed files with 4 additions and 7 deletions

View File

@ -112,15 +112,12 @@
getDetail() {
getMethodCommon("/FireCodeApp/GetForestryUserById?id=" + this.detailInfo[0].Id, {}).then(res => {
if (res.code == 200) {
console.log(res)
this.addForm = res.data[0]
var areaId = this.addForm.areaId.split(',')
console.log(this.addForm)
areaId.forEach(element => {
element=Number(element)
console.log(typeof element)
});
this.addForm.areaId = areaId
var turnNum = function (nums) {
return nums.map(Number);
}
this.addForm.areaId = turnNum(areaId)
if (this.addForm.Sex == 0) {
this.addForm.Sex = '男'
} else {