master
tangyi 2022-01-20 18:13:03 +08:00
parent dd7a950c31
commit acc58380b1
16 changed files with 16345 additions and 181 deletions

BIN
dist.zip Normal file

Binary file not shown.

15495
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@
"@vueup/vue-quill": "^1.0.0-alpha.40",
"axios": "^0.24.0",
"core-js": "^3.6.5",
"echarts": "^5.2.2",
"element-plus": "^1.3.0-beta.1",
"qiniu-js": "^3.4.0",
"vue": "^3.2.0",

BIN
src/assets/ceage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

BIN
src/assets/cedate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

BIN
src/assets/cename.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
src/assets/cetel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

BIN
src/assets/szbj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,31 +1,519 @@
<template>
<div class="report">
<div>
<div>
<div class="reportCon">
<div>
<div class="reportConTlt">
<img src="" alt="" />
<div>
<div>
<p>测试报告</p>
<p>意向岗位运营总监</p>
</div>
<p></p>
<div>
<p>
<img src="../assets/cename.png" alt="" /><span
>姓名谭玹霖</span
>
</p>
<p>
<img src="../assets/cetel.png" alt="" /><span
>电话+86 13600360000</span
>
</p>
</div>
<div>
<p>
<img src="../assets/ceage.png" alt="" /><span
>年龄25</span
>
</p>
<p>
<img src="../assets/cedate.png" alt="" /><span
>测试时间2022.01.09 13:08:34</span
>
</p>
</div>
</div>
</div>
<div class="titleA">人格类型测试</div>
<div class="titleB">人格类型测试<span>稳健型+影响型</span></div>
<p class="dateLength">测试时长<span>25min</span></p>
<div class="echartsCss">
<div
id="myChart123"
:style="{ width: '100%', height: '250px' }"
></div>
</div>
<div class="titleB">稳健型支持型人格解析</div>
<div class="progressBar">
<p class="progressBarTit">分数</p>
<div class="progressBarCon">
<div
:style="{ width: proportion(dataNum.num, dataNum.sum) }"
class="progressBarConList"
>
<p class="mark">{{ dataNum.num }}</p>
</div>
</div>
<div class="sumCss">
<p>0</p>
<p>{{ dataNum.sum }}</p>
</div>
</div>
</div>
</div>
<div class="reportCon">
<div>
<div class="titleC">
<p>测试报告</p>
<p>火眼识才测评</p>
</div>
<p class="titleCH"></p>
<div class="titleB">稳健型支持型人格解析</div>
<div class="progressBar">
<p class="progressBarTit">分数</p>
<div class="progressBarCon">
<div
:style="{ width: proportion(dataNum.num, dataNum.sum) }"
class="progressBarConList"
>
<p class="mark">{{ dataNum.num }}</p>
</div>
</div>
<div class="sumCss">
<p>0</p>
<p>{{ dataNum.sum }}</p>
</div>
</div>
<p class="description">人格描述</p>
<div class="topDescription">
<p>· 正面</p>
<p>
喜欢做主具有较强的行动力且行动迅速喜欢设定目标
并表现出不达目标不罢休充满自信意志坚定的状态常常能表现
出主动活力的状态遇到问题不会气馁在组织中表现为推动别人
行动的人工作表现为粗线条
</p>
</div>
<div class="topDescription">
<p>· 反面</p>
<p>
喜欢做主具有较强的行动力且行动迅速喜欢设定目标
并表现出不达目标不罢休充满自信意志坚定的状态常常能表现
出主动活力的状态遇到问题不会气馁在组织中表现为推动别人
行动的人工作表现为粗线条
</p>
</div>
<p class="description">人格特征</p>
<div class="traits">
<p>
<span>希望</span>
<span>达成目标</span>
</p>
<p>
<span>驱动力</span>
<span>目标和结果</span>
</p>
<p>
<span>面对压力</span>
<span>迅速完成任务忽略细节和过程</span>
</p>
<p>
<span>希望别人</span>
<span>做出改变</span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import { onMounted, getCurrentInstance } from "vue";
export default {
setup() {
const ins = getCurrentInstance();
onMounted(() => {
console.log(ins);
// element,onMountedHook
let myChart = echarts.init(document.getElementById("myChart123"));
let option = {
radar: {
// shape: 'circle',
indicator: [
{ name: "支配型7分", max: 6500 },
{ name: "谨慎型5分", max: 16000 },
{ name: "影响13分", max: 30000 },
{ name: "稳健型15分", max: 38000 },
],
},
// color: ["#000"],
series: [
{
name: "Budget vs spending",
type: "radar",
data: [
{
value: [5000, 14000, 28000, 26000, 42000],
name: "Actual Spending",
},
],
},
],
};
//
myChart.setOption(option);
window.onresize = function () {
//
myChart.resize();
};
});
},
props: {
navIf: String,
},
data() {
return {
userData: {},
dataNum: {
sum: 40,
num: 20,
},
stylecss: "35%",
};
},
mounted() {
this.userData = JSON.parse(localStorage.userData);
},
methods: {
proportion(obj, max) {
console.log((obj - 0) / (max - 0));
return ((obj - 0) / (max - 0)) * 100 + "%";
},
},
};
</script>
<style scoped>
.report{
width: 595px;
height: 842px;
background: linear-gradient(126deg, #0D338A 0%, #0D338A 0%, #2884D3 100%);
padding: 16px;
.report {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
position: fixed;
left: 0px;
z-index: 30;
display: flex;
box-sizing: border-box;
align-items: center;
padding: 0 90px;
top: 0px;
overflow: hidden;
}
.report > div > div {
width: 100%;
overflow-y: auto;
display: flex;
align-items: center;
}
.report > div {
width: 100%;
overflow: hidden;
}
.reportCon {
width: 595px;
min-width: 595px;
height: 842px;
margin-right: 50px;
background: linear-gradient(126deg, #0d338a 0%, #0d338a 0%, #2884d3 100%);
padding: 16px;
width: 1;
}
.reportCon > div {
background: #ffffff;
box-shadow: 2px 3px 4px 0px rgba(15, 55, 142, 0.2);
border-radius: 70px 0px 70px 0px;
width: 100%;
padding: 0 34px;
height: 100%;
padding-top: 64px;
box-sizing: border-box;
}
.reportConTlt {
display: flex;
}
.reportConTlt > img {
width: 100px;
height: 100px;
border-radius: 50%;
margin-right: 25px;
}
.reportConTlt > div {
flex: 1;
}
.reportConTlt > div > :nth-child(1) > :nth-child(1) {
font-size: 28px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #333333;
margin-right: 25px;
line-height: 28px;
}
.reportConTlt > div > :nth-child(1) > :nth-child(2) {
font-size: 12px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #666666;
line-height: 18px;
}
.reportConTlt > div > :nth-child(1) {
padding-top: 6px;
padding-bottom: 5px;
display: flex;
align-items: flex-end;
}
.reportConTlt > div > :nth-child(2) {
width: 100%;
height: 2px;
background: linear-gradient(138deg, #2884d3 0%, #0d338a 100%, #0d338a 100%);
}
.reportConTlt > div > :nth-child(3) {
display: flex;
}
.reportConTlt > div > :nth-child(3) > :nth-child(1) {
width: 154px;
}
.reportConTlt > div > :nth-child(3) > p {
display: flex;
align-items: center;
margin-top: 11px;
}
.reportConTlt > div > :nth-child(3) > p > img {
width: 18px;
height: 18px;
margin-right: 9px;
}
.reportConTlt > div > :nth-child(3) > p > span {
font-size: 14px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #666666;
line-height: 14px;
}
.reportConTlt > div > :nth-child(4) {
display: flex;
}
.reportConTlt > div > :nth-child(4) > :nth-child(1) {
width: 154px;
}
.reportConTlt > div > :nth-child(4) > p {
display: flex;
align-items: center;
margin-top: 11px;
}
.reportConTlt > div > :nth-child(4) > p > img {
width: 18px;
height: 18px;
margin-right: 9px;
}
.reportConTlt > div > :nth-child(4) > p > span {
font-size: 14px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #666666;
line-height: 21px;
}
.titleA {
width: 160px;
text-align: center;
height: 34px;
background: linear-gradient(138deg, #2884d3 0%, #0d338a 100%, #0d338a 100%);
margin: auto;
margin-top: 27px;
border-radius: 16px;
font-size: 18px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
margin-bottom: 27px;
color: #ffffff;
line-height: 34px;
}
.titleB {
position: relative;
font-size: 14px;
font-family: SourceHanSansCN-Medium, SourceHanSansCN;
font-weight: 500;
color: #515151;
line-height: 21px;
padding-left: 11px;
}
.titleB::after {
content: "";
width: 5px;
position: absolute;
left: 0px;
top: 50%;
margin-top: -7px;
height: 14px;
background: linear-gradient(138deg, #2884d3 0%, #0d338a 100%, #0d338a 100%);
border-radius: 9px;
}
.echartsCss {
margin-top: -35px;
margin-bottom: 37px;
}
.dateLength {
display: flex;
font-size: 13px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #666666;
line-height: 20px;
margin-top: 29px;
padding-left: 11px;
}
.dateLength > span {
font-size: 13px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #0544a4;
line-height: 20px;
}
.progressBar {
margin-top: 23px;
width: 495px;
height: 113px;
background: #f8f8f8;
padding: 24px 21px 18px;
border-radius: 10px;
}
.progressBarTit {
font-size: 14px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #454d67;
line-height: 21px;
margin-bottom: 19px;
padding-left: 9px;
}
.progressBarCon {
width: 100%;
height: 12px;
background: #ffffff;
box-shadow: inset 0px 1px 4px 0px rgba(0, 0, 0, 0.3);
border-radius: 16px;
}
.progressBarConList {
height: 12px;
background: linear-gradient(135deg, #ffdf73 0%, #febb3f 100%);
border-radius: 16px;
position: relative;
}
.mark {
position: absolute;
right: -10px;
width: 42px;
height: 46px;
bottom: 0px;
background-image: url("../assets/szbj.png");
background-size: 100%;
font-size: 17px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #333333;
text-align: center;
line-height: 36px;
}
.sumCss {
display: flex;
justify-content: space-between;
margin-top: 10px;
}
.sumCss > p {
font-size: 14px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #1b1e20;
}
.titleC {
display: flex;
justify-content: space-between;
padding-bottom: 5px;
}
.titleCH {
width: 100%;
height: 1px;
background: linear-gradient(138deg, #2884d3 0%, #0d338a 100%, #0d338a 100%);
margin-bottom: 19px;
}
.description {
width: 100px;
height: 30px;
background: linear-gradient(138deg, #2884d3 0%, #0d338a 100%, #0d338a 100%);
box-shadow: 1px 1px 2px 0px rgba(0, 0, 0, 0.2);
border-radius: 0px 40px 40px 0px;
margin-top: 23px;
font-size: 16px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
padding-left: 12px;
color: #ffffff;
line-height: 30px;
}
.topDescription {
font-size: 12px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #666666;
margin-top: 16px;
line-height: 18px;
}
.topDescription > :nth-child(1) {
font-size: 14px;
font-family: SourceHanSansCN-Medium, SourceHanSansCN;
font-weight: 500;
color: #0544a4;
line-height: 21px;
}
.topDescription > :nth-child(2) {
font-size: 12px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #666666;
line-height: 18px;
margin-top: 10px;
}
.traits{
padding-top: 16px;
}
.traits>p{
font-size: 12px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #0544A4;
line-height: 18px;
margin-bottom: 16px
;
}
.traits>p>:nth-child(2){
color: #666666;
}
</style>

View File

@ -17,6 +17,7 @@ axios.defaults.baseURL='https://a99zg89a.xiaomy.net'
let app=createApp(App)
app.config.globalProperties.$bucketName = "nianhua-test"
app.use(router)
app.use(ElementPlus,{locale:zhCn});
app.use(VueAxios,axios)

View File

@ -17,7 +17,13 @@ import details from '../view/details.vue'
//配置路由
const router = createRouter({
history: createWebHistory(),
routes: [{
routes: [
{
path: '/consumer', //
name: 'consumer',
component: consumer
},
{
path: '/', //登录页
name: 'login',
component: login
@ -27,11 +33,7 @@ const router = createRouter({
name: 'index',
component: index
},
{
path: '/consumer', //
name: 'consumer',
component: consumer
},
{
path: '/projectManagement', //
name: 'projectManagement',

View File

@ -138,18 +138,37 @@
<el-switch v-model="item.isAllowViewResultIf" @change="isAllowViewResultIf(item)" class="mb-2"> </el-switch>
</P>
<div >
<el-button
type="text"
size="small"
@click.prevent="editTitle()"
>
查看报告
</el-button>
<el-button
type="text"
size="small"
@click.prevent="editTitle()"
>
导出报告
</el-button>
</div>
</div>
</div>
</div>
</el-drawer>
<Report/>
</div>
</template>
<script>
import NavLeft from "../components/nav.vue";
import Report from "../components/report.vue";
export default {
components: {
NavLeft,
Report,
},
props: {
msg: String,

View File

@ -33,76 +33,17 @@
<div class="projectTopicA">
<div class="detailsInt">
<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="phoneInt"
placeholder="请输入手机号"
<el-input
v-model="idCardInput"
placeholder="请输入身份号"
class="input-with-select m-2"
style="width: 340px"
size="large"
size="large"
>
</el-input>
<div class="searchInput">
<el-date-picker
v-model="projectDate"
v-model="inputDate"
type="daterange"
align="right"
unlink-panels
@ -114,7 +55,7 @@
</el-date-picker>
</div>
<button type="button" @click="queryProject()" class="queryProject">
<button type="button" @click="getProject()" class="queryProject">
<img src="" alt="" /> 查询
</button>
</div>
@ -123,14 +64,19 @@
<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="topicTopicStr" label="人格类型" />
<el-table-column
align="center"
prop="topicTopicStr"
label="人格类型"
/>
<el-table-column align="center" label="允许参测人员查看测试结果">
<template #default="scope">
<el-switch
v-model="scope.row.age"
v-model="scope.row.isAllowViewResultIf"
@change="testStatus(scope.row)"
/>
<p>{{ scope.row.isAllowViewResultIf }}</p>
</template>
</el-table-column>
<el-table-column
@ -148,9 +94,9 @@
<el-button
type="text"
size="small"
@click.prevent="open(scope)"
@click.prevent="queryName(scope)"
>
删除
用户信息
</el-button>
<el-button
@ -158,25 +104,82 @@
size="small"
@click.prevent="editTitle(scope)"
>
编辑
查看报告
</el-button>
<el-button
type="text"
size="small"
@click.prevent="editTitle(scope)"
>
导出报告
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
layout="prev, pager, next, jumper"
:total="total"
>
</el-pagination>
<div class="disF">
<div class="yunx">
<p>允许全部参测人员</p>
<el-switch
v-model="isAllowViewResult"
@change="allowAllViewResult()"
/>
</div>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
layout="prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
<el-drawer
v-model="drawer"
:direction="direction"
:before-close="handleClose"
>
<div class="elementUl">
<div class="usernameDatatit">
<p
@click="usernameDatatitIf(true)"
:class="usernameDataIf ? 'usernameDatatitIf' : ''"
>
用户信息
</p>
</div>
<div class="usernameData">
<p class="p">
用户ID<span>{{ usernameData.id }}</span>
</p>
<p class="p">
手机号<span>{{ usernameData.phone }}</span>
</p>
<p class="p">
身份证号<span>{{ usernameData.idCard }}</span>
</p>
<div class="wxDd">
<p>微信</p>
<div class="wxDdCon">
<img :src="usernameData.wxMiniHeader" alt="" />
<p>{{ usernameData.wxMiniShowname }}</p>
</div>
<p>钉钉</p>
<div class="wxDdCon">
<img :src="usernameData.dingdingHeader" alt="" />
<p>{{ usernameData.dingdingShowname }}</p>
</div>
</div>
</div>
</div>
</el-drawer>
<!-- // 1 -->
</div>
</template>
@ -194,20 +197,27 @@ export default {
data() {
return {
total: "",
drawer: false,
usernameData: {},
selectClassData: [],
selectClassData1: [],
selectClassData2: [],
idCardInput: "",
inputDate: "",
tableData: [],
selectClassData3: [],
isAllowViewResult: false,
detailsData: {
current: "1",
size: "10",
startTime: "",
endTime: "",
},
projectData: {},
};
},
mounted() {
this.projectData = JSON.parse(localStorage.detailsData);
this.allowAllViewResult();
this.addCation();
this.getProject();
},
@ -217,7 +227,12 @@ export default {
this.detailsData.current = data;
this.getProject();
},
queryName(data) {
this.drawer = true;
this.usernameData = data.row;
console.log( this.usernameData );
},
//
inputDataFun() {
this.getProject(this.inputData);
@ -232,7 +247,7 @@ export default {
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,
@ -249,7 +264,6 @@ export default {
params: param2,
})
.then(function (response) {
that.selectClassData1 = response.data.data;
})
.catch(function (error) {
@ -260,7 +274,6 @@ export default {
params: param3,
})
.then(function (response) {
that.selectClassData2 = response.data.data;
})
.catch(function (error) {
@ -271,24 +284,21 @@ export default {
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;
} else {
if (data.isAllowViewResultIf) {
isAllowViewResult = 0;
} else {
isAllowViewResult = 1;
}
console.log({
id: data.id,
isAllowViewResult,
});
this.axios
.post("/hysc/test/allowViewResult", {
id: data.id,
@ -302,33 +312,83 @@ export default {
});
},
allowAllViewResult() {
let isAllowViewResultIf = 0;
if (this.isAllowViewResult) {
isAllowViewResultIf = 1;
} else {
isAllowViewResultIf = 0;
}
let that = this;
this.axios
.get("/hysc/test/allowAllViewResult", {
testId: this.projectData.id,
params: {
testId: this.projectData.id,
isAllowViewResult: isAllowViewResultIf,
},
})
.then(function (response) {
console.log(response.data.data);
that.getProject();
})
.catch(function (error) {
console.log(error);
});
},
newDate(data) {
let yy = new Date(data).getFullYear();
let mm = new Date(data).getMonth() + 1;
let dd = new Date(data).getDate();
return yy + "-" + mm + "-" + dd;
},
//
getProject() {
let param = new URLSearchParams();
let that = this;
this.detailsData.startTime= ""
this.detailsData.endTime= ""
if (this.inputDate) {
this.detailsData.startTime= this.newDate(this.inputDate[0])
this.detailsData.endTime= this.newDate(this.inputDate[1])
}
param.append("current", this.detailsData.current);
param.append("size", this.detailsData.size);
param.append("testId", this.projectData.id);
param.append("idCard", this.idCardInput);
param.append("startTime", this.detailsData.startTime);
param.append("endTime", this.detailsData.endTime);
this.axios
.get("/hysc/test/getTestDetailPage", {
params: param,
})
.then(function (response) {
console.log(response.data,"12aaaaa3");
that.tableData = [];
if (response.data.data.isAllAllowViewResult == 1) {
that.isAllowViewResult = true;
} else {
that.isAllowViewResult = false;
}
for (
let index = 0;
index < response.data.data.detailPage.records.length;
index++
) {
if (
response.data.data.detailPage.records[index].isAllowViewResult ==
1
) {
response.data.data.detailPage.records[
index
].isAllowViewResultIf = true;
} else {
response.data.data.detailPage.records[
index
].isAllowViewResultIf = false;
}
}
that.tableData = response.data.data.detailPage.records;
that.total = response.data.data.detailPage.total;
})
.catch(function (error) {
@ -341,13 +401,90 @@ export default {
<style scoped>
.usernameDatatit {
display: flex;
position: absolute;
width: 80%;
top: 0px;
padding-left: 40px;
padding-top: 23px;
left: 0px;
}
.wxDd > p {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #8e8e8e;
padding-bottom: 16px;
padding-left: 20px;
padding-right: 20px;
padding-top: 16px;
width: 93%;
border-bottom: 1px solid #e4eaee;
line-height: 20px;
}
.wxDdCon {
display: flex;
align-items: center;
padding: 20px 30px;
}
.wxDdCon img {
width: 100px;
height: 100px;
border-radius: 50%;
border: 1px solid #c1c1c1;
}
.wxDdCon p {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #515151;
line-height: 20px;
margin-left: 20px;
}
.usernameData > .p {
width: 93%;
padding: 16px 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #8e8e8e;
display: flex;
justify-content: space-between;
line-height: 20px;
border-bottom: 1px solid #e4eaee;
margin-bottom: 18px;
}
.usernameData > .p span {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #515151;
line-height: 20px;
}
.usernameDatatit > p {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #454d67;
margin-right: 30px;
line-height: 22px;
}
.disF {
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-left: 45%;
}
.projectManagement {
height: 100vh;
box-sizing: border-box;
overflow-x: auto;
}
.detailsInt .m-2{
margin-right: 20px;}
.detailsInt .m-2 {
margin-right: 20px;
}
.projectTopicText .projectTopicCon > .ewm {
padding-top: 0px;
padding-left: 0px;
@ -357,7 +494,10 @@ margin-right: 20px;}
display: flex;
justify-content: flex-end;
}
.yunx {
display: flex;
align-items: center;
}
.projectTopicText .projectTopicCon > .ewm > img {
height: 100px;
width: 100px;

View File

@ -58,10 +58,14 @@
<p @click="downloadCode(item)"></p>
<p @click="resetCode(item)"></p>
<p @click="addIdCard(item)"></p>
<p>
<span v-if="item.status==0" @click="openTing(item)"></span>
<span v-if="item.status==1" @click="resetCodeModify(item)"></span>
</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>
@ -179,17 +183,17 @@
</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 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>
@ -211,11 +215,10 @@ export default {
return {
total: "1",
codeDate: "",
codeDateCon: {
codeDateCon: {
current: 1,
idCard:"",
idCard: "",
size: 10,
},
resetCodeModifyData: "",
drawer: false,
@ -306,7 +309,7 @@ export default {
},
openTing(obj) {
let that = this;
ElMessageBox.confirm(
"停用后将无法继续扫码访问,且正在参与答题的用户将会被终止答题测试",
"确定要停用该测试吗?",
@ -339,28 +342,57 @@ export default {
.then(function (data) {
console.log(data);
that.getTestWhiteList();
that.iDcrtData= {
idCard: "",
name: "",
phone: "",
testId: 0,
}
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);
});
downloadIamge(imgsrc, name) {
//
var image = new Image();
// Canvas
image.setAttribute("crossOrigin", "anonymous");
image.onload = function () {
var canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
var context = canvas.getContext("2d");
context.drawImage(image, 0, 0, image.width, image.height);
var url = canvas.toDataURL("image/png"); //base64
var a = document.createElement("a"); // a
var event = new MouseEvent("click"); //
a.download = name || "photo"; //
a.href = url; // URLa.href
a.dispatchEvent(event); // a
};
image.src = imgsrc;
},
downloadCode(data) {
this.downloadIamge(data.qrCodeUrl, "二维码");
},
// downloadCode(data){
// console.log(data);
// this.axios
// .get(data.qrCodeUrl,)
// .then(function () {
// })
// .catch(function (error) {
// console.log(error);
// });
// },
//
projectDelete(id) {
let that = this;
@ -390,11 +422,11 @@ export default {
this.generateData.current = data;
this.getGenerateTest();
},
handleCurrentChangea(data) {
handleCurrentChangea(data) {
this.codeDateCon.current = data;
this.getTestWhiteList();
},
handleSizeChangea(data){
handleSizeChangea(data) {
this.codeDateCon.current = data;
this.getTestWhiteList();
},
@ -495,14 +527,13 @@ export default {
id: dataId.id,
status: 0,
};
}else{
obj = {
} else {
obj = {
id: dataId.id,
status: 1,
};
}
}
this.axios
.post("/hysc/test/updTest", obj)
@ -532,14 +563,13 @@ export default {
getTestWhiteList(idC) {
let param = new URLSearchParams();
let that = this;
if(idC){
param.append("idCard", this.codeDateCon.idCard);
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);
param.append("current", this.codeDateCon.current);
param.append("size", this.codeDateCon.size);
this.axios
.get("/hysc/test/getTestWhiteList", {
params: param,

View File

@ -10,7 +10,7 @@
系统管理员
</p>
<p
@click="indexTitIfFun(2)"
@click="indexTitIfFun(2,true)"
:class="indexTitIf == 2 ? 'indexTitIf' : ''"
>
普通管理员
@ -22,7 +22,7 @@
权限说明
</p>
</div>
<div v-if="indexTitIf == 1">
<div v-if="indexTitIf == 1||indexTitIf == 2">
<div class="consumer-seach">
<ul class="consumer-seach-item">
<li>
@ -167,6 +167,7 @@ export default {
phoneInt: "",
indexTitIf: 1,
userData: "",
user:"administrator",
adduserData: {
account: "",
avatar: "",
@ -250,7 +251,14 @@ export default {
usernameDatatitIf(ifS) {
this.usernameDataIf = ifS;
},
indexTitIfFun(data) {
indexTitIfFun(data,ifD) {
if (ifD) {
this.user="user"
this.getReportList();
}else{
this.user="administrator"
this.getReportList();
}
this.indexTitIf = data;
},
//
@ -304,6 +312,8 @@ export default {
param.append("current", this.consumerData.current);
param.append("size", this.consumerData.size);
param.append("phone", this.phoneInt);
param.append("roleAlias",this.user);
let that = this;
this.axios
.get("/hysc/user/getUserList", {

View File

@ -1,6 +1,6 @@
<template>
<div class="disFlex">
<NavLeft navIf="topicParameters projectManagement" />
<NavLeft navIf="topicParameters" />
<div class="topicParametersCon projectManagement">
<div class="title">项目管理</div>
@ -102,7 +102,7 @@
<el-button type="primary" v-else @click="updLibraryTypeParam()"
>修改项目</el-button
>
<el-button @click="resetForm(ruleFormRef)"></el-button>
<el-button @click="resetForm()"></el-button>
</el-form-item>
</el-drawer>
</div>
@ -156,6 +156,7 @@ export default {
methods: {
// A
topicParametersNavIfFun(num) {
this.topicParametersDataNavIf=1
this.topicParametersNavIf = num;
this.topicParametersDataNavDataList =
this.topicParametersDataNavData[num - 1];
@ -181,7 +182,7 @@ export default {
},
updLibraryTypeParam() {
let that = this;
console.log();
this.topicParametersIf=false
this.axios
.post("/hysc/library/updLibraryTypeParam", this.topicParametersData)
.then(function (data) {
@ -206,6 +207,7 @@ export default {
});
},
addtopicParametersData() {
this.topicParametersIf=false
if (this.topicParametersNavIf == 1) {
this.topicParametersData.libraryType = "topic_type_1";
} else if (this.topicParametersNavIf == 2) {
@ -268,11 +270,15 @@ export default {
<style scoped>
.topicParametersConment{
position: relative;
padding-top: 85px;
}
.topicParametersConmentData {
font-size: 14px;
background-color: #ddd;
background-color: #fff;
width: 94%;
color: #fff;
color: #000;
margin-left: 20px;
padding: 20px;
box-sizing: border-box;
@ -327,6 +333,7 @@ export default {
}
.topicParametersData {
margin-left: 120px;
position: relative;
flex: 1;
}
.topicParametersDataNav {
@ -352,6 +359,13 @@ export default {
text-align: right;
padding-right: 20px;
padding-top: 20px;
padding-bottom: 20px;
width: 98%;
box-sizing:border-box;
position: absolute;
z-index: 1;
top: 53px;
background: #f8fafb;
}
.addtopicParameters button {
width: 90px;