管道基础大数据平台系统开发-【前端】-新系統界面
lixuliang
2023-02-23 ae88973702ede604e33ae239a3a335fcfe904988
src/views/userManage/orgManage.vue
@@ -14,7 +14,7 @@
            node-key="id"
            :data="depList"
            :expand-on-click-node="false"
            :default-expand-all="true"
            :default-expanded-keys=openKey
            @node-click="handleNodeClick"
          >
          </el-tree>
@@ -79,7 +79,7 @@
        <div class="form_box">
          <el-divider class="eldivider" />
          <el-form
            style="min-height: 600px;overflow-y: auto;height: 500px;margin-top: 25px;"
            style="margin-top: 25px;  position: relative;"
            :model="itemdetail"
            ref="itemdetail"
            :rules="rules"
@@ -219,15 +219,17 @@
    </div>
    <el-dialog
      width="30%"
      top="5vh"
      top="2vh"
      :title="$t('common.append')"
      :visible.sync="dialogFormVisible"
    >
     <div style="height: 500px; overflow: auto">
      <el-form
        :model="ruleForm"
        ref="ruleForm"
        :rules="rules"
        label-position="top"
      >
        <el-form-item
          prop="name"
@@ -237,6 +239,7 @@
          <el-input
            v-model="ruleForm.name"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -246,6 +249,7 @@
          <el-input
            v-model="ruleForm.sname"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -255,6 +259,7 @@
          <el-input
            v-model="ruleForm.code"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -264,6 +269,7 @@
          <el-input
            v-model="ruleForm.uncode"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -273,6 +279,7 @@
          <el-input
            v-model="ruleForm.addr"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -282,6 +289,7 @@
          <el-input
            v-model="ruleForm.contact"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -291,6 +299,7 @@
          <el-input
            v-model="ruleForm.fax"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -300,6 +309,7 @@
          <el-input
            v-model="ruleForm.email"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -309,6 +319,7 @@
          <el-input
            v-model="ruleForm.post"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -318,6 +329,7 @@
          <el-input
            v-model="ruleForm.website"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
        <el-form-item
@@ -327,9 +339,11 @@
          <el-input
            v-model="ruleForm.bak"
            autocomplete="off"
            style="width:85%"
          ></el-input>
        </el-form-item>
      </el-form>
       </div>
      <div
        slot="footer"
        class="dialog-footer"
@@ -428,6 +442,7 @@
        name: [{ required: true, validator: validName, trigger: 'blur' }],
      },
      newNode: null,
      openKey: [1],
    };
  },
  methods: {
@@ -446,7 +461,7 @@
              this.$refs.tree.setCurrentKey(this.itemdetail.id);
            });
          }
        } else {
          this.$notify.error({
            title: res.code,
@@ -623,6 +638,7 @@
        .then(() => {
          //兄弟重新排序
          const parent = node.parent;
          this.openKey.push(parent.id)
          const children = parent.data.children || parent.data;
          children.splice(data.orderNum - 1, 1);
          children.forEach((item, index) => {
@@ -637,7 +653,6 @@
            updateDepTrees(children),
          ])
            .then((res) => {
              console.log(res);
              if (res[0].code == 200 && res[1].code == 200) {
                this.$message({
                  type: 'success',
@@ -767,6 +782,7 @@
        });
    },
    handleNodeClick(data, node) {
      this.openKey.push(data.id)
      this.newNode = node
      this.backUpData = JSON.stringify(data);
      this.itemdetail = JSON.parse(JSON.stringify(data));
@@ -848,6 +864,9 @@
    //   }
    // }
  },
  beforeDestroy() {
    this.openKey = [1]
  }
};
</script>
<style lang="less" scoped>
@@ -884,4 +903,10 @@
    }
  }
}
.btnBox{
  position: absolute;
  bottom: 0;
  right: 0;
}
</style>