feat: 修复构建.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<a-card class="general-card table-search-card">
|
<a-card class="general-card table-search-card">
|
||||||
<a-query-header :model="formModel"
|
<query-header :model="formModel"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
@submit="fetchTableData"
|
@submit="fetchTableData"
|
||||||
@reset="fetchTableData"
|
@reset="fetchTableData"
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#end
|
#end
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
#end
|
#end
|
||||||
</a-query-header>
|
</query-header>
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<a-card class="general-card table-card">
|
<a-card class="general-card table-card">
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-dropdown trigger="click" @select="changeLocale">
|
<a-dropdown trigger="click" @select="s => changeLocale(s as string)">
|
||||||
<div ref="localeRef" class="trigger-btn" />
|
<div ref="localeRef" class="trigger-btn" />
|
||||||
<template #content>
|
<template #content>
|
||||||
<a-doption v-for="item in locales"
|
<a-doption v-for="item in locales"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<!-- 开关 -->
|
<!-- 开关 -->
|
||||||
<a-switch v-else-if="type === 'switch'"
|
<a-switch v-else-if="type === 'switch'"
|
||||||
type="round"
|
type="round"
|
||||||
:default-checked="defaultValue"
|
:default-checked="defaultValue as boolean"
|
||||||
size="small"
|
size="small"
|
||||||
@change="handleChange" />
|
@change="handleChange" />
|
||||||
<!-- 单选按钮 -->
|
<!-- 单选按钮 -->
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { App } from 'vue';
|
import type { App } from 'vue';
|
||||||
import { use } from 'echarts/core';
|
import { use } from 'echarts/core';
|
||||||
import AQueryHeader from '@dangojs/a-query-header';
|
import QueryHeader from '@dangojs/a-query-header';
|
||||||
import { CanvasRenderer } from 'echarts/renderers';
|
import { CanvasRenderer } from 'echarts/renderers';
|
||||||
import { BarChart, LineChart, PieChart, RadarChart } from 'echarts/charts';
|
import { BarChart, LineChart, PieChart, RadarChart } from 'echarts/charts';
|
||||||
import {
|
import {
|
||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
install(Vue: App) {
|
install(Vue: App) {
|
||||||
Vue.component('chart', Chart);
|
Vue.component('chart', Chart);
|
||||||
Vue.component('breadcrumb', Breadcrumb);
|
Vue.component('breadcrumb', Breadcrumb);
|
||||||
Vue.component('a-query-header', AQueryHeader);
|
Vue.component('query-header', QueryHeader);
|
||||||
Vue.component('card-list', CardList);
|
Vue.component('card-list', CardList);
|
||||||
Vue.component('editor', Editor);
|
Vue.component('editor', Editor);
|
||||||
Vue.component('tab-router', TabRouter);
|
Vue.component('tab-router', TabRouter);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
v-model:current="(pagination as PaginationProps).current"
|
v-model:current="(pagination as PaginationProps).current"
|
||||||
v-model:page-size="(pagination as PaginationProps).pageSize"
|
v-model:page-size="(pagination as PaginationProps).pageSize"
|
||||||
v-bind="pagination"
|
v-bind="pagination as any"
|
||||||
:auto-adjust="false"
|
:auto-adjust="false"
|
||||||
@change="page => bubblesEmitter(HeaderEmitter.PAGE_CHANGE, page, (pagination as PaginationProps).pageSize)"
|
@change="page => bubblesEmitter(HeaderEmitter.PAGE_CHANGE, page, (pagination as PaginationProps).pageSize)"
|
||||||
@page-size-change="limit => bubblesEmitter(HeaderEmitter.PAGE_CHANGE, 1, limit)" />
|
@page-size-change="limit => bubblesEmitter(HeaderEmitter.PAGE_CHANGE, 1, limit)" />
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
'field-value',
|
'field-value',
|
||||||
field.ellipsis ? 'field-value-ellipsis' : ''
|
field.ellipsis ? 'field-value-ellipsis' : ''
|
||||||
]">
|
]">
|
||||||
<slot :name="field.slotName" :record="item" :index="index" :key="item[key]">
|
<slot :name="field.slotName" :record="item" :index="index" :key="item[key as string]">
|
||||||
<a-tooltip v-if="field.tooltip" :content="item[field.dataIndex]">
|
<a-tooltip v-if="field.tooltip" :content="item[field.dataIndex]">
|
||||||
<span v-if="field.render" v-html="field.render({ record: item, index })" />
|
<span v-if="field.render" v-html="field.render({ record: item, index })" />
|
||||||
<span v-else>{{ item[field.dataIndex] }}</span>
|
<span v-else>{{ item[field.dataIndex] }}</span>
|
||||||
|
|||||||
@@ -98,6 +98,6 @@ self.MonacoEnvironment = {
|
|||||||
if (label === 'json') {
|
if (label === 'json') {
|
||||||
return new JsonWorker();
|
return new JsonWorker();
|
||||||
}
|
}
|
||||||
return new EditorWorker();
|
return new EditorWorker(label);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="editorContainer"
|
<div ref="editorContainer"
|
||||||
:class="{
|
class="editor-wrapper"
|
||||||
'editor-wrapper': true,
|
:class="[
|
||||||
[containerClass]: !!containerClass
|
!!containerClass ? containerClass : ''
|
||||||
}"
|
]"
|
||||||
:style="{
|
:style="{
|
||||||
...containerStyle
|
...containerStyle
|
||||||
}" />
|
}" />
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
import { createDefaultOptions } from './core';
|
import { createDefaultOptions } from './core';
|
||||||
import { onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
import { onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||||
import { useAppStore } from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
|
import { language as shellLanguage } from 'monaco-editor/esm/vs/basic-languages/shell/shell.js';
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|
||||||
@@ -82,6 +83,48 @@
|
|||||||
emits('update:modelValue', value);
|
emits('update:modelValue', value);
|
||||||
emits('change', value);
|
emits('change', value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// FIXME test containerClass
|
||||||
|
// TODO
|
||||||
|
// 代码提示
|
||||||
|
monaco.languages.registerCompletionItemProvider('shell', {
|
||||||
|
provideCompletionItems() {
|
||||||
|
const suggestions: any = [];
|
||||||
|
// 这个keywords就是java.java文件中有的
|
||||||
|
shellLanguage.keywords?.forEach((item: any) => {
|
||||||
|
suggestions.push({
|
||||||
|
label: item,
|
||||||
|
kind: monaco.languages.CompletionItemKind.Keyword,
|
||||||
|
insertText: item,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
shellLanguage.operators?.forEach((item: any) => {
|
||||||
|
suggestions.push({
|
||||||
|
label: item,
|
||||||
|
kind: monaco.languages.CompletionItemKind.Operator,
|
||||||
|
insertText: item,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
shellLanguage.builtinFunctions?.forEach((item: any) => {
|
||||||
|
suggestions.push({
|
||||||
|
label: item,
|
||||||
|
kind: monaco.languages.CompletionItemKind.Function,
|
||||||
|
insertText: item,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
shellLanguage.builtinVariables?.forEach((item: any) => {
|
||||||
|
suggestions.push({
|
||||||
|
label: item,
|
||||||
|
kind: monaco.languages.CompletionItemKind.Variable,
|
||||||
|
insertText: item,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
suggestions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
emits('editor-mounted', editor);
|
emits('editor-mounted', editor);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
:unmount-on-close="true"
|
:unmount-on-close="true"
|
||||||
:footer="false"
|
:footer="false"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<div :style="{width: '100%', 'height': height}">
|
<div :style="{ width: '100%', 'height': height }">
|
||||||
<editor v-model="value" readonly />
|
<editor v-model="value" readonly />
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export default {
|
export default {
|
||||||
name: 'jsonViewModal'
|
name: 'jsonEditorModal'
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -44,7 +44,6 @@
|
|||||||
const title = ref<string>();
|
const title = ref<string>();
|
||||||
const value = ref<string | any>();
|
const value = ref<string | any>();
|
||||||
|
|
||||||
|
|
||||||
// 打开
|
// 打开
|
||||||
const open = (editorValue: string | any, editorTitle = 'json') => {
|
const open = (editorValue: string | any, editorTitle = 'json') => {
|
||||||
title.value = editorTitle;
|
title.value = editorTitle;
|
||||||
@@ -62,6 +61,7 @@
|
|||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
|
import type { TreeNodeData } from '@arco-design/web-vue';
|
||||||
|
|
||||||
// 通过 label 进行过滤
|
// 通过 label 进行过滤
|
||||||
export const labelFilter = (searchValue: string, option: { label: string; }) => {
|
export const labelFilter = (searchValue: string, option: { label: string }) => {
|
||||||
return option.label.toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
|
return option.label.toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 通过 title 进行过滤
|
// 通过 title 进行过滤
|
||||||
export const titleFilter = (searchValue: string, option: { title: string; }) => {
|
export const titleFilter = (searchValue: string, option: TreeNodeData) => {
|
||||||
return option.title.toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
|
return (option.title as string).toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
class="role-router"
|
class="role-router"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:items="rolesRouter"
|
:items="rolesRouter"
|
||||||
@change="(key, item) => emits('change', key, item)" />
|
@change="(key: number, item: any) => emits('change', key, item)" />
|
||||||
<!-- 加载中 -->
|
<!-- 加载中 -->
|
||||||
<a-skeleton v-else-if="loading"
|
<a-skeleton v-else-if="loading"
|
||||||
class="skeleton-wrapper"
|
class="skeleton-wrapper"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
class="user-router"
|
class="user-router"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:items="usersRouter"
|
:items="usersRouter"
|
||||||
@change="(key, item) => emits('change', key, item)" />
|
@change="(key: number, item: any) => emits('change', key, item)" />
|
||||||
<!-- 加载中 -->
|
<!-- 加载中 -->
|
||||||
<a-skeleton v-else-if="loading"
|
<a-skeleton v-else-if="loading"
|
||||||
class="skeleton-wrapper"
|
class="skeleton-wrapper"
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
v-if="!isAddHandle"
|
v-if="!isAddHandle"
|
||||||
class="password-switch"
|
class="password-switch"
|
||||||
type="round"
|
type="round"
|
||||||
size="large"
|
|
||||||
checked-text="使用新密码"
|
checked-text="使用新密码"
|
||||||
unchecked-text="使用原密码" />
|
unchecked-text="使用原密码" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<a-card class="general-card table-search-card">
|
<a-card class="general-card table-search-card">
|
||||||
<a-query-header :model="formModel"
|
<query-header :model="formModel"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
@submit="fetchTableData"
|
@submit="fetchTableData"
|
||||||
@reset="fetchTableData"
|
@reset="fetchTableData"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<a-form-item field="keyId" label="主机秘钥" label-col-flex="50px">
|
<a-form-item field="keyId" label="主机秘钥" label-col-flex="50px">
|
||||||
<host-key-selector v-model="formModel.keyId" allow-clear />
|
<host-key-selector v-model="formModel.keyId" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-query-header>
|
</query-header>
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<a-card class="general-card table-card">
|
<a-card class="general-card table-card">
|
||||||
|
|||||||
@@ -72,7 +72,6 @@
|
|||||||
v-if="!isAddHandle"
|
v-if="!isAddHandle"
|
||||||
class="password-switch"
|
class="password-switch"
|
||||||
type="round"
|
type="round"
|
||||||
size="large"
|
|
||||||
checked-text="使用新密码"
|
checked-text="使用新密码"
|
||||||
unchecked-text="使用原密码" />
|
unchecked-text="使用原密码" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<a-card class="general-card table-search-card">
|
<a-card class="general-card table-search-card">
|
||||||
<a-query-header :model="formModel"
|
<query-header :model="formModel"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
@submit="fetchTableData"
|
@submit="fetchTableData"
|
||||||
@reset="fetchTableData"
|
@reset="fetchTableData"
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<a-form-item field="name" label="名称" label-col-flex="30px">
|
<a-form-item field="name" label="名称" label-col-flex="30px">
|
||||||
<a-input v-model="formModel.name" placeholder="请输入名称" allow-clear />
|
<a-input v-model="formModel.name" placeholder="请输入名称" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-query-header>
|
</query-header>
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<a-card class="general-card table-card">
|
<a-card class="general-card table-card">
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<!-- SSH 配置 -->
|
<!-- SSH 配置 -->
|
||||||
<ssh-config-form :host-id="record.id"
|
<ssh-config-form :host-id="record.id"
|
||||||
:content="config.ssh"
|
:content="config.ssh"
|
||||||
@submitted="(e) => config.ssh.config = e" />
|
@submitted="(e) => config.ssh = e" />
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { HostConfigWrapper } from '../../types/const';
|
import type { HostConfigWrapper } from '../../types/const';
|
||||||
|
import { HostSshConfig } from './ssh/types/const';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import useVisible from '@/hooks/visible';
|
import useVisible from '@/hooks/visible';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
@@ -46,7 +47,7 @@
|
|||||||
|
|
||||||
const record = ref({} as any);
|
const record = ref({} as any);
|
||||||
const config = ref<HostConfigWrapper>({
|
const config = ref<HostConfigWrapper>({
|
||||||
ssh: undefined
|
ssh: {} as HostSshConfig
|
||||||
});
|
});
|
||||||
|
|
||||||
// 打开
|
// 打开
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
type="round"
|
type="round"
|
||||||
:checked-value="1"
|
:checked-value="1"
|
||||||
:unchecked-value="0"
|
:unchecked-value="0"
|
||||||
:beforeChange="updateStatus" />
|
:beforeChange="s => updateStatus(s as number)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<a-spin v-show="config.status" :loading="loading" class="config-form-wrapper">
|
<a-spin v-show="config.status" :loading="loading" class="config-form-wrapper">
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<a-radio-group type="button"
|
<a-radio-group type="button"
|
||||||
class="auth-type-group usn"
|
class="auth-type-group usn"
|
||||||
v-model="formModel.authType"
|
v-model="formModel.authType"
|
||||||
:options="toOptions(sshAuthTypeKey)" />
|
:options="toOptions(sshAuthTypeKey) as RadioOption[]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- 主机密码 -->
|
<!-- 主机密码 -->
|
||||||
<a-form-item v-if="SshAuthType.PASSWORD === formModel.authType"
|
<a-form-item v-if="SshAuthType.PASSWORD === formModel.authType"
|
||||||
@@ -63,7 +63,6 @@
|
|||||||
v-model="formModel.useNewPassword"
|
v-model="formModel.useNewPassword"
|
||||||
class="password-switch"
|
class="password-switch"
|
||||||
type="round"
|
type="round"
|
||||||
size="large"
|
|
||||||
checked-text="使用新密码"
|
checked-text="使用新密码"
|
||||||
unchecked-text="使用原密码" />
|
unchecked-text="使用原密码" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -136,6 +135,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||||
import type { FieldRule } from '@arco-design/web-vue';
|
import type { FieldRule } from '@arco-design/web-vue';
|
||||||
import type { HostSshConfig } from './types/const';
|
import type { HostSshConfig } from './types/const';
|
||||||
import { reactive, ref, watch } from 'vue';
|
import { reactive, ref, watch } from 'vue';
|
||||||
@@ -145,10 +145,10 @@
|
|||||||
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 { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import HostKeySelector from '@/components/asset/host-key/host-key-selector.vue';
|
|
||||||
import HostIdentitySelector from '@/components/asset/host-identity/host-identity-selector.vue';
|
|
||||||
import { EnabledStatus } from '@/types/const';
|
import { EnabledStatus } from '@/types/const';
|
||||||
import { HostConfigType } from '../../../types/const';
|
import { HostConfigType } from '../../../types/const';
|
||||||
|
import HostKeySelector from '@/components/asset/host-key/host-key-selector.vue';
|
||||||
|
import HostIdentitySelector from '@/components/asset/host-identity/host-identity-selector.vue';
|
||||||
|
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { toOptions } = useDictStore();
|
const { toOptions } = useDictStore();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<a-card class="general-card table-search-card">
|
<a-card class="general-card table-search-card">
|
||||||
<a-query-header :model="formModel"
|
<query-header :model="formModel"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
@submit="fetchTableData"
|
@submit="fetchTableData"
|
||||||
@reset="fetchTableData"
|
@reset="fetchTableData"
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
:tagColor="tagColor"
|
:tagColor="tagColor"
|
||||||
placeholder="请选择主机标签" />
|
placeholder="请选择主机标签" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-query-header>
|
</query-header>
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<a-card class="general-card table-card">
|
<a-card class="general-card table-card">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type { HostSshConfig } from '../components/config/ssh/types/const';
|
|||||||
|
|
||||||
// 主机所有配置
|
// 主机所有配置
|
||||||
export interface HostConfigWrapper {
|
export interface HostConfigWrapper {
|
||||||
ssh: HostSshConfig | unknown;
|
ssh: HostSshConfig;
|
||||||
|
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<a-radio-group
|
<a-radio-group
|
||||||
v-model:model-value="type"
|
v-model:model-value="type"
|
||||||
type="button"
|
type="button"
|
||||||
@change="typeChange"
|
@change="s => typeChange(s as string)"
|
||||||
>
|
>
|
||||||
<a-radio value="text">
|
<a-radio value="text">
|
||||||
{{ $t('workplace.popularContent.text') }}
|
{{ $t('workplace.popularContent.text') }}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<a-card class="general-card table-search-card">
|
<a-card class="general-card table-search-card">
|
||||||
<a-query-header :model="formModel"
|
<query-header :model="formModel"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
:itemOptions="{ 5: { span: 2 } }"
|
:itemOptions="{ 5: { span: 2 } }"
|
||||||
@submit="fetchTableData"
|
@submit="fetchTableData"
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
show-time
|
show-time
|
||||||
format="YYYY-MM-DD HH:mm:ss" />
|
format="YYYY-MM-DD HH:mm:ss" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-query-header>
|
</query-header>
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<a-card class="general-card table-card">
|
<a-card class="general-card table-card">
|
||||||
|
|||||||
@@ -235,7 +235,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 打开配置
|
// 打开配置
|
||||||
const openSetting = inject<(record: HostQueryResponse) => void>(openSshModalKey);
|
const openSetting = inject<(record: HostQueryResponse) => void>(openSshModalKey) as any;
|
||||||
|
|
||||||
// 设置收藏
|
// 设置收藏
|
||||||
const setFavorite = async (item: HostQueryResponse) => {
|
const setFavorite = async (item: HostQueryResponse) => {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<a-radio-group v-model="newConnectionType"
|
<a-radio-group v-model="newConnectionType"
|
||||||
type="button"
|
type="button"
|
||||||
class="usn"
|
class="usn"
|
||||||
:options="toOptions(newConnectionTypeKey)"
|
:options="toOptions(newConnectionTypeKey) as RadioOption[]"
|
||||||
@change="changeNewConnectionType" />
|
@change="s => changeNewConnectionType(s as string)" />
|
||||||
<!-- 过滤 -->
|
<!-- 过滤 -->
|
||||||
<a-auto-complete v-model="filterValue"
|
<a-auto-complete v-model="filterValue"
|
||||||
class="host-filter"
|
class="host-filter"
|
||||||
@@ -75,6 +75,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||||
import type { SelectOptionData } from '@arco-design/web-vue';
|
import type { SelectOptionData } from '@arco-design/web-vue';
|
||||||
import type { AuthorizedHostQueryResponse } from '@/api/asset/asset-authorized-data';
|
import type { AuthorizedHostQueryResponse } from '@/api/asset/asset-authorized-data';
|
||||||
import { getCurrentAuthorizedHost } from '@/api/asset/asset-authorized-data';
|
import { getCurrentAuthorizedHost } from '@/api/asset/asset-authorized-data';
|
||||||
@@ -84,8 +85,8 @@
|
|||||||
import { useAppStore, useDictStore, useTerminalStore } from '@/store';
|
import { useAppStore, useDictStore, useTerminalStore } from '@/store';
|
||||||
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 HostsView from './hosts-view.vue';
|
|
||||||
import { getLatestConnectHostId } from '@/api/asset/host-connect-log';
|
import { getLatestConnectHostId } from '@/api/asset/host-connect-log';
|
||||||
|
import HostsView from './hosts-view.vue';
|
||||||
|
|
||||||
const { loading, setLoading } = useLoading();
|
const { loading, setLoading } = useLoading();
|
||||||
const { toOptions } = useDictStore();
|
const { toOptions } = useDictStore();
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<a-form-item field="authType" label="验证方式">
|
<a-form-item field="authType" label="验证方式">
|
||||||
<a-radio-group type="button"
|
<a-radio-group type="button"
|
||||||
v-model="formModel.authType"
|
v-model="formModel.authType"
|
||||||
:options="toOptions(extraSshAuthTypeKey)" />
|
:options="toOptions(extraSshAuthTypeKey) as RadioOption[]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- 用户名 -->
|
<!-- 用户名 -->
|
||||||
<a-form-item v-if="formModel.authType === ExtraSshAuthType.CUSTOM_KEY"
|
<a-form-item v-if="formModel.authType === ExtraSshAuthType.CUSTOM_KEY"
|
||||||
@@ -61,6 +61,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||||
import type { HostQueryResponse } from '@/api/asset/host';
|
import type { HostQueryResponse } from '@/api/asset/host';
|
||||||
import type { SshExtraModel } from '../../types/terminal.const';
|
import type { SshExtraModel } from '../../types/terminal.const';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<a-radio-group type="button"
|
<a-radio-group type="button"
|
||||||
v-model="formModel.cursorStyle"
|
v-model="formModel.cursorStyle"
|
||||||
class="form-item form-item-cursor-style usn"
|
class="form-item form-item-cursor-style usn"
|
||||||
:options="toOptions(cursorStyleKey)" />
|
:options="toOptions(cursorStyleKey) as RadioOption[]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- 光标闪烁 -->
|
<!-- 光标闪烁 -->
|
||||||
<a-form-item field="cursorBlink" label="光标是否闪烁">
|
<a-form-item field="cursorBlink" label="光标是否闪烁">
|
||||||
@@ -95,6 +95,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||||
import type { TerminalDisplaySetting } from '@/store/modules/terminal/types';
|
import type { TerminalDisplaySetting } from '@/store/modules/terminal/types';
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import { useDictStore, useTerminalStore } from '@/store';
|
import { useDictStore, useTerminalStore } from '@/store';
|
||||||
|
|||||||
@@ -10,16 +10,16 @@
|
|||||||
class="usn"
|
class="usn"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="button"
|
type="button"
|
||||||
:options="toOptions(darkThemeKey)"
|
:options="toOptions(darkThemeKey) as RadioOption[]"
|
||||||
@change="changeDarkTheme">
|
@change="s => changeDarkTheme(s as string)">
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<!-- 内容区域 -->
|
<!-- 内容区域 -->
|
||||||
<div class="terminal-setting-body terminal-theme-container">
|
<div class="terminal-setting-body terminal-theme-container">
|
||||||
<div class="theme-row"
|
<div class="theme-row"
|
||||||
v-for="index in ThemeSchema.length / 2"
|
v-for="rowIndex in ThemeSchema.length / 2"
|
||||||
:key="index">
|
:key="rowIndex">
|
||||||
<a-card v-for="(theme, index) in [ThemeSchema[(index - 1) * 2], ThemeSchema[(index - 1) * 2 + 1]]"
|
<a-card v-for="(theme, colIndex) in [ThemeSchema[(rowIndex - 1) * 2], ThemeSchema[(rowIndex - 1) * 2 + 1]]"
|
||||||
:key="theme.name"
|
:key="theme.name"
|
||||||
class="terminal-theme-card simple-card"
|
class="terminal-theme-card simple-card"
|
||||||
:class="{
|
:class="{
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
:title="theme.name"
|
:title="theme.name"
|
||||||
:style="{
|
:style="{
|
||||||
background: theme.background,
|
background: theme.background,
|
||||||
marginRight: index === 0 ? '16px' : 0
|
marginRight: colIndex === 0 ? '16px' : 0
|
||||||
}"
|
}"
|
||||||
:header-style="{
|
:header-style="{
|
||||||
color: theme.dark ? 'rgba(255, 255, 255, .8)' : 'rgba(0, 0, 0, .8)',
|
color: theme.dark ? 'rgba(255, 255, 255, .8)' : 'rgba(0, 0, 0, .8)',
|
||||||
@@ -53,6 +53,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||||
import { darkThemeKey } from '../../types/terminal.const';
|
import { darkThemeKey } from '../../types/terminal.const';
|
||||||
import ThemeSchema from '../../types/terminal.theme';
|
import ThemeSchema from '../../types/terminal.theme';
|
||||||
import { useDictStore, useTerminalStore } from '@/store';
|
import { useDictStore, useTerminalStore } from '@/store';
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
extraSchemaArr.value.push({
|
extraSchemaArr.value.push({
|
||||||
name: name,
|
name: name as string,
|
||||||
type: type || ValueType.STRING
|
type: type || ValueType.STRING
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<a-card class="general-card table-search-card">
|
<a-card class="general-card table-search-card">
|
||||||
<a-query-header :model="formModel"
|
<query-header :model="formModel"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
@submit="fetchTableData"
|
@submit="fetchTableData"
|
||||||
@reset="fetchTableData"
|
@reset="fetchTableData"
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<a-form-item field="description" label="配置描述" label-col-flex="50px">
|
<a-form-item field="description" label="配置描述" label-col-flex="50px">
|
||||||
<a-input v-model="formModel.description" placeholder="请输入配置描述" allow-clear />
|
<a-input v-model="formModel.description" placeholder="请输入配置描述" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-query-header>
|
</query-header>
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<a-card class="general-card table-card">
|
<a-card class="general-card table-card">
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
@added="modalAddCallback"
|
@added="modalAddCallback"
|
||||||
@updated="modalUpdateCallback" />
|
@updated="modalUpdateCallback" />
|
||||||
<!-- json 查看器模态框 -->
|
<!-- json 查看器模态框 -->
|
||||||
<json-view-modal ref="view" />
|
<json-editor-modal ref="view" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
import { ref, onBeforeMount } from 'vue';
|
import { ref, onBeforeMount } from 'vue';
|
||||||
import DictKeyTable from './components/dict-key-table.vue';
|
import DictKeyTable from './components/dict-key-table.vue';
|
||||||
import DictKeyFormModal from './components/dict-key-form-modal.vue';
|
import DictKeyFormModal from './components/dict-key-form-modal.vue';
|
||||||
import JsonViewModal from '@/components/view/json/json-view-modal.vue';
|
import JsonEditorModal from '@/components/view/json-editor/json-editor-modal.vue';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { dictKeys } from './types/const';
|
import { dictKeys } from './types/const';
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,6 @@ export const dictKeys = [dictValueTypeKey];
|
|||||||
* 额外参数类型
|
* 额外参数类型
|
||||||
*/
|
*/
|
||||||
export interface ExtraParamType {
|
export interface ExtraParamType {
|
||||||
name?: string;
|
name: string;
|
||||||
type?: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<a-card class="general-card table-search-card">
|
<a-card class="general-card table-search-card">
|
||||||
<a-query-header :model="formModel"
|
<query-header :model="formModel"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
@submit="fetchTableData"
|
@submit="fetchTableData"
|
||||||
@reset="resetForm"
|
@reset="resetForm"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<a-form-item field="label" label="配置描述" label-col-flex="50px">
|
<a-form-item field="label" label="配置描述" label-col-flex="50px">
|
||||||
<a-input v-model="formModel.label" placeholder="请输入配置描述" allow-clear />
|
<a-input v-model="formModel.label" placeholder="请输入配置描述" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-query-header>
|
</query-header>
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<a-card class="general-card table-card">
|
<a-card class="general-card table-card">
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
@viewDetail="(e) => view.open(e)" />
|
@viewDetail="(e) => view.open(e)" />
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- json 查看器模态框 -->
|
<!-- json 查看器模态框 -->
|
||||||
<json-view-modal ref="view" />
|
<json-editor-modal ref="view" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
import { dictKeys } from '../../operator-log/types/const';
|
import { dictKeys } from '../../operator-log/types/const';
|
||||||
import OperatorLogQueryHeader from '../../operator-log/components/operator-log-query-header.vue';
|
import OperatorLogQueryHeader from '../../operator-log/components/operator-log-query-header.vue';
|
||||||
import OperatorLogTable from '../../operator-log/components/operator-log-table.vue';
|
import OperatorLogTable from '../../operator-log/components/operator-log-table.vue';
|
||||||
import JsonViewModal from '@/components/view/json/json-view-modal.vue';
|
import JsonEditorModal from '@/components/view/json-editor/json-editor-modal.vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
user: Object as PropType<UserQueryResponse>,
|
user: Object as PropType<UserQueryResponse>,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
position="left"
|
position="left"
|
||||||
:lazy-load="true"
|
:lazy-load="true"
|
||||||
:destroy-on-hide="true"
|
:destroy-on-hide="true"
|
||||||
@tab-click="clickTab">
|
@tab-click="k => clickTab(k as string)">
|
||||||
<!-- 个人信息 -->
|
<!-- 个人信息 -->
|
||||||
<a-tab-pane key="mineInfo"
|
<a-tab-pane key="mineInfo"
|
||||||
v-if="!user || hasPermission('infra:system-user:update')"
|
v-if="!user || hasPermission('infra:system-user:update')"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-query-header :model="formModel"
|
<query-header :model="formModel"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
:itemOptions="{ [visibleUser ? 5 : 4]: { span: 2 } }"
|
:itemOptions="{ [visibleUser ? 5 : 4]: { span: 2 } }"
|
||||||
@submit="submit"
|
@submit="submit"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
:allow-search="true"
|
:allow-search="true"
|
||||||
:filter-option="labelFilter"
|
:filter-option="labelFilter"
|
||||||
placeholder="请选择操作模块"
|
placeholder="请选择操作模块"
|
||||||
@change="selectedModule"
|
@change="m => selectedModule(m as string)"
|
||||||
allow-clear />
|
allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- 操作类型 -->
|
<!-- 操作类型 -->
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
show-time
|
show-time
|
||||||
format="YYYY-MM-DD HH:mm:ss" />
|
format="YYYY-MM-DD HH:mm:ss" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-query-header>
|
</query-header>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<operator-log-table ref="table" @viewDetail="(e) => view.open(e)" />
|
<operator-log-table ref="table" @viewDetail="(e) => view.open(e)" />
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- json 查看器模态框 -->
|
<!-- json 查看器模态框 -->
|
||||||
<json-view-modal ref="view" />
|
<json-editor-modal ref="view" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
import { dictKeys } from './types/const';
|
import { dictKeys } from './types/const';
|
||||||
import OperatorLogQueryHeader from './components/operator-log-query-header.vue';
|
import OperatorLogQueryHeader from './components/operator-log-query-header.vue';
|
||||||
import OperatorLogTable from './components/operator-log-table.vue';
|
import OperatorLogTable from './components/operator-log-table.vue';
|
||||||
import JsonViewModal from '@/components/view/json/json-view-modal.vue';
|
import JsonEditorModal from '@/components/view/json-editor/json-editor-modal.vue';
|
||||||
|
|
||||||
const cacheStore = useCacheStore();
|
const cacheStore = useCacheStore();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<a-card class="general-card table-search-card">
|
<a-card class="general-card table-search-card">
|
||||||
<a-query-header :model="formModel"
|
<query-header :model="formModel"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
@submit="fetchTableData"
|
@submit="fetchTableData"
|
||||||
@reset="fetchTableData"
|
@reset="fetchTableData"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
:options="toOptions(roleStatusKey)"
|
:options="toOptions(roleStatusKey)"
|
||||||
allow-clear />
|
allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-query-header>
|
</query-header>
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<a-card class="general-card table-card">
|
<a-card class="general-card table-card">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<a-card class="general-card table-search-card">
|
<a-card class="general-card table-search-card">
|
||||||
<a-query-header :model="formModel"
|
<query-header :model="formModel"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
@submit="fetchTableData"
|
@submit="fetchTableData"
|
||||||
@reset="fetchTableData"
|
@reset="fetchTableData"
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<a-form-item field="email" label="邮箱" label-col-flex="50px">
|
<a-form-item field="email" label="邮箱" label-col-flex="50px">
|
||||||
<a-input v-model="formModel.email" placeholder="请输入邮箱" allow-clear />
|
<a-input v-model="formModel.email" placeholder="请输入邮箱" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-query-header>
|
</query-header>
|
||||||
</a-card>
|
</a-card>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<a-card class="general-card table-card">
|
<a-card class="general-card table-card">
|
||||||
|
|||||||
Reference in New Issue
Block a user