|
@@ -1,5 +1,15 @@
|
|
import { defineComponent, reactive, ref } from 'vue'
|
|
import { defineComponent, reactive, ref } from 'vue'
|
|
-import { Sticky, List, Popup, Icon, Tabs, Tab, Image } from 'vant'
|
|
|
|
|
|
+import {
|
|
|
|
+ Sticky,
|
|
|
|
+ List,
|
|
|
|
+ Popup,
|
|
|
|
+ Icon,
|
|
|
|
+ Tabs,
|
|
|
|
+ Tab,
|
|
|
|
+ Image,
|
|
|
|
+ DropdownMenu,
|
|
|
|
+ DropdownItem
|
|
|
|
+} from 'vant'
|
|
import Search from '@/components/col-search'
|
|
import Search from '@/components/col-search'
|
|
import request from '@/helpers/request'
|
|
import request from '@/helpers/request'
|
|
import Item from './item'
|
|
import Item from './item'
|
|
@@ -172,10 +182,12 @@ export default defineComponent({
|
|
tagVisibility.value = false
|
|
tagVisibility.value = false
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ const searchRef = ref()
|
|
const onComfirmSubject = item => {
|
|
const onComfirmSubject = item => {
|
|
params.page = 1
|
|
params.page = 1
|
|
params.subjectIds = item.id
|
|
params.subjectIds = item.id
|
|
|
|
|
|
|
|
+ searchRef.value.toggle()
|
|
data.value = null
|
|
data.value = null
|
|
if (baseState.platformType === 'TEACHER') {
|
|
if (baseState.platformType === 'TEACHER') {
|
|
teacherDetaultSubject.value = {
|
|
teacherDetaultSubject.value = {
|
|
@@ -217,11 +229,9 @@ export default defineComponent({
|
|
return (
|
|
return (
|
|
<div>
|
|
<div>
|
|
<List
|
|
<List
|
|
- loading={loading.value}
|
|
|
|
|
|
+ // loading={loading.value}
|
|
finished={finished.value}
|
|
finished={finished.value}
|
|
- finished-text={
|
|
|
|
- data.value && data.value.rows.length ? '没有更多了' : ''
|
|
|
|
- }
|
|
|
|
|
|
+ finished-text={data.value && data.value.rows.length ? ' ' : ''}
|
|
onLoad={FetchList}
|
|
onLoad={FetchList}
|
|
error={isError.value}
|
|
error={isError.value}
|
|
>
|
|
>
|
|
@@ -245,20 +255,44 @@ export default defineComponent({
|
|
background="transparent"
|
|
background="transparent"
|
|
v-slots={{
|
|
v-slots={{
|
|
left: () => (
|
|
left: () => (
|
|
- <div
|
|
|
|
- class={styles.label}
|
|
|
|
- onClick={() => (subject.show = true)}
|
|
|
|
- >
|
|
|
|
- {baseState.platformType === 'TEACHER'
|
|
|
|
- ? teacherDetaultSubject.value.name
|
|
|
|
- : subject.name}
|
|
|
|
- <Icon
|
|
|
|
- classPrefix="iconfont"
|
|
|
|
- name="down"
|
|
|
|
- size={12}
|
|
|
|
- color="#333"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
|
|
+ // <div
|
|
|
|
+ // class={styles.label}
|
|
|
|
+ // onClick={() => (subject.show = true)}
|
|
|
|
+ // >
|
|
|
|
+ // {baseState.platformType === 'TEACHER'
|
|
|
|
+ // ? teacherDetaultSubject.value.name
|
|
|
|
+ // : subject.name}
|
|
|
|
+ // <Icon
|
|
|
|
+ // classPrefix="iconfont"
|
|
|
|
+ // name="down"
|
|
|
|
+ // size={12}
|
|
|
|
+ // color="#333"
|
|
|
|
+ // />
|
|
|
|
+ // </div>
|
|
|
|
+ <DropdownMenu>
|
|
|
|
+ <DropdownItem
|
|
|
|
+ titleClass={
|
|
|
|
+ params.subjectId ||
|
|
|
|
+ params.type ||
|
|
|
|
+ params.level
|
|
|
|
+ ? styles.titleActive
|
|
|
|
+ : ''
|
|
|
|
+ }
|
|
|
|
+ title="筛选"
|
|
|
|
+ ref={searchRef}
|
|
|
|
+ >
|
|
|
|
+ <SelectSubject
|
|
|
|
+ type="ALBUM"
|
|
|
|
+ isReset
|
|
|
|
+ searchParams={
|
|
|
|
+ baseState.platformType === 'TEACHER'
|
|
|
|
+ ? teacherDetaultSubject.value
|
|
|
|
+ : subject
|
|
|
|
+ }
|
|
|
|
+ onComfirm={onComfirmSubject}
|
|
|
|
+ />
|
|
|
|
+ </DropdownItem>
|
|
|
|
+ </DropdownMenu>
|
|
)
|
|
)
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|
|
@@ -356,40 +390,6 @@ export default defineComponent({
|
|
)
|
|
)
|
|
)}
|
|
)}
|
|
</List>
|
|
</List>
|
|
- {/* <Popup
|
|
|
|
- show={tagVisibility.value}
|
|
|
|
- round
|
|
|
|
- closeable
|
|
|
|
- position="bottom"
|
|
|
|
- style={{ height: '60%' }}
|
|
|
|
- teleport="body"
|
|
|
|
- onUpdate:show={val => (tagVisibility.value = val)}
|
|
|
|
- >
|
|
|
|
- <SelectTag
|
|
|
|
- defaultValue={route.query.tagids as string}
|
|
|
|
- onConfirm={onComfirm}
|
|
|
|
- onCancel={() => {}}
|
|
|
|
- />
|
|
|
|
- </Popup> */}
|
|
|
|
- <Popup
|
|
|
|
- show={subject.show}
|
|
|
|
- position="bottom"
|
|
|
|
- round
|
|
|
|
- closeable
|
|
|
|
- safe-area-inset-bottom
|
|
|
|
- onClose={() => (subject.show = false)}
|
|
|
|
- onClosed={() => (subject.show = false)}
|
|
|
|
- >
|
|
|
|
- <SelectSubject
|
|
|
|
- type="ALBUM"
|
|
|
|
- searchParams={
|
|
|
|
- baseState.platformType === 'TEACHER'
|
|
|
|
- ? teacherDetaultSubject.value
|
|
|
|
- : subject
|
|
|
|
- }
|
|
|
|
- onComfirm={onComfirmSubject}
|
|
|
|
- />
|
|
|
|
- </Popup>
|
|
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|