|
@@ -276,9 +276,27 @@ export default {
|
|
|
item.edit = true
|
|
|
},
|
|
|
confirmForm() { // 确认提交表单
|
|
|
+ const isNoConfirm = this.childrenList.some(item => {
|
|
|
+ return item.edit === true
|
|
|
+ })
|
|
|
+ if (isNoConfirm) {
|
|
|
+ this.$message({ message: '存在未确认的子任务', type: 'error', duration: 1000, offset: 150 })
|
|
|
+ return false
|
|
|
+ }
|
|
|
this.$refs['form'].validate((valid) => {
|
|
|
-
|
|
|
+ if (valid) {
|
|
|
+ this.formData.children = this.childrenList.map(item => {
|
|
|
+ delete item.edit
|
|
|
+ return {
|
|
|
+ ...item
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.createChildren(this.formData)
|
|
|
+ }
|
|
|
})
|
|
|
+ },
|
|
|
+ createChildren(param) {
|
|
|
+
|
|
|
},
|
|
|
cancel() { // 关闭弹框
|
|
|
this.show = false
|