1 line
5.9 KiB
JSON
1 line
5.9 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\test\\index.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\test\\index.vue","mtime":1618452637717},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n name: \"index\",\n data(){\n return {\n dialogFormVisible: false,\n form: {\n name: '',\n no: '',\n },\n formLabelWidth: '120px',\n\n tableData: [],\n }\n },\n\n created() {\n this.selectStudent();\n },\n\n methods:{\n handleEdit(index, row) {\n this.dialogFormVisible = true;\n this.form = row\n // 返回索引index和这一行的数据row\n // console.log(index, row);\n },\n handleDelete(index, row) {\n this.$http.delete('system/student'+\"/\"+row.id).then(data => {\n console.log(data);\n this.dialogFormVisible = false;\n this.selectStudent();\n })\n console.log(index, row);\n },\n\n insertStudent(){\n this.$http.post('system/student', this.form).then(data => {\n console.log(data);\n this.dialogFormVisible = false;\n this.selectStudent();\n })\n },\n selectStudent(){\n this.$http.get('system/student').then(data => {\n console.log(data);\n this.tableData = data.data;\n })\n }\n }\n}\n",{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/views/modules/test","sourcesContent":["<template>\n <div>\n <el-button size=\"mini\" @click=\"dialogFormVisible = true\">新增</el-button>\n <el-dialog title=\"详情\" :visible.sync=\"dialogFormVisible\">\n <el-form :model=\"form\">\n <el-form-item label=\"姓名\" :label-width=\"formLabelWidth\">\n <el-input v-model=\"form.name\" autocomplete=\"off\"></el-input>\n </el-form-item>\n <el-form-item label=\"学号\" :label-width=\"formLabelWidth\">\n <el-input v-model=\"form.no\" autocomplete=\"off\"></el-input>\n </el-form-item>\n </el-form>\n <div slot=\"footer\" class=\"dialog-footer\">\n <el-button @click=\"dialogFormVisible = false\">取 消</el-button>\n <el-button type=\"primary\" @click=\"insertStudent\">确 定</el-button>\n </div>\n </el-dialog>\n\n\n <el-table\n :data=\"tableData\"\n style=\"width: 100%\">\n <el-table-column\n prop=\"id\"\n label=\"ID\"\n width=\"180\">\n </el-table-column>\n <el-table-column\n prop=\"name\"\n label=\"姓名\"\n width=\"180\">\n </el-table-column>\n <el-table-column\n prop=\"no\"\n label=\"学号\">\n </el-table-column>\n\n <el-table-column label=\"操作\">\n <template slot-scope=\"scope\">\n <el-button\n size=\"mini\"\n @click=\"handleEdit(scope.$index, scope.row)\">编辑</el-button>\n <el-button\n size=\"mini\"\n type=\"danger\"\n @click=\"handleDelete(scope.$index, scope.row)\">删除</el-button>\n </template>\n </el-table-column>\n\n </el-table>\n </div>\n</template>\n\n<script>\n export default {\n name: \"index\",\n data(){\n return {\n dialogFormVisible: false,\n form: {\n name: '',\n no: '',\n },\n formLabelWidth: '120px',\n\n tableData: [],\n }\n },\n\n created() {\n this.selectStudent();\n },\n\n methods:{\n handleEdit(index, row) {\n this.dialogFormVisible = true;\n this.form = row\n // 返回索引index和这一行的数据row\n // console.log(index, row);\n },\n handleDelete(index, row) {\n this.$http.delete('system/student'+\"/\"+row.id).then(data => {\n console.log(data);\n this.dialogFormVisible = false;\n this.selectStudent();\n })\n console.log(index, row);\n },\n\n insertStudent(){\n this.$http.post('system/student', this.form).then(data => {\n console.log(data);\n this.dialogFormVisible = false;\n this.selectStudent();\n })\n },\n selectStudent(){\n this.$http.get('system/student').then(data => {\n console.log(data);\n this.tableData = data.data;\n })\n }\n }\n }\n</script>\n\n<style scoped>\n\n</style>\n"]}]} |