travel/service/public/static/js/chunk-f14cda0a.3de5a186.js

1 line
3.2 KiB
JavaScript
Raw Normal View History

2024-06-28 18:34:38 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f14cda0a"],{4697:function(t,e,n){},"5c7c":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{align:"center",label:"ID",width:"60",prop:"id"}}),n("el-table-column",{attrs:{align:"center",label:"姓名",width:"80",prop:"username"}}),n("el-table-column",{attrs:{align:"center",label:"状态",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[0===e.row.isOnline?n("el-tag",{attrs:{type:"border-card"}},[t._v("下线")]):t._e(),1===e.row.isOnline?n("el-tag",{attrs:{type:"success"}},[t._v("在线")]):t._e(),2===e.row.isOnline?n("el-tag",{attrs:{type:"info"}},[t._v("没上线")]):t._e()]}}])}),n("el-table-column",{attrs:{align:"center",label:"是否分单",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(n){return t.updateStatus(e.row)}},model:{value:e.row.isEndWork,callback:function(n){t.$set(e.row,"isEndWork",n)},expression:"scope.row.isEndWork"}})]}}])}),n("el-table-column",{attrs:{align:"center",label:"在线时长",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(Math.floor((e.row.data?e.row.data.onlineTime:e.row.onlineTime)/60)||"--")+" 分钟 ")]}}])}),n("el-table-column",{attrs:{width:"138px",align:"center",label:"上线时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("parseTime")(e.row.start_work_time,"{y}-{m}-{d} {h}:{i}")))])]}}])}),n("el-table-column",{attrs:{width:"138px",align:"center",label:"停止分单时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("parseTime")(e.row.end_work_time,"{y}-{m}-{d} {h}:{i}")))])]}}])}),n("el-table-column",{attrs:{width:"138px",align:"center",label:"下线时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("parseTime")(e.row.last_work_time,"{y}-{m}-{d} {h}:{i}")))])]}}])})],1)],1)},a=[],l={name:"GetOnlineList",components:{},data:function(){return{statusArr:{0:"禁用",1:"启用"},list:[],total:0,loading:!1,listLoading:!0,listQuery:{page:1,limit:10,status:null,content:""},dialogCreate:!1,dialogEdit:!1,item:{},anchors:{}}},created:function(){this.listQuery.status=this.$route.query.status||null,this.listQuery.content=this.$route.query.content||null,this.getOnlineList()},methods:{getOnlineList:function(){var t=this;this.listLoading=!0,this.$axios.get("/admin/admin/getOnlineList",{params:this.listQuery}).then((function(e){t.list=e.data,t.listLoading=!1})).catch((function(){t.listLoading=!1}))},updateStatus:function(t){var e=this;this.$axios.post("/admin/admin/editInfo",{id:t.id,order_num:t.order_num,is_order:t.isEndWork}).then((function(){e.getOnlineList()})).catch((function(){}))}}},s=l,o=(n("c1db"),n("2877")),r=Object(o["a"])(s,i,a,!1,null,"2926b996",null);e["default"]=r.exports},c1db:function(t,e,n){"use strict";n("4697")}}]);