浏览代码

uGantt提交优化

wyh 1 年之前
父节点
当前提交
08efa4c43a

+ 16 - 12
itdmWeb/src/views/module-iTDM/itdmGongdanMaster/uGantt.vue

@@ -580,18 +580,22 @@ export default {
       // this.dialogVisible = false
       // this.currentDbEdit = {}
       console.log(this.currentDbEdit)
-      this.currentDbEdit.jihuaStartDate = this.currentDbEdit.start_date ;
-      this.currentDbEdit.parent = this.currentDbEdit.pid ;
-      saveProjectJl(this.currentDbEdit).then((res) => {
-        console.log("提交返回",res)
-        if (res.success) {
-          this.$message.success('提交成功');
-          this.typeButton = null
-          this.dialogVisible = false
-          this.currentDbEdit = {}
-          this.getHjlist()
-        }
-      })
+      if (this.currentDbEdit.status == 3) {
+        this.currentDbEdit.jihuaStartDate = this.currentDbEdit.start_date ;
+        this.currentDbEdit.parent = this.currentDbEdit.pid ;
+        saveProjectJl(this.currentDbEdit).then((res) => {
+          console.log("提交返回",res)
+          if (res.success) {
+            this.$message.success('提交成功');
+            this.typeButton = null
+            this.dialogVisible = false
+            this.currentDbEdit = {}
+            this.getHjlist()
+          }
+        })
+      } else {
+        this.$message.error('不可修改');
+      }
     },
   }
 }

+ 7 - 1
itdmWeb/src/views/module-iTDM/itdmGongdanMaster/uGantt2.vue

@@ -120,7 +120,7 @@
         <span slot="footer" class="dialog-footer">
           <!-- <el-button @click="remove">删 除</el-button> -->
           <el-button @click="cancel">关 闭</el-button>
-          <el-button type="primary" @click="submit">确 定</el-button>
+          <el-button type="primary" @click="submit" v-if="status == 0">确 定</el-button>
         </span>
       </el-dialog>
     </uGantt>
@@ -286,6 +286,7 @@ export default {
       openRl: 1,
       showCalendarDialog: false,
       scheduleData: [],
+      status: undefined,
     }
   },
   created () {
@@ -460,6 +461,11 @@ export default {
     // 双击事件
     rowDblclick(current){
       console.log(current)
+      if (current.status == 0) {
+        this.status = 0
+      } else {
+        this.status = 1
+      }
       this.openRl = 1
       this.currentDbEdit = current
       this.title = this.currentDbEdit.sampleName + '-' + this.currentDbEdit.testItems + '-' + this.currentDbEdit.pm