Merge branch 'hi-ucs-dev' of http://192.168.124.50:80/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
gongjiale 2022-10-20 11:24:31 +08:00
commit 56c4393f2e
3 changed files with 206 additions and 70 deletions

View File

@ -76,10 +76,7 @@
}}</el-button> }}</el-button>
</el-form-item> </el-form-item>
<!-- 导出 --> <!-- 导出 -->
<a class='export' :href="exportExcel+exportExcelType+'?'+exportExcelCondition+'&token='+token">导出</a> <a class='export' :href="exportExcel+exportExcelType+'?'+exportExcelCondition+'&token='+token">导出全部</a>
<!-- <el-form-item>
<el-button type="primary" @click="exportExcel()">导出</el-button>
</el-form-item> -->
</el-form> </el-form>
<el-card shadow="never" class="aui-card--fill" v-if="homeIsShow"> <el-card shadow="never" class="aui-card--fill" v-if="homeIsShow">
<div class="mod-demand__bsdemand"> <div class="mod-demand__bsdemand">
@ -404,8 +401,8 @@ export default {
this.detailsVisible = false this.detailsVisible = false
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
console.log('val------------>', val); console.log('val------------>', val)
this.currentPage = val; this.currentPage = val
// todo // todo
if (this.departmentId === 3) { if (this.departmentId === 3) {
this.getOneDetail(val) this.getOneDetail(val)
@ -515,7 +512,7 @@ export default {
}) })
}, },
// 使-使 // 使-使
getSecondTree() { getSecondTree (page) {
if (this.examineStatus == '-1') { if (this.examineStatus == '-1') {
this.status = '' this.status = ''
} else if (this.examineStatus == '0') { } else if (this.examineStatus == '0') {

View File

@ -47,6 +47,38 @@ export function pageWithAttrs(data) {
data, data,
}) })
} }
//
export function getPraiseList(params) {
return request({
url: '/resource/getPraiseList',
method: 'get',
params,
})
}
//
export function getPopularList(params) {
return request({
url: '/resource/getPopularList',
method: 'get',
params,
})
}
//
export function getStarList(params) {
return request({
url: '/resource/getStarList',
method: 'get',
params,
})
}
//
export function getPotentialList(params) {
return request({
url: '/resource/getPotentialList',
method: 'get',
params,
})
}
//- //-
export function capabilityRequirements(params) { export function capabilityRequirements(params) {
return request({ return request({

View File

@ -15,10 +15,45 @@
}" }"
></div> ></div>
<div <div
style="position: relative"
:class="taboldName == item ? 'bianlan' : ''" :class="taboldName == item ? 'bianlan' : ''"
@click="tabswitch(item, index)" @click="tabswitch(item, index)"
> >
{{ item }} {{ item }}
<a-tooltip placement="right">
<template #title>
<span v-if="item === '好评榜'">
根据能力能力评价平均分排名申请无评分则计3分排名相同时按上架时间倒序排列
</span>
<span v-else-if="item === '热门榜'">
根据近30天能力申请量排名申请量相同时按收藏量访问量以及上架时间进行倒序排列
</span>
<span v-else-if="item === '明星榜'">
采取5分制根据浏览量收藏量申请量以及评价平均分以占比1:2:3:4计算综合评分综合评分相同时按上架时间倒序排列
</span>
<span v-else>
根据能力15日增幅排名增幅相同时按上架时间倒序排列
</span>
</template>
<svg
t="1666146422372"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="4749"
width="20"
height="20"
style="position: absolute"
>
<path
d="M530.64 211.33a36 36 0 1 1-36 36 36 36 0 0 1 36-36z m66.86 193.53l-90.2 336.63a90.25 90.25 0 0 0 62.93-41.33c0-0.07 0.61-1 0 0a11.15 11.15 0 0 1 20.44 8.41l-6.44 24A108 108 0 0 1 452 809a36 36 0 0 1-25.45-44.09l90.2-336.63a90.26 90.26 0 0 0-62.93 41.34c0 0.06-0.61 1 0 0a11.15 11.15 0 0 1-20.44-8.42l6.44-24a108 108 0 0 1 132.28-76.37 36 36 0 0 1 25.4 44.03z"
p-id="4750"
fill="#707070"
></path>
</svg>
</a-tooltip>
</div> </div>
</div> </div>
</div> </div>
@ -28,12 +63,54 @@
class="content-son" class="content-son"
v-for="(item, index) in dataList" v-for="(item, index) in dataList"
:key="item" :key="item"
@click="viewDetails(item.id)" @click="viewDetails(item.resourceId)"
> >
<div class="content-son-css"> <div class="content-son-css" style="position: relative">
<div class="content-index">{{ index + 1 }}</div> <div class="content-index">{{ index + 1 }}</div>
<div class="content-neirong">{{ item.name }}</div> <div class="content-neirong">{{ item.resourceName }}</div>
<div class="content-fangwenliang">访问量{{ item.visits }}</div> <div class="content-fangwenliang" v-if="taboldName === '好评榜'">
平均分{{ item.score }}
</div>
<div
class="content-fangwenliang"
v-else-if="taboldName === '热门榜'"
>
申请量{{ item.applyCount }}
</div>
<div
class="content-fangwenliang"
v-else-if="taboldName === '明星榜'"
>
热度值
<a-rate v-model:value="item.fireNum" allow-half disabled>
<template #character>
<fire-outlined />
</template>
</a-rate>
</div>
<div class="content-fangwenliang" v-else>
<template v-if="item.isNew == 1">
增幅率100%+
<svg
style="position: absolute; top: 6px; left: 0"
t="1666230976498"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3440"
width="50"
height="50"
>
<path
d="M0 0v1024L1024 0H0z m333.625806 576.412903L143.690323 540.077419l-1.651613 1.651613 112.309677 112.309678-21.470968 23.12258L82.580645 526.864516l23.122581-23.122581 188.283871 34.683871 1.651613-1.651612-112.309678-112.309678 23.122581-23.122581 150.296774 150.296775-23.122581 24.774193z m52.851613-52.851613l-150.296774-150.296774 107.354839-107.354839 19.819355 19.819355-84.232258 84.232258 42.941935 42.941936 79.277419-79.27742 19.819355 19.819355-79.277419 79.27742 47.896774 47.896774 89.187097-89.187097 19.819355 19.819355-112.309678 112.309677z m188.283871-188.283871l-24.774193 24.774194-193.23871-107.354839 26.425807-26.425806L528.516129 313.806452l1.651613-1.651613-85.883871-146.993549 24.774194-24.774193 146.993548 85.883871 1.651613-1.651613L528.516129 80.929032l26.425806-26.425806L660.645161 249.393548l-24.774193 24.774194-146.993549-85.883871-1.651613 1.651613 87.535484 145.341935z"
fill="#fa4002"
p-id="3441"
></path>
</svg>
</template>
<template v-else>增幅率{{ item.growthRate }}</template>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -46,10 +123,17 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, watch } from 'vue' import { ref } from 'vue'
import { onMounted } from 'vue' // import { onMounted } from 'vue'
import { pageWithAttrs } from '@/api/abilityStatistics' import {
// pageWithAttrs,
getPraiseList,
getPopularList,
getStarList,
getPotentialList,
} from '@/api/abilityStatistics'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { FireOutlined } from '@ant-design/icons-vue'
const router = useRouter() const router = useRouter()
// //
function viewDetails(id) { function viewDetails(id) {
@ -61,6 +145,27 @@
}, },
}) })
} }
//
const praiseList = ref([])
const popularList = ref([])
const starList = ref([])
const potentialList = ref([])
getPraiseList().then((res) => {
praiseList.value = res.data.data
res.data.data.map((val) => {
val.score = Math.round(val.score * 100) / 100
})
tabswitch('好评榜', 0)
})
getPopularList().then((res) => {
popularList.value = res.data.data
})
getStarList().then((res) => {
starList.value = res.data.data
})
getPotentialList().then((res) => {
potentialList.value = res.data.data
})
// //
function jumpPage() { function jumpPage() {
let snum = { let snum = {
@ -93,7 +198,6 @@
]) ])
//tab //tab
let taboldName = ref('好评榜') let taboldName = ref('好评榜')
let tabName = ref('score')
const tabswitch = (name, index) => { const tabswitch = (name, index) => {
photoOldJiLu.value.map((item, index) => { photoOldJiLu.value.map((item, index) => {
photoOld.value[index] = item photoOld.value[index] = item
@ -102,49 +206,49 @@
console.log('name===========>', name) console.log('name===========>', name)
switch (name) { switch (name) {
case '好评榜': case '好评榜':
tabName.value = 'score' dataList.value = praiseList.value
break break
case '热门榜': case '热门榜':
tabName.value = 'total' dataList.value = popularList.value
break break
case '明星榜': case '明星榜':
tabName.value = 'visits' dataList.value = starList.value
break break
case '潜力榜': case '潜力榜':
tabName.value = 'collectCount' dataList.value = potentialList.value
break break
} }
taboldName.value = name taboldName.value = name
} }
// //
let dataList = ref([]) // let dataList = ref([]) //
const mySelectMostPopular = (name) => { // const mySelectMostPopular = (name) => {
const data = { // const data = {
deptIds: [], // deptIds: [],
districtId: '', // districtId: '',
infoList: [], // infoList: [],
name: '', // name: '',
orderField: name, // orderField: name,
orderType: 'DESC', // orderType: 'DESC',
pageNum: 1, // pageNum: 1,
pageSize: 10, // pageSize: 10,
type: '', // type: '',
} // }
pageWithAttrs(data).then((res) => { // pageWithAttrs(data).then((res) => {
dataList.value = res.data.data.records // dataList.value = res.data.data.records
console.log('aaaaaa111aaaaaaa', res) // console.log('aaaaaa111aaaaaaa', res)
}) // })
} // }
onMounted(() => { // onMounted(() => {
watch( // watch(
tabName, // tabName,
(value) => { // (value) => {
mySelectMostPopular(value) // mySelectMostPopular(value)
}, // },
{ deep: true } // { deep: true }
) // )
mySelectMostPopular(tabName.value) // mySelectMostPopular(tabName.value)
}) // })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.ability-ranking { .ability-ranking {
@ -234,6 +338,9 @@
background-position: center; background-position: center;
margin-bottom: 17px; margin-bottom: 17px;
margin-right: 5px; margin-right: 5px;
border-radius: 2px;
border: 1px solid #f1f4fb;
box-shadow: 0px 8px 20px rgba(0, 88, 225, 0);
cursor: pointer; cursor: pointer;
.content-son-css { .content-son-css {
display: flex; display: flex;
@ -242,7 +349,7 @@
padding-top: 5px; padding-top: 5px;
padding: 2px; padding: 2px;
.content-index { .content-index {
padding-left: 15px; // padding-left: 15px;
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
font-size: 20px; font-size: 20px;