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, // 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) 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 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); 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("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive); localStorage.setItem("chapterId", props.isactive);
}; };
const afterVisibleChange = () => { const afterVisibleChange = (bol) => {
getAllCaseText() if ( bol == true ) {
getAllCaseText()
}
}; };
const tableDataFunc = () => { const tableDataFunc = () => {
const columns = [ const columns = [
@@ -182,6 +184,9 @@ export default {
return columns; return columns;
}; };
const onSelectChange = (selectedRowKeys,selectedRows)=> { const onSelectChange = (selectedRowKeys,selectedRows)=> {
if(selectedRowKeys.length>2){
return
}
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
state.apiTaskList = selectedRows; state.apiTaskList = selectedRows;
}; };
@@ -251,18 +256,6 @@ export default {
}); });
} else if (props.isLevel == 2) { } else if (props.isLevel == 2) {
if(state.apiTaskList.length > 1){ 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++){ for(let i = 0;i <= state.apiTaskList.length;i++){
apiTask apiTask
.addTask({ .addTask({
@@ -455,6 +448,9 @@ export default {
.ant-table-selection-column { .ant-table-selection-column {
padding: 0px !important; padding: 0px !important;
padding-left: 15px !important; padding-left: 15px !important;
.ant-table-selection{
display: none;
}
} }
.ant-table-thead > tr > th { .ant-table-thead > tr > th {
background-color: rgba(239, 244, 252, 1); background-color: rgba(239, 244, 252, 1);

View File

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

View File

@@ -78,15 +78,16 @@
<div class="main_item"> <div class="main_item">
<div class="btnbox"> <div class="btnbox">
<a-form-item has-feedback label="选择试卷" name="choosedTest"> <a-form-item has-feedback label="选择试卷" name="choosedTest">
<!-- <a-select <a-button
dropdownClassName="dropdown-style" type="primary"
placeholder="请输入考试名称" style="width: 100px; margin-left: 35px"
:options="options1" class="outer"
v-model:value="formState.choosedTest" @click.prevent
allowClear @click="selectTest()"
showSearch >
/> --> 选择试卷
<a-dropdown> </a-button>
<!-- <a-dropdown>
<a-button <a-button
type="primary" type="primary"
style="width: 100px; margin-left: 35px" style="width: 100px; margin-left: 35px"
@@ -109,16 +110,22 @@
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</template> </template>
</a-dropdown> </a-dropdown> -->
<span style="margin-left: 10px"> <span style="margin-left: 10px">
<a-tag <a-tag
class="tag-style"
v-if="paperName != ''"
:closable="true"
>{{ paperName }}</a-tag
>
<!-- <a-tag
class="tag-style" class="tag-style"
v-for="item in choosedTestList" v-for="item in choosedTestList"
:closable="true" :closable="true"
@close="closeTag(item.key)" @close="closeTag(item.key)"
:key="item.key" :key="item.key"
>{{ item.value }}</a-tag >{{ item.value }}</a-tag
> > -->
</span> </span>
</a-form-item> </a-form-item>
</div> </div>
@@ -709,8 +716,8 @@ export default {
.catch(() => { .catch(() => {
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`); message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
}); });
} else if (props.isLevel == 3) { } else if (props.isLevel == 3) {
console.log(""); console.log("");
} }
}; };

View File

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

View File

@@ -98,7 +98,6 @@
:row-selection="{ :row-selection="{
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: onSelectChange, onChange: onSelectChange,
onSelect: onSelect,
}" }"
/> />
<div class="pa"> <div class="pa">
@@ -194,12 +193,20 @@ export default {
selectedRowKeys: [], selectedRowKeys: [],
tabledata: [ tabledata: [
{ {
key:1,
workNum:1, workNum:1,
status:"已完成", status:"已完成",
operation:"", operation:"",
}, },
{ {
workNum:1, key:2,
workNum:2,
status:"未完成",
operation:"",
},
{
key:3,
workNum:2,
status:"未完成", status:"未完成",
operation:"", operation:"",
} }
@@ -341,18 +348,21 @@ export default {
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:Fvisible", false); ctx.emit("update:Fvisible", false);
}; };
const afterVisibleChange = () => { const afterVisibleChange = (bol) => {
getManageList() if ( bol == true ) {
getManageList()
}
}; };
const selectProjectName = (value) => { const selectProjectName = (value) => {
state.projectName = value; state.projectName = value;
}; };
const onSelectChange = (selectedRowKeys) => { const onSelectChange = (selectedRowKeys) => {
state.selectedRowKeys = selectedRowKeys; if(selectedRowKeys.length > 2){
return
}
state.selectedRowKeys = selectedRowKeys;
}; };
const onSelect = (record) => {
console.log(record);
}
const allStuOver = ()=> { const allStuOver = ()=> {
state.ASOvervisible = true state.ASOvervisible = true
@@ -457,7 +467,6 @@ export default {
closeDrawer, closeDrawer,
afterVisibleChange, afterVisibleChange,
onSelectChange, onSelectChange,
onSelect,
allStuOver, allStuOver,
showEntryScore, showEntryScore,
godie, godie,
@@ -672,7 +681,6 @@ export default {
.tableBox { .tableBox {
.ant-table-selection-column { .ant-table-selection-column {
padding: 0px !important; padding: 0px !important;
// padding-left: 45px !important;
} }
.ant-pagination-item, .ant-pagination-item,
.ant-pagination-prev, .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); ctx.emit("update:STvisible", false);
}; };
const afterVisibleChange = () => { const afterVisibleChange = (bol) => {
if (bol == true) {
getManageList() getManageList()
}
}; };
const tableDataFunc = ()=> { const tableDataFunc = ()=> {
@@ -186,6 +188,9 @@
state.SelectTestData = record state.SelectTestData = record
}; };
const onSelectChange = (selectedRowKeys) => { const onSelectChange = (selectedRowKeys) => {
if(selectedRowKeys.length>1){
return
}
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
} }
@@ -232,7 +237,7 @@
}); });
}; };
//搜索任务列表 //搜索任务列表 没接口
const searchTaskList = () => { const searchTaskList = () => {
let objser = { let objser = {
name: "", name: "",
@@ -264,9 +269,12 @@
//重置任务列表 //重置任务列表
const resetTaskList = () => { const resetTaskList = () => {
state.name = ""; state.inputPname = "";
state.projectName = ""; state.inputCname = "";
state.tabledata = []; state.tableData = [];
state.selectedRowKeys = [];
state.SelectTestData = [];
state.currentPage = 1;
getManageList(); getManageList();
}; };
return { return {
@@ -398,6 +406,12 @@
} }
} }
.tab { .tab {
.ant-table-selection-column {
.ant-table-selection{
display: none;
}
}
th.h { th.h {
background-color: #eff4fc !important; background-color: #eff4fc !important;
} }

View File

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

View File

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

View File

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

View File

@@ -16,7 +16,7 @@
<div class="inpbox1"> <div class="inpbox1">
<a-select <a-select
v-model:value="valueproj" v-model:value="valueproj"
placeholder="请输入内容分类" placeholder="请选择内容分类"
@change="handleChangeproj" @change="handleChangeproj"
:options="optionsproj" :options="optionsproj"
/> />
@@ -48,11 +48,11 @@
</div> </div>
</div> </div>
<div class="tmplh_btn"> <div class="tmplh_btn">
<div class="btn btn1"> <div class="btn btn1" @click="search">
<div class="search"></div> <div class="search"></div>
<div class="btnText btnText1">搜索</div> <div class="btnText btnText1">搜索</div>
</div> </div>
<div class="btn btn2"> <div class="btn btn2" @click="reset">
<div class="search"></div> <div class="search"></div>
<div class="btnText btnText2">重置</div> <div class="btnText btnText2">重置</div>
</div> </div>
@@ -66,16 +66,31 @@
:loading="tableDataTotal === -1 ? true : false" :loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true" expandRowByClick="true"
@expand="expandTable" @expand="expandTable"
:scroll="{ x: 1300 }"
:pagination="false" :pagination="false"
/> />
</div> </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> </div>
</div> </div>
</template> </template>
<script> <script>
import { reactive, toRefs } from "vue"; import { reactive, toRefs, onMounted } from "vue";
import { courseListView } from "../../api/indexAudit";
export default { export default {
name: "CoursereViewed", name: "CoursereViewed",
@@ -83,18 +98,20 @@ export default {
const state = reactive({ const state = reactive({
optionsproj: [ optionsproj: [
{ {
value: "jack", value: "0",
label: "Jack", label: "Jack",
}, },
{ {
value: "rose", value: "1",
label: "rose", label: "rose",
}, },
], ],
valueproj: null, valueproj: null,
valuecreater: null, valuecreater: null,
valuename: null, valuename: null,
currentPage: 1,
total: null,
pageSize: 10,
columns1: [ columns1: [
{ {
title: "序号", title: "序号",
@@ -155,21 +172,92 @@ export default {
}, },
], ],
tableData1: [ tableData1: [
{ // {
number: "1", // number: "1",
name: "课程1", // name: "课程1",
type: "在线", // type: "在线",
content: "领导力/领导业务", // content: "领导力/领导业务",
status: "通过", // status: "通过",
creater: "-", // creater: "-",
time: "-", // time: "-",
msg: "-", // 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 { return {
...toRefs(state), ...toRefs(state),
getList,
setTableData,
search,
handleChangeproj,
reset,
changePagination,
}; };
}, },
}; };
@@ -191,11 +279,13 @@ export default {
.inpbox { .inpbox {
display: flex; display: flex;
margin-top: 32px; margin-top: 32px;
flex-wrap: wrap;
.inpbox1 { .inpbox1 {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-right: 24px; margin-right: 24px;
margin-top: 10px;
.ant-select-selector { .ant-select-selector {
border-radius: 8px; border-radius: 8px;
width: 270px; width: 270px;
@@ -210,8 +300,8 @@ export default {
} }
.tmplh_btn { .tmplh_btn {
display: flex; display: flex;
margin-left: 38px; // margin-left: 38px;
margin-top: 32px; margin-top: 42px;
.btn { .btn {
padding: 0px 26px 0px 26px; padding: 0px 26px 0px 26px;
height: 38px; height: 38px;
@@ -219,7 +309,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-left: 14px; margin-right: 14px;
cursor: pointer; cursor: pointer;
flex-shrink: 0; flex-shrink: 0;
.search { .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 * @FilePath: /fe-manage/src/views/examine/CourseReviewedN.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<!-- 待审核课程页面 --> <!-- 待审核课程页面 coursereviewedn-->
<template> <template>
<div class="coursereviewedn"> <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> </div>
</template> </template>
<script> <script>
import { reactive, toRefs, } from "vue"; import { reactive, toRefs, onMounted } from "vue";
import { list } from "../../api/indexAudit";
import { toDate } from "../../api/method";
export default { export default {
name: "CoursereViewedN", name: "CoursereViewedN",
setup() { setup() {
const state = reactive({ 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 { return {
...toRefs(state), ...toRefs(state),
getFaceList,
setFaceData,
search,
reset,
changePagination,
}; };
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.coursereviewedn { .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> </style>

View File

@@ -6,26 +6,471 @@
* @FilePath: /fe-manage/src/views/examine/ProjectReviewed.vue * @FilePath: /fe-manage/src/views/examine/ProjectReviewed.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<!-- 已审核项目页面 --> <!-- 已审核项目页面 projectviewed-->
<template> <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> </template>
<script> <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 { export default {
name: "ProjectViewed", name: "ProjectViewed",
setup() { 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 { return {
...toRefs(state), ...toRefs(state),
getProjList,
setTableData,
getName,
getBelong,
changePagination,
search,
reset,
}; };
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.projectviewed { .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> </style>

View File

@@ -6,26 +6,473 @@
* @FilePath: /fe-manage/src/views/examine/ProjectReviewedN.vue * @FilePath: /fe-manage/src/views/examine/ProjectReviewedN.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<!-- 待审核项目页面 --> <!-- 待审核项目页面 projectviewedn-->
<template> <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> </template>
<script> <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 { export default {
name: "ProjectViewedN", name: "ProjectViewedN",
components: { ProjectAudit },
setup() { 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 { return {
...toRefs(state), ...toRefs(state),
showProjAudit,
getProjList,
setProjList,
getName,
getBelong,
changePagination,
reset,
search,
}; };
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.projectviewedn { .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> </style>

File diff suppressed because it is too large Load Diff

View File

@@ -1025,7 +1025,7 @@
<a-upload <a-upload
v-model:file-list="fileList" v-model:file-list="fileList"
name="file" name="file"
action="/api/file/upload" action="/manageApi/file/upload"
@change="handleChange" @change="handleChange"
> >
<span <span
@@ -3382,33 +3382,23 @@ export default {
}; };
//end---------项目概览 //end---------项目概览
const handleChange = (info) => { const handleChange = ({ file, fileList }) => {
let list = []; let list = [];
if (info.file.status !== "uploading") { if (file.status !== "uploading") {
console.log(info.file.response.data, info.fileList); console.log("上传的list", fileList);
// info.fileList.map((item) => { console.log(file);
// //把地址放到list里
// // list.push(item.response.data);
// // list.push(JSON.stringify(item))
// state.fileList.push(item)
// });
state.fileList.push(info.file);
list = state.fileList; list = state.fileList;
console.log("list", list); console.log("list", list);
// let str = list.join(",");
let str = JSON.stringify(list); let str = JSON.stringify(list);
console.log("str", str); console.log("str", str);
//要编辑项目 //要编辑项目
editProj({ editProj({
attach: str, attach: str,
beginTime: state.tstartTime.slice(0, 10), beginTime: state.tstartTime.slice(0, 10),
// beginTime:1668643200,
boeFlag: state.boeFlag, boeFlag: state.boeFlag,
category: state.category, category: state.category,
courseSyncFlag: state.courseSyncFlag, courseSyncFlag: state.courseSyncFlag,
endTime: state.tendTime.slice(0, 10), endTime: state.tendTime.slice(0, 10),
// endTime: 1668816000,
level: state.tlevel, level: state.tlevel,
manager: state.manager, manager: state.manager,
managerId: state.managerId, managerId: state.managerId,
@@ -3433,10 +3423,10 @@ export default {
}); });
} }
if (info.file.status === "done") { if (file.status === "done") {
message.success(`${info.file.name} 文件上传成功`); message.success(`${file.name} 文件上传成功`);
} else if (info.file.status === "error") { } else if (file.status === "error") {
message.error(`${info.file.name} 文件上传失败.`); message.error(`${file.name} 文件上传失败.`);
} }
}; };

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -8,20 +8,21 @@
*/ */
const { defineConfig } = require("@vue/cli-service"); const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({ module.exports = defineConfig({
// transpileDependencies: true, publicPath: '/manage',
devServer: { // transpileDependencies: true,
port: 8080, devServer: {
proxy: { port: 8080,
"/manageApi": { proxy: {
// target:"http://192.168.100.208:30001", "/manageApi": {
target: "http://111.231.196.214:30001/", //这里后台的地址模拟的;应该填写你们真实的后台接口 // target:"http://192.168.100.208:30001",
changeOrigin: true, //表示是否改变原域名 target: "http://111.231.196.214:30001/", //这里后台的地址模拟的;应该填写你们真实的后台接口
// secure: false, changeOrigin: true, //表示是否改变原域名
// ws: false, //表示WebSocket协议 // secure: false,
pathRewrite: { // ws: false, //表示WebSocket协议
"^/manageApi": "", pathRewrite: {
}, "^/manageApi": "",
}, },
}, },
}, },
},
}); });