瀏覽代碼

修改管理员管理

plg 7 月之前
父節點
當前提交
295ca43876

+ 606 - 0
src/components/instructorRegister.vue

@@ -0,0 +1,606 @@
+<template>
+  <div>
+    <!---lxh-修改密码-->
+    <div class="dig_update">
+      <el-dialog
+        :visible.sync="dialogVisible"
+        :close-on-click-modal="false"
+        width="40%"
+        style="border-radius: 40px"
+        top="5vh"
+      >
+        <div slot="title">
+          <el-form
+            :model="ruleForm"
+            :rules="rules"
+            :inline="true"
+            ref="ruleForm"
+            label-width="150px"
+            class="demo-ruleForm"
+          >
+            <p v-if="isView" class="dig_title">单独注册</p>
+            <p v-if="!isView" class="dig_title">编辑</p>
+            <div slot=""></div>
+            <div slot="footer"></div>
+            <!-- :show-all-levels="false" -->
+            <el-form-item label="管理班级" prop="grade">
+              <el-select
+                clearable
+                v-model="ruleForm.grade"
+                placeholder="请选择"
+                style="width: 100%"
+                multiple
+                collapse-tags
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                  :disabled="item.disabled"
+                >
+                </el-option>
+              </el-select>
+              <!-- <el-cascader
+                placeholder="请选择组织架构"
+                v-model="ruleForm.group"
+                :options="groupData"
+                clearable
+              ></el-cascader> -->
+            </el-form-item>
+            <el-form-item label="编号" prop="studentNumber">
+              <el-input v-model="ruleForm.studentNumber"></el-input>
+            </el-form-item>
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="姓名" prop="name">
+                  <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="性别" prop="name">
+                  <el-radio-group v-model="ruleForm.sex" style="margin-left: 20px">
+                    <el-radio label="1">男</el-radio>
+                    <el-radio label="0">女</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+              </el-col>
+            </el-row>
+
+            <el-form-item v-if="isView" label="密码" prop="password">
+              <el-input
+                type="password"
+                v-model="ruleForm.password"
+                autocomplete="off"
+              ></el-input>
+            </el-form-item>
+            <el-form-item v-if="isView" label="确认密码" prop="comPassword">
+              <el-input
+                type="password"
+                v-model="ruleForm.comPassword"
+                autocomplete="off"
+              ></el-input>
+            </el-form-item>
+            <div class="dig_button">
+              <el-button type="info" round @click="resetData()">重置</el-button>
+              <!-- <el-button type="success" round @click="submitForm('ruleForm')"
+                  >提交</el-button
+                > -->
+              <el-button type="success" round @click="submitCom()">提交</el-button>
+            </div>
+          </el-form>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+// import { oSessionStorage } from "../../utils/utils";
+import { oSessionStorage } from "../utils/utils";
+import md5 from "md5";
+export default {
+  data() {
+    var validatePass = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("请输入密码"));
+      } else if (value.length < 6) {
+        callback(new Error("密码至少6位"));
+      } else {
+        callback();
+      }
+    };
+    var validateComPass = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("请输入密码"));
+      } else if (value.length < 6) {
+        callback(new Error("密码至少6位"));
+      } else if (value !== this.ruleForm.password) {
+        callback(new Error("两次密码不一致"));
+        // callback();
+      } else {
+        callback();
+      }
+    };
+    var validatePhone = (rule, value, callback) => {
+      let myreg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
+      if (value === "") {
+        callback(new Error("请输入手机号"));
+      } else if (!myreg.test(value)) {
+        callback(new Error("请输入正确格式"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      userInfo: "",
+      //编辑返回的值
+      userDetailData: {},
+      //组织架构名字
+      groupName: "",
+      ppData: [],
+      groupData: [],
+      options: [],
+      disableFlag: false,
+      phoneFlag: false,
+      flag: 3,
+      dialogVisible: false,
+      //渠道列表
+      channelList: [{ name: "渠道天成", id: "1" }],
+      ruleForm: {
+        //所属组织架构
+        group: "",
+        //管理班级
+        grade: [],
+        //编号
+        studentNumber: "",
+        //姓名
+        name: "",
+        //性别
+        sex: "",
+        //密码
+        password: "",
+        comPassword: "",
+      },
+      isView: true,
+      rules: {
+        grade: [{ required: true, message: "请选择管理班级", trigger: "blur" }],
+        studentNumber: [{ required: true, message: "请输入编号", trigger: "blur" }],
+        name: [{ required: true, message: "请输入编号", trigger: "blur" }],
+        // password: [{ required: true, message: "请输密码", trigger: "blur" }],
+        password: [{ required: true, validator: validatePass, trigger: "blur" }],
+        comPassword: [{ required: true, validator: validateComPass, trigger: "blur" }],
+      },
+      gradeList: [],
+    };
+  },
+  mounted() {
+    //获取渠道信息
+    // this.ruleForm.type = "3";
+  },
+  methods: {
+    //查询可选班级
+    queryGrade(val, listTmp) {
+      let url = "";
+      if (val == "") {
+        url = `/org/findGrade?orgNo=${this.userInfo.orgNo}`;
+      } else {
+        url = `/org/findGrade?orgNo=${this.userInfo.orgNo}&userNo=${val}`;
+      }
+      this.$http.get(url, {}, (res) => {
+        if (res && res.code == 200) {
+          console.log(res.data);
+          this.gradeList = res.data;
+          if (res.data.length > 0) {
+            for (let i = 0; i < res.data.length; i++) {
+              //
+              let obj = {
+                value: `'${res.data[i].id}'`,
+                label: res.data[i].orgName,
+                disabled: res.data[i].isOptional == "1" ? false : true,
+              };
+              console.log(obj);
+              this.options.push(obj);
+            }
+            if (listTmp.length > 0) {
+              this.ruleForm.grade = listTmp;
+            }
+          }
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+
+    resetData() {
+      this.$refs["ruleForm"].clearValidate();
+      //清空表单
+      this.ruleForm.grade = [];
+      this.ruleForm.group = "";
+      this.ruleForm.name = "";
+      this.ruleForm.studentNumber = "";
+      this.ruleForm.password = "";
+      this.ruleForm.comPassword = "";
+      this.ruleForm.sex = "";
+    },
+    //获取组织架构方法--------------------开始-----------------------
+    getChannel() {
+      this.$http.get(
+        `/org/findAllOrgByPOrgNo?orgNo=${this.userInfo.orgNo}`,
+        {},
+        (res) => {
+          //  this.$toast.success({message:'成功'});
+          if (res && res.code == 200) {
+            //将值赋值给list
+            if (res.data.length > 0) {
+              let resAdd = this.addPro(res.data);
+              this.ppData = JSON.parse(JSON.stringify(resAdd));
+              let forRes = this.arrToTree(resAdd);
+              // console.log('格式化的结构')
+              // console.log(forRes)
+              let resultRes = this.deleteChildren(forRes);
+
+              this.groupData = resultRes[0].children;
+            } else {
+              this.groupData = [];
+            }
+            // this.channelList = res.data;
+          } else {
+            this.$message.error(res.msg);
+          }
+        }
+      );
+    },
+    //z增加
+    addPro(val) {
+      let data = JSON.parse(JSON.stringify(val));
+      for (let i = 0; i < val.length; i++) {
+        data[i].value = val[i].orgNo;
+        data[i].label = val[i].orgName;
+      }
+      return data;
+    },
+    //非递归方式:将平铺数据转换为树形结构数据
+    arrToTree(arr) {
+      console.log("arr----");
+      console.log(arr);
+      console.log(this.userInfo);
+      console.log(this.userInfo.orgNo);
+      let data = arr.filter((item) => {
+        item.children = arr.filter((e) => {
+          return item.orgNo === e.parentOrgNo;
+        });
+
+        return this.userInfo.orgNo == item.orgNo;
+        //return !item.parentOrgNo;
+      });
+      console.log("data------");
+      console.log(data);
+      return data;
+    },
+    //去除转换树形结构数据后存在的空children
+    deleteChildren(arr) {
+      let childs = arr;
+      for (let i = childs.length; i--; i > 0) {
+        if (childs[i].children) {
+          if (childs[i].children.length) {
+            this.deleteChildren(childs[i].children);
+          } else {
+            delete childs[i].children;
+          }
+        }
+      }
+      return arr;
+    },
+    queryOrgName() {
+      for (let i = 0; i < this.ppData.length; i++) {
+        if (this.ruleForm.group[this.ruleForm.group.length - 1] == this.ppData[i].orgNo) {
+          this.groupName = this.ppData[i].orgName;
+        }
+      }
+    },
+    //获取组织架构方法--------------------结束-----------------------
+    timeChange(val) {
+      if (val !== null) {
+        //根据时间得到格式化的数据
+        this.ruleForm.birthDate = this.formatterTime(val);
+      }
+    },
+    formatterTime(val) {
+      let date = new Date(val);
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      month = this.formatterMon(month);
+      let day = date.getDate();
+      day = this.formatterMon(day);
+      return year + "-" + month + "-" + day;
+    },
+    formatterMon(val) {
+      if (val < 10) {
+        return "0" + val;
+      } else {
+        return val;
+      }
+    },
+    open(val) {
+      this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+      this.cancle();
+      this.options = [];
+      //   this.getChannel();
+      this.queryGrade("", []);
+      this.dialogVisible = true;
+      this.isView = val;
+
+      this.$nextTick(() => {
+        this.$refs.ruleForm.clearValidate();
+      });
+    },
+    edit(val) {
+      this.options = [];
+      this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+      console.log("userInfo");
+      console.log(this.userInfo);
+      //   this.getChannel();
+      this.dialogVisible = true;
+      this.isView = false;
+      this.queryUserDetail(val.id);
+      //调用查询详情的接口
+    },
+    //调用查询详情的接口
+    queryUserDetail(val) {
+      let url = `/user/findUserById?id=${val}`;
+      this.$http.get(url, {}, (res) => {
+        console.log("res");
+        console.log(res);
+        if (res && res.code == 200) {
+          //获取返回值
+          //根据将数据存储
+          this.userDetailData = res.data;
+
+          //   let a = [];
+
+          //   //当角色等于2时
+          //   if (this.userInfo.roleType == "2") {
+          //     //
+
+          //     a.push(res.data.orgNo);
+          //   }
+          //   //当角色等于1时
+          //   if (this.userInfo.roleType == "3") {
+          //     for (let i = 0; i < res.data.orgList.length; i++) {
+          //       if (i < 2) {
+          //         a.push(res.data.orgList[i].orgNo);
+          //       }
+          //     }
+          //   }
+          // a.push(this.userInfo.orgNo);
+          // a.push(res.data.orgNo);
+          //判断用户登录类型
+          // debugger;
+          // for (let i = res.data.orgList.length; i > 0; i--) {
+          //   //
+          //   a.push(res.data.orgList[i - 1].orgNo);
+          // }
+          //回显编号
+          this.ruleForm.grade = [];
+          let listTmp = [];
+          for (let i = 0; i < res.data.gradeEntities.length; i++) {
+            //
+            listTmp.push(res.data.gradeEntities[i].id);
+          }
+
+          this.ruleForm.studentNumber = res.data.userNo;
+          //回显姓名
+          this.ruleForm.name = res.data.userName;
+          //回显性别
+          this.ruleForm.sex = res.data.gender;
+          //
+          //拿到userNo 后带调用可选列表
+          this.queryGrade(res.data.userNo, listTmp);
+          //   this.ruleForm.group = a.reverse();
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    cancle() {
+      this.$refs["ruleForm"].clearValidate();
+      //清空表单
+      this.ruleForm.grade = [];
+      this.ruleForm.group = "";
+      this.ruleForm.name = "";
+      this.ruleForm.studentNumber = "";
+      this.ruleForm.password = "";
+      this.ruleForm.comPassword = "";
+      this.ruleForm.sex = "";
+      this.dialogVisible = false;
+    },
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
+    submitCom() {
+      if (this.disableFlag) {
+        return;
+      }
+      this.disableFlag = true;
+      let validSp = [];
+      if (this.isView) {
+        validSp = ["grade", "studentNumber", "name", "sex", "password", "comPassword"];
+      } else {
+        validSp = ["grade", "studentNumber", "name", "sex"];
+      }
+      let aa = [];
+      this.$refs["ruleForm"].validateField(validSp, (valid) => {
+        if (!valid) {
+          aa.push(valid);
+          //判断是编辑还是新增
+          if (this.isView) {
+            if (aa.length == 6) {
+              this.register();
+            } else {
+              this.disableFlagStatus();
+            }
+          } else {
+            if (aa.length == 4) {
+              this.editUserFun();
+            } else {
+              this.disableFlagStatus();
+            }
+          }
+
+          //都校验通过后可以触发注册接口了
+          //调用方法进行入参
+        } else {
+          this.disableFlagStatus();
+        }
+      });
+    },
+    register() {
+      //   this.queryOrgName();
+      //   console.log(this.ruleForm.group);
+      let that = this;
+      console.log("grade");
+
+      //   gradeList
+      let list = this.gradeList.filter((item) => {
+        return this.ruleForm.grade.includes(item.id);
+      });
+      console.log(list);
+      // this.ruleForm.password = md5(this.ruleForm.password);
+      this.$http.post(
+        `/user/addOrUpdateUser`,
+        {
+          gradeEntities: list,
+          orgNo: this.userInfo.orgNo,
+          orgName: this.userInfo.orgName,
+          userNo: this.ruleForm.studentNumber,
+          userName: this.ruleForm.name,
+          gender: this.ruleForm.sex,
+          password: md5(this.ruleForm.password),
+          //roleType     1普通用户    roleType   管理员
+          roleType: "3",
+        },
+        (res) => {
+          this.disableFlagStatus();
+          // this.disableFlag = false;
+          if (res && res.code == 200) {
+            this.dialogVisible = false;
+
+            // this.$toast.success({ message: "成功" });
+            //调用父组件的查询方法
+            that.$emit("search");
+          } else {
+            // this.$toast.fail({ message: res.msg });
+            this.$message.error(res.msg);
+          }
+          //清空缓存
+          this.cancle();
+        }
+      );
+    },
+    editUserFun() {
+      let that = this;
+      let list = this.gradeList.filter((item) => {
+        return this.ruleForm.grade.includes(item.id);
+      });
+      //   this.queryOrgName();
+      //   this.userDetailData.orgNo = this.ruleForm.group[this.ruleForm.group.length - 1];
+      //   this.userDetailData.orgName = this.groupName;
+      this.userDetailData.gradeEntities = list;
+      this.userDetailData.userName = this.ruleForm.name;
+      this.userDetailData.gender = this.ruleForm.sex;
+      this.userDetailData.userNo = this.ruleForm.studentNumber;
+      this.$http.post(
+        `/user/addOrUpdateUser`,
+        {
+          ...this.userDetailData,
+        },
+        (res) => {
+          this.disableFlagStatus();
+          if (res && res.code == 200) {
+            this.dialogVisible = false;
+            // this.$toast.success({ message: "成功" });
+            //调用父组件的查询方法
+            that.$emit("search");
+            this.$message.success("修改成功");
+          } else {
+            // this.$toast.fail({ message: res.msg });
+            this.$message.error(res.msg);
+          }
+
+          //清空缓存
+
+          //清空缓存
+        }
+      );
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.el-form-item {
+  margin-bottom: 5px !important;
+}
+.dig_update /deep/.el-cascader {
+  position: relative;
+  font-size: 14px;
+  line-height: 40px;
+  width: 100%;
+}
+.dig_update /deep/.el-dialog {
+  box-shadow: none !important;
+  background: transparent !important;
+}
+.demo-ruleForm /deep/ .el-form-item {
+  margin-right: 10px;
+  vertical-align: top;
+  display: flex !important;
+  flex-direction: column;
+}
+.demo-ruleForm /deep/.el-form-item__label {
+  text-align: left;
+  vertical-align: middle;
+  float: left;
+  font-size: 14px;
+  color: #606266;
+  line-height: 40px;
+  padding: 0 12px 0 0;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.demo-ruleForm /deep/.el-input {
+  width: 100% !important;
+}
+
+.demo-ruleForm /deep/.el-input__inner {
+  width: 100% !important;
+  background-color: #f7f7f7;
+  border: 0px;
+}
+
+.dig_button {
+  display: flex;
+  width: 100%;
+  justify-content: space-around;
+}
+
+.demo-ruleForm {
+  background-color: #ffffff;
+  // border-radius: 20px;
+  margin-right: -10px;
+  margin-top: -10px;
+  padding-right: 100px;
+  padding-left: 100px;
+  border-radius: 20px;
+  padding-top: 20px;
+  padding-bottom: 40px;
+  .dig_title {
+    margin-bottom: 30px;
+    text-align: center;
+    font-weight: 700;
+  }
+}
+</style>

+ 4 - 4
src/components/manageRegister.vue

@@ -32,7 +32,7 @@
                 clearable
               ></el-cascader>
             </el-form-item>
-            <el-form-item label="选择管理班级" prop="grade">
+            <!-- <el-form-item label="选择管理班级" prop="grade">
               <el-select
                 v-model="ruleForm.grade"
                 multiple
@@ -48,7 +48,7 @@
                 >
                 </el-option>
               </el-select>
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item label="账号" prop="studentNumber">
               <el-input v-model="ruleForm.studentNumber"></el-input>
             </el-form-item>
@@ -163,7 +163,7 @@ export default {
         //所属组织架构
         group: "",
         //所管理的班级
-        grade: "",
+        // grade: "",
         //学号
         studentNumber: "",
         //姓名
@@ -177,7 +177,7 @@ export default {
       isView: true,
       rules: {
         group: [{ required: true, message: "请选择组织架构", trigger: "blur" }],
-        grade: [{ required: true, message: "请选择管理班级", trigger: "blur" }],
+        // grade: [{ required: true, message: "请选择管理班级", trigger: "blur" }],
         studentNumber: [{ required: true, message: "请输入账号", trigger: "blur" }],
         name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
         sex: [{ required: true, message: "请选择性别", trigger: "blur" }],

+ 2 - 2
src/utils/http.js

@@ -17,8 +17,8 @@ import { router } from "@/router";
 // axios.defaults.baseURL = 'https://child.hhnao.com:8070';
 // axios.defaults.baseURL = 'https://child.hhnao.com:8070';
 //https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx01d1a44906973cf2&redirect_uri=http%3A%2F%2F192.168.18.51%3A8085&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect
-// export const basePath='http://10.113.248.4:8089'
-export const basePath = "http://43.143.198.30:8089";
+export const basePath='http://10.113.248.4:8089'
+// export const basePath = "http://43.143.198.30:8089";
 // const base_url = 'http://43.143.198.30:8089/'
 // const base_url = 'http://10.113.248.4:8090/'
 // export const basePath='http://43.143.198.30:8086'

+ 65 - 34
src/views/loginNew.vue

@@ -2,24 +2,42 @@
   <div class="login-wrapper-new">
     <div class="login-left-new">
       <div class="cpdm_left">
-      <p class="aab">郑州大学大学生心理健康测评系统</p>
+        <p class="aab">郑州大学大学生心理健康测评系统</p>
         <!-- <img class="logo" src="../assets/img/login/login_logo.png" /> -->
         <img class="ye1" src="../assets/img/login/ye1.png" />
         <img class="ye2" src="../assets/img/login/ye2.png" />
       </div>
       <div class="cpdm_right">
-        <el-form class="login-left-middle-new" :model="ruleForm" :rules="rules" ref="ruleForm" :label-position="'left'"
-          label-width="10px" size="mini">
+        <el-form
+          class="login-left-middle-new"
+          :model="ruleForm"
+          :rules="rules"
+          ref="ruleForm"
+          :label-position="'left'"
+          label-width="10px"
+          size="mini"
+        >
           <div class="cpdm_right_top">
             <div class="cpdm_right_top_des">欢迎登录</div>
-            <img class="cpdm_right_top_img" src="../assets/img/login/login-left-top.png" />
+            <img
+              class="cpdm_right_top_img"
+              src="../assets/img/login/login-left-top.png"
+            />
           </div>
           <el-form-item label="" prop="account" class="account-new">
-            <el-input class="input-account-new" type="text" v-model="ruleForm.account" placeholder="请输入账号"
-              autocomplete="off">
+            <el-input
+              class="input-account-new"
+              type="text"
+              v-model="ruleForm.account"
+              placeholder="请输入账号"
+              autocomplete="off"
+            >
               <template slot="prefix">
                 <div class="account-inner">
-                  <img style="height: 20px; margin-left: 10px" src="../assets/img/login/persion1.png" />
+                  <img
+                    style="height: 20px; margin-left: 10px"
+                    src="../assets/img/login/persion1.png"
+                  />
                   <div class="account-inner-line"></div>
                 </div>
               </template>
@@ -27,11 +45,19 @@
             <!-- <img src="../assets/img/login/persion.png" /> -->
           </el-form-item>
           <el-form-item label="" class="account-two-new" prop="pass">
-            <el-input class="input-password-new" type="password" placeholder="请输入密码" v-model="ruleForm.pass"
-              autocomplete="off">
+            <el-input
+              class="input-password-new"
+              type="password"
+              placeholder="请输入密码"
+              v-model="ruleForm.pass"
+              autocomplete="off"
+            >
               <template slot="prefix">
                 <div class="account-inner">
-                  <img style="height: 20px; margin-left: 10px" src="../assets/img/login/password1.png" />
+                  <img
+                    style="height: 20px; margin-left: 10px"
+                    src="../assets/img/login/password1.png"
+                  />
                   <div class="account-inner-line"></div>
                 </div>
               </template>
@@ -133,7 +159,9 @@ export default {
         if (valid) {
           //?userNo=${this.ruleForm.account}&password=${md5(this.ruleForm.pass)}
           this.$http.get(
-            `/system/login?userNo=${this.ruleForm.account}&password=${md5(this.ruleForm.pass)}`,
+            `/system/login?userNo=${this.ruleForm.account}&password=${md5(
+              this.ruleForm.pass
+            )}`,
             //"/v1/system/login",
             {
               // userNo: this.ruleForm.account,
@@ -154,15 +182,17 @@ export default {
                 //如果类型返回的是0则为普通用户
                 //如果类型返回的是1则为管理员用户
                 // this.$router.push({ path: "/manage/adminHome" });
-                if (res.data.user.roleType == "3") {
+                if (res.data.user.roleType == "5") {
                   this.$router.push({ path: "/manage/generalSituation" });
                   // this.$router.push({ path: "/manage/userManage" });
-                } else if (res.data.user.roleType == "2") {
+                } else if (res.data.user.roleType == "4") {
                   // this.$router.push({ path: "/manage/userManage" });
                   this.$router.push({ path: "/manage/generalSituation" });
-                } else if (res.data.user.roleType == "1") {
+                } else if (res.data.user.roleType == "3") {
+                  this.$router.push({ path: "/manage/generalSituation" });
+                } else {
                   this.$message({
-                    message: '请使用管理账号登录',
+                    message: "请使用管理账号登录",
                     type: "error",
                   });
                 }
@@ -202,7 +232,7 @@ export default {
 };
 </script>
 <style scoped>
-.input-account-new>>>.el-input__inner {
+.input-account-new >>> .el-input__inner {
   background-color: #f7f7f7 !important;
   background-image: none;
   border-radius: 30px;
@@ -224,21 +254,21 @@ export default {
   width: 100%;
 }
 
-.account-new>>>.el-input {
+.account-new >>> .el-input {
   display: table !important;
 }
 
-.input-account-new>>>.el-input__inner::placeholder {
+.input-account-new >>> .el-input__inner::placeholder {
   /*color: #f9f9f9;*/
   color: #9a9a9a;
 }
 
-.input-password-new>>>.el-input__inner::placeholder {
+.input-password-new >>> .el-input__inner::placeholder {
   /*color: #f9f9f9;*/
   color: #9a9a9a;
 }
 
-.input-password-new>>>.el-input__inner {
+.input-password-new >>> .el-input__inner {
   background-color: #f7f7f7 !important;
   background-image: none;
   border-radius: 30px;
@@ -256,7 +286,8 @@ export default {
   width: 100%;
 }
 
-.button-new-parent>>>.el-form-item__content {}
+.button-new-parent >>> .el-form-item__content {
+}
 </style>
 
 <style lang="less" scoped>
@@ -468,20 +499,20 @@ export default {
     font-size: 24px;
   }
 }
-.aab{
-  color: #48D68E;
+.aab {
+  color: #48d68e;
   margin-left: 20px;
   margin-top: 40px;
-            font-weight: 700;
-            font-size: 24px;
-            -webkit-transform: skew(-10deg);
-            letter-spacing: 2px;
-            /* for Chrome||Safari */
-            -ms-transform: skew(-10deg);
-            /* for IE */
-            -moz-transform: skew(-10deg);
-            /* for Firefox */
-            -o-transform: skew(-10deg);
-            /* for Opera */
+  font-weight: 700;
+  font-size: 24px;
+  -webkit-transform: skew(-10deg);
+  letter-spacing: 2px;
+  /* for Chrome||Safari */
+  -ms-transform: skew(-10deg);
+  /* for IE */
+  -moz-transform: skew(-10deg);
+  /* for Firefox */
+  -o-transform: skew(-10deg);
+  /* for Opera */
 }
 </style>

+ 17 - 18
src/views/manage/instructorManage.vue

@@ -10,19 +10,19 @@
             <el-input
               v-model="studentNumber"
               clearable
-              placeholder="请输入号"
+              placeholder="请输入号"
             ></el-input
             >&nbsp;&nbsp;&nbsp;&nbsp;
-            <el-cascader
+            <!-- <el-cascader
              v-show="userInfo.roleType=='3'"
               placeholder="请选择组织架构"
               v-model="group"
               :options="groupData"
               :props="{ checkStrictly: true }"
               clearable
-            ></el-cascader>
+            ></el-cascader> -->
             <!-- :props="{ checkStrictly: true }" -->
-            <el-cascader
+            <!-- <el-cascader
               v-show="userInfo.roleType=='2'"
               placeholder="请选择组织架构"
               v-model="group"
@@ -30,7 +30,7 @@
             
               clearable
             ></el-cascader>
-            &nbsp;&nbsp;&nbsp;&nbsp;
+            &nbsp;&nbsp;&nbsp;&nbsp; -->
             <!-- <span style="font-size: 16px;">性别:</span>&nbsp;&nbsp; -->
             <div style="display: flex; flex-direction: row; align-items: center">
               <span
@@ -50,10 +50,10 @@
               >搜索</el-button
             >
             <el-button type="info" round @click="clearSearch">清空</el-button>
-            <el-button type="success" round class="add_class" @click="fileVisible = true"
+            <!-- <el-button type="success" round class="add_class" @click="fileVisible = true"
               >批量导入</el-button
-            >
-            <el-button type="info" round @click="addUser">单独注册</el-button>
+            > -->
+            <el-button type="success" class="add_class"  round @click="addUser">单独注册</el-button>
           </div>
         </el-col>
       </el-row>
@@ -135,7 +135,7 @@
       <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
       </el-pagination> -->
     </div>
-    <Register ref="register" @search="searchTarget" />
+    <InstructorRegister ref="register" @search="searchTarget" />
     <el-dialog
       class="dig_update"
       :visible.sync="centerDialogVisible"
@@ -210,20 +210,19 @@
 
           <!-- 先选择组织架构 -->
           <!-- :props="{ checkStrictly: true }" -->
-          <el-cascader
+          <!-- <el-cascader
+         
             placeholder="请选择组织架构"
             v-model="groupLead"
             :options="groupData"
             clearable
-          ></el-cascader>
+          ></el-cascader> -->
           <el-upload
             class="upload-demo"
             style="margin-top: 40px"
             drag
             :before-upload="beforeUploadFun"
-            :action="
-              basePath + `/user/userImport?orgNo=${groupLead[groupLead.length - 1]}`
-            "
+            :action="basePath + `/user/userImport?orgNo=${userInfo.orgNo}`"
             :on-success="fileSuccess"
             :on-error="fileError"
           >
@@ -256,12 +255,12 @@
 
 <script>
 import { oSessionStorage } from "../../utils/utils";
-import register from "../../components/Register.vue";
+import instructorRegister from "../../components/instructorRegister.vue";
 import { basePath } from "../../utils/http";
 export default {
   name: "userManage",
   components: {
-    Register: register,
+    InstructorRegister: instructorRegister,
   },
   data() {
     return {
@@ -424,7 +423,7 @@ export default {
               // console.log(forRes)
               let resultRes = this.deleteChildren(forRes);
               console.log("格式化的结构且去掉children");
-              
+
               this.groupData = resultRes[0].children;
             } else {
               this.groupData = [];
@@ -546,7 +545,7 @@ export default {
     searchList() {
       let url = `/user/findUserListByPage?pageSize=${this.pageSize}&pageNum=${
         this.pageNum
-      }${this.sex == "" ? "" : `&gender=${this.sex}`}${
+      }&roleType=3${this.sex == "" ? "" : `&gender=${this.sex}`}${
         this.group.length == 0
           ? `&orgNo=${this.userInfo.orgNo}`
           : `&orgNo=${this.group[this.group.length - 1]}`

+ 2 - 2
src/views/manage/manageMain.vue

@@ -369,7 +369,7 @@ export default {
       console.log(this.userInfo);
       console.log(this.userType);
       //假如当前的用户是管理员
-      if (this.userType == "3") {
+      if (this.userType == "5") {
         this.menuList = [
           {
             id: "10",
@@ -451,7 +451,7 @@ export default {
         //     this.menuList[i].showItem = false;
         //   }
         // }
-      } else if (this.userType == "2") {
+      } else if (this.userType == "4") {
         //
         this.menuList = [
           {

+ 1 - 1
src/views/manage/teacherManage.vue

@@ -546,7 +546,7 @@ export default {
     searchList() {
       let url = `/user/findUserListByPage?pageSize=${this.pageSize}&pageNum=${
         this.pageNum
-      }${this.sex == "" ? "" : `&gender=${this.sex}`}${
+      }&roleType=2${this.sex == "" ? "" : `&gender=${this.sex}`}${
         this.group.length == 0
           ? `&orgNo=${this.userInfo.orgNo}`
           : `&orgNo=${this.group[this.group.length - 1]}`