fix: Administration模块添加禁止勾选操作admin等账号,去除日志模块中勾选操作
This commit is contained in:
@@ -10,13 +10,9 @@
|
|||||||
@header-dragend="dragend"
|
@header-dragend="dragend"
|
||||||
@sort-change="tableDataSort"
|
@sort-change="tableDataSort"
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
|
:cell-style="{paddingLeft: '20px'}"
|
||||||
|
:header-cell-style="{paddingLeft: '20px'}"
|
||||||
>
|
>
|
||||||
<el-table-column
|
|
||||||
:resizable="false"
|
|
||||||
align="center"
|
|
||||||
type="selection"
|
|
||||||
width="55">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="(item, index) in customTableTitles"
|
v-for="(item, index) in customTableTitles"
|
||||||
:key="item.prop+index"
|
:key="item.prop+index"
|
||||||
@@ -39,10 +35,10 @@
|
|||||||
{{scope.row[item.prop]}}ms
|
{{scope.row[item.prop]}}ms
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="item.prop === 'state'">
|
<span v-else-if="item.prop === 'state'">
|
||||||
<template v-if="scope.row[item.prop]==operationLogStateMapping.success">
|
<template v-if="scope.row[item.prop]===operationLogStateMapping.success">
|
||||||
{{$t('operationLog.state.success')}}
|
{{$t('operationLog.state.success')}}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="scope.row[item.prop]==operationLogStateMapping.fail">
|
<template v-else-if="scope.row[item.prop]===operationLogStateMapping.fail">
|
||||||
{{$t('operationLog.state.fail')}}
|
{{$t('operationLog.state.fail')}}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
:resizable="false"
|
:resizable="false"
|
||||||
align="center"
|
align="center"
|
||||||
type="selection"
|
type="selection"
|
||||||
|
:selectable="checkSelectable"
|
||||||
width="55">
|
width="55">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
v-if="scope.row.id"
|
v-if="scope.row.id"
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
active-value="1"
|
active-value="1"
|
||||||
:disabled="(scope.row.username === loginName) || (scope.row.username==='admin' && scope.row.id==1) "
|
:disabled="(scope.row.username === loginName) || (scope.row.username==='admin' && scope.row.id===1) "
|
||||||
inactive-value="0"
|
inactive-value="0"
|
||||||
@change="()=>{statusChange(scope.row)}">
|
@change="()=>{statusChange(scope.row)}">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
@@ -144,6 +145,10 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$emit('reload')
|
this.$emit('reload')
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 禁止勾选buildIn为1的项,即禁止修改、删除admin的账号
|
||||||
|
checkSelectable (row) {
|
||||||
|
return row.buildIn !== 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user