Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yuping
2022-12-03 13:04:11 +08:00
10 changed files with 131 additions and 212 deletions

View File

@@ -1,3 +1,4 @@
import * as api from './index1'
function formatNumber(n) { function formatNumber(n) {
n = n.toString(); n = n.toString();
return n[1] ? n : "0" + n; return n[1] ? n : "0" + n;
@@ -215,7 +216,7 @@ function getCookie(name) {
//滚动加载信息 //滚动加载信息
const scrollLoad = (e) => { const scrollLoad = (e) => {
// console.log("滚动", e, b); // console.log("滚动", e, b);
const {target} = e; const { target } = e;
const scrllHeight = target.scrollHeight - target.scrollTop; const scrllHeight = target.scrollHeight - target.scrollTop;
const clientHeight = target.clientHeight; const clientHeight = target.clientHeight;
// console.log("scrllHeight", scrllHeight, clientHeight); // console.log("scrllHeight", scrllHeight, clientHeight);
@@ -225,211 +226,47 @@ const scrollLoad = (e) => {
return 2 return 2
} }
}; };
//添加归属权
function changeOwnership(classify, selectProjectId, selectPeopleArr) {
let obj = {
keyWord: "",
tag: 2, //归属权
opt: 3, //修改
type:
classify === "project"
? 2
: classify === "learnPath"
? 1
: classify === "course"
? 3
: null,
refId: selectProjectId, //项目id
// refId: 64,
pageNo: 1,
pageSize: 10,
// studentList: state.selectPeopleArr,
deptList: [],
groupList: [],
studentList: selectPeopleArr,
};
console.log("修改归属权obj", obj);
api
.optionAuthPerm(obj)
.then((res) => {
console.log("修改授权成功", res);
// closeDrawer();
})
.catch((err) => {
console.log("修改授权失败", err);
});
}
//新建延迟 //新建延迟
const commonData = { const commonData = {
timeout: 50, timeout: 50,
} }
// const organizationalTree = [ // const organizationalTree = [// ]
// {
// title: "京东方",
// value: "京东方",
// children: [
// {
// title: "产研部",
// value: "产研部",
// children: [
// {
// title: "产品部",
// value: "产品部",
// },
// {
// title: "研究部",
// value: "研究部",
// },
// {
// title: "研究部2",
// value: "研究部2",
// },
// {
// title: "研究3",
// value: "研究3",
// },
// {
// title: "研究4",
// value: "研究4",
// },
// {
// title: "研究部5",
// value: "研究部5",
// },
// {
// title: "研究部6",
// value: "研究部6",
// },
// {
// title: "研究部7",
// value: "研究部7",
// },
// {
// title: "研究部8",
// value: "研究部8",
// },
// {
// title: "研究部9",
// value: "研究部9",
// },
// ],
// },
// {
// title: "二级标题",
// value: "二级标题",
// children: [
// {
// title: "三级标题",
// value: "三级标题",
// children: [
// {
// title: "四级标题",
// value: "四级标题",
// children: [
// {
// title: "五级标题",
// value: "五级标题",
// children: [
// {
// title: "六级标题",
// value: "六级标题",
// children: [
// {
// title: "七级标题",
// value: "七级标题",
// children: [
// {
// title: "八级标题",
// value: "八级标题",
// children: [
// {
// title: "九级标题",
// value: "九级标题",
// children: [
// {
// title: "十级标题",
// value: "十级标题",
// children: [
// {
// title: "十一级标题",
// value: "十一级标题",
// children: [
// {
// title: "十二级标题",
// value: "十二级标题",
// children: [
// {
// title:
// "十三级标题十三级标题十三级标题十三级标题",
// value: "十三级标题",
// children: [
// {
// title:
// "十四级标题",
// value:
// "十四级标题",
// children: [
// {
// title:
// "十五级标题",
// value:
// "十五级标题",
// children: [
// {
// title:
// "十六级标题",
// value:
// "十六级标题",
// children:
// [
// {
// title:
// "十七级标题",
// value:
// "十七级标题",
// children:
// [
// {
// title:
// "十八级标题",
// value:
// "十八级标题",
// children:
// [
// {
// title:
// "十九级标题",
// value:
// "十九级标题",
// children:
// [
// {
// title:
// "二十级标题二十级标题",
// value:
// "二十级标题二十级标题",
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// {
// title: "人力资源部",
// value: "人力资源部",
// children: [
// {
// title: "人事部",
// value: "人事部",
// },
// {
// title: "行政部",
// value: "行政部",
// },
// ],
// },
// ],
// },
// ]
//组织树 //组织树
const organizationalTree = [] const organizationalTree = []
@@ -444,6 +281,7 @@ export {
setCookie, setCookie,
getCookie, getCookie,
scrollLoad, scrollLoad,
changeOwnership,
commonData, commonData,
organizationalTree, organizationalTree,
iframeUrl, iframeUrl,

View File

@@ -47,7 +47,11 @@
expandRowByClick="true" expandRowByClick="true"
@expand="expandTable" @expand="expandTable"
:pagination="false" :pagination="false"
:row-selection="rowSelection" :row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
type: 'radio',
}"
filterMultiple:false filterMultiple:false
/> />
@@ -101,9 +105,10 @@ export default {
tableDataTotal: 0, tableDataTotal: 0,
tableData: [], tableData: [],
selectedRowKeys: [], selectedRowKeys: [],
assessmentId:null, assessmentId:null
}); });
const closeDrawer = () => { const closeDrawer = () => {
state.selectedRowKeys = [];
ctx.emit("update:assessmentVisible", false); ctx.emit("update:assessmentVisible", false);
ctx.emit("update:titleTag", true); ctx.emit("update:titleTag", true);
@@ -165,6 +170,19 @@ export default {
// state.selectedRowKeys = selectedRowKeys; // state.selectedRowKeys = selectedRowKeys;
// }; // };
const onSelectChange = (selectedRowKeys, selectRow) => {
console.log("selectedRowKeys changed: ", selectedRowKeys, selectRow);
state.selectedRowKeys = selectedRowKeys;
state.selectedRows = selectRow;
console.log(selectRow)
state.assessment =selectRow[0];
state.assessmentId = selectRow[0].assessmentId;
ctx.emit("checkedAss", state.assessment);
ctx.emit("update:assessmentId", state.assessmentId);
state.selectedRowKeys = [];
closeDrawer();
};
const handelChangePage = (page, pageSize) => { const handelChangePage = (page, pageSize) => {
state.currentPage = page; state.currentPage = page;
state.pageSize = pageSize; state.pageSize = pageSize;
@@ -222,6 +240,7 @@ export default {
getAllInvistText, getAllInvistText,
resetInvist, resetInvist,
handelChangePage, handelChangePage,
onSelectChange
}; };
}, },
}; };

View File

@@ -54,7 +54,7 @@
> >
<span class="title" <span class="title"
>名称 >名称
<span class="data">{{ assessment1.createName }}</span> <span class="data">{{ assessment1.assessmentName }}</span>
</span> </span>
<span class="title" <span class="title"
>题数 >题数
@@ -184,6 +184,8 @@ export default {
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addinvistVisible", false); ctx.emit("update:addinvistVisible", false);
ctx.emit("update:edit", false); ctx.emit("update:edit", false);
state.assessment = null;
state.assessment1 = null;
state.inputV1 = ""; state.inputV1 = "";
// ctx.emit("changeData", false); // ctx.emit("changeData", false);
localStorage.setItem("stageId", props.chooseStageId); localStorage.setItem("stageId", props.chooseStageId);
@@ -205,6 +207,7 @@ export default {
api api
.queryAppraiseDetailById({ assessmentId: props.EditInvistId }) .queryAppraiseDetailById({ assessmentId: props.EditInvistId })
.then((res) => { .then((res) => {
console.log(res)
//更新讨论信息 //更新讨论信息
state.assessment1 = res.data.data; state.assessment1 = res.data.data;
}) })

View File

@@ -181,8 +181,34 @@
</div> </div>
<div class="boeTree"> <div class="boeTree">
<div class="boeTreeTitle">BOE组织树</div> <div class="boeTreeTitle">BOE组织树</div>
<a-tree
v-if="!isSearchOrg"
class="treeMain treeMain2"
:style="{ height: screenHeight - 430 + 'px' }"
dropdownClassName="changetreedropdownboe"
:dropdown-style="{
maxHeight: '600px',
}"
placeholder="BOE组织树"
allow-clear
tree-default-expand-all
:tree-data="isSearchOrg ? treeData2 : treeData"
@select="departmentSelect1"
multiple
v-model:selectedKeys="selectedKeys1"
:fieldNames="{
children: 'treeChildList',
key: 'id',
title: 'name',
value: 'name',
}"
v-model:expandedKeys="expandedKeys"
>
<template #suffixIcon></template>
</a-tree>
<a-tree <a-tree
v-else-if="isSearchOrg"
class="treeMain treeMain2" class="treeMain treeMain2"
:style="{ height: screenHeight - 430 + 'px' }" :style="{ height: screenHeight - 430 + 'px' }"
dropdownClassName="changetreedropdownboe" dropdownClassName="changetreedropdownboe"
@@ -953,13 +979,14 @@ export default {
.getOrgInfo(obj) .getOrgInfo(obj)
.then((res) => { .then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
console.log("搜索组织", res);
state.isSearchOrg = true; state.isSearchOrg = true;
// res.data.data.rows.forEach((element) => { // res.data.data.rows.forEach((element) => {
// // console.log("element", element); // // console.log("element", element);
// element.treeChildList = []; // element.treeChildList = [];
// }); // });
// console.log("组织树搜索成功", res.data.data.rows); // console.log("组织树搜索成功", res.data.data.rows);
state.treeData2 = res.data.data.rows; state.treeData2 = res.data.data;
} }
}) })
.catch((err) => { .catch((err) => {

View File

@@ -177,6 +177,9 @@ export default {
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:ProjPvisible", false); ctx.emit("update:ProjPvisible", false);
state.currentPage = 1; state.currentPage = 1;
state.tableData = [];
state.tableDataTotal = -1;
state.name = null;
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("state", bool, props); console.log("state", bool, props);

View File

@@ -200,6 +200,7 @@ import elementResizeDetectorMaker from "element-resize-detector";
// import { message } from "ant-design-vue"; // import { message } from "ant-design-vue";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import { useStore } from "vuex"; import { useStore } from "vuex";
import { message } from "ant-design-vue";
export default { export default {
name: "ProjOwnerShip", name: "ProjOwnerShip",
props: { props: {
@@ -407,6 +408,16 @@ export default {
.optionAuthPerm(obj) .optionAuthPerm(obj)
.then((res) => { .then((res) => {
console.log("获取授权成功", res); console.log("获取授权成功", res);
if (res.data.code === 200 && res.data.data.records.length > 0) {
state.selectedRowKeys = res.data.data.records[0].memberId;
let obj = {
id: res.data.data.records[0].memberId,
name: res.data.data.records[0].memberName,
};
state.choosepeople = [obj];
state.selectPeopleArr = [obj];
}
}) })
.catch((err) => { .catch((err) => {
console.log("获取授权失败", err); console.log("获取授权失败", err);
@@ -440,6 +451,7 @@ export default {
.optionAuthPerm(obj) .optionAuthPerm(obj)
.then((res) => { .then((res) => {
console.log("修改授权成功", res); console.log("修改授权成功", res);
message.success("修改归属权成功");
closeDrawer(); closeDrawer();
}) })
.catch((err) => { .catch((err) => {

View File

@@ -702,6 +702,7 @@ import { message } from "ant-design-vue";
import { import {
toDate, toDate,
commonData, commonData,
changeOwnership,
// setCookie // setCookie
} from "../../api/method"; } from "../../api/method";
import { storage } from "../../api/storage"; import { storage } from "../../api/storage";
@@ -1464,6 +1465,15 @@ export default {
.catch((chapterErr) => { .catch((chapterErr) => {
console.log("关卡创建失败", chapterErr); console.log("关卡创建失败", chapterErr);
}); });
//添加归属权 [id: '966735050643083264', name: '丁舟航']
let selectPeopleArr = [
{ id: res.data.data.createId, name: res.data.data.createName },
];
changeOwnership(
"learnPath",
res.data.data.routerId,
selectPeopleArr
);
} }
}) })
.catch((err) => { .catch((err) => {
@@ -1471,6 +1481,7 @@ export default {
// state.createLoading = false; // state.createLoading = false;
}); });
}; };
//获取学习路径列表 //获取学习路径列表
const getLearnPath = () => { const getLearnPath = () => {
let obj = { let obj = {

View File

@@ -771,6 +771,7 @@
</div> </div>
<div class="btnbox" style="margin: 20px"> <div class="btnbox" style="margin: 20px">
<a-upload <a-upload
v-if="(docChecked==true)"
v-model:file-list="fileList" v-model:file-list="fileList"
name="file" name="file"
action="/manageApi/file/upload" action="/manageApi/file/upload"
@@ -787,7 +788,7 @@
alt="" alt=""
/> />
</a-upload> </a-upload>
<div class="btnbox" style="margin: 20px"> <div v-if="(docChecked==true)" class="btnbox" style="margin: 20px">
<span style="color: #999999"> <span style="color: #999999">
支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip 支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip
</span> </span>

View File

@@ -587,6 +587,7 @@
</div> </div>
<div class="btnbox" style="margin: 20px"> <div class="btnbox" style="margin: 20px">
<a-upload <a-upload
v-if="(docChecked==true)"
v-model:file-list="fileList" v-model:file-list="fileList"
name="file" name="file"
action="/manageApi/file/upload" action="/manageApi/file/upload"
@@ -603,7 +604,7 @@
alt="" alt=""
/> />
</a-upload> </a-upload>
<div class="btnbox" style="margin: 20px"> <div v-if="(docChecked==true)" class="btnbox" style="margin: 20px">
<span style="color: #999999"> <span style="color: #999999">
支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip 支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip
</span> </span>

View File

@@ -427,11 +427,11 @@
</div> </div>
<div class="time"> <div class="time">
<div class="timetext">开始时间</div> <div class="timetext">开始时间</div>
<div class="timetext">{{ item.createTime }}</div> <div class="timetext">{{item.createTime?toDate(Number(item.createTime),"Y-M-D"):'---'}}</div>
</div> </div>
<div class="progress"> <div class="progress">
<div class="progresstext"> <div class="progresstext">
{{ item.finishStuCnt }}/{{ item.totalStuCnt }} {{ item.finishStuCnt&&item.finishStuCnt!==null?item.finishStuCnt:0 }}/{{ item.totalStuCnt&&item.totalStuCnt!==null?item.totalStuCnt:0 }}
</div> </div>
<div style="display: flex"> <div style="display: flex">
<a-progress <a-progress
@@ -442,7 +442,7 @@
/> />
<span class="progresstext" style="margin-left: 10px" <span class="progresstext" style="margin-left: 10px"
>{{ >{{
(item.finishStuCnt / item.totalStuCnt) * 100 (item.finishStuCnt&&item.finishStuCnt!==null?item.finishStuCnt:0 / item.totalStuCnt&&item.totalStuCnt!==null?item.totalStuCnt:0) * 100
}}%</span }}%</span
> >
</div> </div>
@@ -1036,6 +1036,7 @@
</div> </div>
<div class="btnbox" style="margin: 20px"> <div class="btnbox" style="margin: 20px">
<a-upload <a-upload
v-if="(docChecked==true)"
v-model:file-list="fileList" v-model:file-list="fileList"
name="file" name="file"
action="/manageApi/file/upload" action="/manageApi/file/upload"
@@ -1052,7 +1053,7 @@
alt="" alt=""
/> />
</a-upload> </a-upload>
<div class="btnbox" style="margin: 20px"> <div v-if="(docChecked==true)" class="btnbox" style="margin: 20px">
<span style="color: #999999"> <span style="color: #999999">
支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip 支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip
</span> </span>
@@ -3247,8 +3248,10 @@ export default {
}).then((res) => { }).then((res) => {
console.log("get task", res.data.data); console.log("get task", res.data.data);
let info = res.data.data.projectInfo; let info = res.data.data.projectInfo;
let start = toDate(info.beginTime / 1000, "Y-M-D h:m"); // let start = toDate(info.beginTime / 1000, "Y-M-D h:m");
let end = toDate(info.endTime / 1000, "Y-M-D h:m"); let start = info.beginTime
// let end = toDate(info.endTime / 1000, "Y-M-D h:m");
let end = info.endTime
state.tstartTime = info.beginTime; state.tstartTime = info.beginTime;
state.tendTime = info.endTime; state.tendTime = info.endTime;
state.tsourceBelong = info.sourceBelongId; state.tsourceBelong = info.sourceBelongId;
@@ -3822,6 +3825,7 @@ export default {
templateProject, templateProject,
changeGrouped, changeGrouped,
deFile, deFile,
toDate
}; };
}, },
}; };