Browse Source

Merge branch 'master' of http://git.bozedu.net:3000/872880485/moral_edu

luohailiang 2 years ago
parent
commit
0d4fda2b0c
2 changed files with 16 additions and 55 deletions
  1. 12 51
      src/views/xsczda/hzlxgl/index.vue
  2. 4 4
      src/views/xsczda/xslb/bjlb/xslbxq/index.vue

+ 12 - 51
src/views/xsczda/hzlxgl/index.vue

@@ -1,34 +1,15 @@
 <template>
   <div>
     <div>
-      <el-upload
-        class="upload-demo"
-        :action="import_type_url"
-        :show-file-list="false"
-        :data="import_type_data"
-        :on-success="import_success"
-        style="display: inline-block; margin: 0 10px"
-      >
+      <el-upload class="upload-demo" :action="import_type_url" :show-file-list="false" :data="import_type_data" :on-success="import_success" style="display: inline-block; margin: 0 10px">
         <el-button type="primary">导入</el-button>
       </el-upload>
       <el-button type="primary" @click="exportAll">导入模板下载</el-button>
       <el-button type="primary" @click="exportAll" :disabled="tableData.length == 0">导出</el-button>
       <el-button type="primary" @click="addData">添加</el-button>
-      <el-button
-        type="danger"
-        @click="delData"
-        :disabled="multipleSelection.length == 0"
-        >删除</el-button
-      >
+      <el-button type="danger" @click="delData" :disabled="multipleSelection.length == 0">删除</el-button>
     </div>
-    <el-table
-      :data="tableData"
-      tooltip-effect="dark"
-      ref="multipleTable"
-      @selection-change="handleSelectionChange"
-      class="mt20"
-      style="width: 100%"
-    >
+    <el-table :data="tableData" tooltip-effect="dark" ref="multipleTable" @selection-change="handleSelectionChange" class="mt20" style="width: 100%">
       <el-table-column type="selection" align="center" width="55">
       </el-table-column>
 
@@ -38,9 +19,7 @@
       </el-table-column>
       <el-table-column label="是否启用" prop="xdxh_qyzt" width="250">
         <template slot-scope="scope">
-          <span v-if="scope.row.xdxh_qyzt_option_k == 2" class="text-red"
-            >禁用</span
-          >
+          <span v-if="scope.row.xdxh_qyzt_option_k == 2" class="text-red">禁用</span>
           <span v-else>启用</span>
         </template>
       </el-table-column>
@@ -50,27 +29,11 @@
         </template>
       </el-table-column>
     </el-table>
-    <footer
-      class="flex-item-none"
-      style="display: flex; justify-content: flex-end; margin-top: 30px"
-    >
-      <el-pagination
-        background
-        layout="total,prev, pager, next"
-        :page-size="limit"
-        :total="total"
-        :current-page.sync="cur_page"
-        @current-change="handleCurrentChange"
-      ></el-pagination>
+    <footer class="flex-item-none" style="display: flex; justify-content: flex-end; margin-top: 30px">
+      <el-pagination background layout="total,prev, pager, next" :page-size="limit" :total="total" :current-page.sync="cur_page" @current-change="handleCurrentChange"></el-pagination>
     </footer>
     <el-dialog :title="title" :visible.sync="dialogFormVisible" width="700px">
-      <el-form
-        :inline="true"
-        :model="dialogForm"
-        ref="dialogForm"
-        :rules="rules"
-        label-width="100px"
-      >
+      <el-form :inline="true" :model="dialogForm" ref="dialogForm" :rules="rules" label-width="100px">
         <el-form-item class="mr75" label="徽章类型" prop="hzlx">
           <el-input v-model="dialogForm.hzlx"></el-input>
         </el-form-item>
@@ -80,16 +43,14 @@
 
         <el-form-item class="mr75" label="启用状态" prop="qyzt">
           <el-radio-group v-model="dialogForm.qyzt">
-            <el-radio :label="1">启用</el-radio>
-            <el-radio :label="2">禁用</el-radio>
+            <el-radio label="1">启用</el-radio>
+            <el-radio label="2">禁用</el-radio>
           </el-radio-group>
         </el-form-item>
       </el-form>
       <div slot="footer" class="text-center">
         <el-button @click="formCancel">取 消</el-button>
-        <el-button type="primary" @click="formSubmit('dialogForm')"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="formSubmit('dialogForm')">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -108,7 +69,7 @@ export default {
       cur_page: 1,
       keyword: "",
       dialogForm: {
-        hzlx: "",
+        hzlx: "1",
         jf: "",
         qyzt: "",
       },
@@ -188,7 +149,7 @@ export default {
             }
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     import_success(res) {
       if (res.code == 1) {

+ 4 - 4
src/views/xsczda/xslb/bjlb/xslbxq/index.vue

@@ -77,8 +77,8 @@
         </el-form-item>
         <el-form-item class="mr75" label="性别" prop="xb">
           <el-radio-group v-model="dialogForm.xb">
-            <el-radio :label="1">男</el-radio>
-            <el-radio :label="2">女</el-radio>
+            <el-radio label="1">男</el-radio>
+            <el-radio label="2">女</el-radio>
           </el-radio-group>
         </el-form-item>
       </el-form>
@@ -244,7 +244,7 @@ export default {
         xsxh: "",
         nj: "",
         bj: "",
-        xb: "",
+        xb: "1",
       };
       this.isEdit = false;
       this.dialogFormVisible = true;
@@ -258,7 +258,7 @@ export default {
       this.dialogForm.xsxh = item.xdxx_xsxh;
       this.dialogForm.nj = item.grade_name;
       this.dialogForm.bj = item.class_name;
-      this.dialogForm.xb = item.xdxx_xsxb;
+      this.dialogForm.xb = item.xdxx_xsxb == "男" ? "1" : "2";
     },
     formSubmit(formName) {
       this.$refs[formName].validate((valid) => {