After Width: | Height: | Size: 672 B |
After Width: | Height: | Size: 199 B |
After Width: | Height: | Size: 482 B |
Before Width: | Height: | Size: 985 KiB After Width: | Height: | Size: 382 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 449 B |
After Width: | Height: | Size: 369 B |
After Width: | Height: | Size: 579 B |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 754 B |
After Width: | Height: | Size: 209 B |
@ -0,0 +1,30 @@ |
||||
<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){ |
||||
console.log(2222,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> |
@ -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 mab20"> |
||||
<i class="icon-jiahao mar20" @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> |
@ -1,152 +1,358 @@ |
||||
@import "./default/index.scss"; |
||||
|
||||
.content-box { |
||||
-webkit-transition: left .3s ease-in-out; |
||||
transition: left .3s ease-in-out; |
||||
@font-face{ |
||||
font-family: youshe; |
||||
src: url('font/YouSheBiaoTiHei.ttf'); |
||||
} |
||||
|
||||
.content { |
||||
width: auto; |
||||
height: 100%; |
||||
padding: 20px; |
||||
box-sizing: border-box; |
||||
[v-cloak] { |
||||
display: none; |
||||
} |
||||
|
||||
.content-collapse { |
||||
left: 65px; |
||||
::-webkit-scrollbar { |
||||
width: 6px; |
||||
} |
||||
|
||||
.container { |
||||
padding: 30px; |
||||
background: #fff; |
||||
border: 1px solid #ddd; |
||||
border-radius: 5px; |
||||
::-webkit-scrollbar-thumb { |
||||
border-radius: 10px; |
||||
background: rgba(0, 0, 0, 0.06); |
||||
} |
||||
|
||||
.crumbs { |
||||
margin: 10px 0; |
||||
.required{ |
||||
font-size: 16px; |
||||
color: #CC221C; |
||||
font-style: normal; |
||||
} |
||||
|
||||
.pagination { |
||||
margin: 20px 0; |
||||
text-align: right; |
||||
.breadcrumb{ |
||||
display: flex; |
||||
align-items: center; |
||||
margin-bottom: 20px; |
||||
.cur,.el-breadcrumb__inner,.el-breadcrumb__separator{ |
||||
color: rgba(0,0,0,.45) !important; |
||||
font-weight: 400 !important; |
||||
font-size: 12px; |
||||
} |
||||
.el-breadcrumb__item:last-of-type .el-breadcrumb__inner{ |
||||
color: rgba(0,0,0,.85) !important; |
||||
} |
||||
} |
||||
|
||||
.el-button+.el-tooltip { |
||||
margin-left: 10px; |
||||
.el-button--primary.action-btn{ |
||||
color: #CC221C !important; |
||||
font-size: 14px !important; |
||||
background-color: #fff !important; |
||||
border-radius: 4px !important; |
||||
} |
||||
|
||||
.ql-snow .ql-tooltip { |
||||
transform: translateX(117.5px) translateY(10px) !important; |
||||
.el-input{ |
||||
.el-input__inner{ |
||||
border-color: rgba(0, 0, 0, 0.15); |
||||
} |
||||
} |
||||
|
||||
.el-row { |
||||
margin-bottom: 20px; |
||||
.page{ |
||||
position: relative; |
||||
background-color: #fff; |
||||
border-radius: 8px; |
||||
.p-title{ |
||||
padding-left: 24px; |
||||
line-height: 56px; |
||||
font-size: 16px; |
||||
color: rgba(0, 0, 0, 0.85); |
||||
border-bottom: 1px solid rgba(0,0,0,.06); |
||||
} |
||||
.page-content{ |
||||
padding: 24px; |
||||
.tool{ |
||||
display: flex; |
||||
justify-content: space-between; |
||||
margin-bottom: 24px; |
||||
.filter{ |
||||
display: inline-flex; |
||||
align-items: center; |
||||
flex: 1; |
||||
li{ |
||||
display: inline-flex; |
||||
align-items: center; |
||||
margin-right: 30px; |
||||
label{ |
||||
font-size: 14px; |
||||
line-height: 14px; |
||||
color: rgba(0,0,0,.65); |
||||
white-space: nowrap; |
||||
} |
||||
} |
||||
} |
||||
.single-choice{ |
||||
dl { |
||||
display: flex; |
||||
line-height: 30px; |
||||
dt { |
||||
color: rgba(0,0,0,.65); |
||||
font-size: 14px; |
||||
white-space: nowrap; |
||||
} |
||||
dd { |
||||
display: inline-flex; |
||||
align-items: center; |
||||
flex-wrap: wrap; |
||||
span { |
||||
padding: 0 10px; |
||||
margin: 0 10px; |
||||
color: #333; |
||||
font-size: 14px; |
||||
line-height: 1.8; |
||||
white-space: nowrap; |
||||
|
||||
#app .el-table thead{ |
||||
cursor: pointer; |
||||
&:hover { |
||||
color: #CC221C; |
||||
} |
||||
&.active { |
||||
border-radius: 4px; |
||||
color: #fff; |
||||
background-color: #CC221C; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
.el-button--primary{ |
||||
@extend .action-btn; |
||||
} |
||||
} |
||||
#app .el-table th{ |
||||
background-color: $--color-primary!important; |
||||
font-size: 16px; |
||||
font-weight: normal; |
||||
} |
||||
#app .el-select{ |
||||
display: unset; |
||||
} |
||||
|
||||
.required{ |
||||
margin-right: 5px; |
||||
color: #F56C6C; |
||||
.pagination { |
||||
margin: 20px 0; |
||||
text-align: center; |
||||
button,.number{ |
||||
color: rgba(0,0,0,.65) !important; |
||||
background-color: transparent !important; |
||||
border: 1px solid rgba(0, 0, 0, 0.15) !important; |
||||
border-radius: 4px !important; |
||||
} |
||||
.p-title{ |
||||
display: flex; |
||||
align-items: center; |
||||
button i{ |
||||
color: #333; |
||||
} |
||||
.active{ |
||||
color: #fff !important; |
||||
background-color: #CC221C !important; |
||||
} |
||||
} |
||||
|
||||
.el-table{ |
||||
border-radius: 8px; |
||||
border: 1px solid rgba(0, 0, 0, 0.06); |
||||
border-bottom: 0; |
||||
.cell{ |
||||
color: rgba(0, 0, 0, 0.85); |
||||
font-size: 14px; |
||||
.el-checkbox{ |
||||
&:before{ |
||||
content: ''; |
||||
display: inline-block; |
||||
width: 3px; |
||||
height: 15px; |
||||
content: '全选'; |
||||
margin-right: 5px; |
||||
background-color: $--color-primary; |
||||
color: rgba(0, 0, 0, 0.85); |
||||
font-size: 14px; |
||||
opacity: 0; |
||||
} |
||||
} |
||||
.per_title{ |
||||
span{ |
||||
font-size: 16px; |
||||
font-weight: bold; |
||||
} |
||||
.per_back{ |
||||
margin-left: 5px; |
||||
th{ |
||||
background: rgba(0, 0, 0, 0.04)!important; |
||||
font-size: 14px; |
||||
color: rgba(0, 0, 0, 0.85); |
||||
font-weight: normal; |
||||
.cell{ |
||||
.el-checkbox{ |
||||
&:before{ |
||||
opacity: 1; |
||||
} |
||||
.per_school{ |
||||
margin-left: 30px; |
||||
} |
||||
&:hover{ |
||||
cursor:pointer; |
||||
} |
||||
} |
||||
|
||||
[v-cloak] { |
||||
display: none; |
||||
.el-checkbox__inner{ |
||||
border-radius: 4px; |
||||
transition: none !important; |
||||
} |
||||
.el-checkbox__input.is-indeterminate .el-checkbox__inner{ |
||||
background-color: #FFFFFF; |
||||
border-color: #DCDFE6; |
||||
} |
||||
.el-switch__core{ |
||||
background-color: #bfbfbf; |
||||
} |
||||
.el-switch__label--right{ |
||||
z-index: 2; |
||||
position: absolute; |
||||
right: 8px; |
||||
margin-left: 0; |
||||
color: #fff !important; |
||||
} |
||||
.el-switch__label--right.is-active{ |
||||
left: 8px; |
||||
right: auto; |
||||
} |
||||
.el-switch__label--right span{ |
||||
font-size: 12px; |
||||
} |
||||
} |
||||
|
||||
.tabs{ |
||||
display: flex; |
||||
align-items: center; |
||||
padding: 20px 1.5% 20px; |
||||
margin-bottom: 20px; |
||||
z-index: 999; |
||||
background-color: #fff; |
||||
padding: 0 24px; |
||||
border-bottom: 1px solid rgba(0,0,0,.06); |
||||
.item{ |
||||
padding: 12px 20px; |
||||
margin-right: 10px; |
||||
color:#606266; |
||||
line-height: 1; |
||||
border-radius: 4px; |
||||
background-color: #fff; |
||||
border: 1px solid #dcdfe6; |
||||
position: relative; |
||||
padding: 20px 0; |
||||
margin-right: 40px; |
||||
font-size: 16px; |
||||
color: rgba(0, 0, 0, 0.65); |
||||
cursor: pointer; |
||||
&:after{ |
||||
content: ''; |
||||
position: absolute; |
||||
bottom: 0; |
||||
left: 0; |
||||
width: 100%; |
||||
height: 3px; |
||||
border-bottom: 3px solid transparent; |
||||
border-radius: 2px; |
||||
} |
||||
&.active{ |
||||
color: #fff; |
||||
background-color: $--color-primary; |
||||
border-color: $--color-primary; |
||||
font-weight: 500; |
||||
color: rgba(0, 0, 0, 0.85); |
||||
} |
||||
&.active:after{ |
||||
border-bottom-color: $--color-primary; |
||||
} |
||||
} |
||||
} |
||||
.btns{ |
||||
display: flex; |
||||
justify-content: center; |
||||
margin-top: 20px; |
||||
|
||||
button{ |
||||
height: 30px; |
||||
padding: 0 30px; |
||||
margin: 0 15px; |
||||
.el-message{ |
||||
padding: 11px 20px; |
||||
.el-message__icon{ |
||||
font-size: 16px; |
||||
} |
||||
.el-message__content{ |
||||
font-size: 14px; |
||||
color: #333; |
||||
line-height: 30px; |
||||
background-color: #fff; |
||||
border: 1px solid #ededed; |
||||
color: rgba(0, 0, 0, 0.65); |
||||
} |
||||
.el-icon-close{ |
||||
font-size: 14px; |
||||
color: #92998d; |
||||
} |
||||
.el-message--success{ |
||||
border: 1px solid #B7EB8F; |
||||
background: #F6FFED; |
||||
.el-message__icon{ |
||||
color: #00c700; |
||||
} |
||||
} |
||||
.el-message--warning{ |
||||
border: 1px solid #FFE58F; |
||||
background: #FFFBE6; |
||||
.el-message__icon{ |
||||
color: #ffa900; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.el-message-box{ |
||||
padding-bottom: 24px; |
||||
.el-message-box__header{ |
||||
padding: 32px 32px 12px 50px; |
||||
span{ |
||||
font-size: 16px; |
||||
color: rgba(0, 0, 0, 0.85); |
||||
font-weight: 500; |
||||
} |
||||
} |
||||
.el-message-box__status{ |
||||
top: -30px; |
||||
} |
||||
.el-message-box__status + .el-message-box__message{ |
||||
font-size: 14px; |
||||
color: rgba(0, 0, 0, 0.65); |
||||
} |
||||
.el-message-box__btns{ |
||||
padding-right: 32px; |
||||
&.el-icon-warning{ |
||||
color: #ffa900; |
||||
} |
||||
} |
||||
.el-button--primary,.el-button--primary:hover, .el-button--primary:focus{ |
||||
background: #CC221C; |
||||
} |
||||
} |
||||
|
||||
.el-dialog__wrapper{ |
||||
.el-dialog{ |
||||
border-radius: 4px; |
||||
cursor: pointer; |
||||
&.submit{ |
||||
color: #fff; |
||||
background-color: #e80909; |
||||
border-color: #e80909; |
||||
.el-dialog__header{ |
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06); |
||||
.el-dialog__title{ |
||||
font-size: 16px; |
||||
color: rgba(0, 0, 0, 0.85); |
||||
} |
||||
} |
||||
.el-dialog__footer{ |
||||
padding: 10px 16px; |
||||
border-top: 1px solid rgba(0, 0, 0, 0.06); |
||||
.el-button{ |
||||
font-size: 14px; |
||||
border-radius: 4px; |
||||
border-color: rgba(0, 0, 0, 0.15); |
||||
} |
||||
&:hover{ |
||||
opacity: .8; |
||||
} |
||||
&:focus{ |
||||
outline: none; |
||||
} |
||||
} |
||||
|
||||
.upload-wrap{ |
||||
position: relative; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
padding: 34px 0; |
||||
.el-button{ |
||||
span{ |
||||
display: flex; |
||||
align-items: center; |
||||
color: rgba(0, 0, 0, 0.65); |
||||
font-size: 14px; |
||||
img{ |
||||
margin-right: 8px; |
||||
} |
||||
} |
||||
} |
||||
&>.el-button{ |
||||
margin-right: 32px; |
||||
} |
||||
.el-upload-list{ |
||||
position: absolute; |
||||
bottom: 0; |
||||
left: 0; |
||||
width: 100%; |
||||
} |
||||
.link{ |
||||
position: absolute; |
||||
bottom: -20px; |
||||
left: 0; |
||||
width: 100%; |
||||
text-align: center; |
||||
} |
||||
&.lg{ |
||||
padding-bottom: 50px; |
||||
} |
||||
} |
||||
|
||||
@media(max-width: 1600px){ |
||||
.el-table{ |
||||
.el-switch__label--right.is-active{ |
||||
left: 8px; |
||||
} |
||||
.userRadio .el-radio{ |
||||
margin-right: 10px!important; |
||||
} |
||||
.userRadio .el-radio__input{ |
||||
display: none!important; |
||||
} |