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
6e3031c6
Commit
6e3031c6
authored
Jun 24, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
申请页,申请项无数据不显示
parent
35563cf3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
407 additions
and
405 deletions
+407
-405
src/components/shop-car-apply/apply_service_state.vue
src/components/shop-car-apply/apply_service_state.vue
+37
-43
src/pages/service_shop/shop_car_apply.vue
src/pages/service_shop/shop_car_apply.vue
+370
-362
No files found.
src/components/shop-car-apply/apply_service_state.vue
View file @
6e3031c6
...
...
@@ -2,10 +2,7 @@
<div
class=
"outborder"
>
<div
class=
"outservice"
>
<div
class=
"serviceinfo"
>
<div
class=
"pic"
:style=
"
{ backgroundImage: 'url(' + data.img + ')' }"
>
</div>
<div
class=
"pic"
:style=
"
{ backgroundImage: 'url(' + data.img + ')' }">
</div>
<div
class=
"info"
>
<p>
{{
data
.
title
}}
...
...
@@ -33,8 +30,7 @@
border: 'solid 1px #e4c884',
}
"
>
{{
item
.
tip
}}
</span
>
>
{{
item
.
tip
}}
</span>
</p>
<p>
{{
data
.
type
}}
</p>
<p>
{{
data
.
auth
}}
</p>
...
...
@@ -44,9 +40,7 @@
<p>
{{
data
.
size
}}
</p>
<P>
{{
data
.
applytype
}}
</P>
</div>
<div
class=
"num"
>
{{
data
.
num
}}
</div>
<div
class=
"num"
>
{{
data
.
num
}}
</div>
<div
class=
"oprate"
>
<upload-file
v-if=
"data.isMg"
...
...
@@ -59,17 +53,17 @@
</div>
<p
class=
"inputtitle"
>
应用场景:
</p>
<div
class=
"system"
>
<el-input
v-model=
"sceneinput"
placeholder=
"请填写申请服务的应用场景"
></el-input>
<el-input
v-model=
"sceneinput"
placeholder=
"请填写申请服务的应用场景"
></el-input>
</div>
<p
class=
"inputtitle degr"
v-if=
"!data.isapp"
@
click=
"showtable = !showtable"
>
<i
:class=
"showtable ? 'el-icon-caret-bottom' : 'el-icon-caret-right'"
></i
>
选择需要申请的数据项:
<p
class=
"inputtitle degr"
v-if=
"!data.isapp && data.data && data.data.length != 0 "
@
click=
"showtable = !showtable"
>
<i
:class=
"showtable ? 'el-icon-caret-bottom' : 'el-icon-caret-right'"
></i>
选择需要申请的数据项:
</p>
<table-um
v-if=
"!data.isapp
"
v-if=
"!data.isapp && data.data && data.data.length != 0
"
v-show=
"showtable"
:isSelection=
"true"
ref=
"apply_service_state_table"
...
...
@@ -85,66 +79,66 @@
import
uploadFile
from
"
@/components/upload_file
"
;
import
tableUm
from
"
@/components/table/table-um
"
;
export
default
{
props
:
[
"
data
"
,
"
idx
"
],
props
:
[
"
data
"
,
"
idx
"
],
components
:
{
uploadFile
,
tableUm
,
tableUm
},
data
()
{
return
{
sceneinput
:
""
,
fileList
:
''
,
imgList
:[],
fileList
:
""
,
imgList
:
[],
showtable
:
false
,
headers
:
[
{
label
:
"
字段编码
"
,
prop
:
"
code
"
,
align
:
"
left
"
,
minWidth
:
"
20%
"
,
minWidth
:
"
20%
"
},
{
label
:
"
字段名称
"
,
prop
:
"
name
"
,
align
:
"
left
"
,
minWidth
:
"
20%
"
,
minWidth
:
"
20%
"
},
{
label
:
"
字段类型
"
,
prop
:
"
type
"
,
align
:
"
center
"
,
width
:
"
150
"
,
width
:
"
150
"
},
{
label
:
"
字段描述
"
,
prop
:
"
desc
"
,
align
:
"
left
"
,
minWidth
:
"
50%
"
,
}
,
]
,
minWidth
:
"
50%
"
}
]
};
},
watch
:
{},
computed
:
{},
created
()
{
},
created
()
{},
mounted
()
{},
methods
:
{
getNewList
(
val
)
{
console
.
log
(
val
);
this
.
fileList
=
""
this
.
fileList
=
val
.
map
((
v
,
k
)
=>
{
return
v
.
url
}).
join
(
'
;
'
)
console
.
log
(
this
.
fileList
)
this
.
fileList
=
""
;
this
.
fileList
=
val
.
map
((
v
,
k
)
=>
{
return
v
.
url
;
})
.
join
(
"
;
"
);
console
.
log
(
this
.
fileList
);
}
}
},
};
</
script
>
<
style
scoped
>
.outborder
{
.outborder
{
border-bottom
:
2px
solid
rgba
(
244
,
247
,
252
,
1
);
}
.outservice
{
...
...
@@ -238,7 +232,7 @@ export default {
text-decoration
:
underline
;
cursor
:
pointer
;
}
.table
{
.table
{
margin
:
0
30px
20px
;
}
</
style
>
src/pages/service_shop/shop_car_apply.vue
View file @
6e3031c6
...
...
@@ -17,9 +17,7 @@ import infoList from "@/components/infoList";
import
applyForm
from
"
@/components/shop-car-apply/apply_form
"
;
import
serviceList
from
"
@/components/shop-car-apply/service_list
"
;
export
default
{
props
:
{
},
props
:
{},
components
:
{
infoList
,
applyForm
,
...
...
@@ -27,21 +25,20 @@ export default {
},
data
()
{
return
{
module_arr
:
[
module_arr
:
[
{
title
:
'
服务申请
'
,
type
:
'
solt
'
,
solt_name
:
'
apply_info
'
title
:
"
服务申请
"
,
type
:
"
solt
"
,
solt_name
:
"
apply_info
"
},
{
title
:
'
申请的服务
'
,
type
:
'
solt
'
,
solt_name
:
'
apply_service
'
},
title
:
"
申请的服务
"
,
type
:
"
solt
"
,
solt_name
:
"
apply_service
"
}
],
post_arr
:
[],
service_arr
:
[
post_arr
:
[],
service_arr
:
[
// {
// img:'http://b-ssl.duitang.com/uploads/item/201705/09/20170509165713_NiHaG.jpeg',
// title:'水路货物周转量情况水路货物周转量情况',
...
...
@@ -85,296 +82,307 @@ export default {
// tableurl:'applydata',
// },
],
share_arr
:
[
''
,
share_arr
:
[
""
,
{
name
:
'
共享
'
,
val
:
'
share
'
name
:
"
共享
"
,
val
:
"
share
"
},
{
name
:
'
受限
'
,
val
:
'
limit
'
name
:
"
受限
"
,
val
:
"
limit
"
},
{
name
:
'
敏感
'
,
val
:
'
mg
'
name
:
"
敏感
"
,
val
:
"
mg
"
}
],
temp_sub_arr
:[]
temp_sub_arr
:
[]
};
},
watch
:
{
},
computed
:
{
},
watch
:
{},
computed
:
{},
created
()
{
if
(
this
.
$route
.
query
.
service_id
)
{
this
.
get_one_service
(
this
.
$route
.
query
)
}
else
if
(
this
.
$route
.
query
.
app_id
)
{
this
.
get_one_app
(
this
.
$route
.
query
)
}
else
{
console
.
log
(
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'
shoppingCart
'
)));
var
temp_arr
=
[]
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'
shoppingCart
'
)).
forEach
(
e
=>
{
temp_arr
.
push
(
e
.
id
)
if
(
this
.
$route
.
query
.
service_id
)
{
this
.
get_one_service
(
this
.
$route
.
query
);
}
else
if
(
this
.
$route
.
query
.
app_id
)
{
this
.
get_one_app
(
this
.
$route
.
query
);
}
else
{
console
.
log
(
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
"
shoppingCart
"
)));
var
temp_arr
=
[];
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
"
shoppingCart
"
)).
forEach
(
e
=>
{
temp_arr
.
push
(
e
.
id
);
});
this
.
get_car_list
(
temp_arr
)
this
.
get_car_list
(
temp_arr
);
}
},
mounted
()
{
},
mounted
()
{},
methods
:
{
get_one_app
(
app_data
)
{
get_one_app
(
app_data
)
{
this
.
$http
.
get
(
`/apaas/serviceapp/v3/shopcart/appinfo?app_id=
${
app_data
.
app_id
}
`
)
.
then
(
response
=>
{
console
.
log
(
response
);
let
data
=
response
.
data
.
data
if
(
response
.
data
.
success
&&
data
)
{
let
data
=
response
.
data
.
data
;
if
(
response
.
data
.
success
&&
data
)
{
//应用
this
.
post_arr
=
[
data
]
this
.
post_arr
[
0
].
app_id
=
parseInt
(
app_data
.
app_id
)
this
.
post_arr
[
0
].
spec_id
=
parseInt
(
app_data
.
spec_id
)
this
.
post_arr
[
0
].
duration_method
=
parseInt
(
app_data
.
duration_unit
)
this
.
post_arr
[
0
].
duration
=
parseInt
(
app_data
.
duration
)
this
.
post_arr
[
0
].
id
=
''
this
.
service_arr
.
push
({})
this
.
service_arr
[
0
][
'
img
'
]
=
data
.
logo
this
.
service_arr
[
0
][
'
title
'
]
=
data
.
app_name
this
.
service_arr
[
0
][
'
type
'
]
=
data
.
type_name
this
.
service_arr
[
0
][
'
auth
'
]
=
data
.
org_name
this
.
service_arr
[
0
][
'
size
'
]
=
'
规格:
'
+
(
app_data
.
spec_id
==
0
?
'
部署
'
:
'
开发
'
)
this
.
service_arr
[
0
][
'
applytype
'
]
=
'
申请方式:
'
+
(
app_data
.
duration_unit
==
1
?
'
月
'
:
'
年
'
)
this
.
service_arr
[
0
][
'
num
'
]
=
app_data
.
duration
this
.
service_arr
[
0
][
'
isMg
'
]
=
false
this
.
service_arr
[
0
][
'
isapp
'
]
=
true
this
.
post_arr
=
[
data
];
this
.
post_arr
[
0
].
app_id
=
parseInt
(
app_data
.
app_id
);
this
.
post_arr
[
0
].
spec_id
=
parseInt
(
app_data
.
spec_id
);
this
.
post_arr
[
0
].
duration_method
=
parseInt
(
app_data
.
duration_unit
);
this
.
post_arr
[
0
].
duration
=
parseInt
(
app_data
.
duration
);
this
.
post_arr
[
0
].
id
=
""
;
this
.
service_arr
.
push
({});
this
.
service_arr
[
0
][
"
img
"
]
=
data
.
logo
;
this
.
service_arr
[
0
][
"
title
"
]
=
data
.
app_name
;
this
.
service_arr
[
0
][
"
type
"
]
=
data
.
type_name
;
this
.
service_arr
[
0
][
"
auth
"
]
=
data
.
org_name
;
this
.
service_arr
[
0
][
"
size
"
]
=
"
规格:
"
+
(
app_data
.
spec_id
==
0
?
"
部署
"
:
"
开发
"
);
this
.
service_arr
[
0
][
"
applytype
"
]
=
"
申请方式:
"
+
(
app_data
.
duration_unit
==
1
?
"
月
"
:
"
年
"
);
this
.
service_arr
[
0
][
"
num
"
]
=
app_data
.
duration
;
this
.
service_arr
[
0
][
"
isMg
"
]
=
false
;
this
.
service_arr
[
0
][
"
isapp
"
]
=
true
;
}
})
});
},
get_one_service
(
service_data
)
{
get_one_service
(
service_data
)
{
this
.
$http
.
get
(
`/apaas/serviceapp/v3/shopcart/serviceinfo?service_id=
${
service_data
.
service_id
}
`
)
.
get
(
`/apaas/serviceapp/v3/shopcart/serviceinfo?service_id=
${
service_data
.
service_id
}
`
)
.
then
(
response
=>
{
console
.
log
(
response
);
let
data
=
response
.
data
.
data
if
(
response
.
data
.
success
&&
data
)
{
let
data
=
response
.
data
.
data
;
if
(
response
.
data
.
success
&&
data
)
{
//服务
this
.
post_arr
=
[
data
]
this
.
post_arr
[
0
].
service_id
=
parseInt
(
service_data
.
service_id
)
this
.
post_arr
[
0
].
spec_id
=
parseInt
(
service_data
.
spec_id
)
this
.
post_arr
[
0
].
duration_method
=
parseInt
(
service_data
.
duration_unit
)
this
.
post_arr
[
0
].
duration
=
parseInt
(
service_data
.
duration
)
this
.
post_arr
[
0
].
id
=
''
this
.
service_arr
.
push
({})
this
.
service_arr
[
0
][
'
img
'
]
=
data
.
cover
this
.
service_arr
[
0
][
'
title
'
]
=
data
.
name
this
.
service_arr
[
0
][
'
type
'
]
=
data
.
data_service_type1_name
this
.
service_arr
[
0
][
'
tips
'
]
=
[
this
.
post_arr
=
[
data
];
this
.
post_arr
[
0
].
service_id
=
parseInt
(
service_data
.
service_id
);
this
.
post_arr
[
0
].
spec_id
=
parseInt
(
service_data
.
spec_id
);
this
.
post_arr
[
0
].
duration_method
=
parseInt
(
service_data
.
duration_unit
);
this
.
post_arr
[
0
].
duration
=
parseInt
(
service_data
.
duration
);
this
.
post_arr
[
0
].
id
=
""
;
this
.
service_arr
.
push
({});
this
.
service_arr
[
0
][
"
img
"
]
=
data
.
cover
;
this
.
service_arr
[
0
][
"
title
"
]
=
data
.
name
;
this
.
service_arr
[
0
][
"
type
"
]
=
data
.
data_service_type1_name
;
this
.
service_arr
[
0
][
"
tips
"
]
=
[
{
tip
:
this
.
share_arr
[
data
.
openness
].
name
,
type
:
this
.
share_arr
[
data
.
openness
].
val
tip
:
this
.
share_arr
[
data
.
openness
].
name
,
type
:
this
.
share_arr
[
data
.
openness
].
val
}
]
this
.
service_arr
[
0
][
'
auth
'
]
=
data
.
organization_name
this
.
service_arr
[
0
][
'
size
'
]
=
'
规格:
'
];
this
.
service_arr
[
0
][
"
auth
"
]
=
data
.
organization_name
;
this
.
service_arr
[
0
][
"
size
"
]
=
"
规格:
"
;
data
.
request_spcs_info
.
forEach
(
el
=>
{
if
(
service_data
.
spec_id
==
el
.
id
){
this
.
service_arr
[
0
][
'
size
'
]
=
this
.
service_arr
[
0
][
'
size
'
]
+
'
访问次数:
'
+
el
.
count
+
'
,访问量:
'
+
el
.
pv
+
'
,
'
if
(
service_data
.
spec_id
==
el
.
id
)
{
this
.
service_arr
[
0
][
"
size
"
]
=
this
.
service_arr
[
0
][
"
size
"
]
+
"
访问次数:
"
+
el
.
count
+
"
,访问量:
"
+
el
.
pv
+
"
,
"
;
}
});
this
.
service_arr
[
0
][
'
applytype
'
]
=
'
申请方式:
'
+
(
service_data
.
duration_unit
==
1
?
'
月
'
:
'
年
'
)
this
.
service_arr
[
0
][
'
num
'
]
=
service_data
.
duration
this
.
service_arr
[
0
][
'
isMg
'
]
=
data
.
openness
==
3
this
.
service_arr
[
0
][
'
data
'
]
=
JSON
.
parse
(
data
.
res_fields
)
console
.
log
(
this
.
service_arr
[
0
][
'
data
'
]);
this
.
service_arr
[
0
][
'
isapp
'
]
=
false
}
else
{
this
.
$message
.
error
(
response
.
data
.
errMsg
)
this
.
service_arr
[
0
][
"
applytype
"
]
=
"
申请方式:
"
+
(
service_data
.
duration_unit
==
1
?
"
月
"
:
"
年
"
);
this
.
service_arr
[
0
][
"
num
"
]
=
service_data
.
duration
;
this
.
service_arr
[
0
][
"
isMg
"
]
=
data
.
openness
==
3
;
this
.
service_arr
[
0
][
"
data
"
]
=
JSON
.
parse
(
data
.
res_fields
);
console
.
log
(
this
.
service_arr
[
0
][
"
data
"
]);
this
.
service_arr
[
0
][
"
isapp
"
]
=
false
;
}
else
{
this
.
$message
.
error
(
response
.
data
.
errMsg
);
}
}).
catch
(()
=>
{
})
.
catch
(()
=>
{});
},
deal_data
(
data
)
{
deal_data
(
data
)
{
data
.
forEach
(
e
=>
{
if
(
e
.
selected
)
{
e
.
selected
=
1
}
else
{
e
.
selected
=
0
if
(
e
.
selected
)
{
e
.
selected
=
1
;
}
else
{
e
.
selected
=
0
;
}
if
(
e
.
children
&&
e
.
children
.
length
)
{
this
.
deal_data
(
e
.
children
)
if
(
e
.
children
&&
e
.
children
.
length
)
{
this
.
deal_data
(
e
.
children
);
}
});
},
sub_service
()
{
let
formInline
=
this
.
$refs
.
apply_info
.
formInline
if
(
formInline
.
preson
&&
formInline
.
phone
)
{
var
phone_ruler
=
/^
(?:(?:\+
|00
)
86
)?
1
[
3-9
]\d{9}
$/
if
(
!
phone_ruler
.
test
(
formInline
.
phone
))
{
this
.
$message
.
error
(
'
输入正确号码
'
)
return
sub_service
()
{
let
formInline
=
this
.
$refs
.
apply_info
.
formInline
;
if
(
formInline
.
preson
&&
formInline
.
phone
)
{
var
phone_ruler
=
/^
(?:(?:\+
|00
)
86
)?
1
[
3-9
]\d{9}
$/
;
if
(
!
phone_ruler
.
test
(
formInline
.
phone
))
{
this
.
$message
.
error
(
"
输入正确号码
"
);
return
;
}
var
temp
=
{
"
apply_part
"
:
{
"
o_name
"
:
formInline
.
preson
,
"
o_mobile
"
:
formInline
.
phone
apply_part
:
{
o_name
:
formInline
.
preson
,
o_mobile
:
formInline
.
phone
},
carts
:[]
}
var
temp1
=
this
.
$refs
.
apply_service
.
$refs
.
apply_service_state
this
.
post_arr
.
forEach
((
e
,
idx
)
=>
{
debugger
if
(
e
.
service_id
){
temp
.
carts
.
push
(
{
"
id
"
:
e
.
id
,
"
service_id
"
:
e
.
service_id
,
"
duration
"
:
e
.
duration
,
"
spec_id
"
:
e
.
spec_id
,
"
duration_method
"
:
e
.
duration_method
,
"
is_subscribe
"
:
e
.
is_subscribe
,
"
app_id
"
:
0
,
"
scene
"
:
temp1
[
idx
].
sceneinput
,
"
apply_file
"
:
temp1
[
idx
].
fileList
,
"
apply_fields
"
:[],
}
)
this
.
temp_sub_arr
=
temp1
[
idx
].
$refs
.
apply_service_state_table
.
metaData
this
.
deal_data
(
this
.
temp_sub_arr
)
temp
.
carts
[
temp
.
carts
.
length
-
1
][
'
apply_fields
'
]
=
this
.
temp_sub_arr
}
else
{
temp
.
carts
.
push
(
{
"
id
"
:
e
.
id
,
"
service_id
"
:
0
,
"
duration
"
:
e
.
duration
,
"
spec_id
"
:
e
.
spec_id
,
"
duration_method
"
:
e
.
duration_method
,
"
is_subscribe
"
:
e
.
is_subscribe
,
"
app_id
"
:
e
.
app_id
,
"
scene
"
:
this
.
$refs
.
apply_service
.
$refs
.
apply_service_state
[
idx
].
sceneinput
,
"
apply_file
"
:
""
,
}
)
carts
:
[]
};
var
temp1
=
this
.
$refs
.
apply_service
.
$refs
.
apply_service_state
;
this
.
post_arr
.
forEach
((
e
,
idx
)
=>
{
if
(
e
.
service_id
)
{
temp
.
carts
.
push
({
id
:
e
.
id
,
service_id
:
e
.
service_id
,
duration
:
e
.
duration
,
spec_id
:
e
.
spec_id
,
duration_method
:
e
.
duration_method
,
is_subscribe
:
e
.
is_subscribe
,
app_id
:
0
,
scene
:
temp1
[
idx
].
sceneinput
,
apply_file
:
temp1
[
idx
].
fileList
,
apply_fields
:
[]
});
// 判断表格ref是否存在
this
.
temp_sub_arr
=
temp1
[
idx
].
$refs
.
apply_service_state_table
?
temp1
[
idx
].
$refs
.
apply_service_state_table
.
metaData
:
[];
this
.
deal_data
(
this
.
temp_sub_arr
);
temp
.
carts
[
temp
.
carts
.
length
-
1
][
"
apply_fields
"
]
=
this
.
temp_sub_arr
;
}
else
{
temp
.
carts
.
push
({
id
:
e
.
id
,
service_id
:
0
,
duration
:
e
.
duration
,
spec_id
:
e
.
spec_id
,
duration_method
:
e
.
duration_method
,
is_subscribe
:
e
.
is_subscribe
,
app_id
:
e
.
app_id
,
scene
:
this
.
$refs
.
apply_service
.
$refs
.
apply_service_state
[
idx
]
.
sceneinput
,
apply_file
:
""
});
}
});
}
else
{
this
.
$message
.
error
(
'
请完善服务申请
'
)
return
}
else
{
this
.
$message
.
error
(
"
请完善服务申请
"
);
return
;
}
for
(
let
index
=
0
;
index
<
temp
.
carts
.
length
;
index
++
)
{
const
e
=
temp
.
carts
[
index
];
if
(
e
.
service_id
){
if
(
e
.
apply_fields
[
0
].
selected
==
0
){
this
.
$message
.
error
(
'
请选择所需参数
'
)
return
// 若表格数据长度不为0,执行以下
if
(
e
.
service_id
&&
e
.
apply_fields
.
length
!=
0
)
{
if
(
e
.
apply_fields
[
0
].
selected
==
0
)
{
this
.
$message
.
error
(
"
请选择所需参数
"
);
return
;
}
}
}
this
.
$http
.
post
(
`/apaas/serviceapp/v3/shopcart/apply`
,
temp
)
.
post
(
`/apaas/serviceapp/v3/shopcart/apply`
,
temp
)
.
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
success
)
{
this
.
$message
.
success
(
'
申请成功
'
)
this
.
$router
.
replace
(
'
/shop/service_application_successfully
'
)
}
else
{
this
.
$message
.
error
(
response
.
data
.
errMsg
)
if
(
response
.
data
.
success
)
{
this
.
$message
.
success
(
"
申请成功
"
);
this
.
$router
.
replace
(
"
/shop/service_application_successfully
"
);
}
else
{
this
.
$message
.
error
(
response
.
data
.
errMsg
);
}
}).
catch
(()
=>
{
this
.
$message
.
error
(
'
申请失败
'
)
})
.
catch
(()
=>
{
this
.
$message
.
error
(
"
申请失败
"
);
});
},
get_car_list
(
car_arr
)
{
this
.
service_arr
=
[]
this
.
post_arr
=
[]
get_car_list
(
car_arr
)
{
this
.
service_arr
=
[];
this
.
post_arr
=
[];
this
.
$http
.
get
(
`/apaas/serviceapp/v3/shopcart/list`
)
.
then
(
response
=>
{
console
.
log
(
response
);
let
data
=
response
.
data
.
data
.
valid
let
data
=
response
.
data
.
data
.
valid
;
data
.
forEach
(
e
=>
{
if
(
car_arr
.
indexOf
(
e
.
id
)
==-
1
){
return
if
(
car_arr
.
indexOf
(
e
.
id
)
==
-
1
)
{
return
;
}
this
.
post_arr
.
push
(
e
)
this
.
service_arr
.
push
({})
let
l
=
this
.
service_arr
.
length
-
1
if
(
e
.
app_id
)
{
this
.
post_arr
.
push
(
e
);
this
.
service_arr
.
push
({});
let
l
=
this
.
service_arr
.
length
-
1
;
if
(
e
.
app_id
)
{
//应用
this
.
service_arr
[
l
][
'
img
'
]
=
e
.
application
.
logo
this
.
service_arr
[
l
][
'
title
'
]
=
e
.
application
.
app_name
this
.
service_arr
[
l
][
'
type
'
]
=
e
.
application
.
type_name
this
.
service_arr
[
l
][
'
auth
'
]
=
e
.
application
.
org_name
this
.
service_arr
[
l
][
'
size
'
]
=
'
规格:
'
+
(
e
.
spec_id
==
0
?
'
部署
'
:
'
开发
'
)
this
.
service_arr
[
l
][
'
applytype
'
]
=
'
申请方式:
'
+
(
e
.
duration_unit
==
1
?
'
月
'
:
'
年
'
)
this
.
service_arr
[
l
][
'
num
'
]
=
e
.
duration
this
.
service_arr
[
l
][
'
isMg
'
]
=
false
this
.
service_arr
[
l
][
'
isapp
'
]
=
true
}
else
{
this
.
service_arr
[
l
][
"
img
"
]
=
e
.
application
.
logo
;
this
.
service_arr
[
l
][
"
title
"
]
=
e
.
application
.
app_name
;
this
.
service_arr
[
l
][
"
type
"
]
=
e
.
application
.
type_name
;
this
.
service_arr
[
l
][
"
auth
"
]
=
e
.
application
.
org_name
;
this
.
service_arr
[
l
][
"
size
"
]
=
"
规格:
"
+
(
e
.
spec_id
==
0
?
"
部署
"
:
"
开发
"
);
this
.
service_arr
[
l
][
"
applytype
"
]
=
"
申请方式:
"
+
(
e
.
duration_unit
==
1
?
"
月
"
:
"
年
"
);
this
.
service_arr
[
l
][
"
num
"
]
=
e
.
duration
;
this
.
service_arr
[
l
][
"
isMg
"
]
=
false
;
this
.
service_arr
[
l
][
"
isapp
"
]
=
true
;
}
else
{
//服务
this
.
service_arr
[
l
][
'
img
'
]
=
e
.
service
.
cover
this
.
service_arr
[
l
][
'
title
'
]
=
e
.
service
.
name
this
.
service_arr
[
l
][
'
type
'
]
=
e
.
service
.
data_service_type1_name
this
.
service_arr
[
l
][
'
tips
'
]
=
[
this
.
service_arr
[
l
][
"
img
"
]
=
e
.
service
.
cover
;
this
.
service_arr
[
l
][
"
title
"
]
=
e
.
service
.
name
;
this
.
service_arr
[
l
][
"
type
"
]
=
e
.
service
.
data_service_type1_name
;
this
.
service_arr
[
l
][
"
tips
"
]
=
[
{
tip
:
this
.
share_arr
[
e
.
service
.
openness
].
name
,
type
:
this
.
share_arr
[
e
.
service
.
openness
].
val
tip
:
this
.
share_arr
[
e
.
service
.
openness
].
name
,
type
:
this
.
share_arr
[
e
.
service
.
openness
].
val
}
]
this
.
service_arr
[
l
][
'
auth
'
]
=
e
.
service
.
organization_name
this
.
service_arr
[
l
][
'
size
'
]
=
'
规格:
'
];
this
.
service_arr
[
l
][
"
auth
"
]
=
e
.
service
.
organization_name
;
this
.
service_arr
[
l
][
"
size
"
]
=
"
规格:
"
;
e
.
service
.
request_spcs_info
.
forEach
(
el
=>
{
if
(
e
.
spec_id
==
el
.
id
){
this
.
service_arr
[
l
][
'
size
'
]
=
this
.
service_arr
[
l
][
'
size
'
]
+
'
访问次数:
'
+
el
.
count
+
'
,访问量:
'
+
el
.
pv
+
'
,
'
if
(
e
.
spec_id
==
el
.
id
)
{
this
.
service_arr
[
l
][
"
size
"
]
=
this
.
service_arr
[
l
][
"
size
"
]
+
"
访问次数:
"
+
el
.
count
+
"
,访问量:
"
+
el
.
pv
+
"
,
"
;
}
});
this
.
service_arr
[
l
][
'
applytype
'
]
=
'
申请方式:
'
+
(
e
.
duration_unit
==
1
?
'
月
'
:
'
年
'
)
this
.
service_arr
[
l
][
'
num
'
]
=
e
.
duration
this
.
service_arr
[
l
][
'
isMg
'
]
=
e
.
service
.
openness
==
3
this
.
service_arr
[
l
][
'
data
'
]
=
JSON
.
parse
(
e
.
service
.
res_fields
)
console
.
log
(
this
.
service_arr
[
l
][
'
data
'
]);
this
.
service_arr
[
l
][
'
isapp
'
]
=
false
this
.
service_arr
[
l
][
"
applytype
"
]
=
"
申请方式:
"
+
(
e
.
duration_unit
==
1
?
"
月
"
:
"
年
"
);
this
.
service_arr
[
l
][
"
num
"
]
=
e
.
duration
;
this
.
service_arr
[
l
][
"
isMg
"
]
=
e
.
service
.
openness
==
3
;
this
.
service_arr
[
l
][
"
data
"
]
=
JSON
.
parse
(
e
.
service
.
res_fields
);
console
.
log
(
this
.
service_arr
[
l
][
"
data
"
]);
this
.
service_arr
[
l
][
"
isapp
"
]
=
false
;
}
});
// this.service_arr =
})
.
catch
((
response
)
=>
{
});
},
},
.
catch
(
response
=>
{});
}
}
};
</
script
>
<
style
scoped
>
.apply_container
{
.apply_container
{
width
:
1200px
;
margin
:
0
auto
;
overflow
:
hidden
;
}
.footout
{
.footout
{
width
:
100%
;
height
:
84px
;
background-color
:
rgba
(
255
,
255
,
255
,
1
);
box-shadow
:
0px
3px
6px
0px
rgba
(
244
,
247
,
252
,
1
);
box-shadow
:
0px
3px
6px
0px
rgba
(
244
,
247
,
252
,
1
);
border-radius
:
12px
;
padding
:
20px
;
text-align
:
right
;
margin
:
20px
0
;
}
.applybtn
{
.applybtn
{
color
:
rgba
(
252
,
239
,
214
,
1
);
width
:
200px
;
height
:
44px
;
...
...
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