Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bms-vue-obear
Project
Project
Details
Activity
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
daywrite
bms-vue-obear
Commits
c529d15a
Commit
c529d15a
authored
Jun 25, 2019
by
huai.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基本设置
parent
c6289de3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
25 deletions
+70
-25
setting.js
src/apis/setting.js
+8
-0
reimbursementHome.vue
src/components/reimbursement_list/reimbursementHome.vue
+0
-1
form.vue
src/components/setting_list/basic/form.vue
+54
-24
setting.js
src/routes/setting.js
+8
-0
No files found.
src/apis/setting.js
View file @
c529d15a
const
type
=
'setting'
const
setting
=
{
saveEditBasic
:
{
url
:
'/vue/setting/save-edit-basic'
},
getEditBasic
:
{
url
:
'/vue/setting/get-edit-basic'
},
getListImportFile
:
{
url
:
'/vue/setting/list-import-file'
},
...
...
src/components/reimbursement_list/reimbursementHome.vue
View file @
c529d15a
...
...
@@ -203,7 +203,6 @@ export default {
},
updateForm
(
search
)
{
debugger
let
params
=
this
.
setParams
({
...
this
.
form
,
page
:
this
.
pagenation
.
thispage
...
...
src/components/setting_list/basic/form.vue
View file @
c529d15a
<
template
>
<section
class=
"ec-page-wrapper"
style=
"overflow: hidden; padding-bottom: 0px;"
>
<el-alert
title=
""
type=
"info"
>
<BreadCrumb
name=
"基本设置"
></BreadCrumb>
</el-alert>
<br
/>
<el-form
label-width=
"120px"
ref=
"form"
:rules=
"rules"
:model=
"model"
class=
"ec-create-form"
>
<el-form-item
label=
"
Logo图标"
prop=
"attachment_id
"
class=
"ec-clear-left ec-form-item-lg"
>
<el-form-item
label=
"
财年起始日"
prop=
"data
"
class=
"ec-clear-left ec-form-item-lg"
>
<el-date-picker
v-model=
"
value11
"
v-model=
"
model.data
"
type=
"date"
placeholder=
"选择日期"
format=
"
yyyy 年 MM 月 dd 日
"
value-format=
"
yyyy-
MM-dd"
>
format=
"
MM-dd
"
value-format=
"MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"Logo图标"
prop=
"
attachment_i
d"
class=
"ec-clear-left ec-form-item-lg"
>
<el-form-item
label=
"Logo图标"
prop=
"
logoI
d"
class=
"ec-clear-left ec-form-item-lg"
>
<single-upload
label=
""
:file-name=
"
getFileName('receiptScan')
"
:file-name=
"
model.logoName
"
tips=
"建议上传一张透明背景的PNG文件,最大高度140像素,最大宽度200像素。"
:form-item=
"model.
attachment_i
d"
@
update:item=
"val =>
{model.
attachment_i
d = val}">
:form-item=
"model.
logoI
d"
@
update:item=
"val =>
{model.
logoI
d = val}">
</single-upload>
</el-form-item>
<el-form-item
label=
"首页内容"
prop=
"
attachment_i
d"
class=
"ec-clear-left ec-form-item-lg"
>
<el-form-item
label=
"首页内容"
prop=
"
contentI
d"
class=
"ec-clear-left ec-form-item-lg"
>
<single-upload
label=
""
:file-name=
"
getFileName('receiptScan')
"
:file-name=
"
model.contentName
"
tips=
"建议上传一张JPG文件,最大高度600像素,最大宽度1140像素。"
:form-item=
"model.
attachment_i
d"
@
update:item=
"val =>
{model.
attachment_i
d = val}">
:form-item=
"model.
contentI
d"
@
update:item=
"val =>
{model.
contentI
d = val}">
</single-upload>
</el-form-item>
<el-form-item
label=
""
prop=
"contentId"
class=
"ec-clear-left ec-form-item-lg"
>
<div
class=
"mt20"
style=
"margin-left: 150px;"
>
<el-button
type=
"cancel"
@
click
.
stop
.
prevent=
"_resetFields"
size=
"mini"
>
重 置
</el-button>
<el-button
type=
"confirm"
@
click
.
stop
.
prevent=
"_validate"
size=
"mini"
>
保存修改
</el-button>
</div>
</el-form-item>
</el-form>
</section>
</
template
>
...
...
@@ -36,17 +46,26 @@ import {
requestAPI
,
api
}
from
'@/lib/commonMixin'
import
singleUpload
from
'../common/singleUploadPic'
import
singleUpload
from
'../../common/singleUploadPic'
import
BreadCrumb
from
'../BreadCrumb'
export
default
{
name
:
'basicForm'
,
components
:
{
singleUpload
singleUpload
,
BreadCrumb
},
data
()
{
return
{
model
:
{},
model
:
{
data
:
''
,
dataId
:
''
,
logoId
:
''
,
logoName
:
''
,
contentId
:
''
,
contentName
:
''
},
rules
:
{}
}
},
...
...
@@ -55,31 +74,42 @@ export default {
},
mounted
()
{
this
.
getEdit
()
},
computed
:
{
},
methods
:
{
getNew
()
{
},
getEdit
(
id
)
{
// return requestAPI(api[`getEdit${this.t}${this.tt}`], {id})
// .then((res) => {
// return res.model
// })
getEdit
()
{
return
requestAPI
(
api
.
getEditBasic
,
{})
.
then
((
res
)
=>
{
this
.
model
.
id
=
res
.
model
[
0
].
id
this
.
model
.
data
=
res
.
model
[
0
].
setting_value
this
.
model
.
logoId
=
res
.
model
[
1
].
id
this
.
model
.
logoName
=
res
.
model
[
1
].
setting_value
this
.
model
.
contentId
=
res
.
model
[
2
].
id
this
.
model
.
contentName
=
res
.
model
[
2
].
setting_value
})
},
_validate
(
cb
)
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
_params
=
{}
_params
[
'setting['
+
this
.
model
.
id
+
']'
]
=
this
.
model
.
data
_params
[
'setting['
+
this
.
model
.
logoId
+
']'
]
=
this
.
model
.
logoName
_params
[
'setting['
+
this
.
model
.
contentId
+
']'
]
=
this
.
model
.
contentName
requestAPI
(
Object
.
assign
(
api
.
saveEditBasic
,
{
method
:
'POST'
}),
_params
)
.
then
((
res
)
=>
{
this
.
$message
.
success
(
'操作成功'
)
})
}
})
},
_resetFields
()
{
this
.
$refs
[
'form'
].
resetFields
()
//
this.$refs['form'].resetFields()
}
}
}
...
...
src/routes/setting.js
View file @
c529d15a
...
...
@@ -31,6 +31,7 @@ import TaxonomyTerm10List from '../components/setting_list/taxonomy_term_10/taxo
import
TaxonomyTerm13List
from
'../components/setting_list/taxonomy_term_13/taxonomy_term_13'
import
ProjectProgressList
from
'../components/setting_list/project_progress/project_progress_list'
import
ImportHistoryList
from
'../components/setting_list/import-history/import_history_list.vue'
import
Basic
from
'../components/setting_list/basic/form.vue'
const
projectTitle
=
'金畅逍BMS - '
const
routes
=
[{
...
...
@@ -264,5 +265,12 @@ const routes = [{
meta
:
{
title
:
projectTitle
+
'系统设置'
}
},
{
path
:
'/setting/basic'
,
name
:
'basic'
,
component
:
Basic
,
meta
:
{
title
:
projectTitle
+
'系统设置'
}
}]
export
default
routes
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