Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-system
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
luoyangfei
store-system
Commits
7de07c63
Commit
7de07c63
authored
Nov 08, 2018
by
扫地僧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
半成品
parent
178f14ed
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
378 additions
and
68 deletions
+378
-68
index.js
2code/web/mgt_pro/config/index.js
+2
-2
adver.js
2code/web/mgt_pro/src/api/adver.js
+2
-2
system.js
2code/web/mgt_pro/src/api/system.js
+9
-0
index.js
2code/web/mgt_pro/src/router/index.js
+5
-5
administratorstList.vue
.../mgt_pro/src/views/administrators/administratorstList.vue
+102
-32
advertList.vue
2code/web/mgt_pro/src/views/advert/advertList.vue
+0
-0
ViewPage.vue
2code/web/mgt_pro/src/views/advert/components/ViewPage.vue
+77
-0
cropper.vue
2code/web/mgt_pro/src/views/advert/components/cropper.vue
+142
-0
user.vue
2code/web/mgt_pro/src/views/system/user.vue
+39
-27
No files found.
2code/web/mgt_pro/config/index.js
View file @
7de07c63
...
@@ -13,8 +13,8 @@ module.exports = {
...
@@ -13,8 +13,8 @@ module.exports = {
proxyTable
:
{},
proxyTable
:
{},
// Various Dev Server settings
// Various Dev Server settings
host
:
'localhost'
,
// can be overwritten by process.env.HOST
//
host: 'localhost', // can be overwritten by process.env.HOST
// host: '192.168.1.100
', // can be overwritten by process.env.HOST
host
:
'192.168.1.112
'
,
// can be overwritten by process.env.HOST
port
:
9527
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
port
:
9527
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser
:
true
,
autoOpenBrowser
:
true
,
errorOverlay
:
true
,
errorOverlay
:
true
,
...
...
2code/web/mgt_pro/src/api/adver.js
View file @
7de07c63
import
request
from
'./request'
import
request
from
'./request'
import
qs
from
'qs'
import
qs
from
'qs'
export
function
getA
dvertList
(
data
)
{
export
function
a
dvertList
(
data
)
{
return
request
({
return
request
({
url
:
'/advert/
getA
dvertList'
,
url
:
'/advert/
a
dvertList'
,
method
:
'post'
,
method
:
'post'
,
data
:
qs
.
stringify
(
data
)
data
:
qs
.
stringify
(
data
)
})
})
...
...
2code/web/mgt_pro/src/api/system.js
View file @
7de07c63
...
@@ -37,6 +37,15 @@ export function queryAllSysRole() {
...
@@ -37,6 +37,15 @@ export function queryAllSysRole() {
})
})
}
}
// 选择管理员
export
function
queryAllShopAdmin
()
{
return
request
({
url
:
'/sysRole/queryAllSysRole'
,
method
:
'post'
,
})
}
// --------user---end-----------
// --------user---end-----------
...
...
2code/web/mgt_pro/src/router/index.js
View file @
7de07c63
...
@@ -54,18 +54,18 @@ export const asyncRouterMap = [
...
@@ -54,18 +54,18 @@ export const asyncRouterMap = [
//
商家
管理
//
店铺
管理
{
{
path
:
'/store'
,
path
:
'/store'
,
alwaysShow
:
true
,
alwaysShow
:
true
,
component
:
Layout
,
component
:
Layout
,
redirect
:
'/store/storeList'
,
redirect
:
'/store/storeList'
,
meta
:
{
meta
:
{
title
:
'
商家
管理'
,
title
:
'
店铺
管理'
,
icon
:
'cheliang'
icon
:
'cheliang'
},
},
children
:
[
children
:
[
{
path
:
'storeList'
,
component
:
_import
(
'store/storeList'
),
name
:
'store_storeList'
,
meta
:
{
title
:
'
商家
列表'
}}
{
path
:
'storeList'
,
component
:
_import
(
'store/storeList'
),
name
:
'store_storeList'
,
meta
:
{
title
:
'
店铺
列表'
}}
]
]
},
},
...
@@ -84,14 +84,14 @@ export const asyncRouterMap = [
...
@@ -84,14 +84,14 @@ export const asyncRouterMap = [
]
]
},
},
// 店铺管理
// 店铺管理
员
{
{
path
:
'/administrators'
,
path
:
'/administrators'
,
alwaysShow
:
true
,
alwaysShow
:
true
,
component
:
Layout
,
component
:
Layout
,
redirect
:
'/administrators/administratorstList'
,
redirect
:
'/administrators/administratorstList'
,
meta
:
{
meta
:
{
title
:
'店铺管理'
,
title
:
'店铺管理
员
'
,
icon
:
'cheliang'
icon
:
'cheliang'
},
},
children
:
[
children
:
[
...
...
2code/web/mgt_pro/src/views/administrators/administratorstList.vue
View file @
7de07c63
This diff is collapsed.
Click to expand it.
2code/web/mgt_pro/src/views/advert/advertList.vue
View file @
7de07c63
This diff is collapsed.
Click to expand it.
2code/web/mgt_pro/src/views/advert/components/ViewPage.vue
0 → 100644
View file @
7de07c63
<
template
>
<div
class=
"view-page"
>
<div
class=
"phone-bg"
>
<img
:src=
"require('../../../../static/images/phone-bg.png')"
alt=
""
>
</div>
<div
class=
"page-infro"
>
<!--
<el-carousel
height=
"202px"
indicator-position=
"none"
>
<el-carousel-item
v-for=
"(item,index) in imageArr"
:key=
"index"
>
<div
class=
"bannerImg"
><img
:src=
"item"
alt=
""
></div>
</el-carousel-item>
</el-carousel>
-->
<!--
<div
class=
"bannerImg"
>
<img
:src=
"data.advertPicUrl"
alt=
""
height=
"202"
>
</div>
-->
<div
class=
"text-infro"
v-html=
"data.advertContent"
></div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:[
"data"
],
data
(){
return
{
imageArr
:[]
}
},
beforeMount
(){
const
data
=
this
.
data
;
// let arr = [];
// for(const key in data){
// if(key.indexOf('dishesPicUrl')>-1 && data[key]){
// arr.push(data[key])
// }
// }
// this.imageArr = arr
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.view-page
{
position
:
relative
;
.phone-bg
{
width
:
360px
;
img
{
width
:
100%
;
}
}
.page-infro
{
background
:
#fff
;
position
:
absolute
;
top
:
110px
;
left
:
30px
;
width
:
304px
;
height
:
540px
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
.bannerImg
{
width
:
100%
;
height
:
202px
;
img
{
width
:
100%
;
height
:
100%
;
}
}
.text-infro
{
padding
:
0
15px
;
}
}
}
</
style
>
\ No newline at end of file
2code/web/mgt_pro/src/views/advert/components/cropper.vue
0 → 100644
View file @
7de07c63
<
template
>
<div
class=
"uploadimg-container"
:style=
"
{width:width+'px'}">
<el-upload
class=
"uploader-component"
:style=
"styleObj"
action=
""
:show-file-list=
"false"
:before-upload=
"uploadFile"
>
<img
:style=
"styleObj"
v-if=
"(type||imageUrl)&&viewUrl"
:src=
"viewUrl || imageUrl"
class=
"avatar"
>
<i
v-else
:style=
"styleObj"
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
<div
class=
"tip"
>
宽/高:
{{
`${width
}
*${height
}
`
}}
<
/div
>
<
/div
>
<
/template
>
<
script
>
import
axios
from
"axios"
;
export
default
{
props
:
[
"width"
,
"height"
,
"resPath"
,
"type"
,
"viewUrl"
,
"imageType"
,
"idx"
],
data
()
{
return
{
imageUrl
:
""
,
param
:
{
resPath
:
this
.
resPath
}
,
styleObj
:
{
width
:
this
.
width
+
"px"
,
height
:
this
.
height
+
"px"
,
lineHeight
:
this
.
height
+
"px"
}
}
;
}
,
mounted
()
{
}
,
updated
()
{
}
,
methods
:
{
uploadFile
(
file
)
{
const
upLoadUrl
=
process
.
env
.
BASE_API
+
"/upload/uploadFile"
;
let
formData
=
new
FormData
();
formData
.
append
(
"files"
,
file
);
formData
.
append
(
"resPath"
,
this
.
resPath
);
// 限制图片上传比例
// if (this.imageType === "banner")
{
// console.log(this.imageType);
// formData.append("imageType", this.imageType);
//
}
const
fileSize
=
file
.
size
/
1024
/
1024
;
if
(
fileSize
>
2
)
{
this
.
$message
({
message
:
"上传图片不能大于2M"
,
type
:
"warning"
}
);
}
else
{
axios
.
post
(
upLoadUrl
,
formData
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
1
)
{
this
.
imageUrl
=
res
.
data
.
data
;
if
(
this
.
idx
===
undefined
)
{
this
.
$emit
(
"emitSuccess"
,
res
.
data
.
data
);
}
else
{
const
param
=
{
url
:
res
.
data
.
data
,
idx
:
this
.
idx
}
;
this
.
$emit
(
"emitSuccess"
,
param
);
}
this
.
$message
({
message
:
"上传成功"
,
type
:
"success"
}
);
}
else
{
this
.
$message
({
message
:
res
.
data
.
msg
,
type
:
"warning"
}
);
}
}
);
}
}
,
clearImg
()
{
this
.
imageUrl
=
""
;
}
}
}
;
<
/script
>
<
style
lang
=
"scss"
scoped
>
.
uploadimg
-
container
{
position
:
relative
;
overflow
:
hidden
;
display
:
inline
-
block
;
.
uploader
-
component
{
border
:
1
px
dashed
#
d9d9d9
;
border
-
radius
:
6
px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
width
:
178
px
;
height
:
178
px
;
transition
:
all
0.3
s
;
.
avatar
-
uploader
-
icon
{
font
-
size
:
28
px
;
color
:
#
8
c939d
;
width
:
178
px
;
height
:
178
px
;
line
-
height
:
178
px
;
text
-
align
:
center
;
transition
:
all
0.3
s
;
}
.
avatar
{
width
:
178
px
;
height
:
178
px
;
display
:
block
;
}
&
:
hover
{
border
-
color
:
#
409
eff
;
.
avatar
-
uploader
-
icon
{
font
-
size
:
28
px
;
color
:
#
409
eff
;
width
:
178
px
;
height
:
178
px
;
line
-
height
:
178
px
;
text
-
align
:
center
;
}
&
+
.
tip
{
left
:
10
px
;
opacity
:
1
;
}
}
}
.
tip
{
position
:
absolute
;
left
:
-
140
px
;
opacity
:
0
;
top
:
0
;
width
:
131
px
;
color
:
#
fff
;
text
-
shadow
:
2
px
2
px
2
px
rgba
(
$color
:
#
000000
,
$alpha
:
1
);
font
-
weight
:
700
;
cursor
:
pointer
;
transition
:
all
0.3
s
;
&
:
hover
{
left
:
10
px
;
opacity
:
1
;
}
}
}
<
/style
>
2code/web/mgt_pro/src/views/system/user.vue
View file @
7de07c63
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
<el-row
:gutter=
"15"
v-if=
"this.dialogBindData.flag!=='1'"
>
<el-row
:gutter=
"15"
v-if=
"this.dialogBindData.flag!=='1'"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
用户角色
</label></el-col>
<el-col
:span=
"8"
class=
"content-left"
><label>
用户角色
</label></el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-col
:span=
"16"
class=
"content-right"
>
<el-select
size=
"small"
v-if=
"dialogType===1 || dialogType===2"
placeholder=
"请选择
人员
"
v-model=
"dialogBindData.sysRole"
>
<el-select
size=
"small"
v-if=
"dialogType===1 || dialogType===2"
placeholder=
"请选择
角色
"
v-model=
"dialogBindData.sysRole"
>
<el-option
<el-option
v-for=
"item in chooseRole"
v-for=
"item in chooseRole"
:key=
"item.roleId"
:key=
"item.roleId"
...
@@ -116,11 +116,11 @@
...
@@ -116,11 +116,11 @@
</el-row>
</el-row>
<el-row
:gutter=
"15"
>
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
所属部门
</label></el-col>
<el-col
:span=
"8"
class=
"content-left"
><label>
店铺管理员
</label></el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-col
:span=
"16"
class=
"content-right"
>
<el-select
size=
"small"
v-if=
"dialogType===1 || dialogType===2"
placeholder=
"请选择
部门
"
v-model=
"dialogBindData.deptId"
@
change=
"getSectionsByDeptId"
>
<el-select
size=
"small"
v-if=
"dialogType===1 || dialogType===2"
placeholder=
"请选择
店铺管理员
"
v-model=
"dialogBindData.deptId"
@
change=
"getSectionsByDeptId"
>
<el-option
<el-option
v-for=
"item in
deptDatas
"
v-for=
"item in
shopAdminsData
"
:key=
"item.deptId"
:key=
"item.deptId"
:label=
"item.deptName"
:label=
"item.deptName"
:value=
"item.deptId"
>
:value=
"item.deptId"
>
...
@@ -130,25 +130,11 @@
...
@@ -130,25 +130,11 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
所属科室
</label></el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-select
size=
"small"
v-if=
"dialogType===1 || dialogType===2"
placeholder=
"请选择部门"
v-model=
"dialogBindData.sectionId"
>
<el-option
v-for=
"item in sectionDatas"
:key=
"item.sectionId"
:label=
"item.sectionName"
:value=
"item.sectionId"
>
</el-option>
</el-select>
<span
v-else
>
{{viewSectionName(dialogBindData.sectionId)}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
用户名
称
</label></el-col>
<el-col
:span=
"8"
class=
"content-left"
><label>
用户名
</label></el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-col
:span=
"16"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入用户名
称
"
v-model=
"dialogBindData.userName"
></el-input>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入用户名"
v-model=
"dialogBindData.userName"
></el-input>
<span
v-else
>
{{dialogBindData.userName}}
</span>
<span
v-else
>
{{dialogBindData.userName}}
</span>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -156,7 +142,7 @@
...
@@ -156,7 +142,7 @@
<el-row
:gutter=
"15"
>
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
真实姓名
</label></el-col>
<el-col
:span=
"8"
class=
"content-left"
><label>
真实姓名
</label></el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-col
:span=
"16"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入
用户
名"
v-model=
"dialogBindData.realName"
></el-input>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入
真实姓
名"
v-model=
"dialogBindData.realName"
></el-input>
<span
v-else
>
{{dialogBindData.realName}}
</span>
<span
v-else
>
{{dialogBindData.realName}}
</span>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -219,6 +205,7 @@
...
@@ -219,6 +205,7 @@
</template>
</template>
<
script
>
<
script
>
import
axios
from
'axios'
;
import
elDragDialog
from
"@/directive/el-dragDialog"
;
import
elDragDialog
from
"@/directive/el-dragDialog"
;
import
*
as
system
from
"../../api/system"
;
import
*
as
system
from
"../../api/system"
;
import
{
fattCreateTime
}
from
"../../utils/fattTime"
;
import
{
fattCreateTime
}
from
"../../utils/fattTime"
;
...
@@ -248,11 +235,12 @@ export default {
...
@@ -248,11 +235,12 @@ export default {
mobilePhone
:
""
,
mobilePhone
:
""
,
isAvailable
:
1
,
isAvailable
:
1
,
sysRole
:
""
,
sysRole
:
""
,
deptId
:
""
,
flag
:
""
flag
:
""
,
sectionName
:
""
,
sectionId
:
""
},
},
//店铺管理员下拉数据
shopAdminsData
:
null
,
// 是否提交
// 是否提交
submmitSuccess
:
false
,
submmitSuccess
:
false
,
// 角色选择数据
// 角色选择数据
...
@@ -337,7 +325,10 @@ export default {
...
@@ -337,7 +325,10 @@ export default {
// },
// },
add
()
{
add
()
{
this
.
dialogType
=
1
;
this
.
dialogType
=
1
;
this
.
getRoleList
(()
=>
{
// this.getRoleList(() => {
// this.dialogState = true;
// });
this
.
getRoleAndUserData
(()
=>
{
this
.
dialogState
=
true
;
this
.
dialogState
=
true
;
});
});
},
},
...
@@ -412,7 +403,7 @@ export default {
...
@@ -412,7 +403,7 @@ export default {
}
else
{
}
else
{
this
.
submmitSuccess
=
true
;
this
.
submmitSuccess
=
true
;
system
.
addOrEditSysUser
(
this
.
dialogBindData
).
then
(
res
=>
{
system
.
addOrEditSysUser
(
this
.
dialogBindData
).
then
(
res
=>
{
debugger
debugger
;
if
(
res
.
data
.
code
==
1
)
{
if
(
res
.
data
.
code
==
1
)
{
this
.
getList
(()
=>
{
this
.
getList
(()
=>
{
this
.
$message
({
this
.
$message
({
...
@@ -496,6 +487,27 @@ export default {
...
@@ -496,6 +487,27 @@ export default {
cb
?
cb
()
:
""
;
cb
?
cb
()
:
""
;
});
});
},
},
//获取角色和管理员下拉数据
getRoleAndUserData
(
cb
)
{
axios
.
all
([
//方法一
system
.
queryAllSysRole
().
then
(
res
=>
{
this
.
chooseRole
=
res
.
data
;
}),
//方法二
system
.
queryAllShopAdmin
().
then
(
res
=>
{
this
.
shopAdminsData
=
res
.
data
;
})
])
.
then
(
axios
.
spread
((
acct
,
perms
)
=>
{
cb
?
cb
()
:
""
;
})
);
},
// 格式化时间
// 格式化时间
fattTime
(
time
)
{
fattTime
(
time
)
{
return
fattCreateTime
(
time
);
return
fattCreateTime
(
time
);
...
...
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