发布通告功能
This commit is contained in:
parent
3ce0c6034a
commit
31239e5405
@ -115,3 +115,31 @@ export function feedbackList(params) {
|
|||||||
params: params
|
params: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 通告查询报名列表
|
||||||
|
export function reportList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/busi/notice/reportList',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 选中当前名片
|
||||||
|
export function chooseSign(params) {
|
||||||
|
return request({
|
||||||
|
url: '/busi/sign/chooseSign',
|
||||||
|
method: 'post',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取报名数量
|
||||||
|
export function getSignNum(params) {
|
||||||
|
return request({
|
||||||
|
url: '/busi/notice/reportNum',
|
||||||
|
method: '',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
@ -15,7 +15,7 @@
|
|||||||
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
|
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
|
||||||
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<my-notice-item-tg v-if="dataList.length>0" :dataList="dataList"
|
<my-notice-item-tg v-if="dataList.length>0" :dataList="dataList"
|
||||||
@goDetail="goDetail()"></my-notice-item-tg>
|
@goDetail="goDetail"></my-notice-item-tg>
|
||||||
<view style="text-align: center" v-if="dataList.length==0">
|
<view style="text-align: center" v-if="dataList.length==0">
|
||||||
<image class="" src="@/static/images/nothing.png"></image>
|
<image class="" src="@/static/images/nothing.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -221,4 +221,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -2,9 +2,9 @@
|
|||||||
<view class="dl-components">
|
<view class="dl-components">
|
||||||
<view class="card-dom " v-for="(item,index) in dataList">
|
<view class="card-dom " v-for="(item,index) in dataList">
|
||||||
<!-- 多选框--管理状态或者选择名片时使用 -->
|
<!-- 多选框--管理状态或者选择名片时使用 -->
|
||||||
<view class="choose-dom" v-if="ifChoose">
|
<view class="choose-dom" v-if="ifChoose&&status==0">
|
||||||
<uni-data-checkbox v-model="item.choosed" :disabled="item.canUse=='0'" multiple
|
<uni-data-checkbox v-model="item.choosed" :disabled="item.canUse=='0'" multiple
|
||||||
:localdata="checkboxArray" />
|
:localdata="checkboxArray" @change="chooseItem()" />
|
||||||
</view>
|
</view>
|
||||||
<view :class="['right-content',item.choosed.length>0?'click':'']">
|
<view :class="['right-content',item.choosed.length>0?'click':'']">
|
||||||
<view class="card-title">
|
<view class="card-title">
|
||||||
@ -18,7 +18,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class="edit-text">
|
<view class="edit-text">
|
||||||
<text v-if="!item.ifChecked" style="color:#F97A35;">待定</text>
|
<text v-if="!item.ifChecked" style="color:#F97A35;">待定</text>
|
||||||
<text v-else style="color:#5986F2 ;">合适</text>
|
<text v-else style="color:#5986F2 ;" @click="chooseOk(item)">合适</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-content">
|
<view class="card-content">
|
||||||
@ -40,7 +40,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view :class="['edit-dom','edit-dom-2']" @click="goIndex(item)">主页
|
<view :class="['edit-dom','edit-dom-2']" @click="goIndex(item)">主页
|
||||||
</view>
|
</view>
|
||||||
<view :class="['edit-dom']" @click="chooseCardVal(!item.ifChecked)">{{item.ifChecked?"待定":"合适"}}
|
<view v-if="status==0" :class="['edit-dom']" @click="chooseCardVal(item.id)">{{"合适"}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -58,9 +58,14 @@
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
},
|
},
|
||||||
|
|
||||||
ifChoose: {
|
ifChoose: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
|
status: {
|
||||||
|
default: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -72,6 +77,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
chooseItem() {
|
||||||
|
console.log(this.dataList, "dataList")
|
||||||
|
this.$emit("updateList", this.dataList)
|
||||||
|
},
|
||||||
|
chooseOk() {
|
||||||
|
|
||||||
|
},
|
||||||
formatNumberWithUnits(num) {
|
formatNumberWithUnits(num) {
|
||||||
return formatNumberWithUnits(num)
|
return formatNumberWithUnits(num)
|
||||||
},
|
},
|
||||||
@ -85,6 +97,7 @@
|
|||||||
* 将名片置为合适或不合适
|
* 将名片置为合适或不合适
|
||||||
*/
|
*/
|
||||||
chooseCardVal(value) {
|
chooseCardVal(value) {
|
||||||
|
|
||||||
this.$emit("chooseCardVal", value)
|
this.$emit("chooseCardVal", value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,14 +5,19 @@
|
|||||||
<view class="notice-detail-last-box">
|
<view class="notice-detail-last-box">
|
||||||
<!-- 报名列表 -->
|
<!-- 报名列表 -->
|
||||||
<view class="info-box notice-detail" v-if="viewMy">
|
<view class="info-box notice-detail" v-if="viewMy">
|
||||||
<view class="detail-title">已报名:{{imageArray.length||0}}人</view>
|
<view class="detail-title">已报名:{{allImgNum||0}}人</view>
|
||||||
<view class="image-box" v-if="imageArray.length>0"
|
<view class="image-box" v-if="imageArray.length>0"
|
||||||
:style="{height:(imageArray.length*(imageWidth+10)+20)+'rpx'}">
|
:style="{height:(imageArray.length*(imageWidth*2))+'rpx'}">
|
||||||
<view class="image-row" v-for="(row,rowIndex) in imageArray">
|
<view class="image-row" v-for="(row,rowIndex) in imageArray">
|
||||||
<image v-for="(item,i) in row"
|
<image v-for="(item,i) in row" v-if="!item"
|
||||||
:style="{ top:(imageWidth+10)*rowIndex+'rpx',left:imageWidth*i+'rpx'}"
|
:style="{ top:(imageWidth+10)*rowIndex+'rpx',left:imageWidth*i+'rpx'}"
|
||||||
src="@/static/images/profile.jpg" mode="aspectFit">
|
src="@/static/images/profile.jpg" mode="aspectFit">
|
||||||
</image>
|
</image>
|
||||||
|
|
||||||
|
<image v-for="(item,i) in row" v-else
|
||||||
|
:style="{ top:(imageWidth+10)*rowIndex+'rpx',left:imageWidth*i+'rpx'}" :src="item"
|
||||||
|
mode="aspectFit">
|
||||||
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="view-report-button" v-if="imageArray.length>0" @click="goReportList()">查看报名</view> -->
|
<!-- <view class="view-report-button" v-if="imageArray.length>0" @click="goReportList()">查看报名</view> -->
|
||||||
@ -168,14 +173,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 通告发布人能操作的 -->
|
<!-- 通告发布人能操作的 -->
|
||||||
<view class="report-box" v-if="null!=userInfo && userInfo.userId==noticeDetail.userId&&ifBz==false">
|
<view class="report-box" v-if="null!=userInfo && userInfo.userId==noticeDetail.userId&&ifBz==false">
|
||||||
<view v-if="'0'==noticeDetail.approvalStatus" class="close-notice">关闭</view>
|
<!-- <view v-if="'0'==noticeDetail.approvalStatus" class="close-notice">关闭</view> -->
|
||||||
<view v-if="'0'==noticeDetail.approvalStatus" class="waiting-approval">
|
<view v-if="'0'==noticeDetail.approvalStatus" class="waiting-approval">
|
||||||
<view>审核中</view>
|
<view>审核中</view>
|
||||||
<image @click="useCoupon()" src="@/static/detail/approval.png" mode="aspectFit"></image>
|
<image @click="useCoupon()" src="@/static/detail/approval.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="'2'==noticeDetail.approvalStatus" class="waiting-approval">已关闭</view>
|
<view v-if="'2'==noticeDetail.approvalStatus" class="waiting-approval">已关闭</view>
|
||||||
<view v-if="'1'==noticeDetail.approvalStatus" class="waiting-approval" @click="closeNotice('2')">关闭
|
<!-- <view v-if="'1'==noticeDetail.approvalStatus" class="waiting-approval" @click="closeNotice('2')">关闭
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 提示窗示例 -->
|
<!-- 提示窗示例 -->
|
||||||
@ -392,7 +397,8 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
goReportForm() {
|
goReportForm() {
|
||||||
this.$tab.navigateTo('/pages/mine/set/report-form?userId='+this.userDetail.userId+'¬iceId='+this.noticeId)
|
this.$tab.navigateTo('/pages/mine/set/report-form?userId=' + this.userDetail.userId + '¬iceId=' + this
|
||||||
|
.noticeId)
|
||||||
},
|
},
|
||||||
goMemberIndex() {
|
goMemberIndex() {
|
||||||
this.$tab.navigateTo('/pages/mine/member/member-index')
|
this.$tab.navigateTo('/pages/mine/member/member-index')
|
||||||
@ -401,7 +407,7 @@
|
|||||||
* 去报名列表
|
* 去报名列表
|
||||||
*/
|
*/
|
||||||
goReportList() {
|
goReportList() {
|
||||||
this.$tab.navigateTo('/pages/notice/report-list')
|
this.$tab.navigateTo('/pages/notice/report-list?noticeId=' + this.noticeId)
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 查通告详情
|
* 查通告详情
|
||||||
@ -539,6 +545,7 @@
|
|||||||
* 计算头像显示区域高度
|
* 计算头像显示区域高度
|
||||||
*/
|
*/
|
||||||
calculateImagesPerRow(imgs) {
|
calculateImagesPerRow(imgs) {
|
||||||
|
this.imageArray = []
|
||||||
let tempImg = []
|
let tempImg = []
|
||||||
imgs.forEach(it => {
|
imgs.forEach(it => {
|
||||||
tempImg.push(this.imageUrl + it)
|
tempImg.push(this.imageUrl + it)
|
||||||
@ -944,4 +951,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -8,7 +8,7 @@
|
|||||||
<view class="dl-menu-box" v-for="(item,index) in menus">
|
<view class="dl-menu-box" v-for="(item,index) in menus">
|
||||||
<view @click="itemClick(index,item)" class="dl-menu"
|
<view @click="itemClick(index,item)" class="dl-menu"
|
||||||
:class="index==menuIndex?'dl-menu click':'dl-menu'">
|
:class="index==menuIndex?'dl-menu click':'dl-menu'">
|
||||||
{{item}}({{0==menuIndex?waitingTotal:checkedTotal}})
|
{{item}}({{0==index?waitingTotal:checkedTotal}})
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -16,8 +16,8 @@
|
|||||||
<view class="data-list-box" v-if="0==menuIndex">
|
<view class="data-list-box" v-if="0==menuIndex">
|
||||||
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
|
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
|
||||||
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<card-item :dataList="waitingList" ifChoose="true" @goIndex="goIndex()"
|
<card-item status="0" :dataList="waitingList" ifChoose="true" @goIndex="goIndex()"
|
||||||
@chooseCardVal="chooseCardVal()"></card-item>
|
@chooseCardVal="chooseCardVal" @updateList="updateListWaiting"></card-item>
|
||||||
<view style="text-align: center" v-if="waitingList.length==0">
|
<view style="text-align: center" v-if="waitingList.length==0">
|
||||||
<image class="" src="@/static/images/nothing.png"></image>
|
<image class="" src="@/static/images/nothing.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -27,8 +27,8 @@
|
|||||||
<view class="data-list-box" v-if="1==menuIndex">
|
<view class="data-list-box" v-if="1==menuIndex">
|
||||||
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
|
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
|
||||||
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<card-item :dataList="checkedList" ifChoose="true" @goIndex="goIndex()"
|
<card-item status="1" :dataList="checkedList" ifChoose="true" @goIndex="goIndex()"
|
||||||
@chooseCardVal="chooseCardVal()"></card-item>
|
@chooseCardVal="chooseCardVal" @updateList="updateListChecked"></card-item>
|
||||||
<view style="text-align: center" v-if="checkedList.length==0">
|
<view style="text-align: center" v-if="checkedList.length==0">
|
||||||
<image class="" src="@/static/images/nothing.png"></image>
|
<image class="" src="@/static/images/nothing.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -38,11 +38,10 @@
|
|||||||
<view class="footer-box">
|
<view class="footer-box">
|
||||||
<view class="left-radio">
|
<view class="left-radio">
|
||||||
<uni-data-checkbox v-if="0==menuIndex" @change="chooseAllFun()" multiple :localdata="chooseAll" />
|
<uni-data-checkbox v-if="0==menuIndex" @change="chooseAllFun()" multiple :localdata="chooseAll" />
|
||||||
<uni-data-checkbox v-else @change="chooseAllFun()" multiple :localdata="chooseAll" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="right-button">
|
<view class="right-button">
|
||||||
<text v-if="0==menuIndex" style="color: #929292;">可在“合适”列表导出名单</text>
|
<text v-if="0==menuIndex" style="color: #929292;">可在“合适”列表导出名单</text>
|
||||||
<text v-if="1==menuIndex">已选择{{getChooseNum}}人</text>
|
|
||||||
<view v-if="0==menuIndex" class="button-dom" @click="chooseOk">划为合适</view>
|
<view v-if="0==menuIndex" class="button-dom" @click="chooseOk">划为合适</view>
|
||||||
<view v-if="1==menuIndex" class="button-dom" @click="exportList">导出名单</view>
|
<view v-if="1==menuIndex" class="button-dom" @click="exportList">导出名单</view>
|
||||||
</view>
|
</view>
|
||||||
@ -57,6 +56,12 @@
|
|||||||
toast,
|
toast,
|
||||||
hasRights
|
hasRights
|
||||||
} from '@/utils/common.js'
|
} from '@/utils/common.js'
|
||||||
|
import {
|
||||||
|
reportList,
|
||||||
|
chooseSign,
|
||||||
|
getSignNum
|
||||||
|
} from '@/api/business/notice';
|
||||||
|
import config from '@/config';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
navigationBarVue,
|
navigationBarVue,
|
||||||
@ -64,6 +69,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
baseUrl: config.baseUrl,
|
||||||
chooseAll: [{
|
chooseAll: [{
|
||||||
text: '全选',
|
text: '全选',
|
||||||
value: true
|
value: true
|
||||||
@ -71,68 +77,129 @@
|
|||||||
globalConfig: getApp().globalData.config,
|
globalConfig: getApp().globalData.config,
|
||||||
menus: ['待定', '合适'],
|
menus: ['待定', '合适'],
|
||||||
menuIndex: 0,
|
menuIndex: 0,
|
||||||
queryParams: {
|
waitingParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
checkedParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
},
|
},
|
||||||
//待定的数组
|
//待定的数组
|
||||||
waitingList: [{
|
waitingList: [],
|
||||||
id: "",
|
|
||||||
//是否选中
|
|
||||||
choosed: [],
|
|
||||||
//是否合适
|
|
||||||
ifChecked: false,
|
|
||||||
platformCode: "xiaohongshu",
|
|
||||||
platformName: "小红书",
|
|
||||||
accountName: "mark",
|
|
||||||
fansNum: 1000
|
|
||||||
}, {
|
|
||||||
id: "",
|
|
||||||
//是否选中
|
|
||||||
choosed: [],
|
|
||||||
//是否合适
|
|
||||||
ifChecked: false,
|
|
||||||
platformCode: "xiaohongshu",
|
|
||||||
platformName: "小红书",
|
|
||||||
accountName: "mark",
|
|
||||||
fansNum: 1000
|
|
||||||
}],
|
|
||||||
// 合适的数组
|
// 合适的数组
|
||||||
checkedList: [{
|
checkedList: [],
|
||||||
id: "",
|
|
||||||
//是否选中
|
|
||||||
choosed: [],
|
|
||||||
//是否合适
|
|
||||||
ifChecked: true,
|
|
||||||
platformCode: "xiaohongshu",
|
|
||||||
platformName: "小红书",
|
|
||||||
accountName: "mark",
|
|
||||||
fansNum: 1000
|
|
||||||
}, {
|
|
||||||
id: "",
|
|
||||||
//是否选中
|
|
||||||
choosed: [],
|
|
||||||
//是否合适
|
|
||||||
ifChecked: true,
|
|
||||||
platformCode: "xiaohongshu",
|
|
||||||
platformName: "小红书",
|
|
||||||
accountName: "mark",
|
|
||||||
fansNum: 1000
|
|
||||||
}],
|
|
||||||
//待定的总数
|
//待定的总数
|
||||||
waitingTotal: 0,
|
waitingTotal: 0,
|
||||||
//合适的总数
|
//合适的总数
|
||||||
checkedTotal: 0,
|
checkedTotal: 0,
|
||||||
//下来刷新状态
|
//下来刷新状态
|
||||||
isTriggered: false,
|
isTriggered: false,
|
||||||
|
noticeId: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getChooseNum() {
|
getChooseNum() {
|
||||||
return this.checkedList.filter((item) => item.choosed.length > 0).length
|
return this.checkedList.filter((item) => item.choosed && item.choosed.length > 0).length
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(param) {
|
||||||
|
this.noticeId = param.noticeId
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.waitingList = []
|
||||||
|
this.checkedList = []
|
||||||
|
this.menuIndex = 0
|
||||||
|
this.waitingParams.pageNum = 1
|
||||||
|
this.checkedParams.pageNum = 1
|
||||||
|
this.selectDataList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
updateListWaiting(list) {
|
||||||
|
this.waitingList = list
|
||||||
|
console.log(this.waitingList, "waitingList")
|
||||||
|
},
|
||||||
|
updateListChecked(list) {
|
||||||
|
this.checkedList = list
|
||||||
|
console.log(this.checkedList, "checkedList")
|
||||||
|
},
|
||||||
|
chooseOk() {
|
||||||
|
console.log(this.waitingList, 119);
|
||||||
|
let tempList = this.waitingList.filter((item) => item.choosed.length > 0)
|
||||||
|
if (tempList.length == 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请勾选合适的卡片',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 800
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let ids = []
|
||||||
|
tempList.forEach(it => {
|
||||||
|
ids.push(it.id)
|
||||||
|
})
|
||||||
|
chooseSign({
|
||||||
|
signIds: ids.join(",")
|
||||||
|
}).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '成功',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 800
|
||||||
|
})
|
||||||
|
this.selectDataList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getNum() {
|
||||||
|
let queryData = {}
|
||||||
|
queryData.noticeId = this.noticeId
|
||||||
|
getSignNum(queryData).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
|
||||||
|
this.waitingTotal = res.data.waitNum
|
||||||
|
this.checkedTotal = res.data.checkedNum
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectDataList() {
|
||||||
|
let queryData = {}
|
||||||
|
if (this.menuIndex == 0) {
|
||||||
|
queryData.status = '01'
|
||||||
|
queryData.pageNum = this.waitingParams.pageNum
|
||||||
|
queryData.pageSize = this.waitingParams.pageSize
|
||||||
|
} else if (this.menuIndex == 1) {
|
||||||
|
queryData.status = '02'
|
||||||
|
queryData.pageNum = this.checkedParams.pageNum
|
||||||
|
queryData.pageSize = this.checkedParams.pageSize
|
||||||
|
}
|
||||||
|
queryData.noticeId = this.noticeId
|
||||||
|
reportList(queryData).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.isTriggered = false
|
||||||
|
res.data.records.map((item) => {
|
||||||
|
item.choosed = []
|
||||||
|
})
|
||||||
|
if (this.menuIndex == 0) {
|
||||||
|
if (queryData.pageNum == 1) {
|
||||||
|
this.waitingList = res.data.records
|
||||||
|
} else {
|
||||||
|
this.waitingList = this.waitingList.concat(res.data.records)
|
||||||
|
}
|
||||||
|
this.waitingTotal = res.data.total
|
||||||
|
} else if (this.menuIndex == 1) {
|
||||||
|
if (queryData.pageNum == 1) {
|
||||||
|
this.checkedList = res.data.records
|
||||||
|
} else {
|
||||||
|
this.checkedList = this.checkedList.concat(res.data.records)
|
||||||
|
}
|
||||||
|
this.checkedTotal = res.data.total
|
||||||
|
|
||||||
|
}
|
||||||
|
console.log(this.checkedTotal, this.waitingTotal, this.waitingList);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getNum()
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 菜单点击
|
* 菜单点击
|
||||||
* @param {Object} index
|
* @param {Object} index
|
||||||
@ -140,32 +207,47 @@
|
|||||||
*/
|
*/
|
||||||
itemClick(index, item) {
|
itemClick(index, item) {
|
||||||
this.menuIndex = index
|
this.menuIndex = index
|
||||||
|
this.selectDataList()
|
||||||
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 上滑加载数据
|
* 上滑加载数据
|
||||||
*/
|
*/
|
||||||
onReachBottomCus() {
|
onReachBottomCus() {
|
||||||
|
let quertData = {}
|
||||||
|
if (this.menuIndex == 0) {
|
||||||
|
queryData = this.waitingParams
|
||||||
|
} else if (this.menuIndex == 1) {
|
||||||
|
queryData = this.checkedParams
|
||||||
|
}
|
||||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||||
let total = (0 == this.menuIndex ? this.waitingTotal : this.checkedTotal)
|
let total = (0 == this.menuIndex ? this.waitingTotal : this.checkedTotal)
|
||||||
if (this.queryParams.pageNum * this.queryParams.pageSize >= total) {
|
if (queryData.pageNum * queryData.pageSize >= total) {
|
||||||
toast("没有更多数据了")
|
toast("没有更多数据了")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//页码+1,调用获取数据的方法获取第二页数据
|
//页码+1,调用获取数据的方法获取第二页数据
|
||||||
this.queryParams.pageNum++
|
queryData.pageNum++
|
||||||
|
this.selectDataList()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 下拉刷新数据
|
* 下拉刷新数据
|
||||||
*/
|
*/
|
||||||
onRefresherrefresh() {
|
onRefresherrefresh() {
|
||||||
|
let quertData = {}
|
||||||
|
if (this.menuIndex == 0) {
|
||||||
|
queryData = this.waitingParams
|
||||||
|
} else if (this.menuIndex == 1) {
|
||||||
|
queryData = this.checkedParams
|
||||||
|
}
|
||||||
this.isTriggered = true
|
this.isTriggered = true
|
||||||
this.queryParams.pageNum = 1
|
quertData.pageNum = 1
|
||||||
if (0 == this.menuIndex) {
|
if (0 == this.menuIndex) {
|
||||||
this.waitingTotal = 0
|
this.waitingTotal = 0
|
||||||
} else {
|
} else {
|
||||||
this.checkedTotal = 0
|
this.checkedTotal = 0
|
||||||
}
|
}
|
||||||
|
this.selectDataList()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 全选
|
* 全选
|
||||||
@ -195,24 +277,51 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* 批量划为合适
|
|
||||||
*/
|
|
||||||
chooseOk() {},
|
|
||||||
/**
|
/**
|
||||||
* 导出名单
|
* 导出名单
|
||||||
*/
|
*/
|
||||||
exportList() {},
|
exportList() {
|
||||||
|
let exportUrl = this.baseUrl + "/busi/sign/export?noticeId=" + this.noticeId
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: exportUrl,
|
||||||
|
success: function() {
|
||||||
|
uni.showToast({
|
||||||
|
title: '名单复制成功,请到浏览器下载',
|
||||||
|
icon: 'icon',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: function() {
|
||||||
|
uni.showToast({
|
||||||
|
title: '复制失败',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 去名片所有者主页
|
* 去名片所有者主页
|
||||||
*/
|
*/
|
||||||
goIndex(item) {
|
goIndex(item) {
|
||||||
this.$tab.navigateTo('/pages/mine/member/member-index')
|
console.log(item);
|
||||||
},
|
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 将名片置为合适或不合适
|
* 将名片置为合适或不合适
|
||||||
*/
|
*/
|
||||||
chooseCardVal(value) {}
|
chooseCardVal(value) {
|
||||||
|
chooseSign({
|
||||||
|
signIds: value
|
||||||
|
}).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '成功',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 800
|
||||||
|
})
|
||||||
|
this.selectDataList()
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -302,7 +411,7 @@
|
|||||||
|
|
||||||
.left-radio {
|
.left-radio {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 30%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-button {
|
.right-button {
|
||||||
@ -329,4 +438,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.checklist-box {
|
||||||
|
margin-right: 5rpx !important;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user