Commit 64894283 by caoyanzhi

update: 扫码营销-按钮权限

parent 8a26e98b
......@@ -10,7 +10,7 @@
<el-option label="已删除" :value="0"></el-option>
</el-select>
<!-- <el-button type="text" @click="goHistory"> 历史记录</el-button> -->
<el-button icon="iconfont icon-icon_yunxiazai" class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingDownloadEcmLog)" :limit-code="$buttonCode.marketingDownloadEcmLog" @click="exportCurrentSendDetails"> 导出列表</el-button>
<el-button icon="iconfont icon-icon_yunxiazai" class="fr" type="primary" v-if="buttonLimit" :limit-code="buttonCode" @click="exportCurrentSendDetails"> 导出列表</el-button>
</div>
<div class="dm-wrap">
<el-table ref="multipleTable" tooltipEffect="light" :data="infoList" style="width: 100%" @selection-change="handleSelectionChange">
......@@ -102,6 +102,14 @@ export default {
type: Boolean
}
},
computed: {
buttonLimit() {
return this.$getButtonLimit(this.buttonCode);
},
buttonCode() {
return this.isComponet ? this.$buttonCode.marketingDownloadSecmLog : this.$buttonCode.marketingDownloadEcmLog;
}
},
data() {
return {
dateTime: [Date.now() - 30 * 24 * 60 * 60 * 1000, Date.now()],
......
......@@ -5,8 +5,8 @@
<el-input v-model="listParams.searchName" class="w200" placeholder="输入计划名称" clearable @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox class="vertical-middle" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="search" />
<div class="fr">
<el-button @click="$router.push('/scan/history-list')">查看历史计划</el-button>
<el-button type="primary" @click="$router.push('/scan/add')" :disabled="total >= 10">新建计划({{ total }}/10)</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingHistorySecm)" :limit-code="$buttonCode.marketingHistorySecm" @click="$router.push('/scan/history-list')">查看历史计划</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingAddSecm)" :limit-code="$buttonCode.marketingAddSecm" type="primary" @click="$router.push('/scan/add')" :disabled="total >= 10">新建计划({{ total }}/10)</el-button>
</div>
</div>
<el-alert class="mb10 inline-block" title="" type="warning" :closable="false">
......@@ -30,7 +30,7 @@
<transition-group type="transition">
<div class="td" v-for="(item, key) in tableList" :key="item.ecmPlanId" @mouseover="hoverIdx = item.ecmPlanId" @mouseout="hoverIdx = -1" :class="{ active: hoverIdx === item.ecmPlanId }">
<el-row>
<el-col :span="1"><i class="iconfont icon-paixu1 slideIcon place-font-color cursor fz12"></i></el-col>
<el-col :span="1" v-if="$getButtonLimit($buttonCode.marketingSortSecm)" :limit-code="$buttonCode.marketingSortSecm"><i class="iconfont icon-paixu1 slideIcon place-font-color cursor fz12"></i></el-col>
<el-col :span="2">{{ key + 1 }}</el-col>
<el-col :span="2">{{ item.ecmPlanName }}</el-col>
<el-col :span="4">
......@@ -54,14 +54,14 @@
<el-col :span="4">
<el-button type="text" @click="toRecord(item)">记录</el-button>
<template v-if="item.canEdit !== false">
<el-button type="text" v-if="item.effectType == 0 || item.effectType == 1" @click="editData(item)">编辑</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditSecm) && (item.effectType == 0 || item.effectType == 1)" :limit-code="$buttonCode.marketingEditSecm" @click="editData(item)">编辑</el-button>
<!-- <el-button type="text" v-if="item.effectType == 2" @click="$router.push(`/scan/info/${item.ecmPlanId}`)">详情</el-button> -->
</template>
<dm-delete v-if="item.effectType !== 2 && item.onlineStatus === 1 && item.canEdit !== false" @confirm="offlineEcmPlan(item)" tips="是否下线该计划?">
<el-button type="text">下线</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingOutlineSecm) && item.effectType !== 2 && item.onlineStatus === 1 && item.canEdit !== false" @confirm="offlineEcmPlan(item)" tips="是否下线该计划?">
<el-button type="text" :limit-code="$buttonCode.marketingOutlineSecm">下线</el-button>
</dm-delete>
<dm-delete v-if="item.putonStatus !== 2 && item.canEdit !== false" @confirm="delData(item)" tips="是否删除该计划?">
<el-button type="text">删除</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDelSecm) && item.putonStatus !== 2 && item.canEdit !== false" @confirm="delData(item)" tips="是否删除该计划?">
<el-button type="text" :limit-code="$buttonCode.marketingDelSecm">删除</el-button>
</dm-delete>
</el-col>
</el-row>
......@@ -238,7 +238,8 @@ export default {
dragOptions() {
return {
animation: 300,
ghostClass: 'ghost'
ghostClass: 'ghost',
disabled: !this.$getButtonLimit(this.$buttonCode.marketingSortSecm)
};
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment