|
|
@@ -45,7 +45,7 @@
|
|
|
</div>
|
|
|
<empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'" v-else></empty-status>
|
|
|
<pull-up :fixId="'mobile-staff-center'" :isValid="activeTab == 0 && switchType === 'info'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
|
|
|
- <nuxt-link class="staff-add" :to="'/mobile/user/staff/add'"><i class="iconfont icon-add"></i>新增用户</nuxt-link>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="staff-record" v-if="switchType === 'Audit'">
|
|
|
<div class="search-content">
|
|
|
@@ -90,6 +90,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <nuxt-link v-if="activeTab === 0 && switchType === 'info'" class="staff-add" :to="'/mobile/user/staff/add'"><i class="iconfont icon-add"></i>新增用户</nuxt-link>
|
|
|
<!--删除员工弹框-->
|
|
|
<div class="deleteKuang" v-if="showDelete">
|
|
|
<div class="kuangContent">
|
|
|
@@ -203,7 +204,7 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- onRemind: function (str) {
|
|
|
+ setRemindText: function (str) {
|
|
|
this.remindText = str
|
|
|
this.timeoutCount++
|
|
|
},
|
|
|
@@ -237,13 +238,13 @@
|
|
|
openDelete (item) {
|
|
|
if (this.isAdmin) {
|
|
|
if (item.userUU === this.userInfo.userUU) {
|
|
|
- this.onRemind('自己不可修改自己')
|
|
|
+ this.setRemindText('自己不可修改自己')
|
|
|
} else {
|
|
|
this.currentObject = item
|
|
|
this.showDelete = true
|
|
|
}
|
|
|
} else {
|
|
|
- this.onRemind('您不是管理员不可修改')
|
|
|
+ this.setRemindText('您不是管理员不可修改')
|
|
|
}
|
|
|
},
|
|
|
// 员工列表确认删除
|
|
|
@@ -252,13 +253,13 @@
|
|
|
.then(response => {
|
|
|
// console.log(response)
|
|
|
this.showDelete = false
|
|
|
- this.onRemind('用户' + this.currentObject.userUU + '删除成功')
|
|
|
+ this.setRemindText('用户' + this.currentObject.userUU + '删除成功')
|
|
|
this.page = 1
|
|
|
this.isChange = true
|
|
|
this.staffList()
|
|
|
}).catch(data => {
|
|
|
this.showDelete = false
|
|
|
- this.onRemind(data.response.data)
|
|
|
+ this.setRemindText(data.response.data)
|
|
|
})
|
|
|
},
|
|
|
// 打开选择
|
|
|
@@ -305,16 +306,16 @@
|
|
|
},
|
|
|
// 员工列表当前选中对象
|
|
|
goEdit (item) {
|
|
|
- if (this.isAdmin) {
|
|
|
- if (item.userUU === this.userInfo.userUU) {
|
|
|
- this.onRemind('自己不可修改自己')
|
|
|
- } else {
|
|
|
+ if (item.userUU === this.userInfo.userUU) {
|
|
|
+ this.setRemindText('自己不可修改自己')
|
|
|
+ } else {
|
|
|
+ this.authorityInterceptor('/basic/user/updaterole', () => {
|
|
|
let currentData = item
|
|
|
this.currentStaff = this.baseUtils.deepCopy(currentData)
|
|
|
this.activeTab = 1
|
|
|
for (let j = 0; j < this.rolesList.length; j++) {
|
|
|
for (let i = 0; i < this.currentStaff.roles.length; i++) {
|
|
|
- //判断已绑定角色
|
|
|
+ // 判断已绑定角色
|
|
|
if (this.currentStaff.roles[i].id === this.rolesList[j].id) {
|
|
|
this.rolesList[j].checked = true
|
|
|
break
|
|
|
@@ -323,9 +324,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.onRemind('您不是管理员不可修改')
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
// 员工列表选择角色
|
|
|
@@ -346,7 +345,7 @@
|
|
|
}
|
|
|
this.$http.put(`/basic/user/updaterole`, this.currentStaff)
|
|
|
.then(() => {
|
|
|
- this.onRemind('角色编辑成功')
|
|
|
+ this.setRemindText('角色编辑成功')
|
|
|
this.activeTab = 0
|
|
|
this.page = 1
|
|
|
this.isChange = true
|
|
|
@@ -371,7 +370,7 @@
|
|
|
agreeEvent (type, flag) {
|
|
|
this.$http.get(`/basic/enterprise/auditApply?id=${type.id}&status=${Number(flag)}&userUU=${type.userUU}`)
|
|
|
.then(() => {
|
|
|
- this.onRemind('操作成功!')
|
|
|
+ this.setRemindText('操作成功!')
|
|
|
this.auditSearch = ''
|
|
|
this.page = 1
|
|
|
this.searchAudit()
|
|
|
@@ -549,27 +548,9 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .staff-add {
|
|
|
- display: inline-block;
|
|
|
- position: fixed;
|
|
|
- bottom: 1.2rem;
|
|
|
- left: 50%;
|
|
|
- margin-left: -3.29rem;
|
|
|
- width: 6.59rem;
|
|
|
- height: .77rem;
|
|
|
- line-height: .77rem;
|
|
|
- text-align: center;
|
|
|
- font-size: .32rem;
|
|
|
- color: #fff;
|
|
|
- background-color: #3f84f6;
|
|
|
- border-radius: 0.08rem;
|
|
|
- i{
|
|
|
- margin-right: .1rem;
|
|
|
- font-size: .32rem;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
/*编辑角色*/
|
|
|
.staff-role{
|
|
|
margin: .2rem auto 0;
|
|
|
@@ -672,6 +653,26 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .staff-add {
|
|
|
+ display: inline-block;
|
|
|
+ position: fixed;
|
|
|
+ bottom: 1.2rem;
|
|
|
+ left: 50%;
|
|
|
+ margin-left: -3.29rem;
|
|
|
+ width: 6.59rem;
|
|
|
+ height: .77rem;
|
|
|
+ line-height: .77rem;
|
|
|
+ text-align: center;
|
|
|
+ font-size: .32rem;
|
|
|
+ color: #fff;
|
|
|
+ background-color: #3f84f6;
|
|
|
+ border-radius: 0.08rem;
|
|
|
+ i{
|
|
|
+ margin-right: .1rem;
|
|
|
+ font-size: .32rem;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
/*删除弹框*/
|
|
|
.deleteKuang {
|
|
|
position: fixed;
|