Compare commits

...

2 Commits

10 changed files with 338 additions and 269 deletions

View File

@ -79,6 +79,18 @@
header-align="center" header-align="center"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column
prop="resoureType"
label="资源类型"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="provideDept"
label="提供部门"
header-align="center"
align="center"
></el-table-column>
<!-- <el-table-column prop="startTime" :label="$t('process.startTime')" header-align="center" align="center"></el-table-column> --> <!-- <el-table-column prop="startTime" :label="$t('process.startTime')" header-align="center" align="center"></el-table-column> -->
<el-table-column <el-table-column
prop="createTime" prop="createTime"

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

View File

@ -257,9 +257,18 @@
</b> </b>
{{ item.name }} : {{ item.name }} :
</div> </div>
<div v-if="item.type == 'input' && item.name === '参考价格'">
<a-input
:maxLength="1000"
v-model:value="item.note1"
:placeholder="'请输入' + placeHolderWords(item.name)+',单位为元'"
@change="changeIiem(item.name, item.note1)"
/>
<span style="color:red"> (仅用于测算为部门节省资金)</span>
</div>
<a-input <a-input
:maxLength="1000" :maxLength="1000"
v-if="item.type == 'input' && item.name.indexOf('名称') == -1" v-else-if="item.type == 'input' && item.name.indexOf('名称') == -1"
v-model:value="item.note1" v-model:value="item.note1"
:placeholder="'请输入' + placeHolderWords(item.name)" :placeholder="'请输入' + placeHolderWords(item.name)"
@change="changeIiem(item.name, item.note1)" @change="changeIiem(item.name, item.note1)"

View File

@ -4,7 +4,7 @@
<div class="main"> <div class="main">
<div class="left"> <div class="left">
<a-layout-sider> <a-layout-sider>
<a-menu v-model:selectedKeys="selectedKeys" mode="inline" @click="handleClick"> <a-menu v-model:selectedKeys="selectedKeys" mode="inline" @click="handleClick">
<a-menu-item v-for="item in menuList" :key="item.key"> <a-menu-item v-for="item in menuList" :key="item.key">
<img :src="item.img" alt="" style="margin-right: 10px" /> <img :src="item.img" alt="" style="margin-right: 10px" />
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
@ -69,7 +69,18 @@ const pageSize = ref(8)
const total = ref() const total = ref()
const showKey = ref(0) const showKey = ref(0)
const whoShow1 = ref(whoShow) const whoShow1 = ref(whoShow)
const selectedKeys = ref(['0'])
const menuList = [ const menuList = [
{
key: '0',
title: '全部需求',
num: '0',
img: require('@/assets/home/menuall.png'),
},
{ {
key: '1', key: '1',
title: '基础设施', title: '基础设施',
@ -98,7 +109,7 @@ const menuList = [
key: '5', key: '5',
title: '知识库', title: '知识库',
num: '0', num: '0',
img: require('@/assets/home/menuyyzy.png'), img: require('@/assets/home/menuzsk.png'),
}, },
] ]
const detailsType = ref('') const detailsType = ref('')
@ -113,6 +124,8 @@ const handleClick = (item) => {
detailsType.value = '应用资源' detailsType.value = '应用资源'
} else if (item.key === '5') { } else if (item.key === '5') {
detailsType.value = '知识库' detailsType.value = '知识库'
}else{
detailsType.value = ''
} }
pageNum.value = 1 pageNum.value = 1
getApplyList() getApplyList()
@ -138,8 +151,7 @@ const getApplyList = () => {
} }
const showDetail = (item) => { const showDetail = (item) => {
// console.log('demandDetails', item)
// store.commit('home/demandDetailsData', item)
router.push({ router.push({
path: '/demandDetails', path: '/demandDetails',
query: { query: {
@ -164,6 +176,7 @@ onMounted(() => {
list.value = res.data.data.list list.value = res.data.data.list
total.value = res.data.data.total total.value = res.data.data.total
}) })
}) })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -833,7 +833,7 @@
let select = let select =
router.currentRoute.value.query.select || router.currentRoute.value.query.select ||
DETAIL_PAGE_CONTENT_DEFAULT_TAB DETAIL_PAGE_CONTENT_DEFAULT_TAB
console.log('select------------>', select) let orderField =router.currentRoute.value.query.orderField
// selectSubType... // selectSubType...
let selectSubType = router.currentRoute.value.query.type || '' let selectSubType = router.currentRoute.value.query.type || ''
let queryName = ref('') let queryName = ref('')
@ -926,7 +926,6 @@
) { ) {
;[title[0], title[2]] = [title[2], title[0]] ;[title[0], title[2]] = [title[2], title[0]]
} }
debugger
titleName.value = title titleName.value = title
} }
// //
@ -1323,6 +1322,8 @@
globalData.data = [] globalData.data = []
} }
select = router.currentRoute.value.query.select select = router.currentRoute.value.query.select
if ( if (
(select == '应用资源' && (select == '应用资源' &&
(paramsGetResources.orderField == '' || (paramsGetResources.orderField == '' ||
@ -1619,7 +1620,6 @@
} }
// -西 // -西
const getXiHaiAn = (res) => { const getXiHaiAn = (res) => {
debugger
const data = (res.data && res.data.data && res.data.data.list) || [] const data = (res.data && res.data.data && res.data.data.list) || []
const total = (res.data && res.data.data && res.data.data.total) || 0 const total = (res.data && res.data.data && res.data.data.total) || 0
data.forEach((val) => { data.forEach((val) => {
@ -1784,6 +1784,10 @@
onMounted(() => { onMounted(() => {
// //
//西 //西
orderField= router.currentRoute.value.query.orderField //
if(orderField){
paramsGetResources.orderField=orderField
}
setTitle() setTitle()
handleSetSearchData() handleSetSearchData()
listKey2.value++ listKey2.value++

View File

@ -744,6 +744,7 @@
* isFromFather: 是否来自父组件传值 * isFromFather: 是否来自父组件传值
*/ */
const changeCondition = (item, isFromFather = false) => { const changeCondition = (item, isFromFather = false) => {
console.log('item, isFromFather------------>', item, isFromFather) console.log('item, isFromFather------------>', item, isFromFather)
let newType = item.orderType == 'DESC' ? 'ASC' : 'DESC' let newType = item.orderType == 'DESC' ? 'ASC' : 'DESC'
if (isFromFather) { if (isFromFather) {

View File

@ -60,6 +60,7 @@
show-size-changer show-size-changer
show-less-items show-less-items
show-quick-jumper show-quick-jumper
:total="resourceTotal" :total="resourceTotal"
:page-size-options="pageSizeOptions" :page-size-options="pageSizeOptions"
@change="pageChange" @change="pageChange"

View File

@ -8,11 +8,13 @@
<div class="bottom"> <div class="bottom">
<div class="item" v-for="item in productServiceData" :key="item.id"> <div class="item" v-for="item in productServiceData" :key="item.id">
<div class="img" :class="item.imgType"></div> <div class="img" :class="item.imgType"></div>
<a-tooltip placement="right"> <a-tooltip >
<template #title>{{ item.name }}</template> <template #title>{{ item.name }}</template>
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
</a-tooltip> </a-tooltip>
<div class="dec">
<span>{{ item.deptName }}</span>
</div>
<div class="text"> <div class="text">
{{ item.description || '暂无描述' }} {{ item.description || '暂无描述' }}
</div> </div>
@ -36,7 +38,7 @@
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
const productServiceData = ref([]) const productServiceData = ref([])
selectNewest({ type: '', pageNum: 1, pageSize: 8 }).then((res) => { selectNewest({ type: '应用资源', pageNum: 1, pageSize: 8 }).then((res) => {
console.log('最新能力===================>', res.data.data.records) console.log('最新能力===================>', res.data.data.records)
productServiceData.value = [] productServiceData.value = []
res.data.data.records.forEach((val) => { res.data.data.records.forEach((val) => {
@ -78,7 +80,8 @@
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
// select: '', // select: '',
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
orderField:'tdr.create_date'
}, },
}) })
} }
@ -173,6 +176,16 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
} }
.dec {
margin: 8px 8px;
text-align: center;
padding-right: 10px;
color: #0058e1;
span {
background: rgba(0, 88, 225, 0.1);
padding: 5px 5px;
}
}
.text { .text {
width: 100%; width: 100%;
height: 0.9rem; height: 0.9rem;

View File

@ -41,10 +41,18 @@
<div class="fw" v-if="select == '收藏量'"> <div class="fw" v-if="select == '收藏量'">
{{ select }}:{{ item.collectCount }} {{ select }}:{{ item.collectCount }}
</div> </div>
<div class="name">{{ item.name }}</div> <a-tooltip>
<div class="text"> <template #title>{{ item.name }}</template>
{{ item.description || '暂无描述' }} <div class="name">{{ item.name }}</div>
</a-tooltip>
<div class="dec">
<span>{{ item.deptName }}</span>
</div> </div>
<a-tooltip >
<template #title>{{ item.description || '暂无描述' }}</template>
<div class="text">{{item.description || '暂无描述'}}</div>
</a-tooltip>
</div> </div>
</div> </div>
</div> </div>
@ -57,294 +65,302 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { pageWithAttrs } from '@/api/home.js' import { pageWithAttrs } from '@/api/home.js'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useStore } from 'vuex' import { useStore } from 'vuex'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
const select = ref('浏览量') const select = ref('申请量')
const selList = ref(['浏览量', '申请量', '收藏量']) const selList = ref(['申请量', '收藏量'])
const list = ref([]) const list = ref([])
const paramsGetResources = { const paramsGetResources = {
districtId: '', districtId: '',
pageNum: 1, pageNum: 1,
pageSize: 6, pageSize: 6,
type: '', type: '应用资源',
name: '', name: '',
infoList: [], infoList: [],
orderField: 'visits', // total visits applyCount score collectCount orderField: 'applyCount', // total visits applyCount score collectCount
orderType: 'DESC', // ASC DESC orderType: 'DESC', // ASC DESC
} }
const selectChange = (sel) => { const selectChange = (sel) => {
select.value = sel select.value = sel
switch (select.value) { switch (select.value) {
case '浏览量': case '浏览量':
paramsGetResources.orderField = 'visits' paramsGetResources.orderField = 'visits'
break break
case '申请量': case '申请量':
paramsGetResources.orderField = 'applyCount' paramsGetResources.orderField = 'applyCount'
break break
case '收藏量': case '收藏量':
paramsGetResources.orderField = 'collectCount' paramsGetResources.orderField = 'collectCount'
break break
default: default:
paramsGetResources.orderField = 'total' paramsGetResources.orderField = 'total'
break break
}
getList()
}
const getList = () => {
pageWithAttrs(paramsGetResources).then((res) => {
console.log('查询列表============>', res.data.data.records)
res.data.data.records.forEach((val) => {
switch (val.type) {
case '组件服务':
val.imgType = 'zj'
break
case '应用资源':
val.imgType = 'yy'
break
case '基础设施':
val.imgType = 'jc'
break
case '数据资源':
val.imgType = 'sj'
break
case '知识库':
val.imgType = 'zs'
break
default:
val.imgType = 'zj'
break
}
})
list.value = res.data.data.records
})
} }
getList() getList()
}
const getList = () => {
pageWithAttrs(paramsGetResources).then((res) => {
console.log('查询列表============>', res.data.data.records)
res.data.data.records.forEach((val) => {
switch (val.type) {
case '组件服务':
val.imgType = 'zj'
break
case '应用资源':
val.imgType = 'yy'
break
case '基础设施':
val.imgType = 'jc'
break
case '数据资源':
val.imgType = 'sj'
break
case '知识库':
val.imgType = 'zs'
break
default:
val.imgType = 'zj'
break
}
})
list.value = res.data.data.records
})
}
getList()
function jumpPage() { function jumpPage() {
// store // store
store.commit('home/selectCardsData', { store.commit('home/selectCardsData', {
selectCardsnum: '组件服务', selectCardsnum: '组件服务',
}) })
console.log( console.log('选中===================>', store.getters['home/selectCardsnum'])
'选中===================>', router.push({
store.getters['home/selectCardsnum'] path: '/DetailsPageconetent',
) query: {
router.push({ // select: '',
path: '/DetailsPageconetent', select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
query: { orderField:paramsGetResources.orderField //
// select: '', },
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB, })
}, }
}) const selectOne = (id) => {
} console.log('点击===============》', id)
const selectOne = (id) => { router.push({
console.log('点击===============》', id) path: '/details',
router.push({ query: {
path: '/details', id: id,
query: { },
id: id, })
}, }
})
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.popular-ability { .popular-ability {
height: 6.8rem; height: 6.8rem;
background: url('~@/assets/newHome/popular-bg.png') no-repeat; background: url('~@/assets/newHome/popular-bg.png') no-repeat;
background-size: 100%; background-size: 100%;
display: flex;
justify-content: center;
.main {
width: 13rem;
margin-top: 0.78rem;
display: flex; display: flex;
justify-content: center; flex-direction: column;
.main { flex-wrap: wrap;
width: 13rem; .top {
margin-top: 0.78rem; font-size: 0.3rem;
color: #fff;
text-align: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-wrap: wrap; flex-wrap: wrap;
.top { justify-content: center;
font-size: 0.3rem; align-items: center;
color: #fff; .line {
text-align: center; width: 0.34rem;
height: 0.03rem;
background-color: #fff;
margin-top: 0.08rem;
}
}
.bottom {
display: flex;
justify-content: space-between;
margin-top: 0.52rem;
.left {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; .select {
align-items: center; cursor: pointer;
.line {
width: 0.34rem;
height: 0.03rem;
background-color: #fff;
margin-top: 0.08rem;
}
}
.bottom {
display: flex;
justify-content: space-between;
margin-top: 0.52rem;
.left {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-wrap: wrap; flex-wrap: wrap;
.select { align-items: center;
cursor: pointer; justify-content: center;
width: 1.05rem;
height: 2.1rem;
background: rgba(255, 255, 255, 0.08);
margin-bottom: 0.01rem;
border-right: 0.02rem solid rgba(233, 233, 233, 0.3);
.img {
width: 0.36rem;
height: 0.36rem;
background-size: 100%;
}
.fwl {
background: url('~@/assets/newHome/fwl-no.png') no-repeat;
background-size: contain;
}
.sgl {
background: url('~@/assets/newHome/sgl-no.png') no-repeat;
background-size: contain;
}
.scl {
background: url('~@/assets/newHome/scl-no.png') no-repeat;
background-size: contain;
}
.text {
color: rgba(255, 255, 255, 0.6);
font-size: 0.14rem;
}
}
.select:hover {
background: rgba(255, 255, 255, 0.12);
}
.checked {
background: rgba(255, 255, 255, 0.18) !important;
border-right: 0.02rem solid #fff;
}
}
.right {
cursor: pointer;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
margin-left: 0.2rem;
.item {
width: 3.78rem;
height: 2rem;
display: flex;
.item-left {
width: 0.83rem;
height: 100%;
display: flex; display: flex;
flex-direction: column;
flex-wrap: wrap;
align-items: center;
justify-content: center; justify-content: center;
width: 1.05rem; align-items: center;
height: 1.39rem; background: #eef1f8;
background: rgba(255, 255, 255, 0.08);
margin-bottom: 0.01rem;
border-right: 0.02rem solid rgba(233, 233, 233, 0.3);
.img { .img {
width: 0.36rem; width: 0.56rem;
height: 0.36rem; height: 0.56rem;
background-size: 100%; background-size: 100%;
} }
.fwl { .zj {
background: url('~@/assets/newHome/fwl-no.png') no-repeat; background: url('~@/assets/newHome/popular-zj.png') no-repeat;
background-size: contain; background-size: contain;
} }
.sgl { .yy {
background: url('~@/assets/newHome/sgl-no.png') no-repeat; background: url('~@/assets/newHome/popular-yy.png') no-repeat;
background-size: contain; background-size: contain;
} }
.scl { .jc {
background: url('~@/assets/newHome/scl-no.png') no-repeat; background: url('~@/assets/newHome/popular-jc.png') no-repeat;
background-size: contain; background-size: contain;
} }
.sj {
background: url('~@/assets/newHome/popular-sj.png') no-repeat;
background-size: contain;
}
.zs {
background: url('~@/assets/newHome/popular-zs.png') no-repeat;
background-size: contain;
}
}
.item-right {
width: 100%;
height: 100%;
background: #fff;
.fw {
width: 100%;
padding-right: 0.1rem;
padding-top: 0.03rem;
text-align: right;
color: 666;
font-size: 0.14rem;
color: #666;
}
.name {
font-size: 0.18rem;
color: #212121;
text-align: center;
margin-top: 0.05rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.dec {
margin: 8px 8px;
text-align: center;
padding-right: 10px;
color: #0058e1;
span {
background: rgba(0, 88, 225, 0.1);
padding: 5px 5px;
}
}
.text { .text {
color: rgba(255, 255, 255, 0.6);
font-size: 0.14rem;
margin-top: 0.08rem;
}
}
.select:hover {
background: rgba(255, 255, 255, 0.12);
}
.checked {
background: rgba(255, 255, 255, 0.18) !important;
border-right: 0.02rem solid #fff;
}
}
.right {
cursor: pointer;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
margin-left: 0.2rem;
.item {
width: 3.78rem;
height: 2rem;
display: flex;
.item-left {
width: 0.83rem;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background: #eef1f8;
.img {
width: 0.56rem;
height: 0.56rem;
background-size: 100%;
}
.zj {
background: url('~@/assets/newHome/popular-zj.png') no-repeat;
background-size: contain;
}
.yy {
background: url('~@/assets/newHome/popular-yy.png') no-repeat;
background-size: contain;
}
.jc {
background: url('~@/assets/newHome/popular-jc.png') no-repeat;
background-size: contain;
}
.sj {
background: url('~@/assets/newHome/popular-sj.png') no-repeat;
background-size: contain;
}
.zs {
background: url('~@/assets/newHome/popular-zs.png') no-repeat;
background-size: contain;
}
}
.item-right {
width: 100%; width: 100%;
height: 100%; padding: 0rem 0.03rem;
background: #fff; font-size: 0.14rem;
.fw { color: #212121;
width: 100%; line-height: 0.24rem;
padding-right: 0.1rem; height: 1rem;
padding-top: 0.03rem; word-break: break-all;
text-align: right; overflow: hidden;
color: 666;
font-size: 0.14rem;
color: #666;
}
.name {
font-size: 0.18rem;
color: #212121;
text-align: center;
margin-top: 0.05rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.text {
width: 100%;
padding: 0.24rem 0.3rem;
font-size: 0.14rem;
color: #212121;
line-height: 0.24rem;
height: 1rem;
word-break: break-all;
overflow: hidden;
}
} }
} }
.item:nth-of-type(4),
.item:nth-of-type(5),
.item:nth-of-type(6) {
margin-top: 0.2rem;
}
.item:hover {
border-radius: 0.02rem;
border: 0.01rem solid #0058e1;
box-shadow: 0rem 0.08rem 0.2rem rgba(0, 88, 225, 0.3);
}
} }
} .item:nth-of-type(4),
.bottom-btn { .item:nth-of-type(5),
cursor: pointer; .item:nth-of-type(6) {
text-align: center; margin-top: 0.2rem;
margin-top: 0.24rem; }
color: #fff; .item:hover {
width: 1rem; border-radius: 0.02rem;
height: 0.24rem; border: 0.01rem solid #0058e1;
line-height: 0.24rem; box-shadow: 0rem 0.08rem 0.2rem rgba(0, 88, 225, 0.3);
margin-left: 6rem;
span {
display: inline-block;
width: 0.1rem;
height: 0.1rem;
background: url('~@/assets/newHome/gd.png') no-repeat;
background-size: contain;
} }
}
.bottom-btn:hover {
background: rgba(0, 88, 225, 0.1);
} }
} }
.bottom-btn {
cursor: pointer;
text-align: center;
margin-top: 0.24rem;
color: #fff;
width: 1rem;
height: 0.24rem;
line-height: 0.24rem;
margin-left: 6rem;
span {
display: inline-block;
width: 0.1rem;
height: 0.1rem;
background: url('~@/assets/newHome/gd.png') no-repeat;
background-size: contain;
}
}
.bottom-btn:hover {
background: rgba(0, 88, 225, 0.1);
}
} }
}
</style> </style>