{"remainingRequest":"/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/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//\n\nimport axios from '@/libs/api.request'\nexport default{\n name: 'banner',\n data(){\n return {\n editTemplate: false,\n regex: /\\{(.+?)\\}/g,\n arr: [],\n formEdit: {\n title: '',\n content: '',\n id: ''\n },\n columns: [\n {\n title: '消息标题',\n key: 'title',\n width: 300\n },\n {\n title: '消息模板',\n key: 'content',\n align: 'center',\n minWidth: 500\n },\n {\n title: '操作',\n minWidth: 200,\n key: 'action',\n align: 'center',\n render: (h, params) => {\n let btnArr = []\n btnArr.push(\n 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 {\n name: 'opcode',\n value: 'systemuser msgedit'\n }\n ]\n }, '编辑'))\n return h('div', btnArr)\n }\n }\n ],\n tableData: []\n }\n },\n created(){\n this.getTemplateList();\n },\n methods: {\n save(){\n let _this = this;\n if (!_this.formEdit.title) {\n _this.$Message.error('请输入模板标题');\n return;\n }\n if (!_this.formEdit.content) {\n _this.$Message.error('请输入消息模板');\n return;\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 })\n .then(res => {\n if (res.data.code === 'success') {\n _this.editTemplate = false\n _this.$Message.success(res.data.message, 'middle')\n _this.getTemplateList();\n } else {\n _this.$Message.error(res.data.message)\n }\n })\n },\n getTemplateList(){\n let _this = this;\n axios.request({\n url: '/admins/system/msglist',\n method: 'POST'\n })\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",{"version":3,"sources":["listTemplate.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"listTemplate.vue","sourceRoot":"src/view/system-config","sourcesContent":["\n \n
\n \n \n
\n \n \n
\n \n \n \n \n
\n \n
\n\n\n\n"]}]}