소스 검색

切换项目更新

ZaiZai 11 달 전
부모
커밋
96fd268245
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/store/modules/app.js

+ 2 - 2
src/store/modules/app.js

@@ -43,9 +43,9 @@ const getStoreProjecInfo = async (arr) => {
     const projectId = store.projectId //项目ID
     const contractId = store.contractId //合同段ID
     //查询缓存的选中ID是否存在
-    const pid = arr.findIndex(item => Number(item.id) === Number(projectId))
+    const pid = arr.findIndex(item => String(item.id) === String(projectId))
     const contractList = getArrValue(arr[pid]?.contractInfoList)
-    const cid = contractList.findIndex(item => Number(item.id) === Number(contractId))
+    const cid = contractList.findIndex(item => String(item.id) === String(contractId))
     //如果缓存的选中ID不存在
     if (cid === -1) {
         return false