dedsudiyu преди 1 месец
родител
ревизия
898c09b71a
променени са 3 файла, в които са добавени 7 реда и са изтрити 6 реда
  1. 2 4
      src/views/alarmPage/index.vue
  2. 1 1
      src/views/login/accountLogin.vue
  3. 4 1
      src/views/miniProgramAuthentication/index.vue

+ 2 - 4
src/views/alarmPage/index.vue

@@ -369,16 +369,14 @@
         if (codeData.noticeId) {
         if (codeData.noticeId) {
           this.$set(this, 'warningId', codeData.noticeId);
           this.$set(this, 'warningId', codeData.noticeId);
           this.$set(this, 'warnType', 1);
           this.$set(this, 'warnType', 1);
+          this.systemMineWarningNoticeDetail();
         } else if (codeData.eventId) {
         } else if (codeData.eventId) {
           this.$set(this, 'warningId', codeData.eventId);
           this.$set(this, 'warningId', codeData.eventId);
           this.$set(this, 'warnType', 4);
           this.$set(this, 'warnType', 4);
+          this.laboratoryEventFindByEventId();
         } else if (codeData.id) {
         } else if (codeData.id) {
           this.$set(this, 'warningId', codeData.id);
           this.$set(this, 'warningId', codeData.id);
           this.$set(this, 'warnType', 4);
           this.$set(this, 'warnType', 4);
-        }
-        if (this.warnType != 4) {
-          this.systemMineWarningNoticeDetail();
-        } else if (this.warnType == 4) {
           this.laboratoryEventFindByEventId();
           this.laboratoryEventFindByEventId();
         }
         }
       },
       },

+ 1 - 1
src/views/login/accountLogin.vue

@@ -160,7 +160,7 @@
       //查询是否是管理员/安全员
       //查询是否是管理员/安全员
       systemSubjectCheckIsAdminOrSafeUser(){
       systemSubjectCheckIsAdminOrSafeUser(){
         systemSubjectCheckIsAdminOrSafeUser({}).then(response => {
         systemSubjectCheckIsAdminOrSafeUser({}).then(response => {
-          if (response.data.isSafe || response.data.isAdmin) {
+          if (response.isSafe || response.isAdmin) {
             window.location.href = localStorage.getItem('alarmUrl');
             window.location.href = localStorage.getItem('alarmUrl');
           }else{
           }else{
             this.securityDataStatisticsGetUserIdentity();
             this.securityDataStatisticsGetUserIdentity();

+ 4 - 1
src/views/miniProgramAuthentication/index.vue

@@ -5,6 +5,8 @@
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
+  import { Toast } from 'vant';
+  import { Encrypt,Decrypt} from '@/utils/secret'
   import {
   import {
     getConfigByType,
     getConfigByType,
     systemSubjectCheckIsAdminOrSafeUser,
     systemSubjectCheckIsAdminOrSafeUser,
@@ -119,9 +121,10 @@
       securityDataStatisticsGetUserIdentity(){
       securityDataStatisticsGetUserIdentity(){
         let self = this;
         let self = this;
         securityDataStatisticsGetUserIdentity({}).then(response => {
         securityDataStatisticsGetUserIdentity({}).then(response => {
-          if(response.data.schoolAdmin || response.data.collegeAdmin){
+          if(response.schoolAdmin || response.collegeAdmin){
             window.location.href = localStorage.getItem('alarmUrl');
             window.location.href = localStorage.getItem('alarmUrl');
           }else{
           }else{
+            localStorage.removeItem('touken');
             Toast.fail('您无权查看报警信息,请联系管理员.');
             Toast.fail('您无权查看报警信息,请联系管理员.');
             setTimeout(function(){
             setTimeout(function(){
               self.$router.push({ path: '/login' });
               self.$router.push({ path: '/login' });