1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d38c21b0"],{"09f4":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,n,r){return e/=r/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,n){var i=o(),s=e-i,c=20,u=0;t="undefined"===typeof t?500:t;var l=function e(){u+=c;var o=Math.easeInOutQuad(u,i,s,t);a(o),u<t?r(e):n&&"function"===typeof n&&n()};l()}},"3bc6":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"m-container"},[e._m(0),e._v(" "),n("div",{staticClass:"m-core"},[n("save-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[n("el-form-item",{attrs:{prop:"search"}},[n("el-input",{attrs:{clearable:"",placeholder:"姓名/编号/手机号"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){t.target.blur(),e.$refs.searchForm.save(),e.search()}(t)}},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),n("el-form-item",{attrs:{prop:"deviceNum"}},[n("el-input",{attrs:{clearable:"",placeholder:"设备号"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){t.target.blur(),e.$refs.searchForm.save(),e.search()}(t)}},model:{value:e.searchForm.deviceNum,callback:function(t){e.$set(e.searchForm,"deviceNum","string"===typeof t?t.trim():t)},expression:"searchForm.deviceNum"}})],1),e._v(" "),n("el-form-item",{attrs:{prop:"timer"}},[n("el-date-picker",{attrs:{type:"daterange","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"绑定开始日期","end-placeholder":"绑定结束日期","picker-options":{firstDayOfWeek:1}},model:{value:e.searchForm.timer,callback:function(t){e.$set(e.searchForm,"timer","string"===typeof t?t.trim():t)},expression:"searchForm.timer"}})],1),e._v(" "),n("el-form-item",[n("el-button",{attrs:{"native-type":"submit",type:"primary"}},[e._v("搜索")]),e._v(" "),n("el-button",{attrs:{"native-type":"reset",type:"danger"}},[e._v("重置")])],1)],1),e._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[n("el-table-column",{attrs:{align:"center",prop:"studentId",label:"用户编号"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[n("copy-text",[e._v(e._s(t.row.userId))])],1)]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"studentId",label:"用户姓名"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[n("copy-text",[e._v(e._s(t.row.user.realName))])],1)]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"studentId",label:"手机号码"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[n("copy-text",[e._v(e._s(t.row.user.phone))])],1)]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"studentId",label:"设备号",width:"280px"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[n("copy-text",[e._v(e._s(t.row.deviceNum))])],1)]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"studentId",label:"客户端",width:"280px"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[e._v("\n "+e._s(e._f("clientTypeFilter")(t.row.clientId))+"\n ")])]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"studentId",label:"绑定时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[e._v("\n "+e._s(t.row.bindTime)+"\n ")])]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"studentId",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[n("auth",{attrs:{auths:"userDevice/unbind"}},[n("el-button",{attrs:{type:"text"},on:{click:function(n){return e.unbind(t.row)}}},[e._v("解除限制")])],1)],1)]}}])})],1),e._v(" "),n("pagination",{attrs:{sync:"",total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],1)],1)])},a=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("h2",[n("div",{staticClass:"squrt"}),e._v("\n 设备号管理\n ")])}],o=(n("386d"),n("5530")),i=n("15fd"),s=(n("96cf"),n("1da1")),c=n("333d"),u=n("829b"),l=function(e){return Object(u["a"])({url:"/api-auth/userDevice/queryPage",params:e,method:"get"})},d=function(e){return Object(u["a"])({url:"/api-auth/userDevice/unbind",params:e,method:"post"})},p=n("ed08"),m={components:{pagination:c["a"]},data:function(){return{searchForm:{search:null,deviceNum:null,timer:[]},tableList:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},created:function(){},mounted:function(){this.init()},methods:{init:function(){this.getList()},getList:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,n,r,a,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=this.searchForm,n=t.timer,r=Object(i["a"])(t,["timer"]),a=Object(o["a"])(Object(o["a"])({},r),{},{page:this.rules.page,rows:this.rules.limit},Object(p["a"])(n,["bindStartTime","bindEndTime"],"YYYY-MM-DD")),e.prev=2,e.next=5,l(a);case 5:s=e.sent,this.tableList=s.data.rows,this.rules.total=s.data.total,e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](2),console.log(e.t0);case 13:case"end":return e.stop()}}),e,this,[[2,10]])})));function t(){return e.apply(this,arguments)}return t}(),search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.$refs["searchForm"].resetFields(),this.search()},unbind:function(e){var t=this;this.$confirm("请确认是否解除绑定,解除后该设备号可重新绑定账号","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(s["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d({id:e.id});case 3:n.sent,t.$message.success("解除绑定成功"),t.getList(),n.next=11;break;case 8:n.prev=8,n.t0=n["catch"](0),console.log(n.t0);case 11:case"end":return n.stop()}}),n,null,[[0,8]])})))).catch((function(){}))}}},f=m,v=n("2877"),h=Object(v["a"])(f,r,a,!1,null,"ea132380",null);t["default"]=h.exports},ed08:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}));var r=n("ade3"),a=(n("c5f6"),n("28a5"),n("a481"),n("6b54"),n("53ca"),n("5a0c")),o=n.n(a);var i=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],a=n.toLocaleUpperCase();t.push({label:r,value:"TRUE"===a||"FALSE"===a?"TRUE"===a:n})}return t},s=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";return e&&e.length?(t={},Object(r["a"])(t,n[0]||"start",o()(e[0]).isValid()?o()(e[0]).format(a):""),Object(r["a"])(t,n[1]||"end",o()(e[1]).isValid()?o()(e[1]).format(a):""),t):{}}}}]);
|