| | |
| | | height: 16, |
| | | fontSize: 11.25, |
| | | textAlign: "center", |
| | | textContentVerticalAlign: "middle" |
| | | textContentVerticalAlign: "middle", |
| | | type:'custom' |
| | | } |
| | | }, |
| | | { |
| | |
| | | height: 16, |
| | | fontSize: 11.25, |
| | | textAlign: "center", |
| | | textContentVerticalAlign: "middle" |
| | | textContentVerticalAlign: "middle", |
| | | type:'custom' |
| | | } |
| | | }, |
| | | { |
| | |
| | | height: 16, |
| | | fontSize: 11.25, |
| | | textAlign: "center", |
| | | textContentVerticalAlign: "middle" |
| | | textContentVerticalAlign: "middle", |
| | | type:'custom' |
| | | } |
| | | }, |
| | | { |
| | |
| | | height: 16, |
| | | fontSize: 11.25, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | textContentVerticalAlign: "middle", |
| | | type:'custom' |
| | | } |
| | | }, |
| | | { |
| | |
| | | height: 16, |
| | | fontSize: 11.25, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | textContentVerticalAlign: "middle", |
| | | type:'custom' |
| | | } |
| | | }, |
| | | { |
| | |
| | | height: 16, |
| | | fontSize: 11.25, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | textContentVerticalAlign: "middle", |
| | | type:'custom' |
| | | } |
| | | }, |
| | | { |
| | |
| | | height: 16, |
| | | fontSize: 11.25, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | textContentVerticalAlign: "middle", |
| | | type:'custom' |
| | | } |
| | | }, |
| | | { |
| | |
| | | height: 16, |
| | | fontSize: 11.25, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | textContentVerticalAlign: "middle", |
| | | type:'custom' |
| | | } |
| | | }, |
| | | |
| | |
| | | TgaStyleSet.value.forEach(item => { |
| | | let para = { |
| | | text: item.title, |
| | | field: item.options.field || item.options.title |
| | | field: item.options.field || item.options.title, |
| | | } |
| | | if(item.options.type){ |
| | | para.type = item.options.type |
| | | } |
| | | list.push(para) |
| | | }) |
| | |
| | | const tableFlag = json.panels[0].printElements.filter(item => item.options.field==='table') |
| | | json.panels[0].printElements.forEach((item,index) => { |
| | | if (item.options.field === 'table') { |
| | | const fields = json.panels[0].printElements[index].options.fields.filter(item => item.type) |
| | | const result = Object.fromEntries( |
| | | fields.map(item => [item.field, true]) // 转换成 [key, value] 数组 |
| | | ) |
| | | let funct = "function(value,row,index,options){return `" |
| | | json.panels[0].printElements[index].options.columns[0].forEach(item => { |
| | | if(item.field){ |
| | | if(item.field && !result[item.field ]){ |
| | | if (company.printShowTitle){ |
| | | funct += item.title+':${row.'+item.field+' || "" } <br>' |
| | | }else{ |
| | | funct += '${row.'+item.field+' || "" } <br>' |
| | | } |
| | | }else if(item.field && result[item.field]){ |
| | | funct += item.title+'<br>' |
| | | } |
| | | }) |
| | | funct+='`}' |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | hiprintTemplate.value.update(json) |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | const printOrder = (type) => { |
| | | const list = hiprintTemplate.value.getJson() |
| | | |
| | | list.panels[0].printElements.forEach(element => { |
| | | element.options.fontFamily = 'Arial' |
| | | if(element.printElementType.title!==''){ |