1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["c.d.f.g"],{"1d8f":function(e,t,s){"use strict";s("7002")},"21fd":function(e,t,s){},5181:function(e,t,s){},5549:function(e,t,s){"use strict";s("b0c0");var i=function(){var e=this,t=e._self._c;return t("el-dropdown",{staticClass:"nodUpload",attrs:{"split-button":"",placement:"bottom-start"}},[t("el-upload",{attrs:{action:e.action,headers:{Token:e.$store.state.token},"show-file-list":!1,"on-success":e.uploadSuccess}},[t("i",{staticClass:"text el-icon-upload"},[e._v(" 点击上传")])]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e.files.length>0?[e._l(e.files,(function(s,i){return[t("li",[t("el-row",[t("el-col",{attrs:{span:22}},[t("p",{staticClass:"file",on:{click:function(t){return e.preview(s)}}},[e._v(e._s(s.name))])]),t("el-col",{attrs:{span:2}},[t("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.remove(i)}}})])],1)],1)]}))]:[t("li",{staticClass:"empty"},[e._v("暂无文件信息")])]],2)],1)},n=[],o=(s("99af"),s("14d9"),s("a434"),{name:"NodUpload",props:{value:{required:!0,type:Array},action:{required:!0}},data:function(){return{files:[]}},created:function(){this.files=[].concat(this.value)},watch:{value:{handler:function(e){this.$lib.comparison(e,this.files)||(this.files=[].concat(e))},deep:!0}},methods:{uploadSuccess:function(e,t){"success"==e.state?(this.files.push({name:t.name,url:e.info}),this.incident(),this.$message({type:"success",message:"[ "+t.name+" ] 上传成功!"})):"error"==e.state?this.$message({type:"warning",message:"[ "+t.name+" ]"+e.info}):this.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})},remove:function(e){this.files.splice(e,1),this.incident()},incident:function(){this.$emit("input",this.files),this.$emit("change",this.files)},preview:function(e){this.$message({type:"success",message:"[ "+e.name+" ] 下载请求中..."}),setTimeout((function(){window.open(e.url)}),1e3)}}}),a=o,r=(s("fbb4"),s("2877")),l=Object(r["a"])(a,i,n,!1,null,"7b62d576",null);t["a"]=l.exports},"56d9":function(e,t,s){"use strict";var i=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"setter"},[e.hasData?t("i",{staticClass:"el-icon-delete",on:{click:e.delRow}}):t("i",{staticClass:"el-icon-document",on:{click:e.setRow}})])},n=[],o=s("2b0e"),a=o["default"].extend({name:"Setter",computed:{hasData:function(){return null!=this.params.node.data.key}},methods:{setRow:function(){this.$parent.$emit("setter",this.params.api.getFocusedCell())},delRow:function(){this.params.api.applyTransaction({remove:[this.params.data]}),this.params.context.runHandleGrid()}}}),r=a,l=s("2877"),c=Object(l["a"])(r,i,n,!1,null,null,null);t["a"]=c.exports},"5fb4":function(e,t,s){"use strict";var i=function(){var e=this,t=e._self._c;return e.fields.length>0?t("draggable",{staticClass:"fieldForm",attrs:{list:e.fields,disabled:!e.drag,tag:"div"},on:{choose:e.dragChoose,end:e.dragEnd}},[e._l(e.fields,(function(s,i){return[t("el-form-item",{key:i,attrs:{label:s.label,prop:e.prefix+s.prop,rules:s.rules}},["text"==s.type?[t("el-input",{attrs:{type:"text",placeholder:s.placeholder},model:{value:e.source[s.model],callback:function(t){e.$set(e.source,s.model,t)},expression:"source[field.model]"}})]:e._e(),"time"==s.type?[t("el-date-picker",{attrs:{type:"date",placeholder:s.placeholder,"value-format":"yyyy-MM-dd"},model:{value:e.source[s.model],callback:function(t){e.$set(e.source,s.model,t)},expression:"source[field.model]"}})]:e._e(),"textarea"==s.type?[t("el-input",{attrs:{type:"textarea",placeholder:s.placeholder},model:{value:e.source[s.model],callback:function(t){e.$set(e.source,s.model,t)},expression:"source[field.model]"}})]:e._e(),"select"==s.type?[t("el-select",{attrs:{placeholder:s.placeholder,clearable:""},model:{value:e.source[s.model],callback:function(t){e.$set(e.source,s.model,t)},expression:"source[field.model]"}},e._l(s.options,(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)]:e._e(),"checkbox"==s.type?[t("el-checkbox-group",{model:{value:e.source[s.model],callback:function(t){e.$set(e.source,s.model,t)},expression:"source[field.model]"}},e._l(s.checkboxs,(function(e){return t("el-checkbox",{key:e,attrs:{label:e}})})),1)]:e._e(),"upload"==s.type?[t("NodUpload",{attrs:{action:e.$base.web+"service/fieldUpload"},model:{value:e.source[s.model],callback:function(t){e.$set(e.source,s.model,t)},expression:"source[field.model]"}})]:e._e()],2)]}))],2):e._e()},n=[],o=s("b85c"),a=s("b76a"),r=s.n(a),l=s("5549"),c={name:"FieldForm",components:{draggable:r.a,NodUpload:l["a"]},props:{value:{required:!0,type:Object},prefix:{default:""},rule:{required:!0},drag:{default:!1}},data:function(){return{source:{},fields:[]}},computed:{store:function(){return this.$store.state}},watch:{value:{handler:function(e){this.$lib.comparison(e,this.source)||this.init()},deep:!0},source:{handler:function(e){this.$emit("input",this.$lib.extend(!0,{},this.source))},deep:!0}},created:function(){Array.isArray(this.rule)?(this.fields=this.rule,this.init()):this.store.fields.hasOwnProperty(this.rule)&&(this.fields=this.store.fields[this.rule],this.init())},methods:{init:function(){var e,t={},s={},i=Object(o["a"])(this.fields);try{for(i.s();!(e=i.n()).done;){var n=e.value;t[n.model]=n.value,this.value.hasOwnProperty(n.model)&&!this.$lib.VariableEqual(n.value,this.value[n.model])&&(s[n.model]=n.value)}}catch(a){i.e(a)}finally{i.f()}this.source=this.$lib.extend(!0,{},t,this.value,s)},dragChoose:function(e){this.$emit("dragChoose",e.oldIndex)},dragEnd:function(e){this.$emit("dragEnd",e.newIndex)}}},u=c,d=s("2877"),p=Object(d["a"])(u,i,n,!1,null,null,null);t["a"]=p.exports},"62f5":function(e,t,s){"use strict";s("5181")},7002:function(e,t,s){},7709:function(e,t,s){"use strict";s("9cdc")},"7bda":function(module,__webpack_exports__,__webpack_require__){"use strict";var C_dnmp_www_erp_community_web_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("b85c"),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("a15b"),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("d81d"),core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("14d9"),core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_3__);__webpack_exports__["a"]={name:"PageStatus",props:{config:{default:function(){return[{text:"HELLO NODCLOUD",type:"text"}]}},model:{default:""}},data:function(){return{text:[]}},created:function(){this.handle()},watch:{model:function(e){this.handle()}},methods:{handle:function handle(){var _this=this,arr=[],_iterator=Object(C_dnmp_www_erp_community_web_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__["a"])(this.config),_step;try{var _loop=function _loop(){var configVo=_step.value,text="";if("text"==configVo.type)text=configVo.text;else if("count"==configVo.type)text=configVo.text+":"+_this.model.length;else if("sum"==configVo.type){var number=_this.$calc.chain(0);_this.model.map((function(modelVo){number.add(eval("modelVo."+configVo.key))})),text=configVo.text+":"+number.done()}else if("avg"==configVo.type){var _number=_this.$calc.chain(0);_this.model.map((function(modelVo){_number.add(eval("modelVo."+configVo.key))})),_number=_this.$calc.chain(_number.done()).divide(_this.model.length).round(4).done(),text=configVo.text+":"+_number}configVo.hasOwnProperty("fun")&&(text=configVo.fun(text)),arr.push(text)};for(_iterator.s();!(_step=_iterator.n()).done;)_loop()}catch(err){_iterator.e(err)}finally{_iterator.f()}this.text=arr.join(" | ")}}}},"947e":function(e,t,s){"use strict";var i=function(){var e=this,t=e._self._c;return t("span",{staticClass:"pageStatus"},[e._v(" "+e._s(e.text)+" ")])},n=[],o=s("7bda"),a=o["a"],r=(s("1d8f"),s("2877")),l=Object(r["a"])(a,i,n,!1,null,"7c9bcf1f",null);t["a"]=l.exports},"9cdc":function(e,t,s){},a389:function(e,t,s){"use strict";var i=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"dispose"},[t("i",{staticClass:"ico el-icon-s-tools",on:{click:function(t){e.dialog=!0}}}),t("el-dialog",{directives:[{name:"madeDialog",rawName:"v-madeDialog"}],staticClass:"disposeTable",attrs:{visible:e.dialog,title:"字段配置",width:"390px","append-to-body":!0},on:{"update:visible":function(t){e.dialog=t}}},[t("transition",{attrs:{name:"el-fade-in"}},[e.dialog?[t("el-table",{attrs:{data:e.list,"row-key":"key",size:"mini",border:""}},[t("el-table-column",{attrs:{prop:"name",label:"名称",align:"center"}}),t("el-table-column",{attrs:{label:"显示",align:"center",width:"120px"},scopedSlots:e._u([{key:"default",fn:function(s){return[t("el-switch",{on:{change:function(t){e.hideChange(s.row.key,t)}},model:{value:s.row.show,callback:function(t){e.$set(s.row,"show",t)},expression:"scope.row.show"}})]}}],null,!1,4042958619)})],1)]:e._e()],2)],1)],1)},n=[],o=(s("99af"),s("14d9"),s("e9c4"),s("b64b"),s("d3b7"),s("159b"),s("2b0e")),a=(s("aa47"),o["default"].extend({name:"Dispose",data:function(){return{dialog:!1,list:[]}},methods:{init:function(){var e=this;this.params.columnApi.columnController.columnDefs.forEach((function(t){!0===t.dispose&&e.list.push({name:t.headerName,key:t.field,show:!t.hide})}));var t=localStorage.getItem(this.params.dispose.key);if(t){t=JSON.parse(t);var s=this.$lib.distinct(this.$lib.arrayColumn(this.list,"key").concat(this.$lib.arrayColumn(t,"key")));s.length==this.list.length?this.list=t:(localStorage.removeItem(this.params.dispose.key),this.$message({type:"success",message:"数据表格配置改变,恢复默认配置!"}))}this.list.forEach((function(t){e.params.columnApi.setColumnVisible(t.key,t.show)}))},writeStorage:function(){localStorage.setItem(this.params.dispose.key,JSON.stringify(this.list))},hideChange:function(e,t){this.params.columnApi.setColumnVisible(e,t),this.writeStorage()}},mounted:function(){var e=this;this.$nextTick((function(){e.init()}))}})),r=a,l=(s("62f5"),s("2877")),c=Object(l["a"])(r,i,n,!1,null,"1eea1354",null);t["a"]=c.exports},a447:function(e,t,s){"use strict";s("b0c0");var i=function(){var e=this,t=e._self._c;return t("el-popover",{ref:"nodList",staticClass:"nodList",attrs:{disabled:e.disabled}},[t("template",{slot:"reference"},[t("el-input",{ref:"label",attrs:{placeholder:e.placeholder,tabindex:"-1",disabled:e.disabled,readonly:""},nativeOn:{keydown:function(t){return e.inputEvent.apply(null,arguments)}},model:{value:e.label,callback:function(t){e.label=t},expression:"label"}},[t("template",{slot:"suffix"},[t("i",{class:["el-input__icon",""==e.label?"el-icon-arrow-down":"el-icon-circle-close"],on:{click:function(t){return t.stopPropagation(),e.delModel.apply(null,arguments)}}})])],2)],1),t("div",{staticClass:"selectBox"},[t("el-input",{ref:"search",attrs:{placeholder:"F1 输入内容回车搜索","prefix-icon":"el-icon-search",size:"mini",tagkey:"search"},nativeOn:{keydown:function(t){return t.stopPropagation(),e.searchEvent.apply(null,arguments)}},model:{value:e.query,callback:function(t){e.query=t},expression:"query"}}),e.optionList.length>0?[t("ul",{staticClass:"list"},[e._l(e.optionList,(function(s,i){return[t("li",{class:[{selected:s.id==e.value},{foucs:i==e.foucs}],on:{click:function(t){return e.setOption(s)}}},[e._v(e._s(s.name))])]}))],2)]:[t("p",{staticClass:"emptyList"},[e._v("未查询到数据")])],t("div",{staticClass:"operate"},[t("el-pagination",{attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,layout:"prev,next,total",background:""},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"current-change":function(t){return e.record(0)}}})],1)],2)],2)},n=[],o=(s("7db0"),s("d3b7"),s("ac1f"),s("841c"),{name:"NodList",props:{value:{required:!0},action:{required:!0},scene:{required:!0},parm:{default:function(){return{}}},disabled:{default:!1},placeholder:{default:"请点击选择数据"}},data:function(){return{id:null,label:"",query:"",optionList:[],foucs:0,page:{current:1,total:0,size:6}}},created:function(){this.record(1),this.get()},watch:{value:function(e,t){e==t||this.get()}},methods:{init:function(){this.id=null,this.label="",this.query="",this.page={current:1,total:0,size:6},this.record(1),this.$emit("input",null),this.$emit("change",null)},record:function(e){var t=this;0==e||(this.page.current=e);var s=Object.assign({},this.parm,{page:this.page.current,limit:this.page.size,query:this.query});this.$axios.post(this.action,s).then((function(e){"success"==e.state?(t.optionList=e.info,t.page.total=e.count,t.optionList.length>0&&"search"==document.activeElement.getAttribute("tagkey")&&(t.foucs=0,t.$refs.label.focus())):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},get:function(){var e=this;if(null!=this.value&&!this.$lib.validate("empty",this.value)){var t=this.optionList.find((function(t){return t.id==e.value}));void 0==t?this.$axios.post("service/getScene",{id:this.value,scene:this.scene}).then((function(t){"success"==t.state?null==t.info?e.$message({type:"warning",message:"[ NodList ]指定数据查询结果为空!"}):e.setOption(t.info):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})):this.setOption(t)}},setOption:function(e){e.id!=this.id&&(this.id=e.id,this.label=e.name,this.$emit("input",e.id),this.$emit("change",e)),this.$refs["nodList"].showPopper=!1},delModel:function(){this.id=null,this.label="",this.$emit("input",null),this.$emit("change",null),this.$refs["nodList"].showPopper=!1},switchState:function(){this.$refs.label.focus(),this.$refs["nodList"].showPopper=!this.$refs["nodList"].showPopper},inputEvent:function(e){var t=e.keyCode;this.$refs["nodList"].showPopper?13==t?this.setOption(this.optionList[this.foucs]):27==t?e.stopPropagation():38==t?this.optionList.hasOwnProperty(this.foucs-1)&&this.foucs--:40==t?this.optionList.hasOwnProperty(this.foucs+1)&&this.foucs++:112==t&&(this.$refs.search.focus(),e.preventDefault(),e.stopPropagation()):13==t&&(this.$refs["nodList"].showPopper=!0),46==t&&this.delModel()},searchEvent:function(e){var t=e.keyCode;13==t?this.record(1):27==t?(this.$refs.label.focus(),this.$refs["nodList"].showPopper=!1):112==t&&e.preventDefault()}}}),a=o,r=(s("bdbf"),s("2877")),l=Object(r["a"])(a,i,n,!1,null,"404ad2bf",null);t["a"]=l.exports},b786:function(e,t,s){"use strict";var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"status"},[t("p",[e._v(e._s(e.text))]),e._t("default")],2)},n=[],o=s("b85c"),a=(s("a15b"),s("14d9"),s("d3b7"),s("159b"),{name:"Status",props:{config:{default:function(){return[{text:"HELLO NODCLOUD",type:"text"}]}},source:{default:function(){return[]}}},data:function(){return{text:""}},created:function(){this.handle()},watch:{config:{handler:function(){this.handle()},deep:!0},source:function(e){this.handle()}},methods:{handle:function(){var e,t=this,s=[],i=Object(o["a"])(this.config);try{var n=function(){var i=e.value,n="";if("text"==i.type)n=i.text;else if("count"==i.type)n=i.text+":"+t.source.length;else if("sum"==i.type){var o=t.$calc.chain(0);t.source.forEach((function(e){o.add(e[i.key])})),n=i.text+":"+o.done()}else if("avg"==i.type){var a=t.$calc.chain(0);t.source.forEach((function(e){a.add(e[i.key])})),a=t.$calc.chain(a.done()).divide(t.source.length).round(4).done(),n=i.text+":"+(isNaN(a)?0:a)}i.hasOwnProperty("fun")&&(n=i.fun(n)),s.push(n)};for(i.s();!(e=i.n()).done;)n()}catch(a){i.e(a)}finally{i.f()}this.text=s.join(" | ")}}}),r=a,l=(s("7709"),s("2877")),c=Object(l["a"])(r,i,n,!1,null,"d15aa0b4",null);t["a"]=c.exports},bdbf:function(e,t,s){"use strict";s("c54b")},c3e3:function(e,t,s){"use strict";var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"lineFeed"},[e._t("default")],2)},n=[],o={name:"NodEditor",props:{tag:{required:!0},rule:{required:!0}},methods:{init:function(){for(var e=this.$el.querySelectorAll(this.tag),t=this.rule;t<e.length;t+=this.rule)e[t].parentNode.insertBefore(document.createElement("br"),e[t])}},mounted:function(){this.init()}},a=o,r=s("2877"),l=Object(r["a"])(a,i,n,!1,null,null,null);t["a"]=l.exports},c54b:function(e,t,s){},fbb4:function(e,t,s){"use strict";s("21fd")}}]); |