Files
education/frontend/node_modules/.cache/vue-loader/2e565518f82fcb8bbf2d2bfa8039aa40.json
T

1 line
14 KiB
JSON

{"remainingRequest":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\Admin\\Desktop\\education\\frontend\\src\\views\\system\\post\\index.vue?vue&type=style&index=0&id=e95feb4e&scoped=true&lang=css","dependencies":[{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\src\\views\\system\\post\\index.vue","mtime":1787567871664},{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\css-loader\\dist\\cjs.js","mtime":1787309792478},{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":1787309794547},{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\postcss-loader\\src\\index.js","mtime":1787309793084},{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1787309791955},{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\node_modules\\vue-loader\\lib\\index.js","mtime":1787309793790}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKDQouc3lzdGVtLXBvc3QgOjp2LWRlZXAgLmVsLXRhYmxlIDo6LXdlYmtpdC1zY3JvbGxiYXIgew0KICBkaXNwbGF5OiBub25lOw0KfQ0KLnN5c3RlbS1wb3N0IDo6di1kZWVwIC5lbC10YWJsZSB7DQogIHNjcm9sbGJhci13aWR0aDogbm9uZTsNCiAgLW1zLW92ZXJmbG93LXN0eWxlOiBub25lOw0KfQ0KLnN5c3RlbS1wb3N0IDo6di1kZWVwIC5lbC10YWJsZV9fYm9keS13cmFwcGVyOjotd2Via2l0LXNjcm9sbGJhciB7DQogIGRpc3BsYXk6IG5vbmU7DQp9DQouc3lzdGVtLXBvc3QgOjp2LWRlZXAgLmVsLXRhYmxlX19ib2R5LXdyYXBwZXIgew0KICBzY3JvbGxiYXItd2lkdGg6IG5vbmU7DQogIC1tcy1vdmVyZmxvdy1zdHlsZTogbm9uZTsNCn0NCg=="},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/views/system/post","sourcesContent":["<template>\r\n <div class=\"app-container system-post\">\r\n <el-form :model=\"queryParams\" ref=\"queryForm\" size=\"small\" :inline=\"true\" v-show=\"showSearch\" label-width=\"68px\">\r\n <el-form-item label=\"岗位编码\" prop=\"postCode\">\r\n <el-input\r\n v-model=\"queryParams.postCode\"\r\n placeholder=\"请输入岗位编码\"\r\n clearable\r\n @keyup.enter.native=\"handleQuery\"\r\n />\r\n </el-form-item>\r\n <el-form-item label=\"岗位名称\" prop=\"postName\">\r\n <el-input\r\n v-model=\"queryParams.postName\"\r\n placeholder=\"请输入岗位名称\"\r\n clearable\r\n @keyup.enter.native=\"handleQuery\"\r\n />\r\n </el-form-item>\r\n <el-form-item label=\"状态\" prop=\"status\">\r\n <el-select v-model=\"queryParams.status\" placeholder=\"岗位状态\" clearable>\r\n <el-option\r\n v-for=\"dict in dict.type.sys_normal_disable\"\r\n :key=\"dict.value\"\r\n :label=\"dict.label\"\r\n :value=\"dict.value\"\r\n />\r\n </el-select>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"primary\" icon=\"el-icon-search\" size=\"mini\" @click=\"handleQuery\">搜索</el-button>\r\n <el-button icon=\"el-icon-refresh\" size=\"mini\" @click=\"resetQuery\">重置</el-button>\r\n </el-form-item>\r\n </el-form>\r\n\r\n <el-row :gutter=\"10\" class=\"mb8\">\r\n <el-col :span=\"1.5\">\r\n <el-button\r\n type=\"primary\"\r\n plain\r\n icon=\"el-icon-plus\"\r\n size=\"mini\"\r\n @click=\"handleAdd\"\r\n v-hasPermi=\"['system:post:add']\"\r\n >新增</el-button>\r\n </el-col>\r\n <el-col :span=\"1.5\">\r\n <el-button\r\n type=\"success\"\r\n plain\r\n icon=\"el-icon-edit\"\r\n size=\"mini\"\r\n :disabled=\"single\"\r\n @click=\"handleUpdate\"\r\n v-hasPermi=\"['system:post:edit']\"\r\n >修改</el-button>\r\n </el-col>\r\n <el-col :span=\"1.5\">\r\n <el-button\r\n type=\"danger\"\r\n plain\r\n icon=\"el-icon-delete\"\r\n size=\"mini\"\r\n :disabled=\"multiple\"\r\n @click=\"handleDelete\"\r\n v-hasPermi=\"['system:post:remove']\"\r\n >删除</el-button>\r\n </el-col>\r\n <el-col :span=\"1.5\">\r\n <el-button\r\n type=\"warning\"\r\n plain\r\n icon=\"el-icon-download\"\r\n size=\"mini\"\r\n @click=\"handleExport\"\r\n v-hasPermi=\"['system:post:export']\"\r\n >导出</el-button>\r\n </el-col>\r\n <right-toolbar :showSearch.sync=\"showSearch\" @queryTable=\"getList\"></right-toolbar>\r\n </el-row>\r\n\r\n <el-table v-loading=\"loading\" :data=\"postList\" @selection-change=\"handleSelectionChange\" :height=\"tableHeight\">\r\n <el-table-column type=\"selection\" width=\"55\" align=\"center\" />\r\n <el-table-column label=\"岗位编号\" align=\"center\" prop=\"postId\" />\r\n <el-table-column label=\"岗位编码\" align=\"center\" prop=\"postCode\" />\r\n <el-table-column label=\"岗位名称\" align=\"center\" prop=\"postName\" />\r\n <el-table-column label=\"岗位排序\" align=\"center\" prop=\"postSort\" />\r\n <el-table-column label=\"状态\" align=\"center\" prop=\"status\">\r\n <template slot-scope=\"scope\">\r\n <dict-tag :options=\"dict.type.sys_normal_disable\" :value=\"scope.row.status\"/>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"创建时间\" align=\"center\" prop=\"createTime\" width=\"180\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ parseTime(scope.row.createTime) }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"操作\" align=\"center\" class-name=\"small-padding fixed-width\">\r\n <template slot-scope=\"scope\">\r\n <el-button\r\n size=\"mini\"\r\n type=\"text\"\r\n icon=\"el-icon-edit\"\r\n @click=\"handleUpdate(scope.row)\"\r\n v-hasPermi=\"['system:post:edit']\"\r\n >修改</el-button>\r\n <el-button\r\n size=\"mini\"\r\n type=\"text\"\r\n icon=\"el-icon-delete\"\r\n @click=\"handleDelete(scope.row)\"\r\n v-hasPermi=\"['system:post:remove']\"\r\n >删除</el-button>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n\r\n <pagination\r\n v-show=\"total>0\"\r\n :total=\"total\"\r\n :page.sync=\"queryParams.pageNum\"\r\n :limit.sync=\"queryParams.pageSize\"\r\n @pagination=\"getList\"\r\n />\r\n\r\n <!-- 添加或修改岗位对话框 -->\r\n <el-dialog :title=\"title\" :visible.sync=\"open\" width=\"500px\" append-to-body>\r\n <el-form ref=\"form\" :model=\"form\" :rules=\"rules\" label-width=\"80px\">\r\n <el-form-item label=\"岗位名称\" prop=\"postName\">\r\n <el-input v-model=\"form.postName\" placeholder=\"请输入岗位名称\" />\r\n </el-form-item>\r\n <el-form-item label=\"岗位编码\" prop=\"postCode\">\r\n <el-input v-model=\"form.postCode\" placeholder=\"请输入编码名称\" />\r\n </el-form-item>\r\n <el-form-item label=\"岗位顺序\" prop=\"postSort\">\r\n <el-input-number v-model=\"form.postSort\" controls-position=\"right\" :min=\"0\" />\r\n </el-form-item>\r\n <el-form-item label=\"岗位状态\" prop=\"status\">\r\n <el-radio-group v-model=\"form.status\">\r\n <el-radio\r\n v-for=\"dict in dict.type.sys_normal_disable\"\r\n :key=\"dict.value\"\r\n :label=\"dict.value\"\r\n >{{dict.label}}</el-radio>\r\n </el-radio-group>\r\n </el-form-item>\r\n <el-form-item label=\"备注\" prop=\"remark\">\r\n <el-input v-model=\"form.remark\" type=\"textarea\" placeholder=\"请输入内容\" />\r\n </el-form-item>\r\n </el-form>\r\n <div slot=\"footer\" class=\"dialog-footer\">\r\n <el-button type=\"primary\" @click=\"submitForm\">确 定</el-button>\r\n <el-button @click=\"cancel\">取 消</el-button>\r\n </div>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { listPost, getPost, delPost, addPost, updatePost } from \"@/api/system/post\"\r\n\r\nexport default {\r\n name: \"Post\",\r\n dicts: ['sys_normal_disable'],\r\n data() {\r\n return {\r\n // 遮罩层\r\n loading: true,\r\n // 表格高度\r\n tableHeight: window.innerHeight - 240,\r\n // 选中数组\r\n ids: [],\r\n // 非单个禁用\r\n single: true,\r\n // 非多个禁用\r\n multiple: true,\r\n // 显示搜索条件\r\n showSearch: true,\r\n // 总条数\r\n total: 0,\r\n // 岗位表格数据\r\n postList: [],\r\n // 弹出层标题\r\n title: \"\",\r\n // 是否显示弹出层\r\n open: false,\r\n // 查询参数\r\n queryParams: {\r\n pageNum: 1,\r\n pageSize: 10,\r\n postCode: undefined,\r\n postName: undefined,\r\n status: undefined\r\n },\r\n // 表单参数\r\n form: {},\r\n // 表单校验\r\n rules: {\r\n postName: [\r\n { required: true, message: \"岗位名称不能为空\", trigger: \"blur\" }\r\n ],\r\n postCode: [\r\n { required: true, message: \"岗位编码不能为空\", trigger: \"blur\" }\r\n ],\r\n postSort: [\r\n { required: true, message: \"岗位顺序不能为空\", trigger: \"blur\" }\r\n ]\r\n }\r\n }\r\n },\r\n created() {\r\n this.getList()\r\n },\r\n mounted() {\r\n this.getTableHeight()\r\n window.addEventListener('resize', this.getTableHeight)\r\n },\r\n beforeDestroy() {\r\n window.removeEventListener('resize', this.getTableHeight)\r\n },\r\n watch: {\r\n showSearch() {\r\n this.$nextTick(() => {\r\n this.getTableHeight()\r\n })\r\n }\r\n },\r\n methods: {\r\n /** 获取表格高度 */\r\n getTableHeight() {\r\n const offset = this.showSearch ? 240 : 190\r\n this.tableHeight = window.innerHeight - offset\r\n },\r\n /** 查询岗位列表 */\r\n getList() {\r\n this.loading = true\r\n listPost(this.queryParams).then(response => {\r\n this.postList = response.rows\r\n this.total = response.total\r\n this.loading = false\r\n })\r\n },\r\n // 取消按钮\r\n cancel() {\r\n this.open = false\r\n this.reset()\r\n },\r\n // 表单重置\r\n reset() {\r\n this.form = {\r\n postId: undefined,\r\n postCode: undefined,\r\n postName: undefined,\r\n postSort: 0,\r\n status: \"0\",\r\n remark: undefined\r\n }\r\n this.resetForm(\"form\")\r\n },\r\n /** 搜索按钮操作 */\r\n handleQuery() {\r\n this.queryParams.pageNum = 1\r\n this.getList()\r\n },\r\n /** 重置按钮操作 */\r\n resetQuery() {\r\n this.resetForm(\"queryForm\")\r\n this.handleQuery()\r\n },\r\n // 多选框选中数据\r\n handleSelectionChange(selection) {\r\n this.ids = selection.map(item => item.postId)\r\n this.single = selection.length != 1\r\n this.multiple = !selection.length\r\n },\r\n /** 新增按钮操作 */\r\n handleAdd() {\r\n this.reset()\r\n this.open = true\r\n this.title = \"添加岗位\"\r\n },\r\n /** 修改按钮操作 */\r\n handleUpdate(row) {\r\n this.reset()\r\n const postId = row.postId || this.ids\r\n getPost(postId).then(response => {\r\n this.form = response.data\r\n this.open = true\r\n this.title = \"修改岗位\"\r\n })\r\n },\r\n /** 提交按钮 */\r\n submitForm() {\r\n this.$refs[\"form\"].validate(valid => {\r\n if (valid) {\r\n if (this.form.postId != undefined) {\r\n updatePost(this.form).then(() => {\r\n this.$modal.msgSuccess(\"修改成功\")\r\n this.open = false\r\n this.getList()\r\n })\r\n } else {\r\n addPost(this.form).then(() => {\r\n this.$modal.msgSuccess(\"新增成功\")\r\n this.open = false\r\n this.getList()\r\n })\r\n }\r\n }\r\n })\r\n },\r\n /** 删除按钮操作 */\r\n handleDelete(row) {\r\n const postIds = row.postId || this.ids\r\n this.$modal.confirm('是否确认删除岗位编号为\"' + postIds + '\"的数据项?').then(function() {\r\n return delPost(postIds)\r\n }).then(() => {\r\n this.getList()\r\n this.$modal.msgSuccess(\"删除成功\")\r\n }).catch(() => {})\r\n },\r\n /** 导出按钮操作 */\r\n handleExport() {\r\n this.download('system/post/export', {\r\n ...this.queryParams\r\n }, `post_${new Date().getTime()}.xlsx`)\r\n }\r\n }\r\n}\r\n</script>\r\n<style scoped>\r\n.system-post ::v-deep .el-table ::-webkit-scrollbar {\r\n display: none;\r\n}\r\n.system-post ::v-deep .el-table {\r\n scrollbar-width: none;\r\n -ms-overflow-style: none;\r\n}\r\n.system-post ::v-deep .el-table__body-wrapper::-webkit-scrollbar {\r\n display: none;\r\n}\r\n.system-post ::v-deep .el-table__body-wrapper {\r\n scrollbar-width: none;\r\n -ms-overflow-style: none;\r\n}\r\n</style>\r\n"]}]}