|
@@ -222,10 +222,18 @@ export default defineComponent({
|
|
|
const partNames = formated.partNames || []
|
|
|
|
|
|
const tempMp3s: BackgroundMp3[] = []
|
|
|
+
|
|
|
for (const i of partNames) {
|
|
|
- const index = this.cbsInstrumentList.findIndex(
|
|
|
- cbs => cbs.code?.indexOf(i) > -1
|
|
|
- )
|
|
|
+ let index = -1
|
|
|
+ this.cbsInstrumentList.forEach((item: any, j: number) => {
|
|
|
+ const code = item.code ? item.code.split(',') : ''
|
|
|
+ for (const p of code) {
|
|
|
+ if (i.indexOf(p) > -1) {
|
|
|
+ index = j
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
if (index === -1) {
|
|
|
resultIndexStatus = true
|
|
|
break
|
|
@@ -233,12 +241,11 @@ export default defineComponent({
|
|
|
|
|
|
const currentItem = this.cbsInstrumentList[index]
|
|
|
if (currentItem) {
|
|
|
- console.log(currentItem, 'currentItem')
|
|
|
tempMp3s.push({
|
|
|
url: '',
|
|
|
id: currentItem.id,
|
|
|
trackName: currentItem.name,
|
|
|
- track: currentItem.code,
|
|
|
+ track: i,
|
|
|
loading: currentItem.loading
|
|
|
})
|
|
|
}
|
|
@@ -290,9 +297,15 @@ export default defineComponent({
|
|
|
|
|
|
const tempMp3s: BackgroundMp3[] = []
|
|
|
for (const i of partNames) {
|
|
|
- const index = this.cbsInstrumentList.findIndex(
|
|
|
- cbs => cbs.code?.indexOf(i) > -1
|
|
|
- )
|
|
|
+ let index = -1
|
|
|
+ this.cbsInstrumentList.forEach((item: any, j: number) => {
|
|
|
+ const code = item.code ? item.code.split(',') : ''
|
|
|
+ for (const p of code) {
|
|
|
+ if (i.indexOf(p) > -1) {
|
|
|
+ index = j
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
if (index === -1) {
|
|
|
resultIndexStatus = true
|
|
|
break
|
|
@@ -305,7 +318,7 @@ export default defineComponent({
|
|
|
url: '',
|
|
|
id: currentItem.id,
|
|
|
trackName: currentItem.name,
|
|
|
- track: currentItem.code,
|
|
|
+ track: i,
|
|
|
loading: currentItem.loading
|
|
|
})
|
|
|
}
|