e461a37b25c7bff34858dc122a32748e.json 8.7 KB

1
  1. {"remainingRequest":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\front\\item\\zyAdmin\\src\\pages\\setting\\storeService\\autoReply.vue?vue&type=style&index=0&id=3c63eb63&scoped=true&lang=css","dependencies":[{"path":"D:\\front\\item\\zyAdmin\\src\\pages\\setting\\storeService\\autoReply.vue","mtime":1761614939059},{"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\\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:DQouUVJwaWMgew0KICB3aWR0aDogMTgwcHg7DQogIGhlaWdodDogMTgwcHg7DQp9DQoNCi5RUnBpYyBpbWcgew0KICB3aWR0aDogMTAwJTsNCiAgaGVpZ2h0OiAxMDAlOw0KfQ0K"},{"version":3,"sources":["autoReply.vue"],"names":[],"mappings":";AA4OA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA","file":"autoReply.vue","sourceRoot":"src/pages/setting/storeService","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=\"levelFrom\"\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=\"回复类型:\" prop=\"type\" label-for=\"type\">\r\n <el-select\r\n v-model=\"formValidate.type\"\r\n placeholder=\"请选择\"\r\n clearable\r\n @change=\"userSearchs\"\r\n class=\"form_content_width\"\r\n >\r\n <el-option value=\"text\" label=\"文字消息\"></el-option>\r\n <el-option value=\"image\" label=\"图片消息\"></el-option>\r\n </el-select>\r\n </el-form-item>\r\n <el-form-item label=\"关键字:\" prop=\"key\" label-for=\"key\">\r\n <el-input clearable v-model=\"formValidate.key\" placeholder=\"请输入关键字\" class=\"form_content_width\" />\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\" class=\"ivu-mt\">\r\n <el-button type=\"primary\" v-db-click @click=\"add\">添加自动回复</el-button>\r\n <el-table\r\n :data=\"tabList\"\r\n ref=\"table\"\r\n class=\"mt14\"\r\n v-loading=\"loading\"\r\n highlight-current-row\r\n no-userFrom-text=\"暂无数据\"\r\n no-filtered-userFrom-text=\"暂无筛选结果\"\r\n >\r\n <el-table-column label=\"ID\" width=\"80\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.id }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"关键字\" min-width=\"130\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.key }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"回复类型\" min-width=\"130\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.type == 'text' ? '文字消息' : '图片消息' }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"回复内容\" min-width=\"130\">\r\n <template slot-scope=\"scope\">\r\n <span v-if=\"scope.row.type == 'text'\">{{ scope.row.data.content }}</span>\r\n <div v-else class=\"tabBox_img\" v-viewer>\r\n <img v-lazy=\"scope.row.data.src\" />\r\n </div>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"是否开启\" min-width=\"130\">\r\n <template slot-scope=\"scope\">\r\n <el-switch\r\n class=\"defineSwitch\"\r\n :active-value=\"1\"\r\n :inactive-value=\"0\"\r\n v-model=\"scope.row.status\"\r\n :value=\"scope.row.status\"\r\n @change=\"onchangeIsShow(scope.row)\"\r\n size=\"large\"\r\n :active-text=\"'开启'\"\r\n :inactive-text=\"'关闭'\"\r\n >\r\n </el-switch>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"操作\" fixed=\"right\" width=\"170\">\r\n <template slot-scope=\"scope\">\r\n <a v-db-click @click=\"edit(scope.row)\">编辑</a>\r\n <el-divider direction=\"vertical\"></el-divider>\r\n <a v-db-click @click=\"del(scope.row, '客服自动回复', scope.$index)\">删除</a>\r\n </template>\r\n </el-table-column>\r\n </el-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\r\n<script>\r\nimport { kefuAutoReplyListApi, kefuAutoReplyForm, keywordsetStatusApi } from '@/api/app';\r\nimport { mapState } from 'vuex';\r\nexport default {\r\n name: 'keyword',\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 key: '',\r\n type: '',\r\n page: 1,\r\n limit: 20,\r\n },\r\n tabList: [],\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: 'key',\r\n minWidth: 120,\r\n },\r\n {\r\n title: '回复类型',\r\n key: 'type',\r\n minWidth: 150,\r\n },\r\n {\r\n title: '是否显示',\r\n slot: 'status',\r\n minWidth: 120,\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 modal: false,\r\n qrcode: '',\r\n };\r\n },\r\n created() {\r\n this.getList();\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 methods: {\r\n // 列表\r\n getList() {\r\n this.loading = true;\r\n kefuAutoReplyListApi(this.formValidate)\r\n .then(async (res) => {\r\n let data = res.data;\r\n this.tabList = data.list;\r\n this.total = res.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 onchangeIsShow(row) {\r\n let data = {\r\n id: row.id,\r\n status: row.status,\r\n };\r\n keywordsetStatusApi(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 userSearchs() {\r\n this.formValidate.page = 1;\r\n this.getList();\r\n },\r\n // 添加\r\n add() {\r\n this.$modalForm(kefuAutoReplyForm(0)).then(() => this.getList());\r\n },\r\n // 编辑\r\n edit(row) {\r\n this.$modalForm(kefuAutoReplyForm(row.id)).then(() => this.getList());\r\n },\r\n del(row, tit, num) {\r\n let delfromData = {\r\n title: tit,\r\n num: num,\r\n url: `app/kefu/auto_reply/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.tabList.splice(num, 1);\r\n })\r\n .catch((res) => {\r\n this.$message.error(res.msg);\r\n });\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n.QRpic {\r\n width: 180px;\r\n height: 180px;\r\n}\r\n\r\n.QRpic img {\r\n width: 100%;\r\n height: 100%;\r\n}\r\n</style>\r\n"]}]}