mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-10 14:57:09 +08:00
refactor: 优化系统监控、代码生成、任务调度相关代码
This commit is contained in:
@@ -25,7 +25,7 @@ appStore.initTheme()
|
|||||||
appStore.initSiteConfig()
|
appStore.initSiteConfig()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.loading-icon {
|
.loading-icon {
|
||||||
animation: arco-loading-circle 1s infinite cubic-bezier(0,0,1,1);
|
animation: arco-loading-circle 1s infinite cubic-bezier(0,0,1,1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type { LabelValueState } from '@/types/global'
|
|||||||
|
|
||||||
export type * from './type'
|
export type * from './type'
|
||||||
|
|
||||||
const BASE_URL = '/generator'
|
const BASE_URL = '/code/generator'
|
||||||
|
|
||||||
/** @desc 查询代码生成列表 */
|
/** @desc 查询代码生成列表 */
|
||||||
export function listGenConfig(query: T.GenConfigPageQuery) {
|
export function listGenConfig(query: T.GenConfigPageQuery) {
|
||||||
@@ -3,7 +3,7 @@ export * from './auth'
|
|||||||
export * from './common'
|
export * from './common'
|
||||||
export * from './monitor'
|
export * from './monitor'
|
||||||
export * from './system'
|
export * from './system'
|
||||||
export * from './tool'
|
export * from './code'
|
||||||
export * from './schedule'
|
export * from './schedule'
|
||||||
|
|
||||||
export * from './area/type'
|
export * from './area/type'
|
||||||
@@ -11,5 +11,5 @@ export * from './auth/type'
|
|||||||
export * from './common/type'
|
export * from './common/type'
|
||||||
export * from './monitor/type'
|
export * from './monitor/type'
|
||||||
export * from './system/type'
|
export * from './system/type'
|
||||||
export * from './tool/type'
|
export * from './code/type'
|
||||||
export * from './schedule/type'
|
export * from './schedule/type'
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ function handleLink(item: RouteLocationMatched) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.breadcrumb-item-title {
|
.breadcrumb-item-title {
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -47,4 +47,4 @@ interface Props {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ interface Props {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -21,4 +21,4 @@ interface Props {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -33,4 +33,4 @@ const dictItem = computed((): LabelValueState => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ interface Props {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ const extensions = computed(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.ͼ1 .cm-scroller) {
|
:deep(.ͼ1 .cm-scroller) {
|
||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace;
|
font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const style = computed(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.gi-flexible-box {
|
.gi-flexible-box {
|
||||||
transition: all 0.36s;
|
transition: all 0.36s;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ defineOptions({ name: 'GiFooter' })
|
|||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.gi-footer {
|
.gi-footer {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ watch(cloneForm as any, (newVal, oldVal) => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-form-item-layout-inline) {
|
:deep(.arco-form-item-layout-inline) {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ const handleSelectedIcon = async (icon: string) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.container {
|
.container {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
defineOptions({ name: 'GiOption' })
|
defineOptions({ name: 'GiOption' })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.gi-option {
|
.gi-option {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const handleClick = () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.gi-option-item {
|
.gi-option-item {
|
||||||
padding: 0 5px 0 10px;
|
padding: 0 5px 0 10px;
|
||||||
height: 34px;
|
height: 34px;
|
||||||
|
|||||||
@@ -29,4 +29,4 @@ interface Props {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const svgClass = computed(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.svg-icon {
|
.svg-icon {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ const _columns = computed(() => {
|
|||||||
defineExpose({ tableRef })
|
defineExpose({ tableRef })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.gi-table {
|
.gi-table {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const onCopy = (data: object) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.json_pretty_container {
|
.json_pretty_container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -16,4 +16,4 @@ defineOptions({ name: 'ParentView' })
|
|||||||
const tabsStore = useTabsStore()
|
const tabsStore = useTabsStore()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -895,4 +895,4 @@
|
|||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -502,4 +502,4 @@
|
|||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1335,4 +1335,4 @@
|
|||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -12,4 +12,4 @@
|
|||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -8,4 +8,4 @@
|
|||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -18,4 +18,4 @@
|
|||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -17,4 +17,4 @@
|
|||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const appStore = useAppStore()
|
|||||||
const { isMobile } = useDevice()
|
const { isMobile } = useDevice()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.layout {
|
.layout {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ watch(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-menu-pop) {
|
:deep(.arco-menu-pop) {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const handleCollapse = (isCollapsed: boolean) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-menu.arco-menu-vertical.arco-menu-collapsed) {
|
:deep(.arco-menu.arco-menu-vertical.arco-menu-collapsed) {
|
||||||
|
|
||||||
// Menu菜单组件修改
|
// Menu菜单组件修改
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import MenuFoldBtn from '../MenuFoldBtn.vue'
|
|||||||
defineOptions({ name: 'LayoutHeader' })
|
defineOptions({ name: 'LayoutHeader' })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.arco-dropdown-open .arco-icon-down {
|
.arco-dropdown-open .arco-icon-down {
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.message {
|
.message {
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: calc(100% - 51px);
|
max-height: calc(100% - 51px);
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ const changeColor = (colorObj: ColorObj) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-descriptions-item-label-block) {
|
:deep(.arco-descriptions-item-label-block) {
|
||||||
color: var(--color-text-1);
|
color: var(--color-text-1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ withDefaults(defineProps<Props>(), {})
|
|||||||
const emit = defineEmits(['click'])
|
const emit = defineEmits(['click'])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.layout-item {
|
.layout-item {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.arco-dropdown-open .arco-icon-down {
|
.arco-dropdown-open .arco-icon-down {
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const toHome = () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.system-logo {
|
.system-logo {
|
||||||
height: 56px;
|
height: 56px;
|
||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const appStore = useAppStore()
|
|||||||
const tabsStore = useTabsStore()
|
const tabsStore = useTabsStore()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.main {
|
.main {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ interface Props {
|
|||||||
const props = withDefaults(defineProps<Props>(), {})
|
const props = withDefaults(defineProps<Props>(), {})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -83,4 +83,4 @@ const onCollapse = (collapsed: boolean) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const onClick = () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.menu-fold-btn {
|
.menu-fold-btn {
|
||||||
background-color: var(--color-secondary-hover) !important;
|
background-color: var(--color-secondary-hover) !important;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.gi-more-icon-wrap {
|
.gi-more-icon-wrap {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ const handleContextMenu = (e: MouseEvent, path: string) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-tabs-nav-tab) {
|
:deep(.arco-tabs-nav-tab) {
|
||||||
.arco-tabs-tab {
|
.arco-tabs-tab {
|
||||||
svg {
|
svg {
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ defineOptions({ name: 'Layout' })
|
|||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Message } from '@arco-design/web-vue'
|
import { Message } from '@arco-design/web-vue'
|
||||||
import { useWindowSize } from '@vueuse/core'
|
import { useWindowSize } from '@vueuse/core'
|
||||||
import { type FieldConfigResp, type GeneratorConfigResp, getGenConfig, listFieldConfig, listFieldConfigDict, saveGenConfig } from '@/apis/tool'
|
import { type FieldConfigResp, type GeneratorConfigResp, getGenConfig, listFieldConfig, listFieldConfigDict, saveGenConfig } from '@/apis/code/generator'
|
||||||
import type { LabelValueState } from '@/types/global'
|
import type { LabelValueState } from '@/types/global'
|
||||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||||
import { type Columns, GiForm, type Options } from '@/components/GiForm'
|
import { type Columns, GiForm, type Options } from '@/components/GiForm'
|
||||||
@@ -131,8 +131,15 @@ import { useDict } from '@/hooks/app'
|
|||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'save-success'): void
|
(e: 'save-success'): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const { width } = useWindowSize()
|
const { width } = useWindowSize()
|
||||||
|
|
||||||
|
const title = ref('')
|
||||||
|
const visible = ref(false)
|
||||||
|
const activeKey = ref('1')
|
||||||
|
const formRef = ref<InstanceType<typeof GiForm>>()
|
||||||
const { form_type_enum, query_type_enum } = useDict('form_type_enum', 'query_type_enum')
|
const { form_type_enum, query_type_enum } = useDict('form_type_enum', 'query_type_enum')
|
||||||
|
const dictList = ref<LabelValueState[]>([])
|
||||||
|
|
||||||
const options: Options = {
|
const options: Options = {
|
||||||
form: { size: 'large' },
|
form: { size: 'large' },
|
||||||
@@ -188,14 +195,30 @@ const formColumns: Columns = reactive([
|
|||||||
{
|
{
|
||||||
label: '是否覆盖',
|
label: '是否覆盖',
|
||||||
field: 'isOverride',
|
field: 'isOverride',
|
||||||
type: 'radio-group',
|
type: 'switch',
|
||||||
options: [{ label: '是', value: true }, { label: '否', value: false }],
|
|
||||||
props: {
|
props: {
|
||||||
type: 'button',
|
type: 'round',
|
||||||
|
checkedValue: 1,
|
||||||
|
uncheckedValue: 2,
|
||||||
|
checkedText: '是',
|
||||||
|
uncheckedText: '否',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
const dataList = ref<FieldConfigResp[]>([])
|
||||||
|
const loading = ref(false)
|
||||||
|
// 查询列表数据
|
||||||
|
const getDataList = async (tableName: string, requireSync: boolean) => {
|
||||||
|
try {
|
||||||
|
loading.value = true
|
||||||
|
const { data } = await listFieldConfig(tableName, requireSync)
|
||||||
|
dataList.value = data
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Table 字段配置
|
// Table 字段配置
|
||||||
const columns: TableInstanceColumns[] = [
|
const columns: TableInstanceColumns[] = [
|
||||||
{ title: '名称', slotName: 'fieldName' },
|
{ title: '名称', slotName: 'fieldName' },
|
||||||
@@ -210,23 +233,6 @@ const columns: TableInstanceColumns[] = [
|
|||||||
{ title: '关联字典', slotName: 'dictCode' },
|
{ title: '关联字典', slotName: 'dictCode' },
|
||||||
]
|
]
|
||||||
|
|
||||||
const dictList = ref<LabelValueState[]>([])
|
|
||||||
const dataList = ref<FieldConfigResp[]>([])
|
|
||||||
const loading = ref(false)
|
|
||||||
// 查询列表数据
|
|
||||||
const getDataList = async (tableName: string, requireSync: boolean) => {
|
|
||||||
try {
|
|
||||||
loading.value = true
|
|
||||||
const res = await listFieldConfig(tableName, requireSync)
|
|
||||||
dataList.value = res.data
|
|
||||||
const { data } = await listFieldConfigDict()
|
|
||||||
dictList.value = data
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const formRef = ref<InstanceType<typeof GiForm>>()
|
|
||||||
const { form, resetForm } = useForm({
|
const { form, resetForm } = useForm({
|
||||||
isOverride: false,
|
isOverride: false,
|
||||||
})
|
})
|
||||||
@@ -237,21 +243,6 @@ const reset = () => {
|
|||||||
resetForm()
|
resetForm()
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = ref('')
|
|
||||||
const visible = ref(false)
|
|
||||||
// 配置
|
|
||||||
const onConfig = async (tableName: string, comment: string) => {
|
|
||||||
comment = comment ? `(${comment})` : ' '
|
|
||||||
title.value = `${tableName}${comment}配置`
|
|
||||||
visible.value = true
|
|
||||||
// 查询字段配置
|
|
||||||
await getDataList(tableName, false)
|
|
||||||
// 查询生成配置
|
|
||||||
const { data } = await getGenConfig(tableName)
|
|
||||||
Object.assign(form, data)
|
|
||||||
form.isOverride = false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 同步
|
// 同步
|
||||||
const handleRefresh = async (tableName: string) => {
|
const handleRefresh = async (tableName: string) => {
|
||||||
await getDataList(tableName, true)
|
await getDataList(tableName, true)
|
||||||
@@ -262,7 +253,6 @@ const handleChangeSort = (newDataList: FieldConfigResp[]) => {
|
|||||||
dataList.value = newDataList
|
dataList.value = newDataList
|
||||||
}
|
}
|
||||||
|
|
||||||
const activeKey = ref('1')
|
|
||||||
// 保存
|
// 保存
|
||||||
const save = async () => {
|
const save = async () => {
|
||||||
try {
|
try {
|
||||||
@@ -283,10 +273,25 @@ const save = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ onConfig })
|
// 打开
|
||||||
|
const onOpen = async (tableName: string, comment: string) => {
|
||||||
|
reset()
|
||||||
|
comment = comment ? `(${comment})` : ' '
|
||||||
|
title.value = `${tableName}${comment}配置`
|
||||||
|
// 查询生成配置
|
||||||
|
const { data } = await getGenConfig(tableName)
|
||||||
|
Object.assign(form, data)
|
||||||
|
visible.value = true
|
||||||
|
// 查询字段配置
|
||||||
|
await getDataList(tableName, false)
|
||||||
|
const res = await listFieldConfigDict()
|
||||||
|
dictList.value = res.data
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ onOpen })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.gen-config.arco-form) {
|
:deep(.gen-config.arco-form) {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<a-modal v-model:visible="visible" width="90%" :footer="false">
|
<a-modal v-model:visible="visible" width="90%" :footer="false">
|
||||||
<template #title>
|
<template #title>
|
||||||
{{ `生成 ${previewTableName} 表预览` }}
|
{{ `生成 ${previewTableName} 表预览` }}
|
||||||
<a-link style="margin-left: 10px" icon @click="onDownload">下载源码</a-link>
|
<a-link v-permission="['code:generator:generate']" style="margin-left: 10px" icon @click="onDownload">下载源码</a-link>
|
||||||
</template>
|
</template>
|
||||||
<div class="preview-content">
|
<div class="preview-content">
|
||||||
<a-layout :has-sider="true">
|
<a-layout :has-sider="true">
|
||||||
@@ -50,11 +50,9 @@
|
|||||||
</a-typography-title>
|
</a-typography-title>
|
||||||
</template>
|
</template>
|
||||||
<a-scrollbar style="height: 650px; overflow: auto">
|
<a-scrollbar style="height: 650px; overflow: auto">
|
||||||
<a-link style="position: absolute; right: 20px; z-index: 999" @click="onCopy">
|
<a-link style="position: absolute; right: 20px; z-index: 999" title="复制" @click="onCopy">
|
||||||
<template #icon>
|
<template #icon><icon-copy size="large" /></template>
|
||||||
<icon-copy size="large" />
|
<template #default>复制</template>
|
||||||
</template>
|
|
||||||
复制
|
|
||||||
</a-link>
|
</a-link>
|
||||||
<GiCodeView
|
<GiCodeView
|
||||||
:type="'vue' === currentPreview?.fileName.split('.')[1] ? 'vue' : 'javascript'"
|
:type="'vue' === currentPreview?.fileName.split('.')[1] ? 'vue' : 'javascript'"
|
||||||
@@ -71,14 +69,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Message, type TreeNodeData } from '@arco-design/web-vue'
|
import { Message, type TreeNodeData } from '@arco-design/web-vue'
|
||||||
import { useClipboard } from '@vueuse/core'
|
import { useClipboard } from '@vueuse/core'
|
||||||
import { type GeneratePreviewResp, genPreview } from '@/apis/tool'
|
import { type GeneratePreviewResp, genPreview } from '@/apis/code/generator'
|
||||||
|
|
||||||
// 生成
|
|
||||||
const emit = defineEmits<{ (e: 'generate', tableNames: string[]): void }>()
|
const emit = defineEmits<{ (e: 'generate', tableNames: string[]): void }>()
|
||||||
const { copy, copied } = useClipboard()
|
const { copy, copied } = useClipboard()
|
||||||
const currentPreview = ref<GeneratePreviewResp>()
|
|
||||||
const genPreviewList = ref<GeneratePreviewResp[]>([])
|
|
||||||
|
|
||||||
|
const genPreviewList = ref<GeneratePreviewResp[]>([])
|
||||||
|
const currentPreview = ref<GeneratePreviewResp>()
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
const previewTableName = ref<string>('')
|
const previewTableName = ref<string>('')
|
||||||
const treeRef = ref()
|
const treeRef = ref()
|
||||||
@@ -129,9 +126,41 @@ const assembleTree = (genPreview: GeneratePreviewResp) => {
|
|||||||
tempChildren?.push({ title: genPreview.fileName, key: genPreview.fileName, children: new Array<TreeNodeData>() })
|
tempChildren?.push({ title: genPreview.fileName, key: genPreview.fileName, children: new Array<TreeNodeData>() })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 下载
|
||||||
|
const onDownload = () => {
|
||||||
|
emit('generate', [previewTableName.value])
|
||||||
|
}
|
||||||
|
// 校验文件类型
|
||||||
|
const checkFileType = (title: string, type: string) => {
|
||||||
|
return title.endsWith(type)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 复制
|
||||||
|
const onCopy = () => {
|
||||||
|
if (currentPreview.value) {
|
||||||
|
copy(currentPreview.value?.content)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
watch(copied, () => {
|
||||||
|
if (copied.value) {
|
||||||
|
Message.success('复制成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const selectedKeys = ref()
|
const selectedKeys = ref()
|
||||||
|
// 选择文件预览
|
||||||
|
const onSelectPreview = (keys: (string | number)[]) => {
|
||||||
|
if (typeof keys[0] === 'string') {
|
||||||
|
currentPreview.value = genPreviewList.value.filter((p) => p.fileName === keys[0])[0]
|
||||||
|
selectedKeys.value = keys
|
||||||
|
} else {
|
||||||
|
const expandedKeys = treeRef.value.getExpandedNodes().map((node) => node.key)
|
||||||
|
treeRef.value.expandNode(keys[0], !expandedKeys.includes(keys[0]))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 打开
|
// 打开
|
||||||
const onPreview = async (tableName: string) => {
|
const onOpen = async (tableName: string) => {
|
||||||
treeData.value = []
|
treeData.value = []
|
||||||
previewTableName.value = tableName
|
previewTableName.value = tableName
|
||||||
const { data } = await genPreview(tableName)
|
const { data } = await genPreview(tableName)
|
||||||
@@ -150,42 +179,10 @@ const onPreview = async (tableName: string) => {
|
|||||||
visible.value = true
|
visible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选择文件预览
|
defineExpose({ onOpen })
|
||||||
const onSelectPreview = (keys: (string | number)[]) => {
|
|
||||||
if (typeof keys[0] === 'string') {
|
|
||||||
currentPreview.value = genPreviewList.value.filter((p) => p.fileName === keys[0])[0]
|
|
||||||
selectedKeys.value = keys
|
|
||||||
} else {
|
|
||||||
const expandedKeys = treeRef.value.getExpandedNodes().map((node) => node.key)
|
|
||||||
treeRef.value.expandNode(keys[0], !expandedKeys.includes(keys[0]))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 复制
|
|
||||||
const onCopy = () => {
|
|
||||||
if (currentPreview.value) {
|
|
||||||
copy(currentPreview.value?.content)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
watch(copied, () => {
|
|
||||||
if (copied.value) {
|
|
||||||
Message.success('复制成功')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// 下载
|
|
||||||
const onDownload = () => {
|
|
||||||
emit('generate', [previewTableName.value])
|
|
||||||
}
|
|
||||||
// 校验文件类型
|
|
||||||
const checkFileType = (title: string, type: string) => {
|
|
||||||
return title.endsWith(type)
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({ onPreview })
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-tree-show-line .arco-tree-node-is-leaf:not(.arco-tree-node-is-tail) .arco-tree-node-indent::after) {
|
:deep(.arco-tree-show-line .arco-tree-node-is-leaf:not(.arco-tree-node-is-tail) .arco-tree-node-indent::after) {
|
||||||
content: none;
|
content: none;
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="table-page">
|
<div class="table-page">
|
||||||
<GiTable
|
<GiTable
|
||||||
row-key="tableName"
|
|
||||||
title="代码生成"
|
title="代码生成"
|
||||||
|
row-key="tableName"
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@@ -23,10 +23,11 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-link @click="onConfig(record.tableName, record.comment)">配置</a-link>
|
<a-link v-permission="['code:generator:config']" title="配置" @click="onConfig(record.tableName, record.comment)">配置</a-link>
|
||||||
<a-link
|
<a-link
|
||||||
:title="record.createTime ? '生成' : '请先进行生成配置'"
|
v-permission="['code:generator:preview']"
|
||||||
:disabled="!record.createTime"
|
:disabled="!record.createTime"
|
||||||
|
:title="record.createTime ? '生成' : '请先进行生成配置'"
|
||||||
@click="onPreview(record.tableName)"
|
@click="onPreview(record.tableName)"
|
||||||
>
|
>
|
||||||
生成
|
生成
|
||||||
@@ -42,12 +43,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import GenConfigDrawer from './GenConfigDrawer.vue'
|
import GenConfigDrawer from './GenConfigDrawer.vue'
|
||||||
import { generate, listGenConfig } from '@/apis/tool'
|
import { generate, listGenConfig } from '@/apis/code/generator'
|
||||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||||
import { useTable } from '@/hooks'
|
import { useTable } from '@/hooks'
|
||||||
import { isMobile } from '@/utils'
|
import { isMobile } from '@/utils'
|
||||||
|
|
||||||
defineOptions({ name: 'Generator' })
|
defineOptions({ name: 'CodeGenerator' })
|
||||||
const GenPreviewModal = defineAsyncComponent(() => import('./GenPreviewModal.vue'))
|
const GenPreviewModal = defineAsyncComponent(() => import('./GenPreviewModal.vue'))
|
||||||
|
|
||||||
const queryForm = reactive({
|
const queryForm = reactive({
|
||||||
@@ -60,7 +61,6 @@ const {
|
|||||||
pagination,
|
pagination,
|
||||||
search,
|
search,
|
||||||
} = useTable((page) => listGenConfig({ ...queryForm, ...page }), { immediate: true })
|
} = useTable((page) => listGenConfig({ ...queryForm, ...page }), { immediate: true })
|
||||||
|
|
||||||
const columns: TableInstanceColumns[] = [
|
const columns: TableInstanceColumns[] = [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
@@ -76,7 +76,7 @@ const columns: TableInstanceColumns[] = [
|
|||||||
{ title: '模块包名', dataIndex: 'packageName', ellipsis: true, tooltip: true },
|
{ title: '模块包名', dataIndex: 'packageName', ellipsis: true, tooltip: true },
|
||||||
{ title: '配置时间', dataIndex: 'createTime', width: 180 },
|
{ title: '配置时间', dataIndex: 'createTime', width: 180 },
|
||||||
{ title: '修改时间', dataIndex: 'updateTime', width: 180 },
|
{ title: '修改时间', dataIndex: 'updateTime', width: 180 },
|
||||||
{ title: '操作', slotName: 'action', width: 180, align: 'center', fixed: !isMobile() ? 'right' : undefined },
|
{ title: '操作', dataIndex: 'action', slotName: 'action', width: 160, align: 'center', fixed: !isMobile() ? 'right' : undefined },
|
||||||
]
|
]
|
||||||
|
|
||||||
// 重置
|
// 重置
|
||||||
@@ -88,13 +88,13 @@ const reset = () => {
|
|||||||
const GenConfigDrawerRef = ref<InstanceType<typeof GenConfigDrawer>>()
|
const GenConfigDrawerRef = ref<InstanceType<typeof GenConfigDrawer>>()
|
||||||
// 配置
|
// 配置
|
||||||
const onConfig = (tableName: string, comment: string) => {
|
const onConfig = (tableName: string, comment: string) => {
|
||||||
GenConfigDrawerRef.value?.onConfig(tableName, comment)
|
GenConfigDrawerRef.value?.onOpen(tableName, comment)
|
||||||
}
|
}
|
||||||
|
|
||||||
const GenPreviewModalRef = ref<InstanceType<typeof GenPreviewModal>>()
|
const GenPreviewModalRef = ref<InstanceType<typeof GenPreviewModal>>()
|
||||||
// 预览
|
// 预览
|
||||||
const onPreview = (tableName: string) => {
|
const onPreview = (tableName: string) => {
|
||||||
GenPreviewModalRef.value?.onPreview(tableName)
|
GenPreviewModalRef.value?.onOpen(tableName)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成
|
// 生成
|
||||||
@@ -123,4 +123,4 @@ const onGenerate = async (tableNames: Array<string>) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style scoped lang="scss"></style>
|
||||||
@@ -200,7 +200,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-card-body) {
|
:deep(.arco-card-body) {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -40,4 +40,4 @@ import AccessTimeslot from '@/views/dashboard/analysis/components/AccessTimeslot
|
|||||||
defineOptions({ name: 'Analysis' })
|
defineOptions({ name: 'Analysis' })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { goodTimeText } from '@/utils'
|
|||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-statistic-title) {
|
:deep(.arco-statistic-title) {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ import Docs from './components/Docs.vue'
|
|||||||
defineOptions({ name: 'Workplace' })
|
defineOptions({ name: 'Workplace' })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ import ErrorPage from './components/ErrorPage.vue'
|
|||||||
defineOptions({ name: 'Error403' })
|
defineOptions({ name: 'Error403' })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ import ErrorPage from './components/ErrorPage.vue'
|
|||||||
defineOptions({ name: 'Error404' })
|
defineOptions({ name: 'Error404' })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ import ErrorPage from './components/ErrorPage.vue'
|
|||||||
defineOptions({ name: 'Error500' })
|
defineOptions({ name: 'Error500' })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const back = () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.error-page {
|
.error-page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.arco-input-wrapper,
|
.arco-input-wrapper,
|
||||||
:deep(.arco-select-view-single) {
|
:deep(.arco-select-view-single) {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.login-bg {
|
.login-bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ const getCaptcha = async (captchaReq: BehaviorCaptchaReq) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.arco-input-wrapper,
|
.arco-input-wrapper,
|
||||||
:deep(.arco-select-view-single) {
|
:deep(.arco-select-view-single) {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const onModify = async () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.arco-input-wrapper,
|
.arco-input-wrapper,
|
||||||
:deep(.arco-select-view-single) {
|
:deep(.arco-select-view-single) {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ const getCaptcha = async (captchaReq: BehaviorCaptchaReq) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.arco-input-wrapper,
|
.arco-input-wrapper,
|
||||||
:deep(.arco-select-view-single) {
|
:deep(.arco-select-view-single) {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ const onOauth = async (source: string) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
@media screen and (max-width: 570px) {
|
@media screen and (max-width: 570px) {
|
||||||
.pc {
|
.pc {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ const title = computed(() => appStore.getTitle())
|
|||||||
const logo = computed(() => appStore.getLogo())
|
const logo = computed(() => appStore.getLogo())
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
@media screen and (max-width: 570px) {
|
@media screen and (max-width: 570px) {
|
||||||
.pc {
|
.pc {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const change = (key: string | number) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-tabs .arco-tabs-nav-type-card-gutter .arco-tabs-tab-active) {
|
:deep(.arco-tabs .arco-tabs-nav-type-card-gutter .arco-tabs-tab-active) {
|
||||||
box-shadow: inset 0 2px 0 rgb(var(--primary-6)), inset -1px 0 0 var(--color-border-2),
|
box-shadow: inset 0 2px 0 rgb(var(--primary-6)), inset -1px 0 0 var(--color-border-2),
|
||||||
inset 1px 0 0 var(--color-border-2);
|
inset 1px 0 0 var(--color-border-2);
|
||||||
|
|||||||
@@ -135,4 +135,4 @@ const onExport = () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -68,29 +68,29 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { type LogDetailResp, getLog } from '@/apis/monitor'
|
import { type LogDetailResp, getLog as getData } from '@/apis/monitor'
|
||||||
|
|
||||||
const dataId = ref('')
|
const dataId = ref('')
|
||||||
const dataDetail = ref<LogDetailResp>()
|
const dataDetail = ref<LogDetailResp>()
|
||||||
|
const visible = ref(false)
|
||||||
|
|
||||||
// 查询详情
|
// 查询详情
|
||||||
const getDataDetail = async () => {
|
const getDataDetail = async () => {
|
||||||
const res = await getLog(dataId.value)
|
const { data } = await getData(dataId.value)
|
||||||
dataDetail.value = res.data
|
dataDetail.value = data
|
||||||
}
|
}
|
||||||
|
|
||||||
const visible = ref(false)
|
// 打开
|
||||||
// 详情
|
const onOpen = async (id: string) => {
|
||||||
const onDetail = async (id: string) => {
|
|
||||||
dataId.value = id
|
dataId.value = id
|
||||||
await getDataDetail()
|
await getDataDetail()
|
||||||
visible.value = true
|
visible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ onDetail })
|
defineExpose({ onOpen })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.http :deep(.arco-descriptions-item-label-block) {
|
.http :deep(.arco-descriptions-item-label-block) {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<template #default>导出</template>
|
<template #default>导出</template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #createTime="{ record }">
|
<template v-if="has.hasPermOr(['monitor:log:detail'])" #createTime="{ record }">
|
||||||
<a-link @click="onDetail(record)">{{ record.createTime }}</a-link>
|
<a-link @click="onDetail(record)">{{ record.createTime }}</a-link>
|
||||||
</template>
|
</template>
|
||||||
<template #status="{ record }">
|
<template #status="{ record }">
|
||||||
@@ -62,6 +62,7 @@ import { type LogQuery, type LogResp, exportOperationLog, listLog } from '@/apis
|
|||||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||||
import DateRangePicker from '@/components/DateRangePicker/index.vue'
|
import DateRangePicker from '@/components/DateRangePicker/index.vue'
|
||||||
import { useDownload, useTable } from '@/hooks'
|
import { useDownload, useTable } from '@/hooks'
|
||||||
|
import has from '@/utils/has'
|
||||||
|
|
||||||
defineOptions({ name: 'OperationLog' })
|
defineOptions({ name: 'OperationLog' })
|
||||||
|
|
||||||
@@ -79,7 +80,6 @@ const {
|
|||||||
pagination,
|
pagination,
|
||||||
search,
|
search,
|
||||||
} = useTable((page) => listLog({ ...queryForm, ...page }), { immediate: true })
|
} = useTable((page) => listLog({ ...queryForm, ...page }), { immediate: true })
|
||||||
|
|
||||||
const columns: TableInstanceColumns[] = [
|
const columns: TableInstanceColumns[] = [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
@@ -87,12 +87,13 @@ const columns: TableInstanceColumns[] = [
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
render: ({ rowIndex }) => h('span', {}, rowIndex + 1 + (pagination.current - 1) * pagination.pageSize),
|
render: ({ rowIndex }) => h('span', {}, rowIndex + 1 + (pagination.current - 1) * pagination.pageSize),
|
||||||
},
|
},
|
||||||
{ title: '操作时间', slotName: 'createTime', width: 180 },
|
{ title: '操作时间', dataIndex: 'createTime', slotName: 'createTime', width: 180 },
|
||||||
{ title: '操作人', dataIndex: 'createUserString', ellipsis: true, tooltip: true },
|
{ title: '操作人', dataIndex: 'createUserString', ellipsis: true, tooltip: true },
|
||||||
{ title: '操作内容', dataIndex: 'description', ellipsis: true, tooltip: true },
|
{ title: '操作内容', dataIndex: 'description', ellipsis: true, tooltip: true },
|
||||||
{ title: '所属模块', dataIndex: 'module', align: 'center', ellipsis: true, tooltip: true },
|
{ title: '所属模块', dataIndex: 'module', align: 'center', ellipsis: true, tooltip: true },
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
|
dataIndex: 'status',
|
||||||
slotName: 'status',
|
slotName: 'status',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
filterable: {
|
filterable: {
|
||||||
@@ -112,7 +113,7 @@ const columns: TableInstanceColumns[] = [
|
|||||||
},
|
},
|
||||||
{ title: '操作 IP', dataIndex: 'ip', ellipsis: true, tooltip: true },
|
{ title: '操作 IP', dataIndex: 'ip', ellipsis: true, tooltip: true },
|
||||||
{ title: '操作地点', dataIndex: 'address', ellipsis: true, tooltip: true },
|
{ title: '操作地点', dataIndex: 'address', ellipsis: true, tooltip: true },
|
||||||
{ title: '耗时', slotName: 'timeTaken', align: 'center' },
|
{ title: '耗时', dataIndex: 'timeTaken', slotName: 'timeTaken', align: 'center' },
|
||||||
{ title: '浏览器', dataIndex: 'browser', ellipsis: true, tooltip: true },
|
{ title: '浏览器', dataIndex: 'browser', ellipsis: true, tooltip: true },
|
||||||
{ title: '终端系统', dataIndex: 'os', ellipsis: true, tooltip: true },
|
{ title: '终端系统', dataIndex: 'os', ellipsis: true, tooltip: true },
|
||||||
]
|
]
|
||||||
@@ -149,8 +150,8 @@ const onExport = () => {
|
|||||||
const OperationLogDetailDrawerRef = ref<InstanceType<typeof OperationLogDetailDrawer>>()
|
const OperationLogDetailDrawerRef = ref<InstanceType<typeof OperationLogDetailDrawer>>()
|
||||||
// 详情
|
// 详情
|
||||||
const onDetail = (item: LogResp) => {
|
const onDetail = (item: LogResp) => {
|
||||||
OperationLogDetailDrawerRef.value?.onDetail(item.id)
|
OperationLogDetailDrawerRef.value?.onOpen(item.id)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="table-page">
|
<div class="table-page">
|
||||||
<GiTable
|
<GiTable
|
||||||
row-key="id"
|
|
||||||
title="在线用户"
|
title="在线用户"
|
||||||
|
row-key="id"
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<template #default>重置</template>
|
<template #default>重置</template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #nickname="{ record }">{{ record.nickname }}({{ record.username }})</template>
|
<template #nickname="{ record }">{{ record.nickname }}({{ record.username }})</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
@@ -70,7 +70,6 @@ const {
|
|||||||
pagination,
|
pagination,
|
||||||
search,
|
search,
|
||||||
} = useTable((page) => listOnlineUser({ ...queryForm, ...page }), { immediate: true })
|
} = useTable((page) => listOnlineUser({ ...queryForm, ...page }), { immediate: true })
|
||||||
|
|
||||||
const columns: TableInstanceColumns[] = [
|
const columns: TableInstanceColumns[] = [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
@@ -78,7 +77,7 @@ const columns: TableInstanceColumns[] = [
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
render: ({ rowIndex }) => h('span', {}, rowIndex + 1 + (pagination.current - 1) * pagination.pageSize),
|
render: ({ rowIndex }) => h('span', {}, rowIndex + 1 + (pagination.current - 1) * pagination.pageSize),
|
||||||
},
|
},
|
||||||
{ title: '用户昵称', slotName: 'nickname', ellipsis: true, tooltip: true },
|
{ title: '用户昵称', dataIndex: 'nickname', slotName: 'nickname', ellipsis: true, tooltip: true },
|
||||||
{ title: '登录 IP', dataIndex: 'ip', ellipsis: true, tooltip: true },
|
{ title: '登录 IP', dataIndex: 'ip', ellipsis: true, tooltip: true },
|
||||||
{ title: '登录地点', dataIndex: 'address', ellipsis: true, tooltip: true },
|
{ title: '登录地点', dataIndex: 'address', ellipsis: true, tooltip: true },
|
||||||
{ title: '浏览器', dataIndex: 'browser', ellipsis: true, tooltip: true },
|
{ title: '浏览器', dataIndex: 'browser', ellipsis: true, tooltip: true },
|
||||||
@@ -87,6 +86,7 @@ const columns: TableInstanceColumns[] = [
|
|||||||
{ title: '最后活跃时间', dataIndex: 'lastActiveTime', width: 180 },
|
{ title: '最后活跃时间', dataIndex: 'lastActiveTime', width: 180 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
slotName: 'action',
|
slotName: 'action',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
fixed: !isMobile() ? 'right' : undefined,
|
fixed: !isMobile() ? 'right' : undefined,
|
||||||
@@ -110,4 +110,4 @@ const handleKickout = (token: string) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -41,4 +41,4 @@ const onDetail = async (id: string) => {
|
|||||||
defineExpose({ onDetail })
|
defineExpose({ onDetail })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -166,4 +166,4 @@ const onRefreshAK = async (record: AppResp) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -4,9 +4,7 @@
|
|||||||
:title="title"
|
:title="title"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:esc-to-close="false"
|
:esc-to-close="false"
|
||||||
:modal-style="{ maxWidth: '700px' }"
|
:width="width >= 600 ? 600 : '100%'"
|
||||||
:body-style="{ maxHeight: width >= 700 ? '76vh' : '100vh' }"
|
|
||||||
:width="width >= 700 ? '90%' : '100%'"
|
|
||||||
@before-ok="save"
|
@before-ok="save"
|
||||||
@close="reset"
|
@close="reset"
|
||||||
>
|
>
|
||||||
@@ -172,6 +170,7 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
<CronGeneratorModal ref="genModal" @ok="(e) => form.triggerInterval = e" />
|
<CronGeneratorModal ref="genModal" @ok="(e) => form.triggerInterval = e" />
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
@@ -179,7 +178,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { type ColProps, type FormInstance, Message } from '@arco-design/web-vue'
|
import { type ColProps, type FormInstance, Message } from '@arco-design/web-vue'
|
||||||
import { useWindowSize } from '@vueuse/core'
|
import { useWindowSize } from '@vueuse/core'
|
||||||
import { addJob, listGroup, updateJob } from '@/apis/schedule'
|
import { addJob, listGroup, updateJob } from '@/apis/schedule/job'
|
||||||
import { useForm } from '@/hooks'
|
import { useForm } from '@/hooks'
|
||||||
import { useDict } from '@/hooks/app'
|
import { useDict } from '@/hooks/app'
|
||||||
import CronGeneratorModal from '@/components/GenCron/CronModel/index.vue'
|
import CronGeneratorModal from '@/components/GenCron/CronModel/index.vue'
|
||||||
@@ -187,8 +186,18 @@ import CronGeneratorModal from '@/components/GenCron/CronModel/index.vue'
|
|||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'save-success'): void
|
(e: 'save-success'): void
|
||||||
}>()
|
}>()
|
||||||
const colProps: ColProps = { xs: 24, sm: 24, md: 12, lg: 12, xl: 12, xxl: 12 }
|
|
||||||
const { width } = useWindowSize()
|
const { width } = useWindowSize()
|
||||||
|
|
||||||
|
const colProps: ColProps = { xs: 24, sm: 24, md: 12, lg: 12, xl: 12, xxl: 12 }
|
||||||
|
|
||||||
|
const dataId = ref()
|
||||||
|
const visible = ref(false)
|
||||||
|
const isUpdate = computed(() => !!dataId.value)
|
||||||
|
const title = computed(() => (isUpdate.value ? '修改任务' : '新增任务'))
|
||||||
|
const formRef = ref<FormInstance>()
|
||||||
|
const groupList = ref()
|
||||||
|
const genModal = ref()
|
||||||
const { job_trigger_type_enum, job_task_type_enum, job_route_strategy_enum, job_block_strategy_enum } = useDict(
|
const { job_trigger_type_enum, job_task_type_enum, job_route_strategy_enum, job_block_strategy_enum } = useDict(
|
||||||
'job_trigger_type_enum',
|
'job_trigger_type_enum',
|
||||||
'job_task_type_enum',
|
'job_task_type_enum',
|
||||||
@@ -196,11 +205,6 @@ const { job_trigger_type_enum, job_task_type_enum, job_route_strategy_enum, job_
|
|||||||
'job_block_strategy_enum',
|
'job_block_strategy_enum',
|
||||||
)
|
)
|
||||||
|
|
||||||
const dataId = ref()
|
|
||||||
const isUpdate = computed(() => !!dataId.value)
|
|
||||||
const title = computed(() => (isUpdate.value ? '修改任务' : '新增任务'))
|
|
||||||
const formRef = ref<FormInstance>()
|
|
||||||
const genModal = ref()
|
|
||||||
const rules: FormInstance['rules'] = {
|
const rules: FormInstance['rules'] = {
|
||||||
groupName: [{ required: true, message: '请选择任务组' }],
|
groupName: [{ required: true, message: '请选择任务组' }],
|
||||||
jobName: [{ required: true, message: '请输入任务名称' }],
|
jobName: [{ required: true, message: '请输入任务名称' }],
|
||||||
@@ -235,41 +239,31 @@ const reset = () => {
|
|||||||
resetForm()
|
resetForm()
|
||||||
}
|
}
|
||||||
|
|
||||||
const groupList = ref()
|
// 触发类型切换
|
||||||
// 查询任务组列表
|
const triggerTypeChange = () => {
|
||||||
const getGroupList = async () => {
|
switch (form.triggerType) {
|
||||||
const { data } = await listGroup()
|
case 2:
|
||||||
groupList.value = data?.map((item: string) => ({
|
form.triggerInterval = 60
|
||||||
label: item,
|
break
|
||||||
value: item,
|
case 3:
|
||||||
}))
|
form.triggerInterval = ''
|
||||||
}
|
break
|
||||||
|
|
||||||
const visible = ref(false)
|
|
||||||
// 新增
|
|
||||||
const onAdd = () => {
|
|
||||||
reset()
|
|
||||||
getGroupList()
|
|
||||||
dataId.value = undefined
|
|
||||||
visible.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改
|
|
||||||
const onUpdate = async (record: any) => {
|
|
||||||
await getGroupList()
|
|
||||||
reset()
|
|
||||||
dataId.value = record.id
|
|
||||||
Object.assign(form, record)
|
|
||||||
// 切片任务,解析 argsStr 并赋值给 args
|
|
||||||
if (form.taskType === 3 && form.argsStr) {
|
|
||||||
try {
|
|
||||||
const parsedArgs = JSON.parse(form.argsStr)
|
|
||||||
args.value = parsedArgs.map((arg: any) => ({ value: arg }))
|
|
||||||
} catch (error: any) {
|
|
||||||
Message.error(error)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
visible.value = true
|
}
|
||||||
|
|
||||||
|
// 新增切片参数
|
||||||
|
const onAddArgs = () => {
|
||||||
|
args.value.push({ value: '' })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除切片参数
|
||||||
|
const onDeleteArgs = (index) => {
|
||||||
|
args.value.splice(index, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开生成表达式
|
||||||
|
const openGeneratorCron = (cron: string) => {
|
||||||
|
genModal.value.open(cron)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
@@ -295,30 +289,43 @@ const save = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 触发类型切换
|
// 查询任务组列表
|
||||||
const triggerTypeChange = () => {
|
const getGroupList = async () => {
|
||||||
switch (form.triggerType) {
|
const { data } = await listGroup()
|
||||||
case 2:
|
groupList.value = data?.map((item: string) => ({
|
||||||
form.triggerInterval = 60
|
label: item,
|
||||||
break
|
value: item,
|
||||||
case 3:
|
}))
|
||||||
form.triggerInterval = ''
|
}
|
||||||
break
|
|
||||||
|
// 新增
|
||||||
|
const onAdd = async () => {
|
||||||
|
reset()
|
||||||
|
dataId.value = undefined
|
||||||
|
if (!groupList.value.length) {
|
||||||
|
await getGroupList()
|
||||||
}
|
}
|
||||||
|
visible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增切片参数
|
// 修改
|
||||||
const onAddArgs = () => {
|
const onUpdate = async (record: any) => {
|
||||||
args.value.push({ value: '' })
|
reset()
|
||||||
}
|
dataId.value = record.id
|
||||||
// 删除切片参数
|
if (!groupList.value.length) {
|
||||||
const onDeleteArgs = (index) => {
|
await getGroupList()
|
||||||
args.value.splice(index, 1)
|
}
|
||||||
}
|
Object.assign(form, record)
|
||||||
|
// 切片任务,解析 argsStr 并赋值给 args
|
||||||
// 打开生成表达式
|
if (form.taskType === 3 && form.argsStr) {
|
||||||
const openGeneratorCron = (cron: string) => {
|
try {
|
||||||
genModal.value.open(cron)
|
const parsedArgs = JSON.parse(form.argsStr)
|
||||||
|
args.value = parsedArgs.map((arg: any) => ({ value: arg }))
|
||||||
|
} catch (error: any) {
|
||||||
|
Message.error(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
visible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ onAdd, onUpdate })
|
defineExpose({ onAdd, onUpdate })
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ import type { JobResp } from '@/apis/schedule'
|
|||||||
import { useDict } from '@/hooks/app'
|
import { useDict } from '@/hooks/app'
|
||||||
|
|
||||||
const { width } = useWindowSize()
|
const { width } = useWindowSize()
|
||||||
|
|
||||||
|
const dataDetail = ref<JobResp>()
|
||||||
|
const visible = ref(false)
|
||||||
const { job_status_enum, job_trigger_type_enum, job_task_type_enum, job_route_strategy_enum, job_block_strategy_enum } = useDict(
|
const { job_status_enum, job_trigger_type_enum, job_task_type_enum, job_route_strategy_enum, job_block_strategy_enum } = useDict(
|
||||||
'job_status_enum',
|
'job_status_enum',
|
||||||
'job_trigger_type_enum',
|
'job_trigger_type_enum',
|
||||||
@@ -48,13 +51,11 @@ const { job_status_enum, job_trigger_type_enum, job_task_type_enum, job_route_st
|
|||||||
'job_block_strategy_enum',
|
'job_block_strategy_enum',
|
||||||
)
|
)
|
||||||
|
|
||||||
const visible = ref(false)
|
// 打开
|
||||||
const dataDetail = ref<JobResp>()
|
const onOpen = (record: JobResp) => {
|
||||||
// 详情
|
|
||||||
const onDetail = (record: JobResp) => {
|
|
||||||
dataDetail.value = record
|
dataDetail.value = record
|
||||||
visible.value = true
|
visible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ onDetail })
|
defineExpose({ onOpen })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:data="dataList"
|
:data="dataList"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:scroll="{ x: '100%', y: '100%', minWidth: 1500 }"
|
:scroll="{ x: '100%', y: '100%', minWidth: 1300 }"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
:disabled-tools="['size']"
|
:disabled-tools="['size']"
|
||||||
:disabled-column-keys="['name']"
|
:disabled-column-keys="['name']"
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<template #default>新增</template>
|
<template #default>新增</template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #jobName="{ record }">
|
<template v-if="has.hasPermOr(['schedule:job:detail'])" #jobName="{ record }">
|
||||||
<a-link @click="onDetail(record)">{{ record.jobName }}</a-link>
|
<a-link @click="onDetail(record)">{{ record.jobName }}</a-link>
|
||||||
</template>
|
</template>
|
||||||
<template #triggerType="{ record }">
|
<template #triggerType="{ record }">
|
||||||
@@ -63,12 +63,12 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-link @click="onLog(record)">日志</a-link>
|
<a-link v-permission="['schedule:log:list']" title="日志" @click="onLog(record)">日志</a-link>
|
||||||
<a-popconfirm content="是否确定立即执行一次任务?" type="warning" @ok="onTrigger(record)">
|
<a-popconfirm content="是否确定立即执行一次任务?" type="warning" @ok="onTrigger(record)">
|
||||||
<a-link v-permission="['schedule:job:trigger']">执行</a-link>
|
<a-link v-permission="['schedule:job:trigger']" title="执行">执行</a-link>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<a-link v-permission="['schedule:job:update']" @click="onUpdate(record)">修改</a-link>
|
<a-link v-permission="['schedule:job:update']" title="修改" @click="onUpdate(record)">修改</a-link>
|
||||||
<a-link v-permission="['schedule:job:delete']" status="danger" @click="onDelete(record)">删除</a-link>
|
<a-link v-permission="['schedule:job:delete']" status="danger" title="删除" @click="onDelete(record)">删除</a-link>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
</GiTable>
|
</GiTable>
|
||||||
@@ -97,6 +97,7 @@ const { job_status_enum, job_trigger_type_enum, job_task_type_enum } = useDict('
|
|||||||
const queryForm = reactive<JobQuery>({
|
const queryForm = reactive<JobQuery>({
|
||||||
groupName: '',
|
groupName: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
const {
|
const {
|
||||||
tableData: dataList,
|
tableData: dataList,
|
||||||
loading,
|
loading,
|
||||||
@@ -104,7 +105,6 @@ const {
|
|||||||
search,
|
search,
|
||||||
handleDelete,
|
handleDelete,
|
||||||
} = useTable((page) => listJob({ ...queryForm, ...page }), { immediate: false })
|
} = useTable((page) => listJob({ ...queryForm, ...page }), { immediate: false })
|
||||||
|
|
||||||
const columns: TableInstanceColumns[] = [
|
const columns: TableInstanceColumns[] = [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
@@ -115,17 +115,22 @@ const columns: TableInstanceColumns[] = [
|
|||||||
{ title: '任务名称', dataIndex: 'jobName', slotName: 'jobName', minWidth: 100, ellipsis: true, tooltip: true },
|
{ title: '任务名称', dataIndex: 'jobName', slotName: 'jobName', minWidth: 100, ellipsis: true, tooltip: true },
|
||||||
{ title: '调度类型', dataIndex: 'triggerType', slotName: 'triggerType', minWidth: 130 },
|
{ title: '调度类型', dataIndex: 'triggerType', slotName: 'triggerType', minWidth: 130 },
|
||||||
{ title: '任务类型', dataIndex: 'taskType', slotName: 'taskType', minWidth: 130, ellipsis: true, tooltip: true },
|
{ title: '任务类型', dataIndex: 'taskType', slotName: 'taskType', minWidth: 130, ellipsis: true, tooltip: true },
|
||||||
{ title: '状态', dataIndex: 'jobStatus', align: 'center', slotName: 'jobStatus' },
|
{ title: '状态', dataIndex: 'jobStatus', slotName: 'jobStatus', align: 'center' },
|
||||||
{ title: '描述', dataIndex: 'description', minWidth: 130, ellipsis: true, tooltip: true },
|
{ title: '描述', dataIndex: 'description', minWidth: 130, ellipsis: true, tooltip: true },
|
||||||
{ title: '创建时间', dataIndex: 'createDt', width: 180 },
|
{ title: '创建时间', dataIndex: 'createDt', width: 180 },
|
||||||
{ title: '修改时间', dataIndex: 'updateDt', width: 180, show: false },
|
{ title: '修改时间', dataIndex: 'updateDt', width: 180, show: false },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
slotName: 'action',
|
slotName: 'action',
|
||||||
width: 130,
|
width: 200,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
fixed: !isMobile() ? 'right' : undefined,
|
fixed: !isMobile() ? 'right' : undefined,
|
||||||
show: has.hasPermOr(['schedule:job:trigger', 'schedule:job:update', 'schedule:job:delete']),
|
show: has.hasPermOr([
|
||||||
|
'schedule:log:list',
|
||||||
|
'schedule:job:trigger',
|
||||||
|
'schedule:job:update',
|
||||||
|
'schedule:job:delete',
|
||||||
|
]),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -151,7 +156,7 @@ const reset = () => {
|
|||||||
// 删除
|
// 删除
|
||||||
const onDelete = (record: JobResp) => {
|
const onDelete = (record: JobResp) => {
|
||||||
return handleDelete(() => deleteJob(record.id), {
|
return handleDelete(() => deleteJob(record.id), {
|
||||||
content: `是否确定删除任务 [${record.jobName}]?`,
|
content: `是否确定删除任务「${record.jobName}」?`,
|
||||||
showModal: true,
|
showModal: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -188,13 +193,15 @@ const onUpdate = (record: JobResp) => {
|
|||||||
const JobDetailDrawerRef = ref<InstanceType<typeof JobDetailDrawer>>()
|
const JobDetailDrawerRef = ref<InstanceType<typeof JobDetailDrawer>>()
|
||||||
// 详情
|
// 详情
|
||||||
const onDetail = (record: JobResp) => {
|
const onDetail = (record: JobResp) => {
|
||||||
JobDetailDrawerRef.value?.onDetail(record)
|
JobDetailDrawerRef.value?.onOpen(record)
|
||||||
}
|
}
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
// 日志
|
// 日志
|
||||||
const onLog = (record: JobResp) => {
|
const onLog = (record: JobResp) => {
|
||||||
router.push({ path: '/schedule/log', query: { jobId: record.id, jobName: record.jobName, groupName: record.groupName } })
|
router.push({ path: '/schedule/log', query: { jobId: record.id, jobName: record.jobName, groupName: record.groupName } })
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getGroupList()
|
getGroupList()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,20 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal
|
<a-drawer
|
||||||
v-model:visible="visible" title="任务日志详情" :body-style="{ maxHeight: '80vh', overflow: 'auto' }"
|
v-model:visible="visible"
|
||||||
:width="width >= 1500 ? 1500 : '100%'" :footer="false" @close="closed"
|
title="任务日志详情"
|
||||||
|
:width="width >= 1300 ? 1300 : '100%'"
|
||||||
|
:footer="false"
|
||||||
|
@close="closed"
|
||||||
>
|
>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<div style="padding: 10px 10px;">
|
<div style="padding: 10px 10px;">
|
||||||
<div class="job_list">
|
<div class="job_list">
|
||||||
<div
|
<div
|
||||||
v-for="item in dataList" :key="item.id" :class="`job_list_item ${item.id === activeId ? 'active' : ''}`"
|
v-for="item in dataList"
|
||||||
|
:key="item.id"
|
||||||
|
:class="`job_list_item ${item.id === activeId ? 'active' : ''}`"
|
||||||
@click="onStartInfo(item)"
|
@click="onStartInfo(item)"
|
||||||
>
|
>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<span class="title">{{ item.clientInfo.split('@')[1] }}</span>
|
<span class="title">{{ item.clientInfo.split('@')[1] }}</span>
|
||||||
<span class="status">
|
<span class="status">
|
||||||
<a-tag bordered :color="statusList[item.taskStatus].color">{{ statusList[item.taskStatus].title
|
<a-tag bordered :color="statusList[item.taskStatus].color">{{ statusList[item.taskStatus].title }}</a-tag>
|
||||||
}}</a-tag>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -24,17 +28,19 @@
|
|||||||
<GiCodeView :code-json="content" />
|
<GiCodeView :code-json="content" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useWindowSize } from '@vueuse/core'
|
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
|
import { useWindowSize } from '@vueuse/core'
|
||||||
import { type JobInstanceQuery, type JobInstanceResp, type JobLogResp, listJobInstance, listJobInstanceLog } from '@/apis/schedule'
|
import { type JobInstanceQuery, type JobInstanceResp, type JobLogResp, listJobInstance, listJobInstanceLog } from '@/apis/schedule'
|
||||||
|
|
||||||
const { width } = useWindowSize()
|
const { width } = useWindowSize()
|
||||||
|
|
||||||
const queryForm = reactive<JobInstanceQuery>({})
|
const queryForm = reactive<JobInstanceQuery>({})
|
||||||
const dataList = ref<JobInstanceResp[]>([])
|
const dataList = ref<JobInstanceResp[]>([])
|
||||||
|
const visible = ref(false)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const activeId = ref<string | number>('')
|
const activeId = ref<string | number>('')
|
||||||
const statusList = {
|
const statusList = {
|
||||||
@@ -70,8 +76,6 @@ const statusList = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const visible = ref(false)
|
|
||||||
|
|
||||||
// 格式化日志
|
// 格式化日志
|
||||||
const formatLog = (log: any) => {
|
const formatLog = (log: any) => {
|
||||||
const date = new Date(Number.parseInt(log.time_stamp))
|
const date = new Date(Number.parseInt(log.time_stamp))
|
||||||
@@ -131,22 +135,23 @@ const getInstanceList = async (query: JobInstanceQuery = { ...queryForm }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 详情
|
|
||||||
const onDetail = (record: JobLogResp) => {
|
|
||||||
visible.value = true
|
|
||||||
// 更新 queryForm
|
|
||||||
queryForm.jobId = record.jobId
|
|
||||||
queryForm.taskBatchId = record.id
|
|
||||||
getInstanceList()
|
|
||||||
}
|
|
||||||
|
|
||||||
const closed = () => {
|
const closed = () => {
|
||||||
clearInterval(setIntervalNode.value)
|
clearInterval(setIntervalNode.value)
|
||||||
}
|
}
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
clearInterval(setIntervalNode.value)
|
clearInterval(setIntervalNode.value)
|
||||||
})
|
})
|
||||||
defineExpose({ onDetail })
|
|
||||||
|
// 打开
|
||||||
|
const onOpen = async (record: JobLogResp) => {
|
||||||
|
// 更新 queryForm
|
||||||
|
queryForm.jobId = record.jobId
|
||||||
|
queryForm.taskBatchId = record.id
|
||||||
|
visible.value = true
|
||||||
|
await getInstanceList()
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ onOpen })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
:data="dataList"
|
:data="dataList"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:scroll="{ x: '100%', y: '100%', minWidth: 1500 }"
|
:scroll="{ x: '100%', y: '100%', minWidth: 1300 }"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
:disabled-tools="['size']"
|
:disabled-tools="['size']"
|
||||||
@refresh="search"
|
@refresh="search"
|
||||||
@@ -42,15 +42,16 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-link @click="onDetail(record)">详情</a-link>
|
<a-link v-permission="['schedule:log:detail']" title="详情" @click="onDetail(record)">详情</a-link>
|
||||||
<a-popconfirm content="是否确定停止本次执行?" type="warning" @ok="onStop(record)">
|
<a-popconfirm content="是否确定停止本次执行?" type="warning" @ok="onStop(record)">
|
||||||
<a-link v-if="record.taskBatchStatus === 2" v-permission="['schedule:log:stop']" status="danger">停止</a-link>
|
<a-link v-if="record.taskBatchStatus === 2" v-permission="['schedule:log:stop']" status="danger" title="停止">停止</a-link>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<a-popconfirm content="是否确定重试本次执行?" type="warning" @ok="onRetry(record)">
|
<a-popconfirm content="是否确定重试本次执行?" type="warning" @ok="onRetry(record)">
|
||||||
<a-link
|
<a-link
|
||||||
v-if="record.taskBatchStatus === 4 || record.taskBatchStatus === 5 || record.taskBatchStatus === 6"
|
v-if="record.taskBatchStatus === 4 || record.taskBatchStatus === 5 || record.taskBatchStatus === 6"
|
||||||
v-permission="['schedule:log:retry']"
|
v-permission="['schedule:log:retry']"
|
||||||
status="danger"
|
status="danger"
|
||||||
|
title="重试"
|
||||||
>
|
>
|
||||||
重试
|
重试
|
||||||
</a-link>
|
</a-link>
|
||||||
@@ -59,7 +60,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</GiTable>
|
</GiTable>
|
||||||
|
|
||||||
<JobLogDetailModal ref="JobLogDetailModalRef" />
|
<LogDetailDrawer ref="LogDetailDrawerRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@
|
|||||||
import { Message } from '@arco-design/web-vue'
|
import { Message } from '@arco-design/web-vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import JobLogDetailModal from './LogDetailModal.vue'
|
import LogDetailDrawer from './LogDetailDrawer.vue'
|
||||||
import { type JobLogQuery, type JobLogResp, listGroup, listJobLog, retryJob, stopJob } from '@/apis/schedule'
|
import { type JobLogQuery, type JobLogResp, listGroup, listJobLog, retryJob, stopJob } from '@/apis/schedule'
|
||||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||||
import { useTable } from '@/hooks'
|
import { useTable } from '@/hooks'
|
||||||
@@ -85,13 +86,13 @@ const queryForm = reactive<JobLogQuery>({
|
|||||||
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
const {
|
const {
|
||||||
tableData: dataList,
|
tableData: dataList,
|
||||||
pagination,
|
pagination,
|
||||||
loading,
|
loading,
|
||||||
search,
|
search,
|
||||||
} = useTable((page) => listJobLog({ ...queryForm, ...page }), { immediate: false })
|
} = useTable((page) => listJobLog({ ...queryForm, ...page }), { immediate: false })
|
||||||
|
|
||||||
const columns: TableInstanceColumns[] = [
|
const columns: TableInstanceColumns[] = [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
@@ -108,10 +109,10 @@ const columns: TableInstanceColumns[] = [
|
|||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
slotName: 'action',
|
slotName: 'action',
|
||||||
width: 60,
|
width: 130,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
fixed: !isMobile() ? 'right' : undefined,
|
fixed: !isMobile() ? 'right' : undefined,
|
||||||
show: has.hasPermOr(['schedule:log:stop', 'schedule:log:retry']),
|
show: has.hasPermOr(['schedule:log:detail', 'schedule:log:stop', 'schedule:log:retry']),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -149,10 +150,10 @@ const onRetry = (record: JobLogResp) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const JobLogDetailModalRef = ref<InstanceType<typeof JobLogDetailModal>>()
|
const LogDetailDrawerRef = ref<InstanceType<typeof LogDetailDrawer>>()
|
||||||
// 查看日志详情
|
// 详情
|
||||||
const onDetail = (record: JobLogResp) => {
|
const onDetail = (record: JobLogResp) => {
|
||||||
JobLogDetailModalRef.value?.onDetail(record)
|
LogDetailDrawerRef.value?.onOpen(record)
|
||||||
}
|
}
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const open = (type: string) => {
|
|||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.captcha-btn {
|
.captcha-btn {
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
min-width: 98px;
|
min-width: 98px;
|
||||||
|
|||||||
@@ -141,4 +141,4 @@ const onReadAll = async () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -82,4 +82,4 @@ const onUpdate = (type: string) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -102,4 +102,4 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import PasswordPolicy from './Security.vue'
|
|||||||
defineOptions({ name: 'SettingProfile' })
|
defineOptions({ name: 'SettingProfile' })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.gi_page {
|
.gi_page {
|
||||||
background-color: var(--color-bg-1);
|
background-color: var(--color-bg-1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.logo {
|
.logo {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-form-item.arco-form-item-has-help) {
|
:deep(.arco-form-item.arco-form-item-has-help) {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.input-width {
|
.input-width {
|
||||||
width: 196px;
|
width: 196px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,4 +168,4 @@ const onUpdate = async (id: string) => {
|
|||||||
defineExpose({ onAdd, onUpdate })
|
defineExpose({ onAdd, onUpdate })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -169,4 +169,4 @@ const onUpdate = (record: DeptResp) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -130,4 +130,4 @@ const onUpdate = async (id: string) => {
|
|||||||
defineExpose({ onAdd, onUpdate })
|
defineExpose({ onAdd, onUpdate })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -129,7 +129,10 @@ const reset = () => {
|
|||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const onDelete = (record: DictItemResp) => {
|
const onDelete = (record: DictItemResp) => {
|
||||||
return handleDelete(() => deleteDictItem(record.id), { content: `是否确定删除 [${record.label}]?`, showModal: true })
|
return handleDelete(() => deleteDictItem(record.id), {
|
||||||
|
content: `是否确定删除字典「${record.label}」?`,
|
||||||
|
showModal: true,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据选中字典查询
|
// 根据选中字典查询
|
||||||
@@ -150,7 +153,7 @@ const onUpdate = (record: DictItemResp) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.page_header {
|
.page_header {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,4 +97,4 @@ const onUpdate = async (id: string) => {
|
|||||||
defineExpose({ onAdd, onUpdate })
|
defineExpose({ onAdd, onUpdate })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const onClick = (mode: string) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-menu-inner) {
|
:deep(.arco-menu-inner) {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-tree-node) {
|
:deep(.arco-tree-node) {
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
border-radius: var(--border-radius-medium);
|
border-radius: var(--border-radius-medium);
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ const close = () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.audio-box {
|
.audio-box {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ const form = reactive({
|
|||||||
defineExpose({ formRef })
|
defineExpose({ formRef })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -23,4 +23,4 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import FileMain from './main/FileMain/index.vue'
|
|||||||
defineOptions({ name: 'SystemFile' })
|
defineOptions({ name: 'SystemFile' })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.file-manage {
|
.file-manage {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: $margin;
|
padding: $margin;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const onClickItem = (item: FileTypeListItem) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
:deep(.arco-card) {
|
:deep(.arco-card) {
|
||||||
.arco-card-header {
|
.arco-card-header {
|
||||||
border-bottom-style: dashed;
|
border-bottom-style: dashed;
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.statistic-space {
|
.statistic-space {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ const handleRightMenuClick = (mode: string, item: FileItem) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.file-grid {
|
.file-grid {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const getFileImg = computed<string>(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped lang="scss">
|
||||||
.file-image {
|
.file-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user