1 line
26 KiB
JSON
1 line
26 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\oss\\oss-config.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\oss\\oss-config.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"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//\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//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport debounce from 'lodash/debounce';\nexport default {\n data: function data() {\n return {\n visible: false,\n dataForm: {\n type: 0,\n qiniuDomain: '',\n qiniuPrefix: '',\n qiniuAccessKey: '',\n qiniuSecretKey: '',\n qiniuBucketName: '',\n aliyunDomain: '',\n aliyunPrefix: '',\n aliyunEndPoint: '',\n aliyunAccessKeyId: '',\n aliyunAccessKeySecret: '',\n aliyunBucketName: '',\n qcloudDomain: '',\n qcloudPrefix: '',\n qcloudAppId: 0,\n qcloudSecretId: '',\n qcloudSecretKey: '',\n qcloudBucketName: '',\n qcloudRegion: '',\n fastdfsDomain: '',\n localDomain: '',\n localPrefix: '',\n localPath: ''\n }\n };\n },\n computed: {\n dataRule: function dataRule() {\n return {\n qiniuDomain: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n qiniuAccessKey: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n qiniuSecretKey: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n qiniuBucketName: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n aliyunDomain: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n aliyunEndPoint: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n aliyunAccessKeyId: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n aliyunAccessKeySecret: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n aliyunBucketName: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n qcloudDomain: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n qcloudAppId: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n qcloudSecretId: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n qcloudSecretKey: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n qcloudBucketName: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n qcloudRegion: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n fastdfsDomain: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n localDomain: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n localPath: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n minioEndPoint: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n minioAccessKey: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n minioSecretKey: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n minioBucketName: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }]\n };\n }\n },\n watch: {\n 'dataForm.type': function dataFormType(val) {\n this.$refs['dataForm'].clearValidate();\n }\n },\n methods: {\n init: function init() {\n var _this = this;\n\n this.visible = true;\n this.$nextTick(function () {\n _this.$refs['dataForm'].resetFields();\n\n _this.getInfo();\n });\n },\n // 获取信息\n getInfo: function getInfo() {\n var _this2 = this;\n\n this.$http.get('/oss/file/info').then(function (_ref) {\n var res = _ref.data;\n\n if (res.code !== 0) {\n return _this2.$message.error(res.msg);\n }\n\n _this2.dataForm = res.data;\n }).catch(function () {});\n },\n // 表单提交\n dataFormSubmitHandle: debounce(function () {\n var _this3 = this;\n\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n\n _this3.$http.post('/oss/file', _this3.dataForm).then(function (_ref2) {\n var res = _ref2.data;\n\n if (res.code !== 0) {\n return _this3.$message.error(res.msg);\n }\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\n _this3.$emit('refreshDataList');\n }\n });\n }).catch(function () {});\n });\n }, 1000, {\n 'leading': true,\n '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AlBA;AA5GA,CAAA","sourcesContent":["<template>\n <el-dialog :visible.sync=\"visible\" :title=\"$t('oss.config')\" :close-on-click-modal=\"false\" :close-on-press-escape=\"false\">\n <el-form :model=\"dataForm\" :rules=\"dataRule\" ref=\"dataForm\" @keyup.enter.native=\"dataFormSubmitHandle()\" label-width=\"120px\">\n <el-form-item :label=\"$t('oss.type')\" size=\"mini\">\n <el-radio-group v-model=\"dataForm.type\">\n <el-radio :label=\"1\">{{ $t('oss.type1') }}</el-radio>\n <el-radio :label=\"2\">{{ $t('oss.type2') }}</el-radio>\n <el-radio :label=\"3\">{{ $t('oss.type3') }}</el-radio>\n <el-radio :label=\"4\">{{ $t('oss.type4') }}</el-radio>\n <el-radio :label=\"5\">{{ $t('oss.type5') }}</el-radio>\n <el-radio :label=\"6\">{{ $t('oss.type6') }}</el-radio>\n </el-radio-group>\n </el-form-item>\n <template v-if=\"dataForm.type === 1\">\n <el-form-item prop=\"qiniuDomain\" :label=\"$t('oss.qiniuDomain')\">\n <el-input v-model=\"dataForm.qiniuDomain\" :placeholder=\"$t('oss.qiniuDomainTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"qiniuPrefix\" :label=\"$t('oss.qiniuPrefix')\">\n <el-input v-model=\"dataForm.qiniuPrefix\" :placeholder=\"$t('oss.qiniuPrefixTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"qiniuAccessKey\" :label=\"$t('oss.qiniuAccessKey')\">\n <el-input v-model=\"dataForm.qiniuAccessKey\" :placeholder=\"$t('oss.qiniuAccessKeyTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"qiniuSecretKey\" :label=\"$t('oss.qiniuSecretKey')\">\n <el-input v-model=\"dataForm.qiniuSecretKey\" :placeholder=\"$t('oss.qiniuSecretKeyTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"qiniuBucketName\" :label=\"$t('oss.qiniuBucketName')\">\n <el-input v-model=\"dataForm.qiniuBucketName\" :placeholder=\"$t('oss.qiniuBucketNameTips')\"></el-input>\n </el-form-item>\n </template>\n <template v-else-if=\"dataForm.type === 2\">\n <el-form-item prop=\"aliyunDomain\" :label=\"$t('oss.aliyunDomain')\">\n <el-input v-model=\"dataForm.aliyunDomain\" :placeholder=\"$t('oss.aliyunDomainTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"aliyunPrefix\" :label=\"$t('oss.aliyunPrefix')\">\n <el-input v-model=\"dataForm.aliyunPrefix\" :placeholder=\"$t('oss.aliyunPrefixTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"aliyunEndPoint\" :label=\"$t('oss.aliyunEndPoint')\">\n <el-input v-model=\"dataForm.aliyunEndPoint\" :placeholder=\"$t('oss.aliyunEndPointTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"aliyunAccessKeyId\" :label=\"$t('oss.aliyunAccessKeyId')\">\n <el-input v-model=\"dataForm.aliyunAccessKeyId\" :placeholder=\"$t('oss.aliyunAccessKeyIdTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"aliyunAccessKeySecret\" :label=\"$t('oss.aliyunAccessKeySecret')\">\n <el-input v-model=\"dataForm.aliyunAccessKeySecret\" :placeholder=\"$t('oss.aliyunAccessKeySecretTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"aliyunBucketName\" :label=\"$t('oss.aliyunBucketName')\">\n <el-input v-model=\"dataForm.aliyunBucketName\" :placeholder=\"$t('oss.aliyunBucketNameTips')\"></el-input>\n </el-form-item>\n </template>\n <template v-else-if=\"dataForm.type === 3\">\n <el-form-item prop=\"qcloudDomain\" :label=\"$t('oss.qcloudDomain')\">\n <el-input v-model=\"dataForm.qcloudDomain\" :placeholder=\"$t('oss.qcloudDomainTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"qcloudPrefix\" :label=\"$t('oss.qcloudPrefix')\">\n <el-input v-model=\"dataForm.qcloudPrefix\" :placeholder=\"$t('oss.qcloudPrefixTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"qcloudAppId\" :label=\"$t('oss.qcloudAppId')\">\n <el-input v-model=\"dataForm.qcloudAppId\" :placeholder=\"$t('oss.qcloudAppIdTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"qcloudSecretId\" :label=\"$t('oss.qcloudSecretId')\">\n <el-input v-model=\"dataForm.qcloudSecretId\" :placeholder=\"$t('oss.qcloudSecretIdTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"qcloudSecretKey\" :label=\"$t('oss.qcloudSecretKey')\">\n <el-input v-model=\"dataForm.qcloudSecretKey\" :placeholder=\"$t('oss.qcloudSecretKeyTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"qcloudBucketName\" :label=\"$t('oss.qcloudBucketName')\">\n <el-input v-model=\"dataForm.qcloudBucketName\" :placeholder=\"$t('oss.qcloudBucketNameTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"qcloudRegion\" :label=\"$t('oss.qcloudRegion')\">\n <el-select v-model=\"dataForm.qcloudRegion\" clearable :placeholder=\"$t('oss.qcloudRegionTips')\" class=\"w-percent-100\">\n <el-option value=\"ap-beijing-1\" :label=\"$t('oss.qcloudRegionBeijing1')\"></el-option>\n <el-option value=\"ap-beijing\" :label=\"$t('oss.qcloudRegionBeijing')\"></el-option>\n <el-option value=\"ap-shanghai\" :label=\"$t('oss.qcloudRegionShanghai')\"></el-option>\n <el-option value=\"ap-guangzhou\" :label=\"$t('oss.qcloudRegionGuangzhou')\"></el-option>\n <el-option value=\"ap-chengdu\" :label=\"$t('oss.qcloudRegionChengdu')\"></el-option>\n <el-option value=\"ap-chongqing\" :label=\"$t('oss.qcloudRegionChongqing')\"></el-option>\n <el-option value=\"ap-singapore\" :label=\"$t('oss.qcloudRegionSingapore')\"></el-option>\n <el-option value=\"ap-hongkong\" :label=\"$t('oss.qcloudRegionHongkong')\"></el-option>\n <el-option value=\"na-toronto\" :label=\"$t('oss.qcloudRegionToronto')\"></el-option>\n <el-option value=\"eu-frankfurt\" :label=\"$t('oss.qcloudRegionFrankfurt')\"></el-option>\n </el-select>\n </el-form-item>\n </template>\n <template v-else-if=\"dataForm.type === 4\">\n <el-form-item prop=\"fastdfsDomain\" :label=\"$t('oss.fastdfsDomain')\">\n <el-input v-model=\"dataForm.fastdfsDomain\" :placeholder=\"$t('oss.fastdfsDomainTips')\"></el-input>\n </el-form-item>\n </template>\n <template v-else-if=\"dataForm.type === 5\">\n <el-form-item prop=\"localDomain\" :label=\"$t('oss.localDomain')\">\n <el-input v-model=\"dataForm.localDomain\" :placeholder=\"$t('oss.localDomainTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"localPrefix\" :label=\"$t('oss.localPrefix')\">\n <el-input v-model=\"dataForm.localPrefix\" :placeholder=\"$t('oss.localPrefixTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"localPath\" :label=\"$t('oss.localPath')\">\n <el-input v-model=\"dataForm.localPath\" :placeholder=\"$t('oss.localPathTips')\"></el-input>\n </el-form-item>\n </template>\n <template v-else-if=\"dataForm.type === 6\">\n <el-form-item prop=\"minioEndPoint\" :label=\"$t('oss.minioEndPoint')\">\n <el-input v-model=\"dataForm.minioEndPoint\" :placeholder=\"$t('oss.minioEndPointTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"minioAccessKey\" :label=\"$t('oss.minioAccessKey')\">\n <el-input v-model=\"dataForm.minioAccessKey\" :placeholder=\"$t('oss.minioAccessKeyTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"minioSecretKey\" :label=\"$t('oss.minioSecretKey')\">\n <el-input v-model=\"dataForm.minioSecretKey\" :placeholder=\"$t('oss.minioSecretKeyTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"minioBucketName\" :label=\"$t('oss.minioBucketName')\">\n <el-input v-model=\"dataForm.minioBucketName\" :placeholder=\"$t('oss.minioBucketNameTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"minioPrefix\" :label=\"$t('oss.minioPrefix')\">\n <el-input v-model=\"dataForm.minioPrefix\" :placeholder=\"$t('oss.minioPrefixTips')\"></el-input>\n </el-form-item>\n </template>\n </el-form>\n <template slot=\"footer\">\n <el-button @click=\"visible = false\">{{ $t('cancel') }}</el-button>\n <el-button type=\"primary\" @click=\"dataFormSubmitHandle()\">{{ $t('confirm') }}</el-button>\n </template>\n </el-dialog>\n</template>\n\n<script>\nimport debounce from 'lodash/debounce'\nexport default {\n data () {\n return {\n visible: false,\n dataForm: {\n type: 0,\n qiniuDomain: '',\n qiniuPrefix: '',\n qiniuAccessKey: '',\n qiniuSecretKey: '',\n qiniuBucketName: '',\n aliyunDomain: '',\n aliyunPrefix: '',\n aliyunEndPoint: '',\n aliyunAccessKeyId: '',\n aliyunAccessKeySecret: '',\n aliyunBucketName: '',\n qcloudDomain: '',\n qcloudPrefix: '',\n qcloudAppId: 0,\n qcloudSecretId: '',\n qcloudSecretKey: '',\n qcloudBucketName: '',\n qcloudRegion: '',\n fastdfsDomain: '',\n localDomain: '',\n localPrefix: '',\n localPath: ''\n }\n }\n },\n computed: {\n dataRule () {\n return {\n qiniuDomain: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n qiniuAccessKey: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n qiniuSecretKey: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n qiniuBucketName: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n aliyunDomain: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n aliyunEndPoint: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n aliyunAccessKeyId: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n aliyunAccessKeySecret: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n aliyunBucketName: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n qcloudDomain: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n qcloudAppId: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n qcloudSecretId: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n qcloudSecretKey: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n qcloudBucketName: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n qcloudRegion: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n fastdfsDomain: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n localDomain: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n localPath: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n minioEndPoint: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n minioAccessKey: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n minioSecretKey: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n minioBucketName: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ]\n }\n }\n },\n watch: {\n 'dataForm.type' (val) {\n this.$refs['dataForm'].clearValidate()\n }\n },\n methods: {\n init () {\n this.visible = true\n this.$nextTick(() => {\n this.$refs['dataForm'].resetFields()\n this.getInfo()\n })\n },\n // 获取信息\n getInfo () {\n this.$http.get('/oss/file/info').then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.dataForm = res.data\n }).catch(() => {})\n },\n // 表单提交\n dataFormSubmitHandle: debounce(function () {\n this.$refs['dataForm'].validate((valid) => {\n if (!valid) {\n return false\n }\n this.$http.post('/oss/file', this.dataForm).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.$message({\n message: this.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: () => {\n this.visible = false\n this.$emit('refreshDataList')\n }\n })\n }).catch(() => {})\n })\n }, 1000, { 'leading': true, 'trailing': false })\n }\n}\n</script>\n"],"sourceRoot":"src/views/modules/oss"}]} |