| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue"; |
| | | import { onMounted, ref, reactive, getCurrentInstance, toRefs, computed } from "vue"; |
| | | import { Search, Paperclip, Upload } from "@element-plus/icons-vue"; |
| | | import { |
| | | addCustomerPrivate, |
| | |
| | | import { getToken } from "@/utils/auth.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore(); |
| | | const isAdminUser = computed(() => |
| | | ["admin", "普通2", "最高1"].some(r => (userStore.roles || []).includes(r)) |
| | | ); |
| | | |
| | | // 回访提醒相关 |
| | | const reminderDialogVisible = ref(false); |
| | |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | const unauthorizedData = selectedRows.value.filter( |
| | | item => item.type === 1 || item.type === "1" |
| | | item => (item.type === 1 || item.type === "1") && !isAdminUser.value |
| | | ); |
| | | if (unauthorizedData.length > 0) { |
| | | proxy.$modal.msgWarning("公海分配的客户不能删除"); |