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
21918f08
Commit
21918f08
authored
Oct 31, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remind 工艺提醒
parent
bdef2da3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
539 additions
and
444 deletions
+539
-444
add.vue
pages/technology/details/remind/add.vue
+165
-139
detail.vue
pages/technology/details/remind/detail.vue
+72
-56
edit.vue
pages/technology/details/remind/edit.vue
+117
-86
index.vue
pages/technology/details/remind/index.vue
+185
-163
No files found.
pages/technology/details/remind/add.vue
View file @
21918f08
<
template
>
<div>
<div>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"110"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('routingDetail')"
prop=
"routingDetailId"
>
<Select
v-model=
"entity.routingDetailId"
>
<Option
v-for=
"(item,index) in routingDetailList"
:value=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</Option>
<Option
v-for=
"(item,index) in routingDetailList"
:value=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</Option>
</Select>
</FormItem>
</Col>
...
...
@@ -33,7 +29,7 @@
</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=
"260"
v-paste=
"handleImg"
border
/
>
</FormItem>
</Col>
</Row>
...
...
@@ -47,14 +43,18 @@
</Col>
</Row>
</Form>
</div>
</div>
</
template
>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
ApiDetail
from
"../api"
;
import
iQuill
from
"@/components/quill"
;
export
default
{
name
:
"Add"
,
components
:
{
iQuill
},
data
()
{
return
{
submitShow
:
true
,
//送审按钮显隐
...
...
@@ -68,16 +68,22 @@ export default {
filePaths
:
""
,
//多个文件路径
},
rules
:
{
title
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
content
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
routingDetailId
:
[
{
title
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
content
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
routingDetailId
:
[{
required
:
true
,
message
:
"请选择工序"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
},
],
},
routingDetailList
:
[],
parms
:
{
...
...
@@ -137,6 +143,26 @@ export default {
}
});
},
handleImg
(
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"
);
},
...
...
pages/technology/details/remind/detail.vue
View file @
21918f08
<
template
>
<div
class=
"detail"
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('status')"
><state
code=
"processCase.status"
:value=
"entity.status+''"
type=
"text"
/></Filed>
<Filed
:span=
"12"
:name=
"l('status')"
>
<state
code=
"processCase.status"
:value=
"entity.status+''"
type=
"text"
/>
</Filed>
<Filed
:span=
"12"
:name=
"l('creator')"
>
{{
entity
.
creator
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('content')"
>
{{
entity
.
content
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('content')"
>
<div
v-html=
"entity.content"
class=
"tohtml"
></div>
</Filed>
<Filed
:span=
"24"
:name=
"l('filePath')"
>
<files
ref=
"refFile"
:parms=
"parms"
unClosable
style=
"display:inline"
/></Filed>
<files
ref=
"refFile"
:parms=
"parms"
unClosable
style=
"display:inline"
/>
</Filed>
</Filed>
</Row>
</div>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
...
...
@@ -20,8 +26,16 @@ export default {
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
parms
:
{
app
:
"technology"
,
...
...
@@ -44,7 +58,9 @@ export default {
window
.
open
(
data
,
"_blank"
);
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
filePaths
;
this
.
$emit
(
"on-load"
);
...
...
pages/technology/details/remind/edit.vue
View file @
21918f08
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('title')"
prop=
"title"
style=
"width:95%"
>
...
...
@@ -22,7 +22,7 @@
</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=
"260"
v-paste=
"handleImg"
border
/
>
</FormItem>
</Col>
</Row>
...
...
@@ -30,17 +30,26 @@
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
iQuill
from
"@/components/quill"
;
export
default
{
name
:
"Edit"
,
components
:
{
iQuill
},
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
parms
:
{
app
:
"technology"
,
//服务
...
...
@@ -60,7 +69,9 @@ export default {
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
filePaths
;
});
...
...
@@ -93,6 +104,26 @@ export default {
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
handleImg
(
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
}
},
l
(
key
)
{
key
=
"remind"
+
"."
+
key
;
return
this
.
$t
(
key
);
...
...
pages/technology/details/remind/index.vue
View file @
21918f08
<
template
>
<div>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
...
...
@@ -18,8 +18,9 @@
<Modal
v-model=
"modal"
:title=
"title"
width=
"800"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
export
default
{
...
...
@@ -29,16 +30,24 @@ export default {
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"title"
,
value
:
null
},
type
:
{
op
:
"Equal"
,
value
:
2
},
routingHeaderId
:
{
op
:
"Equal"
,
value
:
this
.
headerid
},
keys
:
{
op
:
"title"
,
value
:
null
},
type
:
{
op
:
"Equal"
,
value
:
2
},
routingHeaderId
:
{
op
:
"Equal"
,
value
:
this
.
headerid
},
},
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
columns
:
[
{
columns
:
[{
type
:
"index"
,
width
:
60
,
align
:
"center"
,
...
...
@@ -61,11 +70,6 @@ export default {
align
:
"left"
,
type
:
"user"
,
},
{
key
:
"content"
,
title
:
this
.
l
(
"content"
),
align
:
"left"
,
},
{
key
:
"filePaths"
,
title
:
this
.
l
(
"filePath"
),
...
...
@@ -73,10 +77,13 @@ export default {
easy
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
},
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
},
},
"查看"
);
...
...
@@ -95,28 +102,39 @@ export default {
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
},
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
},
},
"查看"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
},
"编辑"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
},
"删除"
),
...
...
@@ -132,7 +150,10 @@ export default {
this
.
parms
.
eid
=
this
.
$u
.
guid
();
this
.
$refs
.
refFile
.
intFiles
();
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
...
...
@@ -182,5 +203,6 @@ export default {
},
};
</
script
>
<
style
lang=
"less"
>
</
style
>
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