feat: able to make phone calls
This commit is contained in:
@@ -28,6 +28,9 @@
|
|||||||
<a @click="onEdit(record)">{{ text }}</a>
|
<a @click="onEdit(record)">{{ text }}</a>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'operation'">
|
<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>
|
<a-button type="link"><template #icon>
|
||||||
<MailTwoTone two-tone-color="#476FFF" @click="onMail(record.name, record.email)" />
|
<MailTwoTone two-tone-color="#476FFF" @click="onMail(record.name, record.email)" />
|
||||||
</template></a-button>
|
</template></a-button>
|
||||||
@@ -174,7 +177,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted, createVNode } from 'vue';
|
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 moment from 'moment'
|
||||||
import { createCustomer, updateCustomer, sendMailToCustomer, queryCustomerList, queryCustomerInfo, deleteCustomer, customerExport } from '../api/customer';
|
import { createCustomer, updateCustomer, sendMailToCustomer, queryCustomerList, queryCustomerInfo, deleteCustomer, customerExport } from '../api/customer';
|
||||||
import { message, Modal } from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
@@ -240,7 +243,7 @@ const columns = [{
|
|||||||
}, {
|
}, {
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'operation',
|
dataIndex: 'operation',
|
||||||
width: 65,
|
width: 100,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
}];
|
}];
|
||||||
@@ -447,6 +450,11 @@ const onExport = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 打电话
|
||||||
|
const callUp = (phone) => {
|
||||||
|
window.location.href = 'tel://' + phone
|
||||||
|
}
|
||||||
|
|
||||||
const mail = reactive({
|
const mail = reactive({
|
||||||
customerName: '',
|
customerName: '',
|
||||||
receiver: '',
|
receiver: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user