1.vue2-org-tree
2.样式修改:
css
.org-tree-container {
height: 100%;
}
.horizontal .org-tree-node-children {
padding-left: 70px !important;
}
.horizontal .org-tree-node-children::before {
width: 70px !important;
}
.org-tree-node-label-inner {
cursor: pointer;
}
3.一维码生成
javascript
barcode(item, index) {
let barCode = item;
let name = "#barcode" + index;
let flag = true;
if (index == 19) {
flag = false;
}
JsBarcode(name, item, {
format: "CODE128", //选择要使用的条形码类型
text: barCode, //显示文本
displayValue: flag, //是否在条形码下方显示文字
textPosition: "bottom", //设置文本的垂直位置
margin: 10, //设置条形码周围的空白边距
height: 70,
width: 1.3,
textMargin: 10,
fontSize: 22,
});
},
4.使用this.$refs.barcode1.innerHTML = "";清空打印值