taskGroup.vue
3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<script>
import * as api from '@/api/task'
export default {
name: 'Group',
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
taskName: '',
startTime: '',
overTime: '',
fissionType: 1
},
dateRange: [],
tableData: [],
total: 0,
loading: false
}
},
created() {
this.getList()
this.$store.dispatch(
'app/setBusininessDesc',
`
<div>是通过管理员统一下发群发消息的任务,将消息推送给员工,员工点击任务按钮进行发送,将任务裂变海报以 H5 网页链接的形式发送给客户。此方式也会消耗一月四次客户群发触达的次数限制。</div>
`
)
},
methods: {
getList(data) {
this.loading = true
let params = Object.assign({}, this.query, data)
api.getList(params).then(({ rows, total }) => {
this.tableData = rows
this.total = +total
this.loading = false
})
},
resetForm() {},
toDetail(row) {
this.$router.push({
path: `taskDetail?id=${row.id}`
})
},
newAdd() {
this.$router.push({
path: 'addTask'
})
},
toEdit(row) {
this.$router.push({
path: `addTask?id=${row.id}`
})
}
}
}
</script>
<template>
<div class="app-container">
<el-form
ref="queryForm"
:inline="true"
:model="query"
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"
:loading="loading"
@click="getList({ pageNum: 1 })"
>查询</el-button
>
<el-button
v-hasPermi="['customerManage:customer:query']"
type="primary"
@click="newAdd()"
style="background: #FA7216;color: #FFFFFF;border-color:#FA7216"
>新增任务</el-button
>
</el-form-item>
</el-form>
<el-table :data="tableData">
<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="操作" width="120">
<template slot-scope="scope">
<el-button
@click="toDetail(scope.row)"
v-hasPermi="['enterpriseWechat:view']"
size="medium"
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="medium"
type="text"
icon="el-icon-edit-outline"
style="color:#E74E59"
></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></style>