Commit fdf7b40a by xinla

echarts引用问题

1 parent dc08bbef
......@@ -51,3 +51,11 @@ export function batchUpdate(params) {
data: params
})
}
export function remove(params) {
return request({
url: service + '/batchUpdateUserRedEnvelopsLimit',
method: 'post',
data: params
})
}
......@@ -5,18 +5,18 @@
<p>{{ parseTime(nowTime) }}</p>
</div> -->
<div class="tables">
<div style="text-align:left">
<div style="text-align: left">
<el-row type="flex" class="row-bg" justify="space-between">
<el-col :span="24" class="title_name"
>数据总览
<span class=" fontgay">最近更新:{{ uptime }}</span>
<span class="fontgay">最近更新:{{ uptime }}</span>
</el-col>
</el-row>
<el-row
type="flex"
class="row-bg"
justify="space-between"
style="margin-top:35px; text-align: center;"
style="margin-top: 35px; text-align: center"
>
<el-col :span="6" class="col_style">企业成员总数</el-col>
<el-col :span="6" class="col_style">客户总人数</el-col>
......@@ -27,7 +27,13 @@
type="flex"
class="row-bg"
justify="space-between"
style="margin-top:10px;font-size:35px;font-weight:bold;color:#0079DE; text-align: center;"
style="
margin-top: 10px;
font-size: 35px;
font-weight: bold;
color: #0079de;
text-align: center;
"
>
<el-col :span="6">
<count-to :start-val="0" :end-val="table.userCount" :duration="durationCount" />
......@@ -48,12 +54,12 @@
</el-row>
</div>
</div>
<div class="dataall" style="margin-top:10px">
<div style="text-align:left">
<div class="dataall" style="margin-top: 10px">
<div style="text-align: left">
<el-row type="flex" class="row-bg" justify="space-between">
<el-col :span="10" class="title_name">数据趋势</el-col>
<el-col :span="10" style="text-align:right">
<el-radio-group v-model="timeType" style="margin-top: 20px;" @change="timeTypeCheck">
<el-col :span="10" style="text-align: right">
<el-radio-group v-model="timeType" style="margin-top: 20px" @change="timeTypeCheck">
<el-radio-button label="today">今日</el-radio-button>
<el-radio-button label="week">本周</el-radio-button>
<el-radio-button label="month">本月</el-radio-button>
......@@ -68,7 +74,7 @@
type="flex"
class="row-bg"
justify="space-between"
style="margin-top:30px; text-align: center;"
style="margin-top: 30px; text-align: center"
>
<el-col :span="6">新增客户数</el-col>
<el-col :span="6">新增客群数</el-col>
......@@ -79,7 +85,13 @@
type="flex"
class="row-bg"
justify="space-between"
style="margin-top:10px;font-size:35px;font-weight:bold;color: #0079DE; text-align: center;"
style="
margin-top: 10px;
font-size: 35px;
font-weight: bold;
color: #0079de;
text-align: center;
"
>
<el-col :span="6">{{ erchatsTable.newContactCnt }}</el-col>
<el-col :span="6">{{ erchatsTable.newChatCnt }}</el-col>
......@@ -90,7 +102,7 @@
type="flex"
class="row-bg"
justify="space-between"
style="margin-top:10px; text-align: center;"
style="margin-top: 10px; text-align: center"
>
<el-col :span="6">
比{{ time }}
......@@ -129,12 +141,7 @@
<div class="car card">
<el-row type="flex" justify="space-between">
<el-col
:span="24"
style="font-size: 24px; line-height:80px
"
>快捷功能
</el-col>
<el-col :span="24" style="font-size: 24px; line-height: 80px">快捷功能 </el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6" v-for="(item, i) in car" :key="i">
......@@ -162,7 +169,7 @@
type="flex"
class="row-bg"
justify="center"
style="text-align:center"
style="text-align: center"
>
<el-col :span="10" class="flexspan">
<img src="../assets/index/bzwd.png" />
......@@ -181,7 +188,7 @@
<span class="inedx_r_top_bottomp1"><img src="../assets/index/gxrz.png" /> 更新日志</span>
<span
class="fr"
style="color:#0079DE"
style="color: #0079de"
@click="msgInfo('《更新日志》正在加急上线中,敬请关注…')"
>更多</span
>
......@@ -194,7 +201,7 @@
</div>
<div class="inedx_r_top_bottom">
<span class="inedx_r_top_bottomp1"><img src="../assets/index/qyxy.png" /> 私域学院</span>
<span class="fr" style="color:#0079DE">更多</span>
<span class="fr" style="color: #0079de">更多</span>
<ul>
<li v-for="(index, i) in 3" :key="i" @click="msgInfo('暂无内容')">
即将上线,敬请期待
......@@ -202,16 +209,16 @@
</li>
</ul>
</div>
<div class="inedx_r_top_bottom" style="text-align:center">
<p style="text-align:left">
<div class="inedx_r_top_bottom" style="text-align: center">
<p style="text-align: left">
<span class="inedx_r_top_bottomp1">
<img src="../assets/index/kfq.png" /> 官方交流</span
>
</p>
<img :src="bossImg" class="img" />
</div>
<div class="inedx_r_top_bottom" style="text-align:center">
<p style="text-align:left">
<div class="inedx_r_top_bottom" style="text-align: center">
<p style="text-align: left">
<span class="inedx_r_top_bottomp1">
<img src="../assets/index/khq.png" /> 联系客服</span
>
......@@ -224,7 +231,7 @@
</template>
<script>
import * as api from '@/api/index'
import echarts from 'echarts'
import * as echarts from 'echarts'
import CountTo from 'vue-count-to'
export default {
name: 'Index',
......@@ -370,7 +377,7 @@ export default {
let obj = document.getElementById('echart')
let charts = echarts.init(obj)
let timer = 0
window.onresize = function() {
window.onresize = function () {
clearTimeout(timer)
timer = setTimeout(() => {
charts.resize()
......
<script>
import * as api from '@/api/task'
import echarts from 'echarts'
import * as echarts from 'echarts'
export default {
name: 'taskDetail',
data() {
......@@ -10,13 +10,13 @@ export default {
pageSize: 10,
name: '', // "客户名称",
beginTime: '', // "开始时间",
endTime: '', // "结束时间"
endTime: '' // "结束时间"
},
dateRange: [],
tableData: [],
dateSelect: 7,
taskDetail: {},
statData: [],
statData: []
}
},
created() {
......@@ -41,12 +41,12 @@ export default {
let option = {
tooltip: {
//设置tip提示
trigger: 'axis',
trigger: 'axis'
},
legend: {
//设置区分(哪条线属于什么)
data: ['日新增客户数', '活动参与客户数', '完成任务的客户数'],
data: ['日新增客户数', '活动参与客户数', '完成任务的客户数']
},
color: ['#8AE09F', '#FA6F53', '#1890ff'], //设置区分(每条线是什么颜色,和 legend 一一对应)
xAxis: {
......@@ -57,9 +57,9 @@ export default {
// name: '日期', //X轴 name
nameTextStyle: {
//坐标轴名称的文字样式
fontSize: 16,
fontSize: 16
// padding: [0, 0, 0, 20]
},
}
// axisLine: { //坐标轴轴线相关设置。
// lineStyle: {
// color: '#FA6F53',
......@@ -70,14 +70,14 @@ export default {
nameTextStyle: {
color: '#FA6F53',
fontSize: 16,
padding: [0, 0, 10, 0],
padding: [0, 0, 10, 0]
},
// axisLine: {
// lineStyle: {
// color: '#FA6F53',
// }
// },
type: 'value',
type: 'value'
},
series: [
{
......@@ -87,9 +87,9 @@ export default {
lineStyle: {
// 线条样式 => 必须使用normal属性
normal: {
color: '#8AE09F',
},
},
color: '#8AE09F'
}
}
},
{
name: '活动参与客户数',
......@@ -97,9 +97,9 @@ export default {
type: 'line',
lineStyle: {
normal: {
color: '#FA6F53',
},
},
color: '#FA6F53'
}
}
},
{
name: '完成任务的客户数',
......@@ -107,15 +107,15 @@ export default {
type: 'line',
lineStyle: {
normal: {
color: '#FA6F53',
},
},
},
],
color: '#FA6F53'
}
}
}
]
}
this.initChart(option)
},
},
}
}
},
methods: {
getList(id) {
......@@ -127,7 +127,7 @@ export default {
let params = {
beginTime: this.dateRange[0],
endTime: this.dateRange[1],
taskFissionId: this.$route.query.id,
taskFissionId: this.$route.query.id
}
api.getStat(params).then((res) => {
this.statData = res.data ? res.data.data : []
......@@ -160,8 +160,8 @@ export default {
date.setDate(date.getDate() - days)
this.dateRange = [this.getTime(date), this.getTime()]
this.getChartsData()
},
},
}
}
}
</script>
......@@ -170,7 +170,7 @@ export default {
<div class="task-detail-model task-detail-left">
<h4 class="title">任务活动信息</h4>
<div class="task-row">
<div class="task-label" style="margin-bottom:30px">创建人:</div>
<div class="task-label" style="margin-bottom: 30px">创建人:</div>
<div class="task-value">{{ taskDetail.createBy }}</div>
</div>
<div class="task-row">
......@@ -185,11 +185,9 @@ export default {
<div class="task-label">裂变客户数量:</div>
<div class="task-value">{{ taskDetail.fissNum }}人</div>
</div>
<div class="task-row" style="margin-bottom:30px">
<div class="task-row" style="margin-bottom: 30px">
<div class="task-label">活动时间:</div>
<div class="task-value">
{{ taskDetail.startTime }}至{{ taskDetail.overTime }}
</div>
<div class="task-value">{{ taskDetail.startTime }}至{{ taskDetail.overTime }}</div>
</div>
<!-- <div class="task-row">
<div class="task-label">活动发起成员:</div>
......@@ -201,9 +199,9 @@ export default {
</div> -->
<div class="task-row">
<div class="task-label">裂变海报:</div>
<img style="width:30px" :src="taskDetail.postersUrl" />
<img style="width: 30px" :src="taskDetail.postersUrl" />
</div>
<div class="task-row" style="margin-bottom:30px">
<div class="task-row" style="margin-bottom: 30px">
<div class="task-label">群活码:</div>
<img style="width: 50px" :src="taskDetail.fissionTarget" />
</div>
......@@ -212,9 +210,13 @@ export default {
<div class="task-label">兑奖链接:</div>
<div class="task-value">{{ taskDetail.rewardUrl }}</div>
</div>
<div class="task-row" style="margin-bottom:30px">
<div class="task-row" style="margin-bottom: 30px">
<div class="task-label">兑奖图片:</div>
<img style="width:30px" v-if="taskDetail.rewardImageUrl" :src="taskDetail.rewardImageUrl" />
<img
style="width: 30px"
v-if="taskDetail.rewardImageUrl"
:src="taskDetail.rewardImageUrl"
/>
</div>
<div class="task-row">
<div class="task-label">新客欢迎语:</div>
......@@ -240,7 +242,7 @@ export default {
@change="getChartsData"
></el-date-picker>
</div>
<div id="chartLineBox" style="width: 100%;height: 354px;"></div>
<div id="chartLineBox" style="width: 100%; height: 354px"></div>
</div>
</div>
</template>
......
<template>
<div :class="className" :style="{height:height,width:width}" />
<div :class="className" :style="{ height: height, width: width }" />
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
......@@ -49,7 +49,8 @@ export default {
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
......@@ -60,41 +61,49 @@ export default {
bottom: '3%',
containLabel: true
},
xAxis: [{
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisTick: {
alignWithLabel: true
xAxis: [
{
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisTick: {
alignWithLabel: true
}
}
}],
yAxis: [{
type: 'value',
axisTick: {
show: false
],
yAxis: [
{
type: 'value',
axisTick: {
show: false
}
}
}],
series: [{
name: 'pageA',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [79, 52, 200, 334, 390, 330, 220],
animationDuration
}, {
name: 'pageB',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [80, 52, 200, 334, 390, 330, 220],
animationDuration
}, {
name: 'pageC',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [30, 52, 200, 334, 390, 330, 220],
animationDuration
}]
],
series: [
{
name: 'pageA',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [79, 52, 200, 334, 390, 330, 220],
animationDuration
},
{
name: 'pageB',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [80, 52, 200, 334, 390, 330, 220],
animationDuration
},
{
name: 'pageC',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [30, 52, 200, 334, 390, 330, 220],
animationDuration
}
]
})
}
}
......
<template>
<div :class="className" :style="{height:height,width:width}" />
<div :class="className" :style="{ height: height, width: width }" />
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
......@@ -92,42 +92,45 @@ export default {
legend: {
data: ['expected', 'actual']
},
series: [{
name: 'expected', itemStyle: {
normal: {
color: '#FF005A',
lineStyle: {
series: [
{
name: 'expected',
itemStyle: {
normal: {
color: '#FF005A',
width: 2
lineStyle: {
color: '#FF005A',
width: 2
}
}
}
},
smooth: true,
type: 'line',
data: expectedData,
animationDuration: 2800,
animationEasing: 'cubicInOut'
},
smooth: true,
type: 'line',
data: expectedData,
animationDuration: 2800,
animationEasing: 'cubicInOut'
},
{
name: 'actual',
smooth: true,
type: 'line',
itemStyle: {
normal: {
color: '#3888fa',
lineStyle: {
{
name: 'actual',
smooth: true,
type: 'line',
itemStyle: {
normal: {
color: '#3888fa',
width: 2
},
areaStyle: {
color: '#f3f8ff'
lineStyle: {
color: '#3888fa',
width: 2
},
areaStyle: {
color: '#f3f8ff'
}
}
}
},
data: actualData,
animationDuration: 2800,
animationEasing: 'quadraticOut'
}]
},
data: actualData,
animationDuration: 2800,
animationEasing: 'quadraticOut'
}
]
})
}
}
......
<template>
<div :class="className" :style="{height:height,width:width}" />
<div :class="className" :style="{ height: height, width: width }" />
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
......
<template>
<div :class="className" :style="{height:height,width:width}" />
<div :class="className" :style="{ height: height, width: width }" />
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
......@@ -49,7 +49,8 @@ export default {
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
......@@ -81,34 +82,36 @@ export default {
bottom: '10',
data: ['Allocated Budget', 'Expected Spending', 'Actual Spending']
},
series: [{
type: 'radar',
symbolSize: 0,
areaStyle: {
normal: {
shadowBlur: 13,
shadowColor: 'rgba(0,0,0,.2)',
shadowOffsetX: 0,
shadowOffsetY: 10,
opacity: 1
}
},
data: [
{
value: [5000, 7000, 12000, 11000, 15000, 14000],
name: 'Allocated Budget'
},
{
value: [4000, 9000, 15000, 15000, 13000, 11000],
name: 'Expected Spending'
series: [
{
type: 'radar',
symbolSize: 0,
areaStyle: {
normal: {
shadowBlur: 13,
shadowColor: 'rgba(0,0,0,.2)',
shadowOffsetX: 0,
shadowOffsetY: 10,
opacity: 1
}
},
{
value: [5500, 11000, 12000, 15000, 12000, 12000],
name: 'Actual Spending'
}
],
animationDuration: animationDuration
}]
data: [
{
value: [5000, 7000, 12000, 11000, 15000, 14000],
name: 'Allocated Budget'
},
{
value: [4000, 9000, 15000, 15000, 13000, 11000],
name: 'Expected Spending'
},
{
value: [5500, 11000, 12000, 15000, 12000, 12000],
name: 'Actual Spending'
}
],
animationDuration: animationDuration
}
]
})
}
}
......
......@@ -185,7 +185,7 @@
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
import PreviewClient from '@/components/previewInMobileClient.vue'
import { getDetail, getTotal, downloadBatch } from '@/api/drainageCode/staff'
......
......@@ -227,7 +227,7 @@
</template>
<script>
import * as api from '@/api/index'
import echarts from 'echarts'
import * as echarts from 'echarts'
import CountTo from 'vue-count-to'
export default {
name: 'Index',
......
......@@ -41,14 +41,12 @@
</el-table-column>
<el-table-column label="今日已发放金额/剩余金额" align="center">
<template slot-scope="{ row }">
{{ row.todayIssuedAmount }}/{{
accSub(row.singleCustomerReceiveMoney, row.todayIssuedAmount)
}}
{{ row.todayIssuedAmount }}/{{ row.todayIssuedAmount - row.singleCustomerReceiveMoney }}
</template>
</el-table-column>
<el-table-column label="今日已发放次数/剩余次数" align="center">
<template slot-scope="{ row }">
{{ row.todayIssuedNum }}/{{ accSub(row.singleCustomerReceiveNum, row.todayIssuedNum) }}
{{ row.todayIssuedNum }}/{{ row.todayIssuedNum - row.singleCustomerReceiveNum }}
</template>
</el-table-column>
<el-table-column label="累计已发放次数/金额" align="center" width="180">
......@@ -132,7 +130,6 @@
<script>
import { getList, addOrUpdate, remove } from '@/api/redPacketTool/staffManage'
import { accSub } from '@/utils/common'
export default {
name: 'member',
data() {
......@@ -187,7 +184,6 @@ export default {
this.getList()
},
methods: {
accSub,
getList() {
this.loading = true
getList(this.query)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!