|
@@ -24,7 +24,7 @@
|
|
|
<view class="carlists">
|
|
|
<car-list :datainfo="list" :ygztList="ygztList" :yglbList="yglbList" :wtdt="wtdt" type='staff' @getDetail="getDetail" @getDelFn="getDelFn" @getShFn="getShFn"></car-list>
|
|
|
</view>
|
|
|
- <block v-if="checkPermi(['wuYe:staffManage:add'])">
|
|
|
+ <block v-if="checkPermi(['wuYe:staffManage:authentication'])">
|
|
|
<view style="height: 100rpx;"></view>
|
|
|
<view class="rfbtn" @click="getAddFn">添加人员</view>
|
|
|
</block>
|
|
@@ -39,6 +39,7 @@
|
|
|
import carList from "@/people/components/car/list.vue"
|
|
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
|
|
import {staffList,staffDel,examineStaff,staffglyDel} from "@/api/work/people.js"
|
|
|
+ import {getRoleNopage} from "@/api/login.js"
|
|
|
import {getDictionaryFn} from "@/api/system/user.js"
|
|
|
export default{
|
|
|
components:{carList},
|
|
@@ -71,8 +72,12 @@
|
|
|
uni.$on('refStaffList',(res)=>{
|
|
|
this.getrefreshData()
|
|
|
})
|
|
|
+ var tenantId=this.$store.state.user.tenantId;
|
|
|
+ console.log(tenantId)
|
|
|
+ this.getRoleNopagea(tenantId);
|
|
|
this.init();
|
|
|
this.getDataFn();
|
|
|
+
|
|
|
},
|
|
|
// 上拉触底加载更多触发事件
|
|
|
onReachBottom() {
|
|
@@ -88,17 +93,17 @@
|
|
|
this.getrefreshData()
|
|
|
},
|
|
|
init(){
|
|
|
- // 员工类别
|
|
|
- getDictionaryFn('yaungong').then(res=>{
|
|
|
- if(res.code==200){
|
|
|
- this.yglbList = res.data.map(v => {
|
|
|
- return {
|
|
|
- dictLabel: v.dictLabel,
|
|
|
- dictValue: v.dictValue
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ // 员工类别 走
|
|
|
+ // getDictionaryFn('yaungong').then(res=>{
|
|
|
+ // if(res.code==200){
|
|
|
+ // this.yglbList = res.data.map(v => {
|
|
|
+ // return {
|
|
|
+ // dictLabel: v.dictLabel,
|
|
|
+ // dictValue: v.dictValue
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
//状态
|
|
|
getDictionaryFn('technician_status').then(res=>{
|
|
|
if(res.code==200){
|
|
@@ -111,6 +116,19 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getRoleNopagea(id){
|
|
|
+ var params={
|
|
|
+ tenantId:id
|
|
|
+ }
|
|
|
+ getRoleNopage(params).then(res=>{
|
|
|
+ this.yglbList = res.rows.map(v => {
|
|
|
+ return {
|
|
|
+ dictLabel: v.roleName,
|
|
|
+ dictValue: v.roleKey
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
getShFn(data){
|
|
|
var that=this;
|
|
|
var info=JSON.parse(JSON.stringify(data))
|
|
@@ -134,7 +152,7 @@
|
|
|
this.$tab.navigateTo("/people/pages/people/staffadd")
|
|
|
},
|
|
|
getDetail(e){
|
|
|
- this.$tab.navigateTo("/people/pages/people/staffadd?type=gyy&id="+e)
|
|
|
+ this.$tab.navigateTo("/people/pages/people/staffadd?id="+e)
|
|
|
},
|
|
|
getConfirm(){
|
|
|
this.getrefreshData()
|