@@ -47,13 +47,13 @@
- {{ formatDate(barcodeData?.createTime) }}
+ {{ formatDate(barcodeData.createTime) }}
@@ -90,15 +90,7 @@ const message = useMessage()
const dialogVisible = ref(false)
const barcodeRef = ref
>()
-const barcodeData = ref>({
- format: undefined,
- bizType: undefined,
- content: '',
- bizCode: '',
- bizName: '',
- status: undefined,
- createTime: undefined
-})
+const barcodeData = ref>({})
/** 打开弹窗 - 方式 1:直接传入数据 */
const open = (row: Partial) => {
@@ -125,14 +117,13 @@ const openByBusiness = async (bizId: number, bizType: number) => {
defineExpose({ open, openByBusiness })
-// DONE @AI:【晚点弄】打印可以在当前界面么?(AI 未修复原因:打印功能标注为后续处理,当前实现使用新窗口打印已可用)
/** 打印条码 */
+// TODO @芋艿(目前暂时不处理):后续支持打印的自定义;
const handlePrint = () => {
if (!barcodeRef.value) {
message.warning('条码组件未加载')
return
}
-
const base64 = barcodeRef.value.getImageBase64?.()
if (!base64) {
message.warning('条码生成失败,无法打印')
@@ -176,7 +167,6 @@ const handlePrint = () => {