mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
613 lines
15 KiB
Vue
613 lines
15 KiB
Vue
<!-- 调研管理页面 -->
|
|
<template>
|
|
<div class="researchmanage">
|
|
<!-- 搜索框及按钮 -->
|
|
<div class="filter">
|
|
<div class="filterItems">
|
|
<div class="select">
|
|
<a-select
|
|
v-model:value="projectName"
|
|
style="width: 270px"
|
|
placeholder="请输入调研名称"
|
|
:options="projectNameList"
|
|
@change="selectProjectName"
|
|
allowClear
|
|
showSearch
|
|
></a-select>
|
|
</div>
|
|
|
|
<div class="select">
|
|
<a-select
|
|
v-model:value="projectName"
|
|
style="width: 270px"
|
|
placeholder="请选择状态"
|
|
:options="projectNameList"
|
|
@change="selectProjectName"
|
|
allowClear
|
|
showSearch
|
|
></a-select>
|
|
</div>
|
|
<div class="select">
|
|
<!-- <a-date-picker
|
|
v-model="selectTime"
|
|
type="date"
|
|
placeholder="时间"
|
|
style="width: 270px"
|
|
/> -->
|
|
<a-range-picker
|
|
v-model:value="value2"
|
|
separator="至"
|
|
:placeholder="['开始时间', '结束时间']"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="btns">
|
|
<div class="btn btn1">
|
|
<div class="search"></div>
|
|
<div class="btnText">搜索</div>
|
|
</div>
|
|
<div class="btn btn2">
|
|
<div class="search"></div>
|
|
<div class="btnText">重置</div>
|
|
</div>
|
|
<div class="btn btn3" @click="handleOut">
|
|
<div class="search"></div>
|
|
<div class="btnText">创建调研</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 搜索框及按钮 -->
|
|
<!-- 表格 -->
|
|
<div class="tableBox">
|
|
<a-table
|
|
style="border: 1px solid #f2f6fe"
|
|
:columns="tableDataFunc()"
|
|
:data-source="tableData"
|
|
:loading="tableDataTotal === -1 ? true : false"
|
|
expandRowByClick="true"
|
|
:scroll="{ x: 1500, y: 800 }"
|
|
@expand="expandTable"
|
|
:pagination="false"
|
|
/>
|
|
|
|
</div>
|
|
<div class="pa">
|
|
<a-pagination
|
|
showSizeChanger="true"
|
|
showQuickJumper="true"
|
|
hideOnSinglePage="true"
|
|
:pageSize="pageSize"
|
|
:current="currentPage"
|
|
:total="tableDataTotal"
|
|
class="pagination"
|
|
/>
|
|
</div>
|
|
<!-- 表格 -->
|
|
<a-modal v-model:visible="out" :footer="null" :closable="false" style="margin-top: 250px">
|
|
<div class="out">
|
|
<div class="top">
|
|
<img class="topimg" src="../../assets/images/courseManage/add1.png" />
|
|
<div class="topc">创建调研</div>
|
|
<div @click="handleOut" style="margin-left: 500px; cursor: pointer">
|
|
<img
|
|
style="width: 20px; height: 20px"
|
|
src="../../assets/images/basicinfo/close.png"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="mid clearfix">
|
|
<div class="name">
|
|
<div class="d" style="margin-top: -4px">
|
|
<img
|
|
style="width: 10px; height: 10px"
|
|
src="../../assets/images/basicinfo/asterisk.png"
|
|
/>
|
|
</div>
|
|
<div class="inname">调研名称</div>
|
|
<div class="in">
|
|
<a-input
|
|
v-model:value="value"
|
|
show-count :maxlength="15"
|
|
style="border-radius: 8px"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="btn">
|
|
<button class="samtn btn1" @click="handleOut">取消</button>
|
|
<button class="samtn btn2" @click="handleOut">确定</button>
|
|
</div>
|
|
</div>
|
|
</div></a-modal
|
|
>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { reactive, toRefs, onMounted, ref } from "vue";
|
|
export default {
|
|
name: "learningPath",
|
|
setup() {
|
|
const state = reactive({
|
|
projectNameList: [
|
|
{
|
|
id: 1,
|
|
value: "项目一",
|
|
label: "项目一",
|
|
},
|
|
{
|
|
id: 2,
|
|
value: "项目二",
|
|
label: "项目二",
|
|
},
|
|
{
|
|
id: 3,
|
|
value: "项目三",
|
|
label: "项目三",
|
|
},
|
|
{
|
|
id: 4,
|
|
value: "项目四",
|
|
label: "项目四",
|
|
},
|
|
],
|
|
out: false,
|
|
number: null,
|
|
selectTime: null,
|
|
tableData: [
|
|
{
|
|
key: 1,
|
|
number: 1,
|
|
manager: "产品经理问卷调查",
|
|
state: "已发布",
|
|
creater: "管理员",
|
|
pubtime: "2022-07-20 9:03",
|
|
cretime: "2022-07-20 9:03",
|
|
haspub: false,
|
|
},
|
|
{
|
|
key: 2,
|
|
number: 2,
|
|
manager: "高级产品经理问卷调查",
|
|
state: "已发布",
|
|
creater: "管理员",
|
|
pubtime: "2022-07-20 9:03",
|
|
cretime: "2022-07-20 9:03",
|
|
haspub: false,
|
|
},
|
|
{
|
|
key: 3,
|
|
number: 3,
|
|
manager: "管理者进阶腾飞班问卷调查",
|
|
state: "待发布",
|
|
creater: "管理员",
|
|
pubtime: "2022-07-20 9:03",
|
|
cretime: "2022-07-20 9:03",
|
|
haspub: true,
|
|
},
|
|
{
|
|
key: 4,
|
|
number: 4,
|
|
manager: "HR问卷",
|
|
state: "已结束",
|
|
creater: "管理员",
|
|
pubtime: "2022-07-20 9:03",
|
|
cretime: "2022-07-20 9:03",
|
|
haspub: true,
|
|
},
|
|
],
|
|
currentPage: 1,
|
|
tableDataTotal: 20,
|
|
pageSize: 10,
|
|
value1: " ",
|
|
value2: ref(),
|
|
valueE: ref(" "),
|
|
valueEE: ref(" "),
|
|
valuei: ref(" "),
|
|
});
|
|
const tableDataFunc = () => {
|
|
const columns = [
|
|
{
|
|
title: "序号",
|
|
dataIndex: "number",
|
|
key: "number",
|
|
width: 100,
|
|
align: "center",
|
|
className: "h",
|
|
// ellipsis: true,
|
|
// scopedSlots: { customRender: "action" }, //引入的插槽
|
|
// customRender: (text, record) => {
|
|
// console.log(text, record);
|
|
// return <span>{text.text}</span>;
|
|
// },
|
|
},
|
|
{
|
|
title: "路径图名称",
|
|
dataIndex: "manager",
|
|
key: "manager",
|
|
width: 100,
|
|
align: "center",
|
|
ellipsis: true,
|
|
className: "h",
|
|
},
|
|
{
|
|
title: "状态",
|
|
dataIndex: "state",
|
|
// width: "30%",
|
|
key: "state",
|
|
width: 100,
|
|
align: "center",
|
|
className: "h",
|
|
},
|
|
{
|
|
title: "创建人",
|
|
dataIndex: "creater",
|
|
// width: "30%",
|
|
key: "creater",
|
|
width: 100,
|
|
align: "center",
|
|
className: "h",
|
|
},
|
|
{
|
|
title: "发布时间",
|
|
dataIndex: "pubtime",
|
|
key: "pubtime",
|
|
width: 180,
|
|
align: "center",
|
|
className: "h",
|
|
},
|
|
{
|
|
title: "创建时间",
|
|
dataIndex: "cretime",
|
|
key: "cretime",
|
|
width: 180,
|
|
align: "center",
|
|
className: "h",
|
|
},
|
|
{
|
|
title: "操作",
|
|
className: "h",
|
|
dataIndex: "opacation",
|
|
key: "opacation",
|
|
width: 200,
|
|
align: "center",
|
|
|
|
},
|
|
];
|
|
return columns;
|
|
};
|
|
|
|
const getTableDate = () => {
|
|
let data = state.tableData;
|
|
data.map((value) => {
|
|
{
|
|
//单层项目
|
|
value.opacation = (
|
|
<div class="operation">
|
|
|
|
{value.state === "已发布" ? (
|
|
<div class="fb">
|
|
<router-link to="/managepage" class="jc">管理</router-link>
|
|
<div class="jc">复制</div>
|
|
<div class="jc">撤回</div>
|
|
<div class="jc">结束</div>
|
|
</div>
|
|
) : (
|
|
<div></div>
|
|
)}
|
|
{value.state === "待发布" ? (
|
|
<div class="fb">
|
|
<router-link to="/researchadd" class="jc">基础信息</router-link>
|
|
<router-link to="/managepage" class="jc">管理</router-link>
|
|
<div class="jc">复制</div>
|
|
<div class="jc">编辑</div>
|
|
<div class="jc">删除</div>
|
|
</div>
|
|
) : (
|
|
<div></div>
|
|
)}
|
|
{value.state === "已结束" ? (
|
|
<div class="fb">
|
|
<div class="jc">复制</div>
|
|
<div class="jc">删除</div>
|
|
|
|
</div>
|
|
) : (
|
|
<div></div>
|
|
)}
|
|
|
|
</div>
|
|
);
|
|
}
|
|
});
|
|
state.tableData = data;
|
|
};
|
|
getTableDate();
|
|
onMounted(() => {
|
|
// console.log("执行");
|
|
});
|
|
const selectProjectName = (value, index) => {
|
|
console.log("value", value, index);
|
|
};
|
|
const expandTable = (e, a) => {
|
|
// console.log("惦记了");
|
|
console.log("e", e, a);
|
|
};
|
|
const handleOut = () => {
|
|
state.out = !state.out;
|
|
};
|
|
const chooseImg = (id) => {
|
|
console.log(id);
|
|
};
|
|
return {
|
|
...toRefs(state),
|
|
selectProjectName,
|
|
expandTable,
|
|
handleOut,
|
|
tableDataFunc,
|
|
chooseImg,
|
|
getTableDate,
|
|
};
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="scss">
|
|
.clearfix:before,
|
|
.clearfix:after {
|
|
content: " ";
|
|
display: block;
|
|
clear: both;
|
|
}
|
|
.out {
|
|
//display: flex;
|
|
display: block;
|
|
position: absolute;
|
|
top: 120px;
|
|
width: 680px;
|
|
// height: 525px;
|
|
background-color: #fff;
|
|
|
|
box-shadow: 0 0 10px rgba(118, 136, 166, 0.21);
|
|
left: 50%;
|
|
top: 20%;
|
|
transform: translate(-50%, -50%);
|
|
.top {
|
|
width: 100%;
|
|
height: 68px;
|
|
|
|
background: linear-gradient(
|
|
rgba(78, 166, 255, 0.2) 0%,
|
|
rgba(78, 166, 255, 0) 100%
|
|
);
|
|
display: flex;
|
|
align-items: center;
|
|
.topimg {
|
|
width: 18px;
|
|
height: 18px;
|
|
margin-left: 27px;
|
|
}
|
|
.topc {
|
|
color: #000000;
|
|
font-size: 16px;
|
|
margin-left: 8px;
|
|
}
|
|
}
|
|
.mid {
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: #fff;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
.d {
|
|
// margin-top: 8px;
|
|
// color: #ff4e4e;
|
|
margin-left: -5px;
|
|
}
|
|
.name {
|
|
width: 78%;
|
|
// background-color: lightcoral;
|
|
display: flex;
|
|
margin-top: 20px;
|
|
align-items: center;
|
|
height: 40px;
|
|
// border: 1px solid black;
|
|
|
|
.inname {
|
|
color: #6f6f6f;
|
|
font-size: 14px;
|
|
margin-left: 7px;
|
|
}
|
|
.in {
|
|
margin-left: 14px;
|
|
width: 81%;
|
|
.ant-input {
|
|
border-radius: 5px;
|
|
// height: 120%;
|
|
width: 100%;
|
|
height: 30px;
|
|
}
|
|
.showcount {
|
|
position: absolute;
|
|
right: 10px;
|
|
color: #c7cbd2;
|
|
bottom: 5px;
|
|
}
|
|
}
|
|
}
|
|
.btn {
|
|
width: 33%;
|
|
margin-top: 30px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 30px;
|
|
.samtn {
|
|
width: 100px;
|
|
height: 40px;
|
|
font-size: 14px;
|
|
border: 1px solid #409EFF;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
}
|
|
.btn1 {
|
|
background-color: #fff;
|
|
color: #4ea6ff;
|
|
}
|
|
.btn2 {
|
|
margin-left: 10px;
|
|
background-color: #409EFF;
|
|
color: #fff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.researchmanage {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
//align-items: center;
|
|
position: relative;
|
|
// position: relative;
|
|
.filter {
|
|
margin-left: 38px;
|
|
margin-right: 38px;
|
|
margin-top: 30px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
.filterItems {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
.select {
|
|
margin-right: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
.btns {
|
|
display: flex;
|
|
// flex-wrap: wrap;
|
|
.btn {
|
|
padding: 0px 26px 0px 26px;
|
|
height: 38px;
|
|
background: rgba(64, 158, 255, 0);
|
|
border-radius: 8px;
|
|
border: 1px solid rgba(64, 158, 255, 1);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-right: 14px;
|
|
flex-shrink: 0;
|
|
cursor: pointer;
|
|
.search {
|
|
background-size: 100%;
|
|
}
|
|
.btnText {
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
color: rgba(64, 158, 255, 1);
|
|
line-height: 36px;
|
|
margin-left: 5px;
|
|
}
|
|
}
|
|
.btn1 {
|
|
.search {
|
|
width: 15px;
|
|
height: 17px;
|
|
background-image: url("../../assets/images/courseManage/search1.png");
|
|
}
|
|
}
|
|
.btn2 {
|
|
.search {
|
|
width: 16px;
|
|
height: 18px;
|
|
background-image: url("../../assets/images/courseManage/reset1.png");
|
|
}
|
|
}
|
|
.btn3 {
|
|
margin-right: 0px;
|
|
.search {
|
|
width: 17px;
|
|
height: 18px;
|
|
background-image: url("../../assets/images/courseManage/add1.png");
|
|
}
|
|
}
|
|
.btn1:hover {
|
|
background: rgba(64, 158, 255, 1);
|
|
.search {
|
|
background-image: url("../../assets/images/courseManage/search0.png");
|
|
}
|
|
.btnText {
|
|
color: #ffffff;
|
|
}
|
|
}
|
|
.btn2:hover {
|
|
background: rgba(64, 158, 255, 1);
|
|
.search {
|
|
background-image: url("../../assets/images/courseManage/reset0.png");
|
|
}
|
|
.btnText {
|
|
color: #ffffff;
|
|
}
|
|
}
|
|
.btn3:hover {
|
|
background: rgba(64, 158, 255, 1);
|
|
.search {
|
|
background-image: url("../../assets/images/courseManage/add0.png");
|
|
}
|
|
.btnText {
|
|
color: #ffffff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.tableBox {
|
|
margin: 20px 38px 30px ;
|
|
display: flex;
|
|
flex: 1;
|
|
//position: relative;
|
|
flex-direction: column;
|
|
|
|
th.h {
|
|
background-color: #eff4fc !important;
|
|
}
|
|
|
|
.ant-table-tbody
|
|
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
|
> td {
|
|
background: #f6f9fd;
|
|
}
|
|
|
|
}
|
|
.pa {
|
|
width: 100%;
|
|
// height: 20px;
|
|
// background-color: red;
|
|
display: flex;
|
|
justify-content: center;
|
|
//position: absolute;
|
|
margin-bottom: 20px;
|
|
.pagination {
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
|
|
.unout {
|
|
display: none;
|
|
}
|
|
|
|
.operation {
|
|
display: flex;
|
|
justify-content: right;
|
|
.fb {
|
|
display: flex;
|
|
margin-right: 20px;
|
|
.jc {
|
|
color: #4ea6ff;
|
|
font-size: 14px;
|
|
margin-left: 20px;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
</style>
|