From b57cfd46a1eaa0679480df5d805c25f48f7f5f42 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 14 十一月 2024 17:54:40 +0800
Subject: [PATCH] 产品自定义树
---
Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue | 62 ++++++++++++++++++++++++++++++-
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue | 4 +
Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js | 10 +++++
Source/plt-web/plt-web-ui/src/views/system/user/option.js | 5 ++
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue | 2
5 files changed, 78 insertions(+), 5 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js b/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js
index 3fd0dc4..22e6053 100644
--- a/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js
+++ b/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
+ });
+}
+
diff --git a/Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue b/Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue
index a8dc620..5107974 100644
--- a/Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue
+++ b/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>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue
index 8536661..c044f35 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Aciton/index.vue
+++ b/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();
},
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
index 0214151..16908cd 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
+++ b/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);
diff --git a/Source/plt-web/plt-web-ui/src/views/system/user/option.js b/Source/plt-web/plt-web-ui/src/views/system/user/option.js
index cf9c5d3..32672fc 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/user/option.js
+++ b/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;
+ // }
},
];
--
Gitblit v1.9.3