/
home
/
liman
/
panel
/
js
/
File Upload :
llllll
Current File: /home/liman/panel/js/6488-legacy.6eade292.js
(self["webpackChunkliman"]=self["webpackChunkliman"]||[]).push([[6488],{78293:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("x-table",{ref:"userTbl",attrs:{model:t.model,"default-filters":[{field:"user_type",value:1}]},scopedSlots:t._u([{key:"operator",fn:function(e){var r=e.record;return n("div",{staticClass:"grid grid-cols-1 md:grid-cols-3 gap-4"},[n("a-tooltip",[n("template",{slot:"title"},[t._v(" نمایش جزئیات ")]),n("span",{on:{click:function(e){return t.setInitialValue(r)}}},[n("Icon",{staticClass:"size-25 cursor-pointer",attrs:{icon:"ion:list"}})],1)],2),n("a-tooltip",[n("template",{slot:"title"},[t._v(" ویرایش ")]),n("a-popconfirm",{attrs:{title:"آیتم ویرایش شود؟","ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(e){return t.toEdit(r.id)}}},[n("Icon",{class:"size-24 cursor-pointer text-success",attrs:{icon:"ion:create-outline"}})],1)],2),n("a-tooltip",[n("template",{slot:"title"},[t._v(" حذف ")]),n("a-popconfirm",{attrs:{title:"آیتم حذف شود؟","ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(e){return t.deleteItem(r.id)}}},[n("Icon",{class:"size-24 cursor-pointer text-danger",attrs:{icon:"ion:trash-outline"}})],1)],2)],1)}}])}),t.initialValue?n("a-modal",{attrs:{footer:null},model:{value:t.view,callback:function(e){t.view=e},expression:"view"}},[n("a-descriptions",{attrs:{title:"اطلاعات ادمین",column:{xxl:3,md:2,xs:1}}},[n("a-descriptions-item",{attrs:{label:"شناسه"}},[t._v(" "+t._s(t.initialValue.id||"-")+" ")]),n("a-descriptions-item",{attrs:{label:"نام"}},[t._v(" "+t._s(t.initialValue.first_name||"-")+" ")]),n("a-descriptions-item",{attrs:{label:"نام خانوادگی"}},[t._v(" "+t._s(t.initialValue.last_name||"-")+" ")]),n("a-descriptions-item",{attrs:{label:"ایمیل"}},[t._v(" "+t._s(t.initialValue.email||"-")+" ")]),n("a-descriptions-item",{attrs:{label:"شماره تلفن"}},[t._v(" "+t._s(t.initialValue.mobile||"-")+" ")]),n("a-descriptions-item",{attrs:{label:"نام کاربری"}},[t._v(" "+t._s(t.initialValue.username||"-")+" ")]),n("a-descriptions-item",{attrs:{label:"کد ملی"}},[t._v(" "+t._s(t.initialValue.national_code||"-")+" ")]),n("a-descriptions-item",{attrs:{label:"آدرس",span:2}},[t._v(" "+t._s(t.initialValue.address||"-")+" ")])],1)],1):t._e()],1)},i=[],a=n(66790),s=n(11179),o={mixins:[s.Z],name:"userList",components:{XTable:a.Z}},c=o,l=n(38e3),u=(0,l.Z)(c,r,i,!1,null,null,null),m=u.exports},11179:function(t,e,n){"use strict";var r=n(37703);n(49955),n(49966),n(97244),n(776),n(50098);e["Z"]={data:function(){return{initialValue:void 0,model:void 0,view:!1}},computed:{id:function(){return this.$route.params.id},restfull:function(){return this.$route.meta.restfull},restfullPath:function(){return this.$route.meta.restfullPath||this.$route.meta.restfull},customRoute:function(){return this.$route.meta.isCustomRoute}},created:function(){var t=this;return(0,r.Z)(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,n(18847)("./".concat(t.restfull,"Tbl"));case 2:if(r=e.sent,t.model=r.default,!t.id||t.customRoute){e.next=7;break}return e.next=7,t.getData();case 7:if(!(t.initialValue&&t.initialValue.city&&t.initialValue.province)){e.next=10;break}return e.next=10,t.getCities(t.initialValue.province);case 10:case"end":return e.stop()}}),e)})))()},methods:{getData:function(){var t=arguments,e=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){var r,i,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t.length>0&&void 0!==t[0]?t[0]:void 0,n.prev=1,e.$store.commit("setLoading",!0),n.next=5,e.$axios.get("/".concat(e.restfullPath,"/").concat(r||e.id,"/"));case 5:i=n.sent,a=i.data,a&&a.city&&a.city.id&&a.city.parent&&a.city.parent.id?e.initialValue=Object.assign(a,{province:a.city.parent.id,city:a.city.id}):e.initialValue=a,n.next=13;break;case 10:n.prev=10,n.t0=n["catch"](1),console.log(n.t0);case 13:return n.prev=13,e.$store.commit("setLoading",!1),n.finish(13);case 16:case"end":return n.stop()}}),n,null,[[1,10,13,16]])})))()},update:function(t){var e=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,e.$store.commit("setLoading",!0),n.next=4,e.$axios.patch("/".concat(e.restfullPath,"/").concat(e.id,"/"),t);case 4:return e.$ntSuccess("اطلاعات با موفقیت آپدیت شد"),n.next=7,e.$router.push({name:"".concat(e.restfull,"_list")});case 7:n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),console.log(n.t0);case 12:return n.prev=12,e.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()},create:function(t){var e=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,e.$store.commit("setLoading",!0),n.next=4,e.$axios.post("/".concat(e.restfullPath,"/"),t);case 4:return e.$ntSuccess("اطلاعات با موفقیت ثبت شد"),n.next=7,e.$router.push({name:"".concat(e.restfull,"_list")});case 7:n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),console.log(n.t0);case 12:return n.prev=12,e.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()},toEdit:function(t){window.open("/".concat(this.restfull,"/edit/").concat(t),"_blank").focus()},setInitialValue:function(t){this.initialValue=t,this.view=!0},toView:function(t){var e=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.getData(t);case 2:e.view=!0;case 3:case"end":return n.stop()}}),n)})))()},deleteItem:function(t){var e=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,e.$store.commit("setLoading",!0),n.next=4,e.$axios.delete("/".concat(e.restfullPath,"/").concat(t,"/"));case 4:return e.$ntSuccess("آیتم با موفقیت حذف شد"),n.next=7,e.$refs["".concat(e.restfull,"Tbl")].fetch();case 7:n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),console.log(n.t0);case 12:return n.prev=12,e.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()}}}},18847:function(t,e,n){var r={"./brandTbl":[79989,4660],"./categoryTbl":[22881,2881],"./constantTbl":[77041,7041],"./customerTbl":[61003,1003],"./documentTbl":[1370,1370],"./factorTbl":[13159,3159],"./negotiable-typeTbl":[47429,7429],"./negotiableTbl":[2941,2941],"./orderTbl":[56730,6730],"./porsantTbl":[45693,5693],"./porterTbl":[63685,3685],"./productTbl":[44740,4740],"./sasheTbl":[45868,5868],"./userTbl":[66896,6896]};function i(t){if(!n.o(r,t))return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],i=e[0];return n.e(e[1]).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=18847,t.exports=i}}]); //# sourceMappingURL=6488-legacy.6eade292.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure