
1.這種可以用for循環(huán)進(jìn)行代碼編寫
// 遍歷傳入的默認(rèn)值
? ? ? if(val.length > 0){
? ? ? ? val.forEach(item => {
? ? ? ? // 遍歷組件內(nèi)部默認(rèn)字典
? ? ? ? ? this.titleList.forEach(ele => {
? ? ? ? ? ? // 交叉對(duì)比
? ? ? ? ? ? if (ele.relename == item.cofield_name) {
? ? ? ? ? ? ? // 遍歷下拉框內(nèi)的值,若匹配,則賦值
? ? ? ? ? ? ? this.quotaList.forEach(e => {
? ? ? ? ? ? ? ? if (item.realfield_name_cn === e.label) {
? ? ? ? ? ? ? ? ? ele.field_id = e.key;
? ? ? ? ? ? ? ? ? ele.field_name = e.label;
? ? ? ? ? ? ? ? }else{
? ? ? ? ? ? ? ? ? this.compare(this.hisReleFields);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? });
? ? ? ? ? ? }
? ? ? ? ? });
? ? ? ? });