老产品前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

371 lines
8.4 KiB

3 years ago
<template>
<div class="g-cnt">
3 years ago
<el-row :gutter="15">
<el-col :span="6">
<div class="m-sizer">
<div class="item">
<el-cascader
v-model="fmData.party"
:options="partyOptions"
@change="handleChangeParty"
></el-cascader>
</div>
<div class="item">
<el-radio v-model="radio" label="1">备选项</el-radio>
<el-radio v-model="radio" label="2">备选项</el-radio>
3 years ago
</div>
</div>
3 years ago
<div class="m-date">
<div class="date-top">2222年2月22日</div>
<div class="date-big">22</div>
<div class="date-week">星期五</div>
3 years ago
</div>
3 years ago
<div class="m-list">
<div class="list-title">今日活动</div>
<div class="list">
<div class="item">
<div class="item-title">
不忘初心牢记使命巴巴爸爸不不嘻嘻 额阿发文发文额
</div>
<div class="item-prop">
<span>活动类型</span>
<span>发发发发发发付付</span>
</div>
<div class="item-prop">
<span>活动类型</span>
<span>发发发发发发付付</span>
</div>
<div class="item-prop">
<span>活动类型</span>
<span>发发发发发发付付</span>
</div>
<div class="item-prop">
<span>活动类型</span>
<span>发发发发发发付付</span>
</div>
<div class="item-ope">
<el-button type="primary" size="mini">发布</el-button>
<el-button type="success" size="mini">编辑</el-button>
<el-button size="mini">删除</el-button>
</div>
3 years ago
</div>
</div>
3 years ago
</div>
<div class="m-ope">
<el-button type="warning" style="width: 48%">添加活动计划</el-button>
<el-button style="width: 48%">添加日程</el-button>
</div>
</el-col>
<el-col :span="18">
<div class="m-cal">
<div class="hd">
<div class="hd-year">
<el-date-picker
v-model="currentYearStr"
value-format="yyyy"
type="year"
placeholder="选择年"
size="small"
style="width: 150px"
>
</el-date-picker>
</div>
<div class="hd-month">
<div
class="month-item"
:class="{ 'z-on': m - 1 == currentMonth }"
:key="'month' + m"
@click="currentMonth = m - 1"
v-for="m in 12"
>
<el-badge :value="12" :hidden="m != 3" class="item">
<div class="month-text">{{ m }}</div>
</el-badge>
</div>
</div>
<div class="hd-btn">
<el-button type="primary" size="small"
>批量生成年度报表</el-button
>
</div>
3 years ago
</div>
3 years ago
<calendar
:currentYear="currentYear"
:currentMonth="currentMonth"
@clickDate="handleChangeDate"
>
<template v-slot:date-item="{ info }">
<div class="tip">
<div class="tip-text">
<span class="z-on">主题当日</span> (已发布)
</div>
<div class="tip-cnt">巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉</div>
</div>
<div class="corn">
<div class="corn-num">8</div>
<div class="corn-text">日程</div>
</div>
</template>
</calendar>
</div>
</el-col>
</el-row>
3 years ago
</div>
</template>
<script>
import { requestPost, requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import calendar from "./cpts/calendar";
export default {
name: "party-calendar",
components: {
calendar,
},
data() {
3 years ago
let todayObj = new Date();
return {
currentYearStr: todayObj.getFullYear() + "",
currentMonth: todayObj.getMonth(),
3 years ago
partyOptions: [],
fmData: {
party: "",
},
3 years ago
};
},
computed: {
currentYear() {
return parseInt(this.currentYearStr);
},
3 years ago
},
async mounted() {
// await this.getPartyOggList()
},
methods: {
3 years ago
handleChangeParty() {},
3 years ago
handleChangeDate(item) {
console.log("handleChangeDate");
this.currentYearStr = item.year + "";
this.currentMonth = item.month;
},
3 years ago
async getPartyOggList() {
const url = "/resi/partymember/icPartyOrg/getSearchTreelist";
let params = {
agencyId: this.$store.state.user.agencyId,
};
const { data, code, msg } = await requestGet(url, params);
console.log("data-orgparty----o", data);
if (code === 0) {
this.partyOrgList = this.deepArrTOnull(data);
} else {
}
},
},
};
</script>
<style lang="scss" scoped>
3 years ago
@import "@/assets/scss/c/config.scss";
@import "@/assets/scss/c/function.scss";
3 years ago
$blue: #3e8ef7;
$red: #f33;
3 years ago
.g-cnt {
background-color: #ffffff;
padding: 20px;
}
3 years ago
.m-cal {
3 years ago
.hd {
3 years ago
display: flex;
margin-bottom: 20px;
3 years ago
.hd-month {
3 years ago
display: flex;
.month-item {
position: relative;
margin-left: 10px;
/deep/ .el-badge__content {
z-index: 1;
}
&.z-on {
.month-text {
3 years ago
background-color: $blue;
3 years ago
color: #ffffff;
}
}
.month-text {
position: relative;
z-index: 0;
width: 40px;
height: 30px;
text-align: center;
background-color: #eeeeee;
border-radius: 8px;
line-height: 30px;
font-size: 14px;
cursor: pointer;
}
}
}
3 years ago
.hd-btn {
margin-left: auto;
}
3 years ago
}
.tip {
position: relative;
margin: 0 3px;
padding: 3px 2px 3px 12px;
line-height: 16px;
box-shadow: 0 0 5px 1px #eee;
background-color: #ffffff;
font-size: 12px;
border-radius: 4px;
cursor: pointer;
color: #999999;
.z-on {
3 years ago
color: $red;
3 years ago
}
.tip-text {
@include toe;
text-align: left;
}
.tip-cnt {
@include toe;
text-align: left;
font-size: 10px;
}
&::before {
position: absolute;
content: "";
left: 4px;
top: 0;
bottom: 0;
margin: auto;
display: block;
width: 4px;
height: 4px;
border-radius: 100%;
3 years ago
background-color: $red;
3 years ago
}
}
.corn {
position: absolute;
right: 0;
top: 0;
color: #ffffff;
cursor: pointer;
.corn-num {
position: absolute;
z-index: 10;
top: -7px;
right: -7px;
border-radius: 100%;
width: 14px;
height: 14px;
line-height: 14px;
text-align: center;
font-size: 10px;
text-align: center;
color: #ffffff;
background-color: #f1ba06;
}
.corn-text {
position: relative;
z-index: 1;
font-size: 12px;
line-height: 18px;
padding-right: 3px;
}
&::before {
content: "";
display: block;
position: absolute;
z-index: 0;
top: 0;
right: 0;
width: 0px;
height: 0;
border-top: 17px solid #f33;
border-right: 25px solid #f33;
border-bottom: 17px solid transparent;
border-left: 25px solid transparent;
}
}
}
3 years ago
.m-sizer {
.item {
margin-bottom: 10px;
}
}
.m-date {
text-align: center;
color: $blue;
line-height: 1.5;
background-color: #f3f4f5;
padding: 20px;
.date-top {
font-size: 24px;
}
.date-big {
font-size: 100px;
}
.date-week {
font-size: 24px;
}
}
.m-list {
margin-top: 20px;
.list-title {
width: 100px;
text-align: center;
line-height: 24px;
background-color: $red;
color: #ffffff;
}
.list {
.item {
border-top: 1px solid #eee;
padding: 10px 0;
line-height: 1.5;
overflow: hidden;
.item-title {
font-weight: bold;
}
.item-prop {
margin: 4px 0;
}
.item-ope {
margin-top: 10px;
float: right;
}
}
}
}
.m-ope {
margin-top: 40px;
display: flex;
justify-content: space-between;
}
3 years ago
</style>