12 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_managedata/users"],{369:function(e,t,n){"use strict";(function(e,t){var s=n(4);n(26);s(n(25));var i=s(n(370));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},370:function(e,t,n){"use strict";n.r(t);var s=n(371),i=n(373);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);n(375);var u,r=n(34),c=Object(r["default"])(i["default"],s["render"],s["staticRenderFns"],!1,null,null,null,!1,s["components"],u);c.options.__file="pages_managedata/users.vue",t["default"]=c.exports},371:function(e,t,n){"use strict";n.r(t);var s=n(372);n.d(t,"render",(function(){return s["render"]})),n.d(t,"staticRenderFns",(function(){return s["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return s["recyclableRender"]})),n.d(t,"components",(function(){return s["components"]}))},372:function(e,t,n){"use strict";var s;n.r(t),n.d(t,"render",(function(){return i})),n.d(t,"staticRenderFns",(function(){return u})),n.d(t,"recyclableRender",(function(){return o})),n.d(t,"components",(function(){return s}));try{s={uSearch:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-search/u-search")]).then(n.bind(null,666))},uCheckboxGroup:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-checkbox-group/u-checkbox-group")]).then(n.bind(null,706))},uCheckbox:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-checkbox/u-checkbox")]).then(n.bind(null,714))},uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,505))},uPopup:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-popup/u-popup")]).then(n.bind(null,561))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-input/u-input")]).then(n.bind(null,690))},uTag:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-tag/u-tag")]).then(n.bind(null,543))},uModal:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-modal/u-modal")]).then(n.bind(null,682))},uLoadingPage:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-loading-page/u-loading-page")]).then(n.bind(null,644))}}}catch(r){if(-1===r.message.indexOf("Cannot find module")||-1===r.message.indexOf(".vue"))throw r;console.error(r.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var e=this,t=e.$createElement,n=(e._self._c,e.list.length),s=e.selectact&&e.selectact?e.selectedUsers.length:null,i=e.valueid.length,o=e.valuej.length;e._isMounted||(e.e0=function(t){e.selectact=!e.selectact},e.e1=function(t){e.showgang=!e.showgang},e.e2=function(t){e.showjuese=!e.showjuese},e.e3=function(t){e.showcommpany=!e.showcommpany},e.e4=function(t){e.showgang=!e.showgang},e.e5=function(t){e.showgang=!e.showgang},e.e6=function(t){e.showjuese=!e.showjuese},e.e7=function(t){e.showjuese=!e.showjuese},e.e8=function(t){e.showuser=!e.showuser}),e.$mp.data=Object.assign({},{$root:{g0:n,g1:s,g2:i,g3:o}})},o=!1,u=[];i._withStripped=!0},373:function(e,t,n){"use strict";n.r(t);var s=n(374),i=n.n(s);for(var o in s)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(o);t["default"]=i.a},374:function(e,t,n){"use strict";(function(e){var s=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(11)),o=n(274);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=function(){n.e("pages_managedata/components/tki-tree/tki-tree").then(function(){return resolve(n(722))}.bind(null,n)).catch(n.oe)},l={components:{tkiTree:c},data:function(){return{viewload:!0,loadingtext:"数据加载中...",baseUrl:e.getStorageSync("requestPath"),avatar:this.$store.state.imgpath+"/app/images/default.png",CustomBar:0,hidden:!0,listCurID:"",list:[],listCur:"",searchContent:"",tabs:["已审核","未审核"],act:0,selectact:!1,isSelectAll:!1,selectedUsers:[],isAudits:1,ids:"",showcommpany:!1,columnb:[["11","22","33"]],postlist:{},showgang:!1,showjuese:!1,valuea:"",valueb:"",actpost:[],valueid:"",valueidbu:"",xuanid:[],valuej:"",rolelist:[],roleid:[],seluserids:[],showuser:!1}},onLoad:function(){this.getUser(),this.getdepartment(),this.getpostlist(),this.getrolelist()},onReady:function(){var t=this;e.createSelectorQuery().select(".indexBar-box").boundingClientRect((function(e){t.boxTop=e.top})).exec(),e.createSelectorQuery().select(".indexes").boundingClientRect((function(e){t.barTop=e.top})).exec()},methods:{roleconfirm:function(){this.roleid=this.rolelist.filter((function(e){return e.checked})).map((function(e){return e.roleId})).join(","),this.valuej=this.rolelist.filter((function(e){return e.checked})).map((function(e){return e.roleName})).join(","),this.showjuese=!this.showjuese},choosechangerole:function(e){this.rolelist[e].checked=!this.rolelist[e].checked},showbumen:function(){this.$refs.tkitree._show()},confirmbchange:function(){var t=this;if(console.log(this.valueb.length,this.xuanid),0!=this.valueb.length)if(0!=this.xuanid.length)if(0!=this.valuej.length){var n={companyUserIds:this.ids,deptId:this.valueidbu,postIds:this.valueid,roleIds:this.roleid};(0,o.modifysaleNews)(n).then((function(n){console.log("设置信息",n),200==n.code?(t.xuanid=[],setTimeout((function(){t.subsalesaudits()}),100)):e.showToast({title:n.msg,icon:"none"})}))}else e.showToast({icon:"none",title:"请选择角色"});else e.showToast({icon:"none",title:"请选择部门"});else e.showToast({icon:"none",title:"请选择部门"})},getallList:function(){this.valueidbu=[],this.valueid=[],this.valueb="",this.valuea="",this.ids=""},postconfirm:function(){this.xuanid=this.postlist.filter((function(e){return e.checked})).map((function(e){return e.postId})),this.valueid=this.postlist.filter((function(e){return e.checked})).map((function(e){return e.postId})).join(","),this.valuea=this.postlist.filter((function(e){return e.checked})).map((function(e){return e.postName})).join(","),this.showgang=!this.showgang},choosechangeTag:function(e){console.log(this.postlist[e].checked),this.postlist[e].checked=!this.postlist[e].checked},getdepartment:function(){var e=this;(0,o.querydepartment)().then((function(t){200==t.code&&(e.columnb=t.data)}))},getpostlist:function(){var e=this;(0,o.querypost)().then((function(t){200==t.code&&(e.postlist=t.data.map((function(e){return r(r({},e),{},{checked:!1})})),console.log("岗位",t))}))},getrolelist:function(){var e=this;(0,o.queryrole)().then((function(t){200==t.code&&(e.rolelist=t.data.map((function(e){return r(r({},e),{},{checked:!1})})))}))},confirma:function(e){this.showgang=!this.showgang,this.valuea=e.value[0],console.log(e)},confirmb:function(e){this.valueb=e[0].label,this.valueidbu=e[0].id,console.log(e[0])},getidshen:function(e){console.log(e),this.getallList(),this.ids=e,this.seluserids[0]=e,this.showuser=!this.showuser},batchApprove:function(){0!==this.selectedUsers.length?(this.ids=this.selectedUsers.join(","),this.seluserids=this.selectedUsers,this.showuser=!this.showuser):e.showToast({title:"请先选择用户",icon:"none"})},subsalesaudits:function(){var t=this;this.seluserids;(0,o.subsalesaudit)(this.seluserids).then((function(n){console.log("subsalesaudits=====",n),200==n.code?(e.showToast({title:"用户通过审核,成为销售!",icon:"none"}),t.valueidbu=[],t.valueid=[],t.valueb=[],t.valuea="",t.valuej="",t.roleid=[],t.ids="",t.showuser=!t.showuser,t.seluserids=[],t.getUser()):e.showToast({title:n.msg,icon:"none"})}))},selectAll:function(){var e=this;this.isSelectAll=!this.isSelectAll,this.selectedUsers=[],this.list=this.list.map((function(t){return t.list=t.list.map((function(t){return e.isSelectAll&&e.selectedUsers.push(t.userId),r(r({},t),{},{checked:e.isSelectAll})})),t})),this.isSelectAll||(this.selectedUsers=[])},changeitem:function(e){var t=this.selectedUsers.indexOf(e);-1===t?this.selectedUsers.push(e):this.selectedUsers.splice(t,1),this.isSelectAll=this.selectedUsers.length===this.getTotalUsers()},getTotalUsers:function(){return this.list.reduce((function(e,t){return e+t.list.length}),0)},tabact:function(e){this.list=[],this.act=e,0==this.act?(this.selectact=!1,this.isAudits=1,this.getUser()):1==this.act&&(this.isAudits=0,this.getUser())},getUser:function(){var e=this,t={searchKey:this.searchContent,isAudit:this.isAudits},n=this;(0,o.getAllUsers)(t).then((function(t){200==t.code&&(e.viewload=!1,n.list=t.users,e.list=e.list.map((function(t){return t.list=t.list.map((function(t){return r(r({},t),{},{checked:e.isSelectAll,postname:t.post.map((function(e){return e.postName})).join(","),rolesname:t.roles.map((function(e){return e.roleName})).join(",")})})),t})))}),(function(e){}))},getCur:function(e){this.hidden=!1,this.listCur=this.list[e.target.id].firstLetter},setCur:function(e){this.hidden=!0,this.listCur=this.listCur},tMove:function(e){var t=e.touches[0].clientY,n=this.boxTop,s=this;if(t>n){var i=parseInt((t-n)/20);console.log(i),i<s.list.length&&(this.listCur=s.list[i].firstLetter)}},tStart:function(){this.hidden=!1},tEnd:function(){this.hidden=!0,this.listCurID=this.listCur},indexSelect:function(e){for(var t=this,n=this.barHeight,s=this.list,i=Math.ceil(s.length*e.detail.y/n),o=0;o<s.length;o++)if(i<o+1)return t.listCur=s[o].firstLetter,t.movableY=20*o,!1},navTo:function(t){e.navigateTo({url:"/pages_managedata/saleInfo?userId="+t.userId})},search:function(){this.getUser()}}};t.default=l}).call(this,n(2)["default"])},375:function(e,t,n){"use strict";n.r(t);var s=n(376),i=n.n(s);for(var o in s)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(o);t["default"]=i.a},376:function(e,t,n){}},[[369,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../.sourcemap/mp-weixin/pages_managedata/users.js.map
|