diff --git a/src/App.vue b/src/App.vue index e09e7e17..2a616e65 100644 --- a/src/App.vue +++ b/src/App.vue @@ -43,7 +43,7 @@ export default defineComponent({ const store = useStore(); const isLogin = ref(false); // console.log("router", router.getRoutes(), route); - console.log("版本0.13------------"); + console.log("版本0.15------------"); const routes = computed(() => { return router.getRoutes().filter((e) => e.meta?.isLink); }); diff --git a/src/api/config.js b/src/api/config.js index e1b4874a..cd1a5b73 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-21 14:32:52 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-12-04 13:27:07 + * @LastEditTime: 2022-12-04 23:51:45 * @FilePath: /fe-manage/src/api/config.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -57,7 +57,7 @@ http.interceptors.response.use( } else { if (code === 1000) { // window.open("https://u-pre.boe.com/web/", '_self'); - // window.open("http://111.231.196.214:12013/manage/login", '_self'); + window.open("http://111.231.196.214:12013/manage/login", '_self'); } console.log("api %o", msg); } diff --git a/src/components/drawers/MemberList.vue b/src/components/drawers/MemberList.vue index 3ec14370..5f163a64 100644 --- a/src/components/drawers/MemberList.vue +++ b/src/components/drawers/MemberList.vue @@ -97,8 +97,8 @@
- - + +
{ ctx.emit("update:Lvisible", false); + state.tabledata = []; + console.log("tabledata", state.tabledata); }; const showModal = () => { if (state.selectedRows.length == 0) { @@ -345,18 +347,25 @@ export default { state.tableDataTotal = -1; getProjStu(objf).then((res) => { console.log(res.data.data, "获取学员列表"); - let leng = res.data.data.rows.length; - state.total = res.data.data.total; - state.tableDataTotal = res.data.data.total; - if (leng > 0) { + if (res.data.code === 200) { + state.total = res.data.data.total; + state.tableDataTotal = res.data.data.total; let arr = res.data.data.rows; getTableDataList(arr); } + // let leng = res.data.data.rows.length; + + // state.tableDataTotal = res.data.data.total; + // if (leng > 0) { + + // } }); }; - const afterVisibleChange = () => { - getStu(); + const afterVisibleChange = (bool) => { + if (bool) { + getStu(); + } }; //分页 const changePaginationStu = (page) => { diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 7a6cb6f0..410cb338 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -4429,8 +4429,8 @@ export default defineComponent({ }; // 关闭查看 const handlelookMs = () => { - state.lookMs = false - } + state.lookMs = false; + }; //保存面授课 const handlePush = (param) => { //state.isEdit = 1; @@ -5030,7 +5030,6 @@ export default defineComponent({ state.ft_eidt = true; }; - const handleLook = async (itm, type) => { state.isEdit = 0; console.log(45555); @@ -5370,7 +5369,7 @@ export default defineComponent({ watch( () => state.addAuthList, (res) => { - console.log("res", res, state.addStudentList); + console.log("res 添加学员", res, state.addStudentList); if (state.authClassify === 3) { let obj = { deptList: res[1], @@ -5508,7 +5507,7 @@ export default defineComponent({ closeOnlineCoursevisible, handlelookMs, - handleLook + handleLook, }; }, }); diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 40f8a975..37b3b0f1 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -777,7 +777,7 @@
-
+
创建小组
@@ -803,7 +803,9 @@ >. . .
-
编辑
+
+ 编辑 +
{ + const showModal2 = (classify, item) => { + state.stuMemberClassify = classify; + state.projectGroupId = + item && item.projectGroupId ? item.projectGroupId : null; state.stugroup = true; + if (item) { + state.valueaddg = item.groupName; + state.valueaddm = item.leaderName; + } + console.log("编辑小组item", item); }; const closeModal2 = () => { state.stugroup = false; + state.valueaddg = null; + state.valueaddm = null; + state.projectGroupId = null; + state.stuMemberClassify = null; }; //点击确定创建小组 const createG = () => { @@ -2655,7 +2671,7 @@ export default { return message.warning("请输入必填项"); } else { createGroup(); - state.stugroup = false; + closeModal2(); } }; const showFaceIn = () => { @@ -3234,6 +3250,7 @@ export default { array.push(obj); }); state.groupList = array; + console.log("编辑小组", state.groupList); }; //学员搜索 const searchStu = () => { @@ -3294,7 +3311,7 @@ export default { }; //获取学员列表 const getStu = (obj) => { - state.loading = true + state.loading = true; let objf = obj || { deptIds: [], //部门 groupId: 0, @@ -3394,11 +3411,14 @@ export default { getGroupList(objf) .then((res) => { console.log(res.data.data.rows, "获取小组列表成功"); - let leng = res.data.data.rows.length; - if (leng > 0) { + if (res.data.code === 200) { let arr = res.data.data.rows; setGroupList(arr); } + // let leng = res.data.data.rows.length; + // if (leng > 0) { + + // } }) .catch((err) => { console.log(err, "获取列表失败"); @@ -3416,23 +3436,47 @@ export default { }; //创建小组 const createGroup = () => { - let obj = { - groupName: state.valueaddg, - leaderId: 0, - leaderName: state.valueaddm, - projectGroupId: 0, - projectId: state.projectId, - }; - editGroup(obj) - .then((res) => { - console.log("小组创建成功", res); - message.success("小组创建成功"); - getGroup(); - }) - .catch((err) => { - console.log("小组创建失败", err); - message.warning("小组创建失败"); - }); + //新建 + if (state.stuMemberClassify === 1) { + let obj = { + groupName: state.valueaddg, + leaderId: 0, + leaderName: state.valueaddm, + // projectGroupId: 0, + projectId: state.projectId, + }; + editGroup(obj) + .then((res) => { + console.log("小组创建成功", res); + message.success("小组创建成功"); + getGroup(); + }) + .catch((err) => { + console.log("小组创建失败", err); + message.warning("小组创建失败"); + }); + } + //编辑 + if (state.stuMemberClassify === 2) { + let obj = { + groupName: state.valueaddg, + leaderId: 0, + leaderName: state.valueaddm, + projectGroupId: state.projectGroupId, + projectId: state.projectId, + }; + console.log("编辑小组obj", obj); + editGroup(obj) + .then((res) => { + console.log("小组编辑成功", res); + message.success("小组编辑成功"); + getGroup(); + }) + .catch((err) => { + console.log("小组编辑失败", err); + message.warning("小组编辑失败"); + }); + } }; //搜索小组重置 const resetGroupName = () => {