123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- <template>
- <view class="archive">
- <u-navbar ref="uNavbar" :border-bottom="false" :back-icon-color="setNav.backColor" :is-back="setNav.isdisPlayNavTitle" :title-size="setNav.size" :title-bold="setNav.bold" :title="setNav.navTitle" :title-color="setNav.color" :background="setNav"></u-navbar>
- <view class="topNav" :style="{top: topNav + 'px'}">
- <view class="item" @click="tabs(0)">
- <view :class="['text', active == 0 ? 'active' : '']">待我审核</view>
- </view>
- <view class="item" @click="tabs(1)">
- <view :class="['text', active == 1 ? 'active' : '']">已审核</view>
- </view>
- </view>
- <view class="contentMain" v-if="list.length">
- <view
- v-for="(item, index) in list"
- :key="item.id"
- @click="click(item)"
- class="u-swipe-action"
- >
- <view class="item">
- <view class="title">{{item.businessData.message_title}}</view>
- <view class="userInfo">
- <view class="user">
- <view class="name">拟稿人:{{item.businessData.send_user_name}}</view>
- <view class="name">发文日期:{{item.businessData.message_time}}</view>
- <view class="name" v-if="active == 1">流程结束日期:{{item.businessData.finish_time != null ? item.businessData.finish_time : '未结束'}}</view>
- </view>
- <view class="status" :class="{active: item.businessData.status != '已通过'}" v-if="active == 1">{{item.businessData.status}}</view>
- </view>
- </view>
- </view>
- </view>
- <view class="no-data" v-else>暂无数据</view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- setNav:{
- backgroundColor:'#fff', //背景色
- color:'#333', //字体颜色
- bold: true,
- size: '36',
- backColor: '#333',
- isdisPlayNavTitle: true, //是否显示返回按钮
- navTitle:'审核' //导航标题
- },
- searchVal: '',
- topNav: 0,
- active: 0,
- list: [],
- disabled: false,
- btnWidth: 180,
- show: false,
- options: [
- {
- text: '归档',
- style: {
- backgroundColor: '#00B034'
- }
- }
- ],
- userInfo: {}
- }
- },
- onLoad() {
- this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
- this.backlog()
- setTimeout(() => {
- this.topNav = (this.$refs.uNavbar.navbarHeight) + (this.$refs.uNavbar.statusBarHeight)
- }, 10)
- },
- onShow() {
-
- },
- methods:{
- async backlog () {
- let res = await this.$u.post(`jflow/p/cs/task/backlog/list`, {
- page: 1,
- pageSize: 10,
- searchType: '0,1',
- "userId": this.userInfo.id,
- excuStatus: 0
- })
- this.list = res.data.records
- },
- async history () {
- let res = await this.$u.post(`jflow/p/cs/task/history/list`, {
- page: 1,
- pageSize: 10,
- searchType: '0,1',
- "userId": this.userInfo.id,
- excuStatus: 2
- })
- console.log(res.data.records)
- res.data.records.forEach(item => {
- console.log(item.businessData.message_title)
- })
- this.list = res.data.records
- },
- tabs (active) {
- this.active = active
- this.list = []
- if (active == 0) {
- this.backlog()
- } else {
- this.history()
- }
- },
- click(item) {
- // 跳转到审核页面
- console.log(item)
- let url = '&instanceId=' + item.instanceId + '&nodeId=' + item.nodeId + '&id=' + item.id
- let active = this.active
- if (this.active == 1) {
- if (item.businessData.status != '已通过') {
- active = 2
- }
- }
- uni.navigateTo({
- url: '/pages/centerView/toExamine/auditDetails?active=' + active + '&businessCode=' + item.businessCode + url
- })
- // if (this.active === 0) {
-
- // } else {
- // // 跳转到审核页面
- // }
- },
- }
- }
- </script>
- <style>
- page{
- background: #FFFFFF;
- }
- </style>
- <style lang="scss" scoped>
- .topNav{
- display: flex;
- align-items: center;
- background: #FFFFFF;
- height: 90rpx;
- box-shadow: 0px 14rpx 10rpx 0px rgba(218, 218, 218, 0.35);
- position: sticky;
- width: 100%;
- left: 0;
- z-index: 9;
- .item{
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- .text{
- font-size: 26rpx;
- color: #191919;
- font-weight: 600;
- }
- .active{
- position: relative;
- &::after{
- content: '';
- position: absolute;
- width: 28rpx;
- height: 6rpx;
- background: #009FE8;
- border-radius: 6rpx;
- bottom: -14rpx;
- left: 50%;
- transform: translate(-50%,0);
- }
- }
- }
- }
- .searchBox{
- padding: 30rpx;
- .inputBox{
- display: flex;
- align-items: center;
- .input{
- flex: 1;
- width: 100%;
- margin-right: 30rpx;
- background: #EDEDED;
- border-radius: 40rpx;
- padding: 0 30rpx !important;
- }
- .btn{
- background: #009FE8;
- color: #FFFFFF;
- font-size: 26rpx;
- height: 60rpx;
- line-height: 60rpx;
- padding: 0 30rpx;
- text-align: center;
- border-radius: 40rpx;
- }
- }
-
- }
- .timeBox{
- padding: 30rpx 0 20rpx 0;
- display: flex;
- align-items: center;
- .r{
- width: 30rpx;
- height: 33rpx;
- }
- .text{
- font-size: 26rpx;
- color: #343434;
- margin: 0 14rpx;
- }
- .d{
- width: 20rpx;
- height: 20rpx;
- }
- }
- .contentMain{
- background: #fff;
- .item{
- .title{
- font-size: 28rpx;
- font-weight: 700;
- color: #343434;
- padding: 30rpx 30rpx 0 30rpx;
- white-space: break-word;
- word-break:break-all;
- }
- .userInfo{
- display: flex;
- align-items: flex-end;
- border-bottom: solid 1rpx #DADADA;
- padding: 30rpx;
- .user{
- flex: 1;
- color: #666;
- font-size: 24rpx;
- .name{
- margin-bottom: 10rpx;
- }
- }
- .status{
- color: #54BA10;
- font-size: 26rpx;
- margin-bottom: 4rpx;
- &.active {
- color: #FF3131;
- }
- }
- }
- }
- }
- </style>
|