diff --git a/src/views/warehouseManage/machinery/type-nw/index.vue b/src/views/warehouseManage/machinery/type-nw/index.vue index eebdb41..7e18a2a 100644 --- a/src/views/warehouseManage/machinery/type-nw/index.vue +++ b/src/views/warehouseManage/machinery/type-nw/index.vue @@ -708,6 +708,7 @@ export default { // pageNum: 1, // pageSize: 10, typeName: undefined, + level: '', // phonenumber: undefined, // status: undefined, // typeId: undefined @@ -848,7 +849,7 @@ export default { /** 查询新增页面-上级类型下拉树结构 */ getTreeData() { getMaTypeList().then((response) => { - this.treeOptions = response.data.rows + this.treeOptions = response.data }) }, /** 查询资产属性下拉 */ @@ -874,6 +875,7 @@ export default { // 节点单击事件 - 左侧树 handleNodeClick(data) { this.queryParams.typeId = data.id + this.queryParams.level = data.level this.handleQuery() }, // 取消按钮 diff --git a/src/views/warehouseManage/machinery/type/index.vue b/src/views/warehouseManage/machinery/type/index.vue index e6f7ff4..89ee73e 100644 --- a/src/views/warehouseManage/machinery/type/index.vue +++ b/src/views/warehouseManage/machinery/type/index.vue @@ -1227,7 +1227,7 @@ export default { }, /* 确定 */ onSubmit() { - const { id, typeName } = this.addFormParams + const { id, typeName,parentId } = this.addFormParams const addParams = { parentId: id, typeName, @@ -1235,6 +1235,7 @@ export default { const editParams = { typeId: id, typeName, + parentId } this.$refs['addFormParamsRef'].validate(async (valid) => {