heyang 1 år sedan
förälder
incheckning
056a905f38
4 ändrade filer med 43 tillägg och 17 borttagningar
  1. 4 4
      pages/login.vue
  2. 1 1
      pages/manageWorkbench.vue
  3. 34 12
      pages/mine.vue
  4. 4 0
      pages/studentWorkbench.vue

+ 4 - 4
pages/login.vue

@@ -6,8 +6,8 @@
     <view class="login-box">
 	  <view class="tabTitle">
 	  	<view class="tabTitle_li" @tap="tabClick(index)"  :key="index" v-for="(item,index) in tabText">
-	  		<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
-	  	    <view :class="{on:curTab==index}" class="tabTitle_across"></view>
+	  		<view  class="tabTitle_text">{{item}}</view>
+	  	    <view  class="tabTitle_across"></view>
 	  	</view>
 	  </view>
       <view class="input-max-box-one">
@@ -50,7 +50,7 @@ export default {
       checkedType:false,
       loginBanner:uni.getStorageSync('loginBanner'),
       infoList:[],//模板消息Id
-	  tabText:['师生登录','供应商登录'],
+	  tabText:['师生登录'],
 	  curTab:0,
     }
   },
@@ -157,7 +157,7 @@ export default {
       if(data.code == 200){
         uni.setStorageSync('token','Bearer '+data.data.access_token);
         uni.setStorageSync('userId',data.data.user_id);
-		uni.setStorageSync('tenantId',2);//0 系统 1化工 2能动
+		uni.setStorageSync('tenantId',data.data.tenantId);//0 系统 1化工 2能动  
         this.getOpenId();//获取openid
         if(data.data.type == "00" ||data.data.type == "11"){//管理端
           uni.setStorageSync('userType',"1");

+ 1 - 1
pages/manageWorkbench.vue

@@ -404,7 +404,7 @@ export default {
     },
     //页面跳转
     goPage(type){
-		if(this.tenantId==2){
+		if(this.tenantId==2 && type!='emergencyEvacuation' && type!='alarm'){
 			type='none'
 		}
 		if(type=='casuallyPat'){

+ 34 - 12
pages/mine.vue

@@ -88,12 +88,12 @@
           <view class="view-three-type" :class="!isUpload?'colorA':'marginType'">{{!isUpload?'未上传':'已上传'}}</view>
           <img class="right-img" src="@/images/icon_04.png">
         </view>
-        <view class="button-max-box" @click="fingerprintClick()">
+        <!-- <view class="button-max-box" @click="fingerprintClick()">
           <img class="left-img" src="@/images/icon_wd_zw.png">
           <view>指纹</view>
           <view class="view-three-type" :class="Quantity>0?'marginType':'colorA'">{{Quantity>0?'已配置'+Quantity+'个':''}}</view>
           <img class="right-img" src="@/images/icon_04.png">
-        </view>
+        </view> -->
       </view>
     </view>
     <view class="out-button" @click="clickOut">退出登录</view>
@@ -103,7 +103,7 @@
 
 <script>
 import { config } from '@/api/request/config.js'
-import { logout,studentinfoFacemy,simpleInfo,getSafeWarnList,getMyPointsLogInfo,querySignature,fingerprintQuantity,fingerprintQueryList} from '@/api/index.js'
+import { logout,studentinfoFacemy,simpleInfo,warningNoticeLogList,getMyPointsLogInfo,querySignature,fingerprintQuantity,fingerprintQueryList,getSubByRiskPlan} from '@/api/index.js'
 import { tabBar } from '@/component/tabBar.vue'
 export default {
   components: {
@@ -150,6 +150,7 @@ export default {
       this.studentinfoFacemy();
       this.simpleInfo();
       this.querySignature();
+      this.getSubByRiskPlan();
     }else{
       uni.removeStorageSync('token');
       uni.removeStorageSync('userId');
@@ -194,13 +195,13 @@ export default {
 		console.log(config.base_url)
 		console.log(this.userData.avatarUrl)
         if(this.userType == 1){
-          this.getSafeWarnList();
+          this.warningNoticeLogList();
         }else if(this.userType == 2){
           this.getMyPointsLogInfo();
         }
         if(data.data.count){
           this.adminSubCount = data.data.count.adminSubCount;
-          this.wranDoCount = data.data.count.wranDoCount;
+         
         }
         this.pageType = true;
       }
@@ -215,6 +216,7 @@ export default {
 
       }
     },
+	
     //查询用户指纹录取数据
     async fingerprintClick(){
       let _this=this;
@@ -244,22 +246,42 @@ export default {
       }
     },
     //获取报警信息列表
-    async getSafeWarnList(){
+    async warningNoticeLogList(){
       let obj = {
         pageNum:1,
-        pageSize:1,
-        count:0,
-        groupStatus:1,
+        pageSize:10,
       };
-      const {data} = await getSafeWarnList(obj);
+      const {data} = await warningNoticeLogList(obj);
       if(data.code == 200){
-        if(data.rows[0]){
-          this.securityAlertNum = data.rows[0].todayHappenCount;
+		  console.log(data)
+        if(data.data.records[0]){
+          this.securityAlertNum = data.data.total;
         }else{
           this.securityAlertNum = 0;
         }
       }
     },
+	//获取预案执行记录总数
+	async getSubByRiskPlan(){
+	  let obj = {
+	    pageNum:1,
+	    pageSize:10,
+		deptId:"",
+		subDept:"",
+		typeId:"",
+		startDate:"",
+		endDate:""
+	  };
+	  const {data} = await getSubByRiskPlan(obj);
+	  if(data.code == 200){
+		  console.log(data)
+	    if(data.rows[0]){
+	      this.wranDoCount = data.total;
+	    }else{
+	      this.wranDoCount = 0;
+	    }
+	  }
+	},
     //获取当前身份人脸验证状态与学生卡上传状态
     async studentinfoFacemy(){
       let obj = {

+ 4 - 0
pages/studentWorkbench.vue

@@ -81,6 +81,7 @@ export default {
   },
   data() {
     return {
+		tenantId:uni.getStorageSync('tenantId'),//0 系统 1化工 2能动
 		navHeight: uni.getStorageSync('navHeight'),
 	    title:'实验室安全智能监测与控制系统',		
 		hintType:false,
@@ -164,6 +165,9 @@ export default {
     },
     //页面跳转
     goPage(type){
+		if(this.tenantId==2){
+			type='none'
+		}
       if(type == 'meViolation'){//我的违规
         uni.navigateTo({
           url: '/pages_student/workbench/meViolation',