<template>
  <div>
    <a-row>
      <a-col :span="24" style="border-top: 0px; text-align: center">
        <div class="main-title">
          <span>申报人才科研成绩</span>
        </div>
      </a-col>
    </a-row>
    <a-row type="flex" class="row_center">
      <a-col :span="24" class="bg-gray">
        <div>
          <span>1、主要科研成果获奖情况（按获奖时间顺序填写，含专利、新药证书等不超过15项。）</span>
        </div>
      </a-col>
    </a-row>
    <a-row type="flex" class="row_center">
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>序号</div>
        </div>
      </a-col>
      <a-col :span="4" class="bg-gray">
        <div class="special-middle">
          <div>时间</div>
        </div>
      </a-col>
      <a-col :span="8" class="bg-gray">
        <div class="special-middle">
          <div>成果名称</div>
        </div>
      </a-col>
      <a-col :span="6" class="bg-gray">
        <div class="special-middle">
          <div>授奖部门及等级</div>
        </div>
      </a-col>
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>本人排名</div>
        </div>
      </a-col>
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>操作</div>
        </div>
      </a-col>
    </a-row>
    <a-row v-for="(item, index) in gainList" :key="'gainList'+index" type="flex" class="row_center">
      <a-col :span="2">{{ item.showIndex }}</a-col>
      <a-col :span="4">
        <a-form-model-item :prop="`gainList.${index}.gainDate`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-date-picker placeholder="请选择日期" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="item.gainDate" style="width: 140px" />
        </a-form-model-item>
      </a-col>
      <a-col :span="8">
        <a-form-model-item :prop="`gainList.${index}.gainName`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainName" :maxLength="50" placeholder="成果名称" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="6">
        <a-form-model-item :prop="`gainList.${index}.gainDescription`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainDescription" :maxLength="100" placeholder="授奖部门及等级" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="2">
        <a-form-model-item :prop="`gainList.${index}.gainRemark`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainRemark" :maxLength="50" placeholder="本人排名" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="2">
        <div class="special-middle">
          <a-popconfirm title="确定要删除吗？" ok-text="确定" cancel-text="取消" @confirm="deleteGainArray(item)">
            <a-button type="link" size="small">删除</a-button>
          </a-popconfirm>
        </div>
      </a-col>
    </a-row>
    <a-row type="flex">
      <a-col :span="24" style="text-align: center">
        <div class="special-middle">
          <a-button type="dashed" style="width: 20%" @click="addGainArray()">
            <a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
          </a-button>
        </div>
      </a-col>
    </a-row>

    <a-row type="flex" class="row_center">
      <a-col :span="24" class="bg-gray">
        <div>
          <span>2、发表的主要科研论文（按时间顺序填写，不超过15篇，SCI论文等外文论文需提供影响因子证明（科技部门批准机构开具的证明））</span>
        </div>
      </a-col>
    </a-row>
    <a-row type="flex" class="row_center">
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>序号</div>
        </div>
      </a-col>
      <a-col :span="4" class="bg-gray">
        <div class="special-middle">
          <div>时间</div>
        </div>
      </a-col>
      <a-col :span="8" class="bg-gray">
        <div class="special-middle">
          <div>论文名称</div>
        </div>
      </a-col>
      <a-col :span="6" class="bg-gray">
        <div class="special-middle">
          <div>发表刊物</div>
        </div>
      </a-col>
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>本人排名</div>
        </div>
      </a-col>
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>操作</div>
        </div>
      </a-col>
    </a-row>
    <a-row v-for="(item, index) in thesisList" :key="'thesisList'+index" type="flex" class="row_center">
      <a-col :span="2">{{ item.showIndex }}</a-col>
      <a-col :span="4">
        <a-form-model-item :prop="`thesisList.${index}.gainDate`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-date-picker placeholder="请选择日期" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="item.gainDate" style="width: 140px" />
        </a-form-model-item>
      </a-col>
      <a-col :span="8">
        <a-form-model-item :prop="`thesisList.${index}.gainName`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainName" :maxLength="50" placeholder="成果名称" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="6">
        <a-form-model-item :prop="`thesisList.${index}.gainDescription`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainDescription" :maxLength="100" placeholder="授奖部门及等级" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="2">
        <a-form-model-item :prop="`thesisList.${index}.gainRemark`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainRemark" :maxLength="50" placeholder="本人排名" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="2">
        <div class="special-middle">
          <a-popconfirm title="确定要删除吗？" ok-text="确定" cancel-text="取消" @confirm="deleteGainArray(item)">
            <a-button type="link" size="small">删除</a-button>
          </a-popconfirm>
        </div>
      </a-col>
    </a-row>
    <a-row type="flex">
      <a-col :span="24" style="text-align: center">
        <div class="special-middle">
          <a-button type="dashed" style="width: 20%" @click="addGainArray()">
            <a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
          </a-button>
        </div>
      </a-col>
    </a-row>

    <a-row type="flex" class="row_center">
      <a-col :span="24" class="bg-gray">
        <div>
          <span>3、出版的专著和教材（按出版时间顺序填写，不超过15本。）</span>
        </div>
      </a-col>
    </a-row>
    <a-row type="flex" class="row_center">
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>序号</div>
        </div>
      </a-col>
      <a-col :span="4" class="bg-gray">
        <div class="special-middle">
          <div>时间</div>
        </div>
      </a-col>
      <a-col :span="8" class="bg-gray">
        <div class="special-middle">
          <div>专著及教材</div>
        </div>
      </a-col>
      <a-col :span="6" class="bg-gray">
        <div class="special-middle">
          <div>出版社</div>
        </div>
      </a-col>
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>本人排名</div>
        </div>
      </a-col>
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>操作</div>
        </div>
      </a-col>
    </a-row>
    <a-row v-for="(item, index) in appearList" :key="'appearList'+index" type="flex" class="row_center">
      <a-col :span="2">{{ item.showIndex }}</a-col>
      <a-col :span="4">
        <a-form-model-item :prop="`appearList.${index}.gainDate`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-date-picker placeholder="请选择日期" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="item.gainDate" style="width: 140px" />
        </a-form-model-item>
      </a-col>
      <a-col :span="8">
        <a-form-model-item :prop="`appearList.${index}.gainName`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainName" :maxLength="50" placeholder="成果名称" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="6">
        <a-form-model-item :prop="`appearList.${index}.gainDescription`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainDescription" :maxLength="100" placeholder="授奖部门及等级" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="2">
        <a-form-model-item :prop="`appearList.${index}.gainRemark`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainRemark" :maxLength="50" placeholder="本人排名" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="2">
        <div class="special-middle">
          <a-popconfirm title="确定要删除吗？" ok-text="确定" cancel-text="取消" @confirm="deleteGainArray(item)">
            <a-button type="link" size="small">删除</a-button>
          </a-popconfirm>
        </div>
      </a-col>
    </a-row>
    <a-row type="flex">
      <a-col :span="24" style="text-align: center">
        <div class="special-middle">
          <a-button type="dashed" style="width: 20%" @click="addGainArray()">
            <a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
          </a-button>
        </div>
      </a-col>
    </a-row>

    <a-row type="flex" class="row_center">
      <a-col :span="24" class="bg-gray">
        <div>
          <span>4、承担的课题（按立项时间顺序填写，不超过15项。）</span>
        </div>
      </a-col>
    </a-row>
    <a-row type="flex" class="row_center">
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>序号</div>
        </div>
      </a-col>
      <a-col :span="4" class="bg-gray">
        <div class="special-middle">
          <div>时间</div>
        </div>
      </a-col>
      <a-col :span="8" class="bg-gray">
        <div class="special-middle">
          <div>课题名称</div>
        </div>
      </a-col>
      <a-col :span="6" class="bg-gray">
        <div class="special-middle">
          <div>项目来源</div>
        </div>
      </a-col>
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>本人排名</div>
        </div>
      </a-col>
      <a-col :span="2" class="bg-gray">
        <div class="special-middle">
          <div>操作</div>
        </div>
      </a-col>
    </a-row>
    <a-row v-for="(item, index) in courseList" :key="'courseList'+index" type="flex" class="row_center">
      <a-col :span="2">{{ item.showIndex }}</a-col>
      <a-col :span="4">
        <a-form-model-item :prop="`courseList.${index}.gainDate`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-date-picker placeholder="请选择日期" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="item.gainDate" style="width: 140px" />
        </a-form-model-item>
      </a-col>
      <a-col :span="8">
        <a-form-model-item :prop="`courseList.${index}.gainName`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainName" :maxLength="50" placeholder="成果名称" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="6">
        <a-form-model-item :prop="`courseList.${index}.gainDescription`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainDescription" :maxLength="100" placeholder="授奖部门及等级" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="2">
        <a-form-model-item :prop="`courseList.${index}.gainRemark`" :rules="{ required: true, message: '*', trigger: 'blur',}">
          <a-input v-model="item.gainRemark" :maxLength="50" placeholder="本人排名" style="width:85%" />
        </a-form-model-item>
      </a-col>
      <a-col :span="2">
        <div class="special-middle">
          <a-popconfirm title="确定要删除吗？" ok-text="确定" cancel-text="取消" @confirm="deleteGainArray(item)">
            <a-button type="link" size="small">删除</a-button>
          </a-popconfirm>
        </div>
      </a-col>
    </a-row>
    <a-row type="flex">
      <a-col :span="24" style="text-align: center">
        <div class="special-middle">
          <a-button type="dashed" style="width: 20%" @click="addGainArray()">
            <a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
          </a-button>
        </div>
      </a-col>
    </a-row>
  </div>
