<template>
  <div id="select">
      <el-select v-if="bindProps.selectType === 'select'" v-model='spcpFormData[fieldId]' :style="{ width: width || '100%', height: controlHeight, display: 'inline-block' }"
                 :attrs="{style: colCss}" v-bind="bindProps">
        <el-option v-for="item in bindProps.optionSetting" :key="item.value" :label="item.label" :value="item.value || item.label">
        </el-option>
      </el-select>
      <pl-data-select v-else v-model="spcpFormData[fieldId]"
                       v-bind="bindProps">
      </pl-data-select>
  </div>
</template>
<script>
import proto from '../spcp-proto.vue';
import PlDataSelect from "../../../../mix/plDataSelect";
export default {
  name: "spcp-select",
  components: {PlDataSelect},
  extends: proto,
  props:{
    selectType: {required: false, default: "select"},
    typeId: {required: false, default: ""},
    dataFormId: {required: false, default: ""},
    field: {required: false, default: ""},
    parentId: {required: false, default: "-1"},
    value: {required: false, default: ""},
    disabled: {required: false, default: false},
    size: {required: false},
    filterable: {required: false, default: false, type: Boolean},
    clearable: {required: false, default: false, type: Boolean},
    multiple: {required: false, default: false, type: Boolean},
    change: {required: false, type: Function},
    filterNotIds: {required: false},
    defultValue: {required: false},
    reqUrl:{default:""}, // 请求路径
    labelField:{default:"dataName"}, // 值域
    valueField:{default:"id"}, // 文本域
    displayColFieIds: {default:""},
    backfillSetting:{required: false,default: ""},
    placeholder:{default:"请选择"},
    showText:{required: false, default: false, type: Boolean}, // 自定义下拉框查看时显示文本
    showSee: {required: false, default: false, type: Boolean}, // 自定义下拉框查看时显示小眼睛
    allowCreate:{default:false},
    measurementShow:{default:false},// 自定义下拉框显示单位
    rememberSysDataObj:{type:Function},
    onSelectChange:{type:Function},
    isOrgtree:{required: false, default: false, type: Boolean},//组织下拉框
    isPostree:{required: false, default: false, type: Boolean},//岗位下拉框
    isUsertree:{required: false, default: false, type: Boolean},//用户下拉框
    orgDim:{required: false, default: ""},
    orgLevel:{required: false, default: ""},
    saveType:{required: false, default: ""},
    backfillField:{required: false, default: ""},
    listOutParam:{type:Object},//外部传入参数
    isDiy:{required: false, default: false, type: Boolean},//自定义下拉框
    valueArr:{required: false, type: Array},
    openTree:{required: false, type: false},
    changeField:{type:Function},
    userData:{required:false,type:Array},//用户数据 外部传入内部就不再查询数据
    isTreeData:{type:String,default:"0"},//是否需要处理为树数据
    treeDataType:{type:String},//是否需要处理为树数据
    backParentName:{type:String,default:"0"},//是否回填上级名称
    collapseTags:{type:Boolean,default:false},
    showLockUser:{type:Boolean,default:false},//是否显示已锁定用户
    skinType: {type: String, default: ""}, //组件皮肤类型
    dataSetting: {type:Array},
    controlHeight: {type:String,default:""}
  },
  data(){
      return {

      }
  },
  created() {
  },
}
</script>
<style scoped>

</style>
