/
home
/
henzagold
/
adminold
/
export
/
js
/
File Upload :
llllll
Current File: /home/henzagold/adminold/export/js/chunk-ced4de10.ac26514c.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ced4de10"],{"0452":function(t,e,n){"use strict";n("5697")},"09ba":function(t,e,n){"use strict";n.r(e);var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"page-user-list"}},[n("vx-card",{ref:"filterCard",staticClass:"vx-card",attrs:{removeCardAction:!1,title:"لیست دیدگاه ها"}},[n("div",[n("XTable",{ref:"tbl",attrs:{model:t.model},scopedSlots:t._u([{key:"customer",fn:function(e){var s=e.text;return n("div",{},[t._v("\n "+t._s(s&&s.fname&&s.lname?s.fname+" "+s.lname:"بدون نام")+"\n ")])}},{key:"productName",fn:function(e){var s=e.record;return n("div",{},[n("a",{attrs:{href:"https://henzagold.com/product/"+s.product.title.split(" ").join("-")+"/"+s.product.id,target:"_blank"}},[t._v(t._s(s.product.title))])])}},{key:"sts",fn:function(e){var s=e.text;return n("div",{},[1==s?n("ATag",[t._v("در انتظار تایید")]):2==s?n("ATag",{attrs:{color:"green"}},[t._v("تایید شده")]):n("ATag",{attrs:{color:"red"}},[t._v("عدم تایید")])],1)}},{key:"reply",fn:function(e){var s=e.text;return n("div",{},[s.length>0&&null!==s[0].comment?n("ATag",{attrs:{color:"green"}},[t._v("پاسخ داده شده")]):n("ATag",[t._v("بدون پاسخ")])],1)}},{key:"changeState",fn:function(e){var s=e.record;return t.$hasPermission("comment.state")?n("div",{},[n("a-dropdown",[n("ATag",{staticStyle:{cursor:"pointer"},attrs:{color:1===s.sts?"":2===s.sts?"green":3===s.sts?"red":""},on:{click:function(t){return t.preventDefault()}}},[t._v("\n "+t._s(1===s.sts?"در انتظار تایید":2===s.sts?"تایید":"عدم تایید")+"\n "),n("a-icon",{attrs:{type:"down"}})],1),n("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[n("a-menu-item",{staticClass:"primary"},[n("div",{on:{click:function(e){1!==s.sts?t.Change_Sts(s.id,1):t.$message.error("حالت فعلی در انتظار تایید می باشد")}}},[t._v("\n در انتظار تایید\n ")])]),n("a-menu-item",{staticClass:"green"},[n("div",{on:{click:function(e){2!==s.sts?t.Change_Sts(s.id,2):t.$message.error("حالت فعلی تایید می باشد")}}},[t._v("\n تایید\n ")])]),n("a-menu-item",{staticClass:"red"},[n("div",{on:{click:function(e){3!==s.sts?t.Change_Sts(s.id,3):t.$message.error("حالت فعلی عدم تایید می باشد")}}},[t._v("\n عدم تایید\n ")])])],1)],1)],1):t._e()}},{key:"opt",fn:function(e){var s=e.record;return n("div",{},[n("div",{staticClass:"flex"},[t.$hasPermission("comment.view")?n("TooltipBtn",{staticClass:"mr-3",attrs:{"icon-class":"w-5 h-5 text-primary",icon:"EyeIcon",title:"مشاهده دیدگاه"},on:{click:function(e){return t.viewComment(s)}}}):t._e(),t.$hasPermission("comment.remove")?n("TooltipBtn",{staticClass:"mr-3",attrs:{"icon-class":"w-5 h-5 text-danger",icon:"TrashIcon",popTitle:"دیدگاه حذف شود؟"},on:{click:function(e){return t.DeleteComment(s.id)}}}):t._e()],1)])}}],null,!0)}),t.$hasPermission("comment.view")?n("AModal",{attrs:{title:"مشاهده دیدگاه",width:"80%"},model:{value:t.visibleComment,callback:function(e){t.visibleComment=e},expression:"visibleComment"}},[t.tempRow?n("div",{staticClass:"comments-list"},[n("ul",[n("li",{staticClass:"comment-item"},[n("span",{staticClass:"img feather-icon select-none relative",staticStyle:{"justify-content":"center"}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"65px",height:"65px",fill:"rgba(var(--vs-primary), 1)"}},[n("path",{attrs:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM7.07 18.28c.43-.9 3.05-1.78 4.93-1.78s4.51.88 4.93 1.78C15.57 19.36 13.86 20 12 20s-3.57-.64-4.93-1.72zm11.29-1.45c-1.43-1.74-4.9-2.33-6.36-2.33s-4.93.59-6.36 2.33C4.62 15.49 4 13.82 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 1.82-.62 3.49-1.64 4.83zM12 6c-1.94 0-3.5 1.56-3.5 3.5S10.06 13 12 13s3.5-1.56 3.5-3.5S13.94 6 12 6zm0 5c-.83 0-1.5-.67-1.5-1.5S11.17 8 12 8s1.5.67 1.5 1.5S12.83 11 12 11z"}})])]),n("div",{staticClass:"comment-body"},[n("h5",[t._v("\n "+t._s(t.tempRow.customer&&t.tempRow.customer.fname&&t.tempRow.customer.lname?t.tempRow.customer.fname+" "+t.tempRow.customer.lname:"بدون نام")+"\n ")]),n("span",{staticClass:"time"},[t._v("ارسال شده در تاریخ : "+t._s(t.tempRow.caj?t.tempRow.caj.split("-")[0]:null))]),n("a-form-model-item",{staticStyle:{width:"100%"}},[n("a-input",{attrs:{disabled:!t.$hasPermission("comment.view.edit"),type:"textarea","auto-size":{minRows:3,maxRows:5}},on:{change:function(e){return t.changeComment(t.Comment,t.tempRow.comment)}},model:{value:t.Comment,callback:function(e){t.Comment=e},expression:"Comment"}})],1)],1),n("ul",[n("li",{staticClass:"comment-item"},[n("img",{staticClass:"img border",attrs:{src:"/admin/img/henza-icon.2b1e8c97.svg",alt:"comment author"}}),n("div",{staticClass:"comment-body"},[n("h5",[t._v("ادمین")]),t.tempRow.reply[0]?n("span",{staticClass:"time"},[t._v("\n ارسال شده در تاریخ :\n "+t._s(t.tempRow.reply[0].caj.split("-")[0])+"\n ")]):t._e(),n("a-form-model-item",{staticStyle:{width:"100%"}},[n("a-input",{attrs:{disabled:!t.$hasPermission("comment.view.edit"),type:"textarea","auto-size":{minRows:3,maxRows:5}},on:{change:function(e){return t.changeReply(t.Reply,t.tempRow.reply)}},model:{value:t.Reply,callback:function(e){t.Reply=e},expression:"Reply"}})],1),(t.Show_Change_Reply_Btn||t.Show_Change_Comment_Btn)&&t.$hasPermission("comment.view.edit")?n("vs-button",{staticClass:"mr-4",attrs:{"icon-pack":"feather",icon:"icon-check",type:"border"},on:{click:function(e){return t.Submit_Changes(t.tempRow)}}},[t._v("\n ثبت تغییرات\n ")]):t._e()],1)])])])])]):t._e(),n("div",{attrs:{slot:"footer"},slot:"footer"},[n("AButton",{on:{click:function(e){t.visibleComment=!1}}},[t._v("بستن")])],1)]):t._e()],1)])],1)},o=[],r=(n("96cf"),n("1da1")),i=n("ff6e"),a=(n("6762"),n("2fdb"),n("e0d2")),c=n("07a4"),l=new a["b"]("https://henzagold.com/oapi/admin/comment/table","لیست دیدگاه ها");l.add(new a["a"]("product_id","شناسه محصول").filterNumber().hidden()),l.add(new a["a"]("product.title","نام محصول").filterNumber().renderSlot("productName")),l.add(new a["a"]("customer.id","شناسه نویسنده دیدگاه").filterNumber().hidden()),l.add(new a["a"]("customer","نام نویسنده ").filterText().renderSlot("customer")),l.add(new a["a"]("reply","پاسخ").renderSlot("reply").noSort()),l.add(new a["a"]("sts","وضعیت").renderSlot("sts").noSort()),c["a"].state.users.roles&&c["a"].state.users.roles.includes("comment.state")&&l.add(new a["a"]("changeState","تغییر وضعیت").renderSlot("changeState").noSort()),l.add(new a["a"]("opt","عملیات").noSort().renderSlot("opt"));var m=l,u=n("04c5"),p=n("98c0"),d=n("bb36"),h={components:{FeatherIcon:u["a"],TooltipBtn:p["a"],XTable:i["a"]},data:function(){return{tempRow:void 0,model:m,visibleComment:!1,Comment:null,Show_Change_Comment_Btn:!1,Reply:null,Show_Change_Reply_Btn:!1}},computed:{getIcon:function(){return this.editMode?"CheckIcon":"EditIcon"}},methods:{viewComment:function(t){this.tempRow=t,this.Reply=t.reply[0]?t.reply[0].comment:null,this.Comment=t.comment,this.visibleComment=!0},changeComment:function(t,e){this.Show_Change_Comment_Btn=t!==e},changeReply:function(t,e){e[0]?t!==e[0].comment?this.Show_Change_Reply_Btn=!0:this.Show_Change_Reply_Btn=!1:this.Show_Change_Reply_Btn=null!=t&&""!=t},DeleteComment:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,d["c"].delete("comment/".concat(e));case 3:this.$message.success("دیدگاه حذف شد"),this.$refs.tbl.fetch(),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),this.$message.error("خطا در حذف دیدگاه");case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(e){return t.apply(this,arguments)}return e}(),Change_Sts:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,d["c"].post("comment/sts",{comment_id:e,sts:n});case 3:this.$message.success("وضعیت دیدگاه با موفقیت تغییر یافت"),this.$refs.tbl.fetch(),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),this.$message.error("خطا در تغییر وضعیت دیدگاه");case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(e,n){return t.apply(this,arguments)}return e}(),Submit_Changes:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var n,s,o,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,n=e.id,s=this.Comment,o=e.reply[0]?e.reply[0].id:null,r=null!==this.Reply&&""!==this.Reply?this.Reply:null,console.log(n," ",s," ",o," ",r),t.next=8,d["c"].post("comment",{comment_id:n,comment_text:s,reply_id:o,reply_text:r});case 8:this.$message.success("تغییرات با موفقیت ثبت شد"),this.visibleComment=!1,this.$refs.tbl.fetch(),this.Show_Change_Reply_Btn=!1,t.next=17;break;case 14:t.prev=14,t.t0=t["catch"](0),this.$message.error("خطا در ثبت تغییرات");case 17:case"end":return t.stop()}}),t,this,[[0,14]])})));function e(e){return t.apply(this,arguments)}return e}()}},v=h,f=(n("0452"),n("2877")),_=Object(f["a"])(v,s,o,!1,null,null,null);e["default"]=_.exports},5697:function(t,e,n){},"98c0":function(t,e,n){"use strict";var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("ATooltip",{attrs:{title:t.title}},[t.popTitle?n("APopconfirm",{attrs:{"ok-text":"بله","cancel-text":"خیر",title:t.popTitle},on:{confirm:t.onClick}},[n("feather-icon",{staticClass:"cursor-pointer",attrs:{icon:t.icon,"svg-classes":t.iconClass}})],1):n("div",[n("feather-icon",{staticClass:"cursor-pointer",attrs:{icon:t.icon,"svg-classes":t.iconClass},on:{click:t.onClick}})],1)],1)],1)},o=[],r={name:"TooltipBtn",props:{title:{},popTitle:{},icon:{},iconClass:{default:"w-5 h-5"}},methods:{onClick:function(){this.$emit("click")}}},i=r,a=n("2877"),c=Object(a["a"])(i,s,o,!1,null,"00dfccd3",null);e["a"]=c.exports}}]); //# sourceMappingURL=chunk-ced4de10.ac26514c.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure