This commit is contained in:
lijing
2026-08-18 17:10:35 +08:00
parent c5bfa3b623
commit fb17d564c7
9 changed files with 117 additions and 34 deletions
+1
View File
@@ -8,6 +8,7 @@
},
"dependencies": {
"@babel/polyfill": "^7.12.1",
"@riophae/vue-treeselect": "^0.4.0",
"core-js": "^3.6.5",
"node-sass": "latest",
"sortablejs": "^1.15.7",
+3 -20
View File
@@ -61,6 +61,9 @@ export default {
// this.setCurrentRole(bschResult, baseHost, info.id);
localStorage.setItem("currentRole", encodeURI(JSON.stringify({ childId:0, roleId:info.roleIds[0], schId:info.school?info.school.id:0, userId:info.id })));
var mod = await this.getUserMod();
if(info.type==1){
mod=mod.filter(a=>a.customId<4)
}
this.layoutInit(info, mod, [], baseHost, ssoHost);
this.isLogin = true;
@@ -106,26 +109,6 @@ export default {
APIConfig.Base.GetUserMod,
null,
resp => {
// let resps = {
// "code": 0, "msg": "", "data":
// [
// { "id": 1493, "appId": 551, "modId": 1, "name": "学制选择", "parentId": 0, "path": null, "level": 0, "page": "/", "icon": null, "orderNumber": 1493, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 2, "name": "时段设置", "parentId": 0, "path": null, "level": 0, "page": "/itemSet", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 3, "name": "区域操作日志", "parentId": 0, "path": null, "level": 0, "page": "/areaOperateDaily", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 4, "name": "学校设置", "parentId": 0, "path": null, "level": 0, "page": "/schoolSetting", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 5, "name": "课程设置", "parentId": 0, "path": null, "level": 0, "page": "/subjectManForZy", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 6, "name": "学科管理", "parentId": 0, "path": null, "level": 0, "page": "/subjectSetzhi", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 7, "name": "班级管理", "parentId": 0, "path": null, "level": 0, "page": "/classManage", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 8, "name": "选修班管理", "parentId": 0, "path": null, "level": 0, "page": "/electiveClassManage", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 9, "name": "教师管理", "parentId": 0, "path": null, "level": 0, "page": "/teacherManage", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 10, "name": "学生管理", "parentId": 0, "path": null, "level": 0, "page": "/studentManage", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 11, "name": "历史查询", "parentId": 0, "path": null, "level": 0, "page": "/historySearch", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 12, "name": "学生异动管理", "parentId": 0, "path": null, "level": 0, "page": "/studentYDManage", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 13, "name": "教师转入管理", "parentId": 0, "path": null, "level": 0, "page": "/zhuanruinfo", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 14, "name": "学生转入管理", "parentId": 0, "path": null, "level": 0, "page": "/zhuanruinfostu", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// { "id": 1494, "appId": 551, "modId": 15, "name": "日志管理", "parentId": 0, "path": null, "level": 0, "page": "/dailySearch", "icon": null, "orderNumber": 1494, "usable": true, "children": [], "modules": [] },
// ], "timeNow": "2026-06-17 14:44:05"
// }
resolve(resp.data);
},
error => reject(error)
+1
View File
@@ -27,6 +27,7 @@ export default {
schsystemsave: BaseUrl + "/api/schsystem/save",//保存学制
getschsystemselect: BaseUrl + "/api/schsystem/select",//获取选择的学制
getType: BaseUrl + "/api/schsystem/getType",//获取学制类型
selectTree: BaseUrl + "/api/schsystem/selectTree",//获取学制树
//时段设置
getyeartermlist: BaseUrl + "/api/yearterm/list",//获取学年学期
+3 -1
View File
@@ -3,7 +3,9 @@
<header class="header-container fix">
<div class="fl align-middle icon-box">
<div title="常用应用" :class="['icon-btn', isPanel ? 'active' : '']" @click="showPanel">
<i class="iconfont icon-apps"></i>
<!-- <i class="iconfont icon-apps"></i> -->
<Icon type="md-cube" color="#fff" size="16" />
<!-- <Icon type="md-cart" color="#fff" size="16" /> -->
</div>
</div>
<div class="delimiter fl align-middle"></div>
+4 -4
View File
@@ -385,14 +385,14 @@
// 新增学生表单
addForm: { grade:'', classId:'', name:'', stuClassNo:'', idCard:'', account:'', pwd:'' },
// 编辑学生表单
editForm: { grade:'', classId:'', name:'', stuClassNo:'', idCard:'', account:'', id:null,stuId:0,status:1 },
editForm: { grade:'', classId:'', name:'', stuClassNo:'', idCard:'', account:'', id:null,stuId:0,status:0 },
// 调班弹窗
currentSelectClass: '',
targetClass: '',
// 异动弹窗
currentStuName: '',
selectedStatus: 1,
selectedStatus: 0,
studentabnormallist: [],
formRules: {
grade: [{ required: true, message: '请选择年级', trigger: 'change' }],
@@ -593,7 +593,7 @@
account:this.addForm.account,
pwd:this.addForm.pwd,
stuId:0,
status:1
status:0
}
const url = APIConfig.BschClassSystem.studentsave;
this.$api.post(url, JSON.stringify(newItem), resp => {
@@ -813,7 +813,7 @@
this.changeStatusModalVisible = true;
this.currentStuName = this.selectedRows[0].name;
this.getstudentabnormal();
this.selectedStatus = 1;
this.selectedStatus = 0;
},
submitChangeStatus() {
const newItem = {
+2 -2
View File
@@ -370,7 +370,7 @@ export default {
// 新增学生表单
addForm: { grade:'', classId:'', name:'', stuClassNo:'', idCard:'', account:'', pwd:'' },
// 编辑学生表单
editForm: { grade:'', classId:'', name:'', stuClassNo:'', idCard:'', account:'', id:null,stuId:0,status:1 },
editForm: { grade:'', classId:'', name:'', stuClassNo:'', idCard:'', account:'', id:null,stuId:0,status:0 },
// 调班弹窗
currentSelectClass: '',
targetClass: '',
@@ -576,7 +576,7 @@ export default {
account:this.addForm.account,
pwd:this.addForm.pwd,
stuId:0,
status:1
status:0
}
const url = APIConfig.BschClassSystem.studentsave;
this.$api.post(url, JSON.stringify(newItem), resp => {
+2 -2
View File
@@ -35,7 +35,7 @@
<!-- 左下角批量删除 + 底部分页固定 -->
<div class="bottom-bar">
<Button type="default" @click="selectedStatus=1;submitChangeStatus()">还原</Button>
<Button type="default" @click="selectedStatus=0;submitChangeStatus()">还原</Button>
<div class="page-right">
<span style="margin-right:12px">共 {{ total }} 条</span>
<Page
@@ -265,7 +265,7 @@
submitChangeStatus() {
if (!this.selectedRows.length) return this.$Message.warning('请勾选学生');
const newItem = {
abnormalStatus: 1,
abnormalStatus: 0,
stuIds:this.selectedRows.map(a=>a.id)
}
const url = APIConfig.BschClassSystem.studentsetAbnormalStatus;
@@ -35,7 +35,7 @@
<!-- 左下角批量删除 + 底部分页固定 -->
<div class="bottom-bar">
<Button type="default" @click="selectedStatus=1;submitChangeStatus()">还原</Button>
<Button type="default" @click="selectedStatus=0;submitChangeStatus()">还原</Button>
<div class="page-right">
<span style="margin-right:12px">共 {{ total }} 条</span>
<Page
+100 -4
View File
@@ -10,7 +10,16 @@
<!-- 右侧:学制选择 -->
<Col span="20" class="right-select-wrap" :style="'height:'+(useTableHeight({ isSearch: true, isOperat: true })+160)+'px'">
<div class="select-title">学制选择</div>
<div class="select-title">
学制选择
<Button class="fr" style="margin-right:10px;" type="primary" @click="openAddModal">添加学校</Button>
</div>
<TreeSelect
v-model="addForm.systemlist"
:data="schsystemtree"
multiple
transfer
/>
<!-- 幼儿园分组 -->
<div class="group-wrap" v-for="(itt,index) in schsystemlist" :key="index">
<div class="group-label">{{ itt.academicStageName }}</div>
@@ -34,22 +43,61 @@
</div>
</Col>
</Row>
<!-- 新增弹窗 -->
<Modal v-model="addModalVisible" title="添加学校" width="520">
<Form ref="addFormRef" :model="addForm" :rules="formRules" label-width="90">
<FormItem label="学校名称" prop="schname">
<Input size="large" v-model="addForm.schname" placeholder="请输入学校名称" />
</FormItem>
<FormItem label="学制" prop="systemlist">
<treeselect
v-model="addForm.systemlist"
:options="schsystemtree"
:multiple="true"
:disable-branch-nodes="true"
:defaultExpandLevel="Infinity"
:normalizer="node => ({
id: node.id,
label: node.label,
children: node.children ? node.children : undefined
})"
placeholder="请选择学制"
/>
</FormItem>
</Form>
<div slot="footer" align="right">
<Button @click="addModalVisible = false" style="margin-right: 10px">取消</Button>
<Button type="primary" @click="submitAdd">提交</Button>
</div>
</Modal>
</div>
</template>
<script>
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import myTree from "../components/my_tree";
import { self_viewport } from "@/mixins/self_viewport";
export default {
name: "EduYearSelect",
components: { myTree},
components: { myTree,Treeselect },
data() {
return {
selectedEdu: "",
selectedSchool: null,
treeData: [],
schsystemlist:[],
selectnodeid:0
schsystemtree:[],
selectnodeid:0,
addModalVisible:false,
addForm: {
schname:'',
systemlist:[]
},
formRules: {
schname: [{ required: true, message: "请输入学校名称", trigger: "blur" }],
systemlist: [{ required: true, type: 'array', min: 1, message: '请选择学制', trigger: 'change' }]
}
};
},
@@ -103,6 +151,54 @@ export default {
}
});
},
//添加学校
openAddModal() {
this.$nextTick(() => {
this.$refs.addFormRef?.resetFields();
});
this.addForm = {
schname: '',
systemlist: [],
};
this.getselectTree();
this.addModalVisible = true;
},
//获取学制下拉树
getselectTree:function(){
const _this = this;
var item={};
_this.$api.get(APIConfig.BschClassSystem.selectTree, item, resp => {
if(resp.code==0)
{
_this.schsystemtree = resp.data;
}else{
_this.schsystemtree=[];
}
});
},
//提交学制事件
submitAdd() {
this.$refs.addFormRef.validate(valid => {
if (!valid) return;
const form = this.addForm;
const submitData = {
schname: form.schname,
systemlist: form.systemlist
};
// const url = APIConfig.BschClassSystem.yeartermadd;
this.$api.post(url, JSON.stringify(submitData), resp => {
if (resp.code == 0) {
this.$Message.success("添加成功!");
this.addModalVisible = false;
this.getGroupTree();
this.getschsystemlist();
} else if (resp.code == 4) {
this.$Message.info(resp.msg);
}
});
});
},
//选中学制事件
selectEduType(val,index,index2) {
const list = this.schsystemlist[index].academicStageList;
// 先记录当前点击项原本的勾选状态
@@ -166,7 +262,7 @@ export default {
flex-direction: column;
}
.tree-title {
font-size: 22px;
font-size: 20px;
font-weight: 500;
padding: 10px 10px 10px;
border-bottom: 1px solid #eee;