|
|
@@ -44,13 +44,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'" v-else></empty-status>
|
|
|
- <pull-up :fixId="'mobile-staff-center'" :isValid="isValid" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
|
|
|
+ <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">
|
|
|
- <input type="text" placeholder="人员姓名、电话号码、邮箱" v-model="auditSearch" @keyup.13="auditRecord()">
|
|
|
- <span @click="auditRecord()"><i class="iconfont icon-sousuo"></i></span>
|
|
|
+ <input type="text" placeholder="人员姓名、电话号码、邮箱" v-model="auditSearch" @keyup.13="searchAudit()">
|
|
|
+ <span @click="searchAudit()"><i class="iconfont icon-sousuo"></i></span>
|
|
|
</div>
|
|
|
<div class="list-content" v-if="AuditList && AuditList.length">
|
|
|
<div class="bg" v-for="item in AuditList">
|
|
|
@@ -67,7 +67,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'" v-else></empty-status>
|
|
|
- <pull-up :fixId="'mobile-staff-center'" :searchMore="fetch" :allPage="allPageAudit" :page="page" @pullUpAction="onPullUpAudit"></pull-up>
|
|
|
+ <pull-up :fixId="'mobile-staff-center'" :isValid="switchType === 'Audit'" :searchMore="fetch" :allPage="allPageAudit" :page="page" @pullUpAction="onPullUpAudit"></pull-up>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--编辑角色-->
|
|
|
@@ -89,8 +89,6 @@
|
|
|
<div class="agree handle" @click="sureEdit">确定</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <pull-up :fixId="'mobile-staff-center'" :isValid="isValid" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
|
|
|
- <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
|
|
|
</div>
|
|
|
<!--删除员工弹框-->
|
|
|
<div class="deleteKuang" v-if="showDelete">
|
|
|
@@ -130,7 +128,6 @@
|
|
|
checked: false,
|
|
|
rolesList: [],
|
|
|
currentStaff: [],
|
|
|
- isValid: true,
|
|
|
role: '全部角色',
|
|
|
showRole: false
|
|
|
}
|
|
|
@@ -163,7 +160,9 @@
|
|
|
this.staffDataList = []
|
|
|
this.isChange = false
|
|
|
}
|
|
|
- this.staffDataList = [...this.staffDataList, ...val.content]
|
|
|
+ if (val && val.content) {
|
|
|
+ this.staffDataList = [...this.staffDataList, ...val.content]
|
|
|
+ }
|
|
|
},
|
|
|
immediate: true
|
|
|
},
|
|
|
@@ -173,22 +172,25 @@
|
|
|
this.AuditList = []
|
|
|
this.hasChange = false
|
|
|
}
|
|
|
- this.AuditList = [...this.AuditList, ...val.content]
|
|
|
- }
|
|
|
+ if (val && val.content) {
|
|
|
+ this.AuditList = [...this.AuditList, ...val.content]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
staffData () {
|
|
|
- return this.$store.state.staff.infoList.info.data.content ? this.$store.state.staff.infoList.info.data : {content:[]}
|
|
|
+ return this.$store.state.staff.infoList.info.data
|
|
|
},
|
|
|
fetching () {
|
|
|
- return this.staffData.fetching
|
|
|
+ return this.$store.state.staff.infoList.info.fetching
|
|
|
},
|
|
|
allPage () {
|
|
|
return Math.floor(this.staffData.totalElements / this.staffData.size) + Math.floor(this.staffData.totalElements % this.staffData.size > 0 ? 1 : 0)
|
|
|
},
|
|
|
auditBind () {
|
|
|
- return this.$store.state.staff.infoList.audit.data.content ? this.$store.state.staff.infoList.audit.data : {content:[]}
|
|
|
+ return this.$store.state.staff.infoList.audit.data
|
|
|
},
|
|
|
fetch () {
|
|
|
return this.$store.state.staff.infoList.audit.fetching
|
|
|
@@ -211,8 +213,10 @@
|
|
|
this.switchType = type
|
|
|
this.page = 1
|
|
|
if ( type === 'info') {
|
|
|
+ this.isChange = true
|
|
|
this.staffRecord()
|
|
|
} else {
|
|
|
+ this.hasChange = true
|
|
|
this.auditRecord()
|
|
|
}
|
|
|
},
|
|
|
@@ -223,7 +227,6 @@
|
|
|
onPullUpAction: function () {
|
|
|
this.page++
|
|
|
this.staffList()
|
|
|
- this.isValid = true
|
|
|
},
|
|
|
// 员工列表搜索
|
|
|
staffRecord () {
|
|
|
@@ -254,9 +257,9 @@
|
|
|
this.isChange = true
|
|
|
this.staffList()
|
|
|
}).catch(data => {
|
|
|
- this.showDelete = false
|
|
|
- this.onRemind(data.response.data)
|
|
|
- })
|
|
|
+ this.showDelete = false
|
|
|
+ this.onRemind(data.response.data)
|
|
|
+ })
|
|
|
},
|
|
|
// 打开选择
|
|
|
showRoleEvent (e) {
|
|
|
@@ -293,7 +296,6 @@
|
|
|
},
|
|
|
// 获取角色
|
|
|
getRoles () {
|
|
|
- this.isValid = false
|
|
|
this.$http.get('/account/role')
|
|
|
.then(response => {
|
|
|
if (response.data) {
|
|
|
@@ -353,9 +355,13 @@
|
|
|
},
|
|
|
// 申请绑定搜索
|
|
|
auditRecord () {
|
|
|
- this.hasChange = true
|
|
|
this.$store.dispatch('staff/loadBindAudit', {count: this.count, page: this.page, speaceUU: this.user.data.enterprise.uu, status: 311, keyword: this.auditSearch})
|
|
|
},
|
|
|
+ searchAudit () {
|
|
|
+ this.hasChange = true
|
|
|
+ this.page = 1
|
|
|
+ this.auditRecord()
|
|
|
+ },
|
|
|
// 绑定下拉
|
|
|
onPullUpAudit () {
|
|
|
this.page++
|
|
|
@@ -368,7 +374,7 @@
|
|
|
this.onRemind('操作成功!')
|
|
|
this.auditSearch = ''
|
|
|
this.page = 1
|
|
|
- this.auditRecord()
|
|
|
+ this.searchAudit()
|
|
|
})
|
|
|
}
|
|
|
}
|