| 1 |
- {"remainingRequest":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\front\\item\\zyAdmin\\src\\pages\\product\\protectionList\\index.vue?vue&type=style&index=0&id=0abe367e&lang=scss&scoped=true","dependencies":[{"path":"D:\\front\\item\\zyAdmin\\src\\pages\\product\\protectionList\\index.vue","mtime":1761614939051},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\css-loader\\index.js","mtime":1761614929364},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":1761614937403},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\postcss-loader\\src\\index.js","mtime":1761614935133},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\sass-loader\\dist\\cjs.js","mtime":1761614936391},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1761614927801},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\index.js","mtime":1761614937402}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:DQoudGFiQm94X2ltZyB7DQogIHdpZHRoOiAzNnB4Ow0KICBoZWlnaHQ6IDM2cHg7DQogIGJvcmRlci1yYWRpdXM6IDRweDsNCiAgY3Vyc29yOiBwb2ludGVyOw0KDQogIGltZyB7DQogICAgd2lkdGg6IDEwMCU7DQogICAgaGVpZ2h0OiAxMDAlOw0KICB9DQp9DQo="},{"version":3,"sources":["index.vue"],"names":[],"mappings":";AAgPA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/pages/product/protectionList","sourcesContent":["<template>\r\n <div>\r\n <el-card :bordered=\"false\" shadow=\"never\" class=\"ivu-mb-16\" :body-style=\"{ padding: 0 }\">\r\n <div class=\"padding-add\">\r\n <el-form\r\n ref=\"formValidate\"\r\n :model=\"formValidate\"\r\n :label-width=\"labelWidth\"\r\n :label-position=\"labelPosition\"\r\n @submit.native.prevent\r\n inline\r\n >\r\n <el-form-item label=\"保障名称:\">\r\n <el-input clearable placeholder=\"请输入保障名称\" v-model=\"formValidate.title\" class=\"form_content_width\" @change=\"userSearchs\" />\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"primary\" v-db-click @click=\"userSearchs\">查询</el-button>\r\n </el-form-item>\r\n </el-form>\r\n </div>\r\n </el-card>\r\n <el-card :bordered=\"false\" shadow=\"never\">\r\n <el-button v-auth=\"['cms-category-create']\" type=\"primary\" v-db-click @click=\"add\">添加保障</el-button>\r\n <vxe-table\r\n class=\"vxeTable mt14\"\r\n highlight-hover-row\r\n :loading=\"loading\"\r\n header-row-class-name=\"false\"\r\n :tree-config=\"{ children: 'children' }\"\r\n :data=\"categoryList\"\r\n >\r\n <vxe-table-column field=\"id\" title=\"ID\" tooltip width=\"80\"></vxe-table-column>\r\n <vxe-table-column field=\"title\" tree-node title=\"保障名称\" min-width=\"130\"></vxe-table-column>\r\n <vxe-table-column field=\"image\" title=\"保障图片\" min-width=\"130\">\r\n <template v-slot=\"{ row }\">\r\n <div class=\"tabBox_img\" v-viewer v-if=\"row.image\">\r\n <img v-lazy=\"row.image\" />\r\n </div>\r\n </template>\r\n </vxe-table-column>\r\n <vxe-table-column field=\"status\" title=\"状态\" min-width=\"120\">\r\n <template v-slot=\"{ row }\">\r\n <el-switch\r\n class=\"defineSwitch\"\r\n :active-value=\"1\"\r\n :inactive-value=\"0\"\r\n v-model=\"row.status\"\r\n :value=\"row.status\"\r\n @change=\"onchangeIsShow(row)\"\r\n size=\"large\"\r\n active-text=\"开启\"\r\n inactive-text=\"关闭\"\r\n >\r\n </el-switch>\r\n </template>\r\n </vxe-table-column>\r\n <vxe-table-column field=\"sort\" title=\"排序\" min-width=\"130\"></vxe-table-column>\r\n\r\n <vxe-table-column field=\"date\" title=\"操作\" width=\"120\" fixed=\"right\">\r\n <template v-slot=\"{ row }\">\r\n <a v-db-click @click=\"edit(row)\">编辑</a>\r\n <el-divider direction=\"vertical\"></el-divider>\r\n <a v-db-click @click=\"del(row, '删除保障')\">删除</a>\r\n </template>\r\n </vxe-table-column>\r\n </vxe-table>\r\n <div class=\"acea-row row-right page\">\r\n <pagination\r\n v-if=\"total\"\r\n :total=\"total\"\r\n :page.sync=\"formValidate.page\"\r\n :limit.sync=\"formValidate.limit\"\r\n @pagination=\"getList\"\r\n />\r\n </div>\r\n </el-card>\r\n </div>\r\n</template>\r\n<script>\r\nimport { mapState, mapMutations } from 'vuex';\r\nimport {\r\n productProtectionFormApi,\r\n productProtectionInfoApi,\r\n productProtectionListApi,\r\n protectionStatusApi,\r\n} from '@/api/product';\r\nexport default {\r\n name: 'articleCategory',\r\n data() {\r\n return {\r\n grid: {\r\n xl: 7,\r\n lg: 7,\r\n md: 12,\r\n sm: 24,\r\n xs: 24,\r\n },\r\n loading: false,\r\n formValidate: {\r\n page: 1,\r\n limit: 20,\r\n title: '',\r\n },\r\n status: '',\r\n total: 0,\r\n columns1: [\r\n {\r\n title: 'ID',\r\n key: 'id',\r\n width: 80,\r\n },\r\n {\r\n title: '保障名称',\r\n key: 'title',\r\n minWidth: 130,\r\n },\r\n {\r\n title: '保障内容',\r\n key: 'content',\r\n minWidth: 130,\r\n },\r\n {\r\n title: '图标',\r\n slot: 'images',\r\n minWidth: 130,\r\n },\r\n {\r\n title: '状态',\r\n slot: 'statuss',\r\n minWidth: 130,\r\n },\r\n {\r\n title: '排序',\r\n key: 'sort',\r\n minWidth: 130,\r\n },\r\n {\r\n title: '操作',\r\n slot: 'action',\r\n fixed: 'right',\r\n minWidth: 120,\r\n },\r\n ],\r\n FromData: null,\r\n modalTitleSs: '',\r\n categoryId: 0,\r\n categoryList: [],\r\n };\r\n },\r\n computed: {\r\n ...mapState('media', ['isMobile']),\r\n labelWidth() {\r\n return this.isMobile ? undefined : '80px';\r\n },\r\n labelPosition() {\r\n return this.isMobile ? 'top' : 'right';\r\n },\r\n },\r\n mounted() {\r\n this.getList();\r\n },\r\n methods: {\r\n ...mapMutations('userLevel', ['getCategoryId']),\r\n // 添加\r\n add() {\r\n this.$modalForm(productProtectionFormApi(0)).then(() => this.getList());\r\n },\r\n // 编辑\r\n edit(row) {\r\n this.$modalForm(productProtectionFormApi(row.id)).then(() => this.getList());\r\n },\r\n // 删除\r\n del(row, tit) {\r\n let delfromData = {\r\n title: tit,\r\n num: 0,\r\n url: `product/protection/del/${row.id}`,\r\n method: 'DELETE',\r\n ids: '',\r\n };\r\n this.$modalSure(delfromData)\r\n .then((res) => {\r\n this.$message.success(res.msg);\r\n this.getList();\r\n })\r\n .catch((res) => {\r\n this.$message.error(res.msg);\r\n });\r\n },\r\n // 列表\r\n getList() {\r\n this.loading = true;\r\n this.formValidate.status = this.status === 'all' ? '' : this.status;\r\n productProtectionListApi(this.formValidate)\r\n .then(async (res) => {\r\n let data = res.data;\r\n this.categoryList = data.list;\r\n this.total = data.count;\r\n this.loading = false;\r\n })\r\n .catch((res) => {\r\n this.loading = false;\r\n this.$message.error(res.msg);\r\n });\r\n },\r\n // 表格搜索\r\n userSearchs() {\r\n this.formValidate.page = 1;\r\n this.getList();\r\n },\r\n // 修改是否显示\r\n onchangeIsShow(row) {\r\n let data = {\r\n id: row.id,\r\n status: row.status,\r\n };\r\n protectionStatusApi(data)\r\n .then(async (res) => {\r\n this.$message.success(res.msg);\r\n })\r\n .catch((res) => {\r\n this.$message.error(res.msg);\r\n });\r\n },\r\n // 查看保障\r\n lookUp(row) {\r\n this.$router.push({\r\n path: this.$routeProStr + '/cms/article/index',\r\n query: {\r\n id: row.id,\r\n },\r\n });\r\n //xia mian chu cun mei yong;\r\n this.getCategoryId(row.id);\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.tabBox_img {\r\n width: 36px;\r\n height: 36px;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n\r\n img {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n}\r\n</style>\r\n"]}]}
|