yanshichao vor 10 Monaten
Ursprung
Commit
111eabf4c0
1 geänderte Dateien mit 7 neuen und 5 gelöschten Zeilen
  1. 7 5
      src/views/task/components/project.vue

+ 7 - 5
src/views/task/components/project.vue

@@ -251,18 +251,20 @@ export default {
       return {
         id: node.id,
         label: node.name || node.projectName,
-        children: node.children
+        children: node.children,
+        isDisabled: node.type != '1' && node.type != '分类'
       };
     },
     treeSelectChange(val) {
-      if (val.id === this.form.parentId) {
-        this.$message.error("上级结构不能自身节点")
+      if (val.type === '项目') {
+        this.$message.error("上级结构不能选择项目")
         return
       }
       if (val.type === '1') {
         this.form.type = '2'
       } else {
-        this.form.type = '3'
+        // this.form.type = '3'
+        this.form.type = '2'
       }
     },
     /** 更多操作触发 */
@@ -353,7 +355,7 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          if(this.$refs.auditModule){
+          if (this.$refs.auditModule) {
             this.form['auditConfigs'] = this.$refs.auditModule.getAuditConfigs()
           }