mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 00:40:30 +08:00
4f79e10bd6
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
1 line
9.5 KiB
JavaScript
1 line
9.5 KiB
JavaScript
webpackJsonp([183],{KZwZ:function(e,t,a){(e.exports=a("FZ+f")(!1)).push([e.i,"\n.app-container[data-v-303dc102] .el-form-item {\n margin-bottom: 16px;\n}\n.app-container[data-v-303dc102] .el-select,\n.app-container .el-cascader[data-v-303dc102],\n.app-container .el-date-editor[data-v-303dc102] {\n display: block;\n}\n.app-container[data-v-303dc102] .el-form-item__content .el-input__inner {\n width: 200px;\n}\n.app-container[data-v-303dc102] .el-col-8 {\n padding-right: 40px;\n}\n@media screen and (min-width: 1600px) {\n.app-container[data-v-303dc102] .el-col-8 {\n padding-right: 140px;\n}\n}\n.left[data-v-303dc102] {\n display: inline-block;\n margin-right: 20px;\n position: absolute;\n right: 110px;\n}\n",""])},eBGa:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("mvHQ"),s=a.n(n),o=a("Dd8w"),r=a.n(o),i=a("yfAY"),l=a("x1DN"),c=a("vMX1"),u=a("y5xs"),p={data:function(){return{total:0,isShow:!1,tableData:[],tableLoading:!1,bools:[],orgTypes:[],statusOptions:[],roles:[],form:{roleId:null,status:null,name:null,rowsOfPage:10,currentPage:1},loginName:this.$store.getters.userInfo.loginName}},created:function(){this.fetchData(),this.fetchOptions()},methods:{fetchOptions:function(){var e=this;i.b.status().then(function(t){e.statusOptions=t}),i.b.orgType().then(function(t){e.orgTypes=t}),i.b.roles().then(function(t){e.roles=t})},fetchData:function(){var e=this;this.tableLoading=!0,u.a.search(this.form).then(function(t){setTimeout(function(){e.tableData=t.data,e.total=t.total,e.tableLoading=!1},500)}).catch(function(t){e.tableLoading=!1})},reset:function(e){var t=this;this.$confirm("密码将还原为初始密码123456,确定后请通知用户尽快登录进行密码修改!","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$set(e,"loading",!0),u.a.reset(e.userId).then(function(a){t.$set(e,"loading",!1),t.$message.success("重置成功"),t.fetchData()}).catch(function(a){t.$set(e,"loading",!1),t.$message.error(a.message),t.fetchData()})}).catch(function(){})},goDetail:function(e){var t=r()({},e);this.$router.push({name:"UserDetail",query:{info:encodeURIComponent(s()(t))}})},enable:function(e){var t=this;this.$set(e,"loading",!0),u.a.enable(e.userId).then(function(a){t.$set(e,"loading",!1),t.$message.success("启用成功"),t.fetchData()}).catch(function(a){t.$message.error(a.message),t.$set(e,"loading",!1),t.fetchData()})},disable:function(e){var t=this;this.$confirm("确认禁用此用户吗?禁用后,此用户将无法登录。","确认禁用",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$set(e,"loading",!0),t.$message.success("禁用成功"),u.a.disable(e.userId).then(function(a){t.$set(e,"loading",!1),t.fetchData()}).catch(function(a){t.$set(e,"loading",!1),t.$message.error(a.message),t.fetchData()})}).catch(function(){})},handleReset:function(){this.$refs.queryForm.resetFields(),this.fetchData()},handleQuery:function(){this.form.currentPage=1,this.fetchData()}},components:{searchPage:c.a,cascader:l.a}},d={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-card",{attrs:{shadow:"hover"}},[a("search-page",{attrs:{pageSize:e.form.rowsOfPage,pageNum:e.form.currentPage,total:e.total},on:{"update:pageSize":function(t){return e.$set(e.form,"rowsOfPage",t)},"update:page-size":function(t){return e.$set(e.form,"rowsOfPage",t)},"update:pageNum":function(t){return e.$set(e.form,"currentPage",t)},"update:page-num":function(t){return e.$set(e.form,"currentPage",t)},change:e.fetchData}},[a("el-form",{ref:"queryForm",staticClass:"search",attrs:{inline:"",model:e.form}},[a("div",{staticClass:"search-input"},[a("el-form-item",{attrs:{label:"所属机构",prop:"orgId"}},[a("cascader",{model:{value:e.form.orgId,callback:function(t){e.$set(e.form,"orgId",t)},expression:"form.orgId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"关联角色",prop:"roleId"}},[a("el-select",{model:{value:e.form.roleId,callback:function(t){e.$set(e.form,"roleId",t)},expression:"form.roleId"}},e._l(e.roles,function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"用户名",prop:"loginName"}},[a("el-input",{attrs:{placeholder:"用户名(精确查询)",maxlength:"20"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.form.loginName,callback:function(t){e.$set(e.form,"loginName","string"==typeof t?t.trim():t)},expression:"form.loginName"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],attrs:{label:"联系人",prop:"name"}},[a("el-input",{attrs:{placeholder:"联系人",maxlength:"32"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name","string"==typeof t?t.trim():t)},expression:"form.name"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],attrs:{label:"用户状态",prop:"status"}},[a("el-select",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.statusOptions,function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),a("div",{staticClass:"search-button"},[a("el-form-item",{staticStyle:{display:"inline-block",margin:"0 10px 24px -10px",width:"303px"}},[a("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.isShow,expression:"!isShow"}],staticStyle:{position:"relative",top:"2px",left:"3px"},attrs:{type:"text"},on:{click:function(t){e.isShow=!0}}},[e._v("\n 展开\n "),a("el-icon",{staticClass:"el-icon-arrow-down"})],1),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],staticStyle:{position:"relative",top:"2px",left:"3px",margin:"0"},attrs:{type:"text"},on:{click:function(t){e.isShow=!1}}},[e._v("\n 收起\n "),a("el-icon",{staticClass:"el-icon-arrow-up"})],1),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.userSearch],expression:"[$auth.userSearch]"}],attrs:{type:"warning"},on:{click:e.handleQuery}},[e._v("查询")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.userSearch],expression:"[$auth.userSearch]"}],on:{click:e.handleReset}},[e._v("重置")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.userAdd],expression:"[$auth.userAdd]"}],attrs:{type:"primary"},on:{click:function(t){return e.$router.push("/user/add")}}},[e._v("新建")])],1)],1)]),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticClass:"table_expand",attrs:{data:e.tableData}},[a("el-table-column",{attrs:{type:"index",label:"序号",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"orgName","show-overflow-tooltip":"",label:"所属机构"}}),e._v(" "),a("el-table-column",{attrs:{prop:"loginName",label:"用户名"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"联系人"}}),e._v(" "),a("el-table-column",{attrs:{prop:"telephone",label:"联系方式"}}),e._v(" "),a("el-table-column",{attrs:{width:"300",label:"关联角色"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.roles||[],function(n,s){return a("span",{key:s},[a("el-tag",{staticStyle:{"margin-right":"10px"},attrs:{type:"info",size:"mini"}},[e._v(e._s(n))]),e._v(" "),s!==t.row.roles.length-1?a("span",{staticStyle:{"font-size":"0"}},[e._v(", ")]):e._e()],1)})}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"status",width:"80%",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("status-point",{attrs:{disabled:2==e.row.status,value:e.row.status}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"status",width:216,label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[2!==t.row.status?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.userDetail],expression:"[$auth.userDetail]"}],staticClass:"btn-border-right",attrs:{size:"middle",type:"text"},on:{click:function(a){return e.goDetail(t.row)}}},[e._v("详情")]):e._e(),e._v(" "),1==t.row.status&&t.row.loginName!=e.loginName?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.userEnable],expression:"[$auth.userEnable]"}],staticClass:"btn-border-right",attrs:{size:"middle",type:"text",loading:t.row.loading},on:{click:function(a){return e.disable(t.row)}}},[e._v("禁用")]):e._e(),e._v(" "),2==t.row.status?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.userEnable],expression:"[$auth.userEnable]"}],staticClass:"btn-border-right",attrs:{size:"middle",type:"text",loading:t.row.loading},on:{click:function(a){return e.enable(t.row)}}},[e._v("启用")]):e._e(),e._v(" "),2!==t.row.status?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.userReset],expression:"[$auth.userReset]"}],staticClass:"btn-border-right",attrs:{size:"middle",type:"text",loading:t.row.loading},on:{click:function(a){return e.reset(t.row)}}},[e._v("重置密码")]):e._e()]}}])})],1)],1)],1)],1)},staticRenderFns:[]};var m=a("VU/8")(p,d,!1,function(e){a("itu6")},"data-v-303dc102",null);t.default=m.exports},itu6:function(e,t,a){var n=a("KZwZ");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);a("rjj0")("020b2707",n,!0)}}); |