feat: able to make phone calls

This commit is contained in:
zchengo
2023-01-31 15:14:20 +08:00
parent 4a424817de
commit 2ab9a1d7bf
+10 -2
View File
@@ -28,6 +28,9 @@
<a @click="onEdit(record)">{{ text }}</a>
</template>
<template v-if="column.dataIndex === 'operation'">
<a-button type="link"><template #icon>
<PhoneTwoTone two-tone-color="#31C27C" @click="callUp(record.phone)" />
</template></a-button>
<a-button type="link"><template #icon>
<MailTwoTone two-tone-color="#476FFF" @click="onMail(record.name, record.email)" />
</template></a-button>
@@ -174,7 +177,7 @@
<script setup>
import { ref, reactive, onMounted, createVNode } from 'vue';
import { SearchOutlined, ExclamationCircleOutlined, ExportOutlined, MailTwoTone, InboxOutlined } from '@ant-design/icons-vue';
import { SearchOutlined, ExclamationCircleOutlined, ExportOutlined, PhoneTwoTone, MailTwoTone, InboxOutlined } from '@ant-design/icons-vue';
import moment from 'moment'
import { createCustomer, updateCustomer, sendMailToCustomer, queryCustomerList, queryCustomerInfo, deleteCustomer, customerExport } from '../api/customer';
import { message, Modal } from 'ant-design-vue';
@@ -240,7 +243,7 @@ const columns = [{
}, {
title: '操作',
dataIndex: 'operation',
width: 65,
width: 100,
fixed: 'right',
ellipsis: true,
}];
@@ -447,6 +450,11 @@ const onExport = () => {
})
}
// 打电话
const callUp = (phone) => {
window.location.href = 'tel://' + phone
}
const mail = reactive({
customerName: '',
receiver: '',