Commit d8443319 authored by 张伯涛's avatar 张伯涛

首页问题修改

parent 5b97759f
...@@ -59,7 +59,7 @@ export function updateTeaTrialCourse(data) { ...@@ -59,7 +59,7 @@ export function updateTeaTrialCourse(data) {
// 5. 逻辑删除试用开课 // 5. 逻辑删除试用开课
export function delTeaTrialCourse(businessId) { export function delTeaTrialCourse(businessId) {
return request({ return request({
url: '/teatrialcourse/deleteLogical/' + businessId, url: '/cmspriceclick/deleteLogical/' + businessId,
method: 'delete' method: 'delete'
}) })
} }
......
...@@ -175,13 +175,12 @@ ...@@ -175,13 +175,12 @@
@click="handleUpdate(scope.$index)" @click="handleUpdate(scope.$index)"
>{{ commonField.updateName }}</el-button> >{{ commonField.updateName }}</el-button>
<!-- //删除--> <!-- //删除-->
<!-- <el-button <el-button
v-show="scope.row.edit === '0'"
:class="commonField.delClass" :class="commonField.delClass"
:type="commonField.typeParent" :type="commonField.typeParent"
:size="commonField.size" :size="commonField.size"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>{{ commonField.deleteName }}</el-button>--> >{{ commonField.deleteName }}</el-button>
<el-button <el-button
v-show="scope.row.edit === '1'" v-show="scope.row.edit === '1'"
:class="commonField.delClass" :class="commonField.delClass"
......
...@@ -6,6 +6,16 @@ ...@@ -6,6 +6,16 @@
<div class="titleBottom_companyName">--{{ companyName }}</div> <div class="titleBottom_companyName">--{{ companyName }}</div>
</div> </div>
<div class="titleTopSelect"> <div class="titleTopSelect">
<el-date-picker
v-model="timeFrame"
style="margin-right: 20px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="handleChangeTime"
/>
<el-select v-model="company" :disabled="!queryShop" filterable placeholder="请选择所属商家" @change="changeCompany"> <el-select v-model="company" :disabled="!queryShop" filterable placeholder="请选择所属商家" @change="changeCompany">
<el-option <el-option
v-for="(item,index) in deptList" v-for="(item,index) in deptList"
...@@ -208,6 +218,9 @@ export default { ...@@ -208,6 +218,9 @@ export default {
data.push([r, i]) data.push([r, i])
} }
return { return {
startTime: '',
endTime: '',
timeFrame: [],
list: [], list: [],
loading: true, loading: true,
allowScroll: true, allowScroll: true,
...@@ -313,6 +326,21 @@ export default { ...@@ -313,6 +326,21 @@ export default {
}) })
}, },
methods: { methods: {
/** 切换筛选时间*/
handleChangeTime() {
console.log('timeFrame', this.timeFrame)
if (this.timeFrame && this.timeFrame.length > 0) {
this.startTime = this.timeFrame[0]
this.endTime = this.timeFrame[1]
} else {
this.startTime = ''
this.endTime = ''
}
this.getTableData() // 代言人,文章,视频数据
this.handleGetPeoplePromotionFrequency() // 代言人文章视频推广次数统计
this.handlePieData()
this.getPromotionArticle() // 滚动列表
},
/** 切换所属商家*/ /** 切换所属商家*/
changeCompany() { changeCompany() {
this.deptList.forEach(item => { this.deptList.forEach(item => {
...@@ -365,7 +393,7 @@ export default { ...@@ -365,7 +393,7 @@ export default {
}, },
/** 代言人,文章,视频数据*/ /** 代言人,文章,视频数据*/
getTableData() { getTableData() {
statistics({ businessId: this.company }).then(res => { statistics({ businessId: this.company, startTime: this.startTime, endTime: this.endTime }).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.articleViews = res.data.articleViews ? res.data.articleViews : 0 this.articleViews = res.data.articleViews ? res.data.articleViews : 0
this.articleNum = res.data.articleNum ? res.data.articleNum : 0 this.articleNum = res.data.articleNum ? res.data.articleNum : 0
...@@ -509,7 +537,7 @@ export default { ...@@ -509,7 +537,7 @@ export default {
}, },
/** 代言人文章视频推广次数统计*/ /** 代言人文章视频推广次数统计*/
handleGetPeoplePromotionFrequency() { handleGetPeoplePromotionFrequency() {
barChar({ businessId: this.company }).then(res => { barChar({ businessId: this.company, startTime: this.startTime, endTime: this.endTime }).then(res => {
console.log('res', res) console.log('res', res)
if (res.code === 200) { if (res.code === 200) {
const barChar = res.data const barChar = res.data
...@@ -577,7 +605,7 @@ export default { ...@@ -577,7 +605,7 @@ export default {
this.loading = false this.loading = false
this.pieShow = false this.pieShow = false
} }
pieChart({ businessId: this.company, type: 0 }).then(res => { pieChart({ businessId: this.company, type: 0, startTime: this.startTime, endTime: this.endTime }).then(res => {
if (res.code === 200) { if (res.code === 200) {
if (res.data === null || res.data.length <= 0) { if (res.data === null || res.data.length <= 0) {
this.pieShow = false this.pieShow = false
...@@ -598,7 +626,7 @@ export default { ...@@ -598,7 +626,7 @@ export default {
this.promotionArticleNum = res.data.map(item => item.rate) this.promotionArticleNum = res.data.map(item => item.rate)
} }
}) })
pieChart({ businessId: this.company, type: 1 }).then(res => { pieChart({ businessId: this.company, type: 1, startTime: this.startTime, endTime: this.endTime }).then(res => {
if (res.code === 200) { if (res.code === 200) {
console.log('饼状图', res.data) console.log('饼状图', res.data)
this.pieVideo = [] this.pieVideo = []
...@@ -737,7 +765,7 @@ export default { ...@@ -737,7 +765,7 @@ export default {
myChartPeopleTextPie.setOption(optionAverage) myChartPeopleTextPie.setOption(optionAverage)
}, },
getPromotionArticle() { getPromotionArticle() {
aListOfPromotionAmounts({ businessId: this.company }).then(res => { aListOfPromotionAmounts({ businessId: this.company, startTime: this.startTime, endTime: this.endTime }).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.list = res.data this.list = res.data
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment