1 line
8.5 KiB
JSON
1 line
8.5 KiB
JSON
{"remainingRequest":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\views\\shortcut\\shortcutContent.vue?vue&type=style&index=0&id=2cc126a4&scoped=true&lang=css","dependencies":[{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\views\\shortcut\\shortcutContent.vue","mtime":1718761715722},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\css-loader\\dist\\cjs.js","mtime":1718764958140},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":1718764960674},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\postcss-loader\\src\\index.js","mtime":1718764958994},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":1718764959862}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKLmFwcC1jb250YWluZXIgewogIHBvc2l0aW9uOiByZWxhdGl2ZTsKICBwYWRkaW5nLWJvdHRvbTogNjBweDsgLyog5YiG6aG15p2h55qE6auY5bqmICovCn0KCi5maWx0ZXItY29udGFpbmVyLAouZWwtdGFibGUgewogIHBhZGRpbmctYm90dG9tOiA1MnB4OyAvKiDliIbpobXmnaHnmoTpq5jluqbvvIzku6Xpgb/lhY3lhoXlrrnph43lj6AgKi8KfQoKLnNlYXJjaCB7CiAgbWFyZ2luLWxlZnQ6IDEwcHg7Cn0K"},{"version":3,"sources":["shortcutContent.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4JA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA","file":"shortcutContent.vue","sourceRoot":"src/views/shortcut","sourcesContent":["<template>\n <div class=\"app-container\">\n <div class=\"filter-container\">\n <el-input v-model=\"listQuery.content\" placeholder=\"搜索快捷内容\" style=\"width: 200px;\" class=\"filter-item\" />\n <el-select v-model=\"listQuery.status\" filterable placeholder=\"状态\" class=\"filter-item\" style=\"width: 120px;\">\n <el-option key=\"\" label=\"请选择\" value=\"\" />\n <el-option v-for=\"(v, k) in statusArr\" :key=\"k\" :label=\"v\" :value=\"k\" />\n </el-select>\n <el-button class=\"filter-item search\" type=\"primary\" icon=\"el-icon-search\" @click=\"getShortcutContent\">搜索</el-button>\n <el-button class=\"filter-item\" type=\"primary\" icon=\"el-icon-circle-plus\" @click=\"onAdd\">添加</el-button>\n </div>\n\n <el-table v-loading=\"listLoading\" :data=\"list\" border fit highlight-current-row style=\"width: 100%\">\n <el-table-column align=\"center\" fixed label=\"ID\" width=\"80\" prop=\"id\" />\n <el-table-column align=\"center\" fixed label=\"快捷内容\" width=\"380\" prop=\"content\" />\n <el-table-column align=\"center\" label=\"排序\" width=\"140\">\n <template #default=\"scope\">\n <el-input-number v-model=\"scope.row.sort\" :max=\"100\" :min=\"0\" class=\"small-input-number\" @change=\"updateSort(scope.row)\" style=\"width: 110px; height: 36px;\" />\n </template>\n </el-table-column>\n <el-table-column align=\"center\" label=\"状态\" width=\"100\">\n <template #default=\"scope\">\n <el-switch v-model=\"scope.row.status\" :active-value=\"1\" :inactive-value=\"0\" @change=\"updateStatus(scope.row)\" />\n </template>\n </el-table-column>\n <el-table-column align=\"center\" width=\"220\" label=\"操作\">\n <template #default=\"scope\">\n <el-button type=\"primary\" size=\"small\" icon=\"el-icon-edit\" @click=\"onEdit(scope.row)\">编辑</el-button>\n <el-button type=\"danger\" size=\"small\" icon=\"el-icon-delete\" @click=\"onDel(scope.row)\">删除</el-button>\n </template>\n </el-table-column>\n </el-table>\n\n <pagination v-show=\"total > 0\" :total=\"total\" :page.sync=\"listQuery.page\" :limit.sync=\"listQuery.limit\" @pagination=\"getShortcutContent\" />\n\n <el-dialog title=\"添加快捷内容\" :visible.sync=\"dialogCreate\">\n <el-form label-width=\"120px\" :model=\"anchors\">\n <el-form-item label=\"快捷内容\">\n <el-input v-model=\"anchors.content\" type=\"textarea\" placeholder=\"请输入快捷内容\" />\n </el-form-item>\n <el-form-item label=\"排序\">\n <el-input-number v-model=\"anchors.sort\" :max=\"100\" :min=\"0\" controls-position=\"right\" />\n </el-form-item>\n <el-form-item label=\"状态\">\n <el-switch v-model=\"anchors.status\" :active-value=\"1\" :inactive-value=\"0\" active-color=\"#13ce66\" inactive-color=\"#ff4949\" />\n </el-form-item>\n </el-form>\n <div slot=\"footer\" class=\"dialog-footer\">\n <el-button v-loading=\"loading\" type=\"primary\" @click=\"onSave\">保 存</el-button>\n </div>\n </el-dialog>\n\n <el-dialog title=\"编辑内容\" :visible.sync=\"dialogEdit\">\n <el-form label-width=\"120px\" :model=\"anchors\">\n <el-form-item label=\"快捷内容\">\n <el-input v-model=\"anchors.content\" type=\"textarea\" placeholder=\"请输入快捷内容\" />\n </el-form-item>\n <el-form-item label=\"排序\">\n <el-input-number class=\"aaas\" v-model=\"anchors.sort\" :max=\"100\" :min=\"0\" controls-position=\"right\" />\n </el-form-item>\n <el-form-item label=\"状态\">\n <el-switch v-model=\"anchors.status\" :active-value=\"1\" :inactive-value=\"0\" active-color=\"#13ce66\" inactive-color=\"#ff4949\" />\n </el-form-item>\n </el-form>\n <div slot=\"footer\" class=\"dialog-footer\">\n <el-button v-loading=\"loading\" type=\"primary\" @click=\"onSave\">保 存</el-button>\n </div>\n </el-dialog>\n </div>\n</template>\n\n<script>\nimport Pagination from '@/components/PaginationFixed'\n\nexport default {\n name: 'GetShortcutContent',\n components: { Pagination },\n data() {\n return {\n statusArr: { 0: '禁用', 1: '启用' },\n list: [],\n total: 0,\n loading: false,\n listLoading: true,\n listQuery: {\n page: 1,\n limit: 10,\n status: null,\n content: ''\n },\n dialogCreate: false,\n dialogEdit: false,\n item: {},\n anchors: {}\n }\n },\n created() {\n this.listQuery.status = this.$route.query.status || null\n this.listQuery.content = this.$route.query.content || null\n this.getShortcutContent()\n },\n methods: {\n getShortcutContent() {\n this.listLoading = true\n this.$axios.get('/admin/shortcutContent/list', { params: this.listQuery }).then(response => {\n this.list = response.data.data\n this.total = response.data.total\n this.listLoading = false\n }).catch(() => {\n this.listLoading = false\n })\n },\n onAdd() {\n this.anchors = { sort: 0 } // 初始化时默认排序值为0\n this.dialogCreate = true\n },\n onEdit(item) {\n this.anchors = { ...item }\n this.dialogEdit = true\n },\n onSave() {\n if (this.loading) return\n this.loading = true\n const api = this.dialogCreate ? '/admin/shortcutContent/add' : '/admin/shortcutContent/edit'\n this.$axios.post(api, this.anchors).then(() => {\n this.dialogCreate = false\n this.dialogEdit = false\n this.loading = false\n this.getShortcutContent()\n }).catch(() => {\n this.loading = false\n })\n },\n onDel(item) {\n this.$axios.post('/admin/shortcutContent/del', { id: item.id }).then(() => {\n this.getShortcutContent()\n }).catch(() => {\n })\n },\n updateSort(item) {\n this.$axios.post('/admin/shortcutContent/edit', { id: item.id, sort: item.sort }).then(() => {\n this.getShortcutContent()\n }).catch(() => {\n })\n },\n updateStatus(item) {\n this.$axios.post('/admin/shortcutContent/edit', { id: item.id, status: item.status }).then(() => {\n this.getShortcutContent()\n }).catch(() => {\n })\n }\n }\n}\n</script>\n\n<style scoped>\n.app-container {\n position: relative;\n padding-bottom: 60px; /* 分页条的高度 */\n}\n\n.filter-container,\n.el-table {\n padding-bottom: 52px; /* 分页条的高度,以避免内容重叠 */\n}\n\n.search {\n margin-left: 10px;\n}\n</style>\n"]}]} |