|
@@ -9,7 +9,7 @@ import MusicPreView from '../modal/musicPreView'
|
|
|
import {filterPointCategory} from '@/views/teaching-manage/unit-test'
|
|
|
import UseProject from "@views/music-library/music-sheet/modal/use-project";
|
|
|
import {getMapValueByKey} from "@/utils/filters";
|
|
|
-import {musicSheetSourceType, musicSheetType} from "@/utils/constant";
|
|
|
+import {appKey, musicSheetSourceType, musicSheetType} from "@/utils/constant";
|
|
|
import {getSelectDataFromObj} from "@/utils/objectUtil";
|
|
|
import {sysApplicationPage} from "@views/menu-manage/api";
|
|
|
|
|
@@ -48,7 +48,7 @@ export default defineComponent({
|
|
|
musicPreview: false,
|
|
|
musicScore: null as any,
|
|
|
showUseProject: false, // 适用项目
|
|
|
- useProjectData: [], // 适用项目行数据
|
|
|
+ useProjectData: [] as any, // 适用项目行数据
|
|
|
showUseProjectId: null as any, // 适用项目行数据
|
|
|
detailReadonly: false, // 新增、修改、详情是否可编辑
|
|
|
userIdDisable: true, // 所属人
|
|
@@ -362,13 +362,20 @@ export default defineComponent({
|
|
|
// app列表
|
|
|
const initUseAppList = async () => {
|
|
|
try {
|
|
|
+ const appKeys = Object.keys(appKey);
|
|
|
const {data} = await sysApplicationPage({page: 1, rows: 999})
|
|
|
const tempList = data.rows || []
|
|
|
- tempList.forEach((item: any) => {
|
|
|
- item.label = item.appName
|
|
|
- item.value = item.id
|
|
|
+ state.useProjectData = []
|
|
|
+ const filter = tempList.filter((next: any) => {
|
|
|
+ return appKeys.includes(next.appKey)
|
|
|
+ });
|
|
|
+ filter.forEach((item: any) => {
|
|
|
+ state.useProjectData.push({
|
|
|
+ ...item,
|
|
|
+ label: item.appName,
|
|
|
+ value: item.id
|
|
|
+ })
|
|
|
})
|
|
|
- state.useProjectData = tempList
|
|
|
} catch {
|
|
|
}
|
|
|
}
|
|
@@ -448,7 +455,7 @@ export default defineComponent({
|
|
|
v-model:value={state.searchForm.useAppId}
|
|
|
options={state.useProjectData}
|
|
|
clearable
|
|
|
- onUpdateValue={(value: any)=>{
|
|
|
+ onUpdateValue={(value: any) => {
|
|
|
state.searchForm.sourceType = null
|
|
|
state.searchForm.userId = null
|
|
|
state.userIdDisable = true
|