|
|
@@ -14,32 +14,41 @@
|
|
|
<el-input v-if="isModifyMode" v-model="project.name"></el-input>
|
|
|
<span v-if="!isModifyMode">{{project.name}}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="联系方式" prop="contact">
|
|
|
- <div>
|
|
|
- <el-row :gutter="2">
|
|
|
- <el-col :span="2">
|
|
|
- <span>联系人</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-input v-if="isModifyMode" v-model="project.contactName" placeholder="请输入联系人姓名"></el-input>
|
|
|
- <div v-if="!isModifyMode">{{project.contactName}}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="2">
|
|
|
- <el-col :span="2">
|
|
|
- <span>联系人电话</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-input
|
|
|
- v-if="isModifyMode"
|
|
|
- v-model="project.contactPhone"
|
|
|
- placeholder="请输入联系人电话"
|
|
|
- ></el-input>
|
|
|
- <div v-if="!isModifyMode">{{project.contactPhone}}</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <el-form-item label="联系人" prop="name">
|
|
|
+ <el-input v-if="isModifyMode" v-model="project.contactName" placeholder="请输入联系人姓名"></el-input>
|
|
|
+ <span v-if="!isModifyMode">{{project.contactName}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="联系人电话" prop="name">
|
|
|
+ <el-input v-if="isModifyMode" v-model="project.contactPhone" placeholder="请输入联系人电话"></el-input>
|
|
|
+ <span v-if="!isModifyMode">{{project.contactPhone}}</span>
|
|
|
</el-form-item>
|
|
|
+ <!--<el-form-item label="联系方式" prop="contact">-->
|
|
|
+ <!--<div>-->
|
|
|
+ <!--<el-row :gutter="2">-->
|
|
|
+ <!--<el-col :span="2">-->
|
|
|
+ <!--<span>联系人</span>-->
|
|
|
+ <!--</el-col>-->
|
|
|
+ <!--<el-col :span="10">-->
|
|
|
+ <!--<el-input v-if="isModifyMode" v-model="project.contactName" placeholder="请输入联系人姓名"></el-input>-->
|
|
|
+ <!--<div v-if="!isModifyMode">{{project.contactName}}</div>-->
|
|
|
+ <!--</el-col>-->
|
|
|
+ <!--</el-row>-->
|
|
|
+ <!--<el-row :gutter="2">-->
|
|
|
+ <!--<el-col :span="2">-->
|
|
|
+ <!--<span>联系人电话</span>-->
|
|
|
+ <!--</el-col>-->
|
|
|
+ <!--<el-col :span="10">-->
|
|
|
+ <!--<el-input-->
|
|
|
+ <!--v-if="isModifyMode"-->
|
|
|
+ <!--v-model="project.contactPhone"-->
|
|
|
+ <!--placeholder="请输入联系人电话"-->
|
|
|
+ <!--></el-input>-->
|
|
|
+ <!--<div v-if="!isModifyMode">{{project.contactPhone}}</div>-->
|
|
|
+ <!--</el-col>-->
|
|
|
+ <!--</el-row>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--</el-form-item>-->
|
|
|
<el-form-item label="平台" prop="platform">
|
|
|
<el-checkbox-group v-if="isModifyMode" v-model="project.platform">
|
|
|
<span v-for="(item,index) in platforms" :key="index">
|
|
|
@@ -66,7 +75,7 @@
|
|
|
<el-form-item label="服务类型" prop="type">
|
|
|
<el-checkbox-group v-if="isModifyMode" v-model="project.type">
|
|
|
<span v-for="(item,index) in serviceType" :key="index">
|
|
|
- <el-checkbox :label="item" name="type">{{item}}</el-checkbox>
|
|
|
+ <el-checkbox :label="item" name="type">{{ item }} </el-checkbox>
|
|
|
</span>
|
|
|
</el-checkbox-group>
|
|
|
<span v-if="!isModifyMode" class="badge" v-for="item in project.type">{{item}}</span>
|
|
|
@@ -86,7 +95,7 @@
|
|
|
<el-form-item label="项目可见性" prop="resource">
|
|
|
<div v-if="!isModifyMode">
|
|
|
<div v-if="project.resource=='1'">{{updateLocation(project.location)}}</div>
|
|
|
- <div v-if="project.resource=='0'">{{project.institution.name}}</div>
|
|
|
+ <div v-if="project.resource=='0'">{{project.institution}}</div>
|
|
|
<div v-if="project.resource=='2'">{{resourceType[project.resource]}}</div>
|
|
|
</div>
|
|
|
<el-tabs :tab-position="tabPosition" v-model="project.resource" style="max-height: 200px;"
|
|
|
@@ -183,57 +192,6 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
-
|
|
|
- <!--<div class="create-body" v-if="!isModifyMode">-->
|
|
|
- <!--<div class="title h2">分析需求</div>-->
|
|
|
- <!--<div class="task-list">-->
|
|
|
- <!--<el-table :data="analyseDemandList" style="width: 100%" max-height="400">-->
|
|
|
- <!--<el-table-column prop="institution" label="承接单位" title="承接单位"></el-table-column>-->
|
|
|
- <!--<el-table-column prop="feasibilityReport" sortable label="可行性分析报告">-->
|
|
|
- <!--<template slot-scope="scope">-->
|
|
|
- <!--<span v-if="!scope.row.feasibilityReport.url">暂无文件</span>-->
|
|
|
- <!--<a-->
|
|
|
- <!--:href="scope.row.feasibilityReport.url"-->
|
|
|
- <!--v-if="scope.row.feasibilityReport.url"-->
|
|
|
- <!--target="_blank"-->
|
|
|
- <!-->-->
|
|
|
- <!--<i class="fa fa-file-text-o"></i>-->
|
|
|
- <!--{{scope.row.feasibilityReport.name}}-->
|
|
|
- <!--</a>-->
|
|
|
- <!--</template>-->
|
|
|
- <!--</el-table-column>-->
|
|
|
- <!--<el-table-column prop="priceAuditReport" sortable label="可行性分析报告">-->
|
|
|
- <!--<template slot-scope="scope">-->
|
|
|
- <!--<span v-if="!scope.row.priceAuditReport.url">暂无文件</span>-->
|
|
|
- <!--<a-->
|
|
|
- <!--:href="scope.row.priceAuditReport.url"-->
|
|
|
- <!--v-if="scope.row.priceAuditReport.url"-->
|
|
|
- <!--target="_blank"-->
|
|
|
- <!-->-->
|
|
|
- <!--<i class="fa fa-file-text-o"></i>-->
|
|
|
- <!--{{scope.row.priceAuditReport.name}}-->
|
|
|
- <!--</a>-->
|
|
|
- <!--</template>-->
|
|
|
- <!--</el-table-column>-->
|
|
|
-
|
|
|
- <!--<el-table-column align="right" label="操作">-->
|
|
|
- <!--<template slot-scope="scope">-->
|
|
|
- <!--<div-->
|
|
|
- <!--class="btn btn-small btn-info"-->
|
|
|
- <!--@click="handleAccept(scope.$index, scope.row.id)"-->
|
|
|
- <!-->接受-->
|
|
|
- <!--</div>-->
|
|
|
- <!--<div-->
|
|
|
- <!--class="btn btn-small btn-danger"-->
|
|
|
- <!--@click="handleReject(scope.$index, scope.row.id)"-->
|
|
|
- <!-->拒绝-->
|
|
|
- <!--</div>-->
|
|
|
- <!--</template>-->
|
|
|
- <!--</el-table-column>-->
|
|
|
- <!--</el-table>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--</div>-->
|
|
|
-
|
|
|
<div class="create-body" v-if="!isModifyMode">
|
|
|
<div class="title h2">任务列表</div>
|
|
|
<div class="task-list">
|
|
|
@@ -243,7 +201,7 @@
|
|
|
<el-table-column prop="resource" label="任务可见性">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.resource=='1'">{{updateLocation(scope.row.location)}}</div>
|
|
|
- <div v-if="scope.row.resource=='0'">{{scope.row.institution.name}}</div>
|
|
|
+ <div v-if="scope.row.resource=='0'">{{scope.row.institution}}</div>
|
|
|
<div v-if="scope.row.resource=='2'">{{resourceType[scope.row.resource]}}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -408,6 +366,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
watch: {
|
|
|
+ serviceType (val) {
|
|
|
+ this.serviceType = val
|
|
|
+ },
|
|
|
+ institutionArray (val) {
|
|
|
+ this.institutionArray = val
|
|
|
+ },
|
|
|
'project.institution' () {
|
|
|
if (this.project.institution) {
|
|
|
//this.$refs.addFormProvince.resetProviceCity()
|
|
|
@@ -476,13 +440,34 @@ export default {
|
|
|
datetime: this.project.datetime,
|
|
|
usage: this.project.usage,
|
|
|
}
|
|
|
- console.log(newProject)
|
|
|
+ //console.log(newProject)
|
|
|
Http.put(Apis.PROJECT.UPDATE_PROJECT.replace('{projectId}', this.projectId), newProject).then((res) => {
|
|
|
- console.log(res)
|
|
|
+ this.projectId = res.projectDetails.id
|
|
|
+ this.project.name = res.projectDetails.name
|
|
|
+ this.project.contactName = res.projectDetails.contactName
|
|
|
+ this.project.contactPhone = res.projectDetails.contactPhone
|
|
|
+ this.project.type = res.projectDetails.type
|
|
|
+ this.project.platform = res.projectDetails.platform
|
|
|
+ this.project.desc = res.projectDetails.desc
|
|
|
+ this.project.doc = []
|
|
|
+ this.project.file = []
|
|
|
+ this.project.resource = res.projectDetails.resource
|
|
|
+ this.project.location = getProvinceCodeByProvinceName(res.projectDetails.location.provinceCode, res.projectDetails.location.cityCode)
|
|
|
+ this.project.institution = res.projectDetails.institution
|
|
|
+ this.project.datetime = new Date(res.projectDetails.datetime)
|
|
|
+ this.project.price = res.projectDetails.price
|
|
|
+ this.project.budget = res.projectDetails.budget
|
|
|
+ this.project.usage = res.projectDetails.usage
|
|
|
+ this.project.fileUrl = res.projectDetails.file
|
|
|
+ this.project.requireDocUrl = res.projectDetails.doc
|
|
|
+
|
|
|
+ this.task = res.taskList
|
|
|
+ this.analyseDemandList = res.reportList
|
|
|
this.isModifyMode = false
|
|
|
notify('success', '项目修改成功')
|
|
|
}).catch(error => {
|
|
|
- notify('error', error.data.msg)
|
|
|
+ notify('error', error.data)
|
|
|
+ console.log(error)
|
|
|
})
|
|
|
// this.$refs[formName].validate(valid => {
|
|
|
// if (valid) {
|
|
|
@@ -515,8 +500,8 @@ export default {
|
|
|
//进入修改项目页面
|
|
|
modifyForm () {
|
|
|
this.isModifyMode = true
|
|
|
- this.project.type = []
|
|
|
- this.project.platform = []
|
|
|
+
|
|
|
+ this.setInstitutions()
|
|
|
//获得update 信息
|
|
|
//this.loadData()
|
|
|
},
|
|
|
@@ -602,7 +587,7 @@ export default {
|
|
|
},
|
|
|
loadData () {//PROJ--2019073114009
|
|
|
Http.get(Apis.PROJECT.GET_PROJECT.replace('{projectId}', this.projectId)).then((res) => {
|
|
|
- //console.log(res)
|
|
|
+ console.log(res)
|
|
|
this.projectId = res.projectDetails.id
|
|
|
this.project.name = res.projectDetails.name
|
|
|
this.project.contactName = res.projectDetails.contactName
|
|
|
@@ -671,13 +656,21 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
setServiceType () {
|
|
|
- this.serviceType = getAllServiceTypes()
|
|
|
+ getAllServiceTypes().then((res) => {
|
|
|
+ this.serviceType = res
|
|
|
+ }).catch((error) => {
|
|
|
+ notify('error', '获取项目类型列表失败')
|
|
|
+ })
|
|
|
},
|
|
|
setPlatformType () {
|
|
|
this.platforms = getAllPlatformTypes()
|
|
|
},
|
|
|
setInstitutions () {
|
|
|
- this.institutionArray = getAllInstitutions()
|
|
|
+ getAllInstitutions().then((res) => {
|
|
|
+ this.institutionArray = res
|
|
|
+ }).catch((error) => {
|
|
|
+ notify('error', '获取institution失败' + error.data)
|
|
|
+ })
|
|
|
},
|
|
|
setUserInfo () {
|
|
|
this.user = storageGet('user')
|
|
|
@@ -700,3 +693,54 @@ export default {
|
|
|
}
|
|
|
</style>
|
|
|
|
|
|
+
|
|
|
+<!--<div class="create-body" v-if="!isModifyMode">-->
|
|
|
+<!--<div class="title h2">分析需求</div>-->
|
|
|
+<!--<div class="task-list">-->
|
|
|
+<!--<el-table :data="analyseDemandList" style="width: 100%" max-height="400">-->
|
|
|
+<!--<el-table-column prop="institution" label="承接单位" title="承接单位"></el-table-column>-->
|
|
|
+<!--<el-table-column prop="feasibilityReport" sortable label="可行性分析报告">-->
|
|
|
+<!--<template slot-scope="scope">-->
|
|
|
+<!--<span v-if="!scope.row.feasibilityReport.url">暂无文件</span>-->
|
|
|
+<!--<a-->
|
|
|
+<!--:href="scope.row.feasibilityReport.url"-->
|
|
|
+<!--v-if="scope.row.feasibilityReport.url"-->
|
|
|
+<!--target="_blank"-->
|
|
|
+<!-->-->
|
|
|
+<!--<i class="fa fa-file-text-o"></i>-->
|
|
|
+<!--{{scope.row.feasibilityReport.name}}-->
|
|
|
+<!--</a>-->
|
|
|
+<!--</template>-->
|
|
|
+<!--</el-table-column>-->
|
|
|
+<!--<el-table-column prop="priceAuditReport" sortable label="可行性分析报告">-->
|
|
|
+<!--<template slot-scope="scope">-->
|
|
|
+<!--<span v-if="!scope.row.priceAuditReport.url">暂无文件</span>-->
|
|
|
+<!--<a-->
|
|
|
+<!--:href="scope.row.priceAuditReport.url"-->
|
|
|
+<!--v-if="scope.row.priceAuditReport.url"-->
|
|
|
+<!--target="_blank"-->
|
|
|
+<!-->-->
|
|
|
+<!--<i class="fa fa-file-text-o"></i>-->
|
|
|
+<!--{{scope.row.priceAuditReport.name}}-->
|
|
|
+<!--</a>-->
|
|
|
+<!--</template>-->
|
|
|
+<!--</el-table-column>-->
|
|
|
+
|
|
|
+<!--<el-table-column align="right" label="操作">-->
|
|
|
+<!--<template slot-scope="scope">-->
|
|
|
+<!--<div-->
|
|
|
+<!--class="btn btn-small btn-info"-->
|
|
|
+<!--@click="handleAccept(scope.$index, scope.row.id)"-->
|
|
|
+<!-->接受-->
|
|
|
+<!--</div>-->
|
|
|
+<!--<div-->
|
|
|
+<!--class="btn btn-small btn-danger"-->
|
|
|
+<!--@click="handleReject(scope.$index, scope.row.id)"-->
|
|
|
+<!-->拒绝-->
|
|
|
+<!--</div>-->
|
|
|
+<!--</template>-->
|
|
|
+<!--</el-table-column>-->
|
|
|
+<!--</el-table>-->
|
|
|
+<!--</div>-->
|
|
|
+<!--</div>-->
|
|
|
+
|