Commit ce7834d5 by 前端

修改

1 parent a1080986
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"author": "chenwq <cwqnn2015@163.com>", "author": "chenwq <cwqnn2015@163.com>",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
"sass-loader": "7.3.1", "sass-loader": "7.3.1",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"md5": "^2.3.0", "md5": "^2.3.0",
"vue": "^2.6.11" "vue": "^2.6.11",
"swiper": "^4.0.0"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^3.0.1", "@vue/cli-plugin-babel": "^3.0.1",
......
...@@ -10,7 +10,6 @@ import '@/styles/index.css' ...@@ -10,7 +10,6 @@ import '@/styles/index.css'
// 组件 // 组件
import '@/components' import '@/components'
import { Util } from './common/util' import { Util } from './common/util'
// import _ from 'lodash' // import _ from 'lodash'
// import axios from 'axios' // import axios from 'axios'
Vue.prototype.btn_size = 'mini' Vue.prototype.btn_size = 'mini'
......
<template>
<div>
<div class="basic-box-right-img">
<!-- 预览 -->
<div class="preview">预览:</div>
<img src="../../../../assets/view.png" alt="" />
<!-- 任务日期 -->
<div class="basic-box-right-date swiper-container" id="swiper">
<div class="swiper-wrapper">
<div
v-for="(item, index) in datebox"
:key="index"
:class="index == dateActive ? 'active-date' : ''"
class="date-item"
@click="clickDate(index)"
>
<div>
<img src="../../../../assets/date-icon.png" alt="" />
</div>
<div class="date-text">
{{ item.activityTime }}
</div>
</div>
</div>
</div>
<!-- 任务列表 -->
<div class="basic-box-right-task">
<div v-if="datebox && datebox[dateActive].missionList.length">
<div
v-for="(itm, inx) in datebox[dateActive].missionList"
:key="inx"
class="task-box"
>
<div class="task-item">
<div class="left">
<div>
<img
v-if="itm.missonType == 1"
src="../../../../assets/register.png"
alt=""
/>
<img
v-if="itm.missonType == 2"
src="../../../../assets/share.png"
alt=""
/>
<img
v-if="itm.missonType == 3"
src="../../../../assets/browser.png"
alt=""
/>
<img
v-if="itm.missonType == 4"
src="../../../../assets/visitor.png"
alt=""
/>
<img
v-if="itm.missonType == 5"
src="../../../../assets/order.png"
alt=""
/>
</div>
<div class="task-message">
<div class="task-title">
<div class="text">{{ itm.missionName }}</div>
<img src="../../../../assets/integral.png" alt="" />
<div class="integral-num">+{{ itm.rewardScore }}积分</div>
</div>
<div class="task-content">{{ itm.missonDesc }}</div>
</div>
</div>
<div class="task-btn">
<img src="../../../../assets/go.png" alt="" />
</div>
</div>
<div class="task-share flex_sac">
<div class="btn flex_cc">
<img class="icon" src="../../../../assets/share1.png" />
<span>分享好友</span>
</div>
<div class="btn flex_cc">
<img class="icon" src="../../../../assets/share2.png" />
<span>发朋友圈</span>
</div>
</div>
</div>
</div>
<div v-else>暂无数据</div>
</div>
<!-- 刷新 -->
<div class="shua">
<img src="../../../../assets/shua.png" alt="" />
刷新
</div>
</div>
</div>
</template>
<script>
import Swiper from 'swiper'
export default {
props: {
dateList: {
type: Array,
default: () => [],
},
},
data() {
return {
datebox: this.dateList,
dateActive: 0,
}
},
mounted() {
let previewSwiper = new Swiper('.swiper-container', {
grabCursor: true,
// spaceBetween: 20,
mousewheel: true,
// slidesPerView: 'auto',
observer: true, //修改swiper自己或子元素时,自动初始化
observeParents: true, //修改swiper的父元素时,自动初始化swiper
breakpoints: {
//当宽度小于等于1919
1440: {
slidesPerView: 4,
spaceBetween: 20,
},
2800: {
slidesPerView: 5,
spaceBetween: 20,
},
},
pagination: {
el: '.swiper-pagination',
type: 'progressbar',
},
})
this.$nextTick(() => {
setTimeout(function () {
previewSwiper.slideTo(0, 0, false)
}, 700)
})
},
watch: {
datebox: {
handler(newVal, oldVa) {
console.log(val, '999999')
},
deep: true,
},
},
methods: {
// 预览选择任务日期
clickDate(index) {
console.log(index)
this.dateActive = index
console.log(dateActive[index])
},
},
}
</script>
<style lang="scss" scoped>
.basic-box-right {
&-img {
position: relative;
img {
width: 257px;
height: 523px;
}
.preview {
position: absolute;
top: 0;
left: -41px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
}
.shua {
position: absolute;
top: 0;
left: 263px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #409eff;
img {
width: 16px;
height: 16px;
vertical-align: middle;
}
}
}
&-date {
position: absolute;
top: 254px;
left: 15px;
// display: flex;
// float: left;
width: 230px;
// cursor: pointer;
// overflow: auto;
text-align: center;
.date-item {
// float: left;
width: 42px;
height: 56px;
margin-left: 6px;
background: #f7f8fa;
border-radius: 6px;
align-items: center;
img {
width: 24px;
height: 24px;
}
}
.date-item:first-child {
margin-left: 0;
}
.active-date {
background-image: linear-gradient(180deg, #fff7db 15%, #fff1e0 87%);
}
.date-text {
font-size: 12px;
}
}
&-task {
position: absolute;
top: 320px;
left: 15px;
.task-box {
border-bottom: 1px solid #f0f1f5;
}
.task-item {
padding: 12px 0;
// padding: 24rpx 0 0 0;
display: flex;
align-items: center;
justify-content: space-between;
.left {
display: flex;
position: relative;
img {
width: 40px;
height: 40px;
margin-right: 10px;
flex-shrink: 0;
}
.task-message {
display: flex;
flex-flow: column;
justify-content: space-around;
.task-title {
font-family: PingFangSC-Medium;
display: flex;
align-items: center;
flex-wrap: nowrap;
font-size: 14px;
font-weight: 500;
color: #1b233d;
word-break: break-all;
img {
width: 14px;
height: 14px;
margin: 0;
flex-shrink: 0;
}
.integral-num {
font-family: PingFangSC-Medium;
flex-shrink: 0;
font-size: 12px;
font-weight: 500;
color: #fe5662;
}
}
.task-content {
font-size: 11px;
word-break: break-all;
color: #9299ad;
width: 150px;
overflow: hidden; /*超过部分不显示*/
text-overflow: ellipsis; /*超过部分用点点表示*/
white-space: nowrap; /*不换行*/
}
}
// .unstart{
// position: absolute;
// left: 0;
// bottom: 0;
// width: 40px;
// height: 40px;
// background: rgba(0, 0, 0, 0.5);
// border-radius: 4px 4px 6px 6px;
// font-weight: 400;
// font-size: 10px;
// color: #FFFFFF;
// }
}
.task-btn {
margin-left: 18px;
display: flex;
align-items: center;
text-align: center;
img {
width: 10px;
height: 10px;
}
}
}
.task-share {
padding: 0 0 8px 0;
.btn {
font-weight: 400;
font-size: 12px;
color: #1b233d;
.icon {
width: 14px;
height: 14px;
margin-right: 4px;
}
}
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
.flex_sac {
display: flex;
align-items: center;
justify-content: space-around;
}
}
}
.swiper-container {
margin-left: auto;
margin-right: auto;
position: relative;
overflow: hidden;
z-index: 1;
}
#swiper {
// padding: 0 20px;
.swiper-wrapper {
margin-bottom: 20px;
.swiper-slide {
// width: 234px;
// .marketItem-border {
// min-height: 251px;
// .peopleName {
// height: 54px;
// line-height: 54px;
// background: #f7f7fc;
// font-size: 16px;
// font-weight: 600;
// padding-left: 16px;
// vertical-align: middle;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
// }
// .itemBox {
// border-left: 1px solid #ededf0;
// border-right: 1px solid #ededf0;
// border-bottom: 1px solid #ededf0;
// padding: 0 16px;
// box-sizing: border-box;
// .peopleNum {
// padding: 24px 0;
// font-size: 26px;
// font-weight: 600;
// color: #333333;
// span {
// font-size: 14px;
// font-weight: 400;
// }
// }
// .peopledesc {
// overflow: hidden;
// text-overflow: ellipsis;
// -webkit-line-clamp: 2;
// display: -webkit-box;
// -webkit-box-orient: vertical;
// word-break: break-all;
// font-size: 14px;
// color: #999999;
// line-height: 20px;
// height: 40px;
// }
// .createSOP {
// margin: 24px 0;
// border-radius: 4px;
// border: 1px solid #5850ff;
// width: 100%;
// color: #5850ff;
// padding: 9px 20px;
// }
// .isDisableSOP {
// color: #c0bcff;
// border: 1px solid #c0bcff;
// }
// }
// }
}
}
}
</style>
<template> <template>
<div class="task-box"> <div class="task-box">
<div id="app"></div>
<div class="task-content"> <div class="task-content">
<div class="task-title">基础信息</div> <div class="task-title">基础信息</div>
<div class="basic-box">
<div class="basic-box-left">
<!-- 基础信息表单 --> <!-- 基础信息表单 -->
<el-form <el-form
:model="basicForm" :model="basicForm"
...@@ -80,6 +81,11 @@ ...@@ -80,6 +81,11 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
<div class="basic-box-right">
<Preview :dateList="dateList"></Preview>
</div>
</div>
<template v-if="basicForm.activityName || isClone || isEditor"> <template v-if="basicForm.activityName || isClone || isEditor">
<div class="title-box"> <div class="title-box">
<span class="task-title">任务计划</span> <span class="task-title">任务计划</span>
...@@ -386,11 +392,13 @@ import { commonApi } from '../../../api/commonApi' ...@@ -386,11 +392,13 @@ import { commonApi } from '../../../api/commonApi'
import { taskApi } from '../../../api/task' import { taskApi } from '../../../api/task'
import ActivityDia from './components/activityDia.vue' import ActivityDia from './components/activityDia.vue'
import ActivityDate from './components/activityDate.vue' import ActivityDate from './components/activityDate.vue'
import Preview from './components/preView.vue'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
export default { export default {
components: { components: {
ActivityDia, ActivityDia,
ActivityDate, ActivityDate,
Preview,
}, },
data() { data() {
// 奖励积分校验规则 // 奖励积分校验规则
...@@ -444,6 +452,60 @@ export default { ...@@ -444,6 +452,60 @@ export default {
// 活动状态 // 活动状态
activityStatus: '', activityStatus: '',
addTabList: [], addTabList: [],
// dateList: [],
dateList: [
{
activityTime: '2022-11-24',
missionList: [
{
missonType: 1,
missionName: 'fdgsdg',
missonDesc: '大发噶地df方很多地方部分',
rewardScore: 4,
},
{
missonType: 2,
missionName: 'fdgsdg',
missonDesc: '大发噶地方很多地方部分',
rewardScore: 8,
},
{
missonType: 3,
missionName: 'fdgsdg',
missonDesc: '大发噶地方很多地方部分',
rewardScore: 8,
},
{
missonType: 4,
missionName: 'fdgsdg',
missonDesc: '大发噶地方很多地方部分',
rewardScore: 8,
},
{
missonType: 5,
missionName: 'fdgsdg',
missonDesc: '大发噶地方很多地方部分',
rewardScore: 8,
},
],
},
{
activityTime: '2022-11-26',
missionList: [],
},
{
activityTime: '2022-11-27',
missionList: [],
},
{
activityTime: '2022-11-28',
missionList: [],
},
{
activityTime: '2022-11-29',
missionList: [],
},
],
btnList: [ btnList: [
{ {
name: '表情', name: '表情',
...@@ -1329,6 +1391,15 @@ export default { ...@@ -1329,6 +1391,15 @@ export default {
color: rgb(51, 51, 51); color: rgb(51, 51, 51);
line-height: 16px; line-height: 16px;
} }
.basic-box {
display: flex;
&-left {
width: 60%;
}
&-right {
width: 40%;
}
}
.task-modify-text { .task-modify-text {
font-size: 14px; font-size: 14px;
color: #409eff; color: #409eff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!