|
@@ -50,9 +50,11 @@
|
|
|
<!-- <el-form-item v-if="!isModifyMode" size="small" label="状态" prop="status">-->
|
|
|
<!-- <span v-if="!isModifyMode">{{project.statusVO?project.statusVO.text:''}}</span>-->
|
|
|
<!-- </el-form-item>-->
|
|
|
- <el-form-item size="small" label="区域管理员" prop="institution" v-if="project.institution">
|
|
|
- <span v-if="!isModifyMode">{{project.institution}}</span>
|
|
|
+ <el-form-item size="small" label="区域管理员" prop="regionManagerName"
|
|
|
+ v-if="!isModifyMode && project.regionManagerName">
|
|
|
+ <span>{{project.regionManagerName}}</span>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="需求描述">
|
|
|
<el-input style="width: 400px" autosize v-if="isModifyMode" type="textarea"
|
|
|
v-model="project.desc"></el-input>
|
|
@@ -67,7 +69,7 @@
|
|
|
<el-form-item label="领域类型" prop="field">
|
|
|
<el-radio-group v-if="isModifyMode" v-model="project.field">
|
|
|
<span v-for="(item,index) in fields" :key="index">
|
|
|
- <el-radio :label="item.name" style="margin: 3px">{{ item.name }} </el-radio>
|
|
|
+ <el-radio :label="item.name">{{ item.name }} </el-radio>
|
|
|
</span>
|
|
|
</el-radio-group>
|
|
|
<span
|
|
@@ -80,7 +82,7 @@
|
|
|
<el-form-item label="应用类型" prop="platform">
|
|
|
<el-radio-group v-if="isModifyMode" v-model="project.platform">
|
|
|
<span v-for="(item,index) in platforms" :key="index">
|
|
|
- <el-radio :label="item.name" style="margin: 3px">{{ item.name }} </el-radio>
|
|
|
+ <el-radio :label="item.name">{{ item.name }} </el-radio>
|
|
|
</span>
|
|
|
</el-radio-group>
|
|
|
<span
|
|
@@ -89,6 +91,7 @@
|
|
|
>
|
|
|
{{project.platform}}</span>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<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">
|
|
@@ -111,13 +114,23 @@
|
|
|
</div>
|
|
|
<el-tabs :tab-position="tabPosition" v-model="project.resource" style="max-height: 200px;"
|
|
|
v-if="isModifyMode">
|
|
|
+
|
|
|
+ <!-- <el-tab-pane :label="resourceType[0]" :name="0">-->
|
|
|
+ <!-- <el-radio-group v-model="project.institution">-->
|
|
|
+ <!-- <span v-for="(item,index) in institutionArray" :key="index">-->
|
|
|
+ <!-- <el-radio :label="item.id" name="type" style="margin: 3px">{{ item.name }} </el-radio>-->
|
|
|
+ <!-- </span>-->
|
|
|
+ <!-- </el-radio-group>-->
|
|
|
+ <!-- </el-tab-pane>-->
|
|
|
+
|
|
|
<el-tab-pane :label="resourceType[0]" :name="0">
|
|
|
<el-radio-group v-model="project.institution">
|
|
|
- <el-radio :label="item" name="type" v-for="(item,index) in institutionArray" :key="index">
|
|
|
+ <el-radio v-for="(item,index) in institutionArray" :label="item.id" name="type" :key="index">
|
|
|
{{item.name}}
|
|
|
</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-tab-pane>
|
|
|
+
|
|
|
<el-tab-pane :label="resourceType[1]" :name="1">
|
|
|
<provincecity
|
|
|
ref="addFormProvince"
|
|
@@ -151,7 +164,7 @@
|
|
|
<em>点击上传</em>
|
|
|
</div>
|
|
|
</el-upload>
|
|
|
- <span >
|
|
|
+ <span>
|
|
|
<a :href="project.requireDocUrl" v-if="project.requireDocUrl!=null && project.requireDocUrl!=''"><el-link
|
|
|
:underline="false" type="primary"><i
|
|
|
class="el-icon-document"></i>下载文档</el-link></a>
|
|
@@ -179,12 +192,12 @@
|
|
|
<em>点击上传</em>
|
|
|
</div>
|
|
|
</el-upload>
|
|
|
- <span v-if="!isModifyMode">
|
|
|
- <a v-if="project.fileUrl!=null && project.fileUrl!=''" :href="project.fileUrl"><el-link :underline="false"
|
|
|
- type="primary"><i
|
|
|
- class="el-icon-document"></i>下载文件</el-link></a>
|
|
|
- <i v-if="project.fileUrl==null || project.fileUrl==''" class="el-icon-document">暂无文件</i>
|
|
|
- </span>
|
|
|
+ <span>
|
|
|
+ <a v-if="project.fileUrl!=null && project.fileUrl!=''" :href="project.fileUrl"><el-link :underline="false"
|
|
|
+ type="primary"><i
|
|
|
+ class="el-icon-document"></i>下载文件</el-link></a>
|
|
|
+ <i v-if="project.fileUrl==null || project.fileUrl==''" class="el-icon-document">暂无文件</i>
|
|
|
+ </span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="委托单位" prop="entrustUnit" v-if="project.entrustUnit">
|
|
|
<el-input style="width: 400px" autosize v-if="isModifyMode" type="textarea"
|
|
@@ -260,7 +273,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.resource=='1'">{{scope.row.location.provinceCode}}/{{scope.row.location.cityCode}}
|
|
|
</div>
|
|
|
- <div v-if="scope.row.resource=='0'">{{scope.row.institution}}</div>
|
|
|
+ <div v-if="scope.row.resource=='0'">{{scope.row.agencyName}}</div>
|
|
|
<div v-if="scope.row.resource=='2'">{{resourceType[scope.row.resource]}}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -376,6 +389,8 @@
|
|
|
resource: '',
|
|
|
location: '',
|
|
|
institution: {},
|
|
|
+ regionManagerId: 0,
|
|
|
+ regionManagerName: '',
|
|
|
contactName: '',
|
|
|
contactPhone: '',
|
|
|
doc: [],
|
|
@@ -506,24 +521,6 @@
|
|
|
institutionArray(val) {
|
|
|
this.institutionArray = val
|
|
|
},
|
|
|
- // 'project.institution' () {
|
|
|
- // if (this.project.institution) {
|
|
|
- // //this.$refs.addFormProvince.resetProviceCity()
|
|
|
- // this.project.location = {provinceCode: '', cityCode: ''}
|
|
|
- // }
|
|
|
- // },
|
|
|
- // 'project.location' () {
|
|
|
- // if (this.project.location.provinceCode || this.project.location.cityCode) {
|
|
|
- // this.project.institution = ''
|
|
|
- // }
|
|
|
- // },
|
|
|
- // 'project.resource' () {
|
|
|
- // if (this.project.resource == '2') {
|
|
|
- // //this.$refs.addFormProvince.resetProviceCity()
|
|
|
- // this.project.institution = ''
|
|
|
- // this.project.location = {provinceCode: '', cityCode: ''}
|
|
|
- // }
|
|
|
- // },
|
|
|
deep: true
|
|
|
},
|
|
|
methods: {
|
|
@@ -547,9 +544,6 @@
|
|
|
},
|
|
|
init() {
|
|
|
this.projectId = this.$route.params.projectId
|
|
|
- this.setServiceType()
|
|
|
- this.setFields()
|
|
|
- this.setPlatformType()
|
|
|
// this.setInstitutions()
|
|
|
this.setUserInfo()
|
|
|
this.loadData()
|
|
@@ -620,7 +614,7 @@
|
|
|
desc: this.project.desc,
|
|
|
resource: this.project.resource,
|
|
|
location: getProvinceNameByProvinceCode(this.project.location.provinceCode, this.project.location.cityCode),
|
|
|
- institution: this.project.institution == null ? null : this.project.institution.id,
|
|
|
+ institution: this.project.institution == null ? null : this.project.institution,
|
|
|
contactName: this.project.contactName,
|
|
|
contactPhone: this.project.contactPhone,
|
|
|
doc: this.project.requireDocUrl,
|
|
@@ -630,32 +624,13 @@
|
|
|
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.valuationStandard = res.projectDetails.valuationStandard
|
|
|
- this.project.entrustUnit = res.projectDetails.entrustUnit
|
|
|
- this.project.field = res.projectDetails.field
|
|
|
- this.project.desc = res.projectDetails.desc
|
|
|
- this.project.doc = []
|
|
|
- this.project.file = []
|
|
|
+ // console.log(res)
|
|
|
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.reportList = res.reportList
|
|
|
+ this.changeValue(res);
|
|
|
this.isModifyMode = false
|
|
|
this.hideLoading()
|
|
|
notify('success', '项目修改成功')
|
|
@@ -670,6 +645,15 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ changeValue(res) {
|
|
|
+ this.project = res.projectDetails
|
|
|
+ this.projectId = res.projectDetails.id
|
|
|
+ this.project.fileUrl = res.projectDetails.file
|
|
|
+ this.project.requireDocUrl = res.projectDetails.doc
|
|
|
+ this.task = res.taskList
|
|
|
+ this.reportList = res.reportList
|
|
|
+ this.projectOperationControl = res.projectOperationControl
|
|
|
+ },
|
|
|
//重置表单
|
|
|
resetForm(formName) {
|
|
|
this.$refs[formName].resetFields()
|
|
@@ -694,11 +678,14 @@
|
|
|
//进入修改项目页面
|
|
|
modifyForm() {
|
|
|
this.isModifyMode = true
|
|
|
+ this.setServiceType()
|
|
|
+ this.setFields()
|
|
|
+ this.setPlatformType()
|
|
|
// this.project.type = []
|
|
|
// this.project.platform = ''
|
|
|
// this.project.field = ''
|
|
|
// console.log(this.project.doc)
|
|
|
- //this.setInstitutions()
|
|
|
+ this.setInstitutions()
|
|
|
//获得update 信息
|
|
|
//this.loadData()
|
|
|
},
|
|
@@ -710,7 +697,6 @@
|
|
|
type: 'success'
|
|
|
}).then(() => {
|
|
|
this.showLoading()
|
|
|
- console.log('接收项目')
|
|
|
receiveProjectRequest(this.projectId, this.user.userVO.id, this.receiveProjectSuccess, this.receiveProjectFail)
|
|
|
}).catch(() => {
|
|
|
})
|
|
@@ -718,9 +704,7 @@
|
|
|
receiveProjectSuccess(res) {
|
|
|
this.hideLoading()
|
|
|
notify('success', '项目接收成功!')
|
|
|
- this.projectOperationControl = res.projectOperationControl
|
|
|
- this.project = res.projectDetails
|
|
|
- // this.project.institution = res.projectDetails.institution
|
|
|
+ this.changeValue(res);
|
|
|
},
|
|
|
receiveProjectFail(error) {
|
|
|
this.hideLoading()
|
|
@@ -742,12 +726,19 @@
|
|
|
rejectProjectSuccess(res) {
|
|
|
this.hideLoading()
|
|
|
notify('success', '拒绝项目成功')
|
|
|
+ this.changeValue(res);
|
|
|
},
|
|
|
rejectProjectFail(error) {
|
|
|
this.hideLoading()
|
|
|
notify('error', '拒绝项目失败:' + error.data)
|
|
|
},
|
|
|
//提交项目
|
|
|
+ submitProjectRequestSuccess(res) {
|
|
|
+ this.hideLoading()
|
|
|
+ notify('success', '项目提交成功!')
|
|
|
+ this.loadData()
|
|
|
+ this.changeValue(res);
|
|
|
+ },
|
|
|
submitProjectRequest() {
|
|
|
this.$confirm('确认提交项目?', '提示', {
|
|
|
confirmButtonText: '确认提交',
|
|
@@ -759,14 +750,6 @@
|
|
|
}).catch(() => {
|
|
|
})
|
|
|
},
|
|
|
- submitProjectRequestSuccess(res) {
|
|
|
- this.hideLoading()
|
|
|
- notify('success', '项目提交成功!')
|
|
|
- this.loadData()
|
|
|
- this.projectOperationControl = res.projectOperationControl
|
|
|
- this.project.status = res.projectDetails.status
|
|
|
- this.project.institution = res.projectDetails.institution
|
|
|
- },
|
|
|
submitProjectRequestFail(error) {
|
|
|
this.hideLoading()
|
|
|
notify('error', '提交项目失败:' + error.data)
|
|
@@ -788,9 +771,7 @@
|
|
|
this.hideLoading()
|
|
|
notify('success', '项目提交成功!')
|
|
|
this.loadData()
|
|
|
- this.projectOperationControl = res.projectOperationControl
|
|
|
- this.project.status = res.projectDetails.status
|
|
|
- this.project.institution = res.projectDetails.institution
|
|
|
+ this.changeValue(res);
|
|
|
},
|
|
|
endProjectFail(error) {
|
|
|
this.hideLoading()
|
|
@@ -867,32 +848,15 @@
|
|
|
handleReject(index, id) {
|
|
|
console.log('拒绝')
|
|
|
},
|
|
|
- loadData() {//PROJ--2019073114009
|
|
|
+ loadData() {
|
|
|
this.showLoading()
|
|
|
Http.get(Apis.PROJECT.GET_PROJECT.replace('{projectId}', this.projectId)).then((res) => {
|
|
|
- console.log(res)
|
|
|
- console.log(typeof res.projectDetails.field)
|
|
|
- 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.valuationStandard = res.projectDetails.valuationStandard
|
|
|
- this.project.entrustUnit = res.projectDetails.entrustUnit
|
|
|
- this.project.field = res.projectDetails.field
|
|
|
- console.log(res.projectDetails.field)
|
|
|
- console.log(this.project.field)
|
|
|
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.project.userId = res.projectDetails.userId
|
|
@@ -900,9 +864,8 @@
|
|
|
this.project.statusVO = res.projectDetails.statusVO
|
|
|
this.task = res.taskList
|
|
|
this.reportList = res.reportList
|
|
|
- this.projectOperationControl = res.projectOperationControl
|
|
|
this.progress = res.progress
|
|
|
- console.log(this.project)
|
|
|
+ this.changeValue(res);
|
|
|
this.hideLoading()
|
|
|
this.handleShowTaskListOrNot()
|
|
|
for (var i = 0; i < this.progress.length; i++) {
|
|
@@ -936,7 +899,7 @@
|
|
|
this.$message.warning(
|
|
|
`当前限制选择 1 个文件,本次选择了 ${
|
|
|
files.length
|
|
|
- } 个文件,共选择了 ${files.length + fileList.length} 个文件`
|
|
|
+ } 个文件,共选择了 ${files.length + fileList.length} 个文件`
|
|
|
)
|
|
|
},
|
|
|
beforeRemove(file, fileList) {
|
|
@@ -1061,55 +1024,3 @@
|
|
|
width: 400px;
|
|
|
}
|
|
|
</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>-->
|
|
|
-
|