|
@@ -30,17 +30,22 @@ import {
|
|
|
musicSheetType
|
|
|
} from '@/utils/constant'
|
|
|
import {
|
|
|
- musicSheetApplicationExtendCategoryList, musicSheetApplicationExtendDel,
|
|
|
+ musicSheetApplicationExtendCategoryList,
|
|
|
+ musicSheetApplicationExtendDel,
|
|
|
musicSheetApplicationExtendStatus,
|
|
|
musicSheetApplicationOwnerList,
|
|
|
musicSheetPageByApplication
|
|
|
} from '@views/music-library/api'
|
|
|
-import { subjectPage, sysApplicationPage } from '@views/system-manage/api'
|
|
|
+import {
|
|
|
+ musicSheetApplicationExtendSubjectList,
|
|
|
+ subjectPage,
|
|
|
+ sysApplicationPage
|
|
|
+} from '@views/system-manage/api'
|
|
|
import { filterTimes } from '@/utils/dateUtil'
|
|
|
import deepClone from '@/utils/deep.clone'
|
|
|
-import {copyText, getOwnerName} from '@views/music-library/musicUtil'
|
|
|
+import { copyText, getOwnerName } from '@views/music-library/musicUtil'
|
|
|
import UpdateMusic from '@views/music-library/project-music-sheet/module/gyt/updateMusic'
|
|
|
-import MusicPreView from "@views/music-library/music-sheet/modal/musicPreView";
|
|
|
+import MusicPreView from '@views/music-library/music-sheet/modal/musicPreView'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'project-music-sheet-gyt',
|
|
@@ -81,7 +86,7 @@ export default defineComponent({
|
|
|
appAuditFlag: null, //是否审核版本
|
|
|
detailFlag: null, //是否查询详情
|
|
|
applicationId: null, //所属人项目ID
|
|
|
- extendApplicationId: null, //所属人项目ID
|
|
|
+ extendApplicationId: null //所属人项目ID
|
|
|
},
|
|
|
subjectList: [],
|
|
|
dataList: [] as any[],
|
|
@@ -94,7 +99,7 @@ export default defineComponent({
|
|
|
applicationId: null, //应用ID
|
|
|
musicPreview: false,
|
|
|
musicScore: null as any,
|
|
|
- useProjectData: [] as any, // 适用项目行数据
|
|
|
+ useProjectData: [] as any // 适用项目行数据
|
|
|
})
|
|
|
|
|
|
onMounted(async () => {
|
|
@@ -115,11 +120,20 @@ export default defineComponent({
|
|
|
// 加载声部
|
|
|
|
|
|
try {
|
|
|
- const { data } = await subjectPage({ page: 1, rows: 999 })
|
|
|
- const tempList = data.rows || []
|
|
|
+ // const { data } = await subjectPage({ page: 1, rows: 999 })
|
|
|
+ // const tempList = data.rows || []
|
|
|
+ // tempList.forEach((item: any) => {
|
|
|
+ // item.label = item.name
|
|
|
+ // item.value = item.id + ''
|
|
|
+ // })
|
|
|
+ // state.subjectList = tempList
|
|
|
+ const { data } = await musicSheetApplicationExtendSubjectList({
|
|
|
+ applicationId: state.applicationId
|
|
|
+ })
|
|
|
+ const tempList = data || []
|
|
|
tempList.forEach((item: any) => {
|
|
|
- item.label = item.name
|
|
|
- item.value = item.id + ''
|
|
|
+ item.label = item.subjectName
|
|
|
+ item.value = item.subjectId
|
|
|
})
|
|
|
state.subjectList = tempList
|
|
|
} catch {}
|
|
@@ -154,7 +168,6 @@ export default defineComponent({
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
-
|
|
|
const initUseAppList = async () => {
|
|
|
try {
|
|
|
const appKeys = Object.keys(appKey)
|
|
@@ -198,7 +211,6 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
const checkedRowKeysRef = ref<DataTableRowKey[]>([])
|
|
|
const handleCheck = (rowKeys: DataTableRowKey[]) => {
|
|
|
checkedRowKeysRef.value = rowKeys
|
|
@@ -211,8 +223,8 @@ export default defineComponent({
|
|
|
const { data } = await musicSheetPageByApplication({
|
|
|
...state.pagination,
|
|
|
...state.searchForm,
|
|
|
- userId: (sourceType && sourceType === 'PERSON') ? state.searchForm.userId : null,
|
|
|
- organizationRoleId: (sourceType && sourceType === 'ORG') ? state.searchForm.userId : null,
|
|
|
+ userId: sourceType && sourceType === 'PERSON' ? state.searchForm.userId : null,
|
|
|
+ organizationRoleId: sourceType && sourceType === 'ORG' ? state.searchForm.userId : null,
|
|
|
...filterTimes(state.searchForm.times, ['startTime', 'endTime']),
|
|
|
applicationId: state.applicationId
|
|
|
})
|
|
@@ -297,10 +309,12 @@ export default defineComponent({
|
|
|
<TheTooltip content={row.name} />{' '}
|
|
|
</NDescriptionsItem>
|
|
|
<NDescriptionsItem label="曲目编号">
|
|
|
- <div onDblclick={() => {
|
|
|
- copyText(message, row.id)
|
|
|
- }}>
|
|
|
- <TheTooltip content={row.id}/>
|
|
|
+ <div
|
|
|
+ onDblclick={() => {
|
|
|
+ copyText(message, row.id)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <TheTooltip content={row.id} />
|
|
|
</div>
|
|
|
</NDescriptionsItem>
|
|
|
</NDescriptions>
|
|
@@ -330,12 +344,14 @@ export default defineComponent({
|
|
|
<NDescriptionsItem label="曲目来源">
|
|
|
{getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)))}
|
|
|
</NDescriptionsItem>
|
|
|
- <NDescriptionsItem label="多声轨渲染">{getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)))}</NDescriptionsItem>
|
|
|
+ <NDescriptionsItem label="多声轨渲染">
|
|
|
+ {getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)))}
|
|
|
+ </NDescriptionsItem>
|
|
|
<NDescriptionsItem label="所属人">
|
|
|
- <TheTooltip content={getOwnerName(row.musicSheetExtend, row.sourceType)}/>
|
|
|
+ <TheTooltip content={getOwnerName(row.musicSheetExtend, row.sourceType)} />
|
|
|
</NDescriptionsItem>
|
|
|
<NDescriptionsItem label="可用声部">
|
|
|
- <TheTooltip content={row.subjectNames}/>
|
|
|
+ <TheTooltip content={row.subjectNames} />
|
|
|
</NDescriptionsItem>
|
|
|
</NDescriptions>
|
|
|
</>
|
|
@@ -380,10 +396,10 @@ export default defineComponent({
|
|
|
key: 'composer',
|
|
|
render(row: any) {
|
|
|
return (
|
|
|
- <NDescriptions labelPlacement="left" column={1}>
|
|
|
- <NDescriptionsItem label="上传人">{row.createByName}</NDescriptionsItem>
|
|
|
- <NDescriptionsItem label="上传时间">{row.createTime}</NDescriptionsItem>
|
|
|
- </NDescriptions>
|
|
|
+ <NDescriptions labelPlacement="left" column={1}>
|
|
|
+ <NDescriptionsItem label="上传人">{row.createByName}</NDescriptionsItem>
|
|
|
+ <NDescriptionsItem label="上传时间">{row.createTime}</NDescriptionsItem>
|
|
|
+ </NDescriptions>
|
|
|
)
|
|
|
}
|
|
|
},
|
|
@@ -404,13 +420,13 @@ export default defineComponent({
|
|
|
return (
|
|
|
<NSpace>
|
|
|
<NButton
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- text
|
|
|
- onClick={() => {
|
|
|
- state.musicPreview = true
|
|
|
- state.musicScore = row
|
|
|
- }}
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ text
|
|
|
+ onClick={() => {
|
|
|
+ state.musicPreview = true
|
|
|
+ state.musicScore = row
|
|
|
+ }}
|
|
|
>
|
|
|
预览
|
|
|
</NButton>
|
|
@@ -436,12 +452,12 @@ export default defineComponent({
|
|
|
修改
|
|
|
</NButton>
|
|
|
<NButton
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- text
|
|
|
- disabled={!!row.status}
|
|
|
- onClick={() => onRmove(row)}
|
|
|
- v-auth="musicSheetApplicationExtend/del1770708605081792513"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ text
|
|
|
+ disabled={!!row.status}
|
|
|
+ onClick={() => onRmove(row)}
|
|
|
+ v-auth="musicSheetApplicationExtend/del1770708605081792513"
|
|
|
>
|
|
|
删除
|
|
|
</NButton>
|
|
@@ -489,23 +505,23 @@ export default defineComponent({
|
|
|
</NFormItem>
|
|
|
<NFormItem label="所属项目" path="applicationId">
|
|
|
<NSelect
|
|
|
- placeholder="请选择所属项目"
|
|
|
- v-model:value={state.searchForm.extendApplicationId}
|
|
|
- options={state.useProjectData}
|
|
|
- clearable
|
|
|
- onUpdateValue={async (value: any) => {
|
|
|
- state.searchForm.extendApplicationId = value
|
|
|
- if (value) {
|
|
|
- await updateUserIdData(state.searchForm.sourceType)
|
|
|
- state.userIdDisable = !(
|
|
|
- state.searchForm.sourceType && state.searchForm.sourceType !== 'PLATFORM'
|
|
|
- )
|
|
|
- } else {
|
|
|
- state.searchForm.userId = null
|
|
|
- state.userIdDisable = true
|
|
|
- state.userIdData = []
|
|
|
- }
|
|
|
- }}
|
|
|
+ placeholder="请选择所属项目"
|
|
|
+ v-model:value={state.searchForm.extendApplicationId}
|
|
|
+ options={state.useProjectData}
|
|
|
+ clearable
|
|
|
+ onUpdateValue={async (value: any) => {
|
|
|
+ state.searchForm.extendApplicationId = value
|
|
|
+ if (value) {
|
|
|
+ await updateUserIdData(state.searchForm.sourceType)
|
|
|
+ state.userIdDisable = !(
|
|
|
+ state.searchForm.sourceType && state.searchForm.sourceType !== 'PLATFORM'
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ state.searchForm.userId = null
|
|
|
+ state.userIdDisable = true
|
|
|
+ state.userIdData = []
|
|
|
+ }
|
|
|
+ }}
|
|
|
/>
|
|
|
</NFormItem>
|
|
|
<NFormItem label="所属人" path="userId">
|
|
@@ -701,12 +717,12 @@ export default defineComponent({
|
|
|
/>
|
|
|
</NModal>
|
|
|
<NModal
|
|
|
- blockScroll={true}
|
|
|
- v-model:show={state.musicPreview}
|
|
|
- preset="dialog"
|
|
|
- showIcon={false}
|
|
|
- title={'曲目预览'}
|
|
|
- style={{ width: 'auto' }}
|
|
|
+ blockScroll={true}
|
|
|
+ v-model:show={state.musicPreview}
|
|
|
+ preset="dialog"
|
|
|
+ showIcon={false}
|
|
|
+ title={'曲目预览'}
|
|
|
+ style={{ width: 'auto' }}
|
|
|
>
|
|
|
<MusicPreView item={state.musicScore} />
|
|
|
</NModal>
|