Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea-resources-web
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
张伯涛
tea-resources-web
Commits
6ecb3da5
Commit
6ecb3da5
authored
Mar 26, 2024
by
YuY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大赛描述页面提交
parent
6a2fe6bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
7 deletions
+38
-7
index.vue
src/views/contentManagement/competitionSupport/index.vue
+38
-7
No files found.
src/views/contentManagement/competitionSupport/index.vue
View file @
6ecb3da5
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"大赛时间"
prop=
"contestDate"
:show-overflow-tooltip=
"true"
width=
"200px"
>
<el-table-column
label=
"大赛时间"
prop=
"contestDate"
:show-overflow-tooltip=
"true"
width=
"200px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
contestDate
|
transformDateByFormat
(
'YYYY-MM-DD'
)
}}
</span>
<span>
{{
scope
.
row
.
contestDate
|
transformDateByFormat
(
'YYYY-MM-DD
hh:mm
'
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"文字描述"
prop=
"contestDiscribe"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"文字描述"
prop=
"contestDiscribe"
:show-overflow-tooltip=
"true"
>
...
@@ -79,11 +79,11 @@
...
@@ -79,11 +79,11 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"创建时间"
prop=
"contestDate"
:show-overflow-tooltip=
"true"
width=
"200px"
>
<el-table-column
label=
"创建时间"
prop=
"contestDate"
:show-overflow-tooltip=
"true"
width=
"200px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createDate
|
transformDateByFormat
(
'YYYY-MM-DD'
)
}}
</span>
<span>
{{
scope
.
row
.
createDate
|
transformDateByFormat
(
'YYYY-MM-DD
hh:mm
'
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"
12
0"
label=
"状态"
prop=
"flag"
>
<el-table-column
width=
"
9
0"
label=
"状态"
prop=
"flag"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-switch
<el-switch
v-model=
"scope.row.flag"
v-model=
"scope.row.flag"
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
/>
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"1
0
0px"
>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"1
3
0px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
:class=
"commonField.updateClass"
:class=
"commonField.updateClass"
...
@@ -138,13 +138,22 @@
...
@@ -138,13 +138,22 @@
placeholder=
"请输入大赛描述"
></el-input>
placeholder=
"请输入大赛描述"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"封面:"
>
<el-form-item
label=
"封面:"
>
<!-- <el-upload-->
<!-- class="avatar-uploader"-->
<!-- :action="fileUpload"-->
<!-- :show-file-list="false"-->
<!-- :on-success="handleAvatarSuccess"-->
<!-- :before-upload="beforeAvatarUpload"-->
<!-- >-->
<!-- <img v-if="form.url" :src="form.url" style="height: 200px;width: 200px">-->
<!-- <i v-else class="el-icon-plus avatar-uploader-icon" />-->
<!-- </el-upload>-->
<el-upload
<el-upload
class=
"avatar-uploader"
class=
"avatar-uploader"
:action=
"fileUpload"
:action=
"fileUpload"
:show-file-list=
"false"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
:before-upload=
"beforeAvatarUpload"
v-model
.
trim=
"form.contestPicture"
>
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
style=
"height: 200px;width: 200px"
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
style=
"height: 200px;width: 200px"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
/>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
/>
...
@@ -202,6 +211,8 @@ export default {
...
@@ -202,6 +211,8 @@ export default {
}
}
],
],
fileUpload
:
'/dev-api/common/fileUpload?file='
+
this
.
file
+
'&temp='
+
'temp'
,
fileUpload
:
'/dev-api/common/fileUpload?file='
+
this
.
file
+
'&temp='
+
'temp'
,
// imagePath: 'http://49.232.167.247:20020/eduServer/',
imagePath
:
'http://192.168.1.12:8888/eduServer/'
,
imageUrl
:
''
,
imageUrl
:
''
,
// 日期范围
// 日期范围
dateRange
:
[],
dateRange
:
[],
...
@@ -241,6 +252,7 @@ export default {
...
@@ -241,6 +252,7 @@ export default {
response
=>
{
response
=>
{
this
.
cmsContestList
=
response
.
rows
this
.
cmsContestList
=
response
.
rows
this
.
total
=
response
.
total
this
.
total
=
response
.
total
// this.imageUrl = this.imagePath + res.data.url
this
.
loading
=
false
this
.
loading
=
false
}
}
)
)
...
@@ -397,11 +409,22 @@ export default {
...
@@ -397,11 +409,22 @@ export default {
},
},
handleAvatarSuccess
(
res
,
file
)
{
handleAvatarSuccess
(
res
,
file
)
{
console
.
log
(
'res'
,
res
)
console
.
log
(
'res'
,
res
)
//
this.imageUrl = URL.createObjectURL(file.raw)
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
)
this
.
imageU
rl
=
res
.
data
.
url
// this.form.u
rl = res.data.url
this
.
form
.
contestPicture
=
res
.
data
.
businessId
this
.
form
.
contestPicture
=
res
.
data
.
businessId
},
},
beforeAvatarUpload
(
file
)
{
beforeAvatarUpload
(
file
)
{
// 判断文件是否为图片类型
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'只能上传图片格式的文件!'
)
return
false
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传图片大小不能超过 2MB!'
)
return
false
}
this
.
file
=
file
this
.
file
=
file
}
}
}
}
...
@@ -412,6 +435,14 @@ export default {
...
@@ -412,6 +435,14 @@ export default {
font-size
:
18px
;
font-size
:
18px
;
padding
:
0
;
padding
:
0
;
::v-deep
.el-table
th
.cell
{
justify-content
:
center
!
important
;
}
::v-deep
.el-table
td
.cell
{
margin
:
10px
;
text-align
:
center
!
important
;
}
.placeholder
{
.placeholder
{
height
:
1
.3vh
;
height
:
1
.3vh
;
background-color
:
#F4F4F4
;
background-color
:
#F4F4F4
;
...
...
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