|
|
@@ -342,7 +342,7 @@ import {
|
|
|
auditTask,
|
|
|
splitTask
|
|
|
} from "@/api/task/task";
|
|
|
-import {listProject} from "@/api/task/project";
|
|
|
+import {getProjectTree, listProject} from "@/api/task/project";
|
|
|
import {getDeptUserTree} from "@/api/system/user";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
@@ -550,9 +550,9 @@ export default {
|
|
|
}
|
|
|
let newVar = {
|
|
|
id: node.id,
|
|
|
- label: node.projectName,
|
|
|
+ label: node.projectName || node.name,
|
|
|
children: node.children,
|
|
|
- isDisabled: node.type === '1'
|
|
|
+ isDisabled: node.type === '分类'
|
|
|
};
|
|
|
return newVar;
|
|
|
},
|
|
|
@@ -562,8 +562,8 @@ export default {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
this.title = "添加任务";
|
|
|
- listProject('1').then(response => {
|
|
|
- this.projectOptions = this.handleTree(response.data, "id");
|
|
|
+ getProjectTree().then(response => {
|
|
|
+ this.projectOptions = response.data
|
|
|
if (this.selectProjectId && this.projectOptions.length > 0) {
|
|
|
let ids = this.projectOptions.map(item => item.id);
|
|
|
if (ids.indexOf(this.selectProjectId) < 0) {
|
|
|
@@ -571,7 +571,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.$set(this.form, 'priority', '4')
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
async handleEdit(row) {
|
|
|
this.open = true;
|
|
|
@@ -588,8 +588,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
))
|
|
|
- arr.push(listProject().then(response => {
|
|
|
- this.projectOptions = this.handleTree(response.data, "id");
|
|
|
+ arr.push(getProjectTree().then(response => {
|
|
|
+ this.projectOptions = response.data
|
|
|
}))
|
|
|
await Promise.all(arr)
|
|
|
this.$set(this.form, 'rangeDate', [row.beginDate, row.endDate])
|