lsc 8 maanden geleden
bovenliggende
commit
614967bdca

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


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


+ 0 - 1
dist/css/examineDialog.c53af6eb.css

@@ -1 +0,0 @@
-body[data-v-ca7e8654],html[data-v-ca7e8654]{height:100%;margin:0;display:flex;justify-content:center;align-items:center}.dialog[data-v-ca7e8654]{width:100%;height:100%;background-color:#fff;overflow:auto}.dialog-header[data-v-ca7e8654],.dialog-main[data-v-ca7e8654],.dialog-title[data-v-ca7e8654]{padding:20px;box-sizing:border-box;width:100%}.search-icon[data-v-ca7e8654]{width:170px;height:50px;margin-top:30px}.search-icon2[data-v-ca7e8654]{width:10px;height:10px}.dialog-title h1[data-v-ca7e8654]{font-size:28px}.dialog-content-item-content1[data-v-ca7e8654]{font-size:15px;font-weight:550}.dialog-content-item-content1+.dialog-content-item-content1[data-v-ca7e8654]{margin-top:20px}.input[data-v-ca7e8654]{width:100%;padding:8px;margin-top:10px;border:1px solid #ccc;border-radius:4px;background-color:#f0f2f5;height:36px;outline:none}.user_p[data-v-ca7e8654]{height:50px}.button[data-v-ca7e8654]{width:100%;height:50px;background-color:#3681fc;color:#fff;border:none;border-radius:5px;font-size:16px;cursor:pointer;text-align:center;margin-top:10px}.close-btn[data-v-ca7e8654]{position:absolute;top:10px;right:10px;font-size:30px;background:none;border:none;color:#a8a8a8;cursor:pointer;transition:color .3s}[data-v-ca7e8654] .el-input__inner{background-color:#f0f2f5!important;border:none}[data-v-ca7e8654] .el-select .el-input__inner::-moz-placeholder{color:gray}[data-v-ca7e8654] .el-select .el-input__inner::placeholder{color:gray}

+ 1 - 0
dist/css/examineDialog.e572bf23.css

@@ -0,0 +1 @@
+body[data-v-609c0108],html[data-v-609c0108]{height:100%;margin:0;display:flex;justify-content:center;align-items:center}.dialog[data-v-609c0108]{width:100%;height:100%;background-color:#fff;overflow:auto}.dialog-header[data-v-609c0108],.dialog-main[data-v-609c0108],.dialog-title[data-v-609c0108]{padding:20px;box-sizing:border-box;width:100%}.search-icon[data-v-609c0108]{width:170px;height:50px;margin-top:30px}.search-icon2[data-v-609c0108]{width:10px;height:10px}.dialog-title h1[data-v-609c0108]{font-size:28px}.dialog-content-item-content1[data-v-609c0108]{font-size:15px;font-weight:550}.dialog-content-item-content1+.dialog-content-item-content1[data-v-609c0108]{margin-top:20px}.input[data-v-609c0108]{width:100%;padding:8px;margin-top:10px;border:1px solid #ccc;border-radius:4px;background-color:#f0f2f5;height:36px;outline:none}.input[data-v-609c0108] .el-input--suffix .el-input__inner{padding:0}.user_p[data-v-609c0108]{height:50px}.button[data-v-609c0108]{width:100%;height:50px;background-color:#3681fc;color:#fff;border:none;border-radius:5px;font-size:16px;cursor:pointer;text-align:center;margin-top:10px;outline:none}.close-btn[data-v-609c0108]{position:absolute;top:10px;right:10px;font-size:30px;background:none;border:none;color:#a8a8a8;cursor:pointer;transition:color .3s}[data-v-609c0108] .el-input__inner{background-color:#f0f2f5!important;border:none}[data-v-609c0108] .el-select .el-input__inner::-moz-placeholder{color:gray}[data-v-609c0108] .el-select .el-input__inner::placeholder{color:gray}

+ 1 - 1
dist/index.html

@@ -36,4 +36,4 @@
         width: 100%;
         background: #e6eaf0;
         font-family: '黑体';
-      }</style><script defer="defer" src="/js/chunk-vendors.0a9827dd.js"></script><script defer="defer" src="/js/app.bb4ed606.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.0b7520d9.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but userManage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
+      }</style><script defer="defer" src="/js/chunk-vendors.54a29291.js"></script><script defer="defer" src="/js/app.d4c8b48f.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.b5b59d6e.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but userManage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

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


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


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


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


File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-vendors.54a29291.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/chunk-vendors.54a29291.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/examineDialog.af519db0.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/examineDialog.af519db0.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/examineDialog.e22f4e89.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/examineDialog.e22f4e89.js.map


+ 4 - 0
src/api/user.js

@@ -19,6 +19,10 @@ export function getUser(data) {
   return axios.get(`${baseApi}/selectUser`, data)
 }
 
+
+export function addUser(data) {
+  return axios.post(`${baseApi}/batchRegistrationUser`, [data])
+}
 // // 登录
 // export function login(data) {
 //   return request({

+ 48 - 113
src/common/apiConfig.js

@@ -1,125 +1,60 @@
 // apiConfig.js
