master
parent
5cb2cd86f8
commit
77a582ca9e
|
@ -0,0 +1,31 @@
|
|||
<template>
|
||||
<div class="report">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
navIf: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userData: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.userData = JSON.parse(localStorage.userData);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
.report{
|
||||
width: 595px;
|
||||
height: 842px;
|
||||
background: linear-gradient(126deg, #0D338A 0%, #0D338A 0%, #2884D3 100%);
|
||||
padding: 16px;
|
||||
}
|
||||
</style>
|
|
@ -322,6 +322,9 @@ export default {
|
|||
if (this.consumerData.Time) {
|
||||
this.consumerData.startTime = this.newDate(this.consumerData.Time[0]);
|
||||
this.consumerData.endTime = this.newDate(this.consumerData.Time[1]);
|
||||
}else{
|
||||
this.consumerData.startTime = ""
|
||||
this.consumerData.endTime =""
|
||||
}
|
||||
this.getConsumer();
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="disFlex">
|
||||
<NavLeft navIf="projectTopic" />
|
||||
<NavLeft navIf="generateTest" />
|
||||
<div class="projectManagement">
|
||||
<div class="title">编辑题库</div>
|
||||
|
||||
|
@ -33,12 +33,73 @@
|
|||
|
||||
<div class="projectTopicA">
|
||||
<div class="detailsInt">
|
||||
<div class="searchInput">
|
||||
<el-select
|
||||
v-model="value"
|
||||
class="m-2"
|
||||
placeholder="Select"
|
||||
size="large"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectClassData"
|
||||
:key="item.dictKey"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictKey"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="value"
|
||||
class="m-2"
|
||||
placeholder="Select"
|
||||
size="large"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectClassData1"
|
||||
:key="item.dictKey"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictKey"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="value"
|
||||
class="m-2"
|
||||
placeholder="Select"
|
||||
size="large"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectClassData2"
|
||||
:key="item.dictKey"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictKey"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="value"
|
||||
class="m-2"
|
||||
placeholder="Select"
|
||||
size="large"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectClassData3"
|
||||
:key="item.dictKey"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictKey"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
|
||||
<el-input
|
||||
v-model="projectName"
|
||||
placeholder="请输入项目名称"
|
||||
></el-input>
|
||||
</div>
|
||||
v-model="phoneInt"
|
||||
placeholder="请输入手机号"
|
||||
class="input-with-select m-2"
|
||||
style="width: 340px"
|
||||
size="large"
|
||||
>
|
||||
|
||||
</el-input>
|
||||
<div class="searchInput">
|
||||
<el-date-picker
|
||||
v-model="projectDate"
|
||||
|
@ -133,7 +194,10 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
total: "",
|
||||
|
||||
selectClassData: [],
|
||||
selectClassData1: [],
|
||||
selectClassData2: [],
|
||||
selectClassData3: [],
|
||||
detailsData: {
|
||||
current: "1",
|
||||
size: "10",
|
||||
|
@ -143,8 +207,8 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.projectData = JSON.parse(localStorage.detailsData);
|
||||
this.allowAllViewResult()
|
||||
|
||||
this.allowAllViewResult();
|
||||
this.addCation();
|
||||
this.getProject();
|
||||
},
|
||||
methods: {
|
||||
|
@ -158,8 +222,63 @@ export default {
|
|||
inputDataFun() {
|
||||
this.getProject(this.inputData);
|
||||
},
|
||||
testStatus(data) {
|
||||
addCation() {
|
||||
let param1 = new URLSearchParams();
|
||||
let param2 = new URLSearchParams();
|
||||
let param3 = new URLSearchParams();
|
||||
let param4 = new URLSearchParams();
|
||||
let that = this;
|
||||
param1.append("code", "topic_type_1");
|
||||
param2.append("code", "topic_type_2");
|
||||
param3.append("code", "topic_type_3");
|
||||
param4.append("code", "topic_type_4");
|
||||
console.log(123);
|
||||
this.axios
|
||||
.get("/hysc/system/dict/dictionary", {
|
||||
params: param1,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response);
|
||||
that.selectClassData = response.data.data;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
this.axios
|
||||
.get("/hysc/system/dict/dictionary", {
|
||||
params: param2,
|
||||
})
|
||||
.then(function (response) {
|
||||
|
||||
that.selectClassData1 = response.data.data;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
this.axios
|
||||
.get("/hysc/system/dict/dictionary", {
|
||||
params: param3,
|
||||
})
|
||||
.then(function (response) {
|
||||
|
||||
that.selectClassData2 = response.data.data;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
this.axios
|
||||
.get("/hysc/system/dict/dictionary", {
|
||||
params: param4,
|
||||
})
|
||||
.then(function (response) {
|
||||
|
||||
that.selectClassData3 = response.data.data;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
testStatus(data) {
|
||||
let isAllowViewResult = 1;
|
||||
if (data.age) {
|
||||
isAllowViewResult = 1;
|
||||
|
@ -183,8 +302,6 @@ export default {
|
|||
// });
|
||||
},
|
||||
allowAllViewResult() {
|
||||
|
||||
|
||||
this.axios
|
||||
.get("/hysc/test/allowAllViewResult", {
|
||||
testId: this.projectData.id,
|
||||
|
@ -201,7 +318,6 @@ export default {
|
|||
getProject() {
|
||||
let param = new URLSearchParams();
|
||||
let that = this;
|
||||
|
||||
param.append("current", this.detailsData.current);
|
||||
param.append("size", this.detailsData.size);
|
||||
param.append("testId", this.projectData.id);
|
||||
|
@ -211,9 +327,9 @@ export default {
|
|||
params: param,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data.data);
|
||||
that.tableData = response.data.data.records;
|
||||
that.total = response.data.data.total;
|
||||
console.log(response.data,"12aaaaa3");
|
||||
that.tableData = response.data.data.detailPage.records;
|
||||
that.total = response.data.data.detailPage.total;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
|
@ -230,6 +346,8 @@ export default {
|
|||
box-sizing: border-box;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.detailsInt .m-2{
|
||||
margin-right: 20px;}
|
||||
.projectTopicText .projectTopicCon > .ewm {
|
||||
padding-top: 0px;
|
||||
padding-left: 0px;
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
<p>单位名称:{{ item.companyName }}</p>
|
||||
<p>创建时间:{{ item.createTime }}</p>
|
||||
<p>
|
||||
二维码有效期: {{ item.qrCodeUrlEndTime }}至{{
|
||||
item.qrCodeUrlStartTime
|
||||
二维码有效期: {{ item.qrCodeUrlStartTime }}至{{
|
||||
item.qrCodeUrlEndTime
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
|
@ -55,11 +55,14 @@
|
|||
<p></p>
|
||||
<div class="buttonFunctionMake">
|
||||
<p @click="detailsData(item)">查看结果</p>
|
||||
<p>下载二维码</p>
|
||||
<p @click="downloadCode(item)">下载二维码</p>
|
||||
<p @click="resetCode(item)">重置二维码有效期</p>
|
||||
<p @click="addIdCard(item)">配置白名单</p>
|
||||
<p>停用</p>
|
||||
<p>删除</p>
|
||||
<p>
|
||||
<span v-if="item.status==0" @click="openTing(item)">停用</span>
|
||||
<span v-if="item.status==1" @click="resetCodeModify(item)">启用</span>
|
||||
</p>
|
||||
<p @click="openDelet(item)">删除</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -89,8 +92,8 @@
|
|||
|
||||
<div>
|
||||
<p>
|
||||
当前二维码有效期:{{ codeDate.qrCodeUrlEndTime }}至{{
|
||||
codeDate.qrCodeUrlStartTime
|
||||
当前二维码有效期:{{ codeDate.qrCodeUrlStartTime }}至{{
|
||||
codeDate.qrCodeUrlEndTime
|
||||
}}
|
||||
</p>
|
||||
<el-date-picker
|
||||
|
@ -103,7 +106,7 @@
|
|||
</el-date-picker>
|
||||
</div>
|
||||
<el-button type="primary" @click="resetCodeModify()">重置</el-button>
|
||||
<el-button @click="resetForm(ruleFormRef)">取消重置</el-button>
|
||||
<el-button @click="resetForm()">取消重置</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
|
||||
|
@ -139,15 +142,56 @@
|
|||
<el-form-item label="身份证号">
|
||||
<el-input v-model="iDcrtData.idCard"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号">
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="iDcrtData.phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="addTestWhiteList()">确定</el-button>
|
||||
<el-button @click="resetForm(ruleFormRef)">取消</el-button>
|
||||
<el-button type="primary" @click="addTestWhiteList()"
|
||||
>确定</el-button
|
||||
>
|
||||
<el-button @click="resetForm()">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div></div>
|
||||
<div>
|
||||
<div class="iDcrtInput">
|
||||
<div>
|
||||
<el-input
|
||||
v-model="codeDateCon.idCard"
|
||||
placeholder="请输入身份证号"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<el-button type="primary" @click="getTestWhiteList(true)"
|
||||
>确定</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-table :data="tableDataiDcrt" height="350" style="width: 100%">
|
||||
<el-table-column prop="name" label="姓名" width="80" />
|
||||
<el-table-column prop="idCard" label="身份证" width="180" />
|
||||
<el-table-column prop="phone" label="手机号" width="150" />
|
||||
<el-table-column align="center" fixed="right" label="状态">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="deletiDcrt(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChangea"
|
||||
@current-change="handleCurrentChangea"
|
||||
:current-page="currentPage4"
|
||||
layout="prev, pager, next, jumper"
|
||||
:total="totala"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
|
@ -155,7 +199,7 @@
|
|||
|
||||
<script>
|
||||
import NavLeft from "../components/nav.vue";
|
||||
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
export default {
|
||||
components: {
|
||||
NavLeft,
|
||||
|
@ -167,10 +211,19 @@ export default {
|
|||
return {
|
||||
total: "1",
|
||||
codeDate: "",
|
||||
codeDateCon: {
|
||||
current: 1,
|
||||
idCard:"",
|
||||
size: 10,
|
||||
|
||||
},
|
||||
resetCodeModifyData: "",
|
||||
drawer: false,
|
||||
direction: "rtl",
|
||||
iDcrt: false,
|
||||
projectName: "",
|
||||
projectDate: "",
|
||||
tableDataiDcrt: [],
|
||||
iDcrtData: {
|
||||
idCard: "",
|
||||
name: "",
|
||||
|
@ -218,26 +271,96 @@ export default {
|
|||
mounted() {
|
||||
// 初始化获取数据
|
||||
this.getGenerateTest();
|
||||
|
||||
},
|
||||
methods: {
|
||||
addIdCard(data) {
|
||||
this.codeDate = data;
|
||||
this.iDcrt= true
|
||||
this.iDcrt = true;
|
||||
this.getTestWhiteList();
|
||||
},
|
||||
// 提示窗
|
||||
openDelet(obj) {
|
||||
let that = this;
|
||||
ElMessageBox.confirm(
|
||||
"删除后将无法继续扫码访问,且正在参与答题的用户将会被终止答题测试",
|
||||
"确定要删除该测试吗?",
|
||||
{
|
||||
confirmButtonText: "取消",
|
||||
cancelButtonText: "确定",
|
||||
type: "提示",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
that.deletgenerateTest(obj);
|
||||
ElMessage({
|
||||
type: "delet",
|
||||
message: "已停用",
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: "delet",
|
||||
message: "已取消",
|
||||
});
|
||||
});
|
||||
},
|
||||
openTing(obj) {
|
||||
let that = this;
|
||||
|
||||
ElMessageBox.confirm(
|
||||
"停用后将无法继续扫码访问,且正在参与答题的用户将会被终止答题测试",
|
||||
"确定要停用该测试吗?",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "提示",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
that.resetCodeModify(obj);
|
||||
ElMessage({
|
||||
type: "delet",
|
||||
message: "已停用",
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: "delet",
|
||||
message: "已取消",
|
||||
});
|
||||
});
|
||||
},
|
||||
addTestWhiteList() {
|
||||
this.iDcrtData.testId=this.codeDate.id
|
||||
console.log( this.iDcrtData);
|
||||
this.iDcrtData.testId = this.codeDate.id;
|
||||
|
||||
let that = this;
|
||||
this.axios
|
||||
.post("/hysc/test/addTestWhiteList", this.iDcrtData,)
|
||||
.post("/hysc/test/addTestWhiteList", this.iDcrtData)
|
||||
.then(function (data) {
|
||||
console.log(data);
|
||||
that.getTestWhiteList();
|
||||
that.iDcrtData= {
|
||||
idCard: "",
|
||||
name: "",
|
||||
phone: "",
|
||||
testId: 0,
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
downloadCode(data){
|
||||
console.log(data);
|
||||
this.axios
|
||||
.get(data.qrCodeUrl,)
|
||||
.then(function () {
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
},
|
||||
//删除项目
|
||||
projectDelete(id) {
|
||||
let that = this;
|
||||
|
@ -265,18 +388,61 @@ export default {
|
|||
},
|
||||
handleCurrentChange(data) {
|
||||
this.generateData.current = data;
|
||||
this.getProject();
|
||||
this.getGenerateTest();
|
||||
},
|
||||
handleCurrentChangea(data) {
|
||||
this.codeDateCon.current = data;
|
||||
this.getTestWhiteList();
|
||||
},
|
||||
handleSizeChangea(data){
|
||||
this.codeDateCon.current = data;
|
||||
this.getTestWhiteList();
|
||||
},
|
||||
handleClose() {
|
||||
this.drawer = false;
|
||||
},
|
||||
resetForm() {
|
||||
this.drawer = false;
|
||||
this.iDcrt = false;
|
||||
},
|
||||
handleClosea() {
|
||||
this.iDcrt = false;
|
||||
},
|
||||
detailsData(data) {
|
||||
localStorage.detailsData= JSON.stringify(data)
|
||||
localStorage.detailsData = JSON.stringify(data);
|
||||
this.$router.push("/details");
|
||||
},
|
||||
|
||||
//
|
||||
deletiDcrt(data) {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post("/hysc/test/delTestWhiteList", {
|
||||
id: data.id,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data);
|
||||
that.getTestWhiteList();
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
deletgenerateTest(data) {
|
||||
console.log(data.id, "123123");
|
||||
let that = this;
|
||||
this.axios
|
||||
.post("/hysc/test/delTest", {
|
||||
id: data.id,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data);
|
||||
that.getGenerateTest();
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 时间格式转换
|
||||
newDate(data) {
|
||||
let yy = new Date(data).getFullYear();
|
||||
|
@ -309,20 +475,40 @@ export default {
|
|||
this.drawer = true;
|
||||
this.codeDate = data;
|
||||
},
|
||||
resetCodeModify() {
|
||||
resetCodeModify(dataId) {
|
||||
let data = [];
|
||||
let that = this;
|
||||
|
||||
this.drawer = false;
|
||||
if (this.resetCodeModifyData[0]) {
|
||||
data.push(this.newDate(this.resetCodeModifyData[0]));
|
||||
data.push(this.newDate(this.resetCodeModifyData[1]));
|
||||
}
|
||||
this.axios
|
||||
.post("/hysc/test/updTest", {
|
||||
let obj = {
|
||||
id: this.codeDate.id,
|
||||
qrCodeUrlStartTime: data[0],
|
||||
qrCodeUrlEndTime: data[1],
|
||||
})
|
||||
};
|
||||
if (dataId) {
|
||||
if (dataId.status == 1) {
|
||||
obj = {
|
||||
id: dataId.id,
|
||||
status: 0,
|
||||
};
|
||||
}else{
|
||||
obj = {
|
||||
id: dataId.id,
|
||||
status: 1,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.axios
|
||||
.post("/hysc/test/updTest", obj)
|
||||
.then(function (response) {
|
||||
console.log(response.data);
|
||||
that.getGenerateTest();
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
|
@ -332,12 +518,46 @@ export default {
|
|||
// 查询
|
||||
queryProject() {
|
||||
this.generateData.name = this.projectName;
|
||||
this.getProject();
|
||||
if (this.projectDate) {
|
||||
this.generateData.endTime = this.newDate(this.projectDate[1]);
|
||||
this.generateData.startTime = this.newDate(this.projectDate[0]);
|
||||
} else {
|
||||
this.generateData.endTime = "";
|
||||
this.generateData.startTime = "";
|
||||
}
|
||||
this.getGenerateTest();
|
||||
},
|
||||
|
||||
// 获取白名单列表
|
||||
getTestWhiteList(idC) {
|
||||
let param = new URLSearchParams();
|
||||
let that = this;
|
||||
if(idC){
|
||||
param.append("idCard", this.codeDateCon.idCard);
|
||||
}
|
||||
|
||||
|
||||
param.append("testId", this.codeDate.id);
|
||||
param.append("current", this.codeDateCon.current);
|
||||
param.append("size", this.codeDateCon.size);
|
||||
this.axios
|
||||
.get("/hysc/test/getTestWhiteList", {
|
||||
params: param,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data, "123123");
|
||||
that.totala = response.data.data.total;
|
||||
that.tableDataiDcrt = response.data.data.records;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 获取列表数据
|
||||
getGenerateTest() {
|
||||
let param = new URLSearchParams();
|
||||
let that = this;
|
||||
console.log(that.generateData);
|
||||
param.append("current", that.generateData.current);
|
||||
param.append("endTime", that.generateData.endTime);
|
||||
param.append("name", that.generateData.name);
|
||||
|
@ -362,6 +582,14 @@ export default {
|
|||
|
||||
|
||||
<style >
|
||||
.iDcrtInput {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.iDcrtInput > div {
|
||||
width: 60%;
|
||||
}
|
||||
.buttonFunctionMake {
|
||||
display: none;
|
||||
width: 200px;
|
||||
|
|
|
@ -2,51 +2,26 @@
|
|||
<div class="disFlex">
|
||||
<NavLeft navIf="index" />
|
||||
<div class="consumer">
|
||||
<div class="pull-title">
|
||||
<ul class="title-item">
|
||||
<li class="cur">用户管理</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
|
||||
<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="consumerData.keyword"
|
||||
v-model="phoneInt"
|
||||
placeholder="请输入手机号"
|
||||
class="input-with-select"
|
||||
style="width: 340px"
|
||||
>
|
||||
<template #prepend>
|
||||
<el-select
|
||||
v-model="consumerData.type"
|
||||
placeholder="手机号"
|
||||
style="width: 88px"
|
||||
>
|
||||
<el-option label="手机号" value="手机号"></el-option>
|
||||
<el-option label="微信号" value="微信号"></el-option>
|
||||
<el-option label="钉钉号" value="钉钉号"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
</el-input>
|
||||
</li>
|
||||
<li>
|
||||
<el-date-picker
|
||||
v-model="consumerData.Time"
|
||||
type="daterange"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
>
|
||||
</el-date-picker>
|
||||
</li>
|
||||
<el-button class="seach-btn" @click="queryConsumer()"
|
||||
|
||||
<el-button class="seach-btn" @click="getReportList()"
|
||||
><img src="../assets/search-btn.png" alt="" />查询
|
||||
</el-button>
|
||||
|
||||
|
@ -57,21 +32,14 @@
|
|||
<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" prop="wxMiniShowname" label="所属部门" /> -->
|
||||
<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="queryNamea(scope)"
|
||||
>删除</el-button
|
||||
>
|
||||
<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" prop="createTime" label="注册时间" />
|
||||
<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="queryNamea(scope)"
|
||||
<el-button type="text" size="small" @click="open(scope)"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-table-column>
|
||||
|
@ -91,6 +59,20 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
<el-drawer
|
||||
|
@ -145,6 +127,7 @@
|
|||
|
||||
<script>
|
||||
import NavLeft from "../components/nav.vue";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import * as qiniu from "qiniu-js";
|
||||
export default {
|
||||
components: {
|
||||
|
@ -165,6 +148,8 @@ export default {
|
|||
phone: "",
|
||||
size: 10,
|
||||
},
|
||||
phoneInt:"",
|
||||
indexTitIf:1,
|
||||
userData: "",
|
||||
adduserData: {
|
||||
account: "",
|
||||
|
@ -248,7 +233,9 @@ export default {
|
|||
usernameDatatitIf(ifS) {
|
||||
this.usernameDataIf = ifS;
|
||||
},
|
||||
|
||||
indexTitIfFun(data){
|
||||
this.indexTitIf=data
|
||||
},
|
||||
// 查看测试列表
|
||||
|
||||
handleCurrentChange(data) {
|
||||
|
@ -272,12 +259,15 @@ export default {
|
|||
queryName(data) {
|
||||
this.drawer = true;
|
||||
this.adduserData = { ...data.row };
|
||||
this.getroleData();
|
||||
},
|
||||
queryNamea(data) {
|
||||
let that=this
|
||||
this.axios
|
||||
.post("/hysc/user/delUserById", { id: data.row.id })
|
||||
.then(function (response) {
|
||||
console.log(response);
|
||||
that.getReportList();
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
|
@ -295,9 +285,8 @@ export default {
|
|||
getReportList() {
|
||||
let param = new URLSearchParams();
|
||||
param.append("current", this.consumerData.current);
|
||||
// param.append("phone", this.userData.phone);
|
||||
param.append("size", this.consumerData.size);
|
||||
|
||||
param.append("phone", this.phoneInt);
|
||||
let that = this;
|
||||
this.axios
|
||||
.get("/hysc/user/getUserList", {
|
||||
|
@ -305,16 +294,56 @@ export default {
|
|||
})
|
||||
.then(function (response) {
|
||||
that.tableData = response.data.data.records;
|
||||
console.log( that.tableData );
|
||||
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
|
||||
}
|
||||
}
|
||||
that.total = response.data.data.total;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
addUsername() {
|
||||
open(obj) {
|
||||
let that = this;
|
||||
ElMessageBox.confirm("是否确定删除", {
|
||||
confirmButtonText: "取消",
|
||||
cancelButtonText: "确定",
|
||||
type: "提示",
|
||||
})
|
||||
.then(() => {
|
||||
ElMessage({
|
||||
type: "delet",
|
||||
message: "已取消",
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
that.queryNamea(obj);
|
||||
ElMessage({
|
||||
type: "tiyong",
|
||||
message: "删除成功",
|
||||
});
|
||||
});
|
||||
},
|
||||
addUsername(data) {
|
||||
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.axios
|
||||
.post("/hysc/user/submit", this.adduserData)
|
||||
.then(function (response) {
|
||||
|
@ -331,6 +360,22 @@ this.adduserData.phone=this.adduserData.account
|
|||
.disFlex {
|
||||
display: flex;
|
||||
}
|
||||
.indexTit+div{
|
||||
flex: 1;
|
||||
background: #f8fafb;
|
||||
padding: 0 30px;
|
||||
}
|
||||
.indexTitIf{
|
||||
background: #fff;
|
||||
}
|
||||
.indexTit{
|
||||
background: #ddd;
|
||||
}
|
||||
.indexTit>p{
|
||||
padding: 20px;
|
||||
width: 200px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.usernameDatatit {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
|
@ -341,6 +386,19 @@ this.adduserData.phone=this.adduserData.account
|
|||
padding-top: 23px;
|
||||
left: 0px;
|
||||
}
|
||||
.quanian{
|
||||
padding-top: 100px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.quanian>p{
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
padding-left: 100px;
|
||||
}
|
||||
.quanian>:nth-child(1){
|
||||
padding-left: 0px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.usernameData > .p {
|
||||
width: 93%;
|
||||
padding: 16px 20px;
|
||||
|
@ -373,6 +431,7 @@ this.adduserData.phone=this.adduserData.account
|
|||
.consumer {
|
||||
width: calc(100% - 260px);
|
||||
padding: 50px 60px;
|
||||
display: flex;
|
||||
}
|
||||
.reportListCon {
|
||||
background: #f8fafb;
|
||||
|
|
|
@ -63,10 +63,8 @@
|
|||
size="small"
|
||||
@click.prevent="open(scope, 2)"
|
||||
>
|
||||
|
||||
<div v-if="scope.row.status == 0">停用</div>
|
||||
<div v-else>启用</div>
|
||||
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
|
@ -218,11 +216,10 @@ export default {
|
|||
if (obj.row.status == 0) {
|
||||
this.promptData.confirmText = "是否确定停用";
|
||||
this.promptData.message = "停用成功";
|
||||
}else{
|
||||
} else {
|
||||
this.promptData.confirmText = "是否确定启用";
|
||||
this.promptData.message = "启用成功";
|
||||
}
|
||||
|
||||
}
|
||||
ElMessageBox.confirm(this.promptData.confirmText, {
|
||||
confirmButtonText: "取消",
|
||||
|
@ -261,18 +258,18 @@ export default {
|
|||
});
|
||||
},
|
||||
// 编辑题库
|
||||
topicNav(data){
|
||||
localStorage.topicData= JSON.stringify( data.row)
|
||||
topicNav(data) {
|
||||
localStorage.topicData = JSON.stringify(data.row);
|
||||
this.$router.push("/projectTopic");
|
||||
},
|
||||
//删除项目
|
||||
resetForm(){
|
||||
this.drawer=false
|
||||
this.addProjectData= {
|
||||
resetForm() {
|
||||
this.drawer = false;
|
||||
this.addProjectData = {
|
||||
projectName: "",
|
||||
projectUnit: "",
|
||||
projectNote: "",
|
||||
}
|
||||
};
|
||||
},
|
||||
projectDelete(id) {
|
||||
let that = this;
|
||||
|
@ -342,9 +339,12 @@ this.drawer=false
|
|||
},
|
||||
// 查询
|
||||
queryProject() {
|
||||
if (this.projectDate[0]) {
|
||||
if (this.projectDate) {
|
||||
this.projectData.startTime = this.newDate(this.projectDate[0]);
|
||||
this.projectData.endTime = this.newDate(this.projectDate[1]);
|
||||
}else{
|
||||
this.projectData.startTime=""
|
||||
this.projectData.endTime = ""
|
||||
}
|
||||
this.projectData.name = this.projectName;
|
||||
this.getProject();
|
||||
|
@ -421,7 +421,7 @@ this.drawer=false
|
|||
.queryProject {
|
||||
width: 90px;
|
||||
height: 36px;
|
||||
cursor:pointer;
|
||||
cursor: pointer;
|
||||
background: #0544a4;
|
||||
box-shadow: 0px 2px 7px 0px rgba(120, 137, 149, 0.25);
|
||||
border-radius: 3px;
|
||||
|
@ -434,7 +434,7 @@ this.drawer=false
|
|||
}
|
||||
.addProject {
|
||||
width: 90px;
|
||||
cursor:pointer;
|
||||
cursor: pointer;
|
||||
height: 36px;
|
||||
background: #fbc861;
|
||||
box-shadow: 0px 2px 7px 0px #fff0cb;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="disFlex">
|
||||
<NavLeft navIf="projectTopic" />
|
||||
<NavLeft navIf="projectManagement" />
|
||||
<div class="projectManagement">
|
||||
<div class="title">编辑题库</div>
|
||||
|
||||
|
@ -441,7 +441,7 @@ export default {
|
|||
optionIndexEn: "",
|
||||
score: "",
|
||||
topicId: 0,
|
||||
topicType: "",
|
||||
topicType: "1",
|
||||
topicTypeValue: "",
|
||||
},
|
||||
{
|
||||
|
@ -453,7 +453,7 @@ export default {
|
|||
optionIndexEn: "",
|
||||
score: "",
|
||||
topicId: 0,
|
||||
topicType: "",
|
||||
topicType: "1",
|
||||
topicTypeValue: "",
|
||||
},
|
||||
{
|
||||
|
@ -465,7 +465,7 @@ export default {
|
|||
optionIndexEn: "",
|
||||
score: "",
|
||||
topicId: 0,
|
||||
topicType: "",
|
||||
topicType: "1",
|
||||
topicTypeValue: "",
|
||||
},
|
||||
{
|
||||
|
@ -477,7 +477,7 @@ export default {
|
|||
optionIndexEn: "",
|
||||
score: "",
|
||||
topicId: 0,
|
||||
topicType: "",
|
||||
topicType: "1",
|
||||
topicTypeValue: "",
|
||||
},
|
||||
],
|
||||
|
@ -492,15 +492,7 @@ export default {
|
|||
projectTopicData: {},
|
||||
optionsIf: 1,
|
||||
selectClassData: [
|
||||
{
|
||||
a: "123",
|
||||
},
|
||||
{
|
||||
a: "123",
|
||||
},
|
||||
{
|
||||
a: "123",
|
||||
},
|
||||
|
||||
],
|
||||
};
|
||||
},
|
||||
|
@ -654,10 +646,8 @@ export default {
|
|||
this.buttonDataIF = false;
|
||||
this.topicData = { ...data.row };
|
||||
|
||||
for (let index = 0; index < this.topicData.options.length; index++) {
|
||||
this.topicData.options[index].topicType =
|
||||
this.topicData.options[index].topicTypeValue;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
updTopic() {
|
||||
|
@ -825,17 +815,15 @@ export default {
|
|||
};
|
||||
},
|
||||
addProject() {
|
||||
console.log();
|
||||
this.drawer = true;
|
||||
this.clearFata();
|
||||
|
||||
this.topicData.libraryType = this.TopicPageData.libraryType;
|
||||
console.log(this.generateTestData);
|
||||
this.addCation();
|
||||
this.topicData.projectId = this.projectData.id;
|
||||
},
|
||||
handleClose() {
|
||||
this.drawer = false;
|
||||
this.generateTestIf=false
|
||||
},
|
||||
|
||||
addClassification() {
|
||||
|
@ -846,8 +834,10 @@ export default {
|
|||
params: param,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data.data);
|
||||
console.log(response.data.data,"aaa");
|
||||
that.selectClassData = { ...response.data.data };
|
||||
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
|
@ -872,8 +862,9 @@ export default {
|
|||
params: param,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data.data, "123");
|
||||
that.selectClassData = { ...response.data.data };
|
||||
|
||||
that.selectClassData = response.data.data ;
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
|
|
Loading…
Reference in New Issue