hotime/example/tpt/js/chunk-99497f66.664e5562.js
2022-03-26 16:53:40 +08:00

1 line
29 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-99497f66","chunk-550dc75a"],{"0cb2":function(t,e,a){var n=a("7b0b"),s=Math.floor,l="".replace,f=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,h=/\$([$&'`]|\d{1,2})/g;t.exports=function(i,o,c,r,u,t){var b=c+i.length,d=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 i;case"`":return o.slice(0,c);case"'":return o.slice(b);case"<":a=u[e.slice(1,-1)];break;default:var n=+e;if(0==n)return t;if(d<n){var l=s(n/10);return 0===l?t:l<=d?void 0===r[l-1]?e.charAt(1):r[l-1]+e.charAt(1):t}a=r[n-1]}return void 0===a?"":a})}},"392a":function(t,e,a){"use strict";a("f465")},4450:function(t,e,a){"use strict";a("b5c0")},5319:function(t,e,a){"use strict";var n=a("d784"),l=a("d039"),g=a("825a"),T=a("a691"),k=a("50c4"),D=a("577e"),i=a("1d80"),x=a("8aa5"),$=a("0cb2"),_=a("14c3"),o=a("b622")("replace"),K=Math.max,H=Math.min,a="$0"==="a".replace(/./,"$0"),c=!!/./[o]&&""===/./[o]("a","$0");n("replace",function(t,v,y){var w=c?"$":"$0";return[function(t,e){var a=i(this),n=null==t?void 0:t[o];return void 0!==n?n.call(t,a,e):v.call(D(a),t,e)},function(t,e){var a=g(this),n=D(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=D(e));var i,o=a.global;o&&(i=a.unicode,a.lastIndex=0);for(var c=[];;){if(null===(s=_(a,n)))break;if(c.push(s),!o)break;""===D(s[0])&&(a.lastIndex=x(n,k(a.lastIndex),i))}for(var r,u="",b=0,d=0;d<c.length;d++){for(var s=c[d],f=D(s[0]),h=K(H(T(s.index),n.length),0),p=[],m=1;m<s.length;m++)p.push(void 0===(r=s[m])?r:String(r));var O,j=s.groups,j=l?(O=[f].concat(p,h,n),void 0!==j&&O.push(j),D(e.apply(void 0,O))):$(f,n,h,p,j,e);b<=h&&(u+=n.slice(b,h)+j,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)},"55b3":function(t,e,a){},7060:function(t,e,a){"use strict";a("93b0")},"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)}},"93b0":function(t,e,a){},b50c:function(t,e,a){"use strict";a.r(e);a("b0c0");var j=a("f2bf");var b=a("b85c");a("a9e3"),a("159b"),a("4de4"),a("fb6a"),a("ac1f"),a("5319"),a("9911");Object(j.N)("data-v-3a110a5c");var v=["src"],y={key:1,class:"el-icon-plus avatar-uploader-icon"},w=Object(j.q)("上传文件"),g=["title"],T={key:1,class:"radio-wrap"},k=Object(j.q)("立即修改"),D=Object(j.q)("取消");Object(j.L)();var n=a("acf7"),o=a("2934"),l=a("b775"),d=a("83c5"),i={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?d.a.$emit("tabs-edit",t):(d.a.$emit("dialog-edit",t),d.a.$off("table:"+window.Hotime.tableMapData[e.link].path)),d.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(o.f)(t).then(function(t){a.form[e]=t.result}),!1},close:function(){d.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(o.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,i=window.Hotime;if(null!=i.mapData[this.routerPath]?(this.templateData=i.mapData[this.routerPath],this.id=this.routerId):(this.templateData=i.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(o.d)(i.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(o.e)(i.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");i.render=function(t,e,a,n,l,i){var o=Object(j.T)("el-button"),c=Object(j.T)("el-form-item"),r=Object(j.T)("el-input"),u=Object(j.T)("el-input-number"),b=Object(j.T)("el-date-picker"),d=Object(j.T)("el-upload"),s=Object(j.T)("BasicForm"),f=Object(j.T)("el-option"),h=Object(j.T)("el-select"),p=Object(j.T)("el-radio"),m=Object(j.T)("el-affix"),O=Object(j.T)("el-form");return Object(j.K)(),Object(j.l)(O,{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(j.ib)(function(){return[(Object(j.K)(!0),Object(j.n)(j.b,null,Object(j.R)(l.templateData.columns,function(e){return Object(j.K)(),Object(j.n)("div",{key:e.type},[null!=e.link?(Object(j.K)(),Object(j.n)(j.b,{key:0},[0!=e.edit?(Object(j.K)(),Object(j.l)(c,{key:0,label:e.label+":"},{default:Object(j.ib)(function(){return[Object(j.r)(o,{icon:"el-icon-link",href:"javascript:;",onClick:function(t){return i.clickLink(e,l.form)}},{default:Object(j.ib)(function(){return[Object(j.q)(Object(j.X)(l.form[e.link]?l.form[e.link][e.value]:"选择"),1)]}),_:2},1032,["onClick"])]}),_:2},1032,["label"])):Object(j.m)("",!0)],64)):Object(j.m)("",!0),null==e.link?(Object(j.K)(),Object(j.n)(j.b,{key:1},[0!=e.edit?(Object(j.K)(),Object(j.l)(c,{key:0,label:e.label+":"},{default:Object(j.ib)(function(){return[null==e.options?(Object(j.K)(),Object(j.n)(j.b,{key:0},["password"==e.type?(Object(j.K)(),Object(j.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(j.m)("",!0),"text"==e.type?(Object(j.K)(),Object(j.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(j.m)("",!0),"number"==e.type?(Object(j.K)(),Object(j.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(j.m)("",!0),"time"==e.type?(Object(j.K)(),Object(j.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(j.m)("",!0),"image"==e.type?(Object(j.K)(),Object(j.l)(d,{key:4,action:"#","show-file-list":!1,"before-upload":function(t){return i.beforeAvatarUpload(t,e.value)}},{default:Object(j.ib)(function(){return[l.form[e.value]?(Object(j.K)(),Object(j.n)("img",{key:0,src:l.baseurl+l.form[e.value]},null,8,v)):(Object(j.K)(),Object(j.n)("i",y))]}),_:2},1032,["before-upload"])):Object(j.m)("",!0),"file"==e.type?(Object(j.K)(),Object(j.l)(d,{key:5,class:"file-upload",action:"#","show-file-list":!1,style:{width:"400px"},"before-upload":function(t){return i.beforeAvatarUpload(t,e.value)}},{default:Object(j.ib)(function(){return[Object(j.r)(o,{type:"primary"},{default:Object(j.ib)(function(){return[w]}),_:1}),Object(j.o)("span",{class:"file-name",title:l.fileName},Object(j.X)(l.fileName),9,g)]}),_:2},1032,["before-upload"])):Object(j.m)("",!0),"form"==e.type&&l.form[e.value]?(Object(j.K)(),Object(j.l)(s,{key:6,ref:"basicForm",basicForm:l.form[e.value]},null,8,["basicForm"])):Object(j.m)("",!0)],64)):Object(j.m)("",!0),null!=e.options?(Object(j.K)(),Object(j.n)(j.b,{key:1},[3<e.options.length?(Object(j.K)(),Object(j.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(j.ib)(function(){return[(Object(j.K)(!0),Object(j.n)(j.b,null,Object(j.R)(e.options,function(t){return Object(j.K)(),Object(j.l)(f,{key:t.value,label:t.name,value:t.value},null,8,["label","value"])}),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])):Object(j.m)("",!0),e.options.length<4?(Object(j.K)(),Object(j.n)("div",T,[(Object(j.K)(!0),Object(j.n)(j.b,null,Object(j.R)(e.options,function(t){return Object(j.K)(),Object(j.l)(p,{key:t,modelValue:l.form[e.value],"onUpdate:modelValue":function(t){return l.form[e.value]=t},label:t.value},{default:Object(j.ib)(function(){return[Object(j.q)(Object(j.X)(t.name),1)]}),_:2},1032,["modelValue","onUpdate:modelValue","label"])}),128))])):Object(j.m)("",!0)],64)):Object(j.m)("",!0)]}),_:2},1032,["label"])):Object(j.m)("",!0)],64)):Object(j.m)("",!0)])}),128)),Object(j.r)(m,{position:"bottom",offset:0,style:{width:"100%"}},{default:Object(j.ib)(function(){return[Object(j.r)(c,{style:{background:"white","padding-bottom":"10px"}},{default:Object(j.ib)(function(){return[Object(j.r)(o,{type:"primary",onClick:i.onSubmit},{default:Object(j.ib)(function(){return[k]}),_:1},8,["onClick"]),Object(j.r)(o,{onClick:i.close},{default:Object(j.ib)(function(){return[D]}),_:1},8,["onClick"])]}),_:1})]}),_:1})]}),_:1},8,["model"])},i.__scopeId="data-v-3a110a5c";var c=i,n=a("8f33"),i=a("0748"),a=a("d0c8"),c={props:{routerPath:String,routerId:Number,close:Function},name:"Tabs",components:{Add:a.default,Table:i.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,o=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 i,c=Object(b.a)(t.byLink);try{for(c.s();!(i=c.n()).done;){var r,u=i.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()}}d.a.$off("tabs"),d.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;o.tabs.forEach(function(t){t.path==e.path&&t.id==e.id&&(a=!0)}),a||(e.closable=!0,e.query=t.query,o.tabs.push(e)),o.activeName=e.path+e.id}),d.a.$off("tabs-close"),d.a.$on("tabs-close",function(a){var n=o.activeName,l=-1,i=o.tabs;i.forEach(function(t,e){t.path!=a.path||t.id!=a.id||(e=i[(l=e)-1]||i[e+1])&&(n=e.path+e.id)}),1==i[l].closable?(o.activeName=n,o.tabs=i.filter(function(t,e){return e!==l})):1==l?o.activeName=n:null!=o.close?o.close():o.$router.go(-1)})},render:function(t,e,a,n,l,i){var o=Object(j.T)("Edit"),c=Object(j.T)("Info"),r=Object(j.T)("Table"),u=Object(j.T)("Add"),b=Object(j.T)("el-tab-pane"),d=Object(j.T)("el-tabs");return Object(j.K)(),Object(j.l)(d,{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:i.removeTab},{default:Object(j.ib)(function(){return[(Object(j.K)(!0),Object(j.n)(j.b,null,Object(j.R)(l.tabs,function(t){return Object(j.K)(),Object(j.l)(b,{key:t.name,label:t.label,name:t.path+t.id,lazy:"",closable:1==t.closable},{default:Object(j.ib)(function(){return["edit"==t.tabType?(Object(j.K)(),Object(j.l)(o,{key:0,"router-path":t.path,"router-id":t.id},null,8,["router-path","router-id"])):Object(j.m)("",!0),"info"==t.tabType?(Object(j.K)(),Object(j.l)(c,{key:1,"router-path":t.path,"router-id":t.id},null,8,["router-path","router-id"])):Object(j.m)("",!0),"table"==t.tabType?(Object(j.K)(),Object(j.l)(r,{key:2,"router-query":t.query,"router-path":t.path},null,8,["router-query","router-path"])):Object(j.m)("",!0),"add"==t.tabType?(Object(j.K)(),Object(j.l)(u,{key:3,"router-query":t.query,"router-path":t.path},null,8,["router-query","router-path"])):Object(j.m)("",!0)]}),_:2},1032,["label","name","closable"])}),128))]}),_:1},8,["modelValue","onTabRemove"])}};e.default=c},b5c0:function(t,e,a){},b855:function(t,e,a){"use strict";a("55b3")},f465:function(t,e,a){},fe2e:function(t,e,a){"use strict";a.r(e);var w=a("f2bf"),g=Object(w.q)("返回"),T=Object(w.q)("Footer");a("b0c0");var s=Object(w.o)("i",{class:"el-icon-s-unfold"},null,-1),f=Object(w.q)("收起/展开");var i=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;i.a.$off("auth"),i.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,i){var o=Object(w.T)("el-menu-item"),c=Object(w.T)("el-menu-item-group"),r=Object(w.T)("el-submenu"),u=Object(w.T)("el-menu"),b=Object(w.T)("el-col"),d=Object(w.T)("el-row");return Object(w.K)(),Object(w.l)(d,{class:"tac",style:{height:"100%"}},{default:Object(w.ib)(function(){return[Object(w.r)(b,{span:24},{default:Object(w.ib)(function(){return[Object(w.r)(u,{uniqueOpened:!0,"default-active":t.$route.path,class:"el-menu-vertical-demo",onOpen:i.handleOpen,onClose:i.handleClose,style:{height:"100%"},collapse:t.isCollapse,router:""},{default:Object(w.ib)(function(){return[Object(w.jb)(Object(w.r)(o,{onClick:i.hideLeftHomeBar,class:"left-nav-home-bar",index:""},{title:Object(w.ib)(function(){return[Object(w.q)(Object(w.X)(t.name),1)]}),default:Object(w.ib)(function(){return[s]}),_:1},8,["onClick"]),[[w.fb,t.leftNavHomeBar]]),(Object(w.K)(!0),Object(w.n)(w.b,null,Object(w.R)(t.menus,function(t){return Object(w.K)(),Object(w.n)(w.b,null,[null==t.menus||null!=t.Auth&&1!=t.Auth.show?Object(w.m)("",!0):(Object(w.K)(),Object(w.l)(r,{key:t.label,index:t.path},{title:Object(w.ib)(function(){return[Object(w.o)("i",{class:Object(w.A)(t.icon)},null,2),Object(w.o)("span",null,Object(w.X)(t.label),1)]}),default:Object(w.ib)(function(){return[Object(w.r)(c,null,{default:Object(w.ib)(function(){return[(Object(w.K)(!0),Object(w.n)(w.b,null,Object(w.R)(t.menus,function(t){return Object(w.K)(),Object(w.n)(w.b,{key:t.label},[1==t.Auth.show?(Object(w.K)(),Object(w.l)(o,{key:0,index:t.path},{default:Object(w.ib)(function(){return[Object(w.o)("i",{class:Object(w.A)(t.icon)},null,2),Object(w.q)(Object(w.X)(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.K)(),Object(w.l)(o,{key:t.label,index:null!=t.default?t.path+"/"+t.default.path+"?id="+t.default.id:t.path},{title:Object(w.ib)(function(){return[Object(w.q)(Object(w.X)(t.label),1)]}),default:Object(w.ib)(function(){return[Object(w.o)("i",{class:Object(w.A)(t.icon)},null,2)]}),_:2},1032,["index"])):Object(w.m)("",!0)],64)}),256)),Object(w.r)(o,{onClick:i.setCollapse,style:{position:"absolute",bottom:"1px",width:"100%"}},{title:Object(w.ib)(function(){return[f]}),default:Object(w.ib)(function(){return[Object(w.o)("i",{class:Object(w.A)({"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.N)("data-v-cf253d38");var h=Object(w.o)("i",{class:"el-icon-s-fold",style:{"font-size":"18px","margin-right":"4px"}},null,-1),p={style:{"font-size":"14px","margin-left":"4px",height:"25px",top:"17.5px",position:"absolute"}},m={style:{display:"flex","flex-direction":"row","align-items":"center"}},O={class:"el-dropdown-link",style:{"margin-left":"30px"}},j=Object(w.o)("i",{class:"el-icon-user"},null,-1),v=Object(w.q)("个人信息"),y=Object(w.o)("i",{class:"el-icon-edit"},null,-1),k=Object(w.q)("修改信息"),D=Object(w.o)("i",{class:"el-icon-switch-button"},null,-1),x=Object(w.q)("系统注销 ");Object(w.L)();var o=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(o.d)(window.Hotime.data.name+"/hotime/logout").then(function(){t.$router.push({path:"/login"})})},clickInfo:function(){i.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(){i.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(o.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&&i.a.$emit("auth",JSON.parse(t.result.role.auth))):e.$router.push({path:"/login"})})}};a("4450");c.render=function(t,e,a,n,l,i){var o=Object(w.T)("el-col"),c=Object(w.T)("el-button"),r=Object(w.T)("el-dropdown-item"),u=Object(w.T)("el-dropdown-menu"),b=Object(w.T)("el-dropdown"),d=Object(w.T)("el-row");return Object(w.K)(),Object(w.l)(d,null,{default:Object(w.ib)(function(){return[Object(w.r)(o,{span:6,class:"head-left"},{default:Object(w.ib)(function(){return[Object(w.o)("div",{role:"button",onClick:e[0]||(e[0]=function(){return i.hideHeader&&i.hideHeader.apply(i,arguments)}),style:{cursor:"pointer","font-size":"14px","margin-left":"3px","margin-bottom":"4px"}},[h,Object(w.o)("span",p,Object(w.X)(l.name),1)])]}),_:1}),Object(w.r)(o,{span:12}),Object(w.r)(o,{span:6,class:"head-right"},{default:Object(w.ib)(function(){return[Object(w.o)("div",m,[Object(w.r)(b,{"hide-on-click":!1},{dropdown:Object(w.ib)(function(){return[Object(w.r)(u,null,{default:Object(w.ib)(function(){return[Object(w.r)(r,{onClick:i.clickInfo},{default:Object(w.ib)(function(){return[j,v]}),_:1},8,["onClick"]),Object(w.r)(r,{onClick:i.clickEdit},{default:Object(w.ib)(function(){return[y,k]}),_:1},8,["onClick"]),Object(w.r)(r,{divided:"",onClick:i.clickLogout},{default:Object(w.ib)(function(){return[D,x]}),_:1},8,["onClick"])]}),_:1})]}),default:Object(w.ib)(function(){return[Object(w.o)("span",O,[Object(w.r)(c,{icon:"el-icon-user",type:"text",style:{color:"white","font-size":"14px"}},{default:Object(w.ib)(function(){return[Object(w.q)(Object(w.X)(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),i.a.$off("tabs-edit"),i.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}),i.a.$off("tabs-edit-close"),i.a.$on("tabs-edit-close",function(n){var l=c.activeName,i=-1,o=c.tabs;o.forEach(function(t,e){var a;t.path!=n.path||t.id!=n.id||(a=o[(i=e)-1]||o[e+1])&&(l=a.path+a.id),t.path!=n.path||t.id!=n.routerId||(e=o[(i=e)-1]||o[e+1])&&(l=e.path+e.id)}),1==o[i].closable?(c.activeName=l,c.tabs=o.filter(function(t,e){return e!==i})):1==i?c.activeName=l:null!=c.close?c.close():c.$router.go(-1)})},render:function(t,e,a,n,l,i){var o=Object(w.T)("Info"),c=Object(w.T)("Table"),r=Object(w.T)("Add"),u=Object(w.T)("el-tab-pane"),b=Object(w.T)("el-tabs");return Object(w.K)(),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:i.removeTab},{default:Object(w.ib)(function(){return[(Object(w.K)(!0),Object(w.n)(w.b,null,Object(w.R)(l.tabs,function(t){return Object(w.K)(),Object(w.l)(u,{key:t.name,label:t.label,name:t.path+t.id,lazy:"",closable:1==t.closable},{default:Object(w.ib)(function(){return["info"==t.tabType?(Object(w.K)(),Object(w.l)(o,{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.K)(),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.K)(),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;i.a.$off("dialog"),i.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)}),i.a.$off("dialog-edit"),i.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,i){var o=Object(w.T)("header-nav-menu"),c=Object(w.T)("el-header"),r=Object(w.T)("left-nav-menu"),u=Object(w.T)("el-aside"),b=Object(w.T)("el-link"),d=Object(w.T)("el-divider"),s=Object(w.T)("el-breadcrumb-item"),f=Object(w.T)("el-breadcrumb"),h=Object(w.T)("router-view"),p=Object(w.T)("el-container"),m=Object(w.T)("el-main"),O=Object(w.T)("Tabs"),j=Object(w.T)("el-dialog"),v=Object(w.T)("TabsEdit"),y=Object(w.T)("el-footer");return Object(w.K)(),Object(w.l)(p,{style:{height:"100vh",background:"rgb(245,246,247)"}},{default:Object(w.ib)(function(){return[Object(w.jb)(Object(w.r)(c,{style:{"background-color":"rgb(44, 55, 89)",height:"56px"}},{default:Object(w.ib)(function(){return[Object(w.r)(o,{style:{color:"azure",height:"100%","text-align":"left",margin:"auto"}})]}),_:1},512),[[w.fb,l.showHeader]]),Object(w.r)(p,{style:{overflow:"hidden"}},{default:Object(w.ib)(function(){return[Object(w.r)(u,{width:"auto",style:{overflow:"hidden"}},{default:Object(w.ib)(function(){return[Object(w.r)(r)]}),_:1}),Object(w.r)(m,{style:{padding:"10px 10px 0 10px"}},{default:Object(w.ib)(function(){return[Object(w.r)(p,{style:{height:"100%"}},{default:Object(w.ib)(function(){return[Object(w.r)(c,{style:{height:"30px",padding:"0px",display:"flex"}},{default:Object(w.ib)(function(){return[Object(w.r)(b,{href:"javascript:void()",onClick:i.goBack,type:"primary",icon:"el-icon-back",underline:!1,style:{height:"13px",width:"60px"}},{default:Object(w.ib)(function(){return[g]}),_:1},8,["onClick"]),Object(w.r)(d,{direction:"vertical"}),Object(w.r)(f,{"separator-class":"el-icon-arrow-right",style:{"margin-bottom":"30px"}},{default:Object(w.ib)(function(){return[(Object(w.K)(!0),Object(w.n)(w.b,null,Object(w.R)(l.items,function(t){return Object(w.K)(),Object(w.l)(s,{key:t.path,to:{path:t.path}},{default:Object(w.ib)(function(){return[Object(w.o)("i",{class:Object(w.A)(t.icon),style:{"margin-right":"3px"}},null,2),Object(w.q)(Object(w.X)(t.label),1)]}),_:2},1032,["to"])}),128))]}),_:1})]}),_:1}),Object(w.r)(p,{style:{"overflow-y":"auto"}},{default:Object(w.ib)(function(){return[l.routerViewShow?(Object(w.K)(),Object(w.l)(h,{key:0},{default:Object(w.ib)(function(t){var e=t.Component;return[Object(w.r)(w.f,{name:"el-zoom-in-center"},{default:Object(w.ib)(function(){return[(Object(w.K)(),Object(w.l)(w.c,null,[(Object(w.K)(),Object(w.l)(Object(w.V)(e)))],1024))]}),_:2},1024)]}),_:1})):Object(w.m)("",!0)]}),_:1})]}),_:1})]}),_:1})]}),_:1}),Object(w.r)(j,{title:l.dialogTitle,modelValue:l.showDialog,"onUpdate:modelValue":e[0]||(e[0]=function(t){return l.showDialog=t}),"destroy-on-close":"",onClose:i.closeDialog,width:"80%","lock-scroll":""},{default:Object(w.ib)(function(){return[l.showDialog?(Object(w.K)(),Object(w.l)(O,{key:0,"router-path":l.dialogDataPath,"router-id":l.dialogDataId,"router-query":l.dialogDataQuery,close:i.closeDialog},null,8,["router-path","router-id","router-query","close"])):Object(w.m)("",!0)]}),_:1},8,["title","modelValue","onClose"]),Object(w.r)(j,{title:l.tabTitle,modelValue:l.showTabDialog,"onUpdate:modelValue":e[1]||(e[1]=function(t){return l.showTabDialog=t}),"destroy-on-close":"",onClose:i.closeTabDialog,width:"50%","lock-scroll":""},{default:Object(w.ib)(function(){return[l.showTabDialog?(Object(w.K)(),Object(w.l)(v,{key:0,"router-path":l.tabDataPath,"router-id":l.tabDataId,"router-query":l.tabDataQuery,close:i.closeTabDialog},null,8,["router-path","router-id","router-query","close"])):Object(w.m)("",!0)]}),_:1},8,["title","modelValue","onClose"]),Object(w.r)(y,{style:{"background-color":"rgb(123, 08, 80)",height:"20px",color:"azure",display:"none"}},{default:Object(w.ib)(function(){return[T]}),_:1})]}),_:1})}},e.default=n}}]);