Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
4edd56c2
Commit
4edd56c2
authored
Jun 19, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.没数据分页页数12.没封面放个图标3、菜单商品个数,订单管理,仍然没完成4.购物车相关内容展示5.菜单管理bug
parent
8bfb0ef8
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
415 additions
and
113 deletions
+415
-113
src/components/comments-pagination.vue
src/components/comments-pagination.vue
+1
-1
src/components/cropper.vue
src/components/cropper.vue
+14
-1
src/components/menu.vue
src/components/menu.vue
+29
-12
src/components/order-list/order-list-cell.vue
src/components/order-list/order-list-cell.vue
+145
-22
src/components/order-list/order-list-com.vue
src/components/order-list/order-list-com.vue
+43
-17
src/components/order-list/order-list-list.vue
src/components/order-list/order-list-list.vue
+1
-1
src/components/service-list/commodity-list.vue
src/components/service-list/commodity-list.vue
+2
-2
src/components/shopping-cart/shopping-cart-cell.vue
src/components/shopping-cart/shopping-cart-cell.vue
+41
-14
src/components/shopping-cart/shopping-cart-com.vue
src/components/shopping-cart/shopping-cart-com.vue
+12
-2
src/components/shopping-cart/shopping-cart-list.vue
src/components/shopping-cart/shopping-cart-list.vue
+4
-0
src/components/table/table-um.vue
src/components/table/table-um.vue
+2
-2
src/pages/authority/menu/menus.vue
src/pages/authority/menu/menus.vue
+38
-23
src/pages/user/order/order_detail.vue
src/pages/user/order/order_detail.vue
+56
-15
src/request/api/user.js
src/request/api/user.js
+23
-1
src/services/helper.js
src/services/helper.js
+4
-0
No files found.
src/components/comments-pagination.vue
View file @
4edd56c2
...
...
@@ -49,7 +49,7 @@ export default {
data
:
()
=>
({
}
),
computed
:
{
totalPages
()
{
return
Math
.
ceil
(
this
.
total
/
this
.
pageSize
)
||
1
;
return
Math
.
floor
(
this
.
total
/
this
.
pageSize
)
+
1
||
1
;
}
,
preDisabled
()
{
return
this
.
currentPage
===
1
;
...
...
src/components/cropper.vue
View file @
4edd56c2
...
...
@@ -10,7 +10,11 @@
@
change=
"uploadImg($event,1)"
/>
</div>
<el-image
class=
"list_img_item"
:src=
"item.url"
:fit=
"fit"
></el-image>
<el-image
class=
"list_img_item"
:src=
"item.url"
:fit=
"fit"
>
<div
slot=
"error"
class=
"image-slot"
>
<i
class=
"el-icon-picture-outline"
></i>
</div>
</el-image>
</div>
<div
class=
"add_img"
v-if=
"fileArr.length
<
=
max
-
1
"
>
<div
class=
"add_pic"
>
...
...
@@ -242,6 +246,7 @@ export default {
.list_img_item
{
width
:
100%
;
height
:
100%
;
background-color
:
#efefef
;
}
.img_replace
{
position
:
absolute
;
...
...
@@ -259,4 +264,12 @@ export default {
.cropper_dia
.el-dialog
{
width
:
860px
;
}
.list_img_item
.image-slot
{
height
:
100%
;
font-size
:
40px
;
color
:
#ccc
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
</
style
>
src/components/menu.vue
View file @
4edd56c2
...
...
@@ -14,8 +14,11 @@
<div
class=
"sj"
></div>
</div>
<div
style=
"float:right;cursor: pointer;position:relative;"
class=
"shop_hover"
>
<div
class=
"number"
>
99+
</div>
<img
src=
"../assets/imgs/home_ic_shop.png"
alt
class=
"car"
/>
<div
class=
"car"
>
<el-badge
v-if=
"menuCartNum != 0"
:value=
"menuCartNum"
:max=
"99"
class=
"number"
>
</el-badge>
<img
src=
"../assets/imgs/home_ic_shop.png"
alt
class=
"car_img"
/>
</div>
<div
class=
"shop_menu"
>
<div
class=
"shop_list_title"
>
最近加入的服务:
</div>
<div
...
...
@@ -151,7 +154,8 @@ export default {
{
name
:
"
关于BD-aPaaS
"
,
path
:
"
/data_analysis
"
},
{
name
:
"
退出登录
"
,
path
:
"
logout
"
}
],
shopping_list
:
[]
shopping_list
:
[],
menuCartNum
:
0
};
},
mounted
()
{
...
...
@@ -213,7 +217,9 @@ export default {
getList
()
{
this
.
$api
.
serviceShop
.
getShoppingCart
().
then
(
response
=>
{
if
(
response
.
data
.
success
==
"
1
"
)
{
console
.
log
(
response
.
data
.
data
);
this
.
menuCartNum
=
response
.
data
.
data
.
valid
?
response
.
data
.
data
.
valid
.
length
:
0
;
this
.
shopping_list
=
response
.
data
.
data
.
valid
?
response
.
data
.
data
.
valid
.
slice
(
0
,
3
)
:
[];
...
...
@@ -253,22 +259,25 @@ export default {
margin-right
:
15px
;
margin-top
:
30px
;
}
.
numbe
r
{
.
ca
r
{
float
:
right
;
margin-right
:
43
px
;
margin-right
:
65
px
;
margin-top
:
30px
;
width
:
40px
;
height
:
22px
;
position
:
relative
;
}
.number
{
position
:
absolute
;
background-color
:
#e56600
;
border-radius
:
11px
;
color
:
#fcefd6
;
line-height
:
22px
;
line-height
:
18px
;
height
:
20px
;
text-align
:
center
;
left
:
26px
;
bottom
:
10px
;
}
.car
{
.car
_img
{
float
:
right
;
margin-right
:
15px
;
margin-top
:
30px
;
}
.menu_box
{
float
:
right
;
...
...
@@ -415,3 +424,11 @@ export default {
white-space
:
nowrap
;
}
</
style
>
<
style
>
.number
.el-badge__content
{
background-color
:
#e56600
;
border
:
0
;
line-height
:
18px
;
padding
:
0
7px
;
}
</
style
>
\ No newline at end of file
src/components/order-list/order-list-cell.vue
View file @
4edd56c2
<
template
>
<div
class=
"order_cell"
>
<div
class=
"order_cell_head"
>
<div
class=
"application_time"
>
申请时间:
{{
helper
.
date
Format
(
cellItem
.
applytime
)
}}
</div>
<div
class=
"application_time"
>
申请时间:
{{
helper
.
date
StringTransform
(
cellItem
.
applytime
)
}}
</div>
<div
class=
"order_number"
>
订单编号:
{{
cellItem
.
orderid
}}
</div>
<div
class=
"cell_del_btn"
@
click=
"delOrder(cellItem.orderid)"
>
删除
</div>
</div>
...
...
@@ -17,25 +17,33 @@
<span
v-if=
"cellItem.mapService"
class=
"tags map_service"
>
mapService
</span>
<span
v-if=
"cellItem.openness == 1"
class=
"tags shared"
>
共享
</span>
<span
v-else-if=
"cellItem.openness == 2"
class=
"tags restricted"
>
受限
</span>
<span
v-else
class=
"tags sensitive"
>
敏感
</span>
<span
v-else
-if=
"cellItem.openness == 3"
class=
"tags sensitive"
>
敏感
</span>
</div>
<div
class=
"cell_msg_other"
>
<div
class=
"cell_type"
>
{{
cellItem
.
sector
s
}}
</div>
<div
class=
"cell_creator"
>
{{
cellItem
.
organization
}}
</div>
<div
class=
"cell_type"
>
{{
cellItem
.
sector
}}
</div>
<div
class=
"cell_creator"
>
{{
cellItem
.
src_
organization
}}
</div>
</div>
</div>
</el-col>
<el-col
:span=
"6"
class=
"cell_specification"
>
<div>
<div>
规格:访问次数:
{{
cellItem
.
pv
}}
,访问量:
{{
cellItem
.
count
}}
</div>
<div
class=
"cell_specification_type"
>
申请方式:
{{
cellItem
.
durationunit
==
1
?
$t
(
'
lang.byYear
'
)
:
$t
(
'
lang.byMonth
'
)
}}
</div>
<div>
规格:日访问次数:
{{
cellItem
.
spec_svc_count
}}
次,日访问量:
{{
cellItem
.
spec_svc_pv
}}
</div>
<div
class=
"cell_specification_type"
>
申请方式:
{{
cellItem
.
duration_unit
==
1
?
$t
(
'
lang.byYear
'
)
:
$t
(
'
lang.byMonth
'
)
}}
</div>
</div>
</el-col>
<el-col
:span=
"4"
class=
"approval_status"
>
<div>
<div>
已获取
</div>
<div
v-if=
"cellItem.approval_first_level == 0 && cellItem.pay_status != -1"
>
待审核
</div>
<div
v-if=
"cellItem.approval_first_level == 1&& cellItem.approval_second_level == 0 && cellItem.pay_status != -1"
>
审核中
</div>
<div
v-if=
"cellItem.approval_second_level == 1 && cellItem.pay_status != -1"
>
审核通过
</div>
<div
v-if=
"cellItem.approval_first_level == -1 && cellItem.pay_status != -1"
>
审核未通过
</div>
<div
v-if=
"cellItem.pay_status == -1"
>
订单已取消
</div>
<el-popover
v-if=
"cellItem.
getStatus == 1
"
v-if=
"cellItem.
approval_second_level == 1 && cellItem.pay_status != -1 && cellItem.is_estimated == 0
"
placement=
"right-start"
width=
"300"
v-model=
"visible"
...
...
@@ -46,7 +54,6 @@
<el-rate
v-model=
"serviceRate"
:colors=
"colors"
allow-half
show-score
score-template=
"
{value}"
>
</el-rate>
...
...
@@ -57,7 +64,7 @@
type=
"textarea"
placeholder=
"请输入内容"
v-model=
"textarea"
maxlength=
"
2
00"
maxlength=
"
5
00"
show-word-limit
:autosize=
"
{ minRows: 6, maxRows: 10 }"
>
</el-input>
...
...
@@ -69,12 +76,12 @@
<div
class=
"approval_status_btn"
slot=
"reference"
>
服务评价
</div>
</el-popover>
<div
v-else-if=
"cellItem.
getStatus == 2
&& !showMsgBox"
v-else-if=
"cellItem.
approval_second_level == 1 && cellItem.pay_status != -1 && cellItem.is_estimated == 1
&& !showMsgBox"
class=
"approval_status_btn"
@
click=
"
showMsgBox = tru
e"
@
click=
"
getMessag
e"
>
查看评价
</div>
<div
v-else-if=
"cellItem.
getStatus == 2
&& showMsgBox"
v-else-if=
"cellItem.
approval_second_level == 1 && cellItem.pay_status != -1 && cellItem.is_estimated == 1
&& showMsgBox"
class=
"approval_status_btn"
@
click=
"showMsgBox = false"
>
收起评价
</div>
...
...
@@ -82,8 +89,12 @@
</el-col>
<el-col
:span=
"4"
class=
"cell_option"
>
<div>
<el-button
size=
"madium"
class=
"cell_option_btn"
@
click=
"viewDetail(cellItem.id)"
>
查看详情
</el-button>
<div
class=
"cell_option_spec"
>
再次申请
</div>
<el-button
size=
"madium"
class=
"cell_option_btn"
@
click=
"viewDetail(cellItem.order_id)"
>
查看详情
</el-button>
<div
class=
"cell_option_spec"
@
click=
"nextApply"
>
再次申请
</div>
</div>
</el-col>
<el-collapse-transition>
...
...
@@ -91,7 +102,7 @@
<div
class=
"msg_title"
>
服务评分:
</div>
<div
class=
"msg_rate"
>
<el-rate
v-model=
"
cellItem.evaluationRat
e"
v-model=
"
message.scor
e"
disabled
show-score
text-color=
"#ff9900"
...
...
@@ -99,7 +110,7 @@
>
</el-rate>
</div>
<div
class=
"msg_title"
>
评价详情:
</div>
<div
class=
"msg_text"
>
{{
cellItem
.
evaluationTex
t
}}
</div>
<div
class=
"msg_text"
>
{{
message
.
conten
t
}}
</div>
</el-col>
</el-collapse-transition>
</el-row>
...
...
@@ -123,18 +134,129 @@ export default {
colors
:
[
"
#99A9BF
"
,
"
#F7BA2A
"
,
"
#FF9900
"
],
serviceRate
:
0
,
textarea
:
""
,
showMsgBox
:
false
showMsgBox
:
false
,
helper
:
helper
,
message
:
{}
}),
methods
:
{
addEvaluation
()
{
console
.
log
(
this
.
serviceRate
,
this
.
textarea
);
this
.
visible
=
false
;
if
(
this
.
cellItem
.
order_type
==
1
)
{
let
query
=
{
service_id
:
this
.
cellItem
.
service_id
,
content
:
this
.
textarea
,
score
:
this
.
serviceRate
,
apply_id
:
this
.
cellItem
.
apply_id
};
this
.
$api
.
user
.
addServiceEvaluation
(
query
).
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
message
:
"
评价订单成功
"
,
type
:
"
success
"
});
this
.
visible
=
false
;
this
.
$emit
(
"
updateList
"
);
}
else
{
this
.
$message
({
message
:
"
评价订单失败
"
,
type
:
"
error
"
});
}
});
}
else
if
(
this
.
cellItem
.
order_type
==
2
)
{
let
query
=
{
app
:
this
.
cellItem
.
app_id
,
content
:
this
.
textarea
,
score
:
this
.
serviceRate
,
apply_id
:
this
.
cellItem
.
apply_id
};
this
.
$api
.
user
.
addServiceEvaluation
(
query
).
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
message
:
"
评价订单成功
"
,
type
:
"
success
"
});
this
.
visible
=
false
;
this
.
$emit
(
"
updateList
"
);
}
else
{
this
.
$message
({
message
:
"
评价订单失败
"
,
type
:
"
error
"
});
}
});
}
},
viewDetail
(
val
)
{
this
.
$router
.
push
(
"
/user/order_detail/
"
+
val
)
this
.
$router
.
push
(
"
/user/order_detail/
"
+
val
)
;
},
delOrder
()
{
this
.
$api
.
user
.
delOrder
({
id
:
this
.
cellItem
.
order_id
}).
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
message
:
"
删除订单成功
"
,
type
:
"
success
"
});
this
.
$emit
(
"
updateList
"
);
}
else
{
this
.
$message
({
message
:
"
删除订单失败
"
,
type
:
"
error
"
});
}
});
},
nextApply
()
{
let
query
=
{};
if
(
this
.
cellItem
.
order_type
==
1
)
{
query
=
{
service_id
:
parseFloat
(
this
.
cellItem
.
service_id
),
spec_id
:
this
.
cellItem
.
svc_spec_id
,
duration
:
this
.
cellItem
.
duration
,
duration_unit
:
this
.
cellItem
.
duration_unit
};
}
else
if
(
this
.
cellItem
.
order_type
==
2
)
{
query
=
{
app_id
:
parseFloat
(
this
.
cellItem
.
app_id
),
spec_id
:
this
.
cellItem
.
spec_app
,
duration
:
this
.
cellItem
.
duration
,
duration_unit
:
this
.
cellItem
.
duration_unit
};
}
this
.
$router
.
push
({
path
:
"
/shop/shop_car_apply
"
,
query
:
query
});
},
getMessage
()
{
if
(
this
.
cellItem
.
order_type
==
1
)
{
this
.
$api
.
user
.
getServiceEvaluation
({
apply_id
:
this
.
cellItem
.
apply_id
})
.
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
message
=
response
.
data
.
data
;
this
.
showMsgBox
=
true
;
}
else
{
this
.
$message
({
message
:
"
获取评价失败
"
,
type
:
"
error
"
});
}
});
}
else
if
(
this
.
cellItem
.
order_type
==
2
)
{
this
.
$api
.
user
.
getAppEvaluation
({
apply_id
:
this
.
cellItem
.
apply_id
})
.
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
message
=
response
.
data
.
data
;
this
.
showMsgBox
=
true
;
}
else
{
this
.
$message
({
message
:
"
获取评价失败
"
,
type
:
"
error
"
});
}
});
}
}
}
};
...
...
@@ -287,6 +409,7 @@ export default {
}
.cell_option_spec
{
margin-top
:
15px
;
cursor
:
pointer
;
}
.pop_rate
{
padding
:
0
0
0
50px
;
...
...
src/components/order-list/order-list-com.vue
View file @
4edd56c2
...
...
@@ -17,7 +17,7 @@
:class=
"item.state ? 'btn_actice':''"
round
@
click=
"btnClick(index)"
>
{{
item
.
label
}}
</el-button>
>
{{
item
.
name
}}
</el-button>
</div>
<div
class=
"input_right"
>
<el-input
...
...
@@ -28,7 +28,7 @@
></el-input>
</div>
</div>
<order-list
:datas=
"datas"
></order-list>
<order-list
:datas=
"datas"
@
updateList=
"updateList"
></order-list>
<!-- 分页 -->
<section
class=
"order_pagination"
>
<div
class=
"order_page_total"
>
共
{{
pagination
.
total
}}
个条目
</div>
...
...
@@ -60,7 +60,7 @@
:disabled=
"pagination.page == 1"
></el-button>
第
{{
pagination
.
page
}}
页 / 共
{{
Math
.
ceil
(
pagination
.
total
/
pagination
.
rowsPerPage
)
Math
.
floor
(
pagination
.
total
/
pagination
.
rowsPerPage
)
+
1
}}
页
<el-button
icon=
"el-icon-arrow-right"
...
...
@@ -69,7 +69,7 @@
@
click=
"handleCurrentChange(1)"
:disabled=
"
pagination.page >=
Math.
ceil(pagination.total / pagination.rowsPerPage)
Math.
floor(pagination.total / pagination.rowsPerPage) + 1
"
></el-button>
</div>
...
...
@@ -94,16 +94,7 @@ export default {
{
value
:
"
5
"
,
label
:
"
已取消
"
}
],
activeName
:
"
0
"
,
buttonList
:
[
{
value
:
0
,
label
:
"
全部
"
,
state
:
false
},
{
value
:
1
,
label
:
"
数据服务
"
,
state
:
false
},
{
value
:
2
,
label
:
"
时空服务
"
,
state
:
false
},
{
value
:
3
,
label
:
"
视频服务
"
,
state
:
false
},
{
value
:
4
,
label
:
"
感知服务
"
,
state
:
false
},
{
value
:
5
,
label
:
"
综合服务
"
,
state
:
false
},
{
value
:
6
,
label
:
"
云资源
"
,
state
:
false
},
{
value
:
7
,
label
:
"
应用镜像
"
,
state
:
false
}
],
buttonList
:
[],
search
:
""
,
pagination
:
{
rowsPerPage
:
10
,
...
...
@@ -127,9 +118,24 @@ export default {
datas
:
[]
}),
mounted
()
{
this
.
getBtns
();
this
.
getData
();
},
methods
:
{
getBtns
()
{
this
.
$api
.
user
.
getOrderBtnTypes
().
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
let
buttonList
=
response
.
data
.
data
;
buttonList
.
forEach
(
item
=>
{
item
.
state
=
false
;
});
buttonList
.
unshift
({
id
:
""
,
name
:
"
全部
"
,
state
:
false
});
buttonList
.
push
({
id
:
"
cloud
"
,
name
:
"
云资源
"
,
state
:
false
});
buttonList
.
push
({
id
:
"
app
"
,
name
:
"
应用镜像
"
,
state
:
false
});
this
.
buttonList
=
buttonList
;
}
});
},
tabClick
()
{
this
.
getData
();
},
...
...
@@ -154,20 +160,37 @@ export default {
},
getData
()
{
let
arr
=
[];
let
service
=
0
;
let
app
=
0
;
let
resource
=
0
;
this
.
buttonList
.
forEach
(
item
=>
{
if
(
item
.
state
==
true
)
{
arr
.
push
(
item
.
value
);
if
(
item
.
id
==
"
cloud
"
)
{
resource
=
1
;
}
else
if
(
item
.
id
==
"
app
"
)
{
app
=
1
;
}
else
{
service
=
1
;
arr
.
push
(
item
.
id
);
}
}
});
if
(
arr
.
length
==
0
)
{
service
=
1
;
app
=
1
;
resource
=
1
;
}
let
params
=
{
select
:
this
.
search
,
page
:
this
.
pagination
.
page
,
limit
:
this
.
pagination
.
rowsPerPage
,
status
:
this
.
activeName
,
types
:
arr
types
:
arr
,
service
:
service
,
app
:
app
,
resource
:
resource
};
this
.
$api
.
user
.
orderList
(
params
).
then
(
response
=>
{
console
.
log
(
response
);
this
.
datas
=
response
.
data
.
data
;
this
.
pagination
.
total
=
response
.
data
.
total
;
});
...
...
@@ -179,6 +202,9 @@ export default {
handleCurrentChange
(
val
)
{
this
.
pagination
.
page
+=
val
;
this
.
getData
();
},
updateList
()
{
this
.
getData
();
}
}
};
...
...
src/components/order-list/order-list-list.vue
View file @
4edd56c2
...
...
@@ -4,7 +4,7 @@
<el-row
class=
"order_th"
>
<el-col
:span=
"10"
>
服务信息
</el-col>
<el-col
:span=
"6"
>
规格
</el-col>
<el-col
:span=
"4"
>
审批
状态
</el-col>
<el-col
:span=
"4"
>
申请
状态
</el-col>
<el-col
:span=
"4"
>
操作
</el-col>
</el-row>
</div>
...
...
src/components/service-list/commodity-list.vue
View file @
4edd56c2
...
...
@@ -47,7 +47,7 @@
:disabled=
"pagination.page == 1"
></el-button>
第
{{
pagination
.
page
}}
页 / 共
{{
Math
.
ceil
(
pagination
.
total
/
pagination
.
rowsPerPage
)
Math
.
floor
(
pagination
.
total
/
pagination
.
rowsPerPage
)
+
1
}}
页
<el-button
icon=
"el-icon-arrow-right"
...
...
@@ -56,7 +56,7 @@
@
click=
"handleCurrentChange(1)"
:disabled=
"
pagination.page >=
Math.
ceil(pagination.total / pagination.rowsPerPage)
Math.
floor(pagination.total / pagination.rowsPerPage) + 1
"
></el-button>
</div>
...
...
src/components/shopping-cart/shopping-cart-cell.vue
View file @
4edd56c2
...
...
@@ -50,7 +50,7 @@
<div
class=
"shopping_cell_specification_val_type"
v-if=
"cellIsService"
>
申请方式:
{{
specificationApplicationBtns
[
cellItems
.
duration_method
-
1
].
value
}}
</div>
>
申请方式:
{{
cellItems
.
duration_method
==
1
?
"
按月
"
:
"
按年
"
}}
</div>
<div
class=
"shopping_cell_specification_edit"
>
<el-popover
placement=
"right-start"
...
...
@@ -167,6 +167,18 @@ export default {
immediate
:
true
,
// 这句重要
handler
(
val
)
{
this
.
cellItems
=
val
;
if
(
this
.
cellIsService
)
{
if
(
this
.
cellItems
.
service
.
buy_method
==
1
)
{
this
.
specificationApplicationBtns
=
[{
id
:
1
,
value
:
"
按月
"
}];
}
else
if
(
this
.
cellItems
.
service
.
buy_method
==
2
)
{
this
.
specificationApplicationBtns
=
[{
id
:
2
,
value
:
"
按年
"
}];
}
else
{
this
.
specificationApplicationBtns
=
[
{
id
:
1
,
value
:
"
按月
"
},
{
id
:
2
,
value
:
"
按年
"
}
];
}
}
}
}
},
...
...
@@ -178,11 +190,6 @@ export default {
visible
:
false
,
specificationPop
:
1
,
specificationApplicationPop
:
1
,
// specificationBtns: [
// { id: 1, value: "访问次数:20/日 访问量:100/日" },
// { id: 2, value: "访问次数:200/日 访问量:1000/日" },
// { id: 3, value: "访问次数:无上限 访问量:无上限" }
// ],
appSpecificationBtns
:
[
{
id
:
1
,
value
:
"
部署
"
},
{
id
:
2
,
value
:
"
开发
"
}
...
...
@@ -196,18 +203,26 @@ export default {
getSpecification
()
{
if
(
this
.
cellIsService
)
{
let
arr
=
[];
console
.
log
(
this
.
cellItems
.
service
.
request_spcs_info
);
if
(
this
.
cellItems
.
service
.
request_sp
ec
_info
&&
this
.
cellItems
.
service
.
request_sp
ec
_info
.
length
!=
0
this
.
cellItems
.
service
.
request_sp
cs
_info
&&
this
.
cellItems
.
service
.
request_sp
cs
_info
.
length
!=
0
)
{
this
.
cellItems
.
service
.
request_spec_info
.
forEach
(
item
=>
{
console
.
log
(
"
sss
"
);
let
requestArr
=
this
.
cellItems
.
service
.
request_spcs_info
;
requestArr
.
forEach
(
item
=>
{
console
.
log
(
item
);
arr
.
push
(
item
.
id
);
});
}
console
.
log
(
arr
);
let
num
=
arr
.
indexOf
(
this
.
cellItems
.
spec_id
);
console
.
log
(
num
);
let
specification
=
""
;
if
(
num
!=
-
1
)
{
specification
=
this
.
cellItems
.
service
.
request_sp
ec
_info
[
num
].
des
;
specification
=
this
.
cellItems
.
service
.
request_sp
cs
_info
[
num
].
des
;
}
return
specification
;
}
else
{
...
...
@@ -254,10 +269,22 @@ export default {
});
},
delCellItem
()
{
this
.
$emit
(
"
deleteItem
"
,
{
index
:
this
.
cellIndex
,
data
:
this
.
cellItems
});
this
.
$api
.
serviceShop
.
delShoppingCart
([
this
.
cellItems
.
id
])
.
then
(
request
=>
{
if
(
request
.
data
.
success
==
1
)
{
this
.
$message
({
message
:
this
.
cellIsService
?
"
删除该服务成功
"
:
"
删除该应用成功
"
,
type
:
"
success
"
});
this
.
$emit
(
"
updateList
"
);
}
else
{
this
.
$message
({
message
:
this
.
cellIsService
?
"
删除该服务失败
"
:
"
删除该应用失败
"
,
type
:
"
error
"
});
}
});
}
}
};
...
...
src/components/shopping-cart/shopping-cart-com.vue
View file @
4edd56c2
...
...
@@ -22,6 +22,7 @@
@
changeCellMsg=
"changeCellMsg"
@
deleteItem=
"deleteItem"
class=
"shopping_all_list"
@
updateList=
"updateList"
/>
</div>
<div
class=
"shopping_list shopping_list_fail"
>
...
...
@@ -31,6 +32,7 @@
:list=
"listIn"
:checkList=
"checkListIn"
class=
"shopping_all_list"
@
updateList=
"updateList"
/>
</div>
<div
class=
"shopping_list shopping_list_options"
>
...
...
@@ -101,10 +103,12 @@ export default {
if
(
response
.
data
.
success
==
"
1
"
)
{
this
.
list
=
response
.
data
.
data
.
valid
;
this
.
listIn
=
response
.
data
.
data
.
invalid
;
for
(
const
index
in
this
.
list
)
{
this
.
checkList
=
[];
this
.
checkListIn
=
[];
for
(
let
index
in
this
.
list
)
{
this
.
checkList
.
push
(
false
);
}
for
(
cons
t
index
in
this
.
listIn
)
{
for
(
le
t
index
in
this
.
listIn
)
{
this
.
checkListIn
.
push
(
false
);
}
}
else
{
...
...
@@ -133,6 +137,7 @@ export default {
});
this
.
$api
.
serviceShop
.
delShoppingCart
(
query
).
then
(
response
=>
{
console
.
log
(
response
);
this
.
$store
.
commit
(
"
setMenuCartState
"
);
this
.
getList
();
});
},
...
...
@@ -144,6 +149,7 @@ export default {
let
query
=
[
val
.
data
.
id
];
this
.
$api
.
serviceShop
.
delShoppingCart
(
query
).
then
(
response
=>
{
console
.
log
(
response
);
this
.
$store
.
commit
(
"
setMenuCartState
"
);
this
.
getList
();
});
},
...
...
@@ -158,6 +164,10 @@ export default {
window
.
sessionStorage
.
setItem
(
"
shoppingCart
"
,
JSON
.
stringify
(
arr
));
// this.$store.commit("setShoppingCart", arr);
this
.
$router
.
push
({
name
:
"
shopCarApply
"
});
},
updateList
()
{
this
.
$store
.
commit
(
"
setMenuCartState
"
);
this
.
getList
();
}
}
};
...
...
src/components/shopping-cart/shopping-cart-list.vue
View file @
4edd56c2
...
...
@@ -12,6 +12,7 @@
@
changeState=
"changeState"
@
changeCellMsg=
"changeCellMsg"
@
deleteItem=
"deleteItem"
@
updateList=
"updateList"
/>
</div>
</div>
...
...
@@ -65,6 +66,9 @@ export default {
},
deleteItem
(
val
)
{
this
.
$emit
(
"
deleteItem
"
,
val
);
},
updateList
()
{
this
.
$emit
(
"
updateList
"
)
}
}
};
...
...
src/components/table/table-um.vue
View file @
4edd56c2
...
...
@@ -231,7 +231,7 @@
:disabled=
"pagination.page == 1"
></el-button>
第{{ pagination.page }}页 / 共{{
Math.
ceil(pagination.total / pagination.rowsPerPage)
Math.
floor(pagination.total / pagination.rowsPerPage) + 1
}}页
<el-button
icon=
"el-icon-arrow-right"
...
...
@@ -240,7 +240,7 @@
@
click=
"handleCurrentChange(1)"
:disabled=
"
pagination.page >=
Math.
ceil(pagination.total / pagination.rowsPerPage)
Math.
floor(pagination.total / pagination.rowsPerPage) + 1
"
></el-button>
</div>
...
...
src/pages/authority/menu/menus.vue
View file @
4edd56c2
...
...
@@ -81,7 +81,14 @@
</el-form-item>
<el-form-item
prop=
"detail"
>
<div
class=
"form_item_title"
>
菜单描述:
</div>
<el-input
v-model=
"formDetail.detail"
@
input=
"changeSave"
></el-input>
<el-input
v-model=
"formDetail.detail"
type=
"textarea"
:autosize=
"
{ minRows: 4, maxRows: 10}"
maxlength="500"
show-word-limit
@input="changeSave"
>
</el-input>
</el-form-item>
<el-form-item
prop=
"menu_order"
>
<div
class=
"form_item_title"
>
菜单排序:
</div>
...
...
@@ -107,22 +114,6 @@
import
helper
from
"
@/services/helper.js
"
;
export
default
{
data
()
{
var
validateMenuName
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
==
""
)
{
callback
(
new
Error
(
"
请填写菜单名称
"
));
}
else
if
(
value
.
length
>
8
)
{
callback
(
new
Error
(
"
菜单名称不超过8位
"
));
}
else
{
callback
();
}
};
var
validatePageUrl
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
==
""
)
{
callback
(
new
Error
(
"
请填写菜单访问地址
"
));
}
else
{
callback
();
}
};
return
{
checkText
:
""
,
treeData
:
[],
...
...
@@ -150,8 +141,22 @@ export default {
create_date
:
""
},
rules
:
{
menu_name
:
[{
validator
:
validateMenuName
,
trigger
:
"
input
"
}],
visit_url
:
[{
validator
:
validatePageUrl
,
trigger
:
"
input
"
}],
menu_name
:
[
{
required
:
true
,
message
:
"
请填写菜单名称
"
,
trigger
:
"
blur
"
},
{
min
:
0
,
max
:
8
,
message
:
"
菜单名称不超过8位
"
,
trigger
:
"
blur
"
}
],
visit_url
:
[
{
required
:
true
,
message
:
"
请填写菜单访问地址
"
,
trigger
:
"
blur
"
},
{
min
:
0
,
max
:
30
,
message
:
"
访问地址长度不超过30个字
"
,
trigger
:
"
blur
"
}
],
team_name
:
[
{
min
:
0
,
max
:
16
,
message
:
"
菜单组别不超过16个字
"
,
trigger
:
"
blur
"
}
]
},
nodeId
:
""
,
previousSibling
:
false
,
...
...
@@ -175,7 +180,6 @@ export default {
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
},
nodeClick
(
data
,
node
)
{
console
.
log
(
data
,
node
);
this
.
canSave
=
false
;
if
(
this
.
nodeId
.
indexOf
(
"
new
"
)
>
-
1
)
{
let
result
=
this
.
formStaged
.
some
(
item
=>
{
...
...
@@ -193,7 +197,6 @@ export default {
this
.
formStaged
.
push
({
id
:
this
.
nodeId
,
data
:
this
.
formDetail
});
}
this
.
nodeId
=
data
.
menu_id
;
console
.
log
(
node
);
if
(
node
.
previousSibling
!=
undefined
)
{
this
.
previousSibling
=
true
;
}
else
{
...
...
@@ -221,9 +224,8 @@ export default {
this
.
formDetail
.
create_date
=
helper
.
dateStringTransform
(
this
.
formDetail
.
create_date
);
this
.
formContrast
=
response
.
data
.
data
;
this
.
formContrast
=
Object
.
assign
({},
this
.
formDetail
)
;
}
else
{
this
.
ruleFormIcon
.
username
=
false
;
this
.
$message
({
message
:
response
.
data
.
errMsg
,
type
:
"
error
"
...
...
@@ -313,6 +315,10 @@ export default {
this
.
$api
.
authority
.
getMenuList
().
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
treeData
=
response
.
data
.
data
;
this
.
nodeId
=
""
;
this
.
previousSibling
=
false
;
this
.
nextSibling
=
false
;
this
.
canSave
=
false
;
}
else
{
console
.
log
(
response
.
data
.
errMsg
);
}
...
...
@@ -579,6 +585,15 @@ export default {
padding
:
0
15px
;
color
:
#242c43
;
}
.left_station
.el-textarea__inner
{
background-color
:
#f7f8f9
;
border-radius
:
8px
;
border
:
solid
1px
#e3e5ef
;
color
:
#242c43
;
}
.left_station
.el-textarea
.el-input__count
{
background-color
:
#f7f8f9
;
}
.left_station
.is-disabled
.el-input__inner
{
background-color
:
#e3e4e6
;
border-radius
:
8px
;
...
...
src/pages/user/order/order_detail.vue
View file @
4edd56c2
...
...
@@ -9,27 +9,43 @@
<div
class=
"detail_head"
>
<div
class=
"detail_head_cell detail_head_status border_right"
>
<p
class=
"detail_head_cell_title"
>
申请状态
</p>
<p
class=
"detail_head_cell_val blue"
>
已获取
</p>
<p
class=
"detail_head_cell_val blue"
v-if=
"orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1"
>
待审核
</p>
<p
class=
"detail_head_cell_val blue"
v-if=
"orderDetail.approval_first_level == 1&& orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1"
>
审核中
</p>
<p
class=
"detail_head_cell_val blue"
v-if=
"orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1"
>
审核通过
</p>
<p
class=
"detail_head_cell_val blue"
v-if=
"orderDetail.approval_first_level == -1 && orderDetail.pay_status != -1"
>
审核未通过
</p>
<p
class=
"detail_head_cell_val blue"
v-if=
"orderDetail.pay_status == -1"
>
订单已取消
</p>
</div>
<div
class=
"detail_head_cell detail_head_no border_right"
>
<p
class=
"detail_head_cell_title"
>
订单编号
</p>
<p
class=
"detail_head_cell_val"
>
202004241502000001
</p>
<p
class=
"detail_head_cell_val"
>
{{
orderDetail
.
order_id
}}
</p>
</div>
<div
class=
"detail_head_cell detail_head_time"
>
<p
class=
"detail_head_cell_title"
>
申请时间
</p>
<p
class=
"detail_head_cell_val"
>
2020-04-24 15:02:00
</p>
<p
class=
"detail_head_cell_val"
>
{{
helper
.
dateStringTransform
(
orderDetail
.
add_time
)
}}
</p>
</div>
<div
class=
"btn_group"
>
<el-popover
placement=
"right-start"
width=
"300"
v-model=
"visible"
trigger=
"click"
>
<el-popover
v-if=
"orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1 && orderDetail.is_estimated == 0"
placement=
"right-start"
width=
"300"
v-model=
"visible"
trigger=
"click"
>
<p>
服务评价:
</p>
<div
class=
"pop_rate"
>
<el-rate
v-model=
"serviceRate"
:colors=
"colors"
allow-half
show-score
score-template=
"
{value}"
>
</el-rate>
<el-rate
v-model=
"serviceRate"
:colors=
"colors"
show-score
score-template=
"
{value}">
</el-rate>
</div>
<p>
填写评价:
</p>
<div
class=
"evaluation_text"
>
...
...
@@ -48,6 +64,12 @@
</div>
<el-button
class=
"evaluation"
slot=
"reference"
>
服务评价
</el-button>
</el-popover>
<el-button
v-else-if=
"orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1 && orderDetail.is_estimated == 1 && !showMsgBox"
class=
"approval_status_btn"
@
click=
"getMessage"
>
查看评价
</el-button>
<el-button
class=
"approval_status_btn"
@
click=
"showMsgBox = false"
>
收起评价
</el-button>
<el-button
class=
"again"
@
click=
"goto('/user/order_list')"
>
再次申请
</el-button>
</div>
</div>
...
...
@@ -111,6 +133,7 @@ import BlockRadius from "@/components/block-radius";
import
ProcessCard
from
"
@/components/process-card
"
;
import
TableUm
from
"
@/components/table/table-um
"
;
import
InfoList
from
"
@/components/infoList
"
;
import
helper
from
"
@/services/helper.js
"
;
export
default
{
components
:
{
BlockRadius
,
...
...
@@ -119,10 +142,13 @@ export default {
InfoList
},
data
:
()
=>
({
helper
:
helper
,
visible
:
false
,
colors
:
[
"
#99A9BF
"
,
"
#F7BA2A
"
,
"
#FF9900
"
],
serviceRate
:
0
,
textarea
:
""
,
orderDetail
:
{},
showMsgBox
:
false
,
approval_arr1
:
[
{
title
:
"
一级审批
"
,
...
...
@@ -218,7 +244,6 @@ export default {
}
],
list_arr
:
[
{
title
:
"
申请人:
"
,
info
:
"
李子维
"
...
...
@@ -236,16 +261,28 @@ export default {
info
:
"
xxxx文件名称.txt
"
,
url
:
"
www.baidu.com
"
,
type
:
"
down
"
}
,
}
]
}),
mounted
()
{},
mounted
()
{
this
.
getOrderDetail
();
},
methods
:
{
addEvaluation
()
{
console
.
log
(
this
.
serviceRate
,
this
.
textarea
);
this
.
visible
=
false
;
},
download
()
{}
download
()
{},
getOrderDetail
()
{
this
.
$api
.
user
.
getOrderDetail
({
order_id
:
this
.
$route
.
params
.
id
})
.
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
}
else
{
console
.
log
(
response
.
data
.
errMsg
);
}
});
}
}
};
</
script
>
...
...
@@ -463,6 +500,10 @@ export default {
.detail_s_val
{
padding
:
0
0
0
20px
;
}
.approval_status_btn
{
background-color
:
#e1e4fb
;
color
:
#626de9
;
}
</
style
>
<
style
>
.pop_rate
.el-rate__icon
{
...
...
src/request/api/user.js
View file @
4edd56c2
...
...
@@ -4,7 +4,29 @@ import qs from 'qs'; // 根据需求是否导入qs模块
const
user
=
{
// order
orderList
(
params
)
{
return
axios
.
get
(
`/apaas/serviceapp/v3/order/list?serviceName=
${
params
.
select
}
&orderStatus=
${
params
.
status
}
&serviceTypes=
${
params
.
types
.
join
(
'
,
'
)}
&Page=
${
params
.
page
}
&Size=
${
params
.
limit
}
`
);
return
axios
.
get
(
`/apaas/serviceapp/v3/order/list?filter_by=
${
params
.
select
}
&order_status=
${
params
.
status
}
&service_types=
${
params
.
types
.
join
(
'
,
'
)}
&service=
${
params
.
service
}
&app=
${
params
.
app
}
&resource=
${
params
.
resource
}
&page=
${
params
.
page
}
&size=
${
params
.
limit
}
`
);
},
getOrderBtnTypes
()
{
return
axios
.
get
(
`/apaas/serviceapp/v3/order/domains`
);
},
delOrder
(
params
)
{
return
axios
.
delete
(
`/order/del?order_id=
${
params
.
id
}
`
);
},
addServiceEvaluation
(
params
)
{
return
axios
.
post
(
`/apaas/serviceapp/v3/order/estimate`
,
params
);
},
getServiceEvaluation
(
params
)
{
return
axios
.
get
(
`/apaas/serviceapp/v3/order/estimate?apply_id=
${
params
.
apply_id
}
`
);
},
addAppEvaluation
(
params
)
{
return
axios
.
post
(
`/apaas/serviceapp/v3/order/appEstimate`
,
params
);
},
getAppEvaluation
(
params
)
{
return
axios
.
get
(
`/apaas/serviceapp/v3/order/appEstimate?applyId=
${
params
.
apply_id
}
`
);
},
getOrderDetail
(
params
)
{
return
axios
.
get
(
`/apaas/serviceapp/v3/order/orderInfo?order_id=
${
params
.
order_id
}
`
);
},
// user info
...
...
src/services/helper.js
View file @
4edd56c2
...
...
@@ -36,6 +36,10 @@ module.exports.dateFormat = function (fmt, timestamp) {
}
module
.
exports
.
dateStringTransform
=
function
(
date
)
{
/*
input: 2020-06-12T16:38:11+08:00
output: 2020-06-12 16:38:11
*/
if
(
String
(
date
).
indexOf
(
"
T
"
)
!=
-
1
)
{
let
arr
=
date
.
split
(
"
T
"
);
let
t
=
arr
[
1
];
...
...
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