1 |
- {"remainingRequest":"D:\\jiayue\\cemp-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jiayue\\cemp-ui\\src\\views\\gen\\form.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jiayue\\cemp-ui\\src\\views\\gen\\form.vue","mtime":1619070292893},{"path":"D:\\jiayue\\cemp-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jiayue\\cemp-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jiayue\\cemp-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jiayue\\cemp-ui\\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\nimport {addObj, delObj, fetchList, putObj} from '@/api/gen/form'\nimport {tableOption} from '@/const/crud/gen/form'\nimport {mapGetters} from 'vuex'\n\nexport default {\n name: 'genForm',\n data() {\n return {\n searchForm: {},\n tableData: [],\n page: {\n total: 0, // 总页数\n currentPage: 1, // 当前页数\n pageSize: 20 // 每页显示多少条\n },\n tableLoading: false,\n tableOption: tableOption\n }\n },\n computed: {\n ...mapGetters(['permissions']),\n permissionList() {\n return {\n addBtn: this.vaildData(this.permissions.gen_form_add, false),\n delBtn: this.vaildData(this.permissions.gen_form_del, false),\n editBtn: this.vaildData(this.permissions.gen_form_edit, false)\n };\n }\n },\n methods: {\n getList(page, params) {\n this.tableLoading = true\n fetchList(Object.assign({\n descs: 'create_time',\n current: page.currentPage,\n size: page.pageSize\n }, params, this.searchForm)).then(response => {\n this.tableData = response.data.data.records\n this.page.total = response.data.data.total\n this.tableLoading = false\n }).catch(() => {\n this.tableLoading = false\n })\n },\n rowDel: function (row, index) {\n var _this = this\n this.$confirm('是否确认删除ID为' + row.id, '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n return delObj(row.id)\n }).then(data => {\n this.$message.success('删除成功')\n this.getList(this.page)\n })\n },\n handleUpdate: function (row, index, done, loading) {\n putObj(row).then(data => {\n this.$message.success('修改成功')\n done()\n this.getList(this.page)\n }).catch(() => {\n loading();\n });\n },\n handleSave: function (row, done, loading) {\n addObj(row).then(data => {\n this.$message.success('添加成功')\n done()\n this.getList(this.page)\n }).catch(() => {\n loading();\n });\n },\n searchChange(form, done) {\n this.searchForm = form\n this.getList(this.page, form)\n done()\n },\n sizeChange(pageSize){\n this.page.pageSize = pageSize\n },\n currentChange(current){\n this.page.currentPage = current\n },\n refreshChange() {\n this.getList(this.page)\n }\n }\n}\n",{"version":3,"sources":["form.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"form.vue","sourceRoot":"src/views/gen","sourcesContent":["<!--\r\n - Copyright (c) 2018-2025, test All rights reserved.\r\n -\r\n - Redistribution and use in source and binary forms, with or without\r\n - modification, are permitted provided that the following conditions are met:\r\n -\r\n - Redistributions of source code must retain the above copyright notice,\r\n - this list of conditions and the following disclaimer.\r\n - Redistributions in binary form must reproduce the above copyright\r\n - notice, this list of conditions and the following disclaimer in the\r\n - documentation and/or other materials provided with the distribution.\r\n - Neither the name of the pig4cloud.com developer nor the names of its\r\n - contributors may be used to endorse or promote products derived from\r\n - this software without specific prior written permission.\r\n - Author: test\r\n -->\r\n<template>\r\n <div class=\"execution\">\r\n <basic-container>\r\n <avue-crud ref=\"crud\"\r\n :page.sync=\"page\"\r\n :data=\"tableData\"\r\n :permission=\"permissionList\"\r\n :table-loading=\"tableLoading\"\r\n :option=\"tableOption\"\r\n @on-load=\"getList\"\r\n @search-change=\"searchChange\"\r\n @refresh-change=\"refreshChange\"\r\n @size-change=\"sizeChange\"\r\n @current-change=\"currentChange\"\r\n @row-update=\"handleUpdate\"\r\n @row-save=\"handleSave\"\r\n @row-del=\"rowDel\">\r\n </avue-crud>\r\n </basic-container>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n import {addObj, delObj, fetchList, putObj} from '@/api/gen/form'\r\n import {tableOption} from '@/const/crud/gen/form'\r\n import {mapGetters} from 'vuex'\r\n\r\n export default {\r\n name: 'genForm',\r\n data() {\r\n return {\r\n searchForm: {},\r\n tableData: [],\r\n page: {\r\n total: 0, // 总页数\r\n currentPage: 1, // 当前页数\r\n pageSize: 20 // 每页显示多少条\r\n },\r\n tableLoading: false,\r\n tableOption: tableOption\r\n }\r\n },\r\n computed: {\r\n ...mapGetters(['permissions']),\r\n permissionList() {\r\n return {\r\n addBtn: this.vaildData(this.permissions.gen_form_add, false),\r\n delBtn: this.vaildData(this.permissions.gen_form_del, false),\r\n editBtn: this.vaildData(this.permissions.gen_form_edit, false)\r\n };\r\n }\r\n },\r\n methods: {\r\n getList(page, params) {\r\n this.tableLoading = true\r\n fetchList(Object.assign({\r\n descs: 'create_time',\r\n current: page.currentPage,\r\n size: page.pageSize\r\n }, params, this.searchForm)).then(response => {\r\n this.tableData = response.data.data.records\r\n this.page.total = response.data.data.total\r\n this.tableLoading = false\r\n }).catch(() => {\r\n this.tableLoading = false\r\n })\r\n },\r\n rowDel: function (row, index) {\r\n var _this = this\r\n this.$confirm('是否确认删除ID为' + row.id, '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(function () {\r\n return delObj(row.id)\r\n }).then(data => {\r\n this.$message.success('删除成功')\r\n this.getList(this.page)\r\n })\r\n },\r\n handleUpdate: function (row, index, done, loading) {\r\n putObj(row).then(data => {\r\n this.$message.success('修改成功')\r\n done()\r\n this.getList(this.page)\r\n }).catch(() => {\r\n loading();\r\n });\r\n },\r\n handleSave: function (row, done, loading) {\r\n addObj(row).then(data => {\r\n this.$message.success('添加成功')\r\n done()\r\n this.getList(this.page)\r\n }).catch(() => {\r\n loading();\r\n });\r\n },\r\n searchChange(form, done) {\r\n this.searchForm = form\r\n this.getList(this.page, form)\r\n done()\r\n },\r\n sizeChange(pageSize){\r\n this.page.pageSize = pageSize\r\n },\r\n currentChange(current){\r\n this.page.currentPage = current\r\n },\r\n refreshChange() {\r\n this.getList(this.page)\r\n }\r\n }\r\n }\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n</style>\r\n"]}]}
|