355 lines
7.7 KiB
Vue
355 lines
7.7 KiB
Vue
<template>
|
|
<view class="my_duty">
|
|
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="我的代办" leftIcon="left" border
|
|
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
|
<view class="my-top-search-nav">
|
|
<view class="search-wrap">
|
|
<view class="search-body">
|
|
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
|
<input class="search-input" v-show="isHetongShow" type="text" v-model="params.search"
|
|
placeholder="请输入合同编号" />
|
|
<input class="search-input" v-show="!isHetongShow" type="text" v-model="params.search"
|
|
placeholder="请输入项目代码" />
|
|
<view class="right-btn" @click="searchHandle">
|
|
搜索
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 主体 导航栏 -->
|
|
<view class="tabbar-title">
|
|
<view :class="{'text-title':true, 'active':isHetongShow}" @click="changeList('hetong')">我的代办</view>
|
|
<view :class="{'text-title':true, 'active':!isHetongShow}" @click="changeList('xiangmu')">全部工单</view>
|
|
<!-- <view class="right-pick" @click="showDrawer">
|
|
<image class="right-img" src="../../static/project_manegment/shaixuan.png" mode=""></image>
|
|
<text>筛选</text>
|
|
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
|
|
<!-- <view class="my-top-search-nav">
|
|
<view class="search-wrap">
|
|
<view class="search-body">
|
|
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
|
<input class="search-input" type="text" v-model="params.search" placeholder="请输入" />
|
|
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
|
|
</image>
|
|
<view class="right-btn" @click="searchHandle">搜索</view>
|
|
</view>
|
|
<view class="right-btn allBtn" @click="searchShowAll">全部</view>
|
|
</view>
|
|
</view>
|
|
<view class="empty-view">
|
|
<view></view>
|
|
</view>
|
|
-->
|
|
<view class="content">
|
|
<view class="item-wrap" v-for="(val,index) in ticketList" :key="val.id">
|
|
<view class="duty-item">
|
|
<view class="top-info">
|
|
<view class="info-title">{{val.title}}</view>
|
|
</view>
|
|
<view class="center-info">
|
|
<view class="info-details">所属工作流:{{val.workflow_.name}}</view>
|
|
<view class="info-details">工单状态:{{val.state_.name}}</view>
|
|
<view class="info-details">提交时间:{{val.create_time}} </view>
|
|
<view class="info-details">更新时间:{{val.update_time}} </view>
|
|
</view>
|
|
<view class="bottom-btns">
|
|
<view class="shenhezhong shenhe-status" @click="ticketHandle(val,'handle')" v-if="(val.act_state===1||val.act_state===3)&&val.state_.type===0">
|
|
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
|
处理
|
|
</view>
|
|
<view class="shenhejieshu shenhe-status" @click="ticketHandle(val,'show')" v-else>
|
|
<image src="../../../static/my/my_apply/tongguo.png" mode=""></image>
|
|
查看
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'ticket',
|
|
data() {
|
|
return {
|
|
params:{
|
|
search: '',
|
|
pageSize: 10,
|
|
pageNum: 1,
|
|
category:'duty'
|
|
},
|
|
isHetongShow:false,
|
|
totalNum: 0,
|
|
ticketList: [],
|
|
}
|
|
},
|
|
//上拉加载
|
|
onReachBottom() {
|
|
const totalPage = Math.ceil(this.totalNum / this.pageSize);
|
|
if (this.pageNum < totalPage) {
|
|
this.pageNum += 1;
|
|
this.getTicketLists();
|
|
} else {
|
|
uni.showToast({
|
|
title: "已全部加载",
|
|
icon: 'none'
|
|
})
|
|
}
|
|
},
|
|
onShow() {
|
|
this.ticketList = [];
|
|
this.getTicketLists();
|
|
},
|
|
//下拉刷新
|
|
onPullDownRefresh() {
|
|
this.pageNum = 1;
|
|
this.ticketList = [];
|
|
this.getTicketLists();
|
|
},
|
|
methods: {
|
|
getTicketLists() {
|
|
let that = this;
|
|
that.$u.api.getTickets(that.params).then(res => {
|
|
that.ticketList = that.ticketList.concat(res.results);
|
|
this.totalNum = res.count;
|
|
})
|
|
},
|
|
ticketHandle(val,type) {
|
|
let projectId = val.ticket_data.visit?val.ticket_data.visit:val.ticket_data.rpj?val.ticket_data.rpj:val.ticket_data.opl;//项目、许可证Id visit
|
|
let catetype = val.workflow_.key;
|
|
const params = `?ticketId=${val.id}&projectId=${projectId}&cateType=${catetype}&type=${type}`;
|
|
uni.navigateTo({
|
|
url: '../detail/ticketHandle' + params,
|
|
})
|
|
},
|
|
|
|
goBack() {
|
|
uni.navigateBack({
|
|
delta: 1
|
|
})
|
|
},
|
|
searchHandle() {
|
|
this.pageNum = 1;
|
|
this.ticketList = [];
|
|
this.getTicketLists()
|
|
},
|
|
resetSearch() {
|
|
this.pageNum = 1;
|
|
this.search = "";
|
|
this.ticketList = [];
|
|
this.getTicketLists();
|
|
},
|
|
searchShowAll(){
|
|
debugger;
|
|
uni.navigateTo({
|
|
url: './ticketAll',
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.empty-view {
|
|
height: 120rpx;
|
|
}
|
|
|
|
>>>.uni-navbar__header,
|
|
>>>.uni-status-bar ,
|
|
.search-wrap{
|
|
background-image: linear-gradient(254deg,
|
|
#0ca7ee 0%,
|
|
#005aff 100%,
|
|
#2a8cff 100%,
|
|
#54bdff 100%),
|
|
linear-gradient(#e60012,
|
|
#e60012);
|
|
}
|
|
|
|
.my_duty {
|
|
background-color: #f3fbff;
|
|
}
|
|
|
|
.my_duty>>>.uni-navbar-btn-text text {
|
|
font-size: 32rpx !important;
|
|
}
|
|
|
|
.content {
|
|
padding: 14rpx;
|
|
}
|
|
|
|
.item-wrap {
|
|
margin-bottom: 14rpx;
|
|
}
|
|
|
|
.duty-item {
|
|
width: 720rpx;
|
|
background-color: #ffffff;
|
|
border-radius: 10rpx;
|
|
margin: 0 auto;
|
|
padding: 24rpx 21rpx;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.info-title {
|
|
font-family: PingFang-SC-Medium;
|
|
font-size: 30rpx;
|
|
line-height: 72rpx;
|
|
color: #3d3d3d;
|
|
flex: 1;
|
|
}
|
|
|
|
.right-time {
|
|
font-size: 24rpx;
|
|
line-height: 72rpx;
|
|
color: #ababab;
|
|
}
|
|
|
|
.center-info {
|
|
padding-bottom: 30rpx;
|
|
border-bottom: 1rpx solid #eeeeee;
|
|
}
|
|
|
|
.info-details {
|
|
font-size: 28rpx;
|
|
line-height: 40rpx;
|
|
color: #5b5b5b;
|
|
}
|
|
|
|
.bottom-btns {
|
|
text-align: center;
|
|
font-family: PingFang-SC-Medium;
|
|
font-size: 28rpx;
|
|
line-height: 83rpx;
|
|
}
|
|
|
|
.shenhezhong {
|
|
color: #2c6fd9;
|
|
}
|
|
|
|
.shenhejieshu {
|
|
color: #15a306;
|
|
}
|
|
|
|
.shenhe-status image {
|
|
width: 26rpx;
|
|
height: 26rpx;
|
|
margin-right: 10rpx;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.my-top-search-nav {
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 999;
|
|
background-color: #f3fbff;
|
|
}
|
|
|
|
.search-wrap {
|
|
background-blend-mode: normal,normal;
|
|
padding-bottom: 20rpx;
|
|
padding-top: 20rpx;
|
|
display: flex;
|
|
justify-content: space-around;
|
|
}
|
|
|
|
.search-body {
|
|
width: 600upx;
|
|
height: 78rpx;
|
|
background-color: #ffffff;
|
|
border-radius: 39rpx;
|
|
padding: 13rpx;
|
|
padding-left: 25rpx;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.search-body .search-input {
|
|
height: 100%;
|
|
flex: 1;
|
|
padding-left: 12rpx;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.left-img {
|
|
width: 26rpx;
|
|
height: 26rpx;
|
|
|
|
}
|
|
|
|
.right-img {
|
|
width: 30rpx;
|
|
height: 30rpx;
|
|
margin-right: 10rpx;
|
|
}
|
|
|
|
.right-btn {
|
|
width: 110rpx;
|
|
height: 58rpx;
|
|
line-height: 58rpx;
|
|
background-image: linear-gradient(0deg,
|
|
#2da0f3 0%,
|
|
#54bcff 100%);
|
|
border-radius: 29rpx;
|
|
font-size: 28rpx;
|
|
color: #ffffff;
|
|
text-align: center;
|
|
}
|
|
.right-btn.allBtn{
|
|
margin: 13rpx 0;
|
|
}
|
|
|
|
|
|
/* 主体-导航栏样式*/
|
|
.tabbar-title {
|
|
background-color: #FFFFFF;
|
|
height: 100rpx;
|
|
display: flex;
|
|
/* justify-content: space-between; */
|
|
padding: 0rpx 32rpx;
|
|
box-sizing: border-box;
|
|
font-size: 32rpx;
|
|
line-height: 100rpx;
|
|
color: #505050;
|
|
}
|
|
|
|
.text-title {
|
|
position: relative;
|
|
margin-right: 40upx;
|
|
}
|
|
|
|
.active.text-title::after {
|
|
content: "";
|
|
width: 46rpx;
|
|
height: 4rpx;
|
|
background-image: linear-gradient(90deg,
|
|
#164cc3 0%,
|
|
#2c6fd9 100%),
|
|
linear-gradient(#085f56,
|
|
#085f56);
|
|
background-blend-mode: normal,
|
|
normal;
|
|
border-radius: 2rpx;
|
|
position: absolute;
|
|
bottom: 20rpx;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
}
|
|
|
|
.right-img {
|
|
width: 32rpx;
|
|
height: 31rpx;
|
|
vertical-align: middle;
|
|
margin-right: 9rpx;
|
|
}
|
|
|
|
|
|
</style>
|