物联设备优化

This commit is contained in:
曹磊 2026-03-18 18:11:46 +08:00
parent a2f4c291db
commit aaec1a2aa3
4 changed files with 62 additions and 38 deletions

View File

@ -49,7 +49,7 @@
</div>
<a-row style="margin-top: -7px;">
<a-col v-for="(item,index) in tableData" style="padding: 7px 14px 7px 0;" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6">
<a-card
<a-card
:class="['card-3d']"
:headStyle="{ height: '60px', padding: '0 24px',border:'0px' }"
@mouseenter="item.key"
@ -75,10 +75,10 @@
<div style="line-height: 30px;">
<!-- <a-popover title="二维码" >
<template #content>
<QRCodeWithLogo
:text="item.nuId"
:logoUrl="logoUrl"
:size="150"
<QRCodeWithLogo
:text="item.nuId"
:logoUrl="logoUrl"
:size="150"
:logoSize="40"
/>
</template>
@ -92,13 +92,13 @@
<a-button type="dashed" size="small" @click="handleWlgl(item)" style=" margin-right:10px" v-if="item.areaFlag=='3'">物料管理</a-button>
</div>
</div>
<div style="float:right;margin-top: -10px;">
<a-switch style="margin-left:10px" :checked="item.status!=5" checked-children="" @change="(checked) => handleChangeValidateStatus(item, checked)" un-checked-children="" />
</div>
</div>
</a-card>
</a-col>
<a-col :span="24" v-if="tableData.length==0" style="margin-top:50px;">
@ -189,8 +189,8 @@ const { createMessage } = useMessage();
function handleWlsb(record) {
wlsbModal.value.disableSubmit = true;
wlsbModal.value.edit(record);
}
}
/**
* 新增事件
*/
@ -216,7 +216,7 @@ function handleChangeValidateStatus(record,checked) {
// handleTingyong(record);
}
}
/**
* 编辑事件
*/
@ -227,7 +227,7 @@ function handleChangeValidateStatus(record,checked) {
/**
* 库管信息
* @param record
* @param record
*/
function handleKgxx(record) {
registerCkfzrModal.value.disableSubmit = false;
@ -235,20 +235,20 @@ function handleChangeValidateStatus(record,checked) {
}
/**
* 物料管理
* @param record
* @param record
*/
function handleWlgl(record) {
registerCrkModal.value.disableSubmit = true;
registerCrkModal.value.init(record);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 启用
*/
@ -296,7 +296,7 @@ function handleChangeValidateStatus(record,checked) {
function searchQuery() {
reload();
}
/**
* 重置
*/
@ -355,7 +355,7 @@ function handleChangeValidateStatus(record,checked) {
}
.hldyClass {
font-size: 12px;
background: #f5f7ff;
@ -388,5 +388,5 @@ function handleChangeValidateStatus(record,checked) {
.card-3d:hover {
border: 1px solid #1890ff;
}
</style>

View File

@ -20,25 +20,42 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'sn'
},
{
title: '设备型号',
align: "center",
dataIndex: 'deviceModel'
},
// {
// title: '设备型号',
// align: "center",
// dataIndex: 'deviceModel'
// },
{
title: '设备维度',
align: "center",
dataIndex: 'dimension'
dataIndex: 'dimension',
width: 100
},
{
title: '设备类型',
align: "center",
dataIndex: 'deviceType_dictText'
dataIndex: 'deviceType_dictText',
width: 100
},
{
title: '在线状态',
title: '设备状态',
align: "center",
dataIndex: 'deviceStatus_dictText'
dataIndex: 'deviceStatus',
width: 100
},
{
title: '报修状态',
align: "center",
dataIndex: 'maintainStatus',
customRender:({record})=>{
if(record.maintainStatus=='0'){
return "正常";
}
if(record.maintainStatus=='1'){
return "损坏";
}
},
width: 100
},
];
export const columnsTy: BasicColumn[] = [
@ -47,11 +64,11 @@ export const columnsTy: BasicColumn[] = [
align: "center",
dataIndex: 'deviceIndex'
},
{
title: '设备型号',
align: "center",
dataIndex: 'deviceModel'
},
// {
// title: '设备型号',
// align: "center",
// dataIndex: 'deviceModel'
// },
{
title: '设备维度',
align: "center",
@ -63,9 +80,9 @@ export const columnsTy: BasicColumn[] = [
dataIndex: 'deviceType_dictText'
},
{
title: '在线状态',
title: '设备状态',
align: "center",
dataIndex: 'deviceStatus_dictText'
dataIndex: 'deviceStatus'
},
];
// 高级查询数据

View File

@ -24,8 +24,15 @@
</a-col>
<a-col :lg="6">
<a-form-item name="deviceStatus">
<template #label><span title="在线状态">在线状态</span></template>
<j-dict-select-tag v-model:value="queryParam.deviceStatus" :showLabel="false" dictCode="tplink_status" placeholder="请选择在线状态" />
<template #label><span title="设备状态">设备状态</span></template>
<a-select v-model:value="queryParam.deviceStatus" placeholder="请选择设备状态" allow-clear>
<a-select-option value="在线">在线</a-select-option>
<a-select-option value="离线">离线</a-select-option>
<a-select-option value="合闸">合闸</a-select-option>
<a-select-option value="拉闸">拉闸</a-select-option>
<a-select-option value="开阀">开阀</a-select-option>
<a-select-option value="关阀">关阀</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="9" :md="9" :sm="24">
@ -85,7 +92,7 @@ import CameraPreviewModal from '/@/views/iot/tplink/camera/components/CameraPrev
showIndexColumn: true,
immediate: false,
actionColumn: {
width: 120,
width: 80,
fixed: 'right',
},
beforeFetch: async (params) => {

View File

@ -12,14 +12,14 @@
import { ref, nextTick, defineExpose } from 'vue';
import IotDevicesList from './IotDevicesList.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<number>(1200);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 编辑
* @param record