Commit 70cb94c7 authored by wangxl's avatar wangxl

88

parent 1826ec4f
......@@ -518,8 +518,8 @@
</a-col>
</a-row>
<!-- 在研或完成基础研究项目情况 -->
<project-research-edit :dataList.sync="formData.researchList" />
<project-research-edit :projectResearchList.sync="formData.projectResearchList" />
<a-row type="flex">
<a-col :span="4" class="bg-gray">
......@@ -648,7 +648,7 @@ import { isEmptyParams } from "@/views/utils/common"
import moment from 'moment'
const Research = { projNo: null, projName: null, approveUnit: null, leader: null, startDate: null, endDate: null, funds: null }
const ProjResearch = { projNo: null, projName: null, approveUnit: null, leader: null, startDate: null, endDate: null, funds: null }
const ManagementRule = { policyName: null, releaseDate: null, documentNumber: null, validityPeriod: null, mainContent: null, fileId: null, downloadId: null, fileName: null, downloadUrl: null }
const ProjectSub = { projName: null, undertakingUnit: null, address: null, director: null, totalBudget: null, govBudget: null, selfBudget: null, cooperativeUnits: null, fileId: null, downloadId: null, fileName: null, downloadUrl: null }
const Cooperative = { id: null, unitName: null, unitCountry: null, unitAddress: null, organizationCode: null, projectWork: null }
......@@ -721,7 +721,7 @@ export default {
budget: [],
fundPlan: [],
equipments: [],
researchList: [],
projectResearchList: [],
projectSubList: [],
managementRuleList: [],
fileList: [],
......@@ -780,8 +780,10 @@ export default {
if (!!this.value) {
this.$api.project.getProjectInfoById({ id: this.value }).then(({ data = {} }) => {
if (data) {
console.log('q', data)
this.formData = data
this.loadList()
console.log('h', this.formData)
} else
this.$emit('close', 'error')
this.$emit('load', false)
......@@ -792,8 +794,10 @@ export default {
} else {
this.$api.project.getNewProject({ projType: getType() }).then(({ data = {} }) => {
if (data) {
console.log('q', data)
this.formData = data
this.loadList()
console.log('h', this.formData)
} else
this.$emit('close', 'error')
this.$emit('load', false)
......@@ -804,8 +808,9 @@ export default {
}
},
loadList () {
if (!!!this.formData.researchList || this.formData.researchList.length == 0)
this.formData.researchList = [{ ...Research }]
if (!!!this.formData.projectResearchList || this.formData.projectResearchList.length == 0)
this.formData.projectResearchList = [{ ...ProjResearch }]
if (!!!this.formData.managementRuleList || this.formData.managementRuleList.length == 0)
this.formData.managementRuleList = [{ ...ManagementRule }]
if (!!!this.formData.projectSubList || this.formData.projectSubList.length == 0)
......
......@@ -563,7 +563,7 @@
</a-col>
</a-row>
<!-- 在研或完成基础研究项目情况 -->
<project-research-info :dataList.sync="value.researchList" />
<project-research-info :dataList.sync="value.projectResearchList" />
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
......
......@@ -42,39 +42,39 @@
</div>
</a-col>
</a-row>
<a-row v-for="(item, index) in dataList" :key="'researchList'+index" type="flex" class="row_center">
<a-row v-for="(item, index) in projectResearchList" :key="'projectResearchList'+index" type="flex" class="row_center">
<a-col :span="3">
<a-form-model-item :prop="'researchList.' + index + '.projNo'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-form-model-item :prop="'projectResearchList.' + index + '.projNo'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.projNo" :maxLength="50" placeholder="项目编号" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="3">
<a-form-model-item :prop="'researchList.' + index + '.projName'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-form-model-item :prop="'projectResearchList.' + index + '.projName'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.projName" :projName="50" placeholder="项目名称" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="3">
<a-form-model-item :prop="'researchList.' + index + '.approveUnit'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-form-model-item :prop="'projectResearchList.' + index + '.approveUnit'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.approveUnit" :maxLength="50" placeholder="批准单位" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="3">
<a-form-model-item :prop="'researchList.' + index + '.leader'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-form-model-item :prop="'projectResearchList.' + index + '.leader'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.leader" :maxLength="100" placeholder="负责人" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="4">
<a-form-model-item :prop="'researchList.' + index + '.startDate'" :rules="{ required: true, message: '*', trigger: 'change',}">
<a-form-model-item :prop="'projectResearchList.' + index + '.startDate'" :rules="{ required: true, message: '*', trigger: 'change',}">
<a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="开始日期" v-model="item.startDate" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="4">
<a-form-model-item :prop="'researchList.' + index + '.endDate'" :rules="{ required: true, message: '*', trigger: 'change',}">
<a-form-model-item :prop="'projectResearchList.' + index + '.endDate'" :rules="{ required: true, message: '*', trigger: 'change',}">
<a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="结束日期" v-model="item.endDate" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="2">
<a-form-model-item :prop="'researchList.' + index + '.funds'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-form-model-item :prop="'projectResearchList.' + index + '.funds'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.funds" placeholder="项目经费" :min="0" :step="0.01" style="width:85%" />
</a-form-model-item>
</a-col>
......@@ -99,7 +99,7 @@
</template>
<script>
const Research = { projNo: null, projName: null, approveUnit: null, leader: null, startDate: null, endDate: null, funds: null }
const ProjResearch = { projNo: null, projName: null, approveUnit: null, leader: null, startDate: null, endDate: null, funds: null }
......@@ -109,10 +109,10 @@ export default {
},
props: {
dataList: {
projectResearchList: {
type: Array,
default: () => {
return [{ ...Research }]
return [{ ...ProjResearch }]
}
},
},
......@@ -129,7 +129,7 @@ export default {
},
methods: {
addArrey () {//添加成员
this.dataList.push({ ...Research })
this.dataList.push({ ...ProjResearch })
},
deleteArrey (item) {//移除成员
let index = this.dataList.indexOf(item)
......
......@@ -116,7 +116,7 @@ export default {
members: [],
budget: [],
equipments: [],
researchList: [],
projectResearchList: [],
projectSubList: [],
managementRuleList: [],
fileList: [],
......
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