Browse Source

Merge branch 'develop' into online

yuanliang 1 year ago
parent
commit
8ff895ceac
1 changed files with 12 additions and 3 deletions
  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) => {
           state.userIdData.push({
             ...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 () => {
       try {
         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.dataList = data.rows || []
       } catch {}