<template>
  <div>
    <el-dialog
        :title="title"
        :visible.sync="dialogVisible"
        width="800"
        :before-close="handleClose">
        <el-form :model="form" status-icon :rules="rules" ref="form" label-width="120px" class="demo-ruleForm">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="项目名称：">
                        <el-input v-model="form.name" placeholder="请输入项目名称"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="技术方向：">
                        <el-input v-model="form.type" placeholder="请输入技术方向"></el-input>
                     </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="产品阶段：">
                        <el-input v-model="form.name" placeholder="请输入产品阶段"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="产出：">
                        <el-input v-model="form.type" placeholder="请输入产出"></el-input>
                     </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="相关竞争对手：">
                        <el-input v-model="form.name" placeholder="请输入相关竞争对手"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="技术关键词：">
                        <el-input v-model="form.type" placeholder="请输入技术关键词"></el-input>
                     </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <span slot="footer" class="dialog-footer">
            <el-button @click="handleClose">取 消</el-button>
            <el-button type="primary" @click="submit">确 定</el-button>
        </span>
    </el-dialog>
   
  </div>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {
        dialogVisible:false,
        title:'',
        form:{},
        rules:{}

    };
  },
  watch: {},
  computed: {},
  created() {},
  mounted() {},
  methods: {
    //打开弹窗
    open(form){
        this.form = JSON.parse(JSON.stringify(form))
        if(this.form.id){
            this.title = '编辑专利挖掘项目'
        }else{
            this.title = '新增专利挖掘项目'
        }
        this.dialogVisible = true
    },
    //关闭弹窗
    handleClose(){
        this.form = {}
        this.dialogVisible = false
    },
    //提交数据
    submit(){
        this.dialogVisible = false
    }
  },
    
};
</script>
<style lang="scss" scoped>
</style>