代码格式化
This commit is contained in:
		
							parent
							
								
									bbbfd5b259
								
							
						
					
					
						commit
						2f8c20cec4
					
				| 
						 | 
				
			
			@ -97,17 +97,14 @@ export default {
 | 
			
		|||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    var permissionList = this.$store.getters.permissionList
 | 
			
		||||
    console.log('permissionList', permissionList)
 | 
			
		||||
    permissionList.forEach((f) => {
 | 
			
		||||
      if (f.name === 'abnormal-alarm') {
 | 
			
		||||
        this.menus = f.children
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
    console.log('路由信息', this.menus)
 | 
			
		||||
    // this.initDefaultKeys(this.menus[0])
 | 
			
		||||
    // 将从缓存中取出openKeys
 | 
			
		||||
    // const openKeys = window.sessionStorage.getItem('openKeys')
 | 
			
		||||
    // console.log(openKeys);
 | 
			
		||||
    const selectedKeys = window.sessionStorage.getItem('currMenu_alarm')
 | 
			
		||||
    if (selectedKeys) {
 | 
			
		||||
      // this.defaultSelectedKeys.push(selectedKeys)
 | 
			
		||||
| 
						 | 
				
			
			@ -143,7 +140,6 @@ export default {
 | 
			
		|||
  methods: {
 | 
			
		||||
    // 点击菜单,路由跳转,注意的是当点击MenuItem才会触发此函数
 | 
			
		||||
    menuClick({ item, key, keyPath }) {
 | 
			
		||||
      console.log(item, key, keyPath)
 | 
			
		||||
      this.currSlecteKey = []
 | 
			
		||||
      window.sessionStorage.setItem('currMenu_alarm', key)
 | 
			
		||||
      // var parentPath = item._props.parentMenu._props.eventKey;
 | 
			
		||||
| 
						 | 
				
			
			@ -157,7 +153,6 @@ export default {
 | 
			
		|||
    },
 | 
			
		||||
    initDefaultKeys(data) {
 | 
			
		||||
      this.currSlecteKey = []
 | 
			
		||||
      console.log('datadefaultOpenKeys', data)
 | 
			
		||||
      this.defaultOpenKeys.push(data.path)
 | 
			
		||||
      data.children.some((f) => {
 | 
			
		||||
        if (f.children) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -248,11 +248,7 @@ export default {
 | 
			
		|||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    // setGroupName(e) {
 | 
			
		||||
    //   this.groupName = e.target.value
 | 
			
		||||
    // },
 | 
			
		||||
    handleChange(targetKeys, direction, moveKeys) {
 | 
			
		||||
      console.log(targetKeys, direction, moveKeys)
 | 
			
		||||
      this.targetKeys = targetKeys
 | 
			
		||||
    },
 | 
			
		||||
    handleOk() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -268,8 +268,6 @@ export default {
 | 
			
		|||
      let params = {
 | 
			
		||||
        startDate: obj.startDate,
 | 
			
		||||
        endDate: obj.endDate,
 | 
			
		||||
        // startDate:"2023-07-15",
 | 
			
		||||
        // endDate:"2023-07-21"
 | 
			
		||||
      }
 | 
			
		||||
      postAction('/alarmLog/typeAlarms', params).then((res) => {
 | 
			
		||||
        if (res.success) {
 | 
			
		||||
| 
						 | 
				
			
			@ -292,7 +290,6 @@ export default {
 | 
			
		|||
      this.getAlarmLogTable(this.paramsArg)
 | 
			
		||||
    },
 | 
			
		||||
    handleTabChange(key) {
 | 
			
		||||
      console.log(key)
 | 
			
		||||
      if (key == 'alarmAnalysis') {
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.drawAlarmChart_pie()
 | 
			
		||||
| 
						 | 
				
			
			@ -374,7 +371,6 @@ export default {
 | 
			
		|||
        type: obj.types,
 | 
			
		||||
      }
 | 
			
		||||
      postAction('/alarmLog/ruleTop', params).then((res) => {
 | 
			
		||||
        console.log(res)
 | 
			
		||||
        if (res.success) {
 | 
			
		||||
          this.xData_top = res.result.yData
 | 
			
		||||
          this.yData_top = res.result.xData
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -285,7 +285,6 @@ export default {
 | 
			
		|||
      }
 | 
			
		||||
    },
 | 
			
		||||
    onSourceChange(val) {
 | 
			
		||||
      console.log(val)
 | 
			
		||||
      this.queryParams.sources = val
 | 
			
		||||
      let length = this.sourceOptions.length
 | 
			
		||||
      if (val.length === length) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -159,7 +159,6 @@ export default {
 | 
			
		|||
      }
 | 
			
		||||
      getAction('/sysDatabase/dbNames', params).then((res) => {
 | 
			
		||||
        if (res.success) {
 | 
			
		||||
          console.log(res)
 | 
			
		||||
          this.dbName = res.result[0]
 | 
			
		||||
          this.ondbNameChange(this.dbName)
 | 
			
		||||
          this.dbNameOptions = res.result.map((item) => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -143,7 +143,6 @@ export default {
 | 
			
		|||
      }
 | 
			
		||||
      getAction('/sysDatabase/spaceInfo', params).then((res) => {
 | 
			
		||||
        if (res.success) {
 | 
			
		||||
          console.log(res)
 | 
			
		||||
          this.dataSource = res.result
 | 
			
		||||
        } else {
 | 
			
		||||
          this.$message.warning('This operation fails. Contact your system administrator')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -497,7 +497,6 @@ export default {
 | 
			
		|||
      this.visible = false
 | 
			
		||||
    },
 | 
			
		||||
    onRowDbclick(record) {
 | 
			
		||||
      console.log(record)
 | 
			
		||||
      let query = {
 | 
			
		||||
        id: record.id,
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -388,7 +388,6 @@ export default {
 | 
			
		|||
    onSave() {
 | 
			
		||||
      this.form.validateFields((err, values) => {
 | 
			
		||||
        if (!err) {
 | 
			
		||||
          console.log('Received values of form: ', values)
 | 
			
		||||
          if (this.isAdd) {
 | 
			
		||||
            postAction('/sysEmail/create', values).then((res) => {
 | 
			
		||||
              if (res.success) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -216,7 +216,6 @@ export default {
 | 
			
		|||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    console.log(this.currServer)
 | 
			
		||||
    this.sourceOptions = this.serverList
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -589,7 +589,6 @@ export default {
 | 
			
		|||
          xAxis: {
 | 
			
		||||
            label: {
 | 
			
		||||
              formatter: (params) => {
 | 
			
		||||
                // console.log(params)
 | 
			
		||||
                const percentage = params / 100,
 | 
			
		||||
                  index = parseInt((data.length - 1) * percentage)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user