Commit 7255570e by xuyl

更新

1 parent 77747094
<template>
<div class="scrm-sub-client-container">
<div class="pageContent">
<GLCombiForm :formObj="searchForm" :formData="searchFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams">
<template slot="options" slot-scope="scope">
<el-button class="blue-text" type="text" @click="goSOPAnalysis(scope.scope.id)">SOP分析</el-button>
<el-button class="blue-text" type="text" @click="goSOPEdit(scope.scope.id)">编辑</el-button>
<el-button class="blue-text" type="text" @click="confirm('delete')">删除</el-button>
<el-button class="blue-text" type="text" @click="confirm(scope.scope)">结束</el-button>
</template>
</GLTable>
</div>
</div>
</template>
<script>
import { getTableList } from '@/api/modules/clientManage'
import util from '@/utils/util'
export default {
data() {
return {
searchForm: {},
searchFormList: [
{
type: 'input',
inputType: 'text',
// name: 'keyword',
label: '人群名称'
},
{
type: 'select',
// name: 'type',
label: '营销状态',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: ''
}
],
placeholder: '请选择'
}
],
getListApi: getTableList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableColumns: [
{
label: '人群名称',
prop: 'orderNo'
},
{
label: 'SOP名称',
prop: 'name'
},
{
label: '营销时间',
prop: 'phone'
},
{
label: '完成度',
prop: 'dsdasd'
},
{
label: '营销状态',
prop: 'dsdasds'
},
{
label: '操作',
prop: 'options',
addHtml: 'options'
}
]
}
}
},
mounted() {
//没数据的时候要算高度
setTimeout(() => {
if (!this.$refs.marketingPlan.data.length) {
this.loading = true
this.$refs.marketingPlan.setTableHeightFun()
this.loading = false
}
}, 200)
},
methods: {
// 跳转SOP分析
goSOPAnalysis(){
this.$history.push(`/marketing/sop/sopAnalysisList?fromPage=${encodeURI('/custom/clientDataOverview/marketingPeople?selectTab=2')}&id=183`)
},
// 跳转SOP编辑页面
goSOPEdit(id) {
this.$history.push(`/marketing/sop/editSop?$title=${encodeURI('编辑SOP')}&fromPage=${encodeURI('/custom/clientDataOverview/marketingPeople?selectTab=2')}&addOrEdit=edit&id=183`)
},
// 确认删除或结束
confirm(type) {
this.$confirm(`是否确认${type == 'delete' ? '删除' : '结束'}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$message({
type: 'success',
message: '操作成功!'
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
setTableFinishFun() {
this.$refs.marketingPlan.data.length ? (this.$refs.marketingPlan.tableHeightValues = '') : this.$refs.marketingPlan.setTableHeightFun()
},
setTableHeightEvent() {
this.$refs.marketingPlan.setTableHeightFun()
},
// 搜索表格
searchTable() {
console.log(this.searchForm)
this.$refs.marketingPlan.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = {
status: '',
type: ''
}
this.$refs.marketingPlan.refreshTable()
}
}
}
</script>
<style lang="scss" scoped>
.pageContent {
padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
background-color: #fff;
}
</style>
...@@ -12,11 +12,10 @@ ...@@ -12,11 +12,10 @@
</GLTable> </GLTable>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getTableList } from '@/api/modules/clientManage' import { getTableList } from '@/api/modules/clientManage'
import util from '@/utils/util'
export default { export default {
data() { data() {
return { return {
...@@ -89,13 +88,12 @@ export default { ...@@ -89,13 +88,12 @@ export default {
}, },
methods: { methods: {
// 跳转SOP分析 // 跳转SOP分析
goSOPAnalysis(){ goSOPAnalysis(id) {
this.$history.push(`/marketing/sop/sopAnalysisList?fromPage=${encodeURI('/custom/clientDataOverview/marketingPeople?selectTab=2')}&id=183`) this.$history.push(`/marketing/sop/sopAnalysisList?fromPage=${encodeURI('/npmph/clientDataOverview/marketingPeople?selectTab=2')}&id=${id}`)
}, },
// 跳转SOP编辑页面 // 跳转SOP编辑页面
goSOPEdit(id) { goSOPEdit(id) {
// this.$history.push(`/marketing/sop/editSop?$title=${encodeURI('编辑SOP')}&fromPage=${encodeURI('/custom/clientDataOverview/marketingPeople?selectTab=2')}&addOrEdit=edit&id=183`) var params = {
var params = {
addOrEdit: 'edit', addOrEdit: 'edit',
fromPage: '/custom/clientDataOverview/marketingPeople?selectTab=2', fromPage: '/custom/clientDataOverview/marketingPeople?selectTab=2',
$title: encodeURI('编辑SOP') $title: encodeURI('编辑SOP')
......
...@@ -208,7 +208,8 @@ export default { ...@@ -208,7 +208,8 @@ export default {
created() { created() {
let { id } = this let { id } = this
this.init(id) this.init(id)
console.log(this.$route.params.id) console.log(this.$route.params)
console.log(this.$route.query)
this.groupCorwdTitle = this.$Constants.DESCRIBEDATA.find(item => item.id == id) ? this.$Constants.DESCRIBEDATA.find(item => item.id == id).name : '' this.groupCorwdTitle = this.$Constants.DESCRIBEDATA.find(item => item.id == id) ? this.$Constants.DESCRIBEDATA.find(item => item.id == id).name : ''
this.groupCorwdDesc = this.$Constants.DESCRIBEDATA.find(item => item.id == id) ? this.$Constants.DESCRIBEDATA.find(item => item.id == id).info : '' this.groupCorwdDesc = this.$Constants.DESCRIBEDATA.find(item => item.id == id) ? this.$Constants.DESCRIBEDATA.find(item => item.id == id).info : ''
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
...@@ -269,7 +270,7 @@ export default { ...@@ -269,7 +270,7 @@ export default {
} }
var params = { var params = {
addOrEdit: 'add', addOrEdit: 'add',
fromPage: this.crowdType == 3 ? `/npmph/clientDataOverview/group/${this.id}?${this.crowdType}` : `/npmph/clientDataOverview/group/${this.crowdType}`, fromPage: `/custom/clientDataOverview/group/${this.id}/${this.crowdType}`,
$title: encodeURI('新建SOP'), $title: encodeURI('新建SOP'),
info: { info: {
// 人群 // 人群
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<el-divider></el-divider> <el-divider></el-divider>
<!-- 营销人群展示 --> <!-- 营销人群展示 -->
<div class="bigMarketItem" v-if="closeFlag"> <div class="bigMarketItem" v-if="closeFlag">
<div v-for="(item, idx) in itemArr" :key="idx" :class="[{ active: isActive == idx }, 'marketItem']" @click="choickItem(idx)"> <div v-for="(item, idx) in itemArr" :key="idx" :class="[{ active: isActive == idx }, 'marketItem']" @click="choickItem(idx, item.crowdName)">
<template v-if="idx < displayNum"> <template v-if="idx < displayNum">
<p class="peopleName">{{ item.crowdName }}</p> <p class="peopleName">{{ item.crowdName }}</p>
<div class="itemBox"> <div class="itemBox">
...@@ -37,10 +37,11 @@ ...@@ -37,10 +37,11 @@
</template> </template>
</div> </div>
</div> </div>
<!-- 轮播展示 -->
<div v-show="!closeFlag"> <div v-show="!closeFlag">
<div class="swiper-container" id="swiper"> <div class="swiper-container" id="swiper">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div v-for="(item, idx) in itemArr" :key="idx" :class="[{ active: isActive == idx }, 'marketItem', 'swiper-slide']" @click="choickItem(idx, item.title)"> <div v-for="(item, idx) in itemArr" :key="idx" :class="[{ active: isActive == idx }, 'marketItem', 'swiper-slide']" @click="choickItem(idx, item.crowdName)">
<div class="marketItem-border"> <div class="marketItem-border">
<p class="peopleName">{{ item.crowdName }}</p> <p class="peopleName">{{ item.crowdName }}</p>
<div class="itemBox"> <div class="itemBox">
...@@ -90,6 +91,8 @@ export default { ...@@ -90,6 +91,8 @@ export default {
components: { marketingPlan }, components: { marketingPlan },
data() { data() {
return { return {
selectTab: 1,
queryTab: '',
crowdGroupId: '', crowdGroupId: '',
activeName: 'first', activeName: 'first',
searchForm: {}, searchForm: {},
...@@ -282,8 +285,12 @@ export default { ...@@ -282,8 +285,12 @@ export default {
} }
}, },
created() { created() {
// this.$route.query || this.$route.query.selectTab == 1 ? (this.activeName = 'first') : (this.activeName = 'second') this.crowdGroupId = this.$route.query.crowdId || ''
this.crowdGroupId = this.$route.query.crowdId // 判断营销SOP返回来的页面
this.queryTab = this.$route.query.selectTab || ''
if (this.queryTab) {
this.activeName = this.queryTab == 'first' ? 'first' : 'second'
}
this.getMarketingPeople() this.getMarketingPeople()
}, },
mounted() { mounted() {
...@@ -322,7 +329,6 @@ export default { ...@@ -322,7 +329,6 @@ export default {
}, },
// 跳转到营销SOP // 跳转到营销SOP
createMarketSOP(info) { createMarketSOP(info) {
console.log(info)
let marketQuery = { let marketQuery = {
crowdDesc: info.crowdDesc, crowdDesc: info.crowdDesc,
crowdId: info.crowdId, crowdId: info.crowdId,
...@@ -331,7 +337,7 @@ export default { ...@@ -331,7 +337,7 @@ export default {
} }
var params = { var params = {
addOrEdit: 'add', addOrEdit: 'add',
fromPage: '/custom/clientDataOverview/marketingPeople', fromPage: `/npmph/clientDataOverview/marketingPeople?crowdId=${this.crowdGroupId}&selectTab=${this.activeName}`,
$title: encodeURI('新建SOP'), $title: encodeURI('新建SOP'),
info: { info: {
// 人群 // 人群
...@@ -341,6 +347,7 @@ export default { ...@@ -341,6 +347,7 @@ export default {
} }
params.info.crowdList.push(marketQuery) params.info.crowdList.push(marketQuery)
this.$common.utils.storage.set('sopInfo', params) this.$common.utils.storage.set('sopInfo', params)
console.log(params)
this.$history.push({ this.$history.push({
path: 'marketing/sop/editSop' path: 'marketing/sop/editSop'
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!