Commit 5025d79c by wenbin_font

'任务宝'

1 parent 2c6f74b2
{
"presets": [
"@babel/preset-env"
]
}
\ No newline at end of file \ No newline at end of file
.DS_Store
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea/
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const htmlTemplateProcess = new HtmlWebpackPlugin({
template:'html-withimg-loader!' + path.resolve(__dirname,'../src/taskProcess.html'),
hash:true,
chunks:['common','taskProcess'],
inject: true,
minify:false,
filename:'taskProcess.html',
})
const htmlTemplateIndex = new HtmlWebpackPlugin({
template:'html-withimg-loader!' + path.resolve(__dirname,'../src/index.html'),
hash:true,
// chunks:['common','list'],
chunks:['common','index'],
inject: true,
minify:false,
filename:'index.html'
})
var dev = {
entry : {
'taskProcess':'./src/js/taskProcess.js',
'index':'./src/js/index.js',
'common':'./src/js/common.js'
},
resolve:{
extensions:['.ts','.tsx','.js','.json']
},
module: {
rules: [
{
test: /\.js$/, // 匹配文件路径的正则表达式,通常我们都是匹配文件类型后缀
exclude: "/node_modules/",
loader: 'babel-loader', // 指定使用的 loader
},
{test:/\.css$/,
exclude: /node_modules/,
// loader:'style-loader!css-loader?modules&localIdentName=[path][name]---[local]---[hash:base64:5]'
use:['style-loader','css-loader']
},
{
test: /\.(png|jpg|gif)$/,
use: [
{
loader: 'file-loader',
options: {
esModule: false,
limit: 5 * 1024,
outputPath: "images",
}
}
]
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
}
},
{
test: /\.html$/,
// html中的img标签
use: ["html-withimg-loader"]
}
],
},
plugins:[
// 全局暴露统一入口
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
'window.jQuery': 'jquery',
}),
htmlTemplateIndex,
htmlTemplateProcess,
new webpack.HotModuleReplacementPlugin(),
]
}
module.exports = dev
\ No newline at end of file \ No newline at end of file
const path = require('path')
const merge = require('webpack-merge');
const common = require('./webpack.common');
var dev = {
output:{
filename: '[name].bundle.js',
path:path.resolve(__dirname,'../','dist'),
// publicPath:'/',
},
devtool:'inline-source-map',
mode:"development",
devServer:{
// contentBase: path.join(__dirname, "../src"),
// publicPath:'/',
// host: "192.168.1.3",
host: "localhost",
port: "3333",
// overlay: true, // 浏览器页面上显示错误
// open: true, // 开启自动打开浏览器
// stats: "errors-only", //stats: "errors-only"表示只打印错误:
hot: true, // 开启热更新
historyApiFallback: true,
disableHostCheck:true,
// host:'0.0.0.0',
// proxy: {
// '/': {
// target: 'http://146.56.222.200',
// changeOrigin: true,
// ws: true,
// pathRewrite: {
// // "^/api": "/"
// }
// }
// }
},
plugins:[
]
}
module.exports = merge(common, dev);
\ No newline at end of file \ No newline at end of file
const path = require('path');
const merge = require('webpack-merge');
const common = require('./webpack.common');
const {CleanWebpackPlugin} = require('clean-webpack-plugin')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
module.exports = merge(common,{
output:{
filename: './js/[name].js',
path:path.resolve(__dirname,'../','dist'),
publicPath:'./',
},
mode:'production',
devtool:'none',
plugins:[
new CleanWebpackPlugin(),
new UglifyJSPlugin(),
]
})
\ 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='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
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
This diff could not be displayed because it is too large.
{
"name": "dashboard-remy",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack-dev-server --config config/webpack.dev.js",
"build": "webpack --config config/webpack.prod.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.10.3",
"@babel/preset-env": "^7.10.3",
"babel-loader": "^8.1.0",
"clean-webpack-plugin": "^3.0.0",
"cross-env": "^7.0.2",
"css-loader": "^3.6.0",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.3.0",
"html-withimg-loader": "^0.1.16",
"style-loader": "^1.2.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^4.1.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "3.11.0",
"webpack-merge": "^4.2.2"
},
"dependencies": {
"jquery": "^3.5.1"
}
}
*{
margin:0;
padding: 0;
}
html,body{
height: 100%;
width: 100%;
}
\ No newline at end of file \ No newline at end of file
.container{
height: 100%;
width: 100%;
background-color: #eeeeee;
}
.posterImg{
width: 100%;
}
.footerLink{
height: 2rem;
width: 100%;
background-color: #ffffff;
position: fixed;
left: 0;
bottom: 0;
display: flex;
justify-content: space-around;
align-items: center;
font-size: .36rem;
}
.sharePic{
background-color: cornflowerblue;
color: #ffffff;
height: 1.5rem;
line-height: 1.5rem;
text-align: center;
padding: 0 .7rem;
border-radius: 10px;
}
.myTaskDetail{
color: cornflowerblue;
}
\ No newline at end of file \ No newline at end of file
.title{
color: #000000;
font-size: 0.5rem;
padding: 1rem .5rem;
padding-bottom:.5rem;
background-color: #fff;
}
.container{
height: 100%;
background-color:rgb(239, 239, 244) ;
}
.generalFont{
color: #909399;
font-size: .3rem;
padding: 0 .5rem;
padding-bottom: .2rem;
}
.container>.generalFont{
background-color: #fff;
}
.generalBox{
background-color:rgb(246, 246, 249) ;
padding: .2rem
}
.listMsg{
display: flex;
margin-bottom: 20px;
}
.listMsg .generalFont{
width: 1.5rem;
margin-right: 30px;
text-align: right;
}
.codeDetail{
font-size: .3rem;
color: #000000;
}
.generalContent{
background-color: #fff;
padding: .5rem;
margin-bottom: .4rem;
}
\ 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='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>
</body>
</html>
\ No newline at end of file \ No newline at end of file
$(function(){
var dpr, rem, scale;
var docEl = document.documentElement;
var fontEl = document.createElement('style');
var metaEl = document.querySelector('meta[name="viewport"]');
dpr = window.devicePixelRatio || 1;
rem = docEl.clientWidth * dpr / 10;
scale = 1 / dpr;
// 设置viewport,进行缩放,达到高清效果
metaEl.setAttribute('content', 'width=' + dpr * docEl.clientWidth + ',initial-scale=' + scale + ',maximum-scale=' + scale + ', minimum-scale=' + scale + ',user-scalable=no');
// 设置data-dpr属性,留作的css hack之用
docEl.setAttribute('data-dpr', dpr);
// 动态写入样式
docEl.firstElementChild.appendChild(fontEl);
fontEl.innerHTML = 'html{font-size:' + rem + 'px!important;}';
window.dpr = dpr;
window.rem = rem;
})
\ No newline at end of file \ No newline at end of file
import '../css/base.css'
import '../css/index.css'
// import request from './request.js'
$(function(){
console.log(1212)
})
\ No newline at end of file \ No newline at end of file
const baseUrl = window.location.origin.includes('localhost') ? window.location.origin : ''
const baseUrl = window.location.origin+'/api'
//https://rm-crm.remycn.com
const request = ({url,params,method='get'})=>{
url = baseUrl + url
return new Promise((relosve,reject)=>{
$.ajax({
url,
data:params,
type:method,
success(res){
relosve(res)
},
error(err){
reject(err)
}
})
})
}
export default request
\ No newline at end of file \ No newline at end of file
import '../css/taskProcess.css'
import '../css/base.css'
$(function(){
console.log('taskProcess')
})
\ 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">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>
</body>
</html>
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
ENV = 'development' ENV = 'development'
# 塬微管理系统/开发环境 # 塬微管理系统/开发环境
VUE_APP_BASE_API = 'http://106.13.201.219' VUE_APP_BASE_API = 'http://146.56.222.200/api'
# VUE_APP_BASE_API = 'http://n3rpzt.natappfree.cc' # VUE_APP_BASE_API = 'http://n3rpzt.natappfree.cc'
# 开发环境IP # 开发环境IP
......
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/fission'
export function getList(params) {
return request({
url: service + '/list',
method: 'get',
params,
})
}
export function addTask (data) {
return request({
url: service + '/add',
method: 'post',
data,
})
}
export function getTaskDetail (id) {
return request({
url: `${service}/getInfo/${id}`,
method: 'get',
})
}
export function sendFission (id) {
return request({
url: `${service}/send/${id}`,
method: 'get',
})
}
\ No newline at end of file \ No newline at end of file
<script>
import {
getTree,
getList,
} from '@/api/material'
export default {
name: 'SelectTag',
components: {},
props: {
// 添加标签显隐
visible: {
type: Boolean,
default: false,
},
title: {
type: String,
default: '选择海报',
},
selected: {
type: Array,
default: () => [],
},
type: {
type: String,
default: 'add',
},
},
data () {
return {
list: [],
total: 0,
listOneArray: [],
selectedGroup: '',
removeTag: [],
Pselected: this.selected,
treeData: [],
attrProps: { value: 'id', label: 'name' },
posterRequestParams: {
mediaType: 5,
pageNum: 1,
pageSize: 10,
categoryId: '',
search: '',
},
selectPoster: {}
}
},
watch: {
type (val) {
val === 'remove' && (this.removeTag = this.selected.slice())
},
selectGroup (value) {
console.log(value)
}
},
computed: {
Pvisible: {
get () {
// this.getTree();
return this.visible
},
set (val) {
this.$emit('update:visible', val)
},
},
page () {
return Math.ceil(this.total / 10)
}
},
created () {
// this.type === 'remove' && (this.removeTag = this.Pselected.slice())
this.getList(this.posterRequestParams)
this.getTree()
},
mounted () { },
methods: {
// 获取类目树
getTree () {
getTree(5).then(({ data }) => {
this.treeData = data
})
},
// 获取素材列表
getList (params) {
this.loading = true
getList(params)
.then(({ rows, total }) => {
this.list = rows
this.total = +total
this.loading = false
})
.catch(() => {
this.loading = false
})
},
selectGroup (value) {
this.posterRequestParams.categoryId = value[value.length - 1]
this.getList(this.posterRequestParams)
},
selctPoster (value) {
this.selectPoster = value
},
decrease () {
if (this.posterRequestParams.pageNum > 1) {
this.posterRequestParams.pageNum -= 1
this.getList(this.posterRequestParams)
}
},
Increase () {
if (Math.ceil(this.total / 10) > this.posterRequestParams.pageNum) {
this.posterRequestParams.pageNum += 1
this.getList(this.posterRequestParams)
}
},
submit () {
this.Pvisible = false
this.$emit('success', this.selectPoster)
},
},
}
</script>
<template>
<el-dialog
:title="title"
:visible.sync="Pvisible"
>
<div>
<div class="selectPosterGroup">
<div>
<span class="mr20">选择分组</span>
<el-cascader
:options="treeData"
:props="attrProps"
@change="selectGroup"
clearable
>
</el-cascader>
</div>
<div class="selectPage">
<span><i
class="el-icon-arrow-left"
@click="decrease"
></i>1/{{page}}<i
class="el-icon-arrow-right"
@click="Increase"
></i></span>
</div>
</div>
<div class="mt20">
<div
class="posterBody"
v-for="(item) in list"
:key="item.id"
@click="selctPoster(item)"
>
<img :src="item.materialUrl" />
<div class="materialName">{{item.materialName}}</div>
<div
class="materialMask"
v-if="item.id === selectPoster.id"
>
<i class="el-icon-success"></i>
</div>
</div>
</div>
<slot></slot>
</div>
<div slot="footer">
<el-button @click="Pvisible = false">取 消</el-button>
<el-button
type="primary"
@click="submit"
>确 定</el-button>
</div>
</el-dialog>
</template>
<style lang="scss" scoped>
.user-list {
.el-row {
line-height: 26px;
}
}
.selectPage {
i {
cursor: pointer;
}
}
.mt20 {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.posterBody {
width: 30%;
border: 1px solid #000;
margin-bottom: 10px;
cursor: pointer;
position: relative;
}
img {
width: 100%;
}
.materialName {
height: 40px;
font-size: 14px;
line-height: 40px;
padding-left: 20px;
border-top: 1px solid #000;
}
.materialMask {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
z-index: 99;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
i {
font-size: 24px;
color: #4185f4;
z-index: 888;
}
}
}
.selectPosterGroup {
display: flex;
justify-content: space-between;
}
</style>
...@@ -463,7 +463,40 @@ export const constantRoutes = [ ...@@ -463,7 +463,40 @@ export const constantRoutes = [
// }, // },
// ] // ]
// }, // },
// {
// path: '/application',
// component: Layout,
// meta: { title: '', icon: 'wechat' },
// children: [
// {
// path: 'taskGroup',
// name: 'taskGroup',
// component: (resolve) => require(['@/views/application/taskGroup'], resolve),
// meta: { title: '任务宝', icon: '' }
// },
// {
// path: 'taskDetail',
// name: 'taskDetail',
// hidden: true,
// component: (resolve) => require(['@/views/application/taskDetail'], resolve),
// meta: { title: '任务详情', icon: '' }
// },
// {
// path: 'editTask',
// name: 'editTask',
// hidden: true,
// component: (resolve) => require(['@/views/application/taskDetail/editTask'], resolve),
// meta: { title: '编辑活动任务', icon: '' }
// },
// {
// path: 'addTask',
// name: 'addTask',
// hidden: true,
// component: (resolve) => require(['@/views/application/taskDetail/addTask'], resolve),
// meta: { title: '新增活动任务', icon: '' }
// },
// ]
// },
{ {
path: "/user", path: "/user",
component: Layout, component: Layout,
......
<script>
import * as api from '@/api/customer/group'
export default {
name: 'editTask',
data () {
return {
query: {
name: "", // "客户名称",
beginTime: "", // "开始时间",
endTime: "" // "结束时间"
},
}
},
created () {
},
mounted () {
},
methods: {
}
}
</script>
<template>
<div class="task-edit-container">
<div class="edit-model">
<h4 class="title">关键数据</h4>
<el-form
:inline="true"
:model="query"
label-width="100px"
class="top-search"
size="small"
>
<el-form-item
label="任务名"
prop="name"
>
<el-input
v-model="query.name"
placeholder="请输入"
></el-input>
</el-form-item>
</el-form>
</div>
</div>
</template>
<style lang="scss" scoped>
.task-edit-container {
background-color: #efeff4;
height: 100%;
.edit-model {
background: #fff;
margin-bottom: 20px;
padding: 20px;
}
.title {
text-align: left;
color: #303133;
}
}
</style>
<script>
import * as api from "@/api/task";
import echarts from 'echarts'
export default {
name: 'taskDetail',
data () {
return {
query: {
pageNum: 1,
pageSize: 10,
name: "", // "客户名称",
beginTime: "", // "开始时间",
endTime: "" // "结束时间"
},
dateRange: [],
tableData: [],
dateSelect: '近7日',
dateRange: [],
taskDetail: {}
}
},
created () {
this.getList(this.$route.query.id)
},
mounted () {
this.initChart()
},
methods: {
getList (id) {
api.getTaskDetail(id)
.then(res => {
this.taskDetail = res.data
})
},
resetForm () {
},
exportCustomer () {
},
dateChange (event) {
console.log(event)
},
initChart () {
this.chartLine = echarts.init(document.getElementById('chartLineBox'));
// 指定图表的配置项和数据
let option = {
tooltip: { //设置tip提示
trigger: 'axis'
},
legend: { //设置区分(哪条线属于什么)
data: ['平均成绩', '学生成绩']
},
color: ['#8AE09F', '#FA6F53'], //设置区分(每条线是什么颜色,和 legend 一一对应)
xAxis: { //设置x轴
type: 'category',
boundaryGap: false, //坐标轴两边不留白
data: ['2019-1-1', '2019-2-1', '2019-3-1', '2019-4-1', '2019-5-1', '2019-6-1', '2019-7-1',],
name: 'DATE', //X轴 name
nameTextStyle: { //坐标轴名称的文字样式
color: '#FA6F53',
fontSize: 16,
padding: [0, 0, 0, 20]
},
axisLine: { //坐标轴轴线相关设置。
lineStyle: {
color: '#FA6F53',
}
}
},
yAxis: {
name: 'SALES VOLUME',
nameTextStyle: {
color: '#FA6F53',
fontSize: 16,
padding: [0, 0, 10, 0]
},
axisLine: {
lineStyle: {
color: '#FA6F53',
}
},
type: 'value'
},
series: [
{
name: '平均成绩',
data: [220, 232, 201, 234, 290, 230, 220],
type: 'line', // 类型为折线图
lineStyle: { // 线条样式 => 必须使用normal属性
normal: {
color: '#8AE09F',
}
},
},
{
name: '学生成绩',
data: [120, 200, 150, 80, 70, 110, 130],
type: 'line',
lineStyle: {
normal: {
color: '#FA6F53',
}
},
}
]
}
this.chartLine.setOption(option)
}
}
}
</script>
<template>
<div class="task-detail-container">
<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-value">{{taskDetail.createBy}}</div>
</div>
<div class="task-row">
<div class="task-label">活动名称:</div>
<div class="task-value">{{taskDetail.taskName}}</div>
</div>
<div class="task-row">
<div class="task-label">裂变引导语:</div>
<div class="task-value">{{taskDetail.fissInfo}}</div>
</div>
<div class="task-row">
<div class="task-label">裂变客户数量:</div>
<div class="task-value">{{taskDetail.fissNum}}人</div>
</div>
<div class="task-row" style="margin-bottom:30px">
<div class="task-label">活动时间:</div>
<div class="task-value">{{taskDetail.startTime}}至{{taskDetail.overTime}}</div>
</div>
<div class="task-row">
<div class="task-label">活动发起成员:</div>
<div class="task-value"></div>
</div>
<div class="task-row" style="margin-bottom:30px">
<div class="task-label">客户标签:</div>
<div class="task-value">{{taskDetail.customerTag}}</div>
</div>
<div class="task-row" >
<div class="task-label">裂变海报:</div>
<img style="width:30px" :src="taskDetail.postersUrl"/>
</div>
<div class="task-row" style="margin-bottom:30px">
<div class="task-label">员工:</div>
<div class="task-value">{{taskDetail.fissionTarget}}</div>
</div>
<div class="task-row">
<div class="task-label">兑奖链接:</div>
<div class="task-value">{{taskDetail.rewardUrl}}</div>
</div>
<div class="task-row" style="margin-bottom:30px">
<div class="task-label">兑奖图片:</div>
<img style="width:30px" :src="taskDetail.rewardImageUrl"/>
</div>
<div class="task-row">
<div class="task-label">新客欢迎语:</div>
<div class="task-value">{{taskDetail.welcomeMsg}}</div>
</div>
</div>
<div class="task-detail-model task-detail-right">
<h4 class="title">关键数据</h4>
<div class="dateRang">
<el-radio-group
@change='dateChange'
v-model="dateSelect"
>
<el-radio-button label="近7日"></el-radio-button>
<el-radio-button label="近30日"></el-radio-button>
</el-radio-group>
<el-date-picker
v-model="dateRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"
></el-date-picker>
</div>
<div
id="chartLineBox"
style="width: 100%;height: 354px;"
> </div>
</div>
</div>
</template>
<style lang="scss" scoped>
.task-detail-container {
display: flex;
justify-content: space-between;
background: #efeff4;
height: calc(100vh - 84px);
box-sizing: border-box;
padding: 20px 10px;
.task-detail-model {
width: 48%;
height: 100%;
box-sizing: border-box;
background: #fff;
padding: 10px 20px;
.task-row {
display: flex;
color: #606266;
font-size: 14px;
margin-bottom: 10px;
}
.task-label {
width: 100px;
text-align: right;
margin-right: 10px;
}
.title {
color: #303133;
text-align: left;
}
.dateRang {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
#chartLineBox {
margin-top: 10px;
}
}
}
</style>
<script>
import * as api from "@/api/task";
export default {
name: 'Group',
data () {
return {
query: {
pageNum: 1,
pageSize: 10,
taskName: "",
startTime: "",
overTime: ""
},
dateRange: [],
tableData: [],
total:0
}
},
created () {
this.getList()
},
methods: {
getList (data) {
let params = Object.assign({},this.query,data)
api.getList(params)
.then(({ rows, total }) => {
this.tableData = rows;
this.total = +total;
})
},
resetForm () {
},
toDetail(row){
this.$router.push({
path: `/application/taskDetail?id=${row.id}`,
})
},
newAdd () {
this.$router.push({
path: '/application/addTask',
})
},
toEdit(row){
this.$router.push({
path: `/application/addTask?id=${row.id}`,
})
}
},
}
</script>
<template>
<div class="app-container">
<el-form
ref="queryForm"
:inline="true"
:model="query"
label-width="100px"
class="top-search"
size="small"
>
<el-form-item
label="任务名"
prop="taskName"
>
<el-input
v-model="query.taskName"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="添加日期">
<el-date-picker
v-model="dateRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"
></el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button
v-hasPermi="['customerManage:customer:query']"
type="primary"
@click="getList({pageNum:1})"
>查询</el-button>
<el-button
v-hasPermi="['customerManage:customer:query']"
type="primary"
@click="newAdd()"
>新增任务</el-button>
</el-form-item>
</el-form>
<el-table
:data="tableData"
border
style="width: 100%"
>
<el-table-column
prop="taskName"
label="任务活动名称"
>
</el-table-column>
<el-table-column
prop="fissNum"
label="裂变客户数量"
>
</el-table-column>
<el-table-column
prop="fissStatus"
label="活动状态"
>
<template slot-scope="scope">
<p>{{ scope.row.fissStatus===1?'进行中':'已结束' }}</p>
</template>
</el-table-column>
<el-table-column
prop="startTime"
label="活动时间"
>
<template slot-scope="scope">
<p>{{ scope.row.startTime}}-{{scope.row.overTime}}</p>
</template>
</el-table-column>
<el-table-column
prop="operation"
label="操作"
>
<template slot-scope="scope">
<el-button
@click="toDetail(scope.row)"
v-hasPermi="['enterpriseWechat:view']"
size="mini"
type="text"
icon="el-icon-view"
>查看</el-button>
<el-button
v-if="scope.row.fissStatus!=2"
@click="toEdit(scope.row)"
v-hasPermi="['enterpriseWechat:edit']"
size="mini"
type="text"
icon="el-icon-edit"
>编辑</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
</div>
</template>
<style lang="scss" scoped>
.mid-action {
display: flex;
justify-content: space-between;
margin: 10px 0;
align-items: center;
.total {
background-color: rgba(65, 133, 244, 0.1);
border: 1px solid rgba(65, 133, 244, 0.2);
border-radius: 3px;
font-size: 14px;
min-height: 32px;
line-height: 32px;
padding: 0 12px;
color: #606266;
}
.num {
color: #00f;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!