master
parent
c15fab6c72
commit
9918fe441f
25
src/App.vue
25
src/App.vue
|
@ -7,30 +7,6 @@
|
|||
</script>
|
||||
|
||||
<style>
|
||||
<<<<<<< HEAD
|
||||
body{
|
||||
margin: 0px;
|
||||
}
|
||||
p{
|
||||
margin: 0px;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
*{outline: none;}
|
||||
.makeBer{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
display: flex;
|
||||
z-index: 5;
|
||||
align-items: center;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
justify-content: center
|
||||
}
|
||||
=======
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
@ -82,5 +58,4 @@ justify-content: center
|
|||
.title-item li.cur{
|
||||
border-bottom: 1px solid #0544A4;
|
||||
}
|
||||
>>>>>>> 642f11b1bb2a73ce363919b308f78feb8965d9c4
|
||||
</style>
|
||||
|
|
|
@ -1,181 +1,416 @@
|
|||
<template>
|
||||
<div class="disFlex">
|
||||
<NavLeft />
|
||||
<div class="consumer">
|
||||
<div class="pull-title">
|
||||
<ul class="title-item">
|
||||
<li class="cur">用户管理</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="consumer-seach">
|
||||
<ul class="consumer-seach-item">
|
||||
<li>
|
||||
<el-input v-model="input" placeholder="请输入手机号" class="input-with-select" style="width: 340px;">
|
||||
<template #prepend>
|
||||
<el-select v-model="select" placeholder="手机号" style="width: 88px;">
|
||||
<el-option label="手机号" value="1"></el-option>
|
||||
<el-option label="微信号" value="2"></el-option>
|
||||
<el-option label="钉钉号" value="3"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-input>
|
||||
</li>
|
||||
<li>
|
||||
<el-date-picker v-model="value" type="date" placeholder="请选择注册时间" style="width: 340px;">
|
||||
</el-date-picker>
|
||||
</li>
|
||||
<el-button class="seach-btn" @click="queryConsumer()"><img src="../assets/search-btn.png" alt="">查询
|
||||
</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" prop="wxMiniShowname" label="微信" />
|
||||
<el-table-column align="center" prop="dingdingShowname" label="钉钉" />
|
||||
<el-table-column align="center" prop="createTime" label="注册时间" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<el-button type="text" size="small" @click="handleClick">用户详情</el-button>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 分页 -->
|
||||
<div class="consumer-pagination">
|
||||
<el-pagination background v-model:currentPage="currentPage3" :page-size="100"
|
||||
layout="prev, pager, next, jumper" :total="1000" @size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="disFlex">
|
||||
<NavLeft />
|
||||
<div class="consumer">
|
||||
<div class="pull-title">
|
||||
<ul class="title-item">
|
||||
<li class="cur">用户管理</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="consumer-seach">
|
||||
<ul class="consumer-seach-item">
|
||||
<li>
|
||||
<el-input
|
||||
v-model="consumerData.keywordt"
|
||||
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()"
|
||||
><img src="../assets/search-btn.png" alt="" />查询
|
||||
</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" prop="wxMiniShowname" label="微信" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="dingdingShowname"
|
||||
label="钉钉"
|
||||
/>
|
||||
<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-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 分页 -->
|
||||
<div class="consumer-pagination">
|
||||
<el-pagination
|
||||
background
|
||||
v-model:currentPage="currentPage3"
|
||||
:page-size="100"
|
||||
layout="prev, pager, next, jumper"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-drawer
|
||||
v-model="drawer"
|
||||
:direction="direction"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="elementUl">
|
||||
<div class="usernameDatatit">
|
||||
<p>用户信息</p>
|
||||
<p>测评报告</p>
|
||||
</div>
|
||||
|
||||
<div v-if="usernameDataIf" 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="" alt="" />
|
||||
<p>{{ usernameData.wxMiniShowname }}</p>
|
||||
</div>
|
||||
<div class="wxDdCon">
|
||||
<img src="" alt="" />
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else class="reportList">
|
||||
<div class="reportListCon">
|
||||
<p>MBTI人格类型测试</p>
|
||||
<p><span> 测试时间</span> <span> 2021.02.23 12:32:34</span></p>
|
||||
<p><span> 创建部门</span> <span> 人事部</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavLeft from "../components/nav.vue";
|
||||
export default {
|
||||
components: {
|
||||
NavLeft,
|
||||
},
|
||||
props: {
|
||||
msg: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
input: '',
|
||||
select: '',
|
||||
value: '',
|
||||
tableData: [],
|
||||
consumerData: {
|
||||
current: 1,
|
||||
keyword: "",
|
||||
type: "",
|
||||
size: 10
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 初始化获取数据
|
||||
this.getConsumer();
|
||||
},
|
||||
methods: {
|
||||
// 时间格式转换
|
||||
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;
|
||||
},
|
||||
// 查询
|
||||
queryConsumer() {
|
||||
this.consumerData.startTime = this.keyword;
|
||||
this.getConsumer();
|
||||
},
|
||||
// 获取列表数据
|
||||
getConsumer() {
|
||||
let param = new URLSearchParams();
|
||||
param.append("current", this.consumerData.current);
|
||||
param.append("keyword", this.consumerData.keyword);
|
||||
param.append("size", this.consumerData.size);
|
||||
param.append("type", this.consumerData.type);
|
||||
let that = this;
|
||||
this.axios
|
||||
.get("/hysc/member/getMemberPage", {
|
||||
params: param
|
||||
})
|
||||
.then(function(response) {
|
||||
console.log(response.data);
|
||||
that.tableData = response.data.data.records;
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
import NavLeft from "../components/nav.vue";
|
||||
export default {
|
||||
components: {
|
||||
NavLeft,
|
||||
},
|
||||
props: {
|
||||
msg: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
input: "",
|
||||
select: "",
|
||||
drawer: false,
|
||||
value: "",
|
||||
Time: "",
|
||||
usernameData: {},
|
||||
tableData: [],
|
||||
ReportListData: [],
|
||||
total: 1,
|
||||
usernameDataIf: false,
|
||||
consumerData: {
|
||||
current: 1,
|
||||
keyword: "",
|
||||
type: "",
|
||||
size: 10,
|
||||
endTime: "",
|
||||
startTime: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 初始化获取数据
|
||||
this.getConsumer();
|
||||
},
|
||||
methods: {
|
||||
// 时间格式转换
|
||||
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;
|
||||
},
|
||||
// 查看用户信息
|
||||
queryName(data) {
|
||||
this.drawer = true;
|
||||
console.log(data);
|
||||
this.getReportList(data.row);
|
||||
this.usernameData = data.row;
|
||||
},
|
||||
handleCurrentChange(data) {
|
||||
this.consumerData.current = data;
|
||||
this.getConsumer();
|
||||
},
|
||||
// 获取列表数据
|
||||
getConsumer() {
|
||||
let param = new URLSearchParams();
|
||||
param.append("current", this.consumerData.current);
|
||||
param.append("keyword", this.consumerData.keyword);
|
||||
param.append("size", this.consumerData.size);
|
||||
param.append("type", this.consumerData.type);
|
||||
param.append("endTime", this.consumerData.endTime);
|
||||
param.append("startTime", this.consumerData.startTime);
|
||||
let that = this;
|
||||
this.axios
|
||||
.get("/hysc/member/getMemberPage", {
|
||||
params: param,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data);
|
||||
that.tableData = response.data.data.records;
|
||||
that.total = response.data.data.total;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
getReportList(id) {
|
||||
let param = new URLSearchParams();
|
||||
param.append("memberId", id);
|
||||
|
||||
let that = this;
|
||||
this.axios
|
||||
.get("/hysc/member/getMemberTestList", {
|
||||
params: param,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data);
|
||||
that.ReportListData = response.data.data.records;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
queryConsumer() {
|
||||
// consumerData: {
|
||||
// current: 1,
|
||||
// keyword: "",
|
||||
// type: "",
|
||||
// size: 10,
|
||||
// endTime: "",
|
||||
// startTime: "",
|
||||
// },
|
||||
console.log(this.consumerData.Time);
|
||||
if (this.consumerData.Time) {
|
||||
this.consumerData.startTime = this.newDate(this.consumerData.Time[0]);
|
||||
this.consumerData.endTime = this.newDate(this.consumerData.Time[1]);
|
||||
}
|
||||
this.getConsumer();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.disFlex {
|
||||
display: flex;
|
||||
}
|
||||
.disFlex {
|
||||
display: flex;
|
||||
}
|
||||
.usernameDatatit {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
padding-bottom: 20px;
|
||||
top: 0px;
|
||||
border-bottom: 1px solid #e4eaee;
|
||||
padding-left: 40px;
|
||||
padding-top: 23px;
|
||||
left: 0px;
|
||||
}
|
||||
.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;
|
||||
width: 100px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.consumer {
|
||||
width: calc(100% - 260px);
|
||||
padding: 50px 60px;
|
||||
}
|
||||
.reportListCon > p {
|
||||
width: 93%;
|
||||
padding-bottom: 16px;
|
||||
padding-left: 10px;
|
||||
font-size: 16px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #515151;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.consumer {
|
||||
width: calc(100% - 260px);
|
||||
padding: 50px 60px;
|
||||
}
|
||||
border-bottom: 1px solid #e4eaee;
|
||||
line-height: 22px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.reportListCon > p > :nth-child(1) {
|
||||
width: 138px;
|
||||
height: 19px;
|
||||
font-size: 14px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #8e8e8e;
|
||||
line-height: 20px;
|
||||
}
|
||||
.reportListCon > p > :nth-child(2) {
|
||||
width: 138px;
|
||||
height: 19px;
|
||||
font-size: 14px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #8e8e8e;
|
||||
text-align: right;
|
||||
line-height: 20px;
|
||||
width: 206px;
|
||||
height: 19px;
|
||||
font-size: 14px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #515151;
|
||||
line-height: 20px;
|
||||
}
|
||||
/* 搜索 */
|
||||
.consumer-seach {
|
||||
margin: 60px 0 50px;
|
||||
}
|
||||
|
||||
/* 搜索 */
|
||||
.consumer-seach {
|
||||
margin: 60px 0 50px;
|
||||
}
|
||||
.consumer-seach-item {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.consumer-seach-item {
|
||||
display: flex;
|
||||
}
|
||||
.consumer-seach-item li {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.consumer-seach-item li {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.consumer-seach-item >>> .el-input__inner {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.consumer-seach-item>>>.el-input__inner {
|
||||
height: 40px;
|
||||
}
|
||||
.consumer-seach-item .seach-btn,
|
||||
.consumer-seach-item .seach-btn:hover {
|
||||
width: 90px;
|
||||
height: 40px;
|
||||
background-color: #0544a4;
|
||||
color: #ffffff;
|
||||
border: 0;
|
||||
}
|
||||
.consumer-seach-item .seach-btn img {
|
||||
height: 18px;
|
||||
margin-right: 8px;
|
||||
font-size: 15px;
|
||||
}
|
||||
/* 列表 */
|
||||
.consumer-list >>> .el-table .cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.consumer-seach-item .seach-btn,
|
||||
.consumer-seach-item .seach-btn:hover {
|
||||
width: 90px;
|
||||
height: 40px;
|
||||
background-color: #0544A4;
|
||||
color: #FFFFFF;
|
||||
border: 0;
|
||||
}
|
||||
.consumer-seach-item .seach-btn img {
|
||||
height: 18px;
|
||||
margin-right: 8px;
|
||||
font-size: 15px;
|
||||
}
|
||||
/* 列表 */
|
||||
.consumer-list>>>.el-table .cell{
|
||||
padding: 0;
|
||||
}
|
||||
/* 分页 */
|
||||
.consumer-pagination {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 120px;
|
||||
}
|
||||
|
||||
/* 分页 */
|
||||
.consumer-pagination {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 120px;
|
||||
}
|
||||
|
||||
.consumer-pagination>>>.el-pager li {
|
||||
color: #666666;
|
||||
font-weight: normal;
|
||||
}
|
||||
.consumer-pagination >>> .el-pager li {
|
||||
color: #666666;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.consumer-pagination>>>.el-input__inner {
|
||||
width: 48px;
|
||||
}
|
||||
.consumer-pagination >>> .el-input__inner {
|
||||
width: 48px;
|
||||
}
|
||||
|
||||
.consumer-pagination>>>.el-pagination__jump {
|
||||
margin-left: 0;
|
||||
}
|
||||
.consumer-pagination >>> .el-pagination__jump {
|
||||
margin-left: 0;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -10,15 +10,15 @@
|
|||
<div>
|
||||
<div class="projectTopicText">
|
||||
<p>项目名称:</p>
|
||||
<p>内容</p>
|
||||
<p>{{ projectData.name }}</p>
|
||||
</div>
|
||||
<div class="projectTopicText">
|
||||
<p>项目名称:</p>
|
||||
<p>内容</p>
|
||||
<p>发起单位</p>
|
||||
<p>{{ projectData.companyName }}</p>
|
||||
</div>
|
||||
<div class="projectTopicText">
|
||||
<p>项目名称:</p>
|
||||
<p>内容</p>
|
||||
<p>项目描述:</p>
|
||||
<p>{{ projectData.note }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -33,14 +33,34 @@
|
|||
|
||||
<div class="projectTopicA">
|
||||
<div class="projectTopicATie">
|
||||
<p>题型一题库</p>
|
||||
<p>题型二题库</p>
|
||||
<p>题型三题库</p>
|
||||
<p>题型四题库</p>
|
||||
<p
|
||||
@click="topicTypes(1)"
|
||||
:class="[topicType == 1 ? 'topicType' : '']"
|
||||
>
|
||||
题型一题库
|
||||
</p>
|
||||
<p
|
||||
@click="topicTypes(2)"
|
||||
:class="[topicType == 2 ? 'topicType' : '']"
|
||||
>
|
||||
题型二题库
|
||||
</p>
|
||||
<p
|
||||
@click="topicTypes(3)"
|
||||
:class="[topicType == 3 ? 'topicType' : '']"
|
||||
>
|
||||
题型三题库
|
||||
</p>
|
||||
<p
|
||||
@click="topicTypes(4)"
|
||||
:class="[topicType == 4 ? 'topicType' : '']"
|
||||
>
|
||||
题型四题库
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="projectTopicAButton">
|
||||
<div>
|
||||
<div class="projectTopicAButtonSearch">
|
||||
<el-input
|
||||
v-model="input2"
|
||||
class="w-50 m-2"
|
||||
|
@ -48,12 +68,216 @@
|
|||
:prefix-icon="Search"
|
||||
/>
|
||||
</div>
|
||||
<button class="buttonCss" type="button"></button>
|
||||
<button class="buttonCss" type="button">随机选题</button>
|
||||
<button class="buttonCss" type="button">取消选题</button>
|
||||
<button class="buttonCss" @click="addProject()" type="button">
|
||||
新建
|
||||
</button>
|
||||
<button class="buttonCss" type="button">批量导入</button>
|
||||
|
||||
<button class="buttonCss" type="button">下载导入模板</button>
|
||||
</div>
|
||||
|
||||
<div class="projectTopicTable">
|
||||
<el-table :data="tableData" style="width: 100%" max-height="500">
|
||||
<el-table-column
|
||||
align="center"
|
||||
fixed
|
||||
prop="companyName"
|
||||
label="创建部门"
|
||||
/>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column align="center" prop="date" label="创建时间" />
|
||||
<el-table-column align="center" prop="name" label="项目" />
|
||||
<el-table-column align="center" prop="address" label="备注" />
|
||||
<el-table-column align="center" prop="testCount" label="数量" />
|
||||
<el-table-column align="center" fixed="right" label="状态">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.status == 0">已启用</div>
|
||||
<div v-else>已禁用</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" label="操作">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.prevent="open(scope, 1)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.prevent="open(scope, 2)"
|
||||
>
|
||||
停用
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.prevent="topicNav(scope)"
|
||||
>
|
||||
编辑题库
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage4"
|
||||
layout="prev, pager, next, jumper"
|
||||
:total="2"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
// 题型1
|
||||
<el-drawer
|
||||
v-model="drawer"
|
||||
title="编辑问题"
|
||||
:direction="direction"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="elementUldrawer">
|
||||
<div>
|
||||
<p class="tit">问题</p>
|
||||
<el-input
|
||||
v-model="topicData.topic"
|
||||
class="w-50 m-2"
|
||||
size="large"
|
||||
placeholder="请输入问题"
|
||||
></el-input>
|
||||
</div>
|
||||
<div>
|
||||
<p class="tit">答案</p>
|
||||
<div class="options">
|
||||
<p @click="options(1)" :class="[optionsIf == 1 ? 'optionsIf' : '']">
|
||||
选项01
|
||||
</p>
|
||||
<p @click="options(2)" :class="[optionsIf == 2 ? 'optionsIf' : '']">
|
||||
选项02
|
||||
</p>
|
||||
<p @click="options(3)" :class="[optionsIf == 3 ? 'optionsIf' : '']">
|
||||
选项03
|
||||
</p>
|
||||
<p @click="options(4)" :class="[optionsIf == 4 ? 'optionsIf' : '']">
|
||||
选项04
|
||||
</p>
|
||||
</div>
|
||||
<el-input
|
||||
v-model="topicData.options[0].content"
|
||||
class="w-50 m-2"
|
||||
size="large"
|
||||
placeholder="请输入选项内容"
|
||||
v-if="optionsIf == 1"
|
||||
></el-input>
|
||||
<el-input
|
||||
v-model="topicData.options[1].content"
|
||||
v-else-if="optionsIf == 2"
|
||||
class="w-50 m-2"
|
||||
size="large"
|
||||
placeholder="请输入选项内容"
|
||||
></el-input>
|
||||
<el-input
|
||||
v-model="topicData.options[2].content"
|
||||
v-else-if="optionsIf == 3"
|
||||
class="w-50 m-2"
|
||||
size="large"
|
||||
placeholder="请输入选项内容"
|
||||
></el-input>
|
||||
<el-input
|
||||
v-model="topicData.options[3].content"
|
||||
v-else-if="optionsIf == 4"
|
||||
class="w-50 m-2"
|
||||
size="large"
|
||||
placeholder="请输入选项内容"
|
||||
></el-input>
|
||||
|
||||
<div class="selectClass" v-if="optionsIf == 1">
|
||||
<p>选择对应类型</p>
|
||||
<el-select
|
||||
v-model="topicData.options[0].topicType"
|
||||
class="m-2"
|
||||
placeholder="请选择类型"
|
||||
size="large"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectClassData"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictValue"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="selectClass" v-if="optionsIf == 2">
|
||||
<p>选择对应类型</p>
|
||||
<el-select
|
||||
v-model="topicData.options[1].topicType"
|
||||
class="m-2"
|
||||
placeholder="请选择类型"
|
||||
size="large"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectClassData"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictValue"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="selectClass" v-if="optionsIf == 3">
|
||||
<p>选择对应类型</p>
|
||||
<el-select
|
||||
v-model="topicData.options[2].topicType"
|
||||
class="m-2"
|
||||
placeholder="请选择类型"
|
||||
size="large"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectClassData"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictValue"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="selectClass" v-if="optionsIf == 4">
|
||||
<p>选择对应类型</p>
|
||||
<el-select
|
||||
v-model="topicData.options[3].topicType"
|
||||
class="m-2"
|
||||
placeholder="请选择类型"
|
||||
size="large"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectClassData"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictValue"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="drawerButton">
|
||||
<el-button type="primary" @click="addprojectTopic()"
|
||||
>新建项目</el-button
|
||||
>
|
||||
<el-button @click="resetForm(ruleFormRef)">取消新建</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -68,18 +292,223 @@ export default {
|
|||
msg: String,
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
drawer: false,
|
||||
topicType: 1,
|
||||
TopicPageData:{
|
||||
current:1,
|
||||
libraryType:"topic_type_1",
|
||||
size:""
|
||||
},
|
||||
topicData: {
|
||||
createTime: "",
|
||||
projectId:"",
|
||||
libraryType: "topic_type_1",
|
||||
options: [
|
||||
{
|
||||
content: "",
|
||||
createTime: "",
|
||||
|
||||
libraryType: "",
|
||||
optionIndex: 0,
|
||||
optionIndexEn: "",
|
||||
score: 0,
|
||||
topicId: 0,
|
||||
topicType: "",
|
||||
topicTypeValue: "",
|
||||
},
|
||||
{
|
||||
content: "",
|
||||
createTime: "",
|
||||
id: 0,
|
||||
libraryType: "",
|
||||
optionIndex: 0,
|
||||
optionIndexEn: "",
|
||||
score: 0,
|
||||
topicId: 0,
|
||||
topicType: "",
|
||||
topicTypeValue: "",
|
||||
},
|
||||
{
|
||||
content: "",
|
||||
createTime: "",
|
||||
id: 0,
|
||||
libraryType: "",
|
||||
optionIndex: 0,
|
||||
optionIndexEn: "",
|
||||
score: 0,
|
||||
topicId: 0,
|
||||
topicType: "",
|
||||
topicTypeValue: "",
|
||||
},
|
||||
{
|
||||
content: "",
|
||||
createTime: "",
|
||||
id: 0,
|
||||
libraryType: "",
|
||||
optionIndex: 0,
|
||||
optionIndexEn: "",
|
||||
score: 0,
|
||||
topicId: 0,
|
||||
topicType: "",
|
||||
topicTypeValue: "",
|
||||
},
|
||||
],
|
||||
topic: "",
|
||||
topicType: "",
|
||||
},
|
||||
projectData: {},
|
||||
labelPosition: "top",
|
||||
tableData: [],
|
||||
direction: "rtl",
|
||||
projectTopicData: {},
|
||||
optionsIf: 1,
|
||||
selectClassData: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 初始化获取数据
|
||||
this.getProject();
|
||||
this.projectData = JSON.parse(localStorage.topicData);
|
||||
},
|
||||
methods: {
|
||||
options(num) {
|
||||
this.optionsIf = num;
|
||||
},
|
||||
topicTypes(num) {
|
||||
this.topicType = num;
|
||||
if (this.topicType == 1) {
|
||||
this.TopicPageData.libraryType="topic_type_1";
|
||||
this.topicData.libraryType = "topic_type_1";
|
||||
} else if (this.topicType == 2) {
|
||||
this.TopicPageData.libraryType="topic_type_2";
|
||||
this.topicData.libraryType = "topic_type_2";
|
||||
} else if (this.topicType == 3) {
|
||||
this.TopicPageData.libraryType="topic_type_3";
|
||||
this.topicData.libraryType = "topic_type_3";
|
||||
} else if (this.topicType == 4) {
|
||||
this.TopicPageData.libraryType="topic_type_4";
|
||||
this.topicData.libraryType = "topic_type_4";
|
||||
}
|
||||
},
|
||||
|
||||
addprojectTopic() {
|
||||
this.axios
|
||||
.psot("/hysc/library/addTopic", this.topicData)
|
||||
.then(function (response) {
|
||||
console.log(response.data.data);
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
addProject() {
|
||||
this.drawer = true;
|
||||
this.addCation();
|
||||
this.topicData.projectId=this.projectData.id
|
||||
},
|
||||
handleClose() {
|
||||
this.drawer = false;
|
||||
},
|
||||
|
||||
addClassification() {
|
||||
let param = new URLSearchParams();
|
||||
let that = this;
|
||||
this.axios
|
||||
.get("/hysc/system/dict/dictionary", {
|
||||
params: param,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data.data);
|
||||
that.selectClassData = response.data.data;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 获取类型
|
||||
addCation() {
|
||||
let param = new URLSearchParams();
|
||||
let that = this;
|
||||
if (this.topicType == 1) {
|
||||
param.append("code", "topic_type_1");
|
||||
} else if (this.topicType == 2) {
|
||||
param.append("code", "topic_type_2");
|
||||
} else if (this.topicType == 3) {
|
||||
param.append("code", "topic_type_3");
|
||||
} else if (this.topicType == 4) {
|
||||
param.append("code", "topic_type_4");
|
||||
}
|
||||
|
||||
this.axios
|
||||
.get("/hysc/system/dict/dictionary", {
|
||||
params: param,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data.data);
|
||||
that.selectClassData = response.data.data;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 获取列表数据
|
||||
getProject(){
|
||||
let param = new URLSearchParams();
|
||||
let that = this;
|
||||
|
||||
param.append("code", "topic_type_4");
|
||||
this.axios
|
||||
.get("/hysc/system/dict/dictionary", {
|
||||
params: param,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data.data);
|
||||
that.selectClassData = response.data.data;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style >
|
||||
.drawerButton {
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
width: 90%;
|
||||
display: flex;
|
||||
}
|
||||
.projectManagement {
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.projectTopicTable {
|
||||
margin-top: 30px;
|
||||
}
|
||||
.options {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #e4eaee;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.options > p {
|
||||
font-size: 14px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #888888;
|
||||
line-height: 20px;
|
||||
padding-bottom: 8px;
|
||||
|
||||
margin-right: 33px;
|
||||
}
|
||||
.optionsIf {
|
||||
border-bottom: 2px solid #0544a4;
|
||||
color: #515151;
|
||||
}
|
||||
|
||||
.projectTopicText .tit {
|
||||
font-size: 16px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
|
@ -138,7 +567,7 @@ export default {
|
|||
}
|
||||
.projectTopicA {
|
||||
width: 100%;
|
||||
height: 415px;
|
||||
height: auto;
|
||||
margin-top: 30px;
|
||||
background: #f8fafb;
|
||||
border-radius: 3px;
|
||||
|
@ -159,16 +588,52 @@ export default {
|
|||
margin-right: 60px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.buttonCss{
|
||||
width: 100px;
|
||||
height: 36px;
|
||||
background: #0544A4;
|
||||
box-shadow: 0px 2px 7px 0px rgba(120, 137, 149, 0.25);
|
||||
border-radius: 3px;
|
||||
border: none;
|
||||
.buttonCss {
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
color: #fff;
|
||||
background: #0544a4;
|
||||
box-shadow: 0px 2px 7px 0px rgba(120, 137, 149, 0.25);
|
||||
border-radius: 3px;
|
||||
border: none;
|
||||
}
|
||||
.projectTopicAButton{
|
||||
display: flex;
|
||||
.projectTopicAButton > .buttonCss {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.projectTopicAButton {
|
||||
display: flex;
|
||||
|
||||
margin-top: 30px;
|
||||
}
|
||||
.projectTopicAButton > .projectTopicAButtonSearch {
|
||||
margin-right: 60px;
|
||||
}
|
||||
.elementUldrawer > div > .tit {
|
||||
width: 150px;
|
||||
height: 19px;
|
||||
font-size: 14px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #515151;
|
||||
margin-top: 36px;
|
||||
margin-bottom: 11px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.selectClass {
|
||||
display: flex;
|
||||
margin-top: 36px;
|
||||
align-items: center;
|
||||
}
|
||||
.selectClass > p {
|
||||
font-size: 14px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
margin-right: 20px;
|
||||
color: #515151;
|
||||
line-height: 20px;
|
||||
}
|
||||
.projectTopicATie > .topicType {
|
||||
border-bottom: 2px solid #0544a4;
|
||||
color: #0544a4;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue