Commit b730dc0c by 王志慧

commit

1 parent 822b60ab
...@@ -83,6 +83,10 @@ img { ...@@ -83,6 +83,10 @@ img {
margin-left: 20px; margin-left: 20px;
} }
.scrm-ml6 {
margin-left: 6px;
}
.scrm-mr10 { .scrm-mr10 {
margin-right: 10px; margin-right: 10px;
} }
...@@ -98,17 +102,21 @@ img { ...@@ -98,17 +102,21 @@ img {
.scrm-p20 { .scrm-p20 {
padding: 20px; padding: 20px;
} }
.scrm-p020 { .scrm-p020 {
padding: 0px 20px; padding: 0px 20px;
} }
.scrm-box-f { .scrm-box-f {
background: #ffffff; background: #ffffff;
} }
.count-item-question { .count-item-question {
width: 14px; width: 14px;
height: 14px; height: 14px;
display: inline-block; display: inline-block;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
/*滚动条整体样式*/ /*滚动条整体样式*/
width: 6px; width: 6px;
...@@ -120,17 +128,21 @@ img { ...@@ -120,17 +128,21 @@ img {
border-radius: 4px; border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3); background-color: rgba(144, 147, 153, 0.3);
} }
.flex { .flex {
display: flex; display: flex;
} }
.flex-center { .flex-center {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.glsx-table .line-ellipsis { .glsx-table .line-ellipsis {
display: inline; display: inline;
} }
.el-message--info { .el-message--info {
height: 40px; height: 40px;
background: #e6e9ff; background: #e6e9ff;
...@@ -139,7 +151,187 @@ img { ...@@ -139,7 +151,187 @@ img {
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
.el-message .el-icon-info { .el-message .el-icon-info {
color: #5850ff; color: #5850ff;
font-size: 16px; font-size: 16px;
} }
.m-t-8 {
margin-top: 8px;
}
.m-t-10 {
margin-top: 10px;
}
.m-t-20 {
margin-top: 20px;
}
.m-b-8 {
margin-bottom: 8px;
}
.m-b-10 {
margin-bottom: 10px;
}
.m-b-20 {
margin-bottom: 20px;
}
.m-b-60 {
margin-bottom: 60px;
}
.m-r-8 {
margin-right: 8px;
}
.m-r-10 {
margin-right: 10px;
}
.m-r-20 {
margin-right: 20px;
}
.m-l-10 {
margin-left: 10px !important;
}
.m-l-20 {
margin-left: 20px;
}
.p-20 {
padding: 20px;
}
.p-t-10,
.p-t-10 {
padding-top: 10px;
}
.p-t-20,
.p-t-20 {
padding-top: 20px;
}
.p-l-40 {
padding-left: 40px;
}
.p-0 {
padding: 0;
}
.mrglr {
margin: 0 auto;
}
.circle {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 6px;
margin-bottom: 3px;
background-color: #5850ff;
}
.grey {
background-color: #999999;
}
.txt-green {
color: #61cc43;
}
.txt-orange {
color: #fb8f28;
}
.txt-blue {
color: #5850ff;
}
.txt-grey {
color: #999999;
}
.text-e8 {
color: #eb4e4e !important;
}
.txt-center {
text-align: center;
}
.weight-6 {
font-weight: 600;
}
.weight-5 {
font-weight: 500;
}
.flex-default {
display: flex;
}
.flex {
display: flex;
justify-content: space-between;
}
.flex-wrap {
display: flex;
flex-wrap: wrap;
}
.flex-align {
display: flex;
align-items: center;
}
.flex-top {
display: flex;
align-items: flex-start;
}
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
.flex-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.flex-grow {
flex: 1;
}
.txt-red {
color: red;
}
.one-line-ellipsis {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
\ No newline at end of file \ No newline at end of file
...@@ -7,15 +7,174 @@ ...@@ -7,15 +7,174 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<template> <template>
<div> <div class="left-wrap">
<div class="store-wrap">
<div class="mrglr text-16 scrm-c3 weight-6">D+安徽合肥凯越园区店</div>
<div class="merchantId scrm-c3 scrm-f14">商户号:1343234242242</div>
<el-button class="mrglr" icon="el-icon-plus" type="primary">新建</el-button>
</div> </div>
<!-- 营销方案 -->
<div class="scheme-wrap">
<div class="scrm-ml6 scrm-c3 scrm-f14 weight-6">营销方案:</div>
<div class="scheme-list">
<template v-for="(item, index) in schemeList">
<div class="scheme-line scrm-c3 scrm-f14 flex" :class="{ select: item.hovering }" :key="index" @mouseenter="item.hovering = true" @mouseleave="item.hovering = false">
<div class="scheme-text one-line-ellipsis">{{ item.text }}</div>
<div class="flex txt-blue" v-show="item.hovering">
<span>预览</span>
<span class="scrm-ml6">引用</span>
</div>
</div>
</template>
</div>
</div>
<!-- 营销日历 -->
<div class="calendar-market-wrap">
<div class="scrm-c3 scrm-f14 m-b-8 weight-6">营销日历:</div>
<glsx-calendar></glsx-calendar>
</div>
<!-- 营销主题 -->
<div class="theme-wrap">
<div class="scrm-c3 scrm-f14 m-b-8 weight-6">推荐近期营销主题:</div>
<div class="theme-list">
<template v-for="(item, index) in themeList">
<div class="theme-line scrm-c3 scrm-f12 flex" :class="{ select: item.hovering }" :key="index" @mouseenter="item.hovering = true" @mouseleave="item.hovering = false">
<div class="scheme-text">{{ index + 1 }}、{{ item.text }}</div>
<div class="flex txt-blue" v-show="item.hovering">
<span class="scrm-ml6">引用</span>
</div>
</div>
</template>
</div>
</div>
</div>
</template> </template>
<script> <script>
import GlsxCalendar from './components/GlsxCalendar'
export default { export default {
components: {
GlsxCalendar
},
data() {
return {
schemeList: [
{
text: '端午营销方案',
hovering: true
},
{
text: '定保招揽营销方案',
hovering: false
},
{
text: '续保招揽第三季度营销方案',
hovering: false
},
{
text: '定保招揽营销方案',
hovering: false
},
{
text: '续保招揽第三季度营销方案',
hovering: false
}
],
themeList: [
{
text: '5月定保营销种草',
hovering: true
},
{
text: '5月特大活动定保营销种草活动即将开始',
hovering: false
},
{
text: '店庆7周年',
hovering: false
}
]
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.left-wrap {
width: 246px;
height: 100%;
background: #ffffff;
box-sizing: border-box;
display: flex;
flex-direction: column;
.store-wrap {
height: 192px;
margin-top: 48px;
display: flex;
flex-direction: column;
border-bottom: 1px solid #e5e5e5;
.merchantId {
margin: 8px auto 24px;
}
}
.scheme-wrap {
padding: 16px 10px;
</style>
\ No newline at end of file \ No newline at end of file
.scheme-list {
margin: 8px 0;
display: flex;
flex-direction: column;
.scheme-line {
margin-bottom: 4px;
align-items: center;
height: 36px;
line-height: 36px;
.scheme-text {
width: 182px;
margin-left: 6px;
}
}
.select {
width: 226px;
height: 36px;
background: #f2f1ff;
border-radius: 4px;
padding: 0 6px;
box-sizing: border-box;
.scheme-text {
width: 140px;
}
}
}
}
.calendar-market-wrap {
padding: 0 16px 32px;
}
.theme-wrap {
padding: 0 16px;
.theme-list {
margin: 8px 0;
display: flex;
flex-direction: column;
.theme-line {
margin-bottom: 6px;
align-items: center;
line-height: 32px;
.scheme-text {
width: 182px;
margin-left: 6px;
}
}
.select {
width: 226px;
height: auto;
background: #f2f1ff;
border-radius: 4px;
padding: 0 6px;
box-sizing: border-box;
.scheme-text {
width: 140px;
}
}
}
}
}
</style>
<template>
<div class="calendar-card">
<div class="calendar-bar">
<button class="button button-year-minus" @click="minusYear(true)">
&lt;
</button>
<button class="button button-month-minus" @click="minusMonth">
&lt;
</button>
<div class="calendar-date">{{ date.year }}-{{ date.month + 1 }}-{{ date.date }}</div>
<button class="button button-month-plus" @click="plusMonth">&gt;</button>
<button class="button button-year-plus" @click="plusYear(true)">
&gt;
</button>
</div>
<div class="calendar-content">
<ul class="ul-week">
<li class="li-week" v-for="(item, index) in week" :key="index">{{ item }}</li>
</ul>
<ul class="ul-day" @click="handleShowCalendar">
<li class="li-day" v-for="(item, index) in days" :key="index" :isThisMonth="item.isThisMonth">
{{ item.date }}
<img class="star-icon" src="@/assets/star.png" />
</li>
</ul>
</div>
</div>
</template>
<script>
export default {
name: 'SimpleCalendar',
data() {
return {
date: {
year: '',
month: '',
date: ''
},
current: {
year: '',
month: '',
date: ''
},
curretIndex: 30,
week: ['日', '一', '二', '三', '四', '五', '六'],
days: []
}
},
methods: {
handleShowCalendar(){
console.log(111)
this.$parent.$parent.handleShowCalendar()
},
handleClick: function(index) {
// console.log(item.year + '-' + item.month + '-' + item.date)
this.curretIndex = index
},
plusMonth: function() {
if (this.date.month == 11) {
this.date.month = 0
this.plusYear(false)
} else {
this.date.month++
}
this.createCalendar(this.date.year, this.date.month)
},
minusMonth: function() {
if (this.date.month == 0) {
this.date.month = 11
this.minusYear(false)
} else {
this.date.month--
}
this.createCalendar(this.date.year, this.date.month)
},
plusYear: function(create) {
if (this.date.year == 2049) {
this.date.year = 1970
} else {
this.date.year++
}
if (create) {
this.createCalendar(this.date.year, this.date.month)
}
},
minusYear: function(create) {
if (this.date.year == 1970) {
this.date.year = 2049
} else {
this.date.year--
}
if (create) {
this.createCalendar(this.date.year, this.date.month)
}
},
createCalendar: function(year, month) {
let d = new Date()
d.setFullYear(year)
d.setMonth(month)
d.setDate(1)
let dayOfFirstDay = d.getDay()
this.days = []
for (let i = 0; i < 42; i++) {
d.setDate(1)
d.setMonth(month)
d.setDate(i - dayOfFirstDay + 1)
let isThisMonth = 1
if (d.getMonth() == month) {
isThisMonth = 2
} else {
isThisMonth = 1
}
if (this.current.date == d.getDate() && this.current.month == d.getMonth() && this.current.year == d.getFullYear()) {
isThisMonth = 3
let date = {
year: year,
month: month,
date: d.getDate(),
isThisMonth: isThisMonth
}
this.days.push(date)
} else {
let date = {
year: d.getFullYear(),
month: d.getMonth(),
date: d.getDate(),
isThisMonth: isThisMonth
}
this.days.push(date)
// console.log(this.days)
}
}
}
},
created() {
let d = new Date()
this.date.year = d.getFullYear()
this.date.month = d.getMonth()
this.date.date = d.getDate()
this.current.year = d.getFullYear()
this.current.month = d.getMonth()
this.current.date = d.getDate()
this.createCalendar(this.current.year, this.current.month)
}
}
</script>
<style scoped>
.calendar-card {
/* width: 290px; */
height: 210px;
padding: 5px 5px 0px 5px;
border: 1px solid #e8e8ea;
border-radius: 1.53px;
}
/* .calendar-card:hover {
box-shadow: 0px 0px 5px 5px #cfcfcf;
} */
.calendar-bar {
height: 30px;
color: #727272;
line-height: 30px;
text-align: center;
border-bottom: 1px solid #e8e8ea;
font-size: 12px;
/* background-color: #ebeef5; */
}
.calendar-date {
display: inline-block;
width: 100px;
}
.button {
width: 20px;
height: 20px;
background-color: #fff;
color: #aaa;
border: 0;
border-radius: 5px;
}
.button:hover {
background-color: #eee;
cursor: pointer;
}
.ul-week {
display: grid;
width: 245px;
grid-template-rows: 20px;
grid-template-columns: repeat(7, 24px); /**/
list-style: none;
text-align: center;
font-size: 13px;
color: #aaa;
margin: 5px 18px 5px 18px;
padding-inline-start: 0px;
padding-inline-end: 0px;
}
.li-week {
display: inline-block;
}
.ul-day {
display: grid;
width: 245px;
grid-template-rows: repeat(6, 22px);
grid-template-columns: repeat(7, 24px);
list-style: none;
text-align: center;
margin: 5px 18px 5px 18px;
padding-inline-start: 0px;
padding-inline-end: 0px;
}
.li-day {
display: inline-block;
font-size: 10px;
line-height: 22px;
text-align: center;
border-radius: 5px;
margin: 1px;
color: rgb(91, 91, 91);
position: relative;
}
.li-day:hover {
background-color: #717de2;
color: #fff;
font-size: 15px;
cursor: pointer;
}
.li-day[isThisMonth='1'] {
color: rgb(190, 190, 190);
font-size: 10px;
}
.li-day[isThisMonth='1']:hover {
background-color: #717de2;
color: #fff;
font-size: 15px;
cursor: pointer;
}
.li-day[isThisMonth='3'] {
border-radius: 5px;
color: rgb(255, 255, 255);
background-color: #717de2;
font-weight: 600;
}
.star-icon {
width: 8px;
position: absolute;
top: 17px;
left: 8px;
height:8px;
}
</style>
<template>
<div>
<WorkCalendar ref="workCalendarTemplate" :options="calendarOptions"/>
</div>
</template>
<script>
import WorkCalendar from 'work-calendar';
export default {
components: {
WorkCalendar
},
data() {
return {
calendarOptions: {
TaskData: [
[
{
title: '第一组:任务标题1',
startTime: new Date(),
duration: 20,
endTime: new Date(),
class: 'custom-class-name'
},
{
title: '第一组:任务标题2',
startTime: new Date(),
duration: 20,
endTime: new Date(),
class: 'custom-class-name'
}
],
[
{
title: '第二组:任务标题1',
startTime: new Date(),
duration: 20,
endTime: new Date(),
class: 'custom-class-name'
}
]
],
Holiday: [
{ date: '2021/4/3', name: '清明节' },
{ date: '2021/4/4', name: '清明节' },
{ date: '2021/4/5', name: '清明节' },
],
Workday: [
{ date: '2021/4/25', name: '补劳动节的班' },
{ date: '2021/5/8', name: '补劳动节的班' },
]
},
}
}
}
</script>
\ No newline at end of file \ No newline at end of file
...@@ -22,31 +22,49 @@ ...@@ -22,31 +22,49 @@
<div class="market-title">ChatGPT超级营销</div> <div class="market-title">ChatGPT超级营销</div>
</div> </div>
</div> </div>
<div class="market-bottom"> <div class="market-bottom" v-if="isFull">
<div class="market-middle"> <schedule-calendar ref="calendar"></schedule-calendar>
<!-- <div class="market-middle">
<marketing-middle></marketing-middle> <marketing-middle></marketing-middle>
</div> </div>
<div class="market-right"> <div class="market-right">
<marketing-right></marketing-right> <marketing-right></marketing-right>
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import ScheduleCalendar from './components/Marketing/components/ScheduleCalendar'
import MarketingLeft from './components/Marketing/MarketingLeft' import MarketingLeft from './components/Marketing/MarketingLeft'
import MarketingMiddle from './components/Marketing/MarketingMiddle' // import MarketingMiddle from './components/Marketing/MarketingMiddle'
import MarketingRight from './components/Marketing/MarketingRight' // import MarketingRight from './components/Marketing/MarketingRight'
export default { export default {
components: { components: {
MarketingLeft, MarketingLeft,
MarketingMiddle, // MarketingMiddle,
MarketingRight // MarketingRight,
ScheduleCalendar
}, },
data() { data() {
return {} return {
isFull:true
}
},
mounted(){
let dom = this.$refs.calendar.$refs.full
console.log(dom)
}, },
methods: { methods: {
handleShowCalendar(){
this.isFull = ! this.isFull
console.log( this.$refs.calendar.$refs.full.calendar)
let calendar =this.$refs.calendar.$refs.full.calendar.render
console.log(calendar)
calendar()
},
goBack() { goBack() {
this.$router.push('/home/index') this.$router.push('/home/index')
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!