feat合并

This commit is contained in:
lixg
2022-11-22 20:43:31 +08:00
22 changed files with 5650 additions and 986 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

@@ -4,11 +4,11 @@ import http from "./config";
//编辑项目模板
export const templateEdit = (obj) => http.post('/admin/project/template/edit',obj);
// 模板详情
export const templateDetail = (id) => http.get(`/admin/project/template/edit?projectTemplateId=${id}`);
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);
// 新建或编辑阶段

View File

@@ -150,8 +150,10 @@ export default {
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
};
const afterVisibleChange = () => {
const afterVisibleChange = (bol) => {
if ( bol == true ) {
getAllCaseText()
}
};
const tableDataFunc = () => {
const columns = [
@@ -182,6 +184,9 @@ export default {
return columns;
};
const onSelectChange = (selectedRowKeys,selectedRows)=> {
if(selectedRowKeys.length>2){
return
}
state.selectedRowKeys = selectedRowKeys;
state.apiTaskList = selectedRows;
};
@@ -251,18 +256,6 @@ export default {
});
} else if (props.isLevel == 2) {
if(state.apiTaskList.length > 1){
// for((item,index) in state.apiTaskList){
// apiTask
// .addTask({
// "courseId": item.caseId,
// "duration": 0,
// "flag": true,
// "name": item.caseName,
// "projectId": props.projectId,
// "projectTaskId": props.projectTaskId,
// "stageId": props.chooseStageId,
// "type": 3,
// })
for(let i = 0;i <= state.apiTaskList.length;i++){
apiTask
.addTask({
@@ -455,6 +448,9 @@ export default {
.ant-table-selection-column {
padding: 0px !important;
padding-left: 15px !important;
.ant-table-selection{
display: none;
}
}
.ant-table-thead > tr > th {
background-color: rgba(239, 244, 252, 1);

View File

@@ -215,6 +215,8 @@ export default {
projectId: props.projectId,
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId,
evaluationTypeId: state.evaluationTypeId,
evaluationTypeName: state.evaluationTypeName,
type: 10,
})
.then(( ) => {
@@ -230,6 +232,8 @@ export default {
name: res.data.data.evaluationName,
routerId: props.routerId,
routerTaskId: props.routerTaskId || 0,
evaluationTypeId: state.evaluationTypeId,
evaluationTypeName: state.evaluationTypeName,
type: 10,
})
.then(( ) => {

View File

@@ -78,15 +78,16 @@
<div class="main_item">
<div class="btnbox">
<a-form-item has-feedback label="选择试卷" name="choosedTest">
<!-- <a-select
dropdownClassName="dropdown-style"
placeholder="请输入考试名称"
:options="options1"
v-model:value="formState.choosedTest"
allowClear
showSearch
/> -->
<a-dropdown>
<a-button
type="primary"
style="width: 100px; margin-left: 35px"
class="outer"
@click.prevent
@click="selectTest()"
>
选择试卷
</a-button>
<!-- <a-dropdown>
<a-button
type="primary"
style="width: 100px; margin-left: 35px"
@@ -109,16 +110,22 @@
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</a-dropdown> -->
<span style="margin-left: 10px">
<a-tag
class="tag-style"
v-if="paperName != ''"
:closable="true"
>{{ paperName }}</a-tag
>
<!-- <a-tag
class="tag-style"
v-for="item in choosedTestList"
:closable="true"
@close="closeTag(item.key)"
:key="item.key"
>{{ item.value }}</a-tag
>
> -->
</span>
</a-form-item>
</div>

View File

@@ -36,7 +36,7 @@
<div class="search"></div>
<div class="btnText">搜索</div>
</div>
<div class="btn btn2">
<div class="btn btn2" @click="resetData">
<div class="search"></div>
<div class="btnText">重置</div>
</div>
@@ -50,7 +50,7 @@
:data-source="tableData"
:loading="tableDataTotal === -1 ? true : false"
:pagination="false"
:row-selection="{ selectedRowKeys:selectedRowKeys,onSelect:onSelect,onChange:onSelectChange}"
:row-selection="{ selectedRowKeys:selectedRowKeys,onChange:onSelectChange}"
/>
<div class="pa">
<a-pagination
@@ -148,18 +148,25 @@
},
]
});
const onSelect = (record)=> {
state.evaluationTypeName = record.title
state.evaluationTypeId = record.quiz_code
};
const onSelectChange = (selectedRowKeys)=> {
// const onSelect = (record)=> {
// state.evaluationTypeName = record.title
// state.evaluationTypeId = record.quiz_code
// };
const onSelectChange = (selectedRowKeys,selectedRows)=> {
if(state.selectedRowKeys.length>1){
return
}
state.selectedRowKeys = selectedRowKeys
state.evaluationTypeName = selectedRows[0].record.title
state.evaluationTypeId = selectedRows[0].quiz_code
}
const closeDrawer = () => {
ctx.emit("update:EvalListVisible", false);
};
const afterVisibleChange = () => {
const afterVisibleChange = (bol) => {
if ( bol == true ) {
getAllEvalText();
}
};
const checkFinish =() =>{
let EvListDate = {
@@ -204,15 +211,24 @@
.catch(()=>{
})
}
//重置测评列表
const resetData = ()=> {
state.currentPage = 1;
state.tableData = [];
state.selectedRowKeys = [];
state.evaluationTypeId = null;
state.evaluationTypeName = "";
getAllEvalText();
}
return {
...toRefs(state),
afterVisibleChange,
closeDrawer,
onSelectChange,
onSelect,
getTableDataList,
checkFinish,
changePagination,
resetData,
};
},
};

View File

@@ -98,7 +98,6 @@
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
onSelect: onSelect,
}"
/>
<div class="pa">
@@ -194,12 +193,20 @@ export default {
selectedRowKeys: [],
tabledata: [
{
key:1,
workNum:1,
status:"已完成",
operation:"",
},
{
workNum:1,
key:2,
workNum:2,
status:"未完成",
operation:"",
},
{
key:3,
workNum:2,
status:"未完成",
operation:"",
}
@@ -341,18 +348,21 @@ export default {
const closeDrawer = () => {
ctx.emit("update:Fvisible", false);
};
const afterVisibleChange = () => {
const afterVisibleChange = (bol) => {
if ( bol == true ) {
getManageList()
}
};
const selectProjectName = (value) => {
state.projectName = value;
};
const onSelectChange = (selectedRowKeys) => {
if(selectedRowKeys.length > 2){
return
}
state.selectedRowKeys = selectedRowKeys;
};
const onSelect = (record) => {
console.log(record);
}
const allStuOver = ()=> {
state.ASOvervisible = true
@@ -457,7 +467,6 @@ export default {
closeDrawer,
afterVisibleChange,
onSelectChange,
onSelect,
allStuOver,
showEntryScore,
godie,
@@ -672,7 +681,6 @@ export default {
.tableBox {
.ant-table-selection-column {
padding: 0px !important;
// padding-left: 45px !important;
}
.ant-pagination-item,
.ant-pagination-prev,

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

@@ -126,8 +126,10 @@
ctx.emit("update:STvisible", false);
};
const afterVisibleChange = () => {
const afterVisibleChange = (bol) => {
if (bol == true) {
getManageList()
}
};
const tableDataFunc = ()=> {
@@ -186,6 +188,9 @@
state.SelectTestData = record
};
const onSelectChange = (selectedRowKeys) => {
if(selectedRowKeys.length>1){
return
}
state.selectedRowKeys = selectedRowKeys;
}
@@ -232,7 +237,7 @@
});
};
//搜索任务列表
//搜索任务列表 没接口
const searchTaskList = () => {
let objser = {
name: "",
@@ -264,9 +269,12 @@
//重置任务列表
const resetTaskList = () => {
state.name = "";
state.projectName = "";
state.tabledata = [];
state.inputPname = "";
state.inputCname = "";
state.tableData = [];
state.selectedRowKeys = [];
state.SelectTestData = [];
state.currentPage = 1;
getManageList();
};
return {
@@ -398,6 +406,12 @@
}
}
.tab {
.ant-table-selection-column {
.ant-table-selection{
display: none;
}
}
th.h {
background-color: #eff4fc !important;
}

View File

@@ -394,8 +394,11 @@ export default {
const closeDrawer = () => {
ctx.emit("update:TMvisible", false);
};
const afterVisibleChange = () => {
const afterVisibleChange = (bol) => {
if ( bol == true ) {
getManageList();
}
};
const selectProjectName = (value, index) => {
console.log("value", value, index);

View File

@@ -345,8 +345,10 @@ export default {
const closeDrawer = () => {
ctx.emit("update:Tvisible", false);
};
const afterVisibleChange = () => {
const afterVisibleChange = (bol) => {
if ( bol == true ) {
getManageList();
}
};
const selectProjectName = (value) => {
state.projectName = value;

View File

@@ -299,8 +299,10 @@ export default {
const closeDrawer = () => {
ctx.emit("update:Wvisible", false);
};
const afterVisibleChange = () => {
const afterVisibleChange = (bol) => {
if ( bol == true ) {
getManageList();
}
};
const selectProjectName = (value) => {
state.projectName = value;

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

@@ -5,12 +5,11 @@
<img class="img" src="../../assets/images/projectadd/picture.png" />
</div>
<div class="imgfor">
<div class="forz">{{ projectInfo.name || "-" }}</div>
<div class="forz">{{projectInfo.name || '-'}}</div>
<div class="fort">
<div class="fort1">项目经理{{ projectInfo.manager || "-" }}</div>
<div class="fort1">项目经理{{projectInfo.manager || '-'}}</div>
<div class="fort2">
起止时间{{ projectInfo.beginTime || "-" }}
{{ projectInfo.endTime || "-" }}
起止时间{{projectInfo.beginTime || '-'}} {{projectInfo.endTime || '-'}}
</div>
</div>
</div>
@@ -34,7 +33,7 @@
</div>
</div>
<div class="line"></div>
<router-link to="/templatelibrary"
<router-link to="/manage/templatelibrary"
><div style="display: flex">
<img class="img2" src="../../assets/images/leveladd/back.png" />
<div class="return">返回</div>
@@ -56,7 +55,7 @@
<div class="onerow">
<div class="taskmain">任务大纲</div>
<button class="btn" @click="showFaceIn">批量面授报名</button>
<router-link to="/taskadd" class="edit">
<router-link to="/temTask" class="edit">
<img
class="editimg"
src="../../assets/images/projectadd/edit.png"
@@ -300,7 +299,7 @@
<div class="ntcc_tit">公告内容</div>
<div class="textarea">
<a-textarea
v-model:value="value2"
v-model:value="projectInfo.notice"
placeholder="公告信息最多输入150个字。"
:maxlength="textnum"
allow-clear
@@ -339,6 +338,7 @@
</div>
</div>
</div>
<div v-if="edit" class="pjcb_content">
<div class="content content1">
<span>当前设计下学员可以获得 </span
@@ -385,98 +385,67 @@
<div class="split"></div>
<a-tabs>
<a-tab-pane key="1" tab="编辑">
<div class="setting">
<div class="set_tit">
<div class="content7">
<!-- <div class="set_tit">
<span>基本信息</span>
<span class="editBtn" @click="toEdit">编辑</span>
</div>
<hr color="#E8E8E8" />
</div> -->
<!-- <div class="line"></div> -->
<div class="set_body">
<!-- <div class="edit" @click="showEditProj">
<div class="img"></div>
<div class="ed">编辑</div>
</div> -->
<div class="edit" @click="toEdit">
<div class="img"></div>
<div class="ed">编辑</div>
</div>
<div class="set_content">
<div class="setc_name"><span>模板名称</span></div>
<div class="setc_name"><span>项目名称</span></div>
<div class="setc_main">
<a-input
v-model:value="formData.name"
:bordered="isEdit"
:disabled="!isEdit"
style="width: 300px"
></a-input>
<span style="color: #999999">{{ projectInfo.name }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>封面图</span></div>
<div class="setc_main">
<a-upload
v-model:file-list="fileList"
name="file"
action="/api/file/upload"
@change="handleChange"
:disabled="!isEdit"
>
<img
src="@/assets/images/projectadd/picture.png"
style="width: 151px; height: 84px"
:src="picUrl"
alt=""
/>
</a-upload>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>模板时间</span></div>
<div class="setc_name"><span>项目时间</span></div>
<div class="setc_main">
<a-range-picker
v-model:value="formData.time"
:bordered="isEdit"
:disabled="!isEdit"
/>
<span style="color: #999999"
>{{ projectInfo.beginTime }} {{ projectInfo.endTime }}</span
>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>项目经理</span></div>
<div class="setc_main">
<a-select
v-model:value="formData.manager"
mode="multiple"
placeholder="请选择项目经理"
:size="large"
:bordered="isEdit"
:disabled="!isEdit"
style="width: 200px; color: #999999"
:options="managerOptions"
></a-select>
<span style="color: #999999">{{ projectInfo.manager }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>资源归属</span></div>
<div class="setc_main">
<a-select
v-model:value="formData.sourceBelongId"
placeholder="请选择资源归属"
:size="large"
:bordered="isEdit"
:disabled="!isEdit"
style="width: 200px; color: #999999"
:options="sourceBelongOptions"
></a-select>
<span style="color: #999999">{{ projectInfo.sourceBelong }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>模板说明</span></div>
<div class="setc_name"><span>项目说明</span></div>
<div class="setc_main">
<a-input
v-model:value="formData.remark"
style="width: 300px"
:bordered="isEdit"
:disabled="!isEdit"
></a-input>
<span style="color: #999999">{{ projectInfo.remark }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>同步学习记录</span></div>
<div class="setc_main" @click="changecheck2">
<a-radio
v-model:checked="formData.courseSyncFlag"
:bordered="isEdit"
:disabled="!isEdit"
<div class="setc_main">
<a-radio v-model:checked="projectInfo.courseSyncFlag"
><span style="color: #333333"
>同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程</span
></a-radio
@@ -486,54 +455,23 @@
<div class="set_content">
<div class="setc_name"><span>项目级别</span></div>
<div class="setc_main">
<a-select
v-model:value="formData.level"
placeholder="请选择项目级别"
:size="large"
:bordered="isEdit"
:disabled="!isEdit"
style="width: 200px; color: #999999"
:options="levelOptions"
></a-select>
<span style="color: #999999">{{ projectInfo.level }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>培训分类</span></div>
<div class="setc_name"><span>培训体系</span></div>
<div class="setc_main">
<a-select
v-model:value="formData.systemId"
placeholder="请选择培训分类"
:size="large"
:bordered="isEdit"
:disabled="!isEdit"
style="width: 200px; color: #999999"
:options="systemOptions"
></a-select>
<span style="color: #999999">{{ projectInfo.systemId }}</span>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>是否BOEU实施</span></div>
<div class="setc_main" @click="changecheck3">
<a-radio
v-model:checked="formData.boeFlag"
:bordered="isEdit"
:disabled="!isEdit"
<div class="setc_main">
<a-radio v-model:checked="projectInfo.boeFlag"
><span style="color: #333333">BOEU实施</span></a-radio
>
</div>
</div>
<div v-if="isEdit" style="transform: translateX(50%)">
<a-button
@click="cancelEdit"
style="background-color: #f9f9f9"
>取消</a-button
>
<a-button
@click="confirmEdit"
style="background-color: #f5faff"
>保存</a-button
>
</div>
</div>
</div>
</a-tab-pane>
@@ -549,48 +487,29 @@
<a-switch v-model:checked="docChecked" ></a-switch>
</div>
</div>
<div class="btnbox" style="margin: 20px">
<div class="btnbox" style="margin:20px;">
<a-upload
v-model:file-list="fileList"
name="file"
action="/api/file/upload"
@change="handleChange"
>
<span
class="xkbtn"
style="cursor: pointer; font-size: 17px"
>上传</span
>
<img
src="@/assets/images/basicinfo/cloud.png"
style="cursor: pointer; width: 34px; height: 34px"
alt=""
/>
<span class="xkbtn" style="cursor: pointer; font-size: 17px" >上传</span>
<img src="@/assets/images/basicinfo/cloud.png" style="cursor: pointer;
width:34px;height:34px;
" alt="">
</a-upload>
<div class="btnbox" style="margin: 20px">
<div class="btnbox" style="margin:20px;">
<span style="color: #999999">
支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip
</span>
</div>
<div
v-for="item in docList"
:key="item.src"
class="docListStyle"
>
<img
src="@/assets/images/basicinfo/download.png"
style="
cursor: pointer;
width: 40px;
height: 40px;
margin-right: 40px;
"
alt=""
/>
<span style="font: oblique 16px Sans-serif">{{
item.name
}}</span>
<span style="color: #4ea6ff; float: right">删除</span>
<div v-for="item in docList" :key="item.src" class="docListStyle">
<img src="@/assets/images/basicinfo/download.png" style="cursor: pointer;
width:40px;height:40px;margin-right:40px;
" alt="">
<span style="font: oblique 16px Sans-serif">{{item.name}}</span>
<span style="color: #4ea6ff;float:right;">删除</span>
</div>
</div>
</div>
@@ -640,10 +559,11 @@
</div>
</div>
</template>
<script>
import { ref, reactive, defineComponent, toRefs, onMounted} from "vue";
import { message } from "ant-design-vue";
import * as api from "@/api/indexTemplate";
import * as api from "@/api/indexTemplate"
import { useRouter } from "vue-router";
export default defineComponent({
name: "LibraryAdd",
@@ -728,47 +648,6 @@ export default defineComponent({
},
],
},
{
text: "阶段2腾飞班阶段2",
children: [
{
course: "讨论",
name: "时间管理",
classify: "选修",
beginTime: "2022-09-16 14:03",
total: 50, //总人数
complete: 20, //完成人数
percent: 40,
},
{
course: "测评",
name: "管理直播间",
classify: "必修",
beginTime: "2022-09-16 14:03",
total: 50, //总人数
complete: 10, //完成人数
percent: 20,
},
{
course: "评估",
name: "管理直播间",
classify: "必修",
beginTime: "2022-09-16 14:03",
total: 50, //总人数
complete: 10, //完成人数
percent: 20,
},
{
course: "投票",
name: "管理直播间",
classify: "必修",
beginTime: "2022-09-16 14:03",
total: 50, //总人数
complete: 10, //完成人数
percent: 20,
},
],
},
],
// 模板编辑列表
managerOptions:[
@@ -813,40 +692,35 @@ export default defineComponent({
// 共享文档列表
docList:[
{
name: "测试文档1.doc",
name:'测试文档1.doc',
src:"",
},
{
name: "测试文档2.doc",
name:'测试文档2.doc',
src:"",
},
{
name: "测试文档3.doc",
name:'测试文档3.doc',
src:"",
},
}
],
isEdit:false, // 是否处于编辑状态
// 基本信息
formData: {
name: "123",
time: "",
manager: "建国",
projectInfo:{
beginTime:null,
endTime:null,
name: null,
manager: null,
notice: null,
sourceBelongId: null,
remark: "",
courseSyncFlag: false,
level: null,
systemId: null,
boeFlag: false,
},
isEdit: false, // 是否处于编辑状态
projectInfo: {
beginTime: null,
endTime: null,
name: null,
manager: null,
},
}
});
const value = ref("");
const value2 = ref("");
const textnum = "150";
const routered = useRouter();
const changeopclo = () => {
@@ -864,131 +738,114 @@ export default defineComponent({
};
const confirmEdit = () => {
state.isEdit = false;
editTemplate();
getDetail();
};
onMounted(() => {
getDetail();
});
const checkType = (type) => {
let typeRules = [
"",
"在线",
"面授",
"案例",
"作业",
"考试",
"直播",
"外链",
"讨论",
"活动",
"测评",
"评估",
"投票",
];
return typeRules[type];
};
onMounted(() => {getDetail()});
// 获取详情
const getDetail = () => {
api
.templateDetail(1)
.then((res) => {
api.templateDetail(1).then(res => {
state.taskSyllabus = []
console.log(res);
state.formData.name = res.data.data.projectInfo.name;
state.formData.time =
res.data.data.projectInfo.startTime +
res.data.data.projectInfo.endTime;
state.formData.manager = res.data.data.projectInfo.manager;
state.formData.sourceBelongId =
res.data.data.projectInfo.sourceBelongId;
state.formData.remark = res.data.data.stageList.remark;
state.formData.courseSyncFlag =
res.data.data.projectInfo.courseSyncFlag;
state.formData.level = res.data.data.projectInfo.level;
state.formData.systemId = res.data.data.projectInfo.systemId;
state.formData.boeFlag = res.data.data.projectInfo.boeFlag;
state.value2 = res.data.data.projectInfo.notice;
state.projectInfo.name = res.data.data.projectTemplateInfo.name
state.projectInfo.beginTime = res.data.data.projectTemplateInfo.createTime
state.projectInfo.manager = res.data.data.projectTemplateInfo.manager
state.projectInfo.notice = res.data.data.projectTemplateInfo.notice
state.projectInfo.sourceBelongId = res.data.data.projectTemplateInfo.sourceBelongId
state.projectInfo.remark = res.data.data.stageList.remark
state.projectInfo.courseSyncFlag = res.data.data.projectTemplateInfo.courseSyncFlag
state.projectInfo.level = res.data.data.projectTemplateInfo.level
state.projectInfo.systemId = res.data.data.projectTemplateInfo.systemId
state.projectInfo.boeFlag = res.data.data.projectTemplateInfo.boeFlag
state.projectInfo.picUrl = res.data.data.projectTemplateInfo.picUrl
let data = res.data.data.stageList;
for(let i in data) {
state.taskSyllabus.push({text: data[i].name,children:[]});
for(let j in data[i].taskList) {
state.taskSyllabus[i].children.push({
course: checkType(data[i].taskList[j].type),
name: data[i].taskList[j].name,
classify: data[i].taskList[j].flag,
beginTime: "",
total: 0, //总人数
complete: 0, //完成人数
percent: 0,
})
.catch((err) => {
message.error("操作失败" + err);
console.log(err);
});
};
// 编辑项目模板
const editTemplate = () => {
let obj = {
beginTime: state.formData.time,
boeFlag: state.formData.boeFlag,
category: 0,
courseSyncFlag: state.formData.courseSyncFlag,
endTime: state.formData.time,
level: state.formData.level,
manager: state.formData.manager,
managerId: "",
name: state.formData.name,
notice: "",
noticeFlag: 0,
picUrl: "",
projectTemplateId: 0,
remark: state.formData.remark,
sourceBelongId: state.formData.sourceBelongId,
status: 0,
systemId: state.formData.systemId,
};
api
.templateEdit(obj)
.methods(obj)
.then((res) => {
message.success("编辑成功");
console.log(res);
}
}
}).catch(err => {
message.error("操作失败"+err)
console.log(err)
})
.catch((err) => {
message.error("编辑失败" + err);
console.log(err);
});
};
}
// 发布公告
const addNotice = () => {
let obj = {
beginTime: 0,
boeFlag: 0,
category: 0,
courseSyncFlag: 0,
endTime: 0,
level: 0,
manager: "",
managerId: "",
name: "",
notice: state.value2,
noticeFlag: 0,
picUrl: "",
projectTemplateId: 0,
remark: "",
sourceBelongId: 0,
status: 0,
systemId: 0,
"beginTime": 0,
"boeFlag": 0,
"category": 0,
"courseSyncFlag": 0,
"endTime": 0,
"level": 0,
"manager": "",
"managerId": "",
"name": "",
"notice": state.projectInfo.notice,
"noticeFlag": 0,
"picUrl": "",
"projectTemplateId": 0,
"remark": "",
"sourceBelongId": 0,
"status": 0,
"systemId": 0
};
api
.templateEdit(obj)
.methods(obj)
.then((res) => {
message.success("公告发布成功");
console.log(res);
api.templateEdit(obj).methods(obj).then(res => {
message.success("公告发布成功")
console.log(res)
}).catch(err => {
message.error("公告发布失败"+err)
console.log(err)
})
.catch((err) => {
message.error("公告发布失败" + err);
console.log(err);
});
};
}
// 删除阶段
const stateDel = (id) => {
api
.deleteStage(id)
.then((res) => {
message.success("删除阶段成功");
console.log(res);
api.deleteStage(id).then(res => {
message.success("删除阶段成功")
console.log(res)
}).catch(err => {
message.error("删除阶段失败"+err)
console.log(err)
})
.catch((err) => {
message.error("删除阶段失败" + err);
console.log(err);
});
};
}
// 删除任务
const taskDel = (id) => {
api
.deleteTask(id)
.then((res) => {
message.success("删除任务成功");
console.log(res);
api.deleteTask(id).then(res => {
message.success("删除任务成功")
console.log(res)
}).catch(err => {
message.error("删除任务失败"+err)
console.log(err)
})
.catch((err) => {
message.error("删除任务失败" + err);
console.log(err);
});
};
}
const toEdit = () => {
routered.push({
path: "/templateAdd",
@@ -997,53 +854,47 @@ export default defineComponent({
name: state.name,
},
});
};
}
// 新建或编辑阶段
const stateEdit = () => {
let obj={
name: "",
projectTemplateId: 0,
remark: "",
stageId: 0,
};
api
.editStagek(obj)
.then((res) => {
message.success("编辑阶段成功");
console.log(res);
"name": "",
"projectTemplateId": 0,
"remark": "",
"stageId": 0
}
api.editStagek(obj).then(res => {
message.success("编辑阶段成功")
console.log(res)
}).catch(err => {
message.error("编辑阶段失败"+err)
console.log(err)
})
.catch((err) => {
message.error("编辑阶段失败" + err);
console.log(err);
});
};
}
//新建或编辑阶段任务
const taskEdit = () => {
let obj = {
courseId: 0,
duration: 0,
flag: true,
name: "",
projectTaskId: 0,
projectTemplateId: 0,
stageId: 0,
type: 0,
};
api
.editTask(obj)
.then((res) => {
message.success("编辑任务成功");
console.log(res);
"courseId": 0,
"duration": 0,
"flag": true,
"name": "",
"projectTaskId": 0,
"projectTemplateId": 0,
"stageId": 0,
"type": 0
}
api.editTask(obj).then(res => {
message.success("编辑任务成功")
console.log(res)
}).catch(err => {
message.error("编辑任务失败"+err)
console.log(err)
})
.catch((err) => {
message.error("编辑任务失败" + err);
console.log(err);
});
};
}
return {
...toRefs(state),
value,
value2,
textnum,
changeopclo,
changecheck2,
@@ -1067,6 +918,73 @@ export default defineComponent({
});
</script>
<style lang="scss">
.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;
}
}
}
}
.editBtn {
float:right;
margin-right: 150px;
@@ -1079,6 +997,7 @@ export default defineComponent({
display: block;
clear: both;
}
.addwrapper {
width: 100%;
height: 100%;
@@ -1239,6 +1158,7 @@ export default defineComponent({
margin-left: 30px;
margin-top: 10px;
}
.split {
width: 100%;
height: 20px;
@@ -1307,11 +1227,13 @@ export default defineComponent({
.taskSyllabus {
// flex: 1;
overflow-x: auto;
.ant-collapse {
border: 0px;
background-color: rgba(255, 255, 255, 0);
min-width: 1040px;
}
.ant-collapse-content > .ant-collapse-content-box {
padding-top: 0px;
padding-bottom: 0px;
@@ -1343,11 +1265,13 @@ export default defineComponent({
//width: 100%;
flex-shrink: 0;
margin-right: 24px;
display: flex;
flex-wrap: wrap;
align-items: center;
padding: 25px 0px;
margin-left: 22px;
//margin: 0 12px;
border: 1px solid #f2f6fc;
border-top: 0px;
@@ -1359,6 +1283,7 @@ export default defineComponent({
//height: 71px;
margin-left: 12px;
margin-right: 50px;
.iconame {
//position: absolute;
color: #4f5156;
@@ -1470,13 +1395,16 @@ export default defineComponent({
}
}
}
.notice {
.ntc_tit {
padding-top:22px;
margin-left: 34px;
font-size: 18px;
font-weight: 500;
color: #232425;
}
.ntc_body {
margin-left: 34px;
@@ -1498,6 +1426,7 @@ export default defineComponent({
.btnarea {
display: flex;
justify-content: flex-end;
}
.area_btn {
width: 100px;
@@ -1530,6 +1459,7 @@ export default defineComponent({
}
}
}
.projectscore {
padding-top:22px;
.pjc_tit {
@@ -1541,6 +1471,7 @@ export default defineComponent({
.pjc_body {
margin-left: 34px;
margin-right: 34px;
.groupright {
display: flex;
justify-content: space-between;
@@ -1607,6 +1538,7 @@ export default defineComponent({
}
}
}
.setting {
padding-top:22px;
.set_tit {

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
@@ -3382,33 +3382,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,
@@ -3433,10 +3423,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} 文件上传失败.`);
}
};

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@
<div
@click="backPage"
style="cursor: pointer"
to="/libraryAdd"
to="/manage/libraryAdd"
class="goback"
>
<span class="return"></span><span class="returntext">返回</span>
@@ -24,11 +24,10 @@
</div>
<div class="in">
<a-input
v-model:value="projectName"
v-model:value="projectInfo.name"
placeholder="请输入模板名称"
show-count
:maxlength="30"
:disabled="viewDetail ? true : false"
/>
</div>
</div>
@@ -47,14 +46,13 @@
return triggerNode.parentNode || document.body;
}
"
v-model:value="classifySelect"
placeholder="四个养成"
v-model:value="projectInfo.category"
placeholder="管理者"
style="width: 100%"
:options="classifyList"
@change="classificationChange"
allowClear
showSearch
:disabled="viewDetail ? true : false"
>
</a-select>
</div>
@@ -88,7 +86,6 @@
action="/api/file/upload"
:before-upload="beforeUpload"
@change="handleChange"
:disabled="viewDetail ? true : false"
>
<img
style="
@@ -126,8 +123,6 @@
:placeholder="[' 开始时间', ' 结束时间']"
v-model:value="rangevalue"
style="width: 100%; height: 40px; border-radius: 5px"
@change="onRangeChange"
:disabled="viewDetail ? true : false"
/>
</div>
</div>
@@ -146,7 +141,7 @@
return triggerNode.parentNode || document.body;
}
"
:value="classifySelect1"
:value="projectInfo.manager"
mode="multiple"
placeholder="请选择项目经理"
style="width: 100%"
@@ -154,7 +149,6 @@
@change="classificationChange1"
allowClear
showSearch
:disabled="viewDetail ? true : false"
>
</a-select>
</div>
@@ -175,11 +169,10 @@
return triggerNode.parentNode || document.body;
}
"
v-model:value="classifySelect2"
placeholder="自动带出 可修改"
v-model:value="projectInfo.sourceBelongId"
placeholder="项目一"
:options="classifyList2"
@change="classificationChange2"
:disabled="viewDetail ? true : false"
/>
</div>
</div>
@@ -189,12 +182,11 @@
</div>
<div class="in">
<a-textarea
v-model:value="remark"
v-model:value="projectInfo.remark"
style="height: 80px"
placeholder="请输入说明"
show-count
:maxlength="200"
:disabled="viewDetail ? true : false"
/>
</div>
</div>
@@ -205,8 +197,7 @@
<div class="in">
<a-radio
@click="changeChecked"
v-model:checked="checked"
:disabled="viewDetail ? true : false"
v-model:checked="projectInfo.courseSyncFlag"
><span
style="
width: 100%;
@@ -233,7 +224,7 @@
return triggerNode.parentNode || document.body;
}
"
v-model:value="classifySelect3"
v-model:value="projectInfo.level"
:options="classifyList3"
@change="classificationChange3"
placeholder="集团级/组织级/现地级/部门级"
@@ -256,7 +247,7 @@
return triggerNode.parentNode || document.body;
}
"
v-model:value="classifySelect4"
v-model:value="projectInfo.systemId"
:options="classifyList4"
@change="classificationChange4"
placeholder="集团级/组织级/现地级/部门级"
@@ -275,7 +266,7 @@
<div class="in">
<a-radio
@click="changeChecked1"
v-model:checked="checked1"
v-model:checked="projectInfo.boeFlag"
:disabled="viewDetail ? true : false"
><span
style="
@@ -308,46 +299,6 @@
</div>
</div> -->
</div>
<!-- 选择模板 ------------------------------ -->
<div class="template" style="display: none">
<div class="name">
<div class="inname" style="width: 50px">模版</div>
<div class="in select" style="margin-left: 2px">
<a-select
v-if="isEdit"
disabled="true"
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="classifySelect5"
placeholder="请选择模版"
:size="size"
style="width: 100%"
:options="classifyList5"
@change="classificationChange5"
>
</a-select>
<a-select
v-else
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="classifySelect5"
placeholder="请选择模版"
:size="size"
style="width: 100%"
:options="classifyList5"
@change="classificationChange5"
@popupScroll="templateScroll"
>
</a-select>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="btn">
@@ -363,10 +314,10 @@
import { reactive, toRefs, ref } from "vue";
import { message } from "ant-design-vue";
import { useRouter, useRoute } from "vue-router";
import dayjs from "dayjs";
import * as api from "../../api/index";
// import dayjs from "dayjs";
import * as api from "../../api/indexTemplate";
import { storage } from "../../api/storage";
import { toDate } from "../../api/method";
// import { toDate } from "../../api/method";
export default {
name: "projectAdd",
@@ -374,126 +325,16 @@ export default {
// 编辑页面跳转过来时候,自动填充表格
const routers = useRoute();
const isEdit = ref(false);
let peojectID = "";
// let peojectID = "";
if (routers.query.projectId) {
storage.set("projectAddId", routers.query.projectId);
isEdit.value = true;
peojectID = routers.query.projectId;
// 需要编辑
api
.getProjectDetail({ projectId: routers.query.projectId })
.then((res) => {
if (res.status == 200 && res.data.code == 200) {
let info = res.data.data.projectInfo;
console.log(info);
// projectName classifySelect imageUrl * classifySelect1 * remark checked classifySelect3 classifySelect4 changeChecked1 *
projectName.value = info.name;
state.classifySelect = classifyList.value[1]; // info.category
imageUrl.value = info.picUrl;
let start = toDate(info.beginTime / 1000, "YYYY/MM/DD");
let end = toDate(info.endTime / 1000, "YYYY/MM/DD");
state.rangevalue = [
dayjs(start, "YYYY/MM/DD"),
dayjs(end, "YYYY/MM/DD"),
];
let manageName = info.manager.split(",");
let manageValue = info.managerId.split(",");
let optionsManage = [];
for (let i = 0; i < manageName.length; i++) {
let obj = {
label: manageName[i],
value: manageValue[i],
};
optionsManage.push(obj);
}
console.log(optionsManage);
state.classifySelect1 = optionsManage;
state.classifySelect2 =
classifyList2.value[info.sourceBelongId - 1];
remark.value = info.remark;
state.checked = info.boeFlag ? info.boeFlag : false;
state.classifySelect3 = classifyList3.value[info.level];
state.classifySelect4 = classifyList4.value[info.systemId - 1];
state.checked1 = info.boeFlag ? info.boeFlag : false;
// fileList1.value = info.attach.split(",");
projectType = 1;
picUrl = info.picUrl;
beginTime = Number(info.beginTime / 1000);
endTime = Number(info.endTime / 1000);
manager = info.manager;
managerId = info.managerId;
sourceBelongIdC = Number(info.sourceBelongId);
courseSyncFlag = info.courseSyncFlag;
levels = info.level;
systemid = info.systemId;
boeFlag = info.boeFlag;
}
})
.catch((err) => {
console.log(err);
});
// peojectID = routers.query.projectId;
} else {
if (storage.get("projectAddId")) {
isEdit.value = true;
peojectID = storage.get("projectAddId");
// 需要编辑
api
.getProjectDetail({ projectId: storage.get("projectAddId") })
.then((res) => {
if (res.status == 200 && res.data.code == 200) {
let info = res.data.data.projectInfo;
console.log("我是从本地存储获取的id", info);
projectName.value = info.name;
state.classifySelect = classifyList.value[1]; // info.category
imageUrl.value = info.picUrl;
let start = toDate(info.beginTime / 1000, "YYYY/MM/DD");
let end = toDate(info.endTime / 1000, "YYYY/MM/DD");
state.rangevalue = [
dayjs(start, "YYYY/MM/DD"),
dayjs(end, "YYYY/MM/DD"),
];
let manageName = info.manager.split(",");
let manageValue = info.managerId.split(",");
let optionsManage = [];
for (let i = 0; i < manageName.length; i++) {
let obj = {
label: manageName[i],
value: manageValue[i],
};
optionsManage.push(obj);
}
console.log(optionsManage);
state.classifySelect1 = optionsManage;
state.classifySelect2 =
classifyList2.value[info.sourceBelongId - 1];
remark.value = info.remark;
state.checked = info.boeFlag ? info.boeFlag : false;
state.classifySelect3 = classifyList3.value[info.level];
state.classifySelect4 = classifyList4.value[info.systemId - 1];
state.checked1 = info.boeFlag ? info.boeFlag : false;
projectType = 1;
picUrl = info.picUrl;
beginTime = Number(info.beginTime / 1000);
endTime = Number(info.endTime / 1000);
manager = info.manager;
managerId = info.managerId;
sourceBelongIdC = Number(info.sourceBelongId);
courseSyncFlag = info.courseSyncFlag;
levels = info.level;
systemid = info.systemId;
boeFlag = info.boeFlag;
}
})
.catch((err) => {
console.log(err);
});
// peojectID = storage.get("projectAddId");
}
}
@@ -501,7 +342,7 @@ export default {
storage.remove("projectAddId");
setTimeout(() => {
router.push({
path: "/libraryAdd",
path: "/manage/libraryAdd",
});
}, 400);
};
@@ -526,6 +367,19 @@ export default {
pageSize: 10, //每页10条数据
totalPages: 0, //总页数
viewDetail: routers.query.viewDetail ? routers.query.viewDetail : null,
projectInfo:{
beginTime:null,
endTime:null,
name: null,
manager: null,
notice: null,
sourceBelongId: null,
remark: "",
courseSyncFlag: false,
level: null,
systemId: null,
boeFlag: false,
}
});
const projectName = ref("");
@@ -536,11 +390,11 @@ export default {
{ value: 3, label: "产业人" },
]);
let projectType = "";
// let projectType = "";
const classificationChange = (value) => {
console.log(`selected ${value}`);
projectType = value;
// projectType = value;
};
function getBase64(img, callback) {
@@ -553,7 +407,7 @@ export default {
const fileList1 = ref([]);
const loading = ref(false);
const imageUrl = ref("");
let picUrl = "";
// let picUrl = "";
const handleChange = (info) => {
if (info.file.status === "uploading") {
@@ -562,7 +416,7 @@ export default {
}
if (info.file.status === "done") {
console.log("上传图片返回的信息 %o", info);
picUrl = info.file.response.data;
// picUrl = info.file.response.data;
// Get this url from response in real world.
getBase64(info.file.originFileObj, (base64Url) => {
imageUrl.value = base64Url;
@@ -577,7 +431,7 @@ export default {
let uplodaFileCount = false;
let attach = "";
// let attach = "";
let attachData = "";
const handleChange1 = (info) => {
if (info.file.status === "uploading") {
@@ -602,7 +456,7 @@ export default {
}
}
console.log(attachStr);
attach = attachStr;
// attach = attachStr;
if (info.fileList.length > 5) {
uplodaFileCount = true;
@@ -639,8 +493,6 @@ export default {
});
};
let beginTime = "";
let endTime = "";
const dateFormatList = ["YYYY/MM/DD"];
const onRangeChange = (value, dateString) => {
@@ -651,8 +503,8 @@ export default {
"Formatted Selected TimeStamp",
new Date(dateString[0]).getTime()
);
beginTime = new Date(dateString[0]).getTime() / 1000;
endTime = new Date(dateString[1]).getTime() / 1000;
// beginTime = new Date(dateString[0]).getTime() / 1000;
// endTime = new Date(dateString[1]).getTime() / 1000;
};
// 项目经理 后续接口调用
@@ -662,8 +514,6 @@ export default {
{ value: 3, label: "刘孟君" },
]);
let manager = "";
let managerId = "";
const classificationChange1 = (key, options) => {
console.log(`selected ${key}`, options);
let mstr = "";
@@ -686,8 +536,8 @@ export default {
}
}
state.classifySelect1 = newoptions;
manager = mstr;
managerId = midstr;
// manager = mstr;
// managerId = midstr;
};
// 资源归属 sourceBelongId 后续给接口
@@ -697,10 +547,10 @@ export default {
{ value: 3, label: "项目三" },
]);
let sourceBelongIdC = "";
// let sourceBelongIdC = "";
const classificationChange2 = (key) => {
console.log(`selected ${key}`, classifyList2);
sourceBelongIdC = key;
// sourceBelongIdC = key;
};
// 项目级别
@@ -711,10 +561,10 @@ export default {
{ value: 4, label: "部门级" },
]);
let levels = "";
// let levels = "";
const classificationChange3 = (key) => {
console.log(`selected ${key}`, classifyList3);
levels = key;
// levels = key;
};
// 培训体系
@@ -725,112 +575,11 @@ export default {
{ value: 4, label: "部门级" },
]);
let systemid = "";
// let systemid = "";
const classificationChange4 = (key) => {
console.log(`selected ${key}`, classifyList4);
systemid = key;
// systemid = key;
};
// 模版
const classifyList5 = ref([
// { value: 1, label: "模版一" },
// { value: 2, label: "模版二" },
// { value: 3, label: "模版三" },
// { value: 4, label: "模版四" },
]);
const classificationChange5 = (key) => {
console.log(`selected ${key}`, classifyList5.value);
//获取模版信息
let obj = {
projectId: Number(key),
};
api
.getProjectDetail(obj)
.then((res) => {
console.log("获取项目详情", res);
if (res.status === 200) {
let info = res.data.data.projectInfo;
console.log(info);
// projectName classifySelect imageUrl * classifySelect1 * remark checked classifySelect3 classifySelect4 changeChecked1 *
projectName.value = info.name;
state.classifySelect = classifyList.value[1]; // info.category
imageUrl.value = info.picUrl;
let start = toDate(info.beginTime / 1000, "YYYY/MM/DD");
let end = toDate(info.endTime / 1000, "YYYY/MM/DD");
state.rangevalue = [
dayjs(start, "YYYY/MM/DD"),
dayjs(end, "YYYY/MM/DD"),
];
let manageName = info.manager.split(",");
let manageValue = info.managerId.split(",");
let optionsManage = [];
for (let i = 0; i < manageName.length; i++) {
let obj = {
label: manageName[i],
value: manageValue[i],
};
optionsManage.push(obj);
}
console.log(optionsManage);
state.classifySelect1 = optionsManage;
state.classifySelect2 =
classifyList2.value[info.sourceBelongId - 1];
remark.value = info.remark;
state.checked = info.boeFlag ? info.boeFlag : false;
state.classifySelect3 = classifyList3.value[info.level];
state.classifySelect4 = classifyList4.value[info.systemId - 1];
state.checked1 = info.boeFlag ? info.boeFlag : false;
// fileList1.value = info.attach.split(",");
projectType = 1;
picUrl = info.picUrl;
beginTime = Number(info.beginTime / 1000);
endTime = Number(info.endTime / 1000);
manager = info.manager;
managerId = info.managerId;
sourceBelongIdC = Number(info.sourceBelongId);
courseSyncFlag = info.courseSyncFlag;
levels = info.level;
systemid = info.systemId;
boeFlag = info.boeFlag;
}
})
.catch((err) => {
console.log("获取详情失败", err);
});
};
//获取模版列表
const getTemplate = () => {
let obj = {
pageNo: state.currentPage,
pageSize: state.pageSize,
// projectId:id?id:''
};
api
.getProjectList(obj)
.then((res) => {
console.log("获取模版列表", res);
state.totalPages = Number(res.data.data.pages);
if (res.status === 200) {
let arr = res.data.data.rows;
let array = classifyList5.value;
arr.map((value) => {
let obj = {
value: value.projectId,
label: value.name,
};
array.push(obj);
});
classifyList5.value = array;
}
})
.catch((err) => {
console.log("获取模版列表失败", err);
});
};
getTemplate();
//模版滚动加载信息
const templateScroll = (e) => {
// console.log("滚动", e, b);
@@ -845,52 +594,34 @@ export default {
if (state.currentPage < state.totalPages) {
// 如果滑到底部,则加载下一页
state.currentPage++;
getTemplate();
}
}
};
// 项目说明
const remark = ref("");
// const removeFile = (file) => {
// const index = fileList1.value.indexOf(file);
// const newFileList = fileList1.value.slice();
// newFileList.splice(index, 1);
// fileList1.value = newFileList;
let courseSyncFlag = 0;
const changeChecked = () => {
console.log(state.checked);
state.checked ? (state.checked = false) : (state.checked = true);
courseSyncFlag = state.checked ? 1 : 0;
};
let boeFlag = 0;
const changeChecked1 = () => {
console.log(state.checked1);
state.checked1 ? (state.checked1 = false) : (state.checked1 = true);
boeFlag = state.checked1 ? 1 : 0;
};
const removeFile = (file) => {
const index = fileList1.value.indexOf(file);
const newFileList = fileList1.value.slice();
newFileList.splice(index, 1);
fileList1.value = newFileList;
let attachStr = "";
if (newFileList.length == 0) {
attachStr = "";
}
for (let i = 0; i < fileList1["value"].length; i++) {
console.log(fileList1["value"][i].response.data);
if (fileList1["value"].length - 1 == i) {
attachStr += fileList1["value"][i].response.data;
} else {
attachStr += fileList1["value"][i].response.data + ",";
}
}
attach = attachStr;
};
// let attachStr = "";
// if (newFileList.length == 0) {
// attachStr = "";
// }
// for (let i = 0; i < fileList1["value"].length; i++) {
// console.log(fileList1["value"][i].response.data);
// if (fileList1["value"].length - 1 == i) {
// attachStr += fileList1["value"][i].response.data;
// } else {
// attachStr += fileList1["value"][i].response.data + ",";
// }
// }
// attach = attachStr;
// };
const errorMsgs = {
name: "请输入项目名称",
category: "请选择项目分类",
name: "请输入模板名称",
category: "请选择模板分类",
picUrl: "请上传项目封面图",
beginTime: "请选择项目开始时间",
endTime: "请选择项目结束时间",
@@ -903,31 +634,26 @@ export default {
};
const createProject = () => {
console.log("我是否要编辑项目", isEdit.value);
if (isEdit.value) {
console.log("我要编辑项目", peojectID);
console.log("我要编辑项目", isEdit.value);
let obj = {
projectId: Number(peojectID),
name: projectName["value"],
category: projectType,
picUrl: picUrl,
beginTime: beginTime,
endTime: endTime,
manager: manager,
managerId: managerId,
sourceBelongId: sourceBelongIdC,
remark: remark["value"],
courseSyncFlag: courseSyncFlag,
level: levels,
systemId: systemid,
boeFlag: boeFlag,
attach: attach,
type: 3,
templateId: 0,
parentId: 0,
notice: "",
noticeFlag: 0,
status: 0,
"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);
@@ -940,9 +666,26 @@ export default {
return;
}
}
api
.createProject(obj)
.templateEdit({
"beginTime": 0,
"boeFlag": 0,
"category": 0,
"courseSyncFlag": 0,
"endTime": 0,
"level": 0,
"manager": "",
"managerId": "",
"name": "",
"notice": "",
"noticeFlag": 0,
"picUrl": "",
"projectTemplateId": 0,
"remark": "",
"sourceBelongId": 0,
"status": 0,
"systemId": 0
})
.then((res) => {
console.log(res);
if (res.status == 200 && res.data.code == 200) {
@@ -963,64 +706,37 @@ export default {
message.destroy();
message.error("编辑失败,请检查当前网络状态。");
});
} else {
let obj = {
name: projectName["value"],
category: projectType,
picUrl: picUrl,
beginTime: beginTime,
endTime: endTime,
manager: manager,
managerId: managerId,
sourceBelongId: sourceBelongIdC,
remark: remark["value"],
courseSyncFlag: courseSyncFlag,
level: levels,
systemId: systemid,
boeFlag: boeFlag,
attach: attach,
type: 3,
templateId: 10,
parentId: 0,
notice: "",
noticeFlag: 0,
status: 0,
};
console.log("提交的数据格式 %o", obj);
for (let i in errorMsgs) {
console.log(obj[i]);
if (obj[i] === "" || obj[i] === undefined) {
message.destroy();
message.warning(errorMsgs[i]);
return;
}
}
api
.createProject(obj)
.then((res) => {
console.log(res);
if (res.status == 200 && res.data.code == 200) {
message.destroy();
message.success("创建成功");
setTimeout(() => {
router.push({
path: "/taskpage",
query: { id: res.data.data.projectId },
});
}, 1000);
} else {
message.destroy();
message.error("创建失败,请检查当前网络状态。");
}
})
.catch((err) => {
console.log(err);
message.destroy();
message.error("创建失败,请检查当前网络状态。");
});
}
};
// 编辑项目模板
const editTemplate = () => {
let obj = {
"beginTime": state.projectInfo.time,
"boeFlag": state.projectInfo.boeFlag,
"category": 0,
"courseSyncFlag": state.projectInfo.courseSyncFlag,
"endTime": state.projectInfo.time,
"level": state.projectInfo.level,
"manager": state.projectInfo.manager,
"managerId": "",
"name": state.projectInfo.name,
"notice": "",
"noticeFlag": 0,
"picUrl": "",
"projectTemplateId": 0,
"remark": state.projectInfo.remark,
"sourceBelongId": state.projectInfo.sourceBelongId,
"status": 0,
"systemId": state.projectInfo.systemId
};
api.templateEdit(obj).methods(obj).then(res => {
message.success("编辑成功")
console.log(res)
}).catch(err => {
message.error("编辑失败"+err)
console.log(err)
})
}
return {
...toRefs(state),
@@ -1031,7 +747,6 @@ export default {
classificationChange2,
classificationChange3,
classificationChange4,
classificationChange5,
fileList,
fileList1,
loading,
@@ -1045,18 +760,13 @@ export default {
classifyList2,
classifyList3,
classifyList4,
classifyList5,
remark,
changeChecked,
changeChecked1,
uplodaFileCount,
createProject,
removeFile,
// removeFile,
isEdit,
backPage,
dateFormatList,
editTemplate,
templateScroll,
};
},

View File

@@ -8,6 +8,7 @@
*/
const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
publicPath: '/manage',
// transpileDependencies: true,
devServer: {
port: 8080,