master
tangyi 2022-01-16 23:31:25 +08:00
parent 3b2ae2001b
commit de596339f6
5 changed files with 918 additions and 15542 deletions

15628
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@vueup/vue-quill": "^1.0.0-alpha.40",
"axios": "^0.24.0",
"core-js": "^3.6.5",
"element-plus": "^1.3.0-beta.1",

View File

@ -2,6 +2,8 @@ import { createApp } from 'vue'
import App from './App.vue'
import router from "./router/router.js"
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css';
import ElementPlus from 'element-plus';
@ -19,9 +21,12 @@ axios.interceptors.request.use(config => {
return config
})
let app=createApp(App)
app.config.globalProperties.$bucketName = "nianhua-test"
app.use(router)
app.use(ElementPlus,{locale:zhCn});
app.use(VueAxios,axios)
app.mount('#app')
app.component('QuillEditor', QuillEditor)

View File

@ -1,12 +1,141 @@
<template>
<div >
<NavLeft />
<div class="disFlex">
<NavLeft navIf="consumer" />
<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.keyword"
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-button type="text" size="small" @click="queryNamea(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
@click="usernameDatatitIf(true)"
:class="usernameDataIf ? 'usernameDatatitIf' : ''"
>
用户信息
</p>
<p
@click="usernameDatatitIf(fales)"
:class="usernameDataIf ? '' : 'usernameDatatitIf'"
>
测评报告
</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>
<p>钉钉</p>
<div class="wxDdCon">
<img src="" alt="" />
<p></p>
</div>
</div>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
import NavLeft from "../components/nav.vue";
export default {
components: {
NavLeft,
@ -15,13 +144,312 @@ export default {
msg: String,
},
data() {
return {};
return {
drawer: false,
tableData: [],
total: 1,
consumerData: {
current: 1,
phone: "",
size: 10,
},
};
},
mounted() {
//
this.userData = JSON.parse(localStorage.userData);
this.getReportList();
},
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;
},
usernameDatatitIf(ifS) {
this.usernameDataIf = ifS;
},
//
queryName(data) {
this.drawer = true;
this.getReportList(data.row);
this.usernameData = data.row;
this.usernameDataIf = true;
},
//
queryNamea(data) {
this.drawer = true;
this.getReportList(data.row);
this.usernameData = data.row;
this.usernameDataIf = false;
},
handleCurrentChange(data) {
this.consumerData.current = data;
this.getConsumer();
},
handleClose() {
this.drawer = false;
},
phonetest(data) {
const reg = /^1([38]\d|5[0-35-9]|7[3678])\d{8}$/;
if (data == "" || data.length <= 10 || !reg.test(data)) {
return false;
} else {
return true;
}
},
methods: {},
//
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);
this.axios
.get("/hysc/member/getMemberPage", {
params: param,
})
.then(function () {})
.catch(function (error) {
console.log(error);
});
},
getReportList() {
let param = new URLSearchParams();
param.append("current", this.consumerData.current);
param.append("phone", this.userData.phone);
param.append("size", this.consumerData.size);
let that = this;
this.axios
.get("/hysc/user/getUserList", {
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);
});
},
queryConsumer() {
// consumerData: {
// current: 1,
// keyword: "",
// type: "",
// size: 10,
// endTime: "",
// startTime: "",
// },
console.log(this.consumerData.type);
if (this.consumerData.type == "手机号" || this.consumerData.type == "") {
if (!this.phonetest(this.consumerData.keyword)) {
this.$alert("请正确输入手机号", "手机号错误", {
confirmButtonText: "确定",
});
return;
}
}
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;
}
.usernameDatatit {
display: flex;
position: absolute;
width: 80%;
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;
margin-right: 30px;
line-height: 22px;
}
.consumer {
width: calc(100% - 260px);
padding: 50px 60px;
}
.reportListCon {
background: #f8fafb;
padding: 20px;
}
.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;
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-item {
display: flex;
}
.consumer-seach-item li {
margin-right: 10px;
}
.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-pagination {
display: flex;
justify-content: flex-end;
margin-top: 120px;
}
.consumer-pagination >>> .el-pager li {
color: #666666;
font-weight: normal;
}
.consumer-pagination >>> .el-input__inner {
width: 48px;
}
.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;
}
.usernameDatatit > .usernameDatatitIf {
color: #0544a4;
font-weight: 600;
padding-bottom: 20px;
border-bottom: 2px solid #0544a4;
}
</style>

View File

@ -6,37 +6,112 @@
<div class="title">项目管理</div>
<div class="topicParametersConLsit">
<div class="topicParametersNav">
<p>题型一</p>
<p>题型二</p>
<p>题型三</p>
<p>题型四</p>
<p
@click="topicParametersNavIfFun(1)"
:class="topicParametersNavIf == 1 ? 'topicParametersNavIf' : ''"
>
题型一
</p>
<p
@click="topicParametersNavIfFun(2)"
:class="topicParametersNavIf == 2 ? 'topicParametersNavIf' : ''"
>
题型二
</p>
<p
@click="topicParametersNavIfFun(3)"
:class="topicParametersNavIf == 3 ? 'topicParametersNavIf' : ''"
>
题型三
</p>
<p
@click="topicParametersNavIfFun(4)"
:class="topicParametersNavIf == 4 ? 'topicParametersNavIf' : ''"
>
题型四
</p>
</div>
<div class="topicParametersData">
<div class="topicParametersDataNav">
<p>支配/老板型</p>
<p>支配/老板型</p>
<p>支配/老板型</p>
<p>支配/老板型</p>
<div
v-for="(item, index) in topicParametersDataNavDataList"
:key="item"
>
<p
:class="
topicParametersDataNavIf == index + 1
? 'topicParametersDataNavIf'
: ''
"
@click="topicParametersDataNavDataFun(index + 1)"
>
{{ item }}
</p>
</div>
</div>
<div class="topicParametersDataCon">
<p class="addtopicParameters"> <button>新增</button></p>
<p class="addtopicParameters">
<button @click="topicParametersIfFun()"></button>
</p>
<div class="topicParametersConment">
<div v-for="item in topicParametersDataList" :key="item">
<div class="topicParametersConmentTit">
<p>{{ item.key }}</p>
<button @click="updata(item)"></button
><button @click="open(item)"></button>
</div>
<div class="topicParametersConmentData">
{{ item.value }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<el-drawer
v-model="topicParametersIf"
title="编辑问题"
:direction="direction"
:before-close="handleClose"
>
<el-form-item label="key">
<el-input v-model="topicParametersData.key"></el-input>
</el-form-item>
<div>
<p> </p> <button></button><button></button>
<div>
</div>
</div>
</div>
</div>
</div>
<p class="tit">value</p>
<el-input
v-model="topicParametersData.value"
:autosize="{ minRows: 6, maxRows: 4 }"
type="textarea"
placeholder="请输入测试说明"
>
</el-input>
</div>
<el-form-item class="topicParametersButton">
<el-button
type="primary"
v-if="updataIf"
@click="addtopicParametersData()"
>新建项目</el-button
>
<el-button type="primary" v-else @click="updLibraryTypeParam()"
>修改项目</el-button
>
<el-button @click="resetForm(ruleFormRef)"></el-button>
</el-form-item>
</el-drawer>
</div>
</template>
<script>
import NavLeft from "../components/nav.vue";
import "@vueup/vue-quill/dist/vue-quill.snow.css";
import { ElMessageBox, ElMessage } from "element-plus";
export default {
components: {
NavLeft,
@ -45,68 +120,240 @@ export default {
msg: String,
},
data() {
return {};
return {
topicParametersNavIf: 1,
text: "",
keyText: "",
navData: "",
topicParametersIf: false,
topicParametersDataNavIf: 1,
topicParametersDataList: [],
updataIf: true,
topicParametersData: {
key: "",
libraryType: "topic_type_1",
topicType: "1",
value: "",
},
topicParametersDataNavData: [
["支配/老板型", "影响/互动型", "谨慎/修正型", "稳健/支配型"],
["老虎型", "考拉型", "孔雀型", "猫头鹰", "变色龙"],
["s1命令", "s2教练", "s3支持", "s4授权"],
["支配/老板型", "影响/互动型", "谨慎/修正型", "稳健/支配型"],
],
topicParametersDataNavDataList: [
"支配/老板型",
"影响/互动型",
"谨慎/修正型",
"稳健/支配型",
],
};
},
mounted() {
this.getTopicParametersData();
},
methods: {
// A
topicParametersNavIfFun(num) {
this.topicParametersNavIf = num;
this.topicParametersDataNavDataList =
this.topicParametersDataNavData[num - 1];
},
topicParametersIfFun() {
(this.topicParametersData = {
key: "",
libraryType: "topic_type_1",
topicType: "1",
value: "",
}),
(this.topicParametersIf = true);
},
topicParametersDataNavDataFun(num) {
this.topicParametersDataNavIf = num;
this.updataIf = true;
this.topicParametersDataNavData = { ...this.topicParametersDataNavData };
},
updata(data) {
this.topicParametersData = { ...data };
this.topicParametersIf = true;
this.updataIf = false;
},
updLibraryTypeParam() {
let that = this;
console.log();
this.axios
.post("/hysc/library/updLibraryTypeParam", this.topicParametersData)
.then(function (data) {
console.log(data.data);
that.getTopicParametersData();
})
.catch(function (error) {
console.log(error);
});
},
delLibraryTypeParam(obj) {
console.log(obj);
let that = this;
this.axios
.post("/hysc/library/delLibraryTypeParam", obj)
.then(function (data) {
console.log(data.data);
that.getTopicParametersData();
})
.catch(function (error) {
console.log(error);
});
},
addtopicParametersData() {
if (this.topicParametersNavIf == 1) {
this.topicParametersData.libraryType = "topic_type_1";
} else if (this.topicParametersNavIf == 2) {
this.topicParametersData.libraryType = "topic_type_2";
} else if (this.topicParametersNavIf == 3) {
this.topicParametersData.libraryType = "topic_type_3";
} else if (this.topicParametersNavIf == 4) {
this.topicParametersData.libraryType = "topic_type_4";
}
let that = this;
this.topicParametersData.topicType = this.topicParametersDataNavIf;
this.axios
.post("/hysc/library/addLibraryTypeParam", this.topicParametersData)
.then(function (data) {
console.log(data.data);
that.getTopicParametersData();
})
.catch(function (error) {
console.log(error);
});
},
getTopicParametersData() {
let param = new URLSearchParams();
let that = this;
param.append("libraryType", this.topicParametersData.libraryType);
param.append("topicType", this.topicParametersData.topicType);
this.axios
.get("/hysc/library/getLibraryTypeParam", { params: param })
.then(function (data) {
console.log(data.data);
that.topicParametersDataList = data.data.data;
})
.catch(function (error) {
console.log(error);
});
},
methods: {},
open(obj) {
let that = this;
ElMessageBox.confirm("是否确定删除", {
confirmButtonText: "取消",
cancelButtonText: "确定",
type: "提示",
})
.then(() => {
ElMessage({
type: "delet",
message: "已取消",
});
})
.catch(() => {
that.delLibraryTypeParam(obj);
});
},
},
};
</script>
<style scoped>
.topicParametersConmentData {
font-size: 14px;
background-color: #ddd;
width: 94%;
color: #fff;
margin-left: 20px;
padding: 20px;
box-sizing: border-box;
min-height: 150px;
margin-top: 20px;
}
.topicParametersButton {
margin-top: 30px;
}
.topicParametersConmentTit > p {
margin-right: 60px;
font-size: 16px;
padding-left: 20px;
}
.topicParametersConmentTit > button {
width: 60px;
height: 25px;
cursor: pointer;
background: #0544a4;
box-shadow: 0px 2px 7px 0px rgb(120 137 149 / 25%);
border-radius: 3px;
margin-left: 20px;
border: none;
font-size: 15px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
}
.topicParametersConmentTit {
display: flex;
}
.topicParametersCon {
flex: 1;
box-sizing: border-box;
height: 100vh;
}
.topicParametersConLsit {
padding:120px 60px;
padding: 40px 60px;
background: #f8fafb;
padding-bottom: 0px;
display: flex;
height: 86%;
box-sizing: border-box;
}
.topicParametersNav p{
font-size: 20px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #1B2125;
padding-bottom: 60px;
line-height: 22px;
.topicParametersNav p {
font-size: 20px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #1b2125;
line-height: 22px;
margin-bottom: 60px;
}
.topicParametersData{
.topicParametersData {
margin-left: 120px;
flex: 1;
}
.topicParametersDataNav{
display: flex;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #1B2125;
padding-bottom: 30px;
line-height: 22px;
.topicParametersDataNav {
display: flex;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #1b2125;
padding-bottom: 30px;
line-height: 22px;
}
.topicParametersDataNav>p{
margin-right: 60px;
.topicParametersDataNav > div > p {
margin-right: 60px;
}
.topicParametersDataCon{
background-color: rgb(142, 142, 142,0.5);
width: 100%;
height: 90%;
overflow-x:auto;
.topicParametersDataCon {
border: 1px solid #ddd;
width: 100%;
height: 90%;
overflow-x: auto;
}
.addtopicParameters{
text-align: right;
padding-right:20px;
.addtopicParameters {
text-align: right;
padding-right: 20px;
padding-top: 20px;
}
.addtopicParameters button{
.addtopicParameters button {
width: 90px;
height: 36px;
cursor: pointer;
@ -120,4 +367,13 @@ text-align: right;
font-weight: 400;
color: #ffffff;
}
.topicParametersNav .topicParametersNavIf {
color: #0544a4;
}
.topicParametersDataNav .topicParametersDataNavIf {
color: #0544a4;
}
.topicParametersConment > div {
margin-bottom: 30px;
}
</style>