|
@@ -327,17 +327,17 @@ var rationCoeOprObj = {
|
|
|
sheetCommonObj.cleanData(me.sheet, me.setting, -1);
|
|
|
if (result.data) {
|
|
|
var tempResult = [];
|
|
|
- for (let obj of result.data) {
|
|
|
- for(let i = 0, len = coeList.length; i < len; i++){
|
|
|
- if(obj.ID === coeList[i].ID){
|
|
|
- obj.no = coeList[i].no;
|
|
|
- tempResult.push(obj);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
+ let stdMap = _.indexBy(result.data,'ID');
|
|
|
+ for(let i = 0, len = coeList.length; i < len; i++){
|
|
|
+ let obj = stdMap[coeList[i].ID];
|
|
|
+ if(obj){
|
|
|
+ obj.no = coeList[i].no;
|
|
|
+ }else{
|
|
|
+ obj= {ID:coeList[i].ID,no:coeList[i].no,serialNo:-999,name:'引用错误或子目已被删除'}
|
|
|
+ }
|
|
|
+ tempResult.push(obj);
|
|
|
+ }
|
|
|
+
|
|
|
me.cache["_Coe_" + ration.ID] = tempResult;
|
|
|
|
|
|
me.showCoeItems(ration.ID);
|