Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
d791a8fb
Commit
d791a8fb
authored
Oct 20, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
52862d5f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
411 additions
and
62 deletions
+411
-62
contribution.js
src/api/teacher/contribution.js
+49
-0
index.template.html
src/index.template.html
+1
-1
welcomeList.vue
src/pages/enterprise/welcomeList.vue
+1
-1
ChooseImg.vue
src/pages/teacher/components/ChooseImg.vue
+9
-1
addimageText.vue
src/pages/teacher/contribution/addimageText.vue
+141
-49
imageTextlist.vue
src/pages/teacher/contribution/imageTextlist.vue
+205
-10
routes.js
src/router/routes.js
+5
-0
No files found.
src/api/teacher/contribution.js
View file @
d791a8fb
...
...
@@ -28,4 +28,53 @@ export function delContributeMediumGroup(data) {
method
:
'post'
,
data
})
}
// 获取投稿类型枚举列表
export
function
getContributeInfoTypeEnumList
(
data
)
{
return
request
({
url
:
'/QYContribute/GetContributeInfoTypeEnumList'
,
method
:
'post'
,
data
})
}
// 获取投稿状态枚举列表
export
function
getContributeInfoStateEnumList
(
data
)
{
return
request
({
url
:
'/QYContribute/GetContributeInfoStateEnumList'
,
method
:
'post'
,
data
})
}
// 获取我的投稿分页列表
export
function
getMyContributeInfoPageList
(
data
)
{
return
request
({
url
:
'/QYContribute/GetMyContributeInfoPageList'
,
method
:
'post'
,
data
})
}
// 设置投稿状态
export
function
setContributeInfoState
(
data
)
{
return
request
({
url
:
'/QYContribute/SetContributeInfoState'
,
method
:
'post'
,
data
})
}
// 设置投稿状态
export
function
setContributeInfo
(
data
)
{
return
request
({
url
:
'/QYContribute/SetContributeInfo'
,
method
:
'post'
,
data
})
}
// 获取投稿详情
export
function
getContributeInfo
(
data
)
{
return
request
({
url
:
'/QYContribute/GetContributeInfo'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/index.template.html
View file @
d791a8fb
...
...
@@ -8,7 +8,7 @@
<meta
name=
"format-detection"
content=
"telephone=no"
>
<meta
name=
"msapplication-tap-highlight"
content=
"no"
>
<meta
name=
"viewport"
content=
"user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"
>
<meta
name=
"referrer"
content=
"never"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"128x128"
href=
"icons/favicon-128x128.png"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"96x96"
href=
"icons/favicon-96x96.png"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"32x32"
href=
"icons/favicon-32x32.png"
>
...
...
src/pages/enterprise/welcomeList.vue
View file @
d791a8fb
...
...
@@ -300,7 +300,7 @@
goDetailed
(
row
)
{
//删除
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除
所
此欢迎语?'
,
message
:
'是否确定删除此欢迎语?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
...
...
src/pages/teacher/components/ChooseImg.vue
View file @
d791a8fb
...
...
@@ -218,9 +218,17 @@
PageSelect
(
item
)
{
this
.
emitmsg
=
[];
console
.
log
(
item
,
'item'
);
let
url
=
''
if
(
this
.
type
==
1
){
url
=
item
.
ImageUrl
}
else
if
(
this
.
type
==
2
){
url
=
item
.
Media_Id
}
else
if
(
this
.
type
==
3
){
url
=
item
.
VideoWXPath
}
this
.
emitmsg
.
push
({
selectId
:
item
.
Id
,
url
:
item
.
Path
,
url
:
url
,
Name
:
item
.
MediaName
});
this
.
selectId
=
item
.
Id
;
...
...
src/pages/teacher/contribution/addimageText.vue
View file @
d791a8fb
This diff is collapsed.
Click to expand it.
src/pages/teacher/contribution/imageTextlist.vue
View file @
d791a8fb
<
template
>
<div
class=
"page-body"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增素材"
@
click=
"addimgtext(null)"
/>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"changePage(1)"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.Type"
ref=
"Id"
:options=
"TypeList"
label=
"类型"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"changePage(1)"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.AuditState"
ref=
"Id"
:options=
"StateList"
label=
"状态"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
>
<q-input
@
keyup
.
enter
.
native=
"changePage(1)"
@
clear=
"changePage(1)"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.Title"
label=
"输入标题内容"
maxlength=
"20"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
title=
""
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
图文素材
</div>
<q-space
/>
<q-btn-dropdown
color=
"accent"
size=
"sm"
class=
"q-mr-md"
style=
"float:right;margin-right:0;"
label=
"新增创作"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"goadd(x.Id)"
v-for=
"(x,y) in TypeList2"
:key=
"y"
>
<q-item-section>
<q-item-label>
{{
x
.
Name
}}
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</
template
>
<
template
v-slot:body-cell-CoverImagePath=
"props"
>
<el-image
style=
"width: 200px;height: 100px;padding: 10px 0 ;"
:src=
"props.row.CoverImagePath"
fit=
"cover"
></el-image>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<!--
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-view"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"详情"
@
click=
"viewDetails(props.row)"
/>
-->
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
@
click=
"goedit(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"goDetailed(props.row)"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
</div>
</div>
</template>
<
script
>
import
{
getContributeInfoTypeEnumList
,
getContributeInfoStateEnumList
,
getMyContributeInfoPageList
,
setContributeInfoState
}
from
'../../../api/teacher/contribution'
;
export
default
{
meta
:
{
...
...
@@ -16,25 +74,162 @@
data
()
{
return
{
loading
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
rowsPerPage
:
15
,
Name
:
""
,
//系列名称
AuditState
:
"-1"
,
//审核状态
Type
:
'-1'
,
//类型
Title
:
''
,
//标题
},
TypeList
:
[],
//类型
TypeList2
:
[],
//类型
StateList
:
[],
//状态
data
:
[],
pageCount
:
0
,
columns
:
[{
name
:
'Id'
,
label
:
'Id'
,
field
:
'Id'
,
align
:
'left'
},
{
name
:
'TypeName'
,
field
:
'TypeName'
,
label
:
'类型'
,
align
:
'left'
,
},
{
name
:
'CoverImagePath'
,
field
:
'CoverImagePath'
,
label
:
'封面图'
,
align
:
'left'
},
{
name
:
'Title'
,
field
:
'Title'
,
label
:
'标题'
,
align
:
'left'
},
{
name
:
'AuditStateName'
,
field
:
'AuditStateName'
,
label
:
'审核状态'
,
align
:
'left'
},
{
name
:
'UpdateByName'
,
field
:
'UpdateByName'
,
label
:
'创建者'
,
align
:
'left'
},
{
name
:
'UpdateTime'
,
field
:
'UpdateTime'
,
label
:
'创建时间'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'DeptId'
}
],
}
},
mounted
()
{
this
.
getTypeList
()
this
.
getStateList
()
this
.
getList
()
},
methods
:
{
addimgtext
(){
this
.
$router
.
push
({
path
:
'/teacher/contribution/addimageText'
,
getTypeList
()
{
getContributeInfoTypeEnumList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TypeList2
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
Data
));
this
.
TypeList
=
res
.
Data
;
let
obj
=
{
Name
:
'不限'
,
Id
:
'-1'
,
}
this
.
TypeList
.
unshift
(
obj
)
}
}).
catch
(()
=>
{
})
},
getStateList
()
{
getContributeInfoStateEnumList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
StateList
=
res
.
Data
;
let
obj
=
{
Name
:
'不限'
,
Id
:
'-1'
,
}
this
.
StateList
.
unshift
(
obj
)
}
}).
catch
(()
=>
{
})
},
changePage
(
e
)
{
this
.
msg
.
pageIndex
=
1
this
.
getList
()
},
getList
()
{
this
.
loading
=
true
getMyContributeInfoPageList
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
loading
=
false
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
}
}).
catch
(()
=>
{
})
},
viewDetails
()
{
//详情
},
goDetailed
(
row
)
{
//删除
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除此内容?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
setContributeInfoState
({
ContributeId
:
row
.
Id
,
Type
:
2
}).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
this
.
getList
()
})
}).
onCancel
(()
=>
{
});
}
},
goedit
(
row
){
//编辑
this
.
OpenNewUrl
(
"/teacher/contribution/addimageText"
,
{
type
:
row
.
Type
,
Id
:
row
.
Id
});
},
goadd
(
type
)
{
//新增
this
.
OpenNewUrl
(
"/teacher/contribution/addimageText"
,
{
type
:
type
});
},
}
}
...
...
src/router/routes.js
View file @
d791a8fb
...
...
@@ -1452,6 +1452,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/teacher/contribution/graphicType"
)
},
{
path
:
"/teacher/contribution/addimageText"
,
//投稿设置 新增修改图文
component
:
()
=>
import
(
"pages/teacher/contribution/addimageText"
)
},
{
path
:
"*"
,
component
:
()
=>
...
...
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