feat:各审核的各操作

This commit is contained in:
宋文超
2022-11-22 18:07:43 +08:00
parent ed8c5626bd
commit a730558682
8 changed files with 1892 additions and 101 deletions

13
src/api/indexAudit.js Normal file
View File

@@ -0,0 +1,13 @@
import http from "./config";
//获取待审核面授课列表
export const list = (obj) => http.post('/admin/offcourse/list', obj)
//获取待审核项目列表
export const projlist = (obj) => http.post('/admin/project/list', obj)
//获取已审核项目列表
export const listView = (obj) => http.post('/admin/project/listView', obj)
//获取面授课已审核列表
export const courseListView = (obj) => http.post('/admin/offcourse/listReview', obj)

View File

@@ -6,7 +6,7 @@ import http from "./config";
// projectId: projectId,
// }
// });
export const noticeList = (projectId) => http.post(`http://localhost:8080/api/admin/project/noticeList?projectId=` + projectId + ``)
export const noticeList = (projectId) => http.post(`http://localhost:8080/manageApi/admin/project/noticeList?projectId=` + projectId + ``)
//发布项目公告
export const publishNotice = (obj) => http.post('/admin/project/publishNotice', obj)

View File

@@ -0,0 +1,412 @@
<template>
<a-drawer
:visible="ProjAuditvisible"
class="drawerStyle ProjectAudit"
placement="right"
width="60%"
@after-visible-change="afterVisibleChange"
>
<div class="drawerMain">
<div class="header">
<div class="headerTitle">审核项目</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
</div>
<div class="main" style="padding-right: 10px">
<a-tabs v-model:activeKey="activeSetKey">
<a-tab-pane key="1" tab="基本信息">
<div class="content7" v-if="showDetail">
<div class="set_body">
<div class="set_content">
<div class="setc_name"><span>项目名称</span></div>
<div class="setc_main">
<span style="color: #999999">{{ name }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>封面图</span></div>
<div class="setc_main">
<img
style="width: 151px; height: 84px"
:src="picUrl"
alt=""
/>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>项目时间</span></div>
<div class="setc_main">
<span style="color: #999999"
>{{ startTime }} {{ endTime }}</span
>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>项目经理</span></div>
<div class="setc_main">
<span style="color: #999999">{{ manager }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>资源归属</span></div>
<div class="setc_main">
<span style="color: #999999">{{ sourceBelong }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>项目说明</span></div>
<div class="setc_main">
<span style="color: #999999">{{ remark }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>同步学习记录</span></div>
<div class="setc_main">
<a-radio v-model:checked="checkedSty"
><span style="color: #333333"
>同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程</span
></a-radio
>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>项目级别</span></div>
<div class="setc_main">
<span style="color: #999999">{{ level }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>培训体系</span></div>
<div class="setc_main">
<span style="color: #999999">{{ systemId }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>是否BOEU实施</span></div>
<div class="setc_main">
<a-radio v-model:checked="checkedBOEU"
><span style="color: #333333">BOEU实施</span></a-radio
>
</div>
</div>
</div>
</div>
<div class="detaile">
<button class="debtn" @click="changeDe">
详情{{ showDetail ? "折叠" : "展开" }}
</button>
</div>
<div class="audit">
<div class="set_content">
<div class="setc_name"><span>审核</span></div>
<div class="setc_main">
<a-radio-group v-model:value="valuePass">
<a-radio value="1">通过</a-radio>
<a-radio value="2">不通过</a-radio>
</a-radio-group>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>审核意见</span></div>
<div class="setc_main">
<a-textarea v-model:value="valueSuggest" :rows="4" />
</div>
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="修改记录"> </a-tab-pane>
</a-tabs>
</div>
</div>
</a-drawer>
</template>
<script>
import { toRefs, reactive } from "vue";
import { getTask } from "../../api/indexTaskadd";
import { toDate } from "../../api/method";
export default {
name: "ProjectAudit",
components: {},
props: {
ProjAuditvisible: {
type: Boolean,
default: false,
},
projectId: {
type: Number,
default: null,
},
},
setup(props, ctx) {
const state = reactive({
activeSetKey: "1",
checkedBOEU: false, //是否BOEU实施
checkedSty: false, //同步学习记录
showDetail: false,
valuePass: "1",
valueSuggest: null,
//基本信息
name: null, //项目名称 未改
startTime: null, //开始时间 已改
tstartTime: null, //开始事件 未改
endTime: null, //结束时间 已改
tendTime: null, //结束时间 未改
manager: null, //项目经理 未改
sourceBelong: null, //资源归属 已改
tsourceBelong: null, //资源归属 未改
remark: null, //项目说明 未改
level: null, //项目级别 已改
tlevel: null, //项目级别 未改
systemId: null, //培训分类
tsystemId: null, //培训分类 未改
picUrl: null, //未改
parentId: null, //未改
courseSyncFlag: null, //未改
boeFlag: null, //未改
managerId: null, //未改
notice: null, //未改
status: null, //未改
type: null, //未改
category: null, //未改
noticeFlag: null, //未改
templateId: null, //未改
attach: null,
});
const closeDrawer = () => {
ctx.emit("update:ProjAuditvisible", false);
state.valueSuggest = null;
};
//获取项目信息
const getTaskInfo = () => {
getTask({
// 先使用了固定projectId
projectId: 37,
}).then((res) => {
console.log("get task", res.data.data);
let info = res.data.data.projectInfo;
let start = toDate(info.beginTime / 1000, "Y-M-D h:m");
let end = toDate(info.endTime / 1000, "Y-M-D h:m");
state.tstartTime = info.beginTime;
state.tendTime = info.endTime;
state.tsourceBelong = info.sourceBelongId;
state.parentId = info.parentId;
state.name = info.name;
state.startTime = start;
state.endTime = end;
state.manager = info.manager;
state.remark = info.remark;
state.level =
info.level == 1
? "集团级"
: info.level == 2
? "组织级"
: info.level == 3
? "现地级"
: info.level == 4
? "部门级"
: "-";
state.tlevel = info.level;
state.systemId =
info.systemId == 1
? "集团级"
: info.systemId == 2
? "组织级"
: info.systemId == 3
? "现地级"
: info.systemId == 4
? "部门级"
: "-";
state.tsystemId = info.systemId;
state.checkedSty = info.courseSyncFlag == 1 ? true : false;
state.courseSyncFlag = info.courseSyncFlag;
state.checkedBOEU = info.boeFlag == 1 ? true : false;
state.boeFlag = info.boeFlag;
state.picUrl = info.picUrl;
state.managerId = info.managerId;
state.notice = info.notice;
state.status = info.status;
state.type = info.type;
state.category = info.category;
state.noticeFlag = info.noticeFlag;
// state.attach = info.attach;
// state.templateId = info.templateId;
state.sourceBelong =
info.sourceBelongId == 1
? "项目一"
: info.sourceBelongId == 2
? "项目二"
: info.sourceBelongId == 3
? "项目三"
: "-";
});
};
const afterVisibleChange = () => {
getTaskInfo();
};
const changeDe = () => {
state.showDetail = !state.showDetail;
};
return {
...toRefs(state),
closeDrawer,
afterVisibleChange,
getTaskInfo,
changeDe,
};
},
};
</script>
<style lang="scss">
.ProjectAudit {
.drawerMain {
min-width: 600px;
margin: 0px 32px 0px 32px;
// overflow-x: auto;
display: flex;
flex-direction: column;
.header {
height: 73px;
border-bottom: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
align-items: center;
// background-color: red;
margin-bottom: 20px;
flex-shrink: 0;
.headerTitle {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
// margin-left: 24px;
}
}
.main {
width: 100%;
height: 100%;
// background-color: #bfa;
overflow-y: auto;
padding-right: 10px;
.content7 {
margin-top: 20px;
.set_tit {
margin-left: 34px;
font-size: 18px;
font-weight: 500;
color: #232425;
}
.line {
width: 100%;
height: 1px;
background-color: #e8e8e8;
margin-top: 10px;
}
.set_body {
margin-left: 34px;
margin-right: 34px;
position: relative;
.edit {
position: absolute;
width: 100px;
height: 40px;
background: #388be1;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
right: 0;
cursor: pointer;
.img {
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/edit.png);
background-size: 100%;
margin-right: 7px;
}
.ed {
font-size: 14px;
font-weight: 400;
color: #ffffff;
}
}
.set_content {
margin: 32px auto;
display: flex;
// justify-content: end;
.setc_name {
width: 150px;
display: flex;
justify-content: end;
}
.setc_main {
flex: 1;
margin-left: 12px;
}
}
}
}
.detaile {
width: 100%;
// background-color: blue;
display: flex;
justify-content: center;
.debtn {
width: 130px;
height: 40px;
border: 0;
border-radius: 4px;
cursor: pointer;
}
}
.audit {
margin-left: 34px;
margin-right: 34px;
position: relative;
.set_content {
margin: 32px auto;
display: flex;
// justify-content: end;
.setc_name {
width: 150px;
display: flex;
justify-content: end;
}
.setc_main {
flex: 1;
margin-left: 12px;
textarea {
border-radius: 4px !important;
resize: none;
}
}
}
}
}
}
}
</style>

View File

@@ -16,7 +16,7 @@
<div class="inpbox1">
<a-select
v-model:value="valueproj"
placeholder="请输入内容分类"
placeholder="请选择内容分类"
@change="handleChangeproj"
:options="optionsproj"
/>
@@ -48,11 +48,11 @@
</div>
</div>
<div class="tmplh_btn">
<div class="btn btn1">
<div class="btn btn1" @click="search">
<div class="search"></div>
<div class="btnText btnText1">搜索</div>
</div>
<div class="btn btn2">
<div class="btn btn2" @click="reset">
<div class="search"></div>
<div class="btnText btnText2">重置</div>
</div>
@@ -66,16 +66,31 @@
:loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true"
@expand="expandTable"
:scroll="{ x: 1300 }"
:pagination="false"
/>
</div>
<div class="tableBox">
<div class="pa">
<a-pagination
v-if="total > 10"
showSizeChanger="true"
show-quick-jumper
:pageSize="pageSize"
v-model:current="currentPage"
:total="total"
class="pagination"
@change="changePagination"
/>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { reactive, toRefs } from "vue";
import { reactive, toRefs, onMounted } from "vue";
import { courseListView } from "../../api/indexAudit";
export default {
name: "CoursereViewed",
@@ -83,18 +98,20 @@ export default {
const state = reactive({
optionsproj: [
{
value: "jack",
value: "0",
label: "Jack",
},
{
value: "rose",
value: "1",
label: "rose",
},
],
valueproj: null,
valuecreater: null,
valuename: null,
currentPage: 1,
total: null,
pageSize: 10,
columns1: [
{
title: "序号",
@@ -155,21 +172,92 @@ export default {
},
],
tableData1: [
{
number: "1",
name: "课程1",
type: "在线",
content: "领导力/领导业务",
status: "通过",
creater: "-",
time: "-",
msg: "-",
},
// {
// number: "1",
// name: "课程1",
// type: "在线",
// content: "领导力/领导业务",
// status: "通过",
// creater: "-",
// time: "-",
// msg: "-",
// },
],
});
const getList = (obj) => {
let objn = obj || {
auditStatus: 0,
categoryId: 0,
createName: "",
name: "",
pageNo: state.currentPage,
pageSize: 10,
};
courseListView(objn)
.then((res) => {
console.log("获取已审核课程成功", res);
let result = res.data.data.rows;
state.total = res.data.data.total;
setTableData(result);
})
.catch((err) => {
console.log("获取已审核课程失败", err);
});
};
const setTableData = (table) => {
let data = table;
let array = [];
data.map((item) => {
let obj = {
number: item.offcourseId,
name: item.name,
type: item.type == 1 ? "线上" : "线下",
content: item.categoryId,
status: item.auditStatus == 2 ? "通过" : "拒绝",
creater: item.createName,
time: "-",
msg: item.description,
};
array.push(obj);
});
state.tableData1 = array;
};
const search = () => {
let obj = {
auditStatus: 0,
categoryId: state.valueproj,
createName: state.valuecreater,
name: state.valuename,
pageNo: state.currentPage,
pageSize: 10,
};
getList(obj);
};
const reset = () => {
(state.valueproj = null),
(state.valuecreater = null),
(state.valuename = null),
getList();
};
const handleChangeproj = (value, item) => {
console.log(value, item);
state.valueproj = item.value;
};
const changePagination = (pagina) => {
state.currentPage = pagina;
getList();
};
onMounted(() => {
getList();
});
return {
...toRefs(state),
getList,
setTableData,
search,
handleChangeproj,
reset,
changePagination,
};
},
};
@@ -191,11 +279,13 @@ export default {
.inpbox {
display: flex;
margin-top: 32px;
flex-wrap: wrap;
.inpbox1 {
display: flex;
justify-content: center;
align-items: center;
margin-right: 24px;
margin-top: 10px;
.ant-select-selector {
border-radius: 8px;
width: 270px;
@@ -210,8 +300,8 @@ export default {
}
.tmplh_btn {
display: flex;
margin-left: 38px;
margin-top: 32px;
// margin-left: 38px;
margin-top: 42px;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
@@ -219,7 +309,7 @@ export default {
display: flex;
align-items: center;
justify-content: center;
margin-left: 14px;
margin-right: 14px;
cursor: pointer;
flex-shrink: 0;
.search {
@@ -296,6 +386,12 @@ export default {
}
}
}
.pa {
width: 100%;
margin-top: 20px;
display: flex;
justify-content: center;
}
}
}
}

View File

@@ -6,34 +6,416 @@
* @FilePath: /fe-manage/src/views/examine/CourseReviewedN.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 待审核课程页面 -->
<!-- 待审核课程页面 coursereviewedn-->
<template>
<div class="coursereviewedn">
<div class="tmpl">
<div class="tmpl_header">
<div class="tmplh_inp">
<div class="inpbox">
<div class="inpbox1">
<a-select
v-model:value="valueproj"
placeholder="请选择内容分类"
@change="handleChangeproj"
:options="optionsproj"
/>
</div>
<div class="inpbox1">
<a-input
v-model:value="valuecreater"
style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
"
placeholder="请输入创建人"
/>
</div>
<div class="inpbox1">
<a-input
v-model:value="valuename"
style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
"
placeholder="请输入名称"
/>
</div>
</div>
</div>
<div class="tmplh_btn">
<div class="btn btn1" @click="search">
<div class="search"></div>
<div class="btnText btnText1">搜索</div>
</div>
<div class="btn btn2" @click="reset">
<div class="search"></div>
<div class="btnText btnText2">重置</div>
</div>
</div>
</div>
<div class="tmpl_body">
<div class="tmpl_tabbox">
<a-table
:columns="columns1"
:data-source="tableData1"
:loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true"
@expand="expandTable"
:scroll="{ x: 1300 }"
:pagination="false"
/>
</div>
<div class="tableBox">
<div class="pa">
<a-pagination
v-if="total > 10"
showSizeChanger="true"
show-quick-jumper
:pageSize="pageSize"
v-model:current="currentPage"
:total="total"
class="pagination"
@change="changePagination"
/>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { reactive, toRefs, } from "vue";
import { reactive, toRefs, onMounted } from "vue";
import { list } from "../../api/indexAudit";
import { toDate } from "../../api/method";
export default {
name: "CoursereViewedN",
setup() {
const state = reactive({
optionsproj: [
{
value: "jack",
label: "Jack",
},
{
value: "rose",
label: "rose",
},
],
valueproj: null,
valuecreater: null,
valuename: null,
// currentFacePage: 1,
currentPage: 1,
total: null,
pageSize: 10,
columns1: [
{
title: "序号",
dataIndex: "number",
key: "number",
align: "center",
},
{
title: "名称",
dataIndex: "name",
key: "name",
align: "center",
},
{
title: "类型",
dataIndex: "type",
key: "type",
align: "center",
},
{
title: "内容分类",
dataIndex: "content",
key: "content",
align: "center",
},
{
title: "状态",
dataIndex: "status",
key: "status",
align: "center",
},
{
title: "转审",
dataIndex: "change",
key: "change",
align: "center",
},
{
title: "创建人",
dataIndex: "creater",
key: "creater",
align: "center",
},
{
title: "创建时间",
dataIndex: "time",
key: "time",
align: "center",
},
{
title: "操作",
dataIndex: "opt",
key: "opt",
align: "center",
customRender: () => {
return (
<div>
<span style="cursor:pointer">审核</span>&nbsp;
<span style="cursor:pointer">预览</span>
</div>
);
},
},
],
tableData1: [
{
number: "1",
name: "课程1",
type: "在线",
content: "领导力/领导业务",
status: "待审核",
change: "",
creater: "-",
time: "-",
},
{
number: "2",
name: "面授课程",
type: "在线",
content: "领导力/领导业务",
status: "待审核",
change: "已转审",
creater: "-",
time: "-",
},
],
});
const getFaceList = (obj) => {
let objn = obj || {
auditStatus: 1,
beginTime: 0,
categoryId: 0,
createName: "",
endTime: 0,
name: "",
pageNo: state.currentPage,
pageSize: 10,
projectName: "",
};
list(objn)
.then((res) => {
console.log("获取面授列表成功", res);
let result = res.data.data;
state.total = result.total;
if (result.total > 0) {
setFaceData(result.rows);
}
})
.catch((err) => {
console.log("获取面授列表失败", err);
});
};
const setFaceData = (tableData) => {
let data = tableData;
let array = [];
data.map((item) => {
let obj = {
number: item.offcourseId,
name: item.name,
type: item.type == 1 ? "线上" : "线下",
content: item.categoryId,
status: "待审核",
change: "-",
creater: item.createName,
time: toDate(item.createTime, "Y-M-D h-m"),
};
array.push(obj);
});
state.tableData1 = array;
};
const reset = () => {
state.valueproj = null;
state.valuecreater = null;
state.valuename = null;
getFaceList();
};
const search = () => {
let obj = {
auditStatus: 1,
beginTime: 0,
categoryId: state.valueproj,
createName: state.valuecreater,
endTime: 0,
name: state.valuename,
pageNo: state.currentPage,
pageSize: 10,
projectName: "",
};
getFaceList(obj);
};
const changePagination = (pagina) => {
state.currentPage = pagina;
getFaceList();
};
onMounted(() => {
getFaceList();
});
return {
...toRefs(state),
getFaceList,
setFaceData,
search,
reset,
changePagination,
};
},
};
</script>
<style lang="scss">
.coursereviewedn {
width: 100%;
.tmpl {
width: 100%;
.tmpl_header {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 32px;
margin-left: 32px;
margin-right: 32px;
.tmplh_inp {
.inpbox {
display: flex;
margin-top: 32px;
flex-wrap: wrap;
.inpbox1 {
display: flex;
justify-content: center;
align-items: center;
margin-right: 24px;
margin-top: 10px;
.ant-select-selector {
border-radius: 8px;
width: 270px;
height: 40px;
padding-top: 5px;
}
span {
white-space: nowrap;
}
}
}
}
.tmplh_btn {
display: flex;
// margin-left: 38px;
margin-top: 42px;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
cursor: pointer;
flex-shrink: 0;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 36px;
margin-left: 5px;
}
.btnText1 {
color: rgb(255, 255, 255);
}
.btnText2 {
color: rgba(64, 158, 255, 1);
}
}
.btn1 {
background: #409eff;
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2 {
background: #ffffff;
border: 1px solid #388be1;
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
}
}
.btn1:hover {
background: rgb(255, 255, 255);
border: 1px solid #388be1;
.search {
background-image: url("../../assets/images/courseManage/search1.png");
}
.btnText {
color: rgba(64, 158, 255, 1);
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
}
}
.tmpl_body {
padding: 0px 30px;
.tmpl_tabbox {
.operation {
display: flex;
justify-content: center;
align-items: center;
color: #4ea6ff;
.nselect {
justify-content: center;
align-items: center;
display: flex;
.jc {
margin-left: 20px;
white-space: nowrap;
cursor: pointer;
}
}
}
}
.pa {
width: 100%;
margin-top: 20px;
display: flex;
justify-content: center;
}
}
}
}
</style>

View File

@@ -6,26 +6,471 @@
* @FilePath: /fe-manage/src/views/examine/ProjectReviewed.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 已审核项目页面 -->
<!-- 已审核项目页面 projectviewed-->
<template>
<div class="projectviewed"></div>
<div class="projectviewed">
<div class="tmpl">
<div class="tmpl_header">
<div class="tmplh_inp">
<div class="inpbox">
<div class="inpbox1">
<a-input
v-model:value="valueproj"
style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
"
placeholder="请输入项目名称/所属项目"
/>
</div>
<div class="inpbox1">
<a-input
v-model:value="valuename"
style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
"
placeholder="请输入项目经理"
/>
</div>
<div class="inpbox1">
<a-input
v-model:value="valuecreater"
style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
"
placeholder="请输入创建人"
/>
</div>
<div class="inpbox1">
<a-range-picker
v-model:value="valueDate"
style="border-radius: 8px; height: 40px; margin-left: 5px"
:placeholder="[' 开始时间', ' 结束时间']"
@change="rankTimeChange"
/>
</div>
<div class="inpbox1">
<a-select
v-model:value="valuestate"
placeholder="请选择审核状态"
@change="handleChangeproj"
:options="optionsproj"
/>
</div>
</div>
</div>
<div class="tmplh_btn">
<div class="btn btn1" @click="search">
<div class="search"></div>
<div class="btnText btnText1">搜索</div>
</div>
<div class="btn btn2" @click="reset">
<div class="search"></div>
<div class="btnText btnText2">重置</div>
</div>
</div>
</div>
<div class="tmpl_body">
<div class="tmpl_tabbox">
<a-table
:columns="columns1"
:data-source="tableData1"
:loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true"
@expand="expandTable"
:scroll="{ x: 1300 }"
:pagination="false"
/>
</div>
<div class="tableBox">
<div class="pa">
<a-pagination
v-if="total > 10"
showSizeChanger="true"
show-quick-jumper
:pageSize="pageSize"
v-model:current="currentPage"
:total="total"
class="pagination"
@change="changePagination"
/>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { reactive, toRefs } from "vue";
import { reactive, toRefs, onMounted } from "vue";
import { listView } from "../../api/indexAudit";
import { toDate } from "@/api/method";
import dayjs from "dayjs";
export default {
name: "ProjectViewed",
setup() {
const state = reactive({});
const state = reactive({
optionsproj: [
{
value: "jack",
label: "Jack",
},
{
value: "rose",
label: "rose",
},
],
valueproj: null,
valuecreater: null,
valuename: null,
valueDate: [],
valuestate: null,
currentPage: 1,
total: null,
pageSize: 10,
columns1: [
{
title: "序号",
dataIndex: "number",
key: "number",
align: "center",
},
{
title: "项目名称",
dataIndex: "name",
key: "name",
align: "center",
},
{
title: "所属项目",
dataIndex: "belong",
key: "belong",
align: "center",
width: "10%",
},
{
title: "项目经理",
dataIndex: "manager",
key: "manager",
align: "center",
},
{
title: "审核状态",
dataIndex: "status",
key: "status",
align: "center",
},
{
title: "创建人",
dataIndex: "creater",
key: "creater",
align: "center",
},
{
title: "审核时间",
dataIndex: "time",
key: "time",
align: "center",
},
{
title: "审核说明",
dataIndex: "msg",
key: "msg",
align: "center",
},
{
title: "操作",
dataIndex: "opt",
key: "opt",
align: "center",
customRender: () => {
return (
<div>
<span>审核日志</span>
</div>
);
},
},
],
tableData1: [
{
number: "1",
name: "课程1",
belong: "管理者进阶/管理者进阶腾飞班",
manager: "黄华,刘军",
status: "通过",
creater: "管理员",
time: "-",
msg: "-",
},
],
});
const getProjList = (obj) => {
let objn = obj || {
beginTime: 0,
createName: "",
endTime: 0,
manager: "",
name: "",
pageNo: state.currentPage,
pageSize: 10,
status: 0,
};
listView(objn)
.then((res) => {
console.log("获取已审核项目成功", res);
let result = res.data.data.rows;
state.total = res.data.data.total;
setTableData(result);
})
.catch((err) => {
console.log("获取已审核项目失败", err);
});
};
const setTableData = (tabledata) => {
let data = tabledata;
data.map((item) => {
let obj = {
number: item.projectId,
name: getName(item),
belong: getBelong(item),
manager: item.manager,
status: item.status == 2 ? "通过" : "拒绝",
creater: item.createName,
time: toDate(item.beginTime, "Y-M-D h-m"),
msg: item.description,
};
state.tableData1.push(obj);
});
};
const getName = (item) => {
if (
Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
!Object.prototype.hasOwnProperty.call(
item.subList[0].subList[0],
"name"
)
) {
// 两层
return item.subList[0].name;
} else if (
Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
Object.prototype.hasOwnProperty.call(item.subList[0].subList[0], "name")
) {
//三层
return item.subList[0].subList[0].name;
// return item.name
} else {
// 单层
return item.name;
}
};
const getBelong = (item) => {
if (
Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
!Object.prototype.hasOwnProperty.call(
item.subList[0].subList[0],
"name"
)
) {
// 两层
return item.name;
} else if (
Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
Object.prototype.hasOwnProperty.call(item.subList[0].subList[0], "name")
) {
//三层
return item.subList[0].name + "/" + item.subList[0].subList[0].name;
// return item.name
} else {
// 单层
return item.name;
}
};
const changePagination = (pagina) => {
state.currentPage = pagina;
getProjList();
};
const search = () => {
let obj = {
beginTime: dayjs(state.valueDate[0]).format("YYYY-MM-DD"),
createName: state.valuecreater,
endTime: dayjs(state.valueDate[1]).format("YYYY-MM-DD"),
manager: state.valuename,
name: state.valueproj,
pageNo: state.currentPage,
pageSize: 10,
status: 0,
};
getProjList(obj);
};
const reset = () => {
state.valueproj = null;
state.valuecreater = null;
state.valuename = null;
state.valueDate = null;
state.valuestate = null;
getProjList();
};
onMounted(() => {
getProjList();
});
return {
...toRefs(state),
getProjList,
setTableData,
getName,
getBelong,
changePagination,
search,
reset,
};
},
};
</script>
<style lang="scss">
.projectviewed {
width: 100%;
.tmpl {
width: 100%;
.tmpl_header {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 32px;
margin-left: 32px;
margin-right: 32px;
.tmplh_inp {
.inpbox {
display: flex;
flex-wrap: wrap;
margin-top: 42px;
.inpbox1 {
display: flex;
justify-content: center;
align-items: center;
margin-right: 24px;
margin-top: 10px;
.ant-select-selector {
border-radius: 8px;
width: 270px;
height: 40px;
padding-top: 5px;
}
span {
white-space: nowrap;
}
}
}
}
.tmplh_btn {
display: flex;
// margin-left: 38px;
margin-top: 32px;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
cursor: pointer;
flex-shrink: 0;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 36px;
margin-left: 5px;
}
.btnText1 {
color: rgb(255, 255, 255);
}
.btnText2 {
color: rgba(64, 158, 255, 1);
}
}
.btn1 {
background: #409eff;
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2 {
background: #ffffff;
border: 1px solid #388be1;
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
}
}
.btn1:hover {
background: rgb(255, 255, 255);
border: 1px solid #388be1;
.search {
background-image: url("../../assets/images/courseManage/search1.png");
}
.btnText {
color: rgba(64, 158, 255, 1);
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
}
}
.tmpl_body {
padding: 0px 30px;
.tmpl_tabbox {
.operation {
display: flex;
justify-content: center;
align-items: center;
color: #4ea6ff;
.nselect {
justify-content: center;
align-items: center;
display: flex;
.jc {
margin-left: 20px;
white-space: nowrap;
cursor: pointer;
}
}
}
}
.pa {
width: 100%;
margin-top: 20px;
display: flex;
justify-content: center;
}
}
}
}
</style>

View File

@@ -6,26 +6,473 @@
* @FilePath: /fe-manage/src/views/examine/ProjectReviewedN.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 待审核项目页面 -->
<!-- 待审核项目页面 projectviewedn-->
<template>
<div class="projectviewedn"></div>
<div class="projectviewedn">
<div class="tmpl">
<div class="tmpl_header">
<div class="tmplh_inp">
<div class="inpbox">
<div class="inpbox1">
<a-input
v-model:value="valueproj"
style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
"
placeholder="请输入项目名称/所属项目"
/>
</div>
<div class="inpbox1">
<a-input
v-model:value="valuename"
style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
"
placeholder="请输入项目经理"
/>
</div>
<div class="inpbox1">
<a-input
v-model:value="valuecreater"
style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
"
placeholder="请输入创建人"
/>
</div>
<div class="inpbox1">
<a-range-picker
v-model:value="valueDate"
style="border-radius: 8px; height: 40px; margin-left: 5px"
:placeholder="[' 开始时间', ' 结束时间']"
@change="rankTimeChange"
/>
</div>
</div>
</div>
<div class="tmplh_btn">
<div class="btn btn1" @click="search">
<div class="search"></div>
<div class="btnText btnText1">搜索</div>
</div>
<div class="btn btn2" @click="reset">
<div class="search"></div>
<div class="btnText btnText2">重置</div>
</div>
</div>
</div>
<div class="tmpl_body">
<div class="tmpl_tabbox">
<a-table
:columns="columns1"
:data-source="tableData1"
:loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true"
@expand="expandTable"
:pagination="false"
:scroll="{ x: 1300 }"
/>
</div>
<div class="tableBox">
<div class="pa">
<a-pagination
v-if="total > 10"
showSizeChanger="true"
show-quick-jumper
:pageSize="pageSize"
v-model:current="currentPage"
:total="total"
class="pagination"
@change="changePagination"
/>
</div>
</div>
</div>
</div>
<!-- 审核项目页面 -->
<project-audit
v-model:ProjAuditvisible="ProjAuditvisible"
v-model:projectId="projectId"
/>
</div>
</template>
<script>
import { reactive, toRefs } from "vue";
import { onMounted, reactive, toRefs } from "vue";
import ProjectAudit from "../../components/drawers/ProjectAudit";
import { projlist } from "../../api/indexAudit";
import { toDate } from "@/api/method";
import dayjs from "dayjs";
export default {
name: "ProjectViewedN",
components: { ProjectAudit },
setup() {
const state = reactive({});
const state = reactive({
optionsproj: [
{
value: "jack",
label: "Jack",
},
{
value: "rose",
label: "rose",
},
],
valueproj: null,
valuecreater: null,
valuename: null,
valueDate: [],
ProjAuditvisible: false,
currentPage: 1,
total: null,
pageSize: 10,
columns1: [
{
title: "序号",
dataIndex: "number",
key: "number",
align: "center",
},
{
title: "项目名称",
dataIndex: "name",
key: "name",
align: "center",
},
{
title: "所属项目",
dataIndex: "belong",
key: "belong",
align: "center",
width: "11%",
},
{
title: "项目经理",
dataIndex: "manager",
key: "manager",
align: "center",
},
{
title: "审核状态",
dataIndex: "status",
key: "status",
align: "center",
},
{
title: "创建人",
dataIndex: "creater",
key: "creater",
align: "center",
},
{
title: "创建时间",
dataIndex: "time",
key: "time",
align: "center",
},
{
title: "操作",
dataIndex: "opt",
key: "opt",
align: "center",
customRender: () => {
return (
<div>
<span
style="cursor:pointer"
onClick={() => {
showProjAudit();
}}
>
审核
</span>
</div>
);
},
},
],
tableData1: [
{
number: "1",
name: "课程1",
belong: "管理者进阶/管理者进阶腾飞班",
manager: "黄华,刘军",
status: "待审核",
creater: "管理员",
time: "-",
},
],
});
const showProjAudit = () => {
state.ProjAuditvisible = true;
};
const getProjList = (obj) => {
let objn = obj || {
beginTime: 0,
createName: "",
endTime: 0,
manager: "",
name: "",
pageNo: state.currentPage,
pageSize: 10,
status: 1,
};
projlist(objn)
.then((res) => {
console.log("获取待审核项目成功", res);
let result = res.data.data;
state.total = result.total;
if (result.total > 0) {
setProjList(result.rows);
}
})
.catch((err) => {
console.log("获取待审核项目失败", err);
});
};
const setProjList = (tableData) => {
let data = tableData;
let array = [];
data.map((item) => {
let obj = {
number: item.projectId,
name: getName(item),
belong: getBelong(item),
manager: item.manager,
status: "待审核",
creater: item.createName,
time: toDate(item.createTime, "Y-M-D h-m"),
};
array.push(obj);
});
state.tableData1 = [];
};
const getName = (item) => {
if (
Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
!Object.prototype.hasOwnProperty.call(
item.subList[0].subList[0],
"name"
)
) {
// 两层
return item.subList[0].name;
} else if (
Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
Object.prototype.hasOwnProperty.call(item.subList[0].subList[0], "name")
) {
//三层
return item.subList[0].subList[0].name;
// return item.name
} else {
// 单层
return item.name;
}
};
const getBelong = (item) => {
if (
Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
!Object.prototype.hasOwnProperty.call(
item.subList[0].subList[0],
"name"
)
) {
// 两层
return item.name;
} else if (
Object.prototype.hasOwnProperty.call(item.subList[0], "name") &&
Object.prototype.hasOwnProperty.call(item.subList[0].subList[0], "name")
) {
//三层
return item.subList[0].name + "/" + item.subList[0].subList[0].name;
// return item.name
} else {
// 单层
return item.name;
}
};
const changePagination = (pagina) => {
state.currentPage = pagina;
getProjList();
};
const reset = () => {
(state.valueproj = null),
(state.valuecreater = null),
(state.valuename = null),
(state.valueDate = []);
getProjList();
};
const search = () => {
let obj = {
beginTime: dayjs(state.valueDate[0]).format("YYYY-MM-DD"),
createName: state.valuecreater,
endTime: dayjs(state.valueDate[1]).format("YYYY-MM-DD"),
manager: state.valuename,
name: state.valueproj,
pageNo: state.currentPage,
pageSize: 10,
status: 1,
};
getProjList(obj);
};
onMounted(() => {
getProjList();
});
return {
...toRefs(state),
showProjAudit,
getProjList,
setProjList,
getName,
getBelong,
changePagination,
reset,
search,
};
},
};
</script>
<style lang="scss">
.projectviewedn {
width: 100%;
.tmpl {
width: 100%;
.tmpl_header {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 32px;
margin-left: 32px;
margin-right: 32px;
.tmplh_inp {
.inpbox {
display: flex;
flex-wrap: wrap;
margin-top: 42px;
.inpbox1 {
display: flex;
justify-content: center;
align-items: center;
margin-right: 24px;
margin-top: 10px;
.ant-select-selector {
border-radius: 8px;
width: 270px;
height: 40px;
padding-top: 5px;
}
span {
white-space: nowrap;
}
}
}
}
.tmplh_btn {
display: flex;
// margin-left: 38px;
margin-top: 32px;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
cursor: pointer;
flex-shrink: 0;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 36px;
margin-left: 5px;
}
.btnText1 {
color: rgb(255, 255, 255);
}
.btnText2 {
color: rgba(64, 158, 255, 1);
}
}
.btn1 {
background: #409eff;
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2 {
background: #ffffff;
border: 1px solid #388be1;
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
}
}
.btn1:hover {
background: rgb(255, 255, 255);
border: 1px solid #388be1;
.search {
background-image: url("../../assets/images/courseManage/search1.png");
}
.btnText {
color: rgba(64, 158, 255, 1);
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
}
}
.tmpl_body {
padding: 0px 30px;
.tmpl_tabbox {
.operation {
display: flex;
justify-content: center;
align-items: center;
color: #4ea6ff;
.nselect {
justify-content: center;
align-items: center;
display: flex;
.jc {
margin-left: 20px;
white-space: nowrap;
cursor: pointer;
}
}
}
}
.pa {
width: 100%;
margin-top: 20px;
display: flex;
justify-content: center;
}
}
}
}
</style>

View File

@@ -1025,7 +1025,7 @@
<a-upload
v-model:file-list="fileList"
name="file"
action="/api/file/upload"
action="/manageApi/file/upload"
@change="handleChange"
>
<span
@@ -1062,7 +1062,11 @@
<span style="font: oblique bold 16px Sans-serif">{{
item.name
}}</span>
<span style="color: #4ea6ff; float: right;cursor: pointer;" @click="deFile(item.uid)">删除</span>
<span
style="color: #4ea6ff; float: right; cursor: pointer"
@click="deFile(item.uid)"
>删除</span
>
</div>
</div>
</div>
@@ -3260,7 +3264,7 @@ export default {
let luj = info.attach;
console.log("lulj", luj);
console.log("赚回来", JSON.parse(luj));
state.fileList = JSON.parse(luj)
state.fileList = JSON.parse(luj);
// state.fileList = luj
}
});
@@ -3369,33 +3373,23 @@ export default {
};
//end---------项目概览
const handleChange = (info) => {
const handleChange = ({ file, fileList }) => {
let list = [];
if (info.file.status !== "uploading") {
console.log(info.file.response.data, info.fileList);
// info.fileList.map((item) => {
// //把地址放到list里
// // list.push(item.response.data);
// // list.push(JSON.stringify(item))
// state.fileList.push(item)
// });
state.fileList.push(info.file)
list = state.fileList
if (file.status !== "uploading") {
console.log("上传的list", fileList);
console.log(file);
list = state.fileList;
console.log("list", list);
// let str = list.join(",");
let str = JSON.stringify(list);
console.log("str", str);
console.log("str",str)
//要编辑项目
editProj({
attach: str,
beginTime: state.tstartTime.slice(0, 10),
// beginTime:1668643200,
boeFlag: state.boeFlag,
category: state.category,
courseSyncFlag: state.courseSyncFlag,
endTime: state.tendTime.slice(0, 10),
// endTime: 1668816000,
level: state.tlevel,
manager: state.manager,
managerId: state.managerId,
@@ -3420,10 +3414,10 @@ export default {
});
}
if (info.file.status === "done") {
message.success(`${info.file.name} 文件上传成功`);
} else if (info.file.status === "error") {
message.error(`${info.file.name} 文件上传失败.`);
if (file.status === "done") {
message.success(`${file.name} 文件上传成功`);
} else if (file.status === "error") {
message.error(`${file.name} 文件上传失败.`);
}
};
@@ -3608,11 +3602,13 @@ export default {
});
};
//删除文件
const deFile=(id)=>{
console.log(id)
let index = state.fileList.findIndex(item=>{item.uid==id})
state.fileList.splice(index,1)
let str = JSON.stringify(state.fileList)
const deFile = (id) => {
console.log(id);
let index = state.fileList.findIndex((item) => {
item.uid == id;
});
state.fileList.splice(index, 1);
let str = JSON.stringify(state.fileList);
editProj({
attach: str,
beginTime: state.tstartTime.slice(0, 10),
@@ -3640,13 +3636,13 @@ export default {
})
.then((res) => {
console.log("上传成功", res);
message.destroy()
return message.success("删除成功")
message.destroy();
return message.success("删除成功");
})
.catch((err) => {
console.log("上传失败了", err);
});
}
};
onMounted(() => {
getStu();
getTaskList();