|
|
@@ -54,6 +54,7 @@
|
|
|
>
|
|
|
|
|
|
<el-button
|
|
|
+ @click="uploadFile"
|
|
|
v-if="currentNodeData.bomType == 1"
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
@@ -148,7 +149,7 @@
|
|
|
</el-tree>
|
|
|
</div>
|
|
|
|
|
|
- <template v-slot:content>
|
|
|
+ <template v-slot:content v-if="isNotData">
|
|
|
<baseInfo :dataInfo="currentNodeData" />
|
|
|
|
|
|
<el-tabs
|
|
|
@@ -160,6 +161,21 @@
|
|
|
<el-tab-pane label="属性" name="属性">
|
|
|
<attribute :attributeData="currentNodeData"></attribute>
|
|
|
</el-tab-pane>
|
|
|
+
|
|
|
+ <el-tab-pane
|
|
|
+ :label="
|
|
|
+ currentNodeData.bomType == 1
|
|
|
+ ? 'PBOM明细表'
|
|
|
+ : currentNodeData.bomType == 2
|
|
|
+ ? 'MBOM明细表'
|
|
|
+ : currentNodeData.bomType == 3
|
|
|
+ ? 'ABOM明细表'
|
|
|
+ : 'EBOM明细表'
|
|
|
+ "
|
|
|
+ name="明细表"
|
|
|
+ >
|
|
|
+ <detailedList :attributeData="currentNodeData"></detailedList>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</template>
|
|
|
</ele-split-layout>
|
|
|
@@ -171,6 +187,13 @@
|
|
|
@close="baseClose"
|
|
|
:categoryObj="currentNodeData"
|
|
|
></baseInfoSave>
|
|
|
+
|
|
|
+
|
|
|
+ <importDialog
|
|
|
+ :defModule="moudleName"
|
|
|
+ ref="importDialogRef"
|
|
|
+ @success="getTreeData"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -187,9 +210,11 @@
|
|
|
import baseInfo from './components/baseInfo.vue';
|
|
|
import baseInfoSave from './components/baseInfoSave.vue';
|
|
|
import attribute from './components/attribute.vue';
|
|
|
+ import detailedList from './components/detailedList.vue';
|
|
|
+ import importDialog from './qualityTesting/import-dialog.vue';
|
|
|
|
|
|
export default {
|
|
|
- components: { baseInfo, baseInfoSave, attribute },
|
|
|
+ components: { baseInfo, baseInfoSave, attribute, detailedList , importDialog},
|
|
|
data() {
|
|
|
return {
|
|
|
drawer: false,
|
|
|
@@ -218,7 +243,10 @@
|
|
|
|
|
|
activeName: '属性',
|
|
|
|
|
|
- baseInfoShow: false
|
|
|
+ baseInfoShow: false,
|
|
|
+ isNotData: true,
|
|
|
+
|
|
|
+ moudleName: 'mainUser',
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -239,6 +267,7 @@
|
|
|
},
|
|
|
|
|
|
bomChange(e) {
|
|
|
+ this.searchObj.versions = ''
|
|
|
this.currentNodeData.bomType = e;
|
|
|
this.getTreeData();
|
|
|
this.getVersion();
|
|
|
@@ -258,11 +287,13 @@
|
|
|
if (res.data?.length > 0) {
|
|
|
this.treeList = res.data;
|
|
|
this.$nextTick(() => {
|
|
|
+ this.isNotData = true;
|
|
|
// 默认高亮第一个
|
|
|
this.$refs.treeRef.setCurrentKey(res.data[0].id);
|
|
|
this.handleNodeClick(res.data[0]);
|
|
|
});
|
|
|
} else {
|
|
|
+ this.isNotData = false;
|
|
|
this.treeList = [];
|
|
|
}
|
|
|
return this.treeList;
|
|
|
@@ -299,10 +330,15 @@
|
|
|
versionList(param).then((res) => {
|
|
|
this.versList = res || [];
|
|
|
if (type == 'del' || type == 'add') {
|
|
|
- this.searchObj.versions =
|
|
|
+ if(this.versList.length >= 1) {
|
|
|
+ this.searchObj.versions =
|
|
|
this.versList[this.versList.length - 1].versions;
|
|
|
+ } else {
|
|
|
+ this.searchObj.versions = ''
|
|
|
+ }
|
|
|
+
|
|
|
this.getTreeData();
|
|
|
- }
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
|
|
|
@@ -348,7 +384,12 @@
|
|
|
this.getVersion('add');
|
|
|
}
|
|
|
this.baseInfoShow = false;
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ uploadFile() {
|
|
|
+ this.$refs.importDialogRef.open();
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|