123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420 |
- <template>
- <view class="pagesCons">
- <view class="tab-body">
- <view>
- <u-tabs-swiper ref="uTabs" :list="tabList" name="dispName" :current="current" @change="tabsChange" :is-scroll="false"
- swiperWidth="750"></u-tabs-swiper>
- </view>
- <view class="all-filter" v-show="current==2">
- <u-row>
- <text>发起时间</text>
- <view @click="changeSort('createTime')" class="filter-icon">
- <u-icon name="arrow-up-fill" :color="(sortIndex===0)?'#2979ff':'#888888'" size="24"></u-icon>
- <u-icon name="arrow-down-fill" :color="(sortIndex===1)?'#2979ff':'#888888'" size="24"></u-icon>
- </view>
- </u-row>
- <u-row>
- <text>处理时间</text>
- <view @click="changeSort('handleTime')" class="filter-icon">
- <u-icon name="arrow-up-fill" :color="(sortIndex===2)?'#2979ff':'#888888'" size="24"></u-icon>
- <u-icon name="arrow-down-fill" :color="(sortIndex===3)?'#2979ff':'#888888'" size="24"></u-icon>
- </view>
- </u-row>
- <view class="filter" @click="showSearch=true">
- <text>筛选</text>
- <u-icon name="shaixuan" custom-prefix="xd-icon" size="32" color="#888888"></u-icon>
- </view>
- </view>
- <swiper class="check-list" :current="swiperCurrent" @transition="transition" @change="swiperChange" @animationfinish="animationfinish">
- <swiper-item class="swiper-item" v-for="(tabs, index) in tabList" :key="index">
- <scroll-view scroll-y class="scroll-view" @scrolltolower="onreachBottom">
- <view
- class="check-order-list"
- v-if="index==current"
- v-for="(item,sindex) in list"
- :key="item.id+item.createDate"
- @click="viewRow(item)"
- >
- <view class="check-row">
- <view class="ellipsis-one">{{item.storeName}}</view>
- <view class="createDate">{{item.createDate}}</view>
- </view>
- <view class="check-row">
- <view class="ellipsis-one">
- {{item.clsName}}
- </view>
- <view class="text-right">
- <text>{{item.putUserName}}</text>
- </view>
- <view class="icon-xian" >
- <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="30" color="#888888"></u-icon>
- </view>
- </view>
- <view class="check-row">
- <view>
- {{item.sourceTypeDictValue}}
- </view>
- <view class="text-right">
- <text v-if="item.copyFlag && item.copyFlag == 1" class="mark">
- 抄送
- </text>
- <view :class="['status',clsStatus(item.statusDictValue)]">{{item.statusDictValue}}</view>
- </view>
- </view>
- </view>
- <u-empty :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
- <view v-if="index==current" style="padding: 20upx;">
- <u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
- </view>
- </scroll-view>
- </swiper-item>
- </swiper>
- </view>
-
- <search-modal :visible="showSearch" @openPicke="openPicker" @refresh="refresh" @close="showSearch=false"></search-modal>
- </view>
- </template>
- <script>
- import { getBackLogList } from '@/api/backLog.js'
- import { getLookUpDatas, listLookUp } from '@/api/data'
- import searchModal from './searchModal.vue'
- export default {
- components: {
- searchModal
- },
- data() {
- return {
- showSearch: false,
- searchParams: {},
- status: 'loadmore',
- noDataText: '暂无数据',
- background: {
-
- backgroundImage: 'linear-gradient(45deg, rgb(85, 170, 255), rgb(21, 102, 223))'
- },
- tabList: [
- {
- dispName: '发给我的',
- typeId: 3,
- queryLabel: 'TO_ME'
- },
- {
- dispName: '我创建的',
- typeId: 1,
- queryLabel: 'FROM_ME'
- },
- {
- dispName: '全部',
- typeId: 2,
- queryLabel: 'ALL'
- },
- ],
- current: 0,
- swiperCurrent: 0,
- pageNo: 1,
- pageSize: 10,
- list: [],
- total: 0,
- action:'swiperChange',
- sortField: 'create_time',
- sortOrder: 'desc',
- sortList: [
- {
- sortField: 'create_time',
- sortOrder: 'asc'
- },
- {
- sortField: 'create_time',
- sortOrder: 'desc'
- },
- {
- sortField: 'handle_time',
- sortOrder: 'asc'
- },
- {
- sortField: 'handle_time',
- sortOrder: 'desc'
- }
- ],
- sortIndex: 1,
- }
- },
- onLoad() {
- this.pageInit()
- },
- methods:{
- pageInit () {
- this.sortIndex = 1
- this.searchParams = {}
- this.pageNo = 1
- this.getRow()
- },
-
- tabsChange(index) {
- this.swiperCurrent = index;
- },
- swiperChange(event){
- this.action = 'swiperChange'
- this.status = 'loading'
- },
-
- transition(e) {
- let dx = e.detail.dx;
- this.$refs.uTabs.setDx(dx);
- },
-
-
- animationfinish(e) {
- let current = e.detail.current;
- let isCurtab = this.current == current
- if(this.status!="nomore"){
- let loadData = this.action == 'swiperChange' ? !isCurtab : isCurtab;
- if(loadData){
- this.$refs.uTabs.setFinishCurrent(current);
- this.swiperCurrent = current;
- this.current = current;
- this.resetPage();
- }
- }
- },
-
- changeSort (type) {
- if (type === 'createTime') {
- this.sortIndex = this.sortIndex === 1 ? 0 : 1
- }
- if (type === 'handleTime') {
- this.sortIndex = this.sortIndex === 2 ? 3 : 2
- }
- this.getRow(1)
- },
-
- onreachBottom() {
- this.action = 'onreachBottom'
- if(this.list.length < this.total){
- this.pageNo += 1
- this.getRow()
- }else{
- this.status = "nomore"
- }
- },
-
- getRow (pageNo) {
- let _this = this
- if (pageNo) {
- this.pageNo = pageNo
- }
- let params = {
- pageNo: this.pageNo,
- pageSize: this.pageSize,
- queryLabel: this.tabList[this.current].queryLabel,
- }
- if (params.queryLabel == 'ALL') {
-
- params.sortField = this.sortList[this.sortIndex].sortField
-
- params.sortOrder = this.sortList[this.sortIndex].sortOrder
- params.statusList = this.searchParams.status ? this.searchParams.status : []
- params.sourceTypeList = this.searchParams.sourceType ? this.searchParams.sourceType : []
- params.putUserName = this.searchParams.putUserName ? this.searchParams.putUserName : ''
- params.storeName = this.searchParams.storeName ? this.searchParams.storeName : ''
- params.beginDate = this.searchParams.beginDate ? this.searchParams.beginDate : ''
- params.endDate = this.searchParams.endDate ? this.searchParams.endDate : ''
- }
- this.status = "loading"
- getBackLogList(params).then(res => {
- if (res.code == 200 || res.status == 204 || res.status == 200) {
- if(_this.pageNo>1){
- _this.list = _this.list.concat(res.data.list || [])
- }else{
- _this.list = res.data.list || []
- }
- _this.total = res.data.count || 0
- } else {
- _this.list = []
- _this.total = 0
- _this.noDataText = res.message
- }
- _this.status = "loadmore"
- })
- },
- resetPage(){
- this.status = 'loading';
-
- if(this.action == 'onreachBottom'){
- this.getRow();
- }
-
- if(this.action == 'swiperChange'){
- this.list = [];
- this.getRow(1);
- }
- },
-
- refresh(params){
- console.log(params,'1111111111')
- this.searchParams = params
- this.getRow(1)
- },
-
- onNavigationBarButtonTap(e) {
- uni.navigateTo({
- url: "/pages/toDoList/addBacklog"
- })
- },
-
- viewRow(item){
-
- uni.navigateTo({
- url: "/pages/toDoList/backlogDetail?id="+item.id
- })
- },
-
- clsStatus(status){
- if(status == '待审核'){
- return 'dsh'
- }
- if(status == '待整改'){
- return 'dzg'
- }
- if(status == '整改完成'){
- return 'ywc'
- }
- if(status == '已过期'){
- return 'ygq'
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- page{
- height: 100%;
- }
- /* 自定义导航栏样式 */
- .slot-wrap {
- display: flex;
- align-items: center;
- /* 如果您想让slot内容占满整个导航栏的宽度 */
- flex: 1;
- /* 如果您想让slot内容与导航栏左右有空隙 */
- padding: 0 30rpx 0 0;
- color: #fff;
- font-size: 28upx;
- .left-icon{
- flex-grow: 1;
- font-size: 32upx;
- }
- .right-icon{
- padding-left:50upx;
- }
- .uni-icons{
- margin-right: 10upx;
- }
- }
- .text-right {
- text-align: right;
- }
- .pagesCons{
- height: 100%;
- display: flex;
- flex-direction: column;
- .tab-body{
- flex: 1;
- display: flex;
- flex-direction: column;
- .check-list{
- flex: 1;
- overflow-y: scroll;
- .swiper-item{
- width: 100%;
- height: 100%;
- overflow: hidden;
- .scroll-view {
- width: 100%;
- height: 100%;
- overflow: auto;
- }
- }
- }
- // 全部筛选
- .all-filter{
- width: 100%;
- height: 100upx;
- display: flex;
- align-items: center;
- justify-content: space-around;
- box-shadow: 1px 1px 3px #EEEEEE;
- .filter-icon{
- display: flex;
- flex-direction: column;
- // margin-left: 10upx;
- padding: 20upx;
- }
- }
- // 列表样式
- .check-order-list{
- background: #ffffff;
- padding: 10upx 20upx;
- margin: 25upx;
- border-radius: 6upx;
- box-shadow: 1px 1px 3px #EEEEEE;
- .check-row{
- display: flex;
- align-items: center;
- padding: 20upx 10upx;
- font-size: 28upx;
- .icon-xian{
- text-align: right;
- width: 40upx;
- }
- &:first-child{
- border-bottom: 1px dashed #F8F8F8;
- .createDate{
- // color: #666;
- font-size: 26upx;
- margin-left: 10upx;
- }
- }
- &:last-child{
- border-top: 1px dashed #F8F8F8;
- }
- > view{
- &:first-child{
- flex: 1;
- }
- }
- // 抄送标记
- .mark {
- color: #00C1DE;
- padding: 6upx;
- font-size: 24upx;
- border: 1px solid #00C1DE;
- border-radius: 6upx;
- margin-right: 10upx;
- }
- // 状态
- .status {
- display: inline-block;
- width: 200upx;
- }
- .dsh{
- color: red;
- }
- .dzg{
- color: #007AFF;
- }
- .ygq {
- color: #999;
- }
- .ywc {
- color: #10c71e;
- }
- }
- }
- }
- }
-
-
- </style>
|