Commit 07d1e70e authored by 徐俊's avatar 徐俊

xujun

parent 7005264d
<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="1" class="bg-gray">
<div class="special-middle">
<div class="required">序号</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<div class="special-middle">
<div class="required">姓名</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<div class="special-middle">
<div class="required">性别</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<div class="special-middle">
<div class="required">出生日期</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">专业</div>
</div>
</a-col>
<a-col :span="5" class="bg-gray">
<div class="special-middle">
<div class="required">技术职称</div>
</div>
</a-col>
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">单位</div>
</div>
</a-col>
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div>工作分工(限10字)</div>
</div>
</a-col>
<a-col :span="1" class="bg-gray">
<div class="special-middle">
<div>操作</div>
</div>
</a-col>
</a-row>
<a-row v-for="(item, index) in membersList" :key="'membersList'+index" type="flex" class="row_center">
<a-col :span="1">
<div style="margin-top:10px;">{{ item.showIndex }}</div>
</a-col>
<a-col :span="2">
<a-form-model-item :prop="'membersList.' + index + '.name'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.name" :maxLength="50" placeholder="姓名" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="2">
<a-form-model-item :prop="'membersList.' + index + '.sex'" :rules="{ required: true, message: '*', trigger: 'change',}">
<base-select v-model="item.sex" :type="16" :isAll="true" :width="100" />
</a-form-model-item>
</a-col>
<a-col :span="2">
<a-form-model-item :prop="'membersList.' + index + '.birthday'" :rules="{ required: true, message: '*', trigger: 'change',}">
<a-date-picker placeholder="请选择日期" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="item.birthday" style="width: 120px" />
</a-form-model-item>
</a-col>
<a-col :span="3">
<a-form-model-item :prop="'membersList.' + index + '.spec'" :rules="{ required: true, message: '*', trigger: 'change',}">
<cascader-select v-model="item.spec" />
</a-form-model-item>
</a-col>
<a-col :span="5">
<a-form-model-item :prop="'membersList.' + index + '.title'" :rules="{ required: true, message: '*', trigger: 'change',}">
<para-multi-select v-model="item.title" :typeId="7" :width="120" />
</a-form-model-item>
</a-col>
<a-col :span="4">
<a-form-model-item :prop="'membersList.' + index + '.workUnit'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.workUnit" :maxLength="50" placeholder="单位" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="4">
<a-form-model-item :prop="'membersList.' + index + '.projWork'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.projWork" :maxLength="100" placeholder="项目分工" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="1">
<div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteMemberArray(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="addMemberArray()">
<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 class="special-middle" style="color:red;">注:“申报人所在团队主要人员”应为申报人所在的学科人员</div>
</a-col>
</a-row>
</div>
</template>
<script>
import cascaderSelect from '@/views/components/common/cascaderSelect'
const Member = { id: null, talentId: null, name: null, sex: null, birthday: null, spec: null, title: null, workUnit: null, projWork: null, remark: null, showIndex: null, }
export default {
name: "membersEdit",
components: {
cascaderSelect
},
props: {
membersList: {
type: Array,
default: () => {
return [{ ...Member }];
},
}
},
data() {
return {};
},
created() {
},
methods: {
addMemberArray() {
const newItem = {
...Member,
showIndex: this.membersList.length + 1
}
this.membersList.push(newItem)
},
deleteMemberArray(item) {
let index = this.membersList.indexOf(item)
if (index !== -1) {
this.membersList.splice(index, 1)
}
}
},
};
</script>
<template>
<div></div>
</template>
<script>
export default {
name: "membersInfo",
props: {
type: Array,
default: () => {
return [];
},
},
data() {
return {};
},
methods: {},
};
</script>
<template>
<div>
<a-form-model ref="form" :model="formModel">
<a-row>
<a-col :span="24" style="border-top: 0px; text-align: center">
<div class="main-title">
......@@ -49,7 +50,7 @@
<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-form-model-item :prop="`gainList.${index}.gainDate`" :rules="{ required: true, message: '*', trigger: 'change',}">
<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>
......@@ -149,7 +150,7 @@
</a-col>
<a-col :span="2">
<div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteGainArray(item)">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteThesisArray(item)">
<a-button type="link" size="small">删除</a-button>
</a-popconfirm>
</div>
......@@ -158,7 +159,7 @@
<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-button type="dashed" style="width: 20%" @click="addThesisArray()">
<a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
</a-button>
</div>
......@@ -228,7 +229,7 @@
</a-col>
<a-col :span="2">
<div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteGainArray(item)">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteAppearArray(item)">
<a-button type="link" size="small">删除</a-button>
</a-popconfirm>
</div>
......@@ -237,7 +238,7 @@
<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-button type="dashed" style="width: 20%" @click="addAppearArray()">
<a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
</a-button>
</div>
......@@ -307,7 +308,7 @@
</a-col>
<a-col :span="2">
<div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteGainArray(item)">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteCourseArray(item)">
<a-button type="link" size="small">删除</a-button>
</a-popconfirm>
</div>
......@@ -316,22 +317,23 @@
<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-button type="dashed" style="width: 20%" @click="addCourseArray()">
<a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
</a-button>
</div>
</a-col>
</a-row>
</a-form-model>
</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, }
const Gain = { id: null, talentId: null, gainType: 'dff44c90-ff10-11ef-b6cb-0c42a1380f01', gainDate: null, gainName: null, gainDescription: null, gainRemark: null, showIndex: null, }
const Thesis = { id: null, talentId: null, gainType: 'dff44c90-ff10-11ef-b6cb-0c42a1380f02', gainDate: null, gainName: null, gainDescription: null, gainRemark: null, showIndex: null, }
const Appear = { id: null, talentId: null, gainType: 'dff44c90-ff10-11ef-b6cb-0c42a1380f03', gainDate: null, gainName: null, gainDescription: null, gainRemark: null, showIndex: null, }
const Course = { id: null, talentId: null, gainType: 'dff44c90-ff10-11ef-b6cb-0c42a1380f04', gainDate: null, gainName: null, gainDescription: null, gainRemark: null, showIndex: null, }
export default {
name: "scientificGainEdit",
......@@ -349,34 +351,171 @@ export default {
thesisList: [],
appearList: [],
courseList: [],
formModel: {
gainList: [],
thesisList: [],
appearList: [],
courseList: [],
}
};
},
created() {},
created() {
if (this.scientificList && this.scientificList.length > 0) {
this.gainList = this.scientificList
.filter(item => item.gainType === 'dff44c90-ff10-11ef-b6cb-0c42a1380f01')
.sort((a, b) => a.showIndex - b.showIndex)
this.thesisList = this.scientificList
.filter(item => item.gainType === 'dff44c90-ff10-11ef-b6cb-0c42a1380f02')
.sort((a, b) => a.showIndex - b.showIndex)
this.appearList = this.scientificList
.filter(item => item.gainType === 'dff44c90-ff10-11ef-b6cb-0c42a1380f03')
.sort((a, b) => a.showIndex - b.showIndex)
this.courseList = this.scientificList
.filter(item => item.gainType === 'dff44c90-ff10-11ef-b6cb-0c42a1380f04')
.sort((a, b) => a.showIndex - b.showIndex)
this.formModel.gainList = this.gainList
this.formModel.thesisList = this.thesisList
this.formModel.appearList = this.appearList
this.formModel.courseList = this.courseList
} else {
this.gainList = []
this.thesisList = []
this.appearList = []
this.courseList = []
this.formModel.gainList = []
this.formModel.thesisList = []
this.formModel.appearList = []
this.formModel.courseList = []
}
},
methods: {
addGainArray() {
const newItem = {
...Gain,
showIndex: this.gainList.length + 1
}
this.gainList.push(newItem);
this.$nextTick(() => {
this.$refs.form && this.$refs.form.clearValidate()
})
},
deleteGainArray(item) {
let index = this.gainList.indexOf(item)
if (index !== -1) {
this.gainList.splice(index, 1)
}
},
addThesisArray() {
const newItem = {
...Thesis,
showIndex: this.thesisList.length + 1
}
this.thesisList.push(newItem)
this.$nextTick(() => {
this.$refs.form && this.$refs.form.clearValidate()
})
},
deleteThesisArray(item) {
let index = this.thesisList.indexOf(item)
if (index !== -1) {
this.thesisList.splice(index, 1)
}
},
addAppearArray() {
const newItem = {
...Appear,
showIndex: this.appearList.length + 1
}
this.appearList.push(newItem)
this.$nextTick(() => {
this.$refs.form && this.$refs.form.clearValidate()
})
},
deleteAppearArray(item) {
let index = this.appearList.indexOf(item)
if (index !== -1) {
this.appearList.splice(index, 1)
}
},
addCourseArray() {
const newItem = {
...Course,
showIndex: this.courseList.length + 1
}
this.courseList.push(newItem)
this.$nextTick(() => {
this.$refs.form && this.$refs.form.clearValidate()
})
},
deleteCourseArray(item) {
let index = this.courseList.indexOf(item)
if (index !== -1) {
this.courseList.splice(index, 1)
}
},
mergeScientificList() {
this.scientificList.length = 0
const allLists = [
...this.gainList.map((item, index) => {
const newItem = { ...item }
newItem.showIndex = index + 1
return newItem
}),
...this.thesisList.map((item, index) => {
const newItem = { ...item }
newItem.showIndex = index + 1
return newItem
}),
...this.appearList.map((item, index) => {
const newItem = { ...item }
newItem.showIndex = index + 1
return newItem
}),
...this.courseList.map((item, index) => {
const newItem = { ...item }
newItem.showIndex = index + 1
return newItem
})
]
this.scientificList.push(...allLists)
return this.scientificList
}
},
watch: {
gainList: {
handler(val) {
this.formModel.gainList = val
},
deep: true,
immediate: true
},
thesisList: {
handler(val) {
this.formModel.thesisList = val
},
deep: true,
immediate: true
},
appearList: {
handler(val) {
this.formModel.appearList = val
},
deep: true,
immediate: true
},
courseList: {
handler(val) {
this.formModel.courseList = val
},
deep: true,
immediate: true
},
}
};
</script>
......@@ -44,7 +44,7 @@ export default {
{ status: "process", title: '申报人才基本情况', showStatus: true },
{ status: "wait", title: '申报人才简历', showStatus: false },
{ status: "wait", title: '申报人才科研成绩', showStatus: false },
{ status: "wait", title: '科学研究规划及团队人员名单', showStatus: false },
{ status: "wait", title: '团队人员名单', showStatus: false },
{ status: "wait", title: '经费预算及培养计划和目标', showStatus: false },
{ status: "wait", title: '附件', showStatus: false }
],
......
......@@ -348,6 +348,13 @@
</div>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="24" class="bg-gray">
<div style="margin-top: 10px;">
<span>本人业务技术能力、外语水平及已经开展的主要业务工作(应阐明自身的技术优势、薄弱环节及改进措施)</span>
</div>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="24" class="bg-gray">
<a-form-model-item prop="technicalSkill" :rules="{ required: true, message: '*', trigger: 'blur',}">
......@@ -357,9 +364,59 @@
</a-row>
</div>
<div v-if="stepsArray[2].showStatus">
<scientific-gain-edit :scientificList.sync="formData.scientificList" ref="talentScientific" />
<scientific-gain-edit ref="talentScientific" :scientificList.sync="formData.scientificList" />
<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 style="margin-top: 10px;">
<span>结合本人业务基础和专长,所在学科的建设目标,获资助后拟研究的关键问题、主要研究内容、创新技术研发与应用及预期成果,要有量化指标:</span>
</div>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="24" class="bg-gray">
<a-form-model-item prop="qualityTarget" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-textarea placeholder="量化指标(限1000字)" v-model="formData.qualityTarget" :maxLength="1000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="24" class="bg-gray">
<div style="margin-top: 10px;">
<span>目前的研究条件(详述已具备的研究条件,包括主要的仪器设备、实验动物等)</span>
</div>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="24" class="bg-gray">
<a-form-model-item prop="researchCondition" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-textarea placeholder="研究条件(限1000字)" v-model="formData.researchCondition" :maxLength="1000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="24" class="bg-gray">
<div style="margin-top: 10px;">
<span>研究进度:按年度列出研究进度及相关指标</span>
</div>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="24" class="bg-gray">
<a-form-model-item prop="researchProgress" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-textarea placeholder="研究进度(限1000字)" v-model="formData.researchProgress" :maxLength="1000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
</div>
<div v-if="stepsArray[3].showStatus">
<members-edit :membersList.sync="formData.membersList" />
</div>
<div v-if="stepsArray[4].showStatus">
</div>
......@@ -377,11 +434,12 @@ import paraCheck from '@/views/components/common/paraCheck'
import cascaderSelect from '@/views/components/common/cascaderSelect'
import resumeEdit from '@/views/report/talent/components/resumeEdit'
import scientificGainEdit from '@/views/report/talent/components/scientificGainEdit'
import membersEdit from '@/views/report/talent/components/membersEdit'
export default {
name: "talentEdit",
components: {
paraRadio, paraCheck, cascaderSelect, resumeEdit, scientificGainEdit
paraRadio, paraCheck, cascaderSelect, resumeEdit, scientificGainEdit, membersEdit
},
props: {
value: {
......@@ -431,6 +489,9 @@ export default {
mobile: null,
fax: null,
technicalSkill: null,
qualityTarget: null,
researchCondition: null,
researchProgress: null,
email: null,
resumeList: [],
membersList: [],
......@@ -576,6 +637,7 @@ export default {
}
},
submit (step, next) {
console.log(step)
if (this.checkInfo(step)) {
this.$refs.form.validate(valid => {
if (valid) {
......@@ -627,8 +689,10 @@ export default {
obj = { id: null, technicalSkill: null, resumeList: [] }
break;
case 2:
obj = { id: null, qualityTarget: null, researchCondition: null, researchProgress: null, scientificList: [] }
break;
case 3:
obj = { id: null, membersList: [] }
break;
case 4:
break;
......@@ -680,6 +744,23 @@ export default {
return true
},
checkScientiticList() {
this.$refs.talentScientific.mergeScientificList()
if (!!!this.formData.scientificList || this.formData.scientificList.length == 0) {
this.$message.error('请至少添加一条申报人才科研成绩!')
return false
}
return true
},
checkMemberList() {
if (!!!this.formData.membersList || this.formData.membersList.length == 0) {
this.$message.error('请至少添加一条申报人才团队人员信息!')
return false
}
return true
},
checkInfo(step) {
switch (step) {
case 0:
......@@ -696,8 +777,10 @@ export default {
return this.checkResumeList()
break;
case 2:
return this.checkScientiticList()
break;
case 3:
return this.checkMemberList()
break;
case 4:
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment