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
0e993ca7
Commit
0e993ca7
authored
Sep 28, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载模板
parent
dcfd759a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
10 deletions
+56
-10
add.vue
pages/word/document/add.vue
+27
-5
api.js
pages/word/document/api.js
+4
-0
edit.vue
pages/word/document/edit.vue
+25
-5
No files found.
pages/word/document/add.vue
View file @
0e993ca7
<
template
>
<div>
<div
class=
"document-add"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"120"
>
<Row>
<Col
span=
"18"
>
...
...
@@ -164,10 +164,13 @@
</FormItem>
</Col>
-->
<Col
:span=
"24"
>
<FormItem
:label=
"l('filePath')"
prop=
"filePath"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
<div
class=
"xia-zai"
>
<FormItem
:label=
"l('filePath')"
prop=
"filePath"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
<a
href=
"#"
@
click=
"template"
class=
"a-xiazai"
>
下载模板
</a>
</div>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
...
...
@@ -350,6 +353,15 @@ export default {
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
template
()
{
// alert(this.treeId);
Api
.
getcategorytemplate
({
cat
:
this
.
treeId
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
let
url
=
r
.
result
[
0
].
url
;
window
.
open
(
fileUrlDown
+
url
,
"_blank"
);
}
});
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
...
...
@@ -399,4 +411,14 @@ export default {
cursor: pointer;
}
}
.document-add {
.xia-zai {
position: relative;
.a-xiazai {
position: absolute;
top: 7px;
left: 260px;
}
}
}
</
style
>
\ No newline at end of file
pages/word/document/api.js
View file @
0e993ca7
...
...
@@ -30,4 +30,8 @@ export default {
batchstart
(
params
)
{
return
Api
.
post
(
`
${
workflowUrl
}
/instance/batchstart`
,
params
);
//送审
},
getcategorytemplate
(
params
){
//获取分类的模板
return
Api
.
get
(
`
${
material
}
/documenttemplate/getcategorytemplate`
,
params
);
},
}
\ No newline at end of file
pages/word/document/edit.vue
View file @
0e993ca7
...
...
@@ -161,10 +161,13 @@
</FormItem>
</Col>
-->
<Col
:span=
"24"
>
<FormItem
:label=
"l('filePath')"
prop=
"filePath"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
<div
class=
"xia-zai"
>
<FormItem
:label=
"l('filePath')"
prop=
"filePath"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
<a
href=
"#"
@
click=
"template"
class=
"a-xiazai"
>
下载模板
</a>
</div>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
...
...
@@ -304,7 +307,7 @@ export default {
if
(
v
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
filePath
=
this
.
parms
.
eid
;
this
.
entity
.
status
=
1
;
//上传文件后状态变为工作中
this
.
entity
.
status
=
1
;
//上传文件后状态变为工作中
}
else
{
this
.
entity
.
filePath
=
""
;
this
.
entity
.
status
=
0
;
//默认私有
...
...
@@ -325,6 +328,15 @@ export default {
}
});
},
template
()
{
// alert(this.treeId);
Api
.
getcategorytemplate
({
cat
:
this
.
treeId
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
let
url
=
r
.
result
[
0
].
url
;
window
.
open
(
fileUrlDown
+
url
,
"_blank"
);
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
...
...
@@ -363,4 +375,12 @@ export default {
cursor: pointer;
}
}
.xia-zai {
position: relative;
.a-xiazai {
position: absolute;
top: 7px;
left: 260px;
}
}
</
style
>
\ No newline at end of file
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