|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
|
|
|
|
- <view>
|
|
|
|
|
|
+ <view style="background-color:#fff ;">
|
|
<!-- 搜索栏 -->
|
|
<!-- 搜索栏 -->
|
|
<view class="input-view_contain">
|
|
<view class="input-view_contain">
|
|
<view class="input-view">
|
|
<view class="input-view">
|
|
@@ -12,16 +12,15 @@
|
|
<!-- 网格配置列表滑动 -->
|
|
<!-- 网格配置列表滑动 -->
|
|
<view>
|
|
<view>
|
|
<uni-swiper-dot :info="info" :current="current" field="content" :mode="mode">
|
|
<uni-swiper-dot :info="info" :current="current" field="content" :mode="mode">
|
|
- <swiper class="swiper-box">
|
|
|
|
|
|
+ <swiper class="swiper-box" style="height: 160rpx;">
|
|
<swiper-item v-for="(item ,index) in gridtType" :key="index">
|
|
<swiper-item v-for="(item ,index) in gridtType" :key="index">
|
|
<uni-grid :column="5" :highlight="true" :showBorder="false">
|
|
<uni-grid :column="5" :highlight="true" :showBorder="false">
|
|
<uni-grid-item v-for="(dataitem,dataindex) in item" :key="dataitem.id">
|
|
<uni-grid-item v-for="(dataitem,dataindex) in item" :key="dataitem.id">
|
|
<view>
|
|
<view>
|
|
- <image class="uni-header-image" :src="'http://127.0.0.1:8080'+dataitem.fileUrl"
|
|
|
|
|
|
+ <image class="uni-header-image" :src="loadImgSrcLocalhost(dataitem.fileUrl)"
|
|
@click="querygrid(dataitem)"></image>
|
|
@click="querygrid(dataitem)"></image>
|
|
<uni-title type="h5" :title="dataitem.name" align="center"></uni-title>
|
|
<uni-title type="h5" :title="dataitem.name" align="center"></uni-title>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</uni-grid-item>
|
|
</uni-grid-item>
|
|
</uni-grid>
|
|
</uni-grid>
|
|
</swiper-item>
|
|
</swiper-item>
|
|
@@ -41,8 +40,17 @@
|
|
<view>
|
|
<view>
|
|
<!-- 使用分段器来切换推荐和收藏列表 -->
|
|
<!-- 使用分段器来切换推荐和收藏列表 -->
|
|
<view class="segmented-control">
|
|
<view class="segmented-control">
|
|
- <view class="segmented-control-item" :class="{ active: activeTab === 'recommend' }" @click="changeTab('recommend')">推荐</view>
|
|
|
|
- <view class="segmented-control-item" :class="{ active: activeTab === 'favorite' }" @click="changeTab('favorite')">收藏</view>
|
|
|
|
|
|
+ <!-- <view class="segmented-control-item" :class="{ active: activeTab === 'recommend' }" @click="changeTab('recommend')">常办事项</view>
|
|
|
|
+ <view class="segmented-control-item" :class="{ active: activeTab === 'favorite' }" @click="changeTab('favorite')">我的事</view> -->
|
|
|
|
+ <view
|
|
|
|
+ class="segmented-control-item"
|
|
|
|
+ :class="activeTab == e.label ? 'highlight' : 'not-highlight' "
|
|
|
|
+ @click="changeTab(e.label)"
|
|
|
|
+ v-for="(e,idx) in switchOption"
|
|
|
|
+ :key="idx"
|
|
|
|
+ >
|
|
|
|
+ {{ e.value }}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- 根据选中的标签显示对应的列表 -->
|
|
<!-- 根据选中的标签显示对应的列表 -->
|
|
@@ -70,11 +78,16 @@
|
|
</ul>
|
|
</ul>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+ <uni-fab ref="fab" :horizontal="right" :vertical="bottom"
|
|
|
|
+ @fabClick="goToMatterAllPage()"/>
|
|
|
|
+ <!-- <view class="add-button" @click="goToMatterAllPage">
|
|
|
|
+ <text>+</text>
|
|
|
|
+ </view> -->
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -91,7 +104,23 @@ import { listDept,collectlist } from '@/api/handleAffairs/matter.js';
|
|
activeTab: 'recommend', // 默认选中推荐列表
|
|
activeTab: 'recommend', // 默认选中推荐列表
|
|
recommendList: [], // 推荐列表数据
|
|
recommendList: [], // 推荐列表数据
|
|
favoriteList: [], // 收藏列表数据
|
|
favoriteList: [], // 收藏列表数据
|
|
|
|
+ userList: [], // 收藏列表数据
|
|
|
|
+ switchOption:[
|
|
|
|
+ {
|
|
|
|
+ value:'常办事项',
|
|
|
|
+ label:'recommend'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value:'我的事',
|
|
|
|
+ label:'favorite'
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
userList: [], // 收藏列表数据
|
|
userList: [], // 收藏列表数据
|
|
|
|
+ //悬浮按钮右对齐
|
|
|
|
+ right: 'right',
|
|
|
|
+ //悬浮按钮下对齐
|
|
|
|
+ bottom: 'bottom',
|
|
|
|
+ color:'#8FBC8F '
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -100,6 +129,12 @@ import { listDept,collectlist } from '@/api/handleAffairs/matter.js';
|
|
this.getListscolle();
|
|
this.getListscolle();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ goToMatterAllPage() {
|
|
|
|
+ // 使用 uni-app 的路由跳转方法跳转到 matterAll 页面
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/mattersAdd/mattersAdd'
|
|
|
|
+ });
|
|
|
|
+ },
|
|
confirm(){
|
|
confirm(){
|
|
if (!this.title.trim()) {//去除前后空格,在判断是否为空
|
|
if (!this.title.trim()) {//去除前后空格,在判断是否为空
|
|
return
|
|
return
|
|
@@ -191,8 +226,16 @@ import { listDept,collectlist } from '@/api/handleAffairs/matter.js';
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
+ .not-highlight{
|
|
|
|
+ color:#ABB7C7;
|
|
|
|
+ background-color:#fff
|
|
|
|
+ }
|
|
|
|
+ .highlight{
|
|
|
|
+ color:#0CC689;
|
|
|
|
+ background-color:#fff;
|
|
|
|
+ border-bottom: 2px solid #0CC689;
|
|
|
|
+ }
|
|
.uni-header-image {
|
|
.uni-header-image {
|
|
-
|
|
|
|
width: 40px;
|
|
width: 40px;
|
|
height: 40px;
|
|
height: 40px;
|
|
display: block;
|
|
display: block;
|
|
@@ -216,6 +259,7 @@ import { listDept,collectlist } from '@/api/handleAffairs/matter.js';
|
|
text-indent: 9%;
|
|
text-indent: 9%;
|
|
background-color: #F1F1F1;
|
|
background-color: #F1F1F1;
|
|
border: none !important;
|
|
border: none !important;
|
|
|
|
+ background-color:#fff
|
|
}
|
|
}
|
|
.demo-uni-row button:after{
|
|
.demo-uni-row button:after{
|
|
border: none;
|
|
border: none;
|
|
@@ -223,10 +267,11 @@ import { listDept,collectlist } from '@/api/handleAffairs/matter.js';
|
|
.demo-uni-row::after{
|
|
.demo-uni-row::after{
|
|
content: '';
|
|
content: '';
|
|
position: absolute;
|
|
position: absolute;
|
|
- width: 1rpx;
|
|
|
|
- height: 90%;
|
|
|
|
|
|
+ width: 4rpx;
|
|
|
|
+ height: 46%;
|
|
left: 50%;
|
|
left: 50%;
|
|
- top: 5%;
|
|
|
|
|
|
+ top: 33%;
|
|
|
|
+ z-index: 10;
|
|
margin: auto;
|
|
margin: auto;
|
|
background-color: #E1E1E1;
|
|
background-color: #E1E1E1;
|
|
}
|
|
}
|
|
@@ -261,14 +306,23 @@ import { listDept,collectlist } from '@/api/handleAffairs/matter.js';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.segmented-control {
|
|
.segmented-control {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 8vh;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-around;
|
|
justify-content: space-around;
|
|
background-color: #f0f0f0;
|
|
background-color: #f0f0f0;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ .rnwdList{
|
|
|
|
+ min-height: 63vh;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ }
|
|
.segmented-control-item {
|
|
.segmented-control-item {
|
|
|
|
+ width: 50%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ line-height: 250%;
|
|
|
|
+ text-align: center;
|
|
padding: 10px;
|
|
padding: 10px;
|
|
- cursor: pointer;
|
|
|
|
|
|
+ font-size: 34rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.segmented-control-item.active {
|
|
.segmented-control-item.active {
|