|
@@ -271,6 +271,7 @@
|
|
|
<el-button size="small" type="primary" @click="handleSelectionZzjgbtn3" v-if="user.userNameNeedTranslate != 1">{{ $t('modifyingDepartments') }}</el-button>
|
|
|
<el-button size="small" type="primary" @click="handJue">{{ $t('modifyingRoles') }}</el-button>
|
|
|
<el-button size="small" type="primary" @click="workingHoursDialogClick()">修正工时所属部门</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="handleSelectionUser()">批量启用员工</el-button>
|
|
|
|
|
|
|
|
|
|
|
@@ -1888,6 +1889,47 @@ export default {
|
|
|
this.handljues = true;
|
|
|
// console.log('触发了')
|
|
|
},
|
|
|
+ handleSelectionUser() {
|
|
|
+ // console.log(this.handleSelectionZzjgDate)
|
|
|
+ //接口调用样例代码如下
|
|
|
+ var ids = [];
|
|
|
+ for (
|
|
|
+ let index = 0;
|
|
|
+ index < this.handleSelectionZzjgDate.length;
|
|
|
+ index++
|
|
|
+ ) {
|
|
|
+ ids.push(this.handleSelectionZzjgDate[index].id);
|
|
|
+ }
|
|
|
+ // console.log(ids);
|
|
|
+
|
|
|
+ this.http.post(
|
|
|
+ "/user/setActiveByIds",
|
|
|
+ {
|
|
|
+ ids: JSON.stringify(ids),
|
|
|
+ isActive:1
|
|
|
+ },
|
|
|
+ (res) => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: this.$t('message.modifyTheSuccess'),
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getUser();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ (error) => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
handTrue() {
|
|
|
var arr = [];
|
|
|
for (var i in this.handleSelectionZzjgDate) {
|