init
deploy-bschclass-front / build-and-deploy (push) Successful in 3m29s

This commit is contained in:
lijing
2026-08-19 14:21:08 +08:00
parent fb17d564c7
commit 78424636ce
3 changed files with 51 additions and 45 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
<Col span="20" class="right-select-wrap" :style="'height:'+(useTableHeight({ isSearch: true, isOperat: true })+160)+'px'"> <Col span="20" class="right-select-wrap" :style="'height:'+(useTableHeight({ isSearch: true, isOperat: true })+160)+'px'">
<div class="select-title"> <div class="select-title">
学制选择 学制选择
<Button class="fr" style="margin-right:10px;" type="primary" @click="openAddModal">添加学校</Button> <Button v-if="selectnodeid==0" class="fr" style="margin-right:10px;" type="primary" @click="openAddModal">添加学校</Button>
</div> </div>
<TreeSelect <TreeSelect
v-model="addForm.systemlist" v-model="addForm.systemlist"
+46 -44
View File
@@ -636,8 +636,6 @@ export default {
//导入成功返回 //导入成功返回
importFile(response, file, fileList){ importFile(response, file, fileList){
const _this=this; const _this=this;
console.log(response);
console.log(file);
_this.spinShow=false; _this.spinShow=false;
_this.UpParmas.fileName=file.name; _this.UpParmas.fileName=file.name;
_this.UpParmas.listData=response; _this.UpParmas.listData=response;
@@ -676,13 +674,17 @@ export default {
}, },
batchDeleteTeacher() { batchDeleteTeacher() {
if (!this.selectedRows.length) return this.$Message.warning('请先勾选教师') if (!this.selectedRows.length) return this.$Message.warning('请先勾选教师');
this.batchDeleteModal = true this.batchDeleteModal = true
}, },
confirmBatchDelete() { confirmBatchDelete() {
const idlist = this.selectedRows.map(i => i.id); const idlist = this.selectedRows.map(i => i.id);
const url = APIConfig.BschClassSystem.teacherdelete+idlist.join(','); const url = APIConfig.BschClassSystem.teacherdelete;
this.$api.post(url,{}, resp => { let item={
groupId:this.selectnodeid,
ids:idlist.join(',')
};
this.$api.post(url,item, resp => {
if (resp.code == 0) { if (resp.code == 0) {
this.$Message.success("删除成功!"); this.$Message.success("删除成功!");
this.selectedRows = []; this.selectedRows = [];
@@ -695,37 +697,37 @@ export default {
}, },
// 弹窗打开初始化 // 弹窗打开初始化
openBatchMoveTeacherModal() { openBatchMoveTeacherModal() {
if (!this.selectedRows.length) return this.$Message.warning('请先勾选教师') if (!this.selectedRows.length) return this.$Message.warning('请先勾选教师');
this.moveTeacherName = this.selectedRows.map(i => i.name).join('、') this.moveTeacherName = this.selectedRows.map(i => i.name).join('、');
// 清空数据 // 清空数据
this.checkedTreeNodes = [] this.checkedTreeNodes = [];
this.targetGroupList = [] this.targetGroupList = [];
this.$nextTick(() => { this.$nextTick(() => {
// 清空整棵树所有勾选 // 清空整棵树所有勾选
const ztree = this.$refs.moveTeacherLeftTree.getZtreeInstance() const ztree = this.$refs.moveTeacherLeftTree.getZtreeInstance();
ztree.checkAllNodes(false) ztree.checkAllNodes(false);
}) })
this.moveTeacherModal = true this.moveTeacherModal = true;
}, },
// 右侧点击X删除单条 → 反向取消左侧树勾选 // 右侧点击X删除单条 → 反向取消左侧树勾选
handleDeleteRightItem(delItem, index) { handleDeleteRightItem(delItem, index) {
// 删除右侧数组 // 删除右侧数组
this.targetGroupList.splice(index, 1) this.targetGroupList.splice(index, 1);
// 获取树实例,取消对应节点复选框 // 获取树实例,取消对应节点复选框
const ztree = this.$refs.moveTeacherLeftTree.getZtreeInstance() const ztree = this.$refs.moveTeacherLeftTree.getZtreeInstance();
const targetNode = ztree.getNodeByParam('id', delItem.id) const targetNode = ztree.getNodeByParam('id', delItem.id);
if (targetNode) { if (targetNode) {
ztree.checkNode(targetNode, false, false) ztree.checkNode(targetNode, false, false);
} }
}, },
// 确定按钮 直接提交 // 确定按钮 直接提交
submitMoveTeacher() { submitMoveTeacher() {
if (this.targetGroupList.length === 0) { if (this.targetGroupList.length === 0) {
return this.$Message.warning('请至少选择一个目标分组') return this.$Message.warning('请至少选择一个目标分组');
} }
const teacherIdArr = this.selectedRows.map(row => row.id) const teacherIdArr = this.selectedRows.map(row => row.id);
const groupIdArr = this.targetGroupList.map(item => item.id) const groupIdArr = this.targetGroupList.map(item => item.id);
// console.log('待移动教师ID', teacherIdArr) // console.log('待移动教师ID', teacherIdArr)
// console.log('目标分组ID', groupIdArr) // console.log('目标分组ID', groupIdArr)
@@ -750,8 +752,8 @@ export default {
}); });
}, },
batchTransferTeacher() { batchTransferTeacher() {
if (!this.selectedRows.length) return this.$Message.warning('请先勾选教师') if (!this.selectedRows.length) return this.$Message.warning('请先勾选教师');
this.transferTeacherModal = true this.transferTeacherModal = true;
}, },
//转出事件 //转出事件
confirmTransferTeacher() { confirmTransferTeacher() {
@@ -770,19 +772,19 @@ export default {
}, },
openBatchMoveTeacherModal() { openBatchMoveTeacherModal() {
if (!this.selectedRows.length) return this.$Message.warning('请先勾选教师') if (!this.selectedRows.length) return this.$Message.warning('请先勾选教师');
this.moveTeacherName = this.selectedRows.map(i => i.name).join('、') this.moveTeacherName = this.selectedRows.map(i => i.name).join('、');
this.moveTeacherModal = true this.moveTeacherModal = true;
}, },
confirmMoveTeacher() { confirmMoveTeacher() {
this.moveTeacherModal = false this.moveTeacherModal = false;
this.$Message.success('移动教师成功') this.$Message.success('移动教师成功');
}, },
openSetStatusModal() { openSetStatusModal() {
if (!this.selectedRows.length) return this.$Message.warning('请先勾选教师') if (!this.selectedRows.length) return this.$Message.warning('请先勾选教师');
this.statusFormData.status = '0' this.statusFormData.status = '0';
this.setStatusModal = true this.setStatusModal = true;
}, },
submitSetStatus() { submitSetStatus() {
const idlist = this.selectedRows.map(i => i.id); const idlist = this.selectedRows.map(i => i.id);
@@ -804,11 +806,11 @@ export default {
}, },
openAddGroupModal() { openAddGroupModal() {
if (!this.selectnodeid) return this.$Message.warning('请先选择父分组') if (!this.selectnodeid) return this.$Message.warning('请先选择父分组');
this.addGroupFormData.parentGroupName = this.selectnodetitle this.addGroupFormData.parentGroupName = this.selectnodetitle;
this.addGroupFormData.groupName = '' this.addGroupFormData.groupName = '';
this.addGroupFormData.sort = '' this.addGroupFormData.sort = '';
this.addGroupModal = true this.addGroupModal = true;
}, },
submitAddGroup() { submitAddGroup() {
this.$refs.addGroupForm.validate(valid => { this.$refs.addGroupForm.validate(valid => {
@@ -827,30 +829,30 @@ export default {
}, },
submitEditGroup() { submitEditGroup() {
this.$refs.editGroupForm.validate(valid => { this.$refs.editGroupForm.validate(valid => {
if (!valid) return if (!valid) return;
this.selectedTreeNode.title = this.editGroupFormData.groupName this.selectedTreeNode.title = this.editGroupFormData.groupName;
this.editGroupModal = false this.editGroupModal = false;
this.$Message.success('修改分组成功') this.$Message.success('修改分组成功')
}) })
}, },
openMoveGroupModal() { openMoveGroupModal() {
if (!this.selectnodeid) return this.$Message.warning('请先选择分组') if (!this.selectnodeid) return this.$Message.warning('请先选择分组');
this.moveGroupTargetName = this.selectnodetitle this.moveGroupTargetName = this.selectnodetitle;
this.moveGroupModal = true this.moveGroupModal = true;
}, },
confirmMoveGroup() { confirmMoveGroup() {
this.moveGroupModal = false this.moveGroupModal = false;
this.$Message.success('移动分组成功') this.$Message.success('移动分组成功');
}, },
delCurrentGroup() { delCurrentGroup() {
if (!this.selectnodeid) return this.$Message.warning('请先选择分组') if (!this.selectnodeid) return this.$Message.warning('请先选择分组');
this.$Modal.confirm({ this.$Modal.confirm({
title: '提示', title: '提示',
content: `确定删除分组【${this.selectedTreeNode.title}】?`, content: `确定删除分组【${this.selectedTreeNode.title}】?`,
onOk: () => { onOk: () => {
this.$Message.success('删除分组成功') this.$Message.success('删除分组成功');
} }
}) })
} }
+4
View File
@@ -447,6 +447,10 @@ export default {
this.getteachssearch(); this.getteachssearch();
}, },
handleBatchImport() { handleBatchImport() {
this.UpParmas.datapre={
schsystemId: this.majorVal,
gradeId: this.gradeVal
}
this.importModalVisible = true; this.importModalVisible = true;
}, },
//导入成功返回 //导入成功返回