mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-04 09:10:59 +00:00
refactor: 重构存储与工作流模块,调整目录结构与初始化逻辑
1. 迁移存储模块功能到工作流模块,合并冗余代码 2. 调整环境配置加载路径与初始化脚本目录 3. 更新文档与前端组件代码适配重构 4. 新增工作流相关CRUD、模型与迁移文件 5. 移除过期模块与冗余代码,优化日志配置
This commit is contained in:
@@ -222,9 +222,11 @@ function handlePaginationEvent(payload: { page: number; limit: number }) {
|
||||
.fa-card :deep(.el-card__header) {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.fa-card :deep(.el-card__body) {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.fa-card :deep(.el-card__footer) {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
@@ -14,11 +14,7 @@
|
||||
:style="{ backgroundColor: item.color || '#f0f0f0' }"
|
||||
>
|
||||
<template v-if="item.image">
|
||||
<img
|
||||
:src="item.image"
|
||||
:alt="item.label"
|
||||
class="max-h-full max-w-full object-contain"
|
||||
/>
|
||||
<img :src="item.image" :alt="item.label" class="max-h-full max-w-full object-contain" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="fa-carousel__content text-center px-4">
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
<div class="page-content box-border px-20! py-3.5 text-center max-md:px-5!">
|
||||
<ElResult :icon="resultIcon" :title="title" :sub-title="message">
|
||||
<template #icon>
|
||||
<FaSvgIcon
|
||||
class="size-14!"
|
||||
:icon="iconCode"
|
||||
/>
|
||||
<FaSvgIcon class="size-14!" :icon="iconCode" />
|
||||
</template>
|
||||
<template #extra>
|
||||
<slot name="buttons"></slot>
|
||||
|
||||
@@ -83,6 +83,6 @@ watch(
|
||||
}
|
||||
|
||||
requestAnimationFrame(step);
|
||||
},
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
@@ -13,52 +13,52 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { computed } from "vue";
|
||||
|
||||
defineOptions({
|
||||
name: 'FaCascader'
|
||||
})
|
||||
name: "FaCascader",
|
||||
});
|
||||
|
||||
interface FaCascaderProps {
|
||||
modelValue?: any
|
||||
options?: any[]
|
||||
placeholder?: string
|
||||
clearable?: boolean
|
||||
filterable?: boolean
|
||||
showAllLevels?: boolean
|
||||
separator?: string
|
||||
checkStrictly?: boolean
|
||||
multiple?: boolean
|
||||
modelValue?: any;
|
||||
options?: any[];
|
||||
placeholder?: string;
|
||||
clearable?: boolean;
|
||||
filterable?: boolean;
|
||||
showAllLevels?: boolean;
|
||||
separator?: string;
|
||||
checkStrictly?: boolean;
|
||||
multiple?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<FaCascaderProps>(), {
|
||||
modelValue: () => [],
|
||||
options: () => [],
|
||||
placeholder: '请选择',
|
||||
placeholder: "请选择",
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
showAllLevels: true,
|
||||
separator: '/',
|
||||
separator: "/",
|
||||
checkStrictly: false,
|
||||
multiple: false
|
||||
})
|
||||
multiple: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: any): void
|
||||
(e: 'change', value: any): void
|
||||
}>()
|
||||
(e: "update:modelValue", value: any): void;
|
||||
(e: "change", value: any): void;
|
||||
}>();
|
||||
|
||||
const cascaderProps = computed(() => ({
|
||||
checkStrictly: props.checkStrictly,
|
||||
multiple: props.multiple,
|
||||
emitPath: false
|
||||
}))
|
||||
emitPath: false,
|
||||
}));
|
||||
|
||||
const selectedValue = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value: any) => {
|
||||
emit('update:modelValue', value)
|
||||
emit('change', value)
|
||||
}
|
||||
})
|
||||
emit("update:modelValue", value);
|
||||
emit("change", value);
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -17,23 +17,23 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { computed } from "vue";
|
||||
|
||||
defineOptions({
|
||||
name: 'FaRate',
|
||||
})
|
||||
name: "FaRate",
|
||||
});
|
||||
|
||||
interface Props {
|
||||
modelValue?: number
|
||||
max?: number
|
||||
disabled?: boolean
|
||||
allowHalf?: boolean
|
||||
showText?: boolean
|
||||
showScore?: boolean
|
||||
texts?: string[]
|
||||
colors?: string[]
|
||||
lowThreshold?: number
|
||||
highThreshold?: number
|
||||
modelValue?: number;
|
||||
max?: number;
|
||||
disabled?: boolean;
|
||||
allowHalf?: boolean;
|
||||
showText?: boolean;
|
||||
showScore?: boolean;
|
||||
texts?: string[];
|
||||
colors?: string[];
|
||||
lowThreshold?: number;
|
||||
highThreshold?: number;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@@ -47,18 +47,18 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
colors: () => [],
|
||||
lowThreshold: 2,
|
||||
highThreshold: 4,
|
||||
})
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:modelValue': [value: number]
|
||||
change: [value: number]
|
||||
}>()
|
||||
"update:modelValue": [value: number];
|
||||
change: [value: number];
|
||||
}>();
|
||||
|
||||
const rateValue = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val: number) => {
|
||||
emit('update:modelValue', val)
|
||||
emit('change', val)
|
||||
emit("update:modelValue", val);
|
||||
emit("change", val);
|
||||
},
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -16,44 +16,44 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { computed } from "vue";
|
||||
|
||||
defineOptions({
|
||||
name: 'FaTimeSelect'
|
||||
})
|
||||
name: "FaTimeSelect",
|
||||
});
|
||||
|
||||
interface FaTimeSelectProps {
|
||||
modelValue?: string
|
||||
start?: string
|
||||
end?: string
|
||||
step?: string
|
||||
minTime?: string
|
||||
maxTime?: string
|
||||
placeholder?: string
|
||||
clearable?: boolean
|
||||
disabled?: boolean
|
||||
modelValue?: string;
|
||||
start?: string;
|
||||
end?: string;
|
||||
step?: string;
|
||||
minTime?: string;
|
||||
maxTime?: string;
|
||||
placeholder?: string;
|
||||
clearable?: boolean;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<FaTimeSelectProps>(), {
|
||||
modelValue: '',
|
||||
start: '09:00',
|
||||
end: '18:00',
|
||||
step: '00:30',
|
||||
placeholder: '请选择时间',
|
||||
modelValue: "",
|
||||
start: "09:00",
|
||||
end: "18:00",
|
||||
step: "00:30",
|
||||
placeholder: "请选择时间",
|
||||
clearable: true,
|
||||
disabled: false
|
||||
})
|
||||
disabled: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: string): void
|
||||
(e: 'change', value: string): void
|
||||
}>()
|
||||
(e: "update:modelValue", value: string): void;
|
||||
(e: "change", value: string): void;
|
||||
}>();
|
||||
|
||||
const timeValue = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value: string) => {
|
||||
emit('update:modelValue', value)
|
||||
emit('change', value)
|
||||
}
|
||||
})
|
||||
emit("update:modelValue", value);
|
||||
emit("change", value);
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
<template>
|
||||
<div class="fa-transfer">
|
||||
<ElTransfer
|
||||
v-model="selected"
|
||||
:data="transferData"
|
||||
:titles="titles"
|
||||
:filterable="filterable"
|
||||
:filter-placeholder="filterPlaceholder"
|
||||
:props="transferProps"
|
||||
v-bind="$attrs"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: "FaTransfer" });
|
||||
|
||||
interface Props {
|
||||
modelValue?: any[];
|
||||
data?: any[];
|
||||
titles?: [string, string];
|
||||
filterable?: boolean;
|
||||
filterPlaceholder?: string;
|
||||
keyProp?: string;
|
||||
labelProp?: string;
|
||||
disabledProp?: string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
modelValue: () => [],
|
||||
data: () => [],
|
||||
titles: () => ["待选择", "已选择"],
|
||||
filterable: true,
|
||||
keyProp: "value",
|
||||
labelProp: "label",
|
||||
disabledProp: "disabled",
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
"update:modelValue": [value: any[]];
|
||||
change: [value: any[], direction: "left" | "right", movedKeys: any[]];
|
||||
"left-check-change": [keys: any[], checkedKeys: any[]];
|
||||
"right-check-change": [keys: any[], checkedKeys: any[]];
|
||||
}>();
|
||||
|
||||
const transferProps = computed(() => ({
|
||||
key: props.keyProp,
|
||||
label: props.labelProp,
|
||||
disabled: props.disabledProp,
|
||||
}));
|
||||
|
||||
const selected = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val: any[]) => {
|
||||
emit("update:modelValue", val);
|
||||
},
|
||||
});
|
||||
|
||||
const transferData = computed(() => {
|
||||
return props.data.map((item: any) => ({
|
||||
key: item[props.keyProp],
|
||||
label: item[props.labelProp],
|
||||
disabled: item[props.disabledProp],
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
@@ -13,7 +13,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<slot />
|
||||
<div v-if="noMore && showNoMore" class="fa-infinite-scroll__empty text-center py-4 text-sm text-gray-400">
|
||||
<div
|
||||
v-if="noMore && showNoMore"
|
||||
class="fa-infinite-scroll__empty text-center py-4 text-sm text-gray-400"
|
||||
>
|
||||
{{ noMoreText }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { computed } from "vue";
|
||||
|
||||
defineOptions({ name: "FaTransfer" });
|
||||
|
||||
|
||||
@@ -610,8 +610,9 @@ const cleanBodyColumnProps = (col: ColumnOption) => {
|
||||
if (isPersonFilterColumn(col)) {
|
||||
columnProps.filters = getColumnFilterOptions(col);
|
||||
columnProps.filterMethod = (value: any, row: any) =>
|
||||
toFilterText(getPathValue(row as Record<string, any>, getPersonNamePath(col.prop as string))) ===
|
||||
String(value);
|
||||
toFilterText(
|
||||
getPathValue(row as Record<string, any>, getPersonNamePath(col.prop as string))
|
||||
) === String(value);
|
||||
}
|
||||
return columnProps;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user