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

1 line
16 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\\config\\index.vue?vue&type=style&index=0&id=4d0d62fb&scoped=true&lang=css","dependencies":[{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\src\\views\\system\\config\\index.vue","mtime":1787567871654},{"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:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo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"index.vue","sourceRoot":"src/views/system/config","sourcesContent":["<template>\r\n <div class=\"app-container system-config\">\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=\"configName\">\r\n <el-input\r\n v-model=\"queryParams.configName\"\r\n placeholder=\"请输入参数名称\"\r\n clearable\r\n style=\"width: 240px\"\r\n @keyup.enter.native=\"handleQuery\"\r\n />\r\n </el-form-item>\r\n <el-form-item label=\"参数键名\" prop=\"configKey\">\r\n <el-input\r\n v-model=\"queryParams.configKey\"\r\n placeholder=\"请输入参数键名\"\r\n clearable\r\n style=\"width: 240px\"\r\n @keyup.enter.native=\"handleQuery\"\r\n />\r\n </el-form-item>\r\n <el-form-item label=\"系统内置\" prop=\"configType\">\r\n <el-select v-model=\"queryParams.configType\" placeholder=\"系统内置\" clearable>\r\n <el-option\r\n v-for=\"dict in dict.type.sys_yes_no\"\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 label=\"创建时间\">\r\n <el-date-picker\r\n v-model=\"dateRange\"\r\n style=\"width: 240px\"\r\n value-format=\"yyyy-MM-dd\"\r\n type=\"daterange\"\r\n range-separator=\"-\"\r\n start-placeholder=\"开始日期\"\r\n end-placeholder=\"结束日期\"\r\n ></el-date-picker>\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:config: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:config: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:config: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:config:export']\"\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-refresh\"\r\n size=\"mini\"\r\n @click=\"handleRefreshCache\"\r\n v-hasPermi=\"['system:config:remove']\"\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=\"configList\" :height=\"tableHeight\" @selection-change=\"handleSelectionChange\">\r\n <el-table-column type=\"selection\" width=\"55\" align=\"center\" />\r\n <el-table-column label=\"参数主键\" align=\"center\" prop=\"configId\" />\r\n <el-table-column label=\"参数名称\" align=\"center\" prop=\"configName\" :show-overflow-tooltip=\"true\" />\r\n <el-table-column label=\"参数键名\" align=\"center\" prop=\"configKey\" :show-overflow-tooltip=\"true\" />\r\n <el-table-column label=\"参数键值\" align=\"center\" prop=\"configValue\" :show-overflow-tooltip=\"true\" />\r\n <el-table-column label=\"系统内置\" align=\"center\" prop=\"configType\">\r\n <template slot-scope=\"scope\">\r\n <dict-tag :options=\"dict.type.sys_yes_no\" :value=\"scope.row.configType\"/>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"备注\" align=\"center\" prop=\"remark\" :show-overflow-tooltip=\"true\" />\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:config: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:config: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=\"configName\">\r\n <el-input v-model=\"form.configName\" placeholder=\"请输入参数名称\" />\r\n </el-form-item>\r\n <el-form-item label=\"参数键名\" prop=\"configKey\">\r\n <el-input v-model=\"form.configKey\" placeholder=\"请输入参数键名\" />\r\n </el-form-item>\r\n <el-form-item label=\"参数键值\" prop=\"configValue\">\r\n <el-input v-model=\"form.configValue\" type=\"textarea\" placeholder=\"请输入参数键值\" />\r\n </el-form-item>\r\n <el-form-item label=\"系统内置\" prop=\"configType\">\r\n <el-radio-group v-model=\"form.configType\">\r\n <el-radio\r\n v-for=\"dict in dict.type.sys_yes_no\"\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 { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from \"@/api/system/config\"\r\n\r\nexport default {\r\n name: \"Config\",\r\n dicts: ['sys_yes_no'],\r\n data() {\r\n return {\r\n // 遮罩层\r\n loading: true,\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 tableHeight: window.innerHeight - 240,\r\n // 总条数\r\n total: 0,\r\n // 参数表格数据\r\n configList: [],\r\n // 弹出层标题\r\n title: \"\",\r\n // 是否显示弹出层\r\n open: false,\r\n // 日期范围\r\n dateRange: [],\r\n // 查询参数\r\n queryParams: {\r\n pageNum: 1,\r\n pageSize: 10,\r\n configName: undefined,\r\n configKey: undefined,\r\n configType: undefined\r\n },\r\n // 表单参数\r\n form: {},\r\n // 表单校验\r\n rules: {\r\n configName: [\r\n { required: true, message: \"参数名称不能为空\", trigger: \"blur\" }\r\n ],\r\n configKey: [\r\n { required: true, message: \"参数键名不能为空\", trigger: \"blur\" }\r\n ],\r\n configValue: [\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 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 listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {\r\n this.configList = response.rows\r\n this.total = response.total\r\n this.loading = false\r\n }\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 configId: undefined,\r\n configName: undefined,\r\n configKey: undefined,\r\n configValue: undefined,\r\n configType: \"Y\",\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.dateRange = []\r\n this.resetForm(\"queryForm\")\r\n this.handleQuery()\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 handleSelectionChange(selection) {\r\n this.ids = selection.map(item => item.configId)\r\n this.single = selection.length != 1\r\n this.multiple = !selection.length\r\n },\r\n /** 修改按钮操作 */\r\n handleUpdate(row) {\r\n this.reset()\r\n const configId = row.configId || this.ids\r\n getConfig(configId).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.configId != undefined) {\r\n updateConfig(this.form).then(() => {\r\n this.$modal.msgSuccess(\"修改成功\")\r\n this.open = false\r\n this.getList()\r\n })\r\n } else {\r\n addConfig(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 configIds = row.configId || this.ids\r\n this.$modal.confirm('是否确认删除参数编号为\"' + configIds + '\"的数据项?').then(function() {\r\n return delConfig(configIds)\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/config/export', {\r\n ...this.queryParams\r\n }, `config_${new Date().getTime()}.xlsx`)\r\n },\r\n /** 刷新缓存按钮操作 */\r\n handleRefreshCache() {\r\n refreshCache().then(() => {\r\n this.$modal.msgSuccess(\"刷新成功\")\r\n })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.system-config ::v-deep .el-table ::-webkit-scrollbar {\r\n display: none;\r\n}\r\n.system-config ::v-deep .el-table {\r\n scrollbar-width: none;\r\n -ms-overflow-style: none;\r\n}\r\n.system-config ::v-deep .el-table__body-wrapper::-webkit-scrollbar {\r\n display: none;\r\n}\r\n.system-config ::v-deep .el-table__body-wrapper {\r\n scrollbar-width: none;\r\n -ms-overflow-style: none;\r\n}\r\n</style>\r\n"]}]}