| 1 |
- {"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\message\\mail-template-config.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\message\\mail-template-config.vue","mtime":1581948666000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["\r\nimport debounce from 'lodash/debounce'\r\nexport default {\r\n data () {\r\n return {\r\n visible: false,\r\n dataForm: {\r\n smtp: '',\r\n port: '',\r\n username: '',\r\n password: ''\r\n }\r\n }\r\n },\r\n computed: {\r\n dataRule () {\r\n return {\r\n smtp: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n port: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n username: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n password: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n methods: {\r\n init () {\r\n this.visible = true\r\n this.$nextTick(() => {\r\n this.$refs['dataForm'].resetFields()\r\n this.getInfo()\r\n })\r\n },\r\n // 获取信息\r\n getInfo () {\r\n this.$http.get('/sys/mailtemplate/config').then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.dataForm = res.data\r\n }).catch(() => {})\r\n },\r\n // 表单提交\r\n dataFormSubmitHandle: debounce(function () {\r\n this.$refs['dataForm'].validate((valid) => {\r\n if (!valid) {\r\n return false\r\n }\r\n this.$http.post('/sys/mailtemplate/saveConfig', this.dataForm).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.visible = false\r\n this.$emit('refreshDataList')\r\n }\r\n })\r\n }).catch(() => {})\r\n })\r\n }, 1000, { 'leading': true, 'trailing': false })\r\n }\r\n}\r\n",{"version":3,"sources":["mail-template-config.vue"],"names":[],"mappings":";AAwBA;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":"mail-template-config.vue","sourceRoot":"src/views/modules/message","sourcesContent":["<template>\r\n <el-dialog :visible.sync=\"visible\" :title=\"$t('mail.config')\" :close-on-click-modal=\"false\" :close-on-press-escape=\"false\">\r\n <el-form :model=\"dataForm\" :rules=\"dataRule\" ref=\"dataForm\" @keyup.enter.native=\"dataFormSubmitHandle()\" label-width=\"120px\">\r\n <el-form-item prop=\"smtp\" :label=\"$t('mail.config')\">\r\n <el-input v-model=\"dataForm.smtp\" :placeholder=\"$t('mail.config')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"port\" :label=\"$t('mail.port')\">\r\n <el-input v-model=\"dataForm.port\" :placeholder=\"$t('mail.port')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"username\" :label=\"$t('mail.username')\">\r\n <el-input v-model=\"dataForm.username\" :placeholder=\"$t('mail.username')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"password\" :label=\"$t('mail.password')\">\r\n <el-input v-model=\"dataForm.password\" :placeholder=\"$t('mail.password')\"></el-input>\r\n </el-form-item>\r\n </el-form>\r\n <template slot=\"footer\">\r\n <el-button @click=\"visible = false\">{{ $t('cancel') }}</el-button>\r\n <el-button type=\"primary\" @click=\"dataFormSubmitHandle()\">{{ $t('confirm') }}</el-button>\r\n </template>\r\n </el-dialog>\r\n</template>\r\n\r\n<script>\r\nimport debounce from 'lodash/debounce'\r\nexport default {\r\n data () {\r\n return {\r\n visible: false,\r\n dataForm: {\r\n smtp: '',\r\n port: '',\r\n username: '',\r\n password: ''\r\n }\r\n }\r\n },\r\n computed: {\r\n dataRule () {\r\n return {\r\n smtp: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n port: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n username: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n password: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n methods: {\r\n init () {\r\n this.visible = true\r\n this.$nextTick(() => {\r\n this.$refs['dataForm'].resetFields()\r\n this.getInfo()\r\n })\r\n },\r\n // 获取信息\r\n getInfo () {\r\n this.$http.get('/sys/mailtemplate/config').then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.dataForm = res.data\r\n }).catch(() => {})\r\n },\r\n // 表单提交\r\n dataFormSubmitHandle: debounce(function () {\r\n this.$refs['dataForm'].validate((valid) => {\r\n if (!valid) {\r\n return false\r\n }\r\n this.$http.post('/sys/mailtemplate/saveConfig', this.dataForm).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.visible = false\r\n this.$emit('refreshDataList')\r\n }\r\n })\r\n }).catch(() => {})\r\n })\r\n }, 1000, { 'leading': true, 'trailing': false })\r\n }\r\n}\r\n</script>\r\n"]}]}
|