|
|
@@ -196,6 +196,16 @@
|
|
|
@click="batchSend"
|
|
|
>批量IM发送</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="batchUpdate"
|
|
|
+ >解绑会员</el-button>
|
|
|
+ </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
@@ -375,7 +385,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { myListUser, getUser, addUser, updateUser, delUser, exportUser, auditUser } from "@/api/user/fsUser";
|
|
|
+import {
|
|
|
+ myListUser,
|
|
|
+ getUser,
|
|
|
+ addUser,
|
|
|
+ updateUser,
|
|
|
+ delUser,
|
|
|
+ exportUser,
|
|
|
+ auditUser,
|
|
|
+ delCompanyUser
|
|
|
+} from '@/api/user/fsUser'
|
|
|
import {transferUser} from "@/api/users/user";
|
|
|
import {getUserList} from "@/api/company/companyUser";
|
|
|
import userDetails from '@/views/store/components/userDetails.vue';
|
|
|
@@ -407,6 +426,7 @@ export default {
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
+ fsUserCompanyUserId: [],
|
|
|
companyUserId:null,
|
|
|
companyId:null,
|
|
|
// 非单个禁用
|
|
|
@@ -655,6 +675,7 @@ export default {
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.userId);
|
|
|
+ this.fsUserCompanyUserId = selection.map(item => item.fsUserCompanyUserId);
|
|
|
this.single = selection.length !== 1;
|
|
|
this.multiple = !selection.length;
|
|
|
this.companyId = selection[0].companyId;
|
|
|
@@ -729,7 +750,21 @@ export default {
|
|
|
this.$message.success("删除成功");
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
-
|
|
|
+ batchUpdate() {
|
|
|
+ const ids =this.fsUserCompanyUserId;
|
|
|
+ console.log("选择ID",ids)
|
|
|
+ this.$confirm('是否确认解绑会员?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ return delCompanyUser(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList()
|
|
|
+ this.msgSuccess('解绑会员成功')
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ },
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|