1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0b7517d4"],{"02b1":function(t,e,a){"use strict";var i=a("1029");a.n(i).a},"0b65":function(t,e,a){"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,a=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,a))),[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,a){},1426:function(t,e,a){"use strict";a.r(e);var i=a("a34a"),r=a.n(i),n=a("2f62"),o=a("c4c8"),s=a("2021"),l={props:{visible:{type:Boolean,default:!1},goods:{type:Object,default:function(){return{}}},attr:{type:Object,default:function(){return{}}},avatar:{type:Object,default:function(){return{}}},picture:{type:Array,default:function(){return[]}}},data:function(){return{formData:{avatar:"",nickname:"",comment:""},product_score:0,service_score:0,pics:[],add_time:""}},watch:{picture:function(t){this.pics=t.map((function(t){return t.att_dir}))},visible:function(t){t||(this.formData.nickname="",this.formData.comment="",this.product_score=0,this.service_score=0,this.add_time="")}},methods:{removeUser:function(){this.avatar.att_dir=""},removePicture:function(t){this.$emit("removePicture",t)},onChange:function(t){this.add_time=t},callGoods:function(){this.$emit("callGoods")},callAttr:function(){this.$emit("callAttr")},callPicture:function(t){this.$emit("callPicture",t)},onOk:function(){var t=this;if(!this.goods.id)return this.$Message.error("请选择商品");if(!this.attr.unique)return this.$Message.error("请选择商品规格");if(!this.avatar.att_dir)return this.$Message.error("请选择用户头像");if(!this.formData.nickname)return this.$Message.error("请填写用户昵称");if(!this.formData.comment)return this.$Message.error("请填写评论内容");if(!this.product_score)return this.$Message.error("商品分数必须是1-5之间的整数");if(!this.service_score)return this.$Message.error("服务分数必须是1-5之间的整数");var e={image:{image:this.goods.image,product_id:this.goods.id},unique:this.attr.unique,avatar:this.avatar.att_dir,nickname:this.formData.nickname,comment:this.formData.comment,product_score:this.product_score,service_score:this.service_score,pics:this.pics,add_time:this.add_time};Object(o.mb)(e).then((function(e){t.$Message.success(e.msg),t.$emit("update:visible",!1)})).catch((function(e){t.$Message.error(e.msg)}))},onCancel:function(){this.$emit("update:visible",!1)}}},c=(a("b2b2"),a("2877")),u=Object(c.a)(l,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("Modal",{attrs:{value:t.visible,"z-index":2,title:"添加自评",width:"700"},on:{"on-ok":t.onOk,"on-cancel":t.onCancel}},[a("Form",{attrs:{model:t.formData,"label-width":125}},[a("FormItem",{attrs:{label:"商品",required:""}},[a("div",{staticClass:"upload-box",on:{click:t.callGoods}},[t.goods.id?a("img",{staticClass:"image",attrs:{src:t.goods.image}}):a("Icon",{attrs:{type:"ios-add"}})],1)]),t.goods.id?a("FormItem",{attrs:{label:"商品规格",required:""}},[a("div",{staticClass:"upload-box",on:{click:t.callAttr}},[t.attr.unique?a("img",{staticClass:"image",attrs:{src:t.attr.image}}):a("Icon",{attrs:{type:"ios-add"}})],1)]):t._e(),a("FormItem",{attrs:{label:"用户头像",required:""}},[a("div",{staticClass:"upload-box",on:{click:function(e){return t.callPicture("单选")}}},[t.avatar.att_dir?a("img",{staticClass:"image",attrs:{src:t.avatar.att_dir}}):t._e(),t.avatar.att_dir?a("Button",{staticClass:"btn",attrs:{shape:"circle",icon:"md-close"},on:{click:function(e){return e.stopPropagation(),t.removeUser(e)}}}):a("Icon",{attrs:{type:"ios-add"}})],1)]),a("FormItem",{attrs:{label:"用户名称",required:""}},[a("Input",{attrs:{placeholder:"请输入用户名称"},model:{value:t.formData.nickname,callback:function(e){t.$set(t.formData,"nickname",e)},expression:"formData.nickname"}})],1),a("FormItem",{attrs:{label:"评价文字",required:""}},[a("Input",{attrs:{type:"textarea",autosize:{minRows:2},placeholder:"请输入评价文字"},model:{value:t.formData.comment,callback:function(e){t.$set(t.formData,"comment",e)},expression:"formData.comment"}})],1),a("FormItem",{attrs:{label:"商品分数",required:""}},[a("Rate",{model:{value:t.product_score,callback:function(e){t.product_score=e},expression:"product_score"}})],1),a("FormItem",{attrs:{label:"服务分数",required:""}},[a("Rate",{model:{value:t.service_score,callback:function(e){t.service_score=e},expression:"service_score"}})],1),a("FormItem",{attrs:{label:"评价图片"}},[t._l(t.picture,(function(e){return a("div",{key:e.att_id,staticClass:"upload-box"},[a("img",{staticClass:"image",attrs:{src:e.att_dir}}),a("Button",{staticClass:"btn",attrs:{shape:"circle",icon:"md-close"},on:{click:function(a){return t.removePicture(e.att_id)}}})],1)})),t.picture.length<8?a("div",{staticClass:"upload-box",on:{click:function(e){return t.callPicture("多选")}}},[a("Icon",{attrs:{type:"ios-add"}})],1):t._e()],2),a("FormItem",{attrs:{label:"评价时间"}},[a("DatePicker",{staticStyle:{width:"200px"},attrs:{value:t.add_time,type:"datetime",placeholder:"请选择评论时间(不选择默认当前添加时间)"},on:{"on-change":t.onChange}})],1)],1),a("template",{slot:"footer"},[a("Button",{on:{click:t.onCancel}},[t._v("取消")]),a("Button",{attrs:{type:"primary"},on:{click:t.onOk}},[t._v("确定")])],1)],2)}),[],!1,null,"2261081c",null).exports,d=a("c4ad"),m=a("b0e7"),p=a("0b65"),f=a("d708");function h(t){return function(t){if(Array.isArray(t)){for(var e=0,a=new Array(t.length);e<t.length;e++)a[e]=t[e];return a}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function v(t,e,a,i,r,n,o){try{var s=t[n](o),l=s.value}catch(t){return void a(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function g(t){return function(){var e=this,a=arguments;return new Promise((function(i,r){var n=t.apply(e,a);function o(t){v(n,i,r,o,s,"next",t)}function s(t){v(n,i,r,o,s,"throw",t)}o(void 0)}))}}function y(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function b(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var w={name:"product_productEvaluate",components:{replyList:s.a,addReply:u,goodsList:d.default,uploadPictures:m.a},data:function(){var t=this;return{roterPre:f.a.roterPre,modals:!1,grid:{xl:7,lg:10,md:12,sm:12,xs:24},formValidate:{is_reply:"",data:"",store_name:"",account:"",product_id:void 0===this.$route.params.id?0:this.$route.params.id,page:1,limit:15},options:p.a,value:"45",tableList:[],total:0,loading:!1,columns:[{title:"评论ID",key:"id",width:80},{title:"商品信息",slot:"info",minWidth:250},{title:"用户名称",key:"nickname",minWidth:150},{title:"评分",key:"score",sortable:!0,minWidth:90},{title:"评价内容",slot:"content",minWidth:210},{title:"回复内容",slot:"reply",minWidth:250},{title:"评价时间",key:"add_time",sortable:!0,minWidth:150},{title:"操作",slot:"action",fixed:"right",minWidth:150}],timeVal:[],contents:{content:""},ruleInline:{content:[{required:!0,message:"请输入回复内容",trigger:"blur"}]},rows:{},replyModal:!1,goodsModal:!1,attrModal:!1,tableColumns:[{width:60,align:"center",render:function(e,a){return e("Radio",{props:{value:a.row.unique===t.attrData.unique},on:{"on-change":function(){t.attrData=a.row,t.attrModal=!1}}})}},{title:"图片",slot:"image",width:120,align:"center"},{title:"规格",key:"suk",align:"center",minWidth:120},{title:"售价",key:"ot_price",align:"center",minWidth:120},{title:"优惠价",key:"price",align:"center",minWidth:120}],tableData:[],goodsAddType:"",goodsData:{},attrData:{},avatarData:{},pictureData:[],selectProductAttrList:[],pictureModal:!1,isChoice:"",picTit:"",tableIndex:0,gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8}}},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?y(a,!0).forEach((function(e){b(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):y(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(n.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){0==this.$route.query.is_reply&&(this.formValidate.is_reply=this.$route.query.is_reply),this.getList()},watch:{"$route.params.id":function(t,e){this.formValidate.product_id=0,this.getList()},replyModal:function(t){t||(this.goodsData={},this.attrData={},this.avatarData={},this.pictureData=[],this.getList())}},methods:{seeReply:function(t){this.$refs.reply.modals=!0,this.$refs.reply.getList(t.id)},add:function(){this.replyModal=!0},oks:function(){var t=this;this.modals=!0,this.$refs.contents.validate((function(e){if(!e)return!1;Object(o.ob)(t.contents,t.rows.id).then(function(){var e=g(r.a.mark((function e(a){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$Message.success(a.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,a){var i=this,r={title:e,num:a,url:"product/reply/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(r).then((function(t){i.$Message.success(t.msg),i.tableList.splice(a,1),i.tableList.length||(i.formValidate.page=1==i.formValidate.page?1:i.formValidate.page-1),i.getList()})).catch((function(t){i.$Message.error(t.msg)}))},reply:function(t){this.modals=!0,this.rows=t,this.contents.content=t.replyComment?t.replyComment.content:""},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.store_name=this.formValidate.store_name||"",Object(o.ib)(this.formValidate).then(function(){var e=g(r.a.mark((function e(a){var i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=a.data,t.tableList=i.list,t.total=a.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()},search:function(){},callGoods:function(){this.goodsModal=!0},callAttr:function(){this.attrModal=!0},getProductId:function(t){this.goodsData=t,this.goodsModal=!1,this.attrData.unique=""},getPic:function(t){this.avatarData=t,this.pictureModal=!1},getPicD:function(t){var e=h(this.pictureData);(e=e.concat(t)).sort((function(t,e){return t.att_id-e.att_id}));for(var a=[],i=0;i<e.length;i++)e[i+1]&&e[i].att_id!=e[i+1].att_id&&a.push(e[i]),e[i+1]||a.push(e[i]);this.pictureData=a,this.pictureModal=!1},callPicture:function(t){this.isChoice=t,this.pictureModal=!0},removePicture:function(t){var e=this.pictureData.findIndex((function(e){return e.att_id===t}));this.pictureData.splice(e,1)}}},_=(a("be84"),Object(c.a)(w,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"article-manager"},[t.$route.params.id?a("div",{staticClass:"i-layout-page-header"},[a("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[a("div",{staticClass:"acea-row row-middle",attrs:{slot:"title"},slot:"title"},[a("router-link",{attrs:{to:{path:t.roterPre+"/product/product_list"}}},[a("div",{staticClass:"font-sm after-line"},[a("span",{staticClass:"iconfont iconfanhui"}),a("span",{staticClass:"pl10"},[t._v("返回")])])]),a("span",{staticClass:"mr20 ml16",domProps:{textContent:t._s("商品评论")}})],1)])],1):t._e(),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[a("div",{staticClass:"new_card_pd"},[a("Form",{ref:"formValidate",attrs:{inline:"",model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("FormItem",{attrs:{label:"时间选择:"}},[a("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),a("FormItem",{attrs:{label:"评价状态:"}},[a("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"}},[a("Option",{attrs:{value:"1"}},[t._v("已回复")]),a("Option",{attrs:{value:"0"}},[t._v("待回复")])],1)],1),a("FormItem",{attrs:{label:"商品信息:","label-for":"store_name"}},[a("Input",{staticClass:"input-add",attrs:{size:"default","enter-button":"",placeholder:"请输入商品ID或者商品信息",clearable:""},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}})],1),a("FormItem",{attrs:{label:"用户名称:","label-for":"account"}},[a("Input",{staticClass:"input-add",attrs:{size:"default","enter-button":"",placeholder:"请输入",clearable:""},model:{value:t.formValidate.account,callback:function(e){t.$set(t.formValidate,"account",e)},expression:"formValidate.account"}}),a("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Row",{attrs:{type:"flex"}},[a("Col",t._b({},"Col",t.grid,!1),[a("Button",{directives:[{name:"auth",rawName:"v-auth",value:["product-reply-save_fictitious_reply"],expression:"['product-reply-save_fictitious_reply']"}],attrs:{type:"primary"},on:{click:t.add}},[t._v("添加自评")])],1)],1),a("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 i=e.row;return[a("div",{staticClass:"imgPic acea-row row-middle"},[a("viewer",[a("div",{staticClass:"pictrue"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:i.image,expression:"row.image"}]})])]),a("div",{staticClass:"info line2"},[t._v(t._s(i.store_name))])],1)]}},{key:"content",fn:function(e){var i=e.row;return[a("div",{staticClass:"mb5 content_font"},[t._v(t._s(i.comment))]),a("viewer",t._l(i.pics||[],(function(t,e){return a("div",{key:e,staticClass:"pictrue mr10"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t,expression:"item"}]})])})),0)]}},{key:"reply",fn:function(e){var i=e.row;return[a("Tooltip",{attrs:{"max-width":"200",placement:"bottom"}},[a("span",{staticClass:"line2"},[t._v(t._s(i.replyComment?i.replyComment.content:""))]),a("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(i.replyComment?i.replyComment.content:""))])])]}},{key:"action",fn:function(e){var i=e.row,r=e.index;return[a("a",{on:{click:function(e){return t.seeReply(i)}}},[t._v("查看")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.reply(i)}}},[t._v("回复")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.del(i,"删除评论",r)}}},[t._v("删除")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("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),a("Modal",{attrs:{scrollable:"",title:"回复内容",closable:""},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[a("Form",{ref:"contents",attrs:{model:t.contents,rules:t.ruleInline,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("FormItem",{attrs:{prop:"content"}},[a("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),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{type:"primary"},on:{click:t.oks}},[t._v("确定")]),a("Button",{on:{click:t.cancels}},[t._v("取消")])],1)],1),a("replyList",{ref:"reply"}),a("addReply",{attrs:{visible:t.replyModal,goods:t.goodsData,attr:t.attrData,avatar:t.avatarData,picture:t.pictureData},on:{"update:visible":function(e){t.replyModal=e},callGoods:t.callGoods,callAttr:t.callAttr,callPicture:t.callPicture,removePicture:t.removePicture}}),a("Modal",{attrs:{title:"选择商品",width:"960",scrollable:"","footer-hide":""},model:{value:t.goodsModal,callback:function(e){t.goodsModal=e},expression:"goodsModal"}},[t.replyModal?a("goodsList",{on:{getProductId:t.getProductId}}):t._e()],1),a("Modal",{attrs:{title:"选择商品规格",width:"960",scrollable:"","footer-hide":""},model:{value:t.attrModal,callback:function(e){t.attrModal=e},expression:"attrModal"}},[a("Table",{attrs:{columns:t.tableColumns,data:t.goodsData.attrValue,height:"500"},scopedSlots:t._u([{key:"image",fn:function(t){var e=t.row;return t.index,[a("div",{staticClass:"product-data"},[a("img",{staticClass:"image",attrs:{src:e.image}})])]}}])})],1),a("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传商品图","mask-closable":!1,"z-index":1},model:{value:t.pictureModal,callback:function(e){t.pictureModal=e},expression:"pictureModal"}},[t.pictureModal?a("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic,getPicD:t.getPicD}}):t._e()],1)],1)}),[],!1,null,"4cd74a72",null));e.default=_.exports},2021:function(t,e,a){"use strict";var i=a("a34a"),r=a.n(i),n=a("2f62"),o=a("c4c8"),s=a("b7be");function l(t,e,a,i,r,n,o){try{var s=t[n](o),l=s.value}catch(t){return void a(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function c(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function u(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,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 a=null!=arguments[e]?arguments[e]:{};e%2?c(a,!0).forEach((function(e){u(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):c(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(n.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,a=(e=r.a.mark((function e(a){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$Message.success(a.msg),t.replyModals=!1,t.$refs.contents.resetFields(),t.getList(t.replyId);case 4:case"end":return e.stop()}}),e)})),function(){var t=this,a=arguments;return new Promise((function(i,r){var n=e.apply(t,a);function o(t){l(n,i,r,o,s,"next",t)}function s(t){l(n,i,r,o,s,"throw",t)}o(void 0)}))});return function(t){return a.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,a){var i,r=this;i=this.fromType?"/marketing/video/comment/".concat(t.id):"product/reply/delete_comment/".concat(t.id);var n={title:e,num:a,url:i,method:"DELETE",ids:""};this.$modalSure(n).then((function(t){r.$Message.success(t.msg),r.dataList.splice(a,1),r.dataList.length||(r.replyFrom.page=1==r.replyFrom.page?1:r.replyFrom.page-1),r.getList(r.replyId)})).catch((function(t){r.$Message.error(t.msg)}))},getList:function(t){var e=this;this.replyId=t,this.loading=!0;var a="";this.fromType?(this.replyFrom.data=this.time,a=s.Ib):(this.replyFrom.time=this.time,a=o.V),a(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=(a("02b1"),a("2877")),p=Object(m.a)(d,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{width:"100%"}},[a("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"}},[a("Form",{ref:"replyFrom",attrs:{inline:"",model:t.replyFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("FormItem",{attrs:{label:"时间选择:"}},[a("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}}),a("Button",{attrs:{type:"primary"},on:{click:function(e){return t.getList(t.replyId)}}},[t._v("查询")])],1)],1),a("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 i=e.row;return[t.fromType?a("div",[t._v(t._s(i.uid?i.nickname:"作者"))]):a("div",{staticClass:"imgPic acea-row row-middle"},[a("viewer",[a("div",{staticClass:"tabBox_img"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:i.user.avatar,expression:"row.user.avatar"}]})])]),a("div",{staticClass:"info"},[t._v(t._s(i.user.nickname))])],1)]}},{key:"merchantReply",fn:function(e){var i=e.row;return[a("div",[t._v(t._s(i.children?i.children.content:""))])]}},{key:"action",fn:function(e){var i=e.row,r=e.index;return[a("a",{directives:[{name:"show",rawName:"v-show",value:0==i.pid||i.uid>0,expression:"row.pid == 0 || row.uid > 0"}],on:{click:function(e){return t.reply(i)}}},[t._v("回复")]),a("Divider",{directives:[{name:"show",rawName:"v-show",value:0==i.pid||i.uid>0,expression:"row.pid == 0 || row.uid > 0"}],attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.del(i,"删除评论",r)}}},[t._v("删除")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("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),a("Modal",{attrs:{scrollable:"",title:"回复内容",closable:""},model:{value:t.replyModals,callback:function(e){t.replyModals=e},expression:"replyModals"}},[a("Form",{ref:"contents",attrs:{model:t.contents,rules:t.ruleInline},nativeOn:{submit:function(t){t.preventDefault()}}},[a("FormItem",{attrs:{prop:"content"}},[a("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),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{type:"primary"},on:{click:t.oks}},[t._v("确定")]),a("Button",{on:{click:t.cancels}},[t._v("取消")])],1)],1)],1)}),[],!1,null,"39022758",null);e.a=p.exports},8925:function(t,e,a){},"9b70":function(t,e,a){},b2b2:function(t,e,a){"use strict";var i=a("8925");a.n(i).a},be84:function(t,e,a){"use strict";var i=a("9b70");a.n(i).a}}]);
|