Ver Fonte

修复以前的bug

lusa há 3 anos atrás
pai
commit
3fa85de9f5
5 ficheiros alterados com 10 adições e 15 exclusões
  1. 5 4
      src/main.js
  2. 1 3
      src/utils/eLang.js
  3. 2 6
      src/views/EventLogs.vue
  4. 1 1
      src/views/dashbord.vue
  5. 1 1
      src/views/login.vue

+ 5 - 4
src/main.js

@@ -12,10 +12,11 @@ import 'view-design/dist/styles/iview.css';
 
 import "./assets/css/iview_style_reset.scss"
 //
-// require('./utils/sensor_specific_event_str.js')
-// require('./utils/common_str.js')
-// require('./utils/sensortype_str.js')
-// require('./utils/event_str.js')
+require('./utils/eLang.js')
+require('./utils/sensor_specific_event_str.js')
+require('./utils/common_str.js')
+require('./utils/sensortype_str.js')
+require('./utils/event_str.js')
 Vue.use(ViewUI);
 Vue.prototype.mainColor = '#1874ff'
 Vue.prototype.getTimeStamp = function(timeInSeconds) {

+ 1 - 3
src/utils/eLang.js

@@ -38,7 +38,6 @@ eLang.getString = function(widget, token, offset)
 {
 	var optBit = arguments[2];
 
-	debugger
 
 	if (token=="")
 		return " ";
@@ -93,5 +92,4 @@ eLang.getString = function(widget, token, offset)
 
 
 eLang.loaded = true;
-
-export default eLang
+window.eLang = eLang

+ 2 - 6
src/views/EventLogs.vue

@@ -48,7 +48,7 @@
         <Col
           :span="7"
           style="text-align:right"
-        />
+        >
         <!-- <Button type="primary">保存事件日志</Button> -->
         <Button
           type="primary"
@@ -65,7 +65,7 @@
 <script>
 import Title from '@/components/title'
 import api from '../api/'
-// import eLang from '../utils/eLang.js'
+
 // console.log(eLang)
 let ALL_SENSORS = 0;		//Filter for all sensors
 let ALL_EVENTS = 0;		//Filter for all events.
@@ -215,8 +215,6 @@ export default {
         },
         filterByData(data){
         	let eventtype = 0;
-        	console.log(data)
-
 			 data.forEach(item =>{
 				if(this.formItem.lowGraveErr != 0){
 					if (item.RecordType >= 0x0 && 
@@ -338,11 +336,9 @@ export default {
 			this.data = data
         },
         getData(){
-        	
         	api.Get("/action/GetAllSELEntriesSorted", {}).then((res)=>{
                 // this.data = res.data
                 this.filterByData(res.data)
-                // console.log(this.sensorNameSet)
                 this.spinShow = false
 			
             }).catch((err)=>{

+ 1 - 1
src/views/dashbord.vue

@@ -86,7 +86,7 @@
                                     <Col span="8"><strong>读值</strong></Col>
                                     <Col span="4"><strong>详情</strong></Col>
                                 </Row>
-                                <Row class='line-class on' v-for="item in sensorsList" type="flex" justify="center">
+                                <Row class='line-class on' v-for="(item, index) in sensorsList" :key="index" type="flex" justify="center">
                                     <Col span="4">
                                         <img :src="getImg(item.status)" title="OK" style="width: 12px" border="0">
 <!--                                        <img :src="item.state=='ok' ? okImg : errorImg" title="error" style="width: 12px" border="0">-->

+ 1 - 1
src/views/login.vue

@@ -67,7 +67,7 @@ export default {
                   let res = await api.Get('/action/login', this.formInline)
                   if(res.code == 200) {
                       this.$Message.success('登录成功!');
-                      this.$router.push({path: this.$route.query.redirect || '/index'}).catch((e) => {console.log(e)});
+                      this.$router.push({path: this.$route.query.redirect || '/index/dashbord'}).catch((e) => {console.log(e)});
                   } else {
                       this.$Message.error('账号或密码错误!');
                   }