修改打印

master
suixy 3 months ago
parent b55da58fb3
commit 3daf7343d4

@ -6,7 +6,7 @@
"license": "MIT",
"type": "module",
"scripts": {
"dev": "vite serve --mode development",
"dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 vite serve --mode development",
"build:prod": "node --max_old_space_size=8192 node_modules/vite/bin/vite.js build --mode production",
"build:dev": "vite build --mode development",
"preview": "vite preview",
@ -126,5 +126,87 @@
"@vue/runtime-core": "3.5.21",
"@vue/reactivity": "3.5.21",
"@vue/shared": "3.5.21"
},
"json": {
"tableData": [
{
"value1": "DRT10.00R2018PRT105",
"value2": "LH514",
"value3": 62.15,
"value4": 2,
"value5": 124.3
},
{
"value1": "TYRELAND11R22.518PREC088",
"value2": "LH806",
"value3": 48.78,
"value4": 2,
"value5": 97.56
},
{
"value1": "XBRI295/80R22.518PRXF0RZA",
"value2": "LH614",
"value3": 67.02,
"value4": 1,
"value5": 67.02
},
{
"value1": "昆仑12R22.518PRKT988",
"value2": "LH909",
"value3": 61.49,
"value4": 2,
"value5": 122.98
},
{
"value1": "昆仑14.00R25★★★KT701",
"value2": "LH1107",
"value3": 181.45,
"value4": 1,
"value5": 181.45
},
{
"value1": "昆仑14.00R25★★★KT702",
"value2": "LH1203",
"value3": 179.53,
"value4": 1,
"value5": 179.53
},
{
"value1": "昆仑275/80R22.518PRKT878 CK",
"value2": "LH414",
"value3": 53.31,
"value4": 1,
"value5": 53.31
},
{
"value1": "昆仑295/80R22.518PRKT852",
"value2": "LH611",
"value3": 63.07,
"value4": 1,
"value5": 63.07
},
{
"value1": "昆仑315/80R22.522PRKT851 N2",
"value2": "LH206",
"value3": 73.59,
"value4": 1,
"value5": 73.59
},
{
"value1": "昆仑315/80R22.522PRKT890",
"value2": "LH410",
"value3": 73.69,
"value4": 2,
"value5": 147.38
},
{
"value1": "昆仑385/65R22.524PRKT186 CK",
"value2": "LH313",
"value3": 72.01,
"value4": 1,
"value5": 72.01
}
],
"total": 10
}
}

@ -12,7 +12,10 @@ export const listPrintTemplateList = (query?: PrintTemplateListQuery): AxiosProm
return request({
url: '/system/printTemplateList/list',
method: 'get',
params: query
params: query,
headers: {
isToken: false,
},
});
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@ -43,8 +43,8 @@ import ElementIcons from '@/plugins/svgicon';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import VForm3 from 'vform3-builds';
import 'vform3-builds/dist/designer.style.css';
// import VForm3 from 'vform3-builds';
// import 'vform3-builds/dist/designer.style.css';
// permission control
import './permission';
@ -53,15 +53,15 @@ import './permission';
import i18n from '@/lang/index';
// vxeTable
import VXETable from 'vxe-table';
import 'vxe-table/lib/style.css';
// import VXETable from 'vxe-table';
// import 'vxe-table/lib/style.css';
import print from 'vue3-print-nb';
VXETable.config({
zIndex: 999999
});
// VXETable.config({
// zIndex: 999999
// });
// 修改 el-dialog 默认点击遮照为不关闭
import { ElDialog } from 'element-plus';
@ -73,6 +73,11 @@ import { register } from 'swiper/element/bundle';
import 'swiper/css/bundle';
register();
import * as echarts from 'echarts';
window.echarts = echarts;
const app = createApp(App);
@ -93,11 +98,11 @@ app.use(print);
app.use(HighLight);
app.use(ElementIcons);
app.use(ElementPlus);
app.use(VForm3);
// app.use(VForm3);
app.use(router);
app.use(store);
app.use(i18n);
app.use(VXETable);
// app.use(VXETable);
app.use(plugins);
// 自定义指令
directive(app);

@ -71,9 +71,6 @@
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router';
import axios from 'axios';
import request from '@/utils/request';
import { options } from './tool.js';
import { ElMessage, ElMessageBox } from 'element-plus';
import { addBoardApi, delBoardApi, editBoardApi, getBoardListApi } from '@/views/boardGenerate/api/boardList';

@ -16,6 +16,24 @@ import { NodeResizer } from '@vue-flow/node-resizer';
import { Handle, Position } from '@vue-flow/core';
import * as echarts from 'echarts';
let json = {
'tableData': [{
'value1': '测试数据1-1',
'value2': '测试数据1-2',
'value3': '测试数据1-3'
}, { 'value1': '测试数据2-1', 'value2': '测试数据2-2', 'value3': '测试数据2-3' }, {
'value1': '测试数据3-1',
'value2': '测试数据3-2',
'value3': '测试数据3-3'
}, { 'value1': '测试数据4-1', 'value2': '测试数据4-2', 'value3': '测试数据4-3' }, {
'value1': '测试数据5-1',
'value2': '测试数据5-2',
'value3': '测试数据5-3'
}, { 'value1': '测试数据6-1', 'value2': '测试数据6-2', 'value3': '测试数据6-3' }],
'total': 10
};
const props = defineProps({
ratioWidth: {
type: Number,
@ -62,7 +80,7 @@ const colorList = ['#9E87FF', '#73DDFF', '#fe9a8b', '#F56948', '#9E87FF'];
const getOption = () => {
const chartOption = {
title: {
text: props.data.options.title || '设备运行数量',
text: props.data.options.title || ' ',
textStyle: {
fontSize: 12,
fontWeight: 400,

@ -1,7 +1,8 @@
<template>
<div
:style="{width:props.dimensions.width*props.ratioWidth+'px',height:props.dimensions.height*props.ratioHeight+'px'}">
<NodeResizer @resizeEnd="(e) => $emit('resize', e)" color="#fff" v-if="!props.isView && !props.isHideHandle && props.selected" @resize="resize" />
<NodeResizer @resizeEnd="(e) => $emit('resize', e)" color="#fff"
v-if="!props.isView && !props.isHideHandle && props.selected" @resize="resize" />
<div class="custom-node"
:style="{width:props.dimensions.width*props.ratioWidth+'px',height:props.dimensions.height*props.ratioHeight+'px',pointerEvents:props.isView?'auto': 'none'}">
@ -122,7 +123,6 @@ watch(() => [JSON.parse(JSON.stringify(props.data?.options?.carouselImages || '[
nextTick(() => {
swiperShow.value = true;
});
console.log(list.value);
}
}, { deep: true, immediate: true });
const emit = defineEmits(['resize']);

@ -6,7 +6,7 @@
:style="{display:'inline-block',margin:'0 4px 4px 0'}"
:body-style="{padding:'4px 0'}">
<template #header>
<el-image style="width: 100%; height: 100%" :src="lineImg" fit="contain" />
<el-image style="width: 100%; height: 100%" :src="doc" fit="contain" />
</template>
<div class="moduleText">{{ i.templateName }}</div>
</el-card>
@ -17,7 +17,7 @@
<div
class="content"
v-for="pageData in pageDatas"
:style="{ pageBreakAfter: 'always', width: cmToPx(pageWidth) + 'px', height: cmToPx(pageHeight) + 'px', marginBottom: '4px' }"
:style="{ pageBreakAfter: 'always', width: cmToPx(pageWidth) + 'px', height: cmToPx(pageHeight) + 'px', marginBottom: '4px' ,transform: `scale(${zoom})`}"
>
<div v-for="i in nodes" class="node" :style="{ left: i.position?.x + 'px', top: i.position?.y + 'px' }">
<template v-if="i.type === 'text'">
@ -88,7 +88,6 @@
</div>
</div>
<div class="right">
{{ pageDatas }}
<el-dropdown split-button type="primary" @click="printFun" @command="switchPrinter" style="margin-right: 8px">
{{ printName() }}
<template #dropdown>
@ -122,8 +121,9 @@ import InputNode from './nodes/inputNode.vue';
import { useRoute } from 'vue-router';
import { isJSON } from '@/utils/scrin.js';
import { listPrintTemplateList } from '@/api/system/printTemplateList/index';
import lineImg from '@/views/boardGenerate/images/lineImg.png';
import doc from '@/assets/images/doc.png';
import { getSysPrintTemplateNodeList } from '@/api/system/printTemplateNode/index';
import { listPrintTemplateInfo } from '@/api/system/printTemplateInfo/index';
const printTemplateList = ref([]);
const route = useRoute();
@ -151,428 +151,9 @@ const printRef = ref();
const pageWidth = ref(21);
const pageHeight = ref(29.7);
const pageDatas = ref([]);
const zoom = ref(1)
const { cmToPx } = options;
const nodes = ref([]);
let printNode = `[
{
"id": "area_d14a13ad_1a78_4171_b54f_93d18abd528d",
"type": "area",
"dimensions": {
"width": 794,
"height": 1123
},
"computedPosition": {
"x": 0,
"y": 0,
"z": 0
},
"handleBounds": {
"source": null,
"target": null
},
"selected": false,
"dragging": false,
"resizing": false,
"initialized": false,
"isParent": true,
"position": {
"x": 0,
"y": 0
},
"data": {},
"events": {},
"name": "area"
},
{
"id": "text_1902a5ff_d7fc_4750_b634_8a88868f3ddb",
"type": "text",
"dimensions": {
"width": 94,
"height": 19
},
"computedPosition": {
"x": 151.1811023622047,
"y": 37.79527559055118,
"z": 1
},
"handleBounds": {
"source": null,
"target": null
},
"selected": false,
"dragging": false,
"resizing": false,
"initialized": false,
"isParent": false,
"position": {
"x": 151.1811023622047,
"y": 37.79527559055118
},
"data": {
"options": {
"default": "供应商",
"border": [
{
"type": "top",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "right",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "bottom",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "left",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
}
]
},
"outputData": {}
},
"events": {},
"name": "text",
"parentNode": "area_d14a13ad_1a78_4171_b54f_93d18abd528d",
"extent": "parent",
"style": {
"width": "94px",
"height": "19px"
}
},
{
"id": "text_899234fc_9ace_49c3_8127_fadeabcbd23d",
"type": "text",
"dimensions": {
"width": 94,
"height": 19
},
"computedPosition": {
"x": 150.97637795275588,
"y": 56.69291338582677,
"z": 1
},
"handleBounds": {
"source": null,
"target": null
},
"selected": false,
"dragging": false,
"resizing": false,
"initialized": false,
"isParent": false,
"position": {
"x": 150.97637795275588,
"y": 56.69291338582677
},
"data": {
"options": {
"default": "客户名称",
"border": [
{
"type": "top",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "right",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "bottom",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "left",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
}
]
},
"outputData": {}
},
"events": {},
"name": "text",
"parentNode": "area_d14a13ad_1a78_4171_b54f_93d18abd528d",
"extent": "parent",
"style": {
"width": "94px",
"height": "19px"
}
},
{
"id": "text_8da299d4_a35b_4ba9_bfac_860c200b6cf3",
"type": "text",
"dimensions": {
"width": 94,
"height": 19
},
"computedPosition": {
"x": 245.66929133858267,
"y": 56.69291338582677,
"z": 1
},
"handleBounds": {
"source": null,
"target": null
},
"selected": false,
"dragging": false,
"resizing": false,
"initialized": false,
"isParent": false,
"position": {
"x": 245.66929133858267,
"y": 56.69291338582677
},
"data": {
"options": {
"field": "name",
"default": "",
"border": [
{
"type": "top",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "right",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "bottom",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "left",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
}
]
},
"outputData": {}
},
"events": {},
"name": "text",
"parentNode": "area_d14a13ad_1a78_4171_b54f_93d18abd528d",
"extent": "parent",
"style": {
"width": "94px",
"height": "19px"
}
},
{
"id": "text_5a3a87dd_1697_43a1_9678_f20421e1f3df",
"type": "text",
"dimensions": {
"width": 396,
"height": 19
},
"computedPosition": {
"x": 245.66929133858267,
"y": 37.79527559055118,
"z": 1
},
"handleBounds": {
"source": null,
"target": null
},
"selected": false,
"dragging": false,
"resizing": false,
"initialized": false,
"isParent": false,
"position": {
"x": 245.66929133858267,
"y": 37.79527559055118
},
"data": {
"options": {
"field": "DONGLONG HOME TEXTILE CO..,LTD.",
"default": "DONGLONG HOME TEXTILE CO..,LTD.",
"border": [
{
"type": "top",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "right",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "bottom",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "left",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
}
]
},
"outputData": {}
},
"events": {},
"name": "text",
"parentNode": "area_d14a13ad_1a78_4171_b54f_93d18abd528d",
"extent": "parent",
"style": {
"width": "396px",
"height": "19px"
}
},
{
"id": "text_e9bde955_7c37_44d0_8c37_265ad44fdd9d",
"type": "text",
"dimensions": {
"width": 75,
"height": 19
},
"computedPosition": {
"x": 170.0787401574803,
"y": 302.3622047244094,
"z": 1
},
"handleBounds": {
"source": null,
"target": null
},
"selected": false,
"dragging": false,
"resizing": false,
"initialized": false,
"isParent": false,
"position": {
"x": 170.0787401574803,
"y": 302.3622047244094
},
"data": {
"options": {
"field": "deviceName",
"default": "",
"border": [
{
"type": "top",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "right",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "bottom",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
},
{
"type": "left",
"isShow": false,
"width": 1,
"color": "#000",
"borderType": "solid"
}
]
},
"outputData": {}
},
"events": {},
"name": "text",
"parentNode": "area_d14a13ad_1a78_4171_b54f_93d18abd528d",
"extent": "parent",
"style": {
"width": "75px",
"height": "19px"
}
},
{
"id": "QRCode_94877b0d_0e26_4a8e_b159_8d99120725a0",
"type": "QRCode",
"dimensions": {
"width": 189,
"height": 189
},
"computedPosition": {
"x": 415.74803149606294,
"y": 264.56692913385825,
"z": 1001
},
"handleBounds": {
"source": null,
"target": null
},
"selected": true,
"dragging": false,
"resizing": false,
"initialized": false,
"isParent": false,
"position": {
"x": 415.74803149606294,
"y": 264.56692913385825
},
"data": {
"options": {
"default": "123123121"
},
"outputData": {}
},
"events": {},
"name": "QRCode",
"parentNode": "area_d14a13ad_1a78_4171_b54f_93d18abd528d",
"extent": "parent"
}
]`;
const messageFun = (event) => {
console.log(event);
// if (isJSON(event.data)) {
@ -581,8 +162,7 @@ const messageFun = (event) => {
if (data.type === 'print') {
printFun();
}
if (data.type === 'JSONDATA') {
console.log(88);
if (data.type === 'JSONDATA') {
if (typeof data.message === 'object' && data.message !== null && !Array.isArray(data.message)) {
pageDatas.value = [data.message];
// window.chrome?.webview?.postMessage('setDataFinally');
@ -594,35 +174,37 @@ const messageFun = (event) => {
}
console.log('message', data.message);
}
if (data.type === 'setTemplate') {
nodes.value = JSON.parse(printNode || '[]');
}
// }
console.log(event);
};
const setNodes = (data) => {
// nodes.value = JSON.parse(printNode || '[]');
getSysPrintTemplateNodeList({ templateInfoId: data.templateInfoId }).then(v => {
nodes.value = v.data.map(vv => {
return {
id: vv.id,
type: vv.type,
name: vv.name,
dimensions: {
width: vv.width,
height: vv.height
},
handleBounds: {
source: null,
target: null
},
position: {
x: vv.x,
y: vv.y
},
data: JSON.parse(vv.data)
};
listPrintTemplateInfo({ templateListId: data.templateListId }).then(e => {
let templateInfoId = e.rows?.[0]?.templateInfoId;
getSysPrintTemplateNodeList({ templateInfoId }).then(v => {
nodes.value = v.data.map(vv => {
return {
id: vv.id,
type: vv.type,
name: vv.name,
dimensions: {
width: vv.width,
height: vv.height
},
handleBounds: {
source: null,
target: null
},
position: {
x: vv.x,
y: vv.y
},
data: JSON.parse(vv.data)
};
});
nextTick(() => {
zoom.value = ((printRef.value.offsetWidth - 20) / 793)
});
});
});
};
@ -759,6 +341,7 @@ defineExpose({
background-repeat: no-repeat;
background-size: 100% 100%;
border: 1px solid #ccc;
transform-origin: top left;
}
.node {
@ -767,7 +350,7 @@ defineExpose({
.left {
display: inline-block;
width: 550px;
width: 10vw;
height: 100vh;
overflow: auto;
margin-right: 50px;
@ -775,9 +358,10 @@ defineExpose({
.center {
display: inline-block;
width: calc(100% - 200px - 600px);
width: calc(100% - 10vw - 50px);
height: 100vh;
overflow: auto;
padding-top: 40px;
&::-webkit-scrollbar {
display: none;
@ -787,7 +371,10 @@ defineExpose({
.right {
vertical-align: top;
display: inline-block;
width: 200px;
width: 140px;
position: absolute;
right: 0;
top: 0;
}
</style>
<style>

@ -1,5 +1,5 @@
<template>
<div style="overflow:hidden;">
<div style="overflow:hidden;" v-loading="loading">
<div class="top">
<div style="line-height: 60px;margin-left: 12px;">
<el-button-group>
@ -20,14 +20,15 @@
<el-input v-model="zoomInput" disabled style="margin-left: 8px;width:100px" />
<el-button @click="zoomChange(0.1)" icon="ZoomIn" circle style="margin-left: 8px;" />
<el-button type="primary" @click="view" style="margin-left: 12px;">预览</el-button>
<el-button type="primary" @click="imp" style="margin-left: 12px;">场景1</el-button>
<!-- <el-button type="primary" @click="imp" style="margin-left: 12px;">场景1</el-button>-->
<el-button type="primary" @click="save" style="margin-left: 12px;">保存</el-button>
<el-button type="primary" @click="clear" style="margin-left: 12px;">清空</el-button>
</div>
</div>
<div class="bottom">
<div class="leftPanel">
<h4>基础组件</h4>
<!-- <h4>基础组件</h4>-->
<h4>组件</h4>
<el-tag :draggable="true" @dragstart="onDragStart($event, 'text',pid)" class="mx-1" size="large">文字</el-tag>
<el-tag :draggable="true" @dragstart="onDragStart($event, 'image',pid)" class="mx-1" size="large">图片</el-tag>
<el-tag :draggable="true" @dragstart="onDragStart($event, 'barCode',pid)" class="mx-1" size="large">条形码
@ -50,11 +51,11 @@
<!-- </el-tag>-->
<!-- <el-tag :draggable="true" @dragstart="onDragStart($event, 'circle',pid)" class="mx-1" size="large">圆形-->
<!-- </el-tag>-->
<h4>表单组件</h4>
<el-tag :draggable="true" @dragstart="onDragStart($event, 'text',pid,{name:'deviceName'})" class="mx-1"
size="large">
设备名称
</el-tag>
<!-- <h4>表单组件</h4>-->
<!-- <el-tag :draggable="true" @dragstart="onDragStart($event, 'text',pid,{name:'deviceName'})" class="mx-1"-->
<!-- size="large">-->
<!-- 设备名称-->
<!-- </el-tag>-->
</div>
<div class="content" @drop="onDrop">
<div class="flowArea" :style="{width:zoom * cmToPx(pageWidth)+'px',height:zoom * cmToPx(pageHeight)+'px'}">
@ -149,6 +150,9 @@
<el-input-number :min="12" :controls="false" v-model="nodeAttrForm.fontSize"
style="width: 100%" />
</el-form-item>
<el-form-item label="是否加粗" v-if="Object.keys(nodeAttrForm).includes('isBold')">
<el-switch v-model="nodeAttrForm.isBold" />
</el-form-item>
<el-form-item label="使用字典" v-if="Object.keys(nodeAttrForm).includes('dic')">
<el-select
v-model="nodeAttrForm.dic"
@ -176,6 +180,15 @@
/>
</el-select>
</el-form-item>
<el-form-item label="时间" v-if="Object.keys(nodeAttrForm).includes('dateTime')">
<el-date-picker
v-model="nodeAttrForm.dateTime"
type="datetime"
/>
</el-form-item>
<el-form-item label="时间格式" v-if="Object.keys(nodeAttrForm).includes('dateTimeFormat')">
<el-input v-model="nodeAttrForm.dateTimeFormat" style="width: 100%" />
</el-form-item>
<el-form-item v-if="Object.keys(nodeAttrForm).includes('selectOptions')" label="选项集合">
<el-input-tag
v-model="nodeAttrForm.selectOptions"
@ -409,7 +422,7 @@
</template>
<script setup lang="ts">
import { v4 as uuidv4 } from 'uuid';
import { useRouter } from 'vue-router';
import { useRoute } from 'vue-router';
import { useVueFlow, VueFlow } from '@vue-flow/core';
import { Background } from '@vue-flow/background';
import tool, { options } from './tool';
@ -426,13 +439,499 @@ import { updatePrintTemplateList } from '@/api/system/printTemplateList';
import { getPrintTemplateInfo, listPrintTemplateInfo, updatePrintTemplateInfo } from '@/api/system/printTemplateInfo';
import { getPrintTemplateNode, getSysPrintTemplateNodeList, updateTemplateNode } from '@/api/system/printTemplateNode';
import { listType } from '@/api/system/dict/type';
import { ElMessage } from 'element-plus';
const router = useRouter();
let obj = [
{
'templateInfoId': 5,
'id': 'text_94b0f100_e009_4f05_8e9e_b5fb47ee1ce9',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 396.8503937007874,
'y': 264.56692913385825,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"操作人","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_409bdd88_a0c1_401b_9358_4cf79e44cafc',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 37.79527559055118,
'y': 321.25984251968504,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"自检结果","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'select_a7ccbaaf_911c_4c81_ab88_a853503be3b0',
'type': 'select',
'name': 'select',
'width': 245,
'height': 56,
'x': 510.2362204724409,
'y': 264.56692913385825,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"UserListSel","dic":"","default":"","JScript":"","selectField":"UserList","selectOptions":[],"horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'select_ee7c1e26_818d_45e6_95c5_e5f21413ce57',
'type': 'select',
'name': 'select',
'width': 245,
'height': 56,
'x': 151.1811023622047,
'y': 321.25984251968504,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"ResultListSel","dic":"","default":"","JScript":"","selectField":"ResultList","selectOptions":["合格","不合格"],"horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_daf9fa77_5763_4ec8_a458_6c8188df6ffd',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 396.8503937007874,
'y': 321.25984251968504,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"有效期/天","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'inputNode_1cffa360_de94_40cd_8afb_90e0f0d3df08',
'type': 'inputNode',
'name': 'inputNode',
'width': 245,
'height': 56,
'x': 510.2362204724409,
'y': 321.25984251968504,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"default":"","horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_20742495_3bef_4eb1_b270_a5b593f01b05',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 37.79527559055118,
'y': 377.95275590551176,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"工装编号","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'inputNode_1fc55162_082b_42a3_b0b2_c20b5b40aaf9',
'type': 'inputNode',
'name': 'inputNode',
'width': 245,
'height': 56,
'x': 151.1811023622047,
'y': 377.95275590551176,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"default":"","horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_1df92c08_fb99_461b_9832_40e29ef6bd5e',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 396.8503937007874,
'y': 377.95275590551176,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"宽度/mm","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_7d8ead78_2f05_47d3_a2e4_bf04e16ccf4b',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 37.79527559055118,
'y': 434.64566929133855,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"开始时间","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_6d815e1f_3df9_465e_8c2f_242a77581921',
'type': 'text',
'name': 'text',
'width': 604,
'height': 57,
'x': 151.1811023622047,
'y': 434.64566929133855,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":" ","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_09537908_518c_4d40_aeac_21ed2c334cfd',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 37.79527559055118,
'y': 491.33858267716533,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"结束时间","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_12baf7dc_d8ea_4306_aca0_1da27748624b',
'type': 'text',
'name': 'text',
'width': 604,
'height': 57,
'x': 151.1811023622047,
'y': 491.33858267716533,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":" ","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_da7367c2_4ea1_49e3_8410_071396e02e1d',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 37.79527559055118,
'y': 548.0314960629921,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"数量","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_77a8a5b8_1331_4223_b0bd_bc2422046cd2',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 396.8503937007874,
'y': 548.0314960629921,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"单位","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_1179727a_8d5f_4831_a35b_0ebab4a34947',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 37.79527559055118,
'y': 604.7244094488188,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"车次/批次","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_dd1cf0cc_3d03_4bf3_90f8_41a96a59d727',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 396.8503937007874,
'y': 604.7244094488188,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"连续打印数","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'inputNode_2d06f82c_469e_4244_9127_9683949fe34e',
'type': 'inputNode',
'name': 'inputNode',
'width': 245,
'height': 56,
'x': 151.1811023622047,
'y': 548.0314960629921,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"default":"","horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'select_5e3c5ac3_7c11_4a72_8201_6a7bf472f4e3',
'type': 'select',
'name': 'select',
'width': 245,
'height': 56,
'x': 510.2362204724409,
'y': 548.0314960629921,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"UnitListSel","dic":"","default":"","JScript":"","selectField":"UnitList","selectOptions":[],"horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'inputNode_582e7d7a_a65b_413a_b9cb_8d695554dc6d',
'type': 'inputNode',
'name': 'inputNode',
'width': 245,
'height': 56,
'x': 151.1811023622047,
'y': 604.7244094488188,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"default":"","horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'inputNode_5bb7be18_19f3_48ad_baed_99bcbc00bc9b',
'type': 'inputNode',
'name': 'inputNode',
'width': 245,
'height': 56,
'x': 510.2362204724409,
'y': 604.7244094488188,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"default":"","horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_e085f85d_5313_4564_8bfe_6edb367d81cd',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 37.79527559055118,
'y': 661.4173228346456,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"备注","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'inputNode_d9318360_2e28_468c_afb2_a2d91d6f4715',
'type': 'inputNode',
'name': 'inputNode',
'width': 245,
'height': 56,
'x': 151.1811023622047,
'y': 661.4173228346456,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"default":"","horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_7225b39c_d9b0_4b0d_b37d_61b2b8a1421c',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 396.8503937007874,
'y': 661.4173228346456,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"工位","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'select_7633de51_0735_43fb_86f2_bcff43ca1bcd',
'type': 'select',
'name': 'select',
'width': 245,
'height': 56,
'x': 510.2362204724409,
'y': 661.4173228346456,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"StationListSel","dic":"","default":"","JScript":"","selectField":"StationList","selectOptions":[],"horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_c6360050_c623_497a_be89_1f33d57e5294',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 37.79527559055118,
'y': 718.1102362204724,
'parentNode': 'area_4be8ea51_d03c_4d9b_833a_decf81486a93',
'data': '{"options":{"field":"","horizontalAlign":"center","default":"条形码","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'barCode_30a0ac1d_e823_423c_9103_2485ab83e78a',
'type': 'barCode',
'name': 'barCode',
'width': 604,
'height': 57,
'x': 151.1811023622047,
'y': 718.1102362204724,
'parentNode': null,
'data': '{"options":{"field":"","default":"","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_e9531742_1a0e_4081_92c0_a3078b6d565d',
'type': 'text',
'name': 'text',
'width': 113,
'height': 58,
'x': 37.79527559055118,
'y': 263.66929133858264,
'parentNode': null,
'data': '{"options":{"field":"","horizontalAlign":"center","default":"机台","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_d4a02b06_9879_4391_96b2_a88e65d5ec45',
'type': 'text',
'name': 'text',
'width': 245,
'height': 57,
'x': 151.1811023622047,
'y': 264.56692913385825,
'parentNode': null,
'data': '{"options":{"field":"MachineName","horizontalAlign":"center","default":" ","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_da74eee9_cd5f_42ff_91d4_7a4ba4dad25f',
'type': 'text',
'name': 'text',
'width': 113,
'height': 58,
'x': 37.79527559055118,
'y': 207.87401574803147,
'data': '{"options":{"field":"","horizontalAlign":"center","default":"物料规格","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_02410e87_87b6_48f8_9d11_19d0c2bfc13d',
'type': 'text',
'name': 'text',
'width': 604,
'height': 57,
'x': 151.1811023622047,
'y': 207.87401574803147,
'data': '{"options":{"field":"MaterialSpec","horizontalAlign":"center","default":"","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_c013b2fe_8ded_48d6_a9b3_53ab66355c17',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 37.79527559055118,
'y': 151.1811023622047,
'data': '{"options":{"field":"","horizontalAlign":"center","default":"班次","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_2910ecd1_e0b1_4de0_8e97_c3117c09df78',
'type': 'text',
'name': 'text',
'width': 245,
'height': 57,
'x': 151.1811023622047,
'y': 151.1811023622047,
'data': '{"options":{"field":"ClassesName","horizontalAlign":"center","default":" ","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_a0e85857_475f_4693_806c_786a895d399a',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 396.8503937007874,
'y': 151.1811023622047,
'data': '{"options":{"field":"","horizontalAlign":"center","default":"班组","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_8a3c400c_1cb2_4ca0_bce8_0ec8f1c18867',
'type': 'text',
'name': 'text',
'width': 245,
'height': 57,
'x': 510.2362204724409,
'y': 151.1811023622047,
'data': '{"options":{"field":"TeamName","horizontalAlign":"center","default":" ","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_6c5b0121_5a90_47f2_b3d6_0688e1d7ede1',
'type': 'text',
'name': 'text',
'width': 113,
'height': 58,
'x': 37.79527559055118,
'y': 94.48818897637794,
'data': '{"options":{"field":"","horizontalAlign":"center","default":"计划号","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":true,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_568e98ea_0e2d_4af1_b06a_d581323faa1c',
'type': 'text',
'name': 'text',
'width': 245,
'height': 57,
'x': 151.1811023622047,
'y': 94.48818897637794,
'data': '{"options":{"field":"PlanCode","horizontalAlign":"center","default":" ","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_cabf1e71_f957_4a79_9ffb_c1e5c165e8f3',
'type': 'text',
'name': 'text',
'width': 113,
'height': 57,
'x': 396.8503937007874,
'y': 94.48818897637794,
'data': '{"options":{"field":"","horizontalAlign":"center","default":"卡片编号","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_dc409f72_a849_4100_a328_c6407f3c075e',
'type': 'text',
'name': 'text',
'width': 245,
'height': 57,
'x': 510.2362204724409,
'y': 94.48818897637794,
'data': '{"options":{"field":"CardRecordCode","horizontalAlign":"center","default":" ","isBold":false,"fontSize":14,"border":[{"type":"top","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'text_20440da6_4bd0_4b16_aa2e_ee9d0bc6339a',
'type': 'text',
'name': 'text',
'width': 793,
'height': 94,
'x': 0,
'y': 0,
'data': '{"options":{"field":"","horizontalAlign":"center","default":"生产流转卡","isBold":true,"fontSize":24,"border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
},
{
'templateInfoId': 5,
'id': 'inputNode_3f98a70f_be42_4bfc_9e5d_007d57eb929b',
'type': 'inputNode',
'name': 'inputNode',
'width': 245,
'height': 56,
'x': 510.2362204724409,
'y': 377.95275590551176,
'data': '{"options":{"default":"","horizontalAlign":"center","verticalAlign":"center","border":[{"type":"top","isShow":false,"width":1,"color":"#000","borderType":"solid"},{"type":"right","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"bottom","isShow":true,"width":1,"color":"#000","borderType":"solid"},{"type":"left","isShow":false,"width":1,"color":"#000","borderType":"solid"}]},"outputData":{}}'
}
];
const router = useRoute();
const { updateNode } = useVueFlow();
//
const { onDragStart, onDrop, onDragOver } = tool();
const { cmToPx } = options;
const internalInstance = getCurrentInstance();
const loading = ref(false);
const data = {
planCode:'1',
@ -535,22 +1034,21 @@ const zoomChange = (e) => {
const view = () => {
localStorage.setItem('printNodes', JSON.stringify(nodes.value));
console.log();
internalInstance.appContext.config.globalProperties.$openPrint([data, data, data], 'demo1');
// isView.value = true;
};
const save = () => {
loading.value = true;
localStorage.setItem('printNodes', JSON.stringify(nodes.value));
updatePrintTemplateInfo({
templateInfoId: pageId.value,
templateListId: router.currentRoute.value.query.id,
templateListId: router.query.id,
paperType: pageType.value === 'zdy' ? '自定义' : pageType.value,
width: pageWidth.value,
height: pageHeight.value,
activeFlag: '1'
});
console.log(nodes.value);
updateTemplateNode(
nodes.value.map(e => {
return {
@ -566,7 +1064,15 @@ const save = () => {
data: JSON.stringify(e.data)
};
})
);
).then((e) => {
loading.value = false;
if (e.code === 200) {
ElMessage({
message: '保存成功',
type: 'success'
});
}
})
};
const clear = () => {
pid.value = `area_${uuidv4().replaceAll('-', '_')}`
@ -602,9 +1108,11 @@ onMounted(() => {
// nodes.value = JSON.parse(nodesData);
// pid.value = nodes.value.find(e => e.name === 'area')?.id;
// }
listPrintTemplateInfo({ templateListId: router.currentRoute.value.query.id }).then(e => {
let data = e.rows[0] || {};
loading.value = true;
listPrintTemplateInfo({ templateListId: router.query.id }).then(e => {
let data = e.rows[0];
console.log(data);
if (!data) return;
pageType.value = (data.paperType || 'A4') === '自定义' ? 'zdy' : data.paperType;
pageId.value = data.templateInfoId;
pageWidth.value = data.width || 21;
@ -642,7 +1150,7 @@ onMounted(() => {
} else {
clear();
}
console.log(nodes.value);
loading.value = false;
});
});
});

@ -5,12 +5,11 @@
:max-height="pageSize.height" color="#000"
v-if="!props.isView && !props.isHideHandle && props.selected" />
<div class="custom-node"
:style="{ width:props.dimensions.width+'px',lineHeight:props.dimensions.height+'px',height:props.dimensions.height+'px',pointerEvents:props.isView?'auto': 'none'}">
:style="{ ...border(),width:props.dimensions.width+'px',lineHeight:props.dimensions.height+'px',height:props.dimensions.height+'px',pointerEvents:props.isView?'auto': 'none'}">
<img
v-if="eleData"
:width="props.dimensions.width+'px'"
:height="props.dimensions.height+'px'"
:style="{ width:props.dimensions.width+'px',height:props.dimensions.height+'px',objectFit:'contain' }"
:height="props.dimensions.height +'px'"
:style="{ marginTop:'2px',height:props.dimensions.height - 4 +'px',objectFit:'contain' }"
:id="'barcode'+props.id+props.index" />
</div>
</div>
@ -61,12 +60,37 @@ const props = defineProps({
});
const eleData = ref('');
const border = () => {
let res = {};
if (props.data.options.border) {
let top = props.data.options.border.find(e => e.type === 'top');
let right = props.data.options.border.find(e => e.type === 'right');
let bottom = props.data.options.border.find(e => e.type === 'bottom');
let left = props.data.options.border.find(e => e.type === 'left');
if (top.isShow) {
res['borderTop'] = `${top.width}px ${top.borderType} ${top.color}`;
}
if (right.isShow) {
res['borderRight'] = `${right.width}px ${right.borderType} ${right.color}`;
}
if (bottom.isShow) {
res['borderBottom'] = `${bottom.width}px ${bottom.borderType} ${bottom.color}`;
}
if (left.isShow) {
res['borderLeft'] = `${left.width}px ${left.borderType} ${left.color}`;
}
}
return res;
};
const getEleData = () => {
if (props.isView) {
eleData.value = props.data.options.field ? props.pageData?.[props.data.options.field] : props.data.options.default;
eleData.value = (props.data.options.field ? props.pageData?.[props.data.options.field] : props.data.options.default);
} else {
eleData.value = props.data.options.default || '1234567890abc';
}
console.log(props.isView);
console.log(eleData.value);
};
onMounted(() => {
getEleData();
@ -98,6 +122,7 @@ watch(() => JSON.parse(JSON.stringify(props.data.options.default)), (obj1, obj2)
<style scoped>
.custom-node {
position: absolute;
text-align: center;
}
</style>

@ -66,6 +66,16 @@ watch(() => JSON.parse(JSON.stringify(props.data.options.default)), (obj1, obj2)
}
}, { deep: true, immediate: true });
const getEleData = () => {
if (props.isView) {
text.value = props.data.options.field ? props.pageData?.[props.data.options.field] : props.data.options.default;
} else {
text.value = props.data.options.default;
}
};
onMounted(() => {
getEleData();
});
const border = () => {
let res = {};
if (props.data.options.border) {
@ -105,12 +115,13 @@ const border = () => {
.span {
text-align: center;
width: 100%;
font-size: 14px;
}
}
.inputEl {
border-bottom: 1px solid #409EFF;
text-align: center;
:deep(.el-input__wrapper) {
padding: 0 !important;
@ -118,6 +129,10 @@ const border = () => {
box-shadow: none;
}
:deep(.el-input__inner) {
text-align: center;
}
}
</style>

@ -166,6 +166,7 @@ const border = () => {
.span {
text-align: center;
width: 100%;
font-size: 14px;
}
}

@ -6,10 +6,10 @@
v-if="!props.isView && !props.isHideHandle && props.selected" />
<div class="custom-node"
:style="{...border(),justifyContent: 'center',textAlign:props.data.options.horizontalAlign,width:props.dimensions.width+'px',lineHeight:props.dimensions.height+'px',height:props.dimensions.height+'px',pointerEvents:props.isView?'auto': 'none',}">
:style="{...border(),justifyContent: 'center',textAlign:props.data.options.horizontalAlign,width:props.dimensions.width+'px',height:props.dimensions.height+'px',pointerEvents:props.isView?'auto': 'none',}">
<span
v-if="eleData"
:style="{color:props.data.options.color,fontSize:props.data.options.fontSize+'px'}">
:style="{color:props.data.options.color,fontSize:props.data.options.fontSize+'px',fontWeight:props.data.options.isBold?'bold':'normal'}">
<!-- :style="{color:props.data.options.color,fontSize:props.dimensions.height+'px'}">-->
{{ eleData }}
</span>
@ -92,6 +92,9 @@ const border = () => {
<style scoped>
.custom-node {
position: absolute;
display: flex;
align-items: center;
overflow: auto
}
</style>

@ -52,9 +52,9 @@ const props = defineProps({
const eleData = ref('');
const getEleData = () => {
if (props.isView) {
eleData.value = dayjs().format('YYYY-MM-DD HH:mm:ss');
eleData.value = dayjs(props.data.options.dateTime || '').format(props.data.options.dateTimeFormat);
} else {
eleData.value = dayjs().format('YYYY-MM-DD HH:mm:ss');
eleData.value = dayjs(props.data.options.dateTime || '').format(props.data.options.dateTimeFormat);
}
};
onMounted(() => {

@ -16,8 +16,7 @@ const getOption = (e, name) => {
let commonOption = { field: name || '' };
if (e === 'text') {
return {
...commonOption, horizontalAlign: 'center',
default: '',
...commonOption, horizontalAlign: 'center', default: '', isBold: false,
fontSize: 14,
border: [{ type: 'top', isShow: false, width: 1, color: '#000', borderType: 'solid' }, {
type: 'right', isShow: false, width: 1, color: '#000', borderType: 'solid'
@ -28,13 +27,20 @@ const getOption = (e, name) => {
} else if (e === 'image') {
return { ...commonOption, imageSrc: '', imageType: '' };
} else if (e === 'barCode') {
return { ...commonOption, default: '' };
return {
...commonOption,
default: '',
border: [{ type: 'top', isShow: false, width: 1, color: '#000', borderType: 'solid' }, {
type: 'right', isShow: false, width: 1, color: '#000', borderType: 'solid'
}, { type: 'bottom', isShow: false, width: 1, color: '#000', borderType: 'solid' }, {
type: 'left', isShow: false, width: 1, color: '#000', borderType: 'solid'
}]
};
} else if (e === 'QRCode') {
return { ...commonOption, default: '' };
} else if (e === 'dateTime') {
return {
...commonOption,
dateTimeType: '',
...commonOption, dateTimeType: '', dateTimeFormat: 'yyyy-MM-dd hh:mm:ss', dateTime: new Date().getTime(),
border: [{ type: 'top', isShow: false, width: 1, color: '#000', borderType: 'solid' }, {
type: 'right', isShow: false, width: 1, color: '#000', borderType: 'solid'
}, { type: 'bottom', isShow: false, width: 1, color: '#000', borderType: 'solid' }, {
@ -58,7 +64,7 @@ const getOption = (e, name) => {
};
} else if (e === 'inputNode') {
return {
default: '',
default: '', field: '',
horizontalAlign: 'center',
verticalAlign: 'center',
border: [{ type: 'top', isShow: false, width: 1, color: '#000', borderType: 'solid' }, {

@ -1,7 +1,7 @@
<template>
<el-dialog v-model="isView" title="预览" :close-on-press-escape="false" :show-close="false">
<div id="printInfo" ref="printRef">
<el-dialog v-model="isView" title="预览" :close-on-press-escape="false" :show-close="false">
<div id="printInfo" ref="printRef" v-if="isView">
<div class="content" v-for=" (pageData,index) in pageDatas"
:style="{pageBreakAfter: 'always',width: cmToPx(pageWidth)+'px',height: cmToPx(pageHeight)+'px',marginBottom:'4px'}">
<div v-for="i in nodes" class="node" :style="{left:i.position?.x+'px',top: i.position?.y+'px'}">

Loading…
Cancel
Save