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

首页问题修改

parent 5b97759f
......@@ -59,7 +59,7 @@ export function updateTeaTrialCourse(data) {
// 5. 逻辑删除试用开课
export function delTeaTrialCourse(businessId) {
return request({
url: '/teatrialcourse/deleteLogical/' + businessId,
url: '/cmspriceclick/deleteLogical/' + businessId,
method: 'delete'
})
}
......
......@@ -175,13 +175,12 @@
@click="handleUpdate(scope.$index)"
>{{ commonField.updateName }}</el-button>
<!-- //删除-->
<!-- <el-button
v-show="scope.row.edit === '0'"
<el-button
:class="commonField.delClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="handleDelete(scope.row)"
>{{ commonField.deleteName }}</el-button>-->
>{{ commonField.deleteName }}</el-button>
<el-button
v-show="scope.row.edit === '1'"
:class="commonField.delClass"
......
......@@ -6,6 +6,16 @@
<div class="titleBottom_companyName">--{{ companyName }}</div>
</div>
<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-option
v-for="(item,index) in deptList"
......@@ -208,6 +218,9 @@ export default {
data.push([r, i])
}
return {
startTime: '',
endTime: '',
timeFrame: [],
list: [],
loading: true,
allowScroll: true,
......@@ -313,6 +326,21 @@ export default {
})
},
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() {
this.deptList.forEach(item => {
......@@ -365,7 +393,7 @@ export default {
},
/** 代言人,文章,视频数据*/
getTableData() {
statistics({ businessId: this.company }).then(res => {
statistics({ businessId: this.company, startTime: this.startTime, endTime: this.endTime }).then(res => {
if (res.code === 200) {
this.articleViews = res.data.articleViews ? res.data.articleViews : 0
this.articleNum = res.data.articleNum ? res.data.articleNum : 0
......@@ -509,7 +537,7 @@ export default {
},
/** 代言人文章视频推广次数统计*/
handleGetPeoplePromotionFrequency() {
barChar({ businessId: this.company }).then(res => {
barChar({ businessId: this.company, startTime: this.startTime, endTime: this.endTime }).then(res => {
console.log('res', res)
if (res.code === 200) {
const barChar = res.data
......@@ -577,7 +605,7 @@ export default {
this.loading = 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.data === null || res.data.length <= 0) {
this.pieShow = false
......@@ -598,7 +626,7 @@ export default {
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) {
console.log('饼状图', res.data)
this.pieVideo = []
......@@ -737,7 +765,7 @@ export default {
myChartPeopleTextPie.setOption(optionAverage)
},
getPromotionArticle() {
aListOfPromotionAmounts({ businessId: this.company }).then(res => {
aListOfPromotionAmounts({ businessId: this.company, startTime: this.startTime, endTime: this.endTime }).then(res => {
if (res.code === 200) {
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