1 |
- {"remainingRequest":"C:\\Users\\Administrator\\Desktop\\最新\\supervision-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\Administrator\\Desktop\\最新\\supervision-ui\\src\\views\\system\\cookcategory\\index.vue?vue&type=style&index=0&id=ff1c7f02&scoped=true&lang=css&","dependencies":[{"path":"C:\\Users\\Administrator\\Desktop\\最新\\supervision-ui\\src\\views\\system\\cookcategory\\index.vue","mtime":1647228900895},{"path":"C:\\Users\\Administrator\\Desktop\\最新\\supervision-ui\\node_modules\\css-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\最新\\supervision-ui\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\最新\\supervision-ui\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\最新\\supervision-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\最新\\supervision-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoK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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/views/system/cookcategory","sourcesContent":["<template>\r\n <div class=\"app-container\">\r\n <!-- <el-form :model=\"queryParams\" ref=\"queryForm\" :inline=\"true\" v-show=\"showSearch\" label-width=\"68px\">\r\n <el-form-item label=\"食品分类\" prop=\"typelist\">\r\n <el-select v-model=\"queryParams.typelist\" placeholder=\"请选择食品分类\" clearable size=\"small\">\r\n <el-option\r\n v-for=\"dict in dict.type.food_type\"\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=\"一日三餐\" prop=\"timelist\">\r\n <el-select v-model=\"queryParams.timelist\" placeholder=\"请选择一日三餐\" clearable size=\"small\">\r\n <el-option\r\n v-for=\"dict in dict.type.three_meals\"\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=\"食品名称\" prop=\"name\">\r\n <el-input\r\n v-model=\"queryParams.name\"\r\n placeholder=\"请输入食品名称\"\r\n clearable\r\n size=\"small\"\r\n @keyup.enter.native=\"handleQuery\"\r\n />\r\n </el-form-item>\r\n <el-form-item label=\"添加时间\" prop=\"createtime\">\r\n <el-input\r\n v-model=\"queryParams.createtime\"\r\n placeholder=\"请输入添加时间\"\r\n clearable\r\n size=\"small\"\r\n @keyup.enter.native=\"handleQuery\"\r\n />\r\n </el-form-item>\r\n <el-form-item label=\"修改时间\" prop=\"updatetime\">\r\n <el-input\r\n v-model=\"queryParams.updatetime\"\r\n placeholder=\"请输入修改时间\"\r\n clearable\r\n size=\"small\"\r\n @keyup.enter.native=\"handleQuery\"\r\n />\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:cookcategory:add']\"\r\n >新增</el-button\r\n >\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:cookcategory:edit']\"\r\n >修改</el-button\r\n >\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:cookcategory:remove']\"\r\n >删除</el-button\r\n >\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 :loading=\"exportLoading\"\r\n @click=\"handleExport\"\r\n v-hasPermi=\"['system:cookcategory:export']\"\r\n >导出</el-button\r\n >\r\n </el-col>\r\n <right-toolbar\r\n :showSearch.sync=\"showSearch\"\r\n @queryTable=\"getList\"\r\n ></right-toolbar>\r\n </el-row>\r\n\r\n <el-table\r\n v-loading=\"loading\"\r\n :data=\"cookcategoryList\"\r\n @selection-change=\"handleSelectionChange\"\r\n >\r\n <el-table-column type=\"selection\" width=\"55\" align=\"center\" />\r\n <!-- <el-table-column label=\"修改时间\" align=\"center\" prop=\"id\" /> -->\r\n <el-table-column label=\"食品分类\" align=\"center\" prop=\"typelist\">\r\n <template slot-scope=\"scope\">\r\n <dict-tag\r\n :options=\"dict.type.food_type\"\r\n :value=\"scope.row.typelist\"\r\n />\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"一日三餐\" align=\"center\" prop=\"timelist\">\r\n <template slot-scope=\"scope\">\r\n <dict-tag\r\n :options=\"dict.type.three_meals\"\r\n :value=\"scope.row.timelist\"\r\n />\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"食品名称\" align=\"center\" prop=\"name\" />\r\n <!-- <el-table-column label=\"添加时间\" align=\"center\" prop=\"createtime\" /> -->\r\n <el-table-column label=\"添加时间\" align=\"center\" prop=\"createtime\">\r\n <template slot-scope=\"scope\">\r\n {{ scope.row.createtime | dataFormat }}\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column label=\"修改时间\" align=\"center\" prop=\"updatetime\" />\r\n <el-table-column\r\n label=\"操作\"\r\n align=\"center\"\r\n class-name=\"small-padding fixed-width\"\r\n >\r\n <template slot-scope=\"scope\">\r\n <el-button\r\n size=\"btu\"\r\n type=\"text\"\r\n @click=\"handleUpdate(scope.row)\"\r\n v-hasPermi=\"['system:cookcategory:edit']\"\r\n >修改</el-button\r\n >\r\n <el-button\r\n size=\"btd\"\r\n type=\"text\"\r\n @click=\"handleDelete(scope.row)\"\r\n v-hasPermi=\"['system:cookcategory:remove']\"\r\n >删除</el-button\r\n >\r\n </template></el-table-column\r\n ></el-table\r\n >\r\n </div>\r\n</template>\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=\"typelist\">\r\n <el-select v-model=\"form.typelist\" placeholder=\"请选择食品分类\">\r\n <el-option\r\n v-for=\"dict in dict.type.food_type\"\r\n :key=\"dict.value\"\r\n :label=\"dict.label\"\r\n :value=\"parseInt(dict.value)\"\r\n ></el-option>\r\n </el-select>\r\n </el-form-item>\r\n <el-form-item label=\"一日三餐\" prop=\"timelist\">\r\n <el-select v-model=\"form.timelist\" placeholder=\"请选择一日三餐\">\r\n <el-option\r\n v-for=\"dict in dict.type.three_meals\"\r\n :key=\"dict.value\"\r\n :label=\"dict.label\"\r\n :value=\"parseInt(dict.value)\"\r\n ></el-option>\r\n </el-select>\r\n </el-form-item>\r\n <el-form-item label=\"食品名称\" prop=\"name\">\r\n <el-input v-model=\"form.name\" 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 {\r\n listCookcategory,\r\n getCookcategory,\r\n delCookcategory,\r\n addCookcategory,\r\n updateCookcategory,\r\n exportCookcategory,\r\n} from \"@/api/system/cookcategory\";\r\n\r\nexport default {\r\n name: \"Cookcategory\",\r\n dicts: [\"food_type\", \"three_meals\"],\r\n data() {\r\n return {\r\n // 遮罩层\r\n loading: true,\r\n // 导出遮罩层\r\n exportLoading: false,\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 cookcategoryList: [],\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 typelist: null,\r\n timelist: null,\r\n name: null,\r\n createtime: null,\r\n updatetime: null,\r\n },\r\n // 表单参数\r\n form: {},\r\n // 表单校验\r\n rules: {\r\n typelist: [\r\n { required: true, message: \"食品分类不能为空\", trigger: \"change\" },\r\n ],\r\n timelist: [\r\n { required: true, message: \"一日三餐不能为空\", trigger: \"change\" },\r\n ],\r\n name: [\r\n { required: true, message: \"食品名称不能为空\", trigger: \"blur\" },\r\n ],\r\n createtime: [\r\n { required: true, message: \"添加时间不能为空\", trigger: \"blur\" },\r\n ],\r\n updatetime: [\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 methods: {\r\n /** 查询食品分类列表 */\r\n getList() {\r\n this.loading = true;\r\n listCookcategory(this.queryParams).then((response) => {\r\n this.cookcategoryList = 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 id: null,\r\n typelist: null,\r\n timelist: null,\r\n name: null,\r\n createtime: null,\r\n updatetime: null,\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.id);\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 id = row.id || this.ids;\r\n getCookcategory(id).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.id != null) {\r\n updateCookcategory(this.form).then((response) => {\r\n this.$modal.msgSuccess(\"修改成功\");\r\n this.open = false;\r\n this.getList();\r\n });\r\n } else {\r\n addCookcategory(this.form).then((response) => {\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 ids = row.id || this.ids;\r\n this.$modal\r\n .confirm('是否确认删除食品分类编号为\"' + ids + '\"的数据项?')\r\n .then(function () {\r\n return delCookcategory(ids);\r\n })\r\n .then(() => {\r\n this.getList();\r\n this.$modal.msgSuccess(\"删除成功\");\r\n })\r\n .catch(() => {});\r\n },\r\n /** 导出按钮操作 */\r\n handleExport() {\r\n const queryParams = this.queryParams;\r\n this.$modal\r\n .confirm(\"是否确认导出所有食品分类数据项?\")\r\n .then(() => {\r\n this.exportLoading = true;\r\n return exportCookcategory(queryParams);\r\n })\r\n .then((response) => {\r\n this.$download.name(response.msg);\r\n this.exportLoading = false;\r\n })\r\n .catch(() => {});\r\n },\r\n },\r\n};\r\n</script>\r\n<style scoped>\r\n/* 对话框背景颜色 */\r\n::v-deep .el-dialog {\r\n background: #004d86 !important;\r\n margin: 200px auto !important;\r\n}\r\n::v-deep .el-input__inner {\r\n width: 200px !important;\r\n height: 36px;\r\n background: transparent;\r\n color: #fff !important;\r\n}\r\n::v-deep .el-dialog__title {\r\n line-height: 24px;\r\n font-size: 18px;\r\n color: #fff !important;\r\n}\r\n::v-deep .el-dialog__body {\r\n padding: 30px 100px;\r\n color: #606266;\r\n font-size: 14px;\r\n word-break: break-all;\r\n}\r\n</style>"]}]}
|