|
@@ -33,7 +33,6 @@
|
|
|
<script>
|
|
|
import { getRoleList } from '@/api/powerRole-md.js'
|
|
|
import {saveEmployee,setManager} from '@/api/employee'
|
|
|
- import { getCurrUserInfo } from '@/api/data.js';
|
|
|
export default{
|
|
|
data(){
|
|
|
return{
|
|
@@ -52,11 +51,13 @@
|
|
|
loading:false,
|
|
|
total:'' ,// 获取数据总数
|
|
|
userInfo: null,
|
|
|
+ adminId: null
|
|
|
}
|
|
|
},
|
|
|
onLoad(opts) {
|
|
|
this.userInfo = this.$store.state.vuex_nowStaffData
|
|
|
- this.getCurrUserInfo()
|
|
|
+ this.adminId = opts.adminId
|
|
|
+ this.getRoleList()
|
|
|
},
|
|
|
methods:{
|
|
|
radioGroupChange(e){
|
|
@@ -75,21 +76,6 @@
|
|
|
_this.status = "loadmore"
|
|
|
})
|
|
|
},
|
|
|
- getCurrUserInfo(){
|
|
|
- uni.showLoading({
|
|
|
- mask:true,
|
|
|
- title: '正在加载...'
|
|
|
- })
|
|
|
- getCurrUserInfo().then(res => {
|
|
|
- if(res.data){
|
|
|
- this.formData = Object.assign({},this.formData,{id:res.data.id})
|
|
|
- this.pageNo = 1
|
|
|
- this.getRoleList()
|
|
|
- }else{
|
|
|
- uni.hideLoading()
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 保存
|
|
|
save(name){
|
|
|
if(!this.formData.roleIds){
|
|
@@ -112,6 +98,7 @@
|
|
|
},
|
|
|
// 设置岗位
|
|
|
saveRole(){
|
|
|
+ this.formData.id = this.adminId
|
|
|
saveEmployee(this.formData).then(res=>{
|
|
|
console.log(res)
|
|
|
if(res.status == 200){
|