Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖翔宇
/
admin-vue
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
23bdfee2
authored
6 years ago
by
肖翔宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2019-1-4
parent
0b5d291a
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
423 additions
and
9 deletions
+423
-9
config/dev.env.js
+1
-1
dist.zip
+0
-0
src/api/index.js
+3
-1
src/api/sys/contribute.js
+59
-0
src/components/Tinymce/components/editorImage.vue
+2
-1
src/permission.js
+1
-1
src/router/index.js
+13
-0
src/views/bargain/index.vue
+0
-5
src/views/contribute/index.vue
+344
-0
No files found.
config/dev.env.js
View file @
23bdfee2
...
...
@@ -4,7 +4,7 @@ const prodEnv = require('./prod.env')
module
.
exports
=
merge
(
prodEnv
,
{
NODE_ENV
:
'"development"'
,
BASE_API
:
'"http://
gxgqs.com
/sharePiano"'
,
BASE_API
:
'"http://
192.168.0.16:9001
/sharePiano"'
,
})
//http://gxgqs.com/sharePiano
//http://192.168.10.105:9001/sharePiano
This diff is collapsed.
Click to expand it.
dist.zip
View file @
23bdfee2
No preview for this file type
This diff is collapsed.
Click to expand it.
src/api/index.js
View file @
23bdfee2
...
...
@@ -20,6 +20,7 @@ import * as sysBargain from './sys/bargain'
import
*
as
sysBargainStage
from
'./sys/bargainStage'
import
*
as
sysCodeForPaino
from
'./sys/code'
import
*
as
sysCourseDiversity
from
'./sys/courseDiversity'
import
*
as
sysContribute
from
'./sys/contribute'
const
apiObj
=
{
sysDict
,
...
...
@@ -33,7 +34,8 @@ const apiObj = {
sysBargainStage
,
sysCodeForPaino
,
sysCourseDiversity
,
sysPianoSubmit
sysPianoSubmit
,
sysContribute
}
const
install
=
function
(
Vue
)
{
...
...
This diff is collapsed.
Click to expand it.
src/api/sys/contribute.js
0 → 100644
View file @
23bdfee2
import
request
from
'@/utils/request'
// 分页查询
export
function
pageList
(
data
)
{
return
request
({
url
:
'/sys/sysContribute/pageList'
,
method
:
'post'
,
data
:
data
})
}
// 插入
export
function
insert
(
data
)
{
return
request
({
url
:
'/sys/sysContribute/insert'
,
method
:
'post'
,
data
:
data
})
}
// 更新数据
export
function
update
(
data
)
{
return
request
({
url
:
'/sys/sysContribute/update'
,
method
:
'post'
,
data
:
data
})
}
// 查询
export
function
query
(
data
)
{
return
request
({
url
:
'/sys/sysContribute/query'
,
method
:
'post'
,
data
:
data
})
}
// 添加用户
export
function
addUser
(
data
)
{
return
request
({
url
:
'/sys/sysContribute/addUser'
,
method
:
'post'
,
data
:
data
})
}
// 删除数据
export
function
deletes
(
id
,
ids
)
{
const
data
=
{}
if
(
id
)
{
data
[
'id'
]
=
id
}
if
(
ids
)
{
data
[
'ids'
]
=
ids
}
return
request
({
url
:
'/sys/sysContribute/delete'
,
method
:
'post'
,
data
:
data
})
}
This diff is collapsed.
Click to expand it.
src/components/Tinymce/components/editorImage.vue
View file @
23bdfee2
...
...
@@ -62,11 +62,12 @@
this
.
dialogVisible
=
false
},
handleSuccess
(
response
,
file
)
{
console
.
log
(
response
,
file
)
const
uid
=
file
.
uid
const
objKeyArr
=
Object
.
keys
(
this
.
listObj
)
for
(
let
i
=
0
,
len
=
objKeyArr
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
listObj
[
objKeyArr
[
i
]].
uid
===
uid
)
{
this
.
listObj
[
objKeyArr
[
i
]].
url
=
response
.
files
.
file
this
.
listObj
[
objKeyArr
[
i
]].
url
=
response
.
data
this
.
listObj
[
objKeyArr
[
i
]].
hasSuccess
=
true
return
}
...
...
This diff is collapsed.
Click to expand it.
src/permission.js
View file @
23bdfee2
...
...
@@ -5,7 +5,7 @@ import 'nprogress/nprogress.css'// Progress 进度条样式
import
{
Message
}
from
'element-ui'
import
{
getToken
}
from
'@/utils/auth'
// 验权
const
whiteList
=
[
'/login'
,
'/pianoSubmit'
,
'/courseList'
,
'/courseEdit'
,
'/bargainList'
,
'/bargainEdit'
,
'/pianoList'
,
'/pianoEdit'
,
'/code'
]
// 不重定向白名单
const
whiteList
=
[
'/login'
,
'/
contribute'
,
'/
pianoSubmit'
,
'/courseList'
,
'/courseEdit'
,
'/bargainList'
,
'/bargainEdit'
,
'/pianoList'
,
'/pianoEdit'
,
'/code'
]
// 不重定向白名单
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
NProgress
.
start
()
if
(
getToken
())
{
...
...
This diff is collapsed.
Click to expand it.
src/router/index.js
View file @
23bdfee2
...
...
@@ -155,6 +155,19 @@ export const constantRouterMap = [
]
},
{
path
:
''
,
component
:
Layout
,
children
:
[
{
path
:
'/contribute'
,
component
:
()
=>
import
(
'@/views/contribute/index'
),
name
:
'contribute'
,
meta
:
{
title
:
'作品申请'
,
noCache
:
false
}
},
]
},
{
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
}
]
...
...
This diff is collapsed.
Click to expand it.
src/views/bargain/index.vue
View file @
23bdfee2
...
...
@@ -406,11 +406,6 @@
}
this
.
$refs
[
'dataForm'
].
validate
(
valid
=>
{
if
(
valid
)
{
console
.
log
(
this
.
list
[
this
.
currentIndex
].
numberOfParticipants
,
this
.
currentNumber
,
this
.
types
.
totalNumber
)
if
(
this
.
list
[
this
.
currentIndex
].
numberOfParticipants
-
this
.
currentNumber
<
this
.
types
.
totalNumber
){
this
.
$message
(
"人数已达上限"
);
return
;
}
if
(
this
.
list
[
this
.
currentIndex
].
actualAmountAvailable
-
this
.
currentAmount
<
this
.
types
.
totalAmount
){
this
.
$message
(
"金额已达上限"
);
return
;
...
...
This diff is collapsed.
Click to expand it.
src/views/contribute/index.vue
0 → 100644
View file @
23bdfee2
<!-- leaf -->
<
template
>
<div
class=
"app-container"
>
<div
class=
"filter-container"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"刷新"
placement=
"top-start"
:hide-after=
"toolTipTime"
>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
v-waves
@
click=
"refresh"
type=
"success"
icon=
"el-icon-refresh"
size=
"medium"
circle
></el-button>
</el-tooltip>
<modal
@
on-close=
"close()"
:is-show=
'isShow'
>
<el-form
:rules=
"rules"
ref=
"dataForm"
:model=
"temp"
label-position=
"left"
label-width=
"100px"
style=
'width: 350px; margin-left:50px;margin-top:40px;'
>
<el-form-item
label=
"拒绝理由"
prop=
"reason"
>
<el-input
type=
"text"
placeholder=
"请输入拒绝理由"
v-model
.
trim=
"temp.reason"
:maxlength=
"25"
>
</el-input>
</el-form-item>
</el-form>
<el-button
type=
"primary"
@
click=
"handleUnpass"
>
提交
</el-button>
</modal>
</div>
<el-table
:key=
'tableKey'
:data=
"list"
v-loading=
"listLoading"
:element-loading-text=
"elementLoadingText"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table-column
align=
"center"
:label=
"table.userName"
>
<template
slot-scope=
"scope"
>
<span
v-for=
"item in bannerTypes"
:key=
"item.key"
>
{{
scope
.
row
.
userName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
:label=
"table.videoName"
>
<
template
slot-scope=
"scope"
>
<span
v-for=
"item in bannerTypes"
:key=
"item.key"
>
{{
scope
.
row
.
videoName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
:label=
"table.videoName"
>
<
template
slot-scope=
"scope"
>
<video
v-if=
"scope.row.videoAddress"
:src=
"scope.row.videoAddress"
class=
"avatar-video"
controls=
"controls"
>
您的浏览器不支持视频播放
</video
</
template
>
</el-table-column>
<el-table-column
align=
"center"
:label=
"table.state"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
state
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
:label=
"table.reason"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
reason
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
:label=
"table.createTime"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
adress
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.state=='未审核'"
type=
"primary"
size=
"mini"
@
click
.
native
.
prevent=
"handlePass(scope.row)"
round
>
通过
</el-button>
<el-button
v-if=
"scope.row.state=='未审核'"
type=
"danger"
@
click
.
native
.
prevent=
"show(scope.row)"
size=
"mini"
round
>
不通过
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页 -->
<div
class=
"pagination-container"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listQuery.currentPage"
:page-sizes=
"[10, 20, 30, 40,50,100]"
:page-size=
"listQuery.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
import
{
parseTime
}
from
'@/utils'
import
Modal
from
'@/components/Modal'
import
{
upload_url
}
from
'@/common/config'
export
default
{
name
:
'banner'
,
components
:
{
Modal
},
data
()
{
return
{
isShow
:
false
,
index
:
undefined
,
buttonFlag
:
true
,
isShowDiversityEdit
:
false
,
tableKey
:
0
,
// 是否加载
listLoading
:
true
,
// 查询参数
listQuery
:
{
currentPage
:
1
,
pageSize
:
10
,
name
:
undefined
,
code
:
undefined
},
// 表格的数据
list
:
null
,
// 总数量
total
:
null
,
// 表单显示的名称
table
:
{
userName
:
'用户名'
,
videoName
:
'作品名'
,
videoAddress
:
'视频'
,
state
:
'状态'
,
createTime
:
'创建时间'
,
reason
:
'拒绝理由'
},
types
:
{
id
:
undefined
,
courseName
:
undefined
,
},
diversityTemp
:{
id
:
undefined
,
videoName
:
undefined
,
videoAddress
:
undefined
,
sysonlineCourseId
:
undefined
},
// 临时的表单值
temp
:
{
id
:
undefined
,
state
:
undefined
,
userName
:
undefined
,
videoName
:
undefined
,
createTime
:
undefined
,
videoAddress
:
undefined
,
reson
:
undefined
},
uploadUrl
:
upload_url
,
videoFlag
:
false
,
videoUploadPercent
:
0
,
// 表单验证的规则
rules
:
{
reason
:
[
{
required
:
true
,
message
:
'拒绝理由不能为空'
,
trigger
:
'blur'
},
{
type
:
'string'
,
max
:
30
,
message
:
'拒绝理由不允许大于30位数'
,
trigger
:
'blur'
}
]
},
bannerTypes
:
[],
courseTypes
:
[],
courseDiversityTypes
:
[],
diversityId
:
undefined
}
},
created
()
{
// 初始化数据
this
.
getList
()
},
mounted
()
{
this
.
$fetch
.
sysDict
.
optionsChildren
(
'BANNER_TYPE'
).
then
(({
data
})
=>
{
this
.
bannerTypes
=
data
})
},
computed
:
{
// 提示--显示的时间
toolTipTime
()
{
return
this
.
$store
.
getters
.
toolTipTime
},
// 加载显示的文字
elementLoadingText
()
{
return
this
.
$store
.
getters
.
elementLoadingText
},
// 加载显示的文字
displays
()
{
return
this
.
$store
.
getters
.
displays
}
},
methods
:
{
show
(
row
){
const
index
=
this
.
list
.
indexOf
(
row
);
this
.
temp
=
this
.
list
[
index
];
console
.
log
(
this
.
temp
)
this
.
isShow
=
true
;
},
close
(){
this
.
isShow
=
false
;
},
beforeUploadVideo
(
file
)
{
const
isLt10M
=
file
.
size
/
1024
/
1024
<
200
if
([
'video/mp4'
,
'video/ogg'
,
'video/flv'
,
'video/avi'
,
'video/wmv'
,
'video/rmvb'
].
indexOf
(
file
.
type
)
===
-
1
)
{
this
.
$message
.
error
(
'请上传正确的视频格式'
)
return
false
}
if
(
!
isLt10M
)
{
this
.
$message
.
error
(
'上传视频大小不能超过200MB哦!'
)
return
false
}
},
uploadVideoProcess
(
event
,
file
,
fileList
)
{
this
.
videoFlag
=
true
this
.
videoUploadPercent
=
Number
(
file
.
percentage
.
toFixed
(
0
))
},
handleVideoSuccess
(
res
,
file
)
{
// 获取上传图片地址
this
.
videoFlag
=
false
this
.
videoUploadPercent
=
0
if
(
res
.
code
===
200
)
{
this
.
diversityTemp
.
videoAddress
=
res
.
data
console
.
log
(
res
.
data
);
}
else
{
this
.
$message
.
error
(
'视频上传失败,请重新上传!'
)
}
},
handleSuccess
(
response
,
file
)
{
this
.
diversityTemp
.
videoAddress
=
response
.
data
;
console
.
log
(
1
)
},
handleRemove
(
file
)
{
this
.
diversityTemp
.
videoAddress
=
undefined
;
},
getList
()
{
// 初始化数据 开始加载数据
this
.
listLoading
=
true
;
console
.
log
(
this
.
$fetch
.
sysContribute
)
this
.
$fetch
.
sysContribute
.
pageList
(
this
.
listQuery
)
.
then
(({
data
,
total
})
=>
{
// 赋值数据
this
.
list
=
data
;
this
.
total
=
Number
(
total
)
// 数据加载完成
this
.
listLoading
=
false
})
},
// 处理搜索
handleFilter
()
{
this
.
listQuery
.
currentPage
=
1
this
.
getList
()
},
// 处理每页条数
handleSizeChange
(
val
)
{
this
.
listQuery
.
pageSize
=
val
this
.
getList
()
},
// 处理当前页面
handleCurrentChange
(
val
)
{
this
.
listQuery
.
currentPage
=
val
this
.
getList
()
},
// 初始化temp值
resetTemp
()
{
this
.
temp
=
{
id
:
undefined
,
title
:
undefined
,
curriculumType
:
undefined
,
pictureAddress
:
undefined
,
videoAddress
:
undefined
,
createDate
:
undefined
,
cretePerson
:
undefined
,
numberOrder
:
undefined
}
},
// 删除
handleDelete
(
row
)
{
if
(
!
row
.
id
)
{
this
.
$message
(
'请刷新后再试'
)
return
}
this
.
$confirm
(
'此操作将永久删除该记录, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
$fetch
.
sysCourse
.
deletes
(
row
.
id
).
then
(()
=>
{
this
.
$message
({
message
:
'删除成功'
,
type
:
'success'
})
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
list
.
splice
(
index
,
1
)
}).
catch
(
function
(
reason
)
{
console
.
log
(
reason
);
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
})
})
},
refresh
()
{
// 初始化查询参数
this
.
listQuery
=
{
currentPage
:
1
,
pageSize
:
10
}
this
.
tableKey
=
this
.
tableKey
+
1
this
.
getList
()
},
getShowType
(
row
,
dispaly
=
1
)
{
if
(
row
.
display
===
dispaly
)
{
return
{
type
:
'info'
,
label
:
'隐藏'
}
}
return
{
type
:
'success'
,
label
:
'显示'
}
},
handlePass
(
row
){
const
index
=
this
.
list
.
indexOf
(
row
);
const
tempData
=
this
.
list
[
index
];
tempData
.
state
=
1
;
console
.
log
(
tempData
);
this
.
$fetch
.
sysContribute
.
update
(
tempData
).
then
(()
=>
{
this
.
$message
({
message
:
'更新成功'
,
type
:
'success'
})
this
.
refresh
();
})
},
handleUnpass
(
row
){
this
.
temp
.
state
=
2
;
this
.
$fetch
.
sysContribute
.
update
(
this
.
temp
).
then
(()
=>
{
this
.
$message
({
message
:
'更新成功'
,
type
:
'success'
})
this
.
refresh
();
this
.
isShow
=
false
;
})
},
}
}
</
script
>
<
style
scoped
>
.avatar-video
{
width
:
300px
;
height
:
250px
;
display
:
block
;
}
</
style
>
This diff is collapsed.
Click to expand it.
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