-import { baseApi } from '@/config'
+import { baseApi } from "@/config";
 export const API_CONFIG = {
-    // baseUrl: "http://10.3.16.166:7003/api/pbl/localPost", // 基础 API URL
-    baseUrl: `${baseApi}onlinePost`, // 基础 API URL
-    
-    ////////////// 以下是账号列表的数据接口
-    // 账户启用的接口
-    ajaxstart: {
-      functionName: "select_user_type1", 
-      r_type: null,
-      page:null,
-      num:null,
-    },
-    //停用或者启用的接口
-    userstate: {
-      functionName: "update_user_state", 
-    },
-    //设置管理员
-    ajax_admin: {
-      functionName: "update_user_admin", 
-    },
-    //学校查询
-    ajax_school: {
-      functionName: "select_school_name",  // 调用存储过程的名称
-      u_name: "",  // 用户输入的搜索关键词
-      u_org:  "" // 传入的组织 ID
-    },
-    //组织查询
-    ajax_org: {
-      functionName: "select_organization", 
-    },
-    //关键词查询
-    ajax_school_name: {
-      functionName: "select_school_name", 
-    },
-    //新增学校
-    ajax_add_school: {
-      functionName: "insert_school", 
-    },
-    //新增组织
-    ajax_add_org: {
-      functionName: "insert_org", 
-    },
-    //确认移动
-    ajax_confirm: {
-      functionName: "updata_user_o_s", 
-    },
-    ////////////// 以下是账号审核的数据接口
-    // 待审核数据接口
-    pending: {
-      functionName: "select_requestuser", 
-      r_type: 0,
-      page: 1,
-      r_num: 100
-    },
-  
-    // 已通过数据接口
-    approved: {
-      functionName: "select_requestuser", 
-      r_type: 1,
-      page: 1,
-      r_num: 100
-    },
-  
-    // 已拒绝数据接口
-    refused: {
-      functionName: "select_requestuser", 
-      r_type: 2,
-      page: 1,
-      r_num: 100
-    },
-   // 移动到已通过的操作
-  moveToApproved: {
-    functionName: "account_approve_user",  // 存储过程名称
-    successMessage: "数据已成功移动到已通过状态!",  // 成功后的提示信息
+  // baseUrl: "http://10.3.16.166:7003/api/pbl/localPost", // 基础 API URL
+  baseUrl: `${baseApi}onlinePost`, // 基础 API URL
+  ////////////// 以下是账号列表的数据接口
+  // 账户启用的接口
+  ajaxstart: {
+    functionName: "select_user_type1",
+    r_type: null,
+    page: null,
+    num: null,
   },
-
-  // 移动到已拒绝的操作
-  moveToRejected: {
-    functionName: "account_reject_user",  // 存储过程名称
-    successMessage: "数据已成功移动到已拒绝状态!",  // 成功后的提示信息
+  //停用或者启用的接口
+  userstate: {
+    functionName: "update_user_state",
   },
-
-  //在已拒绝区域点击移动至待审核
-  moveToPending: {
-    functionName: "account_move_to_pending",  // 存储过程名称
-    successMessage: "数据已成功移动到待审核状态!",  // 成功后的提示信息
+  //设置管理员
+  ajax_admin: {
+    functionName: "update_user_admin",
+  },
+  //学校查询
+  ajax_school: {
+    functionName: "select_school_name", // 调用存储过程的名称
+    u_name: "", // 用户输入的搜索关键词
+    u_org: "", // 传入的组织 ID
+  },
+  //组织查询
+  ajax_org: {
+    functionName: "select_organization",
+  },
+  //关键词查询
+  ajax_school_name: {
+    functionName: "select_school_name",
+  },
+  //新增学校
+  ajax_add_school: {
+    functionName: "insert_school",
   },
+  //新增组织
+  ajax_add_org: {
+    functionName: "insert_org",
+  },
+  //确认移动
+  ajax_confirm: {
+    functionName: "updata_user_o_s",
+  },
+  ////////////// 以下是账号审核的数据接口
 
+  moveUser: {
+    functionName: "account_update_user", // 存储过程名称
+  },
 
   // 获取所有记录接口(综合了待审核、已通过、已拒绝的数据)
   allRecords: {
     functionName: "select_requestuser", // 基本功能名
-    r_types: [0, 1, 2], // 这里包含待审核、已通过、已拒绝的数据类型
     page: 1,
-    r_num: 100,
-    processData(responses) {
-      // 这里处理所有记录的合并与格式化逻辑
-      const [pendingRes, approvedRes, refusedRes] = responses;
-
-      // 合并待审核、已通过、已拒绝的数据
-      const allData = [
-        ...pendingRes.data[0],  // 待审核数据
-        ...approvedRes.data[0], // 已通过数据
-        ...refusedRes.data[0],  // 已拒绝数据
-      ];
-
-      // 格式化数据
-      return allData.map(user => {
-        const status = user.type !== undefined && user.type !== null ? user.type : 0;  // 使用 type 替代 r_type
-        return {
-          company: user.schoolName || '未知',
-          phone: user.contact_info || '未知',
-          name: user.name || '未知',
-          submission_time: user.create_at || '未知',
-          remarks: user.remark || '未知',
-          Pending_time: user.active_at || '未知',
-          status: status,  // 保持原始的数字状态值
-          userid: user.id || '未知',
-        };
-      });
-    }
+    num: 10,
   },
-};
+};

+ 128 - 665
src/components/examine.vue

@@ -7,49 +7,49 @@
       <div class="button_top">
         <div class="examine_title">
           <a
-            @click="showPending"
+            @click="showData(0)"
             :style="{
-              color: isPending ? 'black' : 'rgb(179, 179, 179)',
+              color: type == 0 ? 'black' : 'rgb(179, 179, 179)',
               fontWeight: 'bold',
             }"
-            >待审核({{ tableData.length }})</a
+            >待审核({{ tableData }})</a
           >
         </div>
         <div class="examine_title">
           <a
-            @click="showApproved"
+            @click="showData(1)"
             :style="{
-              color: isApproved ? 'black' : 'rgb(179, 179, 179)',
+              color: type == 1 ? 'black' : 'rgb(179, 179, 179)',
               fontWeight: 'bold',
             }"
-            >已通过({{ approvedData.length }})</a
+            >已通过({{ approvedData }})</a
           >
         </div>
         <div class="examine_title">
           <a
-            @click="showRefused"
+            @click="showData(2)"
             :style="{
-              color: isRefused ? 'black' : 'rgb(179, 179, 179)',
+              color: type == 2 ? 'black' : 'rgb(179, 179, 179)',
               fontWeight: 'bold',
             }"
-            >已拒绝({{ RefusedData.length }})</a
+            >已拒绝({{ RefusedData }})</a
           >
         </div>
         <div class="examine_title">
           <a
-            @click="showAll"
+            @click="showData(3)"
             :style="{
-              color: isAll ? 'black' : 'rgb(179, 179, 179)',
+              color: type == 3 ? 'black' : 'rgb(179, 179, 179)',
               fontWeight: 'bold',
             }"
