日期问题修改
This commit is contained in:
		
							parent
							
								
									85a75db053
								
							
						
					
					
						commit
						cbc7a88e33
					
				@ -16,6 +16,67 @@ module.exports = {
 | 
				
			|||||||
    { name: 'Greater than or equal (>=)', value: 3 },
 | 
					    { name: 'Greater than or equal (>=)', value: 3 },
 | 
				
			||||||
    { name: 'Less than or equal (<=)', value: 4 }
 | 
					    { name: 'Less than or equal (<=)', value: 4 }
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
 | 
					  types: {
 | 
				
			||||||
 | 
					      0: '无意义的传感器',
 | 
				
			||||||
 | 
					      1: '空气温度',
 | 
				
			||||||
 | 
					      2: '空气湿度',
 | 
				
			||||||
 | 
					      3: '光亮度',
 | 
				
			||||||
 | 
					      4: '二氧化碳',
 | 
				
			||||||
 | 
					      5: '土壤温度',
 | 
				
			||||||
 | 
					      6: '土壤湿度',
 | 
				
			||||||
 | 
					      7: '水温',
 | 
				
			||||||
 | 
					      8: '水肥PH',
 | 
				
			||||||
 | 
					      9: '水肥EC',
 | 
				
			||||||
 | 
					      10: '压差',
 | 
				
			||||||
 | 
					      11: '风速',
 | 
				
			||||||
 | 
					      12: '风向',
 | 
				
			||||||
 | 
					      13: '雨雪信号',
 | 
				
			||||||
 | 
					      14: '降雨量',
 | 
				
			||||||
 | 
					      15: '光合有效辐射',
 | 
				
			||||||
 | 
					      16: '太阳总辐射',
 | 
				
			||||||
 | 
					      17: '流量',
 | 
				
			||||||
 | 
					      18: '大气压强',
 | 
				
			||||||
 | 
					      19: '土壤PH',
 | 
				
			||||||
 | 
					      20: '土壤EC',
 | 
				
			||||||
 | 
					      21: '叶面温度',
 | 
				
			||||||
 | 
					      22: '叶面湿度',
 | 
				
			||||||
 | 
					      23: '果实直径',
 | 
				
			||||||
 | 
					      24: '茎秆直径',
 | 
				
			||||||
 | 
					      25: '流速',
 | 
				
			||||||
 | 
					      26: '瞬时流量',
 | 
				
			||||||
 | 
					      27: '当日流量',
 | 
				
			||||||
 | 
					      28: '累计流量',
 | 
				
			||||||
 | 
					      29: '无线气象站电池电压',
 | 
				
			||||||
 | 
					      30: '无线气象站无线信号强度',
 | 
				
			||||||
 | 
					      31: '无线气象站信噪比(SNR)',
 | 
				
			||||||
 | 
					      32: 'PM1.0',
 | 
				
			||||||
 | 
					      33: 'PM2.5',
 | 
				
			||||||
 | 
					      34: 'PM10',
 | 
				
			||||||
 | 
					      35: '紫外辐射',
 | 
				
			||||||
 | 
					      36: '蒸发量',
 | 
				
			||||||
 | 
					      37: '负氧离子',
 | 
				
			||||||
 | 
					      38: '露点温度',
 | 
				
			||||||
 | 
					      39: '一氧化碳',
 | 
				
			||||||
 | 
					      40: '氨氮',
 | 
				
			||||||
 | 
					      41: '土壤氮含量',
 | 
				
			||||||
 | 
					      42: '土壤磷含量',
 | 
				
			||||||
 | 
					      43: '土壤钾含量',
 | 
				
			||||||
 | 
					      44: '管道压力',
 | 
				
			||||||
 | 
					      45: '水位',
 | 
				
			||||||
 | 
					      46: '氨气',
 | 
				
			||||||
 | 
					      47: '浊度',
 | 
				
			||||||
 | 
					      48: '氧气',
 | 
				
			||||||
 | 
					      49: '土壤张力',
 | 
				
			||||||
 | 
					      50: '铜(CU)',
 | 
				
			||||||
 | 
					      51: '镉(CD)',
 | 
				
			||||||
 | 
					      52: '铅(PB)',
 | 
				
			||||||
 | 
					      53: '噪声',
 | 
				
			||||||
 | 
					      54: '溶解氧',
 | 
				
			||||||
 | 
					      55: '虫数量',
 | 
				
			||||||
 | 
					      56: '无线传感器电池电压',
 | 
				
			||||||
 | 
					      57: '无线传感器无线信号强度',
 | 
				
			||||||
 | 
					      58: '无线传感器信噪比(SNR)'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  message: {
 | 
					  message: {
 | 
				
			||||||
    delete: 'Delete successfully.',
 | 
					    delete: 'Delete successfully.',
 | 
				
			||||||
    add: 'Added successfully',
 | 
					    add: 'Added successfully',
 | 
				
			||||||
@ -227,6 +288,7 @@ module.exports = {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  realTime: {
 | 
					  realTime: {
 | 
				
			||||||
 | 
					    Expired:'Expired',
 | 
				
			||||||
    due:'Due',
 | 
					    due:'Due',
 | 
				
			||||||
    Expiration:'Expiration Date',
 | 
					    Expiration:'Expiration Date',
 | 
				
			||||||
    target: 'Target',
 | 
					    target: 'Target',
 | 
				
			||||||
 | 
				
			|||||||
@ -18,6 +18,67 @@ module.exports = {
 | 
				
			|||||||
    { name: '大于等于(>=)', value: 3 },
 | 
					    { name: '大于等于(>=)', value: 3 },
 | 
				
			||||||
    { name: '小于等于(<=)', value: 4 }
 | 
					    { name: '小于等于(<=)', value: 4 }
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
 | 
					  types: {
 | 
				
			||||||
 | 
					    0: '无意义的传感器',
 | 
				
			||||||
 | 
					      1: '空气温度',
 | 
				
			||||||
 | 
					      2: '空气湿度',
 | 
				
			||||||
 | 
					      3: '光亮度',
 | 
				
			||||||
 | 
					      4: '二氧化碳',
 | 
				
			||||||
 | 
					      5: '土壤温度',
 | 
				
			||||||
 | 
					      6: '土壤湿度',
 | 
				
			||||||
 | 
					      7: '水温',
 | 
				
			||||||
 | 
					      8: '水肥PH',
 | 
				
			||||||
 | 
					      9: '水肥EC',
 | 
				
			||||||
 | 
					      10: '压差',
 | 
				
			||||||
 | 
					      11: '风速',
 | 
				
			||||||
 | 
					      12: '风向',
 | 
				
			||||||
 | 
					      13: '雨雪信号',
 | 
				
			||||||
 | 
					      14: '降雨量',
 | 
				
			||||||
 | 
					      15: '光合有效辐射',
 | 
				
			||||||
 | 
					      16: '太阳总辐射',
 | 
				
			||||||
 | 
					      17: '流量',
 | 
				
			||||||
 | 
					      18: '大气压强',
 | 
				
			||||||
 | 
					      19: '土壤PH',
 | 
				
			||||||
 | 
					      20: '土壤EC',
 | 
				
			||||||
 | 
					      21: '叶面温度',
 | 
				
			||||||
 | 
					      22: '叶面湿度',
 | 
				
			||||||
 | 
					      23: '果实直径',
 | 
				
			||||||
 | 
					      24: '茎秆直径',
 | 
				
			||||||
 | 
					      25: '流速',
 | 
				
			||||||
 | 
					      26: '瞬时流量',
 | 
				
			||||||
 | 
					      27: '当日流量',
 | 
				
			||||||
 | 
					      28: '累计流量',
 | 
				
			||||||
 | 
					      29: '无线气象站电池电压',
 | 
				
			||||||
 | 
					      30: '无线气象站无线信号强度',
 | 
				
			||||||
 | 
					      31: '无线气象站信噪比(SNR)',
 | 
				
			||||||
 | 
					      32: 'PM1.0',
 | 
				
			||||||
 | 
					      33: 'PM2.5',
 | 
				
			||||||
 | 
					      34: 'PM10',
 | 
				
			||||||
 | 
					      35: '紫外辐射',
 | 
				
			||||||
 | 
					      36: '蒸发量',
 | 
				
			||||||
 | 
					      37: '负氧离子',
 | 
				
			||||||
 | 
					      38: '露点温度',
 | 
				
			||||||
 | 
					      39: '一氧化碳',
 | 
				
			||||||
 | 
					      40: '氨氮',
 | 
				
			||||||
 | 
					      41: '土壤氮含量',
 | 
				
			||||||
 | 
					      42: '土壤磷含量',
 | 
				
			||||||
 | 
					      43: '土壤钾含量',
 | 
				
			||||||
 | 
					      44: '管道压力',
 | 
				
			||||||
 | 
					      45: '水位',
 | 
				
			||||||
 | 
					      46: '氨气',
 | 
				
			||||||
 | 
					      47: '浊度',
 | 
				
			||||||
 | 
					      48: '氧气',
 | 
				
			||||||
 | 
					      49: '土壤张力',
 | 
				
			||||||
 | 
					      50: '铜(CU)',
 | 
				
			||||||
 | 
					      51: '镉(CD)',
 | 
				
			||||||
 | 
					      52: '铅(PB)',
 | 
				
			||||||
 | 
					      53: '噪声',
 | 
				
			||||||
 | 
					      54: '溶解氧',
 | 
				
			||||||
 | 
					      55: '虫数量',
 | 
				
			||||||
 | 
					      56: '无线传感器电池电压',
 | 
				
			||||||
 | 
					      57: '无线传感器无线信号强度',
 | 
				
			||||||
 | 
					      58: '无线传感器信噪比(SNR)'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  // 各个input的placeholder
 | 
					  // 各个input的placeholder
 | 
				
			||||||
  placeholder: {
 | 
					  placeholder: {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -234,6 +295,7 @@ module.exports = {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  // 实时页面
 | 
					  // 实时页面
 | 
				
			||||||
  realTime: {
 | 
					  realTime: {
 | 
				
			||||||
 | 
					    Expired:'已过期',
 | 
				
			||||||
    due:'即将到期',
 | 
					    due:'即将到期',
 | 
				
			||||||
    Expiration:'到期时间',
 | 
					    Expiration:'到期时间',
 | 
				
			||||||
    target: '目标',
 | 
					    target: '目标',
 | 
				
			||||||
 | 
				
			|||||||
@ -20,8 +20,8 @@ export default new Vuex.Store({
 | 
				
			|||||||
    //label是名称
 | 
					    //label是名称
 | 
				
			||||||
    //value是code码
 | 
					    //value是code码
 | 
				
			||||||
    //countType计算类型 0是原数据 1是原数据-400 2是原数据/10 3是(原数据-400) / 10 4是(原数据-1000)/10
 | 
					    //countType计算类型 0是原数据 1是原数据-400 2是原数据/10 3是(原数据-400) / 10 4是(原数据-1000)/10
 | 
				
			||||||
    typeList: [
 | 
					   typeList:[
 | 
				
			||||||
      { label: '无意义的传感器', value: 0, countType: 0,unit:'' },
 | 
					     { label:  '无意义的传感器', value: 0, countType: 0,unit:'' },
 | 
				
			||||||
      { label: '空气温度', value: 1, countType: 3,unit:'℃' },
 | 
					      { label: '空气温度', value: 1, countType: 3,unit:'℃' },
 | 
				
			||||||
      { label: '空气湿度', value: 2, countType: 2,unit:'%' },
 | 
					      { label: '空气湿度', value: 2, countType: 2,unit:'%' },
 | 
				
			||||||
      { label: '光亮度', value: 3, countType: 2,unit:'Klux' },
 | 
					      { label: '光亮度', value: 3, countType: 2,unit:'Klux' },
 | 
				
			||||||
@ -80,7 +80,7 @@ export default new Vuex.Store({
 | 
				
			|||||||
      { label: '无线传感器电池电压', value: 56, countType: 2,unit:'V' },
 | 
					      { label: '无线传感器电池电压', value: 56, countType: 2,unit:'V' },
 | 
				
			||||||
      { label: '无线传感器无线信号强度', value: 57, countType: 1,unit:'dBm' },
 | 
					      { label: '无线传感器无线信号强度', value: 57, countType: 1,unit:'dBm' },
 | 
				
			||||||
      { label: '无线传感器信噪比(SNR)', value: 58, countType: 1,unit:'dB' },
 | 
					      { label: '无线传感器信噪比(SNR)', value: 58, countType: 1,unit:'dB' },
 | 
				
			||||||
    ]
 | 
					    ],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  getters: {
 | 
					  getters: {
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
				
			|||||||
@ -582,6 +582,14 @@ export default {
 | 
				
			|||||||
        waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
 | 
					        waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					  typeList() {
 | 
				
			||||||
 | 
					    return this.$store.state.typeList.map(item => {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        ...item,
 | 
				
			||||||
 | 
					        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@ -1052,7 +1060,7 @@ export default {
 | 
				
			|||||||
        if (res.data.code == 200) {
 | 
					        if (res.data.code == 200) {
 | 
				
			||||||
          this.list = [];
 | 
					          this.list = [];
 | 
				
			||||||
          var store = this.$store.state;
 | 
					          var store = this.$store.state;
 | 
				
			||||||
          var list = store.typeList;
 | 
					          var list = this.typeList;
 | 
				
			||||||
          res.data.data.forEach((el, index) => {
 | 
					          res.data.data.forEach((el, index) => {
 | 
				
			||||||
            list.forEach((el1, index1) => {
 | 
					            list.forEach((el1, index1) => {
 | 
				
			||||||
              if (el.formula == el1.value) {
 | 
					              if (el.formula == el1.value) {
 | 
				
			||||||
@ -1224,7 +1232,7 @@ export default {
 | 
				
			|||||||
    getTypeList(val) {
 | 
					    getTypeList(val) {
 | 
				
			||||||
      var store = this.$store.state;
 | 
					      var store = this.$store.state;
 | 
				
			||||||
      let typeList1 = [];
 | 
					      let typeList1 = [];
 | 
				
			||||||
      typeList1 = store.typeList.filter((item) => {
 | 
					      typeList1 = this.typeList.filter((item) => {
 | 
				
			||||||
        return item.value == val;
 | 
					        return item.value == val;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      return typeList1[0].unit;
 | 
					      return typeList1[0].unit;
 | 
				
			||||||
 | 
				
			|||||||
@ -876,7 +876,6 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      time: "", //当前时间
 | 
					      time: "", //当前时间
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      typeList: this.$store.state.typeList,
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      limitUserId: "",
 | 
					      limitUserId: "",
 | 
				
			||||||
      popContentList1: [],
 | 
					      popContentList1: [],
 | 
				
			||||||
@ -898,9 +897,18 @@ export default {
 | 
				
			|||||||
    this.login();
 | 
					    this.login();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.getTime();
 | 
					    this.getTime();
 | 
				
			||||||
  this.typeList=this.$store.state.typeList
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					     computed: {
 | 
				
			||||||
 | 
					  typeList() {
 | 
				
			||||||
 | 
					    return this.$store.state.typeList.map(item => {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        ...item,
 | 
				
			||||||
 | 
					        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					},
 | 
				
			||||||
  beforeDestroy() {
 | 
					  beforeDestroy() {
 | 
				
			||||||
    clearInterval(this.timer2) && this.timer2;
 | 
					    clearInterval(this.timer2) && this.timer2;
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
				
			|||||||
@ -54,7 +54,6 @@ export default {
 | 
				
			|||||||
  components: { largeNav },
 | 
					  components: { largeNav },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      typeList: [],
 | 
					 | 
				
			||||||
      limitUserId: 13,
 | 
					      limitUserId: 13,
 | 
				
			||||||
      time: {},
 | 
					      time: {},
 | 
				
			||||||
      videoList: [],
 | 
					      videoList: [],
 | 
				
			||||||
@ -63,11 +62,20 @@ export default {
 | 
				
			|||||||
      currentPage: 1,
 | 
					      currentPage: 1,
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					       computed: {
 | 
				
			||||||
 | 
					  typeList() {
 | 
				
			||||||
 | 
					    return this.$store.state.typeList.map(item => {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        ...item,
 | 
				
			||||||
 | 
					        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					},
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    // this.login();
 | 
					    // this.login();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.getTime();
 | 
					    this.getTime();
 | 
				
			||||||
    this.typeList = this.$store.state.typeList;
 | 
					 | 
				
			||||||
    this.list1 = [
 | 
					    this.list1 = [
 | 
				
			||||||
      { cameraid: "FT5712546", channelid: 1, name:'二期 3#温室西面内部', player: null },
 | 
					      { cameraid: "FT5712546", channelid: 1, name:'二期 3#温室西面内部', player: null },
 | 
				
			||||||
      { cameraid: "FT5712546", channelid: 2, name:'二期 1#温室东面内部', player: null },
 | 
					      { cameraid: "FT5712546", channelid: 2, name:'二期 1#温室东面内部', player: null },
 | 
				
			||||||
 | 
				
			|||||||
@ -183,7 +183,14 @@ export default {
 | 
				
			|||||||
        waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
 | 
					        waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
   
 | 
					  typeList() {
 | 
				
			||||||
 | 
					    return this.$store.state.typeList.map(item => {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        ...item,
 | 
				
			||||||
 | 
					        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					},
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@ -536,7 +543,7 @@ export default {
 | 
				
			|||||||
        if (res.data.code == 200) {
 | 
					        if (res.data.code == 200) {
 | 
				
			||||||
          this.list = [];
 | 
					          this.list = [];
 | 
				
			||||||
          var store = this.$store.state;
 | 
					          var store = this.$store.state;
 | 
				
			||||||
          var list = store.typeList;
 | 
					          var list = this.typeList;
 | 
				
			||||||
          res.data.data.forEach((el, index) => {
 | 
					          res.data.data.forEach((el, index) => {
 | 
				
			||||||
            list.forEach((el1, index1) => {
 | 
					            list.forEach((el1, index1) => {
 | 
				
			||||||
              if (el.formula == el1.value) {
 | 
					              if (el.formula == el1.value) {
 | 
				
			||||||
@ -708,7 +715,7 @@ export default {
 | 
				
			|||||||
    getTypeList(val) {
 | 
					    getTypeList(val) {
 | 
				
			||||||
      var store = this.$store.state;
 | 
					      var store = this.$store.state;
 | 
				
			||||||
      let typeList1 = [];
 | 
					      let typeList1 = [];
 | 
				
			||||||
      typeList1 = store.typeList.filter((item) => {
 | 
					      typeList1 = this.typeList.filter((item) => {
 | 
				
			||||||
        return item.value == val;
 | 
					        return item.value == val;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      return typeList1[0].unit;
 | 
					      return typeList1[0].unit;
 | 
				
			||||||
 | 
				
			|||||||
@ -38,7 +38,7 @@
 | 
				
			|||||||
        <div class="page-content new-data" v-else :class="deviceName !=1 ? 'control-page' : ''">
 | 
					        <div class="page-content new-data" v-else :class="deviceName !=1 ? 'control-page' : ''">
 | 
				
			||||||
            <div class="page-iccid" v-if="validateIccid($store.state.equipmentList[indexs - 1].iccidcode)"><span>{{$t('realTime.iccid')}}:{{$store.state.equipmentList[indexs - 1].iccidcode?$store.state.equipmentList[indexs - 1].iccidcode:''}}</span>   
 | 
					            <div class="page-iccid" v-if="validateIccid($store.state.equipmentList[indexs - 1].iccidcode)"><span>{{$t('realTime.iccid')}}:{{$store.state.equipmentList[indexs - 1].iccidcode?$store.state.equipmentList[indexs - 1].iccidcode:''}}</span>   
 | 
				
			||||||
            <span v-if="getPackageTimeColor()">{{$t('realTime.Expiration')}}: </span>
 | 
					            <span v-if="getPackageTimeColor()">{{$t('realTime.Expiration')}}: </span>
 | 
				
			||||||
            <span v-if="getPackageTimeColor()" :class="getPackageTimeColor()?'color-red':''">{{getPackageTime()}}<span v-if="getPackageTimeColor()">({{$t('realTime.due')}})</span></span> </div>
 | 
					            <span v-if="getPackageTimeColor()" :class="getPackageTimeColor()?'color-red':''">{{getPackageTime()}}<span v-if="getPackageTimeColor()">({{getTimeTips()}})</span></span> </div>
 | 
				
			||||||
            <div class="control-view" v-if="deviceName !=1">
 | 
					            <div class="control-view" v-if="deviceName !=1">
 | 
				
			||||||
                <div class="title" @click='weatherModel = true'>{{$t('index.weatherStation')}}:</div>
 | 
					                <div class="title" @click='weatherModel = true'>{{$t('index.weatherStation')}}:</div>
 | 
				
			||||||
                <vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1">
 | 
					                <vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1">
 | 
				
			||||||
@ -693,7 +693,15 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
            typeSelList1(){
 | 
					            typeSelList1(){
 | 
				
			||||||
            return  this.$t('comparisonOperators')   
 | 
					            return  this.$t('comparisonOperators')   
 | 
				
			||||||
            }
 | 
					            },
 | 
				
			||||||
 | 
					  typeList() {
 | 
				
			||||||
 | 
					    return this.$store.state.typeList.map(item => {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        ...item,
 | 
				
			||||||
 | 
					        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    data() {
 | 
					    data() {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
@ -803,6 +811,13 @@ export default {
 | 
				
			|||||||
        this.$bus.$off('refreshTime')
 | 
					        this.$bus.$off('refreshTime')
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    methods: {
 | 
					    methods: {
 | 
				
			||||||
 | 
					        getTimeTips(){
 | 
				
			||||||
 | 
					             var item= this.$store.state.iccidList.find(item=>item?.iccid==this.$store.state.equipmentList[this.indexs - 1].iccidcode)
 | 
				
			||||||
 | 
					      const currentDate = new Date()
 | 
				
			||||||
 | 
					    const packageDate = new Date(item.packageTime)
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    return currentDate > packageDate ? this.$t('realTime.Expired')  : this.$t('realTime.due')
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        getPackageTime(){
 | 
					        getPackageTime(){
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
           var item= this.$store.state.iccidList.find(item=> item?.iccid==this.$store.state.equipmentList[this.indexs - 1].iccidcode)
 | 
					           var item= this.$store.state.iccidList.find(item=> item?.iccid==this.$store.state.equipmentList[this.indexs - 1].iccidcode)
 | 
				
			||||||
@ -1212,7 +1227,7 @@ export default {
 | 
				
			|||||||
                 this.typeSelList=[]
 | 
					                 this.typeSelList=[]
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
            var list = store.typeList
 | 
					            var list = this.typeList
 | 
				
			||||||
            if (this.deviceName == 1) {
 | 
					            if (this.deviceName == 1) {
 | 
				
			||||||
                this.api.postRtdata(params).then((res) => {
 | 
					                this.api.postRtdata(params).then((res) => {
 | 
				
			||||||
                    if (res.data.code == 200) {
 | 
					                    if (res.data.code == 200) {
 | 
				
			||||||
@ -1579,7 +1594,7 @@ export default {
 | 
				
			|||||||
        getControlRtDatastation(params){
 | 
					        getControlRtDatastation(params){
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            var store = this.$store.state
 | 
					            var store = this.$store.state
 | 
				
			||||||
               var list = store.typeList
 | 
					               var list = this.typeList
 | 
				
			||||||
              this.api.getControlRtDatastation(params).then(res => {
 | 
					              this.api.getControlRtDatastation(params).then(res => {
 | 
				
			||||||
                    this.controlList = []
 | 
					                    this.controlList = []
 | 
				
			||||||
                    if (res.data.code == 200) {
 | 
					                    if (res.data.code == 200) {
 | 
				
			||||||
@ -1608,7 +1623,7 @@ export default {
 | 
				
			|||||||
        getFi_rtdata(params){
 | 
					        getFi_rtdata(params){
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            var store = this.$store.state
 | 
					            var store = this.$store.state
 | 
				
			||||||
               var list = store.typeList
 | 
					               var list = this.typeList
 | 
				
			||||||
              this.api.getFi_rtdata(params).then(res=>{
 | 
					              this.api.getFi_rtdata(params).then(res=>{
 | 
				
			||||||
                    if (res.data.code == 200) {
 | 
					                    if (res.data.code == 200) {
 | 
				
			||||||
                        this.inputData = res.data.data;
 | 
					                        this.inputData = res.data.data;
 | 
				
			||||||
 | 
				
			|||||||
@ -252,7 +252,6 @@ export default {
 | 
				
			|||||||
            openList2: [],//当前有效的传感器
 | 
					            openList2: [],//当前有效的传感器
 | 
				
			||||||
            openList3: [],//当前有效的传感器
 | 
					            openList3: [],//当前有效的传感器
 | 
				
			||||||
            openTypeList: [],//八个通道输入信号的类型
 | 
					            openTypeList: [],//八个通道输入信号的类型
 | 
				
			||||||
            typeList: this.$store.state.typeList,
 | 
					 | 
				
			||||||
      loading:null,
 | 
					      loading:null,
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
      model: false,
 | 
					      model: false,
 | 
				
			||||||
@ -267,6 +266,16 @@ export default {
 | 
				
			|||||||
      this.dataInit();
 | 
					      this.dataInit();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					        computed: {
 | 
				
			||||||
 | 
					  typeList() {
 | 
				
			||||||
 | 
					    return this.$store.state.typeList.map(item => {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        ...item,
 | 
				
			||||||
 | 
					        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					},
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
        this.dataInit()
 | 
					        this.dataInit()
 | 
				
			||||||
 | 
				
			|||||||
@ -161,7 +161,6 @@ export default {
 | 
				
			|||||||
            inputDataNew: [],
 | 
					            inputDataNew: [],
 | 
				
			||||||
            sensorType: '',//当前传感器类型
 | 
					            sensorType: '',//当前传感器类型
 | 
				
			||||||
            openList: [],//当前有效的传感器
 | 
					            openList: [],//当前有效的传感器
 | 
				
			||||||
            typeList: this.$store.state.typeList,
 | 
					 | 
				
			||||||
            loading: null,
 | 
					            loading: null,
 | 
				
			||||||
            list1: '',
 | 
					            list1: '',
 | 
				
			||||||
            list2: '',
 | 
					            list2: '',
 | 
				
			||||||
@ -185,6 +184,16 @@ export default {
 | 
				
			|||||||
            this.numberList.push(10206 + (i * 5))
 | 
					            this.numberList.push(10206 + (i * 5))
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					       computed: {
 | 
				
			||||||
 | 
					  typeList() {
 | 
				
			||||||
 | 
					    return this.$store.state.typeList.map(item => {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        ...item,
 | 
				
			||||||
 | 
					        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					},
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
        this.loading = this.$loading({
 | 
					        this.loading = this.$loading({
 | 
				
			||||||
            lock: true,
 | 
					            lock: true,
 | 
				
			||||||
@ -310,10 +319,9 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        getSensorType() {
 | 
					        getSensorType() {
 | 
				
			||||||
       
 | 
					       
 | 
				
			||||||
            var text='无意义的传感器'
 | 
					            var text=this.$t('types.meaningless')
 | 
				
			||||||
            this.typeList.forEach((el, index) => {
 | 
					            this.typeList.forEach((el, index) => {
 | 
				
			||||||
                if (el.value == this.inputData[this.numberList[this.active]]) {
 | 
					                if (el.value == this.inputData[this.numberList[this.active]]) {
 | 
				
			||||||
                    console.log(el.label,this.numberList[this.active],this.inputData[this.numberList[this.active]],111);
 | 
					 | 
				
			||||||
                    text = el.label
 | 
					                    text = el.label
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
 | 
				
			|||||||
@ -102,10 +102,19 @@ export default {
 | 
				
			|||||||
            inputDataNew:[],
 | 
					            inputDataNew:[],
 | 
				
			||||||
            sensorType:'',//当前传感器类型
 | 
					            sensorType:'',//当前传感器类型
 | 
				
			||||||
            openList: [],//当前有效的传感器
 | 
					            openList: [],//当前有效的传感器
 | 
				
			||||||
            typeList:this.$store.state.typeList,
 | 
					 | 
				
			||||||
      loading:null,
 | 
					      loading:null,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					         computed: {
 | 
				
			||||||
 | 
					  typeList() {
 | 
				
			||||||
 | 
					    return this.$store.state.typeList.map(item => {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        ...item,
 | 
				
			||||||
 | 
					        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					},
 | 
				
			||||||
    watch:{
 | 
					    watch:{
 | 
				
			||||||
        'active'(newVal,oldVal){
 | 
					        'active'(newVal,oldVal){
 | 
				
			||||||
            this.getSensorType()
 | 
					            this.getSensorType()
 | 
				
			||||||
 | 
				
			|||||||
@ -290,6 +290,14 @@ export default {
 | 
				
			|||||||
                ]
 | 
					                ]
 | 
				
			||||||
        return data
 | 
					        return data
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					  typeList() {
 | 
				
			||||||
 | 
					    return this.$store.state.typeList.map(item => {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        ...item,
 | 
				
			||||||
 | 
					        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //清除监听
 | 
					    //清除监听
 | 
				
			||||||
    beforeDestroy() {
 | 
					    beforeDestroy() {
 | 
				
			||||||
@ -341,7 +349,7 @@ export default {
 | 
				
			|||||||
            return num.toFixed(2)
 | 
					            return num.toFixed(2)
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        getTypeData(dataCode, typeCode) {
 | 
					        getTypeData(dataCode, typeCode) {
 | 
				
			||||||
            var typeList = this.$store.state.typeList
 | 
					            var typeList = this.typeList
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var countType = 0
 | 
					            var countType = 0
 | 
				
			||||||
            typeList.forEach((el, index) => {
 | 
					            typeList.forEach((el, index) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -44,9 +44,9 @@ module.exports = {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
      proxy: {
 | 
					      proxy: {
 | 
				
			||||||
        "/api": {
 | 
					        "/api": {
 | 
				
			||||||
          target: 'https://api.lihe-control.com', //地址
 | 
					          // target: 'https://api.lihe-control.com', //地址
 | 
				
			||||||
          // target: 'http://jiaxingtest.a1.luyouxia.net:21114', //地址
 | 
					          // target: 'http://jiaxingtest.a1.luyouxia.net:21114', //地址
 | 
				
			||||||
          // target: 'http://jiaxingtest.e1.luyouxia.top:19159', //地址
 | 
					          target: 'http://jiaxingtest.e1.luyouxia.top:19159', //地址
 | 
				
			||||||
          // target: 'http://jiaxingtest.a1.luyouxia.net:25762', //地址
 | 
					          // target: 'http://jiaxingtest.a1.luyouxia.net:25762', //地址
 | 
				
			||||||
          changeOrigin: true,
 | 
					          changeOrigin: true,
 | 
				
			||||||
          pathRewrite: {
 | 
					          pathRewrite: {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user