Bläddra i källkod

添加用户跳转

lj 4 år sedan
förälder
incheckning
80b4f4b905
3 ändrade filer med 15 tillägg och 10 borttagningar
  1. BIN
      dist_mq.zip
  2. 10 5
      src/components/UserManger.vue
  3. 5 5
      src/main.js

BIN
dist_mq.zip


+ 10 - 5
src/components/UserManger.vue

@@ -15,10 +15,9 @@
       <el-button
         v-if="have_type == 0 || staff == 1 || have_type == 2"
         type="success"
+        @click="addUserFun"
         size="mini"
-        ><a style="color: #fff" href="systemmanage_user_add"
-          >添加新用户</a
-        ></el-button
+        >添加新用户</el-button
       >
     </div>
     <el-row :gutter="10">
@@ -83,7 +82,10 @@
               >用户编辑</el-button
             >
             <template
-              v-if="(have_type == 0 || staff == 1 || have_type == 2) && (currusername != item.username)"
+              v-if="
+                (have_type == 0 || staff == 1 || have_type == 2) &&
+                currusername != item.username
+              "
             >
               <el-button
                 size="small"
@@ -322,7 +324,7 @@ export default {
       },
       have_type: "",
       staff: "",
-      currusername:''
+      currusername: "",
     };
   },
   computed: {
@@ -544,6 +546,9 @@ export default {
       this.page = 1;
       this.getList();
     },
+    addUserFun() {
+      window.location.href = "systemmanage_user_add";
+    },
   },
 };
 </script>

+ 5 - 5
src/main.js

@@ -17,11 +17,11 @@ Vue.prototype.qs = qs //全局注册,使用方法为:this.qs
 //导入全局样式
 import './assets/css/global.css'
 
-axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
-axios.defaults.timeout = 30000;
-axios.defaults.baseURL = 'http://39.106.113.84:8000/' //线下杨明明
-axios.defaults.withCredentials = true //axios请求时携带session
-axios.defaults.crossDomain = true 
+// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
+// axios.defaults.timeout = 30000;
+// axios.defaults.baseURL = 'http://39.106.113.84:8000/' //线下杨明明
+// axios.defaults.withCredentials = true //axios请求时携带session
+// axios.defaults.crossDomain = true 
 
 
 Vue.config.productionTip = false