Преглед изворни кода

fix styles: scoped, unused

Michael Wang пре 6 година
родитељ
комит
110b5445d6

+ 1 - 1
src/App.vue

@@ -8,7 +8,7 @@ export default {
 };
 </script>
 
-<style>
+<style scoped>
 #app {
   font-family: "Avenir", Helvetica, Arial, sans-serif;
   -webkit-font-smoothing: antialiased;

+ 0 - 12
src/modules/basic/view/App.vue

@@ -1,12 +0,0 @@
-<style scoped>
-div {
-  font-family: "Arial", "Helvetica", "sans-serif", "Hiragino Sans GB",
-    "Micrsoft YaHei";
-}
-</style>
-<template>
-  <div id="app"><router-view></router-view></div>
-</template>
-<script>
-export default {};
-</script>

+ 1 - 9
src/modules/basic/view/campus.vue

@@ -721,23 +721,15 @@ export default {
 };
 </script>
 
-<style>
+<style scoped>
 .page {
   margin-top: 10px;
 }
 
-.buttonframe {
-  margin-left: 20px;
-}
-
 .el-table th > .cell {
   text-align: center;
 }
 
-.el-textarea__inner {
-  resize: none;
-}
-
 .el-upload {
   width: 80px;
 }

+ 14 - 21
src/modules/basic/view/exam_site.vue

@@ -1,24 +1,3 @@
-<style>
-.page {
-  margin-top: 10px;
-}
-
-.buttonframe {
-  margin-left: 20px;
-}
-
-.el-table th > .cell {
-  text-align: center;
-}
-
-.el-textarea__inner {
-  resize: none;
-}
-
-.el-upload {
-  width: 80px;
-}
-</style>
 <template>
   <div>
     <section class="content" style="margin-top: -10px;">
@@ -495,3 +474,17 @@ export default {
   }
 };
 </script>
+
+<style scoped>
+.page {
+  margin-top: 10px;
+}
+
+.el-table th > .cell {
+  text-align: center;
+}
+
+.el-upload {
+  width: 80px;
+}
+</style>

+ 8 - 6
src/modules/basic/view/index.vue

@@ -82,12 +82,7 @@
     </div>
   </div>
 </template>
-<style>
-span.logo-lg {
-  font-family: "Micrsoft YaHei";
-  font-size: 30px;
-}
-</style>
+
 <script>
 import { mapState } from "vuex";
 import { core_api } from "../constants/constants.js";
@@ -150,3 +145,10 @@ export default {
   }
 };
 </script>
+
+<style scoped>
+span.logo-lg {
+  font-family: "Micrsoft YaHei";
+  font-size: 30px;
+}
+</style>

+ 0 - 132
src/modules/basic/view/login.vue

@@ -1,132 +0,0 @@
-<template>
-  <div class="container">
-    <div class="row">
-      <div class="col-md-4 col-md-offset-4">
-        <div class="panel panel-default">
-          <div class="panel-heading"><h3 class="login-title">基础信息</h3></div>
-          <div class="panel-body">
-            <fieldset>
-              <div class="form-group">
-                <input
-                  class="form-control"
-                  placeholder="用户名"
-                  v-model="loginName"
-                  name="loginName"
-                  type="text"
-                  autofocus="true"
-                />
-              </div>
-              <div class="form-group">
-                <input
-                  class="form-control"
-                  placeholder="密码"
-                  v-model="password"
-                  name="password"
-                  type="password"
-                  value=""
-                />
-              </div>
-              <button @click="checkLogin" class="btn btn-lg btn-info btn-block">
-                登录
-              </button>
-            </fieldset>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-<style scoped>
-div {
-  font-family: "Arial", "Helvetica", "sans-serif", "Hiragino Sans GB",
-    "Micrsoft YaHei";
-}
-
-.login-title {
-  text-align: center;
-  margin-top: 0px;
-  margin-bottom: 0px;
-  font-weight: bold;
-}
-
-.icon {
-  margin-bottom: 10px;
-  margin-top: 20px;
-}
-
-embed {
-  width: 150px;
-  height: 150px;
-}
-</style>
-<script>
-import { mapActions } from "vuex";
-import { USER_SIGNIN } from "../../portal/store/user";
-import { core_api } from "../constants/constants.js";
-
-export default {
-  data() {
-    return {
-      loginName: "",
-      password: "",
-      errorflag: false,
-      errorinfo: ""
-    };
-  },
-  methods: {
-    ...mapActions([USER_SIGNIN]),
-    checkLogin: function() {
-      this.errorflag = false;
-      this.errorinfo = "";
-      if (!this.loginName || !this.password) {
-        this.errorinfo += "用户名或密码不能为空!\n";
-      }
-      if (this.errorinfo) {
-        this.errorflag = true;
-        this.$notify({
-          showClose: true,
-          message: this.errorinfo,
-          type: "error"
-        });
-        return;
-      } else {
-        this.$http
-          .post(
-            core_api + "/user/login",
-            {},
-            {
-              params: {
-                loginName: this.loginName,
-                password: this.password
-              }
-            }
-          )
-          .then(response => {
-            console.log("response is :", response);
-            var data = response.data;
-
-            this.USER_SIGNIN({
-              loginName: data.loginName,
-              name: data.name,
-              token: data.token,
-              userId: data.userId,
-              orgId: data.orgId,
-              rootOrgId: data.rootOrgId,
-              role: data.userRoles
-            });
-            this.$router.replace({ path: "/index" });
-          })
-          .catch(response => {
-            if (response.status == 500) {
-              this.$notify({
-                showClose: true,
-                message: response.data.desc,
-                type: "error"
-              });
-            }
-          });
-      }
-    }
-  }
-};
-</script>

+ 0 - 94
src/modules/basic/view/platform.vue

@@ -1,94 +0,0 @@
-<style scoped>
-.el-select {
-  width: 200px;
-}
-.content {
-  margin-top: 10px;
-}
-</style>
-<template>
-  <div>
-    <section class="content-header"><h1>平台总览</h1></section>
-    <!-- Main content -->
-    <section class="content">
-      <!-- Info boxes -->
-      <div class="row">
-        <div class="col-md-3 col-sm-6 col-xs-12">
-          <div class="info-box">
-            <span class="info-box-icon bg-green"
-              ><i class="fa fa-flag-o"></i
-            ></span>
-
-            <div class="info-box-content">
-              <span class="info-box-text">考务平台</span>
-              <span class="info-box-number"><small></small></span>
-              <span class="info-box-number"><small></small></span>
-            </div>
-            <!-- /.info-box-content -->
-          </div>
-          <!-- /.info-box -->
-        </div>
-
-        <div class="col-md-3 col-sm-6 col-xs-12">
-          <div class="info-box">
-            <span class="info-box-icon bg-red"
-              ><i class="fa fa-flag-o"></i
-            ></span>
-
-            <div class="info-box-content">
-              <span class="info-box-text">网考平台</span>
-              <span class="info-box-number"><small></small></span>
-              <span class="info-box-number"><small></small></span>
-            </div>
-            <!-- /.info-box-content -->
-          </div>
-          <!-- /.info-box -->
-        </div>
-        <!-- /.col -->
-
-        <div class="col-md-3 col-sm-6 col-xs-12">
-          <div class="info-box">
-            <span class="info-box-icon bg-yellow"
-              ><i class="fa fa-flag-o"></i
-            ></span>
-
-            <div class="info-box-content">
-              <span class="info-box-text">阅卷平台</span>
-              <span class="info-box-number"><small></small></span>
-              <span class="info-box-number"><small></small></span>
-            </div>
-            <!-- /.info-box-content -->
-          </div>
-          <!-- /.info-box -->
-        </div>
-        <!-- /.col -->
-        <div class="col-md-3 col-sm-6 col-xs-12">
-          <div class="info-box">
-            <span class="info-box-icon bg-aqua"
-              ><i class="fa fa-flag-o"></i
-            ></span>
-
-            <div class="info-box-content">
-              <span class="info-box-text">题库平台</span>
-              <span class="info-box-number"><small></small></span>
-              <span class="info-box-number"><small></small></span>
-            </div>
-            <!-- /.info-box-content -->
-          </div>
-          <!-- /.info-box -->
-        </div>
-      </div>
-      <!-- /.row -->
-    </section>
-    <!-- /.content -->
-  </div>
-</template>
-<script>
-export default {
-  data() {
-    return {};
-  },
-  methods: {},
-  created() {}
-};
-</script>

+ 3 - 1
src/modules/basic/view/privilege_group_list.vue

@@ -46,7 +46,7 @@
     </section>
   </div>
 </template>
-<style scoped></style>
+
 <script>
 import { mapActions, mapState } from "vuex";
 import { USER_SIGNIN } from "../../portal/store/user";
@@ -91,3 +91,5 @@ export default {
   }
 };
 </script>
+
+<style scoped></style>

+ 3 - 1
src/modules/basic/view/privilege_tree.vue

@@ -255,7 +255,7 @@
     </section>
   </div>
 </template>
-<style scoped></style>
+
 <script type="text/jsx">
 import { core_api } from "../constants/constants.js";
 
@@ -600,3 +600,5 @@ export default {
     }
 };
 </script>
+
+<style scoped></style>

+ 1 - 5
src/modules/basic/view/role_privilege_settings.vue

@@ -311,8 +311,4 @@ export default {
 };
 </script>
 
-<style scoped>
-.el-radio-group {
-  margin-top: 5px;
-}
-</style>
+<style scoped></style>

+ 14 - 21
src/modules/basic/view/school.vue

@@ -1,24 +1,3 @@
-<style>
-.page {
-  margin-top: 10px;
-}
-
-.buttonframe {
-  margin-left: 20px;
-}
-
-.el-table th > .cell {
-  text-align: center;
-}
-
-.el-textarea__inner {
-  resize: none;
-}
-
-.el-upload {
-  width: 80px;
-}
-</style>
 <template>
   <div>
     <section class="content" style="margin-top: -10px;">
@@ -740,3 +719,17 @@ export default {
   }
 };
 </script>
+
+<style scoped>
+.page {
+  margin-top: 10px;
+}
+
+.el-table th > .cell {
+  text-align: center;
+}
+
+.el-upload {
+  width: 80px;
+}
+</style>

+ 1 - 1
src/modules/portal/views/Login.vue

@@ -149,7 +149,7 @@ export default {
 };
 </script>
 
-<style lang="css" scoped>
+<style scoped>
 .login-header {
   font-family: "Microsoft YaHei";
   width: 990px;

+ 4 - 3
src/modules/portal/views/home/Home.vue

@@ -213,12 +213,13 @@ export default {
 };
 </script>
 
-<style lang="css" scoped>
+<style scoped>
 .fr {
   float: right;
 }
-.el-header, .el-footer {
-  background-color: #B3C0D1;
+.el-header,
+.el-footer {
+  background-color: #b3c0d1;
   color: #333;
   text-align: center;
   line-height: 60px;

+ 2 - 2
src/modules/portal/views/home/HomeMain.vue

@@ -52,9 +52,9 @@ export default {
 };
 </script>
 
-<style lang="css" scoped>
+<style scoped>
 .el-main {
-  background-color: #E9EEF3;
+  background-color: #e9eef3;
   color: #333;
   text-align: center;
   line-height: 60px;

+ 1 - 1
src/modules/portal/views/home/HomeSide.vue

@@ -119,7 +119,7 @@ export default {
 };
 </script>
 
-<style lang="css" scoped>
+<style scoped>
 .el-menu-vertical-demo {
   height: calc(100vh - 60px);
 }