|
@@ -18,7 +18,7 @@
|
|
|
type="text"
|
|
|
clearable
|
|
|
v-model.trim="searchForm.search"
|
|
|
- @keyup.enter.native="
|
|
|
+ @keyup.enter.native="
|
|
|
(e) => {
|
|
|
e.target.blur();
|
|
|
$refs.searchForm.save();
|
|
@@ -148,9 +148,7 @@
|
|
|
label="操作"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- @click="onJoinQrCode(scope.row)"
|
|
|
- type="text"
|
|
|
+ <el-button @click="onJoinQrCode(scope.row)" type="text"
|
|
|
>入驻二维码</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -161,7 +159,7 @@
|
|
|
>
|
|
|
<el-button
|
|
|
@click="onStaffOperation('RESET_PASSWORD', scope.row)"
|
|
|
- v-if="permission('employee/employeeOperate/RESET_PASSWORD')"
|
|
|
+ v-if="permission('employee/resetPassword/RESET_PASSWORD')"
|
|
|
type="text"
|
|
|
>重置密码</el-button
|
|
|
>
|
|
@@ -576,7 +574,12 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <qr-code v-model="codeStatus" :isDown="true" title="入驻二维码" :codeUrl="qrCodeUrl" />
|
|
|
+ <qr-code
|
|
|
+ v-model="codeStatus"
|
|
|
+ :isDown="true"
|
|
|
+ title="入驻二维码"
|
|
|
+ :codeUrl="qrCodeUrl"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -594,6 +597,7 @@ import {
|
|
|
queryEmployeeOrganByUser,
|
|
|
getDepts,
|
|
|
getPosts,
|
|
|
+ resetPassword,
|
|
|
} from "@/api/systemManage";
|
|
|
// import { userRole } from "./api";
|
|
|
import deepClone from "@/helpers/deep-clone";
|
|
@@ -727,8 +731,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
onJoinQrCode(row) {
|
|
|
- console.log(row)
|
|
|
- this.qrCodeUrl = vaildStudentUrl() + "/project/questionAsk/index.html?recommender=" + row.id;
|
|
|
+ console.log(row);
|
|
|
+ this.qrCodeUrl =
|
|
|
+ vaildStudentUrl() +
|
|
|
+ "/project/questionAsk/index.html?recommender=" +
|
|
|
+ row.id;
|
|
|
this.codeStatus = true;
|
|
|
},
|
|
|
permission,
|
|
@@ -1024,7 +1031,12 @@ export default {
|
|
|
postalCode: data.postalCode,
|
|
|
postDeptIds: postDeptArr,
|
|
|
deptIds: tempDeptIds,
|
|
|
- tenantIds: data.userTenantList&&data.userTenantList.length>0?data.userTenantList.map(item=>{return item.tenantId}) : [],
|
|
|
+ tenantIds:
|
|
|
+ data.userTenantList && data.userTenantList.length > 0
|
|
|
+ ? data.userTenantList.map((item) => {
|
|
|
+ return item.tenantId;
|
|
|
+ })
|
|
|
+ : [],
|
|
|
};
|
|
|
} else {
|
|
|
this.roleResetList = [...this.roleBaseList];
|
|
@@ -1125,18 +1137,28 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- employeeOperate({
|
|
|
- employeeId: data.id,
|
|
|
- operate: type,
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success(tempStatus ? "重置密码成功" : "更改成功");
|
|
|
- this.roleStatus = false;
|
|
|
+ if (type == "RESET_PASSWORD") {
|
|
|
+ try {
|
|
|
+ const res = await resetPassword({ userId: data.id });
|
|
|
+ this.$message.success("重置密码成功");
|
|
|
this.getList();
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e)
|
|
|
}
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ employeeOperate({
|
|
|
+ employeeId: data.id,
|
|
|
+ operate: type,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success(tempStatus ? "重置密码成功" : "更改成功");
|
|
|
+ this.roleStatus = false;
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
})
|
|
|
.catch((err) => {});
|
|
|
},
|