<template>
    <div id='app' class="flex bg-white p-10  datapanel" v-show="(!echarts)&&(!isActiveTotalForm)">
        <criteria-paged :model="model" :pager='true' v-ref:paged>
            <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
                <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
                    <div class="row" width="100%">
                        <div class="col-sm-3 form-group form-input-group">
                            <label class="control-label">表&nbsp;钢&nbsp;号&nbsp;</label>
                            <input type="text" class="form-control" v-model="model.f_meternumber" placeholder='表钢号'
                                   condition="uf.f_meternumber like '%{}%'" v-next-el='meternumber' v-el:meternumber
                            >
                        </div>
                        <div v-if="$parent.$parent.searchshow">
                            <div class="col-sm-3 form-group form-input-group">
                                <label class="control-label">组织机构</label>
                                <right-tree :userid.sync='$parent.$parent.obj.userid'
                                            :source.sync='$parent.$parent.obj.source'
                                            :multiple="true"
                                            @re-res="$parent.$parent.getRes"></right-tree>
                            </div>
                            <div class="col-sm-3 form-group form-input-group">
                                <label class="control-label">&nbsp;用&nbsp;户&nbsp;号</label>
                                <input type="text" class="form-control" v-model="model.f_userinfo_code"
                                       placeholder='用户号'
                                       condition="u.f_userinfo_code like '%{}%'" v-next-el='f_userinfo_code'
                                       v-el:meternumber
                                >
                            </div>
                            <div class="col-sm-3 form-group form-input-group">
                                <label class="control-label">用户姓名</label>
                                <input type="text" class="form-control" v-model="model.f_username" placeholder='用户姓名'
                                       condition="u.f_user_name like '%{}%'" v-next-el='userid' v-el:username>
                            </div>
                            <div class="col-sm-3 form-group form-input-group">
                                <label class="control-label">用户类型</label>
                                <v-select id="f_user_type"
                                          v-model="model.f_user_type"
                                          placeholder='用户类型'
                                          value-single="true"
                                          :value.sync="model.f_user_type"
                                          @change="$parent.$parent.userTypeChange()"
                                          :options='$parent.$parent.getTypes'
                                          condition="uf.f_user_type = '{}'"
                                          close-on-select>
                                </v-select>
                            </div>
                            <div class="col-sm-3 form-group form-input-group">
                                <label class="control-label">用气性质</label>
                                <v-select id="f_gasproperties"
                                          v-model="model.f_gasproperties"
                                          placeholder='用气性质'
                                          value-single="true"
                                          :value.sync="model.f_gasproperties"
                                          :options='$parent.$parent.gasproperties'
                                          condition="uf.f_gasproperties in {}"
                                          close-on-select>
                                </v-select>
                            </div>
                            <div class="col-sm-3 form-group form-input-group">
                                <label class="control-label">时间区间</label>
                                <datepicker id="startDate" placeholder="开始时间"
                                            v-model="model.startDate"
                                            :value.sync="model.startDate"
                                            :disabled-days-of-Week="[]"
                                            :format="'yyyy-MM-dd HH:mm:ss'"
                                            :show-reset-button="reset">
                                </datepicker>
                            </div>
                            <div class="col-sm-3 form-group form-input-group">
                                <label class="control-label" style="word-break:keep-all;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
                                <datepicker id="endDate" placeholder="结束日期"
                                            v-model="model.endDate"
                                            :value.sync="model.endDate"
                                            :disabled-days-of-Week="[]"
                                            :format="'yyyy-MM-dd HH:mm:ss'"
                                            :show-reset-button="reset">
                                </datepicker>
                            </div>
                            <div class="col-sm-3 form-group form-input-group">
                                <label class="control-label">气表品牌</label>
                                <v-select
                                        placeholder='气表品牌'
                                        :value.sync="model.f_meter_brand1"
                                        v-model="model.f_meter_brand1"
                                        :options='$parent.$parent.WarningType'
                                        @change="$parent.$parent.getMeterType"
                                        close-on-select
                                        condition="gb.f_meter_brand='{}'">
                                </v-select>
                            </div>
                            <div class="col-sm-3 form-group form-input-group">
                                <label class="control-label">气表型号</label>
                                <v-select v-if="$parent.$parent.styles"
                                          placeholder='气表型号'
                                          :value.sync="model.f_meter_style"
                                          v-model="model.f_meter_style"
                                          :options='$parent.$parent.Warningstyle'
                                          close-on-select
                                          condition="gm.f_meter_style='{}'">
                                </v-select>
                                <v-select v-if="!$parent.$parent.styles"
                                          placeholder='气表型号'
                                          :value.sync="model.f_meter_style"
                                          v-model="model.f_meter_style"
                                          :options='$parent.$parent.Warningstyles'
                                          close-on-select
                                          condition="gm.f_meter_style='{}'">
                                </v-select>
                            </div>

                          <div class="col-sm-3 form-group form-input-group">
                            <label class="control-label">用气地址</label>
                            <input type="text" class="form-control" v-model="model.f_address" placeholder='用气地址'
                                   condition="a.f_address like '%{}%'" v-el:xq v-next-el='address' v-el:area
                            >
                          </div>
                          <div class="col-sm-3 form-group form-input-group" title="参数：用户等级">
                            <label class="control-label">用户等级</label>
                            <v-select
                              placeholder='用户等级'
                              :value.sync="model.f_user_level"
                              v-model="model.f_user_level"
                              :options='$parent.$parent.f_user_level'
                              close-on-select
                              condition="f_user_level='{}'">
                            </v-select>
                          </div>
                        </div>

                        <div class="col-sm-3 form-group">
                            <label class="control-label"></label>
                            <button class="btn btn-success " @click="search()">查询</button>
                            <label class="control-label"></label>
                            <button class="btn btn-default width-100" @click="$parent.$parent.clearmsg">清空</button>
                            <label class="control-label" v-if="!$parent.$parent.excelTable">超过十万条限制导出</label>
                            <export-excel v-if="$parent.$parent.excelTable"
                                          :data="{condition: $parent.$parent.getcondition,startDate:model.startDate,endDate:model.endDate}"
                                          :field="$parent.$parent.getfield"
                                          sqlurl="rs/logic/exportfile" sql-name="manage_getUserGasList"
                                          template-name='usegas'
                                          :choose-col="true"></export-excel>
                        </div>
                        <div class="col-sm-3 form-group">
                            <label class="control-label"></label>
                            <button class="btn btn-success" @click="$parent.$parent.showTotalForm()">显示汇总</button>
                            <label class="control-label"></label>
                            <button class="btn btn-success" @click="$parent.$parent.showEcharts()">显示图表</button>
                        </div>
                        <div v-show="!$parent.$parent.searchshow" @click="$parent.$parent.seachchange"
                             style="position: relative;float: right;margin-right: 1%;">
                            <img src="../../../static/webMeter/shousuo.png"><span>展开</span>
                        </div>
                        <div v-show="$parent.$parent.searchshow" @click="$parent.$parent.seachchange"
                             style="position: relative;float: right;margin-right: 1%;">
                            <img src="../../../static/webMeter/shangsheng.png"><span>收缩</span>
                        </div>
                    </div>
                </div>
            </criteria>
            <data-grid id="usergasall" :model="model" partial='list' v-ref:grid>
                <template partial='head'>
                    <tr>
                        <th style="text-align:center">
                            <nobr>组织机构</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>用户号</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>用户类型</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>用气性质</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>用户姓名</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>用气地址</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>表钢号</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>气表品牌</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>气表型号</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>期初余额(元)</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>上期底数</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>本期底数</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>气价(元/m³)</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>用气量(m³)</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>用气金额(元)</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>期末结余(元)</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>用气期初日期</nobr>
                        </th>
                        <th style="text-align:center">
                            <nobr>用气期末日期</nobr>
                        </th>
                    </tr>
                </template>
                <template partial='body'>
                  <td style="text-align:center"><nobr>{{row.f_filiale}}</nobr></td>
                    <td>{{row.f_userinfo_code}}</td>
                    <td style="text-align:center">{{row.f_user_type}}</td>
                    <td style="text-align:center">{{row.f_gasproperties}}</td>
                    <td style="text-align:center">
                        <nobr>{{row.f_user_name}}</nobr>
                    </td>
                    <td>
                        <nobr>{{row.f_address}}</nobr>
                    </td>
                    <td>{{row.f_meternumber}}</td>
                    <td style="text-align:center">
                        <nobr>{{row.f_meter_brand}}</nobr>
                    </td>
                    <td style="text-align:center">
                        <nobr>{{row.f_meter_style}}</nobr>
                    </td>
                    <td style="text-align:center">{{row.f_curbalance}}</td>
                    <td style="text-align:center">{{row.f_last_tablebase}}</td>
                    <td style="text-align:center">{{row.f_tablebase}}</td>
                    <td style="text-align:center">{{row.f_avg_price}}</td>
                    <td style="text-align:center">{{row.f_oughtamount}}</td>
                    <td style="text-align:center">{{row.f_oughtfee}}</td>
                    <td style="text-align:center">{{row.f_balance}}</td>
                    <td style="text-align:center">
                        <nobr>{{row.f_last_hand_date}}</nobr>
                    </td>
                    <td style="text-align:center">
                        <nobr>{{row.f_end_hand_date}}</nobr>
                    </td>
                </template>
            </data-grid>
        </criteria-paged>
    </div>
  <table class="table-hover"  style="position: fixed; bottom: 0; background: white; width: 100%">
    <tr style="position: relative" class="table-bordered">
      <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">汇总信息</td>
      <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">用气量合计:&emsp;{{sumsmodel.f_oughtamount}}</td>
      <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">用气金额合计:&emsp;{{sumsmodel.f_oughtfee}}</td>
    </tr>
  </table>
    <div style="height: 6%;width: 100%;" v-show="echarts">
        <div style="display: inline-block;">
            <button class="btn btn-success" @click="notShowEcharts()">隐藏图表</button>
        </div>
        <!--图显示模板-->
        <div class="mystyle" style="display: inline-block;" v-if="echarts">
            <label class="control-label">图表统计项</label>
            <v-select id="groupname" v-model="groupname"
                      placeholder='分组项'
                      value-single="true"
                      :value.sync="groupname"
                      :options='getgroupname'
                      close-on-select></v-select>
        </div>
    </div>
    <div class="span " v-show="echarts" style="width: 100%;height: 90%;">
        <cr-user-gas-echarts :groupname="groupname[0]" :condition="getcondition" :startdate="startDate"
                          :enddate="endDate" :echarts="echarts"></cr-user-gas-echarts>
    </div>
    <div style="height: 6%;width: 100%;" v-show="isActiveTotalForm">
        <button class="btn btn-success" @click="notShowTotalForm()">隐藏汇总</button>
    </div>
    <!--汇总表显示模板-->
    <div class="span" v-show="isActiveTotalForm" style="width: 100%;height: 90%;">
        <cr-user-gas-eform :condition="getcondition" :startdate="startDate"
                           :enddate="endDate"></cr-user-gas-eform>
    </div>
