forked from zhurui/management
1 line
20 KiB
JSON
1 line
20 KiB
JSON
{"remainingRequest":"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//\n\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",{"version":3,"sources":["oss-config.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8HA;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;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":"oss-config.vue","sourceRoot":"src/views/modules/oss","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"]}]} |