You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wkcrm/static/js/chunk-091e.c54892cc.js

1 line
10 KiB

3 years ago
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-091e"],{"1a2u":function(t,e,i){"use strict";var n=i("HrRu");i.n(n).a},"2f65":function(t,e,i){},"7mY3":function(t,e,i){"use strict";var n=i("2f65");i.n(n).a},"9GgJ":function(t,e,i){"use strict";var n={name:"XrHeader",components:{},props:{iconClass:[String,Array],iconColor:String,label:String,showSearch:{type:Boolean,default:!1},searchIconType:{type:String,default:"text"},placeholder:{type:String,default:"请输入内容"},ftTop:{type:String,default:"15px"},content:[String,Number],inputAttr:{type:Object,default:function(){}}},data:function(){return{search:""}},computed:{},watch:{content:{handler:function(){this.search!=this.content&&(this.search=this.content)},immediate:!0}},mounted:function(){},beforeDestroy:function(){},methods:{inputChange:function(){this.$emit("update:content",this.search)},searchClick:function(){this.$emit("search",this.search)}}},a=(i("7mY3"),i("KHd+")),o=Object(a.a)(n,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("flexbox",{staticClass:"xr-header"},[t.iconClass?i("div",{staticClass:"xr-header__icon",style:{backgroundColor:t.iconColor}},[i("i",{class:t.iconClass})]):t._e(),t._v(" "),i("div",{staticClass:"xr-header__label"},[t.$slots.label?t._t("label"):[t._v(t._s(t.label))]],2),t._v(" "),t.showSearch?i("el-input",t._b({staticClass:"xr-header__search",class:{"is-text":"text"===t.searchIconType},style:{"margin-top":t.ftTop},attrs:{placeholder:t.placeholder},on:{input:t.inputChange},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.searchClick(e):null}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}},"el-input",t.inputAttr,!1),["text"===t.searchIconType?i("el-button",{attrs:{slot:"append",type:"primary"},nativeOn:{click:function(e){return t.searchClick(e)}},slot:"append"},[t._v("搜索")]):i("el-button",{attrs:{slot:"append",icon:"el-icon-search"},nativeOn:{click:function(e){return t.searchClick(e)}},slot:"append"})],1):t._e(),t._v(" "),i("div",{staticClass:"xr-header__ft",style:{top:t.ftTop}},[t._t("ft")],2)],1)},[],!1,null,"acb6d756",null);o.options.__file="index.vue";e.a=o.exports},HrRu:function(t,e,i){},IWDt:function(t,e,i){},KWCB:function(t,e,i){"use strict";var n=i("n9M2");i.n(n).a},gqmq:function(t,e,i){"use strict";i.r(e);var n=i("Rb0w"),a={name:"JurisdictionCreate",components:{},props:{show:{type:Boolean,default:!1},action:{type:Object,default:function(){return{type:"save"}}}},data:function(){return{loading:!1,title:"",remark:"",showTreeData:[],defaultProps:{children:"children",label:"title"}}},computed:{diaTitle:function(){return"save"==this.action.type?"新建":"编辑"}},watch:{show:function(t){t&&this.initInfo()}},mounted:function(){},methods:{initInfo:function(){"update"==this.action.type?(this.title=this.action.data.title,this.remark=this.action.data.remark):(this.title="",this.remark="",this.$refs.tree&&this.$refs.tree.setCheckedKeys([])),0==this.showTreeData.length?this.getRulesList():this.checkTreeByUpdateInfo()},getRulesList:function(){var t=this;this.loading=!0,Object(n.a)({type:"tree",pid:5}).then(function(e){t.showTreeData=e.data?[e.data]:[],t.checkTreeByUpdateInfo(),t.loading=!1}).catch(function(){t.loading=!1})},checkTreeByUpdateInfo:function(){var t=this;this.$nextTick(function(){if(t.$refs.tree){"update"==t.action.type&&t.$refs.tree.setCheckedKeys(t.getUserModuleRules(t.action.data.rules));var e=t.$refs.tree.$children&&t.$refs.tree.$children.length?t.$refs.tree.$children[0].$el:null;e&&(e=e.children&&e.children.length?e.children[0]:null)&&(e.style.display="none")}})},sureClick:function(){var t=this;if(this.title){this.loading=!0;var e=this.$refs.tree.getCheckedKeys(),i={title:this.title,remark:this.remark,rules:e.join(","),pid:5};"update"==this.action.type&&(i.id=this.action.data.id),Object(n.d)(i).then(function(e){t.loading=!1,t.$emit("submite"),t.closeView()}).catch(function(){t.loading=!1})}else this.$message.error("请填写权限名称")},closeView:function(){this.$emit("update:show",!1)},getUserModuleRules:function(t){t||(t