|
@@ -22,12 +22,14 @@ import Pagination from "@components/pagination";
|
|
|
import TheTooltip from "@components/TheTooltip";
|
|
|
import AddMusic from "@views/music-library/project-music-sheet/module/kt/addMusic";
|
|
|
import UpdateMusic from "@views/music-library/project-music-sheet/module/kt/updateMusic";
|
|
|
-import {musicSheetApplicationExtendCategoryList, musicSheetApplicationExtendStatus, musicSheetApplicationOwnerList, musicSheetPageByApplication, musicSheetStatusList} from "@views/music-library/api";
|
|
|
+import {musicSheetApplicationExtendCategoryList, musicSheetApplicationExtendStatus, musicSheetApplicationOwnerList, musicSheetPageByApplication} from "@views/music-library/api";
|
|
|
import {getMapValueByKey, getSelectDataFromObj} from "@/utils/objectUtil";
|
|
|
import {musicSheetAudioType, musicSheetSourceType, musicSheetType} from "@/utils/constant";
|
|
|
import {sysApplicationPage} from "@views/menu-manage/api";
|
|
|
-import {musicSheetApplicationExtendSubjectList, subjectPage} from "@views/system-manage/api";
|
|
|
+import {musicSheetApplicationExtendSubjectList} from "@views/system-manage/api";
|
|
|
import {filterTimes} from "@/utils/dateUtil";
|
|
|
+import deepClone from "@/utils/deep.clone";
|
|
|
+import {getOwnerName} from "@views/music-library/musicUtil";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'project-music-sheet-KT',
|
|
@@ -146,9 +148,18 @@ export default defineComponent({
|
|
|
const getList = async () => {
|
|
|
try {
|
|
|
state.loading = true
|
|
|
+ const sourceType = state.searchForm.sourceType
|
|
|
+ let userId = state.searchForm.userId;
|
|
|
+ let organizationRoleId = null;
|
|
|
+ if (sourceType && sourceType === 'ORG') {
|
|
|
+ organizationRoleId = deepClone(userId)
|
|
|
+ userId = null
|
|
|
+ }
|
|
|
const {data} = await musicSheetPageByApplication({
|
|
|
...state.pagination,
|
|
|
...state.searchForm,
|
|
|
+ userId: userId,
|
|
|
+ organizationRoleId: organizationRoleId,
|
|
|
...filterTimes(state.searchForm.times, ['startTime', 'endTime']),
|
|
|
applicationId: state.applicationId
|
|
|
})
|
|
@@ -234,7 +245,7 @@ export default defineComponent({
|
|
|
<NDescriptionsItem label="曲目来源">
|
|
|
{getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)))}
|
|
|
</NDescriptionsItem>
|
|
|
- <NDescriptionsItem label="所属人">{row.userName}</NDescriptionsItem>
|
|
|
+ <NDescriptionsItem label="所属人">{getOwnerName(row.musicSheetExtend,row.sourceType)}</NDescriptionsItem>
|
|
|
</NDescriptions>
|
|
|
</>
|
|
|
)
|
|
@@ -360,14 +371,14 @@ export default defineComponent({
|
|
|
onUpdateValue={async (value: any) => {
|
|
|
state.userIdData = []
|
|
|
state.searchForm.userId = null
|
|
|
- if (value) {
|
|
|
+ if (value && value !== 'PLATFORM') {
|
|
|
const {data} = await musicSheetApplicationOwnerList({page: 1, rows: 9999, sourceType: value, applicationId: state.appId})
|
|
|
const temp = data.rows || []
|
|
|
temp.forEach((next: any) => {
|
|
|
state.userIdData.push({
|
|
|
...next,
|
|
|
- label: next.userName,
|
|
|
- value: next.userId
|
|
|
+ label: value === 'PERSON' ? next.userName : next.organizationRole,
|
|
|
+ value: value === 'PERSON' ? next.userId : next.organizationRoleId
|
|
|
})
|
|
|
})
|
|
|
state.userIdDisable = false
|