<template>
  <div class="flex">
    <div class="auto">
      <div class="form-horizontal select-overspread" style="background: white; padding: 0 1%;">
        <div class="row">
          <div class="col-sm-2 form-group">
            <label class="font_normal_body">终端类型</label>
            <v-select id="f_charge_type"
                      v-model="model.f_equipment_type"
                      placeholder='终端类型'
                      :value.sync="model.f_equipment_type"
                      :options='equipmentType'
                      close-on-select clear-button>
            </v-select>
          </div>
        </div>
      </div>
    </div>
    <div v-if="model.f_equipment_type[0] === 'PC'">
      <pc-manage></pc-manage>
    </div>
    <div v-if="model.f_equipment_type[0] === 'POS'">
      <pos-manage></pos-manage>
    </div>
    <div v-if="model.f_equipment_type[0] === 'PHONE'">
      <phone-manage></phone-manage>
    </div>
  </div>
</template>

<script>

  export default {
    title: '终端控制',
    data () {
      return {
        filialeNameStr: this.$login.f.f_fengongsi,
        filialeCodeStr: this.$login.f.orgid,
        userid:this.$login.f.id,
        source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`,
        equipmentType: this.$appdata.getParam('终端类型'),
        model: {
            f_equipment_type: []
        }
      }
    },
    ready () {
      console.log('看看终端类型',  this.equipmentType)
      this.model.f_equipment_type = [this.equipmentType[0].value]
    },
    methods: {
      del (row) {
          console.log('要删除了', row)
      },

      getRes (obj) {
        this.filialeNameStr = obj.res
        this.filialeCodeStr = obj.resids
      },
    },
    computed: {

    }
  }
</script>
