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
Expand all
Hide 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
This diff is collapsed.
Click to expand it.
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('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('filePath')"
>
<files
ref=
"refFile"
:parms=
"parms"
unClosable
style=
"display:inline"
/></Filed>
</Filed>
<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('creator')"
>
{{
entity
.
creator
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</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>
</Filed>
</Row>
</div>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
parms
:
{
app
:
"technology"
,
eid
:
""
,
name
:
""
,
field
:
""
,
},
};
},
props
:
{
eid
:
Number
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
clickData
(
data
,
liUrl
)
{
window
.
open
(
data
,
"_blank"
);
name
:
"Add"
,
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
parms
:
{
app
:
"technology"
,
eid
:
""
,
name
:
""
,
field
:
""
,
},
};
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
filePaths
;
this
.
$emit
(
"on-load"
);
});
props
:
{
eid
:
Number
,
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
l
(
key
)
{
key
=
"remind"
+
"."
+
key
;
return
this
.
$t
(
key
);
methods
:
{
clickData
(
data
,
liUrl
)
{
window
.
open
(
data
,
"_blank"
);
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
filePaths
;
this
.
$emit
(
"on-load"
);
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"remind"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
},
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
},
},
},
};
</
script
>
\ No newline at end of file
</
script
>
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"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('title')"
prop=
"title"
style=
"width:95%"
>
<Input
v-model=
"entity.title"
></Input>
<Input
v-model=
"entity.title"
></Input>
</FormItem>
</Col>
<Col
span=
"12"
>
</Col>
<Col
span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Select
v-model=
"entity.status"
>
<Option
:value=
"1"
>
启用
</Option>
<Option
:value=
"0"
>
禁用
</Option>
</Select>
<Select
v-model=
"entity.status"
>
<Option
:value=
"1"
>
启用
</Option>
<Option
:value=
"0"
>
禁用
</Option>
</Select>
</FormItem>
</Col>
<Col
span=
"24"
>
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('filePath')"
>
<!--
<files
ref=
"refFile"
:parms=
"parms"
files
/>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
<!--
<files
ref=
"refFile"
:parms=
"parms"
files
/>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
</Col>
<Col
span=
"24"
>
</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>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<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"
,
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
parms
:
{
app
:
"technology"
,
//服务
eid
:
""
,
//记录id
name
:
""
,
//表名process_case
field
:
""
,
//字段名
},
};
},
props
:
{
eid
:
Number
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
filePaths
;
});
name
:
"Edit"
,
components
:
{
iQuill
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
filePaths
=
this
.
parms
.
eid
;
}
else
{
this
.
entity
.
filePath
=
""
;
this
.
entity
.
filePaths
=
""
;
}
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
parms
:
{
app
:
"technology"
,
//服务
eid
:
""
,
//记录id
name
:
""
,
//表名process_case
field
:
""
,
//字段名
},
};
},
props
:
{
eid
:
Number
,
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
l
(
key
)
{
key
=
"remind"
+
"."
+
key
;
return
this
.
$t
(
key
);
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
filePaths
;
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
filePaths
=
this
.
parms
.
eid
;
}
else
{
this
.
entity
.
filePath
=
""
;
this
.
entity
.
filePaths
=
""
;
}
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
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
);
},
},
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
},
},
},
};
</
script
>
\ No newline at end of file
</
script
>
pages/technology/details/remind/index.vue
View file @
21918f08
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