feat:cdsbInfo表读取优化,只存储当前考试项目
This commit is contained in:
		
							parent
							
								
									2a32af7fa1
								
							
						
					
					
						commit
						ac1e2d27b8
					
				| @ -336,20 +336,26 @@ struct Index { | |||||||
|   // 获取场地设备信息 |   // 获取场地设备信息 | ||||||
|   async initCDSBInfo() { |   async initCDSBInfo() { | ||||||
|     const cdsbParams = await getSyncData('MA_CDSBINFO') |     const cdsbParams = await getSyncData('MA_CDSBINFO') | ||||||
|  |     //只记录考试项目的模型 | ||||||
|  |     const projectsObj = this.projectsObj | ||||||
|     //@ts-ignore |     //@ts-ignore | ||||||
|     cdsbParams.forEach((cdsb) => { |     cdsbParams.forEach((cdsb) => { | ||||||
|       const key = decodeURI(cdsb.itemsno); |       const key = decodeURI(cdsb.itemsno); | ||||||
|       const newKey = key.split('~').join('_') |       const newKey = key.split('~').join('_') | ||||||
|       this.cdsbInfoObj[newKey] = { |       //@ts-ignore | ||||||
|         kdid: cdsb.kdid, |       const xmdm = key.split('~')[0] * 1 | ||||||
|         sbbh: cdsb.sbbh, |       if(projectsObj[xmdm]){ | ||||||
|         sbbm: cdsb.sbbm, |         this.cdsbInfoObj[newKey] = { | ||||||
|         itemsno: key, |           kdid: cdsb.kdid, | ||||||
|         modelKey: newKey, |           sbbh: cdsb.sbbh, | ||||||
|         //@ts-ignore |           sbbm: cdsb.sbbm, | ||||||
|         xmdm: key.split('~')[0] * 1, |           itemsno: key, | ||||||
|         xmxh: key.split('~')[1], |           modelKey: newKey, | ||||||
|  |           xmdm, | ||||||
|  |           xmxh: key.split('~')[1], | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|  | 
 | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user