/
home
/
henzagold
/
admin_report
/
js
/
File Upload :
llllll
Current File: /home/henzagold/admin_report/js/chunk-e031a790.c345e15e.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e031a790"],{3755:function(e,t,r){},"504c":function(e,t,r){var n=r("9e1e"),a=r("0d58"),i=r("6821"),s=r("52a7").f;e.exports=function(e){return function(t){var r,o=i(t),c=a(o),u=c.length,l=0,d=[];while(u>l)r=c[l++],n&&!s.call(o,r)||d.push(e?[r,o[r]]:o[r]);return d}}},"79f0":function(e,t,r){"use strict";r("3755")},"7e47":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e._self._c;return t("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[t("vx-card",{attrs:{title:"دسترسی ها",id:"rid"}},[t("div",{staticClass:"grid grid-col-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-2 md:gap-2 xl:grid-cols-2 lg:gap-4 xl:gap-4"},[t("a-form-item",{attrs:{label:"سطح کاربر","has-feedback":""}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["user_type",{initialValue:null,rules:[{required:!0,message:"لطفاسطح دسترسی را انتخاب کنید"}]}],expression:"['user_type', { initialValue:null,rules: [{ required: true, message: 'لطفاسطح دسترسی را انتخاب کنید' }] }]"}],attrs:{allowClear:""},on:{change:e.selectChange}},e._l(e.userTypes,(function(r,n){return t("a-select-option",{attrs:{value:n}},[e._v("\n "+e._s(r)+"\n ")])})),1)],1),t("a-form-item",{attrs:{label:"نقش ها"}},[t("a-tree",{staticStyle:{width:"100%"},attrs:{checkable:"","default-expand-all":"","tree-data":e.treeData,"replace-fields":e.replaceFields,"auto-expand-parent":e.autoExpandParent},model:{value:e.rid,callback:function(t){e.rid=t},expression:"rid"}})],1)],1),t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("\n ذخیره\n ")])],1)],1)},a=[],i=(r("ac6a"),r("8615"),r("96cf"),r("1da1")),s=r("bb36"),o={name:"Permission",data:function(){return{form:this.$form.createForm(this,{name:"coordinated"}),expandedKeys:[],value:["0-0-0"],treeData:void 0,userTypes:void 0,autoExpandParent:!1,rid:[],replaceFields:{children:"child",title:"title"},loading:!1,keyId:null,getDataUserType:null}},methods:{getPermission:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s["b"].get("admin/permission/rid");case 3:t=e.sent,r=t.data,this.treeData=Object.values(r),e.next=11;break;case 8:throw e.prev=8,e.t0=e["catch"](0),e.t0;case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),handleSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r,n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=16;break}return e.prev=1,t.$vs.loading(),n.rid=t.rid,e.next=6,s["b"].post("admin/permission",n);case 6:t.$ntSet(),window.location.reload(),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](1),t.$ntSetError();case 13:return e.prev=13,t.$vs.loading.close(),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[1,10,13,16]])})));return function(t,r){return e.apply(this,arguments)}}())},getUserType:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,s["b"].get("admin/user/type");case 2:t=e.sent,r=t.data,this.userTypes=r;case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),loadSyncOptionChange:function(){var e=localStorage.getItem("contestId");e=this.keyId,localStorage.setItem("contestId",e);var t=localStorage.getItem("contestId");t=JSON.parse(localStorage.getItem("contestId")),localStorage.setItem("contestId",t),t&&this.getOneRid(t)},getOneRid:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.$vs.loading(),e.next=4,s["b"].get("admin/permission/".concat(t,"/"));case 4:r=e.sent,n=r.data,this.rid=n.rid,this.form.setFieldsValue(n),e.next=14;break;case 10:throw e.prev=10,e.t0=e["catch"](0),this.$ntSetError(),e.t0;case 14:return e.prev=14,this.$vs.loading.close(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[0,10,14,17]])})));function t(t){return e.apply(this,arguments)}return t}(),selectChange:function(e){this.keyId=e,this.loadSyncOptionChange()}},computed:{},mounted:function(){this.getUserType(),this.getPermission(),this.keyId=1,this.loadSyncOptionChange()}},c=o,u=(r("79f0"),r("2877")),l=Object(u["a"])(c,n,a,!1,null,null,null);t["default"]=l.exports},8615:function(e,t,r){var n=r("5ca1"),a=r("504c")(!1);n(n.S,"Object",{values:function(e){return a(e)}})}}]); //# sourceMappingURL=chunk-e031a790.c345e15e.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure