Explorar o código

基础信息:学校列表样式

Michael Wang %!s(int64=6) %!d(string=hai) anos
pai
achega
a9cb4a9452

+ 31 - 11
src/modules/basic/view/exam_site.vue

@@ -27,22 +27,22 @@
                 <el-button
                   size="small"
                   type="primary"
-                  icon="search"
+                  icon="el-icon-search"
                   @click="searchForm"
                 >
                   查询
                 </el-button>
+                <el-button size="small" @click="resetSearchForm">
+                  重置
+                </el-button>
                 <el-button
                   size="small"
                   type="primary"
-                  icon="plus"
+                  icon="el-icon-plus"
                   @click="insert"
                 >
                   新增
                 </el-button>
-                <el-button size="small" type="danger" @click="deleteByIds">
-                  <i class="el-icon-delete"></i>删除
-                </el-button>
                 <el-button size="small" type="info" @click="back">
                   退回
                 </el-button>
@@ -51,9 +51,14 @@
           </ecs-form-search>
 
           <!-- 添加考点信息弹出框 -->
-          <el-dialog title="考点信息" :visible.sync="examSiteDialog">
+          <el-dialog
+            title="考点信息"
+            width="400px"
+            :visible.sync="examSiteDialog"
+          >
             <el-form
               :inline="true"
+              inline-message
               :model="examSiteForm"
               ref="examSiteForm"
               :rules="rules"
@@ -67,7 +72,7 @@
                     v-model="orgName"
                     auto-complete="off"
                     placeholder="中心代码"
-                    readonly
+                    disabled
                   />
                 </el-form-item>
               </el-row>
@@ -122,13 +127,25 @@
                   />
                 </el-form-item>
               </el-row>
-              <el-row class="pull_center">
+              <el-row class="d-flex justify-content-center">
                 <el-button type="primary" @click="submitForm">保 存</el-button>
                 <el-button @click="examSiteDialog = false">取 消</el-button>
               </el-row>
             </el-form>
           </el-dialog>
 
+          <span>批量操作:</span>
+          <el-button
+            size="small"
+            type="danger"
+            icon="el-icon-delete"
+            @click="deleteByIds"
+          >
+            删除
+          </el-button>
+
+          <div style="width: 100%;margin-bottom: 10px;"></div>
+
           <!-- 页面列表 -->
           <el-table
             :data="tableData"
@@ -139,17 +156,16 @@
           >
             <el-table-column type="selection" width="35" />
             <el-table-column prop="id" width="80" label="ID" />
-            <el-table-column prop="orgName" label="学习中心" />
             <el-table-column prop="code" label="考点代码" />
             <el-table-column prop="name" label="考点名称" />
             <el-table-column prop="contacts" width="100" label="负责人" />
             <el-table-column prop="telephone" width="100" label="联系方式" />
-            <el-table-column prop="remark" width="150" label="备注" />
+            <el-table-column prop="remark" width="120" label="备注" />
             <el-table-column prop="updateTime" width="180" label="更新时间" />
             <el-table-column label="操作" width="180">
               <div slot-scope="scope">
                 <el-button size="mini" type="primary" @click="edit(scope.row)">
-                  <i class="el-icon-edit"></i> 修改
+                  <i class="el-icon-edit"></i> 编辑
                 </el-button>
                 <el-button
                   size="mini"
@@ -240,6 +256,10 @@ export default {
     back() {
       this.$router.back();
     },
+    resetSearchForm() {
+      this.formSearch.code = "";
+      this.formSearch.name = "";
+    },
     handleCurrentChange(val) {
       this.currentPage = val;
       this.searchForm();

+ 23 - 12
src/modules/basic/view/school.vue

@@ -24,9 +24,7 @@
           >
             查询
           </el-button>
-          <el-button size="small" icon="plus" @click="resetSearchForm">
-            重置
-          </el-button>
+          <el-button size="small" @click="resetSearchForm"> 重置 </el-button>
           <el-button size="small" type="primary" icon="plus" @click="insert">
             新增
           </el-button>
@@ -38,17 +36,27 @@
       ></div>
 
       <span>批量操作:</span>
-      <el-button size="small" type="success" @click="enableOrg">
+      <el-button
+        size="small"
+        type="success"
+        :disabled="noBatchSelected"
+        @click="enableOrg"
+      >
         <i class="fa fa-check" aria-hidden="true"></i>启用
       </el-button>
-      <el-button size="small" type="danger" @click="disableOrg">
+      <el-button
+        size="small"
+        type="danger"
+        :disabled="noBatchSelected"
+        @click="disableOrg"
+      >
         <i class="fa fa-close" aria-hidden="true"></i>禁用
       </el-button>
 
       <div style="width: 100%;margin-bottom: 10px;"></div>
 
       <!-- 添加或修改学校弹出框 -->
-      <el-dialog title="学校信息" :visible.sync="schoolDialog">
+      <el-dialog title="学校信息" width="400px" :visible.sync="schoolDialog">
         <el-form
           :inline="true"
           :model="schoolForm"
@@ -130,7 +138,7 @@
               </el-radio-group>
             </el-form-item>
           </el-row>
-          <el-row class="pull_center">
+          <el-row class="d-flex justify-content-center">
             <el-button type="primary" @click="submitForm">保 存</el-button>
             <el-button @click="schoolDialog = false">取 消</el-button>
           </el-row>
@@ -146,16 +154,16 @@
       </el-dialog>
 
       <!-- logo上传弹窗 -->
-      <el-dialog title="logo上传" :visible.sync="logoDialog">
-        <el-form>
+      <el-dialog title="logo上传" width="350px" :visible.sync="logoDialog">
+        <el-form inline>
           <el-row>
-            <el-form-item label="学校名称" label-width="120px">
+            <el-form-item label="学校名称">
               <el-input class="pull_length" v-model="curSchool.name" disabled />
             </el-form-item>
-            <el-form-item label="学校代码" label-width="120px">
+            <el-form-item label="学校代码">
               <el-input class="pull_length" v-model="curSchool.code" disabled />
             </el-form-item>
-            <el-form-item style="margin-left:20px">
+            <el-form-item>
               <el-upload
                 class="form_left"
                 ref="upload"
@@ -342,6 +350,9 @@ export default {
   },
   computed: {
     ...mapState({ user: state => state.user }),
+    noBatchSelected() {
+      return this.selectedOrgIds.length === 0;
+    },
     orgIds() {
       var orgIds = "";
       for (let orgId of this.selectedOrgIds) {

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

@@ -10,6 +10,7 @@
       background-color="#304156"
       text-color="#fff"
       active-text-color="#409eff"
+      router
     >
       <el-submenu
         v-for="menu1 in menuList1"
@@ -32,7 +33,7 @@
           v-for="menu2 in menuList2(menu1)"
           :index="menu2.nodeCode"
           :key="menu2.id"
-          @click="() => $router.push({ path: menu2.ext5 })"
+          :route="{ path: menu2.ext5 }"
         >
           <router-link
             :to="{ path: menu2.ext5 }"