1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<template>
<!-- 账号禁用审核 -->
<div class="recheck-wrapper height100">
<div class="search-container">
<el-form :inline="true" :model="form">
<el-form-item>
<el-input
v-model="form.name"
placeholder="请输入账号名称、提交人"
suffix-icon="el-icon-search"
clearable
>
</el-input>
</el-form-item>
<el-form-item>
<el-select
v-model="form.status"
placeholder="请选择账号状态"
clearable
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button type="primary" @click="handleSubmit">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</div>
</el-form-item>
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips"
>展示所有禁用账号的申请,审核通过后,该账号状态为禁用,无法在系统中使用</span
>
</div>
</div>
<div class="table-content">
<check-table
class="noAdd"
:feildList="feildList"
:list="list"
@action="handleAction"
:currentPage="page._index"
/>
<party-pagination :page="page" @changePage="handleChangeCurrent" />
</div>
<reject-dialog ref="rejectDialog" @success="getPageList()" />
</div>
</template>
<script>
import { partyPagination } from "@/components/index";
import checkTable from "./components/checkTable";
import { rejectDialog } from "./checkDialog/index";
export default {
data() {
return {
form: {
name: "",
status: "",
},
options: [
{ label: "待初审", value: "TBC" },
{ label: "驳回", value: "REFUSED" },
{ label: "待复审", value: "TBCA" },
{ label: "通过", value: "APPROVED_FINAL" },
],
feildList: [
{ prop: "content", label: "账号名称" },
{ prop: "orgName", label: "所在机构" },
{ prop: "userName", label: "提交人" },
{ prop: "createTime", label: "提交日期" },
{ prop: "status", label: "审核状态" },
{ prop: "", label: "操作", isEdit: true, width: 240 },
],
list: [],
activeRow: {},
page: {
_index: 1,
_size: 10,
total: 0,
},
type: "ACCOUNT",
passStatus: "APPROVED_FINAL",
//待初审 TBC, 驳回 REFUSED, 待复审 TBCA, 通过APPROVED_FINAL
};
},
components: { partyPagination, checkTable, rejectDialog },
mounted() {
this.getFirstPageList();
},
methods: {
// 查询数据
handleSubmit() {
this.getPageList();
},
handleReset() {
this.form.name = "";
this.form.status = "";
this.getFirstPageList();
},
// 获取第一页数据列表
getFirstPageList() {
this.page._index = 1;
this.getPageList();
},
getPageList() {
let requestParams = {};
requestParams._index = this.page._index;
requestParams._size = this.page._size;
requestParams.name = this.form.name;
requestParams.status = this.form.status;
this.$https(
{
method: "get",
url: "audit/getUserList",
authType: this.backToken,
},
requestParams
)
.then((res) => {
if (res.status != 200) {
this.getResWithOutData();
} else {
if (res.data.resultCode == 200) {
this.list = res.data.data.records;
this.page._size = res.data.data.size;
this.page.total = res.data.data.total;
} else {
this.getResWithOutData();
}
}
})
.catch((err) => {
console.log(err);
});
},
// 页面返回值为空
getResWithOutData() {
this.list = [];
this.page = {
_index: 1,
_size: 10,
total: 0,
};
},
handleAction(params) {
this.activeRow = params.row;
switch (params.type) {
case "reject":
this.handleRject();
break;
case "pass":
this.handlePass();
break;
default:
break;
}
},
// 驳回
handleRject() {
this.$refs.rejectDialog.activeRow = this.activeRow;
this.$refs.rejectDialog.dialogVisible = true;
},
// 通过
handlePass() {
let params = {};
let _this = this;
params.id = this.activeRow.id;
params.status = this.passStatus;
params.type = this.type;
params.refItemId = this.activeRow.refItemId;
params.level = this.activeRow.status;
this.$https(
{
method: "put",
url: "audit/update",
authType: this.backToken,
},
// _this.$qs.stringify(params)
params
)
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.$message({
type: "success",
message: res.data.message,
});
this.getPageList();
} else {
this.$message.error(res.data.message);
}
} else {
this.$message.error(res.data);
}
})
.catch((err) => {
console.log(res);
});
},
// 翻页
handleChangeCurrent(val) {
this.page._index = val;
this.getPageList();
},
},
};
</script>
<style lang="less" scoped>
</style>