(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f919d59e","chunk-2d0df437"],{"88bc":function(e,t,a){(function(t){var a=1/0,r=9007199254740991,i="[object Arguments]",l="[object Function]",n="[object GeneratorFunction]",o="[object Symbol]",s="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")();function p(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}function d(e,t){var a=-1,r=e?e.length:0,i=Array(r);while(++a0&&a(o)?t>1?C(o,t-1,a,r,i):h(i,o):r||(i[i.length]=o)}return i}function x(e,t){return e=Object(e),P(e,t,(function(t,a){return a in e}))}function P(e,t,a){var r=-1,i=t.length,l={};while(++r-1&&e%1==0&&e<=r}function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function S(e){return!!e&&"object"==typeof e}function $(e){return"symbol"==typeof e||S(e)&&v.call(e)==o}var q=_((function(e,t){return null==e?{}:x(e,d(C(t,1),k))}));e.exports=q}).call(this,a("c8ba"))},a726:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-checkbox-group",e._b({attrs:{options:e.options,value:e.checkboxArray},on:{change:e.onChange}},"a-checkbox-group",e.$attrs,!1))},i=[],l={name:"JCheckbox",props:{value:{type:String,required:!1},options:{type:Array,required:!0}},data:function(){return{checkboxArray:this.value?this.value.split(","):[]}},watch:{value:function(e){this.checkboxArray=e?this.value.split(","):[]}},methods:{onChange:function(e){this.$emit("change",e.join(","))}},model:{prop:"value",event:"change"}},n=l,o=a("2877"),s=Object(o["a"])(n,r,i,!1,null,null,null);t["default"]=s.exports},e477:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("j-modal",{attrs:{title:e.title,width:e.width,visible:e.visible,confirmLoading:e.confirmLoading,switchFullscreen:"",cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"武器图片(512x512)",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("j-image-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["image",e.validatorRules.image],expression:"['image',validatorRules.image]"}]})],1),t("a-form-item",{attrs:{label:"所属分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",e.validatorRules.type],expression:"['type',validatorRules.type]"}],attrs:{placeholder:"选择所属分类",disabled:!e.editable}},[t("a-select-option",{attrs:{value:0}},[e._v("\n 空中单位\n ")]),t("a-select-option",{attrs:{value:1}},[e._v("\n 地面单位\n ")]),t("a-select-option",{attrs:{value:2}},[e._v("\n 水上单位\n ")])],1)],1),t("a-form-item",{attrs:{label:"中文名字",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name_cn",e.validatorRules.name],expression:"['name_cn', validatorRules.name]"}],attrs:{placeholder:"中文名字",disabled:!e.editable}})],1),t("a-form-item",{attrs:{label:"英文名字",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name_en"],expression:"['name_en']"}],attrs:{placeholder:"英文名字",disabled:!e.editable}})],1),t("a-form-item",{attrs:{label:"武器长度",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["x"],expression:"['x']"}],attrs:{placeholder:"武器长度",disabled:!e.editable}})],1),t("a-form-item",{attrs:{label:"武器宽度",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["y"],expression:"['y']"}],attrs:{placeholder:"武器宽度",disabled:!e.editable}})],1),t("a-form-item",{attrs:{label:"武器高度",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["z"],expression:"['z']"}],attrs:{placeholder:"武器高度",disabled:!e.editable}})],1),t("a-form-item",{attrs:{label:"生产国家",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["made_country"],expression:"['made_country']"}],attrs:{placeholder:"生产国家",disabled:!e.editable}})],1),e._l(e.form.getFieldValue("otherProps"),(function(a,r){return t("a-form-item",{key:r,attrs:{label:a.name,labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["v".concat(a.name),{initialValue:a.value}],expression:"[`v${item.name}`, {initialValue: item.value}]"}],staticStyle:{width:"80%","margin-right":"8px"},attrs:{placeholder:"请输入"+a.name,disabled:!e.editable}}),e.editable?t("a-icon",{attrs:{type:"minus-circle-o"},on:{click:function(t){return e.removeProp(r)}}}):e._e()],1)})),e.editable?t("a-form-item",{attrs:{label:"其他参数",labelCol:e.labelCol,wrapperCol:e.wrapperCol,"validate-status":e.otherPropValidate,help:e.otherPropHelp}},[t("a-input",{staticStyle:{width:"50%","margin-right":"8px"},attrs:{placeholder:"请输入参数名称"},model:{value:e.otherPropName,callback:function(t){e.otherPropName=t},expression:"otherPropName"}}),t("a-button",{attrs:{type:"primary",icon:"add"},on:{click:e.addOtherProp}},[e._v("添加")])],1):e._e()],2)],1)],1)},i=[],l=a("0fea"),n=a("88bc"),o=a.n(n),s=(a("ca00"),a("e610")),c=a("a726"),u={name:"UserModal",components:{JImageUpload:s["default"],JCheckbox:c["default"]},data:function(){return{form:this.$form.createForm(this),title:"操作",width:800,visible:!1,model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,url:{add:"/admin/weapon/add",edit:"/admin/weapon/edit"},otherPropName:"",otherPropValidate:"",otherPropHelp:"",editable:!0}},computed:{validatorRules:function(){return{image:{rules:[{required:!0,message:"请上传武器图片!"}]},name:{rules:[{required:!0,message:"请输入中文名字!"}]},type:{rules:[{required:!0,message:"请输入武器类型!"}]},permsType:{rules:[{required:!0,message:"请输入授权策略!"}]},sortNo:{initialValue:1}}}},created:function(){},methods:{add:function(){this.edit({})},edit:function(e){var t=this;this.form.resetFields(),this.model=Object.assign({},e),this.form.getFieldDecorator("otherProps",{initialValue:[],preserve:!0}),this.editable=!0,this.visible=!0,this.$nextTick((function(){t.form.setFieldsValue(o()(t.model,"otherProps","image","type","x","y","z","made_country","name_en","name_cn"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this,t=this;this.form.validateFields((function(a,r){if(!a){t.confirmLoading=!0;var i="",n="";e.model.id?(i+=e.url.edit,n="put"):(i+=e.url.add,n="post");for(var o=r.otherProps,s=o.length,c=0;c=0){var t=new RegExp("\\\\","g");e=e.replace(t,"/")}return e.substring(e.lastIndexOf("/")+1)},u={name:"JImageUpload",data:function(){return{uploadAction:window._CONFIG["domianURL"]+"/sys/common/upload",uploadLoading:!1,picUrl:!1,headers:{},fileList:[],previewImage:"",previewVisible:!1}},props:{text:{type:String,required:!1,default:"上传"},bizPath:{type:String,required:!1,default:"temp"},value:{type:[String,Array],required:!1},disabled:{type:Boolean,required:!1,default:!1},isMultiple:{type:Boolean,required:!1,default:!1}},watch:{value:function(e){e instanceof Array?this.initFileList(e.join(",")):this.initFileList(e)}},created:function(){var e=l["default"].ls.get(n["a"]);this.headers={"X-Access-Token":e}},methods:{initFileList:function(e){if(e&&0!=e.length){this.picUrl=!0;for(var t=[],a=e.split(","),r=0;r0){var e=this.fileList[0].url;return Object(o["e"])(e)}},handlePathChange:function(){var e=this.fileList,t="";e&&0!=e.length||(t="");var a=[];if(this.isMultiple)for(var r=0;r0&&(t=a.join(",")),this.$emit("change",t)},handleDelete:function(e){},handleCancel:function(){this.close(),this.previewVisible=!1},close:function(){}},model:{prop:"value",event:"change"}},p=u,d=a("2877"),h=Object(d["a"])(p,r,i,!1,null,"244aa1d3",null);t["default"]=h.exports}}]);