XiaoRuby
2023-08-23 a86686b6535c5855e9609c8f0f0359887a2e94d9
8-23组织架构开始编写
已修改3个文件
已添加1个文件
40 ■■■■ 文件已修改
src/api/standardLibrary.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/laboratory/organizational/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standardLibrary/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/standardLibrary.js
@@ -4,7 +4,9 @@
  return request({
    url: '/material/list',
    method: 'get',
    params
    params: {
      specificationName: params
    }
  })
}
src/router/index.js
@@ -334,7 +334,14 @@
        name: 'Personnel',
        component: () => import('@/views/laboratory/personnel/index'),
        meta: { title: '人员管理', icon: 'tree' }
      },{
      },
      {
        path: 'org',
        name: 'Organizational',
        component: () => import('@/views/laboratory/organizational/index.vue'),
        meta: { title: '组织架构', icon: 'tree'}
      },
      {
        path: 'role',
        name: 'Role',
        component: () => import('@/views/laboratory/role/index'),
src/views/laboratory/organizational/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
<template>
  <div>131</div>
</template>
<script>
export default {
  name: "Organizational",
};
</script>
<style></style>
src/views/standardLibrary/index.vue
@@ -2,7 +2,10 @@
  <div class="standard-library-main">
    <div class="content-main">
      <div class="library-bom" style="width: 300px">
        <el-input v-model="filterText" placeholder="输入关键字进行过滤" />
        <el-input
          v-model="filterText"
          placeholder="输入关键字进行过滤"
        ></el-input>
        <el-button type="text">全部</el-button>
        <el-tree
          ref="tree"
@@ -202,6 +205,7 @@
    },
    // èŽ·å–bom树的标准数据
    async getStandardTree() {
      console.log(`output->执行力`, "执行力");
      const { data } = await getMaterialList();
      this.standardTree = data.map((item) => {
        let name = null;
@@ -224,10 +228,12 @@
      const treeOptions = JSON.parse(JSON.stringify(this.standardTree));
      this.getDefault(treeOptions, 0);
      this.formTypeOptions = treeOptions;
      console.log(`output->===========`, "===========");
      this.$nextTick().then(() => {
        const firstNode = document.querySelector(
          ".el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node"
        );
        console.log(`output->firstNode`, firstNode);
        firstNode.click();
        // console.log(firstNode);
      });
@@ -248,6 +254,7 @@
      // æ˜¯å­èŠ‚ç‚¹
      if (node.level === 4) {
        this.getParentData(node.parent, node.data.name);
        console.log(`output->this.msg`, this.msg);
        // å­˜ä¸‹é€‰ä¸­èŠ‚ç‚¹
        this.selectData = data;
        // eslint-disable-next-line prefer-const
@@ -316,7 +323,6 @@
    },
    async subAddTreeForm() {
      this.addTreeFormVisible = false;
      console.log(this.addTreeForm.addTypeArr.length);
      let res = null;
      try {
        switch (this.addTreeForm.addTypeArr.length) {
@@ -348,12 +354,14 @@
      console.log(res);
      this.$message.success("添加成功");
      this.addTreeForm = {};
      this.addTreeForm = {
        addTypeArr: [],
      };
      this.getStandardTree();
      this.getTableByClick(this.selectData);
    },
    changeCascader(data) {
      console.log(data);
      console.log(`output->----------`, data);
      this.addTreeForm.addTypeArr = data;
    },
    closeAddTreeForm() {