1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-108f0f7c"],{"02b1":function(t,e,n){"use strict";var r=n("1029");n.n(r).a},"0313":function(t,e,n){"use strict";var r=n("d6e8");n.n(r).a},"0b65":function(t,e,n){"use strict";e.a={shortcuts:[{text:"今天",value:function(){var t=new Date,e=new Date;return e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[e,t]}},{text:"昨天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),[e,t]}},{text:"最近7天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[e,t]}},{text:"最近30天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[e,t]}},{text:"上月",value:function(){var t=new Date,e=new Date,n=new Date(e.getFullYear(),e.getMonth(),0).getDate();return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,n))),[e,t]}},{text:"本月",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[e,t]}},{text:"本年",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),0,1))),[e,t]}}]}},1029:function(t,e,n){},1290:function(t,e,n){"use strict";n.r(e);var r=n("a34a"),a=n.n(r),i=n("2f62"),o=n("b7be"),s=n("2021"),l=n("0b65"),c=n("61f7"),u=n("d708");function d(t,e,n,r,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function m(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){d(i,r,a,o,s,"next",t)}function s(t){d(i,r,a,o,s,"throw",t)}o(void 0)}))}}function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h={name:"product_productEvaluate",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(c.a)(e,"yyyy-MM-dd hh:mm:ss")}}},components:{replyList:s.a},data:function(){return{roterPre:u.a.roterPre,modals:!1,grid:{xl:7,lg:10,md:12,sm:12,xs:24},formValidate:{is_reply:"",data:"",keyword:"",video_id:void 0===this.$route.query.id?0:this.$route.query.id,page:1,limit:15},options:l.a,tableList:[],total:0,loading:!1,columns:[{title:"评论ID",key:"id",width:80},{title:"视频信息",slot:"info",minWidth:250},{title:"用户名称",key:"nickname",minWidth:100},{title:"评价内容",key:"content",minWidth:150},{title:"回复内容",slot:"reply",minWidth:150},{title:"评价时间",slot:"add_time",sortable:!0,minWidth:150},{title:"操作",slot:"action",fixed:"right",minWidth:150}],timeVal:[],contents:{content:""},ruleInline:{content:[{required:!0,message:"请输入回复内容",trigger:"blur"}]},rows:{}}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(n,!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(i.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{seeReply:function(t){this.$refs.reply.modals=!0,this.$refs.reply.getList(t.id)},add:function(){var t=this;this.$modalForm(Object(o.E)(this.formValidate.video_id)).then((function(){return t.getList()}))},oks:function(){var t=this;this.modals=!0,this.$refs.contents.validate((function(e){if(!e)return!1;Object(o.Lb)(t.contents,t.rows.id).then(function(){var e=m(a.a.mark((function e(n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$Message.success(n.msg),t.modals=!1,t.$refs.contents.resetFields(),t.getList();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))}))},cancels:function(){this.modals=!1,this.$refs.contents.resetFields()},del:function(t,e,n){var r=this,a={title:e,num:n,url:"/marketing/video/comment/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(a).then((function(t){r.$Message.success(t.msg),r.tableList.splice(n,1),r.tableList.length||(r.formValidate.page=1==r.formValidate.page?1:r.formValidate.page-1),r.getList()})).catch((function(t){r.$Message.error(t.msg)}))},reply:function(t){this.modals=!0,this.rows=t,this.contents.content=t.reply},onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal[0]?this.timeVal.join("-"):"",this.formValidate.page=1,this.getList()},selectChange:function(t){this.formValidate.data=t,this.timeVal=[],this.formValidate.page=1,this.getList()},getList:function(){var t=this;this.loading=!0,this.formValidate.is_reply=this.formValidate.is_reply||"",this.formValidate.keyword=this.formValidate.keyword||"",Object(o.Hb)(this.formValidate).then(function(){var e=m(a.a.mark((function e(n){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tableList=r.list,t.total=n.data.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},userSearchs:function(){this.formValidate.page=1,this.getList()}}},g=(n("0313"),n("2877")),v=Object(g.a)(h,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"article-manager"},[t.$route.query.id?n("div",{staticClass:"i-layout-page-header"},[n("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[n("div",{staticClass:"acea-row row-middle",attrs:{slot:"title"},slot:"title"},[n("router-link",{attrs:{to:{path:t.roterPre+"/marketing/short_video/index"}}},[n("div",{staticClass:"font-sm after-line"},[n("span",{staticClass:"iconfont iconfanhui"}),n("span",{staticClass:"pl10"},[t._v("返回")])])]),n("span",{staticClass:"mr20 ml16",domProps:{textContent:t._s("视频评论")}})],1)])],1):t._e(),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[n("div",{staticClass:"new_card_pd"},[n("Form",{ref:"formValidate",attrs:{inline:"",model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:"时间选择:"}},[n("DatePicker",{staticClass:"input-width",attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:t.options},on:{"on-change":t.onchangeTime}})],1),n("FormItem",{attrs:{label:"评价状态:"}},[n("Select",{staticClass:"input-add",attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.formValidate.is_reply,callback:function(e){t.$set(t.formValidate,"is_reply",e)},expression:"formValidate.is_reply"}},[n("Option",{attrs:{value:"1"}},[t._v("已回复")]),n("Option",{attrs:{value:"0"}},[t._v("待回复")])],1)],1),n("FormItem",{attrs:{label:"视频信息:","label-for":"keyword"}},[n("Input",{staticClass:"input-add",attrs:{size:"default","enter-button":"",placeholder:"请输入视频信息",clearable:""},model:{value:t.formValidate.keyword,callback:function(e){t.$set(t.formValidate,"keyword",e)},expression:"formValidate.keyword"}}),n("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Row",{attrs:{type:"flex"}},[n("Col",t._b({},"Col",t.grid,!1),[n("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加自评")])],1)],1),n("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:t.columns,data:t.tableList,loading:t.loading,"no-data-text":"暂无数据","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"info",fn:function(e){var r=e.row;return[n("div",{staticClass:"imgPic acea-row row-middle"},[n("viewer",[n("div",{staticClass:"pictrue"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r.video.image,expression:"row.video.image"}]})])]),n("div",{staticClass:"info line2"},[t._v(t._s(r.video.desc))])],1)]}},{key:"reply",fn:function(e){var r=e.row;return[n("Tooltip",{attrs:{"max-width":"200",placement:"bottom"}},[n("span",{staticClass:"line2"},[t._v(t._s(r.reply))]),n("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(r.reply))])])]}},{key:"add_time",fn:function(e){var n=e.row;return[t._v("\n "+t._s(t._f("formatDate")(n.add_time))+"\n ")]}},{key:"action",fn:function(e){var r=e.row,a=e.index;return[n("a",{on:{click:function(e){return t.seeReply(r)}}},[t._v("查看")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.reply(r)}}},[t._v("回复")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.del(r,"删除评论",a)}}},[t._v("删除")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1),n("Modal",{attrs:{scrollable:"",title:"回复内容",closable:""},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[n("Form",{ref:"contents",attrs:{model:t.contents,rules:t.ruleInline,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"content"}},[n("Input",{attrs:{type:"textarea",rows:4,placeholder:"请输入回复内容"},model:{value:t.contents.content,callback:function(e){t.$set(t.contents,"content",e)},expression:"contents.content"}})],1)],1),n("div",{attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"primary"},on:{click:t.oks}},[t._v("确定")]),n("Button",{on:{click:t.cancels}},[t._v("取消")])],1)],1),n("replyList",{ref:"reply",attrs:{fromType:1}})],1)}),[],!1,null,"39228b6e",null);e.default=v.exports},2021:function(t,e,n){"use strict";var r=n("a34a"),a=n.n(r),i=n("2f62"),o=n("c4c8"),s=n("b7be");function l(t,e,n,r,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d={name:"userList",props:{fromType:{type:Number,default:0}},data:function(){return{contents:{content:""},ruleInline:{content:[{required:!0,message:"请输入回复内容",trigger:"blur"}]},replyModals:!1,modals:!1,total:0,replyFrom:{page:1,limit:15},time:"",loading:!1,dataList:[],columns:[{title:"ID",key:"id",width:80},{title:"评论用户",slot:"info",minWidth:90},{title:"评论内容",key:"content",minWidth:100},{title:"操作",slot:"action",width:100}],rows:{},fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},timeVal:[],replyId:0}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(n,!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(i.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"left"}}),created:function(){},methods:{oks:function(){var t=this;this.$refs.contents.validate((function(e){if(!e)return!1;(t.fromType?Object(s.Lb)(t.contents,t.rows.id):Object(o.U)(t.contents,t.replyId,t.rows.id)).then(function(){var e,n=(e=a.a.mark((function e(n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$Message.success(n.msg),t.replyModals=!1,t.$refs.contents.resetFields(),t.getList(t.replyId);case 4:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(t){l(i,r,a,o,s,"next",t)}function s(t){l(i,r,a,o,s,"throw",t)}o(void 0)}))});return function(t){return n.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))}))},onchangeTime:function(t){this.timeVal=t,this.time=this.timeVal[0]?this.timeVal.join("-"):"",this.replyFrom.page=1},selectChange:function(t){this.time=t,this.timeVal=[],this.replyFrom.page=1,this.getList(this.replyId)},cancels:function(){this.replyModals=!1,this.$refs.contents.resetFields()},reply:function(t){this.contents.content=t.children?t.children.content:"",this.rows=t,this.replyModals=!0},del:function(t,e,n){var r,a=this;r=this.fromType?"/marketing/video/comment/".concat(t.id):"product/reply/delete_comment/".concat(t.id);var i={title:e,num:n,url:r,method:"DELETE",ids:""};this.$modalSure(i).then((function(t){a.$Message.success(t.msg),a.dataList.splice(n,1),a.dataList.length||(a.replyFrom.page=1==a.replyFrom.page?1:a.replyFrom.page-1),a.getList(a.replyId)})).catch((function(t){a.$Message.error(t.msg)}))},getList:function(t){var e=this;this.replyId=t,this.loading=!0;var n="";this.fromType?(this.replyFrom.data=this.time,n=s.Ib):(this.replyFrom.time=this.time,n=o.V),n(this.replyFrom,t).then((function(t){e.loading=!1,e.total=t.data.count,e.dataList=t.data.list})).catch((function(t){e.loading=!1,e.$Message.error(t.msg)}))},pageChange:function(t){this.replyFrom.page=t,this.getList(this.replyId)}}},m=(n("02b1"),n("2877")),f=Object(m.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{width:"100%"}},[n("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"评论回复列表","mask-closable":!1,width:"900","vertical-center-modal":""},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[n("Form",{ref:"replyFrom",attrs:{inline:"",model:t.replyFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:"时间选择:"}},[n("DatePicker",{staticClass:"input-add",attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"daterange",placement:"bottom-end",placeholder:"自定义时间"},on:{"on-change":t.onchangeTime}}),n("Button",{attrs:{type:"primary"},on:{click:function(e){return t.getList(t.replyId)}}},[t._v("查询")])],1)],1),n("Table",{ref:"selection",attrs:{loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果",columns:t.columns,data:t.dataList},scopedSlots:t._u([{key:"info",fn:function(e){var r=e.row;return[t.fromType?n("div",[t._v(t._s(r.uid?r.nickname:"作者"))]):n("div",{staticClass:"imgPic acea-row row-middle"},[n("viewer",[n("div",{staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r.user.avatar,expression:"row.user.avatar"}]})])]),n("div",{staticClass:"info"},[t._v(t._s(r.user.nickname))])],1)]}},{key:"merchantReply",fn:function(e){var r=e.row;return[n("div",[t._v(t._s(r.children?r.children.content:""))])]}},{key:"action",fn:function(e){var r=e.row,a=e.index;return[n("a",{directives:[{name:"show",rawName:"v-show",value:0==r.pid||r.uid>0,expression:"row.pid == 0 || row.uid > 0"}],on:{click:function(e){return t.reply(r)}}},[t._v("回复")]),n("Divider",{directives:[{name:"show",rawName:"v-show",value:0==r.pid||r.uid>0,expression:"row.pid == 0 || row.uid > 0"}],attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.del(r,"删除评论",a)}}},[t._v("删除")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"",current:t.replyFrom.page,"page-size":t.replyFrom.limit},on:{"on-change":t.pageChange}})],1)],1),n("Modal",{attrs:{scrollable:"",title:"回复内容",closable:""},model:{value:t.replyModals,callback:function(e){t.replyModals=e},expression:"replyModals"}},[n("Form",{ref:"contents",attrs:{model:t.contents,rules:t.ruleInline},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"content"}},[n("Input",{attrs:{type:"textarea",rows:4,placeholder:"请输入回复内容"},model:{value:t.contents.content,callback:function(e){t.$set(t.contents,"content",e)},expression:"contents.content"}})],1)],1),n("div",{attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"primary"},on:{click:t.oks}},[t._v("确定")]),n("Button",{on:{click:t.cancels}},[t._v("取消")])],1)],1)],1)}),[],!1,null,"39022758",null);e.a=f.exports},"61f7":function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(n,!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var r in n)if(new RegExp("(".concat(r,")")).test(e)){var a=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:s(a))}return e}function s(t){return("00"+t).substr(t.length)}n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return d}));var l={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},c=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function u(t){return a({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function d(t){return m.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}c(u,"请输入%s"),c(d,"%s格式不正确");var m=Object.keys(l).reduce((function(t,e){return t[e]=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:i({},e,t);return a({message:n.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o,{},r)},c(t[e],l[e]),t}),{})},d6e8:function(t,e,n){}}]);
|