소스 검색

Merge branch 'develop' into online

yuanliang 1 년 전
부모
커밋
8ff895ceac
1개의 변경된 파일12개의 추가작업 그리고 3개의 파일을 삭제
  1. 12 3
      src/views/music-library/music-sheet/component/music-list.tsx

+ 12 - 3
src/views/music-library/music-sheet/component/music-list.tsx

@@ -362,8 +362,8 @@ export default defineComponent({
         temp.forEach((next: any) => {
         temp.forEach((next: any) => {
           state.userIdData.push({
           state.userIdData.push({
             ...next,
             ...next,
-            label: next.userName,
-            value: next.userId
+            label: sourceType === 'PERSON' ? next.userName : next.organizationRole,
+            value: sourceType === 'PERSON' ? next.userId : next.organizationRoleId
           })
           })
         })
         })
       }
       }
@@ -387,7 +387,16 @@ export default defineComponent({
     const getList = async () => {
     const getList = async () => {
       try {
       try {
         state.loading = true
         state.loading = true
-        const { data } = await musicSheetPage({ ...state.pagination, ...state.searchForm })
+        const sourceType = state.searchForm.sourceType;
+        const userId = state.searchForm.userId
+        let search={...state.searchForm} as any
+        if (sourceType) {
+          if (sourceType == 'ORG') {
+            search.organizationRoleId = userId
+            search.userId = null
+          }
+        }
+        const { data } = await musicSheetPage({ ...state.pagination, ...search})
         state.pagination.pageTotal = Number(data.total)
         state.pagination.pageTotal = Number(data.total)
         state.dataList = data.rows || []
         state.dataList = data.rows || []
       } catch {}
       } catch {}