You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

196 lines
4.6 KiB

3 years ago
<template>
<view>
<view class="filter">
<uni-search-bar class="search" radius="30" placeholder="请输入方案名称" clearButton="auto" cancelButton="none" @confirm="search" />
3 years ago
</view>
<ul class="tab">
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
</ul>
3 years ago
<view v-if="list.length" class="list">
<view v-for="(item, i) in list" class="item">
<view class="c-name">{{ item.name }}</view>
<view class="content">
<view class="info">
<view class="line">
3 years ago
<view class="name">产品</view>
<view class="val ell-wrap">
<view :class="{ell: !item.toggle}" v-html="item.product"></view>
<view v-if="!item.toggle" class="toggle" @click.stop="toggle(item)">展开</view>
</view>
</view>
<view class="line">
3 years ago
<view class="name">更新日期</view>
<view class="val">{{ item.date }}</view>
</view>
<view class="line">
3 years ago
<view class="name">适用专业</view>
<view class="val">{{ item.major }}</view>
3 years ago
</view>
</view>
<view class="detail" @click="toDetail(i + 2)">详情</view>
</view>
3 years ago
</view>
</view>
<empty v-else></empty>
3 years ago
</view>
</template>
<script>
export default {
data() {
return {
curTab: '',
3 years ago
tabs: [
{
name: '不限',
id: ''
3 years ago
},
{
name: '标准方案',
3 years ago
id: 1
},
{
name: '智信云方案',
3 years ago
id: 2
}
],
list: [],
all: [
{
type: 1,
3 years ago
toggle: false,
name: '人工智能实验室建设方案-2020.1',
product: `python程序设计实验教学系统<br>
Docker技术实验教学系统<br>
JAVA语言程序设计实验教学系统<br>
大数据开发实验教学系统<br>
Openstack云计算实验教学系统`,
date: '2022-06-02',
major: '人工智能方向'
},
{
type: 1,
3 years ago
toggle: false,
name: '大数据管理与应用专业建设方案',
product: `python程序设计实验教学系统<br>
量化投资实验教学系统<br>
区块链数字货币交易实验系统<br>
大数分析实验教学系统<br>
数据可视化实验教学系统<br>
大数据实证科研平台<br>
全球宏观经济<br>
数据库全球金融交易数据库 `,
date: '2022-06-02',
major: '大数据方向'
},
{
type: 1,
3 years ago
toggle: false,
name: '金融科技实验室建设方案V2.0',
product: `python程序设计实验教学系统<br>
量化投资实验教学系统<br>
区块链数字货币交易实验教学系统<br>
大数据采集实验教学系统<br>
大数据分析实验教学系统<br>
金融建模实验教学系统<br>
互联网小贷实验教学系统<br>
互联网支付实验教学系统<br>
R语言实验教学系统<br>
供应链金融实验教学系统<br>
Python数据清洗实验教学系统<br>
数据可视化实验教学系统<br>
金融随机过程实验教学系统<br>
银行综合系统<br>
大数据实证科研平台<br>
财经数据库`,
date: '2022-06-02',
major: '金融科技,大数据方向'
}
3 years ago
]
}
},
onShow() {
this.list = JSON.parse(JSON.stringify(this.all))
},
3 years ago
methods: {
search(res) {
uni.showToast({
title: '搜索:' + res.value,
icon: 'none'
})
},
// tab切换
tabChange(tab) {
const { id } = tab
const { all } = this
this.curTab = id
this.list = id ? all.filter(e => e.type === id) : all
3 years ago
},
// 跳转详情
toDetail(id) {
this.$util.openFile(id)
3 years ago
},
// 展开
toggle(item) {
item.toggle = !item.toggle
3 years ago
}
}
}
</script>
<style scoped lang="scss">
.list {
background-color: #fff;
3 years ago
.item {
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
3 years ago
}
3 years ago
.c-name {
font-size: 30rpx;
3 years ago
color: #333;
}
.line {
display: flex;
3 years ago
padding: 10rpx 0;
3 years ago
}
.content {
3 years ago
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
3 years ago
}
3 years ago
.name {
width: 140rpx;
3 years ago
margin-right: 10rpx;
white-space: nowrap;
font-size: 28rpx;
color: #999;
3 years ago
}
.val {
3 years ago
max-width: 88%;
font-size: 28rpx;
color: #333;
}
.ell {
height: 38rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.toggle {
margin-top: 10rpx;
white-space: nowrap;
font-size: 24rpx;
3 years ago
color: #0e92ef;
3 years ago
}
.detail {
margin-left: 20rpx;
font-size: 26rpx;
3 years ago
color: #1f83ff;
white-space: nowrap;
3 years ago
}
}
</style>