Commit 26d72942 by 闻闻闻

'H5更新'

1 parent d9e5c81c
...@@ -24,16 +24,17 @@ var dev = { ...@@ -24,16 +24,17 @@ var dev = {
historyApiFallback: true, historyApiFallback: true,
disableHostCheck:true, disableHostCheck:true,
// host:'0.0.0.0', // host:'0.0.0.0',
// proxy: { proxy: {
// '/': { '/': {
// target: 'http://146.56.222.200', // target: 'http://119.45.28.29:8090',
// changeOrigin: true, target:'http://47.112.117.15:40001',
changeOrigin: true,
// ws: true, // ws: true,
// pathRewrite: { pathRewrite: {
// // "^/api": "/" // "^/api": "/"
// } }
// } }
// } }
}, },
plugins:[ plugins:[
......
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no"> <title>linke-wechat</title></head><body> <div class="container"> <img src='https://link-wechat-1251309172.cos.ap-nanjing.myqcloud.com/2021/03/01/77dc22bf-e483-45f0-86fa-d19a85b6e355.jpg' class='posterImg'/> <div class="footerLink"> <div class="sharePic">分享图片</div> <div class="myTaskDetail">我的邀请任务进度</div> </div> </div><script src="././js/index.js?6efe79dd0895e28350ab"></script><script src="././js/common.js?6efe79dd0895e28350ab"></script></body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no"> <title>linke-wechat</title></head><body> <div class="container"> <img src='' class='posterImg'/> <div class="footerLink"> <div class="sharePic" >分享图片</div> <div class="myTaskDetail">我的邀请任务进度</div> </div> </div><script src="././js/index.js?9324f30095f7c820962d"></script><script src="././js/common.js?9324f30095f7c820962d"></script></body></html>
\ No newline at end of file \ No newline at end of file
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>任务进度查询</title></head><body> <div class='container'> <div class="title">活动兑奖</div> <div class="generalFont">任务完成后显示兑换码</div> <div class="generalContent"> <div class="generalBox"> <div class="listMsg"> <div class="generalFont">兑换码</div> <div class="codeDetail">1024</div> </div> <div class="listMsg"> <div class="generalFont">兑换链接</div> <div class="codeDetail">www.baidu.com</div> </div> <div class="listMsg"> <div class="generalFont">兑奖图片</div> <div class="codeDetail">1024</div> </div> </div> </div> <div class="title">邀请列表</div> <div class="generalFont">您已邀请2人,还差0人,即可领奖</div> </div><script src="././js/taskProcess.js?6efe79dd0895e28350ab"></script><script src="././js/common.js?6efe79dd0895e28350ab"></script></body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>任务进度查询</title></head><body> <div class='container'> <div class="title">活动兑奖</div> <div class="generalFont">任务完成后显示兑换码</div> <div class="generalContent"> <div class="generalBox"> <div class="listMsg"> <div class="generalFont">兑换链接</div> <div class="codeDetail codeLink"></div> </div> <div class="listMsg"> <div class="generalFont">兑奖图片</div> <!-- <div class="codeDetail codeImg">1024</div> --> <img class="codeDetail codeImg" src=''/> </div> <div class="listMsg"> <div class="generalFont">兑换规则</div> <div class="codeDetail codeNum"></div> </div> </div> </div> <div class="title">邀请列表</div> <div class="generalFont">您已邀请<span class="completeNum"></span>人,还差<span class="loseNum"></span>人,即可领奖</div> <div class="customersBox"> <!-- <div class='customersList'> <img src='' class='customersImg'/> <span>2020-01-03 00:00:00</span> <span class="customersSuccess">邀请成功</span> </div> --> </div> <div class="activityPoster"> <div>活动海报</div> <img src='' class='activityPosterImg'/> </div> </div><script src="././js/taskProcess.js?9324f30095f7c820962d"></script><script src="././js/common.js?9324f30095f7c820962d"></script></body></html>
\ No newline at end of file \ No newline at end of file
......
...@@ -40,3 +40,37 @@ ...@@ -40,3 +40,37 @@
padding: .5rem; padding: .5rem;
margin-bottom: .4rem; margin-bottom: .4rem;
} }
.codeImg{
height: 1rem;
}
.customersList{
display: flex;
align-items: center;
font-size: .4rem;
background-color:rgb(246, 246, 249) ;
padding: .2rem;
}
.customersBox{
padding: .5rem;
background-color: #fff;
}
.customersSuccess{
flex:1;
text-align: right;
color: rgb(163, 269, 131);
}
.customersImg{
height: 1rem;
border-radius: 50%;
margin-right: .2rem;
}
.activityPoster{
padding:.5rem ;
font-size: .5rem;
background-color: #fff;
margin-top: .5rem;
}
.activityPosterImg{
width: 100%;
margin-top: .5rem;
}
\ No newline at end of file \ No newline at end of file
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<img src='https://link-wechat-1251309172.cos.ap-nanjing.myqcloud.com/2021/03/01/77dc22bf-e483-45f0-86fa-d19a85b6e355.jpg' class='posterImg'/> <img src='' class='posterImg'/>
<div class="footerLink"> <div class="footerLink">
<div class="sharePic">分享图片</div> <div class="sharePic" >分享图片</div>
<div class="myTaskDetail">我的邀请任务进度</div> <div class="myTaskDetail">我的邀请任务进度</div>
</div> </div>
</div> </div>
......
import request from './request'
export function getPoster(params){
return request('/wecom/fission/poster',params,'post')
}
export function getCustomerList(params){
return request(`/wecom/fission/${params.fissionId}/progress/${params.eid}`,null,'get')
}
export function getReward(params){
return request(`/wecom/reward/getRewardByFissionId/${params.fissionId}/${params.eid}`,null,'get')
}
export function getUserInfo(params) {
return request(`/wecom/user/getUserInfo`,params,'get')
}
// export function getReward(params) {
// return request(`wecom/reward/getRewardByFissionId/${params.fissionId}/${params.eid}`,null,'get')
// }
\ No newline at end of file \ No newline at end of file
...@@ -19,5 +19,8 @@ $(function(){ ...@@ -19,5 +19,8 @@ $(function(){
window.dpr = dpr; window.dpr = dpr;
window.rem = rem; window.rem = rem;
}) })
const config = {
code:''
}
export default config
\ No newline at end of file \ No newline at end of file
import '../css/base.css' import '../css/base.css'
import '../css/index.css' import '../css/index.css'
// import request from './request.js' import {getPoster,getUserInfo} from './api'
import {getUrlParam,getWxCode} from './utils'
import config from './contant'
$(function(){ $(function(){
console.log(1212) getWxCode()
//code, agentId
const fissionTargetId = getUrlParam('fissionTargetId');
const posterId = getUrlParam('posterId');
const taskFissionId = getUrlParam('taskFissionId');
const agentId = getUrlParam('agentId');
const code = config.code
let eid = ''
try {
getUserInfo({code,agentId})
.then(res=>{
let data = res.data;
eid = data.external_userid
getPoster({fissionTargetId,posterId,taskFissionId,eid})
.then(res=>{
$('.posterImg').attr('src',res.data.postersUrl)
localStorage.setItem('postersUrl',res.data.postersUrl)
})
})
} catch (error) {
console.log(error)
}
$('.sharePic').click(function(){
alert('长按图片在弹出菜单中发送给朋友或者可保存图片分享至朋友圈')
});
$('.myTaskDetail').click(function(){
window.location.href = `/taskProcess.html?eid=${eid}&taskFissionId=${taskFissionId}`
});
}) })
const baseUrl = window.location.origin.includes('localhost') ? window.location.origin : '' const baseUrl = window.location.origin.includes('localhost') ? window.location.origin : 'http://106.13.201.219'
const baseUrl = window.location.origin+'/api' // const baseUrl = window.location.origin+'/mock/11'
//https://rm-crm.remycn.com // const baseUrl = 'http://47.112.117.15:40001/mock/11'
const request = ({url,params,method='get'})=>{ const request = (url,params,method='get')=>{
url = baseUrl + url url = baseUrl + url
return new Promise((relosve,reject)=>{ return new Promise((relosve,reject)=>{
$.ajax({ $.ajax({
headers: {
"Authorization":'Bearer eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2MTcyNjk4NzQsImxvZ2luX3VzZXJfa2V5IjoiYzhiZGE0NWEtMTdiNC00YjU2LTk1MzItNmFkMDdhM2UyZTI0In0.-ZFDrpsAL_bE4kLi5yyrpxBhqd5v7ekfbAB47_Rpn_aLaOKCPHCKGa9UCNtWgf2Itu3hb2o_9otVnwku9GbG4g',
},
url, url,
data:params, data:params,
dataType:"json",
type:method, type:method,
success(res){ success(res){
// if(res.code !== 200){
// alert(res.msg)
// }
relosve(res) relosve(res)
}, },
error(err){ error(err){
......
import '../css/taskProcess.css' import '../css/taskProcess.css'
import '../css/base.css' import '../css/base.css'
import {getCustomerList,getReward} from './api'
import {getUrlParam} from './utils'
// const data = {
// total:12,
// completed:9,
// customers:[
// {
// createTime:'string' ,
// updateTime:'string',
// externalUserid:'string',
// name:'string',
// avatar:'https://link-wechat-1251309172.cos.ap-nanjing.myqcloud.com/2021/03/01/77dc22bf-e483-45f0-86fa-d19a85b6e355.jpg',
// type:'number',
// gender:'number',
// isOpenChat:'number'
// }
// ]
// }
$(function(){ $(function(){
console.log('taskProcess') const postersUrl = localStorage.getItem('postersUrl')
$('.activityPosterImg').attr('src',postersUrl)
const fissionId = getUrlParam('taskFissionId');
const eid = getUrlParam('eid');
getCustomerList({fissionId,eid})
.then(res=>{
let data = res.data
let htmlStr = ''
data.customers.forEach(item=>{
htmlStr += "<div class='customersList'>"
+"<img src="+item.avatar+" class='customersImg'/>"
+"<span class=''>"+item.createTime+"</span>"
+"<span class='customersSuccess'>邀请成功</span>"
+"</div>"
})
$('.completeNum').text(data.total)
$('.loseNum').text((data.total - data.completed))
$('.customersBox').html(htmlStr)
})
getReward({fissionId,eid})
.then(res=>{
let data = res.data
$('.codeNum').text(data.rewardRule)
$('.codeLink').text(data.rewardUrl)
$('.codeImg').attr('src',data.rewardImageUrl)
})
}) })
import config from './contant'
export function getUrlParam (name) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
let r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
}
export function getWxCode(){
let appid = "ww38152475d1bca752";
let code = getUrlParam("code"); //是否存在code
let local = window.location.origin.includes('localhost')?'http://www.linkwechat.cn/': window.location.href;
// let local = 'http://h5.x*****o.com/'
if (code == null || code === "") {
//不存在就打开上面的地址进行授权
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect
`
// window.location.href =
// `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect`;
}else{
config.code = code
}
}
\ No newline at end of file \ No newline at end of file
...@@ -12,21 +12,33 @@ ...@@ -12,21 +12,33 @@
<div class="generalContent"> <div class="generalContent">
<div class="generalBox"> <div class="generalBox">
<div class="listMsg"> <div class="listMsg">
<div class="generalFont">兑换码</div>
<div class="codeDetail">1024</div>
</div>
<div class="listMsg">
<div class="generalFont">兑换链接</div> <div class="generalFont">兑换链接</div>
<div class="codeDetail">www.baidu.com</div> <div class="codeDetail codeLink"></div>
</div> </div>
<div class="listMsg"> <div class="listMsg">
<div class="generalFont">兑奖图片</div> <div class="generalFont">兑奖图片</div>
<div class="codeDetail">1024</div> <!-- <div class="codeDetail codeImg">1024</div> -->
<img class="codeDetail codeImg" src=''/>
</div>
<div class="listMsg">
<div class="generalFont">兑换规则</div>
<div class="codeDetail codeNum"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="title">邀请列表</div> <div class="title">邀请列表</div>
<div class="generalFont">您已邀请2人,还差0人,即可领奖</div> <div class="generalFont">您已邀请<span class="completeNum"></span>人,还差<span class="loseNum"></span>人,即可领奖</div>
<div class="customersBox">
<!-- <div class='customersList'>
<img src='' class='customersImg'/>
<span>2020-01-03 00:00:00</span>
<span class="customersSuccess">邀请成功</span>
</div> -->
</div>
<div class="activityPoster">
<div>活动海报</div>
<img src='' class='activityPosterImg'/>
</div>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -31,3 +31,19 @@ export function getList(params) { ...@@ -31,3 +31,19 @@ export function getList(params) {
method: 'get', method: 'get',
}) })
} }
export function getStat(params) {
return request({
url: service + '/stat',
method: 'get',
params,
})
}
export function editTask (data) {
return request({
url: service + '/edit',
method: 'put',
data,
})
}
\ No newline at end of file \ No newline at end of file
...@@ -463,40 +463,40 @@ export const constantRoutes = [ ...@@ -463,40 +463,40 @@ export const constantRoutes = [
// }, // },
// ] // ]
// }, // },
// { {
// path: '/application', path: '/application',
// component: Layout, component: Layout,
// meta: { title: '', icon: 'wechat' }, meta: { title: '', icon: 'wechat' },
// children: [ children: [
// { {
// path: 'taskGroup', path: 'taskGroup',
// name: 'taskGroup', name: 'taskGroup',
// component: (resolve) => require(['@/views/application/taskGroup'], resolve), component: (resolve) => require(['@/views/application/taskGroup'], resolve),
// meta: { title: '任务宝', icon: '' } meta: { title: '任务宝', icon: '' }
// }, },
// { {
// path: 'taskDetail', path: 'taskDetail',
// name: 'taskDetail', name: 'taskDetail',
// hidden: true, hidden: true,
// component: (resolve) => require(['@/views/application/taskDetail'], resolve), component: (resolve) => require(['@/views/application/taskDetail'], resolve),
// meta: { title: '任务详情', icon: '' } meta: { title: '任务详情', icon: '' }
// }, },
// { {
// path: 'editTask', path: 'editTask',
// name: 'editTask', name: 'editTask',
// hidden: true, hidden: true,
// component: (resolve) => require(['@/views/application/taskDetail/editTask'], resolve), component: (resolve) => require(['@/views/application/taskDetail/editTask'], resolve),
// meta: { title: '编辑活动任务', icon: '' } meta: { title: '编辑活动任务', icon: '' }
// }, },
// { {
// path: 'addTask', path: 'addTask',
// name: 'addTask', name: 'addTask',
// hidden: true, hidden: true,
// component: (resolve) => require(['@/views/application/taskDetail/addTask'], resolve), component: (resolve) => require(['@/views/application/taskDetail/addTask'], resolve),
// meta: { title: '新增活动任务', icon: '' } meta: { title: '新增活动任务', icon: '' }
// }, },
// ] ]
// }, },
{ {
path: "/user", path: "/user",
component: Layout, component: Layout,
......
...@@ -27,7 +27,8 @@ export default { ...@@ -27,7 +27,8 @@ export default {
fissionTargetId: '', fissionTargetId: '',
welcomeMsg: '', welcomeMsg: '',
rewardUrl: '', rewardUrl: '',
rewardImageUrl: '' rewardImageUrl: '',
rewardRule: ''
}, },
rewardImageUrlTemp: '', rewardImageUrlTemp: '',
action: action:
...@@ -55,12 +56,14 @@ export default { ...@@ -55,12 +56,14 @@ export default {
dialogVisibleSelectPoster: false, dialogVisibleSelectPoster: false,
dialogVisibleTargetStff: false, dialogVisibleTargetStff: false,
selectTagType: '', selectTagType: '',
pageType: 'add' pageType: 'add',
taskDetail: {}
} }
}, },
created () { created () {
if (this.$route.query.id) { if (this.$route.query.id) {
this.pageType = 'edit'
this.getList(this.$route.query.id)
} }
}, },
mounted () { mounted () {
...@@ -106,6 +109,20 @@ export default { ...@@ -106,6 +109,20 @@ export default {
} }
delete params.tagType delete params.tagType
params.fissionType = 1 params.fissionType = 1
if(this.pageType == 'add'){
this.addTaskRequest(params)
}else{
params['id'] = this.$route.query.id
this.editTaskRequest(params)
}
})
} catch (error) {
}
},
addTaskRequest (params) {
taskApi.addTask(params) taskApi.addTask(params)
.then(res => { .then(res => {
if (res.code == 200) { if (res.code == 200) {
...@@ -118,16 +135,54 @@ export default { ...@@ -118,16 +135,54 @@ export default {
// //
}) })
}) },
} catch (error) { editTaskRequest(params){
taskApi.editTask(params)
.then(res => {
if (res.code == 200) {
this.$message({
message: '修改成功',
type: 'success'
});
// taskApi.sendFission(JSON.parse(res.msg).id)
} }
//
})
}, },
changeType () { changeType () {
// console.log(this.groupForm.sendType) // console.log(this.groupForm.sendType)
// this.groupForm.taskFissionStaffs = [] // this.groupForm.taskFissionStaffs = []
}, },
getList (id) {
taskApi.getTaskDetail(id)
.then(res => {
this.taskDetail = res.data
console.log(res.data)
let query = {
taskName: res.data.taskName,
fissInfo: res.data.fissInfo,
fissNum: res.data.fissNum,
dateRange: [res.data.startTime + ' 00:00:00', res.data.overTime + ' 00:00:00'],
}
this.query = query
this.groupForm = {
taskFissionStaffs: res.data.taskFissionStaffs,
sendType: (res.data.taskFissionStaffs.length && res.data.taskFissionStaffs[0].staffId) ? 1 : 0,
customerTag: res.data.customerTagId == 'all' ? '' : res.data.customerTag.split(','),
customerTagId: res.data.customerTagId == 'all' ? 'all' : '',
tagType: res.data.customerTagId == 'all' ? 0 : 1,
postersId: res.data.postersId,
postersUrl: res.data.postersUrl,
fissionTarget: res.data.fissionTarget,
fissionTargetId: res.data.fissionTargetId,
welcomeMsg: res.data.welcomeMsg,
rewardUrl: res.data.rewardUrl,
rewardImageUrl: res.data.rewardImageUrl,
rewardRule: res.data.rewardRule
}
})
},
changeTagType () { changeTagType () {
}, },
...@@ -149,7 +204,6 @@ export default { ...@@ -149,7 +204,6 @@ export default {
} }
return selectParam return selectParam
}) })
console.log(this.taskFissionStaffs)
}, },
submitSelectTag (value) { submitSelectTag (value) {
let tagIds = [], tagName = [] let tagIds = [], tagName = []
...@@ -458,7 +512,7 @@ export default { ...@@ -458,7 +512,7 @@ export default {
<el-button <el-button
type="primary" type="primary"
@click="submitForm()" @click="submitForm()"
>立即创建</el-button> >{{pageType=='edit'?'立即修改':'立即创建'}}</el-button>
<!-- 选择使用员工弹窗 --> <!-- 选择使用员工弹窗 -->
<SelectUser <SelectUser
...@@ -498,7 +552,7 @@ export default { ...@@ -498,7 +552,7 @@ export default {
<style lang="scss" > <style lang="scss" >
.task-edit-container { .task-edit-container {
background-color: #efeff4; background-color: #efeff4;
height: 100%; // height: 100%;
.edit-model { .edit-model {
background: #fff; background: #fff;
margin-bottom: 20px; margin-bottom: 20px;
......
<script> <script>
import * as api from "@/api/task"; import * as api from "@/api/task";
import echarts from 'echarts' import echarts from 'echarts'
export default { export default {
name: 'taskDetail', name: 'taskDetail',
data () { data () {
...@@ -17,33 +16,26 @@ export default { ...@@ -17,33 +16,26 @@ export default {
tableData: [], tableData: [],
dateSelect: '近7日', dateSelect: '近7日',
dateRange: [], dateRange: [],
taskDetail: {} taskDetail: {},
statData:[]
} }
}, },
created () { created () {
this.getList(this.$route.query.id) this.getList(this.$route.query.id)
this.getChartsData({seven:true})
}, },
mounted () { mounted () {
this.initChart()
},
methods: {
getList (id) {
api.getTaskDetail(id)
.then(res => {
this.taskDetail = res.data
})
}, },
resetForm () { watch:{
statData:{
}, handler(newVal,oldVal){
exportCustomer () { let xData=[],attends=[],completes=[],increases=[]
for(let i =0;i<newVal.length;i++){
}, xData.push(newVal[i].day)
dateChange (event) { attends.push(newVal[i].attend)
console.log(event) completes.push(newVal[i].complete)
}, increases.push(newVal[i].increase)
initChart () { }
this.chartLine = echarts.init(document.getElementById('chartLineBox'));
// 指定图表的配置项和数据 // 指定图表的配置项和数据
let option = { let option = {
tooltip: { //设置tip提示 tooltip: { //设置tip提示
...@@ -51,43 +43,41 @@ export default { ...@@ -51,43 +43,41 @@ export default {
}, },
legend: { //设置区分(哪条线属于什么) legend: { //设置区分(哪条线属于什么)
data: ['平均成绩', '学生成绩'] data: ['日新增客户数', '活动参与客户数','完成任务的客户数']
}, },
color: ['#8AE09F', '#FA6F53'], //设置区分(每条线是什么颜色,和 legend 一一对应) color: ['#8AE09F', '#FA6F53','#1890ff'], //设置区分(每条线是什么颜色,和 legend 一一对应)
xAxis: { //设置x轴 xAxis: { //设置x轴
type: 'category', type: 'category',
boundaryGap: false, //坐标轴两边不留白 boundaryGap: false, //坐标轴两边不留白
data: ['2019-1-1', '2019-2-1', '2019-3-1', '2019-4-1', '2019-5-1', '2019-6-1', '2019-7-1',], data: xData,
name: 'DATE', //X轴 name // name: '日期', //X轴 name
nameTextStyle: { //坐标轴名称的文字样式 nameTextStyle: { //坐标轴名称的文字样式
color: '#FA6F53',
fontSize: 16, fontSize: 16,
padding: [0, 0, 0, 20] // padding: [0, 0, 0, 20]
}, },
axisLine: { //坐标轴轴线相关设置。 // axisLine: { //坐标轴轴线相关设置。
lineStyle: { // lineStyle: {
color: '#FA6F53', // color: '#FA6F53',
} // }
} // }
}, },
yAxis: { yAxis: {
name: 'SALES VOLUME',
nameTextStyle: { nameTextStyle: {
color: '#FA6F53', color: '#FA6F53',
fontSize: 16, fontSize: 16,
padding: [0, 0, 10, 0] padding: [0, 0, 10, 0]
}, },
axisLine: { // axisLine: {
lineStyle: { // lineStyle: {
color: '#FA6F53', // color: '#FA6F53',
} // }
}, // },
type: 'value' type: 'value'
}, },
series: [ series: [
{ {
name: '平均成绩', name: '日新增客户数',
data: [220, 232, 201, 234, 290, 230, 220], data: increases,
type: 'line', // 类型为折线图 type: 'line', // 类型为折线图
lineStyle: { // 线条样式 => 必须使用normal属性 lineStyle: { // 线条样式 => 必须使用normal属性
normal: { normal: {
...@@ -96,8 +86,18 @@ export default { ...@@ -96,8 +86,18 @@ export default {
}, },
}, },
{ {
name: '学生成绩', name: '活动参与客户数',
data: [120, 200, 150, 80, 70, 110, 130], data: attends,
type: 'line',
lineStyle: {
normal: {
color: '#FA6F53',
}
},
},
{
name: '完成任务的客户数',
data: completes,
type: 'line', type: 'line',
lineStyle: { lineStyle: {
normal: { normal: {
...@@ -108,6 +108,38 @@ export default { ...@@ -108,6 +108,38 @@ export default {
] ]
} }
this.initChart(option)
}
}
},
methods: {
getList (id) {
api.getTaskDetail(id)
.then(res => {
this.taskDetail = res.data
})
},
getChartsData(params){
params = Object.assign({},params,{taskFissionId:this.$route.query.id})
api.getStat(params)
.then(res => {
this.statData = res.data ? res.data.data : []
})
},
resetForm () {
},
exportCustomer () {
},
dateChange (event) {
console.log(event)
},
initChart (option) {
if(!this.chartLine){
this.chartLine = echarts.init(document.getElementById('chartLineBox'));
}
this.chartLine.setOption(option) this.chartLine.setOption(option)
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!