<template>
  <div class="auto" id="meterInfoTest">
    <validator name='m' @valid="mValid(true)" @invalid="mValid(false)">
      <form class="form-horizontal select-overspread ">
        <div style="margin-top: 2%;">
          <a style="font-size: 16px;font-weight: 500;">车辆信息</a>&nbsp;<a style="color: #999999;text-decoration: none"></a>
        </div>
        <div class="row">
          <div class="col-sm-4 form-group" v-if="isiot" :class="[$m.f_meternumber.required ? 'has-error' : '']">
            <label class="font_normal_body">&ensp;车牌号码</label>
            <input type="text" class="input_search" style="width:60%" v-model="row.f_meternumber"
                   @blur="meternumberValidate()" placeholder='车牌号码' v-validate:f_meternumber='{required: true }'>
          </div>
          <!--<div class="col-sm-4 form-group">-->
            <!--<label class="font_normal_body">&ensp;汽车类型</label>-->
            <!--<input type="text" class="input_search" style="width:60%" v-model="row.f_meter_type" placeholder='汽车类型'>-->
          <!--</div>-->
          <div class="col-sm-4 form-group">
            <label class="font_normal_body">&ensp;行驶证号</label>
            <input type="text" class="input_search" style="width:60%" v-model="row.f_driving_num" placeholder='行驶证号'>
          </div>
          <div class="col-sm-4 form-group">
            <label for="gasbrand" class="font_normal_body">汽车品牌</label>
            <input type="text" class="input_search" style="width:60%" v-show="false" v-model="$refs.brand.selectedItems">
            <v-select :value.sync='row.f_gasbrand_id' :options='meterbrands' placeholder='汽车品牌' close-on-select value-single
                      @change="getGasmodel" search v-model='row.f_gasbrand_id' v-ref:brand></v-select>
          </div>
          <div class="col-sm-4 form-group">
            <label class="font_normal_body">气瓶号</label>
            <input type="text" class="input_search" style="width:60%" v-model="row.f_cylinder_number" placeholder='气瓶号'>
          </div>
          <div class="col-sm-4 form-group">
            <label class="font_normal_body">气瓶登记证号</label>
            <input type="text" class="input_search" style="width:60%" v-model="row.f_gas_cylinder" placeholder='气瓶登记证号'>
          </div>
          <div class="col-sm-4 form-group">
            <label class="font_normal_body">合格证明文件</label>
            <input type="text" class="input_search" style="width:60%" v-model="row.f_formal_document" placeholder='合格证明文件'>
          </div>
          <div class="col-sm-4 form-group"  :class="[$m.f_license_start_time.required ? 'has-error' : '']">
            <label class="font_normal_body" style="width: 115px;">行驶证开始时间</label>
            <input type="text" class="input_search" style="width:60%" v-show="false" v-model="$refs.f_license_start_time.value"
                   v-validate:f_license_start_time='{required: true }'>
            <datepicker placeholder="行驶证开始时间" style="width: 60%"
                        v-model="row.f_license_start_time"
                        :value.sync="row.f_license_start_time"
                        :format="'yyyy-MM-dd'"
                        v-ref:f_license_start_time
            >
            </datepicker>
          </div>
          <div class="col-sm-4 form-group"  :class="[$m.f_license_time.required ? 'has-error' : '']">
            <label class="font_normal_body" style="width: 115px;">行驶证到期时间</label>
            <input type="text" class="input_search" style="width:60%" v-show="false" v-model="$refs.f_license_time.value"
                   v-validate:f_license_time='{required: true }'>
            <datepicker placeholder="行驶证到期时间" style="width: 60%"
                        v-model="row.f_license_time"
                        :value.sync="row.f_license_time"
                        :format="'yyyy-MM-dd'"
                        v-ref:f_license_time
            >
            </datepicker>
          </div>
          <div class="col-sm-4 form-group">
            <!--            <label class="font_normal_body">&ensp;车&ensp;架&ensp;号</label>-->
            <!--            <input type="text" class="input_search" style="width:60%" v-model="row.f_vin" placeholder='车架号'>-->
          </div>
          <div class="col-sm-4 form-group"  :class="[$m.f_cyclinder_start_time.required ? 'has-error' : '']">
            <label class="font_normal_body" style="width: 100px;">钢瓶开始时间</label>
            <input type="text" class="input_search" style="width:60%" v-show="false" v-model="$refs.f_cyclinder_start_time.value"
                   v-validate:f_cyclinder_start_time='{required: true }'>
            <datepicker placeholder="钢瓶开始时间" style="width: 60%"
                        v-model="row.f_cyclinder_start_time"
                        :value.sync="row.f_cyclinder_start_time"
                        :format="'yyyy-MM-dd'"
                        v-ref:f_cyclinder_start_time
            >
            </datepicker>
          </div>
          <div class="col-sm-4 form-group"  :class="[$m.f_cyclinder_time.required ? 'has-error' : '']">
            <label class="font_normal_body" style="width: 100px;">钢瓶到期时间</label>
            <input type="text" class="input_search" style="width:60%" v-show="false" v-model="$refs.f_cyclinder_time.value"
                   v-validate:f_cyclinder_time='{required: true }'>
            <datepicker placeholder="钢瓶到期时间" style="width: 60%"
                        v-model="row.f_cyclinder_time"
                        :value.sync="row.f_cyclinder_time"
                        :format="'yyyy-MM-dd'"
                        v-ref:f_cyclinder_time
            >
            </datepicker>
          </div>
          <div class="col-sm-4 form-group">
            <!--            <label class="font_normal_body">&ensp;车&ensp;架&ensp;号</label>-->
            <!--            <input type="text" class="input_search" style="width:60%" v-model="row.f_vin" placeholder='车架号'>-->
          </div>
          <!--<div class="col-sm-4 form-group">-->
            <!--<label class="font_normal_body">汽车型号</label>-->
            <!--<input type="text" class="input_search" style="width:60%" v-model="row.f_carmodel_no" placeholder='汽车型号'-->
            <!--&gt;-->
          <!--</div>-->
<!--          <div class="col-sm-4 form-group" :class="[$m.meterstyles.required ? 'has-error' : '']">-->
<!--            <label for="f_meter_type" class="font_normal_body">汽车型号</label>-->
<!--            <input type="text" class="input_search" style="width: 60%" v-show="false" v-model="$refs.meterstyles.selectedItems" v-validate:meterstyles='{required: true }'>-->
<!--            <v-select :value.sync="row.f_gasmodel_id"-->
<!--                      v-model="row.f_gasmodel_id"-->
<!--                      value-single-->
<!--                      :options='meterStyle' placeholder='汽车型号'-->
<!--                      close-on-select v-ref:meterstyles style="width: 60%"></v-select>-->
<!--          </div>-->
          <!--<div class="col-sm-4 form-group">-->
            <!--<label class="font_normal_body">&ensp;燃油种类</label>-->
            <!--<input type="text" class="input_search" style="width:60%" v-model="row.f_fueltype" placeholder='燃油种类'>-->
          <!--</div>-->
          <!--<div class="col-sm-4 form-group">-->
            <!--<label class="font_normal_body">&ensp;用户余额</label>-->
            <!--<input type="text" class="input_search" style="width:60%" v-model="" placeholder='用户余额'>-->
          <!--</div>-->
<!--        </div>-->
        <!--<div>-->
          <!--<a style="font-size: 16px;font-weight: 500;">气价信息</a>&nbsp;<a style="color: #999999;text-decoration: none"></a>-->
        <!--</div>-->
        <!--<div class="row">-->
          <!--<div class="col-sm-4 form-group" :class="[$m.name.required ? 'has-error' : '']">-->
            <!--<label for="pricename" class="font_normal_body">气价名称</label>-->
            <!--<v-select :value.sync="row.pricename" v-model="row.pricename" search-->
                      <!--placeholder='气价名称' :options="getPricenames" @change="priceChange"-->
                      <!--close-on-select :disabled="permissionPrice" v-ref:name></v-select>-->
            <!--<input type="text" v-show="false" v-model="$refs.name.selectedItems" v-validate:name='{required: true }'>-->
          <!--</div>-->
          <!--<div class="col-sm-4 form-group">-->
            <!--<label for="f_username" class="font_normal_body">&ensp;客户类型</label>-->
            <!--<v-select :value.sync="row.f_user_type"-->
                      <!--:options='usertypes' placeholder='客户类型'-->
                      <!--@change="userTypeChange()"-->
                      <!--:disabled="true"-->
                      <!--close-on-select></v-select>-->
          <!--</div>-->
          <!--<div class="col-sm-4 form-group"-->
               <!--:class="[$m.gas.required ? 'select-error' : '']">-->
            <!--<label for="f_username" class="font_normal_body">&ensp;用气性质</label>-->
            <!--<input type="text" v-show="false" v-model="$refs.gas.selectedItems" v-validate:gas='{required: true }'>-->
            <!--<v-select :value.sync="row.f_gasproperties" v-model="row.f_gasproperties"-->
                      <!--:options='gasproperties' placeholder='用气性质'-->
                      <!--:disabled="true"-->
                      <!--close-on-select v-ref:gas></v-select>-->
          <!--</div>-->
          <!--<div class="col-sm-4 form-group">-->
            <!--<label for="f_detailprice" class="font_normal_body">&ensp;价&emsp;&emsp;格</label>-->
            <!--<input type="text" class="input_search" style="width:60%" v-model="row.f_detailprice" placeholder='价格'-->
                   <!--disabled>-->
          <!--</div>-->
          <!--<div class="col-sm-4 form-group" :class="[$m.type.required ? 'select-error' : '']">-->
            <!--<label for="pricetype" class="font_normal_body">&ensp;气价类型</label>-->
            <!--<v-select :value.sync="row.pricetype" v-model="row.pricetype"-->
                      <!--placeholder='气价类型' :options="pricetypes"-->
                      <!--:value-single="true"-->
                      <!--:disabled="true"-->
                      <!--close-on-select v-ref:type>-->
            <!--</v-select>-->
            <!--<input type="text" v-show="false" v-model="$refs.type.selectedItems" v-validate:type='{required: true }'>-->
          <!--</div>-->
          <!--<div class="col-sm-4 form-group">-->
            <!--<label class="font_normal_body">&ensp;气价备注</label>-->
            <!--<input type="text" class="input_search" style="width:60%" v-model="row.f_price_comments" placeholder='气价备注' disabled>-->
          <!--</div>-->
        <!--</div>-->
