|
|
|
@ -483,6 +483,23 @@ |
|
|
|
var userInfo_tmp = success.data.userObjs[i] |
|
|
|
data.lawCer.push({ id: userInfo_tmp.strUserId, text: userInfo_tmp.userName, num: userInfo_tmp.lawCertificateNum, show: userInfo_tmp.userName +" "+ userInfo_tmp.lawCertificateNum }); |
|
|
|
} |
|
|
|
if (success.data.userObjs.length===0) { |
|
|
|
// 执法人员 |
|
|
|
submitData.lawEnforcerTwoId = success.data['lawEnforcerTwoId']; |
|
|
|
submitData.lawEnforcerTwo = success.data['lawEnforcerTwo']; |
|
|
|
var lawEnforcer2ShowStr = success.data['lawEnforcer2Show']; |
|
|
|
if ((null != submitData.lawEnforcerTwoId && submitData.lawEnforcerTwoId.length > 0) |
|
|
|
&& (null != submitData.lawEnforcerTwo && submitData.lawEnforcerTwo.length > 0)) { |
|
|
|
|
|
|
|
var tmpEnforceId = submitData.lawEnforcerTwoId.split(','); |
|
|
|
var tmpEnforceText = submitData.lawEnforcerTwo.split(','); |
|
|
|
var lawEnforcer2Show = lawEnforcer2ShowStr.split(','); |
|
|
|
console.log(tmpEnforceId) |
|
|
|
for (var i = 0; i < tmpEnforceId.length; i++) { |
|
|
|
data.lawCer.push({text: tmpEnforceText[i], id: tmpEnforceId[i], show: nameCorrect(lawEnforcer2Show[i])}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
data.lawCer.splice(0, 1); |
|
|
|
} |
|
|
|
},error=>{ |
|
|
|
@ -659,6 +676,23 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const nameCorrect=(name)=>{ |
|
|
|
//筛选出两个字人名 |
|
|
|
let name1=[{}]; |
|
|
|
name1=String(name).split(" "); |
|
|
|
// console.log(name1); |
|
|
|
if(name1[0].length==2){ |
|
|
|
if(name1.length>1){ |
|
|
|
return (String(name1[0]).substr(0,1)+"\u3000"+String(name1[0]).substr(1)+" "+name1[1]); |
|
|
|
}else{ |
|
|
|
return (String(name1[0]).substr(0,1)+"\u3000"+String(name1[0]).substr(1)); |
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
return name; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/*const cancelUser = (index) =>{ |
|
|
|
data.lawCer.splice(index, 1); |
|
|
|
} |
|
|
|
|