123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- <template>
- <view>
- <view class="search">
- <view class="box" @click="go_search()">
- <view class="icon">
- <uni-icons type="search" size="16" color="#BBBBBB"></uni-icons>
- </view>
- <view class="text">搜索</view>
- </view>
- </view>
- <view class="content">
- <!-- <view class="title">
- <view class="tab" @click="change_tab_active(1)">
- <view class="text" :class="tab_active == 1?'active':''">最近常用</view>
- <view class="line" v-if="tab_active == 1"></view>
- </view>
- <view class="tab" @click="change_tab_active(2)">
- <view class="text" :class="tab_active == 2?'active':''">全部流程</view>
- <view class="line" v-if="tab_active == 2"></view>
- </view>
- </view> -->
- <!-- 暂时一个分类 -->
- <view class="title">
- <view class="tab">
- <view class="text" :class="tab_active == 1?'active':''">全部流程</view>
- <view class="line" v-if="tab_active == 1"></view>
- </view>
- </view>
- <view class="section" v-for="(item,index) in list" :key="index">
- <view class="box">
- <view class="item">
- <view class="left">
- <view class="icon" v-if="active == index" @click.stop="change_active(index)">
- <image src="./icon/close.png" mode=""></image>
- </view>
- <view class="icon" v-if="active != index" @click.stop="change_active(index)">
- <image src="./icon/open.png" mode=""></image>
- </view>
- <view class="text">{{item.type}} ({{item.count}})</view>
- </view>
- </view>
- <view class="list" v-if="active == index">
- <view class="item" v-for="(item_2,index_2) in item.list" :key="index_2"
- @click="go_detail_apply(item_2.name,item_2.flow_set_id)">
- <view class="left">
- <view class="text">{{item_2.name}}</view>
- </view>
- <view class="right">
- <uni-icons type="compose"></uni-icons>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- set_base_url
- } from '@/common/set_base_url.js'
- export default {
- data() {
- return {
- // 切换
- tab_active: 1,
- list: [],
- // 当前展开
- active: 99999999,
- };
- },
- onLoad() {
- this.get_list()
- },
- methods: {
- // 搜索
- go_search() {
- uni.navigateTo({
- url: "./search/search",
- animationType: "fade-in",
- animationDuration: 200
- })
- },
- change_tab_active(item) {
- this.tab_active = item
- },
- change_active(index) {
- if (this.active == index) {
- this.active = 99999999
- } else {
- this.active = index
- }
- },
- get_list() {
- this.$api.workflow_get_all_list({
- }).then((res) => {
- console.log(res)
- this.list = res.data.content.data
- })
- },
- go_detail_apply(name, flow_set_id) {
- uni.navigateTo({
- url: "./detail_apply/detail_apply?title=" + name + "&flow_set_id=" + flow_set_id
- })
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #F3F8F7;
- }
- .search {
- margin-bottom: 20rpx;
- background-color: #FFFFFF;
- box-sizing: border-box;
- padding: 25rpx 30rpx;
- .box {
- height: 80rpx;
- background-color: #F4F4F4;
- border-radius: 50rpx;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 0 25rpx;
- .icon {
- margin-right: 10rpx;
- }
- .text {
- font-size: 30rpx;
- color: #BBBBBB;
- }
- }
- }
- .content {
- background-color: #FFFFFF;
- .title {
- height: 110rpx;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 0 25rpx;
- border-bottom: 1rpx solid #F3F8F7;
- .tab {
- width: 350rpx;
- line-height: 110rpx;
- position: relative;
- .text {
- text-align: center;
- }
- .line {
- position: absolute;
- left: 50%;
- bottom: 0;
- transform: translateX(-40rpx);
- width: 80rpx;
- height: 4rpx;
- background-color: #00A0E8;
- }
- .active {
- color: #00A0E8;
- font-weight: 700;
- }
- }
- }
- .section {
- box-sizing: border-box;
- padding: 0 20rpx;
- .box {
- .item {
- height: 110rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-left: 20rpx;
- border-bottom: 1rpx solid #F3F8F7;
- .left {
- display: flex;
- align-items: center;
- .icon {
- line-height: 110rpx;
- width: 90rpx;
- text-align: center;
- image {
- width: 24rpx;
- height: 24rpx;
- }
- }
- .text {
- font-size: 32rpx;
- }
- }
- }
- .list {
- .item {
- height: 110rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-left: 108rpx;
- border-bottom: 1rpx solid #F3F8F7;
- .left {
- .text {
- margin-left: 18rpx;
- font-size: 30rpx;
- }
- }
- .right {
- line-height: 110rpx;
- width: 90rpx;
- text-align: center;
- }
- }
- }
- }
- }
- }
- </style>
|