Browse Source

fix:修改密码

sungongwei 11 months ago
parent
commit
ba73a2e6d8
1 changed files with 8 additions and 3 deletions
  1. 8 3
      src/views/business/index.vue

+ 8 - 3
src/views/business/index.vue

@@ -21,7 +21,7 @@
             <template v-if="column.key === 'handle'">
               <span>
                 <a-button type="link" @click="edit(record)">编辑</a-button>
-                <a-button type="link" @click="reset">重置密码</a-button>
+                <a-button type="link" @click="reset(record)">重置密码</a-button>
                 <a-popconfirm
                   title="你确定要删除吗?"
                   ok-text="确定"
@@ -394,16 +394,21 @@ const edit = async (row) => {
 };
 //重置密码
 const resetPop = ref(false);
-const reset = () => {
+const reset = (row) => {
+  addData.value = {};
+
+  addData.value.id = row.id
   resetPop.value = true;
 };
 const resetpwd = async (row) => {
   const { code, msg, count, data } = await AJAXREQUEST({
-    path: AJAXPATH.businessList.path + `/${row.id}`,
+    path: AJAXPATH.businessList.path + `/pwd/${addData.value.id}`,
+    data:{pwd:addData.value.pwd},
     method: "PUT",
   });
   if (code == 0) {
     msg && message.success(msg);
+  resetPop.value = false;
     getData();
   } else {
     msg && message.error(msg);