iedc-go/example/tpt/js/chunk-ef454b32.e8e8b1b2.js

1 line
17 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-ef454b32"],{"0748":function(e,t,n){"use strict";n.r(t);n("b0c0"),n("ac1f"),n("841c"),n("9911");var w=n("f2bf"),v={style:{width:"100%",display:"contents"}},T={style:{padding:"10px"}},k=Object(w.n)("添加 "),S=Object(w.n)("删除"),C=Object(w.n)("搜索:"),E={key:0,style:{}},D=Object(w.n)("详情 "),_=Object(w.n)("操作 "),F=Object(w.n)("删除");var a,r,l,c=n("b85c"),o=(n("4de4"),n("2934")),i={data:function(){return{skeleton:!0,templateData:{},nowSearchTree:null,treeConfig:{},removeList:[],showTreeTabName:null,showTabLabel:!0,formAddTree:{},form:{pageSize:10,page:1},total:20,cellStyle:{padding:"2px 0px","text-align":"center",height:"40px"},headerCellStyle:{padding:"5px 0px","text-align":"center",color:"#000000",background:"darkgray",height:"40px"},shortcuts:[{text:"最近一周",value:(e=new Date,(t=new Date).setTime(t.getTime()-6048e5),[t,e])},{text:"最近一个月",value:(t=new Date,(e=new Date).setTime(e.getTime()-2592e6),[e,t])},{text:"最近三个月",value:(e=new Date,(t=new Date).setTime(t.getTime()-7776e6),[t,e])}],tableData:[],filterText:"",defaultProps:{}};var e,t},methods:{removeListClick:function(){var a=this,r=this,l=this.removeList.length;0!=l?this.$confirm("此操作将删除"+this.removeList.length+"条数据,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var e,t=Object(c.a)(a.removeList);try{for(t.s();!(e=t.n()).done;){var n=e.value;Object(o.b)(window.Hotime.data.name+"/"+a.templateData.name+"/"+n.id).then(function(){0==--l&&(r.$message({type:"success",message:"删除成功!"}),r.removeList=[],r.formDebounce(r))})}}catch(e){t.e(e)}finally{t.f()}}):r.$message({type:"warning",message:"没有选择要删除的数据!"})},removeRow:function(e){var t=this,n=this;this.$confirm("此操作将进行删除操作,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.b)(window.Hotime.data.name+"/"+t.templateData.name+"/"+e).then(function(e){0==e.status?(n.$message({type:"success",message:"删除成功!"}),n.formDebounce(n)):n.$message({type:"warn",message:e.error.msg})})})},treeNodeClick:function(e,t){null!=this.nowSearchTree&&(this.form[this.nowSearchTree.name]=e.id)},tabClick:function(e){this.form[this.nowSearchTree.name]=null,this.nowSearchTree=this.treeConfig[e.paneName],this.filterText=""},loadNode:function(e,t){var n=window.Hotime;if(0===e.level){var a={label:n.data.label};return a[this.nowSearchTree.value]=n.data.label,this.formAddTree[this.nowSearchTree.name]=null,t([a])}e=e.data.id;null==(this.formAddTree[this.nowSearchTree.name]=e)&&(this.formAddTree[this.nowSearchTree.name]=null,e=0),Object(o.e)(n.data.name+"/"+this.nowSearchTree.link,{parent_id:e,pageSize:100}).then(function(e){0==e.status&&t(e.result.data)})},formDebounce:(a=function(e){var t=window.Hotime;e.search(t.data.name,e)},r=200,function(e){l&&clearTimeout(l),l=setTimeout(function(){a(e)},r)}),sortChange:function(e){null!=e.prop?"descending"===e.order?this.form.sort=e.prop+" DESC":this.form.sort=e.prop+" ASC":this.form.sort=null},filterNode:function(e,t){return!e||-1!==t[this.nowSearchTree.value].indexOf(e)},handleSizeChange:function(e){},search:function(e,t){Object(o.e)(e+"/"+t.templateData.name,t.form).then(function(e){t.tableData=e.result.data,t.total=e.result.count,t.skeleton=!1})},handleSelectionChange:function(e){this.removeList=e}},watch:{filterText:function(e){null!=this.$refs["tree:"+this.nowSearchTree.name]&&this.$refs["tree:"+this.nowSearchTree.name].filter(e)},form:{handler:function(){this.formDebounce(this)},deep:!(l="")}},mounted:function(){var e=window.Hotime;if(this.templateData=e.mapData[this.$route.path],null!=this.templateData){if(this.treeConfig={},null!=this.templateData.columns){var t,n=Object(c.a)(this.templateData.columns);try{for(n.s();!(t=n.n()).done;){var a=t.value;null==a.value&&(a.value=a.name)}}catch(e){n.e(e)}finally{n.f()}}if(this.nowSearchTree=null,this.showTabLabel=!0,this.defaultProps={},null!=this.templateData.search){var r,l=Object(c.a)(this.templateData.search);try{for(l.s();!(r=l.n()).done;){var o=r.value;this.defaultProps[o.name]={children:"children",label:o.value,isLeaf:"leaf"},"tree"!=o.type?this.form[o.name]=o.value:(this.treeConfig[o.name]=o,null==this.nowSearchTree?(this.nowSearchTree=o,this.showTreeTabName=this.nowSearchTree.name):this.showTabLabel=!1)}}catch(e){l.e(e)}finally{l.f()}}this.formDebounce(this)}}};n("7430");i.render=function(n,e,t,a,r,l){var o=Object(w.O)("el-input"),c=Object(w.O)("el-tree"),i=Object(w.O)("el-tab-pane"),u=Object(w.O)("el-tabs"),s=Object(w.O)("el-aside"),d=Object(w.O)("el-button"),b=Object(w.O)("el-form-item"),f=Object(w.O)("el-option"),p=Object(w.O)("el-select"),h=Object(w.O)("el-date-picker"),m=Object(w.O)("el-form"),j=Object(w.O)("el-table-column"),O=Object(w.O)("el-table"),g=Object(w.O)("el-pagination"),x=Object(w.O)("el-skeleton"),y=Object(w.O)("el-main");return Object(w.F)(),Object(w.j)("div",v,[null!=r.showTreeTabName?(Object(w.F)(),Object(w.j)(s,{key:0,class:{"not-show-tab-label":r.showTabLabel},style:{width:"200px",background:"white",padding:"10px 5px 0 5px"}},{default:Object(w.db)(function(){return[Object(w.o)(o,{placeholder:"输入关键字进行过滤",clearable:"",modelValue:r.filterText,"onUpdate:modelValue":e[1]||(e[1]=function(e){return r.filterText=e}),"suffix-icon":"el-icon-search"},null,8,["modelValue"]),Object(w.o)(u,{modelValue:r.showTreeTabName,"onUpdate:modelValue":e[2]||(e[2]=function(e){return r.showTreeTabName=e}),style:{height:"calc( 100% - 37px)","margin-top":"5px"},"tab-position":"top",onTabClick:l.tabClick},{default:Object(w.db)(function(){return[(Object(w.F)(!0),Object(w.j)(w.b,null,Object(w.M)(r.treeConfig,function(e){return Object(w.F)(),Object(w.j)(i,{key:e.type,lazy:"",label:e.label,name:e.name},{default:Object(w.db)(function(){return[Object(w.o)(c,{class:"filter-tree",props:r.defaultProps[e.name],load:l.loadNode,ref:"tree:"+e.name,onNodeClick:l.treeNodeClick,lazy:"",accordion:"","filter-node-method":l.filterNode},null,8,["props","load","onNodeClick","filter-node-method"])]}),_:2},1032,["label","name"])}),128))]}),_:1},8,["modelValue","onTabClick"])]}),_:1},8,["class"])):Object(w.k)("",!0),Object(w.o)(y,{style:{padding:"0px","margin-left":"5px",background:"white"}},{default:Object(w.db)(function(){return[Object(w.o)("div",T,[Object(w.o)(x,{rows:5,animated:"",loading:r.skeleton},{default:Object(w.db)(function(){return[Object(w.o)(m,{ref:"form",model:r.form,"label-width":"2px",style:{display:"flex","align-items":"center","flex-wrap":"wrap"}},{default:Object(w.db)(function(){return[Object(w.o)(b,{style:{"margin-right":"10px","min-width":"160px"}},{default:Object(w.db)(function(){return[Object(w.o)(d,{type:"primary",icon:"el-icon-plus",onClick:e[3]||(e[3]=function(e){return n.$router.push({path:n.$route.path+"/add",query:r.formAddTree})})},{default:Object(w.db)(function(){return[k]}),_:1}),Object(w.o)(d,{plain:"",type:"danger",icon:"el-icon-delete",disabled:null==r.removeList[0],onClick:l.removeListClick},{default:Object(w.db)(function(){return[S]}),_:1},8,["disabled","onClick"])]}),_:1}),null!=r.templateData.search?(Object(w.F)(),Object(w.j)(w.b,{key:0},[Object(w.o)(b,null,{default:Object(w.db)(function(){return[C]}),_:1}),(Object(w.F)(!0),Object(w.j)(w.b,null,Object(w.M)(r.templateData.search,function(t){return Object(w.F)(),Object(w.j)(w.b,null,["select"==t.type?(Object(w.F)(),Object(w.j)(b,{key:t.type},{default:Object(w.db)(function(){return[Object(w.o)(p,{modelValue:r.form[t.name],"onUpdate:modelValue":function(e){return r.form[t.name]=e},placeholder:"请选择",style:{width:"88px"}},{default:Object(w.db)(function(){return[(Object(w.F)(!0),Object(w.j)(w.b,null,Object(w.M)(t.options,function(e){return Object(w.F)(),Object(w.j)(f,{label:e.name,value:null!=e.value?e.value:"",key:e.name},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]}),_:2},1024)):Object(w.k)("",!0),"search"==t.type&&"daterange"==t.name?(Object(w.F)(),Object(w.j)(b,{label:"",key:t.type},{default:Object(w.db)(function(){return[Object(w.o)(h,{modelValue:r.form[t.name],"onUpdate:modelValue":function(e){return r.form[t.name]=e},type:"datetimerange",shortcuts:r.shortcuts,"range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",style:{width:"220px"}},null,8,["modelValue","onUpdate:modelValue","shortcuts"])]}),_:2},1024)):Object(w.k)("",!0),"search"==t.type&&"keyword"==t.name?(Object(w.F)(),Object(w.j)(b,{key:t.type},{default:Object(w.db)(function(){return[Object(w.o)(o,{modelValue:r.form[t.name],"onUpdate:modelValue":function(e){return r.form[t.name]=e},clearable:"","prefix-icon":"el-icon-search",placeholder:"请输入关键字",style:{"min-width":"300px",width:"calc(100vw - 1170px)"}},null,8,["modelValue","onUpdate:modelValue"])]}),_:2},1024)):Object(w.k)("",!0)],64)}),256))],64)):Object(w.k)("",!0)]}),_:1},8,["model"]),Object(w.o)(O,{data:r.tableData,style:{width:"100%","margin-bottom":"20px","margin-top":"5px"},onSortChange:l.sortChange,"cell-style":r.cellStyle,onSelectionChange:l.handleSelectionChange,"header-cell-style":r.headerCellStyle},{default:Object(w.db)(function(){return[Object(w.o)(j,{type:"selection",width:"55"}),Object(w.o)(j,{label:"序号",width:"55",type:"index",align:"center"},{default:Object(w.db)(function(e){return[Object(w.o)("span",null,Object(w.S)((r.form.page-1)*r.form.pageSize+e.$index+1),1)]}),_:1}),(Object(w.F)(!0),Object(w.j)(w.b,null,Object(w.M)(r.templateData.columns,function(n){return Object(w.F)(),Object(w.j)(w.b,{key:n.type},[null==n.link?(Object(w.F)(),Object(w.j)(w.b,{key:0},[null==n.options&&0!=n.list?(Object(w.F)(),Object(w.j)(j,{key:0,prop:n.value,label:n.label,sortable:"number"==n.type&&"custom"},null,8,["prop","label","sortable"])):Object(w.k)("",!0),null!=n.options&&0!=n.list?(Object(w.F)(),Object(w.j)(j,{key:1,prop:n.value,label:n.label},{default:Object(w.db)(function(t){return[(Object(w.F)(!0),Object(w.j)(w.b,null,Object(w.M)(n.options,function(e){return Object(w.F)(),Object(w.j)("div",{key:e.name},[t.row[n.value]==e.value?(Object(w.F)(),Object(w.j)("span",E,Object(w.S)(e.name),1)):Object(w.k)("",!0)])}),128))]}),_:2},1032,["prop","label"])):Object(w.k)("",!0)],64)):Object(w.k)("",!0),null!=n.link?(Object(w.F)(),Object(w.j)(w.b,{key:1},[0!=n.list?(Object(w.F)(),Object(w.j)(j,{key:0,prop:n.link+"_"+n.name+"_"+n.value,label:n.label},null,8,["prop","label"])):Object(w.k)("",!0)],64)):Object(w.k)("",!0)],64)}),128)),Object(w.o)(j,{prop:"control",fixed:"right",label:"操作",width:"210px"},{default:Object(w.db)(function(t){return[Object(w.o)(d,{type:"info",size:"mini",onClick:function(e){return n.$router.push({path:n.$route.path+"/info",query:{id:t.row.id}})}},{default:Object(w.db)(function(){return[D]}),_:2},1032,["onClick"]),Object(w.o)(d,{type:"primary",size:"mini",onClick:function(e){return n.$router.push({path:n.$route.path+"/edit",query:{id:t.row.id}})}},{default:Object(w.db)(function(){return[_]}),_:2},1032,["onClick"]),Object(w.o)(d,{type:"danger",size:"mini",onClick:function(e){return l.removeRow(t.row.id)}},{default:Object(w.db)(function(){return[F]}),_:2},1032,["onClick"])]}),_:1})]}),_:1},8,["data","onSortChange","cell-style","onSelectionChange","header-cell-style"]),r.form.pageSize<r.total?(Object(w.F)(),Object(w.j)(g,{key:0,onSizeChange:l.handleSizeChange,style:{"text-align":"right","padding-right":"10px","padding-bottom":"10px",background:"white"},currentPage:r.form.page,"onUpdate:currentPage":e[4]||(e[4]=function(e){return r.form.page=e}),"page-size":r.form.pageSize,layout:"total,prev, pager, next, jumper",background:"",total:r.total},null,8,["onSizeChange","currentPage","page-size","total"])):Object(w.k)("",!0)]}),_:1},8,["loading"])])]}),_:1})])};t.default=i},"129f":function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},"14c3":function(e,t,n){var a=n("c6b6"),r=n("9263");e.exports=function(e,t){var n=e.exec;if("function"==typeof n){n=n.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==a(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},2934:function(e,t,n){"use strict";n.d(t,"e",function(){return l}),n.d(t,"d",function(){return o}),n.d(t,"b",function(){return c}),n.d(t,"c",function(){return i}),n.d(t,"a",function(){return u}),n.d(t,"f",function(){return s});var t=n("b0c0"),a=n("b775"),t=n("4328"),r=n.n(t);function l(e,t){return Object(a.b)({url:e,method:"GET",params:t})}function o(e,t){return Object(a.b)({url:e,method:"GET",params:t})}function c(e,t){return Object(a.b)({url:e,method:"DELETE",data:r.a.stringify(t)})}function i(e,t){return Object(a.b)({url:e,method:"PUT",data:r.a.stringify(t)})}function u(e,t){return Object(a.b)({url:e,method:"POST",data:r.a.stringify(t)})}function s(e){var t=new FormData;return t.append("file",e,e.name),Object(a.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:t})}},"4de4":function(e,t,n){"use strict";var a=n("23e7"),r=n("b727").filter;a({target:"Array",proto:!0,forced:!n("1dde")("filter")},{filter:function(e){return r(this,e,1<arguments.length?arguments[1]:void 0)}})},7430:function(e,t,n){"use strict";n("f372")},"841c":function(e,t,n){"use strict";var a=n("d784"),o=n("825a"),c=n("1d80"),i=n("129f"),u=n("14c3");a("search",1,function(a,r,l){return[function(e){var t=c(this),n=null==e?void 0:e[a];return void 0!==n?n.call(e,t):new RegExp(e)[a](String(t))},function(e){var t=l(r,e,this);if(t.done)return t.value;var n=o(e),t=String(this),e=n.lastIndex;i(e,0)||(n.lastIndex=0);t=u(n,t);return i(n.lastIndex,e)||(n.lastIndex=e),null===t?-1:t.index}]})},9263:function(e,t,n){"use strict";var d=n("ad6d"),a=n("9f7f"),r=n("5692"),b=RegExp.prototype.exec,f=r("native-string-replace",String.prototype.replace),l=b,p=(n=/a/,r=/b*/g,b.call(n,"a"),b.call(r,"a"),0!==n.lastIndex||0!==r.lastIndex),h=a.UNSUPPORTED_Y||a.BROKEN_CARET,m=void 0!==/()??/.exec("")[1];e.exports=l=p||m||h?function(e){var t,n,a,r,l=this,o=h&&l.sticky,c=d.call(l),i=l.source,u=0,s=e;return o&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),s=String(e).slice(l.lastIndex),0<l.lastIndex&&(!l.multiline||l.multiline&&"\n"!==e[l.lastIndex-1])&&(i="(?: "+i+")",s=" "+s,u++),n=new RegExp("^(?:"+i+")",c)),m&&(n=new RegExp("^"+i+"$(?!\\s)",c)),p&&(t=l.lastIndex),a=b.call(o?n:l,s),o?a?(a.input=a.input.slice(u),a[0]=a[0].slice(u),a.index=l.lastIndex,l.lastIndex+=a[0].length):l.lastIndex=0:p&&a&&(l.lastIndex=l.global?a.index+a[0].length:t),m&&a&&1<a.length&&f.call(a[0],n,function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(a[r]=void 0)}),a}:l},"9f7f":function(e,t,n){"use strict";n=n("d039");function a(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=n(function(){var e=a("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),t.BROKEN_CARET=n(function(){var e=a("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},ac1f:function(e,t,n){"use strict";var a=n("23e7"),n=n("9263");a({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},ad6d:function(e,t,n){"use strict";var a=n("825a");e.exports=function(){var e=a(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},b775:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n("d3b7"),r=n("bc3a"),a=n.n(r),r=n("4328"),l=n.n(r),o=n("3fd4"),c=n("56d7"),i="";a.a.defaults.withCredentials=!0,a.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";a=a.a.create({baseURL:i,timeout:2e4});a.interceptors.request.use(function(e){return"get"===e.method&&(e.paramsSerializer=function(e){return l.a.stringify(e,{arrayFormat:"repeat"})}),e.withCredentials=!0,e},function(e){Promise.reject(e)}),a.interceptors.response.use(function(e){return 2!==e.data.statu?e.data:(o.a.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void c.app.$router.push({path:"/login"}))},function(e){var t="err:"+e,n={};return e.response?n=e.response.data:(-1!=t.indexOf("timeout")?(n.code=500,n.message="请求超时,请稍后再试"):-1!=t.indexOf("Network Error")?(n.code=500,n.message="网络错误,请稍后再试"):(n.code=500,n.message=""+e),n)}),t.b=a},d784:function(e,t,n){"use strict";n("ac1f");var u=n("6eeb"),s=n("9263"),d=n("d039"),b=n("b622"),f=n("9112"),p=b("species"),h=RegExp.prototype,m=!d(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),j="$0"==="a".replace(/./,"$0"),n=b("replace"),O=!!/./[n]&&""===/./[n]("a","$0"),g=!d(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};e="ab".split(e);return 2!==e.length||"a"!==e[0]||"b"!==e[1]});e.exports=function(n,e,t,a){var o,r,l=b(n),c=!d(function(){var e={};return e[l]=function(){return 7},7!=""[n](e)}),i=c&&!d(function(){var e=!1,t=/a/;return"split"===n&&((t={constructor:{}}).constructor[p]=function(){return t},t.flags="",t[l]=/./[l]),t.exec=function(){return e=!0,null},t[l](""),!e});c&&i&&("replace"!==n||m&&j&&!O)&&("split"!==n||g)||(o=/./[l],t=(i=t(l,""[n],function(e,t,n,a,r){var l=t.exec;return l===s||l===h.exec?c&&!r?{done:!0,value:o.call(t,n,a)}:{done:!0,value:e.call(n,t,a)}:{done:!1}},{REPLACE_KEEPS_$0:j,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:O}))[0],r=i[1],u(String.prototype,n,t),u(h,l,2==e?function(e,t){return r.call(e,this,t)}:function(e){return r.call(e,this)})),a&&f(h[l],"sham",!0)}},f372:function(e,t,n){}}]);