Parcourir la source

切换项目更新

ZaiZai il y a 11 mois
Parent
commit
96fd268245
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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