<!--        <div>-->
<!--          <a style="font-size: 16px;font-weight: 500;">车辆其他信息</a>&nbsp;<a style="color: #999999;text-decoration: none"></a>-->
<!--        </div>-->
<!--        <div class="row">-->
<!--          <div class="col-sm-4 form-group">-->
<!--            <label for="f_input_person" class="font_normal_body">&ensp;录&ensp;入&ensp;人</label>-->
<!--            <input type="text" class="input_search" style="width:60%" style="width:60%" v-model="row.f_input_person"-->
<!--                   placeholder='录入人'>-->
<!--          </div>-->
<!--          <div class="col-sm-4 form-group" :class="[$m.f_input_date.required ? 'has-error' : '']">-->
<!--            <input type="text" v-model="$refs.f_input_date.value" v-show="false"  v-validate:f_input_date='{required: true }'>-->
<!--            <label for="f_input_date" class="font_normal_body">&ensp;录入日期</label>-->
<!--            <datepicker style="width:60%" placeholder="录入日期"-->
<!--                        v-model="row.f_input_date"-->
<!--                        v-ref:f_input_date-->
<!--                        :value.sync="row.f_input_date"-->
<!--                        :format="'yyyy-MM-dd HH:mm:ss'"-->
<!--            ></datepicker>-->
<!--          </div>-->
          <!--<div class="col-sm-4 form-group" >-->
            <!--<label for="f_usetype" class="font_normal_body" title="参数:使用类型">&ensp;使用类型</label>-->
            <!--<v-select :value.sync="row.f_usetype" v-model="row.f_usetype"-->
                      <!--:options='usetype' placeholder='使用类型'-->
                      <!--close-on-select></v-select>-->
          <!--</div>-->
          <!--<div class="col-sm-4 form-group" >-->
            <!--<label for="f_position" class="font_normal_body" title="参数:使用状态">&ensp;使用状态</label>-->
            <!--<v-select :value.sync="row.f_usestate" v-model="row.f_usestate"-->
                      <!--:options='usestate' placeholder='使用状态'-->
                      <!--close-on-select></v-select>-->
          <!--</div>-->
        </div>
      </form>
    </validator>
    <!--<idverify :show.sync="show" @change-con="changeVal"></idverify>-->
    <modal v-if="showParame" :show.sync="showParame" v-ref:modal backdrop="false">
      <header slot="modal-header" class="modal-header">
        <button type="button" class="close" @click="cancel"><span>&times;</span></button>
        <h3 class="modal-title" style="text-align: center;">添加参数</h3>
      </header>
      <article slot="modal-body" class="modal-body">
        <add-json-parameter v-ref:addparamlist :gasmodel_id="userfileid" :gastype="gastype"
                            :gasid="gasid"></add-json-parameter>
      </article>
      <footer slot="modal-footer" class="modal-footer">
        <button type="button" class="btn btn-primary" @click='confirmUserfiles()'>确认1</button>
      </footer>
    </modal>
  </div>
