1 |
- {"version":3,"sources":["webpack:///src/views/ums/admin/index.vue","webpack:///./src/views/ums/admin/index.vue?820d","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","_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":"wLA8JAA,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,kBAE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container\">\n <el-card class=\"filter-container\" shadow=\"never\">\n <div>\n <i class=\"el-icon-search\"></i>\n <span>筛选搜索</span>\n <el-button\n style=\"float:right\"\n type=\"primary\"\n @click=\"handleSearchList()\"\n size=\"small\">\n 查询搜索\n </el-button>\n <el-button\n style=\"float:right;margin-right: 15px\"\n @click=\"handleResetSearch()\"\n size=\"small\">\n 重置\n </el-button>\n </div>\n <div style=\"margin-top: 15px\">\n <el-form :inline=\"true\" :model=\"listQuery\" size=\"small\" label-width=\"140px\">\n <el-form-item label=\"输入搜索:\">\n <el-input v-model=\"listQuery.keyword\" class=\"input-width\" placeholder=\"帐号/姓名\" clearable></el-input>\n </el-form-item>\n </el-form>\n </div>\n </el-card>\n <el-card class=\"operate-container\" shadow=\"never\">\n <i class=\"el-icon-tickets\"></i>\n <span>数据列表</span>\n <!-- <el-button size=\"mini\" class=\"btn-add\" @click=\"handleAdd()\" style=\"margin-left: 20px\">添加</el-button> -->\n </el-card>\n <div class=\"table-container\">\n <el-table ref=\"adminTable\"\n :data=\"list\"\n style=\"width: 100%;\"\n v-loading=\"listLoading\" border>\n <el-table-column label=\"编号\" width=\"100\" align=\"center\">\n <template slot-scope=\"scope\">{{scope.row.id}}</template>\n </el-table-column>\n <el-table-column label=\"帐号\" align=\"center\">\n <template slot-scope=\"scope\">{{scope.row.username}}</template>\n </el-table-column>\n <el-table-column label=\"姓名\" align=\"center\">\n <template slot-scope=\"scope\">{{scope.row.nickName}}</template>\n </el-table-column>\n <el-table-column label=\"邮箱\" align=\"center\">\n <template slot-scope=\"scope\">{{scope.row.email}}</template>\n </el-table-column>\n <el-table-column label=\"添加时间\" width=\"160\" align=\"center\">\n <template slot-scope=\"scope\">{{scope.row.createTime | formatDateTime}}</template>\n </el-table-column>\n <el-table-column label=\"最后登录\" width=\"160\" align=\"center\">\n <template slot-scope=\"scope\">{{scope.row.loginTime | formatDateTime}}</template>\n </el-table-column>\n <el-table-column label=\"是否启用\" width=\"140\" align=\"center\">\n <template slot-scope=\"scope\">\n <el-switch\n @change=\"handleStatusChange(scope.$index, scope.row)\"\n :active-value=\"1\"\n :inactive-value=\"0\"\n v-model=\"scope.row.status\">\n </el-switch>\n </template>\n </el-table-column>\n <el-table-column label=\"操作\" width=\"180\" align=\"center\">\n <template slot-scope=\"scope\">\n <el-button size=\"mini\"\n type=\"text\"\n @click=\"handleSelectRole(scope.$index, scope.row)\">分配角色\n </el-button>\n <el-button size=\"mini\"\n type=\"text\"\n @click=\"handleUpdate(scope.$index, scope.row)\">\n 编辑\n </el-button>\n <el-button size=\"mini\"\n type=\"text\"\n @click=\"handleDelete(scope.$index, scope.row)\">删除\n </el-button>\n </template>\n </el-table-column>\n </el-table>\n </div>\n <div class=\"pagination-container\">\n <el-pagination\n background\n @size-change=\"handleSizeChange\"\n @current-change=\"handleCurrentChange\"\n layout=\"total, sizes,prev, pager, next,jumper\"\n :current-page.sync=\"listQuery.pageNum\"\n :page-size=\"listQuery.pageSize\"\n :page-sizes=\"[10,15,20]\"\n :total=\"total\">\n </el-pagination>\n </div>\n <el-dialog\n :title=\"isEdit?'编辑用户':'添加用户'\"\n :visible.sync=\"dialogVisible\"\n width=\"40%\">\n <el-form :model=\"admin\"\n ref=\"adminForm\"\n label-width=\"150px\" size=\"small\">\n <el-form-item label=\"帐号:\">\n <el-input v-model=\"admin.username\" style=\"width: 250px\"></el-input>\n </el-form-item>\n <el-form-item label=\"姓名:\">\n <el-input v-model=\"admin.nickName\" style=\"width: 250px\"></el-input>\n </el-form-item>\n <el-form-item label=\"邮箱:\">\n <el-input v-model=\"admin.email\" style=\"width: 250px\"></el-input>\n </el-form-item>\n <el-form-item label=\"密码:\">\n <el-input v-model=\"admin.password\" type=\"password\" style=\"width: 250px\"></el-input>\n </el-form-item>\n <el-form-item label=\"备注:\">\n <el-input v-model=\"admin.note\"\n type=\"textarea\"\n :rows=\"5\"\n style=\"width: 250px\"></el-input>\n </el-form-item>\n <el-form-item label=\"是否启用:\">\n <el-radio-group v-model=\"admin.status\">\n <el-radio :label=\"1\">是</el-radio>\n <el-radio :label=\"0\">否</el-radio>\n </el-radio-group>\n </el-form-item>\n </el-form>\n <span slot=\"footer\" class=\"dialog-footer\">\n <el-button @click=\"dialogVisible = false\" size=\"small\">取 消</el-button>\n <el-button type=\"primary\" @click=\"handleDialogConfirm()\" size=\"small\">确 定</el-button>\n </span>\n </el-dialog>\n <el-dialog\n title=\"分配角色\"\n :visible.sync=\"allocDialogVisible\"\n width=\"30%\">\n <el-select v-model=\"allocRoleIds\" multiple placeholder=\"请选择\" size=\"small\" style=\"width: 80%\">\n <el-option\n v-for=\"item in allRoleList\"\n :key=\"item.id\"\n :label=\"item.name\"\n :value=\"item.id\">\n </el-option>\n </el-select>\n <span slot=\"footer\" class=\"dialog-footer\">\n <el-button @click=\"allocDialogVisible = false\" size=\"small\">取 消</el-button>\n <el-button type=\"primary\" @click=\"handleAllocDialogConfirm()\" size=\"small\">确 定</el-button>\n </span>\n </el-dialog>\n </div>\n</template>\n<script>\n import {fetchList,createAdmin,updateAdmin,updateStatus,deleteAdmin,getRoleByAdmin,allocRole} from '@/api/login';\n import {fetchAllRoleList} from '@/api/role';\n import {formatDate} from '@/utils/date';\n\n const defaultListQuery = {\n pageNum: 1,\n pageSize: 10,\n keyword: null\n };\n const defaultAdmin = {\n id: null,\n username: null,\n password: null,\n nickName: null,\n email: null,\n note: null,\n status: 1\n };\n export default {\n name: 'adminList',\n data() {\n return {\n listQuery: Object.assign({}, defaultListQuery),\n list: null,\n total: null,\n listLoading: false,\n dialogVisible: false,\n admin: Object.assign({}, defaultAdmin),\n isEdit: false,\n allocDialogVisible: false,\n allocRoleIds:[],\n allRoleList:[],\n allocAdminId:null\n }\n },\n created() {\n this.getList();\n this.getAllRoleList();\n },\n filters: {\n formatDateTime(time) {\n if (time == null || time === '') {\n return '--';\n }\n let date = new Date(time);\n return formatDate(date, 'yyyy-MM-dd hh:mm:ss')\n }\n },\n methods: {\n handleResetSearch() {\n this.listQuery = Object.assign({}, defaultListQuery);\n },\n handleSearchList() {\n this.listQuery.pageNum = 1;\n this.getList();\n },\n handleSizeChange(val) {\n this.listQuery.pageNum = 1;\n this.listQuery.pageSize = val;\n this.getList();\n },\n handleCurrentChange(val) {\n this.listQuery.pageNum = val;\n this.getList();\n },\n handleAdd() {\n this.dialogVisible = true;\n this.isEdit = false;\n this.admin = Object.assign({},defaultAdmin);\n },\n handleStatusChange(index, row) {\n this.$confirm('是否要修改该状态?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(() => {\n updateStatus(row.id, {status: row.status}).then(response => {\n this.$message({\n type: 'success',\n message: '修改成功!'\n });\n });\n }).catch(() => {\n this.$message({\n type: 'info',\n message: '取消修改'\n });\n this.getList();\n });\n },\n handleDelete(index, row) {\n this.$confirm('是否要删除该用户?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(() => {\n deleteAdmin(row.id).then(response => {\n this.$message({\n type: 'success',\n message: '删除成功!'\n });\n this.getList();\n });\n });\n },\n handleUpdate(index, row) {\n this.dialogVisible = true;\n this.isEdit = true;\n this.admin = Object.assign({},row);\n },\n handleDialogConfirm() {\n this.$confirm('是否要确认?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(() => {\n if (this.isEdit) {\n updateAdmin(this.admin.id,this.admin).then(response => {\n this.$message({\n message: '修改成功!',\n type: 'success'\n });\n this.dialogVisible =false;\n this.getList();\n })\n } else {\n createAdmin(this.admin).then(response => {\n this.$message({\n message: '添加成功!',\n type: 'success'\n });\n this.dialogVisible =false;\n this.getList();\n })\n }\n })\n },\n handleAllocDialogConfirm(){\n this.$confirm('是否要确认?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(() => {\n // let params = new URLSearchParams();\n // params.append(\"adminId\", this.allocAdminId);\n // params.append(\"roleIds\", this.allocRoleIds);\n let obj = {\n adminId:this.allocAdminId,\n roleIds:this.allocRoleIds.join(',')\n }\n allocRole(obj).then(response => {\n this.$message({\n message: '分配成功!',\n type: 'success'\n });\n this.allocDialogVisible = false;\n })\n })\n },\n handleSelectRole(index,row){\n this.allocAdminId = row.id;\n this.allocDialogVisible = true;\n this.getRoleListByAdmin(row.id);\n },\n getList() {\n this.listLoading = true;\n fetchList(this.listQuery).then(response => {\n this.listLoading = false;\n this.list = response.data.list;\n this.total = response.data.total;\n });\n },\n getAllRoleList() {\n fetchAllRoleList().then(response => {\n this.allRoleList = response.data;\n });\n },\n getRoleListByAdmin(adminId) {\n getRoleByAdmin(adminId).then(response => {\n let allocRoleList = response.data;\n this.allocRoleIds=[];\n if(allocRoleList!=null&&allocRoleList.length>0){\n for(let i=0;i<allocRoleList.length;i++){\n this.allocRoleIds.push(allocRoleList[i].id);\n }\n }\n });\n }\n }\n }\n</script>\n<style></style>\n\n\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.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-ed92989c\",\"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,\\\"publicPath\\\":\\\"../../\\\"}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-ed92989c\\\",\\\"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-ed92989c\\\",\\\"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":""}
|