Compare commits

..

No commits in common. "c15fab6c72e74804ca3258897a47ecbdb638b722" and "642f11b1bb2a73ce363919b308f78feb8965d9c4" have entirely different histories.

4 changed files with 61 additions and 381 deletions

View File

@ -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>

View File

@ -9,7 +9,6 @@ import login from '../view/login.vue'
import index from '../view/index.vue'
import consumer from '../view/consumer.vue'
import projectManagement from '../view/projectManagement.vue'
import projectTopic from '../view/projectTopic.vue'
//配置路由
const router = createRouter({
history: createWebHistory(),
@ -32,11 +31,6 @@ const router = createRouter({
path: '/projectManagement', //
name: 'projectManagement',
component: projectManagement
},
{
path: '/projectTopic', //
name: 'projectTopic',
component: projectTopic
}
]

View File

@ -43,36 +43,15 @@
<el-table-column align="center" prop="name" label="项目" />
<el-table-column align="center" prop="note" 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)"
@click.prevent="deleteRow(scope.$index)"
>
删除
</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>
@ -83,61 +62,53 @@
@current-change="handleCurrentChange"
:current-page="currentPage4"
layout="prev, pager, next, jumper"
:total="total"
:total="400"
>
</el-pagination>
</div>
</div>
</div>
<el-drawer
v-model="drawer"
title="新建项目"
:direction="direction"
:before-close="handleClose"
>
<div class="elementUl">
<el-form
:label-position="labelPosition"
label-width="100px"
:model="addProjectData"
style="max-width: 460px"
>
<el-form-item label="项目名称">
<el-input v-model="addProjectData.projectName"></el-input>
</el-form-item>
<el-form-item label="项目单位">
<el-input v-model="addProjectData.projectUnit"></el-input>
</el-form-item>
<el-form-item label="项目描述" prop="type">
<el-input
v-model="addProjectData.projectNote"
type="textarea"
:autosize="{ minRows: 9, maxRows: 9 }"
></el-input>
</el-form-item>
<el-drawer
v-model="drawer"
title="新建项目"
:direction="direction"
:before-close="handleClose"
>
<div class="elementUl">
<el-form
:label-position="labelPosition"
label-width="100px"
:model="addProjectData"
style="max-width: 460px"
>
<el-form-item label="项目名称">
<el-input v-model="addProjectData.projectName"></el-input>
</el-form-item>
<el-form-item label="项目单位">
<el-input v-model="addProjectData.projectUnit"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addProjectManagement()"
>新建项目</el-button
>
<el-button @click="resetForm(ruleFormRef)"></el-button>
</el-form-item>
</el-form>
</div>
</el-drawer>
<el-form-item label="项目描述" prop="type">
<el-input v-model="addProjectData.projectNote" type="textarea" :autosize="{ minRows:9, maxRows: 9 }"></el-input>
</el-form-item>
<!-- <div class="makeBer">
<el-form-item>
<el-button type="primary" @click="addProjectManagement()"
>新建项目</el-button
>
<el-button @click="resetForm(ruleFormRef)"></el-button>
</el-form-item>
</el-form>
</div>
</div> -->
</el-drawer>
</div>
</template>
<script>
import NavLeft from "../components/nav.vue";
import { ElMessageBox, ElMessage } from "element-plus";
export default {
components: {
@ -148,22 +119,16 @@ export default {
},
data() {
return {
total: "1",
addProjectData: {
projectName: "",
projectUnit: "",
projectNote: "",
addProjectData:{
projectName:"",
projectUnit:"",
projectNote:""
},
drawer: false,
direction: "rtl",
projectName: "",
projectDate: "",
promptData: {
confirmText: "",
message: "",
},
projectData: {
current: 1,
endTime: "",
@ -201,94 +166,14 @@ export default {
},
};
},
deleteProject() {},
mounted() {
//
this.getProject();
},
methods: {
//
open(obj, num) {
let that = this;
if (num == 1) {
this.promptData.confirmText = "是否确定删除";
this.promptData.message = "删除成功";
} else {
this.promptData.confirmText = "是否确定停用";
this.promptData.message = "停用成功";
}
ElMessageBox.confirm(this.promptData.confirmText, {
confirmButtonText: "取消",
cancelButtonText: "确定",
type: "提示",
})
.then(() => {
ElMessage({
type: "delet",
message: "已取消",
});
})
.catch(() => {
if (num == 1) {
that.projectDelete(obj.row.id);
ElMessage({
type: "tiyong",
message: that.promptData.message,
});
} else {
console.log(obj.row.status);
if (obj.row.status == 0) {
that.projectDisable({ id: obj.row.id, status: "1" });
ElMessage({
type: "tiyong",
message: "已禁用",
});
} else {
that.projectDisable({ id: obj.row.id, status: "0" });
ElMessage({
type: "tiyong",
message: "已启用",
});
}
}
});
},
//
topicNav(data){
localStorage.topicData= JSON.stringify( data.row)
this.$router.push("/projectTopic");
},
//
projectDelete(id) {
let that = this;
this.axios
.post("/hysc/project/delProject", {
id: id,
})
.then(function () {
that.getProject();
})
.catch(function (error) {
console.log(error);
});
},
projectDisable(data) {
let that = this;
this.axios
.post("/hysc/project/updProject", data)
.then(function () {
that.getProject();
})
.catch(function (error) {
console.log(error);
});
},
handleCurrentChange(data) {
this.projectData.current = data;
this.getProject();
},
handleClose() {
this.drawer = false;
this.drawer=false
},
deleteRow(index) {
console.log(index);
@ -306,31 +191,33 @@ export default {
return yy + "-" + mm + "-" + "-" + dd;
},
//
addProject() {
this.drawer = true;
addProject(){
this.drawer=true
console.log( this.drawer);
},
addProjectManagement() {
let that = this;
addProjectManagement(){
let that=this
this.axios
.post("/hysc/project/addProject", {
name: this.addProjectData.projectName,
companyName: this.addProjectData.projectUnit,
note: this.addProjectData.projectNote,
.post("/hysc/project/addProject",{
name:this.addProjectData.projectName,
companyName:this.addProjectData.projectUnit,
note:this.addProjectData.projectNote,
})
.then(function () {
that.drawer = false;
this.getProject();
.then(function (response) {
console.log(response);
that.drawer=false
this.getProject()
})
.catch(function (error) {
console.log(error);
});
},
//
queryProject() {
if (this.projectDate[0]) {
this.projectData.startTime = this.newDate(this.projectDate[0]);
this.projectData.endTime = this.newDate(this.projectDate[1]);
}
this.projectData.startTime = this.newDate(this.projectDate[0]);
this.projectData.endTime = this.newDate(this.projectDate[1]);
this.projectData.name = this.projectName;
this.getProject();
},
@ -346,11 +233,11 @@ export default {
this.axios
.get("/hysc/project/getProjectPage", {
params: param,
})
params: param
})
.then(function (response) {
console.log(response.data);
that.total = response.data.data.total;
that.tableData = response.data.data.records;
})
.catch(function (error) {
@ -373,7 +260,6 @@ export default {
}
.projectManagement {
flex: 1;
box-sizing: border-box;
padding: 60px;
}
.title {
@ -428,6 +314,5 @@ export default {
}
.projectTable {
margin-top: 30px;
width: 100%;
}
</style>

View File

@ -1,174 +0,0 @@
<template>
<div class="disFlex">
<NavLeft />
<div class="projectManagement">
<div class="title">编辑题库</div>
<div class="projectTopicText">
<p class="tit">项目信息</p>
<div class="projectTopicCon">
<div>
<div class="projectTopicText">
<p>项目名称</p>
<p>内容</p>
</div>
<div class="projectTopicText">
<p>项目名称</p>
<p>内容</p>
</div>
<div class="projectTopicText">
<p>项目名称</p>
<p>内容</p>
</div>
</div>
<div class="">
<p>当前已选择:</p>
<p>题型1<span>40</span></p>
<p>题型2<span>40</span></p>
<p>题型3<span>40</span></p>
<p>题型4<span>40</span></p>
</div>
</div>
<div class="projectTopicA">
<div class="projectTopicATie">
<p>题型一题库</p>
<p>题型二题库</p>
<p>题型三题库</p>
<p>题型四题库</p>
</div>
<div class="projectTopicAButton">
<div>
<el-input
v-model="input2"
class="w-50 m-2"
placeholder="搜索"
:prefix-icon="Search"
/>
</div>
<button class="buttonCss" type="button"></button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import NavLeft from "../components/nav.vue";
export default {
components: {
NavLeft,
},
props: {
msg: String,
},
data() {
return {};
},
mounted() {
//
this.getProject();
},
methods: {},
};
</script>
<style >
.projectTopicText .tit {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #1b2125;
margin-top: 50px;
line-height: 22px;
padding-left: 20px;
padding-bottom: 20px;
border-bottom: 1px solid #1b2125;
}
.projectTopicCon {
width: 100%;
height: 157px;
padding-top: 30px;
background: #f8fafb;
border-radius: 3px;
border: 1px solid #dde3e8;
margin-top: 50px;
}
.projectTopicCon > div {
display: flex;
}
.projectTopicCon > :nth-child(1) {
padding-left: 30px;
}
.projectTopicCon > :nth-child(2) {
padding-left: 30px;
padding-top: 60px;
}
.projectTopicCon > div > .projectTopicText {
margin-right: 120px;
}
.projectTopicText > :nth-child(1) {
width: 80px;
height: 26px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #8e8e8e;
line-height: 26px;
}
.projectTopicText > :nth-child(2) {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #8e8e8e;
line-height: 26px;
}
.projectTopicCon > :nth-child(2) > p {
margin-right: 60px;
}
.projectTopicCon > :nth-child(2) > :nth-child(1) {
margin-right: 0px;
}
.projectTopicA {
width: 100%;
height: 415px;
margin-top: 30px;
background: #f8fafb;
border-radius: 3px;
border: 1px solid #dde3e8;
}
.projectTopicA {
box-sizing: border-box;
padding: 30px;
}
.projectTopicATie {
display: flex;
}
.projectTopicATie > p {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #1b2125;
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;
}
.projectTopicAButton{
display: flex;
}
</style>