Commit 799f1bd9 authored by Mac's avatar Mac

投稿的管理端页面

parent be5bae00
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
</script> </script>
<style> <style>
@import url("//at.alicdn.com/t/font_2077629_2mw9x18p9pv.css"); @import url("//at.alicdn.com/t/font_2077629_s9ukbvw57rq.css");
.q-scrollarea__thumb { .q-scrollarea__thumb {
z-index: 999999 !important; z-index: 999999 !important;
} }
......
...@@ -79,7 +79,7 @@ export function getContributeInfo(data) { ...@@ -79,7 +79,7 @@ export function getContributeInfo(data) {
}) })
} }
// 推送 // 管理端发布投稿
export function setContributeInfoPublish(data) { export function setContributeInfoPublish(data) {
return request({ return request({
url: '/QYContribute/SetContributeInfoPublish', url: '/QYContribute/SetContributeInfoPublish',
...@@ -94,4 +94,23 @@ export function getContributeAppletList(data) { ...@@ -94,4 +94,23 @@ export function getContributeAppletList(data) {
method: 'post', method: 'post',
data data
}) })
} }
\ No newline at end of file
// 获取管理端投稿发布列表
export function getContributeInfoAuditedPageList(data) {
return request({
url: '/QYContribute/GetContributeInfoAuditedPageList',
method: 'post',
data
})
}
// 管理端修改投稿
export function setAdminContributeInfo(data) {
return request({
url: '/QYContribute/SetAdminContributeInfo',
method: 'post',
data
})
}
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
} }
</style> </style>
<template> <template>
<div class="addimageText" v-if="ishowloading"> <div class="addimageText">
<!-- <div class="box_l" style="display:none;"> <!-- <div class="box_l" style="display:none;">
<div class="box_l_center"> <div class="box_l_center">
<div class="appmsg_account"> <div class="appmsg_account">
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<q-btn push label="视频" @click="getChoice(3),iscover=false" /> <q-btn push label="视频" @click="getChoice(3),iscover=false" />
<q-btn push label="音频" @click="getChoice(2),iscover=false" /> <q-btn push label="音频" @click="getChoice(2),iscover=false" />
<!-- <q-btn push label="超链接" @click="hyperlinks" /> --> <!-- <q-btn push label="超链接" @click="hyperlinks" /> -->
<q-btn push label="小程序" @click="getapplet"/> <q-btn push label="小程序" @click="getapplet" />
</q-btn-group> </q-btn-group>
</div> </div>
<q-input clearable filled v-model="addMsg.Title" label="标题" maxlength="64" counter <q-input clearable filled v-model="addMsg.Title" label="标题" maxlength="64" counter
...@@ -121,8 +121,8 @@ ...@@ -121,8 +121,8 @@
</div> </div>
<!-- 音频 --> <!-- 音频 -->
<div v-if="addMsg.Type == 4"> <div v-if="addMsg.Type == 4">
<q-input clearable filled v-model="addMsg.Description" label="可以输入140字以内的推荐语(选填)" maxlength="140" counter <q-input clearable filled v-model="addMsg.Description" label="可以输入140字以内的推荐语(选填)" maxlength="140"
type="textarea" bottom-slots style="width: 100%;" /> counter type="textarea" bottom-slots style="width: 100%;" />
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<audio :src="audiourl" controls="controls"></audio> <audio :src="audiourl" controls="controls"></audio>
<q-btn color="accent" class="q-mr-md" label="替换素材" @click="getChoice(2),iscover=true" size="sm" <q-btn color="accent" class="q-mr-md" label="替换素材" @click="getChoice(2),iscover=true" size="sm"
...@@ -136,10 +136,12 @@ ...@@ -136,10 +136,12 @@
counter type="textarea" bottom-slots style="width: 100%;" /> counter type="textarea" bottom-slots style="width: 100%;" />
<div style="display: flex;flex-wrap: wrap;width: 100%;border-bottom: 1px solid #d7d7d7;"> <div style="display: flex;flex-wrap: wrap;width: 100%;border-bottom: 1px solid #d7d7d7;">
<draggable v-model="imgsList" style="display: flex;flex-wrap: wrap;width: 100%;"> <draggable v-model="imgsList" style="display: flex;flex-wrap: wrap;width: 100%;">
<div style="width: 178px;height: 178px;margin: 0 5px 10px;position: relative;cursor: grab" v-for="(x,y) in imgsList" :key='y'> <div style="width: 178px;height: 178px;margin: 0 5px 10px;position: relative;cursor: grab"
v-for="(x,y) in imgsList" :key='y'>
<el-image style="width: 100%; height: 100%" :src="x.ImageUrl" fit="cover"></el-image> <el-image style="width: 100%; height: 100%" :src="x.ImageUrl" fit="cover"></el-image>
<q-icon style="position: absolute;right: 5px;top: 5px;color: #F56C6C;" name="iconfont icon-yiquxiao" size="24px" @click="ClearCarouse(y)"></q-icon> <q-icon style="position: absolute;right: 5px;top: 5px;color: #F56C6C;"
</div> name="iconfont icon-yiquxiao" size="24px" @click="ClearCarouse(y)"></q-icon>
</div>
</draggable> </draggable>
<div @click="getChoice(1)" class="cursor-pointer" v-if="imgsList.length<9" <div @click="getChoice(1)" class="cursor-pointer" v-if="imgsList.length<9"
style="width: 178px;height: 178px;margin: 0 5px 10px;border: 1px dashed #d7d7d7;color: #9a9a9a;display: flex;flex-direction: column;align-items: center;justify-content: center;"> style="width: 178px;height: 178px;margin: 0 5px 10px;border: 1px dashed #d7d7d7;color: #9a9a9a;display: flex;flex-direction: column;align-items: center;justify-content: center;">
...@@ -157,15 +159,26 @@ ...@@ -157,15 +159,26 @@
</div> </div>
</div> </div>
<!-- 不是管理端 -->
<div style="margin-top: 20px;"> <div style="margin-top: 20px;" v-if="isManage==false">
<q-btn color="accent" class="q-mr-md" label="暂存" @click="savemove(0)" style="width: 100px;" <q-btn color="accent" class="q-mr-md" label="暂存" @click="savemove(0)" style="width: 100px;"
:loading="loading" /> :loading="loading" />
<q-btn color="accent" class="q-mr-md" label="保存" @click="savemove(1)" style="width: 100px;" <q-btn color="accent" class="q-mr-md" label="提交并审核" @click="savemove(1)" style="width: 120px;"
:loading="loading" /> :loading="loading" />
<q-btn class="q-mr-md" label="返回" @click="goblck()" style="width: 60px;" /> <q-btn class="q-mr-md" label="返回" @click="goblck()" style="width: 60px;" />
<q-btn class="q-mr-md" label="推送" @click="tuisong()" style="width: 60px;" /> <q-btn class="q-mr-md" label="推送" @click="tuisong()" style="width: 60px;" />
</div> </div>
<!-- 是管理端 -->
<div style="margin-top: 20px;" v-if="isManage==true">
<q-btn color="accent" class="q-mr-md" label="保存" @click="savemoveManage(0)" style="width: 100px;"
:loading="loading" />
<q-btn color="accent" class="q-mr-md" label="预览" @click="savemoveManage(1)" style="width: 120px;"
:loading="loading" />
<q-btn color="accent" class="q-mr-md" label="保存并群发" @click="savemoveManage(2)" style="width: 120px;"
:loading="loading" />
<q-btn class="q-mr-md" label="返回" @click="goblck()" style="width: 60px;" />
<!-- <q-btn class="q-mr-md" label="推送" @click="tuisong()" style="width: 60px;" /> -->
</div>
</div> </div>
...@@ -175,7 +188,28 @@ ...@@ -175,7 +188,28 @@
</q-dialog> </q-dialog>
<!-- 选择小程序 --> <!-- 选择小程序 -->
<q-dialog title="选择文件" v-model="getappletChoice" width="650px"> <q-dialog title="选择文件" v-model="getappletChoice" width="650px">
<chooseApplet :type="addMsg.Type" @getresult='getresult' @closeDia="getappletChoice=false"></chooseApplet> <chooseApplet :type="addMsg.Type" @getresult='getresult' @closeDia="getappletChoice=false"></chooseApplet>
</q-dialog>
<q-dialog v-model="releasedialog" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 600px;max-width:900px;">
<q-card-section>
<div class="text-h6">{{IsPreview==1?'预览发布':'保存群发'}}</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="PlatformId" ref="Id"
:options="platTypeList" label="发布平台" :dense="false" emit-value map-options />
<q-input v-if='IsPreview==1' clearable filled v-model="TagId" label="输入微信号" maxlength="30" style="margin-top: 20px;"/>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important"
@click="closeCourseForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="loading"
@click="saveCourse" />
</q-card-actions>
</q-card>
</q-dialog> </q-dialog>
</div> </div>
</template> </template>
...@@ -189,8 +223,12 @@ ...@@ -189,8 +223,12 @@
import { import {
setContributeInfo, setContributeInfo,
getContributeInfo, getContributeInfo,
setContributeInfoPublish setContributeInfoPublish,
setAdminContributeInfo
} from '../../../api/teacher/contribution'; } from '../../../api/teacher/contribution';
import {
GetContributePlatfrom,//获取平台
} from '../../../api/system/wechat';
export default { export default {
meta: { meta: {
title: "新增/修改图文" title: "新增/修改图文"
...@@ -205,7 +243,7 @@ ...@@ -205,7 +243,7 @@
data() { data() {
return { return {
select: 1, select: 1,
ishowloading: true, releasedialog: false,
Name: '', Name: '',
author: '', author: '',
list: [], list: [],
...@@ -217,7 +255,7 @@ ...@@ -217,7 +255,7 @@
importFileUrl2: this.domainManager().UploadFileUrl2, importFileUrl2: this.domainManager().UploadFileUrl2,
// this.domainManager().DomainUrl+'/api/upload/UploadImageTextFileToGZH', // this.domainManager().DomainUrl+'/api/upload/UploadImageTextFileToGZH',
getImgChoice: false, getImgChoice: false,
getappletChoice:false, getappletChoice: false,
type: -1, type: -1,
ContributionType: 1,//进入的类型 ContributionType: 1,//进入的类型
addMsg: { addMsg: {
...@@ -237,6 +275,11 @@ ...@@ -237,6 +275,11 @@
coverimg: '', coverimg: '',
audiourl: '',//音频地址 audiourl: '',//音频地址
imgsList: [],//图片消息的数据 imgsList: [],//图片消息的数据
isManage: false,//是否是管理端
IsPreview: 0,//1预览 2群发 0 只保存投稿 不发送
TagId: '',//预览 =》 微信号(必传); 群发 =》 标签ID
PlatformId: '',//发布的平台
platTypeList: [],//平台列表
} }
}, },
created() { created() {
...@@ -269,10 +312,23 @@ ...@@ -269,10 +312,23 @@
this.type = 1;//音频 这个自定义type 1为图片 this.type = 1;//音频 这个自定义type 1为图片
} }
} }
if (this.$route.query && this.$route.query.isM) {//是否是管理端isM
this.isManage = true;
this.getPlatForm()
}
}, },
mounted() { mounted() {
}, },
methods: { methods: {
//获取已开放平台
getPlatForm() {
GetContributePlatfrom({}).then(res => {
console.log(res, '数据');
if (res.Code == 1) {
this.platTypeList = res.Data;
}
})
},
getdetails() { getdetails() {
getContributeInfo({ ContributeId: this.addMsg.Id }).then(res => { getContributeInfo({ ContributeId: this.addMsg.Id }).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -281,7 +337,7 @@ ...@@ -281,7 +337,7 @@
this.coverimg = res.Data.CoverImagePath this.coverimg = res.Data.CoverImagePath
} else if (this.addMsg.Type == 4) { } else if (this.addMsg.Type == 4) {
this.audiourl = this.addMsg.VideoMediumPath this.audiourl = this.addMsg.VideoMediumPath
}else if(this.addMsg.Type == 5){ } else if (this.addMsg.Type == 5) {
this.imgsList = this.addMsg.ImageList this.imgsList = this.addMsg.ImageList
this.coverimg = res.Data.CoverImagePath this.coverimg = res.Data.CoverImagePath
} }
...@@ -352,7 +408,7 @@ ...@@ -352,7 +408,7 @@
this.getImgChoice = false; this.getImgChoice = false;
} }
}, },
ClearCarouse(index){//删除图片 ClearCarouse(index) {//删除图片
this.imgsList.splice(index, 1); this.imgsList.splice(index, 1);
}, },
successUpload(file) { successUpload(file) {
...@@ -366,13 +422,6 @@ ...@@ -366,13 +422,6 @@
this.$refs.UE_cb.instertImage(data) this.$refs.UE_cb.instertImage(data)
} }
}, },
hyperlinks() {
let data = [{
fileName: '散步看日本「会津若松」',
fileUrl: "http://mp.weixin.qq.com/s?__biz=MzU3OTUwMjg4OQ==&amp;mid=2247489291&amp;idx=1&amp;sn=3c31ecd91398b9ba04baf03451add5bd&amp;chksm=fd64414dca13c85b2e42aa6e8ec071538dccf54edd7d6580fd7f9cfeef67823ce3f6f33e9dd3#rd"
}]
this.$refs.UE_cb.hyperlinks(data)
},
getcontnet(data, length) { getcontnet(data, length) {
if (this.addMsg.Type == 2) { if (this.addMsg.Type == 2) {
this.addMsg.Description = data this.addMsg.Description = data
...@@ -380,18 +429,19 @@ ...@@ -380,18 +429,19 @@
this.addMsg.Content = data this.addMsg.Content = data
} }
}, },
savemove(type) { savemove(type) {//普通的用户保存
this.loading = true this.loading = true
if (this.addMsg.Type == 5) { if (this.addMsg.Type == 5) {
this.addMsg.ImageList = [] this.addMsg.ImageList = []
this.imgsList.forEach(x => { this.imgsList.forEach(x => {
let obj = { let obj = {
Id: x.Id, Id: x.Id,
MediaName:x.MediaName MediaName: x.MediaName
} }
this.addMsg.ImageList.push(obj) this.addMsg.ImageList.push(obj)
}) })
} }
this.addMsg.AuditState = type
// let a = JSON.stringify(this.addMsg.Content) // let a = JSON.stringify(this.addMsg.Content)
// console.log(a) // console.log(a)
...@@ -412,36 +462,121 @@ ...@@ -412,36 +462,121 @@
}) })
}, },
savemoveManage(type) {//管理的保存
if (this.addMsg.Type == 5) {
this.addMsg.ImageList = []
this.imgsList.forEach(x => {
let obj = {
Id: x.Id,
MediaName: x.MediaName
}
this.addMsg.ImageList.push(obj)
})
}
if (type == 0) {
let msg = JSON.parse(JSON.stringify(this.addMsg))
msg.IsPreview = type;
msg.TagId = '';
msg.PlatformId = 0;
this.loading = true
setAdminContributeInfo(msg).then(res => {
this.loading = false
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
// this.goblck()
}
}).catch(() => {
this.loading = false
})
} else {//预览 和 群发
this.releasedialog = true
this.IsPreview = type
}
},
closeCourseForm() {
this.releasedialog = false
},
saveCourse() {
if(this.PlatformId==''){
this.$q.notify({
type: 'negative',
message: `请选择发布平台`,
position: 'top'
})
return
}
if(this.IsPreview == 1 && this.TagId==''){
this.$q.notify({
type: 'negative',
message: `请输入预览的微信号`,
position: 'top'
})
return
}
let msg = JSON.parse(JSON.stringify(this.addMsg))
msg.IsPreview = this.IsPreview;
msg.TagId = this.TagId;
msg.PlatformId = this.PlatformId;
this.loading = true
setAdminContributeInfo(msg).then(res => {
this.loading = false
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
// this.goblck()
this.releasedialog = false
}
}).catch(() => {
this.loading = false
})
},
goblck() {//返回上一个页面 goblck() {//返回上一个页面
this.$router.push({ if (this.isManage == true) {//是管理端的时候返回投稿发布
path: '/teacher/contribution/imageTextlist', this.$router.push({
}); path: '/teacher/contribution/contributemanage',
});
} else {
this.$router.push({
path: '/teacher/contribution/imageTextlist',
});
}
}, },
tuisong(){ tuisong() {
setContributeInfoPublish({ setContributeInfoPublish({
ContributeId:12, ContributeId: 12,
PlatformId:1, PlatformId: 1,
IsPreview:1, IsPreview: 1,
TagId:'goodluck_cattle', TagId: 'goodluck_cattle',
}).then(res => { }).then(res => {
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
}, },
getapplet(){//小程序弹窗 getapplet() {//小程序弹窗
this.getappletChoice = true this.getappletChoice = true
let a = "<mp-miniprogram data-miniprogram-appid=\"wxacd9f8cc3480d29e\" data-miniprogram-path=\"pages\/index\/index\" data-miniprogram-nickname=\"赞羊\" data-miniprogram-avatar=\"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/vDPDsxyFvjJ09nKK5HDicbSibuyWIx8l7S3icxkc0kwtJApsYc1hicVSTxbCakhRAuMLpxGibmxH6MeC4kSibBwl3GSQ\/640?wx_fmt=png&amp;wxfrom=200\" data-miniprogram-title=\"飞哥地方给对方\" data-miniprogram-imageurl=\"http:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/iamUJ3Ot9utFjb5RP6Fr0ECTbQDnicewkS38JbPCsoFZPUzibXuIj6IhaHOPudWSG0ZxldLIj70QtHVSbwrBaP85g\/0?wx_fmt=jpeg\" data-miniprogram-type=\"card\" data-miniprogram-servicetype=\"0\"><\/mp-miniprogram>"
console.log(a)
}, },
getresult(data){//选择小程序的结果 getresult(data) {//选择小程序的结果
console.log(data)
this.getappletChoice = false this.getappletChoice = false
this.$refs.UE_cb.applet(data)
this.$refs.UE_cb.applet(data)
} }
} }
......
<template>
<div class="page-body">
<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 filled
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 />
</template>
<template v-slot:body-cell-CoverImagePath="props">
<q-td :props="props">
<el-image v-if="props.row.Type==1 || props.row.Type==5"
style="width: 200px;height: 100px;padding: 10px 0 ;" :src="props.row.CoverImagePath"
fit="cover"></el-image>
<div v-if="props.row.Type==4"
style="width: 200px;height: 80px;display: flex;align-items: center;justify-content: center;background: #f6f7f8;">
<img src="../../../assets/images/Noticen.png" alt="" style="width: 41px;height: 39px;">
</div>
<div style="width: 200px;min-height: 80px;padding: 5px;background: #f6f7f8;display: inline-block;white-space:pre-wrap"
v-if="props.row.Type==2" v-html="props.row.Description"></div>
</q-td>
</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="iconfont icon-fabu" style="font-weight:400;color: purple" class="q-mr-xs"
label="发布" @click="release(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>
<q-dialog v-model="releasedialog" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 600px;max-width:900px;">
<q-card-section>
<div class="text-h6">投稿发布</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="publishMsg.PlatformId"
ref="Id" :options="platTypeList" label="发布平台" :dense="false" emit-value map-options />
<div style="display: flex;align-items: center;margin: 10px 0 ;">
展示方式:
<q-radio v-model="publishMsg.IsPreview" val="0" label="上传不发布" />
<q-radio v-model="publishMsg.IsPreview" val="1" label="预览" />
<q-radio v-model="publishMsg.IsPreview" val="2" label="群发" />
</div>
<div style="color: red;font-size: 12px;margin: 5px 0 10px;">
<span v-if='publishMsg.IsPreview==0'>注:只上传到公众号平台不发布</span>
<span v-if='publishMsg.IsPreview==1'>注:选择指定的微信号,作用于预览</span>
<span v-if='publishMsg.IsPreview==2'>注:一天只能群发一次,标签不选择的情况,群发所有人</span>
</div>
<q-input v-if='publishMsg.IsPreview==1' clearable filled v-model="publishMsg.TagId" label="输入微信号"
maxlength="30" />
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important"
@click="closeCourseForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important"
:loading="saveCourseLoading" @click="saveCourse" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import {
getContributeInfoTypeEnumList,
getContributeInfoStateEnumList,
getContributeInfoAuditedPageList,
setContributeInfoState,
setContributeInfoPublish
} from '../../../api/teacher/contribution';
import {
GetContributePlatfrom,//获取平台
} from '../../../api/system/wechat';
export default {
meta: {
title: "图文管理"
},
data() {
return {
loading: false,
releasedialog: false,
saveCourseLoading: false,
msg: {
pageIndex: 1,
pageSize: 15,
rowsPerPage: 15,
AuditState: "-1", //审核状态
Type: '-1',//类型
Title: '',//标题
},
TypeList: [],//类型
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'
}
],
TypeList2: [],
platTypeList: [],//平台列表
publishMsg: {
ContributeId: 0,
PlatformId: '',
IsPreview: 0,
TagId: ''
}
}
},
mounted() {
this.getTypeList()
this.getPlatForm()
this.getStateList()
this.getList()
},
methods: {
//获取已开放平台
getPlatForm() {
GetContributePlatfrom({}).then(res => {
console.log(res, '数据');
if (res.Code == 1) {
this.platTypeList = res.Data;
}
})
},
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
getContributeInfoAuditedPageList(this.msg).then(res => {
if (res.Code == 1) {
this.loading = false
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount
}
}).catch(() => {
})
},
release(row) {//发布
this.publishMsg.ContributeId = row.Id;
this.publishMsg.PlatformId = '';
this.publishMsg.IsPreview = '0';
this.publishMsg.TagId = '';
this.releasedialog = true
},
closeCourseForm() {
this.releasedialog = false
},
saveCourse() {//发布投稿
console.log(this.publishMsg)
if (this.publishMsg.PlatformId == '') {
this.$q.notify({
type: 'negative',
message: `请选择发布平台`,
position: 'top'
})
return
}
if(this.publishMsg.IsPreview == 1 && this.publishMsg.TagId==''){
this.$q.notify({
type: 'negative',
message: `请输入预览的微信号`,
position: 'top'
})
return
}
this.saveCourseLoading= true
//推送
setContributeInfoPublish(this.publishMsg).then(res => {
if (res.Code == 1) {
this.saveCourseLoading = false
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
this.getList()
this.releasedialog = false
}
}).catch(() => {
this.saveCourseLoading = false
})
},
goedit(row) {//编辑
this.OpenNewUrl("/teacher/contribution/addimageText", {
type: row.Type,
Id: row.Id,
isM:1,
});
},
goadd(type) {//新增
this.OpenNewUrl("/teacher/contribution/addimageText", {
type: type
});
},
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
...@@ -38,7 +38,11 @@ ...@@ -38,7 +38,11 @@
</template> </template>
<template v-slot:body-cell-CoverImagePath="props"> <template v-slot:body-cell-CoverImagePath="props">
<q-td :props="props"> <q-td :props="props">
<el-image style="width: 200px;height: 100px;padding: 10px 0 ;" :src="props.row.CoverImagePath" fit="cover"></el-image> <el-image v-if="props.row.Type==1 || props.row.Type==5" style="width: 200px;height: 100px;padding: 10px 0 ;" :src="props.row.CoverImagePath" fit="cover"></el-image>
<div v-if="props.row.Type==4" style="width: 200px;height: 80px;display: flex;align-items: center;justify-content: center;background: #f6f7f8;">
<img src="../../../assets/images/Noticen.png" alt="" style="width: 41px;height: 39px;">
</div>
<div style="width: 200px;min-height: 80px;padding: 5px;background: #f6f7f8;display: inline-block;white-space:pre-wrap" v-if="props.row.Type==2" v-html="props.row.Description"></div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
......
...@@ -1233,6 +1233,11 @@ const routes = [{ ...@@ -1233,6 +1233,11 @@ const routes = [{
component: () => component: () =>
import("pages/teacher/contribution/imageTextlist") import("pages/teacher/contribution/imageTextlist")
}, },
{
path: "/teacher/contribution/contributemanage",//投稿审核 管理端审核列表
component: () =>
import("pages/teacher/contribution/contributemanage")
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment