duy há 1 ano atrás
pai
commit
7ef5b48a29
1 ficheiros alterados com 6 adições e 4 exclusões
  1. 6 4
      src/views/system/user.vue

+ 6 - 4
src/views/system/user.vue

@@ -64,6 +64,7 @@
                             multiple
                             :render-after-expand="false"
                             style="width: 240px"
+                            @change="changeRole"
                         />
                     </el-form-item>
                 </div>
@@ -191,11 +192,9 @@ const removeUser = async (ids) => {
     }
 }
 const refreshPassword1 = async (_, resolve) => {
-    if (tableCheckedKeys.value.length !== 1) {
-        return
-    }
+    let ids = arrToId(tableCheckedKeys.value)
     //这里可以写一些操作
-    await resetPasswordClick(tableCheckedKeys.value[0].id)
+    await resetPasswordClick(ids)
     resolve() //这个一定要存在,否则不会关闭弹窗
 }
 const resetPasswordClick = async (id)=>{
@@ -216,6 +215,9 @@ const exportClick = async (_, resolve) => {
 const formRef = ref(null)
 const roleIdArr = ref([])
 const addsaveLoading = ref(false)
+const changeRole = (val)=>{
+    baseForm.value.roleId = roleIdArr.value.join(',')
+}
 const modalSave = async ()=>{
     const isValidate = await formValidate(formRef.value)
     if (!isValidate) return false