From 34feba9e9749fdb5298c2904d0fc5aa79135c428 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Tue, 15 Sep 2026 17:27:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(user):=20=E6=96=B0=E5=A2=9E=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=97=B6=E9=BB=98=E8=AE=A4=E8=AE=BE=E7=BD=AE=E5=B7=A5?= =?UTF-8?q?=E5=8E=82=E4=B8=BA1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在新增用户初始化时,默认将site字段设置为'1' - 仅当id不存在时应用默认值,确保编辑功能不受影响 - 保持原有数据加载逻辑不变 --- src/views/modules/sys/user-add-or-update.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/modules/sys/user-add-or-update.vue b/src/views/modules/sys/user-add-or-update.vue index d8a1ec7..55d6d49 100644 --- a/src/views/modules/sys/user-add-or-update.vue +++ b/src/views/modules/sys/user-add-or-update.vue @@ -221,6 +221,10 @@ export default { init(id) { this.dataForm.id = id || 0 + // 新增用户时,工厂默认设置为 1 + if (!id) { + this.dataForm.site = '1' + } this.loadSiteOptions() this.getLanguageList(); this.$http({