After Width: | Height: | Size: 672 B |
After Width: | Height: | Size: 680 B |
After Width: | Height: | Size: 239 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 340 B |
After Width: | Height: | Size: 199 B |
After Width: | Height: | Size: 416 B |
After Width: | Height: | Size: 482 B |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 985 KiB After Width: | Height: | Size: 382 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 664 B |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 468 B |
After Width: | Height: | Size: 449 B |
After Width: | Height: | Size: 315 B |
After Width: | Height: | Size: 369 B |
After Width: | Height: | Size: 579 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 754 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 267 B |
After Width: | Height: | Size: 209 B |
@ -0,0 +1,29 @@ |
||||
<template> |
||||
<div class="breadcrumb"> |
||||
<span class="cur">当前位置:</span> |
||||
<el-breadcrumb separator="/"> |
||||
<el-breadcrumb-item :to="{ path: '/' }">教师管理端</el-breadcrumb-item> |
||||
<el-breadcrumb-item v-for="(item,index) in pages" :key="index" :to="{ path: index == pages.length - 1 ? curRoute : route }">{{item}}</el-breadcrumb-item> |
||||
</el-breadcrumb> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
props: ['data','route'], |
||||
data() { |
||||
return { |
||||
pages: this.data.split('/'), |
||||
curRoute: this.$route.path |
||||
}; |
||||
}, |
||||
methods: { |
||||
update(data){ |
||||
this.pages = data.split('/') |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
|
||||
</style> |
@ -0,0 +1,28 @@ |
||||
<template> |
||||
<div> |
||||
<div class="copyright">广州超竞教育投资有限公司版权所有</div> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
|
||||
}; |
||||
}, |
||||
mounted(){ |
||||
|
||||
}, |
||||
methods: { |
||||
|
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
.copyright{ |
||||
padding: 20px 0; |
||||
color: rgba(0, 0, 0, 0.45); |
||||
font-size: 12px; |
||||
text-align: center; |
||||
} |
||||
</style> |
@ -1,414 +0,0 @@ |
||||
<template> |
||||
<div> |
||||
<div> |
||||
<!-- <p class="side_icon mab20"> |
||||
<i class="icon-jiahao mar20" @click="addMajor()"></i> --> |
||||
<!-- <i class="icon-delete"></i> --> |
||||
<!-- </p> --> |
||||
<lctree :data="majorList" |
||||
@addMajor="addMajor" @editmajorClass="editmajorClass" @delClassDepartment="delClassDepartment" |
||||
@addClassDepartment="addClassDepartment" @editDepartment="editDepartment" @delDepart="delDepart" |
||||
@addClass="addClass" @editClass="editClass" @delClass="delClass" |
||||
@fircheckitem="fircheckitem" @twocheckitem="twocheckitem" @threecheckitem="threecheckitem" |
||||
></lctree> |
||||
</div> |
||||
|
||||
<!-- 添加专业 --> |
||||
<el-dialog :title="Form.classmajorId ? '编辑专业' : '新增专业'" :visible.sync="isaddClassMajor" width="24%" center @close="closeAddClass" :close-on-click-modal="false"> |
||||
<el-form ref="Form" :model="Form"> |
||||
<el-form-item prop="classmajorName"> |
||||
<el-input placeholder="请输入专业名称" v-model="Form.classmajorName" @change="majorChange"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="isaddClassMajor = false">取消</el-button> |
||||
<el-button type="primary" @click="sure">确定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
|
||||
<!-- 添加年级 --> |
||||
<el-dialog :title="Form2.departmentId ? '编辑年级' : '新增年级'" :visible.sync="isAddDepartment" width="24%" center @close="closeAddClass2" :close-on-click-modal="false"> |
||||
<el-form ref="Form2" :model="Form2"> |
||||
<el-form-item prop="departmentName"> |
||||
<el-input placeholder="请输入年级名称" v-model.number="Form2.departmentName"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="isAddDepartment = false">取消</el-button> |
||||
<el-button type="primary" @click="sureDepartment">确定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
|
||||
<!-- 添加班级 --> |
||||
<el-dialog :title="Form3.classId ? '编辑班级' : '新增班级'" :visible.sync="isAddClass" width="24%" center @close="closeAddClass3" :close-on-click-modal="false"> |
||||
<el-form ref="Form3" :model="Form3"> |
||||
<el-form-item prop="className"> |
||||
<el-input placeholder="请输入班级名称" v-model.number="Form3.className"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="isAddClass = false">取消</el-button> |
||||
<el-button type="primary" @click="sureClass('Form3')">确定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
import lctree from './studentTree' |
||||
import { mapState } from 'vuex' |
||||
export default { |
||||
props:["Data"], |
||||
data() { |
||||
return { |
||||
majorList: [], |
||||
firactive: 0, |
||||
twoactive: 0, |
||||
threeactive: 0, |
||||
isaddClassMajor: false, |
||||
isAddDepartment: false, |
||||
isAddClass: false, |
||||
Form: { |
||||
classmajorId: '', |
||||
classmajorName: '', |
||||
}, |
||||
Form2: { |
||||
departmentId: '', |
||||
departmentName: '', |
||||
}, |
||||
Form3: { |
||||
classId: '', |
||||
className: '' |
||||
}, |
||||
majorNoAdd: true, |
||||
}; |
||||
}, |
||||
computed: { |
||||
...mapState('user', [ |
||||
'userId','clientId' |
||||
]) |
||||
}, |
||||
components: { |
||||
lctree |
||||
}, |
||||
mounted(){ |
||||
this.getStaff() |
||||
}, |
||||
methods: { |
||||
getStaff(){ |
||||
let data = { |
||||
schoolId: this.clientId |
||||
} |
||||
this.$get(this.api.queryStudentProfessionalArchitecture,data).then(res => { |
||||
let StaffProfessionalArchitectureList = res.data.StaffProfessionalArchitectureList |
||||
StaffProfessionalArchitectureList.map(e => { |
||||
(e.ifVisible = false), (e.ischeck = false), (e.label = e.stuProfessionalArchitectureName); |
||||
let data = { |
||||
stuProfessionalArchitectureId: e.stuProfessionalArchitectureId |
||||
} |
||||
this.$get(this.api.queryGrade,data).then(res => { |
||||
e.children = res.data.Grade |
||||
e.children.map(e => { |
||||
(e.ifVisible = false), (e.ischeck = false), (e.label = e.gradeName); |
||||
let data = { |
||||
gradeId: e.gradeId |
||||
} |
||||
this.$get(this.api.queryClass,data).then(res => { |
||||
res.data.Class.map(e => { |
||||
(e.ifVisible = false), (e.ischeck = false), (e.label = e.className); |
||||
}) |
||||
e.children = res.data.Class |
||||
}).catch(res => {}); |
||||
}) |
||||
}).catch(res => {}); |
||||
}) |
||||
setTimeout(() => { |
||||
this.majorList = StaffProfessionalArchitectureList |
||||
this.majorList[0].ifVisible = true |
||||
}, 500) |
||||
}).catch(res => {}) |
||||
}, |
||||
// 选择专业 |
||||
fircheckitem(item){ |
||||
this.$emit("fircheck",item,this.majorList) |
||||
}, |
||||
// 选择年级 |
||||
twocheckitem(item){ |
||||
this.$emit("twocheck",item,this.majorList) |
||||
}, |
||||
threeClick(index){ |
||||
this.threeactive = index |
||||
}, |
||||
// 选择班级 |
||||
threecheckitem(three){ |
||||
this.$emit("threecheck",three,this.majorList) |
||||
}, |
||||
closeAddClass(){ |
||||
this.$refs.Form.resetFields() |
||||
}, |
||||
closeAddClass2(){ |
||||
this.$refs.Form2.resetFields() |
||||
}, |
||||
closeAddClass3(){ |
||||
this.$refs.Form3.resetFields() |
||||
}, |
||||
// 新增编辑专业 |
||||
addMajor(){ |
||||
this.Form.classmajorId = '' |
||||
this.Form.classmajorName = '' |
||||
this.isaddClassMajor = true |
||||
}, |
||||
editmajorClass(item){ |
||||
console.log(item) |
||||
this.Form.classmajorId = item.stuProfessionalArchitectureId, |
||||
this.Form.classmajorName = item.stuProfessionalArchitectureName |
||||
this.isaddClassMajor = true |
||||
}, |
||||
delClassDepartment(item,index){ |
||||
this.$confirm('确定要删除该专业吗?', '提示', { |
||||
type: 'warning' |
||||
}) |
||||
.then(() => { |
||||
this.$post(`${this.api.deleteStudentProfessionalArchitecture}?studentProfessionalArchitectureIds=${item.stuProfessionalArchitectureId}`).then(res => { |
||||
this.$message.success('删除成功'); |
||||
this.majorList.splice(index, 1) |
||||
}).catch(res => {}) |
||||
}) |
||||
.catch(() => {}) |
||||
}, |
||||
sure(){ |
||||
if(!this.Form.classmajorName) return this.$message.warning('请输入专业名称'); |
||||
if(!this.majorNoAdd) return this.$message.warning('该专业名称已存在'); |
||||
let data = { |
||||
stuProfessionalArchitectureName: this.Form.classmajorName, |
||||
stuProfessionalArchitectureId: this.Form.classmajorId, |
||||
schoolId: this.clientId |
||||
} |
||||
if(this.Form.classmajorId){ |
||||
this.$post(this.api.updateStudentProfessionalArchitecture,data).then(res => { |
||||
this.$message.success('编辑成功'); |
||||
this.isaddClassMajor = false |
||||
this.majorList.map(e =>{ |
||||
if(e.stuProfessionalArchitectureId == this.Form.classmajorId){ |
||||
e.stuProfessionalArchitectureName = this.Form.classmajorName |
||||
e.label = this.Form.classmajorName |
||||
} |
||||
}) |
||||
this.$emit('getData') |
||||
}).catch(res => {}) |
||||
}else{ |
||||
this.$post(this.api.addStudentProfessionalArchitecture,data).then(res => { |
||||
this.$message.success('添加成功'); |
||||
this.isaddClassMajor = false |
||||
let newData = { |
||||
stuProfessionalArchitectureId: res.data.studentProfessionalArchitectureId, |
||||
stuProfessionalArchitectureName : this.Form.classmajorName, |
||||
label: this.Form.classmajorName, |
||||
ifVisible: false, |
||||
ischeck: false, |
||||
children: [] |
||||
} |
||||
this.majorList.push(newData) |
||||
}).catch(res => {}) |
||||
} |
||||
|
||||
}, |
||||
// 新增编辑年级 |
||||
addClassDepartment(item){ |
||||
this.Form2.departmentId = '' |
||||
this.Form2.departmentName = '' |
||||
this.isAddDepartment = true |
||||
this.Form.classmajorId = item.stuProfessionalArchitectureId |
||||
}, |
||||
editDepartment(item){ |
||||
this.Form2.departmentId = item.gradeId, |
||||
this.Form2.departmentName = item.gradeName |
||||
this.isAddDepartment = true |
||||
for (let j = 0; j < this.majorList.length; j++) { |
||||
for (let k = 0; k < this.majorList[j].children.length; k++) { |
||||
if(this.majorList[j].children[k].gradeName == item.gradeName){ |
||||
this.Form.classmajorId = this.majorList[j].stuProfessionalArchitectureId |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
delDepart(item,index){ |
||||
console.log(item) |
||||
this.$confirm('确定要删除该年级吗?', '提示', { |
||||
type: 'warning' |
||||
}) |
||||
.then(() => { |
||||
this.$post(`${this.api.deleteGrade}?gradeIds=${item.gradeId}`).then(res => { |
||||
this.$message.success('删除成功'); |
||||
|
||||
this.majorList.map(e =>{ |
||||
e.children.map(r =>{ |
||||
if(r.gradeId == item.gradeId){ |
||||
e.children.splice(index,1) |
||||
if(e.children.length == 0){ |
||||
e.ifVisible = false |
||||
} |
||||
} |
||||
}) |
||||
}) |
||||
}).catch(res => {}) |
||||
}) |
||||
.catch(() => {}); |
||||
}, |
||||
sureDepartment(){ |
||||
if(!this.Form2.departmentName) return this.$message.warning('请输入年级名称') |
||||
if(isNaN(this.Form2.departmentName)) return this.$message.warning('年级名称必须为数字') |
||||
let data = { |
||||
gradeName: this.Form2.departmentName, |
||||
gradeId: this.Form2.departmentId, |
||||
stuProfessionalArchitectureId: this.Form.classmajorId, |
||||
} |
||||
if(this.Form2.departmentId){ |
||||
this.$post(this.api.updateGrade,data).then(res => { |
||||
this.$message.success('编辑成功'); |
||||
this.isAddDepartment = false |
||||
this.majorList.map(e =>{ |
||||
e.children.map(r =>{ |
||||
if(r.gradeId == this.Form2.departmentId){ |
||||
r.gradeName = this.Form2.departmentName |
||||
r.label = this.Form2.departmentName |
||||
} |
||||
}) |
||||
}) |
||||
this.$emit('getData') |
||||
}).catch(res => {}) |
||||
}else{ |
||||
this.$post(this.api.addGrade,data).then(res => { |
||||
this.$message.success('添加成功'); |
||||
this.isAddDepartment = false |
||||
let newData = { |
||||
gradeId: res.data.gradeId, |
||||
gradeName: this.Form2.departmentName, |
||||
label: this.Form2.departmentName, |
||||
ifVisible: false, |
||||
ischeck: false, |
||||
children: [] |
||||
} |
||||
this.majorList.map(e =>{ |
||||
if(e.stuProfessionalArchitectureId == this.Form.classmajorId){ |
||||
e.ifVisible = true |
||||
e.children.push(newData) |
||||
} |
||||
}) |
||||
}).catch(res => {}) |
||||
} |
||||
|
||||
}, |
||||
async majorChange(){ |
||||
let res = await this.$get(this.api.queryStudentPAN, { name: this.Form.classmajorName,schoolId: this.clientId }); |
||||
if(res.data.StaffProfessionalArchitecture != null){ |
||||
this.$message.warning('该专业组织已存在'); |
||||
this.majorNoAdd = false |
||||
}else{ |
||||
this.majorNoAdd = true |
||||
} |
||||
}, |
||||
// 新增编辑班级 |
||||
addClass(two){ |
||||
this.Form3.classId = '' |
||||
this.Form3.className = '' |
||||
this.isAddClass = true |
||||
this.Form2.departmentId = two.gradeId |
||||
}, |
||||
editClass(three){ |
||||
console.log(33,three) |
||||
this.Form3.classId = three.classId, |
||||
this.Form3.className = three.className |
||||
this.isAddClass = true |
||||
for (let j = 0; j < this.majorList.length; j++) { |
||||
for (let k = 0; k < this.majorList[j].children.length; k++) { |
||||
for(let l = 0; l < this.majorList[j].children[k].children.length; l++){ |
||||
if(this.majorList[j].children[k].children[l].className == three.className){ |
||||
this.Form2.departmentId = this.majorList[j].gradeId |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
delClass(item,index){ |
||||
console.log(item) |
||||
this.$confirm('确定要删除该班级吗?', '提示', { |
||||
type: 'warning' |
||||
}) |
||||
.then(() => { |
||||
this.$post(`${this.api.deleteClass}?classIds=${item.classId}`).then(res => { |
||||
this.$message.success('删除成功'); |
||||
this.majorList.map(e =>{ |
||||
e.children.map(r =>{ |
||||
r.children.map(c =>{ |
||||
if(c.classId == item.classId){ |
||||
r.children.splice(index,1) |
||||
if(r.children.length == 0){ |
||||
r.ifVisible = false |
||||
} |
||||
} |
||||
}) |
||||
}) |
||||
}) |
||||
}).catch(res => {}) |
||||
}) |
||||
.catch(() => {}); |
||||
}, |
||||
sureClass(){ |
||||
if(!this.Form3.className) return this.$message.warning('请输入班级名称') |
||||
// if(isNaN(this.Form3.className)) return this.$message.warning('班级名称必须为数字') |
||||
let data = { |
||||
className: this.Form3.className, |
||||
classId: this.Form3.classId, |
||||
gradeId: this.Form2.departmentId |
||||
} |
||||
if(this.Form3.classId){ |
||||
this.$post(this.api.updateClass,data).then(res => { |
||||
this.$message.success('编辑成功'); |
||||
this.isAddClass = false |
||||
this.majorList.map(e =>{ |
||||
e.children.map(r =>{ |
||||
r.children.map(c =>{ |
||||
if(c.classId == this.Form3.classId){ |
||||
c.className = this.Form3.className |
||||
c.label = this.Form3.className |
||||
} |
||||
}) |
||||
}) |
||||
}) |
||||
this.$emit('getData') |
||||
}).catch(res => {}) |
||||
}else{ |
||||
this.$post(this.api.addClass,data).then(res => { |
||||
this.$message.success('添加成功'); |
||||
this.isAddClass = false |
||||
let newData = { |
||||
classId: res.data.classId, |
||||
className: this.Form3.className, |
||||
label: this.Form3.className, |
||||
ifVisible: false, |
||||
ischeck: false |
||||
} |
||||
this.majorList.map(e =>{ |
||||
e.children.map(r =>{ |
||||
if(r.gradeId == this.Form2.departmentId){ |
||||
r.ifVisible = true |
||||
if(r.children.length == 0){ |
||||
let arr = [] |
||||
arr.push(newData) |
||||
r.children = arr |
||||
}else{ |
||||
r.children.push(newData) |
||||
} |
||||
} |
||||
}) |
||||
}) |
||||
}).catch(res => {}) |
||||
} |
||||
|
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
|
||||
</style> |
@ -1,155 +0,0 @@ |
||||
<template> |
||||
<div class="side_view"> |
||||
<p class="side_icon mab20"> |
||||
<i class="icon-jiahao mar20" @click="addMajor()"></i> |
||||
</p> |
||||
<div class="side_tree" @click.stop="open(item)" v-for="(item,index) in data" :key="index"> |
||||
<div class="item" @click.stop="open(item)"> |
||||
<img |
||||
v-if="item.children&&item.children.length!=0" |
||||
:class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}" |
||||
src="../../../assets/img/icon-xiangyou.png" |
||||
alt |
||||
/> |
||||
<i v-else class="empty"></i> |
||||
<i :class="item.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fircheckitem(item)"></i> |
||||
<span>{{item.label}}</span> |
||||
<i class="edit ft" @click.stop="editmajorClass(item)"></i> |
||||
<i class="el-icon-circle-plus ft" @click.stop="addClassDepartment(item)"></i> |
||||
<i class="icon-delete ft" @click.stop="delClassDepartment(item,index)"></i> |
||||
</div> |
||||
|
||||
<div v-show="item.ifVisible" v-if="item.children&&item.children.length!=0"> |
||||
<div v-for="(item1,index1) in item.children" :key="index1"> |
||||
<div class="item1" @click.stop="open(item1)"> |
||||
<img |
||||
v-if="item1.children&&item1.children.length!=0" |
||||
:class="{ 'arrowTransform': !item1.ifVisible, 'arrowTransformReturn': item1.ifVisible}" |
||||
src="../../../assets/img/icon-xiangyou.png" |
||||
alt |
||||
/> |
||||
<i v-else class="empty"></i> |
||||
<i :class="item1.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="twocheckitem(item1)"></i> |
||||
<span>{{item1.label}}年级</span> |
||||
<i class="edit ft" @click.stop="editDepartment(item1)"></i> |
||||
<i class="el-icon-circle-plus ft" @click.stop="addClass(item1)"></i> |
||||
<i class="icon-delete ft" @click.stop="delDepart(item1,index1)"></i> |
||||
</div> |
||||
|
||||
<div v-show="item1.ifVisible" v-if="item1.children&&item1.children.length!=0"> |
||||
<div v-for="(item2,index2) in item1.children" :key="index2"> |
||||
<div class="item2" @click.stop="open(item2)"> |
||||
<i :class="item2.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="threecheckitem(item2)"></i> |
||||
<span>{{item2.label}}班</span> |
||||
<i class="edit ft" @click.stop="editClass(item2)"></i> |
||||
<i class="icon-delete ft" @click.stop="delClass(item2,index2)"></i> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
Array.prototype.removeByValue = function (val) { |
||||
for (var i = 0; i < this.length; i++) { |
||||
if (JSON.stringify(this[i]).indexOf(JSON.stringify(val)) != -1) { |
||||
this.splice(i, 1); |
||||
break; |
||||
} |
||||
} |
||||
}; |
||||
export default { |
||||
data() { |
||||
return { |
||||
chooseList: [] |
||||
}; |
||||
}, |
||||
watch: { |
||||
chooseList(n, o) { |
||||
this.$emit('chooseNode', n); |
||||
} |
||||
}, |
||||
|
||||
props: { |
||||
data: { |
||||
type: Array |
||||
} |
||||
}, |
||||
methods: { |
||||
//点击节点时伸展或收缩列表 |
||||
open(item) { |
||||
item.ifVisible = !item.ifVisible; |
||||
}, |
||||
|
||||
//选中叶子节点时将选中的叶子节点添加进数组,如果叶子节点存在则删除,removeByvalue函数定义在main.js中 |
||||
choose(item) { |
||||
item.ifVisible = !item.ifVisible; |
||||
if (item.ifVisible) { |
||||
this.chooseList.push(item); |
||||
} else { |
||||
this.chooseList.removeByValue(item); |
||||
} |
||||
}, |
||||
fircheckitem(item){ |
||||
this.$emit('fircheckitem',item); |
||||
}, |
||||
twocheckitem(item){ |
||||
this.$emit('twocheckitem',item); |
||||
}, |
||||
threecheckitem(item){ |
||||
this.$emit('threecheckitem',item); |
||||
}, |
||||
// 专业 |
||||
addMajor(){ |
||||
this.$emit('addMajor'); |
||||
}, |
||||
editmajorClass(item){ |
||||
this.$emit('editmajorClass',item); |
||||
}, |
||||
delClassDepartment(item,index){ |
||||
this.$emit('delClassDepartment',item,index); |
||||
}, |
||||
// 年级 |
||||
addClassDepartment(item){ |
||||
this.$emit('addClassDepartment',item); |
||||
}, |
||||
editDepartment(item){ |
||||
this.$emit('editDepartment',item); |
||||
}, |
||||
delDepart(item,index){ |
||||
this.$emit('delDepart',item,index); |
||||
}, |
||||
// 班级 |
||||
addClass(item){ |
||||
this.$emit('addClass',item); |
||||
}, |
||||
editClass(item){ |
||||
this.$emit('editClass',item); |
||||
}, |
||||
delClass(item,index){ |
||||
this.$emit('delClass',item,index); |
||||
}, |
||||
//判断数组中是否包含某个对象 |
||||
isHasObj(arr, val) { |
||||
var flag = 0; //1为有 0为没有 |
||||
for (var i = 0; i < arr.length; i++) { |
||||
if (JSON.stringify(arr[i]).indexOf(JSON.stringify(val)) != -1) { |
||||
flag = 1; |
||||
} |
||||
} |
||||
if (flag == 1) { |
||||
return true; |
||||
} else { |
||||
return false; |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
@import '../../../styles/pages/tree.scss'; |
||||
</style> |
@ -0,0 +1,277 @@ |
||||
<template> |
||||
<div> |
||||
<div class="tool"> |
||||
<ul class="filter"></ul> |
||||
<div> |
||||
<el-button type="primary" size="small" round @click="addMajor" v-auth="'/system/list:架构管理:新增架构'">新增架构</el-button> |
||||
</div> |
||||
</div> |
||||
|
||||
<el-table :data="listData" stripe header-align="center" row-key="id" :tree-props="treeProps" :indent="9"> |
||||
<el-table-column prop="label" label="架构名称"> |
||||
<template slot-scope="scope"> |
||||
<span class="text">{{scope.row.label}}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" width="200" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-button type="text" @click="edit(scope.row)" v-auth="'/system/list:架构管理:编辑'">编辑</el-button> |
||||
<el-button v-if="scope.row.isParent" type="text" @click="addDepartment(scope.row)" v-auth="'/system/list:架构管理:添加'">添加</el-button> |
||||
<el-button type="text" @click="del(scope.row)" v-auth="'/system/list:架构管理:删除'">删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
|
||||
<el-dialog :title="Form.MajorId ? '编辑名称' : '新增架构'" :visible.sync="isaddMajor" width="460px" @close="closeAdd" :close-on-click-modal="false"> |
||||
<el-form ref="Form" :model="Form"> |
||||
<el-form-item prop="majorName"> |
||||
<el-input :placeholder="Form.MajorId ? '请编辑架构名称' : '请输入架构名称'" v-model="Form.majorName" @change="majorChange"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button size="small" @click="isaddMajor = false">取 消</el-button> |
||||
<el-button size="small" type="primary" @click="sure('Form')">确 定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
|
||||
<el-dialog :title="Form.departmentId ? '编辑部门' : '新增部门'" :visible.sync="isAddDepartment" width="460px" @close="closeAdd" :close-on-click-modal="false"> |
||||
<el-form ref="Form" :model="Form"> |
||||
<el-form-item prop="departmentName"> |
||||
<el-input placeholder="请输入部门名称" v-model="Form.departmentName" @change="depChange"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button size="small" @click="isAddDepartment = false">取 消</el-button> |
||||
<el-button size="small" type="primary" @click="sureDepartment('Form')">确 定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import { mapState } from 'vuex' |
||||
import util from '@/libs/util' |
||||
export default { |
||||
name: 'organization', |
||||
data() { |
||||
return { |
||||
treeProps: {children: 'children', hasChildren: 'hasChildren'}, |
||||
listData: [], |
||||
isaddMajor: false, |
||||
isAddDepartment: false, |
||||
Form: { |
||||
MajorId: '', |
||||
majorName: '', |
||||
departmentId: '', |
||||
departmentName: '' |
||||
}, |
||||
staffstateProfessId: '', |
||||
staffstateId: '', |
||||
majorNoAdd: true, |
||||
depNoAdd: true |
||||
}; |
||||
}, |
||||
computed: { |
||||
...mapState('user', [ |
||||
'clientId','clientName' |
||||
]), |
||||
}, |
||||
mounted() { |
||||
this.getData() |
||||
}, |
||||
methods: { |
||||
getData(){ |
||||
let data = { |
||||
schoolId: this.clientId |
||||
} |
||||
this.$get(this.api.queryStaffPro,data).then(res => { |
||||
let firList = res.data.StaffProfessionalArchitectureList |
||||
if(firList){ |
||||
firList.map(e => { |
||||
e.isParent = true |
||||
e.id = e.staffProfessionalArchitectureId |
||||
e.label = e.staffProfessionalArchitectureName |
||||
let data = { |
||||
staffProfessionalArchitectureId: e.staffProfessionalArchitectureId |
||||
} |
||||
this.$get(this.api.queryStaffGrade,data).then(res1 => { |
||||
res1.data.staffGradeList.map(e => { |
||||
e.id = e.staffGradeId |
||||
e.label = e.staffGradeName |
||||
}) |
||||
e.children = res1.data.staffGradeList |
||||
}).catch(res => {}) |
||||
}) |
||||
setTimeout(() => { |
||||
this.listData = firList |
||||
},500) |
||||
} |
||||
}).catch(res => {}) |
||||
}, |
||||
addMajor(){ |
||||
this.Form.MajorId = '' |
||||
this.Form.majorName = '' |
||||
this.isaddMajor = true |
||||
}, |
||||
edit(item){ |
||||
if(item.isParent){ |
||||
this.Form.MajorId = item.staffProfessionalArchitectureId, |
||||
this.Form.majorName = item.staffProfessionalArchitectureName |
||||
this.isaddMajor = true |
||||
}else{ |
||||
this.Form.departmentId = item.staffGradeId, |
||||
this.Form.departmentName = item.staffGradeName |
||||
this.isAddDepartment = true |
||||
for (let j = 0; j < this.listData.length; j++) { |
||||
for (let k = 0; k < this.listData[j].children.length; k++) { |
||||
if(this.listData[j].children[k].staffGradeId == item.staffGradeId){ |
||||
this.Form.MajorId = this.listData[j].staffProfessionalArchitectureId |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
async majorChange(){ |
||||
let res = await this.$get(this.api.queryStaffPAN, { name: this.Form.majorName,schoolId: this.schoolId }); |
||||
if(res.data.StaffProfessionalArchitecture != null){ |
||||
util.warningMsg('该一级部门已存在'); |
||||
this.majorNoAdd = false |
||||
}else{ |
||||
this.majorNoAdd = true |
||||
} |
||||
}, |
||||
async depChange(){ |
||||
let res = await this.$get(this.api.queryStaffName, { staffGradeName: this.Form.departmentName,staffProfessionalArchitectureId: this.Form.MajorId }); |
||||
if(res.data.staffGrade != null){ |
||||
util.warningMsg('该二级部门已存在'); |
||||
this.depNoAdd = false |
||||
}else{ |
||||
this.depNoAdd = true |
||||
} |
||||
}, |
||||
sure(){ |
||||
if(!this.Form.majorName) return util.warningMsg('请输入专业名称') |
||||
if(!this.majorNoAdd) return util.warningMsg('该一级部门已存在') |
||||
let data = { |
||||
staffProfessionalArchitectureName: this.Form.majorName, |
||||
staffProfessionalArchitectureId: this.Form.MajorId, |
||||
schoolId: this.schoolId, |
||||
} |
||||
if(this.Form.MajorId){ |
||||
this.$post(this.api.updateStaffPro,data).then(res => { |
||||
util.successMsg('编辑成功') |
||||
this.isaddMajor = false |
||||
this.getData() |
||||
}).catch(res => {}) |
||||
}else{ |
||||
this.$post(this.api.addStaffPro,data).then(res => { |
||||
util.successMsg('添加成功') |
||||
this.isaddMajor = false |
||||
this.getData() |
||||
}).catch(res => {}) |
||||
} |
||||
}, |
||||
// 新增编辑部门 |
||||
addDepartment(item){ |
||||
this.Form.departmentId = '' |
||||
this.Form.departmentName = '' |
||||
this.isAddDepartment = true |
||||
this.Form.MajorId = item.staffProfessionalArchitectureId |
||||
}, |
||||
sureDepartment(Form){ |
||||
if(!this.Form.departmentName) return util.warningMsg('请输入部门名称'); |
||||
if(!this.depNoAdd) return util.warningMsg('该二级部门已存在'); |
||||
let data = { |
||||
schoolId: this.schoolId, |
||||
staffGradeName: this.Form.departmentName, |
||||
staffProfessionalArchitectureId: this.Form.MajorId, |
||||
staffGradeId: this.Form.departmentId |
||||
} |
||||
if(this.Form.departmentId){ |
||||
this.$post(this.api.updateStaffGrade,data).then(res => { |
||||
util.successMsg('编辑成功') |
||||
this.isAddDepartment = false |
||||
this.getData() |
||||
}).catch(res => {}) |
||||
}else{ |
||||
this.$post(this.api.addStaffGrade,data).then(res => { |
||||
util.successMsg('添加成功') |
||||
this.isAddDepartment = false |
||||
this.getData() |
||||
}).catch(res => {}) |
||||
} |
||||
}, |
||||
closeAdd(){ |
||||
this.$refs.Form.resetFields() |
||||
}, |
||||
del(item){ |
||||
if(item.isParent){ |
||||
this.$confirm('确定要删除该专业吗?', '提示', { |
||||
type: 'warning' |
||||
}) |
||||
.then(() => { |
||||
this.$post(`${this.api.deleteStaffPro}?staffProfessionalArchitectureIds=${item.staffProfessionalArchitectureId}`).then(res => { |
||||
this.getData() |
||||
util.successMsg('删除成功') |
||||
}).catch(res => {}) |
||||
}).catch(() => {}) |
||||
}else{ |
||||
this.$confirm('确定要删除该部门吗?', '提示', { |
||||
type: 'warning' |
||||
}) |
||||
.then(() => { |
||||
this.$post(`${this.api.deleteStaffGrade}?staffGradeIds=${item.staffGradeId}`).then(res => { |
||||
this.getData() |
||||
util.successMsg('删除成功') |
||||
}).catch(res => {}) |
||||
}).catch(() => {}) |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
/deep/.el-table{ |
||||
th:first-child{ |
||||
.cell{ |
||||
&:before{ |
||||
content: ''; |
||||
display: inline-block; |
||||
padding-left: 25vw; |
||||
} |
||||
} |
||||
} |
||||
.el-table__body-wrapper{ |
||||
td:first-child{ |
||||
.cell{ |
||||
display: flex; |
||||
justify-content: flex-end; |
||||
align-items: center; |
||||
flex-direction: row-reverse; |
||||
i{ |
||||
font-size: 16px; |
||||
} |
||||
.text{ |
||||
&:before{ |
||||
content: ''; |
||||
display: inline-block; |
||||
padding-left: 25vw; |
||||
} |
||||
} |
||||
.el-table__placeholder + .text{ |
||||
&:before{ |
||||
padding-left: 26vw; |
||||
} |
||||
} |
||||
.el-table__expand-icon{ |
||||
transform: rotate(90deg); |
||||
&.el-table__expand-icon--expanded{ |
||||
transform: rotate(-90deg); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</style> |
@ -1,301 +0,0 @@ |
||||
<template> |
||||
<div> |
||||
<div class="side_view second"> |
||||
<p class="side_icon"> |
||||
<i class="icon-jiahao" @click="addMajor"></i> |
||||
<!-- <i class="icon-delete"></i> --> |
||||
</p> |
||||
<div class="side_tree" @click.stop="open(item)" v-for="(item,index) in majorList" :key="index"> |
||||
<div class="item" @click.stop="open(item)"> |
||||
<!-- <i :class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}" class="icon-shixiangyoujiantou-"></i> --> |
||||
<img |
||||
v-if="item.children&&item.children.length!=0" |
||||
:class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}" |
||||
src="../../../assets/img/icon-xiangyou.png" |
||||
alt |
||||
/> |
||||
<i v-else class="empty"></i> |
||||
<i :class="item.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fircheckitem(item)"></i> |
||||
<span @click.stop="fircheckitem(item)">{{item.staffProfessionalArchitectureName}}</span> |
||||
<i class="edit ft" @click.stop="editMajor(item)"></i> |
||||
<i class="el-icon-circle-plus ft" @click.stop="addDepartment(item)"></i> |
||||
<i class="icon-delete ft" @click.stop="delMajor(item,index)"></i> |
||||
</div> |
||||
|
||||
<div v-show="item.ifVisible" v-if="item.children&&item.children.length!=0"> |
||||
<div v-for="(item1,index1) in item.children" :key="index1"> |
||||
<div class="item2" @click.stop="open(item1)"> |
||||
<i :class="item1.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="twocheckitem(item1)"></i> |
||||
<span @click.stop="twocheckitem(item1)">{{item1.label}}</span> |
||||
<i class="edit ft" @click.stop="editDepartment(item1)"></i> |
||||
<i class="icon-delete ft" @click.stop="delDepartment(item1,index1)"></i> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- 添加专业 --> |
||||
<el-dialog :title="Form.MajorId ? '编辑专业' : '新增专业'" :visible.sync="isaddMajor" width="24%" center @close="closeAdd" :close-on-click-modal="false"> |
||||
<el-form ref="Form" :model="Form"> |
||||
<el-form-item prop="majorName"> |
||||
<el-input placeholder="请输入专业名称" v-model="Form.majorName" @change="majorChange"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="isaddMajor = false">取 消</el-button> |
||||
<el-button type="primary" @click="sure('Form')">确 定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
|
||||
<!-- 添加部门 --> |
||||
<el-dialog :title="Form.departmentId ? '编辑部门' : '新增部门'" :visible.sync="isAddDepartment" width="24%" center @close="closeAdd" :close-on-click-modal="false"> |
||||
<el-form ref="Form" :model="Form"> |
||||
<el-form-item prop="departmentName"> |
||||
<el-input placeholder="请输入部门名称" v-model="Form.departmentName" @change="depChange"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="isAddDepartment = false">取 消</el-button> |
||||
<el-button type="primary" @click="sureDepartment('Form')">确 定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
import { mapState } from 'vuex'; |
||||
export default { |
||||
props:["Data"], |
||||
data() { |
||||
return { |
||||
majorList: [], |
||||
firactive: 0, |
||||
twoactive: 0, |
||||
isaddMajor: false, |
||||
isAddDepartment: false, |
||||
Form: { |
||||
MajorId: '', |
||||
majorName: '', |
||||
departmentId: '', |
||||
departmentName: '' |
||||
}, |
||||
staffstateProfessId: '', |
||||
staffstateId: '', |
||||
majorNoAdd: true, |
||||
depNoAdd: true |
||||
}; |
||||
}, |
||||
computed: { |
||||
...mapState('user', [ |
||||
'clientId','clientName' |
||||
]) |
||||
}, |
||||
mounted(){ |
||||
this.getStaff() |
||||
}, |
||||
methods: { |
||||
getStaff(majorIds){ |
||||
let data = { |
||||
schoolId: this.clientId |
||||
} |
||||
this.$get(this.api.queryStaffPro,data).then(res => { |
||||
let firList = res.data.StaffProfessionalArchitectureList |
||||
if(firList){ |
||||
firList.map(e => { |
||||
(e.ifVisible = false), (e.ischeck = false), (e.label = e.staffProfessionalArchitectureName); |
||||
majorIds && majorIds.includes(e.staffProfessionalArchitectureId) && (e.ifVisible = true) |
||||
let data = { |
||||
staffProfessionalArchitectureId: e.staffProfessionalArchitectureId |
||||
} |
||||
this.$get(this.api.queryStaffGrade,data).then(res1 => { |
||||
res1.data.staffGradeList.map(e => { |
||||
(e.ischeck = false), (e.label = e.staffGradeName); |
||||
}) |
||||
e.children = res1.data.staffGradeList |
||||
}).catch(res1 => {}); |
||||
}) |
||||
} |
||||
setTimeout(() => { |
||||
this.majorList = firList |
||||
majorIds || (this.majorList[0].ifVisible = true) |
||||
}, 500); |
||||
}).catch(res => {}); |
||||
}, |
||||
//点击节点时伸展或收缩列表 |
||||
open(item) { |
||||
item.ifVisible = !item.ifVisible; |
||||
}, |
||||
|
||||
//选中叶子节点时将选中的叶子节点添加进数组,如果叶子节点存在则删除,removeByvalue函数定义在main.js中 |
||||
choose(item) { |
||||
item.ifVisible = !item.ifVisible; |
||||
if (item.ifVisible) { |
||||
this.chooseList.push(item); |
||||
} else { |
||||
this.chooseList.removeByValue(item); |
||||
} |
||||
}, |
||||
// 选择专业 |
||||
fircheckitem(item){ |
||||
this.$emit("fircheck",item,this.majorList) |
||||
}, |
||||
// 选择部门 |
||||
twocheckitem(item){ |
||||
item.ischeck = !item.ischeck |
||||
this.majorList.forEach( e => { |
||||
e.children.forEach( r => { |
||||
if(r.staffGradeId == item.staffGradeId){ |
||||
if(e.children.every(i => i.ischeck)){ |
||||
e.ischeck = true |
||||
}else{ |
||||
e.ischeck = false |
||||
} |
||||
} |
||||
}) |
||||
}) |
||||
this.$emit("twocheck",item,this.majorList) |
||||
}, |
||||
closeAdd(){ |
||||
this.$refs.Form.resetFields() |
||||
}, |
||||
// 新增编辑专业 |
||||
addMajor(){ |
||||
this.Form.MajorId = '' |
||||
this.Form.majorName = '' |
||||
this.isaddMajor = true |
||||
}, |
||||
editMajor(item){ |
||||
this.Form.MajorId = item.staffProfessionalArchitectureId, |
||||
this.Form.majorName = item.staffProfessionalArchitectureName |
||||
this.isaddMajor = true |
||||
}, |
||||
async majorChange(){ |
||||
let res = await this.$get(this.api.queryStaffPAN, { name: this.Form.majorName,schoolId: this.clientId }); |
||||
if(res.data.StaffProfessionalArchitecture != null){ |
||||
this.$message.warning('该一级部门已存在'); |
||||
this.majorNoAdd = false |
||||
}else{ |
||||
this.majorNoAdd = true |
||||
} |
||||
}, |
||||
async depChange(){ |
||||
let res = await this.$get(this.api.queryStaffName, { staffGradeName: this.Form.departmentName,staffProfessionalArchitectureId: this.Form.MajorId }); |
||||
if(res.data.staffGrade != null){ |
||||
this.$message.warning('该二级部门已存在'); |
||||
this.depNoAdd = false |
||||
}else{ |
||||
this.depNoAdd = true |
||||
} |
||||
}, |
||||
sure(Form){ |
||||
if(!this.Form.majorName) return this.$message.warning('请输入专业名称'); |
||||
if(!this.majorNoAdd) return this.$message.warning('该一级部门已存在'); |
||||
let data = { |
||||
staffProfessionalArchitectureName: this.Form.majorName, |
||||
staffProfessionalArchitectureId: this.Form.MajorId, |
||||
schoolId: this.clientId, |
||||
} |
||||
if(this.Form.MajorId){ |
||||
this.$post(this.api.updateStaffPro,data).then(res => { |
||||
this.$message.success('编辑成功'); |
||||
this.isaddMajor = false |
||||
this.getStaff() |
||||
this.$emit('getData') |
||||
}).catch(res => {}); |
||||
}else{ |
||||
this.$post(this.api.addStaffPro,data).then(res => { |
||||
this.$message.success('添加成功'); |
||||
this.isaddMajor = false |
||||
this.getStaff() |
||||
}).catch(res => {}); |
||||
} |
||||
}, |
||||
// 新增编辑部门 |
||||
addDepartment(item){ |
||||
this.Form.departmentId = '' |
||||
this.Form.departmentName = '' |
||||
this.isAddDepartment = true |
||||
this.Form.MajorId = item.staffProfessionalArchitectureId |
||||
}, |
||||
editDepartment(item){ |
||||
this.Form.departmentId = item.staffGradeId, |
||||
this.Form.departmentName = item.staffGradeName |
||||
this.isAddDepartment = true |
||||
for (let j = 0; j < this.majorList.length; j++) { |
||||
for (let k = 0; k < this.majorList[j].children.length; k++) { |
||||
if(this.majorList[j].children[k].staffGradeId == item.staffGradeId){ |
||||
this.Form.MajorId = this.majorList[j].staffProfessionalArchitectureId |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
sureDepartment(Form){ |
||||
if(!this.Form.departmentName) return this.$message.warning('请输入部门名称'); |
||||
if(!this.depNoAdd) return this.$message.warning('该二级部门已存在'); |
||||
let data = { |
||||
schoolId: this.clientId, |
||||
staffGradeName: this.Form.departmentName, |
||||
staffProfessionalArchitectureId: this.Form.MajorId, |
||||
staffGradeId: this.Form.departmentId |
||||
} |
||||
if(this.Form.departmentId){ |
||||
this.$post(this.api.updateStaffGrade,data).then(res => { |
||||
this.$message.success('编辑成功'); |
||||
this.isAddDepartment = false |
||||
this.majorList.map(e =>{ |
||||
e.children.map(r =>{ |
||||
if(r.staffGradeId == this.Form.departmentId){ |
||||
r.staffGradeName = this.Form.departmentName |
||||
r.label = this.Form.departmentName |
||||
} |
||||
}) |
||||
}) |
||||
}).catch(res => {}); |
||||
}else{ |
||||
let showMajorIds = this.majorList.map(e => {if(e.ifVisible) return e.staffProfessionalArchitectureId}).filter(n => n) |
||||
this.$post(this.api.addStaffGrade,data).then(res => { |
||||
this.$message.success('添加成功'); |
||||
this.isAddDepartment = false |
||||
this.getStaff(showMajorIds) |
||||
}).catch(res => {}); |
||||
} |
||||
}, |
||||
delMajor(item,index){ |
||||
this.$confirm('确定要删除该专业吗?', '提示', { |
||||
type: 'warning' |
||||
}) |
||||
.then(() => { |
||||
this.$post(`${this.api.deleteStaffPro}?staffProfessionalArchitectureIds=${item.staffProfessionalArchitectureId}`).then(res => { |
||||
this.$message.success('删除成功'); |
||||
this.majorList.splice(index, 1) |
||||
}).catch(res => {}); |
||||
}) |
||||
.catch(() => {}); |
||||
}, |
||||
delDepartment(item,indx){ |
||||
this.$confirm('确定要删除该部门吗?', '提示', { |
||||
type: 'warning' |
||||
}) |
||||
.then(() => { |
||||
this.$post(`${this.api.deleteStaffGrade}?staffGradeIds=${item.staffGradeId}`).then(res => { |
||||
this.$message.success('删除成功'); |
||||
this.majorList.map(e =>{ |
||||
e.children.map(r =>{ |
||||
if(r.staffGradeId == item.staffGradeId){ |
||||
e.children.splice(indx,1) |
||||
if(e.children.length == 0){ |
||||
e.ifVisible = false |
||||
} |
||||
} |
||||
}) |
||||
}) |
||||
}).catch(res => {}) |
||||
}) |
||||
.catch(() => {}) |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
@import '../../../styles/pages/tree.scss'; |
||||
</style> |
@ -0,0 +1,135 @@ |
||||
.title{ |
||||
margin: 0; |
||||
text-align: center; |
||||
font-size: 18px; |
||||
font-weight: 600; |
||||
} |
||||
.metas{ |
||||
display: flex; |
||||
justify-content: center; |
||||
padding-bottom: 24px; |
||||
margin: 24px 0; |
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06); |
||||
.name{ |
||||
font-size: 12px; |
||||
color: #717171; |
||||
} |
||||
.val{ |
||||
font-size: 12px; |
||||
color: #929292; |
||||
} |
||||
} |
||||
.tab{ |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
li{ |
||||
position: relative; |
||||
padding: 0 16px; |
||||
margin-right: 24px; |
||||
font-size: 14px; |
||||
line-height: 30px; |
||||
text-align: center; |
||||
color: rgba(0, 0, 0, 0.65); |
||||
border: 1px solid rgba(0, 0, 0, 0.15); |
||||
border-radius: 4px; |
||||
cursor: pointer; |
||||
&:hover{ |
||||
opacity: .8; |
||||
} |
||||
&.active{ |
||||
color: #CC221C; |
||||
border: 1px solid #CC221C; |
||||
} |
||||
} |
||||
} |
||||
.wrap{ |
||||
height: calc(100vh - 367px); |
||||
margin-top: 24px; |
||||
overflow: auto; |
||||
.item{ |
||||
margin-bottom: 30px; |
||||
border: 1px solid rgba(0, 0, 0, 0.06); |
||||
border-radius: 8px; |
||||
.type{ |
||||
padding: 0 24px; |
||||
margin-top: -1px; |
||||
color: rgba(0, 0, 0, 0.85); |
||||
line-height: 52px; |
||||
font-size: 14px; |
||||
background-color: #F6FFED; |
||||
border: 1px solid #B7EB8F; |
||||
border-top-left-radius: 8px; |
||||
border-top-right-radius: 8px; |
||||
&.wrong{ |
||||
border: 1px solid #FFA39E; |
||||
background: #FFF1F0; |
||||
} |
||||
&.yet{ |
||||
border: 1px solid rgba(0, 0, 0, 0.06); |
||||
background: rgba(0, 0, 0, 0.04); |
||||
} |
||||
span{ |
||||
margin-right: 24px; |
||||
} |
||||
} |
||||
.inner{ |
||||
padding: 24px; |
||||
} |
||||
.name{ |
||||
font-size: 14px; |
||||
color: #555555; |
||||
} |
||||
.meta{ |
||||
margin-bottom: 16px; |
||||
} |
||||
.key{ |
||||
margin-bottom: 8px; |
||||
color: rgba(0, 0, 0, 0.85); |
||||
font-size: 16px; |
||||
} |
||||
.val{ |
||||
color: rgba(0, 0, 0, 0.65); |
||||
font-size: 14px; |
||||
} |
||||
.meta-mul{ |
||||
display: flex; |
||||
margin-bottom: 15px; |
||||
.info{ |
||||
margin-right: 32px; |
||||
} |
||||
input{ |
||||
width: 60px; |
||||
height: 28px; |
||||
padding: 0 5px; |
||||
margin-right: 5px; |
||||
border: 1px solid rgba(0, 0, 0, 0.15); |
||||
border-radius: 4px; |
||||
&:focus{ |
||||
outline: none; |
||||
} |
||||
&:disabled{ |
||||
background-color: rgba(0, 0, 0, 0.04); |
||||
color: rgba(0, 0, 0, 0.25); |
||||
cursor: not-allowed; |
||||
} |
||||
} |
||||
} |
||||
.point{ |
||||
.meta{ |
||||
margin: 0; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
.over{ |
||||
top: 5000px; |
||||
} |
||||
.player{ |
||||
position: absolute; |
||||
top: 50%; |
||||
left: 50%; |
||||
transform: translate(-50%,-50%); |
||||
width: 1200px !important; |
||||
height: 600px !important; |
||||
} |