From 140e83402814ffd2e92dfe313f5681feedd39f86 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Tue, 06 Feb 2024 16:49:12 +0800
Subject: [PATCH] 修复弹窗bug
---
src/views/Admin/components/sameLevelMod.vue | 26 +++++++-------------------
1 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/src/views/Admin/components/sameLevelMod.vue b/src/views/Admin/components/sameLevelMod.vue
index 4c715cf..f235579 100644
--- a/src/views/Admin/components/sameLevelMod.vue
+++ b/src/views/Admin/components/sameLevelMod.vue
@@ -52,7 +52,7 @@
</a-form-model-item>
<a-form-model-item label="选择分组" prop="peerRecipientGroupId">
<a-select v-model="form.peerRecipientGroupId" style="width: 100%">
- <a-select-option v-for="item in groupData" :value="item.id" :key="item.id">{{item.name}}</a-select-option>
+ <a-select-option v-for="(item,index) in groupData" :value="item.id" :key="index">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model>
@@ -85,12 +85,7 @@
labelCol: { span: 4 },
wrapperCol: { span: 14 },
areaData: [],
- groupData: [
- {
- id: '',
- name: '未分类'
- }
- ],
+ groupData: [],
replaceFields: {
children:'children',
title:'name',
@@ -116,11 +111,12 @@
},
created() {
const t = this
- t.getGroupList();
},
methods:{
- openDialog(type,data){
+ openDialog(type,data,group){
const t = this
+ t.groupData = group
+ console.log(t.groupData,'data222')
if(type == 'add'){
t.title = '新增用户'
t.form = {
@@ -139,7 +135,7 @@
t.form[i] = data[i]
}
}
- t.form.peerRecipientGroupId = data.peerRecipientGroupId ? data.peerRecipientGroupId: ''
+ t.form.peerRecipientGroupId = data.peerRecipientGroupId ? data.peerRecipientGroupId: null
}
t.visible = true
},
@@ -147,15 +143,7 @@
isValidKey(key, object){
return key in object;
},
- async getGroupList () {
- const t = this
- const res = await getSameLevelGroupList();
- if(res.data.code == 100){
- t.groupData = t.groupData.concat(res.data.data)
- }else{
- this.$message.error(res.data.msg)
- }
- },
+
clearMod(){
this.$refs.ruleForm.clearValidate()
this.$refs.ruleForm.resetFields()
--
Gitblit v1.9.2