|
@@ -73,9 +73,9 @@ export default defineComponent({
|
|
|
const tempRows = data.rows || [];
|
|
|
const temp: any = [];
|
|
|
tempRows.forEach((row: any) => {
|
|
|
- const index = prepareStore.getTrainList.findIndex(
|
|
|
- (course: any) => course.musicId === row.id
|
|
|
- );
|
|
|
+ // const index = prepareStore.getTrainList.findIndex(
|
|
|
+ // (course: any) => course.musicId === row.id
|
|
|
+ // );
|
|
|
temp.push({
|
|
|
id: row.id,
|
|
|
coverImg: row.coverImg || row.musicSvg,
|
|
@@ -86,8 +86,8 @@ export default defineComponent({
|
|
|
refFlag: row.refFlag,
|
|
|
content: row.id,
|
|
|
xmlFileUrl: row.xmlFileUrl,
|
|
|
- containAccompaniment: row.containAccompaniment,
|
|
|
- exist: index !== -1 ? true : false // 是否存在
|
|
|
+ containAccompaniment: row.containAccompaniment
|
|
|
+ // exist: index !== -1 ? true : false // 是否存在
|
|
|
});
|
|
|
});
|
|
|
state.tableList.push(...temp);
|
|
@@ -98,21 +98,21 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- watch(
|
|
|
- () => prepareStore.trainList,
|
|
|
- () => {
|
|
|
- state.tableList.forEach((item: any) => {
|
|
|
- const index = prepareStore.getTrainList.findIndex(
|
|
|
- (course: any) => course.musicId === item.id
|
|
|
- );
|
|
|
- item.exist = index !== -1 ? true : false; // 是否存在
|
|
|
- });
|
|
|
- },
|
|
|
- {
|
|
|
- deep: true,
|
|
|
- immediate: true
|
|
|
- }
|
|
|
- );
|
|
|
+ // watch(
|
|
|
+ // () => prepareStore.trainList,
|
|
|
+ // () => {
|
|
|
+ // state.tableList.forEach((item: any) => {
|
|
|
+ // const index = prepareStore.getTrainList.findIndex(
|
|
|
+ // (course: any) => course.musicId === item.id
|
|
|
+ // );
|
|
|
+ // item.exist = index !== -1 ? true : false; // 是否存在
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // deep: true,
|
|
|
+ // immediate: true
|
|
|
+ // }
|
|
|
+ // );
|
|
|
|
|
|
const throttledFnSearch = useDebounceFn(item => {
|
|
|
state.pagination.page = 1;
|