|
|
@@ -45,8 +45,8 @@
|
|
|
>
|
|
|
<a-option
|
|
|
v-for="item of privilegeList"
|
|
|
- :value="item.value"
|
|
|
- :label="t(item.label)"
|
|
|
+ :value="item.dictCode"
|
|
|
+ :label="t(item.name)"
|
|
|
/>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
@@ -60,9 +60,10 @@
|
|
|
import { reactive, ref, shallowRef, watch, getCurrentInstance } from 'vue';
|
|
|
import { fetchSaveUser, getUserInfo } from '@/api/user';
|
|
|
import type { UserData } from '@/api/user';
|
|
|
-import { privilegeList } from '@/utils/const';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
|
import { getRules } from '@/utils/const';
|
|
|
+import type { AdditionalProp } from '@/api/dict';
|
|
|
+
|
|
|
const formRef = ref();
|
|
|
const { t } = useI18n();
|
|
|
|
|
|
@@ -71,6 +72,7 @@ const this_ = getCurrentInstance()?.appContext.config.globalProperties;
|
|
|
interface EditDialogProps {
|
|
|
modelValue: boolean;
|
|
|
id: number | null;
|
|
|
+ privilegeList: AdditionalProp[];
|
|
|
}
|
|
|
interface EditDialogEmits {
|
|
|
(e: 'update:modelValue', value: boolean): void;
|
|
|
@@ -79,6 +81,7 @@ interface EditDialogEmits {
|
|
|
const props = withDefaults(defineProps<EditDialogProps>(), {
|
|
|
modelValue: false,
|
|
|
id: null,
|
|
|
+ privilegeList: () => [] as AdditionalProp[],
|
|
|
});
|
|
|
const emit = defineEmits<EditDialogEmits>();
|
|
|
const visible = shallowRef<boolean>(false);
|