1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1ea01acf","chunk-f919d59e","chunk-2d0df437"],{"0537":function(e,t,a){"use strict";a("2166")},2166:function(e,t,a){},"6eb7":function(e,t,a){},"88bc":function(e,t,a){(function(t){var a=1/0,r=9007199254740991,n="[object Arguments]",i="[object Function]",l="[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 d(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 p(e,t){var a=-1,r=e?e.length:0,n=Array(r);while(++a<r)n[a]=t(e[a],a,e);return n}function m(e,t){var a=-1,r=t.length,n=e.length;while(++a<r)e[n+a]=t[a];return e}var f=Object.prototype,h=f.hasOwnProperty,v=f.toString,b=u.Symbol,g=f.propertyIsEnumerable,y=b?b.isConcatSpreadable:void 0,w=Math.max;function x(e,t,a,r,n){var i=-1,l=e.length;a||(a=P),n||(n=[]);while(++i<l){var o=e[i];t>0&&a(o)?t>1?x(o,t-1,a,r,n):m(n,o):r||(n[n.length]=o)}return n}function C(e,t){return e=Object(e),_(e,t,(function(t,a){return a in e}))}function _(e,t,a){var r=-1,n=t.length,i={};while(++r<n){var l=t[r],o=e[l];a(o,l)&&(i[l]=o)}return i}function k(e,t){return t=w(void 0===t?e.length-1:t,0),function(){var a=arguments,r=-1,n=w(a.length-t,0),i=Array(n);while(++r<n)i[r]=a[t+r];r=-1;var l=Array(t+1);while(++r<t)l[r]=a[r];return l[t]=i,d(e,this,l)}}function P(e){return O(e)||j(e)||!!(y&&e&&e[y])}function S(e){if("string"==typeof e||A(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function j(e){return L(e)&&h.call(e,"callee")&&(!g.call(e,"callee")||v.call(e)==n)}var O=Array.isArray;function F(e){return null!=e&&V(e.length)&&!I(e)}function L(e){return q(e)&&F(e)}function I(e){var t=N(e)?v.call(e):"";return t==i||t==l}function V(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function N(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return!!e&&"object"==typeof e}function A(e){return"symbol"==typeof e||q(e)&&v.call(e)==o}var U=k((function(e,t){return null==e?{}:C(e,p(x(t,1),S))}));e.exports=U}).call(this,a("c8ba"))},"95c2":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchQuery.apply(null,arguments)}}},[t("a-row",{attrs:{gutter:24}},[t("a-col",{attrs:{xl:6,lg:7,md:8,sm:24}},[t("a-form-item",{attrs:{label:"武器名字"}},[t("a-input",{attrs:{placeholder:"武器名字"},model:{value:e.queryParam.name,callback:function(t){e.$set(e.queryParam,"name",t)},expression:"queryParam.name"}})],1)],1),t("a-col",{attrs:{xl:6,lg:7,md:8,sm:24}},[t("a-select",{model:{value:e.queryParam.type,callback:function(t){e.$set(e.queryParam,"type",t)},expression:"queryParam.type"}},[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-col",{attrs:{xl:6,lg:7,md:8,sm:24}},[t("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"left",overflow:"hidden"}},[t("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.searchQuery}},[e._v("查询")]),t("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",icon:"reload"},on:{click:e.searchReset}},[e._v("重置")])],1)])],1)],1)],1),t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(t){return e.handleAdd("新增武器装备")}}},[e._v("新增")]),t("a-button",{attrs:{type:"primary",icon:"download"},on:{click:function(t){return e.handleExportXls("装备列表")}}},[e._v("导出打印")])],1),t("div",[t("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[t("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),e._v(" 已选择 "),t("a",{staticStyle:{"font-weight":"600"}},[e._v(e._s(e.selectedRowKeys.length))]),e._v("项\n "),t("a",{staticStyle:{"margin-left":"24px"},on:{click:e.onClearSelected}},[e._v("清空")])]),t("a-table",{ref:"table",staticClass:"j-table-force-nowrap",attrs:{size:"middle",bordered:"",rowKey:"id",columns:e.columns,dataSource:e.dataSource,pagination:e.ipagination,loading:e.loading,rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange}},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"htmlSlot",fn:function(a){return[t("div",{domProps:{innerHTML:e._s(a)}})]}},{key:"imgSlot",fn:function(a){return[a?t("img",{staticStyle:{"max-width":"80px","font-size":"12px","font-style":"italic"},attrs:{src:e.getImgView(a),alt:""}}):t("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[e._v("无图片")])]}},{key:"fileSlot",fn:function(a){return[a?t("a-button",{attrs:{ghost:!0,type:"primary",icon:"download",size:"small"},on:{click:function(t){return e.uploadFile(a)}}},[e._v("\n 下载\n ")]):t("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[e._v("无文件")])]}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{on:{click:function(t){return e.handleEdit(r,"编辑武器装备信息")}}},[e._v("编辑")]),t("a-divider",{attrs:{type:"vertical"}}),t("a-dropdown",[t("a",{staticClass:"ant-dropdown-link"},[e._v("更多 "),t("a-icon",{attrs:{type:"down"}})],1),t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",{on:{click:function(t){return e.handleDetail(r)}}},[t("a",[e._v("详情")])]),t("a-menu-item",[t("a-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:function(){return e.handleDelete(r.id)}}},[t("a",[e._v("删除")])])],1)],1)],1)],1)}}])})],1),t("EquipModal",{ref:"modalForm",on:{ok:e.modalFormOk}})],1)},n=[],i=(a("6eb7"),a("ac0d")),l=a("b65a"),o=a("e477"),s={name:"TourismSpotList",mixins:[l["a"],i["b"]],components:{EquipModal:o["default"]},data:function(){return{description:"武器装备列表页面",columns:[{title:"#",dataIndex:"",key:"rowIndex",width:60,align:"center",customRender:function(e,t,a){return parseInt(a)+1}},{title:"图片",align:"center",dataIndex:"image",scopedSlots:{customRender:"imgSlot"}},{title:"中文名字",align:"center",dataIndex:"name_cn"},{title:"英文名字",align:"center",dataIndex:"name_en"},{title:"长度",align:"center",dataIndex:"x"},{title:"宽度",align:"center",dataIndex:"y"},{title:"高度",align:"center",dataIndex:"z"},{title:"生产国家",align:"center",dataIndex:"made_country"},{title:"操作",dataIndex:"action",align:"center",width:147,scopedSlots:{customRender:"action"}}],url:{list:"/admin/weapon/list",delete:"/admin/weapon/delete",exportXlsUrl:"/admin/weapon/exportXls"},dictOptions:{}}},computed:{importExcelUrl:function(){return"".concat(window._CONFIG["domianURL"],"/").concat(this.url.importExcelUrl)}},methods:{initDictConfig:function(){},handleDetail:function(e){this.$refs.modalForm.edit(e),this.$refs.modalForm.title="详情",this.$refs.modalForm.editable=!1}}},c=s,u=(a("0537"),a("2877")),d=Object(u["a"])(c,r,n,!1,null,"8b6d7840",null);t["default"]=d.exports},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))},n=[],i={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"}},l=i,o=a("2877"),s=Object(o["a"])(l,r,n,!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)},n=[],i=a("0fea"),l=a("88bc"),o=a.n(l),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 n="",l="";e.model.id?(n+=e.url.edit,l="put"):(n+=e.url.add,l="post");for(var o=r.otherProps,s=o.length,c=0;c<s;c++)o[c].value=r["v"+o[c].name];var u=Object.assign(e.model,{otherProps:r.otherProps,image:r.image,x:r.x,y:r.y,z:r.z,made_country:r.made_country,name_cn:r.name_cn,name_en:r.name_en,type:r.type});Object(i["i"])(n,u,l).then((function(e){e.success?(t.$message.success(e.message),t.$emit("ok")):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.close()}))}}))},handleCancel:function(){this.close()},popupCallback:function(e){},addOtherProp:function(){if(this.otherPropName){for(var e=this.form.getFieldValue("otherProps"),t=e.length,a=!1,r=0;r<t;r++)if(e[r].name==this.otherPropName){a=!0;break}this.otherPropValidate=a?"error":"",this.otherPropHelp=a?"已经有相同的属性名字":"";var n=e.concat([{name:this.otherPropName,value:""}]);a||(this.form.setFieldsValue({otherProps:n}),this.otherPropName="")}},removeProp:function(e){var t=this.form.getFieldValue("otherProps"),a=this.form.getFieldsValue();t.forEach((function(e){e.value=a["v"+e.name]}));var r=t.slice(0);r.splice(e,1),this.form.setFieldsValue({otherProps:r})}}},d=u,p=a("2877"),m=Object(p["a"])(d,r,n,!1,null,null,null);t["default"]=m.exports},e610:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-upload",{attrs:{name:"file",listType:"picture-card",multiple:e.isMultiple,action:e.uploadAction,headers:e.headers,data:{biz:e.bizPath},fileList:e.fileList,beforeUpload:e.beforeUpload,disabled:e.disabled,isMultiple:e.isMultiple,showUploadList:e.isMultiple},on:{change:e.handleChange,preview:e.handlePreview}},[!e.isMultiple&&e.picUrl?t("img",{staticStyle:{height:"104px","max-width":"300px"},attrs:{src:e.getAvatarView()}}):t("div",[t("a-icon",{attrs:{type:e.uploadLoading?"loading":"plus"}}),t("div",{staticClass:"ant-upload-text"},[e._v(e._s(e.text))])],1),t("a-modal",{attrs:{visible:e.previewVisible,footer:null},on:{cancel:function(t){return e.handleCancel()}}},[t("img",{staticStyle:{width:"100%"},attrs:{alt:"example",src:e.previewImage}})])],1)},n=[],i=a("2b0e"),l=a("9fb0"),o=a("0fea"),s=function(){return"-"+parseInt(1e4*Math.random()+1,10)},c=function(e){if(e.lastIndexOf("\\")>=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=i["default"].ls.get(l["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;r<a.length;r++){var n=Object(o["e"])(a[r]);t.push({uid:s(),name:c(a[r]),status:"done",url:n,response:{status:"history",message:a[r]}})}this.fileList=t}else this.fileList=[]},beforeUpload:function(e){var t=e.type;if(t.indexOf("image")<0)return this.$message.warning("请上传图片"),!1},handleChange:function(e){this.picUrl=!1;var t=e.fileList;"done"===e.file.status?e.file.response.success&&(this.picUrl=!0,t=t.map((function(e){return e.response&&(e.url=e.response.message),e}))):"error"===e.file.status?this.$message.error("".concat(e.file.name," 上传失败.")):"removed"===e.file.status&&this.handleDelete(e.file),this.fileList=t,"done"!==e.file.status&&"removed"!==e.file.status||this.handlePathChange()},handlePreview:function(e){this.previewImage=e.url||e.thumbUrl,this.previewVisible=!0},getAvatarView:function(){if(this.fileList.length>0){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;r<e.length;r++)a.push(e[r].response.message);else a.push(e[e.length-1].response.message);a.length>0&&(t=a.join(",")),this.$emit("change",t)},handleDelete:function(e){},handleCancel:function(){this.close(),this.previewVisible=!1},close:function(){}},model:{prop:"value",event:"change"}},d=u,p=a("2877"),m=Object(p["a"])(d,r,n,!1,null,"244aa1d3",null);t["default"]=m.exports}}]);
|