im/public/assets/js/142.e41fdf4c.js

1 line
6.0 KiB
JavaScript
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self["webpackChunkRaingad_IM"]=self["webpackChunkRaingad_IM"]||[]).push([[142],{3142:function(t,a,s){s.r(a),s.d(a,{default:function(){return d}});var e=function(){var t=this,a=t._self._c;return a("div",{staticClass:"pd-20"},[a("el-row",{attrs:{gutter:20}},[t.globalConfig&&t.globalConfig.demon_mode?a("el-col",{attrs:{span:10}},[a("el-card",{staticClass:"mb-20",attrs:{shadow:"hover",header:"欢迎"}},[a("div",{staticClass:"welcome"},[a("div",{staticClass:"logo"},[a("img",{attrs:{src:s(5080)}}),a("h2",[t._v("欢迎体验 "+t._s(t.$packageData.name))])]),a("div",{staticClass:"tips"},t._l(t.$packageData.funcList,(function(s){return a("div",{key:s.icon,staticClass:"tips-item"},[a("div",{staticClass:"tips-item-icon"},[a("i",{class:s.icon})]),a("div",{staticClass:"tips-item-message",domProps:{textContent:t._s(s.text)}})])})),0),a("div",{staticClass:"actions"},[a("router-link",{attrs:{to:"/chat"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-s-promotion",size:"large"}},[t._v("去聊天")])],1)],1)])])],1):t._e(),t.globalConfig&&t.globalConfig.demon_mode?a("el-col",{attrs:{span:8}},[a("el-card",{staticClass:"item-background mb-20",attrs:{shadow:"hover",header:"关于项目"}},[a("p",[t._v(t._s(t.$packageData.name)+"是一个"),a("b",{staticClass:"c-red"},[t._v("开源的即时通信demo主要用于学习交流为大家提供即时通讯的开发思路")]),t._v("许多功能需要自行开发开发的初衷旨在快速建立企业内部通讯系统、内网交流、社区交流。不建议用于商业用途如确有需要商用请联系作者授权自行开发代码量必须要高于原代码量的30%以上,并注明相关的版权问题。")]),a("div",{staticClass:"mt-15 ml-15 mb-15"},[t._v(" 前端地址:"),a("a",{attrs:{href:t.$packageData.frontUrl,target:"_blank"}},[a("el-image",{attrs:{src:t.$packageData.frontUrl+"/badge/star.svg?theme=white",alt:"star"}})],1)]),a("div",{staticClass:"ml-15 mb-15"},[t._v(" 后端地址:"),a("a",{attrs:{href:t.$packageData.backstageUrl,target:"_blank"}},[a("el-image",{attrs:{src:t.$packageData.backstageUrl+"/badge/star.svg?theme=dark",alt:"star"}})],1)])])],1):t._e(),t.globalConfig&&t.globalConfig.demon_mode?a("el-col",{attrs:{span:6}},[a("el-card",{staticClass:"mb-20",attrs:{shadow:"hover",header:"数据概览"}},[a("div",{staticClass:"mb-15"},[t._v("用户总数xxxx")]),a("div",{staticClass:"mb-15"},[t._v("群聊总数xxxx")]),a("div",{staticClass:"mb-15"},[t._v("文件总数xxxx")])])],1):t._e(),a("el-col",{attrs:{span:14}},[a("el-card",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"task task-item mb-20",attrs:{shadow:"hover"}},[a("div",{attrs:{slot:"header"},slot:"header"},[a("span",[t._v("系统服务")]),a("span",{staticClass:"handler",staticStyle:{float:"right","margin-top":"-3px"}},[a("i",{staticClass:"f-24 c-999 cur-handle",class:t.taskStatus?"el-icon-video-pause stop-task":"el-icon-video-play start-task",staticStyle:{padding:"3px"},attrs:{type:"primary"},on:{click:t.startService}})])]),a("el-alert",{attrs:{type:"warning",title:"系统服务使用要求运行的PHP的版本必须是默认的并且可以直接执行PHP命令。如果启动失败可能是某些函数被禁用或者runtime的目录没有写入权限可以在终端中运行 php think task start 来调试程序的错误。","show-icon":"",closable:!1}}),t._l(t.taskList,(function(s,e){return a("div",{key:e,staticClass:"lz-flex lz-space-between mt-10 mb-10 lz-align-items-center"},[a("div",{staticClass:"task-name el-icon-timer"},[t._v(" "+t._s(s.remark)+" ")]),a("div",{staticClass:"el-icon-alarm-clock"},[t._v(" "+t._s(s.started)+" ")]),"active"==s.status?a("div",{staticClass:"c-green"},[t._v("运行中")]):a("div",{staticClass:"c-red"},[t._v("未启动")]),a("el-button",{staticClass:"ml-10",attrs:{size:"mini",type:"text"},on:{click:function(a){return t.showLog(s.name)}}},[t._v("日志")])],1)})),a("el-dialog",{attrs:{width:"900px",title:"运行日志",visible:t.dialogTableVisible},on:{"update:visible":function(a){t.dialogTableVisible=a}}},[a("el-button",{on:{click:t.clearTaskLog}},[t._v("清除进程日志")]),a("div",{staticClass:"mt-10",staticStyle:{height:"500px"}},[a("el-scrollbar",[a("div",{staticClass:"task-log pd-10"},[t._v(t._s(t.taskLog))])])],1)],1)],2)],1)],1)],1)},i=[],l=s(3822),o={components:{},computed:{...(0,l.rn)({globalConfig:t=>t.globalConfig})},data(){return{loading:!1,taskStatus:!1,taskList:[],curName:"",dialogTableVisible:!1,taskLog:"",task:[{name:"im_task_schedule",started:"--",status:"stop",remark:"计划任务"},{name:"im_task_queue",started:"--",status:"stop",remark:"消息队列"},{name:"im_task_worker",started:"--",status:"stop",remark:"消息推送"}]}},mounted(){this.resetTask(),this.getTaskList()},methods:{resetTask(){let t=this.task;this.taskList=t},getTaskList(){this.$api.taskApi.getTaskList().then((t=>{400==t.code?this.taskStatus=!1:0==t.code&&(this.taskStatus=!0,this.taskList=t.data)}))},startService(){this.loading=!0,0==this.taskStatus?this.$api.taskApi.startTask().then((t=>{this.loading=!1,0==t.code&&this.getTaskList()})):this.$confirm("确定要停止服务吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{this.$api.taskApi.stopTask().then((t=>{this.loading=!1,0==t.code&&(this.taskStatus=!1,this.resetTask())}))})).catch((()=>{this.loading=!1,this.$message({type:"info",message:"已取消停止"})}))},showLog(t){this.curName=t,this.$api.taskApi.getTaskLog({name:t}).then((t=>{if(0==t.code){if(""==t.data)return this.$message.error("暂无日志");this.dialogTableVisible=!0,this.taskLog=t.data}}))},clearTaskLog(){this.$confirm("确定要清除日志吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{this.$api.taskApi.clearTaskLog({name:this.curName}).then((t=>{0==t.code&&(this.dialogTableVisible=!1,this.taskLog="")}))})).catch((()=>{}))}}},r=o,n=s(1001),c=(0,n.Z)(r,e,i,!1,null,"0cbbc351",null),d=c.exports},5080:function(t,a,s){t.exports=s.p+"assets/img/logo.e8099414.png"}}]);