提交 901da092 authored 作者: 王诒正's avatar 王诒正

案例删除与跳转页面的优化

上级 8833913d
...@@ -189,7 +189,13 @@ export default { ...@@ -189,7 +189,13 @@ export default {
api.caseList({ level: parseInt(this.activeName) }).then(res => { api.caseList({ level: parseInt(this.activeName) }).then(res => {
console.log(res) console.log(res)
if (res.code === 0) { if (res.code === 0) {
if (this.activeName === '1') {
this.tableData1 = res.data
} else if (this.activeName === '2') {
this.tableData2 = res.data this.tableData2 = res.data
} else {
this.tableData3 = res.data
}
} }
}).catch(error => { }).catch(error => {
console.log(error) console.log(error)
...@@ -201,7 +207,11 @@ export default { ...@@ -201,7 +207,11 @@ export default {
case 'reach': case 'reach':
break break
case 'group': case 'group':
break this.$router.push({
name: 'group-list',
params: opera.row
})
return true
case 'detail': case 'detail':
this.$router.push({ this.$router.push({
name: 'case-detail', name: 'case-detail',
......
<template>
<div>
<div>
<el-card class="box-card">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item :to="{ name: 'case-list', params: { level: this.$route.params.level.toString() } }">案例背景</el-breadcrumb-item>
<el-breadcrumb-item :to="{ name: 'group-list' }">用户群</el-breadcrumb-item>
</el-breadcrumb>
</el-card>
</div>
<div>
<el-card class="box-card">
<span>当前案例: {{ this.$route.params.name }}</span>
</el-card>
<el-card class="box-card">
<el-row>
<el-button size="mini" icon="el-icon-plus" type="success">
<router-link :to="{ name: 'group-add', params: { caseInfo: this.$route.params } }"> 添加 </router-link>
</el-button>
</el-row>
</el-card>
<el-card class="box-card">
<el-table
:data="tableData"
border
style="width: 100%">
<el-table-column
fixed
prop="created_at"
label="日期">
</el-table-column>
<el-table-column label="图片">
<template slot-scope="scope">
<div class="demo-image__placeholder">
<div class="block">
<el-image fit="scale-down" :src="scope.row.poster_url">
<div slot="placeholder" class="image-slot">
加载中<span class="dot">...</span>
</div>
</el-image>
</div>
</div>
</template>
</el-table-column>
<el-table-column
prop="name"
label="案例名称">
</el-table-column>
<el-table-column
prop="username"
label="姓名">
</el-table-column>
<el-table-column
prop="department"
label="部门">
</el-table-column>
<el-table-column
prop="position"
label="职位">
</el-table-column>
<el-table-column
prop="product"
label="营销产品">
</el-table-column>
<el-table-column
fixed="right"
label="操作">
<template slot-scope="scope">
<el-select size="mini" :value="opera" @change="operation" placeholder="请选择">
<el-option :value="{ tag: 'reach', row: scope.row }" label="触达方案"></el-option>
<el-option :value="{ tag: 'group', row: scope.row }" label="用户群"></el-option>
<el-option :value="{ tag: 'detail', row: scope.row }" label="详情"></el-option>
<el-option :value="{ tag: 'delete', row: scope.row }" label="删除"></el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</div>
</template>
<script>
export default {
name: 'cgroup-index',
data () {
return {}
},
methods: {
}
}
</script>
<style>
</style>
import Layout from '@/components/layout' import Layout from '@/components/layout'
// 用户分组 // 案例-用户分组
const userGroup = [ const userGroup = [
/* 首页 */ /* 首页 */
{ path: '/yhfq', redirect: '/yhfq/albj' }, { path: '/yhfq', redirect: '/yhfq/albj' },
{ path: '/yhfq/albj', name: 'case-list', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/albj') }, { path: '/yhfq/albj', name: 'case-list', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/albj') },
{ path: '/yhfq/albj/detail', name: 'case-detail', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/albj/detail') }, { path: '/yhfq/albj/detail', name: 'case-detail', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/albj/detail') },
{ path: '/yhfq/albj/add', name: 'case-add', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/albj/add') }, { path: '/yhfq/albj/add', name: 'case-add', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/albj/add') },
{ path: '/yhfq/groups', name: 'group-list', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/cgroup/index') },
{ path: '/albj', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/albj') }, { path: '/albj', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/albj') },
{ path: '/yhfq/alfx', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/alfx') }, { path: '/yhfq/alfx', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/alfx') },
{ path: '/yhfq/yhqfx', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/yhqfx') } { path: '/yhfq/yhqfx', component: () => import(/* webpackChunkName: "usergroup" */ '@/pages/yhfq/yhqfx') }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论