65 changed files with 18824 additions and 3169 deletions
			
			
		@ -0,0 +1,3 @@ | 
				
			|||
export default { | 
				
			|||
	navigationBarTitleText: '修改密码' | 
				
			|||
} | 
				
			|||
@ -0,0 +1,64 @@ | 
				
			|||
import React, { useState } from 'react' | 
				
			|||
import Taro from '@tarojs/taro' | 
				
			|||
import { View, Input } from '@tarojs/components' | 
				
			|||
import { AtButton } from 'taro-ui' | 
				
			|||
import request from '@/services/request' | 
				
			|||
import { putPassword } from '@/services/api' | 
				
			|||
import './index.scss' | 
				
			|||
 | 
				
			|||
function Index() { | 
				
			|||
  const userInfo = Taro.getStorageSync('userInfo') || null; | 
				
			|||
  const [phone, setPhone] = useState(userInfo.phone) | 
				
			|||
  const [password, setPassword] = useState('') | 
				
			|||
  const [password2, setPassword2] = useState('') | 
				
			|||
 | 
				
			|||
  function confirm() { | 
				
			|||
    if (!password) { | 
				
			|||
      Taro.showToast({ title: '请输入密码' }) | 
				
			|||
      return | 
				
			|||
    } else if (password !== password2) { | 
				
			|||
      Taro.showToast({ title: '两次输入的密码不一致' }) | 
				
			|||
      return | 
				
			|||
    } else { | 
				
			|||
      Taro.showModal({ | 
				
			|||
        title: '提示', | 
				
			|||
        content: '确定修改吗', | 
				
			|||
        success: function (res) { | 
				
			|||
          if (res.confirm) { | 
				
			|||
            Taro.showLoading({ | 
				
			|||
              title: '修改中' | 
				
			|||
            }) | 
				
			|||
            request.put(putPassword(userInfo.id), { password }).then(res => { | 
				
			|||
              Taro.hideLoading() | 
				
			|||
              if (res.statusCode == 200 || res.statusCode == 204) { | 
				
			|||
                Taro.removeStorageSync('token') | 
				
			|||
                Taro.removeStorageSync('userInfo') | 
				
			|||
                Taro.reLaunch({ url: '/packages/changePassword/success/index' }) | 
				
			|||
              } | 
				
			|||
            }) | 
				
			|||
          } | 
				
			|||
        } | 
				
			|||
      }) | 
				
			|||
    } | 
				
			|||
  } | 
				
			|||
 | 
				
			|||
  return ( | 
				
			|||
    <View className='page'> | 
				
			|||
      <View className='phone'> | 
				
			|||
        <View className='title'>手机号码:</View> | 
				
			|||
        <Input value={phone} disabled={true} /> | 
				
			|||
      </View> | 
				
			|||
      <View className='pswd'> | 
				
			|||
        <View className='title'>新的密码:</View> | 
				
			|||
        <Input value={password} onInput={e => setPassword(e.detail.value)} /> | 
				
			|||
      </View> | 
				
			|||
      <View className='pswd'> | 
				
			|||
        <View className='title'>再次输入新的密码:</View> | 
				
			|||
        <Input value={password2} onInput={e => setPassword2(e.detail.value)} /> | 
				
			|||
      </View> | 
				
			|||
      <AtButton className='btn' type='primary' onClick={confirm}>确认</AtButton> | 
				
			|||
    </View> | 
				
			|||
  ) | 
				
			|||
} | 
				
			|||
 | 
				
			|||
export default Index | 
				
			|||
@ -0,0 +1,35 @@ | 
				
			|||
page { | 
				
			|||
  background-color: #f6f6f6; | 
				
			|||
  font-size: 28px; | 
				
			|||
 | 
				
			|||
  .phone { | 
				
			|||
    height: 96px; | 
				
			|||
    background-color: #fff; | 
				
			|||
    margin: 20px auto; | 
				
			|||
    display: flex; | 
				
			|||
    justify-content: left; | 
				
			|||
    align-items: center; | 
				
			|||
 | 
				
			|||
    .title { | 
				
			|||
      margin-left: 30px; | 
				
			|||
    } | 
				
			|||
  } | 
				
			|||
 | 
				
			|||
  .pswd { | 
				
			|||
    height: 96px; | 
				
			|||
    background-color: #fff; | 
				
			|||
    margin-bottom: 5px; | 
				
			|||
    display: flex; | 
				
			|||
    justify-content: left; | 
				
			|||
    align-items: center; | 
				
			|||
 | 
				
			|||
    .title { | 
				
			|||
      margin-left: 30px; | 
				
			|||
    } | 
				
			|||
  } | 
				
			|||
 | 
				
			|||
  .btn { | 
				
			|||
    width: 70%; | 
				
			|||
    margin: 80px auto; | 
				
			|||
  } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,3 @@ | 
				
			|||
export default { | 
				
			|||
  navigationBarTitleText: '修改密码' | 
				
			|||
} | 
				
			|||
@ -0,0 +1,24 @@ | 
				
			|||
import React from 'react' | 
				
			|||
import Taro from '@tarojs/taro' | 
				
			|||
import { View, Image } from '@tarojs/components' | 
				
			|||
import { AtButton } from 'taro-ui' | 
				
			|||
import './index.scss' | 
				
			|||
import successIcon from '../../../static/img/changePassword/success.svg' | 
				
			|||
 | 
				
			|||
function Index() { | 
				
			|||
  function handleClick() { | 
				
			|||
    Taro.reLaunch({ url: '/pages/auth/login/login' }) | 
				
			|||
  } | 
				
			|||
 | 
				
			|||
  return ( | 
				
			|||
    <View> | 
				
			|||
      <View className='box'> | 
				
			|||
        <Image className='img' src={successIcon} /> | 
				
			|||
        <View className='text'>修改成功!</View> | 
				
			|||
      </View> | 
				
			|||
      <AtButton className='btn' type='primary' onClick={handleClick}>返回登录</AtButton> | 
				
			|||
    </View> | 
				
			|||
  ) | 
				
			|||
} | 
				
			|||
 | 
				
			|||
export default Index | 
				
			|||
@ -0,0 +1,26 @@ | 
				
			|||
page { | 
				
			|||
  background-color: #f6f6f6; | 
				
			|||
 | 
				
			|||
  .box { | 
				
			|||
    background-color: #fff; | 
				
			|||
    height: 360px; | 
				
			|||
    display: flex; | 
				
			|||
    flex-direction: column; | 
				
			|||
    justify-content: center; | 
				
			|||
    align-items: center; | 
				
			|||
 | 
				
			|||
    .img { | 
				
			|||
      width: 160px; | 
				
			|||
      height: 160px; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    .text { | 
				
			|||
      margin-top: 32px; | 
				
			|||
    } | 
				
			|||
  } | 
				
			|||
 | 
				
			|||
  .btn { | 
				
			|||
    width: 70%; | 
				
			|||
    margin: 80px auto; | 
				
			|||
  } | 
				
			|||
} | 
				
			|||
| 
		 After Width: | Height: | Size: 1.6 KiB  | 
| 
		 After Width: | Height: | Size: 42 KiB  | 
| 
		 After Width: | Height: | Size: 3.9 KiB  | 
| 
		 After Width: | Height: | Size: 13 KiB  | 
| 
		 After Width: | Height: | Size: 23 KiB  | 
| 
		 After Width: | Height: | Size: 15 KiB  | 
@ -1,43 +1,33 @@ | 
				
			|||
<!DOCTYPE html> | 
				
			|||
<html> | 
				
			|||
  <head> | 
				
			|||
    <meta charset="UTF-8" /> | 
				
			|||
    <title></title> | 
				
			|||
    <link rel="shortcut icon" href="/assets/images/favicon.ico" /> | 
				
			|||
    <link | 
				
			|||
      rel="stylesheet" | 
				
			|||
      type="text/css" | 
				
			|||
      href="/assets/font_sc/iconfont.css" | 
				
			|||
    /> | 
				
			|||
    <link rel="stylesheet" href="/assets/fontziti/font.css" /> | 
				
			|||
    <script type="text/javascript"> | 
				
			|||
      window._AMapSecurityConfig = { | 
				
			|||
          securityJsCode: 'e955cd5ddfc3a752aa27d1e1c67d182d', | 
				
			|||
      } | 
				
			|||
 | 
				
			|||
<head> | 
				
			|||
  <meta charset="UTF-8" /> | 
				
			|||
  <title></title> | 
				
			|||
  <link rel="shortcut icon" href="/assets/images/favicon.ico" /> | 
				
			|||
  <link rel="stylesheet" type="text/css" href="/assets/font_sc/iconfont.css" /> | 
				
			|||
  <link rel="stylesheet" href="/assets/fontziti/font.css" /> | 
				
			|||
  <script type="text/javascript"> | 
				
			|||
    window._AMapSecurityConfig = { | 
				
			|||
      securityJsCode: 'e955cd5ddfc3a752aa27d1e1c67d182d', | 
				
			|||
    } | 
				
			|||
  </script> | 
				
			|||
  <script src="https://webapi.amap.com/maps?v=2.0&key=00f9a29dedcdbd8befec3dfe0cef5003&plugin=AMap.Adaptor,AMap.Scale,AMap.ToolBar,AMap.DistrictSearch,AMap.Geocoder,AMap.CustomLayer,Map3D,ElasticMarker"></script> | 
				
			|||
  </head> | 
				
			|||
  <body> | 
				
			|||
    <link | 
				
			|||
      rel="stylesheet/less" | 
				
			|||
      type="text/css" | 
				
			|||
      href="/assets/color.less" | 
				
			|||
      rel="external nofollow" | 
				
			|||
    /> | 
				
			|||
    <script> | 
				
			|||
      window.less = { | 
				
			|||
        async: false, | 
				
			|||
        env: "production", | 
				
			|||
      }; | 
				
			|||
    </script> | 
				
			|||
    <script | 
				
			|||
      type="text/javascript" | 
				
			|||
      src="https://cdnjs.cloudflare.com/ajax/libs/less.js/2.7.2/less.min.js" | 
				
			|||
    ></script> | 
				
			|||
    <div id="App"></div> | 
				
			|||
    <script | 
				
			|||
      type="text/javascript" | 
				
			|||
      src="http://localhost:5001/client/build/app.js" | 
				
			|||
    ></script> | 
				
			|||
  </body> | 
				
			|||
</html> | 
				
			|||
  <script | 
				
			|||
    src="https://webapi.amap.com/maps?v=2.0&key=00f9a29dedcdbd8befec3dfe0cef5003&plugin=AMap.Adaptor,AMap.Scale,AMap.ToolBar,AMap.DistrictSearch,AMap.Geocoder,AMap.CustomLayer,Map3D,ElasticMarker"></script> | 
				
			|||
  <script src="https://webapi.amap.com/loca?v=2.0.0&key=00f9a29dedcdbd8befec3dfe0cef5003"></script> | 
				
			|||
</head> | 
				
			|||
 | 
				
			|||
<body> | 
				
			|||
  <link rel="stylesheet/less" type="text/css" href="/assets/color.less" rel="external nofollow" /> | 
				
			|||
  <script> | 
				
			|||
    window.less = { | 
				
			|||
      async: false, | 
				
			|||
      env: "production", | 
				
			|||
    }; | 
				
			|||
  </script> | 
				
			|||
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/less.js/2.7.2/less.min.js"></script> | 
				
			|||
  <div id="App"></div> | 
				
			|||
  <script type="text/javascript" src="http://localhost:5001/client/build/app.js"></script> | 
				
			|||
</body> | 
				
			|||
 | 
				
			|||
</html> | 
				
			|||
@ -0,0 +1,188 @@ | 
				
			|||
import React, { Component } from 'react' | 
				
			|||
import PropTypes from 'prop-types' | 
				
			|||
import { geoJson } from './mock_data'; | 
				
			|||
 | 
				
			|||
export default class Bounds extends Component { | 
				
			|||
    constructor(props) { | 
				
			|||
        super(props); | 
				
			|||
        this.map = props.map; | 
				
			|||
        this.pl = {}; | 
				
			|||
        this.textMarker = {}; | 
				
			|||
    } | 
				
			|||
    static propTypes = { | 
				
			|||
        prop: PropTypes | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    componentDidMount() { | 
				
			|||
        if (!window.BoundPl) { | 
				
			|||
            this.drawBounds(); | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    componentWillUnmount() { | 
				
			|||
        if (window.local_) | 
				
			|||
            window.local_.remove(this.pl); | 
				
			|||
        this.textMarker = null; | 
				
			|||
        window.BoundPl = null; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    drawBounds = () => { | 
				
			|||
        var map = this.map; | 
				
			|||
        var loca = window.local_; | 
				
			|||
        loca.ambLight = { | 
				
			|||
            intensity: 0.3, | 
				
			|||
            color: '#fff', | 
				
			|||
        }; | 
				
			|||
        loca.dirLight = { | 
				
			|||
            intensity: 0.6, | 
				
			|||
            color: '#fff', | 
				
			|||
            target: [0, 0, 0], | 
				
			|||
            position: [0, -1, 1], | 
				
			|||
        }; | 
				
			|||
        loca.pointLight = { | 
				
			|||
            color: 'rgb(100,100,100)', | 
				
			|||
            position: [120.24289, 30.341335, 20000], | 
				
			|||
            intensity: 3, | 
				
			|||
            // 距离表示从光源到光照强度为 0 的位置,0 就是光不会消失。
 | 
				
			|||
            distance: 50000, | 
				
			|||
        }; | 
				
			|||
        var geo = new Loca.GeoJSONSource({ | 
				
			|||
            data: geoJson | 
				
			|||
        }); | 
				
			|||
 | 
				
			|||
        var colors = ['#04398c', '#04398c', '#0542a5'].reverse(); | 
				
			|||
        var height = [500]; | 
				
			|||
        var pl = new Loca.PolygonLayer({ | 
				
			|||
            // loca,
 | 
				
			|||
            zIndex: 1, | 
				
			|||
            opacity: 0.6, | 
				
			|||
            // cullface: 'none',
 | 
				
			|||
            shininess: 10, | 
				
			|||
            hasSide: true, | 
				
			|||
        }); | 
				
			|||
 | 
				
			|||
        pl.setSource(geo); | 
				
			|||
        pl.setStyle({ | 
				
			|||
            topColor: function (index, feature) { | 
				
			|||
                var i = index % 3; | 
				
			|||
                return colors[i]; | 
				
			|||
            }, | 
				
			|||
            sideColor: function (index, feature) { | 
				
			|||
                return '#023890'; | 
				
			|||
            }, | 
				
			|||
            borderColor: function () { | 
				
			|||
                return '#24dcf7' | 
				
			|||
            }, | 
				
			|||
            height: function (index, feature) { | 
				
			|||
                return index == 0 ? height[0] : height[0] + index * 50; | 
				
			|||
            }, | 
				
			|||
            altitude: 0, | 
				
			|||
        }); | 
				
			|||
        loca.add(pl); | 
				
			|||
 | 
				
			|||
        // 创建纯文本标记
 | 
				
			|||
        var text = new AMap.Text({ | 
				
			|||
            text: '纯文本标记', | 
				
			|||
            anchor: 'center', // 设置文本标记锚点
 | 
				
			|||
            draggable: true, | 
				
			|||
            cursor: 'pointer', | 
				
			|||
            angle: 0, | 
				
			|||
            visible: false, | 
				
			|||
            offset: [60, 60], | 
				
			|||
            extData: 'bounds_text', | 
				
			|||
            style: { | 
				
			|||
                'padding': '5px 10px', | 
				
			|||
                'margin-bottom': '1rem', | 
				
			|||
                'border-radius': '.25rem', | 
				
			|||
                'background-color': 'rgba(0,0,0,0.5)', | 
				
			|||
                // 'width': '12rem',
 | 
				
			|||
                'border-width': 0, | 
				
			|||
                'box-shadow': '0 2px 6px 0 rgba(255, 255, 255, .3)', | 
				
			|||
                'text-align': 'center', | 
				
			|||
                'font-size': '16px', | 
				
			|||
                'color': '#fff', | 
				
			|||
            }, | 
				
			|||
        }); | 
				
			|||
        // text.setMap(map);
 | 
				
			|||
        if (!this.textMarker) | 
				
			|||
            map.add(text); | 
				
			|||
        this.textMarker = text; | 
				
			|||
        console.log(text) | 
				
			|||
        // 拾取
 | 
				
			|||
        map.on('mousemove', (e) => { | 
				
			|||
            var feat = pl.queryFeature(e.pixel.toArray()); | 
				
			|||
            // if (!text) {
 | 
				
			|||
            map.add(text); | 
				
			|||
            //     text = this.textMarker;
 | 
				
			|||
            // }
 | 
				
			|||
 | 
				
			|||
            if (feat) { | 
				
			|||
                text.show(); | 
				
			|||
                text.setText(feat.properties.NAME); | 
				
			|||
                text.setPosition(e.lnglat); | 
				
			|||
 | 
				
			|||
                pl.setStyle({ | 
				
			|||
                    topColor: (index, feature) => { | 
				
			|||
                        if (feature === feat) { | 
				
			|||
                            return [19, 43, 77, 1]; | 
				
			|||
                        } | 
				
			|||
                        // var v = feature.properties.health * 100;
 | 
				
			|||
                        var i = index % 3; | 
				
			|||
                        return colors[i]; | 
				
			|||
                    }, | 
				
			|||
                    sideColor: (index, feature) => { | 
				
			|||
                        if (feature === feat) { | 
				
			|||
                            return '#023890'; | 
				
			|||
                        } | 
				
			|||
                        return '#023890'; | 
				
			|||
                    }, | 
				
			|||
                    borderColor: function () { | 
				
			|||
                        return '#24dcf7' | 
				
			|||
                    }, | 
				
			|||
                    height: function (index, feature) { | 
				
			|||
                        return index == 0 ? height[0] : height[0] + index * 50; | 
				
			|||
 | 
				
			|||
                    }, | 
				
			|||
                }); | 
				
			|||
            } else { | 
				
			|||
                pl.setStyle({ | 
				
			|||
                    topColor: function (index, feature) { | 
				
			|||
                        var i = index % 3; | 
				
			|||
                        return colors[i]; | 
				
			|||
                    }, | 
				
			|||
                    sideColor: function (index, feature) { | 
				
			|||
                        return '#023890'; | 
				
			|||
                    }, | 
				
			|||
                    borderColor: function () { | 
				
			|||
                        return '#24dcf7' | 
				
			|||
                    }, | 
				
			|||
                    height: function (index, feature) { | 
				
			|||
                        return index == 0 ? height[0] : height[0] + index * 50; | 
				
			|||
                    }, | 
				
			|||
                    altitude: 0, | 
				
			|||
                }); | 
				
			|||
 | 
				
			|||
                text.hide(); | 
				
			|||
                map.remove(text); | 
				
			|||
            } | 
				
			|||
        }); | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        map.setZoom(12.88) | 
				
			|||
        map.setCenter([115.888149, 28.549851]); | 
				
			|||
        map.setRotation(-68.7); | 
				
			|||
        map.setPitch(42); | 
				
			|||
 | 
				
			|||
        this.pl = pl; | 
				
			|||
        window.BoundPl = pl; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    render() { | 
				
			|||
        return ( | 
				
			|||
            <div> | 
				
			|||
            </div> | 
				
			|||
        ) | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
 | 
				
			|||
 | 
				
			|||
								
									
										File diff suppressed because one or more lines are too long
									
								
							
						
					@ -1,182 +0,0 @@ | 
				
			|||
'use strict' | 
				
			|||
import React, { Component } from 'react'; | 
				
			|||
// import { Col, Row, Tag, Tooltip } from '@douyinfe/semi-ui';
 | 
				
			|||
import { Col, Row, Tag, Toolip } from 'antd'; | 
				
			|||
import './style.less'; | 
				
			|||
export default class AutoRollComponent extends Component { | 
				
			|||
 | 
				
			|||
    constructor(props) { | 
				
			|||
        super(props); | 
				
			|||
        this.scrollElem = null; | 
				
			|||
        this.stopscroll = false; | 
				
			|||
        this.preTop = 0; | 
				
			|||
        this.cloneEle = null; | 
				
			|||
        this.currentTop = 0; | 
				
			|||
        this.marqueesHeight = 0; | 
				
			|||
        this.interval = null; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    marque = (height) => { | 
				
			|||
        try { | 
				
			|||
            this.scrollElem = document.getElementById(this.props.divId); | 
				
			|||
            this.marqueesHeight = height; | 
				
			|||
            if (this.scrollElem) { | 
				
			|||
                this.scrollElem.style.height = this.marqueesHeight; | 
				
			|||
                this.scrollElem.style.overflow = 'hidden'; | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            if (!this.props.closeroll) { | 
				
			|||
                this.repeat() | 
				
			|||
            } | 
				
			|||
        } catch (e) { console.log(e) } | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    repeat = () => { | 
				
			|||
        this.scrollElem.scrollTop = 0; | 
				
			|||
 | 
				
			|||
        this.interval = setInterval(() => { | 
				
			|||
            if (this.stopscroll) return; | 
				
			|||
            this.currentTop = this.currentTop + 1; | 
				
			|||
            this.preTop = this.scrollElem.scrollTop; | 
				
			|||
            this.scrollElem.scrollTop = this.scrollElem.scrollTop + 1; | 
				
			|||
            // console.log(this.scrollElem.scrollTop);
 | 
				
			|||
            if (this.preTop === this.scrollElem.scrollTop) { | 
				
			|||
                this.scrollElem.scrollTop = this.marqueesHeight; | 
				
			|||
                this.scrollElem.scrollTop = this.scrollElem.scrollTop + 1; | 
				
			|||
                // console.log(this.scrollElem.scrollTop);
 | 
				
			|||
            } | 
				
			|||
        }, 80); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    componentWillUnmount() { | 
				
			|||
        clearInterval(this.interval); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    componentDidMount() { | 
				
			|||
        this.marque(10); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    onMouseOver = () => { | 
				
			|||
        this.stopscroll = true; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    onMouseOut = () => { | 
				
			|||
        this.stopscroll = false; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    loadDataColumn = (c, index, q) => { | 
				
			|||
        const { changeStyleCol, heads, spans, data, showWord, color, dataTextAlign, customColorBox, } = this.props; | 
				
			|||
        if (c === changeStyleCol) { | 
				
			|||
            if (color) { | 
				
			|||
                <span style={{ color: q.changeColor }}>{q.data[index]}</span> | 
				
			|||
            } else { | 
				
			|||
                if (['时间'].indexOf(c) != -1) { | 
				
			|||
                    return <span style={{ fontFamily: 'liquidCrystal' }}>{q.data[index]}</span> | 
				
			|||
                } | 
				
			|||
                // if (c.indexOf("时间") == -1) {
 | 
				
			|||
                //     if (customColorBox) {
 | 
				
			|||
                //         return <DashBorder boxStyle={{ textAlign: 'center', background: q.boxColor, width: 58, height: 18, display: 'inline-block', fontSize: 12 }} content={q.data[index]} borderStyle={{ borderColor: q.changeColor, width: 4, height: 4 }} />
 | 
				
			|||
                //     }
 | 
				
			|||
                //     if (q.data[index].length > showWord) {
 | 
				
			|||
                //         return <Tooltip key={index} position="top" content={q.data[index]}>{q.data[index].substring(0, showWord) + '...'}</Tooltip>
 | 
				
			|||
                //     } else {
 | 
				
			|||
                //         return <span className='margin-left-5' style={{ fontFamily: 'liquidCrystal' }}>{q.data[index]}</span>
 | 
				
			|||
                //     }
 | 
				
			|||
                // }
 | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
        } else { | 
				
			|||
            if (c.indexOf("时间") == -1) | 
				
			|||
                if (q.data[index].length > showWord) { | 
				
			|||
                    return <Tooltip key={index} position="top" content={q.data[index]}>{q.data[index].substring(0, showWord) + '...'}</Tooltip> | 
				
			|||
                } | 
				
			|||
            return <span className='margin-left-5'>{q.data[index]}</span> | 
				
			|||
        } | 
				
			|||
 | 
				
			|||
        // c === changeStyleCol ?
 | 
				
			|||
        //     color ?
 | 
				
			|||
        //         <span style={{ color: q.changeColor }}>{q.data[index]}</span>
 | 
				
			|||
        //         : q.levelbg ?
 | 
				
			|||
        //             q.isSiteAlermListMock ? <span style={extraStyle}>已处理</span> :
 | 
				
			|||
        //                 <span style={{ color: q.changeColor, background: `url('/assets/images/ui/${q.levelbg}.png') no-repeat`, backgroundSize: '100% 100%', textAlign: 'left', fontFamily: 'liquidCrystal', padding: '3px 10px' }}>{q.data[index]}</span>
 | 
				
			|||
        //             : <Tag color={q.changeColor}>{q.data[index]}</Tag>
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        //     : ['时间'].indexOf(c) != -1 ? !customColorBox ? <span style={{ fontFamily: 'liquidCrystal' }}>{q.data[index]}</span> :
 | 
				
			|||
        //         <DashBorder boxStyle={{ textAlign: 'center', background: q.boxColor }} content={q.data[index]} borderStyle={{ borderColor: color }} />
 | 
				
			|||
 | 
				
			|||
        //         : c.indexOf("时间") == -1 && q.data[index].length > showWord ?
 | 
				
			|||
        //             <Tooltip placement="top" title={q.data[index]} className='margin-left-5'>{q.data[index].substring(0, showWord) + '...'}</Tooltip>
 | 
				
			|||
        //             : <span className='margin-left-5' style={{ fontFamily: 'liquidCrystal' }}>{q.data[index]}</span>
 | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    getContent = () => { | 
				
			|||
        const { changeStyleCol, heads, spans, data, showWord, color, dataTextAlign, customColorBox, } = this.props; | 
				
			|||
        let result = <div></div>; | 
				
			|||
        if (data) { | 
				
			|||
            result = data.map((q, idx) => { | 
				
			|||
                return ( | 
				
			|||
                    <div key={idx}> | 
				
			|||
                        <Row gutter={16} style={{ | 
				
			|||
                            height: 40, | 
				
			|||
                            //background: idx % 2 == 0 ? 'url(/assets/images/ui/roll1.png) no-repeat' : 'url(/assets/images/ui/roll2.png) no-repeat',
 | 
				
			|||
                            background: idx % 2 == 0 ? 'rgba(22,70,116,0.32)' : '', | 
				
			|||
                            backgroundSize: '100% 100%', | 
				
			|||
                            whiteSpace: 'nowrap', | 
				
			|||
                            fontSize: 16 | 
				
			|||
                        }}> | 
				
			|||
                            {q.data[1] == -1 ? null : heads.map((c, index) => { | 
				
			|||
                                let extraStyle = {} | 
				
			|||
                                if (q.isSiteAlermListMock && c == "状态") { | 
				
			|||
                                    extraStyle = { color: "green" } | 
				
			|||
                                } | 
				
			|||
 | 
				
			|||
                                return <Col span={spans[index]} key={index} style={{ | 
				
			|||
                                    // padding: `8px 0px 0px ${titleLeft && c != changeStyleCol ? 12 : index == 0 ? 8 : 0}px`,
 | 
				
			|||
                                    paddingLeft: index == 0 ? 20 : c != changeStyleCol ? 10 : 'auto', paddingTop: 8, paddingRight: 0, | 
				
			|||
                                    textAlign: dataTextAlign ? dataTextAlign : 'left', textOverflow: 'ellipsis', overflow: 'hidden', | 
				
			|||
                                    color: `${c === changeStyleCol ? q.changeColor : ''}` | 
				
			|||
                                }}> | 
				
			|||
                                    { | 
				
			|||
                                        this.loadDataColumn(c, index, q) | 
				
			|||
                                    } | 
				
			|||
                                </Col> | 
				
			|||
                            }) | 
				
			|||
                            } | 
				
			|||
                        </Row> | 
				
			|||
                    </div> | 
				
			|||
                ) | 
				
			|||
            }) | 
				
			|||
        } else { | 
				
			|||
            result = <div style={{ textAlign: 'center', padding: 20, color: '#fff', height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}> | 
				
			|||
                <span></span> | 
				
			|||
            </div> | 
				
			|||
        } | 
				
			|||
        return result; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    render() { | 
				
			|||
 | 
				
			|||
        const { heads, spans, divId, divHeight, content, color, titleLeft, containerStyle = {} } = this.props; | 
				
			|||
        return ( | 
				
			|||
            <div style={{ ...containerStyle, textAlign: 'left', }}> | 
				
			|||
                {heads ? | 
				
			|||
                    <Row className={'bg-row'} style={{ lineHeight: '40px', height: 40, fontSize: 16, wordBreak: 'keep-all', whiteSpace: 'nowrap', textAlign: titleLeft ? 'left' : 'center', paddingLeft: titleLeft ? 5 : 0 }}> | 
				
			|||
                        {heads.map((c, index) => { | 
				
			|||
                            return <Col style={{ color: color ? color : '#fff', paddingLeft: titleLeft ? 10 : 'auto' }} span={spans[index]} key={index}>{c}</Col> | 
				
			|||
                        }) | 
				
			|||
                        } | 
				
			|||
                    </Row> | 
				
			|||
                    : ''} | 
				
			|||
                <div id={divId} className={'hidden-scroll-bar-y'} style={{ overflow: 'hidden', height: divHeight }} onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut}> | 
				
			|||
                    <div style={{ height: '100%' }}> | 
				
			|||
                        {content ? content : ''} | 
				
			|||
                        {this.getContent()} | 
				
			|||
                    </div> | 
				
			|||
                </div> | 
				
			|||
            </div > | 
				
			|||
        ) | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -1,9 +0,0 @@ | 
				
			|||
import React from 'react' | 
				
			|||
 | 
				
			|||
function lunbo() { | 
				
			|||
  return ( | 
				
			|||
    <div>lunbo copy</div> | 
				
			|||
  ) | 
				
			|||
} | 
				
			|||
 | 
				
			|||
export default lunbo | 
				
			|||
								
									
										File diff suppressed because one or more lines are too long
									
								
							
						
					
								
									
										File diff suppressed because it is too large
									
								
							
						
					
								
									
										File diff suppressed because it is too large
									
								
							
						
					
					Loading…
					
					
				
		Reference in new issue