From a0c1d9021b1a65cc397a2c7a8a9d226c2d9f7539 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期四, 07 八月 2025 17:17:57 +0800
Subject: [PATCH] feat: 企业
---
src/views/DictionaryManage/components/AddOrEditDictionaryDialog.vue | 33 +++++++++++++--------------------
1 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/src/views/DictionaryManage/components/AddOrEditDictionaryDialog.vue b/src/views/DictionaryManage/components/AddOrEditDictionaryDialog.vue
index ba5d3ca..2ea2250 100644
--- a/src/views/DictionaryManage/components/AddOrEditDictionaryDialog.vue
+++ b/src/views/DictionaryManage/components/AddOrEditDictionaryDialog.vue
@@ -1,6 +1,6 @@
<template>
<ProDialog
- :title="`${title}绫诲埆`"
+ :title="form.title"
v-model="visible"
@close="onDialogClose"
destroy-on-close
@@ -17,6 +17,7 @@
v-model="form.field1"
:value-enum="dictionaryDataList"
enum-value-key="code"
+ :convertEnumValue="false"
/>
</ProFormItemV2>
<ProFormItemV2 label="鍚嶇О:" prop="content" :check-rules="[{ message: '璇疯緭鍏ュ悕绉�' }]">
@@ -32,15 +33,20 @@
:controls="false"
:min="0"
:max="999999"
+ :value-on-clear="0"
></ProFormInputNumber>
</ProFormItemV2>
- <ProFormItemV2 label="缂栧彿:" prop="code">
- <ProFormText v-model.trim="form.code"></ProFormText>
+ <ProFormItemV2 label="缂栧彿:" prop="code" :check-rules="[{ message: '璇疯緭鍏ョ紪鍙�' }]">
+ <ProFormText v-model.trim="form.code" :disabled="!!form.id"></ProFormText>
</ProFormItemV2>
- <ProFormItemV2 label="鍥剧墖:" prop="src" v-if="category?.data?.code === CategoryCode.Welfare">
+ <ProFormItemV2
+ label="鍥剧墖:"
+ prop="field2"
+ v-if="category?.data?.code === CategoryCode.Welfare"
+ >
<ProFormImageUpload v-model:file-url="form.field2" :limitFileCount="1"></ProFormImageUpload>
</ProFormItemV2>
- <ProFormItemV2 label="鐘舵��:" prop="status">
+ <ProFormItemV2 label="鐘舵��:" prop="isDisabled" required>
<ProFormRadio
v-model="form.isDisabled"
:value-enum="[
@@ -80,6 +86,7 @@
});
type Form = {
+ title?: string;
id?: string;
categoryId: string;
content: string;
@@ -93,29 +100,15 @@
const form = defineModel<Form>('form');
const visible = defineModel<boolean>('modelValue');
-const title = computed(() => (form.value.id ? '缂栬緫' : '鏂板'));
-
const { getDictionaryCategoryById } = useGetDictionaryCategorySelect();
-const { dictionaryDataList, refetch, getDictionaryDataNameById } = useDictionaryDataSelect({
+const { dictionaryDataList } = useDictionaryDataSelect({
categoryCode: computed(() => CategoryCode.IndustryCategory),
});
const category = computed(() => {
return getDictionaryCategoryById(form.value.categoryId);
});
-
-watch(
- () => visible.value,
- (value) => {
- if (value) {
- refetch();
- }
- },
- {
- immediate: true,
- }
-);
const emit = defineEmits<{
(e: 'onConfirm'): void;
--
Gitblit v1.9.1