|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
<!-- 架构主页面 -->
|
|
|
- <div class="framework">
|
|
|
+ <div class="framework height_100">
|
|
|
<el-container>
|
|
|
<el-header>
|
|
|
<div style="display: flex;justify-content: space-between;align-items:center;width:100%;padding:0 10px;">
|
|
|
<div>
|
|
|
- <p>{{ typesOf==1?'产品类别名称:':'产品名称:' }}{{ row.name }}</p>
|
|
|
+ <p>{{ row.type==1?'产品类别名称:':'产品名称:' }}{{ row.name }}</p>
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-button type="primary" size="small" @click="handleImport">导 入</el-button>
|
|
@@ -17,7 +17,7 @@
|
|
|
<div style="display:flex;margin-bottom:10px;">
|
|
|
<el-input v-model="productName" size="small" placeholder="请输入名称" style="margin-right:10px;"></el-input>
|
|
|
<el-button type="primary" size="small" @click="handleQuery">查询</el-button>
|
|
|
- <el-button v-if="typesOf=='1'" type="primary" size="small" @click="handleAppend">新增分类节点</el-button>
|
|
|
+ <el-button v-if="row.type=='1'" type="primary" size="small" @click="handleAppend">新增分类节点</el-button>
|
|
|
<el-dropdown v-else split-button type="primary" size="small" @click="handleAppend">
|
|
|
<span>新增分类节点</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
@@ -69,7 +69,7 @@
|
|
|
@on-sort="handleSort">
|
|
|
</component>
|
|
|
</el-main>
|
|
|
- <el-footer>
|
|
|
+ <el-footer class="pagination">
|
|
|
<el-pagination background layout="total, prev, pager, next, jumper" :current-page.sync="queryParams.current"
|
|
|
:page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="total">
|
|
|
</el-pagination>
|
|
@@ -80,7 +80,7 @@
|
|
|
|
|
|
<classifyNode ref="classifyNode" :treeDataPath="treeDataPath" @isSuccess="handleSuccess"></classifyNode>
|
|
|
<myImageViewer v-if="showImg" :on-close="closeViewer" :src="imgSrc"></myImageViewer>
|
|
|
- <myNodeCopy v-if="typesOf=='2'" ref="nodeCopy" :treeData="categoryTreeData" source="1" :checkStrictly="true" @checkId="handleChecked"></myNodeCopy>
|
|
|
+ <myNodeCopy v-if="row.type=='2'" ref="nodeCopy" :treeData="categoryTreeData" source="1" :checkStrictly="true" @checkId="handleChecked"></myNodeCopy>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
@@ -90,8 +90,12 @@ import frameworkTable from './view/table.vue'
|
|
|
import classifyNode from '../dialog/classifyNode.vue';
|
|
|
export default {
|
|
|
props: {
|
|
|
- row: Object,//name:产品名称或者是产品类别名称;id:产品id或者是产品类别id;typesof:类型
|
|
|
- typesOf: String,//1是产品类别分类架构,2是产品架构
|
|
|
+ name:{
|
|
|
+ type:String
|
|
|
+ },//产品名称或者是产品类别名称
|
|
|
+ id:{},//产品id或者是产品类别id
|
|
|
+ categoryId:{},//产品类别Id
|
|
|
+ type:{}//类型1是产品类别,2是产品
|
|
|
},
|
|
|
components: {
|
|
|
frameworkTable,
|
|
@@ -141,8 +145,17 @@ export default {
|
|
|
nodeId:null,
|
|
|
}
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ row(){
|
|
|
+ return {
|
|
|
+ name:this.name,
|
|
|
+ categoryId:this.categoryId,
|
|
|
+ id:this.id,
|
|
|
+ type:this.type
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
- this.row.typesOf = this.typesOf
|
|
|
// 请求数据(左侧tree)
|
|
|
this.getList()
|
|
|
// 请求列表的数据(右侧table)
|
|
@@ -150,7 +163,7 @@ export default {
|
|
|
// 请求架构路径
|
|
|
this.getPath()
|
|
|
// 请求类别的分类架构,用于复制类别架构至产品
|
|
|
- if (this.typesOf == '2') {
|
|
|
+ if (this.row.type == '2') {
|
|
|
this.getCategory()
|
|
|
}
|
|
|
|
|
@@ -304,7 +317,7 @@ export default {
|
|
|
fromType: 1,//类型:1产品类别,2产品,3技术分类,4自定义树
|
|
|
fromTypeId:this.row.categoryId,//类别id
|
|
|
toType: 2,//类型:1产品类别,2产品,3技术分类,4自定义树
|
|
|
- toTypeId: this.row.id,//产品或类别id
|
|
|
+ toTypeId: this.row.id,//产品id
|
|
|
toNodeId: this.nodeId,//放到哪一个节点下面
|
|
|
ifCopyChild:val.check,//是否有子节点
|
|
|
}
|
|
@@ -336,7 +349,7 @@ export default {
|
|
|
async getList() {
|
|
|
let params = {
|
|
|
name: this.productName,//事件名称
|
|
|
- type: this.typesOf,//类型:1产品类别,2产品,3技术分类,4自定义树
|
|
|
+ type: this.row.type,//类型:1产品类别,2产品,3技术分类,4自定义树
|
|
|
typeId: this.row.id,//产品或类别id
|
|
|
}
|
|
|
await this.$api.queryTreeNodeTree(params).then(res => {
|
|
@@ -356,7 +369,7 @@ export default {
|
|
|
if (item == 'name') {//产品名称
|
|
|
label = this.productName
|
|
|
} else if (item == 'type') {
|
|
|
- label = this.typesOf
|
|
|
+ label = this.row.type
|
|
|
} else if (item == 'typeId') {
|
|
|
label = this.row.id
|
|
|
} else {
|
|
@@ -399,7 +412,7 @@ export default {
|
|
|
...this.searchOption,//检索条件
|
|
|
orderDTOList: this.sort,//排序
|
|
|
// name: this.productName,//事件名称
|
|
|
- // type: this.typesOf,//类型:1产品类别,2产品,3技术分类,4自定义树
|
|
|
+ // type: this.row.type,//类型:1产品类别,2产品,3技术分类,4自定义树
|
|
|
// typeId: this.row.id,//产品或类别id
|
|
|
}
|
|
|
this.$api.queryTable(params).then(res => {
|
|
@@ -416,7 +429,7 @@ export default {
|
|
|
// 请求架构路径
|
|
|
getPath() {
|
|
|
let params = {
|
|
|
- type: this.typesOf,//区分产品架构、自定义树等
|
|
|
+ type: this.row.type,//区分产品架构、自定义树等
|
|
|
typeId: this.row.id,//产品或类别id
|
|
|
}
|
|
|
this.$api.queryTreePath(params).then(res => {
|