摄像头、智能水表、智能电表、温湿度计各弹窗宽度

This commit is contained in:
1378012178@qq.com 2026-02-04 15:58:41 +08:00
parent e57dbf7c97
commit 243914add5
4 changed files with 209 additions and 203 deletions

View File

@ -2,38 +2,43 @@
<div style="padding: 4px;"> <div style="padding: 4px;">
<!--查询区域--> <!--查询区域-->
<div class="jeecg-basic-table-form-container"> <div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24"> <a-row :gutter="24">
<!-- <a-col :lg="6"> <!-- <a-col :lg="6">
<a-form-item name="address"> <a-form-item name="address">
<template #label><span title="SN">SN</span></template> <template #label><span title="SN">SN</span></template>
<j-input placeholder="请输入SN" v-model:value="queryParam.address" allow-clear ></j-input> <j-input placeholder="请输入SN" v-model:value="queryParam.address" allow-clear></j-input>
</a-form-item> </a-form-item>
</a-col> --> </a-col> -->
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="nuId"> <a-form-item name="nuId">
<template #label><span title="区域">区域</span></template> <template #label><span title="区域">区域</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`" placeholder="请选区域" allow-clear /> <j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`"
placeholder="请选区域" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button> <a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<a-row style="margin-top: -20px;"> <a-row style="margin-top: -20px;">
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px 6px 6px 8px;"> <a-col v-for="(item, index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6"
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }"> style="padding: 8px 6px 6px 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px', border: '0px' }"
:bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title> <template #title>
<a-row style="font-weight: normal;"> <a-row style="font-weight: normal;">
<a-col :span="18" > <a-col :span="18">
<div style="font-size: 14px;">SN<span style="font-weight: bold;">{{item.sn?item.sn:'未配置'}}</span></div> <div style="font-size: 14px;">SN<span style="font-weight: bold;">{{ item.sn ? item.sn : '未配置' }}</span></div>
<div style="font-size: 12px;">设备名称{{item.deviceName}}</div> <div style="font-size: 12px;">设备名称{{ item.deviceName }}</div>
</a-col> </a-col>
<a-col :span="6" style="display: flex; justify-content: flex-end;"> <a-col :span="6" style="display: flex; justify-content: flex-end;">
<div :class="item.deviceStatus=='1'?'zxClass':'lxClass'">{{item.deviceStatus =='1'?'在线':'离线'}}</div> <div :class="item.deviceStatus == '1' ? 'zxClass' : 'lxClass'">{{ item.deviceStatus == '1' ? '在线' : '离线' }}</div>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-divider style="margin: 10px 0 0 0" /> <a-divider style="margin: 10px 0 0 0" />
@ -42,9 +47,11 @@
</template> </template>
<a-row style="margin-top:-10px;"> <a-row style="margin-top:-10px;">
<a-col :span="12" style="margin-top: -10px;font-size:12px">{{item.nuId_dictText?item.nuId_dictText:'未配置'}}</a-col> <a-col :span="12"
style="margin-top: -10px;font-size:12px">{{ item.nuId_dictText ? item.nuId_dictText : '未配置' }}</a-col>
<a-col :span="12" style="text-align: right;margin-top: -10px;font-size:12px"> <a-col :span="12" style="text-align: right;margin-top: -10px;font-size:12px">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span> <span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID:
{{ item.nuId ? item.nuId : '未配置' }}</span>
</a-col> </a-col>
<a-col :span="24" style="text-align: center;font-size: 44px;font-weight: bold;margin-top:18px;"> <a-col :span="24" style="text-align: center;font-size: 44px;font-weight: bold;margin-top:18px;">
<img src="../../../../../assets/iot/sxt.png" style="width:80px;" /> <img src="../../../../../assets/iot/sxt.png" style="width:80px;" />
@ -53,11 +60,11 @@
<a-divider /> <a-divider />
<p style="text-align:center;"> <p style="text-align:center;">
<span style="display:inline-block;cursor: pointer;" @click="handlePreview(item)"> <span style="display:inline-block;cursor: pointer;" @click="handlePreview(item)">
<span class="tbClass"><img src="../../../../../assets/iot/a14.png" style="width:20px;" /></span><br/> <span class="tbClass"><img src="../../../../../assets/iot/a14.png" style="width:20px;" /></span><br />
<span class="antTitle">预览</span> <span class="antTitle">预览</span>
</span> </span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleEdit(item)"> <span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleEdit(item)">
<span class="tbClass"><img src="../../../../../assets/iot/a13.png" style="width:20px;" /></span><br/> <span class="tbClass"><img src="../../../../../assets/iot/a13.png" style="width:20px;" /></span><br />
<span class="antTitle">编辑</span> <span class="antTitle">编辑</span>
</span> </span>
<!-- <span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handlePicConfig(item)"> <!-- <span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handlePicConfig(item)">
@ -68,7 +75,7 @@
</a-card> </a-card>
</a-col> </a-col>
<a-col v-if="tableData.total==0" > <a-col v-if="tableData.total == 0">
<div style="margin: 30px auto;"> <div style="margin: 30px auto;">
<a-empty /> <a-empty />
</div> </div>
@ -98,64 +105,64 @@
</template> </template>
<script lang="ts" name="iot-nuIotCameraInfo" setup> <script lang="ts" name="iot-nuIotCameraInfo" setup>
import {ref, reactive, createVNode, h, onMounted, watch, unref} from 'vue'; import { ref, reactive, createVNode, h, onMounted, watch, unref } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { columns, searchFormSchema } from '../camera.data'; import { columns, searchFormSchema } from '../camera.data';
import {getImageCommon, list} from '../camera.api'; import { getImageCommon, list } from '../camera.api';
import { useUserStore } from '/@/store/modules/user'; import { useUserStore } from '/@/store/modules/user';
import { useDrawer } from "@/components/Drawer"; import { useDrawer } from "@/components/Drawer";
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import CameraPreviewModal from './CameraPreviewModal.vue' import CameraPreviewModal from './CameraPreviewModal.vue'
import CameraInfoDrawer from './CameraInfoDrawer.vue' import CameraInfoDrawer from './CameraInfoDrawer.vue'
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { JInput } from '/@/components/Form'; import { JInput } from '/@/components/Form';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import CameraPictureConfigModal from '/@/views/iot/tplink/camera/components/CameraPictureConfigModal.vue'; import CameraPictureConfigModal from '/@/views/iot/tplink/camera/components/CameraPictureConfigModal.vue';
const props = defineProps({ const props = defineProps({
data: { type: Object, default: () => ({}) }, data: { type: Object, default: () => ({}) },
}); });
//drawer //drawer
const [registerDrawer, { openDrawer }] = useDrawer(); const [registerDrawer, { openDrawer }] = useDrawer();
let router = useRouter(); let router = useRouter();
const formRef = ref(); const formRef = ref();
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});
const registerModal = ref(); const registerModal = ref();
const previewModal = ref(); const previewModal = ref();
const deviceModal = ref(); const deviceModal = ref();
const cameraPictureConfigModal = ref(); const cameraPictureConfigModal = ref();
const userStore = useUserStore(); const userStore = useUserStore();
const tableData = ref<any>([]); const tableData = ref<any>([]);
const pageParams = ref({ pageNo: 1, pageSize: 8 }) const pageParams = ref({ pageNo: 1, pageSize: 8 })
const labelCol = reactive({ const labelCol = reactive({
xs:24, xs: 24,
sm:4, sm: 4,
xl:6, xl: 6,
xxl:4 xxl: 4
}); });
const wrapperCol = reactive({ const wrapperCol = reactive({
xs: 24, xs: 24,
sm: 20, sm: 20,
}); });
/** /**
* 编辑 * 编辑
*/ */
function handleEdit(record: Recordable) { function handleEdit(record: Recordable) {
openDrawer(true, { openDrawer(true, {
record, record,
isUpdate: true, isUpdate: true,
showFooter: true, showFooter: true,
tenantSaas: false, tenantSaas: false,
}); });
} }
/** /**
* 预览 * 预览
*/ */
function handlePreview(record: Recordable) { function handlePreview(record: Recordable) {
if (record.deviceIndex == null) { if (record.deviceIndex == null) {
return return
} }
@ -165,23 +172,23 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
}).then(res => { }).then(res => {
previewModal.value.disableSubmit = true; previewModal.value.disableSubmit = true;
previewModal.value.edit(record); previewModal.value.edit(record);
}).catch(res=>{ }).catch(res => {
reload(); reload();
}); });
} }
/** /**
* 成功回调 * 成功回调
*/ */
function handleSuccess() { function handleSuccess() {
reload(); reload();
} }
/** /**
* 画面配置 * 画面配置
*/ */
function handlePicConfig(record) { function handlePicConfig(record) {
var params = { var params = {
deviceIndex: record.deviceIndex, deviceIndex: record.deviceIndex,
parentId: record.parentId, parentId: record.parentId,
@ -193,43 +200,43 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
cameraPictureConfigModal.value.disableSubmit = true; cameraPictureConfigModal.value.disableSubmit = true;
cameraPictureConfigModal.value.edit(params); cameraPictureConfigModal.value.edit(params);
} }
/** /**
* 左侧树选择后触发 * 左侧树选择后触发
*/ */
function onTreeSelect(data) { function onTreeSelect(data) {
// departData.value = data; // departData.value = data;
} }
/** /**
* 左侧树rootTreeData触发 * 左侧树rootTreeData触发
*/ */
function onRootTreeData(data) { function onRootTreeData(data) {
// rootTreeData.value = data; // rootTreeData.value = data;
} }
function reload(){ function reload() {
queryParam.pageSize = pageParams.value.pageSize; queryParam.pageSize = pageParams.value.pageSize;
queryParam.pageNo = pageParams.value.pageNo; queryParam.pageNo = pageParams.value.pageNo;
defHttp.get({url: '/iot/tplink/cameraInfo/list',params:queryParam}).then(res => { defHttp.get({ url: '/iot/tplink/cameraInfo/list', params: queryParam }).then(res => {
console.log("🚀 ~ defHttp.get ~ res:", res) console.log("🚀 ~ defHttp.get ~ res:", res)
tableData.value = res; tableData.value = res;
}); });
} }
/** /**
* 重置 * 重置
*/ */
function searchReset() { function searchReset() {
formRef.value.resetFields(); formRef.value.resetFields();
// //
reload(); reload();
} }
onMounted(() => { onMounted(() => {
watch( watch(
() => props.data, () => props.data,
async () => { async () => {
@ -243,44 +250,43 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
}, },
{ deep: true, immediate: true } { deep: true, immediate: true }
); );
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.zxClass {
font-size: 14px;
.zxClass{
font-size:14px;
background: linear-gradient(to right, #1ea0fa, #017de9); background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px; border-radius: 8px;
height: 25px; height: 25px;
color: white; color: white;
line-height: 25px; line-height: 25px;
text-align: center; text-align: center;
width:50px; width: 50px;
margin-top:11px; margin-top: 11px;
} }
.lxClass{ .lxClass {
font-size:14px; font-size: 14px;
background: linear-gradient(to right, #cccccc, #cccccc); background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px; border-radius: 8px;
height: 25px; height: 25px;
color: white; color: white;
line-height: 25px; line-height: 25px;
text-align: center; text-align: center;
width:50px; width: 50px;
margin-top:11px; margin-top: 11px;
} }
.tbClass{
.tbClass {
background: #f6f6f6; background: #f6f6f6;
padding: 8px; padding: 8px;
border-radius: 5px; border-radius: 5px;
} }
.antTitle{
.antTitle {
margin-top: 10px; margin-top: 10px;
display: block; display: block;
font-size: 12px; font-size: 12px;
} }
</style> </style>

View File

@ -19,7 +19,7 @@ import DepartUtilsList from './ApiLogList.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue'; import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>(''); const title = ref<string>('');
const width = ref<string>('70%'); const width = ref<string>('1300px');
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);
const registerForm = ref(); const registerForm = ref();

View File

@ -17,7 +17,7 @@
import JModal from '/@/components/Modal/src/JModal/JModal.vue'; import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>(''); const title = ref<string>('');
const width = ref<string>('70%'); const width = ref<string>('1300px');
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);
const registerForm = ref(); const registerForm = ref();

View File

@ -19,7 +19,7 @@ import ApiLogAlarmList from './ApiLogAlarmList.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue'; import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>(''); const title = ref<string>('');
const width = ref<string>('70%'); const width = ref<string>('1300px');
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);
const registerForm = ref(); const registerForm = ref();