mirror of
https://github.com/certd/certd.git
synced 2026-04-03 14:10:54 +08:00
chore: group dict刷新
This commit is contained in:
@@ -15,8 +15,9 @@ import GroupSelector from "/@/views/certd/pipeline/group/group-selector.vue";
|
||||
import { useCertViewer } from "/@/views/certd/pipeline/use";
|
||||
import { useI18n } from "/src/locales";
|
||||
import { GetDetail, GetObj } from "./api";
|
||||
import { groupDictRef } from "./group/dicts";
|
||||
|
||||
export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
export default function ({ crudExpose, context: { selectedRowKeys } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const router = useRouter();
|
||||
const lastResRef = ref();
|
||||
|
||||
@@ -495,6 +496,11 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
||||
component: {
|
||||
name: GroupSelector,
|
||||
vModel: "modelValue",
|
||||
on: {
|
||||
refresh: async () => {
|
||||
await groupDictRef.reloadDict();
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
column: {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { dict } from "@fast-crud/fast-crud";
|
||||
|
||||
export const groupDictRef = dict({
|
||||
url: "/pi/pipeline/group/all",
|
||||
value: "id",
|
||||
label: "name",
|
||||
});
|
||||
@@ -35,6 +35,7 @@
|
||||
<script setup lang="ts">
|
||||
import createCrudOptions from "./crud";
|
||||
import { dict, FsDictSelect } from "@fast-crud/fast-crud";
|
||||
import { groupDictRef } from "./dicts";
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue?: number;
|
||||
@@ -43,11 +44,7 @@ const props = defineProps<{
|
||||
defineOptions({
|
||||
name: "GroupSelector",
|
||||
});
|
||||
const groupDictRef = dict({
|
||||
url: "/pi/pipeline/group/all",
|
||||
value: "id",
|
||||
label: "name",
|
||||
});
|
||||
|
||||
const emit = defineEmits(["refresh", "update:modelValue"]);
|
||||
function doRefresh() {
|
||||
emit("refresh");
|
||||
|
||||
@@ -35,19 +35,14 @@ import { useI18n } from "/src/locales";
|
||||
const { t } = useI18n();
|
||||
import ChangeNotification from "/@/views/certd/pipeline/components/change-notification.vue";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
import { groupDictRef } from "./group/dicts";
|
||||
|
||||
defineOptions({
|
||||
name: "PipelineManager",
|
||||
});
|
||||
|
||||
const groupDictRef = dict({
|
||||
url: "/pi/pipeline/group/all",
|
||||
value: "id",
|
||||
label: "name",
|
||||
});
|
||||
const selectedRowKeys = ref([]);
|
||||
const context: any = {
|
||||
groupDictRef,
|
||||
selectedRowKeys,
|
||||
};
|
||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context });
|
||||
|
||||
Reference in New Issue
Block a user