Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡宝山
template_vue
Commits
1d8d3a5e
Commit
1d8d3a5e
authored
Mar 18, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
第二种打印方式
parent
314a0aef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
19 deletions
+20
-19
package.json
package.json
+4
-3
main.js
src/main.js
+5
-0
templateFirst.vue
src/views/template/templateFirst.vue
+11
-16
No files found.
package.json
View file @
1d8d3a5e
...
@@ -14,13 +14,13 @@
...
@@ -14,13 +14,13 @@
"svgo"
:
"svgo -f src/icons/svg --config=src/icons/svgo.yml"
"svgo"
:
"svgo -f src/icons/svg --config=src/icons/svgo.yml"
},
},
"dependencies"
:
{
"dependencies"
:
{
"
crypto-js
"
:
"
4.1.1
"
,
"
compression-webpack-plugin
"
:
"
^1.1.12
"
,
"
dsbridge
"
:
"
^3.1.4
"
,
"
@riophae/vue-treeselect
"
:
"
^0.4.0
"
,
"
@riophae/vue-treeselect
"
:
"
^0.4.0
"
,
"
axios
"
:
"
0.18.1
"
,
"
axios
"
:
"
0.18.1
"
,
"
bpmn-js
"
:
"
^6.1.1
"
,
"
bpmn-js
"
:
"
^6.1.1
"
,
"
bpmn-js-properties-panel
"
:
"
^0.33.1
"
,
"
bpmn-js-properties-panel
"
:
"
^0.33.1
"
,
"
compression-webpack-plugin
"
:
"
^1.1.12
"
,
"
crypto-js
"
:
"
4.1.1
"
,
"
dsbridge
"
:
"
^3.1.4
"
,
"
echarts
"
:
"
^5.3.2
"
,
"
echarts
"
:
"
^5.3.2
"
,
"
element-resize-detector
"
:
"
^1.2.4
"
,
"
element-resize-detector
"
:
"
^1.2.4
"
,
"
element-ui
"
:
"
2.13.0
"
,
"
element-ui
"
:
"
2.13.0
"
,
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
"
vue
"
:
"
^2.7.14
"
,
"
vue
"
:
"
^2.7.14
"
,
"
vue-cropper
"
:
"
^0.5.4
"
,
"
vue-cropper
"
:
"
^0.5.4
"
,
"
vue-pdf
"
:
"
^4.1.0
"
,
"
vue-pdf
"
:
"
^4.1.0
"
,
"
vue-print-nb
"
:
"
^1.7.5
"
,
"
vue-router
"
:
"
3.0.6
"
,
"
vue-router
"
:
"
3.0.6
"
,
"
vuedraggable
"
:
"
^2.23.2
"
,
"
vuedraggable
"
:
"
^2.23.2
"
,
"
vuex
"
:
"
3.1.0
"
"
vuex
"
:
"
3.1.0
"
...
...
src/main.js
View file @
1d8d3a5e
import
Vue
from
'vue'
import
Vue
from
'vue'
import
'normalize.css/normalize.css'
// A modern alternative to CSS resets
import
'normalize.css/normalize.css'
// A modern alternative to CSS resets
import
moment
from
'moment'
import
moment
from
'moment'
// 引用打印组件
import
Print
from
'vue-print-nb'
// import ElementUI from 'element-ui'
// import ElementUI from 'element-ui'
// import './styles/element-variables.scss'
// import './styles/element-variables.scss'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
...
@@ -94,6 +96,9 @@ Vue.component('Pagination', Pagination)
...
@@ -94,6 +96,9 @@ Vue.component('Pagination', Pagination)
Vue
.
use
(
permission
)
Vue
.
use
(
permission
)
// 使用打印组件
Vue
.
use
(
Print
);
new
Vue
({
new
Vue
({
el
:
'#app'
,
el
:
'#app'
,
router
,
router
,
...
...
src/views/template/templateFirst.vue
View file @
1d8d3a5e
<
template
>
<
template
>
<div
class=
"CheckBobyList"
>
<div
class=
"CheckBobyList"
id=
"nbprint"
>
<!-- 检查表主体-->
<!-- 检查表主体-->
<div
class=
"checkList"
>
<div
class=
"checkList"
>
<!-- 检查表第一部分 -->
<!-- 检查表第一部分 -->
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
<div
class=
"right"
>
<div
class=
"right"
>
<el-form-item>
<el-form-item>
<el-button
class=
"scanCodeTop"
type=
"primary"
@
click=
"scanCodes"
>
扫码
</el-button>
<el-button
class=
"scanCodeTop"
type=
"primary"
@
click=
"scanCodes"
>
扫码
</el-button>
<el-button
class=
"printCodeTop"
type=
"primary"
v-print=
"printOption"
>
打印
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label=
"rank:"
prop=
"jcRank"
>
<el-form-item
label=
"rank:"
prop=
"jcRank"
>
<el-input
<el-input
...
@@ -2314,6 +2315,10 @@ export default {
...
@@ -2314,6 +2315,10 @@ export default {
components
:
{
TextToolTip
},
components
:
{
TextToolTip
},
data
()
{
data
()
{
return
{
return
{
printOption
:
{
id
:
'nbprint'
,
// 打印元素的id 不需要携带#号
popTitle
:
'检查表'
},
submitLoadIng
:
false
,
submitLoadIng
:
false
,
presentLoading
:
false
,
presentLoading
:
false
,
approveLoading
:
false
,
approveLoading
:
false
,
...
@@ -2687,21 +2692,6 @@ export default {
...
@@ -2687,21 +2692,6 @@ export default {
this
.
handleCyPn
()
this
.
handleCyPn
()
},
},
methods
:
{
methods
:
{
// 测试json
handleChagnge
()
{
const
obj
=
{
jcLot
:
1
,
jcPn
:
2
,
jcRank
:
3
,
jcNum
:
4
}
console
.
log
(
'文本'
,
JSON
.
stringify
(
obj
))
const
test
=
'{"jcLot":1,"jcPn":2,"jcRank":3,"jcNum":4}'
console
.
log
(
'对象'
,
JSON
.
parse
(
test
))
// 测试空文本
const
text2
=
'{}'
console
.
log
(
'测试空文本'
,
JSON
.
parse
(
text2
).
jcLot
)
},
handelTab
(
i
,
e
)
{
handelTab
(
i
,
e
)
{
const
that
=
this
const
that
=
this
if
(
!
that
.
$refs
[
'input'
+
i
])
{
if
(
!
that
.
$refs
[
'input'
+
i
])
{
...
@@ -4186,6 +4176,11 @@ export default {
...
@@ -4186,6 +4176,11 @@ export default {
background
:
#0057ff
;
background
:
#0057ff
;
border-radius
:
4px
;
border-radius
:
4px
;
}
}
.printCodeTop
{
width
:
20%
;
border-radius
:
4px
;
float
:
inline-end
;
}
::v-deep
.el-form-item__label
{
::v-deep
.el-form-item__label
{
width
:
100px
;
width
:
100px
;
...
...
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