|
|
@@ -31,7 +31,7 @@
|
|
|
<el-table-column prop="number" label="账号" align="center"></el-table-column>
|
|
|
<el-table-column prop="password" label="密码" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="80">
|
|
|
- <el-button type="text" class="del-btn" slot-scope="scope"
|
|
|
+ <el-button type="text" class="del-btn" slot-scope="scope" v-if="scope.row.number != login_account"
|
|
|
@click="handleDelete(scope.$index, scope.row)">删除
|
|
|
</el-button>
|
|
|
</el-table-column>
|
|
|
@@ -123,8 +123,9 @@
|
|
|
data() {
|
|
|
return {
|
|
|
account: '', // 需要查找的账号
|
|
|
- del_account: '',
|
|
|
- del_id: 0,
|
|
|
+ del_account: '', // 要删除的账号
|
|
|
+ del_id: 0, // 要删除的id
|
|
|
+ login_account: '',
|
|
|
adddialogFormVisible: false,
|
|
|
editdialogFormVisible: false, // 控制编辑对话框显示、隐藏
|
|
|
delDialogVisible: false, // 控制删除对话框显示、隐藏
|
|
|
@@ -150,6 +151,7 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ this.login_account = sessionStorage.getItem('uname')
|
|
|
// 获取账号列表
|
|
|
this.updateTable()
|
|
|
},
|
|
|
@@ -344,6 +346,11 @@
|
|
|
* 删除指定的id所在的行
|
|
|
*/
|
|
|
handleDelRow() {
|
|
|
+ if (this.login_account == this.del_account) {
|
|
|
+ this.delDialogVisible = false
|
|
|
+ this.$message.error('不能删除当前登录账号!')
|
|
|
+ return
|
|
|
+ }
|
|
|
var _this = this
|
|
|
this.$axios.get('/jxch-smartmp-api/HotWaters/waterdelAdmin.action', {
|
|
|
params: {
|