master
tangyi 2022-01-20 00:29:07 +08:00
parent 77a582ca9e
commit dd7a950c31
3 changed files with 248 additions and 15628 deletions

15598
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -123,7 +123,7 @@
<el-table :data="tableData" style="width: 100%" max-height="500">
<el-table-column align="center" prop="id" label="用户ID" />
<el-table-column align="center" prop="idCard" label="身份证号" />
<el-table-column align="center" prop="topic" label="人格类型" />
<el-table-column align="center" prop="topicTopicStr" label="人格类型" />
<el-table-column align="center" label="允许参测人员查看测试结果">
<template #default="scope">
@ -289,17 +289,17 @@ export default {
id: data.id,
isAllowViewResult,
});
// this.axios
// .post("/hysc/test/allowViewResult", {
// id: data.id,
// isAllowViewResult,
// })
// .then(function (response) {
// console.log(response.data.data);
// })
// .catch(function (error) {
// console.log(error);
// });
this.axios
.post("/hysc/test/allowViewResult", {
id: data.id,
isAllowViewResult,
})
.then(function (response) {
console.log(response.data.data);
})
.catch(function (error) {
console.log(error);
});
},
allowAllViewResult() {
this.axios

View File

@ -2,77 +2,93 @@
<div class="disFlex">
<NavLeft navIf="index" />
<div class="consumer">
<div class="indexTit">
<p @click="indexTitIfFun(1)" :class="indexTitIf==1?'indexTitIf':''">系统管理员</p>
<p @click="indexTitIfFun(2)" :class="indexTitIf==2?'indexTitIf':''">普通管理员</p>
<p @click="indexTitIfFun(3)" :class="indexTitIf==3?'indexTitIf':''">权限说明</p>
</div>
<div v-if="indexTitIf==1">
<div class="consumer-seach">
<ul class="consumer-seach-item">
<li>
<el-input
v-model="phoneInt"
placeholder="请输入手机号"
class="input-with-select"
style="width: 340px"
>
</el-input>
</li>
<el-button class="seach-btn" @click="getReportList()"
><img src="../assets/search-btn.png" alt="" />查询
</el-button>
<el-button class="seach-btn" @click="addIf()"> </el-button>
</ul>
</div>
<div class="consumer-list">
<el-table :data="tableData" style="width: 100%">
<el-table-column align="center" prop="name" label="账号信息" />
<el-table-column align="center" prop="phone" label="手机号" />
<el-table-column align="center" #default="scope" label="是否启用">
<el-switch v-model="scope.row.statusIf" @change="addUsername(scope.row)" />
</el-table-column>
<el-table-column align="center" #default="scope" label="操作">
<el-button type="text" size="small" @click="queryName(scope)"
>编辑</el-button
>
<el-button type="text" size="small" @click="open(scope)"
>删除</el-button
>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="consumer-pagination">
<el-pagination
background
:page-size="100"
layout="prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
<div class="indexTit">
<p
@click="indexTitIfFun(1)"
:class="indexTitIf == 1 ? 'indexTitIf' : ''"
>
</el-pagination>
系统管理员
</p>
<p
@click="indexTitIfFun(2)"
:class="indexTitIf == 2 ? 'indexTitIf' : ''"
>
普通管理员
</p>
<p
@click="indexTitIfFun(3)"
:class="indexTitIf == 3 ? 'indexTitIf' : ''"
>
权限说明
</p>
</div>
<div v-if="indexTitIf == 1">
<div class="consumer-seach">
<ul class="consumer-seach-item">
<li>
<el-input
v-model="phoneInt"
placeholder="请输入手机号"
class="input-with-select"
style="width: 340px"
>
</el-input>
</li>
<el-button class="seach-btn" @click="getReportList()"
><img src="../assets/search-btn.png" alt="" />查询
</el-button>
<el-button class="seach-btn" @click="addIf()"> </el-button>
</ul>
</div>
<div class="consumer-list">
<el-table :data="tableData" style="width: 100%">
<el-table-column align="center" prop="name" label="账号信息" />
<el-table-column align="center" prop="phone" label="手机号" />
<el-table-column align="center" #default="scope" label="是否启用">
<el-switch
v-model="scope.row.statusIf"
@change="addUsername(scope.row)"
/>
</el-table-column>
<el-table-column align="center" #default="scope" label="操作">
<el-button type="text" size="small" @click="queryName(scope)"
>编辑</el-button
>
<el-button type="text" size="small" @click="open(scope)"
>删除</el-button
>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="consumer-pagination">
<el-pagination
background
:page-size="100"
layout="prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
</el-pagination>
</div>
</div>
<div v-if="indexTitIf==3">
<div class='quanian'>
<p>系统管理员权限</p>
<p>1.生成测试</p>
<p>2.生成测试二维码配置二维码有效期</p>
<p>3.配置某人某次考生可以查看测试结果导出测试报告</p>
<div v-if="indexTitIf == 3">
<div class="quanian">
<p>系统管理员权限</p>
<p>1.生成测试</p>
<p>2.生成测试二维码配置二维码有效期</p>
<p>3.配置某人某次考生可以查看测试结果导出测试报告</p>
</div>
<div class="quanian">
<p>普通成员权限</p>
<p>1.查看所有数据</p>
<p>2.编辑题库</p>
</div>
</div>
<div class='quanian'>
<p>普通成员权限</p>
<p>1.查看所有数据</p>
<p>2.编辑题库</p>
</div>
</div>
</div>
<el-drawer
@ -148,8 +164,8 @@ export default {
phone: "",
size: 10,
},
phoneInt:"",
indexTitIf:1,
phoneInt: "",
indexTitIf: 1,
userData: "",
adduserData: {
account: "",
@ -164,6 +180,7 @@ export default {
//
this.userData = JSON.parse(localStorage.userData);
this.getReportList();
this.getroleData()
},
methods: {
upLoad(e) {
@ -217,7 +234,7 @@ export default {
.get("/hysc/system/role/getRoleList")
.then(function (response) {
that.roleData = response.data.data;
console.log(that.roleData);
})
.catch(function (error) {
console.log(error);
@ -233,9 +250,9 @@ export default {
usernameDatatitIf(ifS) {
this.usernameDataIf = ifS;
},
indexTitIfFun(data){
this.indexTitIf=data
},
indexTitIfFun(data) {
this.indexTitIf = data;
},
//
handleCurrentChange(data) {
@ -257,12 +274,12 @@ indexTitIfFun(data){
this.getroleData();
},
queryName(data) {
this.drawer = true;
this.drawer = true;
this.adduserData = { ...data.row };
this.getroleData();
this.getroleData();
},
queryNamea(data) {
let that=this
let that = this;
this.axios
.post("/hysc/user/delUserById", { id: data.row.id })
.then(function (response) {
@ -286,7 +303,7 @@ indexTitIfFun(data){
let param = new URLSearchParams();
param.append("current", this.consumerData.current);
param.append("size", this.consumerData.size);
param.append("phone", this.phoneInt);
param.append("phone", this.phoneInt);
let that = this;
this.axios
.get("/hysc/user/getUserList", {
@ -294,20 +311,25 @@ indexTitIfFun(data){
})
.then(function (response) {
that.tableData = response.data.data.records;
for (let index = 0; index <that.tableData.length; index++) {
if (that.tableData[index].status==1) {
that.tableData[index].statusIf=false
}else{
that.tableData[index].statusIf=true
}
for (let index = 0; index < that.tableData.length; index++) {
if (that.tableData[index].status == 1) {
that.tableData[index].statusIf = false;
} else {
that.tableData[index].statusIf = true;
}
}
console.log(that.roleDatam,"123");
that.total = response.data.data.total;
})
.catch(function (error) {
console.log(error);
});
},
open(obj) {
open(obj) {
let that = this;
ElMessageBox.confirm("是否确定删除", {
confirmButtonText: "取消",
@ -329,21 +351,19 @@ indexTitIfFun(data){
});
},
addUsername(data) {
this.drawer = false;
this.drawer = false;
if (data) {
this.adduserData.id = data.id;
if(this.adduserData.statusIf){
this.adduserData.status=0
}else{
this.adduserData.status=1
}
}else{
this.adduserData.avatar = this.imgData;
this.adduserData.phone=this.adduserData.account
this.adduserData.id = data.id;
if (this.adduserData.statusIf) {
this.adduserData.status = 0;
} else {
this.adduserData.status = 1;
}
} else {
this.adduserData.avatar = this.imgData;
this.adduserData.phone = this.adduserData.account;
}
this.axios
.post("/hysc/user/submit", this.adduserData)
.then(function (response) {
@ -360,21 +380,21 @@ this.adduserData.phone=this.adduserData.account
.disFlex {
display: flex;
}
.indexTit+div{
flex: 1;
background: #f8fafb;
padding: 0 30px;
.indexTit + div {
flex: 1;
background: #f8fafb;
padding: 0 30px;
}
.indexTitIf{
background: #fff;
.indexTitIf {
background: #fff;
}
.indexTit{
background: #ddd;
.indexTit {
background: #ddd;
}
.indexTit>p{
padding: 20px;
width: 200px;
font-size: 14px;
.indexTit > p {
padding: 20px;
width: 200px;
font-size: 14px;
}
.usernameDatatit {
display: flex;
@ -386,18 +406,18 @@ font-size: 14px;
padding-top: 23px;
left: 0px;
}
.quanian{
padding-top: 100px;
padding-left: 20px;
.quanian {
padding-top: 100px;
padding-left: 20px;
}
.quanian>p{
font-size: 16px;
color: #000;
padding-left: 100px;
.quanian > p {
font-size: 16px;
color: #000;
padding-left: 100px;
}
.quanian>:nth-child(1){
padding-left: 0px;
margin-bottom: 30px;
.quanian > :nth-child(1) {
padding-left: 0px;
margin-bottom: 30px;
}
.usernameData > .p {
width: 93%;