hotime/example/tpt/js/chunk-3d8462ce.ac9d69b2.js
2022-02-28 09:59:05 +08:00

1 line
29 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3d8462ce","chunk-10a72523"],{"04f0":function(t,e,a){},"0cb2":function(t,e,a){var n=a("7b0b"),d=Math.floor,l="".replace,f=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,h=/\$([$&'`]|\d{1,2})/g;t.exports=function(o,i,c,r,u,t){var b=c+o.length,s=r.length,e=h;return void 0!==u&&(u=n(u),e=f),l.call(t,e,function(t,e){var a;switch(e.charAt(0)){case"$":return"$";case"&":return o;case"`":return i.slice(0,c);case"'":return i.slice(b);case"<":a=u[e.slice(1,-1)];break;default:var n=+e;if(0==n)return t;if(s<n){var l=d(n/10);return 0===l?t:l<=s?void 0===r[l-1]?e.charAt(1):r[l-1]+e.charAt(1):t}a=r[n-1]}return void 0===a?"":a})}},"2ba7":function(t,e,a){},"392a":function(t,e,a){"use strict";a("04f0")},4450:function(t,e,a){"use strict";a("8f6e")},5319:function(t,e,a){"use strict";var n=a("d784"),l=a("d039"),g=a("825a"),k=a("a691"),D=a("50c4"),x=a("577e"),o=a("1d80"),T=a("8aa5"),U=a("0cb2"),L=a("14c3"),i=a("b622")("replace"),$=Math.max,_=Math.min,a="$0"==="a".replace(/./,"$0"),c=!!/./[i]&&""===/./[i]("a","$0");n("replace",function(t,v,y){var w=c?"$":"$0";return[function(t,e){var a=o(this),n=null==t?void 0:t[i];return void 0!==n?n.call(t,a,e):v.call(x(a),t,e)},function(t,e){var a=g(this),n=x(t);if("string"==typeof e&&-1===e.indexOf(w)&&-1===e.indexOf("$<")){t=y(v,a,n,e);if(t.done)return t.value}var l="function"==typeof e;l||(e=x(e));var o,i=a.global;i&&(o=a.unicode,a.lastIndex=0);for(var c=[];;){if(null===(d=L(a,n)))break;if(c.push(d),!i)break;""===x(d[0])&&(a.lastIndex=T(n,D(a.lastIndex),o))}for(var r,u="",b=0,s=0;s<c.length;s++){for(var d=c[s],f=x(d[0]),h=$(_(k(d.index),n.length),0),j=[],p=1;p<d.length;p++)j.push(void 0===(r=d[p])?r:String(r));var m,O=d.groups,O=l?(m=[f].concat(j,h,n),void 0!==O&&m.push(O),x(e.apply(void 0,m))):U(f,n,h,j,O,e);b<=h&&(u+=n.slice(b,h)+O,b=h+f.length)}return u+n.slice(b)}]},!!l(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!a||c)},7060:function(t,e,a){"use strict";a("2ba7")},"8aa5":function(t,e,a){"use strict";var n=a("6547").charAt;t.exports=function(t,e,a){return e+(a?n(t,e).length:1)}},"8f6e":function(t,e,a){},b50c:function(t,e,a){"use strict";a.r(e);a("b0c0");var O=a("9f9f");var b=a("b85c");a("a9e3"),a("159b"),a("4de4"),a("fb6a"),a("ac1f"),a("5319"),a("9911");Object(O.O)("data-v-3a110a5c");var v=["src"],y={key:1,class:"el-icon-plus avatar-uploader-icon"},w=Object(O.r)("上传文件"),g=["title"],k={key:1,class:"radio-wrap"},D=Object(O.r)("立即修改"),x=Object(O.r)("取消");Object(O.M)();var n=a("acf7"),i=a("2934"),l=a("b775"),s=a("83c5"),o={props:{routerPath:String,routerId:Number},components:{BasicForm:n.a},data:function(){return{fileName:"",id:null,templateData:{},baseurl:l.a,formLink:{},form:{},shortcuts:[{text:"今天",value:new Date},{text:"昨天",value:((t=new Date).setTime(t.getTime()-864e5),t)},{text:"一周前",value:((t=new Date).setTime(t.getTime()-6048e5),t)}]};var t},methods:{clickLink:function(e,a){var t={name:"Table",path:window.Hotime.tableMapData[e.link].path,title:window.Hotime.tableMapData[e.link].parent.label+"-"+window.Hotime.tableMapData[e.link].label};null!=this.editDialogPath?s.a.$emit("tabs-edit",t):(s.a.$emit("dialog-edit",t),s.a.$off("table:"+window.Hotime.tableMapData[e.link].path)),s.a.$on("table:"+window.Hotime.tableMapData[e.link].path,function(t){a[e.link]=t,a[e.name]=t.id})},closeDialog:function(){this.showDialog=!1,this.dialogDataPath=null,this.dialogDataId=null,this.dialogDataQuery={}},beforeAvatarUpload:function(t,e){var a=this;return null==t||Object(i.f)(t).then(function(t){a.form[e]=t.result}),!1},close:function(){s.a.$emit("tabs-close",{name:"Edit",path:this.templateData.path,id:this.id})},onSubmit:function(){var a=this,n=this;this.$confirm("此操作将进行修改操作,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var t,e=window.Hotime;a.$refs.basicForm&&(t=a.$refs.basicForm.form,n.form.rule=JSON.stringify(t)),Object(i.c)(e.data.name+"/"+a.templateData.name+"/"+a.id,n.form).then(function(t){0==t.status?(n.$message({type:"success",message:"修改成功!"}),n.close()):n.$message({type:"warn",message:t.error.msg})})})},routeInit:function(){var l=this,o=window.Hotime;if(null!=o.mapData[this.routerPath]?(this.templateData=o.mapData[this.routerPath],this.id=this.routerId):(this.templateData=o.mapData[this.$route.path.substring(0,this.$route.path.lastIndexOf("/edit"))],this.id=this.$route.query.id),null!=this.templateData){if(null!=this.templateData.columns){var t,e=Object(b.a)(this.templateData.columns);try{for(e.s();!(t=e.n()).done;){var a=t.value;null==a.value&&(a.value=a.name)}}catch(t){e.e(t)}finally{e.f()}}Object(i.d)(o.data.name+"/"+this.templateData.name+"/"+this.id).then(function(a){if(null!=l.templateData.columns){var t,e=Object(b.a)(l.templateData.columns);try{for(e.s();!(t=e.n()).done;)!function(){var e=t.value;null!=e.link&&Object(i.e)(o.data.name+"/"+e.link,{pageSize:100}).then(function(t){0==t.status&&(l.formLink[e.link]=t.result.data,null!=a.result[e.link]&&l.formLink[e.link].push(a.result[e.link]))})}()}catch(t){e.e(t)}finally{e.f()}}for(var n in a.result)a.result[n]instanceof Object?l.form[n]=a.result[n]:l.form[n]=a.result[n]+""})}}},watch:{},mounted:function(){this.routeInit()}};a("392a"),a("7060");o.render=function(t,e,a,n,l,o){var i=Object(O.U)("el-button"),c=Object(O.U)("el-form-item"),r=Object(O.U)("el-input"),u=Object(O.U)("el-input-number"),b=Object(O.U)("el-date-picker"),s=Object(O.U)("el-upload"),d=Object(O.U)("BasicForm"),f=Object(O.U)("el-option"),h=Object(O.U)("el-select"),j=Object(O.U)("el-radio"),p=Object(O.U)("el-affix"),m=Object(O.U)("el-form");return Object(O.L)(),Object(O.l)(m,{ref:"form",model:l.form,"label-width":"180px",style:{"padding-top":"10px","overflow-y":"auto",width:"90%","padding-right":"30px",background:"white",display:"block","flex-direction":"row","flex-wrap":"wrap","align-content":"flex-start","justify-content":"flex-start"}},{default:Object(O.jb)(function(){return[(Object(O.L)(!0),Object(O.n)(O.b,null,Object(O.S)(l.templateData.columns,function(e){return Object(O.L)(),Object(O.n)("div",{key:e.type},[null!=e.link?(Object(O.L)(),Object(O.n)(O.b,{key:0},[0!=e.edit?(Object(O.L)(),Object(O.l)(c,{key:0,label:e.label+":"},{default:Object(O.jb)(function(){return[Object(O.s)(i,{icon:"el-icon-link",href:"javascript:;",onClick:function(t){return o.clickLink(e,l.form)}},{default:Object(O.jb)(function(){return[Object(O.r)(Object(O.Y)(l.form[e.link]?l.form[e.link][e.value]:"选择"),1)]}),_:2},1032,["onClick"])]}),_:2},1032,["label"])):Object(O.m)("",!0)],64)):Object(O.m)("",!0),null==e.link?(Object(O.L)(),Object(O.n)(O.b,{key:1},[0!=e.edit?(Object(O.L)(),Object(O.l)(c,{key:0,label:e.label+":"},{default:Object(O.jb)(function(){return[null==e.options?(Object(O.L)(),Object(O.n)(O.b,{key:0},["password"==e.type?(Object(O.L)(),Object(O.l)(r,{key:0,modelValue:l.form[e.value],"onUpdate:modelValue":function(t){return l.form[e.value]=t},"show-password":"",style:{width:"400px"}},null,8,["modelValue","onUpdate:modelValue"])):Object(O.m)("",!0),"text"==e.type?(Object(O.L)(),Object(O.l)(r,{key:1,modelValue:l.form[e.value],"onUpdate:modelValue":function(t){return l.form[e.value]=t},type:"textarea",style:{width:"400px"}},null,8,["modelValue","onUpdate:modelValue"])):Object(O.m)("",!0),"number"==e.type?(Object(O.L)(),Object(O.l)(u,{key:2,modelValue:l.form[e.value],"onUpdate:modelValue":function(t){return l.form[e.value]=t},style:{width:"400px"}},null,8,["modelValue","onUpdate:modelValue"])):Object(O.m)("",!0),"time"==e.type?(Object(O.L)(),Object(O.l)(b,{key:3,modelValue:l.form[e.value],"onUpdate:modelValue":function(t){return l.form[e.value]=t},align:"right",type:"datetime",placeholder:"选择日期","value-format":"X",shortcuts:l.shortcuts,style:{width:"400px"}},null,8,["modelValue","onUpdate:modelValue","shortcuts"])):Object(O.m)("",!0),"image"==e.type?(Object(O.L)(),Object(O.l)(s,{key:4,action:"#","show-file-list":!1,"before-upload":function(t){return o.beforeAvatarUpload(t,e.value)}},{default:Object(O.jb)(function(){return[l.form[e.value]?(Object(O.L)(),Object(O.n)("img",{key:0,src:l.baseurl+l.form[e.value]},null,8,v)):(Object(O.L)(),Object(O.n)("i",y))]}),_:2},1032,["before-upload"])):Object(O.m)("",!0),"file"==e.type?(Object(O.L)(),Object(O.l)(s,{key:5,class:"file-upload",action:"#","show-file-list":!1,style:{width:"400px"},"before-upload":function(t){return o.beforeAvatarUpload(t,e.value)}},{default:Object(O.jb)(function(){return[Object(O.s)(i,{type:"primary"},{default:Object(O.jb)(function(){return[w]}),_:1}),Object(O.o)("span",{class:"file-name",title:l.fileName},Object(O.Y)(l.fileName),9,g)]}),_:2},1032,["before-upload"])):Object(O.m)("",!0),"form"==e.type&&l.form[e.value]?(Object(O.L)(),Object(O.l)(d,{key:6,ref:"basicForm",basicForm:l.form[e.value]},null,8,["basicForm"])):Object(O.m)("",!0)],64)):Object(O.m)("",!0),null!=e.options?(Object(O.L)(),Object(O.n)(O.b,{key:1},[3<e.options.length?(Object(O.L)(),Object(O.l)(h,{key:0,modelValue:l.form[e.value],"onUpdate:modelValue":function(t){return l.form[e.value]=t},placeholder:"请选择",style:{width:"400px"}},{default:Object(O.jb)(function(){return[(Object(O.L)(!0),Object(O.n)(O.b,null,Object(O.S)(e.options,function(t){return Object(O.L)(),Object(O.l)(f,{key:t.value,label:t.name,value:t.value},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])):Object(O.m)("",!0),e.options.length<4?(Object(O.L)(),Object(O.n)("div",k,[(Object(O.L)(!0),Object(O.n)(O.b,null,Object(O.S)(e.options,function(t){return Object(O.L)(),Object(O.l)(j,{key:t,modelValue:l.form[e.value],"onUpdate:modelValue":function(t){return l.form[e.value]=t},label:t.value},{default:Object(O.jb)(function(){return[Object(O.r)(Object(O.Y)(t.name),1)]}),_:2},1032,["modelValue","onUpdate:modelValue","label"])}),128))])):Object(O.m)("",!0)],64)):Object(O.m)("",!0)]}),_:2},1032,["label"])):Object(O.m)("",!0)],64)):Object(O.m)("",!0)])}),128)),Object(O.s)(p,{position:"bottom",offset:0,style:{width:"100%"}},{default:Object(O.jb)(function(){return[Object(O.s)(c,{style:{background:"white","padding-bottom":"10px"}},{default:Object(O.jb)(function(){return[Object(O.s)(i,{type:"primary",onClick:o.onSubmit},{default:Object(O.jb)(function(){return[D]}),_:1},8,["onClick"]),Object(O.s)(i,{onClick:o.close},{default:Object(O.jb)(function(){return[x]}),_:1},8,["onClick"])]}),_:1})]}),_:1})]}),_:1},8,["model"])},o.__scopeId="data-v-3a110a5c";var c=o,n=a("8f33"),o=a("0748"),a=a("d0c8"),c={props:{routerPath:String,routerId:Number,close:Function},name:"Tabs",components:{Add:a.default,Table:o.default,Info:n.a,Edit:c},data:function(){return{activeName:"",tabs:[]}},methods:{removeTab:function(a){var n=this.tabs,l=this.activeName;n.forEach(function(t,e){t.path+t.id!==a||(e=n[e+1]||n[e-1])&&(l=e.path+e.id)}),this.activeName=l,this.tabs=n.filter(function(t){return t.path+t.id!==a})}},mounted:function(){var t,e,a,n=window.Hotime,i=this,l=null!=n.mapData[this.routerPath]?(t=n.mapData[this.routerPath],this.routerId):(t=n.mapData[this.$route.path],this.$route.query.id);if(t.id=l,t.path.lastIndexOf("/info")==t.path.length-5?(t.tabType="info",this.tabs.push(t),this.activeName=t.path+l,!0===(e=n.mapData[t.path.slice(0,t.path.lastIndexOf("/info"))+"/edit"]).Auth.edit&&(e.tabType="edit",e.id=l,this.tabs.push(e))):t.path.lastIndexOf("/edit")==t.path.length-5?(t.tabType="edit",this.tabs.push(t),this.activeName=t.path+l,!0===(a=n.mapData[t.path.slice(0,t.path.lastIndexOf("/edit"))+"/info"]).Auth.info&&(a.tabType="info",a.id=l,this.tabs.push(a))):(t.path.lastIndexOf("/add")==t.path.length-4?t.tabType="add":(t.tabType="table",a.id=l),this.tabs.push(t),this.activeName=t.path),null!=t.byLink&&null!=l){var o,c=Object(b.a)(t.byLink);try{for(c.s();!(o=c.n()).done;){var r,u=o.value;null!=n.tableMapData[u.table]&&((r=Object.assign({},n.tableMapData[u.table])).label="关联"+r.label.replace("管理","").replace("关联",""),r.tabType="table",r.query={},r.query[u.name]=l,this.tabs.push(r))}}catch(t){c.e(t)}finally{c.f()}}s.a.$off("tabs"),s.a.$on("tabs",function(t){var e=Object.assign({},n.mapData[t.path]);e.label="关联"+e.parent.label.replace("管理","").replace("关联","")+e.label.replace("管理","").replace("关联",""),e.tabType=e.path.slice(e.path.lastIndexOf("/")+1,e.path.length),e.id=t.id;var a=!1;i.tabs.forEach(function(t){t.path==e.path&&t.id==e.id&&(a=!0)}),a||(e.closable=!0,e.query=t.query,i.tabs.push(e)),i.activeName=e.path+e.id}),s.a.$off("tabs-close"),s.a.$on("tabs-close",function(a){var n=i.activeName,l=-1,o=i.tabs;o.forEach(function(t,e){t.path!=a.path||t.id!=a.id||(e=o[(l=e)-1]||o[e+1])&&(n=e.path+e.id)}),1==o[l].closable?(i.activeName=n,i.tabs=o.filter(function(t,e){return e!==l})):1==l?i.activeName=n:null!=i.close?i.close():i.$router.go(-1)})},render:function(t,e,a,n,l,o){var i=Object(O.U)("Edit"),c=Object(O.U)("Info"),r=Object(O.U)("Table"),u=Object(O.U)("Add"),b=Object(O.U)("el-tab-pane"),s=Object(O.U)("el-tabs");return Object(O.L)(),Object(O.l)(s,{modelValue:l.activeName,"onUpdate:modelValue":e[0]||(e[0]=function(t){return l.activeName=t}),type:"border-card",style:{width:"100%","overflow-y":"auto"},onTabRemove:o.removeTab},{default:Object(O.jb)(function(){return[(Object(O.L)(!0),Object(O.n)(O.b,null,Object(O.S)(l.tabs,function(t){return Object(O.L)(),Object(O.l)(b,{key:t.name,label:t.label,name:t.path+t.id,lazy:"",closable:1==t.closable},{default:Object(O.jb)(function(){return["edit"==t.tabType?(Object(O.L)(),Object(O.l)(i,{key:0,"router-path":t.path,"router-id":t.id},null,8,["router-path","router-id"])):Object(O.m)("",!0),"info"==t.tabType?(Object(O.L)(),Object(O.l)(c,{key:1,"router-path":t.path,"router-id":t.id},null,8,["router-path","router-id"])):Object(O.m)("",!0),"table"==t.tabType?(Object(O.L)(),Object(O.l)(r,{key:2,"router-query":t.query,"router-path":t.path},null,8,["router-query","router-path"])):Object(O.m)("",!0),"add"==t.tabType?(Object(O.L)(),Object(O.l)(u,{key:3,"router-query":t.query,"router-path":t.path},null,8,["router-query","router-path"])):Object(O.m)("",!0)]}),_:2},1032,["label","name","closable"])}),128))]}),_:1},8,["modelValue","onTabRemove"])}};e.default=c},b855:function(t,e,a){"use strict";a("f257")},f257:function(t,e,a){},fe2e:function(t,e,a){"use strict";a.r(e);var w=a("9f9f"),g=Object(w.r)("返回"),k=Object(w.r)("Footer");a("b0c0");var d=Object(w.o)("i",{class:"el-icon-s-unfold"},null,-1),f=Object(w.r)("收起/展开");var o=a("83c5"),n={data:function(){return window.Hotime.vueComponent.leftNav=this,{leftNavHomeBar:!1,isCollapse:!1,name:"HoTime DashBoard",menus:window.Hotime.data.menus}},methods:{hideLeftHomeBar:function(){this.leftNavHomeBar=!1,window.Hotime.vueComponent.APP.showHeader=!0},setCollapse:function(){this.isCollapse=!this.isCollapse},handleOpen:function(t,e){},handleClose:function(t,e){}},mounted:function(){this.name=window.Hotime.data.label;var l=this;o.a.$off("auth"),o.a.$on("auth",function(t){if(null!=t.auth)for(var e in t.auth)if(null!==window.Hotime.mapData[t.auth[e].name]){for(var a in null==window.Hotime.mapData[t.auth[e].name].Auth&&(window.Hotime.mapData[t.auth[e].name].Auth={}),window.Hotime.mapData[t.auth[e].name].Auth)window.Hotime.mapData[t.auth[e].name].Auth[a]=!1;for(var n in t.auth[e].value)window.Hotime.mapData[t.auth[e].name].Auth[t.auth[e].value[n]]=!0}l.menus=[],setTimeout(function(){l.menus=window.Hotime.data.menus},10)})}};a("b855");n.render=function(t,e,a,n,l,o){var i=Object(w.U)("el-menu-item"),c=Object(w.U)("el-menu-item-group"),r=Object(w.U)("el-submenu"),u=Object(w.U)("el-menu"),b=Object(w.U)("el-col"),s=Object(w.U)("el-row");return Object(w.L)(),Object(w.l)(s,{class:"tac",style:{height:"100%"}},{default:Object(w.jb)(function(){return[Object(w.s)(b,{span:24},{default:Object(w.jb)(function(){return[Object(w.s)(u,{uniqueOpened:!0,"default-active":t.$route.path,class:"el-menu-vertical-demo",onOpen:o.handleOpen,onClose:o.handleClose,style:{height:"100%"},collapse:t.isCollapse,router:""},{default:Object(w.jb)(function(){return[Object(w.kb)(Object(w.s)(i,{onClick:o.hideLeftHomeBar,class:"left-nav-home-bar",index:""},{title:Object(w.jb)(function(){return[Object(w.r)(Object(w.Y)(t.name),1)]}),default:Object(w.jb)(function(){return[d]}),_:1},8,["onClick"]),[[w.gb,t.leftNavHomeBar]]),(Object(w.L)(!0),Object(w.n)(w.b,null,Object(w.S)(t.menus,function(t){return Object(w.L)(),Object(w.n)(w.b,null,[null==t.menus||null!=t.Auth&&1!=t.Auth.show?Object(w.m)("",!0):(Object(w.L)(),Object(w.l)(r,{key:t.label,index:t.path},{title:Object(w.jb)(function(){return[Object(w.o)("i",{class:Object(w.B)(t.icon)},null,2),Object(w.o)("span",null,Object(w.Y)(t.label),1)]}),default:Object(w.jb)(function(){return[Object(w.s)(c,null,{default:Object(w.jb)(function(){return[(Object(w.L)(!0),Object(w.n)(w.b,null,Object(w.S)(t.menus,function(t){return Object(w.L)(),Object(w.n)(w.b,{key:t.label},[1==t.Auth.show?(Object(w.L)(),Object(w.l)(i,{key:0,index:t.path},{default:Object(w.jb)(function(){return[Object(w.o)("i",{class:Object(w.B)(t.icon)},null,2),Object(w.r)(Object(w.Y)(t.label),1)]}),_:2},1032,["index"])):Object(w.m)("",!0)],64)}),128))]}),_:2},1024)]}),_:2},1032,["index"])),null==t.menus&&1==t.Auth.show?(Object(w.L)(),Object(w.l)(i,{key:t.label,index:null!=t.default?t.path+"/"+t.default.path+"?id="+t.default.id:t.path},{title:Object(w.jb)(function(){return[Object(w.r)(Object(w.Y)(t.label),1)]}),default:Object(w.jb)(function(){return[Object(w.o)("i",{class:Object(w.B)(t.icon)},null,2)]}),_:2},1032,["index"])):Object(w.m)("",!0)],64)}),256)),Object(w.s)(i,{onClick:o.setCollapse,style:{position:"absolute",bottom:"1px",width:"100%"}},{title:Object(w.jb)(function(){return[f]}),default:Object(w.jb)(function(){return[Object(w.o)("i",{class:Object(w.B)({"el-icon-s-fold":!t.isCollapse,"el-icon-s-unfold":t.isCollapse})},null,2)]}),_:1},8,["onClick"])]}),_:1},8,["default-active","onOpen","onClose","collapse"])]}),_:1})]}),_:1})};var l=n;Object(w.O)("data-v-cf253d38");var h=Object(w.o)("i",{class:"el-icon-s-fold",style:{"font-size":"18px","margin-right":"4px"}},null,-1),j={style:{"font-size":"14px","margin-left":"4px",height:"25px",top:"17.5px",position:"absolute"}},p={style:{display:"flex","flex-direction":"row","align-items":"center"}},m={class:"el-dropdown-link",style:{"margin-left":"30px"}},O=Object(w.o)("i",{class:"el-icon-user"},null,-1),v=Object(w.r)("个人信息"),y=Object(w.o)("i",{class:"el-icon-edit"},null,-1),D=Object(w.r)("修改信息"),x=Object(w.o)("i",{class:"el-icon-switch-button"},null,-1),T=Object(w.r)("系统注销 ");Object(w.M)();var i=a("2934"),c={data:function(){return window.Hotime.vueComponent.headerNav=this,{name:"HoTime DashBoard",isShowHeader:!0,activeIndex:"1",activeIndex2:"1",data:{}}},methods:{handleSelect:function(t,e){},hideHeader:function(){window.Hotime.vueComponent.APP.showHeader=!1,window.Hotime.vueComponent.leftNav.leftNavHomeBar=!0},clickLogout:function(){var t=this;Object(i.d)(window.Hotime.data.name+"/hotime/logout").then(function(){t.$router.push({path:"/login"})})},clickInfo:function(){o.a.$emit("dialog",{name:"Info",path:window.Hotime.tableMapData.admin.path+"/info",id:this.data.id,title:window.Hotime.tableMapData.admin.parent.label+"-"+window.Hotime.tableMapData.admin.label})},clickEdit:function(){o.a.$emit("dialog",{name:"Edit",path:window.Hotime.tableMapData.admin.path+"/edit",id:this.data.id,title:window.Hotime.tableMapData.admin.parent.label+"-"+window.Hotime.tableMapData.admin.label})}},mounted:function(){this.name=window.Hotime.data.label;var e=this;Object(i.d)(window.Hotime.data.name+"/hotime/info").then(function(t){0==t.status?(window.user=t.result,e.data=t.result,null!=t.result.role&&null!=t.result.role.auth&&o.a.$emit("auth",JSON.parse(t.result.role.auth))):e.$router.push({path:"/login"})})}};a("4450");c.render=function(t,e,a,n,l,o){var i=Object(w.U)("el-col"),c=Object(w.U)("el-button"),r=Object(w.U)("el-dropdown-item"),u=Object(w.U)("el-dropdown-menu"),b=Object(w.U)("el-dropdown"),s=Object(w.U)("el-row");return Object(w.L)(),Object(w.l)(s,null,{default:Object(w.jb)(function(){return[Object(w.s)(i,{span:6,class:"head-left"},{default:Object(w.jb)(function(){return[Object(w.o)("div",{role:"button",onClick:e[0]||(e[0]=function(){return o.hideHeader&&o.hideHeader.apply(o,arguments)}),style:{cursor:"pointer","font-size":"14px","margin-left":"3px","margin-bottom":"4px"}},[h,Object(w.o)("span",j,Object(w.Y)(l.name),1)])]}),_:1}),Object(w.s)(i,{span:12}),Object(w.s)(i,{span:6,class:"head-right"},{default:Object(w.jb)(function(){return[Object(w.o)("div",p,[Object(w.s)(b,{"hide-on-click":!1},{dropdown:Object(w.jb)(function(){return[Object(w.s)(u,null,{default:Object(w.jb)(function(){return[Object(w.s)(r,{onClick:o.clickInfo},{default:Object(w.jb)(function(){return[O,v]}),_:1},8,["onClick"]),Object(w.s)(r,{onClick:o.clickEdit},{default:Object(w.jb)(function(){return[y,D]}),_:1},8,["onClick"]),Object(w.s)(r,{divided:"",onClick:o.clickLogout},{default:Object(w.jb)(function(){return[x,T]}),_:1},8,["onClick"])]}),_:1})]}),default:Object(w.jb)(function(){return[Object(w.o)("span",m,[Object(w.s)(c,{icon:"el-icon-user",type:"text",style:{color:"white","font-size":"14px"}},{default:Object(w.jb)(function(){return[Object(w.r)(Object(w.Y)(l.data.name),1)]}),_:1})])]}),_:1})])]}),_:1})]}),_:1})},c.__scopeId="data-v-cf253d38";var r=c,u=a("b50c");a("a9e3"),a("159b"),a("4de4"),a("fb6a"),a("ac1f"),a("5319");n=a("8f33"),c=a("0748"),a=a("d0c8"),n={props:{routerPath:String,routerId:Number,close:Function},name:"Tabs",components:{Add:a.default,Table:c.default,Info:n.a},data:function(){return{activeName:"",tabs:[]}},methods:{removeTab:function(a){var n=this.tabs,l=this.activeName;n.forEach(function(t,e){t.path+t.id!==a||(e=n[e+1]||n[e-1])&&(l=e.path+e.id)}),this.activeName=l,this.tabs=n.filter(function(t){return t.path+t.id!==a})}},mounted:function(){var t,e,n=window.Hotime,c=this,a=null!=n.mapData[this.routerPath]?(t=n.mapData[this.routerPath],this.routerId):(t=n.mapData[this.$route.path],this.$route.query.id);t.id=a,t.path.lastIndexOf("/info")==t.path.length-5?(t.tabType="info",this.tabs.push(t),this.activeName=t.path+a,!0===(e=n.mapData[t.path.slice(0,t.path.lastIndexOf("/info"))+"/edit"]).Auth.edit&&(e.tabType="edit",e.id=a,this.tabs.push(e))):t.path.lastIndexOf("/edit")==t.path.length-5?(t.tabType="edit",this.tabs.push(t),this.activeName=t.path+a,!0===(e=n.mapData[t.path.slice(0,t.path.lastIndexOf("/edit"))+"/info"]).Auth.info&&(e.tabType="info",e.id=a,this.tabs.push(e))):t.path.lastIndexOf("/add")==t.path.length-4?(t.tabType="add",this.tabs.push(t),this.activeName=t.path):(t.tabType="table",this.tabs.push(t),this.activeName=t.path+a),o.a.$off("tabs-edit"),o.a.$on("tabs-edit",function(t){var e=Object.assign({},n.mapData[t.path]);e.label="关联"+e.parent.label.replace("管理","").replace("关联","")+e.label.replace("管理","").replace("关联",""),e.tabType=t.name.toLowerCase(),e.id=t.id;var a=!1;c.tabs.forEach(function(t){t.path==e.path&&t.id==e.id&&(a=!0)}),a||(e.closable=!0,e.query=t.query,c.tabs.push(e)),c.activeName=e.path+e.id}),o.a.$off("tabs-edit-close"),o.a.$on("tabs-edit-close",function(n){var l=c.activeName,o=-1,i=c.tabs;i.forEach(function(t,e){var a;t.path!=n.path||t.id!=n.id||(a=i[(o=e)-1]||i[e+1])&&(l=a.path+a.id),t.path!=n.path||t.id!=n.routerId||(e=i[(o=e)-1]||i[e+1])&&(l=e.path+e.id)}),1==i[o].closable?(c.activeName=l,c.tabs=i.filter(function(t,e){return e!==o})):1==o?c.activeName=l:null!=c.close?c.close():c.$router.go(-1)})},render:function(t,e,a,n,l,o){var i=Object(w.U)("Info"),c=Object(w.U)("Table"),r=Object(w.U)("Add"),u=Object(w.U)("el-tab-pane"),b=Object(w.U)("el-tabs");return Object(w.L)(),Object(w.l)(b,{modelValue:l.activeName,"onUpdate:modelValue":e[0]||(e[0]=function(t){return l.activeName=t}),type:"border-card",style:{width:"100%","overflow-y":"auto"},onTabRemove:o.removeTab},{default:Object(w.jb)(function(){return[(Object(w.L)(!0),Object(w.n)(w.b,null,Object(w.S)(l.tabs,function(t){return Object(w.L)(),Object(w.l)(u,{key:t.name,label:t.label,name:t.path+t.id,lazy:"",closable:1==t.closable},{default:Object(w.jb)(function(){return["info"==t.tabType?(Object(w.L)(),Object(w.l)(i,{key:0,"edit-dialog-path":t.path,"router-id":t.id},null,8,["edit-dialog-path","router-id"])):Object(w.m)("",!0),"table"==t.tabType?(Object(w.L)(),Object(w.l)(c,{key:1,"router-query":t.query,"router-id":t.id,"edit-dialog-path":t.path,style:{display:"flex","max-height":"70vh"}},null,8,["router-query","router-id","edit-dialog-path"])):Object(w.m)("",!0),"add"==t.tabType?(Object(w.L)(),Object(w.l)(r,{key:2,"router-query":t.query,"edit-dialog-path":t.path},null,8,["router-query","edit-dialog-path"])):Object(w.m)("",!0)]}),_:2},1032,["label","name","closable"])}),128))]}),_:1},8,["modelValue","onTabRemove"])}},n={data:function(){return window.Hotime.vueComponent.APP=this,{showHeader:!0,routerViewShow:!0,items:[],showDialog:!1,dialogTitle:null,dialogDataPath:null,dialogDataId:null,dialogDataQuery:{},showTabDialog:!1,tabTitle:null,tabDataPath:null,tabDataId:null,tabDataQuery:{}}},components:{LeftNavMenu:l,HeaderNavMenu:r,Tabs:u.default,TabsEdit:n},mounted:function(){var e=this;o.a.$off("dialog"),o.a.$on("dialog",function(t){e.closeDialog(),setTimeout(function(){e.showDialog=!0,e.dialogTitle=t.title,e.dialogDataPath=t.path,e.dialogDataId=t.id,e.dialogDataQuery=t.query},150)}),o.a.$off("dialog-edit"),o.a.$on("dialog-edit",function(t){e.closeTabDialog(),setTimeout(function(){e.showTabDialog=!0,e.tabTitle=t.title,e.tabDataPath=t.path,e.tabDataId=t.id,e.tabDataQuery=t.query},150)}),this.routeInit()},methods:{goBack:function(){this.$router.back()},closeDialog:function(){this.showDialog=!1,this.dialogDataPath=null,this.dialogDataId=null,this.dialogDataQuery={}},closeTabDialog:function(){this.showTabDialog=!1,this.tabDataPath=null,this.tabDataId=null,this.tabDataQuery={}},createItems:function(t,e){return e.push({path:t.path,label:t.label,icon:t.icon,table:t.table}),e=null!=t.parent&&null!=t.parent.path?this.createItems(t.parent,e):e},routeInit:function(){var t=this;this.routerViewShow=!1,setTimeout(function(){t.routerViewShow=!0},50);var e=window.Hotime.mapData[this.$route.path],a=[];null!=e&&((a=this.createItems(e,a)).reverse(),0!=a.length&&null==a[0].table&&(a[0].path="/"),this.items=a)}},watch:{$route:function(t){this.routeInit(t)}},render:function(t,e,a,n,l,o){var i=Object(w.U)("header-nav-menu"),c=Object(w.U)("el-header"),r=Object(w.U)("left-nav-menu"),u=Object(w.U)("el-aside"),b=Object(w.U)("el-link"),s=Object(w.U)("el-divider"),d=Object(w.U)("el-breadcrumb-item"),f=Object(w.U)("el-breadcrumb"),h=Object(w.U)("router-view"),j=Object(w.U)("el-container"),p=Object(w.U)("el-main"),m=Object(w.U)("Tabs"),O=Object(w.U)("el-dialog"),v=Object(w.U)("TabsEdit"),y=Object(w.U)("el-footer");return Object(w.L)(),Object(w.l)(j,{style:{height:"100vh",background:"rgb(245,246,247)"}},{default:Object(w.jb)(function(){return[Object(w.kb)(Object(w.s)(c,{style:{"background-color":"rgb(44, 55, 89)",height:"56px"}},{default:Object(w.jb)(function(){return[Object(w.s)(i,{style:{color:"azure",height:"100%","text-align":"left",margin:"auto"}})]}),_:1},512),[[w.gb,l.showHeader]]),Object(w.s)(j,{style:{overflow:"hidden"}},{default:Object(w.jb)(function(){return[Object(w.s)(u,{width:"auto",style:{overflow:"hidden"}},{default:Object(w.jb)(function(){return[Object(w.s)(r)]}),_:1}),Object(w.s)(p,{style:{padding:"10px 10px 0 10px"}},{default:Object(w.jb)(function(){return[Object(w.s)(j,{style:{height:"100%"}},{default:Object(w.jb)(function(){return[Object(w.s)(c,{style:{height:"30px",padding:"0px",display:"flex"}},{default:Object(w.jb)(function(){return[Object(w.s)(b,{href:"javascript:void()",onClick:o.goBack,type:"primary",icon:"el-icon-back",underline:!1,style:{height:"13px",width:"60px"}},{default:Object(w.jb)(function(){return[g]}),_:1},8,["onClick"]),Object(w.s)(s,{direction:"vertical"}),Object(w.s)(f,{"separator-class":"el-icon-arrow-right",style:{"margin-bottom":"30px"}},{default:Object(w.jb)(function(){return[(Object(w.L)(!0),Object(w.n)(w.b,null,Object(w.S)(l.items,function(t){return Object(w.L)(),Object(w.l)(d,{key:t.path,to:{path:t.path}},{default:Object(w.jb)(function(){return[Object(w.o)("i",{class:Object(w.B)(t.icon),style:{"margin-right":"3px"}},null,2),Object(w.r)(Object(w.Y)(t.label),1)]}),_:2},1032,["to"])}),128))]}),_:1})]}),_:1}),Object(w.s)(j,{style:{"overflow-y":"auto"}},{default:Object(w.jb)(function(){return[l.routerViewShow?(Object(w.L)(),Object(w.l)(h,{key:0},{default:Object(w.jb)(function(t){var e=t.Component;return[Object(w.s)(w.f,{name:"el-zoom-in-center"},{default:Object(w.jb)(function(){return[(Object(w.L)(),Object(w.l)(w.c,null,[(Object(w.L)(),Object(w.l)(Object(w.W)(e)))],1024))]}),_:2},1024)]}),_:1})):Object(w.m)("",!0)]}),_:1})]}),_:1})]}),_:1})]}),_:1}),Object(w.s)(O,{title:l.dialogTitle,modelValue:l.showDialog,"onUpdate:modelValue":e[0]||(e[0]=function(t){return l.showDialog=t}),"destroy-on-close":"",onClose:o.closeDialog,width:"80%","lock-scroll":""},{default:Object(w.jb)(function(){return[l.showDialog?(Object(w.L)(),Object(w.l)(m,{key:0,"router-path":l.dialogDataPath,"router-id":l.dialogDataId,"router-query":l.dialogDataQuery,close:o.closeDialog},null,8,["router-path","router-id","router-query","close"])):Object(w.m)("",!0)]}),_:1},8,["title","modelValue","onClose"]),Object(w.s)(O,{title:l.tabTitle,modelValue:l.showTabDialog,"onUpdate:modelValue":e[1]||(e[1]=function(t){return l.showTabDialog=t}),"destroy-on-close":"",onClose:o.closeTabDialog,width:"50%","lock-scroll":""},{default:Object(w.jb)(function(){return[l.showTabDialog?(Object(w.L)(),Object(w.l)(v,{key:0,"router-path":l.tabDataPath,"router-id":l.tabDataId,"router-query":l.tabDataQuery,close:o.closeTabDialog},null,8,["router-path","router-id","router-query","close"])):Object(w.m)("",!0)]}),_:1},8,["title","modelValue","onClose"]),Object(w.s)(y,{style:{"background-color":"rgb(123, 08, 80)",height:"20px",color:"azure",display:"none"}},{default:Object(w.jb)(function(){return[k]}),_:1})]}),_:1})}},e.default=n}}]);