mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 18:22:55 +08:00
Merge branch 'master' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage
This commit is contained in:
13
src/api/indexAudit.js
Normal file
13
src/api/indexAudit.js
Normal 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)
|
||||
@@ -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)
|
||||
|
||||
@@ -6,9 +6,9 @@ export const templateEdit = (obj) => http.post('/admin/project/template/edit',ob
|
||||
// 模板详情
|
||||
export const templateDetail = (id) => http.get(`/admin/project/template/detail?projectTemplateId=${id}`);
|
||||
// 删除阶段
|
||||
export const deleteStage = (id) => http.delete(`/admin/project/template/deleteStage`,{stageId:id});
|
||||
export const deleteStage = (id) => http.delete(`/admin/project/template/deleteStage?stageId=${id}`);
|
||||
//删除任务
|
||||
export const deleteTask = (id) => http.delete(`/admin/project/template/deleteTask`,{projectTaskIds:id});
|
||||
export const deleteTask = (id) => http.delete(`/admin/project/template/deleteTask?projectTaskIds=${id}`);
|
||||
// 移动任务到阶段
|
||||
export const moveTask = (obj) => http.post('/admin/project/template/moveTask',obj);
|
||||
// 新建或编辑阶段
|
||||
|
||||
412
src/components/drawers/ProjectAudit.vue
Normal file
412
src/components/drawers/ProjectAudit.vue
Normal 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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
<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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -55,7 +55,7 @@
|
||||
<div class="onerow">
|
||||
<div class="taskmain">任务大纲</div>
|
||||
<button class="btn" @click="showFaceIn">批量面授报名</button>
|
||||
<router-link to="/manage/temTask" class="edit">
|
||||
<router-link to="/temTask" class="edit">
|
||||
<img
|
||||
class="editimg"
|
||||
src="../../assets/images/projectadd/edit.png"
|
||||
@@ -848,7 +848,7 @@ export default defineComponent({
|
||||
}
|
||||
const toEdit = () => {
|
||||
routered.push({
|
||||
path: "/manage/templateAdd",
|
||||
path: "/templateAdd",
|
||||
query: {
|
||||
projectId: state.projectId,
|
||||
name: state.name,
|
||||
|
||||
@@ -1025,7 +1025,7 @@
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="file"
|
||||
action="/api/file/upload"
|
||||
action="/manageApi/file/upload"
|
||||
@change="handleChange"
|
||||
>
|
||||
<span
|
||||
@@ -3373,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);
|
||||
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);
|
||||
//要编辑项目
|
||||
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,
|
||||
@@ -3424,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} 文件上传失败.`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
<!-- <img class="img2" src="../../assets/images/projectadd/keep.png" />
|
||||
<div class="pub">保存</div>
|
||||
<div class="line"></div> -->
|
||||
<router-link to="/manage/taskpage">
|
||||
<router-link to="/taskpage">
|
||||
<div style="display: flex">
|
||||
<img
|
||||
class="img2"
|
||||
@@ -1041,9 +1041,7 @@
|
||||
import AddInvist from "../../components/drawers/AddInvist.vue";
|
||||
import AddVote from "../../components/vote/AddVote.vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/indexTaskadd";
|
||||
import * as apistage from "../../api/indexStage";
|
||||
import * as apimove from "../../api/indexMovetask";
|
||||
import * as api from "../../api/indexTemplate";
|
||||
import draggable from "vuedraggable";
|
||||
import { storage } from "../../api/storage";
|
||||
import UnlockMode from "../../components/drawers/UnlockMode.vue";
|
||||
@@ -1317,8 +1315,8 @@
|
||||
console.log("data", data);
|
||||
data.map((value) => {
|
||||
let obj = {
|
||||
id: value.projectTaskId,
|
||||
key: value.projectTaskId,
|
||||
id: value.templateTaskId,
|
||||
key: value.templateTaskId,
|
||||
lei:
|
||||
value.type == 1
|
||||
? "在线"
|
||||
@@ -1351,7 +1349,7 @@
|
||||
checked: false, //是否选中类型
|
||||
courseId: value.courseId,
|
||||
projectId: value.projectId,
|
||||
stageId: value.stageId,
|
||||
templateStageId: value.templateStageId,
|
||||
type: value.type,
|
||||
};
|
||||
array.push(obj);
|
||||
@@ -1365,11 +1363,11 @@
|
||||
let array = [];
|
||||
data.map((value) => {
|
||||
let obj = {
|
||||
id: value.stageId,
|
||||
id: value.templateStageId,
|
||||
tit: value.name,
|
||||
name: value.remark,
|
||||
taskList: value.taskList,
|
||||
value: value.stageId,
|
||||
value: value.templateStageId,
|
||||
label: value.name,
|
||||
};
|
||||
array.push(obj);
|
||||
@@ -1491,8 +1489,7 @@
|
||||
<span
|
||||
style="color:#4EA6FF;cursor:pointer"
|
||||
onClick={() => {
|
||||
showDelete();
|
||||
state.deleteID = text.record.id;
|
||||
showDelete(text.record.id);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
@@ -1508,23 +1505,19 @@
|
||||
|
||||
//获取任务列表
|
||||
const getTask = () => {
|
||||
// console.log("state.projectId", state.projectId);
|
||||
let obj = {
|
||||
projectId: state.projectId,
|
||||
// projectId: 28,
|
||||
};
|
||||
state.tableData = []
|
||||
api
|
||||
.getTask(obj)
|
||||
// .templateDetail(state.projectId || 1)
|
||||
.templateDetail(1)
|
||||
.then((res) => {
|
||||
if (res.status == 200) {
|
||||
console.log("22222", res.data.data.stageList);
|
||||
// console.log("22222", res.data.data.stageList);
|
||||
state.projectTitle = res.data.data.projectInfo.name;
|
||||
state.picUrl = res.data.data.projectInfo.picUrl;
|
||||
state.projectTitle = res.data.data.projectTemplateInfo.name;
|
||||
state.picUrl = res.data.data.projectTemplateInfo.picUrl;
|
||||
let leng = res.data.data.stageList.length;
|
||||
if (leng > 0) {
|
||||
let stage = localStorage.getItem("stageId")
|
||||
? localStorage.getItem("stageId")
|
||||
let stage = localStorage.getItem("templateStageId")
|
||||
? localStorage.getItem("templateStageId")
|
||||
: null;
|
||||
console.log("zhaodaole", stage);
|
||||
// console.log("stage",Object.prototype.toString.call(stage))
|
||||
@@ -1532,7 +1525,7 @@
|
||||
if (stage !== "null") {
|
||||
console.log(stage);
|
||||
let stageList = res.data.data.stageList; //阶段数组
|
||||
let result = stageList.find((item) => item.stageId == stage);
|
||||
let result = stageList.find((item) => item.templateStageId == stage);
|
||||
console.log("又找到了", result);
|
||||
getTableData(result.taskList);
|
||||
} else {
|
||||
@@ -1540,7 +1533,7 @@
|
||||
console.log("任务列表", arr);
|
||||
getTableData(arr);
|
||||
// state.isActive = true;
|
||||
changebgc(res.data.data.stageList[0].stageId);
|
||||
changebgc(res.data.data.stageList[0].templateStageId);
|
||||
}
|
||||
|
||||
// 每次都获取了第一条taskList
|
||||
@@ -1560,13 +1553,13 @@
|
||||
});
|
||||
}
|
||||
//给阶段id赋初始值
|
||||
let stageid = localStorage.getItem("stageId")
|
||||
? localStorage.getItem("stageId")
|
||||
let stageid = localStorage.getItem("templateStageId")
|
||||
? localStorage.getItem("templateStageId")
|
||||
: null;
|
||||
if (stageid !== "null") {
|
||||
state.chooseStageId = stageid;
|
||||
} else {
|
||||
state.chooseStageId = leng > 0 ? stagearr[0].stageId : null;
|
||||
state.chooseStageId = leng > 0 ? stagearr[0].templateStageId : null;
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1589,12 +1582,11 @@
|
||||
|
||||
//删除任务
|
||||
const deleteTask = () => {
|
||||
let obj = { projectTaskIds: state.deleteID };
|
||||
api
|
||||
.deleteTask(obj)
|
||||
.deleteTask(state.deleteID)
|
||||
.then((res) => {
|
||||
console.log(res, "gggggggggggggggg");
|
||||
// deleteVoteText();
|
||||
getTask()
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
@@ -1624,10 +1616,10 @@
|
||||
} else {
|
||||
{
|
||||
let obj = {
|
||||
stageId: state.removeStageId,
|
||||
projectTaskId: state.selectRow,
|
||||
templateStageId: state.removeStageId,
|
||||
projectTemplateTaskId: state.selectRow,
|
||||
};
|
||||
apimove
|
||||
api
|
||||
.moveTask(obj)
|
||||
.then((res) => {
|
||||
console.log("移动成功", res);
|
||||
@@ -1635,7 +1627,7 @@
|
||||
message.success("移动成功");
|
||||
console.log(state.removeStageId);
|
||||
getTask();
|
||||
localStorage.setItem("stageId", state.chooseStageId);
|
||||
localStorage.setItem("templateStageId", state.chooseStageId);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("移动失败", err);
|
||||
@@ -1648,12 +1640,10 @@
|
||||
const deleteTaskAll = () => {
|
||||
let arr = state.selectRow;
|
||||
console.log("选择的行信息", arr);
|
||||
arr.map((value) => {
|
||||
let obj = {
|
||||
projectTaskIds: value,
|
||||
};
|
||||
arr.map(() => {
|
||||
|
||||
api
|
||||
.deleteTask(obj)
|
||||
.deleteTask(arr)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
message.destroy();
|
||||
@@ -1716,11 +1706,11 @@
|
||||
if (state.updateStageID) {
|
||||
let obj = {
|
||||
name: state.valuesname,
|
||||
projectId: state.projectId,
|
||||
projectTemplateId: 1,
|
||||
remark: state.valuesnotice,
|
||||
stageId: state.updateStageID,
|
||||
stageId:state.updateStageID,
|
||||
};
|
||||
apistage
|
||||
api
|
||||
.editStage(obj)
|
||||
.then((res) => {
|
||||
console.log("修改阶段成功", res);
|
||||
@@ -1738,10 +1728,11 @@
|
||||
} else {
|
||||
let obj = {
|
||||
name: state.valuesname,
|
||||
projectId: state.projectId,
|
||||
projectTemplateId: 1,
|
||||
remark: state.valuesnotice,
|
||||
stageId:0,
|
||||
};
|
||||
apistage
|
||||
api
|
||||
.editStage(obj)
|
||||
.then((res) => {
|
||||
console.log("添加阶段成功", res);
|
||||
@@ -1771,11 +1762,8 @@
|
||||
//删除阶段
|
||||
const deleteStage = () => {
|
||||
console.log("chapterId", state.deleteStageId);
|
||||
let obj = {
|
||||
stageId: state.deleteStageId,
|
||||
};
|
||||
apistage
|
||||
.deleteStage(obj)
|
||||
api
|
||||
.deleteStage(state.deleteStageId)
|
||||
.then((res) => {
|
||||
console.log("删除阶段成功", res);
|
||||
message.success("删除阶段成功");
|
||||
@@ -1793,10 +1781,6 @@
|
||||
getTask();
|
||||
});
|
||||
onUpdated(() => {
|
||||
// getTask();
|
||||
// setTimeout(() => {
|
||||
// getTask();
|
||||
// }, 500);
|
||||
});
|
||||
onUnmounted(() => {
|
||||
document.getElementsByTagName("main")[0].style.background = "#ffffff";
|
||||
@@ -1960,7 +1944,7 @@
|
||||
name: ele.creater,
|
||||
projectId: ele.projectId,
|
||||
projectTaskId: ele.id,
|
||||
stageId: ele.stageId,
|
||||
templateStageId: ele.templateStageId,
|
||||
type: ele.type,
|
||||
};
|
||||
api
|
||||
|
||||
@@ -620,8 +620,8 @@ export default {
|
||||
// };
|
||||
|
||||
const errorMsgs = {
|
||||
name: "请输入项目名称",
|
||||
category: "请选择项目分类",
|
||||
name: "请输入模板名称",
|
||||
category: "请选择模板分类",
|
||||
picUrl: "请上传项目封面图",
|
||||
beginTime: "请选择项目开始时间",
|
||||
endTime: "请选择项目结束时间",
|
||||
@@ -636,6 +636,38 @@ export default {
|
||||
const createProject = () => {
|
||||
console.log("我要编辑项目", isEdit.value);
|
||||
let obj = {
|
||||
"name": state.projectInfo.name,
|
||||
"category": state.projectInfo.category,
|
||||
"picUrl": "x",
|
||||
"beginTime": state.projectInfo.rangevalue || 1,
|
||||
"endTime": state.projectInfo.rangevalue || 1,
|
||||
"manager": state.projectInfo.manager,
|
||||
"managerId": state.projectInfo.managerId || 0,
|
||||
"sourceBelongId": state.projectInfo.sourceBelongId,
|
||||
"level": state.projectInfo.level,
|
||||
"systemId": state.projectInfo.systemId,
|
||||
"boeFlag": state.projectInfo.boeFlag,
|
||||
"courseSyncFlag": state.projectInfo.courseSyncFlag,
|
||||
"notice": "",
|
||||
"noticeFlag": 0,
|
||||
"projectTemplateId": 0,
|
||||
"remark": "",
|
||||
"status": 0,
|
||||
|
||||
};
|
||||
|
||||
console.log(obj);
|
||||
|
||||
for (let i in errorMsgs) {
|
||||
console.log(obj[i]);
|
||||
if (obj[i] === "" || obj[i] === undefined) {
|
||||
message.destroy();
|
||||
message.warning(errorMsgs[i]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
api
|
||||
.templateEdit({
|
||||
"beginTime": 0,
|
||||
"boeFlag": 0,
|
||||
"category": 0,
|
||||
@@ -653,20 +685,7 @@ export default {
|
||||
"sourceBelongId": 0,
|
||||
"status": 0,
|
||||
"systemId": 0
|
||||
};
|
||||
|
||||
console.log(obj);
|
||||
|
||||
for (let i in errorMsgs) {
|
||||
console.log(obj[i]);
|
||||
if (obj[i] === "" || obj[i] === undefined) {
|
||||
message.destroy();
|
||||
message.warning(errorMsgs[i]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
api
|
||||
.templateEdit(obj)
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
@@ -674,7 +693,7 @@ export default {
|
||||
message.success("编辑成功");
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
path: "/manage/projectmanage",
|
||||
path: "/projectmanage",
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user