-            >全部记录({{ AllData.length }})</a
+            >全部记录({{ AllData }})</a
           >
         </div>
       </div>
 
       <div class="content">
         <!-- 待审核的数据 -->
-        <div class="tableBox" v-if="isPending">
+        <div class="tableBox">
           <!-- 禁用 stripe 属性,完全自定义背景色 -->
           <el-table
             :data="currentTableData"
@@ -58,11 +58,19 @@
             style="width: 100%"
             :header-cell-style="headerCellStyle"
           >
-            <el-table-column prop="company" label="组织名称" min-width="45">
-              <template slot-scope="scope">{{ scope.row.company }}</template>
+            <el-table-column label="组织名称" min-width="45" show-overflow-tooltip>
+              <template slot-scope="scope">{{
+                scope.row.orgName ? scope.row.orgName : "-"
+              }}</template>
+            </el-table-column>
+            <el-table-column label="学校名字" min-width="45" show-overflow-tooltip>
+              <template slot-scope="scope">{{
+                scope.row.schoolName ? scope.row.schoolName : "-"
+              }}</template>
             </el-table-column>
             <el-table-column
-              prop="phone"
+              show-overflow-tooltip
+              prop="contact_info"
               label="电话/邮箱"
               min-width="45"
             ></el-table-column>
@@ -74,28 +82,31 @@
               :label-class-name="'address-column'"
             ></el-table-column>
             <el-table-column
-              prop="submission_time"
+              prop="username"
+              label="账号"
+              min-width="45"
+              show-overflow-tooltip
+              :label-class-name="'address-column'"
+            ></el-table-column>
+            <el-table-column
+              prop="time"
               label="提交时间"
               min-width="45"
             ></el-table-column>
+            <el-table-column label="状态" min-width="45">
+              <template slot-scope="scope">{{
+                getStatusText(scope.row.type)
+              }}</template>
+            </el-table-column>
             <el-table-column
               prop="remarks"
               label="备注"
               min-width="45"
             ></el-table-column>
-            <el-table-column label="操作" min-width="35">
+            <el-table-column label="操作" width="150px" v-if="type == 0">
               <template slot-scope="{ row }">
                 <button
-                  @click="
-                    ajax_move_to_approved(
-                      row.userid,
-                      row.companyNumber,
-                      row.orgid,
-                      row.phone,
-                      row.name,
-                      row.submission_time
-                    )
-                  "
+                  @click="ajax_move_user(1, row)"
                   style="
                     color: #308fff;
                     background: none;
@@ -107,9 +118,9 @@
                   通过
                 </button>
                 <button
-                  @click="ajax_move_to_rejected(row.userid, row.companyNumber)"
+                  @click="ajax_move_user(2, row)"
                   style="
-                    color: #308fff;
+                    color: #ff2570;
                     background: none;
                     border: none;
                     cursor: pointer;
@@ -124,211 +135,23 @@
         </div>
         <!-- 分页组件 -->
         <el-pagination
-          v-if="Pending_request"
           :current-page="currentPage"
           :page-size="pageSize"
-          :page-sizes="pageSizeOptions"
-          :total="tableData.length"
-          @size-change="handlePageSizeChange"
+          :total="total"
           @current-change="handlePageChange"
           layout="total,prev, pager, next, jumper"
         >
         </el-pagination>
-
-        <!-- 已通过的数据 -->
-        <div class="tableBox" v-if="isApproved">
-          <el-table
-            :data="currentApprovedData"
-            stripe
-            border
-            style="width: 100%"
-            :header-cell-style="headerCellStyle"
-          >
-            <el-table-column prop="company" label="组织名称" min-width="40">
-              <template slot="default" slot-scope="scope">{{
-                scope.row.company
-              }}</template>
-            </el-table-column>
-            <el-table-column prop="phone" label="电话/邮箱" min-width="40" />
-            <el-table-column
-              prop="name"
-              label="姓名"
-              min-width="40"
-              show-overflow-tooltip
-              :label-class-name="'address-column'"
-            />
-            <el-table-column
-              prop="submission_time"
-              label="提交时间"
-              min-width="35"
-            />
-            <el-table-column prop="remarks" label="备注" min-width="35" />
-            <el-table-column prop="Pending_time" label="审核时间" width="300" />
-            <el-table-column
-              prop="open_organization"
-              label="开通组织"
-              width="395"
-            >
-              <template slot="default" slot-scope="scope">{{
-                scope.row.open_organization
-              }}</template>
-            </el-table-column>
-          </el-table>
-          <!-- 分页组件 -->
-          <el-pagination
-            :current-page="currentApprovedPage"
-            :page-size="pageSize"
-            :page-sizes="pageSizeOptions"
-            :total="approvedData.length"
-            @size-change="handlePageSizeChange"
-            @current-change="handleApprovedPageChange"
-            layout="total,sizes,prev, pager, next, jumper"
-          />
-        </div>
-
-        <!-- 已拒绝的数据 -->
-        <div class="tableBox" v-if="isRefused">
-          <el-table
-            :data="currentRefusedData"
-            stripe
-            border
-            style="width: 100%"
-            :header-cell-style="headerCellStyle"
-          >
-            <el-table-column prop="company" label="组织名称" min-width="40">
-              <template slot="default" slot-scope="scope">{{
-                scope.row.company
-              }}</template>
-            </el-table-column>
-            <el-table-column prop="phone" label="电话/邮箱" min-width="40" />
-            <el-table-column
-              prop="name"
-              label="姓名"
-              min-width="35"
-              show-overflow-tooltip
-              :label-class-name="'address-column'"
-            />
-            <el-table-column
-              prop="submission_time"
-              label="提交时间"
-              width="300"
-            />
-            <el-table-column prop="remarks" label="备注" min-width="40" />
-            <el-table-column
-              prop="Pending_time"
-              label="审核时间"
-              min-width="40"
-            />
-            <el-table-column label="操作" min-width="35">
-              <template slot-scope="{ row }">
-                <button
-                  @click="
-                    ajax__move_to_pending_from_rejected(
-                      row.userid,
-                      row.companyNumber
-                    )
-                  "
-                  style="
-                    color: #308fff;
-                    background: none;
-                    border: none;
-                    cursor: pointer;
-                    margin-left: 25px;
-                  "
-                >
-                  移动至待审核
-                </button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <!-- 分页组件 -->
-          <el-pagination
-            :current-page="currentRefusedPage"
-            :page-size="pageSize"
-            :page-sizes="pageSizeOptions"
-            :total="RefusedData.length"
-            @size-change="handlePageSizeChange"
-            @current-change="handleRefusedPageChange"
-            layout="total,sizes,prev, pager, next, jumper"
-          />
-        </div>
-
-        <!-- 全部记录的数据 -->
-        <div class="tableBox" v-if="isAll">
-          <el-table
-            :data="currentAllData"
-            stripe
-            border
-            style="width: 100%"
-            :header-cell-style="headerCellStyle"
-          >
-            <el-table-column prop="company" label="组织名称" min-width="40">
-              <template slot="default" slot-scope="scope">{{
-                scope.row.company
-              }}</template>
-            </el-table-column>
-            <el-table-column prop="phone" label="电话/邮箱" min-width="40" />
-            <el-table-column
-              prop="name"
-              label="姓名"
-              min-width="35"
-              show-overflow-tooltip
-              :label-class-name="'address-column'"
-            />
-            <el-table-column
-              prop="submission_time"
-              label="提交时间"
-              min-width="35"
-            />
-            <el-table-column prop="remarks" label="备注" min-width="35" />
-            <el-table-column
-              prop="Pending_time"
-              label="审核时间"
-              min-width="40"
-            />
-            <el-table-column label="操作" min-width="35" prop="status">
-              <template slot="default" slot-scope="scope">
-                <!-- 根据状态值显示不同颜色的按钮 -->
-                <el-button
-                  :type="getButtonType(scope.row.status)"
-                  :disabled="false"
-                  style="border-radius: 5px; padding: 4px 12px; font-size: 14px"
-                >
-                  {{ getStatusText(scope.row.status) }}
-                </el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <!-- 分页组件 -->
-          <el-pagination
-            :current-page="currentAllPage"
-            :page-size="pageSize"
-            :page-sizes="[5, 10, 25]"
-            :total="AllData.length"
-            @size-change="handlePageSizeChange"
-            @current-change="handleAllPageChange"
-            layout="total,sizes,prev, pager, next, jumper"
-          />
-        </div>
       </div>
     </div>
   </div>
 </template>
 
 <script>
