瀏覽代碼

架构bug修改

zhuhao 1 年之前
父節點
當前提交
7bf9d2ffe2

+ 2 - 2
src/views/product/components/dialog/classifyNode.vue

@@ -79,7 +79,7 @@ export default {
   },
   methods: {
     // 打开弹窗,data有值是编辑,productName是产品名称,newData有值是树节点上的新增
-    open(data, productName,newData) {
+    open(data, productName, newData) {
       if (data) {
         this.form = JSON.parse(JSON.stringify(data))
         this.title = '编辑产品架构'
@@ -88,7 +88,7 @@ export default {
         } 
       } else {
         this.title='新增产品架构'
-        if (newData.pathName) {
+        if (newData && newData.pathName) {
           this.form.parent_id=newData.pathName
         } else {
           this.form.parent_id=0

+ 5 - 5
src/views/product/components/framework/viewIndex.vue

@@ -5,7 +5,7 @@
       <el-header>
         <div style="display: flex;justify-content: space-between;align-items:center;width:100%;padding:0 10px;">
           <div>
-            <p>产品名称:{{ row.productName }}</p>
+            <p>产品名称:{{ row.name }}</p>
           </div>
           <div>
             <el-dropdown split-button type="primary" size="small" @click="handleCommand('0')" @command="handleCommand($event)">
@@ -280,7 +280,7 @@ export default {
       console.log(val, row);
       switch (val) {
         case '0'://编辑
-          this.$refs.classifyNode.open(row, this.row.productName)
+          this.$refs.classifyNode.open(row, this.row.name)
           break;
         case '1'://预览图片
           this.commandPackage(row)
@@ -335,7 +335,7 @@ export default {
     // 按钮新增分类节点/树节点新增
     handleAppend() {
       // console.log(this.row);
-      this.$refs.classifyNode.open(null, this.row.productName)
+      this.$refs.classifyNode.open(null, this.row.name)
     },
     // 根据产品名称查询产品
     handleQuery() {
@@ -358,12 +358,12 @@ export default {
     },
     // 树节点上的新增
     append(data, node) {
-      this.$refs.classifyNode.open(null, this.row.productName,data)
+      this.$refs.classifyNode.open(null, this.row.name,data)
       // console.log(data, node);
     },
     // 树节点上的编辑
     edit(data, node) {
-      this.$refs.classifyNode.open(data, this.row.productName)
+      this.$refs.classifyNode.open(data, this.row.name)
       // console.log(data, node);
     },
     // 树节点上的删除