22.35973257612f36365fb8.js.map 28 KB

1
  1. {"version":3,"sources":["webpack:///src/views/ums/resource/index.vue","webpack:///./src/views/ums/resource/index.vue?0680","webpack:///./src/views/ums/resource/index.vue","webpack:///./src/api/resource.js"],"names":["defaultListQuery","pageNum","pageSize","nameKeyword","urlKeyword","categoryId","defaultResource","id","name","url","description","ums_resource","data","listQuery","assign_default","list","total","listLoading","dialogVisible","resource","isEdit","categoryOptions","defaultCategoryId","created","this","getList","getCateList","filters","formatDateTime","time","date","Date","Object","utils_date","methods","handleResetSearch","handleSearchList","handleSizeChange","val","handleCurrentChange","handleAdd","handleDelete","index","row","_this","$confirm","confirmButtonText","cancelButtonText","type","then","response","$message","message","handleUpdate","handleDialogConfirm","_this2","handleShowCategory","$router","push","path","_this3","_this4","resourceCategory","cateList","i","length","cate","label","value","views_ums_resource","render","_vm","_h","$createElement","_c","_self","staticClass","attrs","shadow","_v","staticStyle","float","size","on","click","$event","margin-right","margin-top","inline","model","label-width","placeholder","clearable","callback","$$v","$set","expression","_l","item","key","margin-left","directives","rawName","ref","width","border","align","scopedSlots","_u","fn","scope","_s","_f","createTime","$index","background","layout","current-page","page-size","page-sizes","size-change","current-change","update:currentPage","title","visible","update:visible","rows","slot","staticRenderFns","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__","params","__WEBPACK_IMPORTED_MODULE_0__utils_request__","method"],"mappings":"qKAsIAA,GACAC,QAAA,EACAC,SAAA,GACAC,YAAA,KACAC,WAAA,KACAC,WAAA,MAEAC,GACAC,GAAA,KACAC,KAAA,KACAC,IAAA,KACAJ,WAAA,KACAK,YAAA,IAEAC,GACAH,KAAA,eACAI,KAFA,WAGA,OACAC,UAAAC,OAAAd,GACAe,KAAA,KACAC,MAAA,KACAC,aAAA,EACAC,eAAA,EACAC,SAAAL,OAAAR,GACAc,QAAA,EACAC,mBACAC,kBAAA,OAGAC,QAfA,WAgBAC,KAAAC,UACAD,KAAAE,eAEAC,SACAC,eADA,SACAC,GACA,SAAAA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A2E,IAA2CE,WAAA,2BAAoC,OAAAzB,EAAAQ,GAAA,KAAAL,EAAA,QAAiCE,YAAA,gBAAAC,OAAmCkD,KAAA,UAAgBA,KAAA,WAAerD,EAAA,aAAkBG,OAAOK,KAAA,SAAeC,IAAKC,MAAA,SAAAC,GAAyBd,EAAArD,eAAA,MAA4BqD,EAAAQ,GAAA,SAAAR,EAAAQ,GAAA,KAAAL,EAAA,aAA8CG,OAAO7B,KAAA,UAAAkC,KAAA,SAAgCC,IAAKC,MAAA,SAAAC,GAAyBd,EAAAjB,0BAA4BiB,EAAAQ,GAAA,sBAE9iMiD,oBCCjB,IAcAC,EAdAC,EAAA,OAcAC,CACAxH,EACA0D,GATA,EAVA,SAAA+D,GACAF,EAAA,SAaA,KAEA,MAUAG,EAAA,QAAAJ,EAAA,oECxBO,SAAmBK,GACxB,OAAOtG,OAAAuG,EAAA,EAAAvG,EACLvB,IAAK,iBACL+H,OAAQ,MACRF,OAAQA,SAIL,SAAwB1H,GAC7B,OAAOoB,OAAAuG,EAAA,EAAAvG,EACLvB,IAAK,mBACL+H,OAAQ,OACR5H,KAAMA,SAIH,SAAwBL,EAAIK,GACjC,OAAOoB,OAAAuG,EAAA,EAAAvG,EACLvB,IAAK,oBAAsBF,EAC3BiI,OAAQ,OACR5H,KAAMA,SAIH,SAAwBL,GAC7B,OAAOyB,OAAAuG,EAAA,EAAAvG,EACLvB,IAAK,oBAAsBF,EAC3BiI,OAAQ,cAIL,WACL,OAAOxG,OAAAuG,EAAA,EAAAvG,EACLvB,IAAK,oBACL+H,OAAQ","file":"static/js/22.35973257612f36365fb8.js","sourcesContent":["<template> \n <div class=\"app-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.nameKeyword\" class=\"input-width\" placeholder=\"资源名称\" clearable></el-input>\n </el-form-item>\n <el-form-item label=\"资源路径:\">\n <el-input v-model=\"listQuery.urlKeyword\" class=\"input-width\" placeholder=\"资源路径\" clearable></el-input>\n </el-form-item>\n <el-form-item label=\"资源分类:\">\n <el-select v-model=\"listQuery.categoryId\" placeholder=\"全部\" clearable class=\"input-width\">\n <el-option v-for=\"item in categoryOptions\"\n :key=\"item.value\"\n :label=\"item.label\"\n :value=\"item.value\">\n </el-option>\n </el-select>\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-button size=\"mini\" class=\"btn-add\" @click=\"handleShowCategory()\">资源分类</el-button>\n </el-card>\n <div class=\"table-container\">\n <el-table ref=\"resourceTable\"\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.name}}</template>\n </el-table-column>\n <el-table-column label=\"资源路径\" align=\"center\">\n <template slot-scope=\"scope\">{{scope.row.url}}</template>\n </el-table-column>\n <el-table-column label=\"描述\" align=\"center\">\n <template slot-scope=\"scope\">{{scope.row.description}}</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=\"140\" align=\"center\">\n <template slot-scope=\"scope\">\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=\"resource\"\n ref=\"resourceForm\"\n label-width=\"150px\" size=\"small\">\n <el-form-item label=\"资源名称:\">\n <el-input v-model=\"resource.name\" style=\"width: 250px\"></el-input>\n </el-form-item>\n <el-form-item label=\"资源路径:\">\n <el-input v-model=\"resource.url\" style=\"width: 250px\"></el-input>\n </el-form-item>\n <el-form-item label=\"资源分类:\">\n <el-select v-model=\"resource.categoryId\" placeholder=\"全部\" clearable style=\"width: 250px\">\n <el-option v-for=\"item in categoryOptions\"\n :key=\"item.value\"\n :label=\"item.label\"\n :value=\"item.value\">\n </el-option>\n </el-select>\n </el-form-item>\n <el-form-item label=\"描述:\">\n <el-input v-model=\"resource.description\"\n type=\"textarea\"\n :rows=\"5\"\n style=\"width: 250px\"></el-input>\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 </div>\n</template>\n<script>\n import {fetchList,createResource,updateResource,deleteResource} from '@/api/resource';\n import {listAllCate} from '@/api/resourceCategory';\n import {formatDate} from '@/utils/date';\n\n const defaultListQuery = {\n pageNum: 1,\n pageSize: 10,\n nameKeyword: null,\n urlKeyword: null,\n categoryId:null\n };\n const defaultResource = {\n id: null,\n name: null,\n url: null,\n categoryId: null,\n description:''\n };\n export default {\n name: 'resourceList',\n data() {\n return {\n listQuery: Object.assign({}, defaultListQuery),\n list: null,\n total: null,\n listLoading: false,\n dialogVisible: false,\n resource: Object.assign({}, defaultResource),\n isEdit: false,\n categoryOptions:[],\n defaultCategoryId:null\n }\n },\n created() {\n this.getList();\n this.getCateList();\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.resource = Object.assign({},defaultResource);\n this.resource.categoryId = this.defaultCategoryId;\n },\n handleDelete(index, row) {\n this.$confirm('是否要删除该资源?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(() => {\n deleteResource(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.resource = Object.assign({},row);\n },\n handleDialogConfirm() {\n this.$confirm('是否要确认?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(() => {\n if (this.isEdit) {\n updateResource(this.resource.id,this.resource).then(response => {\n this.$message({\n message: '修改成功!',\n type: 'success'\n });\n this.dialogVisible =false;\n this.getList();\n })\n } else {\n createResource(this.resource).then(response => {\n this.$message({\n message: '添加成功!',\n type: 'success'\n });\n this.dialogVisible =false;\n this.getList();\n })\n }\n })\n },\n handleShowCategory(){\n this.$router.push({path: '/ums/resourceCategory'})\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 getCateList(){\n listAllCate().then(response=>{\n let cateList = response.data;\n for(let i=0;i<cateList.length;i++){\n let cate = cateList[i];\n this.categoryOptions.push({label:cate.name,value:cate.id});\n }\n this.defaultCategoryId=cateList[0].id;\n })\n }\n }\n }\n</script>\n<style></style>\n\n\n\n\n\n// WEBPACK FOOTER //\n// src/views/ums/resource/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.nameKeyword),callback:function ($$v) {_vm.$set(_vm.listQuery, \"nameKeyword\", $$v)},expression:\"listQuery.nameKeyword\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"资源路径:\"}},[_c('el-input',{staticClass:\"input-width\",attrs:{\"placeholder\":\"资源路径\",\"clearable\":\"\"},model:{value:(_vm.listQuery.urlKeyword),callback:function ($$v) {_vm.$set(_vm.listQuery, \"urlKeyword\", $$v)},expression:\"listQuery.urlKeyword\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"资源分类:\"}},[_c('el-select',{staticClass:\"input-width\",attrs:{\"placeholder\":\"全部\",\"clearable\":\"\"},model:{value:(_vm.listQuery.categoryId),callback:function ($$v) {_vm.$set(_vm.listQuery, \"categoryId\", $$v)},expression:\"listQuery.categoryId\"}},_vm._l((_vm.categoryOptions),function(item){return _c('el-option',{key:item.value,attrs:{\"label\":item.label,\"value\":item.value}})}))],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('el-button',{staticClass:\"btn-add\",staticStyle:{\"margin-left\":\"20px\"},attrs:{\"size\":\"mini\"},on:{\"click\":function($event){_vm.handleAdd()}}},[_vm._v(\"添加\")]),_vm._v(\" \"),_c('el-button',{staticClass:\"btn-add\",attrs:{\"size\":\"mini\"},on:{\"click\":function($event){_vm.handleShowCategory()}}},[_vm._v(\"资源分类\")])],1),_vm._v(\" \"),_c('div',{staticClass:\"table-container\"},[_c('el-table',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.listLoading),expression:\"listLoading\"}],ref:\"resourceTable\",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.name))]}}])}),_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.url))]}}])}),_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.description))]}}])}),_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\":\"140\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_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:\"resourceForm\",attrs:{\"model\":_vm.resource,\"label-width\":\"150px\",\"size\":\"small\"}},[_c('el-form-item',{attrs:{\"label\":\"资源名称:\"}},[_c('el-input',{staticStyle:{\"width\":\"250px\"},model:{value:(_vm.resource.name),callback:function ($$v) {_vm.$set(_vm.resource, \"name\", $$v)},expression:\"resource.name\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"资源路径:\"}},[_c('el-input',{staticStyle:{\"width\":\"250px\"},model:{value:(_vm.resource.url),callback:function ($$v) {_vm.$set(_vm.resource, \"url\", $$v)},expression:\"resource.url\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"资源分类:\"}},[_c('el-select',{staticStyle:{\"width\":\"250px\"},attrs:{\"placeholder\":\"全部\",\"clearable\":\"\"},model:{value:(_vm.resource.categoryId),callback:function ($$v) {_vm.$set(_vm.resource, \"categoryId\", $$v)},expression:\"resource.categoryId\"}},_vm._l((_vm.categoryOptions),function(item){return _c('el-option',{key:item.value,attrs:{\"label\":item.label,\"value\":item.value}})}))],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"描述:\"}},[_c('el-input',{staticStyle:{\"width\":\"250px\"},attrs:{\"type\":\"textarea\",\"rows\":5},model:{value:(_vm.resource.description),callback:function ($$v) {_vm.$set(_vm.resource, \"description\", $$v)},expression:\"resource.description\"}})],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)],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-3efade7f\",\"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/resource/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-3efade7f\\\",\\\"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-3efade7f\\\",\\\"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/resource/index.vue\n// module id = null\n// module chunks = ","import request from '@/utils/request'\n\nexport function fetchList(params) {\n return request({\n url: '/resource/list',\n method: 'get',\n params: params\n })\n}\n\nexport function createResource(data) {\n return request({\n url: '/resource/create',\n method: 'post',\n data: data\n })\n}\n\nexport function updateResource(id, data) {\n return request({\n url: '/resource/update/' + id,\n method: 'post',\n data: data\n })\n}\n\nexport function deleteResource(id) {\n return request({\n url: '/resource/delete/' + id,\n method: 'post'\n })\n}\n\nexport function fetchAllResourceList() {\n return request({\n url: '/resource/listAll',\n method: 'get'\n })\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/api/resource.js"],"sourceRoot":""}