Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform-ui
Commits
133b843f
Commit
133b843f
authored
Jan 15, 2020
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标识管理
parent
9d461f5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
116 additions
and
62 deletions
+116
-62
appVersionMark.vue
src/views/appManagement/appVersionMark.vue
+116
-62
No files found.
src/views/appManagement/appVersionMark.vue
View file @
133b843f
...
@@ -22,6 +22,11 @@
...
@@ -22,6 +22,11 @@
<span>
{{
scope
.
row
.
mark
}}
</span>
<span>
{{
scope
.
row
.
mark
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"来源类型"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
sourceType
==
1
?
'苹果应用市场'
:
scope
.
row
.
sourceType
==
2
?
'Android应用市场'
:
scope
.
row
.
sourceType
==
3
?
'广告投放'
:
scope
.
row
.
sourceType
==
4
?
'SEO'
:
scope
.
row
.
sourceType
==
5
?
'产品功能引流'
:
scope
.
row
.
sourceType
==
6
?
'小程序'
:
''
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"描述"
>
<el-table-column
align=
"center"
label=
"描述"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
markRemark
}}
</span>
<span>
{{
scope
.
row
.
markRemark
}}
</span>
...
@@ -47,33 +52,43 @@
...
@@ -47,33 +52,43 @@
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
></el-pagination>
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
></el-pagination>
</div>
</div>
<el-dialog
:title=
"modalTitle"
:visible
.
sync=
"versionPopup"
:before-close=
"handleDialogClose"
>
<el-dialog
:title=
"modalTitle"
:visible
.
sync=
"versionPopup"
:before-close=
"handleDialogClose"
>
<el-form
:model=
"form"
ref=
"
appVersion"
label-width=
"150px
"
>
<el-form
:model=
"form"
ref=
"
form"
label-width=
"150px"
:rules=
"rules
"
>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"标识名称"
prop=
"sysType"
>
<el-form-item
label=
"来源类型"
prop=
"sourceType"
>
<el-input
type=
"text"
v-model=
"form.markName"
placeholder=
"请输入标识名称"
></el-input>
<el-select
class=
"filter-item"
v-model=
"form.sourceType"
placeholder=
"请选择来源类型"
>
<el-option
v-for=
"(val,index) in sourceTypeList "
:key=
"index"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"标识描述"
prop=
"version"
>
<el-form-item
label=
"标识ID"
prop=
"mark"
>
<el-input
type=
"textarea"
v-model=
"form.markRemark"
:rows=
5
placeholder=
"请输入标识描述"
></el-input>
<el-input
type=
"text"
v-model=
"form.mark"
placeholder=
"请输入标识ID"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"标识名称"
prop=
"markName"
>
<el-input
type=
"text"
v-model=
"form.markName"
placeholder=
"请输入标识名称"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-if=
"modalTitle=='编辑'"
>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"标识
"
prop=
"version
"
>
<el-form-item
label=
"标识
描述
"
>
<el-input
type=
"text
"
v-model=
"form.mark"
disabled
placeholder=
"请输入标识描述"
></el-input>
<el-input
type=
"text
area"
v-model=
"form.markRemark"
:rows=
5
placeholder=
"请输入标识描述"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelSetAppVersion()"
>
取消
</el-button>
<el-button
@
click=
"cancelSetAppVersion()"
>
取消
</el-button>
<el-button
type=
"primary"
v-if=
"modalTitle=='创建'"
@
click=
"insertAppVersion()"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"modalTitle=='创建'"
@
click=
"insertAppVersion(
'form'
)"
>
确 定
</el-button>
<el-button
type=
"primary"
v-else
@
click=
"updateAppVersion()"
>
确 定
</el-button>
<el-button
type=
"primary"
v-else
@
click=
"updateAppVersion(
'form'
)"
>
确 定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
</div>
</div>
...
@@ -95,13 +110,33 @@
...
@@ -95,13 +110,33 @@
data
()
{
data
()
{
return
{
return
{
fileList
:
[],
fileList
:
[],
sourceTypeList
:
[{
id
:
1
,
name
:
"苹果应用市场"
},
{
id
:
2
,
name
:
"Android应用市场"
},
{
id
:
3
,
name
:
"广告投放"
},
{
id
:
4
,
name
:
"SEO"
},
{
id
:
5
,
name
:
"产品功能引流"
},
{
id
:
6
,
name
:
"小程序"
}],
multipleb
:
false
,
multipleb
:
false
,
BASE_API
:
process
.
env
.
BASE_API
,
BASE_API
:
process
.
env
.
BASE_API
,
form
:
{
form
:
{
id
:
undefined
,
id
:
undefined
,
markRemark
:
''
,
markRemark
:
''
,
markName
:
''
,
markName
:
''
,
mark
:
''
mark
:
''
,
sourceType
:
undefined
},
rules
:
{
sourceType
:
{
type
:
'number'
,
required
:
true
,
message
:
'请选择来源类型'
,
trigger
:
'blur'
},
mark
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入标识ID'
,
},
markName
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入标识名称'
},
},
},
versionPopup
:
false
,
versionPopup
:
false
,
modalTitle
:
'创建'
,
modalTitle
:
'创建'
,
...
@@ -182,6 +217,7 @@
...
@@ -182,6 +217,7 @@
this
.
form
.
markRemark
=
row
.
markRemark
;
this
.
form
.
markRemark
=
row
.
markRemark
;
this
.
form
.
id
=
row
.
id
;
this
.
form
.
id
=
row
.
id
;
this
.
form
.
mark
=
row
.
mark
;
this
.
form
.
mark
=
row
.
mark
;
this
.
form
.
sourceType
=
parseInt
(
row
.
sourceType
);
},
},
/**
/**
* 点击 X 关闭对话框的回调
* 点击 X 关闭对话框的回调
...
@@ -200,56 +236,68 @@
...
@@ -200,56 +236,68 @@
/**
/**
* 添加
* 添加
*/
*/
insertAppVersion
()
{
insertAppVersion
(
formName
)
{
appMarkVersionAdd
(
this
.
form
).
then
(
res
=>
{
const
set
=
this
.
$refs
;
if
(
res
.
status
===
200
)
{
set
[
formName
].
validate
(
valid
=>
{
this
.
$notify
({
if
(
valid
)
{
title
:
'成功'
,
appMarkVersionAdd
(
this
.
form
).
then
(
res
=>
{
message
:
'添加成功'
,
if
(
res
.
status
===
200
)
{
type
:
'success'
,
this
.
$notify
({
duration
:
2000
title
:
'成功'
,
});
message
:
'添加成功'
,
this
.
template
();
type
:
'success'
,
this
.
getList
();
duration
:
2000
}
else
{
});
this
.
$notify
({
this
.
template
();
title
:
'失败'
,
this
.
getList
();
message
:
'添加失败!'
,
}
else
{
type
:
'error'
,
this
.
$notify
({
duration
:
2000
title
:
'失败'
,
});
message
:
res
.
message
,
type
:
'error'
,
duration
:
2000
});
}
this
.
versionPopup
=
false
;
})
}
}
this
.
versionPopup
=
false
;
});
})
},
},
/**
/**
* 编辑、删除
* 编辑、删除
*/
*/
updateAppVersion
()
{
updateAppVersion
(
formName
)
{
let
params
=
{
const
set
=
this
.
$refs
;
id
:
this
.
form
.
id
,
set
[
formName
].
validate
(
valid
=>
{
markName
:
this
.
form
.
markName
,
if
(
valid
)
{
markRemark
:
this
.
form
.
markRemark
,
let
params
=
{
changeMark
:
1
,
//1:修改2:删除
id
:
this
.
form
.
id
,
};
mark
:
this
.
form
.
mark
,
appMarkVersionUpdate
(
params
).
then
(
res
=>
{
markName
:
this
.
form
.
markName
,
if
(
res
.
status
===
200
)
{
markRemark
:
this
.
form
.
markRemark
,
this
.
$notify
({
changeMark
:
1
,
//1:修改2:删除
title
:
'成功'
,
sourceType
:
this
.
form
.
sourceType
message
:
'修改成功'
,
};
type
:
'success'
,
appMarkVersionUpdate
(
params
).
then
(
res
=>
{
duration
:
2000
if
(
res
.
status
===
200
)
{
});
this
.
$notify
({
this
.
getList
();
title
:
'成功'
,
}
else
{
message
:
'修改成功'
,
this
.
$notify
({
type
:
'success'
,
title
:
'失败'
,
duration
:
2000
message
:
'修改失败!'
,
});
type
:
'error'
,
this
.
getList
();
duration
:
2000
}
else
{
});
this
.
$notify
({
title
:
'失败'
,
message
:
res
.
message
,
type
:
'error'
,
duration
:
2000
});
}
this
.
versionPopup
=
false
})
}
}
this
.
versionPopup
=
false
})
})
},
},
/**
/**
...
@@ -263,22 +311,27 @@
...
@@ -263,22 +311,27 @@
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
let
params
=
{
let
params
=
{
changeMark
:
2
,
//1:修改2:删除
id
:
row
.
id
,
id
:
row
.
id
,
mark
:
row
.
mark
,
markName
:
row
.
markName
,
markName
:
row
.
markName
,
markRemark
:
row
.
markRemark
,
markRemark
:
row
.
markRemark
,
changeMark
:
2
,
//1:修改2:删除
sourceType
:
row
.
sourceType
};
};
appMarkVersionUpdate
(
params
).
then
(
res
=>
{
appMarkVersionUpdate
(
params
).
then
(
res
=>
{
if
(
res
.
status
==
200
)
{
if
(
res
.
status
==
200
)
{
this
.
$notify
.
success
({
this
.
$notify
.
success
({
title
:
'删除成功'
,
title
:
'成功'
,
message
:
`success`
type
:
'success'
,
message
:
`删除成功`
})
})
}
else
{
}
else
{
this
.
$notify
.
warning
({
this
.
$notify
({
title
:
'删除失败'
,
title
:
'失败'
,
message
:
`failed`
message
:
res
.
message
,
})
type
:
'error'
,
duration
:
2000
});
}
}
this
.
getList
();
this
.
getList
();
})
})
...
@@ -290,6 +343,7 @@
...
@@ -290,6 +343,7 @@
mark
:
undefined
,
mark
:
undefined
,
markRemark
:
''
,
markRemark
:
''
,
markName
:
''
,
markName
:
''
,
sourceType
:
undefined
};
};
}
}
}
}
...
...
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