Commit a5f8b414 by 肖康

x

parent 7a56d589
...@@ -83,20 +83,7 @@ class WebController extends Controller ...@@ -83,20 +83,7 @@ class WebController extends Controller
} }
public function design($request,$info){ public function design($request,$info){
// echo DNS1D::getBarcodeSVG('4445645656', 'PHARMA2T');
// echo DNS1D::getBarcodeHTML('4445645656', 'PHARMA2T',"2","10");
// echo '<img src="data:image/png,' . DNS1D::getBarcodePNG('4', 'C39+') . '" alt="barcode" />';
// echo DNS1D::getBarcodePNGPath('4445645656', 'PHARMA2T');
// echo '<img src="data:image/png;base64,' . DNS1D::getBarcodePNG('4', 'C39+') . '" alt="barcode" />';
// exit;
// echo DNS1D::getBarcodeSVG("4445645656", "C39","1","20");
// echo DNS2D::getBarcodeHTML("4445645656", "QRCODE","3","3");
// echo DNS2D::getBarcodePNGPath("4445645656", "PDF417");
// echo DNS2D::getBarcodeSVG("4445645656", "DATAMATRIX");
// echo '<img src="data:image/png;base64,' . DNS2D::getBarcodePNG("4", "PDF417") . '" alt="barcode" />';
// exit;
$info['title'] = '标签设计'; $info['title'] = '标签设计';
return view('web', $info); return view('web', $info);
......
...@@ -16,10 +16,6 @@ ...@@ -16,10 +16,6 @@
float: right float: right
} }
body {
background: #f2f2f2;
padding-left: 220px
}
.tag-content { .tag-content {
width: 1100px width: 1100px
...@@ -44,7 +40,7 @@ body { ...@@ -44,7 +40,7 @@ body {
border: 1px solid #ccc; border: 1px solid #ccc;
clear: both; clear: both;
padding: 15px; padding: 15px;
height: 100px height: 150px
} }
.tag-content .tag-tools .tips { .tag-content .tag-tools .tips {
...@@ -134,30 +130,31 @@ body { ...@@ -134,30 +130,31 @@ body {
font-size: 14px; font-size: 14px;
left: 0 left: 0
} }
.tag-edit h3{padding:20px 0}
.tag-content .tag-edit .edit-seclect .seclect-group { .tag-content .tag-edit .edit-seclect .seclect-group {
margin-right: 50px margin-right: 50px
} }
.tag-content .tag-edit .fztip { .tag-content .tag-edit .fztip {
margin-top: 10px;
font-size: 12px; font-size: 12px;
color: #999 color: #999
} }
.tag-content .tag-edit .edit-box { .edit-box {
background: #fff; background: #fff;
border: 1px solid #000; border: 1px solid #000;
padding: 15px 20px; padding: 15px 20px;
margin-top: 20px margin-top: 20px
} }
.tag-content .tag-edit .edit-box .edit-con { .edit-box .edit-con {
clear: both; clear: both;
position: relative; position: relative;
border: 1px solid #ccc border: 1px solid #ccc
} }
.tag-content .tag-edit .edit-box .edit-con div.gezi { .edit-box .edit-con div.gezi {
width: 20px; width: 20px;
height: 20px; height: 20px;
box-sizing: border-box; box-sizing: border-box;
...@@ -166,15 +163,15 @@ body { ...@@ -166,15 +163,15 @@ body {
border-right: 1px solid #ccc border-right: 1px solid #ccc
} }
.tag-content .tag-edit .edit-box .edit-con div.gezi.right0 { .edit-box .edit-con div.gezi.right0 {
border-right: 0px border-right: 0px
} }
.tag-content .tag-edit .edit-box .edit-con div.gezi.bottom0 { .edit-box .edit-con div.gezi.bottom0 {
border-bottom: 0px border-bottom: 0px
} }
.tag-content .tag-edit .edit-box .edit-con div.gezi.border0 { .edit-box .edit-con div.gezi.border0 {
border: 0px border: 0px
} }
...@@ -187,7 +184,7 @@ body { ...@@ -187,7 +184,7 @@ body {
} }
.tag-content .tag-edit .edit-value .tools { .tag-content .tag-edit .edit-value .tools {
background: #fff; background: #f2f2f2;
padding: 20px; padding: 20px;
display: none display: none
} }
...@@ -254,4 +251,4 @@ textarea:focus { ...@@ -254,4 +251,4 @@ textarea:focus {
.xuanzhuan { .xuanzhuan {
transform: rotate(90deg); transform: rotate(90deg);
transform-origin: left top transform-origin: left top
} }
\ No newline at end of file
var tag={ var tag={
hbisAct:0,//是否画布区域 hbisAct:0,//是否画布区域
isClick:0, isClick:0,
...@@ -6,6 +7,8 @@ var tag={ ...@@ -6,6 +7,8 @@ var tag={
tag.handle(); tag.handle();
}, },
editUi:function(){ editUi:function(){
$("body").attr("onselectstart","return false");
//编辑画布渲染样式 //编辑画布渲染样式
var gezilist=$(".tag-size").val().split("*"); var gezilist=$(".tag-size").val().split("*");
var gnum=(Number(gezilist[0])/20)*(Number(gezilist[1])/20); var gnum=(Number(gezilist[0])/20)*(Number(gezilist[1])/20);
...@@ -100,13 +103,14 @@ var tag={ ...@@ -100,13 +103,14 @@ var tag={
}) })
//鼠标移入画布 //鼠标移入画布
$(".edit-con").hover(function(event){ $("body").on("mouseover",".edit-con",function(e){
tag.hbisAct=1; tag.hbisAct=1;
},function(){ })
$("body").on("mouseout",".edit-con",function(e){
tag.hbisAct=0; tag.hbisAct=0;
}) })
//画布监听鼠标松开 //画布监听鼠标松开
$(".edit-con").mouseup(function(e){ $("body").on("mouseup",".edit-con",function(e){
var x,y; var x,y;
x=e.pageX-$(this).offset().left; //获取当前鼠标相对div的X坐标 x=e.pageX-$(this).offset().left; //获取当前鼠标相对div的X坐标
y=e.pageY-$(this).offset().top; //获取当前鼠标相对div的Y坐标 y=e.pageY-$(this).offset().top; //获取当前鼠标相对div的Y坐标
...@@ -125,8 +129,8 @@ var tag={ ...@@ -125,8 +129,8 @@ var tag={
} }
tag.isClick=0; tag.isClick=0;
})
});
//全局监听鼠标松开 //全局监听鼠标松开
$(document).mouseup(function(e){ $(document).mouseup(function(e){
$(document).off('mousemove.drag'); $(document).off('mousemove.drag');
...@@ -276,7 +280,21 @@ var tag={ ...@@ -276,7 +280,21 @@ var tag={
$(".wenben").val($(this).val()); $(".wenben").val($(this).val());
$(this).attr("wenben",$(this).val()) $(this).attr("wenben",$(this).val())
}); });
//页面提交
$(".submitx").click(function(){
var obj={
lableSize:$(".tag-size").val(),
lableBg:$(".tag-bgm").val(),
lableBorder:$(".tag-border").val()
}
$(".edit-box .edit-con .gezi").remove();
obj.html=$(".edit-box").html();
console.log(obj)
})
} }
} }
tag.init(); $(function(){
\ No newline at end of file tag.init();
})
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment