田源
2024-11-14 b57cfd46a1eaa0679480df5d805c25f48f7f5f42
产品自定义树
已修改5个文件
83 ■■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/user/option.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js
@@ -303,3 +303,13 @@
  });
}
// 产品树
export function getEbomInfo(params) {
  return request({
    url: "/api/dataTestController/getEbomInfo",
    method: "get",
    params
  });
}
Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue
@@ -1,10 +1,68 @@
<template>
  <p>产品自定义页面</p>
  <avue-tree ref="tree" v-loading="treeLoading" :data="treeData" :option="treeOption" @node-click="nodeClick">
  </avue-tree>
</template>
<script>
import {getEbomInfo} from "@/api/UI/uiDefine";
export default {
  name: "product"
  name: "product",
  props: {
    sourceData: {
      type: Array,
      default: {}
    },
    dataStore: {
      type: Array,
      default: []
    },
    paramVOS: {
      type: Array,
      default: {}
    }
  },
  data() {
    return {
      treeLoading: false,
      treeData: [],
      treeOption: {
        height: 'auto',
        menu: false,
        addBtn: false,
        defaultExpandAll: false,
        props: {
          label: 'text',
          value: 'oid',
          children: 'children',
        },
        lazy: true,
        treeLoad: (node, resolve) => {
          console.log(node);
          const params = {
            productNo: this.dataStore[0].productnumber,
            productOid: this.dataStore[0].oid,
            parentOid: node.level === 0 ? '' : node.data.oid
          }
          getEbomInfo(params).then(res => {
            console.log(res);
            resolve(res.data.data.map(item => {
              return {
                ...item,
                leaf: item.leaf
              }
            }))
          })
        }
      },
    }
  },
  created() {
    // console.log(this.sourceData);
    console.log(this.dataStore);
    // console.log(this.paramVOS);
  },
  methods: {}
}
</script>
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue
@@ -672,8 +672,8 @@
          this.$message.success('分类创建成功');
          this.getTreeList();
        }
        done();
      })
      done();
      loading();
    },
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
@@ -1112,7 +1112,8 @@
        text: data.text,
        oid: data.oid,
        itemType: 'text',
        itemName: data.data.name
        itemName: data.data.name,
        itemCols :"1"
      }
      console.log(data);
      const isDuplicate = this.formList.some(item => item.text === data.text);
@@ -1129,6 +1130,7 @@
      this.activeItem = item;
      this.activeItemIndex = index;
      this.form = {...item};
      // this.form.itemCols = "1";
      console.log(item);
      // console.log(item,index);
Source/plt-web/plt-web-ui/src/views/system/user/option.js
@@ -143,7 +143,7 @@
  },
  {
    label: '所属密级',
    prop: 'secretGradeText',
    prop: 'secretGrade',
    width: 100,
    sortable:true,
    type: 'select',
@@ -153,5 +153,8 @@
      value: 'key',
      res: "obj",
    },
    // formatter:(row,value,label)=>{
    //   return row.secretGrade === 0 ? '' : label;
    // }
  },
];