Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
note-library
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a5f8b414
authored
May 11, 2020
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
x
parent
7a56d589
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
36 deletions
app/Http/Controllers/WebController.php
public/css/design.css
public/js/web/design.js
resources/views/web/design.blade.php
app/Http/Controllers/WebController.php
View file @
a5f8b414
...
...
@@ -83,20 +83,7 @@ class WebController extends Controller
}
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'
]
=
'标签设计'
;
return
view
(
'web'
,
$info
);
...
...
public/css/design.css
View file @
a5f8b414
...
...
@@ -16,10 +16,6 @@
float
:
right
}
body
{
background
:
#f2f2f2
;
padding-left
:
220px
}
.tag-content
{
width
:
1100px
...
...
@@ -44,7 +40,7 @@ body {
border
:
1px
solid
#ccc
;
clear
:
both
;
padding
:
15px
;
height
:
1
0
0px
height
:
1
5
0px
}
.tag-content
.tag-tools
.tips
{
...
...
@@ -134,30 +130,31 @@ body {
font-size
:
14px
;
left
:
0
}
.tag-edit
h3
{
padding
:
20px
0
}
.tag-content
.tag-edit
.edit-seclect
.seclect-group
{
margin-right
:
50px
}
.tag-content
.tag-edit
.fztip
{
margin-top
:
10px
;
font-size
:
12px
;
color
:
#999
}
.
tag-content
.tag-edit
.
edit-box
{
.edit-box
{
background
:
#fff
;
border
:
1px
solid
#000
;
padding
:
15px
20px
;
margin-top
:
20px
}
.
tag-content
.tag-edit
.
edit-box
.edit-con
{
.edit-box
.edit-con
{
clear
:
both
;
position
:
relative
;
border
:
1px
solid
#ccc
}
.
tag-content
.tag-edit
.
edit-box
.edit-con
div
.gezi
{
.edit-box
.edit-con
div
.gezi
{
width
:
20px
;
height
:
20px
;
box-sizing
:
border-box
;
...
...
@@ -166,15 +163,15 @@ body {
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
}
.
tag-content
.tag-edit
.
edit-box
.edit-con
div
.gezi.bottom0
{
.edit-box
.edit-con
div
.gezi.bottom0
{
border-bottom
:
0px
}
.
tag-content
.tag-edit
.
edit-box
.edit-con
div
.gezi.border0
{
.edit-box
.edit-con
div
.gezi.border0
{
border
:
0px
}
...
...
@@ -187,7 +184,7 @@ body {
}
.tag-content
.tag-edit
.edit-value
.tools
{
background
:
#f
ff
;
background
:
#f
2f2f2
;
padding
:
20px
;
display
:
none
}
...
...
@@ -254,4 +251,4 @@ textarea:focus {
.xuanzhuan
{
transform
:
rotate
(
90deg
);
transform-origin
:
left
top
}
\ No newline at end of file
}
public/js/web/design.js
View file @
a5f8b414
var
tag
=
{
hbisAct
:
0
,
//是否画布区域
isClick
:
0
,
...
...
@@ -6,6 +7,8 @@ var tag={
tag
.
handle
();
},
editUi
:
function
(){
$
(
"body"
).
attr
(
"onselectstart"
,
"return false"
);
//编辑画布渲染样式
var
gezilist
=
$
(
".tag-size"
).
val
().
split
(
"*"
);
var
gnum
=
(
Number
(
gezilist
[
0
])
/
20
)
*
(
Number
(
gezilist
[
1
])
/
20
);
...
...
@@ -100,13 +103,14 @@ var tag={
})
//鼠标移入画布
$
(
"
.edit-con"
).
hover
(
function
(
event
){
$
(
"
body"
).
on
(
"mouseover"
,
".edit-con"
,
function
(
e
){
tag
.
hbisAct
=
1
;
},
function
(){
})
$
(
"body"
).
on
(
"mouseout"
,
".edit-con"
,
function
(
e
){
tag
.
hbisAct
=
0
;
})
//画布监听鼠标松开
$
(
"
.edit-con"
).
mouseup
(
function
(
e
){
$
(
"
body"
).
on
(
"mouseup"
,
".edit-con"
,
function
(
e
){
var
x
,
y
;
x
=
e
.
pageX
-
$
(
this
).
offset
().
left
;
//获取当前鼠标相对div的X坐标
y
=
e
.
pageY
-
$
(
this
).
offset
().
top
;
//获取当前鼠标相对div的Y坐标
...
...
@@ -125,8 +129,8 @@ var tag={
}
tag
.
isClick
=
0
;
});
})
//全局监听鼠标松开
$
(
document
).
mouseup
(
function
(
e
){
$
(
document
).
off
(
'mousemove.drag'
);
...
...
@@ -276,7 +280,21 @@ var tag={
$
(
".wenben"
).
val
(
$
(
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
();
\ No newline at end of file
$
(
function
(){
tag
.
init
();
})
\ No newline at end of file
resources/views/web/design.blade.php
View file @
a5f8b414
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment