Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
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
hooloo
web
soss
Commits
30c6c712
Commit
30c6c712
authored
Jun 02, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改页面权限
parent
58438599
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
14 deletions
+23
-14
src/directive/permission/hasPermi.js
+7
-0
src/views/customer/index.vue
+7
-5
src/views/order/order/index.vue
+2
-2
src/views/order/refund/index.vue
+1
-1
src/views/shop/shop/components/addShop.vue
+1
-1
src/views/shop/shop/index.vue
+5
-5
No files found.
src/directive/permission/hasPermi.js
View file @
30c6c712
...
@@ -18,6 +18,13 @@ export default {
...
@@ -18,6 +18,13 @@ export default {
return
all_permission
===
permission
||
permissionFlag
.
includes
(
permission
)
return
all_permission
===
permission
||
permissionFlag
.
includes
(
permission
)
})
})
//自定义权限按钮处理
if
(
vnode
.
elm
.
attributes
[
"myattr"
]
){
if
(
!
hasPermissions
)
{
vnode
.
elm
.
innerHTML
=
vnode
.
elm
.
inner
return
;
}
}
if
(
!
hasPermissions
)
{
if
(
!
hasPermissions
)
{
el
.
parentNode
&&
el
.
parentNode
.
removeChild
(
el
)
el
.
parentNode
&&
el
.
parentNode
.
removeChild
(
el
)
}
}
...
...
src/views/customer/index.vue
View file @
30c6c712
...
@@ -20,16 +20,18 @@
...
@@ -20,16 +20,18 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
v-hasPermi=
"['system:customer:query']"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
v-loading=
"loading"
:data=
"customerList"
>
<el-table
v-loading=
"loading"
:data=
"customerList"
>
<el-table-column
label=
"用户"
align=
"center"
prop=
"userName"
>
<el-table-column
label=
"用户"
align=
"center"
prop=
"userName"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<a
@
click=
"getDetial(scope.row)"
style=
"color: blue"
>
{{
scope
.
row
.
userName
}}
</a>
<a
myattr=
"mcv"
v-hasPermi=
"['system:customer:view']"
>
</
template
>
<span
@
click=
"getDetial(scope.row)"
style=
"color: blue"
>
{{
scope
.
row
.
userName
}}
</span>
</a>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"手机号"
align=
"center"
prop=
"phoneNumber"
/>
<el-table-column
label=
"手机号"
align=
"center"
prop=
"phoneNumber"
/>
<el-table-column
label=
"订单量"
align=
"center"
prop=
"orderCount"
/>
<el-table-column
label=
"订单量"
align=
"center"
prop=
"orderCount"
/>
...
...
src/views/order/order/index.vue
View file @
30c6c712
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
v-hasPermi=
"['system:order:query']"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
<el-table-column
width=
"200"
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
width=
"200"
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['3','4','5','6','13'], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['3','4','5','6','13'], scope.row.state)"
@
click=
"refundClick(scope.row)"
>
退款
</el-button>
@
click=
"refundClick(scope.row)"
v-hasPermi=
"['system:order:refund']"
>
退款
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
src/views/order/refund/index.vue
View file @
30c6c712
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
v-hasPermi=
"['system:refund:query']"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
...
src/views/shop/shop/components/addShop.vue
View file @
30c6c712
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"dialog-footer"
>
<div
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
v-hasPermi=
"['system:shop:edit']"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</div>
</div>
...
...
src/views/shop/shop/index.vue
View file @
30c6c712
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<el-input
v-model=
"queryParams.machineCode"
placeholder=
"请输入店铺地址"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.machineCode"
placeholder=
"请输入店铺地址"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
v-hasPermi=
"['system:shop:query']"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -87,13 +87,13 @@
...
@@ -87,13 +87,13 @@
<el-button
v-show=
"scope.row.state !='3'"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
<el-button
v-show=
"scope.row.state !='3'"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:shop:remove']"
>
删除
</el-button>
v-hasPermi=
"['system:shop:remove']"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['1'], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['1'], scope.row.state)"
@
click=
"setShopState(scope.row, 2, 'setState')"
>
@
click=
"setShopState(scope.row, 2, 'setState')"
v-hasPermi=
"['system:shop:suspended']"
>
暂停营业
</el-button>
暂停营业
</el-button>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['2'], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['2'], scope.row.state)"
@
click=
"setShopState(scope.row, 1, 'setState')"
>
开始营业
</el-button>
@
click=
"setShopState(scope.row, 1, 'setState')"
v-hasPermi=
"['system:shop:start']"
>
开始营业
</el-button>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['3'], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['3'], scope.row.state)"
@
click=
"setShopState(scope.row, 1, 'setState')"
>
恢复营业
</el-button>
@
click=
"setShopState(scope.row, 1, 'setState')"
v-hasPermi=
"['system:shop:restart']"
>
恢复营业
</el-button>
<el-button
v-show=
"scope.row.isDefault=='0'"
size=
"mini"
type=
"text"
@
click=
"setShopState(scope.row)"
>
设为默认
</el-button>
<el-button
v-show=
"scope.row.isDefault=='0'"
size=
"mini"
type=
"text"
@
click=
"setShopState(scope.row)"
v-hasPermi=
"['system:shop:default']"
>
设为默认
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
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