1 line
5.0 KiB
JavaScript
1 line
5.0 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-318f9ca0"],{1029:function(t,e,a){var o=a("24fb");e=o(!1),e.push([t.i,".content[data-v-8c5dfe6a]{background:#fff;height:100vh}.member-box[data-v-8c5dfe6a]{background:#fff;text-align:left;padding:1rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-bottom:1px solid #eee}.member-box .left[data-v-8c5dfe6a]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.member-box .head[data-v-8c5dfe6a]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.member-box .name[data-v-8c5dfe6a]{font-weight:700}.member-box .tag[data-v-8c5dfe6a]{font-size:12px;border-radius:15px;background-color:#267df3;color:#fff;padding:.1rem .4rem;margin-left:.5rem}.member-box .mobile[data-v-8c5dfe6a]{margin-top:.5rem}.member-box .right[data-v-8c5dfe6a]{-webkit-box-flex:0;-webkit-flex:0 0 3rem;-ms-flex:0 0 3rem;flex:0 0 3rem;text-align:right;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;color:#267df3}.member-box .yellow[data-v-8c5dfe6a]{background-color:#ffb600}.btn[data-v-8c5dfe6a]{position:fixed;bottom:0;left:0;width:100%;background:#fff}.btn .sure[data-v-8c5dfe6a]{font-size:18px;line-height:2.25rem;width:80%;margin:10px auto;height:2.25rem;background-image:-webkit-gradient(linear,left bottom,left top,from(#377aff),to(#679aff));background-image:-webkit-linear-gradient(bottom,#377aff,#679aff);background-image:linear-gradient(0deg,#377aff,#679aff);border-radius:20px;color:#fff}.btn.pcStyle[data-v-8c5dfe6a]{width:375px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}",""]),t.exports=e},"188c":function(t,e,a){"use strict";a("f138")},ac0d:function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));var o=document.documentElement,i=document.body,n={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return o&&o.scrollTop?t=o.scrollTop:i&&(t=i.scrollTop),t},getClientHeight:function(){var t=0;return t=i.clientHeight&&o.clientHeight?Math.min(i.clientHeight,o.clientHeight):Math.max(i.clientHeight,o.clientHeight),t},getScrollHeight:function(){return Math.max(i.scrollHeight,o.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},f0df:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("c-title",{attrs:{hide:!1,text:"员工列表"}}),a("div",{staticClass:"content"},[t._l(t.recordsList,(function(e){return a("div",{key:e.id,staticClass:"member-box"},[a("div",{staticClass:"left"},[a("p",{staticClass:"head"},[a("span",{staticClass:"name"},[t._v(t._s(e.name))]),a("span",{staticClass:"tag",class:[1==e.role_id?"yellow":""]},[t._v(t._s(1==e.role_id?"法定":"员工"))])]),a("p",{staticClass:"mobile"},[t._v(t._s(e.has_one_member.mobile))])]),1!=e.role_id?a("div",{staticClass:"right",on:{click:function(a){return t.delRow(e.id)}}},[t._v(" 删除 ")]):t._e()])})),a("div",{staticStyle:{height:"3.5rem"}})],2),a("div",{staticClass:"btn",class:[3==t.fun.getPhoneEnv()?"pcStyle":""]},[a("p",{staticClass:"sure",on:{click:t.toAdd}},[t._v("添加员工")])])],1)},i=[],n=(a("e7e5"),a("d399")),r=(a("99af"),a("ac0d")),l={mixins:[r["a"]],data:function(){return{recordsList:[],isLoadMore:!0,page:1,total_page:0}},activated:function(){this.getData()},methods:{delRow:function(t){var e=this;this.$dialog.confirm({message:"确定删除吗?"}).then((function(){$http.get("plugin.yun-contract-lock.frontend.worker.del-worker",{id:t},"正在").then((function(t){1===t.result?(e.recordsList=[],e.getData(),Object(n["a"])("删除成功!")):Object(n["a"])("删除失败!")})).catch((function(t){}))})).catch((function(){}))},toAdd:function(){this.$router.push(this.fun.getUrl("addStaffLock"))},getData:function(){var t=this;this.page=1,$http.get("plugin.yun-contract-lock.frontend.worker.get-list",{page:1},"加载中").then((function(e){1===e.result?(t.dataInfo=e.data,t.isLoadMore=!0,t.total_page=e.data.last_page,t.total_page||(t.total_page=0),t.recordsList=e.data.data):Object(n["a"])(e.msg)})).catch((function(t){}))},getMoreData:function(){var t=this;t.isLoadMore=!1,this.page>=this.total_page||(this.page=this.page+1,$http.get("plugin.yun-contract-lock.frontend.worker.get-list",{page:t.page},"加载中").then((function(e){if(t.isLoadMore=!0,1===e.result){var a=e.data.data;t.recordsList=t.recordsList.concat(a)}else t.page=t.page-1,t.isLoadMore=!1}),(function(t){})))}},components:{}},c=l,s=(a("188c"),a("2877")),d=Object(s["a"])(c,o,i,!1,null,"8c5dfe6a",null);e["default"]=d.exports},f138:function(t,e,a){var o=a("1029");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=a("499e").default;i("1cab4aab",o,!0,{sourceMap:!1,shadowMode:!1})}}]); |