提交 acfee2c9 编写于 作者: chendeli's avatar chendeli

话题

上级 f7e49685
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="small" @click="edit(scope.row)">编辑</el-button> <el-button type="primary" v-if="scope.row.status == 3 || scope.row.status == 1" size="small" @click="optFun(scope.row,'发布')">发布</el-button> <el-button type="primary" size="small" @click="edit(scope.row)">编辑</el-button> <el-button type="primary" v-if="scope.row.status == 3 || scope.row.status == 1" size="small" @click="optFun(scope.row,'发布')">发布</el-button>
<el-button type="primary" v-if="scope.row.status == 2" size="small" @click="optFun(scope.row,'下线')">下线</el-button> <el-button type="primary" v-if="scope.row.status == 2" size="small" @click="optFun(scope.row,'下线')">下线</el-button>
<el-button type="primary" size="small" @click="topicManage(scope.row)">话题管理</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -228,6 +229,10 @@ export default { ...@@ -228,6 +229,10 @@ export default {
this.$router.push({path: 'creat-discuss',query:{id:item.id}}) this.$router.push({path: 'creat-discuss',query:{id:item.id}})
}, },
topicManage(item){
},
// 发布、下线 // 发布、下线
optFun(row,str) { optFun(row,str) {
let status = 0; let status = 0;
......
...@@ -44,6 +44,11 @@ export default { ...@@ -44,6 +44,11 @@ export default {
icon: 'el-icon-setting', icon: 'el-icon-setting',
index: 'discuss-list' index: 'discuss-list'
}, },
{
title: '话题管理',
icon: 'el-icon-setting',
index: 'topic-list'
},
] ]
}, },
......
<template>
<el-dialog title="话题" :visible.sync="dialogFormVisible">
<el-form :model="form" class="topicOpt">
<el-form-item label="主题" :label-width="formLabelWidth">
<el-input v-model="form.name" auto-complete="off" clearable size="mini"></el-input>
</el-form-item>
<el-form-item label="内容" :label-width="formLabelWidth">
<el-input type="textarea" v-model="form.name" auto-complete="off" clearable size="mini"></el-input>
</el-form-item>
<el-form-item label="话题配图" :label-width="formLabelWidth">
<el-upload
action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible" size="tiny">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { doUpload, getFilePath } from "../../utils/qiniu-util";
import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
let vm = null;
export default {
data() {
return {
formLabelWidth:"80px",
form:{},
id:null,
dialogImageUrl:'',
dialogVisible:false,
};
},
props:{
isShow:{
default:false,
type:Boolean
}
},
computed: {
...mapGetters(["_token", "idType"])
},
created() {
this.id = this.$route.query.id
if(this.id){
this.getDissById(this.id)
}
this.dialogFormVisible = this.isShow
},
// 挂载到Dom完成时
mounted: function() {
},
methods: {
handlePictureCardPreview(){
},
handleRemove(){
},
//返回
goBack(){
this.$router.back(-1)
},
showError(str){
this.$message({
message: str,
type: 'warning'
});
},
//获取讨论组件详细
getDissById(id){
this.GET('/interaction/discuss/'+id).then((res) => {
// closeLoading(vm)
if( res.code == '000000' ) {
}
})
}
}
};
</script>
<style lang="scss">
.topicOpt{
.el-input__inner,.el-textarea__inner{
width:300px;
}
.el-form-item__label{
// line-height: 26px;
}
}
</style>
\ No newline at end of file
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册