mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-15 21:32:50 +00:00
1 line
8.8 KiB
JavaScript
1 line
8.8 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-12528eb0"],{1426:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"article-manager"},[a("div",{staticClass:"i-layout-page-header"},[a("div",{staticClass:"i-layout-page-header"},[t.$route.params.id?a("router-link",{attrs:{to:{path:"/admin/product/product_list"}}},[a("Button",{staticClass:"mr20",attrs:{icon:"ios-arrow-back",size:"small"}},[t._v("返回")])],1):t._e(),a("span",{staticClass:"ivu-page-header-title mr20"},[t._v("商品评论管理")])],1)]),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":75,"label-position":"left"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("Row",{attrs:{type:"flex",gutter:24}},[a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"评论时间:"}},[a("RadioGroup",{staticClass:"mr",attrs:{type:"button"},on:{"on-change":function(e){return t.selectChange(t.formValidate.data)}},model:{value:t.formValidate.data,callback:function(e){t.$set(t.formValidate,"data",e)},expression:"formValidate.data"}},t._l(t.fromList.fromTxt,(function(e,i){return a("Radio",{key:i,attrs:{label:e.val}},[t._v(t._s(e.text))])})),1),a("DatePicker",{staticStyle:{width:"200px"},attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"daterange",placement:"bottom-end",placeholder:"请选择时间"},on:{"on-change":t.onchangeTime}})],1)],1),a("Col",t._b({},"Col",t.grid,!1),[a("FormItem",{attrs:{label:"评价状态:"}},[a("Select",{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)],1),t.$route.params.id?t._e():a("Col",t._b({},"Col",t.grid,!1),[a("FormItem",{attrs:{label:"商品信息:","label-for":"store_name"}},[a("Input",{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)],1),a("Col",t._b({},"Col",t.grid,!1),[a("FormItem",{attrs:{label:"用户名称:","label-for":"account"}},[a("Input",{attrs:{size:"default","enter-button":"",placeholder:"请输入",clearable:""},model:{value:t.formValidate.account,callback:function(e){t.$set(t.formValidate,"account",e)},expression:"formValidate.account"}})],1)],1),a("Col",{staticClass:"search",attrs:{xl:3,lg:3,md:12,sm:12,xs:24}},[a("FormItem",[a("Button",{attrs:{type:"primary",icon:"ios-search"},on:{click:t.userSearchs}},[t._v("搜索")])],1)],1)],1)],1),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",icon:"md-add"},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":"暂无筛选结果"},on:{"on-sort-change":t.sortMethod},scopedSlots:t._u([{key:"info",fn:function(e){var i=e.row;return[a("div",{staticClass:"imgPic acea-row row-middle"},[a("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"pictrue"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:i.image,expression:"row.image"}]})]),a("div",{staticClass:"info"},[t._v(t._s(i.store_name))])])]}},{key:"content",fn:function(e){var i=e.row;return[a("div",{staticClass:"mb5 content_font"},[t._v(t._s(i.comment))]),t._l(i.pics||[],(function(t,e){return a("div",{directives:[{name:"viewer",rawName:"v-viewer"}],key:e,staticClass:"pictrue mr10"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t,expression:"item"}],attrs:{src:t}})])}))]}},{key:"action",fn:function(e){var i=e.row,r=e.index;return[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":"right"},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)},r=[],o=(a("96cf"),a("3b8d")),s=a("c4c8"),n={name:"product_productEvaluate",data:function(){return{modals:!1,grid:{xl:7,lg:10,md:12,sm:12,xs:24},formValidate:{is_reply:"",data:"",store_name:"",key:"",order:"",account:"",product_id:void 0===this.$route.params.id?0:this.$route.params.id,page:1,limit:15},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"}]},value:"45",tableList:[],total:0,loading:!1,columns:[{title:"评论ID",key:"id",width:80},{title:"商品信息",slot:"info",minWidth:230},{title:"用户名称",key:"nickname",minWidth:150},{title:"评分",key:"score",sortable:!0,minWidth:90},{title:"评价内容",slot:"content",minWidth:210},{title:"回复内容",key:"merchant_reply_content",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:{}}},computed:{},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()}},methods:{add:function(){var t=this;this.$modalForm(Object(s["h"])(this.formValidate.product_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(s["D"])(t.contents,t.rows.id).then(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.wrap((function(e){while(1)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)})).catch((function(t){i.$Message.error(t.msg)}))},reply:function(t){this.modals=!0,this.rows=t},onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal[0]?this.timeVal.join("-"):"",this.formValidate.page=1,this.getList()},sortMethod:function(t){"normal"===t.order?(this.formValidate.key="",this.formValidate.order=""):(this.formValidate.key=t.key,this.formValidate.order=t.order),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(s["z"])(this.formValidate).then(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(a){var i;return regeneratorRuntime.wrap((function(e){while(1)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(){}}},l=n,c=(a("9d31"),a("2877")),d=Object(c["a"])(l,i,r,!1,null,"e2c22e3e",null);e["default"]=d.exports},"9d31":function(t,e,a){"use strict";var i=a("c846"),r=a.n(i);r.a},c846:function(t,e,a){}}]); |