main
chenshuichuan 2 years ago
parent d638022f25
commit 27a84369c7

@ -48,14 +48,14 @@
>
<!-- 账号登录 -->
<LoginForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
<!-- 手机登录 -->
<MobileForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
<!-- 二维码登录 -->
<QrCodeForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
<!-- 注册 -->
<RegisterForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
<!-- 三方登录 -->
<SSOLoginVue class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
<!-- &lt;!&ndash; 手机登录 &ndash;&gt;-->
<!-- <MobileForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />-->
<!-- &lt;!&ndash; 二维码登录 &ndash;&gt;-->
<!-- <QrCodeForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />-->
<!-- &lt;!&ndash; 注册 &ndash;&gt;-->
<!-- <RegisterForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />-->
<!-- &lt;!&ndash; 三方登录 &ndash;&gt;-->
<!-- <SSOLoginVue class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />-->
</div>
</Transition>
</div>

@ -82,33 +82,33 @@
mode="pop"
@success="handleLogin"
/>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item>
<el-row :gutter="5" justify="space-between" style="width: 100%">
<el-col :span="8">
<XButton
:title="t('login.btnMobile')"
class="w-[100%]"
@click="setLoginState(LoginStateEnum.MOBILE)"
/>
</el-col>
<el-col :span="8">
<XButton
:title="t('login.btnQRCode')"
class="w-[100%]"
@click="setLoginState(LoginStateEnum.QR_CODE)"
/>
</el-col>
<el-col :span="8">
<XButton
:title="t('login.btnRegister')"
class="w-[100%]"
@click="setLoginState(LoginStateEnum.REGISTER)"
/>
</el-col>
</el-row>
</el-form-item>
</el-col>
<!-- <el-col :span="24" style="padding-right: 10px; padding-left: 10px">-->
<!-- <el-form-item>-->
<!-- <el-row :gutter="5" justify="space-between" style="width: 100%">-->
<!-- <el-col :span="8">-->
<!-- <XButton-->
<!-- :title="t('login.btnMobile')"-->
<!-- class="w-[100%]"-->
<!-- @click="setLoginState(LoginStateEnum.MOBILE)"-->
<!-- />-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <XButton-->
<!-- :title="t('login.btnQRCode')"-->
<!-- class="w-[100%]"-->
<!-- @click="setLoginState(LoginStateEnum.QR_CODE)"-->
<!-- />-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <XButton-->
<!-- :title="t('login.btnRegister')"-->
<!-- class="w-[100%]"-->
<!-- @click="setLoginState(LoginStateEnum.REGISTER)"-->
<!-- />-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-divider content-position="center">{{ t('login.otherLogin') }}</el-divider>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item>

@ -84,21 +84,26 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="机台" align="center" prop="machineName"/>
<el-table-column label="设备编码" align="center" prop="deviceCode"/>
<el-table-column label="设备名称" align="center" prop="deviceName"/>
<el-table-column
label="采集时间"
align="center"
prop="deviceDataTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="时间戳" align="center" prop="deviceDataTimeLong"/>
<el-table-column label="设备编码" align="left" prop="deviceCode" width="180px"/>
<el-table-column label="设备名称" align="left" prop="deviceName" width="180px"/>
<el-table-column label="设备采集时间" align="center" prop="deviceDataTime" :formatter="dateFormatter" width="180px"/>
<el-table-column label="系统接收时间" align="center" prop="createTime" :formatter="dateFormatter" width="180px"/>
<el-table-column label="数据" align="center" prop="deviceData"/>
<el-table-column label="网关" align="center" prop="gatewayCode"/>
<el-table-column label="机台" align="center" prop="machineName"/>
<el-table-column label="用户" align="center" prop="workerName"/>
<el-table-column label="操作" align="center" fixed="right" width="150">
<template #default="scope">
<el-button
link
type="primary"
@click="copyTextToClipboard(scope.row.deviceData)"
v-hasPermi="['iot:kanban:update']"
>
复制数据
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
@ -215,4 +220,15 @@ const handleDeptNodeClick = async (row) => {
queryParams.machineId = row.id
await getList()
}
//
function copyTextToClipboard(text: string): Promise<void> {
return navigator.clipboard.writeText(text)
.then(() => {
message.success('Text copied to clipboard')
})
.catch((error) => {
message.success('Could not copy text: '+ error);
});
}
</script>

Loading…
Cancel
Save