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
a20a2160
Commit
a20a2160
authored
Dec 13, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify'
parents
8dd834c4
ae70a2d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
601 additions
and
528 deletions
+601
-528
index.vue
src/views/appManagement/selectedActivities/index.vue
+162
-128
bannerSetting.vue
src/views/baseInfo/bannerSetting.vue
+436
-397
awardSet.vue
src/views/conference/award/awardSet.vue
+3
-3
No files found.
src/views/appManagement/selectedActivities/index.vue
View file @
a20a2160
<
template
>
<
template
>
<div
class=
"app-container calendar-list-container"
v-loading
.
body=
"showLoadingBody"
>
<div
class=
"app-container calendar-list-container"
v-loading
.
body=
"showLoadingBody"
>
<div
class=
"filter-container"
ref=
"filter-container"
>
<div
class=
"filter-container"
ref=
"filter-container"
>
<el-form
ref=
"queryForm"
:inline=
"inline"
:model=
"listQuery"
label-width=
"60px"
>
<el-form
ref=
"queryForm"
:inline=
"inline"
:model=
"listQuery"
label-width=
"60px"
>
<el-row>
<el-row>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"描述"
>
<el-form-item
label=
"描述"
>
<el-input
v-model
.
number=
"listQuery.activitiesName"
placeholder=
"请输入描述"
></el-input>
<el-input
v-model
.
number=
"listQuery.activitiesName"
placeholder=
"请输入描述"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
style=
"float: right;"
@
click=
"handleCreate"
>
+ 添加弹窗
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
style=
"float: right;"
@
click=
"handleCreate"
>
+ 添加弹窗
</el-button>
</el-row>
</el-row>
</el-form>
</el-form>
</div>
</div>
<el-table
:key=
'tableKey'
:data=
"list"
border
fit
highlight-current-row
<el-table
:key=
'tableKey'
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
>
style=
"width: 100%"
>
...
@@ -24,11 +24,21 @@
...
@@ -24,11 +24,21 @@
<span>
{{
scope
.
row
.
name
}}
</span>
<span>
{{
scope
.
row
.
name
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"300"
align=
"center"
label=
"跳转链接"
>
<el-table-column
width=
"300"
align=
"center"
label=
"
安卓
跳转链接"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
url
}}
</span>
<span>
{{
scope
.
row
.
url
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"300"
align=
"center"
label=
"苹果跳转链接"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
iosUrl
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"300"
align=
"center"
label=
"小程序跳转链接"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
purl
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"300"
align=
"center"
label=
"banner图片"
>
<el-table-column
width=
"300"
align=
"center"
label=
"banner图片"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<img
:src=
"scope.row.picture"
style=
"width:100%;max-height:100px;"
>
<img
:src=
"scope.row.picture"
style=
"width:100%;max-height:100px;"
>
...
@@ -45,17 +55,25 @@
...
@@ -45,17 +55,25 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"状态"
>
<el-table-column
align=
"center"
label=
"状态"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span
v-if=
"scope.row.status==1"
>
上架
</span>
<span
v-if=
"scope.row.status==1"
>
上架
</span>
<span
v-if=
"scope.row.status==2"
>
下架
</span>
<span
v-if=
"scope.row.status==2"
>
下架
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
width=
"150"
label=
"操作"
fixed=
"right"
>
<el-table-column
align=
"center"
width=
"150"
label=
"操作"
fixed=
"right"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
编辑
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleDown(scope.row)"
v-show=
"scope.row.status==1"
>
下架
</el-button>
编辑
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUp(scope.row)"
v-show=
"scope.row.status==2"
>
上架
</el-button>
</el-button>
<el-button
class=
"el-button el-button--text el-button--small"
size=
"small"
@
click=
"deleteHandler(scope.row)"
style=
"color:red;"
v-show=
"scope.row.status==2"
>
删除
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleDown(scope.row)"
v-show=
"scope.row.status==1"
>
下架
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUp(scope.row)"
v-show=
"scope.row.status==2"
>
上架
</el-button>
<el-button
class=
"el-button el-button--text el-button--small"
size=
"small"
@
click=
"deleteHandler(scope.row)"
style=
"color:red;"
v-show=
"scope.row.status==2"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -70,19 +88,23 @@
...
@@ -70,19 +88,23 @@
<el-form-item
label=
"描述"
prop=
"name"
>
<el-form-item
label=
"描述"
prop=
"name"
>
<el-input
v-model=
"form.name"
placeholder=
"请输入描述"
></el-input>
<el-input
v-model=
"form.name"
placeholder=
"请输入描述"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"上架时间"
>
<el-form-item
label=
"上架时间"
>
<el-radio-group
v-model=
"form.up_name"
size=
"medium"
>
<el-radio-group
v-model=
"form.up_name"
size=
"medium"
>
<el-radio-button
label=
"不限"
></el-radio-button>
<el-radio-button
label=
"不限"
></el-radio-button>
<el-radio-button
label=
"自定义"
></el-radio-button>
<el-radio-button
label=
"自定义"
></el-radio-button>
</el-radio-group>
</el-radio-group>
<div
style=
"display:inline-block"
v-show=
"form.up_name=='自定义'"
>
<div
style=
"display:inline-block"
v-show=
"form.up_name=='自定义'"
>
<el-date-picker
v-model=
"form.starTimeStr"
type =
"datetime"
placeholder =
"开始时间"
value-format=
" yyyy-MM-dd HH:mm"
format=
"yyyy-MM-dd HH:mm"
:picker-options=
"pickerOptionsStart"
></el-date-picker>
<el-date-picker
v-model=
"form.starTimeStr"
type=
"datetime"
placeholder=
"开始时间"
<span>
-
</span>
value-format=
" yyyy-MM-dd HH:mm"
format=
"yyyy-MM-dd HH:mm"
<el-date-picker
v-model=
"form.endTimeStr"
type =
"datetime"
placeholder =
"结束时间"
value-format=
" yyyy-MM-dd HH:mm"
format=
"yyyy-MM-dd HH:mm"
:picker-options=
"pickerOptionsEnd"
></el-date-picker>
:picker-options=
"pickerOptionsStart"
></el-date-picker>
</div>
<span>
-
</span>
<el-date-picker
v-model=
"form.endTimeStr"
type=
"datetime"
placeholder=
"结束时间"
value-format=
" yyyy-MM-dd HH:mm"
format=
"yyyy-MM-dd HH:mm"
:picker-options=
"pickerOptionsEnd"
></el-date-picker>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"sort"
>
<el-form-item
label=
"排序"
prop=
"sort"
>
<el-input
v-model=
"form.sort"
placeholder=
"请输入排序"
></el-input>
<el-input
v-model=
"form.sort"
placeholder=
"请输入排序"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"图片"
prop=
"picture"
:style=
"{display:'block'}"
>
<el-form-item
label=
"图片"
prop=
"picture"
:style=
"{display:'block'}"
>
<el-upload
<el-upload
...
@@ -91,13 +113,21 @@
...
@@ -91,13 +113,21 @@
:show-file-list=
"false"
:show-file-list=
"false"
:headers=
"getHeaderWithToken"
:headers=
"getHeaderWithToken"
:on-success=
"handleAvatarSuccess"
>
:on-success=
"handleAvatarSuccess"
>
<img
v-if=
"$utils.isString(form.picture) && !$utils.isEmpty(form.picture)"
:src=
"form.picture"
style=
"width:200px;max-height:200px;"
>
<img
v-if=
"$utils.isString(form.picture) && !$utils.isEmpty(form.picture)"
:src=
"form.picture"
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:100px;height: 100px;vertical-align: middle;"
></i>
style=
"width:200px;max-height:200px;"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:100px;height: 100px;vertical-align: middle;"
></i>
</el-upload>
</el-upload>
</el-form-item>
</el-form-item>
<el-form-item
label=
"跳转链接"
prop=
"url"
>
<el-form-item
label=
"
安卓
跳转链接"
prop=
"url"
>
<el-input
v-model=
"form.url"
placeholder=
"请输入跳转链接"
></el-input>
<el-input
v-model=
"form.url"
placeholder=
"请输入跳转链接"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"苹果跳转链接"
prop=
"url"
>
<el-input
v-model=
"form.iosUrl"
placeholder=
"请输入跳转链接"
></el-input>
</el-form-item>
<el-form-item
label=
"小程序跳转链接"
prop=
"url"
>
<el-input
v-model=
"form.purl"
placeholder=
"请输入跳转链接"
></el-input>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelHandel"
>
取 消
</el-button>
<el-button
@
click=
"cancelHandel"
>
取 消
</el-button>
...
@@ -152,19 +182,21 @@
...
@@ -152,19 +182,21 @@
},
},
data
()
{
data
()
{
return
{
return
{
tableKey
:
0
,
tableKey
:
0
,
modalTitle
:
"创建"
,
modalTitle
:
"创建"
,
BASE_API
:
process
.
env
.
BASE_API
,
BASE_API
:
process
.
env
.
BASE_API
,
bannerDialogVisible
:
false
,
//添加、编辑弹框
bannerDialogVisible
:
false
,
//添加、编辑弹框
showLoadingBody
:
false
,
showLoadingBody
:
false
,
form
:
{
form
:
{
name
:
""
,
name
:
""
,
up_name
:
'自定义'
,
up_name
:
'自定义'
,
starTimeStr
:
''
,
starTimeStr
:
''
,
endTimeStr
:
''
,
endTimeStr
:
''
,
sort
:
''
,
sort
:
''
,
picture
:
''
,
picture
:
''
,
url
:
''
,
url
:
''
,
iosUrl
:
''
,
purl
:
''
,
},
},
listQuery
:
{
listQuery
:
{
page
:
1
,
page
:
1
,
...
@@ -174,10 +206,10 @@
...
@@ -174,10 +206,10 @@
},
},
rules
:
{
rules
:
{
name
:
{
name
:
{
type
:
'string'
,
type
:
'string'
,
required
:
true
,
required
:
true
,
message
:
'请输入弹窗描述'
,
message
:
'请输入弹窗描述'
,
trigger
:
'blur'
trigger
:
'blur'
},
},
picture
:
{
picture
:
{
type
:
'string'
,
type
:
'string'
,
...
@@ -190,7 +222,7 @@
...
@@ -190,7 +222,7 @@
message
:
'请输入链接'
,
message
:
'请输入链接'
,
trigger
:
'blur'
trigger
:
'blur'
},
},
sort
:{
sort
:
{
required
:
true
,
required
:
true
,
message
:
'请输入排序'
message
:
'请输入排序'
}
}
...
@@ -201,12 +233,12 @@
...
@@ -201,12 +233,12 @@
}
}
},
},
pickerOptionsEnd
:
{
pickerOptionsEnd
:
{
disabledDate
:
time
=>
{
disabledDate
:
time
=>
{
const
beginDateVal
=
new
Date
(
this
.
form
.
starTimeStr
).
getTime
()
const
beginDateVal
=
new
Date
(
this
.
form
.
starTimeStr
).
getTime
()
if
(
beginDateVal
)
{
if
(
beginDateVal
)
{
return
time
.
getTime
()
<
beginDateVal
-
8.64e7
return
time
.
getTime
()
<
beginDateVal
-
8.64e7
}
}
}
}
},
},
list
:
null
,
list
:
null
,
total
:
null
,
total
:
null
,
...
@@ -261,15 +293,15 @@
...
@@ -261,15 +293,15 @@
this
.
cleanForm
();
this
.
cleanForm
();
getObj
(
row
.
id
).
then
(
response
=>
{
getObj
(
row
.
id
).
then
(
response
=>
{
var
item
=
response
.
data
;
var
item
=
response
.
data
;
item
.
up_name
=
item
.
timeType
==
0
?
'不限'
:
item
.
timeType
==
1
?
'自定义'
:
''
;
item
.
up_name
=
item
.
timeType
==
0
?
'不限'
:
item
.
timeType
==
1
?
'自定义'
:
''
;
if
(
item
.
startTime
>
0
&&
item
.
timeType
==
1
)
{
if
(
item
.
startTime
>
0
&&
item
.
timeType
==
1
)
{
item
.
starTimeStr
=
getYMD_hm
(
item
.
startTime
);
item
.
starTimeStr
=
getYMD_hm
(
item
.
startTime
);
}
else
{
}
else
{
item
.
starTimeStr
=
''
;
item
.
starTimeStr
=
''
;
}
}
if
(
item
.
endTime
>
0
&&
item
.
timeType
==
1
)
{
if
(
item
.
endTime
>
0
&&
item
.
timeType
==
1
)
{
item
.
endTimeStr
=
getYMD_hm
(
item
.
endTime
);
item
.
endTimeStr
=
getYMD_hm
(
item
.
endTime
);
}
else
{
}
else
{
item
.
endTimeStr
=
''
;
item
.
endTimeStr
=
''
;
}
}
this
.
form
=
item
;
this
.
form
=
item
;
...
@@ -280,23 +312,23 @@
...
@@ -280,23 +312,23 @@
/**
/**
* 弹框-取消
* 弹框-取消
* */
* */
cancelHandel
(){
cancelHandel
()
{
this
.
cleanForm
();
this
.
cleanForm
();
this
.
bannerDialogVisible
=
false
;
this
.
bannerDialogVisible
=
false
;
},
},
/**
/**
* 清空表单
* 清空表单
* */
* */
cleanForm
()
{
cleanForm
()
{
this
.
form
=
{
this
.
form
=
{
name
:
""
,
name
:
""
,
up_name
:
'自定义'
,
up_name
:
'自定义'
,
starTimeStr
:
''
,
starTimeStr
:
''
,
endTimeStr
:
''
,
endTimeStr
:
''
,
sort
:
''
,
sort
:
''
,
picture
:
''
,
picture
:
''
,
url
:
''
,
url
:
''
,
sort
:
0
,
sort
:
0
,
}
}
},
},
/**
/**
...
@@ -309,7 +341,7 @@
...
@@ -309,7 +341,7 @@
let
listRs
=
undefined
;
let
listRs
=
undefined
;
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
.
list
)
&&
this
.
$utils
.
isInteger
(
response
.
data
.
total
))
{
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
.
list
)
&&
this
.
$utils
.
isInteger
(
response
.
data
.
total
))
{
listRs
=
response
.
data
.
list
;
listRs
=
response
.
data
.
list
;
response
.
data
.
list
.
map
(
function
(
item
)
{
response
.
data
.
list
.
map
(
function
(
item
)
{
item
.
crtTimeStr
=
timestamp2Date
(
item
.
crtTime
);
item
.
crtTimeStr
=
timestamp2Date
(
item
.
crtTime
);
item
.
visible2
=
false
;
item
.
visible2
=
false
;
});
});
...
@@ -328,42 +360,42 @@
...
@@ -328,42 +360,42 @@
const
set
=
this
.
$refs
;
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
that
.
form
.
up_name
==
'自定义'
){
if
(
that
.
form
.
up_name
==
'自定义'
)
{
that
.
form
.
timeType
=
1
;
that
.
form
.
timeType
=
1
;
that
.
form
.
startTime
=
new
Date
(
this
.
form
.
starTimeStr
).
getTime
();
that
.
form
.
startTime
=
new
Date
(
this
.
form
.
starTimeStr
).
getTime
();
that
.
form
.
endTime
=
new
Date
(
this
.
form
.
endTimeStr
).
getTime
();
that
.
form
.
endTime
=
new
Date
(
this
.
form
.
endTimeStr
).
getTime
();
if
(
new
Date
(
this
.
form
.
endTimeStr
).
getTime
()
<
new
Date
(
this
.
form
.
starTimeStr
).
getTime
()){
if
(
new
Date
(
this
.
form
.
endTimeStr
).
getTime
()
<
new
Date
(
this
.
form
.
starTimeStr
).
getTime
())
{
this
.
$notify
({
this
.
$notify
({
title
:
'警告'
,
title
:
'警告'
,
message
:
'结束时间不能小于起始时间'
,
message
:
'结束时间不能小于起始时间'
,
type
:
'warning'
,
type
:
'warning'
,
duration
:
2000
duration
:
2000
});
});
return
false
;
return
false
;
}
}
else
{
that
.
form
.
timeType
=
0
;
}
}
}
else
{
that
.
form
.
status
=
2
;
that
.
form
.
timeType
=
0
;
}
that
.
form
.
status
=
2
;
addObj
(
this
.
form
).
then
(
response
=>
{
addObj
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
if
(
response
.
status
===
200
)
{
this
.
bannerDialogVisible
=
false
;
this
.
bannerDialogVisible
=
false
;
this
.
$notify
({
this
.
$notify
({
title
:
'成功'
,
title
:
'成功'
,
message
:
'创建成功'
,
message
:
'创建成功'
,
type
:
'success'
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
});
this
.
getList
();
this
.
getList
();
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
'失败'
,
title
:
'失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
type
:
'error'
,
duration
:
2000
duration
:
2000
});
});
}
}
});
});
}
else
{
}
else
{
return
false
;
return
false
;
}
}
...
@@ -376,12 +408,13 @@
...
@@ -376,12 +408,13 @@
let
that
=
this
;
let
that
=
this
;
const
set
=
this
.
$refs
;
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
set
[
formName
].
validate
(
valid
=>
{
debugger
if
(
valid
)
{
if
(
valid
)
{
if
(
that
.
form
.
up_name
==
'自定义'
)
{
if
(
that
.
form
.
up_name
==
'自定义'
)
{
that
.
form
.
timeType
=
1
;
that
.
form
.
timeType
=
1
;
that
.
form
.
startTime
=
new
Date
(
this
.
form
.
starTimeStr
).
getTime
();
that
.
form
.
startTime
=
new
Date
(
this
.
form
.
starTimeStr
).
getTime
();
that
.
form
.
endTime
=
new
Date
(
this
.
form
.
endTimeStr
).
getTime
();
that
.
form
.
endTime
=
new
Date
(
this
.
form
.
endTimeStr
).
getTime
();
if
(
new
Date
(
this
.
form
.
endTimeStr
).
getTime
()
<
new
Date
(
this
.
form
.
starTimeStr
).
getTime
())
{
if
(
new
Date
(
this
.
form
.
endTimeStr
).
getTime
()
<
new
Date
(
this
.
form
.
starTimeStr
).
getTime
())
{
this
.
$notify
({
this
.
$notify
({
title
:
'警告'
,
title
:
'警告'
,
message
:
'结束时间不能小于起始时间'
,
message
:
'结束时间不能小于起始时间'
,
...
@@ -390,9 +423,10 @@
...
@@ -390,9 +423,10 @@
});
});
return
false
;
return
false
;
}
}
}
else
{
}
else
{
that
.
form
.
timeType
=
0
;
that
.
form
.
timeType
=
0
;
}
}
debugger
editObj
(
this
.
form
).
then
(
response
=>
{
editObj
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
if
(
response
.
status
===
200
)
{
this
.
bannerDialogVisible
=
false
;
this
.
bannerDialogVisible
=
false
;
...
@@ -417,10 +451,10 @@
...
@@ -417,10 +451,10 @@
}
}
});
});
},
},
/**
/**
* 上架
* 上架
* */
* */
handleUp
(
row
){
handleUp
(
row
)
{
this
.
form
=
{};
this
.
form
=
{};
this
.
form
.
id
=
row
.
id
;
this
.
form
.
id
=
row
.
id
;
this
.
form
.
status
=
1
;
this
.
form
.
status
=
1
;
...
@@ -434,20 +468,20 @@
...
@@ -434,20 +468,20 @@
type
:
'success'
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
});
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
'失败'
,
title
:
'失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
type
:
'error'
,
duration
:
2000
duration
:
2000
});
});
}
}
});
});
},
},
/**
/**
* 下架
* 下架
* */
* */
handleDown
(
row
){
handleDown
(
row
)
{
this
.
form
=
{};
this
.
form
=
{};
this
.
form
.
id
=
row
.
id
;
this
.
form
.
id
=
row
.
id
;
this
.
form
.
status
=
2
;
this
.
form
.
status
=
2
;
...
@@ -461,14 +495,14 @@
...
@@ -461,14 +495,14 @@
type
:
'success'
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
});
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
'失败'
,
title
:
'失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
type
:
'error'
,
duration
:
2000
duration
:
2000
});
});
}
}
});
});
},
},
/**
/**
...
@@ -493,11 +527,11 @@
...
@@ -493,11 +527,11 @@
this
.
form
.
picture
=
res
.
data
;
this
.
form
.
picture
=
res
.
data
;
this
.
showLoadingBody
=
false
;
this
.
showLoadingBody
=
false
;
},
},
/**
/**
* 操作-删除
* 操作-删除
* */
* */
deleteHandler
(
row
)
{
deleteHandler
(
row
)
{
this
.
$confirm
(
'确定删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
...
...
src/views/baseInfo/bannerSetting.vue
View file @
a20a2160
<
template
>
<
template
>
<div
class=
"app-container calendar-list-container"
v-loading
.
body=
"showLoadingBody"
>
<div
class=
"app-container calendar-list-container"
v-loading
.
body=
"showLoadingBody"
>
<div
class=
"filter-container"
ref=
"filter-container"
>
<div
class=
"filter-container"
ref=
"filter-container"
>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
@
click=
"handleCreate"
<el-button
type=
"primary"
icon=
"edit"
>
添加
class=
"filter-item"
</el-button>
style=
"margin-left: 10px;"
</div>
@
click=
"handleCreate"
<el-table
:key=
'tableKey'
:data=
"list"
border
fit
highlight-current-row
type=
"primary"
style=
"width: 100%"
>
icon=
"edit"
<el-table-column
>
添加
</el-button>
type=
"index"
</div>
align=
"center"
label=
"序号"
width=
"98"
>
</el-table-column>
<el-table
:key=
"tableKey"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table-column
width=
"160"
align=
"center"
label=
"标题"
>
<el-table-column
type=
"index"
align=
"center"
label=
"序号"
width=
"98"
></el-table-column>
<template
scope=
"scope"
>
<el-table-column
width=
"160"
align=
"center"
label=
"标题"
>
<span>
{{
scope
.
row
.
title
}}
</span>
<template
scope=
"scope"
>
</
template
>
<span>
{{
scope
.
row
.
title
}}
</span>
</el-table-column>
</
template
>
<el-table-column
width=
"180"
align=
"center"
label=
"类型"
>
</el-table-column>
<
template
scope=
"scope"
>
<el-table-column
width=
"180"
align=
"center"
label=
"类型"
>
<span>
{{
scope
.
row
.
type
==
0
?
"app首页"
:
scope
.
row
.
type
==
1
?
"app旅游页"
:
scope
.
row
.
type
==
2
?
"租车"
:
scope
.
row
.
type
==
3
?
"个人中心"
:
scope
.
row
.
type
==
4
?
"小程序首页"
:
scope
.
row
.
type
==
5
?
'发现'
:
scope
.
row
.
type
}}
</span>
<
template
scope=
"scope"
>
</
template
>
<span>
{{
scope
.
row
.
type
==
0
?
"app首页"
:
scope
.
row
.
type
==
1
?
"app旅游页"
:
scope
.
row
.
type
==
2
?
"租车"
:
scope
.
row
.
type
==
3
?
"个人中心"
:
scope
.
row
.
type
==
4
?
"小程序首页"
:
scope
.
row
.
type
==
5
?
'发现'
:
scope
.
row
.
type
}}
</span>
</el-table-column>
</
template
>
<!--location 1:推荐 2:拍拍 3:短视频 4:问答-->
</el-table-column>
<el-table-column
width=
"100"
align=
"center"
label=
"位置"
>
<!--location 1:推荐 2:拍拍 3:短视频 4:问答-->
<
template
scope=
"scope"
>
<el-table-column
width=
"100"
align=
"center"
label=
"位置"
>
<span>
{{
scope
.
row
.
location
==
0
?
"所有页面"
:
scope
.
row
.
location
==
1
?
"推荐"
:
scope
.
row
.
location
==
2
?
"拍拍"
:
scope
.
row
.
location
==
3
?
"短视频"
:
scope
.
row
.
location
==
4
?
"问答"
:
scope
.
row
.
location
}}
</span>
<
template
scope=
"scope"
>
</
template
>
<span>
{{
scope
.
row
.
location
==
0
?
"所有页面"
:
scope
.
row
.
location
==
1
?
"推荐"
:
scope
.
row
.
location
==
2
?
"拍拍"
:
scope
.
row
.
location
==
3
?
"短视频"
:
scope
.
row
.
location
==
4
?
"问答"
:
scope
.
row
.
location
}}
</span>
</el-table-column>
</
template
>
<el-table-column
width=
"250"
align=
"center"
label=
"banner图"
>
</el-table-column>
<
template
scope=
"scope"
>
<el-table-column
width=
"250"
align=
"center"
label=
"banner图"
>
<img
:src=
"scope.row.cover"
style=
"width:100%;max-height:100px;"
>
<
template
scope=
"scope"
>
</
template
>
<img
:src=
"scope.row.cover"
style=
"width:100%;max-height:100px;"
/>
</el-table-column>
</
template
>
<el-table-column
align=
"center"
label=
"跳转"
>
</el-table-column>
<
template
scope=
"scope"
>
<el-table-column
align=
"center"
label=
"安卓跳转"
>
<span>
{{
scope
.
row
.
url
}}
</span>
<
template
scope=
"scope"
>
</
template
>
<span>
{{
scope
.
row
.
url
}}
</span>
</el-table-column>
</
template
>
<el-table-column
align=
"center"
label=
"ios跳转"
>
</el-table-column>
<
template
scope=
"scope"
>
<el-table-column
align=
"center"
label=
"ios跳转"
>
<span>
{{
scope
.
row
.
iosUrl
}}
</span>
<
template
scope=
"scope"
>
</
template
>
<span>
{{
scope
.
row
.
iosUrl
}}
</span>
</el-table-column>
</
template
>
<el-table-column
align=
"center"
width=
"150"
label=
"操作"
>
</el-table-column>
<
template
scope=
"scope"
>
<el-table-column
align=
"center"
label=
"小程序跳转"
>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
编辑
<
template
scope=
"scope"
>
</el-button>
<span>
{{
scope
.
row
.
appletUrl
}}
</span>
<el-button
class=
"el-button el-button--text el-button--small"
style=
"color:red;"
size=
"small"
@
click=
"deleteHandler(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
width=
"150"
label=
"操作"
>
</el-table>
<
template
scope=
"scope"
>
<div
v-show=
"!listLoading"
class=
"pagination-container"
>
<el-button
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
size=
"small"
:current-page
.
sync=
"listQuery.pageNo"
:page-sizes=
"[10,20,30, 50]"
:page-size=
"listQuery.pageSize"
class=
"el-button el-button--text el-button--small"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
></el-pagination>
@
click=
"handleUpdate(scope.row)"
</div>
>
编辑
</el-button>
<!-- banner modal弹窗 -->
<el-button
<el-dialog
:title=
"modalTitle"
:visible
.
sync=
"bannerDialogVisible"
>
class=
"el-button el-button--text el-button--small"
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
style=
"color:red;"
<el-form-item
label=
"标题"
prop=
"title"
>
size=
"small"
<el-input
v-model=
"form.title"
placeholder=
"请输入标题"
></el-input>
@
click=
"deleteHandler(scope.row)"
</el-form-item>
>
删除
</el-button>
<!--0-app首页,1-app旅游页;2-租车-->
</
template
>
<el-form-item
label=
"类型"
prop=
"type"
>
</el-table-column>
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"0"
>
app首页
</el-radio>
</el-table>
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"1"
>
app旅游页
</el-radio>
<div
v-show=
"!listLoading"
class=
"pagination-container"
>
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"2"
>
租车
</el-radio>
<el-pagination
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"3"
>
个人中心
</el-radio>
@
size-change=
"handleSizeChange"
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"4"
>
小程序首页
</el-radio>
@
current-change=
"handleCurrentChange"
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"5"
>
发现
</el-radio>
:current-page
.
sync=
"listQuery.pageNo"
</el-form-item>
:page-sizes=
"[10,20,30, 50]"
<!--location 1:推荐 2:拍拍 3:短视频 4:问答-->
:page-size=
"listQuery.pageSize"
<el-form-item
label=
"位置"
prop=
"location"
v-if=
"form.type == 5"
>
layout=
"total, sizes, prev, pager, next, jumper"
<el-radio
class=
"radio"
v-model=
"form.location"
label=
"0"
>
所有页面
</el-radio>
:total=
"total"
<el-radio
class=
"radio"
v-model=
"form.location"
label=
"1"
>
推荐
</el-radio>
></el-pagination>
<el-radio
class=
"radio"
v-model=
"form.location"
label=
"2"
>
拍拍
</el-radio>
</div>
<el-radio
class=
"radio"
v-model=
"form.location"
label=
"3"
>
短视频
</el-radio>
<!-- banner modal弹窗 -->
<el-radio
class=
"radio"
v-model=
"form.location"
label=
"4"
>
问答
</el-radio>
<el-dialog
:title=
"modalTitle"
:visible
.
sync=
"bannerDialogVisible"
@
close=
"closePop"
>
</el-form-item>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
<!--BASE_API + -->
<el-form-item
label=
"标题"
prop=
"title"
>
<el-form-item
label=
"banner图"
prop=
"cover"
:style=
"{display:'block'}"
>
<el-input
v-model=
"form.title"
placeholder=
"请输入标题"
></el-input>
<el-upload
</el-form-item>
class=
"avatar-uploader"
<!--0-app首页,1-app旅游页;2-租车-->
:action=
"BASE_API+'/api/universal/file/app/unauth/admin/upload'"
<el-form-item
label=
"类型"
prop=
"type"
>
:show-file-list=
"false"
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"0"
>
app首页
</el-radio>
:headers=
"getHeaderWithToken"
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"1"
>
app旅游页
</el-radio>
:on-success=
"handleAvatarSuccess"
>
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"2"
>
租车
</el-radio>
<img
v-if=
"$utils.isString(form.cover) && !$utils.isEmpty(form.cover)"
:src=
"form.cover"
style=
"width:500px;max-height:300px;"
>
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"3"
>
个人中心
</el-radio>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:500px;height: 100px;"
></i>
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"4"
>
小程序首页
</el-radio>
</el-upload>
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"5"
>
发现
</el-radio>
</el-form-item>
</el-form-item>
<el-form-item>
<!--location 1:推荐 2:拍拍 3:短视频 4:问答-->
建议尺寸:1080*630
<el-form-item
label=
"位置"
prop=
"location"
v-if=
"form.type == 5"
>
</el-form-item>
<el-radio
class=
"radio"
v-model=
"form.location"
label=
"0"
>
所有页面
</el-radio>
<el-form-item
label=
"跳转链接"
>
<el-radio
class=
"radio"
v-model=
"form.location"
label=
"1"
>
推荐
</el-radio>
<el-input
v-model=
"form.url"
placeholder=
"请输入跳转链接"
></el-input>
<el-radio
class=
"radio"
v-model=
"form.location"
label=
"2"
>
拍拍
</el-radio>
</el-form-item>
<el-radio
class=
"radio"
v-model=
"form.location"
label=
"3"
>
短视频
</el-radio>
<el-form-item
label=
"ios跳转链接"
>
<el-radio
class=
"radio"
v-model=
"form.location"
label=
"4"
>
问答
</el-radio>
<el-input
v-model=
"form.iosUrl"
placeholder=
"请输入ios跳转链接"
></el-input>
</el-form-item>
</el-form-item>
<!--BASE_API + -->
</el-form>
<el-form-item
label=
"banner图"
prop=
"cover"
:style=
"{display:'block'}"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-upload
<el-button
@
click=
"cancelHandel"
>
取 消
</el-button>
class=
"avatar-uploader"
<el-button
v-if=
"modalTitle=='创建'"
type=
"primary"
@
click=
"create('form')"
>
确 定
</el-button>
:action=
"BASE_API+'/api/universal/file/app/unauth/admin/upload'"
<el-button
v-else
type=
"primary"
@
click=
"update('form')"
>
确 定
</el-button>
:show-file-list=
"false"
</div>
:headers=
"getHeaderWithToken"
</el-dialog>
:on-success=
"handleAvatarSuccess"
</div>
>
<img
v-if=
"$utils.isString(form.cover) && !$utils.isEmpty(form.cover)"
:src=
"form.cover"
style=
"width:500px;max-height:300px;"
/>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:500px;height: 100px;"
></i>
</el-upload>
</el-form-item>
<el-form-item>
建议尺寸:1080*630
</el-form-item>
<el-form-item
label=
"安卓跳转链接"
prop=
"url"
>
<el-input
v-model=
"form.url"
placeholder=
"请输入跳转链接"
></el-input>
</el-form-item>
<el-form-item
label=
"ios跳转链接"
prop=
"iosUrl"
>
<el-input
v-model=
"form.iosUrl"
placeholder=
"请输入ios跳转链接"
></el-input>
</el-form-item>
<el-form-item
label=
"小程序跳转链接"
prop=
"appletUrl"
>
<el-input
v-model=
"form.appletUrl"
placeholder=
"请输入ios跳转链接"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelHandel"
>
取 消
</el-button>
<el-button
v-if=
"modalTitle=='创建'"
type=
"primary"
@
click=
"create('form')"
>
确 定
</el-button>
<el-button
v-else
type=
"primary"
@
click=
"update('form')"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</template>
</template>
<
script
>
<
script
>
import
'static/css/uploadImg.css'
;
// 引入图片上传组件对话框
import
'static/css/uploadImg.css'
// 引入图片上传组件对话框
import
{
import
{
formatDate
}
from
'utils/dateFormattor'
formatDate
}
from
'utils/dateFormattor'
;
import
{
import
{
toEast8Date
,
toEast8Date
,
deepCopyDate
,
deepCopyDate
,
newEast8Date
,
newEast8Date
,
convertDate2Str
convertDate2Str
}
from
'utils/dateUtils'
;
}
from
'utils/dateUtils'
import
{
import
{
getBannerList
,
editBanner
,
addBanner
,
delBanner
}
from
'api/tourManage'
getBannerList
,
editBanner
,
addBanner
,
delBanner
}
from
'api/tourManage'
;
import
rsCode
from
'../../utils/rsCode'
;
import
rsCode
from
'../../utils/rsCode'
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
import
{
import
{
getToken
}
from
'../../utils/auth'
getToken
}
from
'../../utils/auth'
;
import
Element1
from
"../admin/menu/components/element"
;
import
Element1
from
'../admin/menu/components/element'
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElRow
from
'element-ui/packages/row/src/row'
import
ElCol
from
"element-ui/packages/col/src/col"
;
import
ElCol
from
'element-ui/packages/col/src/col'
import
{
objDeepCopy
}
from
"../../utils"
export
default
{
export
default
{
name
:
'tourManage'
,
name
:
'tourManage'
,
components
:
{
components
:
{
ElCol
,
ElCol
,
ElRow
,
ElRow
,
Element1
Element1
},
},
data
()
{
data
()
{
return
{
return
{
tableKey
:
0
,
tableKey
:
0
,
modalTitle
:
"创建"
,
modalTitle
:
'创建'
,
BASE_API
:
process
.
env
.
BASE_API
,
BASE_API
:
process
.
env
.
BASE_API
,
bannerDialogVisible
:
false
,
//添加、编辑弹框
bannerDialogVisible
:
false
,
//添加、编辑弹框
showLoadingBody
:
false
,
showLoadingBody
:
false
,
form
:
{
form
:
{
title
:
""
,
title
:
''
,
url
:
""
,
url
:
''
,
cover
:
""
,
cover
:
''
,
type
:
"0"
,
type
:
'0'
,
location
:
"0"
,
location
:
'0'
,
iosUrl
:
''
iosUrl
:
''
,
},
appletUrl
:
null
listQuery
:
{
},
pageNo
:
1
,
listQuery
:
{
pageSize
:
20
pageNo
:
1
,
},
pageSize
:
20
rules
:
{
},
title
:
{
rules
:
{
type
:
'string'
,
title
:
{
required
:
true
,
type
:
'string'
,
message
:
'请输入标题'
,
required
:
true
,
trigger
:
'blur'
message
:
'请输入标题'
,
},
trigger
:
'blur'
type
:{
},
type
:
'string'
,
type
:
{
required
:
true
,
type
:
'string'
,
message
:
'请选择banner类型'
,
required
:
true
,
trigger
:
'blur'
message
:
'请选择banner类型'
,
},
trigger
:
'blur'
location
:{
},
type
:
"string"
,
location
:
{
required
:
true
,
type
:
'string'
,
message
:
'请选择位置类型'
,
required
:
true
,
trigger
:
'blur'
message
:
'请选择位置类型'
,
},
trigger
:
'blur'
cover
:
{
},
type
:
'string'
,
cover
:
{
required
:
true
,
type
:
'string'
,
message
:
'请上传图片'
,
required
:
true
,
},
message
:
'请上传图片'
},
}
list
:
null
,
},
total
:
null
,
isRead
:
false
,
listLoading
:
true
,
list
:
null
,
inline
:
true
,
total
:
null
,
banner_btn_edit
:
false
,
//编辑
listLoading
:
true
,
banner_btn_add
:
false
,
//添加
inline
:
true
,
}
banner_btn_edit
:
false
,
//编辑
},
tableInfo
:{},
created
()
{
banner_btn_add
:
false
//添加
this
.
getList
();
}
this
.
banner_btn_edit
=
true
;
//this.elements['tourManage:btn_edit'];
},
this
.
banner_btn_add
=
true
;
//this.elements['tourManage:btn_add'];
created
()
{
},
this
.
getList
()
computed
:
{
this
.
banner_btn_edit
=
true
//this.elements['tourManage:btn_edit'];
...
mapGetters
([
this
.
banner_btn_add
=
true
//this.elements['tourManage:btn_add'];
'elements'
,
},
'belong2Type'
computed
:
{
]),
...
mapGetters
([
'elements'
,
'belong2Type'
]),
getHeaderWithToken
()
{
getHeaderWithToken
()
{
return
{
Authorization
:
getToken
()};
return
{
Authorization
:
getToken
()
}
},
}
},
},
methods
:
{
methods
:
{
handleSizeChange
(
val
)
{
handleSizeChange
(
val
)
{
this
.
listQuery
.
pageSize
=
val
;
this
.
listQuery
.
pageSize
=
val
this
.
getList
();
this
.
getList
()
},
},
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
listQuery
.
pageNo
=
val
;
this
.
listQuery
.
pageNo
=
val
this
.
getList
();
this
.
getList
()
},
},
/**
/**
* 添加
* 添加
* */
* */
handleCreate
()
{
handleCreate
()
{
this
.
cleanForm
();
this
.
cleanForm
()
this
.
modalTitle
=
'创建'
;
this
.
modalTitle
=
'创建'
this
.
bannerDialogVisible
=
true
;
this
.
bannerDialogVisible
=
true
},
},
/**
closePop
()
{
* 操作-编辑
this
.
cleanForm
()
* */
},
handleUpdate
(
row
)
{
/**
this
.
modalTitle
=
'编辑'
;
* 操作-编辑
this
.
cleanForm
();
* */
this
.
form
=
row
;
handleUpdate
(
row
)
{
this
.
bannerDialogVisible
=
true
;
console
.
log
(
objDeepCopy
);
},
/**
this
.
modalTitle
=
'编辑'
* 弹框-取消
this
.
form
=
objDeepCopy
(
row
)
* */
this
.
bannerDialogVisible
=
true
cancelHandel
(){
},
this
.
cleanForm
();
/**
this
.
bannerDialogVisible
=
false
;
* 弹框-取消
},
* */
/**
cancelHandel
()
{
* 清空表单
this
.
cleanForm
()
* */
this
.
bannerDialogVisible
=
false
cleanForm
()
{
},
this
.
form
=
{
/**
title
:
""
,
* 清空表单
cover
:
""
,
* */
url
:
""
,
cleanForm
()
{
type
:
"0"
,
this
.
form
=
{
location
:
"0"
,
title
:
''
,
iosUrl
:
''
cover
:
''
,
}
url
:
''
,
},
type
:
'0'
,
showImgDialog
(
drivingLicensePath
)
{
location
:
'0'
,
this
.
licenceSrcUrl
=
this
.
getDrivingLicenseUrl
(
drivingLicensePath
);
iosUrl
:
''
,
this
.
dialogForm4LicenceVisible
=
true
;
appletUrl
:
null
},
}
/**
},
* 获取banner列表数据
showImgDialog
(
drivingLicensePath
)
{
* */
this
.
licenceSrcUrl
=
this
.
getDrivingLicenseUrl
(
drivingLicensePath
)
getList
()
{
this
.
dialogForm4LicenceVisible
=
true
this
.
listLoading
=
true
;
},
getBannerList
(
this
.
listQuery
).
then
(
response
=>
{
/**
let
totalCountRs
=
undefined
;
* 获取banner列表数据
let
listRs
=
undefined
;
* */
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
.
data
)
&&
this
.
$utils
.
isInteger
(
response
.
data
.
totalCount
))
{
getList
()
{
listRs
=
response
.
data
.
data
;
this
.
listLoading
=
true
response
.
data
.
data
.
map
(
function
(
item
){
getBannerList
(
this
.
listQuery
).
then
(
response
=>
{
item
.
type
=
item
.
type
+
""
;
let
totalCountRs
=
undefined
item
.
location
=
item
.
location
?
item
.
location
+
""
:
"0"
;
let
listRs
=
undefined
item
.
visible2
=
false
;
if
(
});
!
this
.
$utils
.
isEmpty
(
response
.
data
.
data
)
&&
totalCountRs
=
response
.
data
.
totalCount
;
this
.
$utils
.
isInteger
(
response
.
data
.
totalCount
)
}
)
{
this
.
listLoading
=
false
;
listRs
=
response
.
data
.
data
this
.
list
=
listRs
;
response
.
data
.
data
.
map
(
function
(
item
)
{
this
.
total
=
totalCountRs
;
item
.
type
=
item
.
type
+
''
});
item
.
location
=
item
.
location
?
item
.
location
+
''
:
'0'
},
item
.
visible2
=
false
/**
})
* 创建
totalCountRs
=
response
.
data
.
totalCount
* */
}
create
(
formName
)
{
this
.
listLoading
=
false
const
set
=
this
.
$refs
;
this
.
list
=
listRs
set
[
formName
].
validate
(
valid
=>
{
this
.
total
=
totalCountRs
if
(
valid
)
{
})
addBanner
(
this
.
form
)
},
.
then
(
response
=>
{
/**
if
(
response
.
status
===
200
)
{
* 创建
this
.
bannerDialogVisible
=
false
;
* */
this
.
getList
();
create
(
formName
)
{
this
.
$notify
({
const
set
=
this
.
$refs
title
:
'成功'
,
set
[
formName
].
validate
(
valid
=>
{
message
:
'创建成功'
,
if
(
valid
)
{
type
:
'success'
,
addBanner
(
this
.
form
).
then
(
response
=>
{
duration
:
2000
if
(
response
.
status
===
200
)
{
});
this
.
bannerDialogVisible
=
false
}
else
{
this
.
getList
()
this
.
$notify
({
this
.
$notify
({
title
:
'失败'
,
title
:
'成功'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
message
:
'创建成功'
,
type
:
'error'
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
})
}
}
else
{
});
this
.
$notify
({
}
else
{
title
:
'失败'
,
return
false
;
message
:
rsCode
.
msg
[
response
.
code
]
}
?
rsCode
.
msg
[
response
.
code
]
});
:
'操作失败!'
,
},
type
:
'error'
,
/**
duration
:
2000
* 编辑-更新
})
* */
}
update
(
formName
)
{
})
const
set
=
this
.
$refs
;
}
else
{
set
[
formName
].
validate
(
valid
=>
{
return
false
if
(
valid
)
{
}
editBanner
(
this
.
form
).
then
(
response
=>
{
})
if
(
response
.
status
===
200
)
{
},
this
.
bannerDialogVisible
=
false
;
/**
this
.
getList
();
* 编辑-更新
this
.
$notify
({
* */
title
:
'成功'
,
update
(
formName
)
{
message
:
'编辑成功'
,
const
set
=
this
.
$refs
type
:
'success'
,
set
[
formName
].
validate
(
valid
=>
{
duration
:
2000
if
(
valid
)
{
});
editBanner
(
this
.
form
).
then
(
response
=>
{
this
.
getList
();
if
(
response
.
status
===
200
)
{
}
else
{
this
.
bannerDialogVisible
=
false
this
.
$notify
({
this
.
getList
()
title
:
'失败'
,
this
.
$notify
({
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
title
:
'成功'
,
type
:
'error'
,
message
:
'编辑成功'
,
duration
:
2000
type
:
'success'
,
});
duration
:
2000
}
})
});
this
.
getList
()
}
else
{
}
else
{
return
false
;
this
.
$notify
({
}
title
:
'失败'
,
});
message
:
rsCode
.
msg
[
response
.
code
]
},
?
rsCode
.
msg
[
response
.
code
]
/**
:
'操作失败!'
,
* 上传图片
type
:
'error'
,
* @param file
duration
:
2000
* @returns {boolean}
})
*/
}
beforeAvatarUpload
(
file
)
{
})
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/gif'
;
}
else
{
const
isLt2M
=
file
.
size
/
1024
/
1024
<
10
;
return
false
}
})
},
/**
* 上传图片
* @param file
* @returns {boolean}
*/
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/gif'
const
isLt2M
=
file
.
size
/
1024
/
1024
<
10
if
(
!
isJPG
)
{
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'上传图片只能是 JPG/GIF 格式!'
);
this
.
$message
.
error
(
'上传图片只能是 JPG/GIF 格式!'
)
}
}
if
(
!
isLt2M
)
{
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传图片大小不能超过 10MB!'
);
this
.
$message
.
error
(
'上传图片大小不能超过 10MB!'
)
}
}
this
.
showLoadingBody
=
true
;
this
.
showLoadingBody
=
true
return
isJPG
&&
isLt2M
;
return
isJPG
&&
isLt2M
},
},
handleAvatarSuccess
(
res
,
file
)
{
handleAvatarSuccess
(
res
,
file
)
{
this
.
form
.
cover
=
res
.
data
;
this
.
form
.
cover
=
res
.
data
this
.
showLoadingBody
=
false
;
this
.
showLoadingBody
=
false
},
},
/**
/**
* 操作-删除
* 操作-删除
* */
* */
deleteHandler
(
row
)
{
deleteHandler
(
row
)
{
this
.
$confirm
(
'确定删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delBanner
(
row
.
id
).
then
(
response
=>
{
delBanner
(
row
.
id
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
this
.
$notify
({
title
:
'成功'
,
title
:
'成功'
,
message
:
'删除成功'
,
message
:
'删除成功'
,
type
:
'success'
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
})
this
.
getList
();
this
.
getList
()
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
'删除失败'
,
title
:
'删除失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
message
:
rsCode
.
msg
[
response
.
code
]
type
:
'error'
,
?
rsCode
.
msg
[
response
.
code
]
duration
:
2000
:
'操作失败!'
,
});
type
:
'error'
,
}
duration
:
2000
});
})
})
}
},
})
getUrl
(
drivingLicensePath
)
{
})
return
process
.
env
.
BASE_API
+
},
'/vehicle/vehicleInfo/download/drivingLicense?realFileRelPath='
+
encodeURI
(
drivingLicensePath
);
getUrl
(
drivingLicensePath
)
{
},
return
(
}
process
.
env
.
BASE_API
+
}
'/vehicle/vehicleInfo/download/drivingLicense?realFileRelPath='
+
encodeURI
(
drivingLicensePath
)
)
}
}
}
</
script
>
</
script
>
src/views/conference/award/awardSet.vue
View file @
a20a2160
...
@@ -358,9 +358,9 @@ export default {
...
@@ -358,9 +358,9 @@ export default {
}
else
{
}
else
{
if
(
data
.
data
.
localePrize
!=
''
){
if
(
data
.
data
.
localePrize
!=
''
){
data
.
data
.
localePrize
.
forEach
(
element
=>
{
data
.
data
.
localePrize
.
forEach
(
element
=>
{
//
if (!element.goodsId) {
if
(
!
element
.
goodsId
)
{
//
element.goodsId = ''
element
.
goodsId
=
''
//
}
}
// if (!element.totalStock) {
// if (!element.totalStock) {
// element.totalStock = ''
// element.totalStock = ''
// }
// }
...
...
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