shaogen1995 4 лет назад
Родитель
Сommit
bcf84a4ee2
2 измененных файлов с 6 добавлено и 5 удалено
  1. 2 2
      src/utils/request.js
  2. 4 3
      src/views/system/system3.vue

+ 2 - 2
src/utils/request.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 // export const baseURL = '666初始地址'
 const service = axios.create({
-  // baseURL: 'http://192.168.0.135:8006',
-  baseURL: '',
+  baseURL: 'http://192.168.0.135:8006',
+  // baseURL: '',
   timeout: 5000
 })
 

+ 4 - 3
src/views/system/system3.vue

@@ -69,9 +69,9 @@
                 :resizable="false"
               >
                 <template slot-scope="scope">
-                  <el-button type="text" @click="change(scope.row.isEnabled,scope.row.id)">修改状态</el-button>
-                  <el-button type="text" @click="editJS(scope.row.id)">编 辑</el-button>
-                  <el-button type="text" @click="delJS(scope.row.id)">删 除</el-button>
+                  <el-button type="text" @click="change(scope.row.isEnabled,scope.row.id)" :disabled='scope.row.roleKey==="sys_admin"||scope.row.roleKey==="sys_user"'>修改状态</el-button>
+                  <el-button type="text" @click="editJS(scope.row.id)" :disabled='scope.row.roleKey==="sys_admin"||scope.row.roleKey==="sys_user"'>编 辑</el-button>
+                  <el-button type="text" @click="delJS(scope.row.id)" :disabled='scope.row.roleKey==="sys_admin"||scope.row.roleKey==="sys_user"'>删 除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -196,6 +196,7 @@ export default {
       this.tableData.forEach((v) => {
         if (v.isEnabled === 1) v.isEnabled = '启用'
         else if (v.isEnabled === 0) v.isEnabled = '停用'
+        if (v.roleKey === 'sys_user' || v.roleKey === 'sys_admin') v.isEnabled = '-'
       })
     }
   },