</template>

<script>
import moment from "moment";

const gainList = { id: null, talentId: null, gainType: 'dff44c90-ff10-11ef-b6cb-0c42a1380f01', gainDate: null, gainName: null, gainDescription: null, gainRemark: null, showIndex: null, }
const thesisList = { id: null, talentId: null, gainType: 'dff44c90-ff10-11ef-b6cb-0c42a1380f02', gainDate: null, gainName: null, gainDescription: null, gainRemark: null, showIndex: null, }
const appearList = { id: null, talentId: null, gainType: 'dff44c90-ff10-11ef-b6cb-0c42a1380f03', gainDate: null, gainName: null, gainDescription: null, gainRemark: null, showIndex: null, }
const courseList = { id: null, talentId: null, gainType: 'dff44c90-ff10-11ef-b6cb-0c42a1380f04', gainDate: null, gainName: null, gainDescription: null, gainRemark: null, showIndex: null, }

export default {
  name: "scientificGainEdit",
  props: {
    scientificList: {
      type: Array,
      default: () => {
        return [];
      },
    },
  },
  data() {
    return {
      gainList: [],
      thesisList: [],
      appearList: [],
      courseList: [],
    };
  },
  created() {},
  methods: {
    addGainArray() {
      
    },
    deleteGainArray(item) {
      
    },
    addThesisArray() {
      
    },
    deleteThesisArray(item) {
      
    },
    addAppearArray() {
      
    },
    deleteAppearArray(item) {
      
    },
    addCourseArray() {
      
    },
    deleteCourseArray(item) {
      
    },
  },
};
</script>
