⚡ 修改 hook 位置.
This commit is contained in:
@@ -118,7 +118,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ${vue.featureEntity}QueryRequest, ${vue.featureEntity}QueryResponse } from '@/api/${vue.module}/${vue.feature}';
|
import type { ${vue.featureEntity}QueryRequest, ${vue.featureEntity}QueryResponse } from '@/api/${vue.module}/${vue.feature}';
|
||||||
import { usePagination, useColLayout } from '@/types/card';
|
import { useCardPagination, useCardColLayout } from '@/hooks/card';
|
||||||
import { computed, reactive, ref, onMounted } from 'vue';
|
import { computed, reactive, ref, onMounted } from 'vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { objectTruthKeyCount, resetObject } from '@/utils';
|
import { objectTruthKeyCount, resetObject } from '@/utils';
|
||||||
@@ -136,8 +136,8 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate']);
|
const emits = defineEmits(['openAdd', 'openUpdate']);
|
||||||
|
|
||||||
const cardColLayout = useColLayout();
|
const cardColLayout = useCardColLayout();
|
||||||
const pagination = usePagination();
|
const pagination = useCardPagination();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
#if($dictMap.entrySet().size() > 0)
|
#if($dictMap.entrySet().size() > 0)
|
||||||
const { toOptions, getDictValue } = useDictStore();
|
const { toOptions, getDictValue } = useDictStore();
|
||||||
|
|||||||
@@ -151,9 +151,9 @@
|
|||||||
import {} from '../types/const';
|
import {} from '../types/const';
|
||||||
#end
|
#end
|
||||||
#if($vue.enableRowSelection)
|
#if($vue.enableRowSelection)
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
#else
|
#else
|
||||||
import { usePagination } from '@/types/table';
|
import { useTablePagination } from '@/hooks/table';
|
||||||
#end
|
#end
|
||||||
#if($dictMap.entrySet().size() > 0)
|
#if($dictMap.entrySet().size() > 0)
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate']);
|
const emits = defineEmits(['openAdd', 'openUpdate']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
#if($vue.enableRowSelection)
|
#if($vue.enableRowSelection)
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
#end
|
#end
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ public class DataPermissionServiceImpl implements DataPermissionService {
|
|||||||
.eq(DataPermissionDO::getRoleId, roleId)
|
.eq(DataPermissionDO::getRoleId, roleId)
|
||||||
.eq(DataPermissionDO::getType, type);
|
.eq(DataPermissionDO::getType, type);
|
||||||
dataPermissionDAO.delete(wrapper);
|
dataPermissionDAO.delete(wrapper);
|
||||||
|
// 删除缓存
|
||||||
|
this.deleteCache(type, userId, roleId);
|
||||||
if (Lists.isEmpty(request.getRelIdList())) {
|
if (Lists.isEmpty(request.getRelIdList())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -100,8 +102,6 @@ public class DataPermissionServiceImpl implements DataPermissionService {
|
|||||||
.build())
|
.build())
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
dataPermissionDAO.insertBatch(records);
|
dataPermissionDAO.insertBatch(records);
|
||||||
// 删除缓存
|
|
||||||
this.deleteCache(type, userId, roleId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
import type { HostQueryResponse } from '@/api/asset/host';
|
import type { HostQueryResponse } from '@/api/asset/host';
|
||||||
import { dataColor } from '@/utils';
|
import { dataColor } from '@/utils';
|
||||||
import { tagColor } from '@/views/asset/host-list/types/const';
|
import { tagColor } from '@/views/asset/host-list/types/const';
|
||||||
import { useRowSelection } from '@/types/table';
|
import { useRowSelection } from '@/hooks/table';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ExecTemplateQueryRequest, ExecTemplateQueryResponse } from '@/api/exec/exec-template';
|
import type { ExecTemplateQueryRequest, ExecTemplateQueryResponse } from '@/api/exec/exec-template';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { usePagination } from '@/types/table';
|
import { useTablePagination } from '@/hooks/table';
|
||||||
import useVisible from '@/hooks/visible';
|
import useVisible from '@/hooks/visible';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
const { visible, setVisible } = useVisible();
|
const { visible, setVisible } = useVisible();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
|
|
||||||
const tableRenderData = ref<ExecTemplateQueryResponse[]>([]);
|
const tableRenderData = ref<ExecTemplateQueryResponse[]>([]);
|
||||||
const formModel = reactive<ExecTemplateQueryRequest>({
|
const formModel = reactive<ExecTemplateQueryRequest>({
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import useVisible from '@/hooks/visible';
|
import useVisible from '@/hooks/visible';
|
||||||
import { getHistoryValuePage } from '@/api/meta/history-value';
|
import { getHistoryValuePage } from '@/api/meta/history-value';
|
||||||
import { usePagination } from '@/types/table';
|
import { useTablePagination } from '@/hooks/table';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import columns from './table.columns';
|
import columns from './table.columns';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
}>();
|
}>();
|
||||||
const emits = defineEmits(['updated']);
|
const emits = defineEmits(['updated']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const { visible, setVisible } = useVisible();
|
const { visible, setVisible } = useVisible();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
|
|
||||||
|
|||||||
35
orion-visor-ui/src/hooks/card.ts
Normal file
35
orion-visor-ui/src/hooks/card.ts
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import type { PaginationProps } from '@arco-design/web-vue';
|
||||||
|
import type { ColResponsiveValue } from '@/types/card';
|
||||||
|
import { reactive } from 'vue';
|
||||||
|
import { isNumber } from '@/utils/is';
|
||||||
|
import { useAppStore } from '@/store';
|
||||||
|
import { CardPageSizeOptions } from '@/types/const';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建卡片列表列布局
|
||||||
|
*/
|
||||||
|
export const useCardColLayout = (): ColResponsiveValue => {
|
||||||
|
return reactive({
|
||||||
|
xs: 24,
|
||||||
|
sm: 12,
|
||||||
|
md: 8,
|
||||||
|
lg: 8,
|
||||||
|
xl: 8,
|
||||||
|
xxl: 6,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建创建卡片列表分页
|
||||||
|
*/
|
||||||
|
export const useCardPagination = (): PaginationProps => {
|
||||||
|
const appStore = useAppStore();
|
||||||
|
return reactive({
|
||||||
|
total: 0,
|
||||||
|
current: 1,
|
||||||
|
pageSize: isNumber(appStore.defaultCardPageSize) ? appStore.defaultCardPageSize : CardPageSizeOptions[0],
|
||||||
|
showTotal: true,
|
||||||
|
showPageSize: true,
|
||||||
|
pageSizeOptions: CardPageSizeOptions
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -8,7 +8,7 @@ import { TablePageSizeOptions } from '@/types/const';
|
|||||||
/**
|
/**
|
||||||
* 创建列表分页
|
* 创建列表分页
|
||||||
*/
|
*/
|
||||||
export const usePagination = (ext?: PaginationProps): PaginationProps => {
|
export const useTablePagination = (ext?: PaginationProps): PaginationProps => {
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
return reactive({
|
return reactive({
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
import type { PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
|
import type { ResponsiveValue } from '@arco-design/web-vue';
|
||||||
import type { VNodeChild } from 'vue';
|
import type { VNodeChild } from 'vue';
|
||||||
import { reactive } from 'vue';
|
|
||||||
import { useAppStore } from '@/store';
|
|
||||||
import { isNumber } from '@/utils/is';
|
|
||||||
import { CardPageSizeOptions } from '@/types/const';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字段对齐方式
|
* 字段对齐方式
|
||||||
@@ -88,32 +84,3 @@ export interface HandleVisible {
|
|||||||
disableSearch?: boolean;
|
disableSearch?: boolean;
|
||||||
disableReset?: boolean;
|
disableReset?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建卡片列表列布局
|
|
||||||
*/
|
|
||||||
export const useColLayout = (): ColResponsiveValue => {
|
|
||||||
return {
|
|
||||||
xs: 24,
|
|
||||||
sm: 12,
|
|
||||||
md: 8,
|
|
||||||
lg: 8,
|
|
||||||
xl: 8,
|
|
||||||
xxl: 6,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建创建卡片列表分页
|
|
||||||
*/
|
|
||||||
export const usePagination = (): PaginationProps => {
|
|
||||||
const appStore = useAppStore();
|
|
||||||
return reactive({
|
|
||||||
total: 0,
|
|
||||||
current: 1,
|
|
||||||
pageSize: isNumber(appStore.defaultCardPageSize) ? appStore.defaultCardPageSize : CardPageSizeOptions[0],
|
|
||||||
showTotal: true,
|
|
||||||
showPageSize: true,
|
|
||||||
pageSizeOptions: CardPageSizeOptions
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -203,7 +203,7 @@
|
|||||||
import { reactive, ref, onMounted } from 'vue';
|
import { reactive, ref, onMounted } from 'vue';
|
||||||
import { deleteHostConnectLog, getHostConnectLogPage, hostForceOffline } from '@/api/asset/host-connect-log';
|
import { deleteHostConnectLog, getHostConnectLogPage, hostForceOffline } from '@/api/asset/host-connect-log';
|
||||||
import { connectStatusKey, connectTypeKey, HostConnectStatus } from '../types/const';
|
import { connectStatusKey, connectTypeKey, HostConnectStatus } from '../types/const';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['openClear', 'openDetail']);
|
const emits = defineEmits(['openClear', 'openDetail']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { toOptions, getDictValue } = useDictStore();
|
const { toOptions, getDictValue } = useDictStore();
|
||||||
|
|||||||
@@ -188,7 +188,7 @@
|
|||||||
import { reactive, ref, onMounted } from 'vue';
|
import { reactive, ref, onMounted } from 'vue';
|
||||||
import { getHostSftpLogPage, deleteHostSftpLog } from '@/api/asset/host-sftp';
|
import { getHostSftpLogPage, deleteHostSftpLog } from '@/api/asset/host-sftp';
|
||||||
import { sftpOperatorTypeKey, sftpOperatorResultKey, SftpOperatorType, showPathMaxCount } from '../types/const';
|
import { sftpOperatorTypeKey, sftpOperatorResultKey, SftpOperatorType, showPathMaxCount } from '../types/const';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
@@ -198,7 +198,7 @@
|
|||||||
import UserSelector from '@/components/user/user/selector/index.vue';
|
import UserSelector from '@/components/user/user/selector/index.vue';
|
||||||
import HostSelector from '@/components/asset/host/selector/index.vue';
|
import HostSelector from '@/components/asset/host/selector/index.vue';
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { toOptions, getDictValue } = useDictStore();
|
const { toOptions, getDictValue } = useDictStore();
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
import type { HostKeyQueryResponse } from '@/api/asset/host-key';
|
import type { HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { useRowSelection } from '@/types/table';
|
import { useRowSelection } from '@/hooks/table';
|
||||||
import { getAuthorizedHostIdentity, grantHostIdentity } from '@/api/asset/asset-data-grant';
|
import { getAuthorizedHostIdentity, grantHostIdentity } from '@/api/asset/asset-data-grant';
|
||||||
import { useCacheStore, useDictStore } from '@/store';
|
import { useCacheStore, useDictStore } from '@/store';
|
||||||
import { hostIdentityColumns } from '../types/table.columns';
|
import { hostIdentityColumns } from '../types/table.columns';
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { getAuthorizedHostKey, grantHostKey } from '@/api/asset/asset-data-grant';
|
import { getAuthorizedHostKey, grantHostKey } from '@/api/asset/asset-data-grant';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { useRowSelection } from '@/types/table';
|
import { useRowSelection } from '@/hooks/table';
|
||||||
import { useCacheStore } from '@/store';
|
import { useCacheStore } from '@/store';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { hostKeyColumns } from '../types/table.columns';
|
import { hostKeyColumns } from '../types/table.columns';
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { HostIdentityQueryRequest, HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
import type { HostIdentityQueryRequest, HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
||||||
import { usePagination, useColLayout } from '@/types/card';
|
import { useCardPagination, useCardColLayout } from '@/hooks/card';
|
||||||
import { computed, reactive, ref, onMounted } from 'vue';
|
import { computed, reactive, ref, onMounted } from 'vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { objectTruthKeyCount, resetObject } from '@/utils';
|
import { objectTruthKeyCount, resetObject } from '@/utils';
|
||||||
@@ -164,8 +164,8 @@
|
|||||||
|
|
||||||
const list = ref<HostIdentityQueryResponse[]>([]);
|
const list = ref<HostIdentityQueryResponse[]>([]);
|
||||||
|
|
||||||
const cardColLayout = useColLayout();
|
const cardColLayout = useCardColLayout();
|
||||||
const pagination = usePagination();
|
const pagination = useCardPagination();
|
||||||
const { toOptions, getDictValue } = useDictStore();
|
const { toOptions, getDictValue } = useDictStore();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { hasAnyPermission } = usePermission();
|
const { hasAnyPermission } = usePermission();
|
||||||
|
|||||||
@@ -183,14 +183,14 @@
|
|||||||
import usePermission from '@/hooks/permission';
|
import usePermission from '@/hooks/permission';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||||
import { IdentityType, identityTypeKey } from '../types/const';
|
import { IdentityType, identityTypeKey } from '../types/const';
|
||||||
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openKeyView']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openKeyView']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { toOptions, getDictValue } = useDictStore();
|
const { toOptions, getDictValue } = useDictStore();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { HostKeyQueryRequest, HostKeyQueryResponse } from '@/api/asset/host-key';
|
import type { HostKeyQueryRequest, HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||||
import { usePagination, useColLayout } from '@/types/card';
|
import { useCardPagination, useCardColLayout } from '@/hooks/card';
|
||||||
import { reactive, ref, onMounted } from 'vue';
|
import { reactive, ref, onMounted } from 'vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { resetObject } from '@/utils';
|
import { resetObject } from '@/utils';
|
||||||
@@ -94,8 +94,8 @@
|
|||||||
|
|
||||||
const list = ref<HostKeyQueryResponse[]>([]);
|
const list = ref<HostKeyQueryResponse[]>([]);
|
||||||
|
|
||||||
const cardColLayout = useColLayout();
|
const cardColLayout = useCardColLayout();
|
||||||
const pagination = usePagination();
|
const pagination = useCardPagination();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
|
|
||||||
const formModel = reactive<HostKeyQueryRequest>({
|
const formModel = reactive<HostKeyQueryRequest>({
|
||||||
|
|||||||
@@ -137,12 +137,12 @@
|
|||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openView']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openView']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { HostQueryRequest, HostQueryResponse } from '@/api/asset/host';
|
import type { HostQueryRequest, HostQueryResponse } from '@/api/asset/host';
|
||||||
import { usePagination, useColLayout } from '@/types/card';
|
import { useCardPagination, useCardColLayout } from '@/hooks/card';
|
||||||
import { computed, reactive, ref, onMounted } from 'vue';
|
import { computed, reactive, ref, onMounted } from 'vue';
|
||||||
import { dataColor, objectTruthKeyCount, resetObject } from '@/utils';
|
import { dataColor, objectTruthKeyCount, resetObject } from '@/utils';
|
||||||
import { deleteHost, getHostPage, updateHostStatus } from '@/api/asset/host';
|
import { deleteHost, getHostPage, updateHostStatus } from '@/api/asset/host';
|
||||||
@@ -211,8 +211,8 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup', 'openCopy']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup', 'openCopy']);
|
||||||
|
|
||||||
const cardColLayout = useColLayout();
|
const cardColLayout = useCardColLayout();
|
||||||
const pagination = usePagination();
|
const pagination = useCardPagination();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { toOptions, getDictValue, toggleDictValue, toggleDict } = useDictStore();
|
const { toOptions, getDictValue, toggleDictValue, toggleDict } = useDictStore();
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@
|
|||||||
import { deleteHost, batchDeleteHost, getHostPage, updateHostStatus } from '@/api/asset/host';
|
import { deleteHost, batchDeleteHost, getHostPage, updateHostStatus } from '@/api/asset/host';
|
||||||
import { Message, Modal } from '@arco-design/web-vue';
|
import { Message, Modal } from '@arco-design/web-vue';
|
||||||
import { tagColor, hostTypeKey, hostStatusKey } from '../types/const';
|
import { tagColor, hostTypeKey, hostStatusKey } from '../types/const';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import { dataColor } from '@/utils';
|
import { dataColor } from '@/utils';
|
||||||
@@ -251,7 +251,7 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['openCopy', 'openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup']);
|
const emits = defineEmits(['openCopy', 'openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { toOptions, getDictValue, toggleDictValue, toggleDict } = useDictStore();
|
const { toOptions, getDictValue, toggleDictValue, toggleDict } = useDictStore();
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
import columns from '../types/host-table.columns';
|
import columns from '../types/host-table.columns';
|
||||||
import { execHostStatusKey, execHostStatus } from '@/components/exec/log/const';
|
import { execHostStatusKey, execHostStatus } from '@/components/exec/log/const';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { useExpandable } from '@/types/table';
|
import { useExpandable } from '@/hooks/table';
|
||||||
import { dateFormat, formatDuration } from '@/utils';
|
import { dateFormat, formatDuration } from '@/utils';
|
||||||
import { downloadExecCommandLogFile, interruptHostExecCommand } from '@/api/exec/exec-command-log';
|
import { downloadExecCommandLogFile, interruptHostExecCommand } from '@/api/exec/exec-command-log';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
|
|||||||
@@ -220,7 +220,7 @@
|
|||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { execStatus, execStatusKey } from '@/components/exec/log/const';
|
import { execStatus, execStatusKey } from '@/components/exec/log/const';
|
||||||
import { useExpandable, usePagination, useRowSelection } from '@/types/table';
|
import { useExpandable, useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { dateFormat, formatDuration } from '@/utils';
|
import { dateFormat, formatDuration } from '@/utils';
|
||||||
import { reExecCommand } from '@/api/exec/exec-command';
|
import { reExecCommand } from '@/api/exec/exec-command';
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['viewCommand', 'viewParams', 'viewLog', 'openClear']);
|
const emits = defineEmits(['viewCommand', 'viewParams', 'viewLog', 'openClear']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const expandable = useExpandable();
|
const expandable = useExpandable();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
|
|||||||
@@ -133,12 +133,12 @@
|
|||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openExec']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openExec']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
|
|
||||||
|
|||||||
@@ -187,14 +187,14 @@
|
|||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { UploadTaskStatus, uploadTaskStatusKey } from '../types/const';
|
import { UploadTaskStatus, uploadTaskStatusKey } from '../types/const';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import UserSelector from '@/components/user/user/selector/index.vue';
|
import UserSelector from '@/components/user/user/selector/index.vue';
|
||||||
|
|
||||||
const emits = defineEmits(['openClear']);
|
const emits = defineEmits(['openClear']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { toOptions, getDictValue } = useDictStore();
|
const { toOptions, getDictValue } = useDictStore();
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
import type { SftpFile, ISftpSession } from '../../types/define';
|
import type { SftpFile, ISftpSession } from '../../types/define';
|
||||||
import type { VNodeRef } from 'vue';
|
import type { VNodeRef } from 'vue';
|
||||||
import { ref, computed, watch, inject } from 'vue';
|
import { ref, computed, watch, inject } from 'vue';
|
||||||
import { useRowSelection } from '@/types/table';
|
import { useRowSelection } from '@/hooks/table';
|
||||||
import { dateFormat } from '@/utils';
|
import { dateFormat } from '@/utils';
|
||||||
import { setAutoFocus } from '@/utils/dom';
|
import { setAutoFocus } from '@/utils/dom';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '@/views/exec/exec-command-log/types/host-table.columns';
|
import columns from '@/views/exec/exec-command-log/types/host-table.columns';
|
||||||
import { useExpandable } from '@/types/table';
|
import { useExpandable } from '@/hooks/table';
|
||||||
import { dateFormat, formatDuration } from '@/utils';
|
import { dateFormat, formatDuration } from '@/utils';
|
||||||
import { downloadExecJobLogFile } from '@/api/job/exec-job-log';
|
import { downloadExecJobLogFile } from '@/api/job/exec-job-log';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
|
|||||||
@@ -203,7 +203,7 @@
|
|||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { execStatus, execStatusKey } from '@/components/exec/log/const';
|
import { execStatus, execStatusKey } from '@/components/exec/log/const';
|
||||||
import { useExpandable, usePagination, useRowSelection } from '@/types/table';
|
import { useExpandable, useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { dateFormat, formatDuration } from '@/utils';
|
import { dateFormat, formatDuration } from '@/utils';
|
||||||
import { interruptExecJob } from '@/api/job/exec-job-log';
|
import { interruptExecJob } from '@/api/job/exec-job-log';
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['viewCommand', 'viewParams', 'viewLog', 'openClear']);
|
const emits = defineEmits(['viewCommand', 'viewParams', 'viewLog', 'openClear']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const expandable = useExpandable();
|
const expandable = useExpandable();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
|
|||||||
@@ -197,14 +197,14 @@
|
|||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { ExecJobStatus, execJobStatusKey, execStatusKey } from '../types/const';
|
import { ExecJobStatus, execJobStatusKey, execStatusKey } from '../types/const';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import { dateFormat } from '@/utils';
|
import { dateFormat } from '@/utils';
|
||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openDetail', 'testCron']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openDetail', 'testCron']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { hasPermission } = usePermission();
|
const { hasPermission } = usePermission();
|
||||||
|
|||||||
@@ -165,7 +165,7 @@
|
|||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { dictValueTypeKey } from '../types/const';
|
import { dictValueTypeKey } from '../types/const';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import { useCacheStore, useDictStore } from '@/store';
|
import { useCacheStore, useDictStore } from '@/store';
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openView']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openView']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { toOptions, getDictValue } = useDictStore();
|
const { toOptions, getDictValue } = useDictStore();
|
||||||
|
|||||||
@@ -140,13 +140,13 @@
|
|||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import DictKeySelector from '@/components/system/dict-key/selector/index.vue';
|
import DictKeySelector from '@/components/system/dict-key/selector/index.vue';
|
||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openHistory']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openHistory']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
import { getLogDetail } from '../types/const';
|
import { getLogDetail } from '../types/const';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { usePagination } from '@/types/table';
|
import { useTablePagination } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { getOperatorLogPage } from '@/api/user/operator-log';
|
import { getOperatorLogPage } from '@/api/user/operator-log';
|
||||||
import { getCurrentUserOperatorLog } from '@/api/user/mine';
|
import { getCurrentUserOperatorLog } from '@/api/user/mine';
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { getDictValue } = useDictStore();
|
const { getDictValue } = useDictStore();
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { getOperatorLogPage, deleteOperatorLog } from '@/api/user/operator-log';
|
import { getOperatorLogPage, deleteOperatorLog } from '@/api/user/operator-log';
|
||||||
import { replaceHtmlTag, clearHtmlTag } from '@/utils';
|
import { replaceHtmlTag, clearHtmlTag } from '@/utils';
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['openClear', 'openDetail']);
|
const emits = defineEmits(['openClear', 'openDetail']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { getDictValue } = useDictStore();
|
const { getDictValue } = useDictStore();
|
||||||
|
|||||||
@@ -137,14 +137,14 @@
|
|||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { RoleStatus, roleStatusKey } from '../types/const';
|
import { RoleStatus, roleStatusKey } from '../types/const';
|
||||||
import { usePagination } from '@/types/table';
|
import { useTablePagination } from '@/hooks/table';
|
||||||
import usePermission from '@/hooks/permission';
|
import usePermission from '@/hooks/permission';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { AdminRoleCode } from '@/types/const';
|
import { AdminRoleCode } from '@/types/const';
|
||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openGrant']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openGrant']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const { hasPermission } = usePermission();
|
const { hasPermission } = usePermission();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { toOptions, getDictValue } = useDictStore();
|
const { toOptions, getDictValue } = useDictStore();
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { userStatusKey, UserStatus } from '../types/const';
|
import { userStatusKey, UserStatus } from '../types/const';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { usePagination, useRowSelection } from '@/types/table';
|
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import usePermission from '@/hooks/permission';
|
import usePermission from '@/hooks/permission';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useDictStore, useUserStore } from '@/store';
|
import { useDictStore, useUserStore } from '@/store';
|
||||||
@@ -188,7 +188,7 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openResetPassword', 'openGrantRole']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openResetPassword', 'openGrantRole']);
|
||||||
|
|
||||||
const pagination = usePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
const { hasPermission } = usePermission();
|
const { hasPermission } = usePermission();
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
|
|||||||
Reference in New Issue
Block a user