xiatian 3 rokov pred
rodič
commit
bf58f0e175
1 zmenil súbory, kde vykonal 27 pridanie a 0 odobranie
  1. 27 0
      src/modules/basic/view/user.vue

+ 27 - 0
src/modules/basic/view/user.vue

@@ -120,6 +120,13 @@
           @click="disableByIds"
           >禁用
         </el-button>
+        <el-button
+          size="small"
+          type="danger"
+          :disabled="noBatchSelected"
+          @click="resetPassBatch"
+          ><v-icon name="lock" scale="0.7" />重置密码
+        </el-button>
 
         <div class="block-seperator"></div>
         <!-- 添加用户信息弹出框 -->
@@ -950,6 +957,26 @@ export default {
         })
         .catch((e) => console.log(e));
     },
+    resetPassBatch() {
+      this.$confirm("是否重置密码?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          var url = CORE_API + "/user/resetPass";
+          this.$httpWithMsg
+            .post(url, new URLSearchParams({ ids: this.selectedUserIds }))
+            .then(() => {
+              this.$notify({
+                type: "success",
+                message: "重置成功!",
+              });
+              return this.search();
+            });
+        })
+        .catch((e) => console.log(e));
+    },
     //删除单个数据
     deleteById(row) {
       this.$confirm("是否删除该用户?", "提示", {