|
@@ -10,14 +10,14 @@
|
|
</div>
|
|
</div>
|
|
<div class="examine_title2">
|
|
<div class="examine_title2">
|
|
<a @click="showApproved"
|
|
<a @click="showApproved"
|
|
- :style="{ color: isApproved ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">已通过({{ approvedData.length}})</a>
|
|
|
|
|
|
+ :style="{ color: isApproved ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">已通过({{approvedData.length}})</a>
|
|
</div>
|
|
</div>
|
|
<div class="examine_title3">
|
|
<div class="examine_title3">
|
|
<a @click="showRefused"
|
|
<a @click="showRefused"
|
|
- :style="{ color: isRefused ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">已拒绝({{ RefusedData.length}})</a>
|
|
|
|
|
|
+ :style="{ color: isRefused ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">已拒绝({{RefusedData.length}})</a>
|
|
</div>
|
|
</div>
|
|
<div class="examine_title4">
|
|
<div class="examine_title4">
|
|
- <a @click="showAll" :style="{ color: isAll ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">全部记录({{ AllData.length}})</a>
|
|
|
|
|
|
+ <a @click="showAll" :style="{ color: isAll ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">全部记录({{AllData.length}})</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -33,27 +33,29 @@
|
|
|
|
|
|
<!-- 待审核的数据 -->
|
|
<!-- 待审核的数据 -->
|
|
<div v-if="isPending">
|
|
<div v-if="isPending">
|
|
- <el-table :data="currentTableData" stripe border style="width: 100%; background-color: white;"
|
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
|
- <el-table-column type="selection" width="50"></el-table-column>
|
|
|
|
- <el-table-column prop="company" label="组织名称" width="400">
|
|
|
|
- <template slot-scope="scope">{{ scope.row.company }}</template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="phone" label="电话/邮箱" width="400"></el-table-column>
|
|
|
|
- <el-table-column prop="name" label="姓名" width="400" show-overflow-tooltip
|
|
|
|
- :label-class-name="'address-column'"></el-table-column>
|
|
|
|
- <el-table-column prop="submission_time" label="提交时间" width="400"></el-table-column>
|
|
|
|
- <el-table-column prop="remarks" label="备注" width="400"></el-table-column>
|
|
|
|
- <el-table-column label="操作" width="283">
|
|
|
|
- <template slot-scope="{ row }">
|
|
|
|
- <button @click="ajax_move_to_approved(row.userid, row.companyNumber)"
|
|
|
|
- style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 25px;">通过</button>
|
|
|
|
- <button @click="ajax_move_to_rejected(row.userid, row.companyNumber)"
|
|
|
|
- style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 35px;">拒绝</button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <!-- 禁用 stripe 属性,完全自定义背景色 -->
|
|
|
|
+ <el-table :data="currentTableData" stripe border style="width: 100%; background-color: white;"
|
|
|
|
+ @selection-change="handleSelectionChange" :header-cell-style="headerCellStyle">
|
|
|
|
+
|
|
|
|
+ <el-table-column type="selection" width="50"></el-table-column>
|
|
|
|
+ <el-table-column prop="company" label="组织名称" width="450">
|
|
|
|
+ <template slot-scope="scope">{{ scope.row.company }}</template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="phone" label="电话/邮箱" width="450"></el-table-column>
|
|
|
|
+ <el-table-column prop="name" label="姓名" width="450" show-overflow-tooltip
|
|
|
|
+ :label-class-name="'address-column'"></el-table-column>
|
|
|
|
+ <el-table-column prop="submission_time" label="提交时间" width="450"></el-table-column>
|
|
|
|
+ <el-table-column prop="remarks" label="备注" width="450"></el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="345">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <button @click="ajax_move_to_approved(row.userid, row.companyNumber)"
|
|
|
|
+ style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 25px;">通过</button>
|
|
|
|
+ <button @click="ajax_move_to_rejected(row.userid, row.companyNumber)"
|
|
|
|
+ style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 35px;">拒绝</button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
<!-- 分页组件 -->
|
|
<!-- 分页组件 -->
|
|
<el-pagination v-if="Pending_request" :current-page="currentPage" :page-size="pageSize"
|
|
<el-pagination v-if="Pending_request" :current-page="currentPage" :page-size="pageSize"
|
|
:page-sizes="pageSizeOptions" :total="tableData.length" @size-change="handlePageSizeChange"
|
|
:page-sizes="pageSizeOptions" :total="tableData.length" @size-change="handlePageSizeChange"
|
|
@@ -63,18 +65,18 @@
|
|
<!-- 已通过的数据 -->
|
|
<!-- 已通过的数据 -->
|
|
<div v-if="isApproved">
|
|
<div v-if="isApproved">
|
|
<el-table :data="currentApprovedData" stripe border style="width: 100%; background-color: white;"
|
|
<el-table :data="currentApprovedData" stripe border style="width: 100%; background-color: white;"
|
|
- @selection-change="handleApprovedSelectionChange">
|
|
|
|
|
|
+ @selection-change="handleApprovedSelectionChange" :header-cell-style="headerCellStyle">
|
|
<el-table-column type="selection" width="50" />
|
|
<el-table-column type="selection" width="50" />
|
|
- <el-table-column prop="company" label="组织名称" width="350">
|
|
|
|
|
|
+ <el-table-column prop="company" label="组织名称" width="400">
|
|
<template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
|
|
<template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="phone" label="电话/邮箱" width="350" />
|
|
|
|
- <el-table-column prop="name" label="姓名" width="350" show-overflow-tooltip
|
|
|
|
|
|
+ <el-table-column prop="phone" label="电话/邮箱" width="400" />
|
|
|
|
+ <el-table-column prop="name" label="姓名" width="400" show-overflow-tooltip
|
|
:label-class-name="'address-column'" />
|
|
:label-class-name="'address-column'" />
|
|
- <el-table-column prop="submission_time" label="提交时间" width="331" />
|
|
|
|
- <el-table-column prop="remarks" label="备注" width="300" />
|
|
|
|
|
|
+ <el-table-column prop="submission_time" label="提交时间" width="350" />
|
|
|
|
+ <el-table-column prop="remarks" label="备注" width="350" />
|
|
<el-table-column prop="Pending_time" label="审核时间" width="300" />
|
|
<el-table-column prop="Pending_time" label="审核时间" width="300" />
|
|
- <el-table-column prop="open_organization" label="开通组织" width="300">
|
|
|
|
|
|
+ <el-table-column prop="open_organization" label="开通组织" width="395">
|
|
<template slot="default" slot-scope="scope">{{ scope.row.open_organization }}</template>
|
|
<template slot="default" slot-scope="scope">{{ scope.row.open_organization }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -87,18 +89,18 @@
|
|
<!-- 已拒绝的数据 -->
|
|
<!-- 已拒绝的数据 -->
|
|
<div v-if="isRefused">
|
|
<div v-if="isRefused">
|
|
<el-table :data="currentRefusedData" stripe border style="width: 100%; background-color: white;"
|
|
<el-table :data="currentRefusedData" stripe border style="width: 100%; background-color: white;"
|
|
- @selection-change="handleRefusedSelectionChange">
|
|
|
|
|
|
+ @selection-change="handleRefusedSelectionChange" :header-cell-style="headerCellStyle">
|
|
<el-table-column type="selection" width="50" />
|
|
<el-table-column type="selection" width="50" />
|
|
- <el-table-column prop="company" label="组织名称" width="320">
|
|
|
|
|
|
+ <el-table-column prop="company" label="组织名称" width="400">
|
|
<template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
|
|
<template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="phone" label="电话/邮箱" width="330" />
|
|
|
|
|
|
+ <el-table-column prop="phone" label="电话/邮箱" width="400" />
|
|
<el-table-column prop="name" label="姓名" width="350" show-overflow-tooltip
|
|
<el-table-column prop="name" label="姓名" width="350" show-overflow-tooltip
|
|
:label-class-name="'address-column'" />
|
|
:label-class-name="'address-column'" />
|
|
<el-table-column prop="submission_time" label="提交时间" width="300" />
|
|
<el-table-column prop="submission_time" label="提交时间" width="300" />
|
|
- <el-table-column prop="remarks" label="备注" width="350" />
|
|
|
|
- <el-table-column prop="Pending_time" label="审核时间" width="350" />
|
|
|
|
- <el-table-column label="操作" width="283">
|
|
|
|
|
|
+ <el-table-column prop="remarks" label="备注" width="400" />
|
|
|
|
+ <el-table-column prop="Pending_time" label="审核时间" width="400" />
|
|
|
|
+ <el-table-column label="操作" width="345">
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
<button @click="ajax__move_to_pending_from_rejected(row.userid, row.companyNumber)"
|
|
<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>
|
|
style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 25px;">移动至待审核</button>
|
|
@@ -114,18 +116,18 @@
|
|
<!-- 全部记录的数据 -->
|
|
<!-- 全部记录的数据 -->
|
|
<div v-if="isAll">
|
|
<div v-if="isAll">
|
|
<el-table :data="currentAllData" stripe border style="width: 100%; background-color: white;"
|
|
<el-table :data="currentAllData" stripe border style="width: 100%; background-color: white;"
|
|
- @selection-change="handleAllSelectionChange">
|
|
|
|
|
|
+ @selection-change="handleAllSelectionChange" :header-cell-style="headerCellStyle">
|
|
<el-table-column type="selection" width="50" />
|
|
<el-table-column type="selection" width="50" />
|
|
- <el-table-column prop="company" label="组织名称" width="350">
|
|
|
|
|
|
+ <el-table-column prop="company" label="组织名称" width="400">
|
|
<template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
|
|
<template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="phone" label="电话/邮箱" width="350" />
|
|
|
|
|
|
+ <el-table-column prop="phone" label="电话/邮箱" width="400" />
|
|
<el-table-column prop="name" label="姓名" width="350" show-overflow-tooltip
|
|
<el-table-column prop="name" label="姓名" width="350" show-overflow-tooltip
|
|
:label-class-name="'address-column'" />
|
|
:label-class-name="'address-column'" />
|
|
- <el-table-column prop="submission_time" label="提交时间" width="300" />
|
|
|
|
|
|
+ <el-table-column prop="submission_time" label="提交时间" width="350" />
|
|
<el-table-column prop="remarks" label="备注" width="350" />
|
|
<el-table-column prop="remarks" label="备注" width="350" />
|
|
- <el-table-column prop="Pending_time" label="审核时间" width="300" />
|
|
|
|
- <el-table-column label="操作" width="283" prop="status">
|
|
|
|
|
|
+ <el-table-column prop="Pending_time" label="审核时间" width="400" />
|
|
|
|
+ <el-table-column label="操作" width="345" prop="status">
|
|
<template slot="default" slot-scope="scope">
|
|
<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;">
|
|
<el-button :type="getButtonType(scope.row.status)" :disabled="false" style="border-radius: 5px; padding: 4px 12px; font-size: 14px;">
|
|
@@ -148,6 +150,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { reactive } from 'vue' // 引入 reactive
|
|
import { reactive } from 'vue' // 引入 reactive
|
|
|
|
+import { API_CONFIG } from '@/common/apiConfig';
|
|
// import { ref } from 'vue';
|
|
// import { ref } from 'vue';
|
|
// 使用 ref() 包装数组
|
|
// 使用 ref() 包装数组
|
|
// const myArray = ref([]);
|
|
// const myArray = ref([]);
|
|
@@ -158,7 +161,7 @@ import { reactive } from 'vue' // 引入 reactive
|
|
// // 使用 watch 监听
|
|
// // 使用 watch 监听
|
|
// watch(() => myArray.value, (newValue) => {
|
|
// watch(() => myArray.value, (newValue) => {
|
|
// console.log(newValue);
|
|
// console.log(newValue);
|
|
-//
|
|
|
|
|
|
+// });
|
|
export default {
|
|
export default {
|
|
name: 'IndexTable',
|
|
name: 'IndexTable',
|
|
components: {
|
|
components: {
|
|
@@ -177,10 +180,36 @@ export default {
|
|
currentApprovedPage: 1,
|
|
currentApprovedPage: 1,
|
|
currentRefusedPage: 1,
|
|
currentRefusedPage: 1,
|
|
currentAllPage: 1,
|
|
currentAllPage: 1,
|
|
- pageSize: 5, // 每页显示的条目数
|
|
|
|
- pageSizeOptions: [5, 10, 25, 50], // 可选的页大小
|
|
|
|
|
|
+ pageSize: 10, // 每页显示的条目数
|
|
|
|
+ pageSizeOptions: [10, 25, 50], // 可选的页大小
|
|
// 待审核数据
|
|
// 待审核数据
|
|
- tableData: [],
|
|
|
|
|
|
+ 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: [],
|
|
approvedData: [],
|
|
RefusedData: [],
|
|
RefusedData: [],
|
|
@@ -192,6 +221,7 @@ export default {
|
|
isAll: false,
|
|
isAll: false,
|
|
showModal: false,// 弹窗是否显示
|
|
showModal: false,// 弹窗是否显示
|
|
showConfirmationModal: false, // 控制确认通知申请人的弹窗
|
|
showConfirmationModal: false, // 控制确认通知申请人的弹窗
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -240,6 +270,10 @@ export default {
|
|
};
|
|
};
|
|
return typeMap[status] || "default"; // 默认为默认按钮类型
|
|
return typeMap[status] || "default"; // 默认为默认按钮类型
|
|
},
|
|
},
|
|
|
|
+ // 表头的背景色
|
|
|
|
+ headerCellStyle() {
|
|
|
|
+ return { backgroundColor: '#f1f1f1' };
|
|
|
|
+ },
|
|
// 多选框选择事件处理
|
|
// 多选框选择事件处理
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
this.selectedPendingData = selection;
|
|
this.selectedPendingData = selection;
|
|
@@ -342,16 +376,18 @@ export default {
|
|
// 用于显示待审核的表格数据
|
|
// 用于显示待审核的表格数据
|
|
ajaxpending() {
|
|
ajaxpending() {
|
|
|
|
|
|
- let params = [
|
|
|
|
- {
|
|
|
|
- functionName: "select_requestuser", // 调用存储过程的名称
|
|
|
|
- r_type: 0,
|
|
|
|
- page: 1,
|
|
|
|
- r_num: 100,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
|
|
+ const params = [API_CONFIG.pending]; // 使用配置中的待审核接口参数
|
|
|
|
|
|
- this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", params)
|
|
|
|
|
|
+ // let params = [
|
|
|
|
+ // {
|
|
|
|
+ // functionName: "select_requestuser", // 调用存储过程的名称
|
|
|
|
+ // r_type: 0,
|
|
|
|
+ // page: 1,
|
|
|
|
+ // r_num: 100,
|
|
|
|
+ // },
|
|
|
|
+ // ];
|
|
|
|
+
|
|
|
|
+ this.$ajax.post(API_CONFIG.baseUrl, params)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
// 假设res.data是一个返回待审核数据的数组
|
|
// 假设res.data是一个返回待审核数据的数组
|
|
// console.log("返回结果为:", res.data); // 打印返回的查询结果
|
|
// console.log("返回结果为:", res.data); // 打印返回的查询结果
|
|
@@ -376,15 +412,18 @@ export default {
|
|
|
|
|
|
// 用于显示已通过的表格数据
|
|
// 用于显示已通过的表格数据
|
|
ajaxapproved() {
|
|
ajaxapproved() {
|
|
- let params = [
|
|
|
|
- {
|
|
|
|
- functionName: "select_requestuser", // 调用存储过程的名称
|
|
|
|
- r_type: 1,
|
|
|
|
- page: 1,
|
|
|
|
- r_num: 100,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
- this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", params)
|
|
|
|
|
|
+ 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) => {
|
|
.then((res) => {
|
|
// 假设res.data是一个返回已通过的数组
|
|
// 假设res.data是一个返回已通过的数组
|
|
this.approvedData = res.data[0].map(user => ({
|
|
this.approvedData = res.data[0].map(user => ({
|
|
@@ -409,16 +448,18 @@ export default {
|
|
|
|
|
|
// 用于显示已拒绝的表格数据
|
|
// 用于显示已拒绝的表格数据
|
|
ajaxrefused() {
|
|
ajaxrefused() {
|
|
- let params = [
|
|
|
|
- {
|
|
|
|
- functionName: "select_requestuser", // 调用存储过程的名称
|
|
|
|
- r_type: 2,
|
|
|
|
- page: 1,
|
|
|
|
- r_num: 100,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
-
|
|
|
|
- this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", params)
|
|
|
|
|
|
+ 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) => {
|
|
.then((res) => {
|
|
this.RefusedData = res.data[0].map(user => ({
|
|
this.RefusedData = res.data[0].map(user => ({
|
|
company: user.schoolName || '未知', // 组织名称对应 organizeid
|
|
company: user.schoolName || '未知', // 组织名称对应 organizeid
|
|
@@ -444,64 +485,41 @@ export default {
|
|
ajaxAll() {
|
|
ajaxAll() {
|
|
console.log("获取所有记录");
|
|
console.log("获取所有记录");
|
|
|
|
|
|
- // 假设分别调用待审核、已通过、已拒绝的请求
|
|
|
|
- Promise.all([
|
|
|
|
- this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", [
|
|
|
|
- { functionName: "select_requestuser", r_type: 0, page: 1, r_num: 100, }
|
|
|
|
- ]),
|
|
|
|
- this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", [
|
|
|
|
- { functionName: "select_requestuser", r_type: 1, page: 1, r_num: 100, }
|
|
|
|
- ]),
|
|
|
|
- this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", [
|
|
|
|
- { functionName: "select_requestuser", r_type: 2, page: 1, r_num: 100, }
|
|
|
|
- ])
|
|
|
|
- ])
|
|
|
|
|
|
+ // 根据 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) => {
|
|
.then((responses) => {
|
|
- // 解构响应
|
|
|
|
- const [pendingRes, approvedRes, refusedRes] = responses;
|
|
|
|
- // 合并待审核、已通过和已拒绝的数据
|
|
|
|
- const AllData = [
|
|
|
|
- ...pendingRes.data[0], // 待审核数据
|
|
|
|
- ...approvedRes.data[0], // 已通过数据
|
|
|
|
- ...refusedRes.data[0], // 已拒绝数据
|
|
|
|
- ];
|
|
|
|
- // 打印出整个 AllData 数据,查看是否有 r_type 字段
|
|
|
|
- console.log("AllData:", AllData);
|
|
|
|
-
|
|
|
|
- // // 确认每个 user 对象中是否有 r_type 字段
|
|
|
|
- // AllData.forEach(user => {
|
|
|
|
- // console.log('user:', user); // 打印 user 对象
|
|
|
|
- // console.log('r_type:', user.r_type); // 确认 r_type 的值
|
|
|
|
- // });
|
|
|
|
-
|
|
|
|
- this.AllData = AllData.map(user => {
|
|
|
|
- const status = user.type !== undefined && user.type !== null ? user.type : 0; // 使用 type 替代 r_type
|
|
|
|
- console.log('status:', status); // 确保 status 被正确输出
|
|
|
|
- // console.log('r_type:', user.r_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 || '未知',
|
|
|
|
- };
|
|
|
|
- });
|
|
|
|
- // 更新数据状态
|
|
|
|
- this.refreshTableData(); // 例如刷新表格数据
|
|
|
|
|
|
+ // 使用 processData 方法处理响应数据
|
|
|
|
+ const allData = API_CONFIG.allRecords.processData(responses);
|
|
|
|
+
|
|
|
|
+ // 更新组件中的数据
|
|
|
|
+ this.AllData = allData;
|
|
|
|
+
|
|
|
|
+ // 打印处理后的数据
|
|
console.log(this.AllData);
|
|
console.log(this.AllData);
|
|
|
|
+
|
|
|
|
+ // 刷新表格数据
|
|
|
|
+ this.refreshTableData(); // 例如刷新表格数据
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
this.$message.error("查询失败");
|
|
this.$message.error("查询失败");
|
|
console.error(err);
|
|
console.error(err);
|
|
});
|
|
});
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
+
|
|
// 通过操作,将数据移到已通过
|
|
// 通过操作,将数据移到已通过
|
|
ajax_move_to_approved(userid) {
|
|
ajax_move_to_approved(userid) {
|
|
- const successMessage = '数据已成功移动到已通过状态!';
|
|
|
|
|
|
+ const successMessage = API_CONFIG.moveToApproved.successMessage;
|
|
|
|
|
|
// 弹出确认框
|
|
// 弹出确认框
|
|
this.$confirm(`您确定将此数据移至“已通过”状态吗?`, '确认操作', {
|
|
this.$confirm(`您确定将此数据移至“已通过”状态吗?`, '确认操作', {
|
|
@@ -512,14 +530,14 @@ export default {
|
|
// 确认后发起请求
|
|
// 确认后发起请求
|
|
let params = [
|
|
let params = [
|
|
{
|
|
{
|
|
- functionName: "account_approve_user", // 这里是将数据移至已通过状态的操作
|
|
|
|
|
|
+ functionName: API_CONFIG.moveToApproved.functionName, // 这里是将数据移至已通过状态的操作,使用配置中的存储过程名称
|
|
u_id: userid, // id
|
|
u_id: userid, // id
|
|
},
|
|
},
|
|
];
|
|
];
|
|
|
|
|
|
// 发起请求
|
|
// 发起请求
|
|
this.$ajax
|
|
this.$ajax
|
|
- .post("http://10.3.16.166:7003/api/pbl/localPost", params)
|
|
|
|
|
|
+ .post(API_CONFIG.moveToApproved.url, params) // 使用配置中的URL
|
|
.then((res) => {
|
|
.then((res) => {
|
|
console.log(res);
|
|
console.log(res);
|
|
this.$message({
|
|
this.$message({
|
|
@@ -546,7 +564,7 @@ export default {
|
|
|
|
|
|
// 忽略操作,将数据移到已拒绝
|
|
// 忽略操作,将数据移到已拒绝
|
|
ajax_move_to_rejected(userid) {
|
|
ajax_move_to_rejected(userid) {
|
|
- const successMessage = '数据已成功移动到已拒绝状态!';
|
|
|
|
|
|
+ const successMessage = API_CONFIG.moveToRejected.successMessage;
|
|
|
|
|
|
// 弹出确认框
|
|
// 弹出确认框
|
|
this.$confirm(`您确定将此数据移至“已拒绝”状态吗?`, '确认操作', {
|
|
this.$confirm(`您确定将此数据移至“已拒绝”状态吗?`, '确认操作', {
|
|
@@ -557,14 +575,14 @@ export default {
|
|
// 确认后发起请求
|
|
// 确认后发起请求
|
|
let params = [
|
|
let params = [
|
|
{
|
|
{
|
|
- functionName: "account_reject_user", // 这里是将数据移至已拒绝状态的操作
|
|
|
|
|
|
+ functionName: API_CONFIG.moveToRejected.functionName, // 这里是将数据移至已拒绝状态的操作,使用配置中的存储过程名称
|
|
u_id: userid, // 公司编号
|
|
u_id: userid, // 公司编号
|
|
},
|
|
},
|
|
];
|
|
];
|
|
|
|
|
|
// 发起请求
|
|
// 发起请求
|
|
this.$ajax
|
|
this.$ajax
|
|
- .post("http://10.3.16.166:7003/api/pbl/localPost", params)
|
|
|
|
|
|
+ .post(API_CONFIG.moveToRejected.url, params)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
console.log(res);
|
|
console.log(res);
|
|
this.$message({
|
|
this.$message({
|
|
@@ -597,68 +615,19 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
- // // 在待审核区域点击通过和忽略
|
|
|
|
- // ajax__handle_pending_action(userid, actionType) {
|
|
|
|
- // // 根据不同的操作,设置对应的API函数和提示消息
|
|
|
|
- // let params = [
|
|
|
|
- // {
|
|
|
|
- // functionName: actionType === 'approve' ? "approve_user" : "ignore_user", // 通过或忽略
|
|
|
|
- // u_id: userid, // 传递公司编号
|
|
|
|
- // },
|
|
|
|
- // ];
|
|
|
|
-
|
|
|
|
- // const actionMessage = actionType === 'approve' ? '通过该条数据' : '忽略该条数据';
|
|
|
|
- // const successMessage = actionType === 'approve' ? '通过成功!' : '忽略成功!';
|
|
|
|
- // const cancelMessage = actionType === 'approve' ? '已取消通过' : '已取消忽略';
|
|
|
|
-
|
|
|
|
- // // 弹窗确认
|
|
|
|
- // this.$confirm(`此操作将会${actionMessage}, 是否继续?`, '提示', {
|
|
|
|
- // confirmButtonText: '确定',
|
|
|
|
- // cancelButtonText: '取消',
|
|
|
|
- // type: 'warning'
|
|
|
|
- // }).then(() => {
|
|
|
|
- // // 确定后发起请求
|
|
|
|
- // this.$ajax
|
|
|
|
- // .post("http://10.3.16.166:7003/api/pbl/localPost", params)
|
|
|
|
- // .then((res) => {
|
|
|
|
- // console.log(res); // 打印成功响应
|
|
|
|
- // this.$message({
|
|
|
|
- // type: 'success',
|
|
|
|
- // message: successMessage
|
|
|
|
- // });
|
|
|
|
-
|
|
|
|
- // // 如果是通过操作,调用已通过处理函数
|
|
|
|
- // if (actionType === 'approve') {
|
|
|
|
- // this.ajax_move_to_approved(userid);
|
|
|
|
- // } else {
|
|
|
|
- // // 如果是忽略操作,调用已拒绝处理函数
|
|
|
|
- // this.ajax_move_to_rejected(userid);
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
- // .catch((err) => {
|
|
|
|
- // // 处理失败的响应
|
|
|
|
- // this.$message.error("处理失败");
|
|
|
|
- // console.error("请求失败,错误信息:", err);
|
|
|
|
- // });
|
|
|
|
- // }).catch(() => {
|
|
|
|
- // // 取消操作后的提示
|
|
|
|
- // this.$message({
|
|
|
|
- // type: 'info',
|
|
|
|
- // message: cancelMessage
|
|
|
|
- // });
|
|
|
|
- // });
|
|
|
|
- // },
|
|
|
|
|
|
+
|
|
|
|
|
|
// 在已拒绝区域点击移动至待审核
|
|
// 在已拒绝区域点击移动至待审核
|
|
ajax__move_to_pending_from_rejected(userid) {
|
|
ajax__move_to_pending_from_rejected(userid) {
|
|
let params = [
|
|
let params = [
|
|
{
|
|
{
|
|
- functionName: "account_move_to_pending", // 移动至待审核的操作
|
|
|
|
|
|
+ functionName: API_CONFIG.moveToPending.functionName, // 移动至待审核的操作
|
|
u_id: userid, // id
|
|
u_id: userid, // id
|
|
},
|
|
},
|
|
];
|
|
];
|
|
|
|
|
|
- const successMessage = '已移动至待审核!';
|
|
|
|
|
|
+ const successMessage = API_CONFIG.moveToPending.successMessage;
|
|
|
|
+ // const successMessage = '已移动至待审核!';
|
|
|
|
|
|
// 弹窗确认
|
|
// 弹窗确认
|
|
this.$confirm(`此操作将会将该条数据移回待审核, 是否继续?`, '提示', {
|
|
this.$confirm(`此操作将会将该条数据移回待审核, 是否继续?`, '提示', {
|
|
@@ -668,7 +637,7 @@ export default {
|
|
}).then(() => {
|
|
}).then(() => {
|
|
// 发起请求
|
|
// 发起请求
|
|
this.$ajax
|
|
this.$ajax
|
|
- .post("http://10.3.16.166:7003/api/pbl/localPost", params)
|
|
|
|
|
|
+ .post(API_CONFIG.moveToPending.url,params)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
console.log(res);
|
|
console.log(res);
|
|
this.$message({
|
|
this.$message({
|
|
@@ -706,13 +675,17 @@ export default {
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
.content {
|
|
.content {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: stretch;
|
|
width: 100%;
|
|
width: 100%;
|
|
- /* position: relative; */
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/* 表格容器样式 */
|
|
/* 表格容器样式 */
|
|
.table_container{
|
|
.table_container{
|
|
- width: 97%;
|
|
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ width: 100%;
|
|
padding: 30px;
|
|
padding: 30px;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -778,6 +751,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.el-table {
|
|
.el-table {
|
|
|
|
+ width: 100%;
|
|
border: 1px solid #dcdfe6;
|
|
border: 1px solid #dcdfe6;
|
|
|
|
|
|
/* 设置表格边框 */
|
|
/* 设置表格边框 */
|
|
@@ -790,17 +764,11 @@ export default {
|
|
height: 80px;
|
|
height: 80px;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 设置表头背景颜色 */
|
|
|
|
-.el-table th {
|
|
|
|
- background-color: #f5f7f9 !important;
|
|
|
|
- /* 设置表头背景颜色 */
|
|
|
|
- height: 60px;
|
|
|
|
|
|
+/* 使用v-deep深度,进入元素设置表格行的背景色 */
|
|
|
|
+::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
|
|
|
|
+ background-color: #f1f1f1;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 自定义斑马线的背景色 */
|
|
|
|
-.el-table .success-row {
|
|
|
|
- background-color: #f0f9eb;
|
|
|
|
-}
|
|
|
|
|
|
|
|
.address-column {
|
|
.address-column {
|
|
margin: 0;
|
|
margin: 0;
|
|
@@ -826,6 +794,20 @@ export default {
|
|
float: left;
|
|
float: left;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/* 文字移入鼠标呈现手掌样式 */
|
|
|
|
+.examine_title1 a{
|
|
|
|
+ cursor: pointer;
|
|
|
|
+}
|
|
|
|
+.examine_title2 a{
|
|
|
|
+ cursor: pointer;
|
|
|
|
+}
|
|
|
|
+.examine_title3 a{
|
|
|
|
+ cursor: pointer;
|
|
|
|
+}
|
|
|
|
+.examine_title4 a{
|
|
|
|
+ cursor: pointer;
|
|
|
|
+}
|
|
|
|
+
|
|
.examine_title1 p,
|
|
.examine_title1 p,
|
|
.examine_title2 p,
|
|
.examine_title2 p,
|
|
.examine_title3 p,
|
|
.examine_title3 p,
|