<template>
  <toolbar-container :fields="fields" v-on="$listeners" />
</template>

<script>
import TYPE from '@/const/type';
import SCENETYPE from '@/const/sceneType';

export default {
  name: 'sceneListToolbar',

  data() {
    return {
      fields: [
        {
          type: 'text',
          name: 'name',
          label: '机构名称'
        },
        {
          type: 'AddressSelect',
          name: 'area',
          label: '所在地区',
          defaultValue: [],
          format: val => val[2] || null
        },
        {
          type: 'select',
          name: 'type',
          label: '机构类型',
          options: SCENETYPE
        },
        {
          type: 'text',
          name: 'phonenumber',
          label: '办公号码'
        },
        {
          type: 'select',
          name: 'isShow',
          label: '显示/隐藏',
          options: TYPE,
          format: val => (val !== null && val !== '' ? !!val : null),
          defaultValue: 1
        }
      ]
    };
  }
};
</script>

<style type="scss" scoped></style>