</template>

<script>
    import {PagedList} from 'vue-client'
    import * as Util from '../../Util'
    import getLodop from '../../plugins/LodopFuncs'
    import {HttpResetClass} from 'vue-client'
    import Vue from "vue";

    let readyGen = async function (self) {
        self.getfield = self.config.excelHeaders
    }

    export default {
        title: '用气分析',
        ready() {
            this.$refs.paged.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
            this.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
            this.getdata()
            //初始化气表品牌下拉框
            this.getMeterTypeAndBrand('f_meter_brand', '1=1')
            //初始化用户类型，用气性质，下拉框
            // this.getTypes()
            readyGen(this)
          console.log("我是model")
          console.log(this.$refs.paged.$refs.cri.model)
          console.log("=====379======this.$appdata.getParam('用户类型')")
          console.log(this.getParam('用气性质'))
          console.log("=====379======this.$appdata.getParam('用户类型')")
        },
        data() {

            return {
                model: new PagedList('rs/sql/manage_getUserGasList', 20, {startDate: 'this.model.startDate',
                  endDate: 'this.model.endDate'},{f_oughtamount: 0,f_oughtfee: 0}),
                startDate: '',
                endDate: '',
                excelTable: true,
                getfield: {},
                config: {
                    excelHeaders: {
                        'f_filiale': '组织机构',
                        'f_userinfo_code': '用户号',
                        'f_user_type': '用户类型',
                        'f_gasproperties': '用气性质',
                        'f_user_name': '用户姓名',
                        'f_address': '用气地址',
                        'f_meternumber': '表钢号',
                        'f_curbalance': '期初余额(元)',
                        'f_last_tablebase': '上期底数',
                        'f_tablebase': '本期底数',
                        'f_avg_price': '气价(元/m³)',
                        'f_oughtamount': '用气量(m³)',
                        'f_oughtfee': '用气金额(元)',
                        'f_balance': '期末结余(元)',
                        'f_last_hand_date': '用气期初日期',
                        'f_end_hand_date': '用气期末日期'
                    }
                },
                WarningType: [
                    {label: '全部', value: ''}
                ],
                Warningstyle: [
                    {label: '全部', value: ''}
                ],
                Warningstyles: [
                    {label: '全部', value: ''}
                ],
                styles: false,
                reportStr: null,
                show: false,
                outlets: [],
                operator: [],
                filename: '',
                Gasusertype: [],
                Gasproperties: [],
              gasproperties:[],
                searchshow: false,
                echarts: false,
                isActiveTotalForm: false,
                condition: '1=1',
              getcondition: '1=1',
              filialeCodeStr: '',
                groupname: ['year'],
                getgroupname: [
                    {label: '年份', value: 'year'},
                    {label: '月份', value: 'month'},
                    {label: '周', value: 'week'},
                    {label: '日', value: 'day'}
                ],
                obj: {
                    userid: this.$login.f.id,
                    source: `tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
                    res: this.$login.f.f_fengongsi,
                    resids: this.$login.f.f_orgids
                },
                sumsmodel: {},
              getTypes: []
            }
        },
        methods: {
          loads (params) {
            // 创建请求数据体
            const requestData = {
              data: {
                f_filialeids: params
              }
            };

            // 发送 POST 请求params
            return Vue.resetpost('rs/logic/getInitData', requestData, { resolveMsg: null, rejectMsg: null })
              .then((res) => {
                console.log("=-=========15====res");
                console.log(res);
                console.log("=-=========15====res");

                // 处理响应数据
                res.data.singleValues.forEach((item) => {
                  this.singleValues[item.name] = item.value;
                });

                res.data.params.forEach((item) => {
                  let value = [];
                  item.f_paramvalues.forEach((paramItem, index) => {
                    value[index] = {};
                    value[index].label = paramItem.name;
                    value[index].value = paramItem.name;
                  });
                  this.params[item.name] = value;
                });
              });

          },

          params: {},
          singleValues: {},

          getParam(key) {
            return this.params[key]
          },
          userTypeChange () {
            this.gasproperties=[]
            if(this.$refs.paged.$refs.cri.model !==null) {
              this.$refs.paged.$refs.cri.model.f_gasproperties=''
              this.gasproperties = this.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
            }
            else{
              this.gasproperties =[{label: '全部', value: ''}]
            }
          },

            // 查询开关
            seachchange() {
                this.searchshow = !this.searchshow
            },
            SaveAsFile(str) {
                this.$showMessage('您是否需要导出本页数据？', ['confirm', 'cancel']).then((res) => {
                    if (res === 'confirm') {
                        let style = '<style>' +
                            'td {border-width: 1px;padding: 2px;border-style: solid; border-color:black; border-collapse:collapse;} .tdright{text-align: right;}  .tdcenter{text-align: center;}</style>';
                        let strHtml = style + document.getElementById(str).innerHTML;
                        console.log(strHtml);
                        let LODOP = getLodop();
                        LODOP.PRINT_INIT('');
                        LODOP.ADD_PRINT_TABLE(5, 5, '99%', '100%', strHtml);
                        LODOP.SAVE_TO_FILE('用气分析.xls')
                    }
                })
            },
            clearmsg() {
              this.$refs.paged.$refs.cri.model = {

                // 添加其他必要的字段
                endDate: [],
                f_address: [],
                f_gasproperties: [],
                f_meter_brand1: [],
                f_meter_style: [],
                f_meternumber: [],
                f_user_level: [],
                f_user_type: [],
                f_userinfo_code: [],
                f_username: [],
                startDate: []
              };
            },
            search(args) {
              let start = this.$refs.paged.$refs.cri.model.startDate
              let end = this.$refs.paged.$refs.cri.model.endDate
              if (start == null || start == '' || end == null || end == '') {
                return this.$showMessage("时间区间的开始和结束时间不能为空！")
              }
              this.startDate = start
              this.endDate = end
              const filialeCondition = this.filialeCodeStr || this.getDefaultOrgCondition()
              if (filialeCondition) {
                args.condition = `${args.condition} and ${filialeCondition}`
              }
              this.condition = args.condition
              this.getcondition = args.condition
              this.model.search(args.condition, args.model)
              this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
            },
            getdata() {
                this.startDate = this.$refs.paged.$refs.cri.model.startDate
                this.endDate = this.$refs.paged.$refs.cri.model.endDate
                this.$refs.paged.$refs.cri.search()
                this.condition = this.$refs.paged.$refs.cri.condition
            },
            // 显示柱状图
            showEcharts() {
                this.echarts = true
                this.isActiveTotalForm = false
            },
            notShowTotalForm() {
                this.echarts = false
                this.isActiveTotalForm = false
            },
            // 不显示柱状图
            notShowEcharts() {
                this.echarts = false
                this.isActiveTotalForm = false
            },
            // 显示汇总数据表格
            showTotalForm() {
                this.echarts = false
                this.isActiveTotalForm = true
            },
            close() {
                this.show = false
            },
            getRes(obj) {
                console.log("=========455====obj")
                console.log(obj)
                console.log("=========455====obj")
                this.obj.res = obj.res
                this.obj.resids = obj.resids
                const ids = (obj.resids || '').split(',').map(item => item.trim()).filter(item => item)
                if (ids.length <= 1) {
                  this.filialeCodeStr = ids[0] ? `uf.f_filialeids like '${ids[0]}%'` : ''
                } else {
                  const parts = ids.map(code => `uf.f_filialeids like '${code}%'`)
                  this.filialeCodeStr = `(${parts.join(' or ')})`
                }
              this.loads(obj.resids)
              this.$refs.paged.$refs.cri.model = {
                f_user_type: [], // 或其他你期望的默认值
                // 添加其他必要的字段
              };

            },
            getDefaultOrgCondition () {
              const defaultOrg = this.$login.f.f_orgids || ''
              return defaultOrg ? `uf.f_filialeids like '${defaultOrg}%'` : ''
            },
            getMeterType() {
                this.Warningstyle = [{label: '全部', value: ''}]
                this.styles = false
                let f_meter_brand = this.$refs.paged.$refs.cri.model.f_meter_brand1
                this.getMeterTypeAndBrand('f_meter_style', `f_meter_brand='${f_meter_brand}'`)
            },
            getMeterTypeAndBrand(groupname, condition) {
                condition = `${condition} and ui.f_filialeids like '${this.obj.resids}%'`
                let self = this
                let load = new HttpResetClass()
                load.load('POST', 'rs/sql/getMeterStyleAndBrand', {
                    data: {
                        condition: condition,
                        groupname: groupname
                    }
                }, {warnMsg: null, resolveMsg: null}).then((res) => {
                    let dr = {label: '', value: ''}
                    let i = 0
                    for (i = 0; i < res.data.length; i++) {
                        dr = {label: '', value: ''}
                        if (groupname == 'f_meter_brand') {
                            dr.label = res.data[i].f_meter_brand
                            dr.value = res.data[i].f_meter_brand
                            //气表品牌
                            self.WarningType[i + 1] = dr
                        } else if (groupname == 'f_meter_style') {
                            dr.label = res.data[i].f_meter_style
                            dr.value = res.data[i].f_meter_style
                            //气表类型
                            self.Warningstyle[i + 1] = dr
                        }
                    }
                    if (self.Warningstyle.length > 1) {
                        self.showMeterStyle()
                    }
                })

            },
            showMeterStyle() {
                this.styles = true
            },
            // getTypes() {
            //     let f_user_type = []
            //     let f_gasproperties = []
            //     let load = new HttpResetClass()
            //     let self = this
            //     load.load('POST', 'rs/sql/getTypes', {data: {}}, {warnMsg: null, resolveMsg: null}).then((res) => {
            //         let i = 0
            //         for (i = 0; i < res.data.length; i++) {
            //           f_user_type[i] = res.data[i].f_user_type==null?'n':res.data[i].f_user_type
            //           f_gasproperties[i] = res.data[i].f_gasproperties==null?'n':res.data[i].f_gasproperties
            //         }
            //         self.Gasusertype = self.uniq(f_user_type)
            //         self.Gasproperties = self.uniq(f_gasproperties)
            //     })
            // },
            uniq(array) {
                array.sort();
                let arraytype = [{label: '全部', value: ''}]
                let dr = {label: '', value: ''}
                if (array[0] == 'n') {
                    dr = {label: '空值', value: 'is null'}
                } else {
                    dr = {label: array[0], value: "='" + array[0] + "'"}
                }
                arraytype.push(dr)
                let temp = [array[0]];
                console.log(array[0] + "array[0]")
                for (var i = 1; i < array.length; i++) {
                    if (array[i] !== temp[temp.length - 1]) {
                        if (array[i] == 'n') {
                            dr = {label: '空值', value: 'is null'}
                        } else {
                            dr = {label: array[i], value: "='" + array[i] + "'"}
                        }
                        arraytype.push(dr);
                        temp.push(array[i]);
                    }
                }
                return arraytype;
            }
        },
        watch: {
            'model.state'(val) {
                if (val === '正确') {
                    if (this.model.count <= 100000) {
                        this.excelTable = true
                    } else {
                        this.excelTable = false
                    }
                }
            }
        },
        computed: {
            getTypes() {
              return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
            },
            // Gasproperties() {
            //   return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
            // },
            f_outlets() {
                return [{label: '全部', value: ''}, ...this.$appdata.getParam('网点查询用')]
            },
            valveStatus() {
                return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
            },
            Getuserstyle() {
                return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]
            },
            f_user_level() {
                return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')]
            }
        }
    }
</script>
<style>
    .mystyle {
        float: right;
        padding-right: 10%;
    }

    .mystyle1 {
        padding-top: 10px;

    }

    .mystyle2 {
        width: 100%;
        height: 35px;
        /*background: #00A3F0;*/
        padding-left: 15px;
        float: left;
    }

    .datapanel {
        color: #333;
        background-color: white;
        box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
        padding: 10px 10px 10px 10px;
        border-radius: 15px;
    }
</style>
