|
@@ -61,13 +61,13 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="search-right" v-if="tabsIndex===0">
|
|
<div class="search-right" v-if="tabsIndex===0">
|
|
- <el-button class="gray-btn" size="small">开启选中用户</el-button>
|
|
|
|
- <el-button class="pink-btn" size="small">停用选中用户</el-button>
|
|
|
|
|
|
+ <el-button class="gray-btn" size="small" @click="handleUp('','up',multipleSelection)">开启选中用户</el-button>
|
|
|
|
+ <el-button class="pink-btn" size="small" @click="handleUp('','down',multipleSelection)">停用选中用户</el-button>
|
|
<el-button class="red-btn" size="small">删除选中用户</el-button>
|
|
<el-button class="red-btn" size="small">删除选中用户</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="search-right" v-if="tabsIndex===1">
|
|
<div class="search-right" v-if="tabsIndex===1">
|
|
- <el-button class="gray-btn" size="small">同意选中用户</el-button>
|
|
|
|
- <el-button class="pink-btn" size="small">拒绝选中用户</el-button>
|
|
|
|
|
|
+ <el-button class="gray-btn" size="small" @click="handleAudit('','up',multipleSelection)">同意选中用户</el-button>
|
|
|
|
+ <el-button class="pink-btn" size="small" @click="handleAudit('','down',multipleSelection)">拒绝选中用户</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<template v-if="tabsIndex===0">
|
|
<template v-if="tabsIndex===0">
|
|
@@ -153,7 +153,7 @@
|
|
编辑
|
|
编辑
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
- @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
|
|
|
+ @click.native.prevent="handleUp(scope.row, 'up')"
|
|
type="text"
|
|
type="text"
|
|
size="small"
|
|
size="small"
|
|
class="primary-btn"
|
|
class="primary-btn"
|
|
@@ -161,7 +161,7 @@
|
|
开启
|
|
开启
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
- @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
|
|
|
+ @click.native.prevent="handleUp(scope.row, 'down')"
|
|
type="text"
|
|
type="text"
|
|
size="small"
|
|
size="small"
|
|
class="red-btn"
|
|
class="red-btn"
|
|
@@ -255,7 +255,7 @@
|
|
label="状态"
|
|
label="状态"
|
|
width="116" >
|
|
width="116" >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <div class="status-box">
|
|
|
|
|
|
+ <div class="status-box" v-if="auditStatusList[scope.row.audit_status]">
|
|
<span :style="{background:auditStatusList[scope.row.audit_status].bg}"></span>
|
|
<span :style="{background:auditStatusList[scope.row.audit_status].bg}"></span>
|
|
<b :style="{color:auditStatusList[scope.row.audit_status].color}">{{auditStatusList[scope.row.audit_status].text}}</b>
|
|
<b :style="{color:auditStatusList[scope.row.audit_status].color}">{{auditStatusList[scope.row.audit_status].text}}</b>
|
|
</div>
|
|
</div>
|
|
@@ -274,14 +274,14 @@
|
|
查看
|
|
查看
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
- @click.native.prevent="handleAudit(scope.row)"
|
|
|
|
|
|
+ @click.native.prevent="handleAudit(scope.row,'up')"
|
|
type="text"
|
|
type="text"
|
|
size="small"
|
|
size="small"
|
|
class="primary-btn">
|
|
class="primary-btn">
|
|
同意
|
|
同意
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
- @click.native.prevent="handleAudit(scope.row)"
|
|
|
|
|
|
+ @click.native.prevent="handleAudit(scope.row,'down')"
|
|
type="text"
|
|
type="text"
|
|
size="small"
|
|
size="small"
|
|
class="red-btn"
|
|
class="red-btn"
|
|
@@ -626,15 +626,18 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
// 停用 启用
|
|
// 停用 启用
|
|
- handleUp(row) {
|
|
|
|
|
|
+ handleUp(row,type,arr) {
|
|
|
|
+ if(!row&&arr.length===0){
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
let Mname = "/OrgServer/Manager/PersonManager/EnablePerson";
|
|
let Mname = "/OrgServer/Manager/PersonManager/EnablePerson";
|
|
let data = {
|
|
let data = {
|
|
- id_list: [row.id]
|
|
|
|
|
|
+ id_list: arr?arr:[row.id]
|
|
};
|
|
};
|
|
- if (row.status === 0) {
|
|
|
|
|
|
+ if (type==='up') {
|
|
// 下架状态
|
|
// 下架状态
|
|
data.is_enable = "true";
|
|
data.is_enable = "true";
|
|
- } else if (row.status === 1) {
|
|
|
|
|
|
+ } else if (type==='down') {
|
|
data.is_enable = "false";
|
|
data.is_enable = "false";
|
|
}
|
|
}
|
|
getLogin(Mname, data).then(res => {
|
|
getLogin(Mname, data).then(res => {
|
|
@@ -643,15 +646,18 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 通过 拒绝
|
|
// 通过 拒绝
|
|
- handleAudit(row) {
|
|
|
|
|
|
+ handleAudit(row,type,arr) {
|
|
|
|
+ if(!row&&arr.length===0){
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
let Mname = "/OrgServer/Manager/PersonManager/AuditPerson";
|
|
let Mname = "/OrgServer/Manager/PersonManager/AuditPerson";
|
|
let data = {
|
|
let data = {
|
|
- id_list: [row.id]
|
|
|
|
|
|
+ id_list: arr?arr:[row.id]
|
|
};
|
|
};
|
|
- if (row.audit_status === 2) {
|
|
|
|
|
|
+ if (type==='up') {
|
|
// 下架状态
|
|
// 下架状态
|
|
data.is_pass = "true";
|
|
data.is_pass = "true";
|
|
- } else if (row.audit_status === 0) {
|
|
|
|
|
|
+ } else if (type==='down') {
|
|
data.is_pass = "false";
|
|
data.is_pass = "false";
|
|
}
|
|
}
|
|
getLogin(Mname, data).then(res => {
|
|
getLogin(Mname, data).then(res => {
|
|
@@ -698,8 +704,10 @@ export default {
|
|
},
|
|
},
|
|
// 复选框
|
|
// 复选框
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
- console.log(val)
|
|
|
|
- this.multipleSelection = val;
|
|
|
|
|
|
+ this.multipleSelection = []
|
|
|
|
+ val.forEach(item => {
|
|
|
|
+ this.multipleSelection.push(item.id)
|
|
|
|
+ });
|
|
},
|
|
},
|
|
handleChangeTabs(value){
|
|
handleChangeTabs(value){
|
|
this.tabsIndex = value
|
|
this.tabsIndex = value
|