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