Compare commits
2 Commits
eb15997c9f
...
f3f9830d1e
Author | SHA1 | Date | |
---|---|---|---|
f3f9830d1e | |||
31239e5405 |
@ -116,6 +116,33 @@ export function feedbackList(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
|
||||
})
|
||||
}
|
||||
// 查询当前登录用户通告
|
||||
export function queryListByUserId(params) {
|
||||
return request({
|
||||
|
@ -14,8 +14,8 @@
|
||||
<view class="dl-item-box">
|
||||
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
|
||||
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<my-notice-item-tg v-if="dataList.length>0" :dataList="dataList" @goDetail="goDetail()"
|
||||
@goEvaluate="goEvaluate()"></my-notice-item-tg>
|
||||
<my-notice-item-tg v-if="dataList.length>0" :dataList="dataList"
|
||||
@goDetail="goDetail"></my-notice-item-tg>
|
||||
<view style="text-align: center" v-if="dataList.length==0">
|
||||
<image class="" src="@/static/images/nothing.png"></image>
|
||||
</view>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<view class="dl-components">
|
||||
<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
|
||||
:localdata="checkboxArray" />
|
||||
:localdata="checkboxArray" @change="chooseItem()" />
|
||||
</view>
|
||||
<view :class="['right-content',item.choosed.length>0?'click':'']">
|
||||
<view class="card-title">
|
||||
@ -18,7 +18,7 @@
|
||||
</view> -->
|
||||
<view class="edit-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 class="card-content">
|
||||
@ -40,7 +40,7 @@
|
||||
</view> -->
|
||||
<view :class="['edit-dom','edit-dom-2']" @click="goIndex(item)">主页
|
||||
</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>
|
||||
@ -58,9 +58,14 @@
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
|
||||
ifChoose: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
status: {
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -72,6 +77,13 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseItem() {
|
||||
console.log(this.dataList, "dataList")
|
||||
this.$emit("updateList", this.dataList)
|
||||
},
|
||||
chooseOk() {
|
||||
|
||||
},
|
||||
formatNumberWithUnits(num) {
|
||||
return formatNumberWithUnits(num)
|
||||
},
|
||||
@ -85,6 +97,7 @@
|
||||
* 将名片置为合适或不合适
|
||||
*/
|
||||
chooseCardVal(value) {
|
||||
|
||||
this.$emit("chooseCardVal", value)
|
||||
}
|
||||
}
|
||||
|
@ -5,14 +5,19 @@
|
||||
<view class="notice-detail-last-box">
|
||||
<!-- 报名列表 -->
|
||||
<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"
|
||||
: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">
|
||||
<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'}"
|
||||
src="@/static/images/profile.jpg" mode="aspectFit">
|
||||
</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 class="view-report-button" v-if="imageArray.length>0" @click="goReportList()">查看报名</view> -->
|
||||
@ -168,14 +173,14 @@
|
||||
</view>
|
||||
<!-- 通告发布人能操作的 -->
|
||||
<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>审核中</view>
|
||||
<image @click="useCoupon()" src="@/static/detail/approval.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view v-if="'2'==noticeDetail.approvalStatus" class="waiting-approval">已关闭</view>
|
||||
<view v-if="'1'==noticeDetail.approvalStatus" class="waiting-approval" @click="closeNotice('2')">关闭
|
||||
</view>
|
||||
<!-- <view v-if="'1'==noticeDetail.approvalStatus" class="waiting-approval" @click="closeNotice('2')">关闭
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 提示窗示例 -->
|
||||
@ -392,7 +397,8 @@
|
||||
})
|
||||
},
|
||||
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() {
|
||||
this.$tab.navigateTo('/pages/mine/member/member-index?userId='+this.userDetail.userId)
|
||||
@ -401,7 +407,7 @@
|
||||
* 去报名列表
|
||||
*/
|
||||
goReportList() {
|
||||
this.$tab.navigateTo('/pages/notice/report-list')
|
||||
this.$tab.navigateTo('/pages/notice/report-list?noticeId=' + this.noticeId)
|
||||
},
|
||||
/**
|
||||
* 查通告详情
|
||||
@ -539,6 +545,7 @@
|
||||
* 计算头像显示区域高度
|
||||
*/
|
||||
calculateImagesPerRow(imgs) {
|
||||
this.imageArray = []
|
||||
let tempImg = []
|
||||
imgs.forEach(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 @click="itemClick(index,item)" class="dl-menu"
|
||||
:class="index==menuIndex?'dl-menu click':'dl-menu'">
|
||||
{{item}}({{0==menuIndex?waitingTotal:checkedTotal}})
|
||||
{{item}}({{0==index?waitingTotal:checkedTotal}})
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -16,8 +16,8 @@
|
||||
<view class="data-list-box" v-if="0==menuIndex">
|
||||
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
|
||||
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<card-item :dataList="waitingList" ifChoose="true" @goIndex="goIndex()"
|
||||
@chooseCardVal="chooseCardVal()"></card-item>
|
||||
<card-item status="0" :dataList="waitingList" ifChoose="true" @goIndex="goIndex()"
|
||||
@chooseCardVal="chooseCardVal" @updateList="updateListWaiting"></card-item>
|
||||
<view style="text-align: center" v-if="waitingList.length==0">
|
||||
<image class="" src="@/static/images/nothing.png"></image>
|
||||
</view>
|
||||
@ -27,8 +27,8 @@
|
||||
<view class="data-list-box" v-if="1==menuIndex">
|
||||
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
|
||||
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<card-item :dataList="checkedList" ifChoose="true" @goIndex="goIndex()"
|
||||
@chooseCardVal="chooseCardVal()"></card-item>
|
||||
<card-item status="1" :dataList="checkedList" ifChoose="true" @goIndex="goIndex()"
|
||||
@chooseCardVal="chooseCardVal" @updateList="updateListChecked"></card-item>
|
||||
<view style="text-align: center" v-if="checkedList.length==0">
|
||||
<image class="" src="@/static/images/nothing.png"></image>
|
||||
</view>
|
||||
@ -38,11 +38,10 @@
|
||||
<view class="footer-box">
|
||||
<view class="left-radio">
|
||||
<uni-data-checkbox v-if="0==menuIndex" @change="chooseAllFun()" multiple :localdata="chooseAll" />
|
||||
<uni-data-checkbox v-else @change="chooseAllFun()" multiple :localdata="chooseAll" />
|
||||
|
||||
</view>
|
||||
<view class="right-button">
|
||||
<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="1==menuIndex" class="button-dom" @click="exportList">导出名单</view>
|
||||
</view>
|
||||
@ -57,6 +56,12 @@
|
||||
toast,
|
||||
hasRights
|
||||
} from '@/utils/common.js'
|
||||
import {
|
||||
reportList,
|
||||
chooseSign,
|
||||
getSignNum
|
||||
} from '@/api/business/notice';
|
||||
import config from '@/config';
|
||||
export default {
|
||||
components: {
|
||||
navigationBarVue,
|
||||
@ -64,6 +69,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseUrl: config.baseUrl,
|
||||
chooseAll: [{
|
||||
text: '全选',
|
||||
value: true
|
||||
@ -71,68 +77,129 @@
|
||||
globalConfig: getApp().globalData.config,
|
||||
menus: ['待定', '合适'],
|
||||
menuIndex: 0,
|
||||
queryParams: {
|
||||
waitingParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
checkedParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
//待定的数组
|
||||
waitingList: [{
|
||||
id: "",
|
||||
//是否选中
|
||||
choosed: [],
|
||||
//是否合适
|
||||
ifChecked: false,
|
||||
platformCode: "xiaohongshu",
|
||||
platformName: "小红书",
|
||||
accountName: "mark",
|
||||
fansNum: 1000
|
||||
}, {
|
||||
id: "",
|
||||
//是否选中
|
||||
choosed: [],
|
||||
//是否合适
|
||||
ifChecked: false,
|
||||
platformCode: "xiaohongshu",
|
||||
platformName: "小红书",
|
||||
accountName: "mark",
|
||||
fansNum: 1000
|
||||
}],
|
||||
waitingList: [],
|
||||
// 合适的数组
|
||||
checkedList: [{
|
||||
id: "",
|
||||
//是否选中
|
||||
choosed: [],
|
||||
//是否合适
|
||||
ifChecked: true,
|
||||
platformCode: "xiaohongshu",
|
||||
platformName: "小红书",
|
||||
accountName: "mark",
|
||||
fansNum: 1000
|
||||
}, {
|
||||
id: "",
|
||||
//是否选中
|
||||
choosed: [],
|
||||
//是否合适
|
||||
ifChecked: true,
|
||||
platformCode: "xiaohongshu",
|
||||
platformName: "小红书",
|
||||
accountName: "mark",
|
||||
fansNum: 1000
|
||||
}],
|
||||
checkedList: [],
|
||||
//待定的总数
|
||||
waitingTotal: 0,
|
||||
//合适的总数
|
||||
checkedTotal: 0,
|
||||
//下来刷新状态
|
||||
isTriggered: false,
|
||||
noticeId: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
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: {
|
||||
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
|
||||
@ -140,32 +207,47 @@
|
||||
*/
|
||||
itemClick(index, item) {
|
||||
this.menuIndex = index
|
||||
this.selectDataList()
|
||||
|
||||
},
|
||||
/**
|
||||
* 上滑加载数据
|
||||
*/
|
||||
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)
|
||||
if (this.queryParams.pageNum * this.queryParams.pageSize >= total) {
|
||||
if (queryData.pageNum * queryData.pageSize >= total) {
|
||||
toast("没有更多数据了")
|
||||
return
|
||||
}
|
||||
//页码+1,调用获取数据的方法获取第二页数据
|
||||
this.queryParams.pageNum++
|
||||
queryData.pageNum++
|
||||
this.selectDataList()
|
||||
},
|
||||
/**
|
||||
* 下拉刷新数据
|
||||
*/
|
||||
onRefresherrefresh() {
|
||||
let quertData = {}
|
||||
if (this.menuIndex == 0) {
|
||||
queryData = this.waitingParams
|
||||
} else if (this.menuIndex == 1) {
|
||||
queryData = this.checkedParams
|
||||
}
|
||||
this.isTriggered = true
|
||||
this.queryParams.pageNum = 1
|
||||
quertData.pageNum = 1
|
||||
if (0 == this.menuIndex) {
|
||||
this.waitingTotal = 0
|
||||
} else {
|
||||
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) {
|
||||
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>
|
||||
@ -302,7 +411,7 @@
|
||||
|
||||
.left-radio {
|
||||
text-align: left;
|
||||
width: 30%;
|
||||
|
||||
}
|
||||
|
||||
.right-button {
|
||||
@ -329,4 +438,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.checklist-box {
|
||||
margin-right: 5rpx !important;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user