From 8805eebe39d6470059616decd9fb10ab1f153088 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期四, 13 十月 2022 17:41:26 +0800
Subject: [PATCH] 去掉42.193.1.25地址指定
---
src/views/systemSetting/baseSetting/role/index.vue | 42 ++++++++++++++++++++++++------------------
1 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/src/views/systemSetting/baseSetting/role/index.vue b/src/views/systemSetting/baseSetting/role/index.vue
index ea851d2..247400f 100644
--- a/src/views/systemSetting/baseSetting/role/index.vue
+++ b/src/views/systemSetting/baseSetting/role/index.vue
@@ -12,7 +12,7 @@
<div class="addUser">
<el-button class="addBtn" type="primary" @click="dialogCreate = true">鏂板缓瑙掕壊</el-button>
<el-dialog :visible.sync="dialogCreate" title="鏂板瑙掕壊" width="45%" v-if="dialogCreate"
- :before-close="handleClose">
+ :before-close="handleClose2">
<createUser :refresh="context==='' ? getUserList : search" />
</el-dialog>
</div>
@@ -40,8 +40,9 @@
</el-table-column>
<el-table-column prop="status" label="鍚敤" min-width="5">
<template slot-scope="scope">
- <el-switch class="switchStyle" v-model="scope.row.status" active-text="寮�" inactive-text="鍏�"
- active-color="#3fef9a" inactive-color="#000212" @change="handleChangeStatus(scope.row)">
+ <!-- active-text="寮�" inactive-text="鍏�" -->
+ <el-switch class="switchStyle" v-model="scope.row.status"
+ active-color="#3fef9a" inactive-color="#000212" disabled>
</el-switch>
</template>
</el-table-column>
@@ -55,7 +56,7 @@
<!-- <span>鍒犻櫎</span> -->
<span @click="handleUpdate(scope.row)">鏉冮檺璁剧疆</span>
<span class="line">|</span>
- <span @click="handleStop(scope.row)">鍋滅敤</span>
+ <span @click="handleChangeStatus(scope.row)">{{scope.row.status === true ?'鍋滅敤':'鍚敤' }}</span>
<span class="line">|</span>
<span @click="handleDelete([scope.row.id])">鍒犻櫎</span>
</div>
@@ -76,7 +77,7 @@
<!-- tools -->
<div class="tools">
<div class="funs">
- <div class="funsItem">
+ <!-- <div class="funsItem">
<el-checkbox v-model="all" @change="selectAll()">鍏ㄩ��</el-checkbox>
</div>
<div class="funsItem">
@@ -88,7 +89,7 @@
:value="item.value" :disabled="item.disabled">
</el-option>
</el-select>
- </div>
+ </div> -->
</div>
<div class="pagination">
<el-pagination background :current-page="currentPage" layout="prev, pager, next"
@@ -252,19 +253,12 @@
// 淇敼鐢ㄦ埛鐘舵��
handleChangeStatus(obj) {
let { id, status } = obj;
- status == true ? status = 1 : status = 0;
- console.log(id, status);
+ status == true ? status = 0 : status = 1;
this.$axios.post(`/sccg/role/updateStatus/` + id + '?status=' + status).then(res => {
- console.log(res);
+ if(res.code ===200){
+ this.search();
+ }
})
- },
- handleStop(obj) {
- // let { id, status } = obj;
- // status == true ? status = 1 : status = 0;
- // console.log(id, status);
- // this.$axios.post(`/sccg/role/updateStatus/` + id + '?status=' + status).then(res => {
- // this.getUserList();
- // })
},
// 鑾峰彇鐢ㄦ埛鍒楄〃
getUserList() {
@@ -349,10 +343,22 @@
this.dialogView = flag;
},
handleClose(done) {
- this.$confirm('纭鍏抽棴锛�')
+ if(this.updateFlag){
+ this.$confirm('纭鍏抽棴锛�')
.then(_ => {
this.dialogUpdate = false;
this.dialogCreate = false;
+ this.updateFlag = false;
+ done();
+ })
+ .catch(_ => { });
+ }else{
+ done();
+ }
+ },
+ handleClose2(done){
+ this.$confirm('纭鍏抽棴锛�')
+ .then(_ => {
done();
})
.catch(_ => { });
--
Gitblit v1.8.0