wangguangping 3 lat temu
rodzic
commit
3ce42b6916
1 zmienionych plików z 84 dodań i 6 usunięć
  1. 84 6
      src/pages/main/memberFamily/index.vue

+ 84 - 6
src/pages/main/memberFamily/index.vue

@@ -4,20 +4,23 @@
 			<div class="container-box">
 				<div class="adv-type">
 					<div v-for="item in typeList" :key="item.dataCode" @click="advmaterial(item)">
-						<span><i class="el-icon-folder-opened"></i></span>
-						<span>{{item.dataName}}</span>
+						<div v-if="(roleStatus <= 1 && item.dataName=='信息汇总') || (roleStatus < 4 && item.dataName=='信息填报')">
+							<span><i class="el-icon-folder-opened"></i></span>
+							<span>{{item.dataName}}</span>
+						</div>
+
 					</div>
 				</div>
 				<div class="adv-box">
-					<div class="adv-tit" @click="jumpadv('1')">
+					<div class="adv-tit" @click="jumpadv('1')" v-if="roleStatus < 3">
 						<i class="el-icon-loading"></i>
 						<span>进行中 </span>
 					</div>
-					<div class="adv-tit" @click="jumpadv('2')">
+					<div class="adv-tit" @click="jumpadv('2')" v-if="roleStatus < 3">
 						<i class="el-icon-notebook-1"></i>
 						<span>已结束 </span>
 					</div>
-					<div class="adv-tit adv-add" @click="advadd">
+					<div class="adv-tit adv-add" @click="advadd" v-if="roleStatus == 0">
 						<i class="el-icon-plus"></i>
 						<span>申请</span>
 					</div>
@@ -141,7 +144,15 @@
 				defaultList:[],
 				depttype:0,
 				fadept:{},
-				deptList:[]
+				deptList:[],
+				// roleList: {
+				// 	isProvinceRole: false,
+				// 	isCityRole: false,
+				// 	isCountyRole: false,
+				// 	isOtherRole: false,
+				// }
+				roleStatus: '',  //0 省 1地市 2区县 3其他
+				roleList:[]
 			}
 		},
 		methods: {
@@ -381,6 +392,68 @@
 
 			getUser() {
 				this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+				console.log(this.userInfo);
+				let newArr = [];
+				
+				if(this.userInfo.cityName == null && this.userInfo.countyName == null){
+					this.roleStatus = 0;
+					return;
+				}else if(this.userInfo.cityName != null && this.userInfo.countyName == null){
+					 
+					 this.$http({
+						url: "/market/cMemberWo/queryProvTraceBase",
+						method: "post",
+						headers: {
+							"Content-Type": "application/json",
+						},
+						data: {
+							sts: 0
+						},
+					}).then((res) => {
+						res.data.body.forEach(item=>{
+							newArr.push(...item.dutyNo.split(","));
+						})
+						let n = newArr.filter(item=>{
+							return  item == this.userInfo.loginNoStr
+						  })
+						//   console.log(n);
+						  if(n.length != 0){
+							  this.roleStatus = 1;
+						  }else{
+							  this.roleStatus = 3;
+						  }
+					});
+					return;
+				}else if(this.userInfo.cityName != null && this.userInfo.countyName != null){
+					this.$http({
+						url: "/market/cMemberWo/queryProvTraceBase",
+						method: "post",
+						headers: {
+							"Content-Type": "application/json",
+						},
+						data: {
+							sts: 0
+						},
+					}).then((res) => {
+						res.data.body.forEach(item=>{
+							newArr.push(...item.dutyNo.split(","));
+						})
+						let n = newArr.filter(item=>{
+							return  item == this.userInfo.loginNoStr
+						  })
+						//   console.log(n);
+						  if(n.length != 0){
+							  this.roleStatus = 2;
+						  }else{
+							  this.roleStatus = 3;
+						  }
+					});
+					// this.roleStatus = 2;
+					return;
+				}else{
+					this.roleStatus = 3;
+					return;
+				}
 			},
 		},
 		mounted() {
@@ -468,6 +541,11 @@
 			cursor: pointer;
 			padding-top: 10px;
 			margin: 10px 0;
+			div{
+				width: 100%;
+				padding-top: 0;
+				margin: 0;
+			}
 		}
 
 		div:hover {