Commit cce3a68f by xuyl

更新v2.4.0代码

1 parent dc03ee38
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="pageContent"> <div class="pageContent">
<GLCombiForm :rowNumber="1" :formObj="searchForm" :formData="searchFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm> <GLCombiForm :rowNumber="1" :formObj="searchForm" :formData="searchFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLTable :hasNum="true" @setTableFinishFun="setTableFinishFun" :beforeSearchFn="beforeSearchFn" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :tableParams="tableParams"> <GLTable :hasNum="true" @setTableFinishFun="setTableFinishFun" :beforeSearchFn="beforeSearchFn" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :tableParams="tableParams">
<template slot="options" slot-scope="scope"> <template slot="options" slot-scope="scope">
<el-button v-if="scope.scope.sopStatus != 1" type="text" @click="handleJump(scope.scope.id)">SOP分析</el-button> <el-button v-if="scope.scope.sopStatus != 1" type="text" @click="handleJump(scope.scope.id)">SOP分析</el-button>
<el-button v-if="scope.scope.sopStatus == 2" type="text" @click="handleEnd(scope.scope)">结束</el-button> <el-button v-if="scope.scope.sopStatus == 2" type="text" @click="handleEnd(scope.scope)">结束</el-button>
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
<el-button v-if="scope.scope.sopStatus == 1" type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button v-if="scope.scope.sopStatus == 1" type="text" @click="handleDelete(scope.scope)">删除</el-button>
</template> </template>
</GLTable> </GLTable>
<GLFooter class="gl-footer">
<el-button type="primary" @click="goback()">返回</el-button>
</GLFooter>
</div> </div>
</div> </div>
</template> </template>
...@@ -121,8 +124,14 @@ export default { ...@@ -121,8 +124,14 @@ export default {
} }
} }
}, },
mounted() {}, mounted() {
//没数据的时候要算高度
},
methods: { methods: {
// 返回
goback() {
this.$router.go(-1)
},
// 结束 // 结束
handleEnd(row) { handleEnd(row) {
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'clientDataOverview', 'endSopEventApi', { sopId: row.id }) this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'clientDataOverview', 'endSopEventApi', { sopId: row.id })
...@@ -191,6 +200,12 @@ export default { ...@@ -191,6 +200,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.gl-footer {
z-index: 100;
}
/deep/ .el-tabs__content {
margin-bottom: 64px;
}
.pageContent { .pageContent {
padding: 20px 20px 30px; padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="pageContent"> <div class="pageContent">
<div class="markPeople"> <div class="markPeople">
<span>营销人群</span> <span>营销人群</span>
<span v-if="itemArr && itemArr.length > 4 && !closeFlag" @click="expandClick('expand')"> <span v-if="itemArr && itemArr.length > displayNum && !closeFlag" @click="expandClick('expand')">
展开营销人群 展开营销人群
<i class="el-icon-arrow-down color-58"></i> <i class="el-icon-arrow-down color-58"></i>
</span> </span>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
<!-- 营销人群展示 --> <!-- 营销人群展示 -->
<div class="bigMarketItem" v-if="closeFlag"> <div :class="{ secondBigMarketItem: isSecondBigMarketItem, bigMarketItem: isBigMarketItem }" v-if="closeFlag">
<div v-for="(item, idx) in itemArr" :key="idx" :class="[{ active: isActive == idx }, 'marketItem']" @click="choickItem(idx, item.crowdName, item.crowdId)"> <div v-for="(item, idx) in itemArr" :key="idx" :class="[{ active: isActive == idx }, 'marketItem']" @click="choickItem(idx, item.crowdName, item.crowdId)">
<template v-if="idx < displayNum"> <template v-if="idx < displayNum">
<p class="peopleName">{{ item.crowdName }}</p> <p class="peopleName">{{ item.crowdName }}</p>
...@@ -95,6 +95,9 @@ ...@@ -95,6 +95,9 @@
</div> </div>
</GLTable> </GLTable>
</div> </div>
<GLFooter class="gl-footer">
<el-button type="primary" @click="goback()">返回</el-button>
</GLFooter>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="营销计划" name="second"> <el-tab-pane label="营销计划" name="second">
<template v-if="activeName == 'second'"><marketing-plan :crowdGroupId="crowdGroupId"></marketing-plan></template> <template v-if="activeName == 'second'"><marketing-plan :crowdGroupId="crowdGroupId"></marketing-plan></template>
...@@ -114,6 +117,9 @@ export default { ...@@ -114,6 +117,9 @@ export default {
components: { marketingPlan }, components: { marketingPlan },
data() { data() {
return { return {
isSecondBigMarketItem: '',
isBigMarketItem: '',
screenWidth: null,
selectTab: 1, selectTab: 1,
queryTab: '', queryTab: '',
crowdGroupId: '', crowdGroupId: '',
...@@ -124,7 +130,9 @@ export default { ...@@ -124,7 +130,9 @@ export default {
}, },
backupCrowdId: '', backupCrowdId: '',
isActive: 0, isActive: 0,
displayNum: 4, //展示的数目 displayNum: '', //展示的数目
displayNumCopy: '', //展示的数目
closeFlag: false, //展开收起 closeFlag: false, //展开收起
showTitle: '', // 展示的标题 showTitle: '', // 展示的标题
itemArr: [], itemArr: [],
...@@ -282,6 +290,7 @@ export default { ...@@ -282,6 +290,7 @@ export default {
status: true status: true
} }
}, },
created() { created() {
this.crowdGroupId = this.$route.query.crowdId || '' this.crowdGroupId = this.$route.query.crowdId || ''
// 判断营销SOP返回来的页面 // 判断营销SOP返回来的页面
...@@ -298,28 +307,27 @@ export default { ...@@ -298,28 +307,27 @@ export default {
this.getStaffList() this.getStaffList()
}, },
mounted() { mounted() {
this.screenWidth = document.body.clientWidth
window.addEventListener('resize', () => {
this.screenWidth = document.body.clientWidth
})
let previewSwiper = new Swiper('.swiper-container', { let previewSwiper = new Swiper('.swiper-container', {
grabCursor: true, grabCursor: true,
spaceBetween: 16, // spaceBetween: 20,
mousewheel: true, mousewheel: true,
slidesPerView: 'auto', // slidesPerView: 'auto',
observer: true, //修改swiper自己或子元素时,自动初始化 observer: true, //修改swiper自己或子元素时,自动初始化
observeParents: true, //修改swiper的父元素时,自动初始化swiper observeParents: true, //修改swiper的父元素时,自动初始化swiper
breakpoints: { breakpoints: {
//当宽度大于等于1280 //当宽度小于等于1919
1280: {
slidesPerView: 4,
spaceBetween: 16
},
//当宽度大于等于1440
1440: { 1440: {
slidesPerView: 4, slidesPerView: 4,
spaceBetween: 16 spaceBetween: 20
}, },
//当宽度大于等于1920 2800: {
1920: {
slidesPerView: 5, slidesPerView: 5,
spaceBetween: 16 spaceBetween: 20
} }
}, },
pagination: { pagination: {
...@@ -327,17 +335,33 @@ export default { ...@@ -327,17 +335,33 @@ export default {
type: 'progressbar' type: 'progressbar'
} }
}) })
this.$nextTick(() => { this.$nextTick(() => {
setTimeout(function() { setTimeout(function() {
previewSwiper.slideTo(0, 0, false) previewSwiper.slideTo(0, 0, false)
}, 500) }, 700)
}) })
// let clientWidth = document.documentElement.clientWidth },
// let breakpointsArr = previewSwiper.passedParams.breakpoints watch: {
// console.log(breakpointsArr) screenWidth: {
handler: function(val) {
if (val >= 1440) {
this.displayNumCopy = this.displayNum = 5
this.isBigMarketItem = false
this.isSecondBigMarketItem = true
} else {
this.displayNumCopy = this.displayNum = 4
this.isBigMarketItem = true
this.isSecondBigMarketItem = false
}
},
// immediate: true,
deep: true
}
}, },
methods: { methods: {
goback() {
this.$router.go(-1)
},
// 导出 // 导出
handleExport() { handleExport() {
var params = { var params = {
...@@ -424,10 +448,9 @@ export default { ...@@ -424,10 +448,9 @@ export default {
}, },
//重置表格 //重置表格
resetTable() { resetTable() {
console.log(this.backupCrowdId)
this.searchForm = { this.searchForm = {
customCrowd: true, customCrowd: true,
crowdId: this.backupCrowdId ? this.backupCrowdId :this.theFirstGroudId crowdId: this.backupCrowdId ? this.backupCrowdId : this.theFirstGroudId
} }
this.$refs.marketPeople.refreshTable() this.$refs.marketPeople.refreshTable()
}, },
...@@ -461,7 +484,7 @@ export default { ...@@ -461,7 +484,7 @@ export default {
this.displayNum = this.itemArr.length || '' this.displayNum = this.itemArr.length || ''
} else { } else {
this.closeFlag = false this.closeFlag = false
this.displayNum = 4 this.displayNum = this.displayNumCopy
} }
}, },
// 选择的人群 // 选择的人群
...@@ -490,6 +513,9 @@ export default { ...@@ -490,6 +513,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .el-tabs__content {
margin-bottom: 64px;
}
.expandImg { .expandImg {
display: flex; display: flex;
.smallFontSize { .smallFontSize {
...@@ -512,12 +538,13 @@ export default { ...@@ -512,12 +538,13 @@ export default {
color: #fb8f28; color: #fb8f28;
} }
/deep/.swiper-container-horizontal > .swiper-pagination-progressbar { /deep/.swiper-container-horizontal > .swiper-pagination-progressbar {
width: 5%; width: 60px;
height: 5px;
bottom: 0px; bottom: 0px;
top: auto; top: auto;
right: 0; right: 0;
margin: auto; margin: auto;
border-radius: 3px; border-radius: 5px;
background: #dddee0; background: #dddee0;
.swiper-pagination-progressbar-fill { .swiper-pagination-progressbar-fill {
background: #5850ff; background: #5850ff;
...@@ -624,8 +651,8 @@ export default { ...@@ -624,8 +651,8 @@ export default {
display: grid; display: grid;
grid-template-columns: 25% 25% 25% 25%; grid-template-columns: 25% 25% 25% 25%;
.marketItem { .marketItem {
margin-right: 16px; margin-right: 20px;
margin-bottom: 16px; margin-bottom: 20px;
// width: 25%; // width: 25%;
&:nth-child(4n) { &:nth-child(4n) {
margin-right: 0; margin-right: 0;
...@@ -660,6 +687,65 @@ export default { ...@@ -660,6 +687,65 @@ export default {
font-size: 14px; font-size: 14px;
color: #999999; color: #999999;
line-height: 20px; 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;
}
}
}
}
.secondBigMarketItem {
padding: 0 20px;
display: grid;
grid-template-columns: 20% 20% 20% 20% 20%;
.marketItem {
margin-right: 20px;
margin-bottom: 20px;
// width: 25%;
&:nth-child(5n) {
margin-right: 0;
}
.peopleName {
height: 54px;
line-height: 54px;
background: #f7f7fc;
font-size: 16px;
font-weight: 600;
padding-left: 16px;
vertical-align: middle;
overflow: hidden;
}
.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 {
font-size: 14px;
color: #999999;
line-height: 20px;
height: 40px;
} }
.createSOP { .createSOP {
margin: 24px 0; margin: 24px 0;
...@@ -690,6 +776,9 @@ export default { ...@@ -690,6 +776,9 @@ export default {
} }
} }
} }
.gl-footer {
z-index: 100;
}
.otherPageContent { .otherPageContent {
padding: 20px 20px 30px; padding: 20px 20px 30px;
margin-top: 16px; margin-top: 16px;
...@@ -713,7 +802,7 @@ export default { ...@@ -713,7 +802,7 @@ export default {
} }
.marketSOP { .marketSOP {
color: #666666; color: #666666;
border: 1px solid #696969; border: 1px solid #d1d1d1;
} }
} }
} }
......
...@@ -607,7 +607,7 @@ export default { ...@@ -607,7 +607,7 @@ export default {
this.getLabelData() this.getLabelData()
}, },
handleCancel() { handleCancel() {
this.$router.push('/crowdManage/index') this.$router.push(`/crowdManage/index?selectTab=2`)
}, },
checkName(value) { checkName(value) {
// 一个汉字2个字符,字母数字1个字符 // 一个汉字2个字符,字母数字1个字符
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!