|
@@ -26,11 +26,11 @@
|
|
|
<div class="flex justify-end pb-3">
|
|
|
<!-- 操作按钮 -->
|
|
|
<!-- <el-button v-for="(button, index) in actionButtons" :key="index" type="primary">{{ button.text }}</el-button> -->
|
|
|
- <el-button type="primary" @click="editContacts(false)">新建联系人</el-button>
|
|
|
+ <el-button type="primary" v-permission="['contactsAdd']" @click="editContacts(false)">新建联系人</el-button>
|
|
|
<el-button type="primary" @click="batchDeteleItem" :disabled="batchTableData.length <= 0">批量删除</el-button>
|
|
|
<el-button type="primary" @click="showVisible('deteleContactsVisible')">回收站</el-button>
|
|
|
- <el-button type="primary" @click="showVisible('importVisible')">导入</el-button>
|
|
|
- <el-button type="primary" @click="exportCustomerTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
|
|
|
+ <el-button type="primary" v-permission="['contactsImport']" @click="showVisible('importVisible')">导入</el-button>
|
|
|
+ <el-button type="primary" v-permission="['contactsExport']" @click="exportCustomerTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
|
|
|
</div>
|
|
|
<div class="flex-1 w-full overflow-hidden">
|
|
|
<!-- 表格 -->
|
|
@@ -49,11 +49,11 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="'操作'" :width="'200px'" fixed="right">
|
|
|
+ <el-table-column :label="'操作'" :width="'200px'" fixed="right" v-permission="['contactsEdit', 'tasksAdd']">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="primary" size="large" @click="editContacts(scope.row)">编辑</el-button>
|
|
|
- <el-button link type="primary" size="large" @click="newTask(scope.row)">新建任务</el-button>
|
|
|
- <el-button link type="danger" size="large"
|
|
|
+ <el-button link type="primary" size="large" v-permission="['contactsEdit']" @click="editContacts(scope.row)">编辑</el-button>
|
|
|
+ <el-button link type="primary" size="large" v-permission="['tasksAdd']" @click="newTask(scope.row)">新建任务</el-button>
|
|
|
+ <el-button link type="danger" size="large" v-permission="['contactsEdit']"
|
|
|
@click="contactsDeteleItem(scope.row.id, scope.row.customName)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -250,8 +250,9 @@ function batchDeteleItem() {
|
|
|
}
|
|
|
|
|
|
function contactsDeteleItem(value: string | number, label: string, batch: boolean = false) {
|
|
|
- confirmAction(`确定${batch ? '批量' : ''}删除【${label}】客户吗?`).then(() => {
|
|
|
- let url = batch ? URL_BATCHDETELE : URL_DETELERECYCLE
|
|
|
+ confirmAction(`确定${batch ? '批量' : ''}删除【${label}】联系人吗?`).then(() => {
|
|
|
+ // let url = batch ? URL_BATCHDETELE : URL_DETELERECYCLE
|
|
|
+ let url = URL_DETELERECYCLE
|
|
|
post(url, { ids: value }).then(res => {
|
|
|
if (res.code != 'ok') {
|
|
|
globalPopup?.showError(res.msg)
|