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
df2f4903
Commit
df2f4903
authored
Sep 26, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档管理克隆
parent
8cac88a5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
58 deletions
+109
-58
add.vue
pages/word/document/add.vue
+26
-7
detail.vue
pages/word/document/detail.vue
+80
-35
edit.vue
pages/word/document/edit.vue
+1
-1
word.vue
pages/word/document/word.vue
+2
-15
No files found.
pages/word/document/add.vue
View file @
df2f4903
...
...
@@ -279,7 +279,7 @@ export default {
props
:
{
v
:
Object
,
treeId
:
Number
,
eid
:
Number
,
eid
:
String
,
},
created
()
{},
mounted
()
{
...
...
@@ -317,11 +317,17 @@ export default {
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
});
}
if
(
this
.
eid
)
{
this
.
load
(
this
.
eid
);
}
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
this
.
entity
.
id
)
{
delete
this
.
entity
.
id
;
}
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
filePath
=
this
.
parms
.
eid
;
}
else
{
...
...
@@ -352,18 +358,31 @@ export default {
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
// load(v) {
// Api.get({ id: v }).then((r) => {
// this.entity = r.result;
// this.entity.id = 0;
// });
// },
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
avatorPath
=
fileUrlDown
+
r
.
result
.
img
;
this
.
imgName
=
r
.
result
.
img
;
this
.
entity
.
status
=
r
.
result
.
status
;
if
(
r
.
result
.
filePath
&&
r
.
result
.
filePath
!=
""
)
{
this
.
parms
.
eid
=
r
.
result
.
filePath
;
}
else
{
this
.
parms
.
eid
=
this
.
$u
.
guid
();
}
this
.
entity
.
filePath
=
this
.
parms
.
eid
;
});
},
l
(
key
)
{
key
=
"document_property_definition"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
eid
(
v
)
{
if
(
v
)
{
this
.
load
(
v
);
}
},
imgName
(
newName
,
oldName
)
{
console
.
log
(
newName
);
const
imgPathsArr
=
JSON
.
parse
(
newName
);
...
...
pages/word/document/detail.vue
View file @
df2f4903
...
...
@@ -3,60 +3,50 @@
<div
class=
"top-title"
>
<div
class=
"new-detail row-left"
>
<Row>
<Filed
:span=
"12"
:name=
"l('creationTime')+':'"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')+':'"
>
<Filed
:span=
"12"
:name=
"l('creationTime') + ':'"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId') + ':'"
>
<User
:value=
"entity.creatorUserId"
/>
</Filed>
<Filed
:span=
"12"
:name=
"l('status')+':'"
>
{{
entity
.
status
==
0
?
'草稿'
:
'送审'
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('status') + ':'"
>
<state
code=
"word.document.status"
:value=
"entity.status"
/>
</Filed>
</Row>
</div>
<ul>
<li>
<a
@
click=
"edit"
>
<Icon
type=
"md-create"
/>
编辑
</a>
<a
@
click=
"edit"
>
<Icon
type=
"md-create"
/>
编辑
</a>
<span>
|
</span>
</li>
<li>
<a>
<Icon
type=
"ios-log-in"
/>
移动
</a>
<a>
<Icon
type=
"ios-log-in"
/>
移动
</a>
<span>
|
</span>
</li>
<li>
<a>
<Icon
type=
"ios-photos"
/>
克隆
</a>
<a
@
click=
"copy"
>
<Icon
type=
"ios-photos"
/>
克隆
</a>
<span>
|
</span>
</li>
<li>
<a>
<Icon
type=
"md-download"
/>
下载
</a>
<a>
<Icon
type=
"md-download"
/>
下载
</a>
<span>
|
</span>
</li>
<li>
<a>
<Icon
type=
"ios-link"
/>
引用
</a>
<a>
<Icon
type=
"ios-link"
/>
引用
</a>
<span>
|
</span>
</li>
<li>
<a>
<Icon
type=
"md-checkmark-circle"
/>
使用
</a>
<a>
<Icon
type=
"md-checkmark-circle"
/>
使用
</a>
<span>
|
</span>
</li>
<li>
<a>
<Icon
type=
"ios-alert-outline"
/>
版本
</a>
<a>
<Icon
type=
"ios-alert-outline"
/>
版本
</a>
</li>
</ul>
</div>
...
...
@@ -66,20 +56,35 @@
<Col
span=
"20"
>
<div
class=
"new-detail detail-d"
>
<Row>
<Filed
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
:name=
"li.title+':'"
>
<State
v-if=
"li.dataType==3"
:code=
"li.note"
:value=
"entity[li.field]"
/>
<div
v-else-if=
"li.dataType==8"
>
{{
entity
[
li
.
field
]
}}
</div>
<div
v-else-if=
"li.dataType==5"
v-html=
"entity[li.field]"
></div>
<DTSpan
v-else-if=
"li.dataType==4"
:value=
"entity[li.field]"
/>
<span
v-else
>
{{
entity
[
li
.
field
]
}}
</span>
<Filed
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
:name=
"li.title + ':'"
>
<State
v-if=
"li.dataType == 3"
:code=
"li.note"
:value=
"entity[li.field]"
/>
<div
v-else-if=
"li.dataType == 8"
>
{{
entity
[
li
.
field
]
}}
</div>
<div
v-else-if=
"li.dataType == 5"
v-html=
"entity[li.field]"
></div>
<DTSpan
v-else-if=
"li.dataType == 4"
:value=
"entity[li.field]"
/>
<span
v-else
>
{{
entity
[
li
.
field
]
}}
</span>
<State
v-if=
"li.unitName
&&(li.dataType==1||li.dataType==
2)"
v-if=
"li.unitName
&& (li.dataType == 1 || li.dataType ==
2)"
:code=
"li.note"
:value=
"entity[li.field]"
/>
</Filed>
<Filed
:span=
"24"
:name=
"l('filePath')
+
':'"
class=
"filed-d"
>
<Filed
:span=
"24"
:name=
"l('filePath')
+
':'"
class=
"filed-d"
>
<files
ref=
"refFile"
:parms=
"parms"
:showList=
"false"
/>
</Filed>
<!--
<Filed
:span=
"12"
:name=
"l('field')"
>
{{
entity
.
field
}}
</Filed>
...
...
@@ -105,12 +110,32 @@
</Col>
<Col
span=
"4"
class=
"dcm-right"
>
<div
class=
"img-touxiang"
>
<img
:src=
"downUrl+avatorPath"
v-if=
"avatorPath"
/>
<img
src=
"@/assets/images/files_header.png"
v-else
width=
"100%"
height=
"100%"
/>
<img
:src=
"downUrl + avatorPath"
v-if=
"avatorPath"
/>
<img
src=
"@/assets/images/files_header.png"
v-else
width=
"100%"
height=
"100%"
/>
</div>
</Col>
</Row>
</div>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
:mask-closable=
"false"
>
<component
:is=
"detail"
:eid=
"curId"
:treeId=
"treeId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
</
template
>
<
script
>
...
...
@@ -119,6 +144,10 @@ export default {
name
:
"Add"
,
data
()
{
return
{
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
this
.
eid
,
avatorPath
:
""
,
downUrl
:
fileUrlDown
,
entity
:
{},
...
...
@@ -184,7 +213,23 @@ export default {
this
.
$emit
(
"on-close"
);
},
edit
()
{
this
.
$emit
(
"detailEdit"
,
this
.
eid
);
this
.
curId
=
this
.
eid
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
},
copy
()
{
this
.
curId
=
this
.
eid
;
this
.
title
=
"克隆"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
ok
()
{
this
.
modal
=
false
;
this
.
$emit
(
"on-ok"
);
},
cancel
()
{
this
.
modal
=
false
;
},
l
(
key
)
{
key
=
"document_property_definition"
+
"."
+
key
;
...
...
pages/word/document/edit.vue
View file @
df2f4903
...
...
@@ -290,7 +290,7 @@ export default {
this
.
entity
=
r
.
result
;
this
.
avatorPath
=
fileUrlDown
+
r
.
result
.
img
;
this
.
imgName
=
r
.
result
.
img
;
this
.
entity
.
status
=
r
.
result
.
status
+
""
;
this
.
entity
.
status
=
r
.
result
.
status
;
if
(
r
.
result
.
filePath
&&
r
.
result
.
filePath
!=
""
)
{
this
.
parms
.
eid
=
r
.
result
.
filePath
;
}
else
{
...
...
pages/word/document/word.vue
View file @
df2f4903
...
...
@@ -102,7 +102,6 @@
:treeId=
"treeId"
@
on-close=
"cancel"
@
on-ok=
"ok"
@
detailEdit=
"detailEdit"
/>
</Modal>
</div>
...
...
@@ -269,13 +268,7 @@ export default {
// }
}
},
copy
(
id
)
{
this
.
fullscreen
=
false
;
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
fullscreen
=
true
;
this
.
curId
=
id
;
...
...
@@ -290,13 +283,7 @@ export default {
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
},
detailEdit
(
val
)
{
this
.
fullscreen
=
false
;
this
.
curId
=
val
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
...
...
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