|
|
|
@ -1,49 +1,53 @@ |
|
|
|
|
<template> |
|
|
|
|
<view> |
|
|
|
|
<view class="filter"> |
|
|
|
|
<uni-search-bar class="search" radius="30" placeholder="请输入方案名称" clearButton="auto" cancelButton="none" v-model="keyword" /> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<ul class="tab"> |
|
|
|
|
<li v-for="(tab, i) in classifications.slice(0, 4)" :class="{active: active === tab.id}" @click="tabChange(tab)">{{ tab.classificationName }}</li> |
|
|
|
|
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="typeVisible = true"></uni-icons> |
|
|
|
|
</ul> |
|
|
|
|
|
|
|
|
|
<view v-if="list.length" class="list"> |
|
|
|
|
<view v-for="(item, i) in list" class="item" @click="toDetail(item)"> |
|
|
|
|
<view class="c-name ell">{{ item.title }}</view> |
|
|
|
|
<view class="content"> |
|
|
|
|
<view class="info"> |
|
|
|
|
<view class="line"> |
|
|
|
|
<view class="name">产品:</view> |
|
|
|
|
<view class="val ell-wrap"> |
|
|
|
|
<view v-if="!item.toggle" class="product ell">{{ item.productNames }}</view> |
|
|
|
|
<view v-else class="product" v-html="item.productNamesHtml"></view> |
|
|
|
|
<view v-if="item.productNames && item.productNames.length > 14" class="toggle" @click.stop="toggle(item)">{{ item.toggle ? '收起' : '展开' }}</view> |
|
|
|
|
<view :class="[{'not-auth': !per}]"> |
|
|
|
|
<view class="filter"> |
|
|
|
|
<uni-search-bar class="search" radius="30" placeholder="请输入方案名称" clearButton="auto" cancelButton="none" v-model="keyword" /> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<ul class="tab"> |
|
|
|
|
<li v-for="(tab, i) in classifications.slice(0, 4)" :class="{active: active === tab.id}" @click="tabChange(tab)">{{ tab.classificationName }}</li> |
|
|
|
|
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="typeVisible = true"></uni-icons> |
|
|
|
|
</ul> |
|
|
|
|
|
|
|
|
|
<view v-if="list.length" class="list"> |
|
|
|
|
<view v-for="(item, i) in list" class="item" @click="toDetail(item)"> |
|
|
|
|
<view class="c-name ell">{{ item.title }}</view> |
|
|
|
|
<view class="content"> |
|
|
|
|
<view class="info"> |
|
|
|
|
<view class="line"> |
|
|
|
|
<view class="name">产品:</view> |
|
|
|
|
<view class="val ell-wrap"> |
|
|
|
|
<view v-if="!item.toggle" class="product ell">{{ item.productNames }}</view> |
|
|
|
|
<view v-else class="product" v-html="item.productNamesHtml"></view> |
|
|
|
|
<view v-if="item.productNames && item.productNames.length > 14" class="toggle" @click.stop="toggle(item)">{{ item.toggle ? '收起' : '展开' }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line"> |
|
|
|
|
<view class="name">更新日期:</view> |
|
|
|
|
<view class="val">{{ item.updateTime }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line"> |
|
|
|
|
<view class="name">适用专业:</view> |
|
|
|
|
<view class="val">{{ item.applicableMajor }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line"> |
|
|
|
|
<view class="name">更新日期:</view> |
|
|
|
|
<view class="val">{{ item.updateTime }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line"> |
|
|
|
|
<view class="name">适用专业:</view> |
|
|
|
|
<view class="val">{{ item.applicableMajor }}</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="detail" @click.stop="toEmail(i)">下载</view> --> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="detail" @click.stop="toEmail(i)">下载</view> --> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<empty v-else></empty> |
|
|
|
|
|
|
|
|
|
<view :class="['type-popup', {active: typeVisible}]"> |
|
|
|
|
<uni-icons class="close" type="closeempty" size="20" color="#757575" @click="closeType"></uni-icons> |
|
|
|
|
<view class="title">所属分类</view> |
|
|
|
|
<view class="types"> |
|
|
|
|
<view v-for="(item, i) in classifications" :key="i" :class="['item', {active: active == item.id}]" @click="classificationClick(item)">{{ item.classificationName }}</view> |
|
|
|
|
<empty v-else></empty> |
|
|
|
|
|
|
|
|
|
<view :class="['type-popup', {active: typeVisible}]"> |
|
|
|
|
<uni-icons class="close" type="closeempty" size="20" color="#757575" @click="closeType"></uni-icons> |
|
|
|
|
<view class="title">所属分类</view> |
|
|
|
|
<view class="types"> |
|
|
|
|
<view v-for="(item, i) in classifications" :key="i" :class="['item', {active: active == item.id}]" @click="classificationClick(item)">{{ item.classificationName }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<notAuth v-if="!per"></notAuth> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -52,6 +56,7 @@ |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
per: true, // 是否有权限 |
|
|
|
|
active: '', |
|
|
|
|
typeVisible: false, |
|
|
|
|
classifications: [], |
|
|
|
@ -89,12 +94,48 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
this.per = true |
|
|
|
|
this.keyword = '' |
|
|
|
|
this.active = '' |
|
|
|
|
this.initList() |
|
|
|
|
this.getClassification() |
|
|
|
|
this.initRole() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 初始化权限 |
|
|
|
|
initRole() { |
|
|
|
|
const auth = uni.getStorageSync('auth') |
|
|
|
|
if (!auth.includes('工作台:方案')) { |
|
|
|
|
this.per = false |
|
|
|
|
this.list = [ |
|
|
|
|
{ |
|
|
|
|
title: '智信云', |
|
|
|
|
productNames: '智信云师资培训班', |
|
|
|
|
applicableMajor: 'python实训系统', |
|
|
|
|
updateTime: '2023-08-08' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '智信云', |
|
|
|
|
productNames: '智信云师资培训班智信云师资培训班', |
|
|
|
|
applicableMajor: 'python实训系统', |
|
|
|
|
updateTime: '2023-08-08' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '智信云智信云', |
|
|
|
|
productNames: '智信云师资培训班智信云师资培训班', |
|
|
|
|
applicableMajor: 'python实训系统', |
|
|
|
|
updateTime: '2023-08-08' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '智信云', |
|
|
|
|
productNames: '智信云师资培训班智信云师资培训班', |
|
|
|
|
applicableMajor: 'python实训系统实训系统', |
|
|
|
|
updateTime: '2023-08-08' |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
} else { |
|
|
|
|
this.initList() |
|
|
|
|
this.getClassification() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getList() { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '加载中' |
|
|
|
|