⚡ 修改 hook 位置.
This commit is contained in:
@@ -203,7 +203,7 @@
|
||||
import { reactive, ref, onMounted } from 'vue';
|
||||
import { deleteHostConnectLog, getHostConnectLogPage, hostForceOffline } from '@/api/asset/host-connect-log';
|
||||
import { connectStatusKey, connectTypeKey, HostConnectStatus } from '../types/const';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import columns from '../types/table.columns';
|
||||
@@ -215,7 +215,7 @@
|
||||
|
||||
const emits = defineEmits(['openClear', 'openDetail']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
import { reactive, ref, onMounted } from 'vue';
|
||||
import { getHostSftpLogPage, deleteHostSftpLog } from '@/api/asset/host-sftp';
|
||||
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 { Message } from '@arco-design/web-vue';
|
||||
import columns from '../types/table.columns';
|
||||
@@ -198,7 +198,7 @@
|
||||
import UserSelector from '@/components/user/user/selector/index.vue';
|
||||
import HostSelector from '@/components/asset/host/selector/index.vue';
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
import type { HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import { ref, onMounted } from 'vue';
|
||||
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 { useCacheStore, useDictStore } from '@/store';
|
||||
import { hostIdentityColumns } from '../types/table.columns';
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { getAuthorizedHostKey, grantHostKey } from '@/api/asset/asset-data-grant';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { useRowSelection } from '@/types/table';
|
||||
import { useRowSelection } from '@/hooks/table';
|
||||
import { useCacheStore } from '@/store';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { hostKeyColumns } from '../types/table.columns';
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
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 useLoading from '@/hooks/loading';
|
||||
import { objectTruthKeyCount, resetObject } from '@/utils';
|
||||
@@ -164,8 +164,8 @@
|
||||
|
||||
const list = ref<HostIdentityQueryResponse[]>([]);
|
||||
|
||||
const cardColLayout = useColLayout();
|
||||
const pagination = usePagination();
|
||||
const cardColLayout = useCardColLayout();
|
||||
const pagination = useCardPagination();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { hasAnyPermission } = usePermission();
|
||||
|
||||
@@ -183,14 +183,14 @@
|
||||
import usePermission from '@/hooks/permission';
|
||||
import { copy } from '@/hooks/copy';
|
||||
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 { IdentityType, identityTypeKey } from '../types/const';
|
||||
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openKeyView']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
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 useLoading from '@/hooks/loading';
|
||||
import { resetObject } from '@/utils';
|
||||
@@ -94,8 +94,8 @@
|
||||
|
||||
const list = ref<HostKeyQueryResponse[]>([]);
|
||||
|
||||
const cardColLayout = useColLayout();
|
||||
const pagination = usePagination();
|
||||
const cardColLayout = useCardColLayout();
|
||||
const pagination = useCardPagination();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
const formModel = reactive<HostKeyQueryRequest>({
|
||||
|
||||
@@ -137,12 +137,12 @@
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
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';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openView']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
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 { dataColor, objectTruthKeyCount, resetObject } from '@/utils';
|
||||
import { deleteHost, getHostPage, updateHostStatus } from '@/api/asset/host';
|
||||
@@ -211,8 +211,8 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup', 'openCopy']);
|
||||
|
||||
const cardColLayout = useColLayout();
|
||||
const pagination = usePagination();
|
||||
const cardColLayout = useCardColLayout();
|
||||
const pagination = useCardPagination();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue, toggleDictValue, toggleDict } = useDictStore();
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
import { deleteHost, batchDeleteHost, getHostPage, updateHostStatus } from '@/api/asset/host';
|
||||
import { Message, Modal } from '@arco-design/web-vue';
|
||||
import { tagColor, hostTypeKey, hostStatusKey } from '../types/const';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import { dataColor } from '@/utils';
|
||||
@@ -251,7 +251,7 @@
|
||||
|
||||
const emits = defineEmits(['openCopy', 'openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue, toggleDictValue, toggleDict } = useDictStore();
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
import columns from '../types/host-table.columns';
|
||||
import { execHostStatusKey, execHostStatus } from '@/components/exec/log/const';
|
||||
import { useDictStore } from '@/store';
|
||||
import { useExpandable } from '@/types/table';
|
||||
import { useExpandable } from '@/hooks/table';
|
||||
import { dateFormat, formatDuration } from '@/utils';
|
||||
import { downloadExecCommandLogFile, interruptHostExecCommand } from '@/api/exec/exec-command-log';
|
||||
import { copy } from '@/hooks/copy';
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
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 { dateFormat, formatDuration } from '@/utils';
|
||||
import { reExecCommand } from '@/api/exec/exec-command';
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
const emits = defineEmits(['viewCommand', 'viewParams', 'viewLog', 'openClear']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const expandable = useExpandable();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
@@ -133,12 +133,12 @@
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { copy } from '@/hooks/copy';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openExec']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
|
||||
@@ -187,14 +187,14 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { UploadTaskStatus, uploadTaskStatusKey } from '../types/const';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import UserSelector from '@/components/user/user/selector/index.vue';
|
||||
|
||||
const emits = defineEmits(['openClear']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
import type { SftpFile, ISftpSession } from '../../types/define';
|
||||
import type { VNodeRef } from 'vue';
|
||||
import { ref, computed, watch, inject } from 'vue';
|
||||
import { useRowSelection } from '@/types/table';
|
||||
import { useRowSelection } from '@/hooks/table';
|
||||
import { dateFormat } from '@/utils';
|
||||
import { setAutoFocus } from '@/utils/dom';
|
||||
import { copy } from '@/hooks/copy';
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
import { useDictStore } from '@/store';
|
||||
import useLoading from '@/hooks/loading';
|
||||
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 { downloadExecJobLogFile } from '@/api/job/exec-job-log';
|
||||
import { copy } from '@/hooks/copy';
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
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 { dateFormat, formatDuration } from '@/utils';
|
||||
import { interruptExecJob } from '@/api/job/exec-job-log';
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
const emits = defineEmits(['viewCommand', 'viewParams', 'viewLog', 'openClear']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const expandable = useExpandable();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
@@ -197,14 +197,14 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { ExecJobStatus, execJobStatusKey, execStatusKey } from '../types/const';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import { dateFormat } from '@/utils';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openDetail', 'testCron']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { hasPermission } = usePermission();
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { dictValueTypeKey } from '../types/const';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openView']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -140,13 +140,13 @@
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import DictKeySelector from '@/components/system/dict-key/selector/index.vue';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openHistory']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
import { getLogDetail } from '../types/const';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { usePagination } from '@/types/table';
|
||||
import { useTablePagination } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { getOperatorLogPage } from '@/api/user/operator-log';
|
||||
import { getCurrentUserOperatorLog } from '@/api/user/mine';
|
||||
@@ -95,7 +95,7 @@
|
||||
},
|
||||
});
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { getDictValue } = useDictStore();
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
import columns from '../types/table.columns';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { useDictStore } from '@/store';
|
||||
import { getOperatorLogPage, deleteOperatorLog } from '@/api/user/operator-log';
|
||||
import { replaceHtmlTag, clearHtmlTag } from '@/utils';
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
const emits = defineEmits(['openClear', 'openDetail']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { getDictValue } = useDictStore();
|
||||
|
||||
@@ -137,14 +137,14 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { RoleStatus, roleStatusKey } from '../types/const';
|
||||
import { usePagination } from '@/types/table';
|
||||
import { useTablePagination } from '@/hooks/table';
|
||||
import usePermission from '@/hooks/permission';
|
||||
import { useDictStore } from '@/store';
|
||||
import { AdminRoleCode } from '@/types/const';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openGrant']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const { hasPermission } = usePermission();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
import columns from '../types/table.columns';
|
||||
import { userStatusKey, UserStatus } from '../types/const';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { usePagination, useRowSelection } from '@/types/table';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import usePermission from '@/hooks/permission';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useDictStore, useUserStore } from '@/store';
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openResetPassword', 'openGrantRole']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { hasPermission } = usePermission();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
Reference in New Issue
Block a user