<template>
  <div class="data-search">
    <el-form :inline="true" :model="queryForm" class="demo-form-inline">


        <el-form-item label="名称:">
          <el-input v-model="queryForm.name" placeholder="请选择名称"></el-input>
        </el-form-item>

        <el-form-item label="状态:">
          <el-select v-model="queryForm.status" class="m-2" placeholder="请选择状态" size="large">
              <el-option
                v-for="item in statusOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click="onSubmit">  <svg-icon icon-class="search"/> 搜索</el-button>
          <el-button type="success" @click="onCreate" >  <svg-icon icon-class="edit"/> 创建流程</el-button>
        </el-form-item>
      </el-form>



    <el-dialog  :visible.sync="dialogVisible" append-to-body v-el-drag-dialog  width="80%" custom-class="prod-verify" title="创建流程">
         <dataInfo ></dataInfo>
     </el-dialog>

  </div>
</template>

<script>
import dataInfo from './dataInfo.vue';
import elDragDialog from '@/directive/el-drag-dialog'
export default{
  components:{
    dataInfo,
  },
  directives: { elDragDialog },
  props:{
    queryForm:{
        type:Object,
        default:()=>{
          return {
             page:1,
             pageSize:10,
             name:'',
             sign:'',
          }
        }
    },
  },
  data(){
    return{
        statusOptions:[],
        dialogVisible:false,
    }
  },
  created() {

  },
  methods:{

    onCreate(e){
      this.dialogVisible=true;
    },
    //搜索
    onSubmit(){
      this.$emit("bindSetQuery",this.$props.queryForm);
    }
  }
}
</script>

<style lang="scss">
@import "./dataSearch.scss"
</style>
