|
@@ -30,7 +30,7 @@
|
|
|
</el-dropdown>
|
|
|
</span>
|
|
|
<span style="float: right;">
|
|
|
- <el-button size="mini" @click="centerDialogVisible = true">删除项目</el-button>
|
|
|
+ <el-button size="mini" @click="dele_pro()">删除项目</el-button>
|
|
|
<el-dropdown>
|
|
|
<el-button size="mini" type="primary">
|
|
|
新建
|
|
@@ -567,6 +567,7 @@ import {
|
|
|
mileStoneUpdate,
|
|
|
mileStoneDelete,
|
|
|
projectDelete,
|
|
|
+ projectDeleteCheck,
|
|
|
taskList,
|
|
|
requirementQueryRequirementInfoList
|
|
|
} from '@/api/projectIndex'
|
|
@@ -582,8 +583,7 @@ export default {
|
|
|
dateStr(value) {
|
|
|
if (!value) return ''
|
|
|
var date = value.split('T')
|
|
|
- var a = date[1].split('.')
|
|
|
- return date[0] + ' ' + a[0]
|
|
|
+ return date[0]
|
|
|
},
|
|
|
ellipsis(value) {
|
|
|
if (!value) return ''
|
|
@@ -762,14 +762,14 @@ export default {
|
|
|
}).then(res => {
|
|
|
this.form_query = res.data[0]
|
|
|
this.project_from = res.data[0]
|
|
|
- if (this.form_query.target !== '') {
|
|
|
- this.Addition1 = false
|
|
|
- this.Addition = false
|
|
|
- this.Addition2 = true
|
|
|
- } else {
|
|
|
+ if (this.form_query.target === '' || this.form_query.target === null) {
|
|
|
this.Addition1 = false
|
|
|
this.Addition2 = false
|
|
|
this.Addition = true
|
|
|
+ } else {
|
|
|
+ this.Addition1 = false
|
|
|
+ this.Addition = false
|
|
|
+ this.Addition2 = true
|
|
|
}
|
|
|
this.form_query.status === 0
|
|
|
? this.$set(this.form_query, 'statusString', '未开始')
|
|
@@ -806,6 +806,15 @@ export default {
|
|
|
this.total = res.total
|
|
|
})
|
|
|
},
|
|
|
+ dele_pro() {
|
|
|
+ projectDeleteCheck(this.form_query.id, {}).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.centerDialogVisible = true
|
|
|
+ } else {
|
|
|
+ this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
project_modifica(e) {
|
|
|
this.modify_project = true
|
|
|
},
|