|
@@ -44,8 +44,8 @@
|
|
|
<el-table-column label="是否校验授权" align="center" prop="isSwitch">
|
|
|
<template slot-scope="scope">
|
|
|
<el-switch
|
|
|
- v-if="scope.row.authorityType==1"
|
|
|
- @change="switchChange(scope.row.isSwitch,scope.row.id)"
|
|
|
+ v-if="scope.row.authorityType == 1"
|
|
|
+ @change="switchChange(scope.row)"
|
|
|
v-model="scope.row.isSwitch"
|
|
|
active-color="#13ce66"
|
|
|
inactive-color="#ff4949">
|
|
@@ -72,7 +72,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
- v-if="scope.row.authorityType==1"
|
|
|
+ v-if="scope.row.authorityType == 1"
|
|
|
@click="handleClose(scope.row)"
|
|
|
>关闭授权
|
|
|
</el-button>
|
|
@@ -236,11 +236,10 @@ export default {
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
- switchChange(val, id) {
|
|
|
- console.log(val, id);
|
|
|
+ switchChange(row) {
|
|
|
let params = {
|
|
|
- id: id,
|
|
|
- isSwitch: val
|
|
|
+ id: row.id,
|
|
|
+ isSwitch: row.isSwitch
|
|
|
}
|
|
|
updateIsSwitch(params).then(response => {
|
|
|
this.$modal.msgSuccess("操作成功");
|