lsc 1 year ago
parent
commit
3824dbdbcb

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.1b511656a39c464132275affc780e1d5.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.d2a60cf4f8d4649786e6.js></script><script type=text/javascript src=./static/js/app.ca887712a661ee292534.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.8d90e97a0fcd6cf9a75c961b8b2194ad.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.d2a60cf4f8d4649786e6.js></script><script type=text/javascript src=./static/js/app.50eb08fd5f0cfeddc3cf.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.1b511656a39c464132275affc780e1d5.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.8d90e97a0fcd6cf9a75c961b8b2194ad.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.8d90e97a0fcd6cf9a75c961b8b2194ad.css.map


BIN
dist/static/img/modelImg.88fad8e.png


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.50eb08fd5f0cfeddc3cf.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.50eb08fd5f0cfeddc3cf.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.ca887712a661ee292534.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 24 - 16
src/components/pages/class.vue

@@ -832,23 +832,31 @@ export default {
         });
     },
     iniPassword(id) {
-      let params = [
-        {
-          uid: id,
-          pa: 123456,
-        },
-      ];
-      this.ajax
-        .post(this.$store.state.api + "iniPassword", params)
-        .then((res) => {
-          this.$message({
-            message: "初始化密码成功!",
-            type: "success",
-          });
+      this.$confirm("确定" + "初始化" + "此学生的密码吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let params = [
+            {
+              uid: id,
+              pa: 123456,
+            },
+          ];
+          this.ajax
+            .post(this.$store.state.api + "iniPassword", params)
+            .then((res) => {
+              this.$message({
+                message: "初始化密码成功!",
+                type: "success",
+              });
+            })
+            .catch((err) => {
+              console.error(err);
+            });
         })
-        .catch((err) => {
-          console.error(err);
-        });
+        .catch(() => { });
     },
   },
 };

+ 101 - 228
src/components/pages/student.vue

@@ -1,53 +1,27 @@
 <template>
   <div class="pb_content" style="background: unset">
-    <div
-      class="pb_content_body"
-      style="
-        background: #fff;
-        padding: 0px 25px;
-        box-sizing: border-box;
-        border-radius: 5px;
-      "
-    >
+    <div class="pb_content_body" style="
+          background: #fff;
+          padding: 0px 25px;
+          box-sizing: border-box;
+          border-radius: 5px;
+        ">
       <div class="pb_head">
         <span>学生管理</span>
       </div>
       <div class="student_head">
         <div class="head_left">
-          <el-input
-            v-model="sPhoneUser"
-            class="student_input"
-            placeholder="请输入用户名"
-          ></el-input>
-          <el-select
-            v-model="cid"
-            placeholder="请选择班级"
-            class="student_input"
-            @change="searchStudent"
-          >
+          <el-input v-model="sPhoneUser" class="student_input" placeholder="请输入用户名"></el-input>
+          <el-select v-model="cid" placeholder="请选择班级" class="student_input" @change="searchStudent">
             <el-option label="所有人" value=""></el-option>
-            <el-option
-              v-for="(item, index) in classJuri"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
+            <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
           </el-select>
-          <el-button class="student_button" @click="searchStudent"
-            >查询</el-button
-          >
+          <el-button class="student_button" @click="searchStudent">查询</el-button>
         </div>
         <div class="head_right">
           <el-button @click="addStudent">添加学生</el-button>
-          <el-upload
-            v-show="false"
-            class="upload-demo newCss"
-            :http-request="handleChange"
-            :on-remove="handleRemove"
-            action="#"
-            :file-list="fileListUpload"
-            accept=".xlsx"
-          >
+          <el-upload v-show="false" class="upload-demo newCss" :http-request="handleChange" :on-remove="handleRemove"
+            action="#" :file-list="fileListUpload" accept=".xlsx">
             <el-button size="primary" type="primary">批量添加</el-button>
             <div slot="tip" class="el-upload__tip" style="margin-left: 10px">
               只能上传xlsx文件,且不超过500kb
@@ -60,39 +34,26 @@
     </div>
     <div class="pb_content_body">
       <div class="student_table">
-        <el-table
-          ref="table"
-          :data="tableData"
-          border
-          :height="tableHeight"
-          :fit="true"
-          v-loading="isLoading"
-          style="width: 100%"
-          :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
-          :row-class-name="tableRowClassName"
-        >
+        <el-table ref="table" :data="tableData" border :height="tableHeight" :fit="true" v-loading="isLoading"
+          style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+          :row-class-name="tableRowClassName">
           <el-table-column label="姓名" min-width="10" align="center">
             <template slot-scope="scope">
               <div class="userImg">
                 <div class="tx">
-                  <img
-                    :src="
-                      scope.row.headportrait != null
-                        ? scope.row.headportrait
-                        : tx
-                    "
-                    alt
-                  />
+                  <img :src="
+                    scope.row.headportrait != null
+                      ? scope.row.headportrait
+                      : tx
+                  " alt />
                 </div>
-                <div
-                  style="
-                    width: 150px;
-                    text-align: left;
-                    white-space: nowrap;
-                    overflow: hidden;
-                    text-overflow: ellipsis;
-                  "
-                >
+                <div style="
+                      width: 150px;
+                      text-align: left;
+                      white-space: nowrap;
+                      overflow: hidden;
+                      text-overflow: ellipsis;
+                    ">
                   {{ scope.row.name }}
                 </div>
               </div>
@@ -116,41 +77,19 @@
             align="center"
           >
           </el-table-column>-->
-          <el-table-column
-            prop="classname2"
-            label="班级"
-            min-width="15"
-            align="center"
-          >
+          <el-table-column prop="classname2" label="班级" min-width="15" align="center">
           </el-table-column>
           <el-table-column label="操作" width="250px">
             <template slot-scope="scope">
               <div class="btnBox">
-                <el-button
-                  class="de_button"
-                  type="primary"
-                  size="small"
-                  style="
-                    width: auto;
-                    padding: 5px !important;
-                    line-height: 15px;
-                  "
-                  @click="iniPassword(scope.row.userid)"
-                  >初始化密码</el-button
-                >
-                <el-button
-                  class="de_button"
-                  type="primary"
-                  size="small"
-                  @click="updateStudentA(scope.row)"
-                  >修改</el-button
-                >
+                <el-button class="de_button" type="primary" size="small" style="
+                      width: auto;
+                      padding: 5px !important;
+                      line-height: 15px;
+                    " @click="iniPassword(scope.row.userid)">初始化密码</el-button>
+                <el-button class="de_button" type="primary" size="small" @click="updateStudentA(scope.row)">修改</el-button>
                 <div class="delete">
-                  <img
-                    src="../../assets/remove.png"
-                    alt
-                    @click="deleteStudent(scope.row.userid, scope.row.state)"
-                  />
+                  <img src="../../assets/remove.png" alt @click="deleteStudent(scope.row.userid, scope.row.state)" />
                 </div>
               </div>
             </template>
@@ -158,23 +97,12 @@
         </el-table>
       </div>
       <div class="student_page">
-        <el-pagination
-          background
-          layout="prev, pager, next"
-          :page-size="10"
-          :total="total"
-          v-if="page"
-          @current-change="handleCurrentChange"
-        ></el-pagination>
+        <el-pagination background layout="prev, pager, next" :page-size="10" :total="total" v-if="page"
+          @current-change="handleCurrentChange"></el-pagination>
       </div>
     </div>
-    <el-dialog
-      :visible.sync="dialogVisible"
-      :append-to-body="true"
-      width="700px"
-      :before-close="handleClose"
-      class="add_student"
-    >
+    <el-dialog :visible.sync="dialogVisible" :append-to-body="true" width="700px" :before-close="handleClose"
+      class="add_student">
       <div slot="title" class="header-title">
         <div class="logoImg">
           <img src="../../assets/logo.png" alt />
@@ -184,59 +112,30 @@
       <el-form>
         <el-form-item label="学生姓名" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生姓名"
-              clearable
-              v-model="sName"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生姓名" clearable v-model="sName" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="学生学号" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生学号"
-              clearable
-              v-model="sId"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生学号" clearable v-model="sId" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="学生手机号" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生手机号"
-              clearable
-              v-model="sPhone"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生手机号" clearable v-model="sPhone" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="学生账号" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生账号"
-              clearable
-              v-model="sMail"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生账号" clearable v-model="sMail" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="所属学校" :label-width="formLabelWidth">
-          <el-input
-            disabled
-            style="width: 300px"
-            v-model="schoolName"
-          ></el-input>
+          <el-input disabled style="width: 300px" v-model="schoolName"></el-input>
         </el-form-item>
         <el-form-item label="班级" :label-width="formLabelWidth">
-          <el-select multiple collapse-tags  v-model="sByClass" placeholder="请选择班级">
-            <el-option
-              v-for="(item, index) in classJuri"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
+          <el-select multiple collapse-tags v-model="sByClass" placeholder="请选择班级">
+            <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
           </el-select>
         </el-form-item>
         <div style="text-align: center; color: #adb3b7">
@@ -247,13 +146,8 @@
         <el-button class="right" @click="insertStudent">确认</el-button>
       </span>
     </el-dialog>
-    <el-dialog
-      :visible.sync="dialogVisibleUpdate"
-      :append-to-body="true"
-      width="700px"
-      :before-close="handleClose"
-      class="add_student"
-    >
+    <el-dialog :visible.sync="dialogVisibleUpdate" :append-to-body="true" width="700px" :before-close="handleClose"
+      class="add_student">
       <div slot="title" class="header-title">
         <div class="logoImg">
           <img src="../../assets/logo.png" alt />
@@ -263,59 +157,30 @@
       <el-form>
         <el-form-item label="学生名称" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生姓名"
-              clearable
-              v-model="userinfo.name"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生姓名" clearable v-model="userinfo.name" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="学生学号" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生学号"
-              clearable
-              v-model="userinfo.studentid"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生学号" clearable v-model="userinfo.studentid" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="学生手机号" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生手机号"
-              clearable
-              v-model="userinfo.phonenumber"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生手机号" clearable v-model="userinfo.phonenumber" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="学生账号" :label-width="formLabelWidth">
           <span>
-            <el-input
-              placeholder="请输入学生账号"
-              clearable
-              v-model="userinfo.un"
-              class="add_input"
-            ></el-input>
+            <el-input placeholder="请输入学生账号" clearable v-model="userinfo.un" class="add_input"></el-input>
           </span>
         </el-form-item>
         <el-form-item label="所属学校" :label-width="formLabelWidth">
-          <el-input
-            disabled
-            style="width: 300px"
-            v-model="schoolName"
-          ></el-input>
+          <el-input disabled style="width: 300px" v-model="schoolName"></el-input>
         </el-form-item>
         <el-form-item label="班级" :label-width="formLabelWidth">
           <el-select multiple collapse-tags v-model="userinfo.classid" placeholder="请选择班级">
-            <el-option
-              v-for="(item, index) in classJuri"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
+            <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
           </el-select>
         </el-form-item>
         <div style="text-align: center; color: #adb3b7">
@@ -617,7 +482,7 @@ export default {
       if (this.fileTemp) {
         if (
           this.fileTemp.type ==
-            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
+          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
           this.fileTemp.type == "application/vnd.ms-excel"
         ) {
           this.importCount = 1;
@@ -1091,26 +956,34 @@ export default {
               console.error(err);
             });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     iniPassword(id) {
-      let params = [
-        {
-          uid: id,
-          pa: 123456,
-        },
-      ];
-      this.ajax
-        .post(this.$store.state.api + "iniPassword", params)
-        .then((res) => {
-          this.$message({
-            message: "初始化密码成功!",
-            type: "success",
-          });
+      this.$confirm("确定" + "初始化" + "此学生的密码吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let params = [
+            {
+              uid: id,
+              pa: 123456,
+            },
+          ];
+          this.ajax
+            .post(this.$store.state.api + "iniPassword", params)
+            .then((res) => {
+              this.$message({
+                message: "初始化密码成功!",
+                type: "success",
+              });
+            })
+            .catch((err) => {
+              console.error(err);
+            });
         })
-        .catch((err) => {
-          console.error(err);
-        });
+        .catch(() => { });
     },
     updateStudentA(res) {
       this.userinfo = JSON.parse(JSON.stringify(res));
@@ -1201,7 +1074,7 @@ export default {
 </script>
 
 <style scoped>
-.pb_head > span:nth-child(2) {
+.pb_head>span:nth-child(2) {
   font-size: 20px;
   margin-left: 5px;
   color: #828282;
@@ -1235,7 +1108,7 @@ export default {
   align-items: baseline;
 }
 
-.student_input >>> .el-input__inner {
+.student_input>>>.el-input__inner {
   height: 30px;
   width: 190px;
   font-size: 13px;
@@ -1252,7 +1125,7 @@ export default {
   line-height: 30px;
 }
 
-.head_right > button:nth-child(1) {
+.head_right>button:nth-child(1) {
   color: #fff;
   background: #2268bc;
   width: 70px;
@@ -1262,7 +1135,7 @@ export default {
   line-height: 30px;
 }
 
-.head_right > button:nth-child(2) {
+.head_right>button:nth-child(2) {
   color: #fff;
   background: #2268bc;
   width: 70px;
@@ -1272,7 +1145,7 @@ export default {
   line-height: 30px;
 }
 
-.head_right > div {
+.head_right>div {
   font-size: 12px;
   line-height: 40px;
   margin-left: 10px;
@@ -1281,16 +1154,16 @@ export default {
   cursor: pointer;
 }
 
-.student_table >>> .el-table--border td {
+.student_table>>>.el-table--border td {
   border-right: 0px !important;
 }
 
-.student_table >>> .el-table,
-.student_table >>> .el-table__body-wrapper {
+.student_table>>>.el-table,
+.student_table>>>.el-table__body-wrapper {
   height: auto !important;
 }
 
-.el-table >>> .even_row {
+.el-table>>>.even_row {
   background-color: #f1f1f1 !important;
 }
 
@@ -1304,30 +1177,30 @@ export default {
   line-height: 25px;
 }
 
-.add_student >>> .el-dialog__header {
+.add_student>>>.el-dialog__header {
   padding: 20px 20px 10px;
   text-align: center;
   background: #32455b;
 }
 
-.add_student >>> .el-dialog__title {
+.add_student>>>.el-dialog__title {
   font-size: 14px !important;
   color: #fff !important;
 }
 
-.add_student >>> .el-dialog__headerbtn {
+.add_student>>>.el-dialog__headerbtn {
   font-size: 20px !important;
 }
 
-.add_student >>> .el-form-item__label {
+.add_student>>>.el-form-item__label {
   margin-left: 65px;
 }
 
-.add_student >>> .el-form-item {
+.add_student>>>.el-form-item {
   display: flex;
 }
 
-.add_student >>> .el-form-item__content {
+.add_student>>>.el-form-item__content {
   margin: 0 !important;
 }
 
@@ -1335,7 +1208,7 @@ export default {
   width: 365px;
 }
 
-.add_student >>> .el-dialog__footer {
+.add_student>>>.el-dialog__footer {
   text-align: center !important;
 }
 
@@ -1354,7 +1227,7 @@ export default {
   width: 30px;
 }
 
-.logoImg > img {
+.logoImg>img {
   width: 100%;
   height: 100%;
 }
@@ -1368,7 +1241,7 @@ export default {
   line-height: 0px !important;
 }
 
-.upload-demo >>> .el-button {
+.upload-demo>>>.el-button {
   color: #fff;
   background: #2268bc;
   width: 70px;
@@ -1397,8 +1270,8 @@ export default {
   margin-left: 10px;
 }
 
-.tx > img,
-.delete > img {
+.tx>img,
+.delete>img {
   width: 100%;
   height: 100%;
 }
@@ -1418,7 +1291,7 @@ export default {
   margin-right: 10px;
 }
 
-.student_input >>> .el-input__icon {
+.student_input>>>.el-input__icon {
   line-height: unset;
 }
 

Some files were not shown because too many files changed in this diff