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
258ac99a
Commit
258ac99a
authored
Jun 17, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购物车解决报错,数据问题和展示形式,table-inputNumber扩展
parent
14ec2c15
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
25 deletions
+51
-25
src/components/shopping-cart/shopping-cart-cell.vue
src/components/shopping-cart/shopping-cart-cell.vue
+18
-9
src/components/shopping-cart/shopping-cart-com.vue
src/components/shopping-cart/shopping-cart-com.vue
+12
-3
src/components/shopping-cart/shopping-cart-list.vue
src/components/shopping-cart/shopping-cart-list.vue
+2
-5
src/components/table/table-input.vue
src/components/table/table-input.vue
+13
-2
src/components/table/table-um.vue
src/components/table/table-um.vue
+6
-6
No files found.
src/components/shopping-cart/shopping-cart-cell.vue
View file @
258ac99a
...
...
@@ -15,14 +15,20 @@
/>
<div
class=
"shopping_cell_msg"
>
<div
class=
"shopping_cell_name"
>
{{
cellI
tems
.
service
.
name
}}
{{
cellI
sService
?
cellItems
.
service
.
name
:
cellItems
.
application
.
app_
name
}}
<span
v-if=
"cellItems.service.data_service_type1_name == '时空服务'"
v-if=
"cellI
sService && cellI
tems.service.data_service_type1_name == '时空服务'"
class=
"tags map_service"
>
mapService
</span>
<span
v-if=
"cellItems.service.openness == 1"
class=
"tags shared"
>
共享
</span>
<span
v-else-if=
"cellItems.service.openness == 2"
class=
"tags restricted"
>
受限
</span>
<span
v-else
class=
"tags sensitive"
>
敏感
</span>
<span
v-if=
"cellIsService && cellItems.service.openness == 1"
class=
"tags shared"
>
共享
</span>
<span
v-else-if=
"cellIsService && cellItems.service.openness == 2"
class=
"tags restricted"
>
受限
</span>
<span
v-else-if=
"cellIsService && cellItems.service.openness == 3"
class=
"tags sensitive"
>
敏感
</span>
</div>
<div
class=
"shopping_cell_msg_other"
>
<div
...
...
@@ -43,6 +49,7 @@
<div
class=
"shopping_cell_specification_val_specification"
>
规格:
{{
getSpecification
}}
</div>
<div
class=
"shopping_cell_specification_val_type"
v-if=
"cellIsService"
>
申请方式:
{{
specificationApplicationBtns
[
cellItems
.
duration_method
-
1
].
value
}}
</div>
<div
class=
"shopping_cell_specification_edit"
>
<el-popover
...
...
@@ -54,7 +61,9 @@
<div>
<div
v-if=
"cellIsService"
>
<div
class=
"shopping_cell_specification_title"
>
规格:
</div>
<div
v-if=
"cellItems.service.request_spcs_info && cellItems.service.request_spcs_info.length != 0"
>
<div
v-if=
"cellItems.service.request_spcs_info && cellItems.service.request_spcs_info.length != 0"
>
<el-button
v-for=
"(item, index) in cellItems.service.request_spcs_info"
:key=
"'specification' + index"
...
...
@@ -77,8 +86,8 @@
>
{{
index
+
1
+
"
.
"
+
item
.
value
}}
</el-button>
</div>
</div>
<div
class=
"shopping_cell_specification_title"
>
申请方式:
</div>
<div>
<div
v-if=
"cellIsService"
class=
"shopping_cell_specification_title"
>
申请方式:
</div>
<div
v-if=
"cellIsService"
>
<el-button
v-for=
"(item, index) in specificationApplicationBtns"
:key=
"'specification' + index"
...
...
@@ -198,7 +207,7 @@ export default {
let
num
=
arr
.
indexOf
(
this
.
cellItems
.
spec_id
);
let
specification
=
""
;
if
(
num
!=
-
1
)
{
specification
=
this
.
cellItems
.
service
.
request_spec_info
[
num
].
value
;
specification
=
this
.
cellItems
.
service
.
request_spec_info
[
num
].
des
;
}
return
specification
;
}
else
{
...
...
src/components/shopping-cart/shopping-cart-com.vue
View file @
258ac99a
...
...
@@ -26,7 +26,12 @@
</div>
<div
class=
"shopping_list shopping_list_fail"
>
<div
class=
"expired_service"
>
已失效服务
</div>
<ShoppingCartList
:readOnly=
"true"
:list=
"listIn"
class=
"shopping_all_list"
/>
<ShoppingCartList
:readOnly=
"true"
:list=
"listIn"
:checkList=
"checkListIn"
class=
"shopping_all_list"
/>
</div>
<div
class=
"shopping_list shopping_list_options"
>
<div
class=
"shopping_cart_options"
>
...
...
@@ -43,7 +48,7 @@
>
删除选中服务
</span>
</el-col>
<el-col
:span=
"15"
class=
"shopping_cart_options_num"
>
共
{{
checkL
ist
.
length
}}
项服务,已选择
共
{{
l
ist
.
length
}}
项服务,已选择
<span>
{{
getNum
}}
</span>
项
</el-col>
<el-col
:span=
"4"
class=
"shopping_cart_options_cell"
>
...
...
@@ -74,6 +79,7 @@ export default {
data
:
()
=>
({
checkShopAll
:
false
,
checkList
:
[],
checkListIn
:
[],
list
:
[],
listIn
:
[]
}),
...
...
@@ -93,12 +99,14 @@ export default {
getList
()
{
this
.
$api
.
serviceShop
.
getShoppingCart
().
then
(
response
=>
{
if
(
response
.
data
.
success
==
"
1
"
)
{
console
.
log
(
response
.
data
.
data
);
this
.
list
=
response
.
data
.
data
.
valid
;
this
.
listIn
=
response
.
data
.
data
.
invalid
;
for
(
const
index
in
this
.
list
)
{
this
.
checkList
.
push
(
false
);
}
for
(
const
index
in
this
.
listIn
)
{
this
.
checkListIn
.
push
(
false
);
}
}
else
{
console
.
log
(
response
.
data
.
message
);
}
...
...
@@ -143,6 +151,7 @@ export default {
let
arr
=
[];
this
.
checkList
.
forEach
((
item
,
index
)
=>
{
if
(
item
===
true
)
{
this
.
list
[
index
].
selected
=
Number
(
this
.
list
[
index
].
selected
);
arr
.
push
(
this
.
list
[
index
]);
}
});
...
...
src/components/shopping-cart/shopping-cart-list.vue
View file @
258ac99a
...
...
@@ -4,7 +4,7 @@
<ShoppingCartCell
v-for=
"(item, index) in list"
:cellItem=
"item"
:cellIsService=
"item.
service_id == 0 ? false:true
"
:cellIsService=
"item.
app_id == 0
"
:cellIndex=
"index"
:cellCheck=
"checkLists[index]"
:key=
"item.id"
...
...
@@ -35,10 +35,7 @@ export default {
type
:
Array
},
checkList
:
{
type
:
Array
,
default
:
()
=>
{
[];
}
type
:
Array
}
},
watch
:
{
...
...
src/components/table/table-input.vue
View file @
258ac99a
<
template
>
<div>
<div
v-if=
"typeHead == 'inputNumber'"
class=
"text-xs-center"
>
<el-input
ref=
"inpNum"
v-model=
"inputText"
oninput=
"value=value.replace(/[^\d]/g, '')"
:disabled=
"couldNotEdit || name == ''"
size=
"small"
@
input=
"changeValue"
class=
"table_in_input"
></el-input>
</div>
<div
v-if=
"typeHead == 'input' || type == '' || (typeHead == 'upload' && type == 'text')"
v-
else-
if=
"typeHead == 'input' || type == '' || (typeHead == 'upload' && type == 'text')"
class=
"text-xs-center"
>
<el-input
...
...
@@ -55,7 +66,7 @@ export default {
default
:
""
},
id
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
""
},
name
:
{
...
...
src/components/table/table-um.vue
View file @
258ac99a
...
...
@@ -145,7 +145,7 @@
></v-apaas-table-umhref>
<!-- could edit -->
<v-apaas-table-input
v-else-if=
"item.type === 'input' || item.type === 'upload'"
v-else-if=
"item.type === 'input' || item.type === 'upload'
|| item.type === 'inputNumber'
"
:item=
"helper.GetProperty(scope.row, item.prop)"
:header=
"item.prop"
:id=
"scope.row.id"
...
...
@@ -267,9 +267,9 @@ export default {
},
props
:
{
//是否控制5行显示
isLoad
:
''
,
isLoad
:
""
,
//是否滚动加载
asyn_load1
:{
type
:
Boolean
,
default
:
false
},
asyn_load1
:
{
type
:
Boolean
,
default
:
false
},
// 表格型号:mini,medium,small
size
:
{
type
:
String
,
default
:
"
medium
"
},
loading
:
{
type
:
Boolean
,
default
:
false
},
...
...
@@ -434,9 +434,9 @@ export default {
}
},
methods
:
{
asynload
(){
console
.
log
(
'
111
'
);
if
(
this
.
asyn_load1
)
{
asynload
()
{
console
.
log
(
"
111
"
);
if
(
this
.
asyn_load1
)
{
this
.
$emit
(
"
load_data
"
);
}
},
...
...
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