设备配置同步日志
This commit is contained in:
parent
48f5fb2d9a
commit
d58444e2d8
|
|
@ -0,0 +1,131 @@
|
||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<!--引用表格-->
|
||||||
|
<BasicTable @register="registerTable">
|
||||||
|
<!--插槽:table标题-->
|
||||||
|
<template #tableTitle>
|
||||||
|
</template>
|
||||||
|
<!--操作栏-->
|
||||||
|
<template #action="{ record }">
|
||||||
|
<TableAction :actions="getTableAction(record)"/>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="tplink-camera-asyncMain" setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
|
import { columns, formSchema } from './configlog.data';
|
||||||
|
import { list } from './configlog.api';
|
||||||
|
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
serverType: '',
|
||||||
|
});
|
||||||
|
|
||||||
|
const queryParam = reactive<any>({});
|
||||||
|
//注册table数据
|
||||||
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
|
tableProps: {
|
||||||
|
title: '配置同步日志表',
|
||||||
|
api: list,
|
||||||
|
columns: columns,
|
||||||
|
formConfig: {
|
||||||
|
schemas: formSchema
|
||||||
|
},
|
||||||
|
canResize: false,
|
||||||
|
useSearchForm: true,
|
||||||
|
showTableSetting: false,
|
||||||
|
showActionColumn: false,
|
||||||
|
beforeFetch: async (params) => {
|
||||||
|
queryParam.serverType = props.serverType
|
||||||
|
return Object.assign(params, queryParam);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功回调
|
||||||
|
*/
|
||||||
|
function handleSuccess() {
|
||||||
|
(selectedRowKeys.value = []) && reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*/
|
||||||
|
function searchQuery() {
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作栏
|
||||||
|
*/
|
||||||
|
function getTableAction(record) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
searchQuery
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.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%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-table-title) {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.darkened-table) {
|
||||||
|
.ant-table-thead>tr>th {
|
||||||
|
background-color: #dadadaee;
|
||||||
|
}
|
||||||
|
.ant-table-tbody>tr>td {
|
||||||
|
background-color: #f3f3f3f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.z-table-class) {
|
||||||
|
.ant-table-thead>tr>th {
|
||||||
|
background-color: #e6f0fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table-tbody>tr>td {
|
||||||
|
background-color: #FBFBFB;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
|
||||||
|
enum Api {
|
||||||
|
|
||||||
|
list = '/iot/syncConfigLog/list',
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 列表接口
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
import {BasicColumn} from '/@/components/Table';
|
||||||
|
import {FormSchema} from '/@/components/Table';
|
||||||
|
|
||||||
|
//列表数据
|
||||||
|
export const columns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '机构编码',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'orgCode',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '机构名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'orgName',
|
||||||
|
width: 220
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'syncType',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '同步状态',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'status',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务类型',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'serverType',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'createTime',
|
||||||
|
width: 160
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '更新时间',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'updateTime',
|
||||||
|
width: 160
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'content'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const formSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
label: '机构编码',
|
||||||
|
field: 'orgCode',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入机构编码',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '同步状态',
|
||||||
|
field: 'status',
|
||||||
|
component: 'JDictSelectTag',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请选择状态',
|
||||||
|
options: [
|
||||||
|
{ label: '同步成功', value: '同步成功' },
|
||||||
|
{ label: '同步中', value: '同步中' },
|
||||||
|
{ label: '同步失败', value: '同步失败' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="syncLogList" tab="同步历史">
|
<a-tab-pane key="syncLogList" tab="同步历史">
|
||||||
<!-- <SyncLogList ref="syncLogListRef" :orgCode="orgData.orgCode"></SyncLogList>-->
|
<SyncConfigLogList ref="syncConfigLogListRef" :serverType="serverType"></SyncConfigLogList>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -34,7 +34,8 @@ import { list } from './config.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 ConfigDrawer from './components/ConfigDrawer.vue'
|
import ConfigDrawer from './components/ConfigDrawer.vue';
|
||||||
|
import SyncConfigLogList from '@/views/iot/ConfigLog/SyncConfigLogList.vue';
|
||||||
|
|
||||||
//注册drawer
|
//注册drawer
|
||||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||||
|
|
@ -42,6 +43,7 @@ let router = useRouter();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const isShow = ref(false);
|
const isShow = ref(false);
|
||||||
|
const serverType = ref('摄像头');
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
//注册table数据
|
//注册table数据
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="syncLogList" tab="同步历史">
|
<a-tab-pane key="syncLogList" tab="同步历史">
|
||||||
<!-- <SyncLogList ref="syncLogListRef" :orgCode="orgData.orgCode"></SyncLogList>-->
|
<SyncConfigLogList ref="syncConfigLogListRef" :serverType="serverType"></SyncConfigLogList>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -34,12 +34,14 @@ import { list } from './config.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 ConfigDrawer from './components/ConfigDrawer.vue'
|
import ConfigDrawer from './components/ConfigDrawer.vue';
|
||||||
|
import SyncConfigLogList from '@/views/iot/ConfigLog/SyncConfigLogList.vue';
|
||||||
|
|
||||||
//注册drawer
|
//注册drawer
|
||||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||||
let router = useRouter();
|
let router = useRouter();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
const serverType = ref('电水表');
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
//注册table数据
|
//注册table数据
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="syncLogList" tab="同步历史">
|
<a-tab-pane key="syncLogList" tab="同步历史">
|
||||||
<!-- <SyncLogList ref="syncLogListRef" :orgCode="orgData.orgCode"></SyncLogList>-->
|
<SyncConfigLogList ref="syncConfigLogListRef" :serverType="serverType"></SyncConfigLogList>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -35,6 +35,7 @@ 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 ConfigDrawer from './components/ConfigDrawer.vue'
|
import ConfigDrawer from './components/ConfigDrawer.vue'
|
||||||
|
import SyncConfigLogList from '@/views/iot/ConfigLog/SyncConfigLogList.vue';
|
||||||
|
|
||||||
//注册drawer
|
//注册drawer
|
||||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||||
|
|
@ -42,6 +43,7 @@ let router = useRouter();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const isShow = ref(false);
|
const isShow = ref(false);
|
||||||
|
const serverType = ref('温湿度计');
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
//注册table数据
|
//注册table数据
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue