11wqe1 5 ay önce
ebeveyn
işleme
329a3bedd7

+ 1 - 1
src/common/apiConfig.js

@@ -48,7 +48,7 @@ export const API_CONFIG = {
   ////////////// 以下是账号审核的数据接口
 
   moveUser: {
-    functionName: "account_update_user", // 存储过程名称
+    functionName: "account_update_user2", // 存储过程名称
   },
 
   // 获取所有记录接口(综合了待审核、已通过、已拒绝的数据)

+ 780 - 15
src/components/examine.vue

@@ -183,6 +183,249 @@
             </el-table-column>
           </el-table>
         </div>
+        <!-- 学习名称组织名称表单区域 -->
+        <el-dialog
+          title="补充信息"
+          class="table"
+          :visible.sync="isOrgFormVisible"
+          :before-close="close_table"
+          width="920px"
+        >
+          <!-- 搜索框区域 -->
+          <div class="input-container">
+            <div class="input_box">
+              <input
+                type="text"
+                v-model="searchQuery"
+                placeholder="搜索学校"
+                class="table_find"
+              />
+            </div>
+            <el-select
+              style="margin-left: 10px"
+              v-model="school.OrgId"
+              placeholder="请选择组织"
+              class="custom-select"
+              @change="ajax_org_check"
+              filterable
+              clearable
+            >
+              <!-- 动态生成 <el-option> -->
+              <el-option
+                v-for="(org, index) in organizations"
+                :key="index"
+                :label="org.name"
+                :value="org.id"
+              >
+                {{ org.name }}
+              </el-option>
+            </el-select>
+          </div>
+          <div class="table_down">
+            <div v-if="cn_org">
+              <div class="checkbox-container">
+                <!-- 循环渲染每个学校 -->
+                <div
+                  v-for="(school, index) in schoolList"
+                  :key="index"
+                  class="checkbox_comment"
+                >
+                  <div class="checkbox-left">
+                    <label class="checkbox-label">
+                      <!-- 学校名称,显示 school.name -->
+                      <a>{{ school.name }}</a>
+                    </label>
+                    <!-- 单选框,使用 v-model 绑定到一个变量 -->
+                    <input
+                      type="radio"
+                      class="checkbox_input_org"
+                      name="school_selection"
+                      :value="school.id"
+                      v-model="selectedSchool"
+                    />
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <!-- 按钮区域 -->
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="close_table">取 消</el-button>
+            <el-button type="primary" @click="add_school_dialog = true"
+              >新增学校</el-button
+            >
+            <el-button type="primary" @click="add_org_dialog = true"
+              >新增组织</el-button
+            >
+            <el-button type="primary" v-if="!addBtn" @click="ajax_move_user(1,AddUserInfo)">通过</el-button>
+            <el-button type="primary" v-if="addBtn" @click="bactchConfirm(1)">批量通过</el-button>
+          </div>
+        </el-dialog>
+
+
+    <!-- 新增学校弹窗 -->
+    <el-dialog
+      title="新增学校"
+      class="table"
+      :visible.sync="add_school_dialog"
+      :before-close="close_add_school"
+      width="700px"
+    >
+      <div class="el_dialog_school_content">
+        <form class="el-form">
+          <!-- 学校名称 -->
+          <div class="el-form-item" style="margin-top: 15px">
+            <label class="el-form-item__label" style="width: 100px"
+              >学校名称</label
+            >
+            <div class="el-form-item__content" style="margin-left: 5px">
+              <span>
+                <div class="add_input el-input el-input--suffix">
+                  <input
+                    v-model="sch_name"
+                    type="text"
+                    autocomplete="off"
+                    placeholder="学校名称"
+                    class="el-input__inner"
+                  />
+                </div>
+              </span>
+            </div>
+          </div>
+          <!-- 地区 -->
+          <div class="el-form-item">
+            <label class="el-form-item__label" style="width: 100px">地区</label>
+            <div class="el-form-item__content" style="margin-left: 5px">
+              <span>
+                <div class="add_input el-input el-input--suffix">
+                  <input
+                    v-model="region"
+                    type="text"
+                    autocomplete="off"
+                    placeholder="请输入地区"
+                    class="el-input__inner"
+                  />
+                </div>
+              </span>
+            </div>
+          </div>
+          <!-- 学校编码 -->
+          <div class="el-form-item">
+            <label class="el-form-item__label" style="width: 100px"
+              >学校编码</label
+            >
+            <div class="el-form-item__content" style="margin-left: 5px">
+              <span>
+                <div class="add_input el-input el-input--suffix">
+                  <input
+                    v-model="schoolCode"
+                    type="text"
+                    autocomplete="off"
+                    placeholder="请输入编码"
+                    class="el-input__inner"
+                  />
+                </div>
+              </span>
+            </div>
+          </div>
+      
+          <!-- 上级组织 -->
+          <div class="el-form-item">
+            <label class="el-form-item__label" style="width: 100px"
+              >上级组织</label
+            >
+            <div class="el-form-item__content" style="margin-left: 5px">
+              <span>
+                <div class="add_input el-input el-input--suffix">
+                  <el-form
+                    :model="school"
+                    ref="form"
+                  >
+                    <el-select
+                      v-model="school.parentOrgId"
+                      placeholder="请选择组织"
+                      class="custom-select"
+                      filterable
+                    >
+                      <el-option
+                        v-for="(org, index) in organizations"
+                        :key="index"
+                        :label="org.name"
+                        :value="org.id"
+                      >
+                        {{ org.name }}
+                      </el-option>
+                    </el-select>
+                  </el-form>
+                </div>
+              </span>
+            </div>
+          </div>
+        </form>
+      </div>
+      <!-- 按钮区域 -->
+      <div slot="footer" class="el-dialog__footer">
+        <el-button @click="add_school_dialog = false">取 消</el-button>
+        <el-button type="primary" @click="ajax_add_school">确认</el-button>
+      </div>
+    </el-dialog>
+    <!-- 新增组织弹窗 -->
+    <el-dialog
+      title="新增组织"
+      class="table"
+      :visible.sync="add_org_dialog"
+      :before-close="close_add_org"
+      width="700px"
+    >
+      <div class="el_dialog_org_content">
+        <form class="el-form">
+          <!-- 组织名称 -->
+          <div class="el-form-item" style="margin-top: 15px">
+            <label class="el-form-item__label" style="width: 100px"
+              >组织名称</label
+            >
+            <div class="el-form-item__content" style="margin-left: 5px">
+              <span>
+                <div class="add_input el-input el-input--suffix">
+                  <input
+                    v-model="orgName"
+                    type="text"
+                    autocomplete="off"
+                    placeholder="组织名称"
+                    class="el-input__inner"
+                  />
+                </div>
+              </span>
+            </div>
+          </div>
+          <!-- 地区 -->
+          <div class="el-form-item">
+            <label class="el-form-item__label" style="width: 100px"
+              >组织编码</label
+            >
+            <div class="el-form-item__content" style="margin-left: 5px">
+              <span>
+                <div class="add_input el-input el-input--suffix">
+                  <input
+                    v-model="randomCode"
+                    type="text"
+                    autocomplete="off"
+                    placeholder="请输入随机码"
+                    class="el-input__inner"
+                  />
+                </div>
+              </span>
+            </div>
+          </div>
+        </form>
+      </div>
+      <!-- 按钮区域 -->
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="add_org_dialog = false">取 消</el-button>
+        <el-button type="primary" @click="ajax_add_org">确认</el-button>
+      </div>
+    </el-dialog>
+
         <!-- 分页组件 -->
         <el-pagination
           :current-page="currentPage"
@@ -207,6 +450,42 @@ export default {
   components: {},
   data() {
     return {
+      addBtn : 0, //批量按钮显示
+      //移动弹窗
+      isOrgFormVisible: false,
+      //新增组织
+      add_org_dialog: false,
+      //学校弹窗
+      add_school_dialog: false,
+      //移动组织初始化
+      cn_org: true,
+      searchQuery: "", // 用来存储输入框的值
+      // 用来存储选中的学校名称
+      selectedSchool: "",
+      // 用于存放从后台获取的组织数据
+      organizations: [],
+      cn_school: [],// 用于存放从后台获取的学校数据
+      school: {
+        OrgId: null, // 初始化 OrgId 为 null 或适当的默认值
+      },
+      // 储存筛选完后的学校
+      schoolList:[],
+
+      AddUserInfo:{},
+
+      //新增组织的变量定义
+      orgName: "", // 组织名称
+      u_create: "", // 创建人
+      randomCode: "", //随机码(可以为空)
+      uLogin: "1", // 登录状态 (1 或 2)
+      radio: "1",
+      //新增学校参数的定义
+      sch_name: "", //学校名称
+      region: "", //地区
+      schoolType: "1", //学校单选框类型
+      schoolCode: "", //学校编码
+      loginPermission: "1", //是否允许登录
+
       checked: true,
       selectedOptions: [], // 用于存储选中的复选框
       showCompany: false, // 默认隐藏
@@ -234,10 +513,226 @@ export default {
       sortO: "DESC",
     };
   },
+  watch: {
+    school:{
+      deep:true,
+      handler:function(newVal){
+        this.schoolList = []
+        if (newVal.OrgId) {
+          this.schoolList = this.cn_school.filter((e) => {
+            return e.org == newVal.OrgId
+          })
+          if (this.searchQuery) {
+            this.schoolList = this.schoolList.filter((e) => {
+              return e.name.includes(this.searchQuery)
+            })
+          }
+        }else if (this.searchQuery) {
+            this.schoolList = this.cn_school.filter((e) => {
+              return e.name.includes(this.searchQuery)
+            })
+        } else{
+          this.schoolList = this.cn_school
+        }
+        console.log('value is change',newVal)
+      },
+      immediate:true
+    },
+    searchQuery(newVal){  
+      this.schoolList = []
+        if (this.school.OrgId) {
+          this.schoolList = this.cn_school.filter((e) => {
+            return e.org == this.school.OrgId
+          })
+          if (this.searchQuery) {
+            this.schoolList = this.schoolList.filter((e) => {
+              return e.name.includes(this.searchQuery)
+            })
+          }
+          console.log('111');
+          
+        } else if (newVal) {
+          this.schoolList = this.cn_school.filter((e) => {
+            return e.name.includes(newVal)
+          })
+          console.log('222');
+
+        } else{
+          this.schoolList = this.cn_school
+        }
+        console.log('value is change',newVal)
+    },
+  },
   computed: {
     ...mapGetters(["userid"]),
   },
   methods: {
+    //组织查询
+    ajax_org() {
+      const params = [API_CONFIG.ajax_org]; // 使用配置中的接口参数
+      this.$ajax
+        .post(API_CONFIG.baseUrl, params)
+        .then((res) => {
+          // console.log("返回的数据为:", res.data);  // 检查返回的数据
+          if (res.data && Array.isArray(res.data[0])) {
+            // 使用 map() 提取所有组织名称
+            this.organizations = res.data[0].map((item) => ({
+              name: item.name,
+              id: item.id,
+            }));
+          }
+          // console.log("返回的结果为:",this.organizations);
+        })
+        .catch((err) => {
+          this.$message.error("查询失败");
+          console.error("请求失败,错误信息:", err);
+        });
+    },
+    // 学校查询
+    ajax_school() {
+    const params = [API_CONFIG.ajax_school]; // 使用配置中的接口参数
+    this.$ajax
+      .post(API_CONFIG.baseUrl, params)
+      .then((res) => {
+        // console.log("返回的数据为:", res.data);  // 检查返回的数据
+        if (res.data && Array.isArray(res.data[0])) {
+          // 将 name 和 org 都存入 cn_school 数组中
+          this.cn_school = res.data[0].map((item) => ({
+            name: item.name,
+            id: item.id,
+            org: item.org,
+          }));
+          this.schoolList = res.data[0].map((item) => ({
+            name: item.name,
+            id: item.id,
+            org: item.org,
+          }));
+          console.log(this.cn_school);
+        }
+      })
+      .catch((err) => {
+        this.$message.error("查询失败");
+        console.error("请求失败,错误信息:", err);
+      });
+    },
+    //新增学校
+    ajax_add_school() {
+      // 校验学校名称是否为空
+      if (!this.sch_name || this.sch_name.trim() === "") {
+        this.$message.error("学校名称不能为空!");
+        return;
+      }
+
+      // 构建请求参数
+      let params = [
+        {
+          functionName: API_CONFIG.ajax_add_school.functionName, // 调用存储过程的名称
+          u_name: this.sch_name, // 学校名称,绑定到 orgName
+          u_org: this.school.parentOrgId || "", // 选择的组织的 ID,绑定到 school.parentOrgId,如果没有选择则为空
+          u_dest: this.region || "", // 地区,绑定到 region,如果为空则传空字符串
+          u_type: this.schoolType || "", // 学校类型,绑定到 schoolType,如果没有选择则为空
+          u_code: this.schoolCode || "", // 学校编码,绑定到 schoolCode,如果为空则传空字符串
+          u_isLogin: this.loginPermission === "1" ? 1 : 2, // 是否允许登录,默认传 2(不允许登录)如果没有选择
+          uid: this.userid,
+        },
+      ];
+
+      // 发起请求
+      this.$ajax
+        .post(API_CONFIG.baseUrl, params)
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "已成功执行!",
+          });
+          // 刷新学校列表
+          this.ajax_school();
+          // 关闭弹窗
+          this.add_school_dialog = false;
+          // 清空输入框、下拉菜单选择和单选框
+          this.sch_name = ""; // 清空学校名称
+          this.school.parentOrgId = ""; // 清空组织选择
+          this.region = ""; // 清空地区选择
+          this.schoolType = "1"; // 清空学校类型选择
+          this.schoolCode = ""; // 清空学校编码
+          this.loginPermission = "1"; // 清空登录权限的选择
+        })
+        .catch((err) => {
+          this.$message.error("插入失败");
+          console.error("请求失败,错误信息:", err);
+        });
+    },
+    //新增组织
+    ajax_add_org() {
+      // 获取弹窗中的输入内容
+      let orgName = this.orgName; // 组织名称
+      let randomCode = this.randomCode || ""; // 随机码(可为空)
+      let uLogin = this.radio; // 获取复选框选中的值(1 或 2)
+
+      // 验证组织名称不能为空
+      if (!orgName) {
+        this.$message.error("组织名称不能为空");
+        return;
+      }
+
+      // 构造请求参数
+      let params = [
+        {
+          functionName: API_CONFIG.ajax_add_org.functionName, // 调用存储过程的名称
+          u_name: orgName, // 组织名称
+          u_create: this.userid, // u_create 固定为0
+          u_code: randomCode, // 随机码(可以为空)
+          u_login: uLogin, // 登录状态
+        },
+      ];
+
+      // 发起请求
+      this.$ajax
+        .post(API_CONFIG.baseUrl, params)
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "已成功执行!",
+          });
+          // 刷新组织列表
+          this.ajax_org();
+          //关闭弹窗
+          this.add_org_dialog = false;
+          // 清空输入框、下拉菜单选择和单选框
+          this.orgName = ""; // 清空学校名称
+          this.randomCode = ""; // 清空地区选择
+          this.uLogin = "1"; // 清空学校类型选择
+        })
+        .catch((err) => {
+          this.$message.error("插入失败");
+          console.error("请求失败,错误信息:", err);
+        });
+    },
+
+    //新增学校关闭
+    close_add_school() {
+      this.add_school_dialog = false;
+    },
+    //组织下拉菜单查询
+    ajax_org_check() {
+      this.selectedSchool = "";
+    },
+    // 移动关闭按钮
+    close_table() {
+      this.isOrgFormVisible = false;
+      this.selectedSchool = '';
+      // 清空输入框、下拉菜单选择和单选框
+      this.sch_name = ""; // 清空学校名称
+      this.school.parentOrgId = ""; // 清空组织选择
+      this.region = ""; // 清空地区选择
+      this.schoolType = "1"; // 清空学校类型选择
+      this.schoolCode = ""; // 清空学校编码
+      this.loginPermission = "1"; // 清空登录权限的选择
+      // 清空输入框、下拉菜单选择和单选框
+      this.orgName = ""; // 清空学校名称
+      this.randomCode = ""; // 清空地区选择
+      this.uLogin = "1"; // 清空学校类型选择
+    },
     // 获取状态文本
     getStatusText(status) {
       const statusMap = {
@@ -324,6 +819,8 @@ export default {
         dest: "",
         eduid: "",
       };
+      console.log('params',params);
+      
       addUser(params)
         .then((response) => {
           if (response) {
@@ -347,6 +844,11 @@ export default {
       const confirmationMessage = type === 1 ? "您确定同意这些用户申请并创建吗?" : type ==0 ? "您确定将这些用户移动至待审核吗?" : "您确定忽略这些用户申请吗?";
       const requestType = type;
 
+      if (!this.isOrgFormVisible && type == 1) {
+        this.addBtn = 1
+        return this.isOrgFormVisible = true
+      }
+
       // 弹出确认框
       this.$confirm(confirmationMessage, "确认操作", {
         confirmButtonText: "确定",
@@ -359,6 +861,7 @@ export default {
             const params = [{
               functionName: API_CONFIG.moveUser.functionName,
               uid: row.id,
+              oid:  this.selectedSchool,
               type: requestType,
               euid: this.userid,
             }];
@@ -367,6 +870,8 @@ export default {
               const res = await this.$ajax.post(API_CONFIG.baseUrl, params);
               console.log(res);
               if (type === 1) {
+                row.oid =  this.selectedSchool
+
                 await this.addUser(row);
               } else {
                 this.$message.success("操作成功");
@@ -377,6 +882,7 @@ export default {
               console.error("请求失败,错误信息:", err);
             }
           }
+          this.close_table()
 
           // 所有请求完成后刷新表格数据
           await this.ajaxAll();
@@ -399,8 +905,14 @@ export default {
     },
     // 忽略操作,将数据移到已忽略
     ajax_move_user(type, row) {
+      this.AddUserInfo = row
       let string = "";
       if (type == 1) {
+        if (row.type == 1) return
+        if (!row.oid && !this.selectedSchool) {
+          this.addBtn = 0
+          return this.isOrgFormVisible = true
+        }
         string = "您确定同意此用户申请并创建吗?";
       } else if (type == 2) {
         string = "您确定忽略此用户申请吗?";
@@ -421,10 +933,11 @@ export default {
             {
               functionName: API_CONFIG.moveUser.functionName, // 这里是将数据移至已忽略状态的操作,使用配置中的存储过程名称
               uid: row.id,
+              oid:  this.selectedSchool,
               type: _type,
               euid: this.userid,
             },
-          ];
+          ]; 
 
           // 发起请求
           this.$ajax
@@ -432,6 +945,7 @@ export default {
             .then((res) => {
               console.log(res);
               if (type == 1) {
+                row.oid =  this.selectedSchool
                 this.addUser(row);
               } else {
                 this.$message({
@@ -441,6 +955,7 @@ export default {
                 // 更新数据状态
                 this.ajaxAll(); // 例如刷新表格数据
               }
+              this.close_table()
 
               console.log("此条数据处理后的id为:", row.id);
             })
@@ -456,6 +971,9 @@ export default {
   },
   mounted() {
     this.ajaxAll(); // 组件挂载后调用 ajaxAll 方法
+    this.ajax_org(); // 组件创建时,立即调用 ajax_org 获取数据
+    this.ajax_school(); // 组件创建时,立即调用 ajax_org 获取数据
+
   },
 };
 </script>
@@ -621,16 +1139,23 @@ export default {
 }
 
 /* 复选框容器样式 */
-.checkbox-container {
-  display: flex;
-  flex-direction: row;
+/* .checkbox-container { */
+  /* display: flex; */
+  /* flex-direction: row; */
   /* 水平排列 */
-  gap: 10px;
+  /* gap: 10px; */
   /* justify-content: space-between; 在两排之间留出空间 */
-  margin-top: 100px;
+  /* margin-top: 100px; */
   /* 添加顶部间距 */
+/* } */
+/* 弹窗选择区域 */
+.checkbox-container {
+  height: auto;
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
 }
-
 /* 复选框组样式 */
 .checkbox-group {
   float: right;
@@ -642,21 +1167,108 @@ export default {
 }
 
 /* 复选框在右侧样式 */
-.checkbox-left {
-  flex-direction: row-reverse;
+/* .checkbox-left { */
+  /* flex-direction: row-reverse; */
   /* 选择框在右侧 */
-  display: flex;
+  /* display: flex; */
   /* 使用 Flexbox */
-  align-items: center;
+  /* align-items: center; */
   /* 垂直居中 */
-  position: relative;
+  /* position: relative; */
   /* 为下划线定位 */
-  padding-top: 15px;
+  /* padding-top: 15px; */
   /* 设置文本与下划线之间的间距 */
+/* } */
+
+/* .checkbox-left部分 */
+.checkbox-left {
+  flex-grow: 1; /* 使该部分占据剩余空间 */
+  display: flex;
+  align-items: center;
+}
+
+.checkbox-left a {
+  color: #000000;
+  font-size: 14px;
+  margin-left: 70px; /* Adjust the spacing between text and checkbox */
+  float: left;
+  white-space: nowrap; /* Prevent line breaks */
+  overflow: hidden; /* Hide overflow */
+  text-overflow: ellipsis; /* Add ellipsis for overflow text */
+  max-width: 240px; /* Set a maximum width to trigger ellipsis */
+}
+/* 去除原生复选框样式 */
+.checkbox_input {
+  -webkit-appearance: none; /* 去除Safari等浏览器默认样式 */
+  -moz-appearance: none; /* 去除Firefox的默认样式 */
+  appearance: none; /* 去除默认样式 */
+  width: 20px; /* 设置复选框的宽度 */
+  height: 20px; /* 设置复选框的高度 */
+  border: 1.5px solid #000000; /* 默认边框颜色 */
+  position: relative; /* 设置定位,方便后面绝对定位勾号 */
+  cursor: pointer; /* 鼠标悬停时显示为可点击状态 */
+  float: right;
+  margin-top: 20px;
+  margin-right: 10px;
+}
+.checkbox_input:checked {
+  background-color: #007bff; /* 选中时背景颜色为蓝色 */
+  border-color: #007bff; /* 边框颜色为蓝色 */
+}
+/* 选中时的白色勾号 */
+.checkbox_input:checked::before {
+  content: "";
+  position: absolute;
+  top: 0px;
+  left: 5px;
+  width: 6px;
+  height: 12px;
+  border: solid white;
+  border-width: 0 2px 2px 0;
+  transform: rotate(45deg);
+}
+/* 去除原生复选框样式 */
+.checkbox_input_org {
+  -webkit-appearance: none; /* 去除Safari等浏览器默认样式 */
+  -moz-appearance: none; /* 去除Firefox的默认样式 */
+  appearance: none; /* 去除默认样式 */
+  width: 20px; /* 设置复选框的宽度 */
+  height: 20px; /* 设置复选框的高度 */
+  border: 1.5px solid #000000; /* 默认边框颜色 */
+  cursor: pointer; /* 鼠标悬停时显示为可点击状态 */
+  position: absolute; /* 使用绝对定位,确保其位于右侧 */
+  right: 15px; /* 右侧间距 */
+}
+/* 组织表的选择框样式 */
+/* 选中时的样式 */
+.checkbox_input_org:checked {
+  background-color: #007bff; /* 选中时背景颜色为蓝色 */
+  border-color: #007bff; /* 边框颜色为蓝色 */
+}
+
+/* 选中时的白色勾号 */
+.checkbox_input_org:checked::before {
+  content: "";
+  position: absolute;
+  top: 0px;
+  left: 5px;
+  width: 6px;
+  height: 12px;
+  border: solid white;
+  border-width: 0 2px 2px 0;
+  transform: rotate(45deg);
+}
+/* 组织名称 */
+.checkbox-company {
+  margin-top: 60px; /* 可选:设置顶部间距 */
+  float: left;
+  /* border: 1px solid red; */
+  height: auto;
+  width: 350px;
 }
 
 /*复选框文本样式 */
-.checkbox-left::after {
+/* .checkbox-left::after {
   content: "";
   display: block;
   width: 150%;
@@ -665,7 +1277,7 @@ export default {
   position: absolute;
   bottom: 0;
   left: -12%;
-}
+} */
 
 hr {
   margin: 20px 0;
@@ -912,4 +1524,157 @@ hr {
   overflow: auto;
   height: calc(100% - 75px);
 }
+
+.table >>> .el-dialog__header {
+  padding: 15px 20px;
+  background: #454545;
+}
+
+.table >>> .el-dialog__title {
+  color: #fff;
+}
+
+.input_box {
+  position: relative;
+  height: 40px;
+  width: 200px;
+}
+/* 输入框容器*/
+.input-container {
+  width: 100%;
+  display: flex;
+  align-items: center;
+  /* border: 1px solid red; */
+}
+/* 搜索框 */
+.table_find {
+  width: 100%;
+  height: 40px;
+  padding-right: 50px;
+  padding-left: 10px;
+  border: 1px solid rgb(189, 189, 189);
+  font-size: 15px;
+  outline: none;
+  cursor: pointer;
+  border-radius: 10px;
+  box-sizing: border-box;
+}
+
+/* 自定义 el-select 的外部样式 */
+.custom-select {
+  width: 220px; /* 设置宽度 */
+  font-size: 14px; /* 设置字体大小 */
+}
+
+/* 修改 el-input__inner 样式 */
+.custom-select .el-input__inner {
+  height: 30px; /* 修改输入框的高度 */
+  font-size: 16px; /* 修改字体大小 */
+  padding-left: 15px; /* 修改左边的内边距 */
+  border-radius: 6px; /* 设置圆角 */
+  border: 1px solid #dcdfe6; /* 设置边框 */
+}
+
+/* 如果需要修改选项的样式,可以使用 .el-select-dropdown__item */
+.custom-select .el-select-dropdown__item {
+  font-size: 14px; /* 修改下拉框选项的字体大小 */
+  padding: 12px; /* 修改选项的内边距 */
+}
+
+.custom-select .el-select-dropdown__item.selected {
+  background-color: #409eff; /* 设置选中项的背景色 */
+  color: #fff; /* 设置选中项的字体颜色 */
+}
+/* 移动弹窗的选择区域 */
+.table_down {
+  width: 100%;
+  height: 450px;
+  /* 添加滚动条 */
+  overflow-y: auto; /* 当内容超出时,显示垂直滚动条 */
+  max-height: 450px; /* 设置最大高度以限制显示区域 */
+}
+
+/* .checkbox_comment样式 */
+.checkbox_comment {
+  position: relative; /* 为复选框和下划线提供定位 */
+  width: 50%;
+  height: 50px;
+  margin-top: 10px;
+  display: flex; /* 使用flexbox对齐 */
+  align-items: center; /* 垂直居中 */
+  justify-content: space-between; /* 确保文本和复选框分别位于两端 */
+  float: left;
+}
+/* 下划线 */
+.checkbox_comment::after {
+  content: "";
+  position: absolute;
+  bottom: 0;
+  left: 13%;
+  width: 250px;
+  height: 2px;
+  background-color: rgb(137, 137, 137);
+}
+/* 添加账户的容器 */
+.el-dialog__body {
+  color: #606266;
+  font-size: 14px;
+  height: 180px;
+}
+/* 新增组织的内容容器 */
+.el_dialog_org_content {
+  color: #606266;
+  font-size: 14px;
+  height: 120px;
+}
+/* 新增学校的内容容器 */
+.el_dialog_school_content {
+  color: #606266;
+  font-size: 14px;
+  /* height: 300px; */
+}/* 输入框 */
+.form_input {
+  width: 400px;
+}
+.el-form {
+  /* margin-left: 66px;
+  width: 60%; */
+  /* border: 1px solid red; */
+}
+/* 确认跟取消区域 */
+.form_tool {
+  margin-top: 20px;
+  float: left;
+  margin-left: 90px;
+}
+/* 按钮样式 */
+.form_tool .el-button {
+  width: 100px;
+}
+
+
+/* 新增学校按钮 */
+.add_school {
+  float: left;
+  margin-top: 40px;
+  margin-left: 100px;
+}
+.el-form-item {
+  margin-bottom: 22px;
+  display: flex;
+  align-items: center;
+  /* border: 1px solid black; */
+}
+.el-form-item__label {
+  font-size: 14px;
+  color: #606266;
+  line-height: 40px;
+  margin-left: 20px;
+  width: 70px;
+}
+.el-form-item__content {
+  line-height: 40px;
+  position: relative;
+  font-size: 14px;
+}
 </style>

+ 61 - 4
src/components/list.vue

@@ -117,7 +117,7 @@
           <div class="checkbox-container">
             <!-- 循环渲染每个学校 -->
             <div
-              v-for="(school, index) in getSchool3"
+              v-for="(school, index) in schoolList"
               :key="index"
               class="checkbox_comment"
             >
@@ -141,7 +141,7 @@
       </div>
       <!-- 按钮区域 -->
       <div slot="footer" class="dialog-footer">
-        <el-button @click="isOrgFormVisible = false">取 消</el-button>
+        <el-button @click="close_table">取 消</el-button>
         <el-button type="primary" @click="add_school_dialog = true"
           >新增学校</el-button
         >
@@ -401,7 +401,7 @@
           <!-- 地区 -->
           <div class="el-form-item">
             <label class="el-form-item__label" style="width: 100px"
-              >随机码</label
+              >组织编码</label
             >
             <div class="el-form-item__content" style="margin-left: 5px">
               <span>
@@ -581,6 +581,8 @@ export default {
   components: {},
   data() {
     return {
+      // 储存筛选完后的学校
+      schoolList:[],
       // 控制下拉菜单的显示与隐藏
       dropdownVisible: false,
       checked: true,
@@ -704,7 +706,56 @@ export default {
         : this.cn_school;
     },
   },
-  watch: {},
+  watch: {
+    school:{
+      deep:true,
+      handler:function(newVal){
+        this.schoolList = []
+        if (newVal.OrgId) {
+          this.schoolList = this.cn_school.filter((e) => {
+            return e.org == newVal.OrgId
+          })
+          if (this.searchQuery) {
+            this.schoolList = this.schoolList.filter((e) => {
+              return e.name.includes(this.searchQuery)
+            })
+          }
+        }else if (this.searchQuery) {
+            this.schoolList = this.cn_school.filter((e) => {
+              return e.name.includes(this.searchQuery)
+            })
+        } else{
+          this.schoolList = this.cn_school
+        }
+        console.log('value is change',newVal)
+      },
+      immediate:true
+    },
+    searchQuery(newVal){  
+      this.schoolList = []
+        if (this.school.OrgId) {
+          this.schoolList = this.cn_school.filter((e) => {
+            return e.org == this.school.OrgId
+          })
+          if (this.searchQuery) {
+            this.schoolList = this.schoolList.filter((e) => {
+              return e.name.includes(this.searchQuery)
+            })
+          }
+          console.log('111');
+          
+        } else if (newVal) {
+          this.schoolList = this.cn_school.filter((e) => {
+            return e.name.includes(newVal)
+          })
+          console.log('222');
+
+        } else{
+          this.schoolList = this.cn_school
+        }
+        console.log('value is change',newVal)
+    },
+  },
   methods: {
     handleSelectionChange(selectedRows) {
       this.checkArray = selectedRows.map((row) => row.userid);
@@ -720,6 +771,7 @@ export default {
     close_table() {
       this.isOrgFormVisible = false;
       this.isTableUseVisible = false;
+      this.selectedSchool = ''
     },
     // 新增账户
     nextStep() {
@@ -980,6 +1032,11 @@ export default {
               id: item.id,
               org: item.org,
             }));
+            this.schoolList= res.data[0].map((item) => ({
+              name: item.name,
+              id: item.id,
+              org: item.org,
+            }));
             console.log(this.cn_school);
           }
         })

+ 23 - 13
src/views/examineDialog.vue

@@ -9,7 +9,12 @@
         <div class="dialog-content">
           <div class="dialog-content-item">
             <div class="dialog-content-item-content1">
-              <span> 组织名称 </span>
+              <span> 
+                <img
+                  src="@/assets/startIcon.svg"
+                  alt="字符"
+                  class="search-icon2"
+                />组织名称 </span>
               <el-select
                 v-loading="orgLoading"
                 v-model="orgName"
@@ -30,7 +35,7 @@
               </el-select>
             </div>
 
-            <div class="dialog-content-item-content1">
+            <!-- <div class="dialog-content-item-content1">
               <span>
                 <img
                   src="@/assets/startIcon.svg"
@@ -57,7 +62,7 @@
                   {{ school.name }}
                 </el-option>
               </el-select>
-            </div>
+            </div> -->
 
             <div class="dialog-content-item-content1">
               <span>
@@ -161,14 +166,19 @@ export default {
   methods: {
     submitForm() {
       // 检查必填字段
-      // if (!this.orgName) {
-      //   this.$message.error("组织名称不能为空");
-      //   return;
-      // }
-      if (!this.schoolName) {
-        this.$message.error("学校选择不能为空");
+      if (!this.orgName) {
+        this.$message.error("组织名称不能为空");
         return;
       }
+
+      let orgC= this.orgs.find((item)=> {
+        return (item.id == this.orgName);
+      });
+
+      // if (!this.schoolName) {
+      //   this.$message.error("学校选择不能为空");
+      //   return;
+      // }
       if (!this.Name) {
         this.$message.error("姓名不能为空");
         return;
@@ -189,9 +199,9 @@ export default {
       // 添加审核接口
       let params = [
         {
-          functionName: "addExamineUser",
+          functionName: "addExamineUser2",
           org: this.orgName,
-          oid: this.schoolName,
+          orgCn: orgC.name,
           un: this.Name,
           usern: this.username,
           phone: this.phonenumber,
@@ -273,8 +283,8 @@ export default {
         });
     },
     orgChange(){
-      this.schoolName = ""
-      this.ajax_school()
+      // this.schoolName = ""
+      // this.ajax_school()
     },
     schoolChange(){
       for(var i = 0; i < this.schools.length; i++){