Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
7df96f11
Commit
7df96f11
authored
May 12, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工序,工步内容包含图片粘贴功能。
parent
eb77f52a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
75 deletions
+71
-75
add.vue
pages/technology/details/add.vue
+17
-18
edit.vue
pages/technology/details/edit.vue
+18
-19
add.vue
pages/technology/details/routingStep/add.vue
+18
-19
edit.vue
pages/technology/details/routingStep/edit.vue
+18
-19
No files found.
pages/technology/details/add.vue
View file @
7df96f11
...
@@ -249,25 +249,24 @@ export default {
...
@@ -249,25 +249,24 @@ export default {
});
});
},
},
handleImg
(
e
)
{
handleImg
(
e
)
{
console
.
warn
(
e
);
let
file
=
null
// let file = null
if
(
// if (
e
.
clipboardData
&&
// e.clipboardData &&
e
.
clipboardData
.
items
[
0
]
&&
// e.clipboardData.items[0] &&
e
.
clipboardData
.
items
[
0
].
type
&&
// e.clipboardData.items[0].type &&
e
.
clipboardData
.
items
[
0
].
type
.
indexOf
(
'image'
)
>
-
1
// e.clipboardData.items[0].type.indexOf('image') > -1
)
{
// ) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
// //这里就是判断是否有粘贴进来的文件且文件为图片格式
file
=
e
.
clipboardData
.
items
[
0
].
getAsFile
()
// file = e.clipboardData.items[0].getAsFile()
let
reader
=
new
FileReader
()
// let reader = new FileReader()
reader
.
readAsDataURL
(
file
)
// reader.readAsDataURL(file)
setTimeout
(()
=>
{
// setTimeout(() => {
var
img
=
'<img src="'
+
reader
.
result
+
'" alt=""/>'
// var img = '
<
img
src
=
"' + reader.result + '"
alt
=
""
/>
'
this
.
entity
.
taskContent
+=
img
// this.bugForm.content += img
},
1000
)
// }, 1000)
//
// new R
// new R
//
}
}
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"routing_detail"
+
"."
+
key
;
key
=
"routing_detail"
+
"."
+
key
;
...
...
pages/technology/details/edit.vue
View file @
7df96f11
...
@@ -158,25 +158,24 @@ export default {
...
@@ -158,25 +158,24 @@ export default {
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-close"
);
},
},
handleImg
(
e
)
{
handleImg
(
e
)
{
console
.
warn
(
e
);
let
file
=
null
// let file = null
if
(
// if (
e
.
clipboardData
&&
// e.clipboardData &&
e
.
clipboardData
.
items
[
0
]
&&
// e.clipboardData.items[0] &&
e
.
clipboardData
.
items
[
0
].
type
&&
// e.clipboardData.items[0].type &&
e
.
clipboardData
.
items
[
0
].
type
.
indexOf
(
'image'
)
>
-
1
// e.clipboardData.items[0].type.indexOf('image') > -1
)
{
// ) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
// //这里就是判断是否有粘贴进来的文件且文件为图片格式
file
=
e
.
clipboardData
.
items
[
0
].
getAsFile
()
// file = e.clipboardData.items[0].getAsFile()
let
reader
=
new
FileReader
()
// let reader = new FileReader()
reader
.
readAsDataURL
(
file
)
// reader.readAsDataURL(file)
setTimeout
(()
=>
{
// setTimeout(() => {
var
img
=
'<img src="'
+
reader
.
result
+
'" alt=""/>'
// var img = '
<
img
src
=
"' + reader.result + '"
alt
=
""
/>
'
this
.
entity
.
taskContent
+=
img
// this.bugForm.content += img
},
1000
)
// }, 1000)
//
// new R
// new R
//
}
}
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"routing_detail"
+
"."
+
key
;
key
=
"routing_detail"
+
"."
+
key
;
...
...
pages/technology/details/routingStep/add.vue
View file @
7df96f11
...
@@ -166,25 +166,24 @@ export default {
...
@@ -166,25 +166,24 @@ export default {
});
});
},
},
handleImg
(
e
)
{
handleImg
(
e
)
{
console
.
warn
(
e
)
let
file
=
null
// let file = null
if
(
// if (
e
.
clipboardData
&&
// e.clipboardData &&
e
.
clipboardData
.
items
[
0
]
&&
// e.clipboardData.items[0] &&
e
.
clipboardData
.
items
[
0
].
type
&&
// e.clipboardData.items[0].type &&
e
.
clipboardData
.
items
[
0
].
type
.
indexOf
(
'image'
)
>
-
1
// e.clipboardData.items[0].type.indexOf('image') > -1
)
{
// ) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
// //这里就是判断是否有粘贴进来的文件且文件为图片格式
file
=
e
.
clipboardData
.
items
[
0
].
getAsFile
()
// file = e.clipboardData.items[0].getAsFile()
let
reader
=
new
FileReader
()
// let reader = new FileReader()
reader
.
readAsDataURL
(
file
)
// reader.readAsDataURL(file)
setTimeout
(()
=>
{
// setTimeout(() => {
var
img
=
'<img src="'
+
reader
.
result
+
'" alt=""/>'
// var img = '
<
img
src
=
"' + reader.result + '"
alt
=
""
/>
'
this
.
entity
.
stepContent
+=
img
// this.bugForm.content += img
},
1000
)
// }, 1000)
//
// new R
// new R
//
}
}
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-close"
);
...
...
pages/technology/details/routingStep/edit.vue
View file @
7df96f11
...
@@ -162,25 +162,24 @@ export default {
...
@@ -162,25 +162,24 @@ export default {
});
});
},
},
handleImg
(
e
)
{
handleImg
(
e
)
{
console
.
warn
(
e
)
let
file
=
null
// let file = null
if
(
// if (
e
.
clipboardData
&&
// e.clipboardData &&
e
.
clipboardData
.
items
[
0
]
&&
// e.clipboardData.items[0] &&
e
.
clipboardData
.
items
[
0
].
type
&&
// e.clipboardData.items[0].type &&
e
.
clipboardData
.
items
[
0
].
type
.
indexOf
(
'image'
)
>
-
1
// e.clipboardData.items[0].type.indexOf('image') > -1
)
{
// ) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
// //这里就是判断是否有粘贴进来的文件且文件为图片格式
file
=
e
.
clipboardData
.
items
[
0
].
getAsFile
()
// file = e.clipboardData.items[0].getAsFile()
let
reader
=
new
FileReader
()
// let reader = new FileReader()
reader
.
readAsDataURL
(
file
)
// reader.readAsDataURL(file)
setTimeout
(()
=>
{
// setTimeout(() => {
var
img
=
'<img src="'
+
reader
.
result
+
'" alt=""/>'
// var img = '
<
img
src
=
"' + reader.result + '"
alt
=
""
/>
'
this
.
entity
.
stepContent
+=
img
// this.bugForm.content += img
},
1000
)
// }, 1000)
//
// new R
// new R
//
}
}
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-close"
);
...
...
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