mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
fix:修改小组
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -97,8 +97,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div>
|
||||
<!-- 批量删除的弹窗 -->
|
||||
<a-modal
|
||||
@@ -270,6 +270,8 @@ export default {
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
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) => {
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -777,7 +777,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="second2">
|
||||
<div class="btn1" @click="showModal2">
|
||||
<div class="btn1" @click="showModal2(1, null)">
|
||||
<img src="../../assets/images/courseManage/add0.png" />
|
||||
<span class="btn1text">创建小组</span>
|
||||
</div>
|
||||
@@ -803,7 +803,9 @@
|
||||
>. . .</span
|
||||
>
|
||||
<div class="moreItems">
|
||||
<div class="sammo">编辑</div>
|
||||
<div class="sammo" @click="showModal2(2, item)">
|
||||
编辑
|
||||
</div>
|
||||
<div
|
||||
class="sammo"
|
||||
@click="deleteGroupBtn(item.projectGroupId)"
|
||||
@@ -1936,6 +1938,8 @@ export default {
|
||||
valuestub: "", //学员管理部门
|
||||
valuestug: "", //学员小组管理名称
|
||||
valuestugroup: "", //学员管理小组名称
|
||||
projectGroupId: null, //是编辑小组id
|
||||
stuMemberClassify: null, //1:新建小组 2:编辑小组
|
||||
valueDate: "", //排行榜输入日期
|
||||
noticeChecked: true,
|
||||
noticeContent: "",
|
||||
@@ -2642,11 +2646,23 @@ export default {
|
||||
state.canclestu1 = false;
|
||||
};
|
||||
|
||||
const showModal2 = () => {
|
||||
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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user