|
|
|
@ -110,7 +110,7 @@ |
|
|
|
|
<!-- <el-button type="text" @click="edit(scope.row)">编辑</el-button> --> |
|
|
|
|
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button> |
|
|
|
|
<el-button type="text" @click="resetPassword(scope.row)">重置密码</el-button> |
|
|
|
|
<el-switch v-model="scope.row.disableAccount" :active-value="0" :inactive-value="1" style="margin: 0 10px 0 5px" :active-text="scope.row.disableAccount ? '禁用' : '启用'" @change="switchOff($event,scope.row,scope.$index)"></el-switch> |
|
|
|
|
<el-switch v-model="scope.row.isEnable" :active-value="1" :inactive-value="0" style="margin: 0 10px 0 5px" :active-text="scope.row.isEnable ? '启用' : '禁用'" @change="switchOff($event,scope.row,scope.$index)"></el-switch> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -336,14 +336,12 @@ export default { |
|
|
|
|
}).catch(() => {}) |
|
|
|
|
}, |
|
|
|
|
switchOff(val,row,index) { |
|
|
|
|
let data = { |
|
|
|
|
id: row.id, |
|
|
|
|
isDisable: val |
|
|
|
|
} |
|
|
|
|
this.$post(this.api.updateClient,data).then((res) => { |
|
|
|
|
this.$message.success(val ? '启用成功' : '禁用成功') |
|
|
|
|
}).catch((res) => { |
|
|
|
|
}) |
|
|
|
|
this.$get(this.api.updateAccountAllEnable,{ |
|
|
|
|
id: row.userId, |
|
|
|
|
isEnable: val |
|
|
|
|
}).then(res => { |
|
|
|
|
this.$message.success(val ? '启用成功' : '禁用成功') |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
handleSelectionChange(val) { |
|
|
|
|
this.multipleSelection = val |
|
|
|
|