61895de38df934eff039adc0f118037f.json 4.4 KB

1
  1. {"remainingRequest":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/thread-loader/dist/cjs.js!/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/babel-loader/lib/index.js!/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/cache-loader/dist/cjs.js??ref--0-0!/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/vue-loader/lib/index.js??vue-loader-options!/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/src/view/system-config/listTemplate.vue?vue&type=script&lang=js&","dependencies":[{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/src/view/system-config/listTemplate.vue","mtime":1618306924000},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/cache-loader/dist/cjs.js","mtime":1665684022107},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/thread-loader/dist/cjs.js","mtime":1665684003955},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/babel-loader/lib/index.js","mtime":1665684010704},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/cache-loader/dist/cjs.js","mtime":1665684022107},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/vue-loader/lib/index.js","mtime":1665684006084}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport axios from '@/libs/api.request';\nexport default {\n name: 'banner',\n\n data() {\n return {\n editTemplate: false,\n regex: /\\{(.+?)\\}/g,\n arr: [],\n formEdit: {\n title: '',\n content: '',\n id: ''\n },\n columns: [{\n title: '消息标题',\n key: 'title',\n width: 300\n }, {\n title: '消息模板',\n key: 'content',\n align: 'center',\n minWidth: 500\n }, {\n title: '操作',\n minWidth: 200,\n key: 'action',\n align: 'center',\n render: (h, params) => {\n let btnArr = [];\n btnArr.push(h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px'\n },\n on: {\n click: () => {\n this.editTemplate = true;\n this.formEdit.id = params.row.id;\n this.formEdit.title = params.row.title;\n this.formEdit.content = params.row.content;\n this.arr = this.formEdit.content.match(this.regex) || [];\n }\n },\n directives: [{\n name: 'opcode',\n value: 'systemuser msgedit'\n }]\n }, '编辑'));\n return h('div', btnArr);\n }\n }],\n tableData: []\n };\n },\n\n created() {\n this.getTemplateList();\n },\n\n methods: {\n save() {\n let _this = this;\n\n if (!_this.formEdit.title) {\n _this.$Message.error('请输入模板标题');\n\n return;\n }\n\n if (!_this.formEdit.content) {\n _this.$Message.error('请输入消息模板');\n\n return;\n }\n\n axios.request({\n url: '/admins/system/msgedit',\n data: {\n title: _this.formEdit.title,\n content: _this.formEdit.content,\n id: _this.formEdit.id\n },\n method: 'POST'\n }).then(res => {\n if (res.data.code === 'success') {\n _this.editTemplate = false;\n\n _this.$Message.success(res.data.message, 'middle');\n\n _this.getTemplateList();\n } else {\n _this.$Message.error(res.data.message);\n }\n });\n },\n\n getTemplateList() {\n let _this = this;\n\n axios.request({\n url: '/admins/system/msglist',\n method: 'POST'\n }).then(res => {\n if (res.data.code === 'success') {\n _this.tableData = res.data.data;\n } else {\n _this.$Message.error(res.data.message);\n }\n });\n }\n\n }\n};",null]}