|
@@ -17,68 +17,69 @@
|
|
|
@search="onSearch"
|
|
@search="onSearch"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <a-row :gutter="[16, 16]">
|
|
|
|
|
- <a-col :span="8" v-for="(item, index) in resources" :key="index">
|
|
|
|
|
- <div style="border-radius: 10px 10px 5px 5px; border: 1px solid #dcdcdc">
|
|
|
|
|
- <div style="display: flex; position: relative">
|
|
|
|
|
- <div
|
|
|
|
|
- class="resource"
|
|
|
|
|
- @click="handleItem(item)"
|
|
|
|
|
- :style="{
|
|
|
|
|
- backgroundSize: 'cover',
|
|
|
|
|
- backgroundPosition: 'center',
|
|
|
|
|
- backgroundImage:
|
|
|
|
|
- 'url(' +
|
|
|
|
|
- (item.coverImagePath != '' && sysConfig.FILE_URL + item.coverImagePath
|
|
|
|
|
- ? sysConfig.FILE_URL + item.coverImagePath
|
|
|
|
|
- : '') +
|
|
|
|
|
- ')'
|
|
|
|
|
- }"
|
|
|
|
|
- >
|
|
|
|
|
- <!-- <a-image
|
|
|
|
|
- style="width: 100%; height: 100%"
|
|
|
|
|
- :src="
|
|
|
|
|
- item.coverImagePath != '' && sysConfig.FILE_URL + item.coverImagePath
|
|
|
|
|
- ? sysConfig.FILE_URL + item.coverImagePath
|
|
|
|
|
- : ''
|
|
|
|
|
- "
|
|
|
|
|
- alt=""
|
|
|
|
|
- :preview="false"
|
|
|
|
|
- ></a-image> -->
|
|
|
|
|
- <PlayCircleOutlined
|
|
|
|
|
- :style="{ fontSize: '40px', color: 'white' }"
|
|
|
|
|
- style="position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%)"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="display: flex; flex-direction: column; padding: 5px 10px">
|
|
|
|
|
- <span style="font-size: 16px; font-weight: bold">{{ item.fileName }}</span>
|
|
|
|
|
- <span style="font-size: 12px">{{ item.collegeIdName }}</span>
|
|
|
|
|
- <span style="font-size: 12px">{{ item.majorIdName }}</span>
|
|
|
|
|
- <div style="display: flex; justify-content: space-between">
|
|
|
|
|
- <div style="display: flex; justify-content: center; align-items: center">
|
|
|
|
|
- <FieldTimeOutlined />
|
|
|
|
|
- <div style="width: 5px"></div>
|
|
|
|
|
- <span style="font-size: 12px">{{ item.uploadTime }}</span>
|
|
|
|
|
|
|
+ <a-spin :spinning="loading" tip="">
|
|
|
|
|
+ <a-row :gutter="[16, 16]">
|
|
|
|
|
+ <a-col :span="8" v-for="(item, index) in resources" :key="index">
|
|
|
|
|
+ <div style="border-radius: 10px 10px 5px 5px; border: 1px solid #dcdcdc">
|
|
|
|
|
+ <div style="display: flex; position: relative">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="resource"
|
|
|
|
|
+ @click="handleItem(item)"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ backgroundSize: 'cover',
|
|
|
|
|
+ backgroundPosition: 'center',
|
|
|
|
|
+ backgroundImage:
|
|
|
|
|
+ 'url(' +
|
|
|
|
|
+ (item.coverImagePath != '' && sysConfig.FILE_URL + item.coverImagePath
|
|
|
|
|
+ ? sysConfig.FILE_URL + item.coverImagePath
|
|
|
|
|
+ : '') +
|
|
|
|
|
+ ')'
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <!-- <a-image
|
|
|
|
|
+ style="width: 100%; height: 100%"
|
|
|
|
|
+ :src="
|
|
|
|
|
+ item.coverImagePath != '' && sysConfig.FILE_URL + item.coverImagePath
|
|
|
|
|
+ ? sysConfig.FILE_URL + item.coverImagePath
|
|
|
|
|
+ : ''
|
|
|
|
|
+ "
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ :preview="false"
|
|
|
|
|
+ ></a-image> -->
|
|
|
|
|
+ <PlayCircleOutlined
|
|
|
|
|
+ :style="{ fontSize: '40px', color: 'white' }"
|
|
|
|
|
+ style="position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%)"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="display: flex; flex-direction: column; padding: 5px 10px">
|
|
|
|
|
+ <span style="font-size: 16px; font-weight: bold">{{ item.fileName }}</span>
|
|
|
|
|
+ <span style="font-size: 12px">{{ item.collegeIdName }}</span>
|
|
|
|
|
+ <span style="font-size: 12px">{{ item.majorIdName }}</span>
|
|
|
|
|
+ <div style="display: flex; justify-content: space-between">
|
|
|
|
|
+ <div style="display: flex; justify-content: center; align-items: center">
|
|
|
|
|
+ <FieldTimeOutlined />
|
|
|
|
|
+ <div style="width: 5px"></div>
|
|
|
|
|
+ <span style="font-size: 12px">{{ item.uploadTime }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <div style="display: flex; justify-content: center; align-items: center">
|
|
|
|
|
- <EyeOutlined />
|
|
|
|
|
- <div style="width: 5px"></div>
|
|
|
|
|
- <span style="font-size: 12px">{{ item.viewCount }}</span>
|
|
|
|
|
|
|
+ <div style="display: flex; justify-content: center; align-items: center">
|
|
|
|
|
+ <EyeOutlined />
|
|
|
|
|
+ <div style="width: 5px"></div>
|
|
|
|
|
+ <span style="font-size: 12px">{{ item.viewCount }}</span>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <!-- <a-card-meta :title="item.title">
|
|
|
|
|
- <template #description>
|
|
|
|
|
- <p>{{ item.description }}</p>
|
|
|
|
|
- </template>
|
|
|
|
|
- </a-card-meta> -->
|
|
|
|
|
- </div>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- </a-row>
|
|
|
|
|
|
|
|
|
|
|
|
+ <!-- <a-card-meta :title="item.title">
|
|
|
|
|
+ <template #description>
|
|
|
|
|
+ <p>{{ item.description }}</p>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-card-meta> -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </a-spin>
|
|
|
<div style="height: 20px"></div>
|
|
<div style="height: 20px"></div>
|
|
|
<div style="display: flex; width: 100%; align-items: center; justify-content: center">
|
|
<div style="display: flex; width: 100%; align-items: center; justify-content: center">
|
|
|
<a-pagination
|
|
<a-pagination
|
|
@@ -101,6 +102,7 @@
|
|
|
import sysConfig from '@/config/index'
|
|
import sysConfig from '@/config/index'
|
|
|
const queryData = ref({})
|
|
const queryData = ref({})
|
|
|
const total = ref(0)
|
|
const total = ref(0)
|
|
|
|
|
+ const loading = ref(false)
|
|
|
const tabKey = ref(0)
|
|
const tabKey = ref(0)
|
|
|
const currentPage = reactive({
|
|
const currentPage = reactive({
|
|
|
current: 1,
|
|
current: 1,
|
|
@@ -159,6 +161,7 @@
|
|
|
// })
|
|
// })
|
|
|
|
|
|
|
|
const getList = () => {
|
|
const getList = () => {
|
|
|
|
|
+ loading.value = true
|
|
|
list({ ...currentPage, ...queryData.value })
|
|
list({ ...currentPage, ...queryData.value })
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
console.log('下面列表获取', res)
|
|
console.log('下面列表获取', res)
|
|
@@ -167,9 +170,11 @@
|
|
|
total.value = res.data.total
|
|
total.value = res.data.total
|
|
|
currentPage.current = res.data.current
|
|
currentPage.current = res.data.current
|
|
|
}
|
|
}
|
|
|
|
|
+ loading.value = false
|
|
|
})
|
|
})
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
|
console.log(err)
|
|
console.log(err)
|
|
|
|
|
+ loading.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -177,6 +182,7 @@
|
|
|
currentPage.current = 1
|
|
currentPage.current = 1
|
|
|
currentPage.size = 12
|
|
currentPage.size = 12
|
|
|
queryData.value = data
|
|
queryData.value = data
|
|
|
|
|
+ loading.value = true
|
|
|
list({ ...currentPage, ...queryData.value })
|
|
list({ ...currentPage, ...queryData.value })
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
// console.log('外面控制的刷新列表', res)
|
|
// console.log('外面控制的刷新列表', res)
|
|
@@ -185,9 +191,11 @@
|
|
|
total.value = res.data.total
|
|
total.value = res.data.total
|
|
|
currentPage.current = res.data.current
|
|
currentPage.current = res.data.current
|
|
|
}
|
|
}
|
|
|
|
|
+ loading.value = false
|
|
|
})
|
|
})
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
|
console.log(err)
|
|
console.log(err)
|
|
|
|
|
+ loading.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|