|
@@ -46,7 +46,7 @@
|
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
>
|
|
|
<!-- 添加多选列 -->
|
|
<!-- 添加多选列 -->
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
|
+ <el-table-column type="selection" width="55" align="center" :selectable="checkSelectable" />
|
|
|
<el-table-column label="企微昵称" align="center" prop="qwUserName" />
|
|
<el-table-column label="企微昵称" align="center" prop="qwUserName" />
|
|
|
<el-table-column label="企微账号" align="center" prop="qwUserId" />
|
|
<el-table-column label="企微账号" align="center" prop="qwUserId" />
|
|
|
<el-table-column label="企微所属部门" align="center" prop="departmentName" />
|
|
<el-table-column label="企微所属部门" align="center" prop="departmentName" />
|
|
@@ -129,6 +129,10 @@ export default {
|
|
|
updateCorpId(){
|
|
updateCorpId(){
|
|
|
this.getList();
|
|
this.getList();
|
|
|
},
|
|
},
|
|
|
|
|
+ // 检查是否可选择(状态不为1的用户才可选择)
|
|
|
|
|
+ checkSelectable(row, index) {
|
|
|
|
|
+ return row.status !== 1;
|
|
|
|
|
+ },
|
|
|
/** 查询客户列表 */
|
|
/** 查询客户列表 */
|
|
|
getList() {
|
|
getList() {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
@@ -148,9 +152,10 @@ export default {
|
|
|
// 设置预选中的项
|
|
// 设置预选中的项
|
|
|
setPreSelectedItems() {
|
|
setPreSelectedItems() {
|
|
|
if (this.preSelectedUserIds.length > 0 && this.customerList.length > 0) {
|
|
if (this.preSelectedUserIds.length > 0 && this.customerList.length > 0) {
|
|
|
- // 找到需要预选中的行
|
|
|
|
|
|
|
+ // 找到需要预选中的行,排除状态为1的用户
|
|
|
const selectedRows = this.customerList.filter(row =>
|
|
const selectedRows = this.customerList.filter(row =>
|
|
|
- this.preSelectedUserIds.includes(row.id)
|
|
|
|
|
|
|
+ this.preSelectedUserIds.includes(row.id) &&
|
|
|
|
|
+ row.status !== 1
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
// 设置选中状态
|
|
// 设置选中状态
|
|
@@ -164,7 +169,9 @@ export default {
|
|
|
|
|
|
|
|
// 多选处理
|
|
// 多选处理
|
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
|
- this.selectedUsers = selection;
|
|
|
|
|
|
|
+ this.selectedUsers = selection.filter(item =>
|
|
|
|
|
+ item.status !== 1
|
|
|
|
|
+ );
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 批量绑定选择
|
|
// 批量绑定选择
|