</template>

<script>
  import co from 'co'
  import {HttpResetClass} from 'vue-client'
  import Vue from 'vue'

  let meterBookGen = function * (self) {
    if (self.$login.r.find(value => value == '抄表册建档')) {
      self.opteratormetrbook = true
    }
    let temp = {
      tablename: 't_meter_book',
      condition: `f_book_state='有效' and f_filiale_id='${self.$login.f.orgid}'`
    }
    let http = new HttpResetClass()
    let meterbooks = yield http.load('POST', 'rs/sql/saleSingleTable', {data: temp},
      {resolveMsg: null, rejectMsg: '获取抄表册信息失败！！'})
    if (meterbooks.data.length > 0) {
      let options = []
      for (let i = 0; i < meterbooks.data.length; i++) {
        let tmp = {label: meterbooks.data[i].f_book_name, value: `${meterbooks.data[i].id}`}
        options.push(tmp)
      }
      self.meterbookoptions = options
    }
    try {
      let result = yield http.load('GET', `rs/vue/MeterinfoTest.json`, {}, {resolveMsg: null, rejectMsg: null})
      Object.assign(self.config, result.data)
    } catch (error) {
      // 忽略704,文件找不到异常
      if (error.status !== 704) {
        throw error
      }
    }
  }
  let brandChangeGen = function* (self, val) {
    let beforeRecord = null

    if (self.meter.f_meter_classify === '机表') {
      beforeRecord = yield self.$resetpost('rs/sql/saleSingleTable', {
        data: {
          tablename: 't_handplan',
          condition: `f_user_id = '${self.row.f_user_id}' and f_meter_state in ('已抄表','未抄表')`
        }
      }, {resolveMsg: null, rejectMsg: '在档案中更改气表品牌时，获取之前机表抄表信息出错！！'})
    } else {
      beforeRecord = yield self.$resetpost('rs/sql/saleSingleTable', {
        data: {
          tablename: 't_sellinggas',
          condition: `f_user_id = '${self.row.f_user_id}' and f_state = '有效'`
        }
      }, {resolveMsg: null, rejectMsg: '在档案中更改气表品牌时，获取之前卡表收费信息出错！！'})
    }
    if (beforeRecord.data.length > 0 && self.row.gasbrand[0].f_meter_brand != self.oldrow.gasbrand[0].f_meter_brand) {
      self.$showAlert('该气表已投入使用，如需更改请执行换表操作', 'warning', 3000)
      // self.row.gasbrand = self.meter.gasbrand
      self.$dispatch('success')
      /* self.row.valid = bool
      self.$dispatch('self-valid') */
    } else {
      self.row.f_whether_hairpin = self.row.gasbrand[0].f_meter_type === '机表' ? '无卡' : '未发'
    }
    console.log('111', self.row)
  }
  export default {
    title: '表具信息',
    data () {
      return {
        config: {
          // 卡控流量计相关字段显示
          stuckFlowmeterShow: false
        },
        changestate:false,
        mapShow: false,
        viewsee: false,
        row: this.meter,
        show: false,
        field: '',
        ratioshow: false,
        userfileid: '',
        gasid: '',
        gastype: 'userfiles',
        showParame: false,
        selectUserFiles: '', // 选中的 userfiles
        jurisdiction: this.$login.r,
        positions: this.$appdata.getParam('安装位置'),
        usetype: this.$appdata.getParam('使用类型'),
        usestate: this.$appdata.getParam('使用状态'),
        aroundmeters: this.$appdata.getParam('左右表'),
        garbagefee: this.$appdata.getParam('垃圾费'),
        valvestate: this.$appdata.getParam('阀门状态'),
        usertypes: this.$appdata.getParam('用户类型'),
        handmonth: [{label: '单月', value: '单月'}, {label: '双月', value: '双月'}],
        pricetypes: this.$appdata.getParam('气价类型'),
        industrycomments: this.$appdata.getParam('工业备注'),
        oldrow: [],
        isiot: true,
        meterStyle:[],
        meterType:this.$appdata.getParam('汽车类型')
      }
    },
    props: ['f_filialeid', 'meter', 'valid', 'f_userinfo_id'],
    ready () {
      console.log('看看meter里面的数据', this.meter, this.row)
      this.row = Object.assign(this.row, this.meter, {})
      console.log('=======看看meter里面的数据', this.meter, this.row)
      if(this.row.f_gasbrand_id && this.row.f_gasbrand_id !=''){
        this.getGasmodel();
      }
      this.oldrow = this.row
      this.row.valid = false
      if (this.row.pricetype === '混合气价') {
        this.ratioshow = true
      }
      co(meterBookGen(this))
    },
    methods: {
      getGasmodel () {
        console.log("原本的汽车类型",this.row.f_meter_type)
        let param = {
          f_gasbrand_id:this.row.f_gasbrand_id
        }
        //查询品牌对应得型号
        this.$resetpost('rs/logic/getBrandModels', param, {
          resolveMsg: null,
          rejectMsg: '汽车型号查询失败！！'
        }).then((res) => {
          //重新组装型号下拉框
          let temArr = []
          res.data.forEach((item) => {
            let tem = {}
            tem.label = item.f_meter_style
            tem.value = item.id
            temArr.push(tem)
          })
          this.meterStyle = temArr
        })
      },
      async confirmUserfiles () {
        if (this.$refs.addparamlist.confirm()) {
          var paramlist = this.$refs.addparamlist.addGasParameter
          await this.$resetpost('rs/logic/updateGasParam', {
            data: {
              id: this.selectUserFiles.f_user_id,
              paramlist: paramlist,
              gastype: 'userfiles'
            }
          }, {resolveMsg: '更新成功', rejectMsg: '更新失败'})
          this.showParame = false
        }
      },

      priceChange (val) {
        if (val.length > 0) {
          this.row.f_user_type = [val[0].f_user_type]
          this.row.f_gasproperties = [val[0].f_gasproperties]
          this.row.pricetype = val[0].f_price_type
          // 展示气价备注
          this.$set('row.f_price_comments', val[0].f_comments ? val[0].f_comments : '无')
          // 展示价格明细
          if (val[0].detailprice) {
            // this.row.f_detailprice = this.$CommonService.getShowPriceDetail(val[0].detailprice)
            this.$set('row.f_detailprice', this.$CommonService.getShowPriceDetail(val[0].detailprice))
          }
        }
      },
      cancel () {
        this.gasid = ''
        this.userfileid = ''
        this.showParame = false
      },
      tablebaseChange () {
        if (this.isdecimal === '是') {
          this.$set('row.f_meter_base', (this.row.f_meter_base - 0).toFixed(4))
        } else {
          this.$set('row.f_meter_base', (this.row.f_meter_base - 0).toFixed(0))
        }
      },

      userTypeChange () {
        this.gasproperties = []
        if (this.row.f_user_type.length === 1) {
          this.gasproperties = this.$appdata.getParam(this.row.f_user_type[0])
        }
      },

      mValid (bool) {
        this.row.valid = bool
        this.$dispatch('self-valid')
      },
      // 带权限修改单值返回修改后得值和修改原因
      modefiy (field) {
        this.show = true
        this.field = field
      },
      async meternumberValidate () {
        // 验证表号
        if (this.row.f_meternumber && this.row.gasbrand.length > 0) {
          let param = {
            f_meternumber: this.row.f_meternumber,
            f_gasbrand_id: this.row.gasbrand[0].id
          }
          if (this.row.f_userfiles_id) {
            param.f_userfiles_id = this.row.f_userfiles_id
          }
          let res = await this.$resetpost('rs/logic/meternumberValidate', param, {
            resolveMsg: null,
            rejectMsg: '车牌号号验证失败！！'
          })
          if (this.row.gasbrand[0].f_meter_type === '物联网表') {
            if (res.data) {
              this.row.f_meternumber = ''
              this.$showAlert('车牌号号已存在！！', 'warning', 3000)
            }
          } else {
            if (res.data) {
              this.$showAlert('请注意，相同的车牌号已存在', 'warning', 3000)
            }
          }
        }
      },
      openModal () {
        this.mapShow = true
      },
      closeModal () {
        this.mapShow = false;
      },
      getmylocation (res) {
        this.templng = res.position.lng
        this.templat = res.position.lat
      },
      flowmetermodels (label) {
        let gasbrand = this.$GetSaleParam.getGasbrand()
        let flowmetermodels = []
        for (let row of gasbrand) {
          if (row.label == label) {
            for (let gasmodel of row.value.gasmodel) {
              flowmetermodels.push({label: gasmodel.label, value: gasmodel.label})
            }
            break
          }
        }
        return flowmetermodels
      }
    },
    watch: {
      'meter' () {
        this.row = Object.assign(this.row, this.meter, {})
        if(this.row.gasbrand && this.row.gasbrand.f_isdecimal){
          this.isdecimal = this.row.gasbrand.f_isdecimal
        }
        this.row.valid = false
      },
      'row.pricetype' (val) {
        if (val == '混合气价') {
          this.ratioshow = true
        } else {
          this.ratioshow = false
        }
      }

    },
    computed: {
      // 控制用户类型修改
      permissionUserType () {
        let res = false
        if (this.row.f_user_id) {
          res = !(this.jurisdiction.includes('民用气价修改') && this.jurisdiction.includes('非民用气价修改'))
        }
        return res
      },

      // 控制用气性质，气价类型，气价名称修改
      permissionPrice () {
        let res = false
        if (this.row.f_user_id) {
          console.log('获取权限、', this.row, this.jurisdiction)
          // 变更操作
          if (this.row.pricename.length > 0) {
            if (this.row.f_user_type[0] === '民用') {
              // 判断是否有民用气价权限
              res = !this.jurisdiction.includes('民用气价修改')
            } else if (this.row.f_user_type[0] === '非民用') {
              // 判断是否有非民用气价权限
              res = !this.jurisdiction.includes('非民用气价修改')
            }
          }
        }
        console.log('有无气价权限', res)
        return res
      },

      getPricenames () {
        let f_filialeid = this.f_filialeid
        let result = []
        this.$GetSaleParam.prices.forEach((item) => {
          if (item.f_state === '有效' && f_filialeid == item.f_filialeid) {
            let value = {
              label: item.f_price_name,
              value: item
            }
            result.push(value)
          }
        })
        return Array.from(new Set(result))
      },

      adjustables () {
        let arr = []
        let filter = this.f_filialeid
        this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
          let temp = {}
          temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
          temp.value = item.value
          arr.push(temp)
        })
        return [{label: '全部', value: ''}, ...arr]
      },
      inputtores () {
        // return this.$login.f.f_gasman
        let rs = new Array()
        for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
          let temp = {
            label: this.$login.f.f_gasman[i].name,
            value: this.$login.f.f_gasman[i].name
          }
          rs.push(temp)
        }
        return rs
      },
      installperson () {
        // return this.$login.f.f_installman
        let rs = new Array()
        for (let i = 0; i < this.$login.f.f_installman.length; i++) {
          let temp = {
            label: this.$login.f.f_installman[i].name,
            value: this.$login.f.f_installman[i].name
          }
          rs.push(temp)
        }
        return rs
      },
      meterbrands () {
        let temArr = []
        // let res = this.$resetpost('rs/logic/getBrandName', null)
        console.log(this.$GetSaleParam.getGasbrand())
        this.$GetSaleParam.getGasbrand().forEach((item) => {
          let tem = {}
          tem.label = item.label
          tem.value = item.value.id
          temArr.push(tem)
        })
        console.log("看看组装后的数组----------：",temArr)
        return temArr
      },
      aroundmeters () {
        return this.$appdata.getParam('左右表')
      },
      positions () {
        return this.$appdata.getParam('安装位置')
      },
      usetype () {
        return this.$appdata.getParam('使用类型')
      },
      usestate () {
        return this.$appdata.getParam('使用状态')
      },
      gongyetype () {
        return this.$appdata.getParam('工业备注')
      }
    }
  }
</script>
<style lang="less">
  #meterInfoTest{
    #addboxmap {
      height: 300px;
    }
    .glyphicon-map-marker:hover {
      color: red;
    }
    .glyphicon-map-marker {
      color: blue;
      cursor: pointer;
    }
    .col-sm-4 {
      .font_normal_body {
        width: 73px;
        overflow: auto;
        white-space: nowrap;
        // 指滚动条两边的按钮
        &::-webkit-scrollbar-button {
          display: none;
        }
        // 滚动条的宽度
        &::-webkit-scrollbar {
          width: 5px !important;
          height: 5px !important;
        }
        // 滚动条的设置
        &::-webkit-scrollbar-thumb {
          background-color: #ddd;
          background-clip: padding-box;
        }
        &::-webkit-scrollbar-thumb:hover {
          background-color: #bbb;
        }
        &::-webkit-scrollbar-track {
          /*滚动条里面轨道*/
          box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
          background: #ededed;
        }
      }
    }
  }
</style>
