|
@@ -74,7 +74,9 @@
|
|
|
<div class="block">
|
|
|
<el-slider v-model="formData.process" @change="changeProgres" />
|
|
|
</div>
|
|
|
- <el-input v-model="formData.process" @input="changeProgres">
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model.number="formData.process" style="width: 90px" @change="changeProgres">
|
|
|
<template slot="append">%</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
@@ -108,6 +110,7 @@
|
|
|
</section>
|
|
|
</el-container>
|
|
|
<create-children v-if="createChildren" :visible.sync="createChildren" :data="formData" @change="getById()" />
|
|
|
+ <change-status v-if="statusDialog" :show-dialog.sync="statusDialog" :data="noCompleteTask" @confirm="changeArea('status');statusDialog=false" @cancel="getById()" />
|
|
|
<!-- 删除 -->
|
|
|
<normal-dialog
|
|
|
v-if="deleteDialog"
|
|
@@ -136,6 +139,7 @@ import searchPeople from '@/components/select/searchPeople'
|
|
|
import textArea from '@/components/input/textArea'
|
|
|
import addChildrenList from './addChildrenList'
|
|
|
import createChildren from './createChildren'
|
|
|
+import changeStatus from './changeStatus'
|
|
|
import normalDialog from '@/components/dialog/normalDialog'
|
|
|
import danger from '@/assets/感叹@2x.png'
|
|
|
export default {
|
|
@@ -144,7 +148,8 @@ export default {
|
|
|
textArea,
|
|
|
addChildrenList,
|
|
|
normalDialog,
|
|
|
- createChildren
|
|
|
+ createChildren,
|
|
|
+ changeStatus
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -156,7 +161,9 @@ export default {
|
|
|
deleteDialog: false, // 删除弹窗
|
|
|
taskId: Number(this.$route.query.id), // 任务id
|
|
|
allStatus: [], // 任务所有状态
|
|
|
- createChildren: false // 新建子任务
|
|
|
+ createChildren: false, // 新建子任务
|
|
|
+ statusDialog: false, // 状态弹框
|
|
|
+ noCompleteTask: [] // 当前任务中未完成的子任务
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -183,8 +190,21 @@ export default {
|
|
|
}, 1500),
|
|
|
updateStatus(e) { // 变更状态
|
|
|
this.formData.status = e.value
|
|
|
+ if (this.formData.status === 20) {
|
|
|
+ this.noCompleteTask = []
|
|
|
+ this.findNoComplete(this.formData.childSubTaskInfos)
|
|
|
+ this.noCompleteTask = this.noCompleteTask.filter(item => item.status !== 20)
|
|
|
+ this.statusDialog = true
|
|
|
+ return
|
|
|
+ }
|
|
|
this.changeArea('status')
|
|
|
},
|
|
|
+ findNoComplete(arr) { // 查找未完成子任务
|
|
|
+ arr.map(item => {
|
|
|
+ this.noCompleteTask = this.noCompleteTask.concat(item)
|
|
|
+ this.findNoComplete(item.childSubTaskInfos)
|
|
|
+ })
|
|
|
+ },
|
|
|
async changeArea(e) { // area修改
|
|
|
const params = {
|
|
|
id: this.formData.id,
|
|
@@ -299,7 +319,7 @@ export default {
|
|
|
}
|
|
|
.demo-form-all {
|
|
|
.el-form-item {
|
|
|
- width: 33%;
|
|
|
+ width: 25%;
|
|
|
margin-right: 0;
|
|
|
/deep/.el-form-item__content {
|
|
|
width: calc(100% - 100px)
|