lyfO_o
2022-03-31 4a6b6d253451a14063df0659877f3d8c4ca921a5
src/views/safetyproduction/new.vue
@@ -112,7 +112,7 @@
        </div>
      </div>
    </div>
    <el-dialog title="添加" :visible.sync="dialogVisible" width="30%">
    <el-dialog title="添加" :visible.sync="dialogVisible" :close-on-click-modal="false" width="30%">
      <el-form ref="form" :model="form" label-width="100px">
        <el-form-item label="自查清单名称">
          <el-input v-model="form.inspectionName"></el-input>
@@ -220,13 +220,20 @@
          }
          this.treeList = Array.from(new Set(trees));
          var arr = this.checkSameDataA(this.list.itemList);
          console.log("tag", arr);
          for (var i = 0; i < arr.length; i++) {
            var capB = {
                safetySelfInspectionId: "",
                safetyInspectionItemId: "",
              }
              var cser=[]
              for(var j=0;j<arr[i].child.length;j++){
              capB.safetySelfInspectionId=arr[i].child[j].safetySelfInspectionId
              capB.safetyInspectionItemId=arr[i].child[j].safetyInspectionItemId
              cser.push(capB)
              }
              arr[i].id=cser
            console.log('tag', capB)
            arr[i].child = this.checkSameData(arr[i].child);
            arr[i].id = {
              safetySelfInspectionId: arr[i].child.safetySelfInspectionId,
              safetyInspectionItemId: arr[i].child.safetyInspectionItemId,
            };
          }
          this.lists = arr;
          console.log(this.lists);
@@ -286,7 +293,6 @@
            capB.safetySelfInspectionId = this.itemId;
            atte.push(capB);
          }
          console.log("数据", this.lists);
          capA.id = atte;
          capA.child = this.checkSameData(this.list);
          if (
@@ -339,19 +345,18 @@
      this.TreeB(currentObj.value);
    },
    handleClick(data) {
      console.log('tag', data.id)
      if (data.safetyInspectionItemId!=undefined) {
          this.$router.push({
      if (data.safetyInspectionItemId != undefined) {
        this.$router.push({
          path: "/reviewXG",
          query: {
            id: data.safetyInspectionItemId,
          },
        });
      } else{
         this.$router.push({
      } else {
        this.$router.push({
          path: "/reviewXG",
          query: {
            id:data.id
            id: data.id,
          },
        });
      }
@@ -360,6 +365,7 @@
      this.dialogVisible = true;
      this.form.status = type;
      var arr = [];
      console.log("数据", this.lists);
      for (var i = 0; i < this.lists.length; i++) {
        this.lists[i].id;
        for (var j = 0; j < this.lists[i].id.length; j++) {
@@ -384,6 +390,9 @@
              message: "新增成功",
              title: "成功",
            });
            this.$router.push({
              path:"/checklistself"
            });
          }
        });
      } else if (this.id == "编辑") {
@@ -396,6 +405,9 @@
            title: "成功",
          });
        });
         this.$router.push({
              path:"/checklistself"
            });
      }
    },
    btnsQX() {