|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
components: { userSearch, Add, Edit },
|
|
|
props: {
|
|
|
// 类别id
|
|
|
- categoryId: [Number, String],
|
|
|
+
|
|
|
rootId: [Number, String],
|
|
|
},
|
|
|
data() {
|
|
|
@@ -98,21 +98,24 @@ export default {
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: 'name',
|
|
|
- label: '标准名称',
|
|
|
+ prop: 'code',
|
|
|
+ label: '标准编码',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110,
|
|
|
- slot: 'name',
|
|
|
+ slot: 'code',
|
|
|
},
|
|
|
|
|
|
+
|
|
|
+
|
|
|
{
|
|
|
- prop: 'code',
|
|
|
- label: '标准编码',
|
|
|
+ prop: 'name',
|
|
|
+ label: '标准名称',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110,
|
|
|
- slot: 'code',
|
|
|
+ slot: 'name',
|
|
|
},
|
|
|
|
|
|
+
|
|
|
|
|
|
{
|
|
|
prop: 'status',
|
|
|
@@ -163,19 +166,18 @@ export default {
|
|
|
...where,
|
|
|
pageNum: page,
|
|
|
size: limit,
|
|
|
- categoryLevelId: this.categoryId,
|
|
|
+ categoryLevelId: this.categoryLevelId || 12,
|
|
|
rootCategoryLevelId: this.rootId
|
|
|
});
|
|
|
},
|
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
|
-
|
|
|
- this.$refs.table.reload({ pageNum: 1, where: where , categoryLevelId: this.categoryId, rootCategoryLevelId: this.rootId});
|
|
|
+ this.$refs.table.reload({ pageNum: 1, where: where , categoryLevelId: this.categoryLevelId , rootCategoryLevelId: this.rootId});
|
|
|
},
|
|
|
|
|
|
/* 打开编辑弹窗 */
|
|
|
openAdd() {
|
|
|
- this.$refs.addRef.open(this.categoryId);
|
|
|
+ this.$refs.addRef.open(this.categoryLevelId);
|
|
|
},
|
|
|
|
|
|
openEdit(row) {
|
|
|
@@ -209,16 +211,18 @@ export default {
|
|
|
},
|
|
|
done() {
|
|
|
this.$refs.searchRef.search();
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ clickSearch(info){
|
|
|
+ this.categoryLevelId = info.id
|
|
|
+ this.rootCategoryLevelId = info.rootCategoryLevelId
|
|
|
+ this.reload()
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
- watch: {
|
|
|
- // 监听类别id变化
|
|
|
- categoryId() {
|
|
|
- this.reload();
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
};
|
|
|
</script>
|