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
0b56514a
Commit
0b56514a
authored
Sep 23, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档上传
parent
6f60bd0f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
171 additions
and
113 deletions
+171
-113
zh-CN.js
i18n/locale/zh-CN.js
+1
-0
add.vue
pages/word/document/add.vue
+92
-64
detail.vue
pages/word/document/detail.vue
+1
-0
edit.vue
pages/word/document/edit.vue
+72
-43
index.vue
pages/word/document/index.vue
+4
-4
word.vue
pages/word/document/word.vue
+1
-2
No files found.
i18n/locale/zh-CN.js
View file @
0b56514a
...
...
@@ -1767,6 +1767,7 @@ export default {
miji
:
"密级"
,
status
:
'状态'
,
filePath
:
'上传文件'
,
img
:
'上传图片'
,
field
:
'字段'
,
dataType
:
'数据类型'
,
dataLength
:
'数据长度'
,
...
...
pages/word/document/add.vue
View file @
0b56514a
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"120"
>
<Row>
<Col
span=
"18"
>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
>
...
...
@@ -149,9 +151,18 @@
</RadioGroup>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
>
<div
v-html=
"entity"
></div>
</Col>
-->
</Row>
</Col>
<Col
span=
"6"
>
<FormItem
:label=
"l('img')"
prop=
"img"
>
<inputFile
class=
"tphoto"
ref=
"refmovieFile1"
v-model=
"imgName"
:parms=
"parmsName"
/>
</FormItem>
<div
class=
"img-touxiang"
v-if=
"imgName"
>
<img
:src=
"avatorPath"
/>
</div>
</Col>
</Row>
<Row>
<Col
:span=
"24"
style=
"text-align: right;"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
...
...
@@ -167,12 +178,15 @@ export default {
name
:
"Add"
,
data
()
{
return
{
disabled
:
false
,
imgName
:
""
,
avatorPath
:
""
,
fileds
:
[],
//扩展属性
entity
:
{
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
status
:
"0"
,
categoryId
:
this
.
treeId
,
img
:
""
,
// title: "",
// field: "",
// dataType: null,
...
...
@@ -198,6 +212,7 @@ export default {
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
parmsName
:
"app=material&eid=1&name=document"
,
parms
:
{
app
:
"material"
,
eid
:
null
,
...
...
@@ -294,14 +309,27 @@ export default {
},
},
watch
:
{
// v() {
// this.entity = this.$u.clone(this.v);
// },
// eid(v) {
// if (v > 0) {
// this.load(v);
// }
// },
imgName
(
newName
,
oldName
)
{
console
.
log
(
newName
);
const
imgPathsArr
=
JSON
.
parse
(
newName
);
this
.
entity
.
img
=
imgPathsArr
[
0
].
filePath
;
this
.
avatorPath
=
fileUrlDown
+
imgPathsArr
[
0
].
filePath
;
},
},
};
</
script
>
<
style
lang=
"less"
>
.img-touxiang {
width: 230px;
height: 230px;
background: #ccc;
border-radius: 5px;
margin-left: 58px;
margin-top: -35px;
img {
width: 100%;
height: 100%;
border-radius: 5px;
}
}
</
style
>
\ No newline at end of file
pages/word/document/detail.vue
View file @
0b56514a
...
...
@@ -54,6 +54,7 @@ export default {
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
fileds
:[],
parms
:
{
app
:
"material"
,
eid
:
null
,
...
...
pages/word/document/edit.vue
View file @
0b56514a
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"120"
>
<Row>
<Col
span=
"18"
>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
>
...
...
@@ -150,6 +152,24 @@
</RadioGroup>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
style=
"text-align: right;"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Col>
-->
</Row>
</Col>
<Col
span=
"6"
>
<FormItem
:label=
"l('img')"
prop=
"img"
>
<inputFile
class=
"tphoto"
ref=
"refmovieFile1"
v-model=
"imgName"
:parms=
"parmsName"
/>
</FormItem>
<div
class=
"img-touxiang"
v-if=
"imgName"
>
<img
:src=
"avatorPath"
/>
</div>
</Col>
</Row>
<Row>
<Col
:span=
"24"
style=
"text-align: right;"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
...
...
@@ -165,12 +185,14 @@ export default {
name
:
"Edit"
,
data
()
{
return
{
disabled
:
false
,
imgName
:
""
,
avatorPath
:
""
,
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
fileds
:
[],
//扩展属性
parmsName
:
"app=material&eid=1&name=document"
,
parms
:
{
app
:
"material"
,
eid
:
null
,
...
...
@@ -229,6 +251,8 @@ export default {
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
filePath
;
this
.
avatorPath
=
fileUrlDown
+
r
.
result
.
img
;
this
.
imgName
=
r
.
result
.
img
;
this
.
entity
.
status
=
r
.
result
.
status
+
""
;
});
},
...
...
@@ -270,6 +294,11 @@ export default {
this
.
load
(
v
);
}
},
imgName
(
newName
,
oldName
)
{
const
imgPathsArr
=
JSON
.
parse
(
newName
);
this
.
entity
.
img
=
imgPathsArr
[
0
].
filePath
;
this
.
avatorPath
=
fileUrlDown
+
imgPathsArr
[
0
].
filePath
;
},
},
};
</
script
>
\ No newline at end of file
pages/word/document/index.vue
View file @
0b56514a
...
...
@@ -33,7 +33,7 @@
</a>
</div>
<Content
:class=
"!showMenu?'con_bord':''"
>
<Word
ref=
"dataTable"
:treeId=
"treeId"
:addShow=
"addShow"
:ids=
'ids'
/>
<Word
ref=
"dataTable"
:treeId=
"treeId"
:addShow=
"addShow"
:ids=
"ids"
/>
</Content>
</Layout>
</div>
...
...
@@ -60,7 +60,7 @@ export default {
expand
:
false
,
treeId
:
0
,
addShow
:
false
,
ids
:
[]
ids
:
[],
};
},
mounted
()
{
...
...
@@ -153,7 +153,7 @@ export default {
});
}
}
console
.
log
(
ids
)
//
console.log(ids)
this
.
ids
=
ids
;
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
...
...
pages/word/document/word.vue
View file @
0b56514a
...
...
@@ -40,7 +40,7 @@
<Row
class=
"row-down"
:gutter=
"10"
>
<Col
span=
"7"
>
<div
class=
"img-i"
>
<img
:src=
"downUrl +row.
filePath"
v-if=
"row.filePath
"
/>
<img
:src=
"downUrl +row.
img"
v-if=
"row.img
"
/>
<!-- onerror="this.src='/imgicon/chan_Pin.png'" -->
<img
src=
"@/assets/imgicon/chan_Pin.png"
v-else
width=
"100%"
height=
"100%"
/>
</div>
...
...
@@ -48,7 +48,6 @@
<Col
span=
"17"
class=
"c"
>
<div>
版本:
{{
row
.
version
}}
</div>
<div>
文档详细说明:
{{
row
.
description
}}
</div>
<p
class=
"a-icon"
>
<a
@
click=
"edit(row.id)"
>
<Icon
type=
"md-create"
/>
编辑
...
...
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