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
c624f999
Commit
c624f999
authored
Oct 31, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt
parents
21918f08
f22906e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
4 deletions
+66
-4
add.vue
pages/produce/execute/ProcessCase/add.vue
+33
-2
edit.vue
pages/produce/execute/ProcessCase/edit.vue
+33
-2
No files found.
pages/produce/execute/ProcessCase/add.vue
View file @
c624f999
...
...
@@ -2,7 +2,7 @@
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('title')"
prop=
"title"
style=
"width:95%"
>
<FormItem
:label=
"l('title')"
prop=
"title"
style=
"width:
95%"
>
<Input
v-model=
"entity.title"
></Input>
</FormItem>
</Col>
...
...
@@ -22,7 +22,13 @@
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('content')"
prop=
"content "
>
<Input
v-model=
"entity.content"
type=
"textarea"
:rows=
"5"
></Input>
<i-quill
v-model=
"entity.content"
:height=
"300"
border
v-paste=
"handleImg"
/>
<!--
<Input
v-model=
"entity.content"
type=
"textarea"
:rows=
"5"
></Input>
-->
</FormItem>
</Col>
</Row>
...
...
@@ -34,8 +40,12 @@
</
template
>
<
script
>
import
Api
from
"./api"
;
import
iQuill
from
"@/components/quill"
;
export
default
{
name
:
"Add"
,
components
:
{
iQuill
,
},
data
()
{
return
{
entity
:
{
...
...
@@ -76,6 +86,27 @@ export default {
}
},
methods
:
{
handleImg
(
e
)
{
console
.
warn
(
e
);
let
file
=
null
;
if
(
e
.
clipboardData
&&
e
.
clipboardData
.
items
[
0
]
&&
e
.
clipboardData
.
items
[
0
].
type
&&
e
.
clipboardData
.
items
[
0
].
type
.
indexOf
(
"image"
)
>
-
1
)
{
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file
=
e
.
clipboardData
.
items
[
0
].
getAsFile
();
let
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
setTimeout
(()
=>
{
var
img
=
'<img src="'
+
reader
.
result
+
'" alt=""/>'
;
this
.
entity
.
content
+=
img
;
},
1000
);
// new R
}
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
...
...
pages/produce/execute/ProcessCase/edit.vue
View file @
c624f999
...
...
@@ -2,7 +2,7 @@
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('title')"
prop=
"title"
style=
"width:95%"
>
<FormItem
:label=
"l('title')"
prop=
"title"
style=
"width:
95%"
>
<Input
v-model=
"entity.title"
></Input>
</FormItem>
</Col>
...
...
@@ -22,7 +22,13 @@
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('content')"
prop=
"content "
>
<Input
v-model=
"entity.content"
type=
"textarea"
:rows=
"5"
></Input>
<i-quill
v-model=
"entity.content"
:height=
"300"
border
v-paste=
"handleImg"
/>
<!--
<Input
v-model=
"entity.content"
type=
"textarea"
:rows=
"5"
></Input>
-->
</FormItem>
</Col>
</Row>
...
...
@@ -34,8 +40,12 @@
</
template
>
<
script
>
import
Api
from
"./api"
;
import
iQuill
from
"@/components/quill"
;
export
default
{
name
:
"Edit"
,
components
:
{
iQuill
,
},
data
()
{
return
{
entity
:
{},
...
...
@@ -90,6 +100,27 @@ export default {
}
});
},
handleImg
(
e
)
{
console
.
warn
(
e
);
let
file
=
null
;
if
(
e
.
clipboardData
&&
e
.
clipboardData
.
items
[
0
]
&&
e
.
clipboardData
.
items
[
0
].
type
&&
e
.
clipboardData
.
items
[
0
].
type
.
indexOf
(
"image"
)
>
-
1
)
{
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file
=
e
.
clipboardData
.
items
[
0
].
getAsFile
();
let
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
setTimeout
(()
=>
{
var
img
=
'<img src="'
+
reader
.
result
+
'" alt=""/>'
;
this
.
entity
.
content
+=
img
;
},
1000
);
// new R
}
},
handleClose
()
{
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