-import { reactive } from "vue"; // 引入 reactive
 import { API_CONFIG } from "@/common/apiConfig";
-// import { ref } from 'vue';
-// 使用 ref() 包装数组
-// const myArray = ref([]);
-
-// // 更新数组时可以通过 .value 来访问
-// myArray.value.push(1);  // 这样修改数组是响应式的
+import { mapGetters } from 'vuex';
+import { addUser } from "@/api/user.js"
 
-// // 使用 watch 监听
-// watch(() => myArray.value, (newValue) => {
-//   console.log(newValue);
-// });
 export default {
   name: "IndexTable",
   components: {},
@@ -340,78 +163,25 @@ export default {
       selectedOrg: "CN", // 默认选中CN组织
       checkboxStates: Array(10).fill(false), // 确保初始化为一个包含10个元素的数组
       selectedSchools: Array(16).fill(""), // 确保初始化为一个包含16个空字符串的数组
-      showCompanyList: reactive(Array(8).fill(false)), // 确保初始化为一个包含8个元素的数组
       button: Array(10).fill(false), // 确保初始化为一个包含10个元素的数组
       currentPage: 1,
       currentApprovedPage: 1,
       currentRefusedPage: 1,
       currentAllPage: 1,
+      total: 0,
       pageSize: 10, // 每页显示的条目数
       pageSizeOptions: [10, 25, 50], // 可选的页大小
-      // 待审核数据
-      tableData: [
-        {
-          company: "北京科技有限公司",
-          phone: "010-12345678",
-          name: "张三",
-          submission_time: "2024-12-20 10:00",
-          remarks: "暂无备注",
-          userid: 1,
-          companyNumber: "BJKJ001",
-        },
-        {
-          company: "上海创新企业",
-          phone: "021-87654321",
-          name: "李四",
-          submission_time: "2024-12-21 12:00",
-          remarks: "待审核",
-          userid: 2,
-          companyNumber: "SHCX002",
-        },
-        {
-          company: "广州实业集团",
-          phone: "020-23456789",
-          name: "王五",
-          submission_time: "2024-12-22 14:30",
-          remarks: "需要更多资料",
-          userid: 3,
-          companyNumber: "GZSY003",
-        },
-      ],
-      // 已审核数据
-      approvedData: [],
-      RefusedData: [],
-      AllData: [],
+      currentTableData: [],
       Pending_request: true,
-      isPending: true, // 初始状态为待审核
-      isApproved: false,
-      isRefused: false,
-      isAll: false,
-      showModal: false, // 弹窗是否显示
-      showConfirmationModal: false, // 控制确认通知申请人的弹窗
+      type: 0,
+      tableData: 0,
+      approvedData: 0,
+      RefusedData: 0,
+      AllData: 0,
     };
   },
   computed: {
-    currentTableData() {
-      const start = (this.currentPage - 1) * this.pageSize;
-      const end = this.currentPage * this.pageSize;
-      return this.tableData.slice(start, end);
-    },
-    currentApprovedData() {
-      const start = (this.currentApprovedPage - 1) * this.pageSize;
-      const end = this.currentApprovedPage * this.pageSize;
-      return this.approvedData.slice(start, end);
-    },
-    currentRefusedData() {
-      const start = (this.currentRefusedPage - 1) * this.pageSize;
-      const end = this.currentRefusedPage * this.pageSize;
-      return this.RefusedData.slice(start, end);
-    },
-    currentAllData() {
-      const start = (this.currentAllPage - 1) * this.pageSize;
-      const end = this.currentAllPage * this.pageSize;
-      return this.AllData.slice(start, end);
-    },
+    ...mapGetters(['userid']),
   },
   methods: {
     // 获取状态文本
@@ -437,343 +207,86 @@ export default {
     headerCellStyle() {
       return { backgroundColor: "#f1f1f1" };
     },
-    // 待审核的分页逻辑
     handlePageChange(page) {
-      this.currentPage = page;
-    },
-    // 已通过的分页逻辑
-    handleApprovedPageChange(page) {
-      this.currentApprovedPage = page;
-    },
-    // 已拒绝的分页逻辑
-    handleRefusedPageChange(page) {
-      this.currentRefusedPage = page;
-    },
-    // 全部记录的分页逻辑
-    handleAllPageChange(page) {
-      this.currentAllPage = page;
-    },
-    // 显示创建账户的弹窗
-    showModalHandler() {
-      this.showModal = true;
-    },
-    performSearch() {
-      console.log("执行搜索");
-    },
-
-    // 创建账户的逻辑
-    handleCreateAccount() {
-      // 在这里可以进行创建账户的逻辑
-      console.log("账户创建完成");
-      // 点击创建账户后弹出通知确认的灰色弹窗
-      this.showModal = false; // 关闭创建账户弹窗
-      this.showConfirmationModal = true; // 打开通知确认弹窗
-    },
-    // 通知申请人
-    notifyApplicant() {
-      // 在这里进行通知申请人的逻辑
-      this.$message.success("通知申请人成功!");
-      this.showConfirmationModal = false; // 关闭通知确认弹窗
-    },
-    show_company() {
-      this.showCompany = !this.showCompany; // 切换 showCompany 的值
-    },
-    toggleCompany(index) {
-      this.showCompanyList[index] = !this.showCompanyList[index];
-    },
-
-    // 待审核
-    showPending() {
-      this.isPending = true;
-      this.isApproved = false;
-      this.isRefused = false;
-      this.isAll = false;
-      this.Pending_request = true;
-    },
-    // 已通过
-    showApproved() {
-      this.Pending_request = false;
-      this.isPending = false;
-      this.isApproved = true;
-      this.isRefused = false;
-      this.isAll = false;
-    },
-    // 已拒绝
-    showRefused() {
-      // console.log("Clicked Refused!");
-      this.isPending = false;
-      this.isApproved = false;
-      this.isRefused = true;
-      this.isAll = false;
-      this.Pending_request = false;
+      API_CONFIG.allRecords.page = page;
+      this.$forceUpdate();
+      this.ajaxAll();
     },
-    //全部记录
-    showAll() {
-      this.isPending = false;
-      this.isApproved = false;
-      this.isRefused = false;
-      this.isAll = true;
-      this.Pending_request = false;
+    showData(type) {
+      this.type = type
+      this.ajaxAll()
     },
-    // 用于切换组织
-    selectOrg(org) {
-      this.selectedOrg = org;
-    },
-    // 处理每页条目数量变化
-    handlePageSizeChange(size) {
-      this.pageSize = size;
-    },
-    // 用于显示待审核的表格数据
-    ajaxpending() {
-      const params = [API_CONFIG.pending]; // 使用配置中的待审核接口参数
-
-      // let params = [
-      //   {
-      //     functionName: "select_requestuser",  // 调用存储过程的名称
-      //     r_type: 0,
-      //     page: 1,
-      //     r_num: 100,
-      //   },
-      // ];
-
-      this.$ajax
-        .post(API_CONFIG.baseUrl, params)
-        .then((res) => {
-          // 假设res.data是一个返回待审核数据的数组
-          // console.log("返回结果为:", res.data);  // 打印返回的查询结果
-
-          this.tableData = res.data[0].map((user) => ({
-            company: user.schoolName || "未知", // 组织名称
-            phone: user.contact_info || "未知",
-            name: user.name || "未知", // 真实姓名对应 name
-            submission_time: user.create_at || "未知", // 提交时间对应 数据库里的create_at
-            remarks: user.remark || "未知", // 备注内容对应 remark
-            userid: user.id || "未知",
-            orgid: user.org_id,
-          })); // 将数据存储到 tableData 中
-          // 打印映射后的用户信息
-          console.log("待审核的数据为:", res.data);
-        })
-        .catch((err) => {
-          // 处理失败的响应
-          this.$message.error("查询失败");
-          console.error(err); // 打印错误信息
-        });
-    },
-
-    // 用于显示已通过的表格数据
-    ajaxapproved() {
-      const params = [API_CONFIG.approved]; // 使用配置中的已通过接口参数
-
-      // let params = [
-      //   {
-      //     functionName: "select_requestuser",  // 调用存储过程的名称
-      //     r_type: 1,
-      //     page: 1,
-      //     r_num: 100,
-      //   },
-      // ];
-
-      this.$ajax
-        .post(API_CONFIG.baseUrl, params)
-        .then((res) => {
-          // 假设res.data是一个返回已通过的数组
-          this.approvedData = res.data[0].map((user) => ({
-            company: user.schoolName || "未知", // 组织名称对应 schoolName
-            phone: user.contact_info || "未知",
-            name: user.name || "未知", // 真实姓名对应 alias
-            submission_time: user.create_at || "未知", // 提交时间对应 数据库里的create_at
-            remarks: user.remark || "未知", // 备注内容对应 remark
-            Pending_time: user.active_at || "未知", // 处理时间对应 update_time
-            open_organization: user.school_name || "未知", // 所属组织对应 school_name
-            userid: user.id || "未知",
-          }));
-          // 在这里进行已通过数据的获取和处理
-          console.log("已通过的数据为:", res.data);
-        })
-        .catch((err) => {
-          // 处理失败的响应
-          this.$message.error("查询失败");
-          console.error(err); // 打印错误信息
-        });
-    },
-
-    // 用于显示已拒绝的表格数据
-    ajaxrefused() {
-      const params = [API_CONFIG.refused]; // 使用配置中的已拒绝接口参数
-
-      // let params = [
-      //   {
-      //     functionName: "select_requestuser",  // 调用存储过程的名称
-      //     r_type: 2,
-      //     page: 1,
-      //     r_num: 100,
-      //   },
-      // ];
-
-      this.$ajax
-        .post(API_CONFIG.baseUrl, params)
-        .then((res) => {
-          this.RefusedData = res.data[0].map((user) => ({
-            company: user.schoolName || "未知", // 组织名称对应 organizeid
-            phone: user.contact_info || "未知", // 用户名对应 username,使用数据库里的username因为有邮箱作为联系方式
-            name: user.name || "未知", // 真实姓名对应 alias
-            submission_time: user.create_at || "未知", // 提交时间对应 数据库里的create_at
-            remarks: user.remark || "未知", // 备注内容对应 remark
-            Pending_time: user.active_at || "未知", // 处理时间对应 update_time
-            userid: user.id || "未知",
-          }));
-          // 在这里进行已拒绝数据的获取和处理
-          // console.log(this.RefusedData);
-          console.log("已拒绝的数据为:", res.data);
-        })
-        .catch((err) => {
-          // 处理失败的响应
-          this.$message.error("查询失败");
-          console.error(err); // 打印错误信息
-        });
-    },
-
     // 用于显示全部记录的表格数据
     ajaxAll() {
       console.log("获取所有记录");
-
       // 根据 allRecords 配置生成请求
-      const requests = API_CONFIG.allRecords.r_types.map((r_type) => {
-        const params = {
-          functionName: API_CONFIG.allRecords.functionName,
-          r_type,
-          page: API_CONFIG.allRecords.page,
-          r_num: API_CONFIG.allRecords.r_num,
-        };
-        return this.$ajax.post(API_CONFIG.baseUrl, [params]);
-      });
-
-      // 使用 Promise.all 发起多个请求
-      Promise.all(requests)
-        .then((responses) => {
-          // 使用 processData 方法处理响应数据
-          const allData = API_CONFIG.allRecords.processData(responses);
-
-          // 更新组件中的数据
-          this.AllData = allData;
-
-          // 打印处理后的数据
-          console.log(this.AllData);
-
-          // 刷新表格数据
-          this.refreshTableData(); // 例如刷新表格数据
+      const params = [{
+        functionName: API_CONFIG.allRecords.functionName,
+        r_type: this.type == 3 ? '' : this.type,
+        page: API_CONFIG.allRecords.page,
+        r_num: API_CONFIG.allRecords.num,
+      }];
+      this.currentTableData = []
+      this.$ajax
+        .post(API_CONFIG.baseUrl, params)
+        .then((res) => {
+          if (res.data) {
+            this.currentTableData = res.data[0];
+            this.total = res.data[0].length ? res.data[0][0].total_count : 0
+            this.tableData = res.data[1][0].num
+            this.approvedData = res.data[2][0].num
+            this.RefusedData = res.data[3][0].num
+            this.AllData = res.data[4][0].num
+          }
+          console.log("返回的结果为:", res.data);
         })
         .catch((err) => {
-          this.$message.error("查询失败");
-          console.error(err);
+          console.error("请求失败,错误信息:", err);
         });
     },
-
-    // 通过操作,将数据移到已通过
-    // ajax_move_to_approved(userid) {
-    //   const successMessage = API_CONFIG.moveToApproved.successMessage;
-
-    //   // 弹出确认框
-    //   this.$confirm(`您确定将此数据移至“已通过”状态吗?`, '确认操作', {
-    //     confirmButtonText: '确定',
-    //     cancelButtonText: '取消',
-    //     type: 'warning',
-    //   }).then(() => {
-    //     // 确认后发起请求
-    //     let params = [
-    //       {
-    //         functionName: API_CONFIG.moveToApproved.functionName,   // 这里是将数据移至已通过状态的操作,使用配置中的存储过程名称
-    //         u_id: userid,  // id
-    //       },
-    //     ];
-
-    //     // 发起请求
-    //     this.$ajax
-    //       .post(API_CONFIG.moveToApproved.url, params) // 使用配置中的URL
-    //       .then((res) => {
-    //         console.log(res);
-    //         this.$message({
-    //           type: 'success',
-    //           message: successMessage,
-    //         });
-    //         // 更新数据状态
-    //         this.refreshTableData();  // 例如刷新表格数据
-    //         console.log("此条数据处理后的id为:", userid);
-    //       })
-    //       .catch((err) => {
-    //         this.$message.error("操作失败");
-    //         console.error("请求失败,错误信息:", err);
-    //       });
-    //   }).catch(() => {
-    //     // 取消操作后的提示
-    //     this.$message({
-    //       type: 'info',
-    //       message: '已取消操作',
-    //     });
-    //   });
-    // },
-    // 通过操作,将数据移到已通过
-    ajax_move_to_approved(userid, orgid, phone, name, submission_time) {
-      const successMessage = API_CONFIG.moveToApproved.successMessage;
-
-      // 弹出确认框
-      this.$confirm(`您确定将此数据移至“已通过”状态吗?`, "确认操作", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          // 确认后发起请求
-          let params = [
-            {
-              functionName: "insert_request_type1", // 这里是将数据移至已通过状态的操作,使用配置中的存储过程名称
-              p_userid: userid, // id
-              //组织id
-              p_schoolName: orgid,
-              //账户
-              p_u_couent: phone,
-              //姓名
-              p_u_name: name,
-              //时间
-              p_u_time: submission_time,
-            },
-          ];
-
-          // 发起请求
-          this.$ajax
-            .post(API_CONFIG.baseUrl, params) // 使用配置中的URL
-            .then((res) => {
-              console.log(res);
-              this.$message({
-                type: "success",
-                message: successMessage,
-              });
-              // 更新数据状态
-              this.refreshTableData(); // 例如刷新表格数据
-              // console.log("此条数据处理后的id为:", userid);
-              console.log("通过的数据内容为:", res.data);
-            })
-            .catch((err) => {
-              this.$message.error("操作失败");
-              console.error("请求失败,错误信息:", err);
+    addUser(row){
+      let params = {
+        alias: row.name,
+        username: row.username,
+        org: row.orgid,
+        oid: row.oid,
+        ph: row.phonenumber,
+        cid: "",
+        type: 1,
+        opid: "",
+        dest: "",
+        eduid: "",
+      }
+      addUser(params)
+        .then((response) => {
+          if(response){
+            this.$message({
+              type: "success",
+              message: '操作成功',
             });
+              this.ajaxAll(); // 例如刷新表格数据
+          }
         })
-        .catch(() => {
-          // 取消操作后的提示
-          this.$message({
-            type: "info",
-            message: "已取消操作",
-          });
+        .catch((error) => {
+          console.error("请求失败,错误信息:", error);
         });
     },
-
     // 忽略操作,将数据移到已拒绝
-    ajax_move_to_rejected(userid) {
-      const successMessage = API_CONFIG.moveToRejected.successMessage;
-
+    ajax_move_user(type, row) {
+      let string = ''
+      if(type == 1){
+        string = '您确定同意此用户申请并创建吗?'
+      }else if(type == 2){
+        string = '您确定拒绝此用户申请吗?'
+      }
+      let _type = 0
+      if(type == 1){
+        _type = 1
+      }else if(type == 2){
+        _type = 2
+      }
       // 弹出确认框
-      this.$confirm(`您确定将此数据移至“已拒绝”状态吗?`, "确认操作", {
+      this.$confirm(string, "确认操作", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
@@ -782,8 +295,10 @@ export default {
           // 确认后发起请求
           let params = [
             {
-              functionName: API_CONFIG.moveToRejected.functionName, // 这里是将数据移至已拒绝状态的操作,使用配置中的存储过程名称
-              u_id: userid, // 公司编号
+              functionName: API_CONFIG.moveUser.functionName, // 这里是将数据移至已拒绝状态的操作,使用配置中的存储过程名称
+              uid: row.id,
+              type: _type,
+              euid: this.userid
             },
           ];
 
@@ -792,13 +307,18 @@ export default {
             .post(API_CONFIG.baseUrl, params)
             .then((res) => {
               console.log(res);
+              if(type == 1){
+                this.addUser(row)
+              }else{
               this.$message({
                 type: "success",
-                message: successMessage,
+                message: '操作成功',
               });
               // 更新数据状态
-              this.refreshTableData(); // 例如刷新表格数据
-              console.log("此条数据处理后的id为:", userid);
+              this.ajaxAll(); // 例如刷新表格数据
+              }
+
+              console.log("此条数据处理后的id为:", row.id);
             })
             .catch((err) => {
               this.$message.error("操作失败");
@@ -814,65 +334,8 @@ export default {
         });
     },
 
-    // 刷新数据(假设你需要刷新表格数据)
-    refreshTableData() {
-      // 在这里重新获取数据或者更新视图
-      this.ajaxpending(); // 例如通过接口重新获取数据
-      this.ajaxapproved(); // 例如通过接口重新获取数据
-      this.ajaxrefused(); // 例如通过接口重新获取数据
-    },
-
-    // 在已拒绝区域点击移动至待审核
-    ajax__move_to_pending_from_rejected(userid) {
-      let params = [
-        {
-          functionName: API_CONFIG.moveToPending.functionName, // 移动至待审核的操作
-          u_id: userid, // id
-        },
-      ];
-
-      const successMessage = API_CONFIG.moveToPending.successMessage;
-      // const successMessage = '已移动至待审核!';
-
-      // 弹窗确认。
-      this.$confirm(`此操作将会将该条数据移回待审核, 是否继续?`, "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          // 发起请求
-          this.$ajax
-            .post(API_CONFIG.baseUrl, params)
-            .then((res) => {
-              console.log(res);
-              this.$message({
-                type: "success",
-                message: successMessage,
-              });
-              // 调用函数更新数据
-              // 更新数据状态
-              this.refreshTableData(); // 例如刷新表格数据
-              console.log("此条数据处理后的id为:", userid);
-              this.ajaxpending(userid); // 数据移回待审核区域
-            })
-            .catch((err) => {
-              this.$message.error("处理失败");
-              console.error("请求失败,错误信息:", err);
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "已取消移动至待审核",
-          });
-        });
-    },
   },
   mounted() {
-    this.ajaxpending(); // 组件挂载后调用 ajaxpending 方法
-    this.ajaxapproved(); // 组件挂载后调用 ajaxapproved 方法
-    this.ajaxrefused(); // 组件挂载后调用 ajaxrefused 方法
     this.ajaxAll(); // 组件挂载后调用 ajaxAll 方法
   },
 };
@@ -1325,7 +788,7 @@ hr {
   width: 100%;
 }
 
-.table_content{
+.table_content {
   width: 100%;
   overflow: auto;
   height: calc(100% - 75px);

+ 1 - 1
src/components/list.vue

@@ -5,7 +5,7 @@
     <div class="title_examine">
       <div class="pub_title">账号列表</div>
       <div style="margin-left: auto">
-        <el-button type="primary" size="small" @click="nextStep()">新增账户</el-button>
+        <!--<el-button type="primary" size="small" @click="nextStep()">新增账户</el-button> -->
       </div>
     </div>
     <!-- 学习名称组织名称表单区域 -->

+ 113 - 16
src/views/examineDialog.vue

@@ -9,15 +9,15 @@
         <div class="dialog-content">
           <div class="dialog-content-item">
             <div class="dialog-content-item-content1">
-              <span>
-                组织名称
-              </span>
+              <span> 组织名称 </span>
               <el-select
+                v-loading="orgLoading"
                 v-model="orgName"
                 placeholder="请选择组织名称"
                 class="input"
                 clearable
                 filterable
+                @change="orgChange"
               >
                 <el-option
                   v-for="(org, index) in orgs"
@@ -36,14 +36,17 @@
                   src="@/assets/startIcon.svg"
                   alt="字符"
                   class="search-icon2"
-                /> 学校名称
+                />
+                学校名称
               </span>
               <el-select
+                v-loading="schoolLoading"
                 v-model="schoolName"
                 placeholder="请选择学校名称"
                 class="input"
                 clearable
                 filterable
+                @change="schoolChange"
               >
                 <el-option
                   v-for="(school, index) in schools"
@@ -72,7 +75,22 @@
                 class="input"
               />
             </div>
-
+            <div class="dialog-content-item-content1">
+              <span>
+                <img
+                  src="@/assets/startIcon.svg"
+                  alt="字符"
+                  class="search-icon2"
+                />
+                账号
+              </span>
+              <input
+                v-model="username"
+                type="text"
+                placeholder="请输入账号"
+                class="input"
+              />
+            </div>
             <div class="dialog-content-item-content1">
               <span>
                 <img
@@ -102,7 +120,6 @@
                 class="input"
               />
             </div>
-
           </div>
         </div>
       </div>
@@ -136,26 +153,84 @@ export default {
       Name: "", // 定义 Name 在 data 中
       phonenumber: "", // 定义 phonenumber 在 data 中
       remark: "", // 定义 remark 在 data 中
+      username: "",
+      orgLoading: false,
+      schoolLoading: false,
     };
   },
   methods: {
     submitForm() {
-      alert("提交的组织名称: " + this.orgName); // 处理按钮点击事件
-      alert("提交的学校名称:" + this.schoolName); // 处理按钮点击事件
-      alert("提交的姓名:" + this.Name); // 处理按钮点击事件
-      alert("提交的联系电话:" + this.phonenumber); // 处理按钮点击事件
-      alert("提交的备注:" + this.remark); // 处理按钮点击事件
+      // 检查必填字段
+      // if (!this.orgName) {
+      //   this.$message.error("组织名称不能为空");
+      //   return;
+      // }
+      if (!this.schoolName) {
+        this.$message.error("学校选择不能为空");
+        return;
+      }
+      if (!this.Name) {
+        this.$message.error("姓名不能为空");
+        return;
+      }
+      if (!this.username) {
+        this.$message.error("账号不能为空");
+        return;
+      }
+      if (!/\S+@\S+\.\S+/.test(this.username)) {
+        this.$message.error("请输入有效的邮箱地址");
+        return;
+      }
+      if (!this.phonenumber) {
+        this.$message.error("联系电话不能为空");
+        return;
+      }
+
+      // 添加审核接口
+      let params = [
+        {
+          functionName: "addExamineUser",
+          org: this.orgName,
+          oid: this.schoolName,
+          un: this.Name,
+          usern: this.username,
+          phone: this.phonenumber,
+          r: this.remark,
+        },
+      ];
+
+      this.$ajax
+        .post(API_CONFIG.baseUrl, params)
+        .then((res) => {
+          if (res.data && res.data[0][0].success == 2) {
+            this.$message.success("提交成功");
+            this.reset()
+          }else if(res.data && res.data[0][0].success == 1){
+            this.$message.error("此账号已创建,具体登录原因请联系管理员");
+          }
+          console.log("返回的结果为:", res.data);
+        })
+        .catch((err) => {
+          this.$message.error("提交失败");
+          console.error("请求失败,错误信息:", err);
+        });
     },
-    closePage() {
-      // 在浏览器中直接关闭页面通常会被限制
-      window.history.back();
+    reset(){
+      this.orgName = "";
+      this.schoolName = "";
+      this.Name = "";
+      this.username = "";
+      this.phonenumber = "";
+      this.remark = ""; 
     },
     //组织查询
     ajax_org() {
+      this.orgLoading = false
       const params = [API_CONFIG.ajax_org]; // 使用配置中的接口参数
       this.$ajax
         .post(API_CONFIG.baseUrl, params)
         .then((res) => {
+          this.orgLoading = false
           // console.log("返回的数据为:", res.data);  // 检查返回的数据
           if (res.data && Array.isArray(res.data[0])) {
             // 使用 map() 提取所有组织名称
@@ -167,30 +242,48 @@ export default {
           console.log("返回的结果为:", res.data);
         })
         .catch((err) => {
+          this.orgLoading = false
           this.$message.error("查询失败");
           console.error("请求失败,错误信息:", err);
         });
     },
     // 学校查询
     ajax_school() {
+      API_CONFIG.ajax_school.u_org = this.orgName
       const params = [API_CONFIG.ajax_school]; // 使用配置中的接口参数
+      this.schoolLoading = true
       this.$ajax
         .post(API_CONFIG.baseUrl, params)
         .then((res) => {
+          this.schoolLoading = false
           // console.log("返回的数据为:", res.data);  // 检查返回的数据
           if (res.data && Array.isArray(res.data[0])) {
             // 将 name 和 org 都存入 cn_school 数组中
             this.schools = res.data[0].map((item) => ({
               name: item.name,
               id: item.id,
+              org: item.org,
             }));
           }
         })
         .catch((err) => {
+          this.schoolLoading = false
           this.$message.error("查询失败");
           console.error("请求失败,错误信息:", err);
         });
     },
+    orgChange(){
+      this.schoolName = ""
+      this.ajax_school()
+    },
+    schoolChange(){
+      for(var i = 0; i < this.schools.length; i++){
+        if(this.schools[i].id == this.schoolName && this.schools[i].org){
+          this.orgName = this.schools[i].org
+        }
+      }
+      
+    }
   },
   mounted() {
     this.ajax_org(); // 组件创建时,立即调用 ajax_org 获取数据
@@ -235,7 +328,6 @@ body {
 .search-icon2 {
   width: 10px;
   height: 10px;
-
 }
 
 .dialog-title h1 {
@@ -248,7 +340,7 @@ body {
   font-weight: 550;
 }
 
-.dialog-content-item-content1 + .dialog-content-item-content1{
+.dialog-content-item-content1 + .dialog-content-item-content1 {
   margin-top: 20px;
 }
 
@@ -264,6 +356,10 @@ body {
   outline: none;
 }
 
+.input >>> .el-input--suffix .el-input__inner{
+  padding: 0
+}
+
 /* 用户协议框架 */
 .user_p {
   /* width: 500px; */
@@ -285,6 +381,7 @@ body {
   cursor: pointer;
   text-align: center;
   margin-top: 10px;
+  outline: none;
 }
 
 .close-btn {

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