chunk-40b4afaa.f5543a95.js 8.3 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-40b4afaa","chunk-2d0df437"],{"07b0":function(e,t,a){"use strict";a.r(t);var i=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:"用户",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name"],expression:"['name']"}],attrs:{disabled:"",placeholder:"用户"}})],1),t("a-form-item",{attrs:{label:"反馈",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["text"],expression:"['text']"}],attrs:{disabled:"",placeholder:"反馈"}})],1),t("a-form-item",{attrs:{label:"电话",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone"],expression:"['phone']"}],attrs:{disabled:"",placeholder:"电话"}})],1),t("a-form-item",{attrs:{label:"图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("j-image-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["images"],expression:"['images']"}],attrs:{isMultiple:"",disabled:""}})],1),t("a-form-item",{attrs:{label:"时间",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["time"],expression:"['time']"}],attrs:{disabled:"",placeholder:"时间"}})],1)],1)],1)],1)},r=[],n=(a("0fea"),a("88bc")),l=a.n(n),o=(a("ca00"),a("e610")),s=a("a726"),c={name:"UserModal",components:{JImageUpload:o["default"],JCheckbox:s["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,validatorRules:{countryName:{rules:[{required:!0,message:"请输入国家!"}]}},url:{add:"/admin/user/add",edit:"/admin/user/edit"}}},created:function(){},methods:{add:function(){this.edit({})},edit:function(e){var t=this;this.form.resetFields(),this.model=Object.assign({},e),this.visible=!0,this.$nextTick((function(){t.form.setFieldsValue(l()(t.model,"name","text","phone","images","time"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this;e.close()},handleCancel:function(){this.close()},popupCallback:function(e){}}},u=c,d=a("2877"),p=Object(d["a"])(u,i,r,!1,null,null,null);t["default"]=p.exports},"88bc":function(e,t,a){(function(t){var a=1/0,i=9007199254740991,r="[object Arguments]",n="[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,i=e?e.length:0,r=Array(i);while(++a<i)r[a]=t(e[a],a,e);return r}function h(e,t){var a=-1,i=t.length,r=e.length;while(++a<i)e[r+a]=t[a];return e}var f=Object.prototype,m=f.hasOwnProperty,b=f.toString,v=u.Symbol,g=f.propertyIsEnumerable,w=v?v.isConcatSpreadable:void 0,y=Math.max;function C(e,t,a,i,r){var n=-1,l=e.length;a||(a=O),r||(r=[]);while(++n<l){var o=e[n];t>0&&a(o)?t>1?C(o,t-1,a,i,r):h(r,o):i||(r[r.length]=o)}return r}function x(e,t){return e=Object(e),j(e,t,(function(t,a){return a in e}))}function j(e,t,a){var i=-1,r=t.length,n={};while(++i<r){var l=t[i],o=e[l];a(o,l)&&(n[l]=o)}return n}function L(e,t){return t=y(void 0===t?e.length-1:t,0),function(){var a=arguments,i=-1,r=y(a.length-t,0),n=Array(r);while(++i<r)n[i]=a[t+i];i=-1;var l=Array(t+1);while(++i<t)l[i]=a[i];return l[t]=n,d(e,this,l)}}function O(e){return U(e)||A(e)||!!(w&&e&&e[w])}function k(e){if("string"==typeof e||$(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function A(e){return M(e)&&m.call(e,"callee")&&(!g.call(e,"callee")||b.call(e)==r)}var U=Array.isArray;function F(e){return null!=e&&S(e.length)&&!I(e)}function M(e){return q(e)&&F(e)}function I(e){var t=_(e)?b.call(e):"";return t==n||t==l}function S(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function _(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return!!e&&"object"==typeof e}function $(e){return"symbol"==typeof e||q(e)&&b.call(e)==o}var N=L((function(e,t){return null==e?{}:x(e,p(C(t,1),k))}));e.exports=N}).call(this,a("c8ba"))},a726:function(e,t,a){"use strict";a.r(t);var i=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))},r=[],n={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=n,o=a("2877"),s=Object(o["a"])(l,i,r,!1,null,null,null);t["default"]=s.exports},e610:function(e,t,a){"use strict";a.r(t);var i=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)},r=[],n=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=n["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(","),i=0;i<a.length;i++){var r=Object(o["e"])(a[i]);t.push({uid:s(),name:c(a[i]),status:"done",url:r,response:{status:"history",message:a[i]}})}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 i=0;i<e.length;i++)a.push(e[i].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"),h=Object(p["a"])(d,i,r,!1,null,"244aa1d3",null);t["default"]=h.exports}}]);