Commit 5956eef0 by 前端

修sop二轮bug

1 parent 6e7f3409
......@@ -272,10 +272,11 @@
</div>
<div class="event-btns">
<el-button
v-if="editForm.sopStatus !==1 && routeInfo.addOrEdit !== 'copy' && routeInfo.addOrEdit !== 'add'"
v-if="new Date(item.eventStartDate) <= new Date() && routeInfo.addOrEdit !== 'copy' && routeInfo.addOrEdit !== 'add'"
type="primary" size="small"
@click="handleEventView(item)">查看
</el-button>
<el-button v-if="new Date(item.eventStartDate) > new Date() || routeInfo.addOrEdit == 'copy'"
class="default newBtnSty" :size="size" @click="handleEventDelete(index)">删除
</el-button>
......
......@@ -127,10 +127,6 @@ export default {
},
tableColumns: [
{
label: '群名称',
prop: 'groupName',
},
{
label: '客户名称',
prop: 'customerName',
formatter: cellValue => {
......@@ -168,6 +164,12 @@ export default {
}
},
],
frontColumns:[
{
label: '群名称',
prop: 'groupName',
},
],
otherTableColumns: [
{
label: '点赞数',
......@@ -197,7 +199,9 @@ export default {
},
mounted() {
// console.log('????????????')
this.tableParams.tableColumns = this.tableColumns
console.log('11')
this.getBaseData()
this.$refs.touchListRef.tableHeightValues = '400px'
this.$refs.touchListRef.refreshTable()
......@@ -207,15 +211,17 @@ export default {
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({sopId: this.sopId}).then(res => {
this.sopInfo = res
if (this.sopInfo.sopType == 1){
this.tableParams.tableColumns.splice(0,1,1)
if (this.sopInfo.sopType == 2){
this.tableParams.tableColumns = [...this.frontColumns,...this.tableColumns]
}
if(this.selectedEventInfo.pushChannelType == 3) {
this.tableParams.tableColumns = this.tableColumns.concat(this.otherTableColumns)
if (this.sopInfo.sopType == 1){
if(this.selectedEventInfo.pushChannelType == 3) {
this.tableParams.tableColumns = this.tableColumns.concat(this.otherTableColumns)
}else {
this.tableParams.tableColumns = this.tableColumns
}
}
this.sopInfo.touchPercent = this.baseData.sopEventList.length && this.sopInfo.customerCount ? Math.round((this.selectedEventInfo.eventStatistics.reachCustomerCount / this.sopInfo.customerCount) * 100).toFixed(0) + '%' : '-'
// this.drawPie()
})
......@@ -238,7 +244,7 @@ export default {
.getEventListApi(params)
.then(res => {
this.baseData.sopEventList = res.list
this.labelOptUpdate = this.baseData.sopEventList[0].labelOptUpdate
this.labelOptUpdate = this.baseData.sopEventList.length && this.baseData.sopEventList[0].labelOptUpdate
if (this.baseData.sopEventList.length) {
this.baseData.sopEventList.forEach(item => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!