Merge branch 'master-dev' into feature-Beta-dev-renpy
This commit is contained in:
		
						commit
						fadc2b0b8e
					
				
							
								
								
									
										
											BIN
										
									
								
								src/assets/images/station-operation/data-item-bg-active.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/assets/images/station-operation/data-item-bg-active.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.5 KiB  | 
| 
						 | 
				
			
			@ -22,6 +22,11 @@
 | 
			
		|||
           <a-icon type="tool"/>
 | 
			
		||||
           <span>系统设置</span>
 | 
			
		||||
        </a-menu-item> -->
 | 
			
		||||
        <a-menu-item key="3">
 | 
			
		||||
          <a-icon type="user" />
 | 
			
		||||
          <span>{{ this.userInfo().username }}</span>
 | 
			
		||||
        </a-menu-item>
 | 
			
		||||
        <a-menu-divider />
 | 
			
		||||
        <a-menu-item key="4" @click="updatePassword">
 | 
			
		||||
          <a-icon type="setting" />
 | 
			
		||||
          <span>Change Password</span>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,13 +5,43 @@
 | 
			
		|||
        <a-col flex="108px">
 | 
			
		||||
          <a-button class="search-btn" type="primary" @click="handleConfig"> Config </a-button>
 | 
			
		||||
        </a-col>
 | 
			
		||||
        <a-col flex="380px">
 | 
			
		||||
        <a-col flex="365px">
 | 
			
		||||
          <span class="item-label">Cacl date</span>
 | 
			
		||||
          <a-range-picker
 | 
			
		||||
            :value="[moment(queryParams.startDate), moment(queryParams.endDate)]"
 | 
			
		||||
            @change="onRangeDateChange"
 | 
			
		||||
          />
 | 
			
		||||
        </a-col>
 | 
			
		||||
        <a-col flex="265px">
 | 
			
		||||
          <span class="item-label">Station</span>
 | 
			
		||||
          <a-select
 | 
			
		||||
            style="width: 180px"
 | 
			
		||||
            v-model="queryParams.stationId"
 | 
			
		||||
            placeholder="select..."
 | 
			
		||||
            :filter-option="filterOption"
 | 
			
		||||
            show-arrow
 | 
			
		||||
            allowClear
 | 
			
		||||
            :options="stationOptions"
 | 
			
		||||
            @change="onStationChange"
 | 
			
		||||
          >
 | 
			
		||||
            <img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
 | 
			
		||||
          </a-select>
 | 
			
		||||
        </a-col>
 | 
			
		||||
        <a-col flex="285px">
 | 
			
		||||
          <span class="item-label">Source Type</span>
 | 
			
		||||
          <a-select
 | 
			
		||||
            style="width: 180px"
 | 
			
		||||
            v-model="queryParams.sourceType"
 | 
			
		||||
            placeholder="select..."
 | 
			
		||||
            :filter-option="filterOption"
 | 
			
		||||
            show-arrow
 | 
			
		||||
            allowClear
 | 
			
		||||
            :options="sourceOptions"
 | 
			
		||||
            @change="onSourceChange"
 | 
			
		||||
          >
 | 
			
		||||
            <img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
 | 
			
		||||
          </a-select>
 | 
			
		||||
        </a-col>
 | 
			
		||||
      </a-row>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="analysis-main">
 | 
			
		||||
| 
						 | 
				
			
			@ -89,6 +119,11 @@ import moment from 'moment'
 | 
			
		|||
import TableList from '../../components/tableList.vue'
 | 
			
		||||
import { getAction, postAction, httpAction, deleteAction } from '@/api/manage'
 | 
			
		||||
