修改前端导入规范.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import qs from 'query-string';
|
||||
import { DataGrid, Pagination } from '@/types/global';
|
||||
import { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
/**
|
||||
* ${table.comment}创建请求
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AppRouteRecordRaw } from '../types';
|
||||
import { DEFAULT_LAYOUT } from '../base';
|
||||
import { AppRouteRecordRaw } from '../types';
|
||||
|
||||
const $vue.moduleConst: AppRouteRecordRaw = {
|
||||
name: '$vue.moduleEntityFirstLower',
|
||||
|
||||
@@ -106,12 +106,13 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ${vue.featureEntity}QueryRequest, ${vue.featureEntity}QueryResponse } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { usePagination, useColLayout } from '@/types/card';
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { objectTruthKeyCount, resetObject } from '@/utils';
|
||||
import fieldConfig from '../types/card.fields';
|
||||
import { delete${vue.featureEntity}, get${vue.featureEntity}Page, ${vue.featureEntity}QueryRequest, ${vue.featureEntity}QueryResponse } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { delete${vue.featureEntity}, get${vue.featureEntity}Page } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { Message, Modal } from '@arco-design/web-vue';
|
||||
import {} from '../types/const';
|
||||
#if($vue.enums.isEmpty())
|
||||
@@ -206,6 +207,6 @@
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -53,11 +53,12 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ${vue.featureEntity}UpdateRequest } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import useVisible from '@/hooks/visible';
|
||||
import formRules from '../types/form.rules';
|
||||
import { create${vue.featureEntity}, update${vue.featureEntity}, ${vue.featureEntity}UpdateRequest } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { create${vue.featureEntity}, update${vue.featureEntity} } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import {} from '../types/const';
|
||||
#if($vue.enums.isEmpty())
|
||||
|
||||
@@ -57,11 +57,12 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ${vue.featureEntity}UpdateRequest } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import useVisible from '@/hooks/visible';
|
||||
import formRules from '../types/form.rules';
|
||||
import { create${vue.featureEntity}, update${vue.featureEntity}, ${vue.featureEntity}UpdateRequest } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { create${vue.featureEntity}, update${vue.featureEntity} } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import {} from '../types/const';
|
||||
#if($vue.enums.isEmpty())
|
||||
|
||||
@@ -135,8 +135,9 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ${vue.featureEntity}QueryRequest, ${vue.featureEntity}QueryResponse } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { reactive, ref } from 'vue';
|
||||
import { batchDelete${vue.featureEntity}, delete${vue.featureEntity}, get${vue.featureEntity}Page, ${vue.featureEntity}QueryRequest, ${vue.featureEntity}QueryResponse } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { batchDelete${vue.featureEntity}, delete${vue.featureEntity}, get${vue.featureEntity}Page } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CardField, CardFieldConfig } from '@/types/card';
|
||||
import type { CardField, CardFieldConfig } from '@/types/card';
|
||||
import { dateFormat } from '@/utils';
|
||||
|
||||
const fieldConfig = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FieldRule } from '@arco-design/web-vue';
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
#foreach($field in ${table.fields})
|
||||
#if("$!field.propertyName" != "id")
|
||||
#if(${field.propertyType} == 'String' && "$field.metaInfo.jdbcType" != "LONGVARCHAR")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
||||
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
||||
import { dateFormat } from '@/utils';
|
||||
|
||||
const columns = [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import { DataGrid, Pagination } from '@/types/global';
|
||||
import { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
/**
|
||||
* 主机身份创建请求
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import { DataGrid, Pagination } from '@/types/global';
|
||||
import { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
/**
|
||||
* 主机秘钥创建请求
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import { DataGrid, Pagination } from '@/types/global';
|
||||
import { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
/**
|
||||
* 主机创建请求
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
|
||||
export interface ContentDataRecord {
|
||||
x: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
||||
import axios from 'axios';
|
||||
import { Message, Notification } from '@arco-design/web-vue';
|
||||
import { useUserStore } from '@/store';
|
||||
import { getToken } from '@/utils/auth';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import { DataGrid, Pagination } from '@/types/global';
|
||||
import { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
/**
|
||||
* 历史归档查询请求
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import qs from 'query-string';
|
||||
import { DataGrid, Pagination } from '@/types/global';
|
||||
import { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
/**
|
||||
* 字典配置项创建请求
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { DataGrid, Options, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import qs from 'query-string';
|
||||
import { DataGrid, Options, Pagination } from '@/types/global';
|
||||
import { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
/**
|
||||
* 字典配置值创建请求
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
/**
|
||||
* 菜单创建请求
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import { DataGrid, Pagination } from '@/types/global';
|
||||
import { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
/**
|
||||
* 角色创建请求
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import { DataGrid, Pagination } from '@/types/global';
|
||||
import { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
/**
|
||||
* 用户创建请求
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PropType } from 'vue';
|
||||
import type { PropType } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
defineProps({
|
||||
@@ -18,14 +18,14 @@
|
||||
type: Array as PropType<string[]>,
|
||||
default() {
|
||||
return useRoute().matched
|
||||
.map(s => s.meta?.locale)
|
||||
.filter(Boolean) || [];
|
||||
.map(s => s.meta?.locale)
|
||||
.filter(Boolean) || [];
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.container-breadcrumb {
|
||||
|
||||
:deep(.arco-breadcrumb-item) {
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.navbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PropType } from 'vue';
|
||||
import type { PropType } from 'vue';
|
||||
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||
import { useAppStore } from '@/store';
|
||||
import FormWrapper from './form-wrapper.vue';
|
||||
import { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||
import { updatePreferencePartial } from '@/api/user/preference';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
|
||||
@@ -37,9 +37,7 @@
|
||||
title: String,
|
||||
options: {
|
||||
type: Array as PropType<OptionsProps[]>,
|
||||
default() {
|
||||
return [];
|
||||
},
|
||||
default: []
|
||||
},
|
||||
});
|
||||
|
||||
@@ -77,7 +75,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.block {
|
||||
margin-bottom: 24px;
|
||||
user-select: none;
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PropType } from 'vue';
|
||||
import { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||
import type { PropType } from 'vue';
|
||||
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.fixed-settings {
|
||||
position: fixed;
|
||||
top: 280px;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onUnmounted, ref, watch } from 'vue';
|
||||
import type { RouteLocationNormalized } from 'vue-router';
|
||||
import { computed, onUnmounted, ref, watch } from 'vue';
|
||||
import { routerToTag } from '@/router/constants';
|
||||
import { listenerRouteChange, removeRouteListener, } from '@/utils/route-listener';
|
||||
import { useAppStore, useTabBarStore } from '@/store';
|
||||
@@ -62,7 +62,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.tab-bar-container {
|
||||
position: relative;
|
||||
background-color: var(--color-bg-2);
|
||||
|
||||
@@ -52,10 +52,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PropType, computed } from 'vue';
|
||||
import type { TagProps } from '@/store/modules/tab-bar/types';
|
||||
import type { PropType } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { useTabBarStore } from '@/store';
|
||||
import type { TagProps } from '@/store/modules/tab-bar/types';
|
||||
import { DEFAULT_ROUTE_NAME, REDIRECT_ROUTE_NAME } from '@/router/constants';
|
||||
|
||||
enum Option {
|
||||
@@ -70,9 +71,7 @@
|
||||
const props = defineProps({
|
||||
itemData: {
|
||||
type: Object as PropType<TagProps>,
|
||||
default() {
|
||||
return [];
|
||||
},
|
||||
default: [],
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
@@ -169,7 +168,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.tag-link {
|
||||
color: var(--color-text-2);
|
||||
text-decoration: none;
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { SelectOptionData } from '@arco-design/web-vue';
|
||||
import { computed } from 'vue';
|
||||
import { useCacheStore } from '@/store';
|
||||
import { SelectOptionData } from '@arco-design/web-vue';
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: Number,
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { SelectOptionData } from '@arco-design/web-vue';
|
||||
import { computed } from 'vue';
|
||||
import { useCacheStore } from '@/store';
|
||||
import { SelectOptionData } from '@arco-design/web-vue';
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: Number,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { App } from 'vue';
|
||||
import type { App } from 'vue';
|
||||
import { use } from 'echarts/core';
|
||||
import AQueryHeader from '@dangojs/a-query-header';
|
||||
import { CanvasRenderer } from 'echarts/renderers';
|
||||
|
||||
@@ -17,10 +17,13 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, PropType } from 'vue';
|
||||
import type { PropType } from 'vue';
|
||||
import type { SelectOptionData } from '@arco-design/web-vue';
|
||||
import type { TagCreateRequest } from '@/api/meta/tag';
|
||||
import { ref, computed } from 'vue';
|
||||
import { useCacheStore } from '@/store';
|
||||
import { Message, SelectOptionData } from '@arco-design/web-vue';
|
||||
import { createTag, TagCreateRequest } from '@/api/meta/tag';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { createTag } from '@/api/meta/tag';
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: Array as PropType<Array<number>>,
|
||||
|
||||
@@ -16,10 +16,9 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { SelectOptionData } from '@arco-design/web-vue';
|
||||
import { computed } from 'vue';
|
||||
import { useCacheStore } from '@/store';
|
||||
import { SelectOptionData } from '@arco-design/web-vue';
|
||||
import { DictKeyQueryResponse } from '@/api/system/dict-key';
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: Number,
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { TreeNodeData } from '@arco-design/web-vue';
|
||||
import { ref } from 'vue';
|
||||
import { TreeNodeData } from '@arco-design/web-vue';
|
||||
import { useCacheStore } from '@/store';
|
||||
|
||||
const treeData = ref<Array<TreeNodeData>>([]);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="tsx">
|
||||
import type { RouteMeta, RouteRecordRaw } from 'vue-router';
|
||||
import { compile, computed, defineComponent, h, ref } from 'vue';
|
||||
import type { RouteMeta } from 'vue-router';
|
||||
import { RouteRecordRaw, useRoute, useRouter } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useAppStore } from '@/store';
|
||||
import { listenerRouteChange } from '@/utils/route-listener';
|
||||
import { openWindow, regexUrl } from '@/utils';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RouteRecordRaw, RouteRecordNormalized } from 'vue-router';
|
||||
import { computed } from 'vue';
|
||||
import { RouteRecordRaw, RouteRecordNormalized } from 'vue-router';
|
||||
import { useMenuStore } from '@/store';
|
||||
import { cloneDeep } from 'lodash';
|
||||
|
||||
|
||||
@@ -22,13 +22,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { MessageRecord, MessageListType } from '@/api/system/message';
|
||||
import { ref, reactive, toRefs, computed } from 'vue';
|
||||
import {
|
||||
queryMessageList,
|
||||
setMessageStatus,
|
||||
MessageRecord,
|
||||
MessageListType,
|
||||
} from '@/api/system/message';
|
||||
import { queryMessageList, setMessageStatus } from '@/api/system/message';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import List from './list.vue';
|
||||
|
||||
@@ -108,7 +104,7 @@
|
||||
fetchSourceData();
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
:deep(.arco-popover-popup-content) {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@@ -72,8 +72,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PropType } from 'vue';
|
||||
import { MessageRecord, MessageListType } from '@/api/system/message';
|
||||
import type { PropType } from 'vue';
|
||||
import type { MessageRecord, MessageListType } from '@/api/system/message';
|
||||
|
||||
const props = defineProps({
|
||||
renderList: {
|
||||
@@ -98,7 +98,7 @@
|
||||
const showMax = 3;
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
:deep(.arco-list) {
|
||||
.arco-list-item {
|
||||
min-height: 86px;
|
||||
|
||||
@@ -16,13 +16,14 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, PropType } from 'vue';
|
||||
import type { PropType } from 'vue';
|
||||
import type { SelectOptionData } from '@arco-design/web-vue';
|
||||
import { computed } from 'vue';
|
||||
import { useCacheStore } from '@/store';
|
||||
import { SelectOptionData } from '@arco-design/web-vue';
|
||||
import { RoleStatusEnum } from '@/views/user/role/types/enum.types';
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: Object as PropType<Array<number>> | PropType<number>,
|
||||
modelValue: [Number, Array] as PropType<number | Array<number>>,
|
||||
loading: Boolean,
|
||||
multiple: Boolean,
|
||||
});
|
||||
|
||||
@@ -222,11 +222,12 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { compile, computed, h, PropType, ref } from 'vue';
|
||||
<script lang="ts" setup>
|
||||
import type { PropType } from 'vue';
|
||||
import type { PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
|
||||
import type { CardRecord, ColResponsiveValue, HandleVisible, CardFieldConfig, CardPosition } from '@/types/card';
|
||||
import { compile, computed, h, ref } from 'vue';
|
||||
import { useAppStore } from '@/store';
|
||||
import { PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
|
||||
import { CardRecord, ColResponsiveValue, HandleVisible, CardFieldConfig, CardPosition } from '@/types/card';
|
||||
import { triggerMouseEvent } from '@/utils';
|
||||
|
||||
const appStore = useAppStore();
|
||||
@@ -258,61 +259,58 @@
|
||||
const props = defineProps({
|
||||
key: {
|
||||
type: String,
|
||||
default: () => 'id'
|
||||
default: 'id'
|
||||
},
|
||||
pagination: {
|
||||
type: Object as PropType<PaginationProps> | PropType<boolean>,
|
||||
default: () => false
|
||||
type: [Object, Boolean] as PropType<PaginationProps | boolean>,
|
||||
default: false
|
||||
},
|
||||
loading: {
|
||||
type: Boolean as PropType<Boolean>,
|
||||
default: () => false
|
||||
default: false
|
||||
},
|
||||
fieldConfig: {
|
||||
type: Object as PropType<CardFieldConfig>,
|
||||
default: () => []
|
||||
default: []
|
||||
},
|
||||
cardHeight: {
|
||||
type: String,
|
||||
default: () => '100%'
|
||||
default: '100%'
|
||||
},
|
||||
cardClass: String,
|
||||
cardBodyStyle: Object,
|
||||
contextMenu: {
|
||||
type: Boolean,
|
||||
default: () => true
|
||||
default: true
|
||||
},
|
||||
filterCount: {
|
||||
type: Number,
|
||||
default: () => 0
|
||||
default: 0
|
||||
},
|
||||
searchInputPlaceholder: String,
|
||||
searchInputWidth: {
|
||||
type: String,
|
||||
default: () => '200px'
|
||||
default: '200px'
|
||||
},
|
||||
searchValue: {
|
||||
type: String,
|
||||
default: () => ''
|
||||
default: ''
|
||||
},
|
||||
createCardDescription: {
|
||||
type: String,
|
||||
default: () => '点击此处进行创建'
|
||||
default: '点击此处进行创建'
|
||||
},
|
||||
createCardPosition: {
|
||||
type: String as PropType<CardPosition>,
|
||||
default: () => false
|
||||
default: false
|
||||
},
|
||||
addPermission: {
|
||||
type: Array as PropType<String[]>,
|
||||
default: () => []
|
||||
default: []
|
||||
},
|
||||
cardLayoutGutter: {
|
||||
type: [Number, Array] as PropType<Number> |
|
||||
PropType<ResponsiveValue> |
|
||||
PropType<Array<Number>> |
|
||||
PropType<Array<ResponsiveValue>>,
|
||||
default: () => [16, 16]
|
||||
type: [Number, Object, Array] as PropType<Number | ResponsiveValue | Array<Number> | Array<ResponsiveValue>>,
|
||||
default: [16, 16]
|
||||
},
|
||||
cardLayoutCols: {
|
||||
type: Object as PropType<ColResponsiveValue>,
|
||||
@@ -330,7 +328,7 @@
|
||||
},
|
||||
list: {
|
||||
type: Array as PropType<Array<CardRecord>>,
|
||||
default: () => []
|
||||
default: []
|
||||
},
|
||||
});
|
||||
|
||||
@@ -368,7 +366,7 @@
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
@header-info-height: 48px;
|
||||
@header-handler-height: 48px;
|
||||
@top-height: 16 + @header-info-height + @header-handler-height + 12px;
|
||||
|
||||
@@ -44,4 +44,5 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
<style lang="less" scoped>
|
||||
</style>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { App } from 'vue';
|
||||
import type { App } from 'vue';
|
||||
import permission from './permission';
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DirectiveBinding } from 'vue';
|
||||
import type { DirectiveBinding } from 'vue';
|
||||
import usePermission from '@/hooks/permission';
|
||||
|
||||
function checkPermission(el: HTMLElement, binding: DirectiveBinding) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { EChartsOption } from 'echarts';
|
||||
import { computed } from 'vue';
|
||||
import { EChartsOption } from 'echarts';
|
||||
import { useAppStore } from '@/store';
|
||||
|
||||
// for code hints
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { FavoriteType } from '@/api/meta/favorite';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { FavoriteType, addFavorite, cancelFavorite } from '@/api/meta/favorite';
|
||||
import { addFavorite, cancelFavorite } from '@/api/meta/favorite';
|
||||
|
||||
export default function useFavorite(type: FavoriteType) {
|
||||
const toggle = async (record: any, id: number, cancelField = 'favorite') => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RouteLocationNormalized, RouteRecordNormalized, RouteRecordRaw } from 'vue-router';
|
||||
import type { RouteLocationNormalized, RouteRecordNormalized, RouteRecordRaw } from 'vue-router';
|
||||
import { useMenuStore, useUserStore } from '@/store';
|
||||
import { STATUS_ROUTER_LIST, WHITE_ROUTER_LIST } from '@/router/constants';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ref, UnwrapRef } from 'vue';
|
||||
import { AxiosResponse } from 'axios';
|
||||
import { HttpResponse } from '@/api/interceptor';
|
||||
import type { AxiosResponse } from 'axios';
|
||||
import type { HttpResponse } from '@/api/interceptor';
|
||||
import type { UnwrapRef } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import useLoading from './loading';
|
||||
|
||||
export default function useRequest<T>(
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
@nav-size-height: 60px;
|
||||
@layout-max-width: 1100px;
|
||||
|
||||
|
||||
@@ -24,4 +24,5 @@
|
||||
const cacheList = computed(() => tabBarStore.getCacheList);
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
<style lang="less" scoped>
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RouteLocationNormalized } from 'vue-router';
|
||||
import { TagProps } from '@/store/modules/tab-bar/types';
|
||||
import type { RouteLocationNormalized } from 'vue-router';
|
||||
import type { TagProps } from '@/store/modules/tab-bar/types';
|
||||
|
||||
export const REDIRECT_ROUTE_NAME = 'redirect';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AppRouteRecordRaw } from '../types';
|
||||
import { DEFAULT_LAYOUT } from '../base';
|
||||
import { AppRouteRecordRaw } from '../types';
|
||||
|
||||
const ASSET: AppRouteRecordRaw = {
|
||||
name: 'asset',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AppRouteRecordRaw } from '../types';
|
||||
import { DEFAULT_LAYOUT } from '../base';
|
||||
import { AppRouteRecordRaw } from '../types';
|
||||
|
||||
const DASHBOARD: AppRouteRecordRaw = {
|
||||
name: 'dashboard',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AppRouteRecordRaw } from '../types';
|
||||
import { DEFAULT_LAYOUT } from '../base';
|
||||
import { AppRouteRecordRaw } from '../types';
|
||||
|
||||
const SYSTEM: AppRouteRecordRaw = {
|
||||
name: 'system',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AppRouteRecordRaw } from '../types';
|
||||
import { DEFAULT_LAYOUT } from '../base';
|
||||
import { AppRouteRecordRaw } from '../types';
|
||||
|
||||
const USER: AppRouteRecordRaw = {
|
||||
name: 'user',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineComponent } from 'vue';
|
||||
import type { RouteMeta, NavigationGuard } from 'vue-router';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export type Component<T = any> =
|
||||
| ReturnType<typeof defineComponent>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AppState } from './types';
|
||||
import { defineStore } from 'pinia';
|
||||
import { AppState } from './types';
|
||||
|
||||
const defaultConfig: AppState = {
|
||||
// 应用设置
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { CacheState } from './types';
|
||||
import { defineStore } from 'pinia';
|
||||
import { CacheState } from './types';
|
||||
|
||||
export type CacheType = 'menus' | 'roles' | 'hostTags' | 'hostKeys' | 'hostIdentities' | 'dictKeys' | string
|
||||
|
||||
|
||||
12
orion-ops-ui/src/store/modules/cache/types.ts
vendored
12
orion-ops-ui/src/store/modules/cache/types.ts
vendored
@@ -1,9 +1,9 @@
|
||||
import { MenuQueryResponse } from '@/api/system/menu';
|
||||
import { RoleQueryResponse } from '@/api/user/role';
|
||||
import { TagQueryResponse } from '@/api/meta/tag';
|
||||
import { HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import { HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
||||
import { DictKeyQueryResponse } from '@/api/system/dict-key';
|
||||
import type { MenuQueryResponse } from '@/api/system/menu';
|
||||
import type { RoleQueryResponse } from '@/api/user/role';
|
||||
import type { TagQueryResponse } from '@/api/meta/tag';
|
||||
import type { HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import type { HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
||||
import type { DictKeyQueryResponse } from '@/api/system/dict-key';
|
||||
|
||||
export interface CacheState {
|
||||
menus: MenuQueryResponse[];
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { RouteRecordNormalized } from 'vue-router';
|
||||
import type { MenuState } from './types';
|
||||
import { defineStore } from 'pinia';
|
||||
import { Notification } from '@arco-design/web-vue';
|
||||
import type { RouteRecordNormalized } from 'vue-router';
|
||||
import { getMenuList } from '@/api/user/auth';
|
||||
import { MenuState } from './types';
|
||||
import router from '@/router';
|
||||
|
||||
export default defineStore('menu', {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { TabBarState, TagProps } from './types';
|
||||
import { defineStore } from 'pinia';
|
||||
import { DEFAULT_ROUTE_NAME, DEFAULT_TAB } from '@/router/constants';
|
||||
import { isString } from '@/utils/is';
|
||||
import { TabBarState, TagProps } from './types';
|
||||
|
||||
export default defineStore('tabBar', {
|
||||
state: (): TabBarState => ({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { TipsState } from './types';
|
||||
import { defineStore } from 'pinia';
|
||||
import { TipsState } from './types';
|
||||
import { setTipsTipped } from '@/api/user/tips';
|
||||
|
||||
export default defineStore('tips', {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import type { UserState } from './types';
|
||||
import type { LoginRequest } from '@/api/user/auth';
|
||||
import { defineStore } from 'pinia';
|
||||
import { getUserPermission, login as userLogin, LoginRequest, logout as userLogout } from '@/api/user/auth';
|
||||
import { getUserPermission, login as userLogin, logout as userLogout } from '@/api/user/auth';
|
||||
import { clearToken, setToken } from '@/utils/auth';
|
||||
import { md5 } from '@/utils';
|
||||
import { removeRouteListener } from '@/utils/route-listener';
|
||||
import { UserState } from './types';
|
||||
import { useAppStore, useMenuStore, useTabBarStore, useTipsStore } from '@/store';
|
||||
|
||||
export default defineStore('user', {
|
||||
|
||||
2
orion-ops-ui/src/types/axios.d.ts
vendored
2
orion-ops-ui/src/types/axios.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
import { AxiosRequestConfig } from 'axios';
|
||||
import type { AxiosRequestConfig } from 'axios';
|
||||
|
||||
declare module 'axios' {
|
||||
// eslint-disable-next-line no-shadow
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
|
||||
import { reactive, VNodeChild } from 'vue';
|
||||
import type { PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
|
||||
import type { VNodeChild } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
|
||||
/**
|
||||
* 字段对齐方式
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CallbackDataParams } from 'echarts/types/dist/shared';
|
||||
import type { CallbackDataParams } from 'echarts/types/dist/shared';
|
||||
|
||||
export interface ToolTipFormatterParams extends CallbackDataParams {
|
||||
axisDim: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PaginationProps, TableRowSelection } from '@arco-design/web-vue';
|
||||
import type { PaginationProps, TableRowSelection } from '@arco-design/web-vue';
|
||||
import { reactive } from 'vue';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Ref } from 'vue';
|
||||
import { Md5 } from 'ts-md5';
|
||||
import { Ref } from 'vue';
|
||||
|
||||
type TargetContext = '_self' | '_parent' | '_blank' | '_top';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import mitt, { Handler } from 'mitt';
|
||||
import type { RouteLocationNormalized } from 'vue-router';
|
||||
import type { Handler } from 'mitt';
|
||||
import mitt from 'mitt';
|
||||
|
||||
const emitter = mitt();
|
||||
|
||||
|
||||
@@ -124,13 +124,14 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script lang="ts" setup>
|
||||
import type { HostIdentityQueryRequest, HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
||||
import { usePagination, useColLayout } from '@/types/card';
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { objectTruthKeyCount, resetObject } from '@/utils';
|
||||
import fieldConfig from '../types/card.fields';
|
||||
import { deleteHostIdentity, getHostIdentityPage, HostIdentityQueryRequest, HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
||||
import { deleteHostIdentity, getHostIdentityPage } from '@/api/asset/host-identity';
|
||||
import { Message, Modal } from '@arco-design/web-vue';
|
||||
import usePermission from '@/hooks/permission';
|
||||
import useCopy from '@/hooks/copy';
|
||||
@@ -225,6 +226,6 @@
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -61,12 +61,14 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { HostIdentityUpdateRequest } from '@/api/asset/host-identity';
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
import { ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import useVisible from '@/hooks/visible';
|
||||
import formRules from '../types/form.rules';
|
||||
import { createHostIdentity, updateHostIdentity, HostIdentityUpdateRequest } from '@/api/asset/host-identity';
|
||||
import { FieldRule, Message } from '@arco-design/web-vue';
|
||||
import { createHostIdentity, updateHostIdentity } from '@/api/asset/host-identity';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import HostKeySelector from '@/components/asset/host-key/host-key-selector.vue';
|
||||
|
||||
const { visible, setVisible } = useVisible();
|
||||
|
||||
@@ -125,8 +125,9 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { HostIdentityQueryRequest, HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
||||
import { reactive, ref } from 'vue';
|
||||
import { deleteHostIdentity, getHostIdentityPage, HostIdentityQueryRequest, HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
||||
import { deleteHostIdentity, getHostIdentityPage } from '@/api/asset/host-identity';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CardField, CardFieldConfig } from '@/types/card';
|
||||
import type { CardField, CardFieldConfig } from '@/types/card';
|
||||
import { dateFormat } from '@/utils';
|
||||
|
||||
const fieldConfig = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FieldRule } from '@arco-design/web-vue';
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
|
||||
export const name = [{
|
||||
required: true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
||||
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
||||
import { dateFormat } from '@/utils';
|
||||
|
||||
const columns = [
|
||||
|
||||
@@ -78,13 +78,14 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script lang="ts" setup>
|
||||
import type { HostKeyQueryRequest, HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import { usePagination, useColLayout } from '@/types/card';
|
||||
import { reactive, ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { resetObject } from '@/utils';
|
||||
import fieldConfig from '../types/card.fields';
|
||||
import { deleteHostKey, getHostKeyPage, HostKeyQueryRequest, HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import { deleteHostKey, getHostKeyPage } from '@/api/asset/host-key';
|
||||
import { Message, Modal } from '@arco-design/web-vue';
|
||||
|
||||
const { loading, setLoading } = useLoading();
|
||||
@@ -163,6 +164,6 @@
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -89,12 +89,14 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { HostKeyUpdateRequest } from '@/api/asset/host-key';
|
||||
import type { FieldRule, FileItem } from '@arco-design/web-vue';
|
||||
import { ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import useVisible from '@/hooks/visible';
|
||||
import formRules from '../types/form.rules';
|
||||
import { createHostKey, updateHostKey, getHostKey, HostKeyUpdateRequest } from '@/api/asset/host-key';
|
||||
import { FieldRule, FileItem, Message } from '@arco-design/web-vue';
|
||||
import { createHostKey, updateHostKey, getHostKey } from '@/api/asset/host-key';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { readFileText } from '@/utils/file';
|
||||
|
||||
const { visible, setVisible } = useVisible();
|
||||
|
||||
@@ -98,8 +98,9 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { HostKeyQueryRequest, HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import { reactive, ref } from 'vue';
|
||||
import { deleteHostKey, getHostKeyPage, HostKeyQueryRequest, HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import { deleteHostKey, getHostKeyPage } from '@/api/asset/host-key';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CardField, CardFieldConfig } from '@/types/card';
|
||||
import type { CardField, CardFieldConfig } from '@/types/card';
|
||||
import { dateFormat } from '@/utils';
|
||||
|
||||
const fieldConfig = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FieldRule } from '@arco-design/web-vue';
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
|
||||
export const name = [{
|
||||
required: true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
||||
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
||||
import { dateFormat } from '@/utils';
|
||||
|
||||
const columns = [
|
||||
|
||||
@@ -141,13 +141,14 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script lang="ts" setup>
|
||||
import type { HostQueryRequest, HostQueryResponse } from '@/api/asset/host';
|
||||
import { usePagination, useColLayout } from '@/types/card';
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { dataColor, objectTruthKeyCount, resetObject } from '@/utils';
|
||||
import fieldConfig from '../types/host.card.fields';
|
||||
import { deleteHost, getHostPage, HostQueryRequest, HostQueryResponse } from '@/api/asset/host';
|
||||
import { deleteHost, getHostPage } from '@/api/asset/host';
|
||||
import { Message, Modal } from '@arco-design/web-vue';
|
||||
import { tagColor } from '@/views/asset/host/types/const';
|
||||
import TagMultiSelector from '@/components/meta/tag/tag-multi-selector.vue';
|
||||
@@ -243,7 +244,7 @@
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.host-address {
|
||||
cursor: pointer;
|
||||
color: rgb(var(--arcoblue-6))
|
||||
|
||||
@@ -138,14 +138,16 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
import type { HostSshConfig } from '@/views/asset/host/types/host-config.types';
|
||||
import { ref, watch } from 'vue';
|
||||
import { updateHostConfigStatus, updateHostConfig } from '@/api/asset/host';
|
||||
import { HostSshConfig, AuthTypeEnum } from '@/views/asset/host/types/host-config.types';
|
||||
import { AuthTypeEnum } from '@/views/asset/host/types/host-config.types';
|
||||
import { sshRules } from '@/views/asset/host/types/host-config.form.rules';
|
||||
import HostKeySelector from '@/components/asset/host-key/host-key-selector.vue';
|
||||
import HostIdentitySelector from '@/components/asset/host-identity/host-identity-selector.vue';
|
||||
import { toOptions } from '@/utils/enum';
|
||||
import { FieldRule, Message } from '@arco-design/web-vue';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
@@ -53,11 +53,12 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { HostUpdateRequest } from '@/api/asset/host';
|
||||
import { ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import useVisible from '@/hooks/visible';
|
||||
import formRules from '../types/host.form.rules';
|
||||
import { createHost, updateHost, HostUpdateRequest } from '@/api/asset/host';
|
||||
import { createHost, updateHost } from '@/api/asset/host';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import TagMultiSelector from '@/components/meta/tag/tag-multi-selector.vue';
|
||||
|
||||
|
||||
@@ -163,8 +163,9 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { HostQueryRequest, HostQueryResponse } from '@/api/asset/host';
|
||||
import { reactive, ref } from 'vue';
|
||||
import { deleteHost, getHostPage, HostQueryRequest, HostQueryResponse } from '@/api/asset/host';
|
||||
import { deleteHost, getHostPage } from '@/api/asset/host';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/host.table.columns';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FieldRule } from '@arco-design/web-vue';
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
|
||||
export const port = [{
|
||||
required: true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CardField, CardFieldConfig } from '@/types/card';
|
||||
import type { CardField, CardFieldConfig } from '@/types/card';
|
||||
|
||||
const fieldConfig = {
|
||||
rowGap: '10px',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FieldRule } from '@arco-design/web-vue';
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
|
||||
export const name = [{
|
||||
required: true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
||||
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
const columns = [
|
||||
{
|
||||
|
||||
@@ -50,14 +50,14 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ValidatedError } from '@arco-design/web-vue/es/form/interface';
|
||||
import type { LoginRequest } from '@/api/user/auth';
|
||||
import { ref, reactive } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { ValidatedError } from '@arco-design/web-vue/es/form/interface';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useUserStore } from '@/store';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import type { LoginRequest } from '@/api/user/auth';
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -13,4 +13,5 @@
|
||||
router.replace({ path: gotoPath });
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
<style lang="less" scoped>
|
||||
</style>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.content {
|
||||
// padding-top: 100px;
|
||||
position: absolute;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.content {
|
||||
// padding-top: 100px;
|
||||
position: absolute;
|
||||
|
||||
@@ -49,13 +49,14 @@
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
margin-bottom: 4px;
|
||||
|
||||
.item-content {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.banner {
|
||||
width: 100%;
|
||||
padding: 20px 20px 0 20px;
|
||||
|
||||
@@ -111,4 +111,5 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
<style lang="less" scoped>
|
||||
</style>
|
||||
|
||||
@@ -17,13 +17,14 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ToolTipFormatterParams } from '@/types/echarts';
|
||||
import type { AnyObject } from '@/types/global';
|
||||
import type { ContentDataRecord } from '@/api/dashboard';
|
||||
import { ref } from 'vue';
|
||||
import { graphic } from 'echarts';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { queryContentData, ContentDataRecord } from '@/api/dashboard';
|
||||
import { queryContentData } from '@/api/dashboard';
|
||||
import useChartOption from '@/hooks/chart-option';
|
||||
import { ToolTipFormatterParams } from '@/types/echarts';
|
||||
import { AnyObject } from '@/types/global';
|
||||
|
||||
function graphicFactory(side: AnyObject) {
|
||||
return {
|
||||
@@ -38,6 +39,7 @@
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const { loading, setLoading } = useLoading(true);
|
||||
const xAxis = ref<string[]>([]);
|
||||
const chartsData = ref<number[]>([]);
|
||||
@@ -117,8 +119,8 @@
|
||||
return `<div>
|
||||
<p class="tooltip-title">${firstElement.axisValueLabel}</p>
|
||||
<div class="content-panel"><span>总内容量</span><span class="tooltip-value">${(
|
||||
Number(firstElement.value) * 10000
|
||||
).toLocaleString()}</span></div>
|
||||
Number(firstElement.value) * 10000
|
||||
).toLocaleString()}</span></div>
|
||||
</div>`;
|
||||
},
|
||||
className: 'echarts-tooltip-diy',
|
||||
@@ -197,4 +199,5 @@
|
||||
fetchData();
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
<style lang="less" scoped>
|
||||
</style>
|
||||
|
||||
@@ -90,9 +90,10 @@
|
||||
:value="2.8"
|
||||
:precision="1"
|
||||
:value-from="0"
|
||||
animation
|
||||
>
|
||||
<template #suffix> % <icon-caret-up class="up-icon" /> </template>
|
||||
animation>
|
||||
<template #suffix> %
|
||||
<icon-caret-up class="up-icon" />
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-space>
|
||||
</a-grid-item>
|
||||
@@ -102,29 +103,35 @@
|
||||
</a-grid>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script lang="ts" setup>
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.arco-grid.panel {
|
||||
margin-bottom: 0;
|
||||
padding: 16px 20px 0 20px;
|
||||
}
|
||||
|
||||
.panel-col {
|
||||
padding-left: 43px;
|
||||
border-right: 1px solid rgb(var(--gray-2));
|
||||
}
|
||||
|
||||
.col-avatar {
|
||||
margin-right: 12px;
|
||||
background-color: var(--color-fill-2);
|
||||
}
|
||||
|
||||
.up-icon {
|
||||
color: rgb(var(--red-6));
|
||||
}
|
||||
|
||||
.unit {
|
||||
margin-left: 8px;
|
||||
color: rgb(var(--gray-8));
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
:deep(.panel-border) {
|
||||
margin: 4px 0 0 0;
|
||||
}
|
||||
|
||||
@@ -73,10 +73,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import { ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { queryPopularList } from '@/api/dashboard';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
|
||||
const type = ref('text');
|
||||
const { loading, setLoading } = useLoading();
|
||||
@@ -98,19 +98,23 @@
|
||||
fetchData('text');
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style lang="less" scoped>
|
||||
.general-card {
|
||||
min-height: 395px;
|
||||
}
|
||||
|
||||
:deep(.arco-table-tr) {
|
||||
height: 44px;
|
||||
|
||||
.arco-typography {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.increases-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
@@ -32,4 +32,5 @@
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
<style lang="less" scoped>
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { GetParams } from '@/types/global';
|
||||
import Mock from 'mockjs';
|
||||
import qs from 'query-string';
|
||||
import dayjs from 'dayjs';
|
||||
import { GetParams } from '@/types/global';
|
||||
import setupMock, { successResponseWrap } from '@/utils/setup-mock';
|
||||
|
||||
const textList = [
|
||||
|
||||
@@ -92,13 +92,15 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { DictKeyUpdateRequest } from '@/api/system/dict-key';
|
||||
import type { ExtraParamType } from '../types/const';
|
||||
import { ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import useVisible from '@/hooks/visible';
|
||||
import formRules from '../types/form.rules';
|
||||
import { createDictKey, updateDictKey, DictKeyUpdateRequest } from '@/api/system/dict-key';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { definedExtraKeys, innerKeys, ExtraParamType } from '../types/const';
|
||||
import { createDictKey, updateDictKey } from '@/api/system/dict-key';
|
||||
import { definedExtraKeys, innerKeys } from '../types/const';
|
||||
import { ValueTypeEnum } from '../types/enum.types';
|
||||
import { toOptions } from '@/utils/enum';
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user