Преглед на файлове

Merge branch 'VERSIONS-aqlly(安全联络员)' into SCHOOL-anKeYuan(安科院)

dedsudiyu преди 1 ден
родител
ревизия
16108b6dac
променени са 2 файла, в които са добавени 33 реда и са изтрити 8 реда
  1. 14 0
      pages_manage/views/laboratory/safetyCardScan.vue
  2. 19 8
      utils/index.js

+ 14 - 0
pages_manage/views/laboratory/safetyCardScan.vue

@@ -53,6 +53,17 @@
 					<view>{{newData.adminPhone}}</view>
 				</view>
 			</view>
+			<view class="small-title-new" @click="unfoldPackUp('safetyLiaisonShowType')">
+				<view>安全联络员</view>
+				<uni-icons :type="newData.safetyLiaisonShowType?'up':'down'" size="12" color='#A2A2A2'></uni-icons>
+			</view>
+			<view class="sub-head" v-if="newData.safetyLiaisonShowType&&newData.safetyLiaisonName">
+				<view>{{newData.safetyLiaisonName}}</view>
+				<view @click="callPhone(newData.safetyLiaisonPhone)">
+					<img :src="imagesUrl('manage/icon_aqxxp_dh.png')">
+					<view>{{newData.safetyLiaisonPhone}}</view>
+				</view>
+			</view>
 			<view class="small-title-new" @click="unfoldPackUp('subAdminUserShowType')">
 				<view>管理员</view>
 				<uni-icons :type="newData.subAdminUserShowType?'up':'down'" size="12" color='#A2A2A2'></uni-icons>
@@ -309,6 +320,7 @@
 		onLoad(option) {
 			let newData = JSON.parse(decodeURIComponent(option.infoData));
 			newData.subAdminShowType = true;
+			newData.safetyLiaisonShowType = true;
 			newData.subAdminUserShowType = true;
 			newData.adminShowType = true;
 			if (newData.labInfoBrandModels) {
@@ -391,6 +403,8 @@
 			unfoldPackUp(type, index) {
 				if (type == 'subAdminShowType') {
 					this.$set(this.newData, 'subAdminShowType', !this.newData.subAdminShowType);
+				}else if (type == 'safetyLiaisonShowType') {
+					this.$set(this.newData, 'safetyLiaisonShowType', !this.newData.safetyLiaisonShowType);
 				} else if (type == 'subAdminUserShowType') {
 					this.$set(this.newData, 'subAdminUserShowType', !this.newData.subAdminUserShowType);
 				} else if (type == 'adminShowType') {

+ 19 - 8
utils/index.js

@@ -35,16 +35,27 @@ export function itoOrVideoLimits(subAdminId) {
   let userInfo = uni.getStorageSync('user');
   let schoolId = config.schoolId;
   let collegeId = config.collegeId;
-  if(userInfo.position == null){
-    //如果是管理员(系统用户)
+  // if(userInfo.position == null){
+  //   //如果是管理员(系统用户)
+  //   return true
+  // }else if(userInfo.position == schoolId || userInfo.position == collegeId){
+  //   //如果是校级管理员/院级管理员
+  //   return true
+  // }else if(userInfo.userId == subAdminId){
+  //   //如果当前用户userId 与 管理员ID相等
+  //   return true
+  // }else{
+  //   return false
+  // }
+	if(userInfo.position == null){
+		//如果是管理员(系统用户)
     return true
-  }else if(userInfo.position == schoolId || userInfo.position == collegeId){
-    //如果是校级管理员/院级管理员
+	}else if(userInfo.position == schoolId || userInfo.position == collegeId){
+		//如果是校级管理员/院级管理员
     return true
-  }else if(userInfo.userId == subAdminId){
-    //如果当前用户userId 与 管理员ID相等
+  }else if(uni.getStorageSync('subAdmin') == 1){
     return true
-  }else{
+	}else{
     return false
-  }
+	}
 }