chunk-b345c6c0.39c4ba8c.js 15 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b345c6c0"],{2095:function(e,t,n){"use strict";n.r(t);var a,i,l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split("").reduce((function(e,t){var n=t.charCodeAt(0);return n>=0&&n<=128?e+1:e+2}),0)},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=0;return e.split("").reduce((function(e,a){var i=a.charCodeAt(0);return n+=i>=0&&i<=128?1:2,n<=t?e+a:e}),"")},s={name:"Ellipsis",props:{prefixCls:{type:String,default:"ant-pro-ellipsis"},tooltip:{type:Boolean,default:!0},length:{type:Number,default:25},lines:{type:Number,default:1},fullWidthRecognition:{type:Boolean,default:!1}},methods:{},render:function(){var e=arguments[0],t=this.$props,n=t.tooltip,a=t.length,i="";return this.$slots.default&&(i=this.$slots.default.map((function(e){return e.text})).join("")),n&&l(i)>a?e("a-tooltip",[e("template",{slot:"title"},[i]),e("span",[r(i,this.length)+"…"])]):e("span",[i])}},o=s,u=n("2877"),c=Object(u["a"])(o,a,i,!1,null,null,null);t["default"]=c.exports},"3e88":function(e,t,n){"use strict";n("4033")},4033:function(e,t,n){},"61fc":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e._self._c;return t("j-select-biz-component",e._g(e._b({attrs:{width:1e3}},"j-select-biz-component",e.configs,!1),e.$listeners))},i=[],l=n("b296"),r={name:"JSelectPosition",components:{JSelectBizComponent:l["default"]},props:["value"],data:function(){return{settings:{name:"职务",displayKey:"name",returnKeys:["id","code"],listUrl:"/sys/position/list",queryParamCode:"name",queryParamText:"职务名称",columns:[{title:"职务名称",dataIndex:"name",align:"center",width:"30%",widthRight:"70%"},{title:"职务编码",dataIndex:"code",align:"center",width:"35%"},{title:"职级",dataIndex:"rank_dictText",align:"center",width:"25%"}]}}},computed:{configs:function(){return Object.assign({value:this.value},this.settings,this.$attrs)}}},s=r,o=n("2877"),u=Object(o["a"])(s,a,i,!1,null,"09d7ae7b",null);t["default"]=u.exports},b16a:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{centered:"",title:e.name+"选择",width:e.width,visible:e.visible,cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.close}},[t("a-row",{attrs:{gutter:18}},[t("a-col",{attrs:{span:16}},[t("div",{staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{layout:"inline"}},[t("a-row",{attrs:{gutter:24}},[t("a-col",{attrs:{span:14}},[t("a-form-item",{attrs:{label:e.queryParamText||e.name}},[t("a-input",{attrs:{placeholder:"请输入"+(e.queryParamText||e.name)},on:{pressEnter:e.searchQuery},model:{value:e.queryParam[e.queryParamCode||e.valueKey],callback:function(t){e.$set(e.queryParam,e.queryParamCode||e.valueKey,t)},expression:"queryParam[queryParamCode||valueKey]"}})],1)],1),t("a-col",{attrs:{span:8}},[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("a-table",{attrs:{size:"small",bordered:"",rowKey:e.rowKey,columns:e.innerColumns,dataSource:e.dataSource,pagination:e.ipagination,loading:e.loading,scroll:{y:240},rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange,type:e.multiple?"checkbox":"radio"},customRow:e.customRowFn},on:{change:e.handleTableChange}})],1),t("a-col",{attrs:{span:8}},[t("a-card",{attrs:{title:"已选"+e.name,bordered:!1,"head-style":{padding:0},"body-style":{padding:0}}},[t("a-table",e._b({attrs:{size:"small",rowKey:e.rowKey,bordered:""},scopedSlots:e._u([{key:"action",fn:function(n,a,i){return t("span",{},[t("a",{on:{click:function(t){return e.handleDeleteSelected(a,i)}}},[e._v("删除")])])}}])},"a-table",e.selectedTable,!1))],1)],1)],1)],1)},i=[],l=n("0fea"),r=n("c4db"),s=n("b65a"),o=n("ca00");function u(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=c(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,l=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw l}}}}function c(e,t){if(e){if("string"===typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y={name:"JSelectBizComponentModal",mixins:[s["a"]],components:{Ellipsis:r["a"]},props:{value:{type:Array,default:function(){return[]}},visible:{type:Boolean,default:!1},valueKey:{type:String,required:!0},multiple:{type:Boolean,default:!0},width:{type:Number,default:900},name:{type:String,default:""},listUrl:{type:String,required:!0,default:""},valueUrl:{type:String,default:""},displayKey:{type:String,default:null},columns:{type:Array,required:!0,default:function(){return[]}},queryParamCode:{type:String,default:null},queryParamText:{type:String,default:null},rowKey:{type:String,default:"id"},ellipsisLength:{type:Number,default:12}},data:function(){var e=this,t=this.$createElement;return{innerValue:[],selectedTable:{pagination:!1,scroll:{y:240},columns:[f(f({},this.columns[0]),{},{width:this.columns[0].widthRight||this.columns[0].width}),{title:"操作",dataIndex:"action",align:"center",width:60,scopedSlots:{customRender:"action"}}],dataSource:[]},renderEllipsis:function(n){return t("ellipsis",{attrs:{length:e.ellipsisLength}},[n])},url:{list:this.listUrl},ipagination:{current:1,pageSize:5,pageSizeOptions:["5","10","20","30"],showTotal:function(e,t){return t[0]+"-"+t[1]+" 共"+e+"条"},showQuickJumper:!0,showSizeChanger:!0,total:0},options:[],dataSourceMap:{}}},computed:{innerColumns:function(){var e=this,t=Object(o["b"])(this.columns);return t.forEach((function(t){-1!==e.ellipsisLength&&(t.customRender=function(t){return e.renderEllipsis(t)})})),t}},watch:{value:{deep:!0,immediate:!0,handler:function(e){this.innerValue=Object(o["b"])(e),this.selectedRowKeys=[],this.valueWatchHandler(e),this.queryOptionsByValue(e)}},dataSource:{deep:!0,handler:function(e){this.emitOptions(e),this.valueWatchHandler(this.innerValue)}},selectedRowKeys:{immediate:!0,deep:!0,handler:function(e){var t=this;this.selectedTable.dataSource=e.map((function(e){var n,a=u(t.dataSource);try{for(a.s();!(n=a.n()).done;){var i=n.value;if(i[t.rowKey]===e)return Object(o["f"])(t.innerValue,i[t.valueKey]),i}}catch(c){a.e(c)}finally{a.f()}var l,r=u(t.selectedTable.dataSource);try{for(r.s();!(l=r.n()).done;){var s=l.value;if(s[t.rowKey]===e)return Object(o["f"])(t.innerValue,s[t.valueKey]),s}}catch(c){r.e(c)}finally{r.f()}return{}}))}}},methods:{close:function(){this.$emit("update:visible",!1)},valueWatchHandler:function(e){var t=this;e.forEach((function(e){t.dataSource.concat(t.selectedTable.dataSource).forEach((function(n){n[t.valueKey]===e&&Object(o["f"])(t.selectedRowKeys,n[t.rowKey])}))}))},queryOptionsByValue:function(e){var t,n=this;if(e&&0!==e.length){var a,i=!1,r=u(e);try{for(r.s();!(a=r.n()).done;){var s,c=a.value,d=!1,p=u(this.options);try{for(p.s();!(s=p.n()).done;){var f=s.value;if(c===f.value){d=!0;break}}}catch(y){p.e(y)}finally{p.f()}if(!d){i=!0;break}}}catch(y){r.e(y)}finally{r.f()}i&&Object(l["c"])(this.valueUrl||this.listUrl,(t={},h(t,this.valueKey,e.join(",")+","),h(t,"pageNo",1),h(t,"pageSize",e.length),t)).then((function(e){if(e.success){var t=e.result;t instanceof Array||(t=e.result.records),n.emitOptions(t,(function(e){Object(o["f"])(n.innerValue,e[n.valueKey]),Object(o["f"])(n.selectedRowKeys,e[n.rowKey]),Object(o["f"])(n.selectedTable.dataSource,e,n.rowKey)}))}}))}},emitOptions:function(e,t){var n=this;e.forEach((function(e){var a=e[n.valueKey];n.dataSourceMap[a]=e,Object(o["f"])(n.options,{label:e[n.displayKey||n.valueKey],value:a},"value"),"function"===typeof t&&t(e)})),this.$emit("options",this.options,this.dataSourceMap)},handleOk:function(){var e=this,t=this.selectedTable.dataSource.map((function(t){return t[e.valueKey]}));this.$emit("input",t),this.close()},handleDeleteSelected:function(e,t){this.selectedRowKeys.splice(this.selectedRowKeys.indexOf(e[this.rowKey]),1),this.selectedTable.dataSource.splice(t,1)},customRowFn:function(e){var t=this;return{on:{click:function(){var n=e[t.rowKey];if(t.multiple){var a=t.selectedRowKeys.indexOf(n);-1===a?(t.selectedRowKeys.push(n),t.selectedTable.dataSource.push(e)):t.handleDeleteSelected(e,a)}else t.selectedRowKeys=[n],t.selectedTable.dataSource=[e]}}}}}},m=y,b=n("2877"),v=Object(b["a"])(m,a,i,!1,null,"2c48e243",null);t["default"]=v.exports},b296:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e._self._c;return t("a-row",{staticClass:"j-select-biz-component-box",attrs:{type:"flex",gutter:8}},[t("a-col",{staticClass:"left",class:{full:!e.buttons}},[e._t("left",(function(){return[t("a-select",{staticStyle:{width:"100%"},attrs:{mode:"multiple",placeholder:e.placeholder,options:e.selectOptions,allowClear:"",disabled:e.disabled,open:e.selectOpen},on:{dropdownVisibleChange:e.handleDropdownVisibleChange},nativeOn:{click:function(t){e.visible=!e.buttons||e.visible}},model:{value:e.selectValue,callback:function(t){e.selectValue=t},expression:"selectValue"}})]}))],2),e.buttons?t("a-col",{staticClass:"right"},[t("a-button",{attrs:{type:"primary",icon:"search",disabled:e.disabled},on:{click:function(t){e.visible=!0}}},[e._v(e._s(e.selectButtonText))])],1):e._e(),t("j-select-biz-component-modal",e._b({attrs:{visible:e.visible},on:{"update:visible":function(t){e.visible=t},options:e.handleOptions},model:{value:e.selectValue,callback:function(t){e.selectValue=t},expression:"selectValue"}},"j-select-biz-component-modal",e.modalProps,!1))],1)},i=[],l=n("b16a"),r={name:"JSelectBizComponent",components:{JSelectBizComponentModal:l["default"]},props:{value:{type:String,default:""},returnId:{type:Boolean,default:!1},placeholder:{type:String,default:"请选择"},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},buttons:{type:Boolean,default:!0},displayKey:{type:String,default:null},returnKeys:{type:Array,default:function(){return["id","id"]}},selectButtonText:{type:String,default:"选择"}},data:function(){return{selectValue:[],selectOptions:[],dataSourceMap:{},visible:!1,selectOpen:!1}},computed:{valueKey:function(){return this.returnId?this.returnKeys[0]:this.returnKeys[1]},modalProps:function(){return Object.assign({valueKey:this.valueKey,multiple:this.multiple,returnKeys:this.returnKeys,displayKey:this.displayKey||this.valueKey},this.$attrs)}},watch:{value:{immediate:!0,handler:function(e){this.selectValue=e?e.split(","):[]}},selectValue:{deep:!0,handler:function(e){var t=this,n=e.map((function(e){return t.dataSourceMap[e]}));this.$emit("select",n);var a=e.join(",");this.$emit("input",a),this.$emit("change",a)}}},methods:{handleOptions:function(e,t){this.selectOptions=e,this.dataSourceMap=t},handleDropdownVisibleChange:function(){var e=this;this.selectOpen=!0,this.$nextTick((function(){e.selectOpen=!1}))}}},s=r,o=(n("3e88"),n("2877")),u=Object(o["a"])(s,a,i,!1,null,"11dfb11e",null);t["default"]=u.exports},c4db:function(e,t,n){"use strict";var a=n("2095");t["a"]=a["default"]},e610:function(e,t,n){"use strict";n.r(t);var a=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)},i=[],l=n("2b0e"),r=n("9fb0"),s=n("0fea"),o=function(){return"-"+parseInt(1e4*Math.random()+1,10)},u=function(e){if(e.lastIndexOf("\\")>=0){var t=new RegExp("\\\\","g");e=e.replace(t,"/")}return e.substring(e.lastIndexOf("/")+1)},c={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(r["a"]);this.headers={"X-Access-Token":e}},methods:{initFileList:function(e){if(e&&0!=e.length){this.picUrl=!0;for(var t=[],n=e.split(","),a=0;a<n.length;a++){var i=Object(s["e"])(n[a]);t.push({uid:o(),name:u(n[a]),status:"done",url:i,response:{status:"history",message:n[a]}})}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(s["e"])(e)}},handlePathChange:function(){var e=this.fileList,t="";e&&0!=e.length||(t="");var n=[];if(this.isMultiple)for(var a=0;a<e.length;a++)n.push(e[a].response.message);else n.push(e[e.length-1].response.message);n.length>0&&(t=n.join(",")),this.$emit("change",t)},handleDelete:function(e){},handleCancel:function(){this.close(),this.previewVisible=!1},close:function(){}},model:{prop:"value",event:"change"}},d=c,p=n("2877"),f=Object(p["a"])(d,a,i,!1,null,"244aa1d3",null);t["default"]=f.exports}}]);