每日宣发
This commit is contained in:
@@ -10,82 +10,25 @@
|
||||
</div>
|
||||
<div class="threeDays">
|
||||
<div class="yesterday">
|
||||
<div class="itemYesterday">
|
||||
昨天<span>{{ nowMonth }}.{{ nowDate - 1 }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
calendarList &&
|
||||
calendarList[nowDate - 1] &&
|
||||
calendarList[nowDate - 1].taskList.length > 0
|
||||
"
|
||||
>
|
||||
晴风小区志愿者活动
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
!(
|
||||
calendarList &&
|
||||
calendarList[nowDate - 1] &&
|
||||
calendarList[nowDate - 1].taskList.length > 0
|
||||
)
|
||||
"
|
||||
>
|
||||
今日暂无宣发任务
|
||||
</div>
|
||||
<div class="itemYesterday">昨天<span>{{ nowMonth }}.{{ nowDate - 1 }}</span></div>
|
||||
<div v-if="calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0 && calendarList[nowDate - 1].taskList.length <= 2">晴风小区志愿者活动</div>
|
||||
<div v-if="calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0 && calendarList[nowDate - 1].taskList.length > 2">晴风小区志愿者活动</div>
|
||||
<div v-if="!(calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0)">今日暂无宣发任务</div>
|
||||
<div class="isShow" v-if="calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0 && calendarList[nowDate - 1].taskList.length > 2" @click="showMore()">{{ isShow ? "收起" : "展开" }}</div>
|
||||
</div>
|
||||
<div class="today">
|
||||
<div class="itemToday">
|
||||
今天<span>{{ nowMonth }}.{{ nowDate }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
calendarList &&
|
||||
calendarList[nowDate - 1] &&
|
||||
calendarList[nowDate - 1].taskList.length > 0
|
||||
"
|
||||
>
|
||||
晴风小区志愿者活动
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
!(
|
||||
calendarList &&
|
||||
calendarList[nowDate - 1] &&
|
||||
calendarList[nowDate - 1].taskList.length > 0
|
||||
)
|
||||
"
|
||||
>
|
||||
今日暂无宣发任务
|
||||
</div>
|
||||
<div class="itemToday">今天<span>{{ nowMonth }}.{{ nowDate }}</span></div>
|
||||
<div v-if="calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0 && calendarList[nowDate - 1].taskList.length <=2">晴风小区志愿者活动</div>
|
||||
<div v-if="calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0 && calendarList[nowDate - 1].taskList.length > 2">晴风小区志愿者活动</div>
|
||||
<div v-if="!(calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0)">今日暂无宣发任务</div>
|
||||
<div class="isShow" v-if="calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0 && calendarList[nowDate - 1].taskList.length > 2" @click="showMore()">{{ isShow ? "收起" : "展开" }}</div>
|
||||
</div>
|
||||
<div class="tomorrow">
|
||||
<div class="itemTomorrow">
|
||||
明天<span>{{ nowMonth }}.{{ nowDate + 1 }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
calendarList &&
|
||||
calendarList[nowDate - 1] &&
|
||||
calendarList[nowDate - 1].taskList.length > 0
|
||||
"
|
||||
>
|
||||
晴风小区志愿者活动
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
!(
|
||||
calendarList &&
|
||||
calendarList[nowDate - 1] &&
|
||||
calendarList[nowDate - 1].taskList.length > 0
|
||||
)
|
||||
"
|
||||
>
|
||||
今日暂无宣发任务
|
||||
</div>
|
||||
<div class="isShow" @click="showMore()">
|
||||
{{ isShow ? "收起" : "展开" }}
|
||||
</div>
|
||||
<div class="itemTomorrow">明天<span>{{ nowMonth }}.{{ nowDate + 1 }}</span></div>
|
||||
<div v-if="calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0 && calendarList[nowDate - 1].taskList.length <= 2">晴风小区志愿者活动 </div>
|
||||
<div v-if="calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0 && calendarList[nowDate - 1].taskList.length > 2">晴风小区志愿者活动 </div>
|
||||
<div v-if="!(calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0)"> 今日暂无宣发任务</div>
|
||||
<div class="isShow" v-if="calendarList && calendarList[nowDate - 1] && calendarList[nowDate - 1].taskList.length > 0 && calendarList[nowDate - 1].taskList.length > 2" @click="showMore()">{{ isShow ? "收起" : "展开" }}</div>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -437,7 +380,6 @@ export default {
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
id: "dataZoomX",
|
||||
type: "slider",
|
||||
xAxisIndex: [0],
|
||||
filterMode: "filter",
|
||||
@@ -495,7 +437,6 @@ export default {
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
id: "dataZoomX",
|
||||
type: "slider",
|
||||
xAxisIndex: [0],
|
||||
filterMode: "filter",
|
||||
@@ -553,7 +494,6 @@ export default {
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
id: "dataZoomX",
|
||||
type: "slider",
|
||||
xAxisIndex: [0],
|
||||
filterMode: "filter",
|
||||
@@ -613,6 +553,13 @@ export default {
|
||||
document.getElementById("columnarEcharts")
|
||||
);
|
||||
this.columnarEcharts.setOption({
|
||||
dataZoom: [
|
||||
{
|
||||
type: "slider",
|
||||
xAxisIndex: [0],
|
||||
filterMode: "filter",
|
||||
},
|
||||
],
|
||||
xAxis: {
|
||||
type: "category",
|
||||
axisTick: {
|
||||
|
||||
@@ -3,22 +3,23 @@
|
||||
<uni-calendar :insert="true" :selected="selected" :lunar="false" @change="change" @monthSwitch="changeMonth"/>
|
||||
|
||||
<div class="dailyMatters">
|
||||
<div v-if="list && list.length">
|
||||
<div>
|
||||
<div v-for="(item, index) in list.slice(0,3)" :key="index" :class="{'color1':index%4==0,'color2':index%4==1,'color3':index%4==2,'color4':index%4==3}" class="daily_item">
|
||||
<div>{{ item.time }}</div>
|
||||
<div>{{ item.info }}</div>
|
||||
<div v-for="(item, index) in list.slice(0,2)" :key="index" :class="{'color1':index%4==0,'color2':index%4==1,'color3':index%4==2,'color4':index%4==3}" class="daily_item">
|
||||
<div>{{ item.createTime.substring(10, 16) }}</div>
|
||||
<div>{{ item.taskTitle }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div v-for="(item, index) in list" :key="index"
|
||||
:class="{'color1': index % 4 == 0,'color2': index % 4 == 1,'color3': index % 4 == 2,'color4': index % 4 == 3 }"
|
||||
class="daily_item">
|
||||
<div>{{ item.time }}</div>
|
||||
<div>{{ item.info }}</div>
|
||||
<div v-show="show">
|
||||
<div v-for="(item, index) in list.slice(0,list.length - 2)" :key="index"
|
||||
:class="{'color1': index % 4 == 2,'color2': index % 4 == 3,'color3': index % 4 == 0,'color4': index % 4 == 1 }" class="daily_item">
|
||||
<div>{{ item.createTime.substring(10, 16) }}</div>
|
||||
<div>{{ item.taskTitle }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="readMore" @click="toGroup">查看更多</div>
|
||||
<div class="readMore" v-show="!show && list.length > 2" @click="show = true">查看更多</div>
|
||||
</div>
|
||||
<AiEmpty description="暂无宣发" v-else></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -30,10 +31,8 @@ export default {
|
||||
return {
|
||||
date: '',
|
||||
selected: [],
|
||||
list: [{
|
||||
time: '11:00',
|
||||
info: '晴风小区志愿者活动'
|
||||
}],
|
||||
list: [],
|
||||
show: false,
|
||||
calendarList: {},
|
||||
year: '',
|
||||
month: '',
|
||||
@@ -47,7 +46,6 @@ export default {
|
||||
created() {
|
||||
this.getNowDay()
|
||||
this.getData()
|
||||
|
||||
},
|
||||
methods: {
|
||||
changeMonth(e) {
|
||||
@@ -59,7 +57,9 @@ export default {
|
||||
this.getData()
|
||||
},
|
||||
change(val) {
|
||||
this.date = `${val.year} + '-' + ${val.month} + '-' + ${val.day}`
|
||||
this.date = val.fulldate
|
||||
this.day = val.date
|
||||
this.getData()
|
||||
},
|
||||
getNowDay() {
|
||||
const date = new Date()
|
||||
@@ -79,6 +79,7 @@ export default {
|
||||
if (res?.data) {
|
||||
this.calendarList = res.data;
|
||||
let arr = Object.keys(res.data).map(key => (res.data[key]))
|
||||
this.list = arr[this.day - 1]?.taskList
|
||||
let calList = arr.filter(item=> (item.taskList && item.taskList.length > 0))
|
||||
this.selected = calList.map(item=> {
|
||||
if(item.day>=1 && item.day<=9) {
|
||||
@@ -164,14 +165,11 @@ export default {
|
||||
}
|
||||
|
||||
.readMore {
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
color: #3F8DF5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user