|
|
@@ -169,23 +169,28 @@
|
|
|
<div class="btn btn-small" @click="cancelMode('project')">取消</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="!isModifyMode">
|
|
|
- <div v-if="projectOperationControl.confirmFinish" class="btn btn-small btn-warning-soft"
|
|
|
- @click="endProject()">结束项目
|
|
|
- </div>
|
|
|
- <!--<div class="btn btn-small btn-info" @click="submitProjectRequest()">发布项目</div>-->
|
|
|
- <div v-if="projectOperationControl.finish" class="btn btn-small btn-info" @click="submitProjectRequest()">
|
|
|
+
|
|
|
+ <el-button v-if="projectOperationControl.confirmFinish" type="success" size="mini" @click="endProject()">
|
|
|
+ 结束项目
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="projectOperationControl.finish" type="primary" size="mini" @click="submitProjectRequest()">
|
|
|
提交项目
|
|
|
- </div>
|
|
|
- <div v-if="projectOperationControl.receive" class="btn btn-small btn-info" @click="receiveProject()">接受项目
|
|
|
- </div>
|
|
|
- <div v-if="projectOperationControl.reject" class="btn btn-small btn-danger" @click="rejectProject()">拒绝项目
|
|
|
- </div>
|
|
|
- <div v-if="projectOperationControl.update" class="btn btn-small btn-info" @click="modifyForm()">修改项目</div>
|
|
|
- <!--<div class="btn btn-medium btn-info" @click="analyseDemand()">分析需求</div>-->
|
|
|
- <div v-if="projectOperationControl.createTask" class="btn btn-small btn-info" @click="createNewTask()">新建任务
|
|
|
- </div>
|
|
|
- <div v-if="projectOperationControl.uploadReport" class="btn btn-small btn-info" @click="createReport()">上传报告
|
|
|
- </div>
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="projectOperationControl.receive" type="primary" size="mini" @click="receiveProject()">
|
|
|
+ 接受项目
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="projectOperationControl.reject" type="danger" size="mini" @click="rejectProject()">
|
|
|
+ 拒绝项目
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="projectOperationControl.update" type="primary" size="mini" @click="modifyForm()">
|
|
|
+ 修改项目
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="projectOperationControl.createTask" type="primary" size="mini" @click="createNewTask()">
|
|
|
+ 新建任务
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="projectOperationControl.uploadReport" type="primary" size="mini" @click="createReport()">
|
|
|
+ 上传报告
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
@@ -247,13 +252,13 @@ import {
|
|
|
getAllInstitutions,
|
|
|
getAllPlatformTypes,
|
|
|
getAllServiceTypes,
|
|
|
+ getFormalTimeFromDate,
|
|
|
getProvinceCodeByProvinceName,
|
|
|
getProvinceNameByProvinceCode,
|
|
|
receiveProjectRequest,
|
|
|
rejectProject,
|
|
|
storageGet,
|
|
|
- submitProjectRequest,
|
|
|
- getFormalTimeFromDate
|
|
|
+ submitProjectRequest
|
|
|
} from '@/js/index'
|
|
|
|
|
|
export default {
|
|
|
@@ -552,9 +557,16 @@ export default {
|
|
|
},
|
|
|
//接收项目
|
|
|
receiveProject () {
|
|
|
- this.showLoading()
|
|
|
- console.log('接收项目')
|
|
|
- receiveProjectRequest(this.projectId, this.user.userVO.id, this.receiveProjectSuccess, this.receiveProjectFail)
|
|
|
+ this.$confirm('确认接收项目?', '提示', {
|
|
|
+ confirmButtonText: '确认接收',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'success'
|
|
|
+ }).then(() => {
|
|
|
+ this.showLoading()
|
|
|
+ console.log('接收项目')
|
|
|
+ receiveProjectRequest(this.projectId, this.user.userVO.id, this.receiveProjectSuccess, this.receiveProjectFail)
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
},
|
|
|
receiveProjectSuccess (res) {
|
|
|
this.hideLoading()
|
|
|
@@ -569,8 +581,16 @@ export default {
|
|
|
},
|
|
|
//拒绝项目
|
|
|
rejectProject () {
|
|
|
- this.showLoading()
|
|
|
- rejectProject(this.projectId, this.rejectProjectSuccess, this.rejectProjectFail)
|
|
|
+ this.$confirm('确认拒绝项目?', '提示', {
|
|
|
+ confirmButtonText: '确认拒绝',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'success'
|
|
|
+ }).then(() => {
|
|
|
+ this.showLoading()
|
|
|
+ rejectProject(this.projectId, this.rejectProjectSuccess, this.rejectProjectFail)
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
rejectProjectSuccess (res) {
|
|
|
this.hideLoading()
|
|
|
@@ -582,8 +602,15 @@ export default {
|
|
|
},
|
|
|
//提交项目
|
|
|
submitProjectRequest () {
|
|
|
- this.showLoading()
|
|
|
- submitProjectRequest(this.projectId, this.submitProjectRequestSuccess, this.submitProjectRequestFail)
|
|
|
+ this.$confirm('确认提交项目?', '提示', {
|
|
|
+ confirmButtonText: '确认提交',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'success'
|
|
|
+ }).then(() => {
|
|
|
+ this.showLoading()
|
|
|
+ submitProjectRequest(this.projectId, this.submitProjectRequestSuccess, this.submitProjectRequestFail)
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
},
|
|
|
submitProjectRequestSuccess (res) {
|
|
|
this.hideLoading()
|
|
|
@@ -598,8 +625,16 @@ export default {
|
|
|
},
|
|
|
//结束项目
|
|
|
endProject () {
|
|
|
- this.showLoading()
|
|
|
- ensureEndProject(this.projectId, this.endProjectSuccess, this.endProjectFail)
|
|
|
+ this.$confirm('确认结束项目?', '提示', {
|
|
|
+ confirmButtonText: '确认结束',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'success'
|
|
|
+ }).then(() => {
|
|
|
+ this.showLoading()
|
|
|
+ ensureEndProject(this.projectId, this.endProjectSuccess, this.endProjectFail)
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
endProjectSuccess (res) {
|
|
|
this.hideLoading()
|
|
|
@@ -798,7 +833,7 @@ export default {
|
|
|
hideLoading () {
|
|
|
this.loading = false
|
|
|
},
|
|
|
- reformDate(date){
|
|
|
+ reformDate (date) {
|
|
|
return getFormalTimeFromDate(date)
|
|
|
}
|
|
|
}
|