提交 956f2704 authored 作者: 刘旭's avatar 刘旭

获取Mac地址

上级 236895c0
...@@ -90,3 +90,11 @@ export function putConnectParam(data: any) { ...@@ -90,3 +90,11 @@ export function putConnectParam(data: any) {
data, data,
}); });
} }
// 获取mac地址 /api/mac/address/detail
export function getMacAddress() {
return request({
url: "/api/mac/address/detail",
method: "get",
});
}
...@@ -33,6 +33,11 @@ ...@@ -33,6 +33,11 @@
</el-button> </el-button>
<el-button type="primary" icon="RefreshRight" @click="handleManual">手动同步</el-button> <el-button type="primary" icon="RefreshRight" @click="handleManual">手动同步</el-button>
<el-button type="primary" @click="handleSelected">导入 lic 文件</el-button> <el-button type="primary" @click="handleSelected">导入 lic 文件</el-button>
<!-- <el-button type="primary" @click="handleMacAddress">获取mac地址</el-button> -->
<div v-show="macAddress" style="font-size: 14px; color: #ccc;">
mac地址:
{{ macAddress }}
</div>
<input ref="uploadInput" type="file" style="display: none;" accept=".tmp" @change="submitUpload"> <input ref="uploadInput" type="file" style="display: none;" accept=".tmp" @change="submitUpload">
</el-space> </el-space>
</div> </div>
...@@ -92,7 +97,8 @@ import { ...@@ -92,7 +97,8 @@ import {
getOff, getOff,
getabnormal, getabnormal,
getSRecords, getSRecords,
importFile importFile,
getMacAddress
} from "@/services/api/systemApi/synchronization/synchronizationAPI"; } from "@/services/api/systemApi/synchronization/synchronizationAPI";
const loading = ref(true) const loading = ref(true)
...@@ -111,6 +117,8 @@ const pageData = reactive({ ...@@ -111,6 +117,8 @@ const pageData = reactive({
pageSize: 10 pageSize: 10
}) })
const macAddress = ref()
// 1、 启动 0、 关闭 // 1、 启动 0、 关闭
const flag = ref() const flag = ref()
...@@ -258,6 +266,14 @@ let uploadInput = ref() ...@@ -258,6 +266,14 @@ let uploadInput = ref()
// 点击导入文件 // 点击导入文件
const handleSelected = () => uploadInput.value.click() const handleSelected = () => uploadInput.value.click()
const handleMacAddress = () => {
getMacAddress().then((res: any) => {
if (res.code === 200) {
macAddress.value = res.data
}
})
}
handleMacAddress()
// //选好文件之后点击打开按钮 // //选好文件之后点击打开按钮
const submitUpload = (e: any) => { const submitUpload = (e: any) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论