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
596e79e2
Commit
596e79e2
authored
Sep 26, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档
parent
59c761c8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
129 additions
and
46 deletions
+129
-46
inputFile.vue
components/page/inputFile.vue
+1
-1
zh-CN.js
i18n/locale/zh-CN.js
+1
-1
add.vue
pages/word/classification/add.vue
+42
-3
api.js
pages/word/classification/api.js
+3
-1
edit.vue
pages/word/classification/edit.vue
+24
-3
edit.vue
pages/word/document/edit.vue
+1
-1
add.vue
pages/word/template/add.vue
+34
-20
edit.vue
pages/word/template/edit.vue
+23
-16
No files found.
components/page/inputFile.vue
View file @
596e79e2
...
@@ -54,7 +54,7 @@ export default {
...
@@ -54,7 +54,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
inputShow
:
true
,
inputShow
:
true
,
//隐藏input
file
:
null
,
file
:
null
,
name
:
this
.
value
,
name
:
this
.
value
,
downUrl
:
fileUrlDown
,
downUrl
:
fileUrlDown
,
...
...
i18n/locale/zh-CN.js
View file @
596e79e2
...
@@ -1744,7 +1744,7 @@ export default {
...
@@ -1744,7 +1744,7 @@ export default {
status
:
'状态'
,
status
:
'状态'
,
creator
:
'创建人'
,
creator
:
'创建人'
,
remark
:
'备注'
,
remark
:
'备注'
,
url
:
'
模板路径
'
,
url
:
'
上传模板
'
,
},
},
document_ref
:{
document_ref
:{
creationTime
:
'创建时间'
,
creationTime
:
'创建时间'
,
...
...
pages/word/classification/add.vue
View file @
596e79e2
...
@@ -58,10 +58,26 @@
...
@@ -58,10 +58,26 @@
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('template')"
prop=
"template"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<inputFile
class=
"tphoto"
ref=
"refmovieFile1"
v-model=
"imgName"
:parms=
"parmsName"
files
/>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('template')"
prop=
"template"
>
<FormItem
:label=
"l('template')"
prop=
"template"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
<Select
v-model=
"template"
@
on-select-change=
"setTemplate"
>
<Option
v-for=
"(t, i) in templates"
:key=
"i"
:value=
"t.id"
>
{{
t
.
name
}}
</Option>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"24"
>
<!--
<Col
:span=
"24"
>
...
@@ -164,7 +180,11 @@ export default {
...
@@ -164,7 +180,11 @@ export default {
name
:
"Add"
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
imgName
:
""
,
parmsName
:
"app=material&eid=1&name=documentTemplate"
,
codeList
:
[],
codeList
:
[],
temlplates
:
[],
template
:
null
,
entity
:
{
entity
:
{
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
name
:
""
,
name
:
""
,
...
@@ -318,7 +338,7 @@ export default {
...
@@ -318,7 +338,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
tebleSet
();
this
.
tebleSet
();
// console.log(this.row
);
this
.
loadTemplate
(
);
this
.
parms
.
eid
=
this
.
$u
.
guid
();
this
.
parms
.
eid
=
this
.
$u
.
guid
();
this
.
$refs
.
refFile
.
intFiles
();
this
.
$refs
.
refFile
.
intFiles
();
},
},
...
@@ -330,6 +350,19 @@ export default {
...
@@ -330,6 +350,19 @@ export default {
}
}
});
});
},
},
loadTemplate
()
{
let
data
=
{
pageIndex
:
1
,
pageSize
:
100
,
conditions
:
[],
};
Api
.
filesList
(
data
).
then
((
r
)
=>
{
if
(
r
.
result
)
{
// this.templates = r.result;
}
});
},
setTemplate
()
{},
addNew
()
{
addNew
()
{
let
maxId
=
0
;
let
maxId
=
0
;
this
.
checkList
.
map
((
u
)
=>
{
this
.
checkList
.
map
((
u
)
=>
{
...
@@ -371,7 +404,13 @@ export default {
...
@@ -371,7 +404,13 @@ export default {
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
let
nameList
=
this
.
$refs
.
refFile
.
nameList
;
let
names
=
[];
nameList
.
forEach
((
e
)
=>
{
names
.
push
(
e
.
fileName
);
});
this
.
entity
.
templateId
=
this
.
parms
.
eid
;
this
.
entity
.
templateId
=
this
.
parms
.
eid
;
this
.
entity
.
template
=
names
.
join
(
","
);
}
else
{
}
else
{
// this.entity.filePath = "";
// this.entity.filePath = "";
this
.
entity
.
templateId
=
""
;
this
.
entity
.
templateId
=
""
;
...
...
pages/word/classification/api.js
View file @
596e79e2
...
@@ -27,5 +27,7 @@ export default {
...
@@ -27,5 +27,7 @@ export default {
getChildren
(
params
){
getChildren
(
params
){
return
Api
.
get
(
`
${
systemUrl
}
/Dictionary/getChildren`
,
params
);
//字典
return
Api
.
get
(
`
${
systemUrl
}
/Dictionary/getChildren`
,
params
);
//字典
},
},
filesList
(
params
){
return
Api
.
post
(
`
${
material
}
/documenttemplate/paged`
,
params
);
//模板列表里获取上传列表
},
}
}
\ No newline at end of file
pages/word/classification/edit.vue
View file @
596e79e2
...
@@ -58,7 +58,18 @@
...
@@ -58,7 +58,18 @@
<Input
v-model=
"entity.description"
type=
"textarea"
:rows=
"5"
></Input>
<Input
v-model=
"entity.description"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('template')"
prop=
"template"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<inputFile
class=
"tphoto"
ref=
"refmovieFile1"
v-model=
"imgName"
:parms=
"parmsName"
files
/>
</FormItem>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('template')"
prop=
"templateId"
>
<FormItem
:label=
"l('template')"
prop=
"templateId"
>
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
<!--
<Input
v-model=
"entity.template"
type=
"textarea"
:rows=
"5"
></Input>
-->
...
@@ -70,7 +81,7 @@
...
@@ -70,7 +81,7 @@
<Input
v-model=
"entity.templateId"
></Input>
<Input
v-model=
"entity.templateId"
></Input>
</FormItem>
</FormItem>
</Col>
-->
</Col>
-->
<Col
:span=
"24"
v-if=
"inherit
==
0"
>
<Col
:span=
"24"
v-if=
"inherit
==
0"
>
<Divider
orientation=
"left"
>
扩展属性
</Divider>
<Divider
orientation=
"left"
>
扩展属性
</Divider>
<Table
:columns=
"columns"
:data=
"checkList"
border
>
<Table
:columns=
"columns"
:data=
"checkList"
border
>
<template
slot-scope=
"
{ row, index }" slot="title">
<template
slot-scope=
"
{ row, index }" slot="title">
...
@@ -165,7 +176,9 @@ export default {
...
@@ -165,7 +176,9 @@ export default {
name
:
"Edit"
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
imgName
:
""
,
parmsName
:
"app=material&eid=1&name=documentTemplate"
,
codeList
:
[],
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
...
@@ -303,11 +316,19 @@ export default {
...
@@ -303,11 +316,19 @@ export default {
eid
:
Number
,
eid
:
Number
,
},
},
mounted
()
{
mounted
()
{
this
.
tebleSet
();
if
(
this
.
eid
>
0
)
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
this
.
load
(
this
.
eid
);
}
}
},
},
methods
:
{
methods
:
{
tebleSet
()
{
Api
.
getChildren
({
id
:
582
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
this
.
codeList
=
r
.
result
;
}
});
},
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
...
...
pages/word/document/edit.vue
View file @
596e79e2
...
@@ -290,7 +290,7 @@ export default {
...
@@ -290,7 +290,7 @@ export default {
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
this
.
avatorPath
=
fileUrlDown
+
r
.
result
.
img
;
this
.
avatorPath
=
fileUrlDown
+
r
.
result
.
img
;
this
.
imgName
=
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
!=
""
)
{
if
(
r
.
result
.
filePath
&&
r
.
result
.
filePath
!=
""
)
{
this
.
parms
.
eid
=
r
.
result
.
filePath
;
this
.
parms
.
eid
=
r
.
result
.
filePath
;
}
else
{
}
else
{
...
...
pages/word/template/add.vue
View file @
596e79e2
...
@@ -43,7 +43,11 @@
...
@@ -43,7 +43,11 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"word_template_status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
<Dictionary
code=
"word_template_status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
...
@@ -51,10 +55,16 @@
...
@@ -51,10 +55,16 @@
<Input
v-model=
"entity.creator"
></Input>
<Input
v-model=
"entity.creator"
></Input>
</FormItem>
</FormItem>
</Col>
-->
</Col>
-->
<Col
:span=
"
24
"
>
<Col
:span=
"
12
"
>
<FormItem
:label=
"l('url')"
prop=
"url"
>
<FormItem
:label=
"l('url')"
prop=
"url"
>
<!--
<InputFile
v-model=
"entity.url"
></InputFile>
-->
<inputFile
<files
ref=
"refFile"
:parms=
"parms"
files
/>
class=
"tphoto"
ref=
"refmovieFile1"
v-model=
"imgName"
:parms=
"parmsName"
files
/>
<!--
<files
ref=
"refFile"
:parms=
"parms"
files
/>
-->
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
...
@@ -75,24 +85,20 @@ export default {
...
@@ -75,24 +85,20 @@ export default {
name
:
"Add"
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
imgName
:
""
,
entity
:
{
entity
:
{
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
name
:
""
,
name
:
""
,
status
:
1
,
status
:
1
,
creator
:
""
,
creator
:
""
,
remark
:
""
,
remark
:
""
,
url
:
""
,
template
:
""
,
//上传名称
templateId
:
""
,
//上传id
},
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
},
parms
:
{
parmsName
:
"app=material&eid=1&name=documentTemplate"
,
app
:
"material"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
};
};
},
},
props
:
{
props
:
{
...
@@ -100,18 +106,18 @@ export default {
...
@@ -100,18 +106,18 @@ export default {
eid
:
Number
,
eid
:
Number
,
},
},
mounted
()
{
mounted
()
{
this
.
parms
.
eid
=
this
.
$u
.
guid
();
//
this.parms.eid = this.$u.guid();
this
.
$refs
.
refFile
.
intFiles
();
//
this.$refs.refFile.intFiles();
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
//
if (this.$refs.refFile.nameList.length > 0) {
this
.
entity
.
url
=
this
.
parms
.
eid
;
//
this.entity.url = this.parms.eid;
}
else
{
//
} else {
this
.
entity
.
url
=
""
;
//
this.entity.url = "";
}
//
}
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
...
@@ -137,6 +143,14 @@ export default {
...
@@ -137,6 +143,14 @@ export default {
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
},
},
},
},
watch
:
{},
watch
:
{
imgName
(
newName
,
oldName
)
{
if
(
newName
!=
""
)
{
const
imgPathsArr
=
JSON
.
parse
(
newName
);
this
.
entity
.
templateId
=
imgPathsArr
[
0
].
filePath
;
this
.
entity
.
template
=
imgPathsArr
[
0
].
fileName
;
}
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
pages/word/template/edit.vue
View file @
596e79e2
...
@@ -43,7 +43,11 @@
...
@@ -43,7 +43,11 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"word_template_status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
<Dictionary
code=
"word_template_status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
...
@@ -51,9 +55,15 @@
...
@@ -51,9 +55,15 @@
<Input
v-model=
"entity.creator"
></Input>
<Input
v-model=
"entity.creator"
></Input>
</FormItem>
</FormItem>
</Col>
-->
</Col>
-->
<Col
:span=
"
24
"
>
<Col
:span=
"
12
"
>
<FormItem
:label=
"l('url')"
prop=
"url"
>
<FormItem
:label=
"l('url')"
prop=
"url"
>
<files
ref=
"refFile"
:parms=
"parms"
files
/>
<inputFile
class=
"tphoto"
ref=
"refmovieFile1"
v-model=
"imgName"
:parms=
"parmsName"
files
/>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
...
@@ -74,17 +84,12 @@ export default {
...
@@ -74,17 +84,12 @@ export default {
name
:
"Edit"
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
imgName
:
""
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
},
parms
:
{
parmsName
:
"app=material&eid=1&name=documentTemplate"
,
app
:
"material"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
};
};
},
},
props
:
{
props
:
{
...
@@ -99,17 +104,12 @@ export default {
...
@@ -99,17 +104,12 @@ export default {
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
url
;
this
.
entity
.
imgName
=
r
.
result
.
templateId
;
});
});
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
url
=
this
.
parms
.
eid
;
}
else
{
this
.
entity
.
url
=
""
;
}
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
...
@@ -135,6 +135,13 @@ export default {
...
@@ -135,6 +135,13 @@ export default {
},
},
},
},
watch
:
{
watch
:
{
imgName
(
newName
,
oldName
)
{
if
(
newName
!=
""
)
{
const
imgPathsArr
=
JSON
.
parse
(
newName
);
this
.
entity
.
templateId
=
imgPathsArr
[
0
].
filePath
;
this
.
entity
.
template
=
imgPathsArr
[
0
].
fileName
;
}
},
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
this
.
load
(
v
);
...
...
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