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
12ff8d6b
Commit
12ff8d6b
authored
Sep 21, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模板ok
parent
4c0814bb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
179 additions
and
122 deletions
+179
-122
zh-CN.js
i18n/locale/zh-CN.js
+1
-1
add.vue
pages/word/template/add.vue
+8
-15
api.js
pages/word/template/api.js
+7
-7
edit.vue
pages/word/template/edit.vue
+139
-93
index.vue
pages/word/template/index.vue
+24
-6
No files found.
i18n/locale/zh-CN.js
View file @
12ff8d6b
...
...
@@ -1743,7 +1743,7 @@ export default {
name
:
'名称'
,
status
:
'状态'
,
creator
:
'创建人'
,
remark
:
''
,
remark
:
'
备注
'
,
url
:
'模板路径'
,
},
document_ref
:{
...
...
pages/word/template/add.vue
View file @
12ff8d6b
...
...
@@ -51,20 +51,20 @@
<Input
v-model=
"entity.creator"
></Input>
</FormItem>
</Col>
-->
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
></Input>
</FormItem>
</Col>
-->
<Col
:span=
"24"
>
<FormItem
:label=
"l('url')"
prop=
"url"
>
<!--
<InputFile
v-model=
"entity.url"
></InputFile>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
...
...
@@ -77,15 +77,9 @@ export default {
return
{
disabled
:
false
,
entity
:
{
creationTime
:
null
,
creatorUserId
:
null
,
lastModificationTime
:
null
,
lastModifierUserId
:
null
,
isDeleted
:
null
,
deletionTime
:
null
,
deleterUserId
:
null
,
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
name
:
""
,
status
:
null
,
status
:
1
,
creator
:
""
,
remark
:
""
,
url
:
""
,
...
...
@@ -116,7 +110,6 @@ export default {
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
url
=
this
.
parms
.
eid
;
}
else
{
// this.entity.filePath = "";
this
.
entity
.
url
=
""
;
}
Api
.
create
(
this
.
entity
)
...
...
pages/word/template/api.js
View file @
12ff8d6b
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
material
}
documenttemplate/paged`
,
index
:
`
${
material
}
/
documenttemplate/paged`
,
paged
(
params
){
return
Api
.
post
(
`
${
material
}
documenttemplate/paged`
,
params
);
return
Api
.
post
(
`
${
material
}
/
documenttemplate/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
material
}
documenttemplate/get`
,
params
);
return
Api
.
get
(
`
${
material
}
/
documenttemplate/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
material
}
documenttemplate/create`
,
params
);
return
Api
.
post
(
`
${
material
}
/
documenttemplate/create`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
material
}
documenttemplate/update`
,
params
);
return
Api
.
post
(
`
${
material
}
/
documenttemplate/update`
,
params
);
},
delete
(
id
)
{
return
Api
.
delete
(
`
${
material
}
documenttemplate/delete`
,{
params
:{
id
:
id
}});
return
Api
.
delete
(
`
${
material
}
/
documenttemplate/delete`
,{
params
:{
id
:
id
}});
},
deletes
(
params
)
{
return
Api
.
post
(
`
${
material
}
documenttemplate/batchdelete`
,
params
);
return
Api
.
post
(
`
${
material
}
/
documenttemplate/batchdelete`
,
params
);
}
}
\ No newline at end of file
pages/word/template/edit.vue
View file @
12ff8d6b
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.lastModificationTime"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<InputNumber
v-model=
"entity.lastModifierUserId"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<InputNumber
v-model=
"entity.isDeleted"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"date"
v-model=
"entity.deletionTime"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<InputNumber
v-model=
"entity.status"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('creator')"
prop=
"creator"
>
<Input
v-model=
"entity.creator"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
>
</Input>
</FormItem></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('url')"
prop=
"url"
>
<InputFile
v-model=
"entity.url"
></InputFile>
</FormItem></Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem>
</Form>
</Col>
-->
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.lastModificationTime"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<InputNumber
v-model=
"entity.lastModifierUserId"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<InputNumber
v-model=
"entity.isDeleted"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"date"
v-model=
"entity.deletionTime"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"word_template_status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('creator')"
prop=
"creator"
>
<Input
v-model=
"entity.creator"
></Input>
</FormItem>
</Col>
-->
<Col
:span=
"24"
>
<FormItem
:label=
"l('url')"
prop=
"url"
>
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Edit'
,
data
()
{
return
{
disabled
:
false
,
entity
:
{
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
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
;
})
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
).
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"document_template"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
import
Api
from
"./api"
;
export
default
{
name
:
"Edit"
,
data
()
{
return
{
disabled
:
false
,
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
parms
:
{
app
:
"material"
,
eid
:
null
,
name
:
""
,
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
.
url
;
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
url
=
this
.
parms
.
eid
;
}
else
{
this
.
entity
.
url
=
""
;
}
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"
);
},
l
(
key
)
{
key
=
"document_template"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
},
},
};
</
script
>
\ No newline at end of file
pages/word/template/index.vue
View file @
12ff8d6b
...
...
@@ -4,7 +4,7 @@
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入
关键字名称"
v-model=
"easySearch.keys.value"
/>
<Input
placeholder=
"请输入
名称"
v-model=
"easySearch.keys.value"
clearable
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
...
...
@@ -47,6 +47,11 @@ export default {
detail
:
null
,
curId
:
0
,
columns
:
[
{
type
:
"index"
,
width
:
60
,
align
:
"center"
,
},
{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
...
...
@@ -54,6 +59,13 @@ export default {
align
:
"left"
,
high
:
true
,
},
{
key
:
"name"
,
title
:
this
.
l
(
"name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
...
...
@@ -65,46 +77,52 @@ export default {
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
,
type
:
"user"
,
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"
name
"
,
title
:
this
.
l
(
"
name
"
),
key
:
"
status
"
,
title
:
this
.
l
(
"
status
"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
code
:
"word_template_status"
,
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"left"
,
high
:
true
},
{
key
:
"creator"
,
title
:
this
.
l
(
"creator"
),
align
:
"left"
,
high
:
true
},
// { key: "creator", title: this.l("creator"), align: "left", high: true },
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
high
:
true
},
{
title
:
"操作"
,
...
...
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