Преглед на файлове

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) => {
           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 {}