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
77b891d3
Commit
77b891d3
authored
Jun 16, 2020
by
张俊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zj' into dev
parents
051d349c
98246105
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
54 deletions
+85
-54
src/pages/workbench/yygl/app_edit.vue
src/pages/workbench/yygl/app_edit.vue
+85
-54
No files found.
src/pages/workbench/yygl/app_edit.vue
View file @
77b891d3
...
...
@@ -20,9 +20,9 @@
<el-select
v-model=
"form.area"
placeholder=
"请选择"
>
<el-option
v-for=
"item in area_arr"
:key=
"item.
value
"
:label=
"item.
label
"
:value=
"item.
value
"
>
:key=
"item.
id
"
:label=
"item.
name
"
:value=
"item.
id
"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -32,9 +32,9 @@
<el-select
v-model=
"form.type"
placeholder=
"请选择"
>
<el-option
v-for=
"item in type_arr"
:key=
"item.
value
"
:label=
"item.
label
"
:value=
"item.
value
"
>
:key=
"item.
id
"
:label=
"item.
name
"
:value=
"item.
id
"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -64,9 +64,9 @@
<el-select
v-model=
"form.origin"
placeholder=
"请选择"
>
<el-option
v-for=
"item in origin_arr"
:key=
"item.
value
"
:label=
"item.
label
"
:value=
"item.
value
"
>
:key=
"item.
id
"
:label=
"item.
name
"
:value=
"item.
id
"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -100,6 +100,7 @@
<
script
>
import
uploadFile
from
'
@/components/upload_file
'
import
{
getRole
}
from
"
@/utils/common
"
;
import
{
mapGetters
,
mapState
}
from
'
vuex
'
export
default
{
props
:
{},
components
:
{
...
...
@@ -123,42 +124,8 @@ export default {
open2
:
'
true
'
,
now_user
:
2
,
//0:普通用户,1:组织管理员,2:超级管理员
imgList
:
[],
area_arr
:[
{
label
:
'
应急领域
'
,
value
:
0
,
},
{
label
:
'
公安领域
'
,
value
:
1
,
},
{
label
:
'
交通领域
'
,
value
:
2
,
},
{
label
:
'
全领域
'
,
value
:
3
,
}
],
type_arr
:[
{
label
:
'
基础工具
'
,
value
:
0
,
},
{
label
:
'
通用应用
'
,
value
:
1
,
},
{
label
:
'
业务应用
'
,
value
:
2
,
},
{
label
:
'
其他
'
,
value
:
3
,
}
],
area_arr
:[],
type_arr
:[],
origin_arr
:[],
rules
:{
name
:[
...
...
@@ -196,34 +163,98 @@ export default {
watch
:
{},
computed
:
{},
created
()
{
this
.
now_user
=
this
.
$store
.
state
.
role
getRole
().
then
(
data
=>
{
this
.
now_user
=
data
;
this
.
$store
.
commit
(
'
rolefun
'
,
data
)
this
.
getOriginArr
()
});
this
.
getServiceInfo
()
this
.
getOriginArr
()
this
.
get_area
()
this
.
get_type
()
},
mounted
()
{},
methods
:
{
getOriginArr
(){
this
.
$http
.
get
(
'
/
static/serviceedit.json
'
)
.
get
(
'
/
apaas/hubApi/market/departments
'
)
.
then
(
response
=>
{
let
data
=
response
.
data
.
data
this
.
origin_arr
=
data
.
origin_arr
this
.
origin_arr
=
data
})
.
catch
(
function
(
response
)
{
});
},
get_area
(){
this
.
$http
.
get
(
"
/apaas/hubApi/market/businessAreas
"
)
.
then
((
response
)
=>
{
if
(
response
.
data
.
success
){
let
data
=
response
.
data
.
data
;
this
.
area_arr
=
data
}
})
.
catch
(
function
(
response
)
{});
},
get_type
(){
this
.
$http
.
get
(
"
/apaas/hubApi/market/appTypes
"
)
.
then
((
response
)
=>
{
if
(
response
.
data
.
success
){
let
data
=
response
.
data
.
data
;
this
.
type_arr
=
data
}
})
.
catch
(
function
(
response
)
{});
},
getServiceInfo
()
{
this
.
$http
.
get
(
"
/apaas/hubApi/market/baseInfo?id=
"
+
this
.
$route
.
params
.
id
)
.
then
((
response
)
=>
{
if
(
response
.
data
.
success
){
let
data
=
response
.
data
.
data
;
this
.
form
=
{
name
:
data
.
app_name
,
area
:
data
.
ywly
,
origin
:
data
.
org
,
vision
:
data
.
version
,
type
:
data
.
type
,
appdesc
:
data
.
yyjj
,
actiondesc
:
data
.
gnjj
,
example
:
data
.
cjsl
,
fileList
:
data
.
logo
}
}
})
.
catch
(
function
(
response
)
{});
},
removepic
(){
this
.
$refs
.
servicepic
.
remove_pic
()
},
post_app_info
(){
// 声明一个 FormData 数据
let
formData
=
new
FormData
()
// 利用 append 方法往 formData 中添加数据,第一个参数是键名,第二个参数是键值
formData
.
append
(
'
name
'
,
this
.
form
.
name
)
formData
.
append
(
'
version
'
,
this
.
form
.
vision
)
formData
.
append
(
'
ywly
'
,
this
.
form
.
area
)
formData
.
append
(
'
type
'
,
this
.
form
.
type
)
formData
.
append
(
'
org
'
,
this
.
form
.
origin
)
formData
.
append
(
'
logo
'
,
this
.
form
.
fileList
)
formData
.
append
(
'
yyjj
'
,
this
.
form
.
appdesc
)
formData
.
append
(
'
gnjj
'
,
this
.
form
.
actiondesc
)
formData
.
append
(
'
cjsl
'
,
this
.
form
.
example
)
this
.
$http
.
post
(
'
/apaas/hubApi/market/app
'
,
formData
)
.
then
(
response
=>
{
console
.
log
(
response
);
})
.
catch
(
function
(
response
)
{
});
},
onSubmit
(
formName
)
{
console
.
log
(
'
submit!
'
);
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
alert
(
'
submit!
'
);
this
.
post_app_info
()
}
else
{
console
.
log
(
'
error submit!!
'
);
return
false
;
...
...
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