| 1 |
- webpackJsonp([21],{U81D:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAAEr0lEQVRYw82ZWUxcVRjHf+cyLGEfUQq0ISxhkVqttCpt0hhoajRpfFDUJnZR1Bq9xCXRWFya+CBaX0pM58E+QKXxQavGmJgYU7VRmjpJNWAbC1qotMa2FMJaNhmOD98FZwYIc+8Fpv/kZnKXc8/vfvOd75zzfQoXUj5dAFQCFUApUAAkAWnAIHAd6AI6gFPAD9pUXY77cwCYDjwJ7AbWO+izFWgGmrSpBpYFVvl0MlAH1AKpTq0TpCHgEPCuNtXIksEqn34Y+ADIWQLIcP0DvKBN9bkrWOXTCYAPqFkGyHAdBl7Uphq3DWv55lfAlhUAnVEL8KA2VX/EsMqnM4DjOBtAbtUGbNWm6lsU1vrrTwD3RAF0Rn6gUptqLPiiMc+DB6MMitX/ofCLIZa1Rv1nUQYN1iPaVLM8s7DKp1ORmSYr2oRB6gGKtKmGINQNXrvBQAEyLS7AsqwVpv5C5nRHyk2G3aXwUAGsSoSeUfjyAhxph4vDoJ0DDwJ52lQDHutCjRvQRA/UlMGuYsi3JuLsREiPB48BB36FkX8dw6YBTwANM7C7nH84vHon1JXDtIajHdDeD8VeeLQQ9pXLM2/53fTAHqBBKZ/OR5ZxjrQpCz65D3KS4Knv4etuGJqElDi4Pxcaq+DaGDz2LZy87Aq40AC2unnD5ixYnQzNHXCsE3rHYXIa+sbhiy5oaofsJNiS7QoUoMpAFs6OlR4vo/Rsn0AGazIAZ3rl/k0JrmErDKDEzRv6xmFqGsozIS5sPow1YEOm+HLvmLP3B6nUAPLcvOHUFegehupCeHZt6JT4dBnsKJL7P7nzV4A8pXx6EBcrf0NB7Tqot5zp56twaQRWJ0HFKohREgkafhMLu9Cwxy3oxlugao24gMeAe3MgoAUyRomLVK6Rj/BflXsOleLYsgkxYtE3N0JSLFwZhTN9EmMHJiA1HkrSYV0G5CTCeEAmh4NtMDrl3LJDdmFjDajbIAF/IgBN58B3Ftp65z5b5oXn18HOYnj7bkiNE7cIjxyRwBpAt12LVheKVScC8MpJ2HtiflCA3/uh9kd4qQWuT8Fzt8HOEvk3bOqSAbTbabE5C/auBW881P8CjRG2bu6A/X5ZRzxTJr5tU+cM4LSdFjuKYP3N4p8f/yEDKBJNa/j0PJy+Jn78eLFtWL+BbAwj1qYsSIuD439D/4TEVUMtfijk+W8uinXvyrQN+51Hm+q88ulWItzJeuPlt9QLNbdCYFpCViSW1cDtGXJu02dbtan+nFkiHo0UNtYCeyBXDqfy2MuyfQQwA9sI7CeCBXjHgAT2gHaQ1UMs7DGgczDiJoPAEQjdML4DvO7cVsumem2qNyB0w3gA2U3eSOoB3p85mYW1trtmtOnCVKtNNeswIePYSih8GG1CS43aVMeCL8wXdF5Gck3RlB9JWodoDqyVDNuOZPOioTZge3hSbl5YC7gXKWy0rDBoC5I9nHdZtODcYyV0t2HFuBXQYWDbQolkiLymUI3UFNxvqOfqMlJTWDR7aadakwLsY+mrNe9pUw1HxGC3B+XTXiT3tAe4wwFkGzLXL18dbAHwAqCK/yuM+UAyYvkhYAS4QGiFsdNpf/8BaV5pgnqw7l0AAAAASUVORK5CYII="},ZibE:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s("3cXf"),r=s.n(a),i={data:function(){return{selectItem:"1",searchVal:"",f_id:"",ename:"",is_online:null,btnState:this.displayType}},props:{displayType:{type:String}},methods:{checkType:function(e){this.btnState=e,this.$emit("fun",this.btnState)},searchEquipList:function(){1==this.selectItem?this.f_id=this.searchVal:2==this.selectItem&&(this.ename=this.searchVal),this.$emit("fun2",{f_id:this.f_id,ename:this.ename})},selClear:function(){this.searchVal&&(this.searchVal="",this.f_id="",this.ename="",this.$emit("fun2",{f_id:this.f_id,ename:this.ename}))},isOnlineSelect:function(){this.$emit("fun3",this.is_online)}}},o={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"check-btns"},[s("div",{staticClass:"type-check"},[e._t("left-search")],2),e._v(" "),s("div",{staticClass:"search-box"},[e._t("right-search",function(){return[s("el-input",{staticClass:"input-with-select",staticStyle:{cursor:"pointer"},attrs:{placeholder:"请输入内容",size:"mini",clearable:"","suffix-icon":"el-icon-search"},on:{change:function(t){return e.searchEquipList()}},model:{value:e.searchVal,callback:function(t){e.searchVal=t},expression:"searchVal"}},[s("el-select",{staticClass:"select02",attrs:{slot:"prepend",placeholder:"请选择"},on:{change:function(t){return e.selClear()}},slot:"prepend",model:{value:e.selectItem,callback:function(t){e.selectItem=t},expression:"selectItem"}},[s("el-option",{attrs:{label:"设备ID",value:"1"}}),e._v(" "),s("el-option",{attrs:{label:"设备名",value:"2"}})],1)],1),e._v(" "),s("el-select",{staticClass:"select01",attrs:{clearable:"",size:"mini",placeholder:"请选择在线状态"},on:{change:function(t){return e.isOnlineSelect()}},model:{value:e.is_online,callback:function(t){e.is_online=t},expression:"is_online"}},[s("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),s("el-option",{attrs:{label:"在线",value:"1"}}),e._v(" "),s("el-option",{attrs:{label:"离线",value:"0"}})],1)]}),e._v(" "),e._t("search-box")],2)])},staticRenderFns:[]};var l=s("C7Lr")(i,o,!1,function(e){s("nZ4f")},"data-v-38c7fcde",null).exports,n=s("Y2GS"),c={components:{searchBar:l},inject:["reload"],data:function(){var e=this,t=function(e,t,s){/^1\d{10}$/.test(t)?s():s(new Error("请输入合法的手机号码"))};return{role:"",username:"",txtInner:"筛选测试用户",userList:[],userGroupList:[],roleList:[],page:1,totalNum:0,userTypeCheck:"",tets_user:"",addUserDialogVisible:!1,addUserForm:{username:"",mobile:"",pass:"",role_id:"",user_type:"",pcd:"",user_area:"",projectname:"",cs_user:!1,user_group_id:""},cityData:n.a,areaList:[],editIsShow:!1,editUserForm:{},editUserDialogVisible:!1,editUserFormRules:{user_phone:[{validator:t,trigger:"blur"}]},addUserFormRules:{username:[{required:!0,message:"请填写用户名",trigger:"blur"}],mobile:[{required:!0,trigger:"blur",message:"手机号不能为空"},{validator:t,trigger:"blur"}],pass:[{required:!0,message:"请填写用户密码",trigger:"blur"}],projectname:[{required:!0,message:"请填写项目名称",trigger:"blur"}],role_id:[{required:!0,message:"请选择角色类型",trigger:"blur"}]},resetPassFormRules:{oldPass:[{required:!0,message:"请填原始密码",trigger:"blur"}],pass:[{validator:function(t,s,a){""===s?a(new Error("请输入新密码")):(""!==e.resetPassForm.checkPass&&e.$refs.resetPassFormRef.validateField("checkPass"),a())},trigger:"blur"},{required:!0,message:"请填写新密码",trigger:"blur"}],checkPass:[{validator:function(t,s,a){""===s?a(new Error("请再次输入密码")):s!==e.resetPassForm.pass?a(new Error("两次输入密码不一致!")):a()},trigger:"blur"},{required:!0,message:"请确认新密码",trigger:"blur"}]},checkList:function(){this.page=1,this.getList()},tableRadio:"",allocationdialogVisible:!1,newusername:"",undistributedlist:[],allocatedlist:[],allocatedlist2:[],usercheckList:[],selectedusername:""}},computed:{userType:function(){return this.$store.state.myuser_type}},watch:{},created:function(){this.getRoleList()},mounted:function(){this.getList(),this.getUserGroup()},methods:{getList:function(){var e=this;this.$axios({method:"POST",url:"/api/api_gateway?method=user.login.users_info",data:this.qs.stringify({role_id:this.role,page_size:10,user_type:this.userTypeCheck,page:this.page,username:this.username,tets_user:this.tets_user})}).then(function(t){""==t.data.message&&(e.userList=t.data.data.data,e.totalNum=t.data.data.count)})},getUserGroup:function(){var e=this;this.$axios({method:"POST",url:"/api/api_gateway?method=pest.warning_record.rolemanage_view",data:this.qs.stringify({add_role:"all"})}).then(function(t){""==t.data.message&&(e.userGroupList=t.data.data.data)})},getRoleList:function(){var e=this;this.$axios({method:"POST",url:"/api/api_gateway?method=user.perms.role_list"}).then(function(t){""==t.data.message&&(e.roleList=t.data.data.map(function(e){return{role_id:e.role_id,role_name:e.role_name}}))})},selUserTest:function(){this.tets_user=""==this.tets_user?1:"",this.getList(),this.txtInner="筛选测试用户"==this.txtInner?"全部用户":"筛选测试用户"},addUser:function(){this.addUserDialogVisible=!0},pcdChange:function(e){var t="",s=this;switch(e){case"1":t="province";break;case"2":t="city";break;case"3":t="district"}this.$axios({method:"POST",url:"/api/api_gateway?method=device.device_manage.device_addr",data:this.qs.stringify({addr_type:t})}).then(function(e){""==e.data.message&&(s.areaList=e.data.data,s.addUserForm.user_area="",s.editUserForm.user_area="")})},userTypeChange:function(e){this.editIsShow=3==e},addUserDialogClosed:function(){this.$refs.addUserFormRef.resetFields(),this.editIsShow=!1,this.addUserForm.role_id=""},changePage:function(e){this.page=e,this.getList()},addUserSubm:function(){var e=this;this.$refs.addUserFormRef.validate(function(t){if(t){var s=e.addUserForm.cs_user?"1":"";e.$axios({method:"POST",url:"/api/api_gateway?method=user.login.regiest",data:e.qs.stringify({username:e.addUserForm.username,mobile:e.addUserForm.mobile,password:e.addUserForm.pass,role_id:e.addUserForm.role_id,user_type:e.addUserForm.user_type,pcd:e.addUserForm.pcd,user_area:e.addUserForm.user_area,user_group_id:e.addUserForm.user_group_id,projectname:e.addUserForm.projectname,cs_user:s})}).then(function(t){""==t.data.message?(e.$message.success("添加用户成功!"),e.addUserDialogVisible=!1,e.getList()):e.$message.error(t.data.message)})}})},edit:function(){if(this.tableRadio){var e=r()(this.tableRadio);this.editUserForm=JSON.parse(e),0==this.tableRadio.role_id&&(this.editUserForm.role_id=""),"0"==this.tableRadio.user_group_id&&(this.editUserForm.user_group_id=""),this.editUserDialogVisible=!0}else this.$message({type:"error",message:"请先选择用户!"})},editUserDialogClosed:function(){this.$refs.editUserFormRef.resetFields(),this.areaList=[],this.editIsShow=!1},editUserSubm:function(){var e=this;this.$refs.editUserFormRef.validate(function(t){t&&(console.log(e.editUserForm.user_group_id),e.$axios({method:"POST",url:"/api/api_gateway?method=user.login.users_info_updata",data:e.qs.stringify({uid:e.editUserForm.uid,username:e.editUserForm.username,mobile:e.editUserForm.mobile,role_id:e.editUserForm.role_id,user_type:e.editUserForm.user_type,pcd:e.editUserForm.pcd,user_area:e.editUserForm.user_area,projectname:e.editUserForm.projectname,user_group_id:"0"==e.editUserForm.user_group_id?"":e.editUserForm.user_group_id})}).then(function(t){""==t.data.message&&(e.editUserDialogVisible=!1,e.getList())}))})},login:function(e,t){var s=this;this.$confirm("一键登录将登录此用户,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){s.$axios({method:"POST",url:"/api/api_gateway?method=user.login.auto_login",data:s.qs.stringify({uid:e})}).then(function(e){""==e.data.message?(s.$message({type:"success",message:"操作成功!"}),localStorage.setItem("cUsername",t),window.sessionStorage.clear(),window.location.reload(),window.sessionStorage.removeItem("menuTabs"),window.sessionStorage.removeItem("menuTabsValue")):s.$message({type:"warning",message:e.data.message})})}).catch(function(){s.$message({type:"info",message:"取消一键登录!"})})},forbidUse:function(e,t,s){var a=this;this.$confirm(s,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.$axios({method:"POST",url:"/api/api_gateway?method=user.login.users_statu_updata",data:a.qs.stringify({uid:e,state:t})}).then(function(e){""==e.data.message&&(a.$message({type:"success",message:"操作成功!"}),a.getList())})}).catch(function(){a.$message({type:"info",message:"禁用取消!"})})},distribute:function(e,t){this.$store.commit("setData",{name:"allo_equip_user_id",val:e}),this.$store.commit("setData",{name:"allo_equip_usename",val:t}),this.$router.push("allotEquip")},recharge:function(){var e=this;this.tableRadio?this.$confirm("是否向该用户充值一年费用?","信息",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$axios({method:"POST",url:"/api/api_gateway?method=user.login.user_add_package_time",data:e.qs.stringify({uid:e.tableRadio.uid})}).then(function(t){""==t.data.message?(e.$message({type:"success",message:"充值成功!"}),e.getList()):e.$message({type:"error",message:"充值失败!"})})}).catch(function(){e.$message({type:"info",message:"充值取消!"})}):this.$message({type:"error",message:"请先选择用户!"})},resetPassword:function(){var e=this;this.tableRadio?this.$confirm("是否重置密码 ? 重置后的密码为 yf_123456","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$axios({method:"POST",url:"/api/api_gateway?method=user.login.admin_changepwd",data:e.qs.stringify({uid:e.tableRadio.uid})}).then(function(t){""==t.data.message?(e.$message({type:"success",message:"操作成功!"}),e.getList()):e.$message({type:"warning",message:t.data.message})})}).catch(function(){e.$message({type:"info",message:"取消重置密码!"})}):this.$message({type:"error",message:"请先选择用户!"})},testUser:function(){var e=this;this.tableRadio?this.$axios({method:"POST",url:"/api/api_gateway?method=user.login.user_add_package_time",data:this.qs.stringify({uid:this.tableRadio.uid,user_test:1})}).then(function(t){""==t.data.message?(e.$message.success("激活成功"),e.getList()):e.$message.warning(t.data.message)}):this.$message({type:"error",message:"请先选择用户!"})},handleClose:function(e){this.$confirm("确认关闭?").then(function(t){e()}).catch(function(e){})},allocationd:function(e,t){this.allocationdialogVisible=!0,this.allocationdfunciton(1),console.log(e,t),this.allocatedlist=JSON.parse(r()(t)),this.allocatedlist2=JSON.parse(r()(t)),this.selectedusername=e},allocationdfunciton:function(e,t,s){var a=this;this.$axios({method:"POST",url:"/api/api_gateway?method=user.login.allot_users",data:this.qs.stringify({username:r()(s),user:t})}).then(function(t){console.log(t.data.data),1==e?a.undistributedlist=t.data.data:(t.data.data?a.$message({message:"用户分配成功",type:"success",duration:2e3}):a.$message({message:"用户分配失败",type:"error",duration:2e3}),a.getList())})},usereditUserSubm:function(){for(var e=[],t=0;t<this.allocatedlist.length;t++)e.push(this.allocatedlist[t].username);e=e.concat(this.usercheckList),console.log(e),this.allocationdfunciton(2,this.selectedusername,e),this.allocationdialogVisible=!1},userdelete:function(e){for(var t=0;t<this.allocatedlist.length;t++)if(this.allocatedlist[t].username==e){var s=this.undistributedlist.some(function(t){return t.username==e});console.log(s),s||this.undistributedlist.push(this.allocatedlist[t]),this.allocatedlist.splice(t,1),this.allocatedlist2.splice(t,1),console.log(this.undistributedlist)}for(var a=0;a<this.usercheckList.length;a++)console.log(this.usercheckList[a]),e==this.usercheckList[a].username&&this.usercheckList.splice(a,1)},usercheckbox:function(e){console.log(this.usercheckList);var t=[];t=t.concat(e),this.allocatedlist=this.allocatedlist2.concat(t)},usersearch:function(){var e=this;this.$axios({method:"POST",url:"/api/api_gateway?method=user.login.allot_users",data:this.qs.stringify({f_name:this.newusername})}).then(function(t){e.undistributedlist=t.data.data})},toogleExpand:function(e,t){("el-icon-arrow-right"==e.currentTarget.children[0].className?e.currentTarget.children[0].className="el-icon-arrow-down":"el-icon-arrow-down"==e.currentTarget.children[0].className&&(e.currentTarget.children[0].className="el-icon-arrow-right"),0!=t.children.length)&&this.$refs.table.toggleRowExpansion(t)}},filters:{formatUserType:function(e){switch(e){case 1:return"超级管理员";case 2:return"高级用户";case 3:return"农林政府单位";case 4:return"普通用户"}}},beforeCreate:function(){},beforeMount:function(){},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"innerMargin"},[a("el-card",{staticClass:"box-card"},[a("search-bar",{scopedSlots:e._u([{key:"left-search",fn:function(){return[a("div",{staticClass:"search-box"},[a("el-select",{staticClass:"select02",attrs:{clearable:"",size:"small",placeholder:"请选择角色类型"},on:{change:function(t){return e.checkList()}},model:{value:e.role,callback:function(t){e.role=t},expression:"role"}},e._l(e.roleList,function(e){return a("el-option",{key:e.role_id,attrs:{label:e.role_name,value:e.role_id}})}),1),e._v(" "),a("el-select",{staticClass:"select02",attrs:{clearable:"",size:"small",placeholder:"请选择用户类型"},on:{change:function(t){return e.checkList()}},model:{value:e.userTypeCheck,callback:function(t){e.userTypeCheck=t},expression:"userTypeCheck"}},[a("el-option",{attrs:{label:"超级管理员",value:1}}),e._v(" "),a("el-option",{attrs:{label:"高级用户",value:2}}),e._v(" "),a("el-option",{attrs:{label:"农林政府单位",value:3}}),e._v(" "),a("el-option",{attrs:{label:"普通用户",value:4}})],1),e._v(" "),a("el-input",{staticClass:"input-with-select",staticStyle:{cursor:"pointer"},attrs:{placeholder:"请输入用户名",size:"small",clearable:"","suffix-icon":"el-icon-search"},on:{change:function(t){return e.checkList()}},model:{value:e.username,callback:function(t){e.username=t},expression:"username"}}),e._v(" "),a("el-button",{attrs:{type:"blueInfo",size:"small"},on:{click:function(t){return e.selUserTest()}}},[e._v(e._s(e.txtInner))])],1)]},proxy:!0},{key:"right-search",fn:function(){return[a("el-button",{attrs:{type:e.tableRadio?"blueInfo":"grayInfo",size:"mini",title:"充值"},on:{click:function(t){return e.recharge()}}},[e._v("\n 充值\n ")]),e._v(" "),a("el-button",{attrs:{type:e.tableRadio?"blueInfo":"grayInfo",size:"mini",title:"充值"},on:{click:function(t){return e.testUser()}}},[e._v("\n 激活\n ")]),e._v(" "),a("el-button",{attrs:{type:e.tableRadio?"blueInfo":"grayInfo",size:"mini",title:"充值"},on:{click:function(t){return e.edit()}}},[e._v("\n 编辑\n ")]),e._v(" "),a("el-button",{attrs:{type:e.tableRadio?"blueInfo":"grayInfo",size:"mini",title:"充值"},on:{click:function(t){return e.resetPassword()}}},[e._v("\n 重置密码\n ")]),e._v(" "),a("el-button",{attrs:{type:"blueInfo",size:"small"},on:{click:function(t){return e.addUser()}}},[e._v("添加新用户")])]},proxy:!0}])}),e._v(" "),[a("el-table",{ref:"table",staticStyle:{width:"100%"},attrs:{data:e.userList}},[a("el-table-column",{attrs:{label:"选择",fixed:"",width:"55"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-radio",{attrs:{label:t.row},model:{value:e.tableRadio,callback:function(t){e.tableRadio=t},expression:"tableRadio"}},[a("i")])]}}])}),e._v(" "),a("el-table-column",{attrs:{type:"expand",width:"1"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},e._l(t.row.children,function(t,s){return a("el-form-item",{key:s,staticStyle:{"margin-right":"40px"}},[a("span",[e._v(e._s(s+1+"、"+t.username+"("+t.role_name+")"))])])}),1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"username",width:"170",label:"用户名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",{staticClass:"pull-down",on:{click:function(s){return e.toogleExpand(s,t.row)}}},[t.row.children.length?a("i",{staticClass:"el-icon-arrow-right"}):e._e(),e._v(e._s(t.row.username))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"role_name",label:"用户角色"}}),e._v(" "),a("el-table-column",{attrs:{prop:"user_type",width:"150",label:"用户类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("formatUserType")(t.row.user_type)))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"regiest_source_name",width:"150",label:"用户所属"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.regiest_source_name||"--"))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"addtime",width:"200",label:"创建时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("formatTime")(1e3*t.row.addtime)))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"mobile",width:"120",label:"联系方式"}}),e._v(" "),a("el-table-column",{attrs:{prop:"state",label:"账号状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{class:[1==t.row.state?"greenState":"redState"]},[e._v("\n "+e._s(1==t.row.state?"正常":"禁用")+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"login_time",width:"200",label:"上次登录"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("formatTime")(1e3*t.row.login_time)))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"expire_time",width:"200",label:"到期时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("formatTime")(1e3*t.row.expire_time)))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作",fixed:"right",width:"250"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"blueInfo",size:"mini",title:"一键登录",plain:""},on:{click:function(s){return e.login(t.row.uid,t.row.username)}}},[e._v("\n 一键登录\n ")]),e._v(" "),4==t.row.user_type?a("el-button",{attrs:{type:"orangeInfo",size:"mini",title:"分配设备",plain:""},on:{click:function(s){return e.distribute(t.row.uid,t.row.username)}}},[e._v("\n 分配设备\n ")]):e._e(),e._v(" "),2==t.row.user_type?a("el-button",{attrs:{type:"orangeInfo",size:"mini",title:"分配用户",plain:""},on:{click:function(s){return e.allocationd(t.row.username,t.row.children)}}},[e._v("\n 分配用户\n ")]):e._e(),e._v(" "),1==t.row.state?[a("el-button",{attrs:{type:"greenInfo",size:"mini",title:"禁用",plain:""},on:{click:function(s){return e.forbidUse(t.row.uid,4,"确认禁用该用户?")}}},[e._v("\n 禁用\n ")])]:[a("el-button",{attrs:{type:"redInfo",size:"mini",title:"恢复",plain:""},on:{click:function(s){return e.forbidUse(t.row.uid,1,"确认恢复该用户?")}}},[e._v("\n 恢复\n ")])]]}}])})],1)],e._v(" "),a("el-pagination",{attrs:{background:"","page-size":10,layout:"prev, pager, next, jumper","current-page":e.page,total:e.totalNum},on:{"current-change":e.changePage}})],2),e._v(" "),a("el-dialog",{attrs:{title:"添加新用户",visible:e.addUserDialogVisible,width:"30%",top:"180px"},on:{"update:visible":function(t){e.addUserDialogVisible=t},close:e.addUserDialogClosed}},[a("el-form",{ref:"addUserFormRef",attrs:{model:e.addUserForm,"label-width":"100px",rules:e.addUserFormRules}},[a("el-form-item",{attrs:{label:"用户名 : ",prop:"username"}},[a("el-input",{model:{value:e.addUserForm.username,callback:function(t){e.$set(e.addUserForm,"username",t)},expression:"addUserForm.username"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"电话 : ",prop:"mobile"}},[a("el-input",{model:{value:e.addUserForm.mobile,callback:function(t){e.$set(e.addUserForm,"mobile",t)},expression:"addUserForm.mobile"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"密码 : ",prop:"pass"}},[a("el-input",{attrs:{type:"password"},model:{value:e.addUserForm.pass,callback:function(t){e.$set(e.addUserForm,"pass",t)},expression:"addUserForm.pass"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"项目名称 : ",prop:"projectname"}},[a("el-input",{model:{value:e.addUserForm.projectname,callback:function(t){e.$set(e.addUserForm,"projectname",t)},expression:"addUserForm.projectname"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"角色类型 : ",prop:"role_id"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"请选择角色类型"},model:{value:e.addUserForm.role_id,callback:function(t){e.$set(e.addUserForm,"role_id",t)},expression:"addUserForm.role_id"}},e._l(e.roleList,function(e){return a("el-option",{key:e.role_id,attrs:{label:e.role_name,value:e.role_id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"主题 : ",prop:"user_group_id"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择主题"},model:{value:e.addUserForm.user_group_id,callback:function(t){e.$set(e.addUserForm,"user_group_id",t)},expression:"addUserForm.user_group_id"}},e._l(e.userGroupList,function(e,t){return a("el-option",{key:t,attrs:{label:e.role_describe,value:e.id}})}),1)],1),e._v(" "),1==e.userType?a("el-form-item",{attrs:{label:"用户类型 : ",prop:"user_type"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择角色类型"},on:{change:e.userTypeChange},model:{value:e.addUserForm.user_type,callback:function(t){e.$set(e.addUserForm,"user_type",t)},expression:"addUserForm.user_type"}},[a("el-option",{attrs:{label:"超级管理员",value:1}}),e._v(" "),a("el-option",{attrs:{label:"经销商",value:2}}),e._v(" "),a("el-option",{attrs:{label:"农林政府单位",value:3}}),e._v(" "),a("el-option",{attrs:{label:"普通用户",value:4}})],1)],1):e._e(),e._v(" "),1!=e.userType?a("el-form-item",{attrs:{label:"用户类型 : ",prop:"user_type"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择角色类型"},on:{change:e.userTypeChange},model:{value:e.addUserForm.user_type,callback:function(t){e.$set(e.addUserForm,"user_type",t)},expression:"addUserForm.user_type"}},[a("el-option",{attrs:{label:"普通用户",value:4}})],1)],1):e._e(),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.editIsShow,expression:"editIsShow"}],attrs:{label:"省/市/区 : ",prop:"pcd"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择省、市、县"},on:{change:e.pcdChange},model:{value:e.addUserForm.pcd,callback:function(t){e.$set(e.addUserForm,"pcd",t)},expression:"addUserForm.pcd"}},[a("el-option",{attrs:{label:"省",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"市",value:"2"}}),e._v(" "),a("el-option",{attrs:{label:"县",value:"3"}})],1)],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.editIsShow,expression:"editIsShow"}],attrs:{label:"省/市/区 : ",prop:"user_area"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择省、市、县"},on:{change:e.pcdChange},model:{value:e.addUserForm.user_area,callback:function(t){e.$set(e.addUserForm,"user_area",t)},expression:"addUserForm.user_area"}},e._l(e.areaList,function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"测试用户",prop:"cs_user"}},[a("el-switch",{attrs:{"active-color":"#0295ff","inactive-color":"#b4b4b4"},model:{value:e.addUserForm.cs_user,callback:function(t){e.$set(e.addUserForm,"cs_user",t)},expression:"addUserForm.cs_user"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"blueInfo"},on:{click:e.addUserSubm}},[e._v("保 存")]),e._v(" "),a("el-button",{attrs:{type:"grayInfo",plain:""},on:{click:function(t){e.addUserDialogVisible=!1}}},[e._v("取 消")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"用户信息编辑",visible:e.editUserDialogVisible,width:"500px",top:"180px"},on:{"update:visible":function(t){e.editUserDialogVisible=t},close:e.editUserDialogClosed}},[a("el-form",{ref:"editUserFormRef",attrs:{model:e.editUserForm,"label-width":"100px",rules:e.editUserFormRules}},[a("el-form-item",{attrs:{label:"用户名 : "}},[a("el-input",{attrs:{disabled:""},model:{value:e.editUserForm.username,callback:function(t){e.$set(e.editUserForm,"username",t)},expression:"editUserForm.username"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"电话 : ",prop:"mobile"}},[a("el-input",{model:{value:e.editUserForm.mobile,callback:function(t){e.$set(e.editUserForm,"mobile",t)},expression:"editUserForm.mobile"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"项目名称 : "}},[a("el-input",{model:{value:e.editUserForm.projectname,callback:function(t){e.$set(e.editUserForm,"projectname",t)},expression:"editUserForm.projectname"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"角色类型 : ",prop:"role_id"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择角色类型"},model:{value:e.editUserForm.role_id,callback:function(t){e.$set(e.editUserForm,"role_id",t)},expression:"editUserForm.role_id"}},e._l(e.roleList,function(e){return a("el-option",{key:e.role_id,attrs:{label:e.role_name,value:e.role_id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"主题 : ",prop:"user_group_id"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择主题"},model:{value:e.editUserForm.user_group_id,callback:function(t){e.$set(e.editUserForm,"user_group_id",t)},expression:"editUserForm.user_group_id"}},e._l(e.userGroupList,function(e,t){return a("el-option",{key:t,attrs:{label:e.role_describe,value:e.id}})}),1)],1),e._v(" "),1==e.userType?a("el-form-item",{attrs:{label:"用户类型 : ",prop:"user_type"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{disabled:"",clearable:"",placeholder:"请选择角色类型"},on:{change:e.userTypeChange},model:{value:e.editUserForm.user_type,callback:function(t){e.$set(e.editUserForm,"user_type",t)},expression:"editUserForm.user_type"}},[a("el-option",{attrs:{label:"超级管理员",value:1}}),e._v(" "),a("el-option",{attrs:{label:"经销商",value:2}}),e._v(" "),a("el-option",{attrs:{label:"农林政府单位",value:3}}),e._v(" "),a("el-option",{attrs:{label:"普通用户",value:4}})],1)],1):e._e(),e._v(" "),1!=e.userType?a("el-form-item",{attrs:{label:"用户类型 : ",prop:"user_type"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{disabled:"",clearable:"",placeholder:"请选择角色类型"},on:{change:e.userTypeChange},model:{value:e.editUserForm.user_type,callback:function(t){e.$set(e.editUserForm,"user_type",t)},expression:"editUserForm.user_type"}},[a("el-option",{attrs:{label:"普通用户",value:4}})],1)],1):e._e(),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.editIsShow||3==e.editUserForm.user_type,expression:"editIsShow || editUserForm.user_type == 3"}],attrs:{label:"省/市/区 : ",prop:"pcd"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择省、市、县"},on:{change:e.pcdChange},model:{value:e.editUserForm.pcd,callback:function(t){e.$set(e.editUserForm,"pcd",t)},expression:"editUserForm.pcd"}},[a("el-option",{attrs:{label:"省",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"市",value:"2"}}),e._v(" "),a("el-option",{attrs:{label:"县",value:"3"}})],1)],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.editIsShow||3==e.editUserForm.user_type,expression:"editIsShow || editUserForm.user_type == 3"}],attrs:{label:"省/市/区 : ",prop:"user_area"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择省、市、县"},on:{change:e.pcdChange},model:{value:e.editUserForm.user_area,callback:function(t){e.$set(e.editUserForm,"user_area",t)},expression:"editUserForm.user_area"}},e._l(e.areaList,function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})}),1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.editUserDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.editUserSubm}},[e._v("确认")])],1)],1),e._v(" "),a("el-dialog",{staticStyle:{"margin-top":"2%"},attrs:{title:"提示",visible:e.allocationdialogVisible,width:"35%","before-close":e.handleClose},on:{"update:visible":function(t){e.allocationdialogVisible=t}}},[a("div",{staticClass:"allocationdbox"},[a("div",{staticClass:"allocationdbox_left"},[a("p",{staticStyle:{"margin-bottom":"10px","padding-left":"30px"}},[e._v("选择")]),e._v(" "),a("div",{staticStyle:{height:"47px","margin-bottom":"15px","padding-left":"30px"}},[a("el-input",{staticClass:"input-with-select",staticStyle:{width:"80%"},attrs:{placeholder:"请输入用户名称",size:"mini"},model:{value:e.newusername,callback:function(t){e.newusername=t},expression:"newusername"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.usersearch},slot:"append"})],1)],1),e._v(" "),a("div",{staticClass:"inputbox"},[0==e.undistributedlist.length?a("div",{staticClass:"inputbox_item_tishi"},[e._v("\n 暂无可分配用户\n ")]):e._e(),e._v(" "),a("el-checkbox-group",{on:{change:e.usercheckbox},model:{value:e.usercheckList,callback:function(t){e.usercheckList=t},expression:"usercheckList"}},e._l(e.undistributedlist,function(t,r){return a("div",{key:r,staticClass:"inputbox_item"},[a("el-checkbox",{staticClass:"myRedCheckBox",attrs:{label:t}},[a("div",{staticStyle:{display:"flex"}},[a("div",{staticClass:"inputbox_img"},[a("img",{attrs:{src:s("U81D"),alt:""}})]),e._v(" "),a("div",{staticClass:"inputbox_info"},[a("p",[e._v(e._s(t.username))]),e._v(" "),a("p",[e._v("\n "+e._s(t.role_name)+" "+e._s(e._f("formatTime")(1e3*t.addtime))+"\n ")])])])])],1)}),0)],1)]),e._v(" "),a("div",{staticClass:"allocationdbox_right"},[a("p",{staticClass:"title"},[a("span",[e._v("已选("+e._s(e.allocatedlist.length)+")")]),e._v(" "),a("span",{staticStyle:{cursor:"pointer"},on:{click:function(t){e.allocatedlist=[]}}},[e._v("清空")])]),e._v(" "),a("div",{staticClass:"inputbox"},[0==e.allocatedlist.length?a("div",{staticClass:"inputbox_item_tishi"},[e._v("\n 暂未分配用户\n ")]):e._e(),e._v(" "),e._l(e.allocatedlist,function(t,r){return a("div",{key:r,staticClass:"inputbox_item"},[a("div",{staticClass:"inputbox_img"},[a("img",{attrs:{src:s("U81D"),alt:""}})]),e._v(" "),a("div",{staticClass:"inputbox_info"},[a("p",[e._v(e._s(t.username))]),e._v(" "),a("p",[e._v("\n "+e._s(t.role_name)+" "+e._s(e._f("formatTime")(1e3*t.addtime))+"\n ")])]),e._v(" "),a("div",{staticClass:"inputbox_icon",on:{click:function(s){return e.userdelete(t.username)}}},[a("i",{staticClass:"el-icon-circle-close"})])])})],2)])]),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.allocationdialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.usereditUserSubm}},[e._v("确 定")])],1)])],1)},staticRenderFns:[]};var d=s("C7Lr")(c,u,!1,function(e){s("dhFm")},"data-v-6ce02636",null);t.default=d.exports},dhFm:function(e,t){},nZ4f:function(e,t){}});
|