Commit 72364ed3 authored by wangxl's avatar wangxl

5555

parent 489aaf03
......@@ -102,7 +102,7 @@ export const routes = [
meta: { title: '个人中心', icon: 'el-icon-user' },
hidden: false,
children: [
{ path: '/report/project', name: '项目申报', component: () => import('@/views/report/project/Index.vue'), meta: { title: '项目申报', icon: '', noCache: true } },
{ path: '/report/project', name: '项目申报', component: () => import('@/views/report/project/index1.vue'), meta: { title: '项目申报', icon: '', noCache: true } },
{ path: '/report/task', name: '任务书填报', component: () => import('@/views/report/task/Index.vue'), meta: { title: '任务书填报', icon: '', noCache: true } },
{ path: '/report/projectTask', name: '任务书填报', component: () => import('@/views/report/task/projectTask.vue'), meta: { title: '项目任务书', icon: '', noCache: true } },
{ path: '/report/check', name: '中期考核填报', component: () => import('@/views/report/check/Index.vue'), meta: { title: '中期考核填报', icon: '', noCache: true } },
......
<template>
<div>
<a-row>
<a-col :span="24">
<div class="tb-title">
<span>项目主要参与单位及分工</span>
</div>
</a-col>
</a-row>
<a-row type="flex" class="item_inner">
<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 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 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>操作</div>
</div>
</a-col>
</a-row>
<a-row v-for="(item, index) in cooperativeUnits" :key="'cooperativeUnits'+index" type="flex" class="item_inner">
<a-col :span="4">
<div class="special-middle">
<div>
<a-form-model-item :prop="'cooperativeUnits.' + index + '.unitName'" :rules="{ required: true,message: '*',trigger: 'blur',}">
<a-input v-model="item.unitName" :maxLength="20" placeholder="单位名称" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<div>
<a-form-model-item :prop="'cooperativeUnits.' + index + '.unitCountry'" :rules="{ required: true,message: '*',trigger: 'blur',}">
<a-input v-model="item.unitCountry" :maxLength="20" placeholder="单位名称" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<div>
<a-form-model-item :prop="'cooperativeUnits.' + index + '.unitAddress'" :rules="{ required: true,message: '*',trigger: 'blur',}">
<a-input v-model="item.unitAddress" :maxLength="100" placeholder="单位国别" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<div>
<a-form-model-item :prop="'cooperativeUnits.' + index + '.organizationCode'" :rules="{ required: true,message: '*',trigger: 'blur',}">
<a-input v-model="item.organizationCode" :maxLength="50" placeholder="组织机构代码/统社会信用代码" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<div>
<a-form-model-item :prop="'cooperativeUnits.' + index + '.projectWork'" :rules="{ required: true,message: '*',trigger: 'blur',}">
<a-input v-model="item.projectWork" :maxLength="50" placeholder="分 工" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<a-button icon="arrow-up" type="primary" shape="circle" size="small" :disabled="index == 0" @click="moveUp(index)"></a-button>
<a-button icon="arrow-down" type="primary" shape="circle" size="small" style="margin-left:3px" :disabled="cooperativeUnits.length == index + 1" @click="moveDown(index)"></a-button>
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removeArray(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: 50%" @click="addArray">
<a-icon type="plus" /> 添加
</a-button>
</div>
</a-col>
</a-row>
</div>
</template>
<script>
//用法 <cooperative-units :cooperativeUnits.sync="formData.cooperativeUnits" />
const Model = { id: null, unitName: null, unitCountry: null, unitAddress: null, organizationCode: null, projectWork: null }
export default {
name: 'cooperativeUnits',
data () {
return {
}
},
props: {
cooperativeUnits: {
type: Array,
default: () => {
return []
}
},
},
components: {
},
created () {
},
methods: {
moveToTop (item) {//成员置顶
let index = this.cooperativeUnits.indexOf(item)
if (index !== -1) {
this.cooperativeUnits.splice(index, 1)
this.cooperativeUnits.unshift({ ...item })
}
},
moveUp (index) {
let arr = this.cooperativeUnits
arr.splice(index - 1, 1, ...arr.splice(index, 1, arr[index - 1]))
},
moveDown (index) {
let arr = this.cooperativeUnits
arr.splice(index, 1, ...arr.splice(index + 1, 1, arr[index]))
},
addArray () {//添加成员
this.cooperativeUnits.push({ ...Model })
},
removeArray (item) {//移除成员
let index = this.cooperativeUnits.indexOf(item)
if (index !== -1) {
this.cooperativeUnits.splice(index, 1)
}
},
},
}
</script>
<template>
<div>
<a-row>
<a-col :span="24">
<div class="tb-title">
<span>附件上传</span>
</div>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="24" class="bg-gray">
<div class="special-middle" style="font-weight: bold;">
1.科研诚信承诺书(必须提供)<span class="required"></span><br />
2.承诺书(必须提供)<span class="required"></span><br />
3.医学研究伦理审查证明<br />
4.多家单位联合申报的必须提供牵头单位与所有参与单位签署的联合申报协议(协议中应包含项目名称、课题设置、专项经费分配、知识产权归属、项目经费筹集与使等内容,协议经单位盖章、项目及所有课题负责人签字有效)<br />
5.相关查新报告、前期科研成果、专利等佐证材料(选择提供)<br />
6.与项目相关的其它证明材料或文件等(选择提供)<br />
</div>
</a-col>
</a-row>
<a-row type="flex" class="item_inner">
<a-col :span="2">
<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="10" 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-row>
<a-row v-for="(item, index) in fileList" :key="'fileList' + index" type="flex">
<a-col :span="2" style="text-align: center;">
{{ index + 1 }}
</a-col>
<a-col :span="8">
<a-form-model-item :prop="'fileList.' + index + '.fileExplain'" :rules="{required: true, message: '*',trigger: 'blur',}">
<a-input v-model="item.fileExplain" :maxLength="100" style="width: 80%" :disabled="item.required" />
<!-- <span v-if="mustAttachment.includes(index)" class="required"></span> -->
</a-form-model-item>
</a-col>
<a-col :span="10">
<div class="special-middle">
<div v-if="item.downloadUrl" class="file-box">
<div>
<a-icon type="file" style="margin-right: 8px" />
<span class="hover-pointer" @click="downloadfile(item)">{{item.fileName}}</span>
</div>
<a-icon type="delete" class="hover-pointer d-icon" @click="deletefile(item, index)" />
</div>
<div v-else>
<a-form-model-item :prop="'fileList.' + index + '.downloadUrl'" :rules="{required: true, message: '请上传附件',trigger: 'blur',}">
<input type="file" :ref="'fileElem' + index" class="visually-hidden" @change="handleFiles(item, index)" />
<a-button @click="fileSelect(item, index)"><a-icon type="upload" />选择文件</a-button>
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<div v-if="!item.required">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removefileList(item)">
<a-button type="link" size="small">删除</a-button>
</a-popconfirm>
</div>
</div>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="24" style="text-align: center">
<div class="special-middle">
<div>
<a-button type="dashed" style="width: 50%" @click="addfileList()">
<a-icon type="plus" /> 添加
</a-button>
</div>
</div>
</a-col>
</a-row>
</div>
</template>
<script>
const File = { fileName: "", downloadUrl: "", fileExplain: "", downloadId: "" };
export default {
name: "fileEdit",
props: {
fileList: {
type: Array,
default: () => {
return [{ ...File }];
},
},
},
created() {},
data() {
return {
mustAttachment: [ 0, 1 ],
};
},
methods: {
downloadfile() {
},
deletefile (item, index) {
this.$api.base.deletefile({ id: item.downloadId }).then(({ data = {} }) => {
if (data) {
item.fileName = ''
item.downloadUrl = ''
item.downloadId = ''
}
}).catch(() => {
this.$message.error('删除失败')
})
},
uploadHandle (file, fileName) {
let formData = new FormData()
formData.append('file', file)
formData.append('fileName', fileName)
return formData
},
handleFiles(item, index) {
let fileElem = this.$refs['fileElem' + index][0]
let files = fileElem.files
if (files.length <= 0) {
this.$message.error('未选中文件,请尝试重新选择')
return
}
if (!this.fileCheck(files[0]))
return
this.$api.base.asyncUpload(this.uploadHandle(files[0], files[0].name)).then(({ data = {} }) => {
if (data) {
item.fileName = files[0].name
item.downloadUrl = '/' + files[0].name
item.downloadId = data.id
} else
this.$message.error('上传失败')
}).catch(() => {
this.$message.error('上传失败')
})
},
fileSelect (item, index) {
let fileElem = this.$refs['fileElem' + index][0]
if (fileElem) {
fileElem.click()
}
},
fileCheck (file) {
//判断是否小于1M
let isLtSize = file.size < 1024 * 1024 * 15;
if (!isLtSize) {
this.$message.error('文件大小不能超过15M!');
return false
}
return true
},
// 添加附件
addfileList () {
this.fileList.push(Object.assign({ ...File }, { fileExplain: '' }))
},
// 删除附件
removefileList (item) {
let index = this.fileList.indexOf(item)
if (index !== -1) {
this.fileList.splice(index, 1)
}
},
},
};
</script>
\ No newline at end of file
This diff is collapsed.
......@@ -446,7 +446,7 @@
</a-col>
<a-col :span="20">
<a-form-model-item prop="projAbstract">
<a-textarea placeholder="项目摘要" v-model="formData.projAbstract" :maxLength="400" style="width: 60%; height: 160px; margin-top: 12px" />
<a-textarea placeholder="项目摘要" v-model="formData.projAbstract" :maxLength="400" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
......@@ -462,8 +462,144 @@
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<a-row>
<a-col :span="24" style="border-top: 0px">
<div class="tb-title">
<span>项目人员情况</span>
</div>
</a-col>
</a-row>
<!-- 项目合作单位 -->
<cooperative-units :cooperativeUnits.sync="formData.cooperativeUnits" />
<!-- 项目组成员 -->
<proj-group-member :members.sync="formData.members" />
<a-row>
<a-col :span="24" style="border-top: 0px">
<div class="tb-title">
<span>项目可行性研究情况</span>
</div>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">1、项目的意义、必要性</div>
</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="researchContent">
<a-textarea placeholder="项目的意义、必要性" v-model="formData.researchContent" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">2、项目现有工作基础和支撑条件</div>
</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="memResume">
<a-textarea placeholder="项目现有工作基础和支撑条件" v-model="formData.memResume" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">3、与项目相关的国内外技术发展现状(包括知识产权情况)以及本项目主要研究开发内容技术关键(创新点)、可行性评价及项目风险分析与对策</div>
</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="researchProgress">
<a-textarea placeholder="与项目相关的国内外技术发展现状" v-model="formData.researchProgress" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24" style="border-top: 0px">
<div class="tb-title">
<span>项目主要实施内容和目标</span>
</div>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">项目实施目标</div>
</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="researchContent">
<a-textarea placeholder="与项目相关的国内外技术发展现状" v-model="formData.researchContent" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24" style="border-top: 0px">
<div class="tb-title">
<span>项目考核指标</span>
</div>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">主要技术指标</div>
</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="technologyTarget">
<a-textarea placeholder="主要技术指标" v-model="formData.technologyTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">主要经济指标</div>
</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="economyTarget">
<a-textarea placeholder="主要经济指标" v-model="formData.economyTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">项目实施中形成的示范基地、中试线、生产线及其规模等</div>
</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="achievementTarget">
<a-textarea placeholder="项目实施中形成的示范基地、中试线、生产线及其规模等" v-model="formData.achievementTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">其他应考核的指标</div>
</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="otherTarget">
<a-textarea placeholder="其他应考核的指标" v-model="formData.otherTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<!-- 经费预算 -->
<budget-edit :budget.sync="formData.budget" />
<!-- 附件 -->
<file-edit :fileList.sync="formData.fileList" />
</a-form-model>
</div>
</template>
......@@ -473,9 +609,13 @@ import paraMultiSelect from '@/views/components/common/paraMultiSelect'
import paraSelect from '@/views/components/common/paraSelect'
import baseSelect from '@/views/components/common/baseSelect'
import ProjGroupMember from '@/views/report/project/components/projGroupMember'
import cooperativeUnits from '@/views/report/project/components/cooperativeUnits'
import budgetEdit from '@/views/report/project/components/budgetEdit'
import fileEdit from '@/views/report/project/components/fileEdit'
import { isEmptyParams } from "@/views/utils/common"
import moment from 'moment'
const Cooperative = { id: null, unitName: null, unitCountry: null, unitAddress: null, organizationCode: null, projectWork: null }
const Members = { showIndex: 1, name: null, certId: null, sex: null, birthday: null, age: null, degree: null, title: null, duty: null, spec: null, workUnit: null, projWork: null }
const Equipments = { name: null, specificationType: null, quantity: null, totalBudget: null, useFrom: null }
const File = { fileName: '', downloadUrl: '', fileExplain: '', downloadId: '' }
......@@ -483,7 +623,7 @@ const File = { fileName: '', downloadUrl: '', fileExplain: '', downloadId: '' }
export default {
name: 'projectEdit',
components: {
paraMultiSelect, paraSelect, baseSelect, ProjGroupMember
paraMultiSelect, paraSelect, baseSelect, ProjGroupMember, cooperativeUnits,budgetEdit,fileEdit
},
props: {
value: {
......@@ -556,7 +696,9 @@ export default {
// 邮箱
email: '',
// 成员
members: [{ ...Members }],
cooperativeUnits: [],
// 成员
members: [],
// 投资总额
totalFunding: null,
// 卫生健康委资助
......@@ -692,18 +834,14 @@ export default {
}
},
loadList () {
if (!this.formData.members || this.formData.members.length == 0)
if (!!!this.formData.cooperativeUnits || this.formData.cooperativeUnits.length == 0)
this.formData.cooperativeUnits = [{ ...Cooperative }]
if (!!!this.formData.members || this.formData.members.length == 0)
this.formData.members = [{ ...Members }]
if (!this.formData.equipments || this.formData.equipments.length == 0)
if (!!!this.formData.equipments || this.formData.equipments.length == 0)
this.formData.equipments = [{ ...Equipments }]
if (!this.formData.fileList || !this.formData.fileList.length || this.formData.fileList.length == 0) {
if (!!!!this.formData.fileList || !this.formData.fileList.length || this.formData.fileList.length == 0) {
this.formData.fileList = []
//this.formData.fileList.push(Object.assign({ ...File }, { fileExplain: '学术委员会审查意见' }))
// this.formData.fileList.push(Object.assign({ ...File }, { fileExplain: '项目申报简要信息首页(签字页)', isDelete: false, must: true }))
// this.formData.fileList.push(Object.assign({ ...File }, { fileExplain: '伦理审批件', isDelete: false, must: true }))
// this.formData.fileList.push(Object.assign({ ...File }, { fileExplain: '科研诚信承诺书', isDelete: false, must: true }))
// this.formData.fileList.push(Object.assign({ ...File }, { fileExplain: '查新报告', isDelete: false, must: true }))
// this.formData.fileList.push(Object.assign({ ...File }, { fileExplain: '技术路线', isDelete: false, must: false }))
}
},
addEquipments () {
......
This diff is collapsed.
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