1 |
- {"version":3,"sources":["webpack:///src/views/ums/admin/index.vue","webpack:///./src/views/ums/admin/index.vue?324a","webpack:///./src/views/ums/admin/index.vue"],"names":["defaultListQuery","pageNum","pageSize","keyword","defaultAdmin","id","username","password","nickName","email","note","status","admin","name","data","listQuery","assign_default","list","total","listLoading","dialogVisible","isEdit","allocDialogVisible","allocRoleIds","allRoleList","allocAdminId","created","this","getList","getAllRoleList","filters","formatDateTime","time","date","Date","Object","utils_date","methods","handleResetSearch","handleSearchList","handleSizeChange","val","handleCurrentChange","handleAdd","handleStatusChange","index","row","_this","$confirm","confirmButtonText","cancelButtonText","type","then","login","response","$message","message","catch","handleDelete","_this2","handleUpdate","handleDialogConfirm","_this3","handleAllocDialogConfirm","_this4","obj","adminId","roleIds","join","handleSelectRole","getRoleListByAdmin","_this5","_this6","role","_this7","allocRoleList","length","i","push","ums_admin","render","_vm","_h","$createElement","_c","_self","staticClass","attrs","shadow","_v","staticStyle","float","size","on","click","$event","margin-right","margin-top","inline","model","label-width","label","placeholder","clearable","value","callback","$$v","$set","expression","directives","rawName","ref","width","border","align","scopedSlots","_u","key","fn","scope","_s","phone","_f","createTime","loginTime","active-value","inactive-value","change","$index","background","layout","current-page","page-size","page-sizes","size-change","current-change","update:currentPage","title","visible","update:visible","rows","slot","multiple","_l","item","staticRenderFns","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__"],"mappings":"wLAiKAA,GACAC,QAAA,EACAC,SAAA,GACAC,QAAA,MAEAC,GACAC,GAAA,KACAC,SAAA,KACAC,SAAA,KACAC,SAAA,KACAC,MAAA,KACAC,KAAA,KACAC,OAAA,GAEAC,GACAC,KAAA,YACAC,KAFA,WAGA,OACAC,UAAAC,OAAAhB,GACAiB,KAAA,KACAC,MAAA,KACAC,aAAA,EACAC,eAAA,EACAR,MAAAI,OAAAZ,GACAiB,QAAA,EACAC,oBAAA,EACAC,gBACAC,eACAC,aAAA,OAGAC,QAjBA,WAkBAC,KAAAC,UACAD,KAAAE,k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Q,GAAA,sBAE1qOwD,oBCCjB,IAcAC,EAdAC,EAAA,OAcAC,CACAxI,EACAmE,GATA,EAVA,SAAAsE,GACAF,EAAA,SAaA,KAEA,MAUAG,EAAA,QAAAJ,EAAA","file":"static/js/28.61d9105db59a7801449b.js","sourcesContent":["<template> \r\n <div class=\"app-container\">\r\n <el-card class=\"filter-container\" shadow=\"never\">\r\n <div>\r\n <i class=\"el-icon-search\"></i>\r\n <span>筛选搜索</span>\r\n <el-button\r\n style=\"float:right\"\r\n type=\"primary\"\r\n @click=\"handleSearchList()\"\r\n size=\"small\">\r\n 查询搜索\r\n </el-button>\r\n <el-button\r\n style=\"float:right;margin-right: 15px\"\r\n @click=\"handleResetSearch()\"\r\n size=\"small\">\r\n 重置\r\n </el-button>\r\n </div>\r\n <div style=\"margin-top: 15px\">\r\n <el-form :inline=\"true\" :model=\"listQuery\" size=\"small\" label-width=\"140px\">\r\n <el-form-item label=\"输入搜索:\">\r\n <el-input v-model=\"listQuery.keyword\" class=\"input-width\" placeholder=\"帐号/姓名\" clearable></el-input>\r\n </el-form-item>\r\n </el-form>\r\n </div>\r\n </el-card>\r\n <el-card class=\"operate-container\" shadow=\"never\">\r\n <i class=\"el-icon-tickets\"></i>\r\n <span>数据列表</span>\r\n <!-- <el-button size=\"mini\" class=\"btn-add\" @click=\"handleAdd()\" style=\"margin-left: 20px\">添加</el-button> -->\r\n </el-card>\r\n <div class=\"table-container\">\r\n <el-table ref=\"adminTable\"\r\n :data=\"list\"\r\n style=\"width: 100%;\"\r\n v-loading=\"listLoading\" border>\r\n <el-table-column label=\"编号\" width=\"100\" align=\"center\">\r\n <template slot-scope=\"scope\">{{scope.row.id}}</template>\r\n </el-table-column>\r\n <el-table-column label=\"帐号\" align=\"center\">\r\n <template slot-scope=\"scope\">{{scope.row.username}}</template>\r\n </el-table-column>\r\n <el-table-column label=\"姓名\" align=\"center\">\r\n <template slot-scope=\"scope\">{{scope.row.nickName}}</template>\r\n </el-table-column>\r\n <el-table-column label=\"手机号\" align=\"center\">\r\n <template slot-scope=\"scope\">{{scope.row.phone}}</template>\r\n </el-table-column>\r\n <el-table-column label=\"邮箱\" align=\"center\">\r\n <template slot-scope=\"scope\">{{scope.row.email}}</template>\r\n </el-table-column>\r\n <el-table-column label=\"添加时间\" width=\"160\" align=\"center\">\r\n <template slot-scope=\"scope\">{{scope.row.createTime | formatDateTime}}</template>\r\n </el-table-column>\r\n <el-table-column label=\"最后登录\" width=\"160\" align=\"center\">\r\n <template slot-scope=\"scope\">{{scope.row.loginTime | formatDateTime}}</template>\r\n </el-table-column>\r\n <el-table-column label=\"是否启用\" width=\"140\" align=\"center\">\r\n <template slot-scope=\"scope\">\r\n <el-switch\r\n @change=\"handleStatusChange(scope.$index, scope.row)\"\r\n :active-value=\"1\"\r\n :inactive-value=\"0\"\r\n v-model=\"scope.row.status\">\r\n </el-switch>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"操作\" width=\"180\" align=\"center\">\r\n <template slot-scope=\"scope\">\r\n <el-button size=\"mini\"\r\n type=\"text\"\r\n @click=\"handleSelectRole(scope.$index, scope.row)\">分配角色\r\n </el-button>\r\n <el-button size=\"mini\"\r\n type=\"text\"\r\n @click=\"handleUpdate(scope.$index, scope.row)\">\r\n 编辑\r\n </el-button>\r\n <el-button size=\"mini\"\r\n type=\"text\"\r\n @click=\"handleDelete(scope.$index, scope.row)\">删除\r\n </el-button>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n </div>\r\n <div class=\"pagination-container\">\r\n <el-pagination\r\n background\r\n @size-change=\"handleSizeChange\"\r\n @current-change=\"handleCurrentChange\"\r\n layout=\"total, sizes,prev, pager, next,jumper\"\r\n :current-page.sync=\"listQuery.pageNum\"\r\n :page-size=\"listQuery.pageSize\"\r\n :page-sizes=\"[10,15,20]\"\r\n :total=\"total\">\r\n </el-pagination>\r\n </div>\r\n <el-dialog\r\n :title=\"isEdit?'编辑用户':'添加用户'\"\r\n :visible.sync=\"dialogVisible\"\r\n width=\"40%\">\r\n <el-form :model=\"admin\"\r\n ref=\"adminForm\"\r\n label-width=\"150px\" size=\"small\">\r\n <el-form-item label=\"帐号:\">\r\n <el-input v-model=\"admin.username\" style=\"width: 250px\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"姓名:\">\r\n <el-input v-model=\"admin.nickName\" style=\"width: 250px\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"邮箱:\">\r\n <el-input v-model=\"admin.email\" style=\"width: 250px\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"密码:\">\r\n <el-input v-model=\"admin.password\" type=\"password\" style=\"width: 250px\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"备注:\">\r\n <el-input v-model=\"admin.note\"\r\n type=\"textarea\"\r\n :rows=\"5\"\r\n style=\"width: 250px\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"是否启用:\">\r\n <el-radio-group v-model=\"admin.status\">\r\n <el-radio :label=\"1\">是</el-radio>\r\n <el-radio :label=\"0\">否</el-radio>\r\n </el-radio-group>\r\n </el-form-item>\r\n </el-form>\r\n <span slot=\"footer\" class=\"dialog-footer\">\r\n <el-button @click=\"dialogVisible = false\" size=\"small\">取 消</el-button>\r\n <el-button type=\"primary\" @click=\"handleDialogConfirm()\" size=\"small\">确 定</el-button>\r\n </span>\r\n </el-dialog>\r\n <el-dialog\r\n title=\"分配角色\"\r\n :visible.sync=\"allocDialogVisible\"\r\n width=\"30%\">\r\n <el-select v-model=\"allocRoleIds\" multiple placeholder=\"请选择\" size=\"small\" style=\"width: 80%\">\r\n <el-option\r\n v-for=\"item in allRoleList\"\r\n :key=\"item.id\"\r\n :label=\"item.name\"\r\n :value=\"item.id\">\r\n </el-option>\r\n </el-select>\r\n <span slot=\"footer\" class=\"dialog-footer\">\r\n <el-button @click=\"allocDialogVisible = false\" size=\"small\">取 消</el-button>\r\n <el-button type=\"primary\" @click=\"handleAllocDialogConfirm()\" size=\"small\">确 定</el-button>\r\n </span>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n<script>\r\n import {fetchList,createAdmin,updateAdmin,updateStatus,deleteAdmin,getRoleByAdmin,allocRole} from '@/api/login';\r\n import {fetchAllRoleList} from '@/api/role';\r\n import {formatDate} from '@/utils/date';\r\n\r\n const defaultListQuery = {\r\n pageNum: 1,\r\n pageSize: 10,\r\n keyword: null\r\n };\r\n const defaultAdmin = {\r\n id: null,\r\n username: null,\r\n password: null,\r\n nickName: null,\r\n email: null,\r\n note: null,\r\n status: 1\r\n };\r\n export default {\r\n name: 'adminList',\r\n data() {\r\n return {\r\n listQuery: Object.assign({}, defaultListQuery),\r\n list: null,\r\n total: null,\r\n listLoading: false,\r\n dialogVisible: false,\r\n admin: Object.assign({}, defaultAdmin),\r\n isEdit: false,\r\n allocDialogVisible: false,\r\n allocRoleIds:[],\r\n allRoleList:[],\r\n allocAdminId:null\r\n }\r\n },\r\n created() {\r\n this.getList();\r\n this.getAllRoleList();\r\n },\r\n filters: {\r\n formatDateTime(time) {\r\n if (time == null || time === '') {\r\n return '--';\r\n }\r\n let date = new Date(time);\r\n return formatDate(date, 'yyyy-MM-dd hh:mm:ss')\r\n }\r\n },\r\n methods: {\r\n handleResetSearch() {\r\n this.listQuery = Object.assign({}, defaultListQuery);\r\n },\r\n handleSearchList() {\r\n this.listQuery.pageNum = 1;\r\n this.getList();\r\n },\r\n handleSizeChange(val) {\r\n this.listQuery.pageNum = 1;\r\n this.listQuery.pageSize = val;\r\n this.getList();\r\n },\r\n handleCurrentChange(val) {\r\n this.listQuery.pageNum = val;\r\n this.getList();\r\n },\r\n handleAdd() {\r\n this.dialogVisible = true;\r\n this.isEdit = false;\r\n this.admin = Object.assign({},defaultAdmin);\r\n },\r\n handleStatusChange(index, row) {\r\n this.$confirm('是否要修改该状态?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(() => {\r\n updateStatus(row.id, {status: row.status}).then(response => {\r\n this.$message({\r\n type: 'success',\r\n message: '修改成功!'\r\n });\r\n });\r\n }).catch(() => {\r\n this.$message({\r\n type: 'info',\r\n message: '取消修改'\r\n });\r\n this.getList();\r\n });\r\n },\r\n handleDelete(index, row) {\r\n this.$confirm('是否要删除该用户?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(() => {\r\n deleteAdmin(row.id).then(response => {\r\n this.$message({\r\n type: 'success',\r\n message: '删除成功!'\r\n });\r\n this.getList();\r\n });\r\n });\r\n },\r\n handleUpdate(index, row) {\r\n this.dialogVisible = true;\r\n this.isEdit = true;\r\n this.admin = Object.assign({},row);\r\n },\r\n handleDialogConfirm() {\r\n this.$confirm('是否要确认?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(() => {\r\n if (this.isEdit) {\r\n updateAdmin(this.admin.id,this.admin).then(response => {\r\n this.$message({\r\n message: '修改成功!',\r\n type: 'success'\r\n });\r\n this.dialogVisible =false;\r\n this.getList();\r\n })\r\n } else {\r\n createAdmin(this.admin).then(response => {\r\n this.$message({\r\n message: '添加成功!',\r\n type: 'success'\r\n });\r\n this.dialogVisible =false;\r\n this.getList();\r\n })\r\n }\r\n })\r\n },\r\n handleAllocDialogConfirm(){\r\n this.$confirm('是否要确认?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(() => {\r\n // let params = new URLSearchParams();\r\n // params.append(\"adminId\", this.allocAdminId);\r\n // params.append(\"roleIds\", this.allocRoleIds);\r\n let obj = {\r\n adminId:this.allocAdminId,\r\n roleIds:this.allocRoleIds.join(',')\r\n }\r\n allocRole(obj).then(response => {\r\n this.$message({\r\n message: '分配成功!',\r\n type: 'success'\r\n });\r\n this.allocDialogVisible = false;\r\n })\r\n })\r\n },\r\n handleSelectRole(index,row){\r\n this.allocAdminId = row.id;\r\n this.allocDialogVisible = true;\r\n this.getRoleListByAdmin(row.id);\r\n },\r\n getList() {\r\n this.listLoading = true;\r\n fetchList(this.listQuery).then(response => {\r\n this.listLoading = false;\r\n this.list = response.data.list;\r\n this.total = response.data.total;\r\n });\r\n },\r\n getAllRoleList() {\r\n fetchAllRoleList().then(response => {\r\n this.allRoleList = response.data;\r\n });\r\n },\r\n getRoleListByAdmin(adminId) {\r\n getRoleByAdmin(adminId).then(response => {\r\n let allocRoleList = response.data;\r\n this.allocRoleIds=[];\r\n if(allocRoleList!=null&&allocRoleList.length>0){\r\n for(let i=0;i<allocRoleList.length;i++){\r\n this.allocRoleIds.push(allocRoleList[i].id);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n }\r\n</script>\r\n<style></style>\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/views/ums/admin/index.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"app-container\"},[_c('el-card',{staticClass:\"filter-container\",attrs:{\"shadow\":\"never\"}},[_c('div',[_c('i',{staticClass:\"el-icon-search\"}),_vm._v(\" \"),_c('span',[_vm._v(\"筛选搜索\")]),_vm._v(\" \"),_c('el-button',{staticStyle:{\"float\":\"right\"},attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":function($event){_vm.handleSearchList()}}},[_vm._v(\"\\n 查询搜索\\n \")]),_vm._v(\" \"),_c('el-button',{staticStyle:{\"float\":\"right\",\"margin-right\":\"15px\"},attrs:{\"size\":\"small\"},on:{\"click\":function($event){_vm.handleResetSearch()}}},[_vm._v(\"\\n 重置\\n \")])],1),_vm._v(\" \"),_c('div',{staticStyle:{\"margin-top\":\"15px\"}},[_c('el-form',{attrs:{\"inline\":true,\"model\":_vm.listQuery,\"size\":\"small\",\"label-width\":\"140px\"}},[_c('el-form-item',{attrs:{\"label\":\"输入搜索:\"}},[_c('el-input',{staticClass:\"input-width\",attrs:{\"placeholder\":\"帐号/姓名\",\"clearable\":\"\"},model:{value:(_vm.listQuery.keyword),callback:function ($$v) {_vm.$set(_vm.listQuery, \"keyword\", $$v)},expression:\"listQuery.keyword\"}})],1)],1)],1)]),_vm._v(\" \"),_c('el-card',{staticClass:\"operate-container\",attrs:{\"shadow\":\"never\"}},[_c('i',{staticClass:\"el-icon-tickets\"}),_vm._v(\" \"),_c('span',[_vm._v(\"数据列表\")])]),_vm._v(\" \"),_c('div',{staticClass:\"table-container\"},[_c('el-table',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.listLoading),expression:\"listLoading\"}],ref:\"adminTable\",staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.list,\"border\":\"\"}},[_c('el-table-column',{attrs:{\"label\":\"编号\",\"width\":\"100\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row.id))]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":\"帐号\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row.username))]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":\"姓名\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row.nickName))]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":\"手机号\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row.phone))]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":\"邮箱\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(scope.row.email))]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":\"添加时间\",\"width\":\"160\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm._f(\"formatDateTime\")(scope.row.createTime)))]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":\"最后登录\",\"width\":\"160\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(_vm._s(_vm._f(\"formatDateTime\")(scope.row.loginTime)))]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":\"是否启用\",\"width\":\"140\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-switch',{attrs:{\"active-value\":1,\"inactive-value\":0},on:{\"change\":function($event){_vm.handleStatusChange(scope.$index, scope.row)}},model:{value:(scope.row.status),callback:function ($$v) {_vm.$set(scope.row, \"status\", $$v)},expression:\"scope.row.status\"}})]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"label\":\"操作\",\"width\":\"180\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{attrs:{\"size\":\"mini\",\"type\":\"text\"},on:{\"click\":function($event){_vm.handleSelectRole(scope.$index, scope.row)}}},[_vm._v(\"分配角色\\n \")]),_vm._v(\" \"),_c('el-button',{attrs:{\"size\":\"mini\",\"type\":\"text\"},on:{\"click\":function($event){_vm.handleUpdate(scope.$index, scope.row)}}},[_vm._v(\"\\n 编辑\\n \")]),_vm._v(\" \"),_c('el-button',{attrs:{\"size\":\"mini\",\"type\":\"text\"},on:{\"click\":function($event){_vm.handleDelete(scope.$index, scope.row)}}},[_vm._v(\"删除\\n \")])]}}])})],1)],1),_vm._v(\" \"),_c('div',{staticClass:\"pagination-container\"},[_c('el-pagination',{attrs:{\"background\":\"\",\"layout\":\"total, sizes,prev, pager, next,jumper\",\"current-page\":_vm.listQuery.pageNum,\"page-size\":_vm.listQuery.pageSize,\"page-sizes\":[10,15,20],\"total\":_vm.total},on:{\"size-change\":_vm.handleSizeChange,\"current-change\":_vm.handleCurrentChange,\"update:currentPage\":function($event){_vm.$set(_vm.listQuery, \"pageNum\", $event)}}})],1),_vm._v(\" \"),_c('el-dialog',{attrs:{\"title\":_vm.isEdit?'编辑用户':'添加用户',\"visible\":_vm.dialogVisible,\"width\":\"40%\"},on:{\"update:visible\":function($event){_vm.dialogVisible=$event}}},[_c('el-form',{ref:\"adminForm\",attrs:{\"model\":_vm.admin,\"label-width\":\"150px\",\"size\":\"small\"}},[_c('el-form-item',{attrs:{\"label\":\"帐号:\"}},[_c('el-input',{staticStyle:{\"width\":\"250px\"},model:{value:(_vm.admin.username),callback:function ($$v) {_vm.$set(_vm.admin, \"username\", $$v)},expression:\"admin.username\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"姓名:\"}},[_c('el-input',{staticStyle:{\"width\":\"250px\"},model:{value:(_vm.admin.nickName),callback:function ($$v) {_vm.$set(_vm.admin, \"nickName\", $$v)},expression:\"admin.nickName\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"邮箱:\"}},[_c('el-input',{staticStyle:{\"width\":\"250px\"},model:{value:(_vm.admin.email),callback:function ($$v) {_vm.$set(_vm.admin, \"email\", $$v)},expression:\"admin.email\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"密码:\"}},[_c('el-input',{staticStyle:{\"width\":\"250px\"},attrs:{\"type\":\"password\"},model:{value:(_vm.admin.password),callback:function ($$v) {_vm.$set(_vm.admin, \"password\", $$v)},expression:\"admin.password\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"备注:\"}},[_c('el-input',{staticStyle:{\"width\":\"250px\"},attrs:{\"type\":\"textarea\",\"rows\":5},model:{value:(_vm.admin.note),callback:function ($$v) {_vm.$set(_vm.admin, \"note\", $$v)},expression:\"admin.note\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"是否启用:\"}},[_c('el-radio-group',{model:{value:(_vm.admin.status),callback:function ($$v) {_vm.$set(_vm.admin, \"status\", $$v)},expression:\"admin.status\"}},[_c('el-radio',{attrs:{\"label\":1}},[_vm._v(\"是\")]),_vm._v(\" \"),_c('el-radio',{attrs:{\"label\":0}},[_vm._v(\"否\")])],1)],1)],1),_vm._v(\" \"),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{attrs:{\"size\":\"small\"},on:{\"click\":function($event){_vm.dialogVisible = false}}},[_vm._v(\"取 消\")]),_vm._v(\" \"),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":function($event){_vm.handleDialogConfirm()}}},[_vm._v(\"确 定\")])],1)],1),_vm._v(\" \"),_c('el-dialog',{attrs:{\"title\":\"分配角色\",\"visible\":_vm.allocDialogVisible,\"width\":\"30%\"},on:{\"update:visible\":function($event){_vm.allocDialogVisible=$event}}},[_c('el-select',{staticStyle:{\"width\":\"80%\"},attrs:{\"multiple\":\"\",\"placeholder\":\"请选择\",\"size\":\"small\"},model:{value:(_vm.allocRoleIds),callback:function ($$v) {_vm.allocRoleIds=$$v},expression:\"allocRoleIds\"}},_vm._l((_vm.allRoleList),function(item){return _c('el-option',{key:item.id,attrs:{\"label\":item.name,\"value\":item.id}})})),_vm._v(\" \"),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{attrs:{\"size\":\"small\"},on:{\"click\":function($event){_vm.allocDialogVisible = false}}},[_vm._v(\"取 消\")]),_vm._v(\" \"),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":function($event){_vm.handleAllocDialogConfirm()}}},[_vm._v(\"确 定\")])],1)],1)],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-b0c7a63e\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/ums/admin/index.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-b0c7a63e\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./index.vue\")\n}\nvar normalizeComponent = require(\"!../../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./index.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./index.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-b0c7a63e\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../../node_modules/vue-loader/lib/selector?type=template&index=0!./index.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/views/ums/admin/index.vue\n// module id = null\n// module chunks = "],"sourceRoot":""}
|