功能补充
This commit is contained in:
+2
-2
@@ -3,6 +3,6 @@ ENV = 'development'
|
|||||||
# 'development'
|
# 'development'
|
||||||
|
|
||||||
# base api
|
# base api
|
||||||
VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
|
# VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
|
||||||
# 苗扬
|
# 苗扬
|
||||||
# VITE_APP_BASE_API_Url = 'http://25.64.16.133:9786'
|
VITE_APP_BASE_API_Url = 'http://25.64.16.133:9786'
|
||||||
|
|||||||
@@ -15,13 +15,14 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
imgUrlShow:''
|
imgUrlShow:'',
|
||||||
|
watching:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
imgId: {
|
imgId: {
|
||||||
handler(newval, oldval) {
|
handler(newval, oldval) {
|
||||||
if (newval) {
|
if (newval && this.watching) {
|
||||||
this.getPreviewUrlBlob(newval);
|
this.getPreviewUrlBlob(newval);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -55,6 +56,7 @@
|
|||||||
if (this.imgId) {
|
if (this.imgId) {
|
||||||
this.getPreviewUrlBlob(this.imgId);
|
this.getPreviewUrlBlob(this.imgId);
|
||||||
}
|
}
|
||||||
|
this.watching = true
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
URL.revokeObjectURL(this.imgUrlShow);
|
URL.revokeObjectURL(this.imgUrlShow);
|
||||||
|
|||||||
+102
-2
@@ -24,6 +24,19 @@
|
|||||||
></uv-tabs>
|
></uv-tabs>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-view">
|
<view class="list-view">
|
||||||
|
<view class="filter-btn" @click="showFilterList = true">筛选
|
||||||
|
<uv-icon class="filter-icon" name="list"/>
|
||||||
|
</view>
|
||||||
|
<view :class="['filter-list',showFilterList?'show':'']">
|
||||||
|
<view class="filter-type" v-for="item in tagsTree.filter(t=>(t.children||[]).length>0)" :key="item.value">
|
||||||
|
<view class="filter-type-title">{{item.label}}</view>
|
||||||
|
<view class="filter-type-list">
|
||||||
|
<view :class="['filter-type-item', activeTag===itemT.value?'is-active':'']" v-for="itemT in (item.children||[])" @click="chooseTag(itemT)">
|
||||||
|
{{itemT.label}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<uv-scroll-list class="tags-view" :indicator="false">
|
<uv-scroll-list class="tags-view" :indicator="false">
|
||||||
<uv-tags text="全部"
|
<uv-tags text="全部"
|
||||||
shape="circle"
|
shape="circle"
|
||||||
@@ -143,9 +156,12 @@ import { onMounted, ref, computed } from 'vue'
|
|||||||
const coursePrdlineList = ref([])
|
const coursePrdlineList = ref([])
|
||||||
const tagsTree = ref([])
|
const tagsTree = ref([])
|
||||||
|
|
||||||
|
const showFilterList = ref(false)
|
||||||
|
|
||||||
// 点击标签
|
// 点击标签
|
||||||
const chooseTag = (item)=>{
|
const chooseTag = (item)=>{
|
||||||
activeTag.value = item.value
|
activeTag.value = item.value
|
||||||
|
showFilterList.value = false
|
||||||
}
|
}
|
||||||
// 点击生产线分类
|
// 点击生产线分类
|
||||||
const changePrdLine = (item)=>{
|
const changePrdLine = (item)=>{
|
||||||
@@ -176,7 +192,7 @@ import { onMounted, ref, computed } from 'vue'
|
|||||||
const courseListBase = ref([])
|
const courseListBase = ref([])
|
||||||
const courseList = computed(()=>{
|
const courseList = computed(()=>{
|
||||||
return activeTag.value
|
return activeTag.value
|
||||||
?courseListBase.value.filter(t=>t.tagCataList.indexOf(activeTag.value)>=0)
|
?courseListBase.value.filter(t=>t.tagCataList.map(k=>k.tagId).indexOf(activeTag.value)>=0)
|
||||||
:courseListBase.value
|
:courseListBase.value
|
||||||
})
|
})
|
||||||
// 整理树形
|
// 整理树形
|
||||||
@@ -223,6 +239,7 @@ import { onMounted, ref, computed } from 'vue'
|
|||||||
const changeTab = (item) => {
|
const changeTab = (item) => {
|
||||||
if(!item) return
|
if(!item) return
|
||||||
activeTab.value = item.name
|
activeTab.value = item.name
|
||||||
|
activeTag.value = ''
|
||||||
activeCourseType.value = ''
|
activeCourseType.value = ''
|
||||||
activePrdlineType.value = ''
|
activePrdlineType.value = ''
|
||||||
switch (item.name){
|
switch (item.name){
|
||||||
@@ -338,10 +355,93 @@ import { onMounted, ref, computed } from 'vue'
|
|||||||
border-radius: 23rpx;
|
border-radius: 23rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
position: relative;
|
||||||
|
.filter-list{
|
||||||
|
position: absolute;
|
||||||
|
top: 84rpx;
|
||||||
|
left:0;
|
||||||
|
width: 100%;
|
||||||
|
height: 508rpx;
|
||||||
|
overflow-y: auto;
|
||||||
|
z-index: 2;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
box-shadow: 0rpx 3.85rpx 38rpx rgba(0,0,0,.05);
|
||||||
|
padding: 0rpx 25rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.filter-type{
|
||||||
|
padding: 10rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.filter-type-title{
|
||||||
|
font-size: 29rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.filter-type-list{
|
||||||
|
overflow: hidden;
|
||||||
|
.filter-type-item{
|
||||||
|
width: calc(25% - 18rpx);
|
||||||
|
font-size: 29rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding:0 20rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: center;
|
||||||
|
float: left;
|
||||||
|
margin-right: 24rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
line-height: 65rpx;
|
||||||
|
background-color: #f1f3f8;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
&:nth-child(4n){
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
&.is-active{
|
||||||
|
color: #06f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&+.filter-type{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.filter-list{
|
||||||
|
display: none;
|
||||||
|
&.show{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.filter-btn{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 83rpx;
|
||||||
|
width: 120rpx;
|
||||||
|
line-height: 83rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
background: #fff;
|
||||||
|
z-index: 2;
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: -4rpx 0 6rpx rgba(0,0,0,.05);
|
||||||
|
white-space: nowrap;
|
||||||
|
padding-right: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.filter-icon{
|
||||||
|
// display: inline-block;
|
||||||
|
font-size: 26rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 15rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
.tags-view{
|
.tags-view{
|
||||||
height: 84rpx;
|
height: 84rpx;
|
||||||
display: block;
|
display: block;
|
||||||
padding: 20rpx;
|
padding: 20rpx 120rpx 20rpx 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
border-bottom: 2rpx solid #eee;
|
border-bottom: 2rpx solid #eee;
|
||||||
|
|||||||
Reference in New Issue
Block a user