This commit is contained in:
lnn19986213 2023-11-09 10:41:13 +08:00
parent 6534167ddf
commit 21060ba15d
17 changed files with 829 additions and 218 deletions

View File

@ -438,7 +438,15 @@
{ {
"path": "AwardWinningWork/AwardWinningWork", "path": "AwardWinningWork/AwardWinningWork",
"style": { "style": {
"navigationBarTitleText": "艺起战疫获奖作品", "navigationBarTitleText": "文创展厅",
"enablePullDownRefresh": true,
"onReachBottomDistance": 20
}
},
{
"path": "AwardWinningWork/AwardDetail",
"style": {
"navigationBarTitleText": "文创展厅作品详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },

View File

@ -119,12 +119,12 @@
<image src="../../static/rightArrow.png" mode=""></image> <image src="../../static/rightArrow.png" mode=""></image>
</view> </view>
</view> </view>
<!-- <view class="content_bott_itm" @click="toSz()"> <view class="content_bott_itm" @click="toSz()">
<view class="content_bott_wods"> 设置 </view> <view class="content_bott_wods"> 设置 </view>
<view class="content_bott_arrow"> <view class="content_bott_arrow">
<image src="../../static/rightArrow.png" mode=""></image> <image src="../../static/rightArrow.png" mode=""></image>
</view> </view>
</view> --> </view>
</view> </view>
</view> </view>
<u-gap height="50" bgColor="#F4F5F7"></u-gap> <u-gap height="50" bgColor="#F4F5F7"></u-gap>

View File

@ -20,7 +20,8 @@
this.http.request('/auth/logout', {}, "GET").then(res => { this.http.request('/auth/logout', {}, "GET").then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.redirectTo({ uni.redirectTo({
url: "/pagesC/Login/Login" url: "/pages/pageHome/shwxLogin",
// url: '/pagesC/Login/Login'
}) })
} }
}).catch(e => { }).catch(e => {

View File

@ -16,6 +16,10 @@
</view> </view>
</view> </view>
</view> </view>
<view class="talkss" @click="goTalk">
<image class="concat_ico" src="../../static/FamousArts/Talk.png" mode=""></image>
发起聊天
</view>
<view class="talk" @click="goFollow()" v-if="isFollow == 2"> <view class="talk" @click="goFollow()" v-if="isFollow == 2">
关注 关注
@ -252,6 +256,15 @@
}); });
}) })
}, },
goTalk() {
uni.navigateTo({
url: "/pagesA/msg/chat/chat?name=" + this.userName + '&linkId=' + '' + '&toUser=' + this
.userId + '&toUserImg=' + this.userImg
})
// uni.showToast({
// title:""
// })
}
}, },
} }
@ -318,6 +331,25 @@
} }
} }
} }
.talkss {
border: 1px solid #99241B;
font-size: 24rpx;
font-weight: 600;
border-radius: 10rpx;
color: #99241B;
display: flex;
align-items: center;
justify-content: center;
padding: 16rpx;
box-sizing: border-box;
.concat_ico {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
}
.talk { .talk {
border: 1px solid #99241B; border: 1px solid #99241B;

View File

@ -103,12 +103,13 @@
<view class="item_ul"> <view class="item_ul">
<view class="title"> <view class="title">
<image class="icon" src="../../static/detailIcon/icon0.png" mode="scaleToFill"></image> <image class="icon" src="../../static/detailIcon/icon0.png" mode="scaleToFill"></image>
<text>参赛作品展示</text> <text v-if="data.status == 2">获奖作品展示</text>
<text v-else>参赛作品展示</text>
</view> </view>
<view class="worksPart" v-if="workList.length > 0"> <view class="worksPart" v-if="workList.length > 0">
<view class="workItems" v-for="(v,i) in workList" :key="i" @click="goWorkDetail(v.id)"> <view class="workItems" v-for="(v,i) in workList" :key="i" @click="goWorkDetail(v.id)">
<view class="sort" v-if="data.status == 2"> <view class="sort" v-if="data.status == 2">
<text>NO.<text style="font-size: 32rpx;">{{ i+1 }}</text></text> <text>{{ v.awards }}</text>
<text>{{ v.averageScore }}</text> <text>{{ v.averageScore }}</text>
</view> </view>
<view class="workImg"> <view class="workImg">

View File

@ -53,11 +53,11 @@
<view style="width: 640rpx;"> <view style="width: 640rpx;">
<view style="padding: 32rpx;"> <view style="padding: 32rpx;">
<view style="font-size: 36rpx; font-weight: 800;"> <view style="font-size: 36rpx; font-weight: 800;">
请打分 请打分(满分100)
</view> </view>
</view> </view>
<view style="margin: 0 32rpx 32rpx;"> <view style="margin: 0 32rpx 32rpx;">
<u--input type="number" placeholder="请输入分数" border="surround" v-model="value" @input="changeNum" maxlength="2"></u--input> <u--input type="number" placeholder="请输入分数" border="surround" v-model="value" @input="changeNum" maxlength="3"></u--input>
</view> </view>
<view <view
style="display: flex; border-top:2rpx solid #E7E7E7;height: 112rpx;width: 640rpx;line-height: 112rpx; font-size: 32rpx;font-weight: 600;"> style="display: flex; border-top:2rpx solid #E7E7E7;height: 112rpx;width: 640rpx;line-height: 112rpx; font-size: 32rpx;font-weight: 600;">
@ -165,8 +165,8 @@
}, },
changeNum(value) { changeNum(value) {
let aaa = Number(value) let aaa = Number(value)
if(aaa > 10){ if(aaa > 100){
this.value = '10' this.value = '100'
} }
} }
}, },

View File

@ -105,10 +105,10 @@
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('住宅电话',userInfoObj.hometTel)"> <view class="person_itm_sign" @click="goChangeInfo('住宅电话',userInfoObj.homeTel)">
<text class="person_itm_sign_tit">住宅电话</text> <text class="person_itm_sign_tit">住宅电话</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text v-if="userInfoObj.hometTel"> {{userInfoObj.hometTel}}</text> <text v-if="userInfoObj.homeTel"> {{userInfoObj.homeTel}}</text>
<text v-else></text> <text v-else></text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>

View File

@ -172,7 +172,7 @@
'密码': 'password', '密码': 'password',
'学历': 'education', '学历': 'education',
'兴趣爱好': 'hobby', '兴趣爱好': 'hobby',
'住宅电话': 'hometTel', '住宅电话': 'homeTel',
'办公室电话': 'officeTel', '办公室电话': 'officeTel',
'单位名称': 'unitName', '单位名称': 'unitName',
'通讯地址': 'mailAddress', '通讯地址': 'mailAddress',
@ -653,13 +653,13 @@
if (this.Edkey == '是否已入协会') { if (this.Edkey == '是否已入协会') {
this.isSubmit = true this.isSubmit = true
} else { } else {
if (n) { // if (n) {
console.log("n",n); // console.log("n",n);
this.isSubmit = true // this.isSubmit = true
}else{ // }else{
uni.$u.toast('值不能为空') // uni.$u.toast('')
this.isSubmit = false // this.isSubmit = false
} // }
} }
} }
}, },

View File

@ -16,12 +16,12 @@
<u-swiper :list="list" indicator indicatorMode="dot" circular height="240"></u-swiper> <u-swiper :list="list" indicator indicatorMode="dot" circular height="240"></u-swiper>
<view class="layout"> <view class="layout">
<!-- 文创展厅(功能不明先隐藏) --> <!-- 文创展厅(功能不明先隐藏) -->
<!-- <view class="activityColumn"> <view class="activityColumn">
<view class="banEle"> <view class="banEle">
<view class="title"> <view class="title">
文创展厅 文创展厅
</view> </view>
<text class="more"> <text class="more" @click="GoWorksShow(index)">
更多 更多
</text> </text>
</view> </view>
@ -29,13 +29,13 @@
<view class="scroll-list"> <view class="scroll-list">
<view class="scroll-list__goods-item" v-for="(item, index) in list2" :key="index" <view class="scroll-list__goods-item" v-for="(item, index) in list2" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']" :class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']"
@click="GoWorksShow(index)"> @click="GoWorksDetail(item.id)">
<image class="scroll-list__goods-item__image" :src="item.image"></image> <image class="scroll-list__goods-item__image" :src="item.image"></image>
<view class="scroll-list__goods-item__view overEllipsis">{{ item.title }}</view> <view class="scroll-list__goods-item__view overEllipsis">{{ item.name }}</view>
</view> </view>
</view> </view>
</u-scroll-list> </u-scroll-list>
</view> --> </view>
<view class="activityColumn"> <view class="activityColumn">
<view class="banEle"> <view class="banEle">
<view class="title"> <view class="title">
@ -132,8 +132,8 @@
item.picture = picArr[0] item.picture = picArr[0]
}) })
this.jianAct = res.data.records this.jianAct = res.data.records
// this.getZTData() this.getZTData()
this.load = false // this.load = false
} }
}).catch(e => { }).catch(e => {
uni.showToast({ uni.showToast({
@ -145,16 +145,10 @@
// //
getZTData() { getZTData() {
let _this = this let _this = this
this.http.request('/silhouette/worksList', {}, "GET").then(res => { this.http.request('/culturalCreativity/list', {}, "GET").then(res => {
if (res.code == 200) { if (res.code == 200) {
// res.data.records.forEach(function(item){ this.list2 = res.data.records.splice(0,3)
// let picArr = item.picture.split(',')
// item.picture = picArr[0]
// })
// this.jianAct = res.data.records
this.load = false this.load = false
console.log(res.data)
} }
}).catch(e => { }).catch(e => {
uni.showToast({ uni.showToast({
@ -174,11 +168,16 @@
page: this.pages, page: this.pages,
size: this.size size: this.size
}, "GET").then(res => { }, "GET").then(res => {
if(res.data.records.length > 0){
res.data.records.forEach(function(item){ res.data.records.forEach(function(item){
let picArr = item.picture.split(',') let picArr = item.picture.split(',')
item.picture = picArr[0] item.picture = picArr[0]
this.jianAct.push(item) this.jianAct.push(item)
}) })
}else{
this.pages--
}
setTimeout(() => { setTimeout(() => {
// //
// requestStatus // requestStatus
@ -194,9 +193,14 @@
back() { back() {
uni.navigateBack() uni.navigateBack()
}, },
GoWorksShow(id) { GoWorksShow() {
uni.navigateTo({ uni.navigateTo({
url: "/pagesC/AwardWinningWork/AwardWinningWork?id=" + String(id) url: "/pagesC/AwardWinningWork/AwardWinningWork"
})
},
GoWorksDetail(id) {
uni.navigateTo({
url: "/pagesC/AwardWinningWork/AwardDetail?id=" + String(id)
}) })
} }
}, },

View File

@ -0,0 +1,203 @@
<template>
<view style="height: 100%;width: 100%;">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="workDetail" v-if="load == false">
<u-swiper :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="300px">
<view slot="indicator" class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
</view>
</u-swiper>
<!-- 封面图片 -->
<!-- <view style="width: 100%;">
<image style="width: 100%;" :src="cover" mode="widthFix"></image>
</view> -->
<view class="work_name">
<!-- 作品名称自由生活向美而生作品 -->
{{actDetObj.name}}
</view>
<view class="work_det">
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/time.png" class="img"></image>
</view>
<view class="box_right">
<!-- 昨天10:20 -->
{{actDetObj.releaseTime}}
</view>
</view>
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/seen.png" class="img"></image>
</view>
<view class="box_right">
{{actDetObj.views}}浏览
<!-- 1288浏览 -->
</view>
</view>
</view>
<view class="work_desc">
<u-parse :content="actDetObj.content"></u-parse>
</view>
<!-- <image v-if="list.length > 0" v-for="item in list" :src="item" mode="widthFix" alt="" class="decTmgs"></image> -->
</view>
</view>
</template>
<script>
export default {
data() {
return {
load: true,
list: [],
currentNum: 0,
actDetObj: {},
ActId:'',
cover: ''
}
},
onShow() {
this.getData()
},onLoad(opt) {
this.ActId=opt.id
},
methods: {
getData() {
this.http.request('/culturalCreativity/details', {
id: this.ActId
}, "GET").then(res => {
if (res.code == 200) {
this.actDetObj = res.data
this.list = res.data.image.split(',')
// if(this.list.length > 0){
// this.cover = this.list[0]
// this.list.splice(0,1)
// }
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
}
</script>
<style lang="scss">
.workDetail {
position: relative;
width: 100%;
height: 100%;
.indicator-num {
padding: 2px 0;
background-color: rgba(0, 0, 0, 0.35);
border-radius: 100px;
width: 35px;
@include flex;
justify-content: center;
&__text {
color: #FFFFFF;
font-size: 12px;
}
}
.coverImg{
width: 100%;
}
.decTmgs{
width: 94%;
margin: 10px 3%;
}
.work_name {
width: 94%;
margin: 10px 3%;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #251B1D;
}
.work_desc {
width: 94%;
margin: 10px 3%;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #251B1D;
}
.work_det {
width: 94%;
margin: 10px 3%;
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #AFADB0;
line-height: 17px;
overflow: hidden;
.det_box {
float: left;
margin-right: 20px;
overflow: hidden;
.box_left {
width: 16px;
height: 16px;
float: left;
.img {
width: 100%;
height: 100%;
}
}
.box_right {
margin-left: 2px;
float: left;
}
}
}
.detailBottom {
position: absolute;
width: 100%;
bottom: 10px;
.bottom_box {
width: 31%;
margin: 0 1%;
padding: 15px 0;
float: left;
.bottom_box_left {
margin-left: 30%;
float: left;
.bot_img {
height: 24px;
width: 24px;
}
}
.bottom_box_right {
float: left;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #251B1D;
line-height: 24px;
margin-left: 5px;
}
}
}
}
</style>

View File

@ -3,16 +3,11 @@
<view class="reward_itm" v-for="(v,i) in fightVirusList" :key="i"> <view class="reward_itm" v-for="(v,i) in fightVirusList" :key="i">
<view class="reward_top"> <view class="reward_top">
<image class="reward_work_img" :src="v.workImgUrl" mode=""> <image class="reward_work_img" :src="v.image" mode="">
</image> </image>
</view> </view>
<view class="reward_bottm"> <view class="reward_bottm">
<text class="rewardWorkTitle">{{v.workTitle}}</text> <text class="rewardWorkTitle">{{v.name}}</text>
<view class="avator_box">
<image class="avator_img_small" :src="v.avatorUrl" mode="">
</image>
<text class="autor_name">{{v.author}}</text>
</view>
</view> </view>
</view> </view>
@ -23,6 +18,10 @@
export default { export default {
data() { data() {
return { return {
pages: 1,
size: 20,
//
requestStatus: false,
fightVirusList: [{ fightVirusList: [{
id: 1, id: 1,
author: "谢万里", author: "谢万里",
@ -56,9 +55,73 @@
] ]
}; };
}, },
onLoad(opt) { onLoad() {
console.log(opt.id); this.getData()
this.pages = 1
},
//
onPullDownRefresh() {
this.pages = 1
this.getData()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//
onReachBottom() {
this.pages++
this.getMoreData();
},
methods: {
//
getData() {
let _this = this
this.http.request('/culturalCreativity/list', {
page: this.pages,
size: this.size
}, "GET").then(res => {
if (res.code == 200) {
this.fightVirusList = res.data.records
this.load = false
} }
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getMoreData() {
if (this.requestStatus) {
// return
return false;
}
this.requestStatus = true;
this.http.request('/culturalCreativity/list', {
page: this.pages,
size: this.size
}, "GET").then(res => {
if(res.data.records.length > 0){
res.data.records.forEach(function(item){
this.fightVirusList.push(item)
})
}else{
this.pages--
}
setTimeout(() => {
//
// requestStatus
this.requestStatus = false;
}, 500);
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
},
} }
</script> </script>

View File

@ -9,7 +9,8 @@
返回 返回
</view> </view>
<u-search height=42 margin="12px 0" searchIconColor="black" bgColor="#f8f8f8" searchIconSize="40rpx" <u-search height=42 margin="12px 0" searchIconColor="black" bgColor="#f8f8f8" searchIconSize="40rpx"
shape="square" :showAction="false" v-model="dataVal" placeholder="请输入资料名称"></u-search> @search="searchList" @change="searchList" shape="square" :showAction="false" v-model="dataVal"
placeholder="请输入资料名称"></u-search>
<view class="car_box " @click="isSelect=false" v-if="isWlAdmin"> <view class="car_box " @click="isSelect=false" v-if="isWlAdmin">
<view class="dd" v-if="isSelect"> <view class="dd" v-if="isSelect">
<image src="../../static/DataSearch/chexboxs.png" mode=""></image> <image src="../../static/DataSearch/chexboxs.png" mode=""></image>
@ -25,11 +26,12 @@
</view> </view>
</view> </view>
</view> </view>
<checkbox-group @change="changeCheckbox">
<view class="itm" v-for="(v,i) in folderList" :key="i"> <view class="itm" v-for="(v,i) in folderList" :key="i">
<view class="fileImg"> <view class="fileImg">
<image src="../../static/DataSearch/Floder.png" mode=""></image> <image src="../../static/DataSearch/Floder.png" mode=""></image>
</view> </view>
<view class="data_detail_box" @click="GofileDetail(v.id)"> <view class="data_detail_box" @click="GofileDetail(v.id)" v-if="v.accessRights">
<view class="file_title"> <view class="file_title">
{{ v.name }} {{ v.name }}
</view> </view>
@ -37,20 +39,33 @@
{{ v.createdAt }} {{ v.createdAt }}
</view> </view>
</view> </view>
<view class="moreImg" @click="clickDot(v.id)" style="position: relative;" v-if="isWlAdmin"> <view class="data_detail_box" @click="noPermission()" v-else>
<view class="file_title">
{{ v.name }}
</view>
<view class="file_time">
{{ v.createdAt }}
</view>
</view>
<view class="moreImg" @click="clickDot(v.id)" v-if="isSelect && isWlAdmin">
<image src="../../static/DataSearch/moreFCUN.png" mode=""></image> <image src="../../static/DataSearch/moreFCUN.png" mode=""></image>
</view> </view>
<view class="moreImg" style="width: 32rpx;height: 32rpx;" v-if="!isSelect && isWlAdmin">
<label class="wr">
<checkbox :value="v.id" :checked="checkedArr.includes(v.id)" />
</label>
</view>
</view> </view>
<checkbox-group @change="changeCheckbox">
<view class="itm" v-for="(item,index) in checkboxData" :key="item.id"> <view class="itm" v-for="(item,index) in checkboxData" :key="item.id">
<view class="fileImg" @click="previewImage(item)"> <view class="fileImg" @click="previewImage(item)" v-if="item.accessRights">
<image :src="item.url" mode="" v-if="item.type == 'photo'"></image> <image :src="item.url" mode="" v-if="item.type == 'photo'"></image>
<image src="../../static/DataSearch/TxtImg.png" mode="" v-else-if="item.type == 'txt'"></image>
<image src="../../static/DataSearch/musicImg.png" mode="" v-else-if="item.type == 'music'">
</image>
<image src="../../static/DataSearch/other.png" mode="" v-else></image> <image src="../../static/DataSearch/other.png" mode="" v-else></image>
</view> </view>
<view class="data_detail_box" @click="previewImage(item)"> <view class="fileImg" @click="noPermission()" v-else>
<image :src="item.url" mode="" v-if="item.type == 'photo'"></image>
<image src="../../static/DataSearch/other.png" mode="" v-else></image>
</view>
<view class="data_detail_box" @click="previewImage(item)" v-if="item.accessRights">
<view class="file_title"> <view class="file_title">
<!-- 资料查找 --> <!-- 资料查找 -->
{{ item.name }} {{ item.name }}
@ -59,8 +74,17 @@
{{ item.createdAt }} {{ item.createdAt }}
</view> </view>
</view> </view>
<view class="moreImg" v-if="isSelect && isWlAdmin" @click="delFile(item.id)"> <view class="data_detail_box" @click="noPermission()" v-else>
<image src="../../static/DataSearch/dirDel.png" mode=""></image> <view class="file_title">
<!-- 资料查找 -->
{{ item.name }}
</view>
<view class="file_time">
{{ item.createdAt }}
</view>
</view>
<view class="moreImg" v-if="isSelect && isWlAdmin" @click="clickDot(item.id)">
<image src="../../static/DataSearch/moreFCUN.png" mode=""></image>
</view> </view>
<view class="moreImg" style="width: 32rpx;height: 32rpx;" v-if="!isSelect && isWlAdmin"> <view class="moreImg" style="width: 32rpx;height: 32rpx;" v-if="!isSelect && isWlAdmin">
<label class="wr"> <label class="wr">
@ -73,16 +97,25 @@
<image src="../../static/orderHall/addOrder.png" mode=""></image> <image src="../../static/orderHall/addOrder.png" mode=""></image>
</view> </view>
<!-- 底部对文件的操作栏 --> <!-- 底部对文件的操作栏 -->
<view class="bottom_tab" v-if="!isSelect"> <view style="width: 100%; height: 170rpx;" v-if="!isSelect || delOne"></view>
<view class="bottom_tab" v-if="!isSelect || delOne">
<view class="bottom_yx"> <view class="bottom_yx">
<!-- <view class="bottom_tab_itm" @click="downLoadAll()"> <view class="bottom_tab_itm" @click="toEdit()" v-if="checkedArr.length == 1">
<view class="bottom_tab_itm_img"> <view class="bottom_tab_itm_img">
<image src="../../static/DataSearch/dowmSelected.png" mode=""></image> <image src="../../static/DataSearch/dirEdit.png" mode=""></image>
</view> </view>
<view class="bottom_tab_itm_txt"> <view class="bottom_tab_itm_txt">
下载 编辑
</view>
</view>
<view class="bottom_tab_itm" v-else>
<view class="bottom_tab_itm_img">
<image src="../../static/DataSearch/dirEdit.png" mode=""></image>
</view>
<view class="bottom_tab_itm_txt" style="color: #b5b5b5;">
编辑
</view>
</view> </view>
</view> -->
<view class="bottom_tab_itm" @click="delAll()"> <view class="bottom_tab_itm" @click="delAll()">
<view class="bottom_tab_itm_img"> <view class="bottom_tab_itm_img">
<image src="../../static/DataSearch/Deletselected.png" mode=""></image> <image src="../../static/DataSearch/Deletselected.png" mode=""></image>
@ -157,11 +190,23 @@
parentId: '', parentId: '',
oldID: [], oldID: [],
isWlAdmin: true, isWlAdmin: true,
isWx: true,
delOne: false,
}; };
}, },
// onLoad() { // onLoad() {
// this.getList() // this.getList()
// }, // },
onReady() {
// #ifdef MP-WEIXIN
this.isWx = true
// #endif
// #ifndef MP-WEIXIN
//
this.isWx = false
// #endif
},
onShow() { onShow() {
this.isWlAdmin = uni.getStorageSync('isWlAdmin'); this.isWlAdmin = uni.getStorageSync('isWlAdmin');
this.folderList = [] this.folderList = []
@ -179,6 +224,11 @@
this.checkboxData = [] this.checkboxData = []
this.load = false this.load = false
this.showDir = false this.showDir = false
uni.showToast({
icon: 'success',
title: '删除成功',
duration: 2000
})
this.getList() this.getList()
} }
}).catch(e => { }).catch(e => {
@ -188,24 +238,26 @@
}); });
}) })
}, },
clickDot(num) { toEdit() {
this.dotNum = num let id = this.checkedArr[0]
this.delDir() this.folderList.forEach(item => {
// this.showDir = true if(item.id == id){
}, uni.navigateTo({
delFile(index) { url: "/pagesC/DataSearch/addNew?editId=" + id
this.dotNum = index })
this.showModel = true
},
selectClick(index) {
if (index.name == '编辑文件夹') {
} else {
this.delDir()
} }
})
this.checkboxData.forEach(ele => {
if(ele.id == id){
uni.navigateTo({
url: "/pagesC/DataSearch/upload?editId=" + id
})
}
})
}, },
delDir() { clickDot(num) {
this.showModel = true this.isSelect = false
this.checkedArr.push(num)
}, },
moreSelected() { moreSelected() {
this.allSelect = !this.allSelect this.allSelect = !this.allSelect
@ -213,8 +265,9 @@
// //
changeCheckbox(e) { changeCheckbox(e) {
this.checkedArr = e.detail.value; this.checkedArr = e.detail.value;
let len = this.checkboxData.length + this.folderList.length
// //
if (this.checkedArr.length > 0 && this.checkedArr.length == this.checkboxData.length) { if (this.checkedArr.length > 0 && this.checkedArr.length == len) {
this.allChecked = true; this.allChecked = true;
} else { } else {
this.allChecked = false; this.allChecked = false;
@ -226,6 +279,12 @@
// //
if (chooseItem[0] == 'all') { if (chooseItem[0] == 'all') {
this.allChecked = true; this.allChecked = true;
for (let item of this.folderList) {
let itemVal = item.id;
if (!this.checkedArr.includes(itemVal)) {
this.checkedArr.push(itemVal);
}
}
for (let item of this.checkboxData) { for (let item of this.checkboxData) {
let itemVal = item.id; let itemVal = item.id;
if (!this.checkedArr.includes(itemVal)) { if (!this.checkedArr.includes(itemVal)) {
@ -238,52 +297,22 @@
this.checkedArr = []; this.checkedArr = [];
} }
}, },
//
// outList() {
// let urlPath = http.config.baseUrl + '/activityUser/sign_export/' + this.activityId + '/' + this.type
// const token = uni.getStorageSync('token')
// if (this.isWx) {
// wx.downloadFile({
// url: urlPath, //
// header: {
// 'Authorization': "Bearer " + token,
// 'x-token': token
// },
// success(res) {
// // success
// if (res.statusCode === 200) {
// const filePath = res.tempFilePath;
// wx.openDocument({
// filePath: filePath,
// showMenu: true,
// success: function(res) {
// console.log(res, '');
// }
// });
// }
// }
// })
// } else {
// window.location.href = urlPath
// }
// }
delAll() { delAll() {
this.dotNum = this.checkedArr.join(',') this.dotNum = this.checkedArr.join(',')
this.confirmModel() this.showModel = true
}, },
GofileDetail(id) { GofileDetail(id) {
this.oldID.push(this.parentId) this.oldID.push(this.parentId)
console.log(this.oldID)
this.parentId = id this.parentId = id
this.dirIds = id this.dirIds = id
this.folderList = [] this.folderList = []
this.checkboxData = [] this.checkboxData = []
this.getList() this.getList()
}, },
backTo(){ backTo() {
this.parentId = this.oldID.slice(-1).join(',') this.parentId = this.oldID.slice(-1).join(',')
this.dirIds = this.oldID.slice(-1).join(',') this.dirIds = this.oldID.slice(-1).join(',')
this.oldID.splice(-1,1) this.oldID.splice(-1, 1)
this.folderList = [] this.folderList = []
this.checkboxData = [] this.checkboxData = []
@ -300,6 +329,12 @@
}) })
} }
}, },
searchList() {
this.folderList = []
this.checkboxData = []
this.getList()
},
getList() { getList() {
let that = this let that = this
this.dotNum = [] this.dotNum = []
@ -332,17 +367,46 @@
previewImage(val) { // index 使 (val) previewImage(val) { // index 使 (val)
console.log(val) console.log(val)
let photoList = [] let photoList = []
if(val.type == 'photo'){ if (val.type == 'photo') {
photoList.push(val.url) photoList.push(val.url)
uni.previewImage({ uni.previewImage({
current: 0, // current: 0, //
urls: photoList, // photoList urls: photoList, // photoList
loop:true, // loop: true, //
})
} else {
uni.downloadFile({
url: val.url, //
success(res) {
// success
if (res.statusCode === 200) {
const filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function(res) {
console.log(res, '打开文档成功');
},
fail: (res) => {
uni.showToast({
icon: 'none',
title: '文件打开失败',
duration: 2000
}) })
} }
});
}
}
})
}
},
noPermission(){
uni.showToast({
icon: 'none',
title: '您没有权限浏览此文件',
duration: 2000
})
} }
} }
} }
</script> </script>

View File

@ -1,14 +1,29 @@
<template> <template>
<view style="margin: 0rpx 48rpx;"> <view style="margin: 0rpx 48rpx;">
<view class=""> <view class="">
<u--input placeholder="请输入文件夹名称" clearable v-model="registInfo.name"> <u--input placeholder="请输入文件夹名称" clearable v-model="registInfo.name" :disabled="editDis">
</u--input> </u--input>
</view> </view>
<view @click="showRole=true" style="margin-top: 20rpx;">
<u--input placeholder="请选择查看权限" v-model="role" style="color: #251B1D;"
readonly @click="showRole=true">
<u-icon slot="suffix" name="arrow-right" style="margin-right: 10px;"></u-icon>
</u--input>
</view>
<u-popup :show="showRole" @close="close" closeOnClickOverlay :round="5" customStyle="padding: 16px;">
<u-checkbox-group @change="checkboxChange" v-model="checkboxValue1" :borderBottom="true" placement="column"
iconPlacement="right">
<u-checkbox :customStyle="{marginBottom: '16px' }" v-for="(item, index) in checkboxList1" :key="index"
:label="item.name" labelSize="28rpx" labelColor="#231F1C" :name="item.name" activeColor="#99241B ">
</u-checkbox>
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="showRole=false">确认</u-button>
</u-checkbox-group>
</u-popup>
<view style="margin-top: 80rpx;"> <view style="margin-top: 80rpx;">
<u-button text="确认" size="large" color="#99241B" <u-button text="确认" size="large" color="#99241B"
@click="submitNext"></u-button> @click="submitNext"></u-button>
</view> </view>
</view> </view>
</template> </template>
@ -19,28 +34,58 @@
tips: '', tips: '',
registInfo: { registInfo: {
name: '', name: '',
userRole: 'zyz,wyrc',
parentId: '', parentId: '',
isExtent: '', isExtent: '',
dirIds: '/', dirIds: '/',
} },
checkboxValue1: [],
checkboxList1: [{
name: '文艺工作者',
id: 'wyrc'
}, {
name: '文艺爱好者',
id: 'zyz'
}],
showRole: false,
role: '',
roleList: '',
editId:'',
editDis: false
}; };
}, },
onLoad(op) { onLoad(op) {
if(op.editId){
this.editId = op.editId
this.editDis = true
this.getEdit()
}
else if(op.id){
this.registInfo.parentId = op.id this.registInfo.parentId = op.id
if(op.id){
this.registInfo.dirIds = op.id this.registInfo.dirIds = op.id
}else{ }else{
this.registInfo.parentId = op.id
this.registInfo.dirIds = '/' this.registInfo.dirIds = '/'
} }
}, },
methods: { methods: {
submitNext() { submitNext() {
if(this.editDis){
this.http.request('/information/update',{id:this.editId,userRole:this.roleList}, "GET").then(res => {
if (res.code == 200) {
uni.navigateBack()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}else{
let data = { let data = {
name: this.registInfo.name, name: this.registInfo.name,
userRole: this.registInfo.userRole,
parentId: this.registInfo.parentId, parentId: this.registInfo.parentId,
dirIds: this.registInfo.dirIds, dirIds: this.registInfo.dirIds,
userRole: this.roleList
} }
this.http.request('/information/add', data, "POST").then(res => { this.http.request('/information/add', data, "POST").then(res => {
if (res.code == 200) { if (res.code == 200) {
@ -54,6 +99,53 @@
}) })
} }
}, },
checkboxChange(n) {
console.log('change', n);
let _this = this
this.role = n.join(',')
let arr = []
n.forEach(function(item) {
_this.checkboxList1.forEach(function(ele) {
if (ele.name == item) {
arr.push(ele.id)
}
})
})
this.roleList = arr.join(',')
},
// selectForm1(e) {
// const value = e.detail.value
// console.log(this.radiovalue1)
// },
close() {
this.showRole = false
},
getEdit() {
this.http.request('/information/detail/' + this.editId,{}, "GET").then(res => {
if (res.code == 200) {
let _this = this
this.registInfo.userRole = res.data.userRole
let nff = res.data.userRole.split(',')
let arr = []
nff.forEach(function(item) {
_this.checkboxList1.forEach(function(ele) {
if (ele.id == item) {
arr.push(ele.name)
}
})
})
this.checkboxValue1 = arr
this.role = arr.join(',')
this.registInfo.name = res.data.name
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
} }
</script> </script>

View File

@ -6,17 +6,38 @@
</view> </view>
<view class="form_right"> <view class="form_right">
<u--input placeholder="请输入名称" v-model="name" clearable border="none" inputAlign="right" <u--input placeholder="请输入名称" v-model="name" clearable border="none" inputAlign="right"
style="color: #251B1D;"> style="color: #251B1D;" :disabled="editDis">
</u--input> </u--input>
</view> </view>
</view> </view>
<view class="form_line">
<view class="form_left">
查看权限
</view>
<view class="form_right" @click="showRole=true">
<u--input placeholder="请选择查看权限" v-model="role" border="none" inputAlign="right" style="color: #251B1D;"
readonly>
<u-icon slot="suffix" name="arrow-right" style="margin-right: 10px;"></u-icon>
</u--input>
</view>
</view>
<u-popup :show="showRole" @close="close" closeOnClickOverlay :round="5" customStyle="padding: 16px;">
<u-checkbox-group @change="checkboxChange" v-model="checkboxValue1" :borderBottom="true" placement="column"
iconPlacement="right">
<u-checkbox :customStyle="{marginBottom: '16px' }" v-for="(item, index) in checkboxList1" :key="index"
:label="item.name" labelSize="28rpx" labelColor="#231F1C" :name="item.name" activeColor="#99241B ">
</u-checkbox>
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="showRole=false">确认</u-button>
</u-checkbox-group>
</u-popup>
<view class="form_line"> <view class="form_line">
<view class="form_left"> <view class="form_left">
类型 类型
</view> </view>
<view class="form_right" @click="showType=true"> <view class="form_right" @click="chooseType">
<u--input placeholder="请输入类型" v-model="type" border="none" inputAlign="right" <u--input placeholder="请选择类型" v-model="type" border="none" inputAlign="right" style="color: #251B1D;"
style="color: #251B1D;" readonly> readonly>
<u-icon slot="suffix" name="arrow-right" style="margin-right: 10px;"></u-icon> <u-icon slot="suffix" name="arrow-right" style="margin-right: 10px;"></u-icon>
</u--input> </u--input>
</view> </view>
@ -34,11 +55,11 @@
<view class="gap"> <view class="gap">
文件上传 文件上传
</view> </view>
<u-upload v-if="isWx" class="upload" width="172rpx" height="172rpx" :fileList="fileList3" accept="all" <u-upload v-if="isWx" class="upload" width="172rpx" height="172rpx" :fileList="fileList3" accept="all" :disabled="editDis"
@afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="1"> @afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="1">
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image> <image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload> </u-upload>
<u-upload v-else class="upload" width="172rpx" height="172rpx" :fileList="fileList3" accept="file" <u-upload v-else class="upload" width="172rpx" height="172rpx" :fileList="fileList3" accept="file" :disabled="editDis"
@afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="1"> @afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="1">
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image> <image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload> </u-upload>
@ -62,21 +83,38 @@
radiolist1: [{ radiolist1: [{
name: '图片', name: '图片',
id: 'photo' id: 'photo'
},{ }, {
name: '其他', name: '其他',
id: 'other' id: 'other'
} }],
], checkboxValue1: [],
checkboxList1: [{
name: '文艺工作者',
id: 'wyrc'
}, {
name: '文艺爱好者',
id: 'zyz'
}],
ok: true, ok: true,
isWx: true, isWx: true,
showType: false, showType: false,
type: '' showRole: false,
type: '',
role: '',
roleList: '',
editId:'',
editDis: false
} }
}, },
onLoad(op){ onLoad(op) {
if(op.id){ if(op.editId){
this.editId = op.editId
this.editDis = true
this.getEdit()
}
else if (op.id) {
this.id = op.id this.id = op.id
}else{ } else {
this.id = '/' this.id = '/'
} }
}, },
@ -149,8 +187,20 @@
}) })
}, },
next() { next() {
if(this.editDis){
this.http.request('/information/update',{id:this.editId,userRole:this.roleList}, "GET").then(res => {
if (res.code == 200) {
uni.navigateBack()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}else{
this.ok = true this.ok = true
if(this.name == ''){ if (this.name == '') {
uni.showToast({ uni.showToast({
title: '请输入名称', title: '请输入名称',
icon: "none", icon: "none",
@ -158,15 +208,23 @@
this.ok = false this.ok = false
return return
} }
if(this.type == ''){ if (this.roleList == '') {
uni.showToast({ uni.showToast({
title: '请输入类型', title: '请选择查看权限',
icon: "none", icon: "none",
}); });
this.ok = false this.ok = false
return return
} }
if(this.fileList3.length == 0){ if (this.type == '') {
uni.showToast({
title: '请选择类型',
icon: "none",
});
this.ok = false
return
}
if (this.fileList3.length == 0) {
uni.showToast({ uni.showToast({
title: '请上传文件', title: '请上传文件',
icon: "none", icon: "none",
@ -174,13 +232,14 @@
this.ok = false this.ok = false
return return
} }
if(this.ok){ if (this.ok) {
let image = [] let image = []
this.fileList3.forEach(function(item) { this.fileList3.forEach(function(item) {
image.push(item.url) image.push(item.url)
}) })
let data = image.join(',') let data = image.join(',')
this.http.request('/information/upload?dirIds=' + this.id + '&type=' + this.radiovalue1 + '&name=' + this.name + '&url=' + data , {}, "POST").then(res => { this.http.request('/information/upload?dirIds=' + this.id + '&type=' + this.radiovalue1 + '&name=' +
this.name + '&url=' + data + '&userRole=' + this.roleList, {}, "POST").then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.navigateBack() uni.navigateBack()
} }
@ -191,10 +250,18 @@
}); });
}) })
} }
}
}, },
selectType() { selectType() {
this.$refs.picker.show() this.$refs.picker.show()
}, },
chooseType() {
if(this.editDis){}
else{
this.showType=true
}
},
selectForm1(form) { selectForm1(form) {
let _this = this let _this = this
this.radiolist1.forEach(function(item) { this.radiolist1.forEach(function(item) {
@ -203,14 +270,60 @@
} }
}) })
}, },
checkboxChange(n) {
console.log('change', n);
let _this = this
this.role = n.join(',')
let arr = []
n.forEach(function(item) {
_this.checkboxList1.forEach(function(ele) {
if (ele.name == item) {
arr.push(ele.id)
}
})
})
this.roleList = arr.join(',')
},
// selectForm1(e) { // selectForm1(e) {
// const value = e.detail.value // const value = e.detail.value
// console.log(this.radiovalue1) // console.log(this.radiovalue1)
// }, // },
close() { close() {
this.showRole = false
this.showType = false this.showType = false
}, },
getEdit() {
this.http.request('/information/detail/' + this.editId,{}, "GET").then(res => {
if (res.code == 200) {
let _this = this
this.fileList3.push({url: res.data.url})
this.radiolist1.forEach(function(item) {
if (item.id == res.data.type) {
_this.type = item.name
}
})
this.radiovalue1 = res.data.type
this.roleList = res.data.userRole
let nff = res.data.userRole.split(',')
let arr = []
nff.forEach(function(item) {
_this.checkboxList1.forEach(function(ele) {
if (ele.id == item) {
arr.push(ele.name)
}
})
})
this.checkboxValue1 = arr
this.role = arr.join(',')
this.name = res.data.name
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
} }
} }
</script> </script>
@ -220,13 +333,15 @@
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .uni-icons{ /deep/ .uni-icons {
display: none; display: none;
} }
/deep/ .uni-date-x{
/deep/ .uni-date-x {
text-align: right; text-align: right;
padding: 0; padding: 0;
} }
.form_line { .form_line {
width: 686rpx; width: 686rpx;
padding: 0 32rpx; padding: 0 32rpx;
@ -264,6 +379,7 @@
padding: 10rpx 32rpx; padding: 10rpx 32rpx;
font-size: 32rpx; font-size: 32rpx;
} }
::v-deep .u-upload__wrap { ::v-deep .u-upload__wrap {
padding: 32rpx; padding: 32rpx;
} }

View File

@ -80,6 +80,16 @@
</u--input> --> </u--input> -->
</view> </view>
</view> </view>
<view class="form_line">
<view class="form_left">
下乡地址
</view>
<view class="form_right">
<u--input placeholder="请输入下乡地址" v-model="address" clearable border="none" inputAlign="right"
style="color: #251B1D;">
</u--input>
</view>
</view>
<view class="operation" @click="next"> <view class="operation" @click="next">
发布 发布
</view> </view>
@ -118,14 +128,15 @@
program: [], program: [],
programs: '', programs: '',
programsId: '', programsId: '',
showTypes: false showTypes: false,
address:''
} }
}, },
onShow() { onShow() {
}, },
async onLoad() { async onLoad() {
await this.getCurrentTime() // await this.getCurrentTime()
await this.teamandprogram() await this.teamandprogram()
}, },
methods: { methods: {
@ -225,7 +236,15 @@
} }
if (this.wTime.length < 12) { if (this.wTime.length < 12) {
uni.showToast({ uni.showToast({
title: '请选择活动时间', title: '请选择开始时间',
icon: "none",
});
this.ok = false
return
}
if (this.address == '') {
uni.showToast({
title: '请输入下乡地址',
icon: "none", icon: "none",
}); });
this.ok = false this.ok = false
@ -239,6 +258,7 @@
teamId: this.teamsId, teamId: this.teamsId,
endTime: this.eTime, endTime: this.eTime,
startTime: this.wTime, startTime: this.wTime,
address: this.address,
}, "POST").then(res => { }, "POST").then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.navigateBack() uni.navigateBack()

View File

@ -30,7 +30,7 @@
<view class="item_li"> <view class="item_li">
<view class="standard"> <view class="standard">
<image class="icon" src="../../static/detailIcon/icon8.png" mode="scaleToFill"></image> <image class="icon" src="../../static/detailIcon/icon8.png" mode="scaleToFill"></image>
<text>下乡地址:</text> <text>团队所属:</text>
</view> </view>
<view class="content"><text> {{ data.villageName }}</text></view> <view class="content"><text> {{ data.villageName }}</text></view>
</view> </view>
@ -48,6 +48,13 @@
</view> </view>
<view class="content"> {{ data.endTime }} </view> <view class="content"> {{ data.endTime }} </view>
</view> </view>
<view class="item_li">
<view class="standard">
<image class="icon" src="../../static/detailIcon/icon8.png" mode="scaleToFill"></image>
<text>下乡地址:</text>
</view>
<view class="content"><text> {{ data.address }}</text></view>
</view>
</view> </view>
</view> </view>
<!-- 红色按钮 --> <!-- 红色按钮 -->

View File

@ -5,10 +5,10 @@
export default { export default {
config: { config: {
baseUrl: "http://192.168.2.39:8080/h5/api", //俞燕红-小程序不能配跨域 // baseUrl: "http://192.168.2.39:8080/h5/api", //俞燕红-小程序不能配跨域
// baseUrl: "/pre", //俞燕红-跨域 // baseUrl: "/pre", //俞燕红-跨域
// baseUrl: "https://yxx.ydool.net/h5/api", //线上 // baseUrl: "https://yxx.ydool.net/h5/api", //线上
// baseUrl: "/h5/api", //h5 baseUrl: "/h5/api", //h5
header: { header: {
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
// 'Content-Type':'application/x-www-form-urlencoded' // 'Content-Type':'application/x-www-form-urlencoded'
@ -104,8 +104,8 @@ export default {
}); });
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url: '/pagesC/Login/Login' // url: '/pagesC/Login/Login'
// url: '/pages/pageHome/shwxLogin' url: '/pages/pageHome/shwxLogin'
}) })
}, 1200) }, 1200)