|
|
@@ -24,8 +24,14 @@
|
|
|
<input type="number" id="template-height" v-model="template.height" class="form form-control">
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
- <label for="template-border">边框</label>
|
|
|
- <input type="number" id="template-border" v-model="template.border" class="form form-control">
|
|
|
+ <label for="template-border-type">边框类型</label>
|
|
|
+ <select class="form-control" id="template-border-type" v-model="template.borderStyle">
|
|
|
+ <option v-for="style in borderStyles" :value="style.value">@{{ style.name }}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="template-border-weight">边框大小</label>
|
|
|
+ <input type="number" id="template-border" v-model="template.borderWidth" class="form form-control">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="card-footer">
|
|
|
@@ -56,23 +62,23 @@
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label for="template-text-align">文本对齐方式</label>
|
|
|
- <select name="" id="template-text-align" v-model="template.justify_content" class="form form-control">
|
|
|
+ <select name="" id="template-text-align" v-model="template.justifyContent" class="form form-control">
|
|
|
<option v-for="justifyContent in justifyContents" :value="justifyContent.value">@{{ justifyContent.name }}</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label for="template-text-align">文本垂直对齐</label>
|
|
|
- <select name="" id="template-text-align" v-model="template.align_items" class="form form-control">
|
|
|
+ <select name="" id="template-text-align" v-model="template.alignItems" class="form form-control">
|
|
|
<option v-for="alignItem in alignItems" :value="alignItem.value">@{{ alignItem.name }}</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label for="template-font-size">字体大小</label>
|
|
|
- <input type="text" id="template-font-size" v-model="template.font_size" class="form form-control">
|
|
|
+ <input type="text" id="template-font-size" v-model="template.fontSize" class="form form-control">
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label for="template-font-weight">字体宽</label>
|
|
|
- <select id="template-font-weight" v-model="template.font_weight" class="form-control">
|
|
|
+ <select id="template-font-weight" v-model="template.fontWeight" class="form-control">
|
|
|
<option v-for="fontWeight in fontWeights" :value="fontWeight.value" >@{{ fontWeight.name }}</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
@@ -117,13 +123,19 @@
|
|
|
type:'',
|
|
|
width:200,
|
|
|
height:100,
|
|
|
- border:1,
|
|
|
- font_size:12,
|
|
|
+ borderStyle:'solid',
|
|
|
+ borderWidth:1,
|
|
|
+ fontSize:12,
|
|
|
text:'',
|
|
|
- font_weight:'normal', //normal lighter bold
|
|
|
- justify_content:'', //文字水平对齐方式
|
|
|
- align_items:'center', //文字垂直对齐
|
|
|
+ fontWeight:'normal', //normal lighter bold
|
|
|
+ justifyContent:'', //文字水平对齐方式
|
|
|
+ alignItems:'center', //文字垂直对齐
|
|
|
},
|
|
|
+ types:[
|
|
|
+ {name:"条纹码1",value:""},
|
|
|
+ {name:"条纹码2",value:""},
|
|
|
+ {name:"",value:""},
|
|
|
+ ],
|
|
|
fontWeights:[
|
|
|
{name:"正常",value:"normal"},
|
|
|
{name:"细体",value:"lighter"},
|
|
|
@@ -138,6 +150,11 @@
|
|
|
{name:"顶部",value:""},
|
|
|
{name:"居中",value:"center"},
|
|
|
{name:"底部",value:"flex-end"},
|
|
|
+ ],
|
|
|
+ borderStyles:[
|
|
|
+ {name:"默认边框",value:"solid"},
|
|
|
+ {name:"无边框",value:"none"},
|
|
|
+ {name:"虚线边框",value:"dashed"},
|
|
|
]
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -152,12 +169,12 @@
|
|
|
'display':'flex',
|
|
|
'width':this.template.width+'px',
|
|
|
'height':this.template.height+'px',
|
|
|
- 'border-style':'solid',
|
|
|
- 'border-width':this.template.border+'px',
|
|
|
- 'font-size':this.template.font_size+'px',
|
|
|
- 'font-weight':this.template.font_weight,
|
|
|
- 'justify-content':this.template.justify_content,
|
|
|
- 'align-items':this.template.align_items,
|
|
|
+ 'border-style':this.template.borderStyle,
|
|
|
+ 'border-width':this.template.borderWidth+'px',
|
|
|
+ 'font-size':this.template.fontSize+'px',
|
|
|
+ 'font-weight':this.template.fontWeight,
|
|
|
+ 'justify-content':this.template.justifyContent,
|
|
|
+ 'align-items':this.template.alignItems,
|
|
|
};
|
|
|
return style;
|
|
|
},
|
|
|
@@ -169,6 +186,7 @@
|
|
|
window.axios.post('{{url('apiLocal/maintenance/expressPrinting/part/create')}}',data).then(res=>{
|
|
|
if(res.data.success){
|
|
|
tempTip.showSuccess(res.data.data);
|
|
|
+ $('#saveModal').modal('hide');
|
|
|
return;
|
|
|
}
|
|
|
tempTip.show(res.data.message);
|