(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e97ef"],{"8e7c":function(e,a,o){"use strict";o.r(a);var l=function(){var e=this,a=e.$createElement,o=e._self._c||a;return o("a-modal",{attrs:{title:e.title,width:800,visible:e.visible,maskClosable:!1,confirmLoading:e.confirmLoading,cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[o("a-spin",{attrs:{spinning:e.confirmLoading}},[o("a-form-model",{ref:"form",attrs:{model:e.model,rules:e.validatorRules}},[o("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"code",required:"",label:"职务编码"}},[o("a-input",{attrs:{placeholder:"请输入职务编码","read-only":e.readOnly},model:{value:e.model.code,callback:function(a){e.$set(e.model,"code",a)},expression:"model.code"}})],1),o("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"name",required:"",label:"职务名称"}},[o("a-input",{attrs:{placeholder:"请输入职务名称"},model:{value:e.model.name,callback:function(a){e.$set(e.model,"name",a)},expression:"model.name"}})],1),o("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"postRank",required:"",label:"职级"}},[o("j-dict-select-tag",{attrs:{placeholder:"请选择职级",dictCode:"position_rank"},model:{value:e.model.postRank,callback:function(a){e.$set(e.model,"postRank",a)},expression:"model.postRank"}})],1)],1)],1)],1)},t=[],s=(o("88bc"),o("0fea")),i=o("4ec3"),n=o("7b16"),r=null,d={name:"SysPositionModal",components:{JDictSelectTag:n["default"]},data:function(){var e=this;return{title:"操作",visible:!1,model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,validatorRules:{code:[{required:!0,message:"请输入职务编码"},{validator:function(a,o,l){r&&clearTimeout(r),r=setTimeout((function(){Object(i["m"])({tableName:"sys_position",fieldName:"code",fieldVal:o,dataId:e.model.id}).then((function(e){e.success?l():l(e.message)})).catch(console.error)}),300)}}],name:[{required:!0,message:"请输入职务名称"}],postRank:[{required:!0,message:"请选择职级"}]},url:{add:"/sys/position/add",edit:"/sys/position/edit"},readOnly:!1}},created:function(){},methods:{add:function(){this.edit({})},edit:function(e){this.model=Object.assign({},e),this.visible=!0,e.id?this.readOnly=!0:this.readOnly=!1},close:function(){this.$emit("close"),this.visible=!1,this.$refs.form.resetFields()},handleOk:function(){var e=this,a=this;this.$refs.form.validate((function(o){if(!o)return!1;a.confirmLoading=!0;var l="",t="";e.model.id?(l+=e.url.edit,t="put"):(l+=e.url.add,t="post"),Object(s["h"])(l,e.model,t).then((function(e){e.success?(a.$message.success(e.message),a.$emit("ok")):a.$message.warning(e.message)})).finally((function(){a.confirmLoading=!1,a.close()}))}))},handleCancel:function(){this.close()}}},c=d,m=o("2877"),p=Object(m["a"])(c,l,t,!1,null,"6dbfc6c7",null);a["default"]=p.exports}}]);