| 1 |
- {"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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\\sms-add-or-update.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\message\\sms-add-or-update.vue","mtime":1581948666000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\babel.config.js","mtime":1581948662000},{"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":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport _defineProperty from \"D:/HTC/program/\\u5584\\u884C\\u5C11\\u5E74/security-enterprise-admin/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nimport debounce from 'lodash/debounce';\nexport default {\n data: function data() {\n return {\n visible: false,\n dataForm: {\n smsCode: '',\n remark: '',\n platform: 1,\n config: {\n aliyunAccessKeyId: '',\n aliyunAccessKeySecret: '',\n aliyunSignName: '',\n aliyunTemplateCode: '',\n qcloudAppId: '',\n qcloudAppKey: '',\n qcloudSignName: '',\n qcloudTemplateId: '',\n qiniuAccessKey: '',\n qiniuSecretKey: '',\n qiniuTemplateId: ''\n }\n }\n };\n },\n computed: {\n dataRule: function dataRule() {\n return {\n smsCode: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.aliyunAccessKeyId': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.aliyunAccessKeySecret': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.aliyunSignName': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.aliyunTemplateCode': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.qcloudAppId': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.qcloudAppKey': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.qcloudSignName': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.qcloudTemplateId': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.qiniuAccessKey': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.qiniuSecretKey': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n 'config.qiniuTemplateId': [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }]\n };\n }\n },\n watch: {\n 'dataForm.platform': function dataFormPlatform(val) {\n this.$refs['dataForm'].clearValidate();\n }\n },\n methods: {\n init: function init() {\n var _this = this;\n this.visible = true;\n this.$nextTick(function () {\n _this.$refs['dataForm'].resetFields();\n if (_this.dataForm.id) {\n _this.getInfo();\n }\n });\n },\n // 获取信息\n getInfo: function getInfo() {\n var _this2 = this;\n this.$http.get(\"/sys/sms/\".concat(this.dataForm.id)).then(function (_ref) {\n var res = _ref.data;\n if (res.code !== 0) {\n return _this2.$message.error(res.msg);\n }\n _this2.dataForm = _objectSpread(_objectSpread({}, _this2.dataForm), res.data);\n }).catch(function () {});\n },\n // 表单提交\n dataFormSubmitHandle: debounce(function () {\n var _this3 = this;\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n _this3.$http[!_this3.dataForm.id ? 'post' : 'put']('/sys/sms', _this3.dataForm).then(function (_ref2) {\n var res = _ref2.data;\n if (res.code !== 0) {\n return _this3.$message.error(res.msg);\n }\n _this3.$message({\n message: _this3.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: function onClose() {\n _this3.visible = false;\n _this3.$emit('refreshDataList');\n }\n });\n }).catch(function () {});\n });\n }, 1000, {\n 'leading': true,\n 'trailing': false\n })\n }\n};",{"version":3,"names":["debounce","data","visible","dataForm","smsCode","remark","platform","config","aliyunAccessKeyId","aliyunAccessKeySecret","aliyunSignName","aliyunTemplateCode","qcloudAppId","qcloudAppKey","qcloudSignName","qcloudTemplateId","qiniuAccessKey","qiniuSecretKey","qiniuTemplateId","computed","dataRule","required","message","$t","trigger","watch","dataFormPlatform","val","$refs","clearValidate","methods","init","_this","$nextTick","resetFields","id","getInfo","_this2","$http","get","concat","then","_ref","res","code","$message","error","msg","_objectSpread","catch","dataFormSubmitHandle","_this3","validate","valid","_ref2","type","duration","onClose","$emit"],"sources":["src/views/modules/message/sms-add-or-update.vue"],"sourcesContent":["<template>\r\n <el-dialog :visible.sync=\"visible\" :title=\"!dataForm.id ? $t('add') : $t('update')\" :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=\"smsCode\" :label=\"$t('sms.smsCode')\">\r\n <el-input v-model=\"dataForm.smsCode\" :placeholder=\"$t('sms.smsCode')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"remark\" :label=\"$t('sms.remark')\">\r\n <el-input v-model=\"dataForm.remark\" :placeholder=\"$t('sms.remark')\"></el-input>\r\n </el-form-item>\r\n <el-divider></el-divider>\r\n <el-form-item :label=\"$t('sms.platform')\" size=\"mini\">\r\n <el-radio-group v-model=\"dataForm.platform\">\r\n <el-radio :label=\"1\">{{ $t('sms.platform1') }}</el-radio>\r\n <el-radio :label=\"2\">{{ $t('sms.platform2') }}</el-radio>\r\n <el-radio :label=\"3\">{{ $t('sms.platform3') }}</el-radio>\r\n </el-radio-group>\r\n </el-form-item>\r\n <template v-if=\"dataForm.platform === 1\">\r\n <el-form-item prop=\"config.aliyunAccessKeyId\" :label=\"$t('sms.aliyunAccessKeyId')\">\r\n <el-input v-model=\"dataForm.config.aliyunAccessKeyId\" :placeholder=\"$t('sms.aliyunAccessKeyIdTips')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"config.aliyunAccessKeySecret\" :label=\"$t('sms.aliyunAccessKeySecret')\">\r\n <el-input v-model=\"dataForm.config.aliyunAccessKeySecret\" :placeholder=\"$t('sms.aliyunAccessKeySecretTips')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"config.aliyunSignName\" :label=\"$t('sms.aliyunSignName')\">\r\n <el-input v-model=\"dataForm.config.aliyunSignName\" :placeholder=\"$t('sms.aliyunSignName')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"config.aliyunTemplateCode\" :label=\"$t('sms.aliyunTemplateCode')\">\r\n <el-input v-model=\"dataForm.config.aliyunTemplateCode\" :placeholder=\"$t('sms.aliyunTemplateCodeTips')\"></el-input>\r\n </el-form-item>\r\n </template>\r\n <template v-else-if=\"dataForm.platform === 2\">\r\n <el-form-item prop=\"config.qcloudAppId\" :label=\"$t('sms.qcloudAppId')\">\r\n <el-input v-model=\"dataForm.config.qcloudAppId\" :placeholder=\"$t('sms.qcloudAppIdTips')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"config.qcloudAppKey\" :label=\"$t('sms.qcloudAppKey')\">\r\n <el-input v-model=\"dataForm.config.qcloudAppKey\" :placeholder=\"$t('sms.qcloudAppKeyTips')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"config.qcloudSignName\" :label=\"$t('sms.qcloudSignName')\">\r\n <el-input v-model=\"dataForm.config.qcloudSignName\" :placeholder=\"$t('sms.qcloudSignName')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"config.qcloudTemplateId\" :label=\"$t('sms.qcloudTemplateId')\">\r\n <el-input v-model=\"dataForm.config.qcloudTemplateId\" :placeholder=\"$t('sms.qcloudTemplateIdTips')\"></el-input>\r\n </el-form-item>\r\n </template>\r\n <template v-else-if=\"dataForm.platform === 3\">\r\n <el-form-item prop=\"config.qiniuAccessKey\" :label=\"$t('sms.qiniuAccessKey')\">\r\n <el-input v-model=\"dataForm.config.qiniuAccessKey\" :placeholder=\"$t('sms.qiniuAccessKeyTips')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"config.qiniuSecretKey\" :label=\"$t('sms.qiniuSecretKey')\">\r\n <el-input v-model=\"dataForm.config.qiniuSecretKey\" :placeholder=\"$t('sms.qiniuSecretKeyTips')\"></el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"config.qiniuTemplateId\" :label=\"$t('sms.qiniuTemplateId')\">\r\n <el-input v-model=\"dataForm.config.qiniuTemplateId\" :placeholder=\"$t('sms.qiniuTemplateIdTips')\"></el-input>\r\n </el-form-item>\r\n </template>\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 smsCode: '',\r\n remark: '',\r\n platform: 1,\r\n config: {\r\n aliyunAccessKeyId: '',\r\n aliyunAccessKeySecret: '',\r\n aliyunSignName: '',\r\n aliyunTemplateCode: '',\r\n qcloudAppId: '',\r\n qcloudAppKey: '',\r\n qcloudSignName: '',\r\n qcloudTemplateId: '',\r\n qiniuAccessKey: '',\r\n qiniuSecretKey: '',\r\n qiniuTemplateId: ''\r\n }\r\n }\r\n }\r\n },\r\n computed: {\r\n dataRule () {\r\n return {\r\n smsCode: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.aliyunAccessKeyId': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.aliyunAccessKeySecret': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.aliyunSignName': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.aliyunTemplateCode': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.qcloudAppId': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.qcloudAppKey': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.qcloudSignName': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.qcloudTemplateId': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.qiniuAccessKey': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.qiniuSecretKey': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n 'config.qiniuTemplateId': [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n watch: {\r\n 'dataForm.platform' (val) {\r\n this.$refs['dataForm'].clearValidate()\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 if (this.dataForm.id) {\r\n this.getInfo()\r\n }\r\n })\r\n },\r\n // 获取信息\r\n getInfo () {\r\n this.$http.get(`/sys/sms/${this.dataForm.id}`).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.dataForm = {\r\n ...this.dataForm,\r\n ...res.data\r\n }\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[!this.dataForm.id ? 'post' : 'put']('/sys/sms', 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"],"mappings":";;;;;;AAiEA,OAAAA,QAAA;AACA;EACAC,IAAA,WAAAA,KAAA;IACA;MACAC,OAAA;MACAC,QAAA;QACAC,OAAA;QACAC,MAAA;QACAC,QAAA;QACAC,MAAA;UACAC,iBAAA;UACAC,qBAAA;UACAC,cAAA;UACAC,kBAAA;UACAC,WAAA;UACAC,YAAA;UACAC,cAAA;UACAC,gBAAA;UACAC,cAAA;UACAC,cAAA;UACAC,eAAA;QACA;MACA;IACA;EACA;EACAC,QAA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