const columns = [
 | 
			
		||||
  {
 | 
			
		||||
    title: 'STATION',
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    dataIndex: 'stationCode',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    title: 'NUCLIDE',
 | 
			
		||||
    align: 'center',
 | 
			
		||||
| 
						 | 
				
			
			@ -125,6 +160,8 @@ export default {
 | 
			
		|||
      dataSource: [],
 | 
			
		||||
      loading: false,
 | 
			
		||||
      queryParams: {
 | 
			
		||||
        stationId: undefined,
 | 
			
		||||
        sourceType: undefined,
 | 
			
		||||
        startDate: dateFormat(new Date(), 'yyyy-MM-dd'),
 | 
			
		||||
        endDate: dateFormat(new Date(), 'yyyy-MM-dd'),
 | 
			
		||||
      },
 | 
			
		||||
| 
						 | 
				
			
			@ -148,6 +185,17 @@ export default {
 | 
			
		|||
        index: '',
 | 
			
		||||
      },
 | 
			
		||||
      currId: '',
 | 
			
		||||
      stationOptions: [],
 | 
			
		||||
      sourceOptions: [
 | 
			
		||||
        {
 | 
			
		||||
          label: 'ARMDARR',
 | 
			
		||||
          value: '1',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: 'ARMDRRR',
 | 
			
		||||
          value: '2',
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
| 
						 | 
				
			
			@ -157,6 +205,30 @@ export default {
 | 
			
		|||
    this.getNuclideAvgList()
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    onSourceChange(val) {
 | 
			
		||||
      console.log(val)
 | 
			
		||||
    },
 | 
			
		||||
    getStationList() {
 | 
			
		||||
      getAction('/webStatistics/findStationList', { menuName: '' }).then((res) => {
 | 
			
		||||
        if (res.success) {
 | 
			
		||||
          if (res.result.length > 0) {
 | 
			
		||||
            this.stationOptions = res.result.map((item) => {
 | 
			
		||||
              return {
 | 
			
		||||
                label: item.stationCode,
 | 
			
		||||
                value: `${item.stationId}`,
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
          } else {
 | 
			
		||||
            this.stationOptions = []
 | 
			
		||||
          }
 | 
			
		||||
        } else {
 | 
			
		||||
          this.$message.warning('This operation fails. Contact your system administrator')
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    filterOption(input, option) {
 | 
			
		||||
      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
 | 
			
		||||
    },
 | 
			
		||||
    // 获取n天前的日期
 | 
			
		||||
    getBeforeDate(n) {
 | 
			
		||||
      var n = n
 | 
			
		||||
| 
						 | 
				
			
			@ -183,8 +255,7 @@ export default {
 | 
			
		|||
    getNuclideAvgList() {
 | 
			
		||||
      this.loading = true
 | 
			
		||||
      let params = {
 | 
			
		||||
        startDate: this.queryParams.startDate,
 | 
			
		||||
        endDate: this.queryParams.endDate,
 | 
			
		||||
        ...this.queryParams,
 | 
			
		||||
        pageNo: this.ipagination.current,
 | 
			
		||||
        pageSize: this.ipagination.pageSize,
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			@ -198,6 +269,14 @@ export default {
 | 
			
		|||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    onStationChange(val) {
 | 
			
		||||
      this.queryParams.stationId = val
 | 
			
		||||
      this.getNuclideAvgList()
 | 
			
		||||
    },
 | 
			
		||||
    onSourceChange(val) {
 | 
			
		||||
      this.queryParams.sourceType = val
 | 
			
		||||
      this.getNuclideAvgList()
 | 
			
		||||
    },
 | 
			
		||||
    onRangeDateChange(date, dateString) {
 | 
			
		||||
      this.queryParams.startDate = dateString[0]
 | 
			
		||||
      this.queryParams.endDate = dateString[1]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@
 | 
			
		|||
      {{ item.stationName || item.stationCode }}
 | 
			
		||||
    </h4>
 | 
			
		||||
    <div class="data-list-item-container">
 | 
			
		||||
      <div class="data-list-item-content">
 | 
			
		||||
      <div class="data-list-item-content" :class="[item.scheduling ? 'active' : '']">
 | 
			
		||||
        <div class="data-list-item-children">
 | 
			
		||||
          <div class="data-list-item-child">
 | 
			
		||||
            <label>Station Type:</label>
 | 
			
		||||
| 
						 | 
				
			
			@ -42,9 +42,9 @@
 | 
			
		|||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    item: {
 | 
			
		||||
      type: Object
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
      type: Object,
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -85,6 +85,10 @@ export default {
 | 
			
		|||
    flex-direction: column;
 | 
			
		||||
    justify-content: space-between;
 | 
			
		||||
 | 
			
		||||
    &.active {
 | 
			
		||||
      background-image: url(~@/assets/images/station-operation/data-item-bg-active.png);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .data-list-item-children {
 | 
			
		||||
      display: flex;
 | 
			
		||||
      justify-content: space-between;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -189,7 +189,7 @@
 | 
			
		|||
              <div class="content">
 | 
			
		||||
                <a-form-model class="attribute-form" layout="vertical">
 | 
			
		||||
                  <a-form-model-item label="Cache time">
 | 
			
		||||
                    <a-input-number type="number" v-model="dataRecieveStatusModel.cacheTime" :min="0"></a-input-number>
 | 
			
		||||
                    <a-input-number type="number" v-model="dataRecieveStatusModel.cacheTime" :min="1"></a-input-number>
 | 
			
		||||
                    <span>day</span>
 | 
			
		||||
                  </a-form-model-item>
 | 
			
		||||
                  <a-form-model-item label="Scale interval">
 | 
			
		||||
| 
						 | 
				
			
			@ -268,15 +268,11 @@
 | 
			
		|||
import CustomModal from '@/components/CustomModal/index.vue'
 | 
			
		||||
import CustomTree from '@/components/CustomTree/index.vue'
 | 
			
		||||
import RealTimeDataChart from './RealTimeDataChart.vue'
 | 
			
		||||
import { getAction, postAction } from '../../../api/manage'
 | 
			
		||||
import { deleteAction, getAction, postAction } from '../../../api/manage'
 | 
			
		||||
import { MarkerType, FilterIcon } from './markerEnum'
 | 
			
		||||
 | 
			
		||||
import { Vector as VectorLayer } from 'ol/layer'
 | 
			
		||||
import VectorSource from 'ol/source/Vector'
 | 
			
		||||
import { Circle } from 'ol/geom'
 | 
			
		||||
import { fromLonLat } from 'ol/proj'
 | 
			
		||||
import Feature from 'ol/Feature'
 | 
			
		||||
import { Fill, Stroke, Style } from 'ol/style'
 | 
			
		||||
import { cloneDeep } from 'lodash'
 | 
			
		||||
 | 
			
		||||
// Filter中的筛选列表
 | 
			
		||||
| 
						 | 
				
			
			@ -455,8 +451,6 @@ export default {
 | 
			
		|||
    this.initParentMapProps()
 | 
			
		||||
    document.addEventListener('fullscreenchange', this.onFullScreenChange)
 | 
			
		||||
    this.stationList = []
 | 
			
		||||
 | 
			
		||||
    this.getDataRecieveSettings()
 | 
			
		||||
  },
 | 
			
		||||
  destroyed() {
 | 
			
		||||
    document.removeEventListener('fullscreenchange', this.onFullScreenChange)
 | 
			
		||||
| 
						 | 
				
			
			@ -739,7 +733,16 @@ export default {
 | 
			
		|||
          userId: this.$store.getters.userInfo.id,
 | 
			
		||||
        })
 | 
			
		||||
        if (success) {
 | 
			
		||||
          const { cacheTime, scaleInterval, timelineLength, updateIntervalTime, sysUserFocusStations } = result
 | 
			
		||||
          this.initialDataRecieveSettings = result
 | 
			
		||||
 | 
			
		||||
          this.dataRecieveStatusModel = {
 | 
			
		||||
            cacheTime,
 | 
			
		||||
            scaleInterval,
 | 
			
		||||
            timelineLength,
 | 
			
		||||
            updateIntervalTime,
 | 
			
		||||
          }
 | 
			
		||||
          this.dataStatusCheckedKeys = sysUserFocusStations.map((item) => parseInt(item.stationId))
 | 
			
		||||
        } else {
 | 
			
		||||
          this.$message.error(message)
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -771,6 +774,7 @@ export default {
 | 
			
		|||
        const { success, result, message } = await getAction('/stationOperation/getDataReceivingStatus', {
 | 
			
		||||
          userId: this.$store.getters.userInfo.id,
 | 
			
		||||
          oneStationId: (this.stationInfo && this.stationInfo.stationId) || '',
 | 
			
		||||
          cacheTime: this.initialDataRecieveSettings.cacheTime,
 | 
			
		||||
        })
 | 
			
		||||
        this.maskVisi = false
 | 
			
		||||
        this.spinLoading = false
 | 
			
		||||
| 
						 | 
				
			
			@ -804,24 +808,32 @@ export default {
 | 
			
		|||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    // 清理接收状态配置缓存
 | 
			
		||||
    async clearDataRecieveSetting() {
 | 
			
		||||
      const { success, message } = await deleteAction('/sysUserFocusStation/deleteUserCache', {
 | 
			
		||||
        userId: this.$store.getters.userInfo.id,
 | 
			
		||||
      })
 | 
			
		||||
      if (!success) {
 | 
			
		||||
        throw new Error(message)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleResize() {
 | 
			
		||||
      this.$refs.realtimeChartRef.resize()
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
    dataStatusModalVisible(val) {
 | 
			
		||||
    async dataStatusModalVisible(val) {
 | 
			
		||||
      if (val) {
 | 
			
		||||
        this.dataStatusCheckedKeys = this.initialDataRecieveSettings.sysUserFocusStations.map((item) =>
 | 
			
		||||
          parseInt(item.stationId)
 | 
			
		||||
        )
 | 
			
		||||
        this.dataRecieveStatusModel = {
 | 
			
		||||
          cacheTime: this.initialDataRecieveSettings.cacheTime,
 | 
			
		||||
          scaleInterval: this.initialDataRecieveSettings.scaleInterval,
 | 
			
		||||
          timelineLength: this.initialDataRecieveSettings.timelineLength,
 | 
			
		||||
          updateIntervalTime: this.initialDataRecieveSettings.updateIntervalTime,
 | 
			
		||||
        try {
 | 
			
		||||
          this.spinLoading = true
 | 
			
		||||
          await this.clearDataRecieveSetting()
 | 
			
		||||
          await this.getDataRecieveSettings()
 | 
			
		||||
          this.startGetDataReceiveStatusList()
 | 
			
		||||
        } catch (error) {
 | 
			
		||||
          this.$message.error(error)
 | 
			
		||||
          this.spinLoading = false
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this.startGetDataReceiveStatusList()
 | 
			
		||||
      } else {
 | 
			
		||||
        clearInterval(this.timer)
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -521,12 +521,6 @@ export default {
 | 
			
		|||
     */
 | 
			
		||||
    onFilterMarker({ filterType, filterDataQuality }) {
 | 
			
		||||
      this.updataFilterType = filterType
 | 
			
		||||
      console.log(
 | 
			
		||||
        '%c [ filterType, filterDataQuality ]-343',
 | 
			
		||||
        'font-size:13px; background:pink; color:#bf2c9f;',
 | 
			
		||||
        filterType,
 | 
			
		||||
        filterDataQuality
 | 
			
		||||
      )
 | 
			
		||||
      this.updataFilterDataQuality = []
 | 
			
		||||
      filterDataQuality.forEach((item) => {
 | 
			
		||||
        if (item === 'Excellent data quality') {
 | 
			
		||||
| 
						 | 
				
			
			@ -548,7 +542,13 @@ export default {
 | 
			
		|||
 | 
			
		||||
    // 地图图标点击
 | 
			
		||||
    onMarkerClick(stationInfo) {
 | 
			
		||||
      const { stationType, status } = stationInfo
 | 
			
		||||
      const { stationType, stationName } = stationInfo
 | 
			
		||||
      const find = this.orgStationList.find(item => item.stationCode == stationName)
 | 
			
		||||
      if(!find) {
 | 
			
		||||
        return
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      const status = find.status
 | 
			
		||||
      if (stationType !== 'NRL' && stationType !== 'Nuclear Facility' && status !== 'Unoperating') {
 | 
			
		||||
        this.$refs.mapPane.handleOpenAnalyzeModal(stationInfo)
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -188,7 +188,10 @@ export default {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    const validateCountryCode = (_, value, callback) => {
 | 
			
		||||
      if (value && value.length > 2) {
 | 
			
		||||
      if(!value) {
 | 
			
		||||
        callback(new Error('Please Enter Country Code'))
 | 
			
		||||
      }
 | 
			
		||||
      else if (value.length > 2) {
 | 
			
		||||
        callback(new Error('Country Code Limit 2 Char'))
 | 
			
		||||
      } else {
 | 
			
		||||
        callback()
 | 
			
		||||
| 
						 | 
				
			
			@ -199,7 +202,7 @@ export default {
 | 
			
		|||
      rules: {
 | 
			
		||||
        stationId: [{ required: true, message: 'Please Enter Station Id' }],
 | 
			
		||||
        stationCode: [{ required: true, validator: validateStationCode }],
 | 
			
		||||
        countryCode: [{ validator: validateCountryCode }]
 | 
			
		||||
        countryCode: [{ required: true, validator: validateCountryCode }]
 | 
			
		||||
      },
 | 
			
		||||
      url: {
 | 
			
		||||
        list: '/gardsStations/findPage',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user