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
29052d43
Commit
29052d43
authored
May 20, 2019
by
daywrite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置-实施阶段
parent
e204e8bd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
373 additions
and
1 deletion
+373
-1
api.js
src/api.js
+2
-0
setting.js
src/apis/setting.js
+27
-0
breadCrumb.vue
src/components/setting_list/breadCrumb.vue
+15
-0
client_type_list.vue
src/components/setting_list/client_type/client_type_list.vue
+40
-1
form.vue
src/components/setting_list/implement/form.vue
+98
-0
modal.vue
src/components/setting_list/implement/modal.vue
+81
-0
implement_type_list.vue
...nents/setting_list/implement_type/implement_type_list.vue
+105
-0
setting.js
src/routes/setting.js
+5
-0
No files found.
src/api.js
View file @
29052d43
...
...
@@ -8,6 +8,7 @@ import AccountApi from './apis/account.js'
import
ProfileApi
from
'./apis/profile.js'
import
ServiceApi
from
'./apis/service.js'
import
PunchApi
from
'./apis/punch.js'
import
SettingApi
from
'./apis/setting.js'
const
API_HOST
=
process
.
env
.
API_HOST
const
API_PORT
=
process
.
env
.
API_PORT
...
...
@@ -42,6 +43,7 @@ apis = Object.assign(apis, AccountApi)
apis
=
Object
.
assign
(
apis
,
ProfileApi
)
apis
=
Object
.
assign
(
apis
,
ServiceApi
)
apis
=
Object
.
assign
(
apis
,
PunchApi
)
apis
=
Object
.
assign
(
apis
,
SettingApi
)
export
default
{
option
,
...
...
src/apis/setting.js
0 → 100644
View file @
29052d43
const
type
=
'setting'
function
temp
(
t
)
{
return
{
[
`getList
${
t
}
Type`
]:
{
url
:
`/vue/
${
type
}
/list-
${
t
}
-type`
},
[
`getNew
${
t
}
Type`
]:
{
url
:
`/vue/
${
type
}
/get-new-
${
t
}
-type`
},
[
`getEdit
${
t
}
Type`
]:
{
url
:
`/vue/
${
type
}
/get-edit-
${
t
}
-type`
},
[
`saveNew
${
t
}
Type`
]:
{
url
:
`/vue/
${
type
}
/save-new-
${
t
}
-type`
},
[
`saveEdit
${
t
}
Type`
]:
{
url
:
`/vue/
${
type
}
/save-edit-
${
t
}
-type`
},
[
`delete
${
t
}
Type`
]:
{
url
:
`/vue/
${
type
}
/delete-
${
t
}
-type`
}
}
}
export
default
{
...
temp
(
'implement'
)
}
src/components/setting_list/breadCrumb.vue
0 → 100644
View file @
29052d43
<
template
>
<section>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item
:to=
"
{ path: '/setting' }">系统设置
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
name
}}
</el-breadcrumb-item>
</el-breadcrumb>
</section>
</
template
>
<
script
>
export
default
{
name
:
'breadCrumb'
,
props
:
[
'name'
]
}
</
script
>
src/components/setting_list/client_type/client_type_list.vue
View file @
29052d43
...
...
@@ -8,16 +8,55 @@
@
update:headerAdd=
"() => add()"
@
update:headerClear=
"() => searchClear()"
>
</search-header>
<div
class=
"page-body-content"
>
<el-alert
title=
""
type=
"info"
>
<BreadCrumb
name=
"客户性质"
></BreadCrumb>
</el-alert>
<el-table
:data=
"tableData"
border
stripe
style=
"width: 100%"
>
<el-table-column
prop=
"date"
align=
"center"
label=
"客户性质"
>
</el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"备注"
>
</el-table-column>
<el-table-column
prop=
"address"
align=
"center"
label=
"排序"
>
</el-table-column>
<el-table-column
prop=
"address"
align=
"center"
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"editSch(item)"
:disabled=
"!item.can_update"
><i
class=
"fa fa-edit animated"
></i>
编辑
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"deleteSch(item.id)"
:disabled=
"!item.can_delete"
><i
class=
"fa fa-trash-o animated-hove"
></i>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</section>
</template>
<
script
>
import
SearchHeader
from
'../../common/searchHeader'
import
BreadCrumb
from
'../BreadCrumb'
export
default
{
name
:
'client_type_list'
,
components
:
{
SearchHeader
SearchHeader
,
BreadCrumb
},
methods
:
{
...
...
src/components/setting_list/implement/form.vue
0 → 100644
View file @
29052d43
<
template
>
<section
class=
"ec-page-wrapper"
style=
"overflow: hidden; padding-bottom: 0px;"
>
<el-form
label-width=
"120px"
ref=
"form"
:rules=
"rules"
:model=
"model"
class=
"ec-create-form"
>
<el-form-item
label=
"实施阶段"
prop=
"type"
class=
"ec-clear-left is-required"
>
<el-input
class=
"ec-input-normal"
size=
"mini"
v-model
.
trim=
"model.type"
>
</el-input>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"description"
class=
"ec-clear-left ec-form-item-lg"
>
<el-input
class=
"ec-input-normal"
type=
"textarea"
size=
"mini"
:rows=
"3"
v-model
.
trim=
"model.description"
>
</el-input>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"order"
class=
"ec-clear-left is-required"
>
<el-input
class=
"ec-input-normal"
size=
"mini"
v-model
.
trim=
"model.order"
>
</el-input>
</el-form-item>
</el-form>
</section>
</
template
>
<
script
>
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
export
default
{
name
:
'implementForm'
,
props
:
{
model
:
Object
},
components
:
{
},
data
()
{
return
{
rules
:
{
},
query
:
{}
}
},
created
()
{
},
mounted
()
{
},
computed
:
{
},
methods
:
{
getNew
()
{
requestAPI
(
api
.
getNewimplementType
,
{})
.
then
((
res
)
=>
{
this
.
query
.
order
=
res
.
nextOrder
})
},
getEdit
(
id
)
{
return
requestAPI
(
api
.
getEditimplementType
,
{
id
})
.
then
((
res
)
=>
{
return
res
.
model
})
},
_validate
(
cb
)
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
cb
&&
cb
()
}
})
},
_resetFields
()
{
this
.
$refs
[
'form'
].
resetFields
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.ec-create-form
.el-form-item
{
width
:
70%
;
}
// .ec-create-form .el-form-item {
// width: 100%;
// }
</
style
>
src/components/setting_list/implement/modal.vue
0 → 100644
View file @
29052d43
<
template
>
<section>
<sidePopup
ref=
"sidePopup"
title=
"新建实施阶段"
:width=
"50"
@
update:close=
"() => btnClose()"
>
<Foom
ref=
"form"
:model=
"model"
>
</Foom>
<div
class=
"mt20"
style=
"margin-left: 150px;"
>
<el-button
type=
"cancel"
@
click
.
stop
.
prevent=
"handleClose"
size=
"mini"
>
取 消
</el-button>
<el-button
type=
"confirm"
@
click
.
stop
.
prevent=
"save"
size=
"mini"
>
确 定
</el-button>
</div>
</sidePopup>
</section>
</
template
>
<
script
>
import
{
requestAPI
,
api
,
UTIL
}
from
'@/lib/commonMixin'
import
Foom
from
'./form'
import
{
setModule
}
from
'@/lib/viewHelper'
export
default
{
components
:
{
Foom
},
data
()
{
return
{
diaVis
:
false
,
model
:
{
id
:
''
,
type
:
''
,
order
:
''
,
description
:
''
}
}
},
methods
:
{
show
(
model
)
{
if
(
model
)
{
this
.
$refs
.
form
.
getEdit
(
model
.
id
)
.
then
((
_model
)
=>
{
UTIL
.
flatten
(
this
.
model
,
_model
)
})
}
else
{
this
.
$refs
.
form
.
getNew
()
}
this
.
$refs
.
sidePopup
.
show
()
},
handleClose
()
{
this
.
$refs
.
sidePopup
.
close
(()
=>
{
this
.
$refs
.
form
.
_resetFields
()
})
},
btnClose
()
{
this
.
$refs
.
form
.
_resetFields
()
},
save
()
{
let
_params
=
Object
.
assign
({},
setModule
(
this
.
model
,
'ImplementTypes'
))
let
_apiUrl
=
!
this
.
model
.
id
?
api
.
saveNewimplementType
:
api
.
saveEditimplementType
!
this
.
model
.
id
&&
delete
_params
[
'ImplementTypes[id]'
]
this
.
$refs
[
'form'
].
_validate
(()
=>
{
requestAPI
(
Object
.
assign
(
_apiUrl
,
{
method
:
'POST'
}),
_params
)
.
then
((
res
)
=>
{
this
.
$refs
.
sidePopup
.
close
()
this
.
$message
.
success
(
'操作成功'
)
this
.
$parent
.
_reload
()
})
// save
})
// validate
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
src/components/setting_list/implement_type/implement_type_list.vue
0 → 100644
View file @
29052d43
<
template
>
<section>
<div
class=
"content"
>
<search-header
ref=
"searchHeader"
:title=
"'实施阶段'"
:add-title=
"'新建实施阶段'"
@
update:headerAdd=
"() => add()"
@
update:headerClear=
"() => searchClear()"
>
</search-header>
<div
class=
"page-body-content"
>
<el-alert
title=
""
type=
"info"
>
<BreadCrumb
name=
"实施阶段"
></BreadCrumb>
</el-alert>
<el-table
:data=
"list"
border
stripe
style=
"width: 100%;margin-top:20px;"
>
<el-table-column
prop=
"type"
align=
"center"
label=
"实施阶段"
>
</el-table-column>
<el-table-column
prop=
"description"
align=
"center"
label=
"备注"
>
</el-table-column>
<el-table-column
prop=
"order"
align=
"center"
label=
"排序"
>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"editEvent(scope.row)"
:disabled=
"!scope.row.can_update"
><i
class=
"fa fa-edit animated"
></i>
编辑
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click
.
prevent
.
stop=
"deleteEvent(scope.row.id)"
:disabled=
"!scope.row.can_delete"
><i
class=
"fa fa-trash-o animated-hove"
></i>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
<FormModal
ref=
"formModal"
></FormModal>
</section>
</template>
<
script
>
import
SearchHeader
from
'../../common/searchHeader'
import
BreadCrumb
from
'../BreadCrumb'
import
FormModal
from
'../implement/modal'
import
{
requestAPI
,
api
}
from
'@/lib/commonMixin'
export
default
{
name
:
'implement_type_list'
,
components
:
{
SearchHeader
,
BreadCrumb
,
FormModal
},
data
()
{
return
{
list
:
[]
}
},
created
()
{
this
.
getList
()
},
methods
:
{
getList
()
{
requestAPI
(
api
.
getListimplementType
,
{})
.
then
((
res
)
=>
{
this
.
list
=
res
.
list
})
},
_reload
()
{
this
.
getList
()
},
// 6.1新增
add
()
{
this
.
$refs
.
formModal
.
show
()
},
// 6.2编辑
editEvent
(
item
)
{
this
.
$refs
.
formModal
.
show
(
item
)
},
deleteEvent
(
id
)
{
let
deleteTip
=
'删除'
this
.
$confirm
(
`
${
deleteTip
}
?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
requestAPI
(
api
.
deleteimplementType
,
{
id
})
.
then
((
res
)
=>
{
this
.
$message
.
success
(
`
${
deleteTip
}
成功`
)
this
.
_reload
()
})
}).
catch
(()
=>
{
this
.
$message
.
info
(
`取消
${
deleteTip
}
`
)
})
},
searchClear
()
{}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/routes/setting.js
View file @
29052d43
import
SettingIndex
from
'../components/setting/index'
import
ClientTypeList
from
'../components/setting_list/client_type/client_type_list'
import
ImplementTypeList
from
'../components/setting_list/implement_type/implement_type_list'
const
routes
=
[{
path
:
'/setting'
,
name
:
'settingIndex'
,
...
...
@@ -8,5 +9,9 @@ const routes = [{
path
:
'/setting/client-type'
,
name
:
'settingClientType'
,
component
:
ClientTypeList
},
{
path
:
'/setting/implement-type'
,
name
:
'settingImplementType'
,
component
:
ImplementTypeList
}]
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