diff --git a/src/views/iot/hs/electricity/index.vue b/src/views/iot/hs/electricity/index.vue
index 6fb1475..de07c72 100644
--- a/src/views/iot/hs/electricity/index.vue
+++ b/src/views/iot/hs/electricity/index.vue
@@ -38,6 +38,7 @@
知道了
+
@@ -52,6 +53,7 @@
import {useModal} from "@/components/Modal";
import DrawerModal from "./components/DrawerModal.vue";
import { defHttp } from '/@/utils/http/axios';
+ import ApiLogModal from "@/views/iot/tq/electricity/apilog/ApiLogModal.vue";
const queryParam = reactive({});
const apiLogModal = ref();
@@ -153,10 +155,10 @@
placement: 'topLeft',
},
},
- // {
- // label: '日志',
- // onClick: showApiLog.bind(null, record),
- // },
+ {
+ label: '日志',
+ onClick: showApiLog.bind(null, record),
+ },
]
}
@@ -219,6 +221,7 @@
*/
function showApiLog(record){
console.log(record);
+ record.cid = record.sn;
apiLogModal.value.disableSubmit = true;
apiLogModal.value.showApiLog(record);
}
diff --git a/src/views/iot/tplink/camera/camera.data.ts b/src/views/iot/tplink/camera/camera.data.ts
index e8f155c..8f47342 100644
--- a/src/views/iot/tplink/camera/camera.data.ts
+++ b/src/views/iot/tplink/camera/camera.data.ts
@@ -17,7 +17,7 @@ export const columns: BasicColumn[] = [
{
title: '设备标识',
align: "center",
- dataIndex: 'deviceName'
+ dataIndex: 'mac'
},
{
title: '设备型号',
@@ -70,11 +70,11 @@ export const columns: BasicColumn[] = [
// align: "center",
// dataIndex: 'ip'
// },
- {
- title: 'MAC地址',
- align: "center",
- dataIndex: 'mac'
- },
+ // {
+ // title: 'MAC地址',
+ // align: "center",
+ // dataIndex: 'mac'
+ // },
// {
// title: '区域名称',
// align: "center",
diff --git a/src/views/iot/tplink/camera/components/CameraPreviewForm.vue b/src/views/iot/tplink/camera/components/CameraPreviewForm.vue
index 8c11308..e32f9e6 100644
--- a/src/views/iot/tplink/camera/components/CameraPreviewForm.vue
+++ b/src/views/iot/tplink/camera/components/CameraPreviewForm.vue
@@ -1,5 +1,5 @@
-
+
@@ -100,7 +100,7 @@
-->
-
+
-
-
-
diff --git a/src/views/iot/weihu/components/ReamrksListModal.vue b/src/views/iot/weihu/components/ReamrksListModal.vue
index 78749dd..8eb481f 100644
--- a/src/views/iot/weihu/components/ReamrksListModal.vue
+++ b/src/views/iot/weihu/components/ReamrksListModal.vue
@@ -36,7 +36,7 @@ function add() {
* @param record
*/
function edit(record) {
- title.value = '运维列表';
+ title.value = '物联设备维护日志列表';
visible.value = true;
nextTick(() => {
remarksList.value.init(record);
diff --git a/src/views/iot/weihu/components/RemarksForm.vue b/src/views/iot/weihu/components/RemarksForm.vue
deleted file mode 100644
index 7620b4a..0000000
--- a/src/views/iot/weihu/components/RemarksForm.vue
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/iot/weihu/components/RemarksList.vue b/src/views/iot/weihu/components/RemarksList.vue
index aaa5f3e..463d627 100644
--- a/src/views/iot/weihu/components/RemarksList.vue
+++ b/src/views/iot/weihu/components/RemarksList.vue
@@ -1,48 +1,9 @@
-
-
-
-
-
-
-
+
- 新增
-
-
-
-
-
- 删除
-
-
-
- 批量操作
-
-
-
@@ -52,8 +13,6 @@
-
-
@@ -61,33 +20,23 @@
import {ref, reactive, computed, unref, defineProps} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
- import ReamrksFormModal from './ReamrksFormModal.vue';
- import {columns, searchFormSchema} from './Reamrks.data';
- import {list, deleteOne, batchDelete} from './Reamrks.api';
- import { downloadFile } from '/@/utils/common/renderUtils';
+ import { logColumns } from '../weihu.data';
+ import { remarksList } from '../weihu.api';
import { useUserStore } from '/@/store/modules/user';
- const props = defineProps({
- formDisabled: { type: Boolean, default: false },
- formData: { type: Object, default: () => ({})},
- formBpm: { type: Boolean, default: true }
- });
+
const queryParam = reactive({});
- const parentData = ref();
- const checkedKeys = ref>([]);
+ const deviceName = ref('');
const userStore = useUserStore();
const registerModal = ref();
//注册table数据
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '设备维护日志',
- api: list,
- defSort: {
- column: 'id',
- order: 'asc',
- },
- columns,
+ api: remarksList,
+ columns: logColumns,
canResize:false,
showIndexColumn: true,
+ showActionColumn: false,
actionColumn: {
width: 130,
fixed:'right'
@@ -108,39 +57,6 @@ import {ref, reactive, computed, unref, defineProps} from 'vue';
sm: { span: 16 },
});
- /**
- * 新增事件
- */
- function handleAdd() {
- registerModal.value.disableSubmit = false;
- registerModal.value.add(parentData.value);
- }
- /**
- * 编辑事件
- */
- function handleEdit(record: Recordable) {
- registerModal.value.disableSubmit = false;
- registerModal.value.edit(record);
- }
- /**
- * 详情
- */
- function handleDetail(record: Recordable) {
- registerModal.value.disableSubmit = true;
- registerModal.value.edit(record);
- }
- /**
- * 删除事件
- */
- async function handleDelete(record) {
- await deleteOne({id: record.id}, handleSuccess);
- }
- /**
- * 批量删除事件
- */
- async function batchHandleDelete() {
- await batchDelete({ids: selectedRowKeys.value}, handleSuccess);
- }
/**
* 成功回调
*/
@@ -151,67 +67,22 @@ import {ref, reactive, computed, unref, defineProps} from 'vue';
* 操作栏
*/
function getTableAction(record){
- // return [
- // {
- // label: '详情',
- // onClick: handleDetail.bind(null, record),
- // },
- // {
- // label: '编辑',
- // onClick: handleEdit.bind(null, record),
- // }, {
- // label: '删除',
- // popConfirm: {
- // title: '是否确认删除',
- // confirm: handleDelete.bind(null, record),
- // placement: 'topLeft',
- // },
- // }
- // ]
- const actions = [];
- actions.push(
- {
- label: '详情',
- onClick: handleDetail.bind(null, record),
- }
- );
- if(record.delFlag == '0'){
- // actions.push(
- // {
- // label: '编辑',
- // onClick: handleEdit.bind(null, record),
- // }
- // );
- actions.push(
- {
- label: '删除',
- popConfirm: {
- title: '是否确认删除',
- confirm: handleDelete.bind(null, record),
- placement: 'topLeft',
- },
- }
- );
- }
- return actions;
+ return []
}
- function init(record){
- parentData.value = unref(record);
- queryParam.deviceId = parentData.value.deviceId;
- queryParam.delFlag = '0';
- reload();
- }
-
function searchQuery(){
+ queryParam.deviceName = deviceName.value;
reload();
}
function searchReset(){
- queryParam.delFlag = '0';
- selectedRowKeys.value = [];
//刷新数据
- reload();
+ searchQuery();
+ }
+
+ function init(record){
+ deviceName.value = record.deviceName;
+ searchQuery();
}
// 暴露给父组件的方法
@@ -219,7 +90,6 @@ import {ref, reactive, computed, unref, defineProps} from 'vue';
init
});
-
diff --git a/src/views/iot/weihu/index.vue b/src/views/iot/weihu/index.vue
index aba18d9..822a32a 100644
--- a/src/views/iot/weihu/index.vue
+++ b/src/views/iot/weihu/index.vue
@@ -1,10 +1,9 @@
@@ -47,7 +46,7 @@ import {onMounted, reactive, ref} from 'vue';
//注册table数据
const { prefixCls,tableContext } = useListPage({
tableProps:{
- title: '设备维修',
+ title: '设备维护',
api: list,
columns,
canResize:false,
@@ -69,19 +68,19 @@ import {onMounted, reactive, ref} from 'vue';
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
- function handleSelectionChange(selectedRowSet) {
- selectedRows.value = selectedRowSet.rows;
- console.log('当前选中数据:', selectedRows.value);
- }
-
- function handleSendOrg(){
- openDrawer(true, {
- records : selectedRows.value,
- isUpdate: true,
- showFooter: true,
- tenantSaas: false,
- });
- }
+ // function handleSelectionChange(selectedRowSet) {
+ // selectedRows.value = selectedRowSet.rows;
+ // console.log('当前选中数据:', selectedRows.value);
+ // }
+ //
+ // function handleSendOrg(){
+ // openDrawer(true, {
+ // records : selectedRows.value,
+ // isUpdate: true,
+ // showFooter: true,
+ // tenantSaas: false,
+ // });
+ // }
/**
* 成功回调
@@ -111,10 +110,6 @@ import {onMounted, reactive, ref} from 'vue';
*/
function getTableAction(record){
return [
- // {
- // label: '备注',
- // onClick: handleDetail.bind(null, record),
- // },
{
label: '备注',
onClick: handleDetail.bind(null, record),
diff --git a/src/views/iot/weihu/weihu.api.ts b/src/views/iot/weihu/weihu.api.ts
index 4646cc4..1261ba6 100644
--- a/src/views/iot/weihu/weihu.api.ts
+++ b/src/views/iot/weihu/weihu.api.ts
@@ -5,6 +5,7 @@ enum Api {
saveSendOrg = '/iot/weihu/deviceMaintain/saveSendOrg',
departlist = '/iot/weihu/deviceMaintain/departlist',
nulist = '/iot/weihu/deviceMaintain/nulist',
+ remarksList = '/iot/weihu/deviceMaintain/remarksList',
}
/**
@@ -32,3 +33,9 @@ export const departlist = (params) => defHttp.get({ url: Api.departlist, params
* @param params
*/
export const nulist = (params) => defHttp.get({ url: Api.nulist, params });
+
+/**
+ * 接口
+ * @param params
+ */
+export const remarksList = (params) => defHttp.get({ url: Api.remarksList, params });
diff --git a/src/views/iot/weihu/weihu.data.ts b/src/views/iot/weihu/weihu.data.ts
index 7bef970..0836f2a 100644
--- a/src/views/iot/weihu/weihu.data.ts
+++ b/src/views/iot/weihu/weihu.data.ts
@@ -4,22 +4,65 @@ import {FormSchema} from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
{
- title: '设备类型',
+ title: '机构编码',
align: "center",
- dataIndex: 'type'
+ dataIndex: 'orgCode',
+ width: 100,
+ },
+ {
+ title: '机构名称',
+ align: "center",
+ dataIndex: 'departName'
+ },
+ {
+ title: '区域编码',
+ align: "center",
+ dataIndex: 'nuId',
+ width: 100,
+ },
+ {
+ title: '区域名称',
+ align: "center",
+ dataIndex: 'nuName'
+ },
+ {
+ title: '区域类型',
+ align: "center",
+ dataIndex: 'areaFlag_dictText',
+ width: 100,
+ },
+ {
+ title: '设备标识',
+ align: "center",
+ dataIndex: 'deviceName',
+ width: 140,
},
{
title: '设备编码',
align: "center",
- dataIndex: 'deviceId'
+ dataIndex: 'deviceId',
+ width: 140,
},
{
- title: 'SN',
+ title: '设备类型',
align: "center",
- dataIndex: 'sn'
+ dataIndex: 'deviceType',
+ width: 100,
},
{
- title: '维修状态',
+ title: '在线状态',
+ align: "center",
+ dataIndex: 'deviceStatus',
+ width: 100,
+ },
+ {
+ title: '分配状态',
+ align: "center",
+ dataIndex: 'izAllocate',
+ width: 100,
+ },
+ {
+ title: '设备状态',
align: "center",
dataIndex: 'maintainStatus',
customRender:({record})=>{
@@ -27,89 +70,22 @@ export const columns: BasicColumn[] = [
return "正常";
}
if(record.maintainStatus==1){
- return "报修";
- }
- if(record.maintainStatus==2){
- return "报废";
+ return "损坏";
}
},
+ width: 100,
},
{
- title: '绑定区域',
+ title: '时间戳',
align: "center",
- dataIndex: 'nuId',
- },
- {
- title: '绑定机构',
- align: "center",
- dataIndex: 'orgCode',
- },
- {
- title: '绑定机构名',
- align: "center",
- dataIndex: 'departName',
- },
- {
- title: '发往机构名',
- align: "center",
- dataIndex: 'reserveDepartName'
- },
- {
- title: '更新时间',
- align: "center",
- dataIndex: 'updateDate'
+ dataIndex: 'updateDate',
+ width: 160,
},
];
export const searchFormSchema: FormSchema[] = [
{
- label: '设备类型',
- field: 'type',
- component: 'JDictSelectTag',
- componentProps: {
- placeholder: '请选择类型',
- options: [
- { label: '摄像头', value: '摄像头' },
- { label: '电表', value: '电表' },
- { label: '水表', value: '水表' },
- { label: '温湿度计', value: '温湿度计' },
- ],
- },
- colProps: { span: 6 },
- },
- {
- label: 'SN',
- field: 'sn',
- component: 'Input',
- colProps: { span: 6 },
- },
- {
- label: '维修状态',
- field: 'maintainStatus',
- component: 'JDictSelectTag',
- componentProps: {
- placeholder: '请选择类型',
- options: [
- { label: '正常', value: '0' },
- { label: '报修', value: '1' },
- { label: '报废', value: '2' },
- ],
- },
- colProps: { span: 6 },
- },
- // {
- // label: '机构',
- // field: 'departId',
- // component: 'JDictSelectTag',
- // slot: 'depart',
- // // componentProps: {
- // // placeholder: '请选择机构',
- // // dictCode: 'sys_depart,depart_name,id,org_category = 1 order by depart_name asc',
- // // },
- // colProps: { span: 6 },
- // },
- {
- label: '绑定机构',
+ label: '机构名称',
field: 'orgCode',
component: 'JDictSelectTag',
slot: 'depart',
@@ -120,7 +96,7 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 6 },
},
{
- label: '绑定区域',
+ label: '区域名称',
field: 'nuId',
component: 'JDictSelectTag',
slot: 'nuArea',
@@ -131,52 +107,77 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 6 },
},
{
- label: '发往机构',
- field: 'reserveDepartId',
+ label: '设备类型',
+ field: 'deviceType',
component: 'JDictSelectTag',
componentProps: {
- placeholder: '请选择区域',
- dictCode: 'sys_depart,depart_name,id,org_category = 1 order by depart_name asc',
+ placeholder: '请选择类型',
+ options: [
+ { label: '录像机', value: '录像机' },
+ { label: '摄像头', value: '摄像头' },
+ { label: '路由器', value: '路由器' },
+ { label: '交换机', value: '交换机' },
+ { label: '无线AP', value: '无线AP' },
+ { label: '智能电表', value: '智能电表' },
+ { label: '智能水表', value: '智能水表' },
+ { label: '温湿度计', value: '温湿度计' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '在线状态',
+ field: 'deviceStatus',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择在线状态',
+ options: [
+ { label: '在线', value: '在线' },
+ { label: '离线', value: '离线' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '分配状态',
+ field: 'izAllocate',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择分配状态',
+ options: [
+ { label: '未分配', value: '未分配' },
+ { label: '已分配', value: '已分配' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '设备状态',
+ field: 'maintainStatus',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择设备状态',
+ options: [
+ { label: '正常', value: '0' },
+ { label: '释放', value: '1' },
+ { label: '损坏', value: '2' },
+ ],
},
colProps: { span: 6 },
},
];
-export const formSchema: FormSchema[] = [
+//列表数据
+export const logColumns: BasicColumn[] = [
{
- label: '',
- field: 'id',
- component: 'Input',
- show: false,
+ title: '备注',
+ align:"center",
+ dataIndex: 'remark'
},
{
- label: '选择机构',
- field: 'reserveDepartId',
- component: 'JSelectDept',
- componentProps: {
- //是否开启异步加载
- sync: false,
- //是否显示复选框
- checkable: true,
- //是否显示选择按钮
- showButton: false,
- //父子节点选中状态不再关联
- checkStrictly: false,
- //选择框标题
- modalTitle: '请选择机构',
- },
- required: true
- },
- {
- label: '备注',
- field: 'remark',
- component: 'InputTextArea',
- componentProps: {
- showCount: true,
- maxlength: 1000,
- autosize:{
- minRows: 5
- },
- }
+ title: '创建时间',
+ align:"center",
+ dataIndex: 'updateDate',
+ width: 160
},
];
diff --git a/src/views/iotManager/components/AreaList.vue b/src/views/iotManager/components/AreaList.vue
index 6ebaa1c..33f603a 100644
--- a/src/views/iotManager/components/AreaList.vue
+++ b/src/views/iotManager/components/AreaList.vue
@@ -7,13 +7,13 @@
- 名称
+ 区域名称
- 属性
+ 区域属性
@@ -87,13 +87,13 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs:24,
- sm:4,
- xl:6,
- xxl:4
+ sm:8,
+ xl:8,
+ xxl:8
});
const wrapperCol = reactive({
xs: 24,
- sm: 20,
+ sm: 16,
});
function handleOrgUnbind(){
diff --git a/src/views/iotManager/components/DeviceAddList.vue b/src/views/iotManager/components/DeviceAddList.vue
index 0875dab..d6902db 100644
--- a/src/views/iotManager/components/DeviceAddList.vue
+++ b/src/views/iotManager/components/DeviceAddList.vue
@@ -8,7 +8,7 @@
- 维度
+ 设备维度
区域维度
机构维度
@@ -17,7 +17,7 @@
- 类型
+ 设备类型
摄像头
录像机
@@ -32,7 +32,7 @@
- 状态
+ 在线状态
未分配
释放
@@ -119,13 +119,13 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
const labelCol = reactive({
xs:24,
- sm:4,
- xl:6,
- xxl:4
+ sm:8,
+ xl:8,
+ xxl:8
});
const wrapperCol = reactive({
xs: 24,
- sm: 20,
+ sm: 16,
});
/**
diff --git a/src/views/iotManager/components/DeviceList.vue b/src/views/iotManager/components/DeviceList.vue
index 25ae827..593f2b9 100644
--- a/src/views/iotManager/components/DeviceList.vue
+++ b/src/views/iotManager/components/DeviceList.vue
@@ -114,13 +114,13 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs:24,
- sm:4,
- xl:6,
- xxl:4
+ sm:8,
+ xl:8,
+ xxl:8
});
const wrapperCol = reactive({
xs: 24,
- sm: 20,
+ sm: 16,
});
/**