pc-master #263
@ -16,6 +16,67 @@ module.exports = {
 | 
			
		||||
    { name: 'Greater than or equal (>=)', value: 3 },
 | 
			
		||||
    { 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: {
 | 
			
		||||
    delete: 'Delete successfully.',
 | 
			
		||||
    add: 'Added successfully',
 | 
			
		||||
@ -227,6 +288,7 @@ module.exports = {
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  realTime: {
 | 
			
		||||
    Expired:'Expired',
 | 
			
		||||
    due:'Due',
 | 
			
		||||
    Expiration:'Expiration Date',
 | 
			
		||||
    target: 'Target',
 | 
			
		||||
 | 
			
		||||
@ -18,6 +18,67 @@ module.exports = {
 | 
			
		||||
    { name: '大于等于(>=)', value: 3 },
 | 
			
		||||
    { 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
 | 
			
		||||
  placeholder: {
 | 
			
		||||
 | 
			
		||||
@ -234,6 +295,7 @@ module.exports = {
 | 
			
		||||
  },
 | 
			
		||||
  // 实时页面
 | 
			
		||||
  realTime: {
 | 
			
		||||
    Expired:'已过期',
 | 
			
		||||
    due:'即将到期',
 | 
			
		||||
    Expiration:'到期时间',
 | 
			
		||||
    target: '目标',
 | 
			
		||||
 | 
			
		||||
@ -20,7 +20,7 @@ export default new Vuex.Store({
 | 
			
		||||
    //label是名称
 | 
			
		||||
    //value是code码
 | 
			
		||||
    //countType计算类型 0是原数据 1是原数据-400 2是原数据/10 3是(原数据-400) / 10 4是(原数据-1000)/10
 | 
			
		||||
    typeList: [
 | 
			
		||||
   typeList:[
 | 
			
		||||
     { label:  '无意义的传感器', value: 0, countType: 0,unit:'' },
 | 
			
		||||
      { label: '空气温度', value: 1, countType: 3,unit:'℃' },
 | 
			
		||||
      { label: '空气湿度', value: 2, countType: 2,unit:'%' },
 | 
			
		||||
@ -80,7 +80,7 @@ export default new Vuex.Store({
 | 
			
		||||
      { label: '无线传感器电池电压', value: 56, countType: 2,unit:'V' },
 | 
			
		||||
      { label: '无线传感器无线信号强度', value: 57, countType: 1,unit:'dBm' },
 | 
			
		||||
      { label: '无线传感器信噪比(SNR)', value: 58, countType: 1,unit:'dB' },
 | 
			
		||||
    ]
 | 
			
		||||
    ],
 | 
			
		||||
  },
 | 
			
		||||
  getters: {
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -582,6 +582,14 @@ export default {
 | 
			
		||||
        waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  typeList() {
 | 
			
		||||
    return this.$store.state.typeList.map(item => {
 | 
			
		||||
      return {
 | 
			
		||||
        ...item,
 | 
			
		||||
        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
@ -1052,7 +1060,7 @@ export default {
 | 
			
		||||
        if (res.data.code == 200) {
 | 
			
		||||
          this.list = [];
 | 
			
		||||
          var store = this.$store.state;
 | 
			
		||||
          var list = store.typeList;
 | 
			
		||||
          var list = this.typeList;
 | 
			
		||||
          res.data.data.forEach((el, index) => {
 | 
			
		||||
            list.forEach((el1, index1) => {
 | 
			
		||||
              if (el.formula == el1.value) {
 | 
			
		||||
@ -1224,7 +1232,7 @@ export default {
 | 
			
		||||
    getTypeList(val) {
 | 
			
		||||
      var store = this.$store.state;
 | 
			
		||||
      let typeList1 = [];
 | 
			
		||||
      typeList1 = store.typeList.filter((item) => {
 | 
			
		||||
      typeList1 = this.typeList.filter((item) => {
 | 
			
		||||
        return item.value == val;
 | 
			
		||||
      });
 | 
			
		||||
      return typeList1[0].unit;
 | 
			
		||||
 | 
			
		||||
@ -876,7 +876,6 @@ export default {
 | 
			
		||||
 | 
			
		||||
      time: "", //当前时间
 | 
			
		||||
 | 
			
		||||
      typeList: this.$store.state.typeList,
 | 
			
		||||
 | 
			
		||||
      limitUserId: "",
 | 
			
		||||
      popContentList1: [],
 | 
			
		||||
@ -898,9 +897,18 @@ export default {
 | 
			
		||||
    this.login();
 | 
			
		||||
 | 
			
		||||
    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() {
 | 
			
		||||
    clearInterval(this.timer2) && this.timer2;
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -54,7 +54,6 @@ export default {
 | 
			
		||||
  components: { largeNav },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      typeList: [],
 | 
			
		||||
      limitUserId: 13,
 | 
			
		||||
      time: {},
 | 
			
		||||
      videoList: [],
 | 
			
		||||
@ -63,11 +62,20 @@ export default {
 | 
			
		||||
      currentPage: 1,
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
       computed: {
 | 
			
		||||
  typeList() {
 | 
			
		||||
    return this.$store.state.typeList.map(item => {
 | 
			
		||||
      return {
 | 
			
		||||
        ...item,
 | 
			
		||||
        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
},
 | 
			
		||||
  mounted() {
 | 
			
		||||
    // this.login();
 | 
			
		||||
 | 
			
		||||
    this.getTime();
 | 
			
		||||
    this.typeList = this.$store.state.typeList;
 | 
			
		||||
    this.list1 = [
 | 
			
		||||
      { cameraid: "FT5712546", channelid: 1, name:'二期 3#温室西面内部', player: null },
 | 
			
		||||
      { cameraid: "FT5712546", channelid: 2, name:'二期 1#温室东面内部', player: null },
 | 
			
		||||
 | 
			
		||||
@ -183,7 +183,14 @@ export default {
 | 
			
		||||
        waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
   
 | 
			
		||||
  typeList() {
 | 
			
		||||
    return this.$store.state.typeList.map(item => {
 | 
			
		||||
      return {
 | 
			
		||||
        ...item,
 | 
			
		||||
        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
},
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
@ -536,7 +543,7 @@ export default {
 | 
			
		||||
        if (res.data.code == 200) {
 | 
			
		||||
          this.list = [];
 | 
			
		||||
          var store = this.$store.state;
 | 
			
		||||
          var list = store.typeList;
 | 
			
		||||
          var list = this.typeList;
 | 
			
		||||
          res.data.data.forEach((el, index) => {
 | 
			
		||||
            list.forEach((el1, index1) => {
 | 
			
		||||
              if (el.formula == el1.value) {
 | 
			
		||||
@ -708,7 +715,7 @@ export default {
 | 
			
		||||
    getTypeList(val) {
 | 
			
		||||
      var store = this.$store.state;
 | 
			
		||||
      let typeList1 = [];
 | 
			
		||||
      typeList1 = store.typeList.filter((item) => {
 | 
			
		||||
      typeList1 = this.typeList.filter((item) => {
 | 
			
		||||
        return item.value == val;
 | 
			
		||||
      });
 | 
			
		||||
      return typeList1[0].unit;
 | 
			
		||||
 | 
			
		||||
@ -38,7 +38,7 @@
 | 
			
		||||
        <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>   
 | 
			
		||||
            <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="title" @click='weatherModel = true'>{{$t('index.weatherStation')}}:</div>
 | 
			
		||||
                <vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1">
 | 
			
		||||
@ -693,6 +693,14 @@ export default {
 | 
			
		||||
        },
 | 
			
		||||
            typeSelList1(){
 | 
			
		||||
            return  this.$t('comparisonOperators')   
 | 
			
		||||
            },
 | 
			
		||||
  typeList() {
 | 
			
		||||
    return this.$store.state.typeList.map(item => {
 | 
			
		||||
      return {
 | 
			
		||||
        ...item,
 | 
			
		||||
        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
    },
 | 
			
		||||
    data() {
 | 
			
		||||
@ -803,6 +811,13 @@ export default {
 | 
			
		||||
        this.$bus.$off('refreshTime')
 | 
			
		||||
    },
 | 
			
		||||
    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(){
 | 
			
		||||
 
 | 
			
		||||
           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=[]
 | 
			
		||||
            }
 | 
			
		||||
        })
 | 
			
		||||
            var list = store.typeList
 | 
			
		||||
            var list = this.typeList
 | 
			
		||||
            if (this.deviceName == 1) {
 | 
			
		||||
                this.api.postRtdata(params).then((res) => {
 | 
			
		||||
                    if (res.data.code == 200) {
 | 
			
		||||
@ -1579,7 +1594,7 @@ export default {
 | 
			
		||||
        getControlRtDatastation(params){
 | 
			
		||||
            
 | 
			
		||||
            var store = this.$store.state
 | 
			
		||||
               var list = store.typeList
 | 
			
		||||
               var list = this.typeList
 | 
			
		||||
              this.api.getControlRtDatastation(params).then(res => {
 | 
			
		||||
                    this.controlList = []
 | 
			
		||||
                    if (res.data.code == 200) {
 | 
			
		||||
@ -1608,7 +1623,7 @@ export default {
 | 
			
		||||
        getFi_rtdata(params){
 | 
			
		||||
            
 | 
			
		||||
            var store = this.$store.state
 | 
			
		||||
               var list = store.typeList
 | 
			
		||||
               var list = this.typeList
 | 
			
		||||
              this.api.getFi_rtdata(params).then(res=>{
 | 
			
		||||
                    if (res.data.code == 200) {
 | 
			
		||||
                        this.inputData = res.data.data;
 | 
			
		||||
@ -1676,7 +1691,8 @@ export default {
 | 
			
		||||
        getPermissionStatus() {
 | 
			
		||||
            var store = this.$store.state
 | 
			
		||||
            var TargetValue = {
 | 
			
		||||
                deviceId: store.equipmentList[this.indexs - 1].deviceId
 | 
			
		||||
                deviceId: store.equipmentList[this.indexs - 1].deviceId,
 | 
			
		||||
                  enName:getLanguage()
 | 
			
		||||
            }
 | 
			
		||||
            this.api.getPermissionStatus(TargetValue).then(res => {
 | 
			
		||||
                if (res.data.code == 200) {
 | 
			
		||||
@ -1755,7 +1771,8 @@ export default {
 | 
			
		||||
        getStatus() {
 | 
			
		||||
            var store = this.$store.state
 | 
			
		||||
            var TargetValue = {
 | 
			
		||||
                deviceId: store.equipmentList[this.indexs - 1].deviceId
 | 
			
		||||
                deviceId: store.equipmentList[this.indexs - 1].deviceId,
 | 
			
		||||
                  enName:getLanguage()
 | 
			
		||||
            }
 | 
			
		||||
            this.api.getControlGetState(TargetValue).then(res => {
 | 
			
		||||
                if (res.data.code == 200) {
 | 
			
		||||
 | 
			
		||||
@ -252,7 +252,6 @@ export default {
 | 
			
		||||
            openList2: [],//当前有效的传感器
 | 
			
		||||
            openList3: [],//当前有效的传感器
 | 
			
		||||
            openTypeList: [],//八个通道输入信号的类型
 | 
			
		||||
            typeList: this.$store.state.typeList,
 | 
			
		||||
      loading:null,
 | 
			
		||||
      
 | 
			
		||||
      model: false,
 | 
			
		||||
@ -267,6 +266,16 @@ export default {
 | 
			
		||||
      this.dataInit();
 | 
			
		||||
    },
 | 
			
		||||
    },
 | 
			
		||||
        computed: {
 | 
			
		||||
  typeList() {
 | 
			
		||||
    return this.$store.state.typeList.map(item => {
 | 
			
		||||
      return {
 | 
			
		||||
        ...item,
 | 
			
		||||
        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
},
 | 
			
		||||
    mounted() {
 | 
			
		||||
      
 | 
			
		||||
        this.dataInit()
 | 
			
		||||
 | 
			
		||||
@ -161,7 +161,6 @@ export default {
 | 
			
		||||
            inputDataNew: [],
 | 
			
		||||
            sensorType: '',//当前传感器类型
 | 
			
		||||
            openList: [],//当前有效的传感器
 | 
			
		||||
            typeList: this.$store.state.typeList,
 | 
			
		||||
            loading: null,
 | 
			
		||||
            list1: '',
 | 
			
		||||
            list2: '',
 | 
			
		||||
@ -185,6 +184,16 @@ export default {
 | 
			
		||||
            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() {
 | 
			
		||||
        this.loading = this.$loading({
 | 
			
		||||
            lock: true,
 | 
			
		||||
@ -310,10 +319,9 @@ export default {
 | 
			
		||||
        },
 | 
			
		||||
        getSensorType() {
 | 
			
		||||
       
 | 
			
		||||
            var text='无意义的传感器'
 | 
			
		||||
            var text=this.$t('types.meaningless')
 | 
			
		||||
            this.typeList.forEach((el, index) => {
 | 
			
		||||
                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
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
 | 
			
		||||
@ -102,10 +102,19 @@ export default {
 | 
			
		||||
            inputDataNew:[],
 | 
			
		||||
            sensorType:'',//当前传感器类型
 | 
			
		||||
            openList: [],//当前有效的传感器
 | 
			
		||||
            typeList:this.$store.state.typeList,
 | 
			
		||||
      loading:null,
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
         computed: {
 | 
			
		||||
  typeList() {
 | 
			
		||||
    return this.$store.state.typeList.map(item => {
 | 
			
		||||
      return {
 | 
			
		||||
        ...item,
 | 
			
		||||
        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
},
 | 
			
		||||
    watch:{
 | 
			
		||||
        'active'(newVal,oldVal){
 | 
			
		||||
            this.getSensorType()
 | 
			
		||||
 | 
			
		||||
@ -290,6 +290,14 @@ export default {
 | 
			
		||||
                ]
 | 
			
		||||
        return data
 | 
			
		||||
      },
 | 
			
		||||
  typeList() {
 | 
			
		||||
    return this.$store.state.typeList.map(item => {
 | 
			
		||||
      return {
 | 
			
		||||
        ...item,
 | 
			
		||||
        label: this.$t(`types.${item.value}`) // 假设你为每个value创建了对应的翻译key
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
    },
 | 
			
		||||
    //清除监听
 | 
			
		||||
    beforeDestroy() {
 | 
			
		||||
@ -341,7 +349,7 @@ export default {
 | 
			
		||||
            return num.toFixed(2)
 | 
			
		||||
        },
 | 
			
		||||
        getTypeData(dataCode, typeCode) {
 | 
			
		||||
            var typeList = this.$store.state.typeList
 | 
			
		||||
            var typeList = this.typeList
 | 
			
		||||
 | 
			
		||||
            var countType = 0
 | 
			
		||||
            typeList.forEach((el, index) => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user