|  | @@ -90,7 +90,12 @@ export default defineComponent({
 | 
	
		
			
				|  |  |      const searchResultStatus = ref(false)
 | 
	
		
			
				|  |  |      const keyword = ref('')
 | 
	
		
			
				|  |  |      const tagids = ref('')
 | 
	
		
			
				|  |  | -    const words = useLocalStorage<string[]>('music-search', [])
 | 
	
		
			
				|  |  | +    const words = useLocalStorage<string[]>(
 | 
	
		
			
				|  |  | +      route.path === '/music-songbook/search'
 | 
	
		
			
				|  |  | +        ? 'music-search'
 | 
	
		
			
				|  |  | +        : 'music-search-ablum',
 | 
	
		
			
				|  |  | +      []
 | 
	
		
			
				|  |  | +    )
 | 
	
		
			
				|  |  |      const activeTab = ref('all')
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      if (route.path === '/music-songbook/result') {
 | 
	
	
		
			
				|  | @@ -130,15 +135,36 @@ export default defineComponent({
 | 
	
		
			
				|  |  |      const searchList = ref<any>([])
 | 
	
		
			
				|  |  |      const onInputSearch = useThrottleFn(async (val: any) => {
 | 
	
		
			
				|  |  |        try {
 | 
	
		
			
				|  |  | -        const { data } = await request.post('/api-student/music/sheet/search', {
 | 
	
		
			
				|  |  | -          hideLoading: true,
 | 
	
		
			
				|  |  | -          data: {
 | 
	
		
			
				|  |  | -            subjectId: subjects.id,
 | 
	
		
			
				|  |  | -            name: val,
 | 
	
		
			
				|  |  | -            rows: 10
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | -        const tempMusics = data.musicNames || []
 | 
	
		
			
				|  |  | +        let tData: any = {}
 | 
	
		
			
				|  |  | +        if (route.path === '/music-songbook/searchAlbum') {
 | 
	
		
			
				|  |  | +          const { data } = await request.post(
 | 
	
		
			
				|  |  | +            '/api-student/music/sheet/searchTenant',
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              hideLoading: true,
 | 
	
		
			
				|  |  | +              data: {
 | 
	
		
			
				|  |  | +                // subjectId: subjects.id,
 | 
	
		
			
				|  |  | +                name: val,
 | 
	
		
			
				|  |  | +                rows: 10
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          )
 | 
	
		
			
				|  |  | +          tData = data
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          const { data } = await request.post(
 | 
	
		
			
				|  |  | +            '/api-student/music/sheet/search',
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              hideLoading: true,
 | 
	
		
			
				|  |  | +              data: {
 | 
	
		
			
				|  |  | +                subjectId: subjects.id,
 | 
	
		
			
				|  |  | +                name: val,
 | 
	
		
			
				|  |  | +                rows: 10
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          )
 | 
	
		
			
				|  |  | +          tData = data
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        const tempMusics = tData.musicNames || []
 | 
	
		
			
				|  |  |          tempMusics.forEach((item: any, index: number) => {
 | 
	
		
			
				|  |  |            if (index < 10) {
 | 
	
		
			
				|  |  |              item.name = item.name.replace(val, `<span>${val}</span>`)
 | 
	
	
		
			
				|  | @@ -162,18 +188,27 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          words.value.unshift(val)
 | 
	
		
			
				|  |  |          // console.log(words.value.length, 'words.value.length')
 | 
	
		
			
				|  |  |          words.value.length = Math.min(words.value.length, 10)
 | 
	
		
			
				|  |  | +        // 结合搜索
 | 
	
		
			
				|  |  |          if (route.path === '/music-songbook/search') defaultClose()
 | 
	
		
			
				|  |  | +        // 机构专辑搜索
 | 
	
		
			
				|  |  | +        if (route.path === '/music-songbook/searchAlbum') defaultClose()
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      // mitter.emit('search', val)
 | 
	
		
			
				|  |  | -      if (route.path !== '/music-songbook/result') {
 | 
	
		
			
				|  |  | -        router.replace({
 | 
	
		
			
				|  |  | -          path: '/music-songbook/result',
 | 
	
		
			
				|  |  | -          query: {
 | 
	
		
			
				|  |  | -            search: val
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | -        searchResultStatus.value = false
 | 
	
		
			
				|  |  | -        searchList.value = []
 | 
	
		
			
				|  |  | +      // 机构专辑详情
 | 
	
		
			
				|  |  | +      if (route.path !== '/music-songbook/searchAlbum') {
 | 
	
		
			
				|  |  | +        // 综合搜索
 | 
	
		
			
				|  |  | +        if (route.path !== '/music-songbook/result') {
 | 
	
		
			
				|  |  | +          router.replace({
 | 
	
		
			
				|  |  | +            path: '/music-songbook/result',
 | 
	
		
			
				|  |  | +            query: {
 | 
	
		
			
				|  |  | +              search: val
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          searchResultStatus.value = false
 | 
	
		
			
				|  |  | +          searchList.value = []
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          searchResultStatus.value = false
 | 
	
		
			
				|  |  | +          mitter.emit('search', val)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  |          searchResultStatus.value = false
 | 
	
		
			
				|  |  |          mitter.emit('search', val)
 | 
	
	
		
			
				|  | @@ -248,6 +283,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      // 首先调用默认收起的方法
 | 
	
		
			
				|  |  |      if (route.path === '/music-songbook/search') defaultClose()
 | 
	
		
			
				|  |  | +    if (route.path === '/music-songbook/searchAlbum') defaultClose()
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      onMounted(() => {
 | 
	
		
			
				|  |  |        postMessage({
 | 
	
	
		
			
				|  | @@ -280,32 +316,36 @@ export default defineComponent({
 | 
	
		
			
				|  |  |                      if (route.path === '/music-songbook/result') {
 | 
	
		
			
				|  |  |                        router.replace('/music-songbook/search')
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                    if (route.path === '/music-songbook/searchAlbum') {
 | 
	
		
			
				|  |  | +                      mitter.emit('search', '')
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                    }
 | 
	
		
			
				|  |  |                  }}
 | 
	
		
			
				|  |  |                  onSearch={(val: any) => {
 | 
	
		
			
				|  |  |                    if (!val) return
 | 
	
		
			
				|  |  |                    keyword.value = val
 | 
	
		
			
				|  |  | -                  console.log(val, 'val')
 | 
	
		
			
				|  |  |                    onSearch(val)
 | 
	
		
			
				|  |  |                    // searchResultStatus.value = true
 | 
	
		
			
				|  |  |                  }}
 | 
	
		
			
				|  |  |                  type="tenant"
 | 
	
		
			
				|  |  |                  v-slots={{
 | 
	
		
			
				|  |  | -                  left: () => (
 | 
	
		
			
				|  |  | -                    <DropdownMenu>
 | 
	
		
			
				|  |  | -                      <DropdownItem
 | 
	
		
			
				|  |  | -                        // titleClass={styles.titleActive}
 | 
	
		
			
				|  |  | -                        title={subject.name}
 | 
	
		
			
				|  |  | -                        ref={searchRef}
 | 
	
		
			
				|  |  | -                      >
 | 
	
		
			
				|  |  | -                        <SelectSubject
 | 
	
		
			
				|  |  | -                          isReset
 | 
	
		
			
				|  |  | -                          searchParams={subject}
 | 
	
		
			
				|  |  | -                          onComfirm={onComfirmSubject}
 | 
	
		
			
				|  |  | -                        />
 | 
	
		
			
				|  |  | -                      </DropdownItem>
 | 
	
		
			
				|  |  | -                    </DropdownMenu>
 | 
	
		
			
				|  |  | -                  ),
 | 
	
		
			
				|  |  | +                  left: () =>
 | 
	
		
			
				|  |  | +                    route.path !== '/music-songbook/searchAlbum' && (
 | 
	
		
			
				|  |  | +                      <DropdownMenu>
 | 
	
		
			
				|  |  | +                        <DropdownItem
 | 
	
		
			
				|  |  | +                          // titleClass={styles.titleActive}
 | 
	
		
			
				|  |  | +                          title={subject.name}
 | 
	
		
			
				|  |  | +                          ref={searchRef}
 | 
	
		
			
				|  |  | +                        >
 | 
	
		
			
				|  |  | +                          <SelectSubject
 | 
	
		
			
				|  |  | +                            isReset
 | 
	
		
			
				|  |  | +                            searchParams={subject}
 | 
	
		
			
				|  |  | +                            onComfirm={onComfirmSubject}
 | 
	
		
			
				|  |  | +                          />
 | 
	
		
			
				|  |  | +                        </DropdownItem>
 | 
	
		
			
				|  |  | +                      </DropdownMenu>
 | 
	
		
			
				|  |  | +                    ),
 | 
	
		
			
				|  |  |                    action: () => (
 | 
	
		
			
				|  |  |                      <span
 | 
	
		
			
				|  |  |                        class={styles.searchCancel}
 | 
	
	
		
			
				|  | @@ -341,49 +381,53 @@ export default defineComponent({
 | 
	
		
			
				|  |  |              </TheSticky>
 | 
	
		
			
				|  |  |              <img class={styles.bgImg} src={bgImg} />
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  | -          {words.value.length > 0 && route.path === '/music-songbook/search' && (
 | 
	
		
			
				|  |  | -            <div class={styles.keywordSection}>
 | 
	
		
			
				|  |  | -              <div class={styles.keywordTitle}>
 | 
	
		
			
				|  |  | -                <span class={styles.t}>搜索历史</span>
 | 
	
		
			
				|  |  | -                <Icon
 | 
	
		
			
				|  |  | -                  class={styles.remove}
 | 
	
		
			
				|  |  | -                  name={iconDelete}
 | 
	
		
			
				|  |  | -                  onClick={() => (words.value = [])}
 | 
	
		
			
				|  |  | -                />
 | 
	
		
			
				|  |  | -              </div>
 | 
	
		
			
				|  |  | -              <div class={classNames(styles.keywords)}>
 | 
	
		
			
				|  |  | -                <div class={styles.content}>
 | 
	
		
			
				|  |  | -                  {words.value.map((item: any, index: number) => (
 | 
	
		
			
				|  |  | -                    <Tag
 | 
	
		
			
				|  |  | -                      ref={(el: any) => (tagRef.value[index] = el)}
 | 
	
		
			
				|  |  | -                      round
 | 
	
		
			
				|  |  | -                      class={[styles.searchKeyword, 'van-ellipsis']}
 | 
	
		
			
				|  |  | -                      key={item}
 | 
	
		
			
				|  |  | -                      onClick={() => {
 | 
	
		
			
				|  |  | -                        keyword.value = item
 | 
	
		
			
				|  |  | -                        onSearch(item)
 | 
	
		
			
				|  |  | -                      }}
 | 
	
		
			
				|  |  | -                    >
 | 
	
		
			
				|  |  | -                      {item}
 | 
	
		
			
				|  |  | -                    </Tag>
 | 
	
		
			
				|  |  | -                  ))}
 | 
	
		
			
				|  |  | -                  {collapse.line > 1 && (
 | 
	
		
			
				|  |  | -                    <span
 | 
	
		
			
				|  |  | -                      class={[styles.arrowMore]}
 | 
	
		
			
				|  |  | -                      onClick={() => {
 | 
	
		
			
				|  |  | -                        collapse.arrowStatus = !collapse.arrowStatus
 | 
	
		
			
				|  |  | -                        defaultClose()
 | 
	
		
			
				|  |  | -                      }}
 | 
	
		
			
				|  |  | -                    >
 | 
	
		
			
				|  |  | -                      <Icon
 | 
	
		
			
				|  |  | -                        name={collapse.arrowStatus ? 'arrow-up' : 'arrow-down'}
 | 
	
		
			
				|  |  | -                      />
 | 
	
		
			
				|  |  | -                    </span>
 | 
	
		
			
				|  |  | -                  )}
 | 
	
		
			
				|  |  | +          {words.value.length > 0 &&
 | 
	
		
			
				|  |  | +            (route.path === '/music-songbook/search' ||
 | 
	
		
			
				|  |  | +              route.path === '/music-songbook/searchAlbum') && (
 | 
	
		
			
				|  |  | +              <div class={styles.keywordSection}>
 | 
	
		
			
				|  |  | +                <div class={styles.keywordTitle}>
 | 
	
		
			
				|  |  | +                  <span class={styles.t}>搜索历史</span>
 | 
	
		
			
				|  |  | +                  <Icon
 | 
	
		
			
				|  |  | +                    class={styles.remove}
 | 
	
		
			
				|  |  | +                    name={iconDelete}
 | 
	
		
			
				|  |  | +                    onClick={() => (words.value = [])}
 | 
	
		
			
				|  |  | +                  />
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div class={classNames(styles.keywords)}>
 | 
	
		
			
				|  |  | +                  <div class={styles.content}>
 | 
	
		
			
				|  |  | +                    {words.value.map((item: any, index: number) => (
 | 
	
		
			
				|  |  | +                      <Tag
 | 
	
		
			
				|  |  | +                        ref={(el: any) => (tagRef.value[index] = el)}
 | 
	
		
			
				|  |  | +                        round
 | 
	
		
			
				|  |  | +                        class={[styles.searchKeyword, 'van-ellipsis']}
 | 
	
		
			
				|  |  | +                        key={item}
 | 
	
		
			
				|  |  | +                        onClick={() => {
 | 
	
		
			
				|  |  | +                          keyword.value = item
 | 
	
		
			
				|  |  | +                          onSearch(item)
 | 
	
		
			
				|  |  | +                        }}
 | 
	
		
			
				|  |  | +                      >
 | 
	
		
			
				|  |  | +                        {item}
 | 
	
		
			
				|  |  | +                      </Tag>
 | 
	
		
			
				|  |  | +                    ))}
 | 
	
		
			
				|  |  | +                    {collapse.line > 1 && (
 | 
	
		
			
				|  |  | +                      <span
 | 
	
		
			
				|  |  | +                        class={[styles.arrowMore]}
 | 
	
		
			
				|  |  | +                        onClick={() => {
 | 
	
		
			
				|  |  | +                          collapse.arrowStatus = !collapse.arrowStatus
 | 
	
		
			
				|  |  | +                          defaultClose()
 | 
	
		
			
				|  |  | +                        }}
 | 
	
		
			
				|  |  | +                      >
 | 
	
		
			
				|  |  | +                        <Icon
 | 
	
		
			
				|  |  | +                          name={
 | 
	
		
			
				|  |  | +                            collapse.arrowStatus ? 'arrow-up' : 'arrow-down'
 | 
	
		
			
				|  |  | +                          }
 | 
	
		
			
				|  |  | +                        />
 | 
	
		
			
				|  |  | +                      </span>
 | 
	
		
			
				|  |  | +                    )}
 | 
	
		
			
				|  |  | +                  </div>
 | 
	
		
			
				|  |  |                  </div>
 | 
	
		
			
				|  |  |                </div>
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -          )}
 | 
	
		
			
				|  |  | +            )}
 | 
	
		
			
				|  |  |            {route.path === '/music-songbook/search' && (
 | 
	
		
			
				|  |  |              <Tabs
 | 
	
		
			
				|  |  |                color="var(--van-primary)"
 | 
	
	
		
			
				|  | @@ -401,22 +445,6 @@ export default defineComponent({
 | 
	
		
			
				|  |  |            )}
 | 
	
		
			
				|  |  |            <RouterView />
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -          {/* 声部弹框 */}
 | 
	
		
			
				|  |  | -          {/* <Popup
 | 
	
		
			
				|  |  | -            show={subject.show}
 | 
	
		
			
				|  |  | -            position="bottom"
 | 
	
		
			
				|  |  | -            round
 | 
	
		
			
				|  |  | -            closeable
 | 
	
		
			
				|  |  | -            safe-area-inset-bottom
 | 
	
		
			
				|  |  | -            onClose={() => (subject.show = false)}
 | 
	
		
			
				|  |  | -            onClosed={() => (subject.show = false)}
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | -            <SelectSubject
 | 
	
		
			
				|  |  | -              searchParams={subject}
 | 
	
		
			
				|  |  | -              onComfirm={onComfirmSubject}
 | 
	
		
			
				|  |  | -            />
 | 
	
		
			
				|  |  | -          </Popup> */}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |            <div
 | 
	
		
			
				|  |  |              class={[styles.searchResult]}
 | 
	
		
			
				|  |  |              style={{ display: searchResultStatus.value ? 'block' : 'none' }}
 |