Commit f775eb85 by 前端

新增任务

1 parent 9f27fec7
...@@ -13,9 +13,11 @@ ...@@ -13,9 +13,11 @@
"axios": "^0.18.0", "axios": "^0.18.0",
"dayjs": "^1.11.4", "dayjs": "^1.11.4",
"element-ui": "^2.15.1", "element-ui": "^2.15.1",
"glsx-common": "^2.0.1",
"glsx-vue-common": "^2.0.5", "glsx-vue-common": "^2.0.5",
"lodash": "^4.17.10", "lodash": "^4.17.10",
"sass-loader": "^7.1.0", "node-sass": "4.14.1",
"sass-loader": "7.3.1",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"vue": "^2.5.17" "vue": "^2.5.17"
}, },
...@@ -27,6 +29,6 @@ ...@@ -27,6 +29,6 @@
"eslint-plugin-html": "^4.0.5", "eslint-plugin-html": "^4.0.5",
"less": "^3.0.4", "less": "^3.0.4",
"less-loader": "^4.1.0", "less-loader": "^4.1.0",
"vue-template-compiler": "^2.5.17" "vue-template-compiler": "^2.7.11"
} }
} }
<template>
<div class="ly-emotion">
<slot></slot>
</div>
</template>
<script>
import emoji from '../../utils/emo'
export default {
name: 'ly-emotion',
mounted() {
const name = this.$el.innerHTML
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(name)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
let imgHTML = `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
this.$nextTick(() => {
this.$el.innerHTML = imgHTML
})
}
}
</script>
<style scoped>
.ly-emotion {
display: inline-block;
}
.ly-static-emotion {
width: 24px;
height: 24px;
display: inline-block;
}
</style>
<template>
<div>
<div class="emotion-box" :style="{ height: height + 'px' }">
<div class="emotion-box-line" v-for="(line, i) in list" :key="i">
<Emotion class="emotion-item" v-for="(item, i) in line" :key="i" @click.native="clickHandler(item)">{{ item }}</Emotion>
</div>
</div>
</div>
</template>
<script>
import emoji from '../../utils/emo'
import Emotion from './Emotion'
export default {
props: {
height: {
type: Number,
default: 200
}
},
name: 'emotionWords',
data() {
return {
list: emoji
}
},
methods: {
clickHandler(i) {
let emotion = `${i}`
this.$emit('emotion', emotion)
}
},
components: {
Emotion
}
}
</script>
<style scoped lang="scss">
.emotion-box {
z-index: 2004;
background-color: #fff;
border-radius: 2px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
width: 300px;
box-sizing: border-box;
padding: 5px;
overflow: hidden;
overflow-y: auto;
}
.emotion-box-line {
display: flex;
}
.emotion-item {
flex: 1;
text-align: center;
cursor: pointer;
line-height: 23px;
/deep/ {
img {
width: 24px;
// -webkit-user-select: none;
cursor: default;
pointer-events: none;
}
}
}
</style>
import Vue from 'vue' import Vue from 'vue'
import GLEditor from './GLEditor/index.vue'
// 注意 有些组件使用异步加载会有影响 // 注意 有些组件使用异步加载会有影响
Vue.component('d2-table', () => import('./d2-table/index.vue')) Vue.component('d2-table', () => import('./d2-table/index.vue'))
Vue.component('GLEditor', GLEditor)
const emoji = [
['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴'],
['睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过'],
['酷', '囧', '抓狂', '吐', '微笑', '愉快', '白眼', '傲慢'],
['饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂'],
['疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见'],
['擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠'],
['鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀'],
['西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰'],
['凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀'],
['足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强'],
['弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你'],
['NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈'],
['磕头', '回头', '跳绳', '投降', '挥手', '激动', '街舞', '左太极'],
['右太极', '嘿哈', '捂脸', '奸笑', '机智', '皱眉', '耶', '社会社会'],
['让我看看', '666', '红包', '蜡烛', '烟花', '福', '庆祝', '爆竹']
]
export default emoji
...@@ -2,6 +2,15 @@ ...@@ -2,6 +2,15 @@
<div class="task-contentbox"> <div class="task-contentbox">
<div> <div>
<el-form :inline="true" :model="searchForm"> <el-form :inline="true" :model="searchForm">
<el-form-item label="业务场景:">
<el-select v-model="searchForm.scene" size="small">
<el-option label="全部" value=""></el-option>
<el-option label="1.0新车权益销售" value="0"></el-option>
<el-option label="1.1次新车精品升级" value="1"></el-option>
<el-option label="1.2次新车线上转化" value="2"></el-option>
<el-option label="1.3存量用户众筹" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="商户:"> <el-form-item label="商户:">
<el-input v-model="searchForm.name" size="small" placeholder="请输入商户名称"></el-input> <el-input v-model="searchForm.name" size="small" placeholder="请输入商户名称"></el-input>
</el-form-item> </el-form-item>
...@@ -10,10 +19,11 @@ ...@@ -10,10 +19,11 @@
</el-form-item> </el-form-item>
<el-form-item label="状态:"> <el-form-item label="状态:">
<el-select v-model="searchForm.status" size="small"> <el-select v-model="searchForm.status" size="small">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="启用" value="0"></el-option> <el-option label="未发布" value="0"></el-option>
<el-option label="禁用" value="1"></el-option> <el-option label="已发布" value="1"></el-option>
</el-select> <el-option label="已结束" value="2"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="handleSearch">查询</el-button> <el-button type="primary" size="small" @click="handleSearch">查询</el-button>
...@@ -34,12 +44,13 @@ ...@@ -34,12 +44,13 @@
:pageConf="pageConf" :pageConf="pageConf"
> >
<template slot="auth-button" slot-scope="scope"> <template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button> <el-button type="text" v-if="scope.scope.status == 0" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleViewDetail(scope.scope)">任务分析</el-button> <el-button type="text" v-if="scope.scope.status !== 0" @click="handleViewDetail(scope.scope)">任务分析</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" v-if="scope.scope.status == 0" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleActive(scope.scope)">发布</el-button> <el-button type="text" v-if="scope.scope.status == 0" @click="handleActive(scope.scope)">发布</el-button>
<el-button type="text" @click="handleInactive(scope.scope)">复制</el-button> <el-button type="text" v-if="scope.scope.status == 1" @click="handleInactive(scope.scope)">结束</el-button>
<el-button type="text" @click="handleClone(scope.scope)">克隆</el-button> <el-button type="text" @click="handleClone(scope.scope)">复制</el-button>
<el-button type="text" v-if="scope.scope.status !== 0" @click="handleClone(scope.scope)">查看</el-button>
</template> </template>
</d2-table> </d2-table>
</div> </div>
...@@ -50,6 +61,7 @@ export default { ...@@ -50,6 +61,7 @@ export default {
data() { data() {
return { return {
searchForm: { searchForm: {
scene: '',
name: '', name: '',
code: '', code: '',
status: '' status: ''
...@@ -61,31 +73,22 @@ export default { ...@@ -61,31 +73,22 @@ export default {
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '模板名称', label: '业务场景',
prop: 'templateName', prop: 'scene',
width: 200 width: 200
}, },
{ {
label: '模板编码', label: '商户',
prop: 'templateCode', prop: 'merchant',
width: 250 width: 250
}, },
{ {
label: '任务数', label: '活动/产品',
prop: 'taskNum' prop: 'activity'
},
{
label: '总收益',
prop: 'income'
}, },
{ {
label: '使用门店', label: '任务数',
prop: 'merchantNumber' prop: 'taskNum'
},
{
label: '使用活动',
prop: 'activity',
width: 150
}, },
{ {
label: '创建人', label: '创建人',
...@@ -93,7 +96,8 @@ export default { ...@@ -93,7 +96,8 @@ export default {
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'creatTime' prop: 'creatTime',
width: 150
}, },
{ {
label: '状态', label: '状态',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!