zouling 2 månader sedan
förälder
incheckning
c88a35f726

+ 2 - 4
property_ui/people/components/car/list.vue

@@ -121,10 +121,8 @@
 						<view class="statxt flexc" :class="{'co06':ite.status==1,'coff':ite.status==2}"><text class="cir" :class="{'bga':ite.status==1,'bgb':ite.status==2}"></text>{{kaType(ite.status,ygztList)}}</view>
 						<!-- <view class="statxt flexc cof6"><text class="cir bgb"></text>指派中</view> -->
 					</view>
-					<block v-if="checkPermi(['wuYe:staffManage:remove'])">
-						<image :src="pdel" class="stadel" v-if="type=='rzstaff'&&ite.examine!=2" @click.stop="getDelFn(ite)"></image>
-						<image :src="pdel" class="stadel" v-if="type=='staff'" @click.stop="getDelFn(ite)"></image>
-					</block>
+					<image :src="pdel" class="stadel" v-if="type=='rzstaff'&&ite.examine!=2&&checkPermi(['wuYe:staffManage:remove'])" @click.stop="getDelFn(ite)"></image>
+					<image :src="pdel" class="stadel" v-if="type=='staff'&&checkPermi(['wuYe:staffManage:deleteStaffManage'])" @click.stop="getDelFn(ite)"></image>
 				</view>
 				<view class="stalist">
 					<view class="imgs"><image :src="gzlx" class="gzlximg"></image></view>{{kaType(ite.staffCategory,yglbList)}}

+ 31 - 13
property_ui/people/pages/people/staff.vue

@@ -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()

+ 15 - 7
property_ui/people/pages/people/staffadd.vue

@@ -105,11 +105,14 @@
 				</view>
 			</view>
 		</uni-forms>
-		<view class="pdlr12 mt55">
-			<view class="rhbtn" @click="getEditFn" v-if="isdisabled">修改</view>
-			<view class="rhbtn" @click="getSubmit" v-else>确定</view>
+		<view class="pdlr12 mt55" v-if="rzflag&&checkPermi(['wuYe:staffManage:add'])">
+			<!-- <view class="rhbtn" @click="getEditFn" v-if="isdisabled">修改</view> -->
+			<view class="rhbtn" @click="getSubmit">确定</view>
+		</view>
+		<view class="pdlr12 mt55" v-if="!rzflag&&checkPermi(['wuYe:staffManage:authentication'])">
+			<!-- <view class="rhbtn"  @click="getEditFn" v-if="isdisabled">修改</view> -->
+			<view class="rhbtn"  @click="getSubmit" >确定</view>
 		</view>
-
 		<loading></loading>
 	</view>
 </template>
@@ -192,7 +195,9 @@
 				// var userId=this.$store.state.user.userId;
 				// this.staffrzDet(userId)
 			}else{
-				this.datainfo.tenantId=this.$store.state.user.tenantId
+				var tenantId=this.$store.state.user.tenantId;
+				this.datainfo.tenantId=tenantId;
+				this.getRoleNopage(tenantId)
 			}
 			this.gettenantList();
 			if(e.id){
@@ -406,10 +411,13 @@
 				if(this.rzflag){
 					staffglrzDet(this.id).then(res=>{
 						if(res.code==200){
-							// this.datainfo=res.data;
 							var tenantId=res.data.tenantId
 							this.getRoleNopage(tenantId)
-							this.datainfo=this.filterObjectByChar(res.data,'staffId');
+							if(this.rztype=='rzadd'){
+								this.datainfo=this.filterObjectByChar(res.data,'staffId');
+							}else{
+								this.datainfo=res.data;
+							}
 						}
 					})
 				}else{