From e4507cef64b185d53027411d991786bce798552a Mon Sep 17 00:00:00 2001
From: wangxiang <1827945911@qq.com>
Date: Mon, 9 May 2022 00:38:21 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A3=20=E7=BC=96=E5=86=99=E5=9F=BA?=
=?UTF-8?q?=E7=A1=80=E6=A8=A1=E5=9D=97=E5=AD=97=E5=85=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
kicc-ui/src/views/system/dict/DictModal.vue | 12 ++++++++++--
kicc-ui/src/views/system/dict/index.vue | 1 +
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/kicc-ui/src/views/system/dict/DictModal.vue b/kicc-ui/src/views/system/dict/DictModal.vue
index 2de7dd05..18f69849 100644
--- a/kicc-ui/src/views/system/dict/DictModal.vue
+++ b/kicc-ui/src/views/system/dict/DictModal.vue
@@ -14,7 +14,7 @@
* Copyright © 2020-2022 entfrm All rights reserved.
* author entfrm开发团队-王翔
*/
- import { ref, unref } from 'vue';
+ import {ref, toRaw, unref} from 'vue';
import { BasicForm, useForm } from '/@/components/Form/index';
import { formSchema } from './dict.data';
import { addDict, editDict, getDict } from '/@/api/platform/system/controller/dict';
@@ -24,7 +24,7 @@
const tag = ref>('');
/** https://v3.cn.vuejs.org/api/options-data.html#emits */
const emit = defineEmits(['success', 'register']);
- const [registerForm, { resetFields, setFieldsValue, validate, clearValidate }] = useForm({
+ const [registerForm, { resetFields, setFieldsValue, validate, clearValidate, updateSchema }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
@@ -38,6 +38,14 @@
tag.value = data._tag;
const dictId = data.record?.id;
const props: Partial = { confirmLoading: false };
+ await updateSchema([
+ {
+ field: 'type',
+ componentProps: {
+ disabled: unref(tag) != 'add'
+ }
+ }
+ ]);
// 采用tag标签区分操作
switch (unref(tag)) {
case 'add':
diff --git a/kicc-ui/src/views/system/dict/index.vue b/kicc-ui/src/views/system/dict/index.vue
index d2dd0d82..593d6028 100644
--- a/kicc-ui/src/views/system/dict/index.vue
+++ b/kicc-ui/src/views/system/dict/index.vue
@@ -153,6 +153,7 @@
/** 处理表格刷新 */
function handleRefreshTable() {
clearSelectedRowKeys();
+ dictSubRef.value.handleRefreshTable();
reload();
}