1 |
- {"version":3,"sources":["webpack:///src/pages/SystemSet/Users/index.vue","webpack:///./src/pages/SystemSet/Users/index.vue?18fd","webpack:///./src/pages/SystemSet/Users/index.vue"],"names":["Users","name","data","_this","this","form","addUserName","addUserPwd","addUserRoleValue","addUserStateValue","radio","dialogVisible","rules","userName","required","validator","rule","value","callback","Error","userTableData","forEach","item","index","arr","username","trigger","userPwd","length","userRole","message","userState","isAdmin","password","role","state","addUserRole","label","addUserState","created","GetUser","JSON","parse","sessionStorage","getItem","methods","_this2","Object","request","then","res","console","log","UsersManagement","handleClick","row","_this3","$confirm","confirmButtonText","cancelButtonText","type","$message","catch","btnOK","_this4","userForm","btnNO","goTo","$router","push","downlodTable","_this5","downFile","wb","xlsx_default","a","utils","table_to_book","document","querySelector","wbout","write","bookType","bookSST","FileSaver_min_default","saveAs","Blob","e","addUser","SystemSet_Users","render","_vm","_h","$createElement","_c","_self","staticClass","_v","attrs","id","on","click","_e","ref","staticStyle","width","color","max-height","overflow-y","background-color","prop","align","scopedSlots","_u","key","fn","scope","size","$event","title","visible","update:visible","model","label-width","autocomplete","$$v","$set","expression","auto-complete","margin-bottom","placeholder","_l","slot","staticRenderFns","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__"],"mappings":"kKA+FAA,GACAC,KAAA,OACAC,KAFA,WAEA,IAAAC,EAAAC,KAsBA,OACAC,MACAC,YAAA,GACAC,WAAA,GACAC,iBAAA,GACAC,kBAAA,IAEAC,MAAA,EACAC,eAAA,EACAC,OACAC,WACAC,UAAA,EACAC,UAjCA,SAAAC,EAAAC,EAAAC,GACA,KAAAf,EAAAE,KAAAC,YACAY,EAAA,IAAAC,MAAA,aAEAhB,EAAAiB,cAAAC,QAAA,SAAAC,EAAAC,EAAAC,GACArB,EAAAE,KAAAC,aAAAgB,EAAAG,UACAP,EAAA,IAAAC,MAAA,aAGAD,MAyBAQ,SAAA,mBAEAC,UACAb,UAAA,EACAC,UA1BA,SAAAC,EAAAC,EAAAC,GACA,KA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OAAOtC,KAAA,UAAAuC,GAAA,WAAgCC,IAAKC,MAAAV,EAAAzB,SAAmByB,EAAAM,GAAA,qBAE/9EoC,oBCLjB,IAcAC,EAdyBC,EAAQ,OAcjCC,CACExI,EACAyF,GATF,EAVA,SAAAgD,GACEF,EAAQ,SAaV,kBAEA,MAUeG,EAAA,QAAAJ,EAAiB","file":"static/js/16.9345cc7e715ff4b7b8d0.js","sourcesContent":["<template>\r\n <div class=\"logBox\">\r\n <div class=\"border_left_top border\"></div>\r\n <div class=\"border_top border\"></div>\r\n <div class=\"border_right_top border\"></div>\r\n <div class=\"border_left border\"></div>\r\n <div class=\"border_right border\"></div>\r\n <div class=\"border_left_bottom border\"></div>\r\n <div class=\"border_bottom border\"></div>\r\n <div class=\"border_right_bottom border\"></div>\r\n <el-button-group id=\"topButton2\">\r\n <el-button type=\"primary\" class=\"active\">用户管理</el-button>\r\n </el-button-group>\r\n <el-button type=\"primary\" class=\"addUser\" v-if=\"isAdmin\" @click=\"addUser\">新增用户</el-button>\r\n <!-- <div class=\"downlodTable\" @click=\"downlodTable\">导出</div> -->\r\n <el-table :data=\"userTableData\" ref='userTableData' id=\"userTableData\" style=\"width: 100%;color: #2DAFF5;max-height: 100%;overflow-y: auto;background-color: none;\">\r\n <el-table-column prop=\"username\" align=\"center\" label=\"用户名\">\r\n </el-table-column>\r\n <el-table-column prop=\"password\" align=\"center\" label=\"密码\" v-if=\"isAdmin\">\r\n </el-table-column>\r\n <el-table-column prop=\"mianJd\" align=\"center\" label=\"主界面\">\r\n <template slot-scope=\"{row}\">\r\n <label v-if=\"row.role=='administrator'\">修改</label>\r\n <label v-else>查看</label>\r\n </template>\r\n </el-table-column>\r\n <el-table-column prop=\"username\" align=\"center\" label=\"AMR管理\">\r\n <template slot-scope=\"{row}\">\r\n <label v-if=\"row.role=='administrator'\">修改</label>\r\n <label v-else >查看</label>\r\n </template>\r\n </el-table-column>\r\n <!-- <el-table-column prop=\"username\" align=\"center\" label=\"输送机管理\">\r\n <template slot-scope=\"{row}\">\r\n <label v-if=\"row.role=='administrator'\">修改</label>\r\n <label v-else>查看</label>\r\n </template>\r\n </el-table-column> -->\r\n <el-table-column prop=\"username\" align=\"center\" label=\"系统管理\">\r\n <template slot-scope=\"{row}\">\r\n <label v-if=\"row.role=='administrator'\">修改</label>\r\n <label v-else>查看</label>\r\n </template>\r\n </el-table-column>\r\n\t\t<el-table-column\r\n\t\t\tv-if=\"isAdmin\"\r\n\t\t\tlabel=\"操作\"\r\n\t\t\talign=\"center\"\r\n\t\t\twidth=\"100\">\r\n\t\t\t<template slot-scope=\"scope\">\r\n\t\t\t\t<el-button @click=\"handleClick(scope.row)\" v-if=\"scope.row.role!='administrator'\" type=\"text\" size=\"small\">删除</el-button>\r\n\t\t\t</template>\r\n\t\t</el-table-column>\r\n </el-table>\r\n <el-dialog title=\"编辑用户\" :visible.sync=\"dialogVisible\" width=\"600px\" id=\"addUserDialog\">\r\n <el-form :model=\"form\" ref=\"form\" :rules=\"rules\">\r\n <el-form-item label=\"用户名:\" prop=\"userName\" label-width=\"90px\">\r\n <el-input type=\"text\" v-model=\"form.addUserName\" autocomplete=\"off\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"密码:\" prop=\"userPwd\" label-width=\"90px\">\r\n <el-input v-model=\"form.addUserPwd\" type=\"password\" auto-complete=\"off\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"角色类型:\" prop=\"userRole\" label-width=\"90px\" style=\"margin-bottom: 20px;\">\r\n <template>\r\n <el-select v-model=\"form.addUserRoleValue\" placeholder=\"请选择类型\">\r\n <el-option v-for=\"(item,index) in addUserRole\" :label=\"item.label\" :value=\"item.value\" @click=\"\" :key=\"index\">\r\n </el-option>\r\n </el-select>\r\n </template>\r\n </el-form-item>\r\n <el-form-item label=\"状态:\" prop=\"userState\" label-width=\"90px\" style=\"margin-bottom: 0;\">\r\n <template>\r\n <el-select v-model=\"form.addUserStateValue\" placeholder=\"请选择状态\">\r\n <el-option v-for=\"(item,index) in addUserState\" :label=\"item.label\" :value=\"item.value\" :key=\"index\">\r\n </el-option>\r\n </el-select>\r\n </template>\r\n </el-form-item>\r\n </el-form>\r\n <span slot=\"footer\" class=\"dialog-footer\">\r\n <el-button type=\"primary\" @click=\"btnOK\" id=\"sureBtn\">确 定</el-button>\r\n <el-button type=\"primary\" @click=\"btnNO\" id=\"sureBtn\">取消</el-button>\r\n </span>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n import {\r\n Homeadduser,\r\n GetUsers,\r\n\thomedeleteuser\r\n } from '@/api/request.js'\r\n import FileSaver from \"file-saver\";\r\n import XLSX from \"xlsx\";\r\n export default {\r\n name: \"User\",\r\n data() {\r\n var userNameRule = (rule, value, callback) => {\r\n if (this.form.addUserName === '') {\r\n callback(new Error('用户名不能为空'));\r\n } else {\r\n this.userTableData.forEach((item, index, arr) => {\r\n if (this.form.addUserName == item.username) {\r\n callback(new Error('用户名已存在'));\r\n }\r\n })\r\n callback()\r\n }\r\n };\r\n var userPwdRule = (rule, value, callback) => {\r\n if (this.form.addUserPwd === '') {\r\n callback(new Error('密码不能为空'));\r\n } else if (this.form.addUserPwd.length < 6) {\r\n callback(new Error('密码不能小于6位'));\r\n } else {\r\n callback()\r\n }\r\n };\r\n return {\r\n form: {\r\n addUserName: '',\r\n addUserPwd: '',\r\n addUserRoleValue: '',\r\n addUserStateValue: ''\r\n },\r\n radio: 1,\r\n dialogVisible: false,\r\n rules: {\r\n userName: [{\r\n required: true,\r\n validator: userNameRule,\r\n trigger: ['blur', 'change']\r\n }],\r\n userPwd: [{\r\n required: true,\r\n validator: userPwdRule,\r\n trigger: ['blur', 'change']\r\n }],\r\n userRole: [{\r\n required: true,\r\n message: '请选择类型',\r\n trigger: 'blur'\r\n }],\r\n userState: [{\r\n required: true,\r\n message: '请选择状态',\r\n trigger: 'blur'\r\n }]\r\n },\r\n\t\t\t\tisAdmin:false,\r\n userTableData: [{\r\n \"username\": \"165asas\",\r\n \"password\": \"123456\",\r\n \"role\": \"user\",\r\n \"state\": \"unlock\"\r\n },\r\n {\r\n \"username\": \"sa223sas\",\r\n \"password\": \"123456\",\r\n \"role\": \"user\",\r\n \"state\": \"unlock\"\r\n },\r\n {\r\n \"username\": \"admin4\",\r\n \"password\": \"123456\",\r\n \"role\": \"admin\",\r\n \"state\": \"unlock\"\r\n }\r\n ],\r\n addUserRole: [{\r\n value: 'admin',\r\n label: 'admin',\r\n },\r\n {\r\n value: 'user',\r\n label: 'user',\r\n }\r\n ],\r\n addUserState: [{\r\n value: 'lock',\r\n label: 'lock',\r\n },\r\n {\r\n value: 'unlock',\r\n label: 'unlock',\r\n },\r\n ]\r\n }\r\n },\r\n created() {\r\n this.GetUser()\r\n\t\t\tlet user = JSON.parse(sessionStorage.getItem(\"userData\")).userName;\r\n\t\t\tif(user==\"admin\"){\r\n\t\t\t\tthis.isAdmin=true;\r\n\t\t\t}\r\n },\r\n methods: {\r\n GetUser() {\r\n GetUsers().then(res => {\r\n console.log(res.UsersManagement);\r\n this.userTableData = res.UsersManagement\r\n })\r\n },\r\n\t handleClick(row){\r\n\t\t let data = {\r\n\t\t\t \"username\":row.username\r\n\t\t }\r\n\t\t this.$confirm('是否删除当前用户?', '提示', {\r\n\t\t confirmButtonText: '确定',\r\n\t\t cancelButtonText: '取消',\r\n\t\t type: 'warning'\r\n\t\t }).then(() => {\r\n\t\t homedeleteuser(data).then(res => {\r\n\t\t this.$message({\r\n\t\t type: 'success',\r\n\t\t message: '导出成功!'\r\n\t\t });\r\n\t\t\t this.GetUser();\r\n\t\t })\r\n\t\t }).catch(() => {\r\n\t\t });\r\n\t },\r\n btnOK() {\r\n let userForm = {\r\n username: this.form.addUserName,\r\n password: this.form.addUserPwd,\r\n role: this.form.addUserRoleValue,\r\n state: this.form.addUserStateValue\r\n }\r\n Homeadduser(userForm).then(res => {\r\n\t\t\tconsole.log(res);\r\n\t\t\tthis.dialogVisible = false;\r\n\t\t\tthis.$message({\r\n\t\t\t type: 'success',\r\n\t\t\t message: '创建成功'\r\n\t\t\t});\r\n\t\t\tthis.GetUser()\r\n })\r\n },\r\n btnNO() {\r\n this.dialogVisible = !this.dialogVisible\r\n },\r\n goTo() {\r\n this.$router.push(\"/Alarm/RealTime\");\r\n },\r\n downlodTable() {\r\n this.$confirm('是否需要导出xlsx文档, 是否继续?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(() => {\r\n this.downFile();\r\n this.$message({\r\n type: 'success',\r\n message: '导出成功!'\r\n });\r\n }).catch(() => {\r\n this.$message({\r\n type: 'info',\r\n message: '已取消导出'\r\n });\r\n });\r\n },\r\n downFile() {\r\n var wb = XLSX.utils.table_to_book(document.querySelector(\"#userTableData\"));\r\n var wbout = XLSX.write(wb, {\r\n bookType: \"xlsx\",\r\n bookSST: true,\r\n type: \"array\"\r\n });\r\n try {\r\n FileSaver.saveAs(\r\n new Blob([wbout], {\r\n type: \"application/octet-stream\"\r\n }),\r\n \"user.xlsx\"\r\n );\r\n } catch (e) {\r\n if (typeof console !== \"undefined\") console.log(e, wbout);\r\n }\r\n return wbout;\r\n },\r\n addUser() {\r\n this.dialogVisible = true;\r\n }\r\n }\r\n }\r\n</script>\r\n\r\n<style lang=\"less\" scoped>\r\n .downlodTable {\r\n width: 50px;\r\n height: 30px;\r\n box-shadow: inset 0px 1px 38px 0px rgba(0, 162, 253, 0.4) !important;\r\n border: 1px solid rgba(1, 148, 228, 0.34) !important;\r\n background: none !important;\r\n float: right;\r\n position: absolute;\r\n top: 30px;\r\n right: 125px;\r\n color: #ddd;\r\n text-align: center;\r\n line-height: 30px;\r\n cursor: pointer;\r\n }\r\n\r\n .logBox {\r\n width: 100%;\r\n height: 100%;\r\n overflow: hidden;\r\n position: relative;\r\n padding: 4.0625rem 1.5rem 4.0625rem 2.5rem;\r\n box-sizing: border-box;\r\n\r\n // background: url(../../assets/img/border.png) no-repeat center center;\r\n // background-size: 100% 100%;\r\n .border {\r\n position: absolute;\r\n }\r\n\r\n .border_left_top {\r\n width: 11.625rem;\r\n height: 5.875rem;\r\n background: url(../../../assets/img/border_left_top.png);\r\n left: 0;\r\n top: 0;\r\n }\r\n\r\n .border_top {\r\n width: calc(100% - 11.625rem - 4.9375rem);\r\n height: 1.5rem;\r\n background: url(../../../assets/img/border_top.png) no-repeat center center;\r\n background-size: 100% 100%;\r\n left: 11.625rem;\r\n top: 0;\r\n }\r\n\r\n .border_right_top {\r\n width: 4.9375rem;\r\n height: 5.875rem;\r\n background: url(../../../assets/img/border_right_top.png) no-repeat center center;\r\n background-size: 100% 100%;\r\n right: 0.0625rem;\r\n top: 0;\r\n }\r\n\r\n .border_left {\r\n width: 1.375rem;\r\n height: calc(100% - 5.875rem - 7.625rem);\r\n background: url(../../../assets/img/border_left.png) no-repeat center center;\r\n background-size: 100% 100%;\r\n left: 0;\r\n top: 5.875rem;\r\n }\r\n\r\n .border_right {\r\n width: 0.1875rem;\r\n height: calc(100% - 5.875rem - 7.6875rem);\r\n background: url(../../../assets/img/border_right.png) no-repeat center center;\r\n background-size: 100% 100%;\r\n right: 0;\r\n top: 5.875rem;\r\n }\r\n\r\n .border_left_bottom {\r\n width: 11.625rem;\r\n height: 7.625rem;\r\n background: url(../../../assets/img/border_left_bottom.png) no-repeat center center;\r\n background-size: 100% 100%;\r\n left: 0;\r\n bottom: 0;\r\n }\r\n\r\n .border_bottom {\r\n width: calc(100% - 11.625rem - 4.9375rem);\r\n height: 0.1875rem;\r\n background: url(../../../assets/img/border_bottom.png) no-repeat center center;\r\n background-size: 100% 100%;\r\n left: 11.625rem;\r\n bottom: 0;\r\n }\r\n\r\n .border_right_bottom {\r\n width: 4.9375rem;\r\n height: 7.6875rem;\r\n background: url(../../../assets/img/border_right_bottom.png) no-repeat center center;\r\n background-size: 100% 100%;\r\n right: 0;\r\n bottom: 0;\r\n }\r\n\r\n #topButton2 {\r\n position: absolute;\r\n top: 8px;\r\n left: 8px;\r\n z-index: 1;\r\n\r\n button:first-child {\r\n border: none;\r\n background: url(../../../assets/img/check1.png) no-repeat center center;\r\n background-size: 100% 100%;\r\n padding: 12px 80px 12px 40px;\r\n position: absolute;\r\n font-weight: bold;\r\n font-style: italic;\r\n color: #76899D;\r\n }\r\n\r\n .active {\r\n color: #fff !important;\r\n }\r\n }\r\n\r\n .el-table::before {\r\n height: 0;\r\n }\r\n\r\n .addUser {\r\n position: absolute;\r\n z-index: 10;\r\n right: 25px;\r\n top: 30px;\r\n background: url(../../../assets/img/btn_add.png) no-repeat center center;\r\n background-size: 100%;\r\n border: none;\r\n border-radius: 0;\r\n width: 5rem;\r\n padding: 0;\r\n height: 2rem;\r\n line-height: 2rem;\r\n font-size: 0.775rem;\r\n color: #2DAFF5;\r\n }\r\n\r\n }\r\n\r\n #addUserDialog .el-dialog {\r\n background: none;\r\n }\r\n\r\n #addUserDialog .el-dialog .el-dialog__header {\r\n padding: 55px 60px 10px;\r\n color: #2DAFF5;\r\n position: absolute;\r\n width: 100%;\r\n }\r\n\r\n #addUserDialog .el-dialog .el-dialog__header .el-dialog__title {\r\n color: #2DAFF5;\r\n }\r\n\r\n #addUserDialog .el-dialog .el-dialog__header .el-dialog__headerbtn {\r\n position: absolute;\r\n top: 5rem;\r\n right: 11rem;\r\n }\r\n\r\n #addUserDialog .el-dialog .el-dialog__body {\r\n background: url(../../../assets/img/dialogBack.png) no-repeat center center;\r\n background-size: 100% 100%;\r\n padding: 110px 70px 110px 50px;\r\n color: #2DAFF5;\r\n height: 37rem;\r\n box-sizing: border-box;\r\n width: 600px;\r\n margin: 0 auto;\r\n }\r\n\r\n #addUserDialog .el-dialog .el-dialog__body .el-form-item__label {\r\n color: #2DAFF5;\r\n }\r\n\r\n #addUserDialog .el-dialog .el-dialog__body input {\r\n color: #ddd;\r\n height: 32px !important;\r\n line-height: 32px !important;\r\n -webkit-box-shadow: inset 0px 1px 38px 0px rgba(0, 162, 253, 0.4) !important;\r\n box-shadow: inset 0px 1px 38px 0px rgba(0, 162, 253, 0.4) !important;\r\n border: 1px solid rgba(1, 148, 228, 0.34) !important;\r\n background: none !important;\r\n border-radius: 0 !important;\r\n }\r\n\r\n #addUserDialog .el-dialog .el-dialog__footer {\r\n padding: 10px 50px;\r\n position: absolute;\r\n right: 0;\r\n bottom: 50px;\r\n }\r\n\r\n .logBox .el-table th {\r\n background: #103366 !important;\r\n }\r\n\r\n .logBox .el-table th>.cell {\r\n color: #0194E4 !important;\r\n }\r\n\r\n #sureBtn {\r\n background: url(../../../assets/img/btn_add.png) no-repeat center center;\r\n border: none;\r\n border-radius: 0;\r\n }\r\n</style>\r\n\n\n\n// WEBPACK FOOTER //\n// src/pages/SystemSet/Users/index.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"logBox\"},[_c('div',{staticClass:\"border_left_top border\"}),_vm._v(\" \"),_c('div',{staticClass:\"border_top border\"}),_vm._v(\" \"),_c('div',{staticClass:\"border_right_top border\"}),_vm._v(\" \"),_c('div',{staticClass:\"border_left border\"}),_vm._v(\" \"),_c('div',{staticClass:\"border_right border\"}),_vm._v(\" \"),_c('div',{staticClass:\"border_left_bottom border\"}),_vm._v(\" \"),_c('div',{staticClass:\"border_bottom border\"}),_vm._v(\" \"),_c('div',{staticClass:\"border_right_bottom border\"}),_vm._v(\" \"),_c('el-button-group',{attrs:{\"id\":\"topButton2\"}},[_c('el-button',{staticClass:\"active\",attrs:{\"type\":\"primary\"}},[_vm._v(\"用户管理\")])],1),_vm._v(\" \"),(_vm.isAdmin)?_c('el-button',{staticClass:\"addUser\",attrs:{\"type\":\"primary\"},on:{\"click\":_vm.addUser}},[_vm._v(\"新增用户\")]):_vm._e(),_vm._v(\" \"),_c('el-table',{ref:\"userTableData\",staticStyle:{\"width\":\"100%\",\"color\":\"#2DAFF5\",\"max-height\":\"100%\",\"overflow-y\":\"auto\",\"background-color\":\"none\"},attrs:{\"data\":_vm.userTableData,\"id\":\"userTableData\"}},[_c('el-table-column',{attrs:{\"prop\":\"username\",\"align\":\"center\",\"label\":\"用户名\"}}),_vm._v(\" \"),(_vm.isAdmin)?_c('el-table-column',{attrs:{\"prop\":\"password\",\"align\":\"center\",\"label\":\"密码\"}}):_vm._e(),_vm._v(\" \"),_c('el-table-column',{attrs:{\"prop\":\"mianJd\",\"align\":\"center\",\"label\":\"主界面\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar row = ref.row;\nreturn [(row.role=='administrator')?_c('label',[_vm._v(\"修改\")]):_c('label',[_vm._v(\"查看\")])]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"prop\":\"username\",\"align\":\"center\",\"label\":\"AMR管理\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar row = ref.row;\nreturn [(row.role=='administrator')?_c('label',[_vm._v(\"修改\")]):_c('label',[_vm._v(\"查看\")])]}}])}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"prop\":\"username\",\"align\":\"center\",\"label\":\"系统管理\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar row = ref.row;\nreturn [(row.role=='administrator')?_c('label',[_vm._v(\"修改\")]):_c('label',[_vm._v(\"查看\")])]}}])}),_vm._v(\" \"),(_vm.isAdmin)?_c('el-table-column',{attrs:{\"label\":\"操作\",\"align\":\"center\",\"width\":\"100\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [(scope.row.role!='administrator')?_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.handleClick(scope.row)}}},[_vm._v(\"删除\")]):_vm._e()]}}],null,false,8619185)}):_vm._e()],1),_vm._v(\" \"),_c('el-dialog',{attrs:{\"title\":\"编辑用户\",\"visible\":_vm.dialogVisible,\"width\":\"600px\",\"id\":\"addUserDialog\"},on:{\"update:visible\":function($event){_vm.dialogVisible=$event}}},[_c('el-form',{ref:\"form\",attrs:{\"model\":_vm.form,\"rules\":_vm.rules}},[_c('el-form-item',{attrs:{\"label\":\"用户名:\",\"prop\":\"userName\",\"label-width\":\"90px\"}},[_c('el-input',{attrs:{\"type\":\"text\",\"autocomplete\":\"off\"},model:{value:(_vm.form.addUserName),callback:function ($$v) {_vm.$set(_vm.form, \"addUserName\", $$v)},expression:\"form.addUserName\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"密码:\",\"prop\":\"userPwd\",\"label-width\":\"90px\"}},[_c('el-input',{attrs:{\"type\":\"password\",\"auto-complete\":\"off\"},model:{value:(_vm.form.addUserPwd),callback:function ($$v) {_vm.$set(_vm.form, \"addUserPwd\", $$v)},expression:\"form.addUserPwd\"}})],1),_vm._v(\" \"),_c('el-form-item',{staticStyle:{\"margin-bottom\":\"20px\"},attrs:{\"label\":\"角色类型:\",\"prop\":\"userRole\",\"label-width\":\"90px\"}},[[_c('el-select',{attrs:{\"placeholder\":\"请选择类型\"},model:{value:(_vm.form.addUserRoleValue),callback:function ($$v) {_vm.$set(_vm.form, \"addUserRoleValue\", $$v)},expression:\"form.addUserRoleValue\"}},_vm._l((_vm.addUserRole),function(item,index){return _c('el-option',{key:index,attrs:{\"label\":item.label,\"value\":item.value},on:{\"click\":function($event){}}})}),1)]],2),_vm._v(\" \"),_c('el-form-item',{staticStyle:{\"margin-bottom\":\"0\"},attrs:{\"label\":\"状态:\",\"prop\":\"userState\",\"label-width\":\"90px\"}},[[_c('el-select',{attrs:{\"placeholder\":\"请选择状态\"},model:{value:(_vm.form.addUserStateValue),callback:function ($$v) {_vm.$set(_vm.form, \"addUserStateValue\", $$v)},expression:\"form.addUserStateValue\"}},_vm._l((_vm.addUserState),function(item,index){return _c('el-option',{key:index,attrs:{\"label\":item.label,\"value\":item.value}})}),1)]],2)],1),_vm._v(\" \"),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{attrs:{\"type\":\"primary\",\"id\":\"sureBtn\"},on:{\"click\":_vm.btnOK}},[_vm._v(\"确 定\")]),_vm._v(\" \"),_c('el-button',{attrs:{\"type\":\"primary\",\"id\":\"sureBtn\"},on:{\"click\":_vm.btnNO}},[_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-5c03bbe4\",\"hasScoped\":true,\"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/pages/SystemSet/Users/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,\\\"publicPath\\\":\\\"../../\\\"}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-5c03bbe4\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!less-loader?{\\\"sourceMap\\\":true}!../../../../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-5c03bbe4\\\",\\\"hasScoped\\\":true,\\\"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__ = \"data-v-5c03bbe4\"\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/pages/SystemSet/Users/index.vue\n// module id = null\n// module chunks = "],"sourceRoot":""}
|