物联设备BUG处理

This commit is contained in:
曹磊 2026-04-15 18:00:12 +08:00
parent e8607b87c1
commit 0c9ae46268
5 changed files with 104 additions and 13 deletions

View File

@ -209,7 +209,6 @@ function getInfo(record){
getDeviceInfo({
"sn":record.sn
}).then(res=> {
console.log(res);
nextTick(() => {
resetFields();
//
@ -230,10 +229,10 @@ function getInfo(record){
* @param record
*/
function readParameters(sn){
confirmLoading.value = true;
getDeviceParameters({
"sn":sn
}).then(res=> {
console.log(res);
nextTick(() => {
resetFields();
//
@ -246,7 +245,9 @@ function readParameters(sn){
//
Object.assign(formData, tmpData);
});
})
}).finally(() => {
confirmLoading.value = false;
});
}

View File

@ -1,5 +1,42 @@
<template>
<div>
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="deviceName">
<template #label><span title="设备名称">设备名称</span></template>
<a-input v-model:value="queryParam.deviceName" placeholder="请输入设备名称" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="dimension">
<template #label><span title="设备维度">设备维度</span></template>
<a-select v-model:value="queryParam.dimension" placeholder="请选择设备维度" allow-clear>
<a-select-option value="机构维度">机构维度</a-select-option>
<a-select-option value="区域维度">区域维度</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="deviceType">
<template #label><span title="设备类型">设备类型</span></template>
<j-dict-select-tag v-model:value="queryParam.deviceType" :showLabel="false" dictCode="tplink_device_type" placeholder="请选择设备类型" allow-clear />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
@ -20,6 +57,9 @@ import {onMounted, reactive, ref} from 'vue';
import { list } from './log.api';
import { columns} from './log.data';
import { useDrawer } from "@/components/Drawer";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
const formRef = ref();
const [registerDrawer, { openDrawer }] = useDrawer();
const queryParam = reactive<any>({});
const selectedRows = ref<any[]>([]);
@ -48,8 +88,34 @@ import {onMounted, reactive, ref} from 'vue';
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
const labelCol = reactive({
xs:24,
sm:8,
xl:8,
xxl:8
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
//
reload();
}
/**
* 成功回调
*/
function handleSuccess() {
@ -78,11 +144,28 @@ defineExpose({
</script>
<style lang="less" scoped>
:deep(.selected-row) {
background-color: #e6f7ff !important;
&:hover td {
background-color: #e6f7ff !important;
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
}
</style>

View File

@ -34,6 +34,12 @@ export const columns: BasicColumn[] = [
dataIndex: 'dimension',
width: 100
},
{
title: '设备名称',
align: "center",
dataIndex: 'deviceName',
width: 100
},
{
title: '设备类型',
align: "center",

View File

@ -97,7 +97,7 @@ const validatorRules = {
deviceName: [{ required: true, message: '请选择设备!'},],
purchaseQuantity: [{ required: true, message: '请输入采购数量!'},],
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(()=>{
@ -114,7 +114,7 @@ const disabled = computed(()=>{
/**
* 新增
*/
function add(record) {
async function add(record) {
getDeviceConfig();
orgCode.value = record.orgCode;
batchNo.value = record.batchNo;
@ -126,7 +126,7 @@ function add(record) {
/**
* 编辑
*/
function edit(record) {
async function edit(record) {
getDeviceConfig();
orgCode.value = record.orgCode;
batchNo.value = record.batchNo;
@ -142,6 +142,7 @@ function edit(record) {
})
//
Object.assign(formData, tmpData);
});
}

View File

@ -110,7 +110,7 @@ const validatorRules = {
deviceName: [{ required: true, message: '请选择设备!'},],
purchaseQuantity: [{ required: true, message: '请输入采购数量!'},],
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(()=>{
@ -127,7 +127,7 @@ const disabled = computed(()=>{
/**
* 新增
*/
function add(record) {
async function add(record) {
getNuInfos(record);
getDeviceConfig();
orgCode.value = record.orgCode;
@ -140,7 +140,7 @@ function add(record) {
/**
* 编辑
*/
function edit(record) {
async function edit(record) {
getNuInfos(record);
getDeviceConfig();
orgCode.value = record.orgCode;