Files
education/frontend/node_modules/.cache/vue-loader/c1a3f5ca717157e7b305b755463fac93.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\\dict\\index.vue?vue&type=style&index=0&id=3a83cc22&scoped=true&lang=css","dependencies":[{"path":"C:\\Users\\Admin\\Desktop\\education\\frontend\\src\\views\\system\\dict\\index.vue","mtime":1787567871659},{"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:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKC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;AA6YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/views/system/dict","sourcesContent":["<template>\r\n <div class=\"app-container system-dict\">\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=\"dictName\">\r\n <el-input\r\n v-model=\"queryParams.dictName\"\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=\"dictType\">\r\n <el-input\r\n v-model=\"queryParams.dictType\"\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=\"status\">\r\n <el-select\r\n v-model=\"queryParams.status\"\r\n placeholder=\"字典状态\"\r\n clearable\r\n style=\"width: 240px\"\r\n >\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 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:dict: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:dict: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:dict: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:dict: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:dict: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=\"typeList\" :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=\"dictId\" />\r\n <el-table-column label=\"字典名称\" align=\"center\" prop=\"dictName\" :show-overflow-tooltip=\"true\" />\r\n <el-table-column label=\"字典类型\" align=\"center\" :show-overflow-tooltip=\"true\">\r\n <template slot-scope=\"scope\">\r\n <a class=\"link-type\" style=\"cursor:pointer\" @click=\"handleViewData(scope.row)\">{{ scope.row.dictType }}</a>\r\n </template>\r\n </el-table-column>\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=\"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:dict:edit']\"\r\n >修改</el-button>\r\n <el-button\r\n size=\"mini\"\r\n type=\"text\"\r\n icon=\"el-icon-s-operation\"\r\n @click=\"handleDataList(scope.row)\"\r\n v-hasPermi=\"['system:dict: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:dict: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=\"100px\">\r\n <el-form-item label=\"字典名称\" prop=\"dictName\">\r\n <el-input v-model=\"form.dictName\" placeholder=\"请输入字典名称\" />\r\n </el-form-item>\r\n <el-form-item prop=\"dictType\">\r\n <el-input v-model=\"form.dictType\" placeholder=\"请输入字典类型\" maxlength=\"100\" />\r\n <span slot=\"label\">\r\n <el-tooltip content=\"数据存储中的Key值,如:sys_user_sex\" placement=\"top\">\r\n <i class=\"el-icon-question\"></i>\r\n </el-tooltip>\r\n 字典类型\r\n </span>\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=\"请输入内容\"></el-input>\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\r\n <dict-data-drawer :visible.sync=\"drawerVisible\" :row=\"drawerRow\" />\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport DictDataDrawer from './detail'\r\nimport { listType, getType, delType, addType, updateType, refreshCache } from \"@/api/system/dict/type\"\r\n\r\nexport default {\r\n name: \"Dict\",\r\n components: { DictDataDrawer },\r\n dicts: ['sys_normal_disable'],\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 typeList: [],\r\n // 弹出层标题\r\n title: \"\",\r\n // 是否显示弹出层\r\n open: false,\r\n // 字典数据抽屉状态\r\n drawerVisible: false,\r\n // 字典数据信息\r\n drawerRow: {},\r\n // 日期范围\r\n dateRange: [],\r\n // 查询参数\r\n queryParams: {\r\n pageNum: 1,\r\n pageSize: 10,\r\n dictName: undefined,\r\n dictType: undefined,\r\n status: undefined\r\n },\r\n // 表单参数\r\n form: {},\r\n // 表单校验\r\n rules: {\r\n dictName: [\r\n { required: true, message: \"字典名称不能为空\", trigger: \"blur\" }\r\n ],\r\n dictType: [\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 listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {\r\n this.typeList = 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 dictId: undefined,\r\n dictName: undefined,\r\n dictType: undefined,\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.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.dictId)\r\n this.single = selection.length != 1\r\n this.multiple = !selection.length\r\n },\r\n /** 字典数据抽屉显示信息 */\r\n handleViewData(row) {\r\n this.drawerRow = row\r\n this.drawerVisible = true\r\n },\r\n /** 字典数据列表页面 */\r\n handleDataList(row) {\r\n this.$tab.openPage(\"字典数据\", '/system/dict-data/index/' + row.dictId)\r\n },\r\n /** 修改按钮操作 */\r\n handleUpdate(row) {\r\n this.reset()\r\n const dictId = row.dictId || this.ids\r\n getType(dictId).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.dictId != undefined) {\r\n updateType(this.form).then(() => {\r\n this.$modal.msgSuccess(\"修改成功\")\r\n this.open = false\r\n this.getList()\r\n })\r\n } else {\r\n addType(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 dictIds = row.dictId || this.ids\r\n this.$modal.confirm('是否确认删除字典编号为\"' + dictIds + '\"的数据项?').then(function() {\r\n return delType(dictIds)\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/dict/type/export', {\r\n ...this.queryParams\r\n }, `type_${new Date().getTime()}.xlsx`)\r\n },\r\n /** 刷新缓存按钮操作 */\r\n handleRefreshCache() {\r\n refreshCache().then(() => {\r\n this.$modal.msgSuccess(\"刷新成功\")\r\n this.$store.dispatch('dict/cleanDict')\r\n })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.system-dict ::v-deep .el-table ::-webkit-scrollbar {\r\n display: none;\r\n}\r\n.system-dict ::v-deep .el-table {\r\n scrollbar-width: none;\r\n -ms-overflow-style: none;\r\n}\r\n.system-dict ::v-deep .el-table__body-wrapper::-webkit-scrollbar {\r\n display: none;\r\n}\r\n.system-dict ::v-deep .el-table__body-wrapper {\r\n scrollbar-width: none;\r\n -ms-overflow-style: none;\r\n}\r\n</style>"]}]}