You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
16 KiB
1 lines
16 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6fd38161"],{"3cec":function(t,e,a){},"5d68":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"container"},[a("el-form",{attrs:{inline:"",size:"small","label-width":"110px"}},[a("el-form-item",{attrs:{label:"审核状态"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.status,callback:function(e){t.$set(t.tableFrom,"status",e)},expression:"tableFrom.status"}},t._l(t.statusList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{staticStyle:{display:"inline-block"},attrs:{label:"分类名称:"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",placeholder:"请选择"},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.category_id,callback:function(e){t.$set(t.tableFrom,"category_id",e)},expression:"tableFrom.category_id"}},t._l(t.cateSelect,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{staticStyle:{display:"inline-block"},attrs:{label:"话题名称:"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",placeholder:"请选择"},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.topic_id,callback:function(e){t.$set(t.tableFrom,"topic_id",e)},expression:"tableFrom.topic_id"}},t._l(t.topicSelect,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"是否显示"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.is_show,callback:function(e){t.$set(t.tableFrom,"is_show",e)},expression:"tableFrom.is_show"}},[a("el-option",{attrs:{label:"显示",value:"1"}}),t._v(" "),a("el-option",{attrs:{label:"不显示",value:"0"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"作者:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入文章作者"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.username,callback:function(e){t.$set(t.tableFrom,"username",e)},expression:"tableFrom.username"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"关键字:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入文章标题"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1)],1)],1),t._v(" "),t.headeNum.length>0?a("el-tabs",{on:{"tab-click":function(e){return t.getList(1)}},model:{value:t.tableFrom.is_type,callback:function(e){t.$set(t.tableFrom,"is_type",e)},expression:"tableFrom.is_type"}},t._l(t.headeNum,(function(t,e){return a("el-tab-pane",{key:e,attrs:{name:t.type.toString(),label:t.title+"("+t.count+")"}})})),1):t._e()],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{label:"ID",prop:"community_id","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:"标题",prop:"title","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:"作者",prop:"author.nickname","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:1==t.tableFrom.is_type?"图文封面":"视频封面图","min-width":"210"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"demo-image__preview"},t._l(e.row.image,(function(t,e){return a("el-image",{key:e,staticClass:"mr5",attrs:{src:t,"preview-src-list":[t]}})})),1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"推荐级别","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-rate",{attrs:{disabled:"",colors:t.colors},model:{value:e.row.start,callback:function(a){t.$set(e.row,"start",a)},expression:"scope.row.start"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"count_start",label:"点赞数","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"count_reply",label:"评论数","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:"分类","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.category&&e.row.category.cate_name||"暂无"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"话题","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.topic&&e.row.topic.topic_name||""))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"发布时间","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.is_show,callback:function(a){t.$set(e.row,"is_show",a)},expression:"scope.row.is_show"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"状态","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t._f("communityStatus")(e.row.status)))]),t._v(" "),-1==e.row.status?a("span",{staticStyle:{display:"block","font-size":"12px",color:"red"}},[t._v("原因 "+t._s(e.row.refusal))]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onDetail(e.row.community_id)}}},[t._v("详情")]),t._v(" "),0==e.row.status||-2==e.row.status?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onAudit(e.row.community_id)}}},[t._v("审核")]):t._e(),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.community_id)}}},[t._v("编辑星级")]),t._v(" "),1==e.row.status?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onOff(e.row.community_id)}}},[t._v("强制下架")]):t._e(),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onReply(e.row.community_id)}}},[t._v("查看评论")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.community_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),t.dialogVisible?a("el-dialog",{attrs:{title:t.isExamine?"审核":"详情",visible:t.dialogVisible,width:"700px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.ruleForm,rules:t.rules,"label-width":"120px"}},[a("el-form-item",{attrs:{label:1==t.formData.type?"图片:":"短视频封面:"}},t._l(t.formData.image,(function(t,e){return a("div",{key:e,staticStyle:{display:"inline-block",margin:"0 10px 10px 0"}},[a("el-image",{staticStyle:{width:"80px",height:"80px"},attrs:{src:t||"","preview-src-list":[t||""]}})],1)})),0),t._v(" "),2==t.formData.is_type?a("el-form-item",{attrs:{label:"短视频:"}},[a("div",{staticStyle:{margin:"0 10px 10px 0"}},[a("video",{staticStyle:{width:"40%",height:"180px","border-radius":"10px"},attrs:{src:t.formData.video_link,controls:"controls"}},[t._v("\n 您的浏览器不支持 video 标签。\n ")])])]):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"文章内容:"}},[a("div",[t._v(t._s(t.formData.content))])]),t._v(" "),t.formData.topic&&t.formData.topic.topic_name?a("el-form-item",{attrs:{label:"话题:"}},[a("div",[t._v(t._s(t.formData.topic.topic_name))])]):t._e(),t._v(" "),t.formData.relevance&&t.formData.relevance.length>0?a("el-form-item",{attrs:{label:"关联商品:"}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.formData.relevance,size:"small"}},[a("el-table-column",{attrs:{prop:"spu.store_name",label:"商品名称","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品图","min-width":"60"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"demo-image__preview"},[e.row.spu?a("el-image",{staticClass:"mr5",staticStyle:{width:"35px",height:"35px"},attrs:{src:e.row.spu.image,"preview-src-list":[e.row.spu.image]}}):t._e()],1)]}}],null,!1,3192897103)}),t._v(" "),a("el-table-column",{attrs:{prop:"spu.price",label:"售价","min-width":"60"}})],1)],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"作者:"}},[a("span",[t._v(t._s(t.formData.author&&t.formData.author.nickname))])]),t._v(" "),a("el-form-item",{attrs:{label:"作者ID:"}},[a("span",[t._v(t._s(t.formData.author&&t.formData.author.uid))])]),t._v(" "),a("el-form-item",{attrs:{label:"发布时间:"}},[a("span",[t._v(t._s(t.formData.create_time))])]),t._v(" "),t.isExamine||1!=t.formData.status?t._e():a("el-form-item",{attrs:{label:"审核通过时间:"}},[a("span",[t._v(t._s(t.formData.status_time))])]),t._v(" "),t.isExamine?a("el-form-item",{attrs:{label:"审核状态:",prop:"status"}},[a("el-radio-group",{model:{value:t.ruleForm.status,callback:function(e){t.$set(t.ruleForm,"status",e)},expression:"ruleForm.status"}},[a("el-radio",{attrs:{label:1}},[t._v("通过")]),t._v(" "),a("el-radio",{attrs:{label:-1}},[t._v("拒绝")])],1)],1):t._e(),t._v(" "),-1===t.ruleForm.status&&t.isExamine?a("el-form-item",{attrs:{label:"原因",prop:"refusal"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入原因"},model:{value:t.ruleForm.refusal,callback:function(e){t.$set(t.ruleForm,"refusal",e)},expression:"ruleForm.refusal"}})],1):t._e(),t._v(" "),t.isExamine?a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("提交")])],1):t._e()],1)],1)]):t._e()],1)},i=[],o=a("7998"),r={name:"communityTopic",data:function(){return{moren:a("cdfe"),colors:["#99A9BF","#F7BA2A","#FF9900"],isChecked:!1,listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,is_type:"1",status:"",keyword:"",username:"",category_id:"",topic_id:""},statusList:[{label:"审核通过",value:1},{label:"待审核",value:0},{label:"审核未通过",value:-1},{label:"下架",value:-2}],headeNum:[{title:"图文内容",count:18,type:1},{title:"短视频内容",count:30,type:2}],cateSelect:[],topicSelect:[],dialogVisible:!1,loading:!1,isExamine:!1,community_id:"",formData:{},rules:{status:[{required:!0,message:"请选择审核状态",trigger:"change"}],refusal:[{required:!0,message:"请填写拒绝原因",trigger:"blur"}]},ruleForm:{refusal:"",status:1}}},mounted:function(){this.getList(1),this.getCateSelect(),this.getTopicSelect(),this.getHeaderData()},methods:{getCateSelect:function(){var t=this;Object(o["b"])().then((function(e){t.cateSelect=e.data})).catch((function(e){t.$message.error(e.message)}))},getHeaderData:function(){var t=this;Object(o["p"])().then((function(e){t.headeNum=e.data})).catch((function(e){t.$message.error(e.message)}))},getTopicSelect:function(){var t=this;Object(o["u"])().then((function(e){t.topicSelect=e.data})).catch((function(e){t.$message.error(e.message)}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(o["j"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")},onEdit:function(t){var e=this;this.$modalForm(Object(o["x"])(t)).then((function(){return e.getList("")}))},onReply:function(t){this.$router.push({path:"reply",query:{community_id:t}})},onAudit:function(t){var e=this;this.community_id=t,this.dialogVisible=!0,this.isExamine=!0,Object(o["i"])(t).then((function(t){e.formData=t.data})).catch((function(t){var a=t.message;e.$message.error(a)}))},onDetail:function(t){var e=this;this.community_id=t,this.dialogVisible=!0,this.isExamine=!1,Object(o["i"])(t).then((function(t){e.formData=t.data})).catch((function(t){var a=t.message;e.$message.error(a)}))},onOff:function(t){var e=this;this.$modalForm(Object(o["k"])(t)).then((function(){return e.getList("")}))},onSubmit:function(){var t=this;Object(o["a"])(this.community_id,this.ruleForm).then((function(e){t.$message.success(e.message),t.dialogVisible=!1,t.getList("")})).catch((function(e){t.$message.error(e.message)}))},handleDelete:function(t,e){var a=this;this.$modalSure("确定删除该文章").then((function(){Object(o["h"])(t).then((function(t){var e=t.message;a.$message.success(e),a.getList("")})).catch((function(t){var e=t.message;a.$message.error(e)}))}))},onchangeIsShow:function(t){var e=this;Object(o["o"])(t.community_id,t.is_show).then((function(t){var a=t.message;e.$message.success(a)})).catch((function(t){var a=t.message;e.$message.error(a)}))}}},l=r,s=(a("e3ea"),a("2877")),c=Object(s["a"])(l,n,i,!1,null,"858efb8a",null);e["default"]=c.exports},7998:function(t,e,a){"use strict";a.d(e,"e",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"g",(function(){return r})),a.d(e,"d",(function(){return l})),a.d(e,"f",(function(){return s})),a.d(e,"t",(function(){return c})),a.d(e,"q",(function(){return u})),a.d(e,"w",(function(){return m})),a.d(e,"r",(function(){return d})),a.d(e,"v",(function(){return f})),a.d(e,"s",(function(){return p})),a.d(e,"j",(function(){return b})),a.d(e,"i",(function(){return h})),a.d(e,"a",(function(){return _})),a.d(e,"x",(function(){return g})),a.d(e,"o",(function(){return v})),a.d(e,"h",(function(){return y})),a.d(e,"k",(function(){return w})),a.d(e,"b",(function(){return k})),a.d(e,"u",(function(){return x})),a.d(e,"m",(function(){return F})),a.d(e,"l",(function(){return S})),a.d(e,"n",(function(){return D})),a.d(e,"p",(function(){return $}));var n=a("0c6d");function i(t){return n["a"].get("community/category/lst",t)}function o(){return n["a"].get("community/category/create/form")}function r(t){return n["a"].get("community/category/update/".concat(t,"/form"))}function l(t){return n["a"].delete("community/category/delete/".concat(t))}function s(t,e){return n["a"].post("community/category/status/".concat(t),{status:e})}function c(t){return n["a"].get("community/topic/lst",t)}function u(){return n["a"].get("community/topic/create/form")}function m(t){return n["a"].get("community/topic/update/".concat(t,"/form"))}function d(t){return n["a"].delete("community/topic/delete/".concat(t))}function f(t,e){return n["a"].post("community/topic/status/".concat(t),{status:e})}function p(t,e){return n["a"].post("community/topic/hot/".concat(t),{status:e})}function b(t){return n["a"].get("community/lst",t)}function h(t){return n["a"].get("community/detail/".concat(t))}function _(t,e){return n["a"].post("community/status/".concat(t),e)}function g(t){return n["a"].get("community/update/".concat(t,"/form"))}function v(t,e){return n["a"].post("community/show/".concat(t),{status:e})}function y(t){return n["a"].delete("community/delete/".concat(t))}function w(t){return n["a"].get("community/status/".concat(t,"/form"))}function k(){return n["a"].get("community/category/option")}function x(){return n["a"].get("community/topic/option")}function F(t){return n["a"].get("community/reply/lst",t)}function S(t){return n["a"].delete("community/reply/delete/".concat(t))}function D(t){return n["a"].get("community/reply/status/".concat(t,"/form"))}function $(){return n["a"].get("community/title")}},cdfe:function(t,e,a){t.exports=a.p+"system/img/f.5aa43cd3.png"},e3ea:function(t,e,a){"use strict";a("3cec")}}]); |