1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7683c2a2"],{"24fd":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i})),r.d(t,"e",(function(){return l})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return n}));var a=r("b775");function o(e){return Object(a["a"])({url:"/org/addOrg",method:"post",data:e})}function i(e){return Object(a["a"])({url:"/org/deleteOrg/"+e,method:"delete"})}function l(e){return Object(a["a"])({url:"/org/updateOrg",method:"put",data:e})}function s(e){return Object(a["a"])({url:"/org/getOrg",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/org/getOrgList",method:"post",data:e})}},8435:function(e,t,r){"use strict";var a=r("84ef"),o=r.n(a);o.a},"84ef":function(e,t,r){},"921e":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("div",{staticClass:"filter-container-child"},[r("el-input",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{placeholder:"管理员用户姓名..."},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFilter(t)}},model:{value:e.filterQuery.orgName,callback:function(t){e.$set(e.filterQuery,"orgName",t)},expression:"filterQuery.orgName"}}),r("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"管理员用户备注..."},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFilter(t)}},model:{value:e.filterQuery.orgDescript,callback:function(t){e.$set(e.filterQuery,"orgDescript",t)},expression:"filterQuery.orgDescript"}}),r("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleFilter}},[e._v("搜索")]),r("el-button",{staticClass:"filter-item",attrs:{type:"success",icon:"el-icon-edit"},on:{click:e.handleCreate}},[e._v("添加管理员用户")])],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.list,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":""}},[r("el-table-column",{attrs:{align:"center",label:"ID",width:"100",type:"index"}}),r("el-table-column",{attrs:{label:"管理员用户名",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[null==t.row.userName||""==t.row.userName?r("span",[e._v("暂无信息")]):r("span",[e._v(" "+e._s(t.row.userName))])]}}])}),r("el-table-column",{attrs:{label:"管理员账号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[null==t.row.userAccount||""==t.row.userAccount?r("span",[e._v("暂无信息")]):r("span",[e._v(" "+e._s(t.row.userAccount))])]}}])}),r("el-table-column",{attrs:{label:"管理员组织",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[null==t.row.orgIdEntity.orgName||""==t.row.orgIdEntity.orgName?r("span",[e._v("暂无信息")]):r("span",[e._v(" "+e._s(t.row.orgIdEntity.orgName))])]}}])}),r("el-table-column",{attrs:{label:"管理员备注",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[null==t.row.userDescript||""==t.row.userDescript?r("span",[e._v("暂无信息")]):r("span",[e._v(" "+e._s(t.row.userDescript))])]}}])}),r("el-table-column",{attrs:{align:"center",prop:"created_at",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(r){return e.handleUpdate(t.row)}}},[e._v("编辑")]),r("el-button",{attrs:{type:"warn",size:"small"},on:{click:function(r){return e.handleCode(t.row)}}},[e._v("修改密码")]),r("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(r){return e.deleteDate(t.row)}}},[e._v("删除")])]}}])})],1),r("div",{staticStyle:{float:"right","margin-top":"30px"}},[r("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[10,20,30,40],"page-size":10,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),r("el-dialog",{attrs:{title:e.textMap[e.dialogStatus],visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{ref:"dataForm",attrs:{model:e.form,rules:e.rules}},[r("el-form-item",{staticClass:"dialogShow",attrs:{label:"管理员用户名:","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入管理员用户名",autocomplete:"off"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1),r("el-form-item",{staticClass:"dialogShow",attrs:{label:"管理员账号:",prop:"userAccount","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入管理员账号",autocomplete:"off"},model:{value:e.form.userAccount,callback:function(t){e.$set(e.form,"userAccount",t)},expression:"form.userAccount"}})],1),r("el-form-item",{attrs:{label:"账号所属组织","label-width":"200px"}},[r("el-select",{staticStyle:{width:"150px"},attrs:{placeholder:"请选择所属组织"},on:{change:function(t){return e.$forceUpdate()}},model:{value:e.form.orgId,callback:function(t){e.$set(e.form,"orgId",t)},expression:"form.orgId"}},e._l(e.orgList,(function(e){return r("el-option",{key:e.orgId,attrs:{label:e.orgName,value:e.orgId}})})),1)],1),r("el-form-item",{staticClass:"dialogShow",attrs:{label:"管理员账号备注","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入管理员账号备注",autocomplete:"off"},model:{value:e.form.userDescript,callback:function(t){e.$set(e.form,"userDescript",t)},expression:"form.userDescript"}})],1),r("el-form-item",[r("span",{staticStyle:{"margin-left":"100px"}},[r("span",{staticStyle:{color:"red"}},[e._v("*")]),e._v("注:管理员密码默认为admin,请及时联系相关账号使用者进行修改。")])])],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleCancle}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){"create"==e.dialogStatus?e.createData():e.updateData()}}},[e._v("确 定")])],1)],1),r("el-dialog",{attrs:{title:e.textMap["codeUpdate"],visible:e.dialogCodeFormVisible},on:{"update:visible":function(t){e.dialogCodeFormVisible=t}}},[r("el-form",{ref:"dataForm",attrs:{model:e.code,rules:e.rules}},[r("el-form-item",{staticClass:"dialogShow",attrs:{label:"新密码:",prop:"userPassword","label-width":e.formLabelWidth}},[r("el-input",{attrs:{type:"password",placeholder:"请输入管理员新密码",autocomplete:"off"},model:{value:e.code.userPassword,callback:function(t){e.$set(e.code,"userPassword",t)},expression:"code.userPassword"}})],1),r("el-form-item",{staticClass:"dialogShow",attrs:{label:"确认密码:",prop:"aginUserPassword","label-width":e.formLabelWidth}},[r("el-input",{attrs:{type:"password",placeholder:"请输入管理员确认新密码",autocomplete:"off"},model:{value:e.code.aginUserPassword,callback:function(t){e.$set(e.code,"aginUserPassword",t)},expression:"code.aginUserPassword"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handlecodeCancle}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.updateCode}},[e._v("确 定")])],1)],1)],1)},o=[],i=(r("5ab2"),r("6d57"),r("e10e"),r("88d6")),l=r("c24f"),s=r("24fd");function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){Object(i["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u={data:function(){return{list:null,tempData:{},orgList:{},feedTypeParentName:"",listLoading:!0,dialogFormVisible:!1,dialogCodeFormVisible:!1,dialogStatus:"",textMap:{create:"添加组织",update:"修改组织",codeUpdate:"修改管理员密码"},form:{},code:{},formLabelWidth:"150px",total:0,currentPage:1,filterQuery:{userType:1,pageNum:1,pageSize:10},limitUpload:1,excelQuery:{},excelList:{},rules:{userAccount:[{required:!0,message:"管理员账号不能为空",trigger:"blur"}],userPassword:[{required:!0,message:"管理员密码不能为空",trigger:"blur"}],aginUserPassword:[{required:!0,message:"管理员确认密码不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.listLoading=!0,this.clearDialogData(),this.listLoading=!1,Object(l["e"])(this.filterQuery).then((function(t){console.log(t),e.total=t.data.total,e.list=t.data.list,e.total=t.data.total,Object(s["d"])().then((function(t){e.orgList=t.data.list})),e.listLoading=!1}))},handleCreate:function(){var e=this;this.clearDialogData(),this.form.orgId=this.orgList[0].orgId,this.dialogFormVisible=!0,this.dialogStatus="create",this.$nextTick((function(){e.$refs["dataForm"].clearValidate()}))},handleUpdate:function(e){var t=this;this.dialogStatus="update",Object(l["d"])({userId:e.userId}).then((function(e){t.tempData=c({},e.data),t.form=c({},t.tempData)})),this.dialogFormVisible=!0},handleCode:function(e){this.dialogCodeFormVisible=!0,this.code.userId=e.userId},handlecodeCancle:function(){this.clearDialogData(),this.dialogCodeFormVisible=!1},handleFilter:function(){console.log("搜索"),this.getList()},handleCancle:function(){this.clearDialogData(),this.dialogFormVisible=!1},clearDialogData:function(){this.form={},this.code={}},createData:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&(e.form.userType=1,Object(l["a"])(e.form).then((function(t){e.$notify({title:"组织添加",message:t.msg,type:"success",duration:2e3}),200===t.status&&(e.dialogFormVisible=!1,e.getList())})))}))},deleteDate:function(e){var t=this;this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(l["b"])(e.userId).then((function(e){t.$notify({title:"删除用户",message:e.msg,type:200===e.status?"success":"error",duration:2e3}),200===e.status&&t.getList()}))})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))},updateData:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&(e.form.userAccount!==e.tempData.userAccount?e.form.isUpdate="1":e.form.isUpdate="0",Object(l["g"])(e.form).then((function(t){e.dialogFormVisible=!1,e.clearDialogData(),e.$notify({title:"更新管理员账号",message:t.msg,type:200===t.status?"success":"error",duration:2e3}),e.getList()})))}))},updateCode:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&(e.code.userPassword===e.code.aginUserPassword?Object(l["g"])(e.code).then((function(t){e.dialogCodeFormVisible=!1,e.$notify({title:"管理员密码更新",message:t.msg,type:200===t.status?"success":"error",duration:2e3}),e.getList()})):e.$notify({title:"管理员密码更新",message:"两次密码不一致,请重新输入",type:"error",duration:2e3}))}))},handleSizeChange:function(e){console.log("每页 ".concat(e," 条")),this.filterQuery.pageSize=e,this.getList()},handleCurrentChange:function(e){console.log("当前页: ".concat(e)),this.filterQuery.pageNum=e,this.getList()}}},d=u,f=(r("8435"),r("4023")),p=Object(f["a"])(d,a,o,!1,null,null,null);t["default"]=p.exports}}]);
|