forked from zhurui/management
1 line
18 KiB
JSON
1 line
18 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\\sys\\access-version-add.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\sys\\access-version-add.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":["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 \"core-js/modules/es6.regexp.search\";\nimport _defineProperty from \"C:\\\\Users\\\\27446\\\\Desktop\\\\up\\\\front\\\\dkha-web-sz-main\\\\node_modules\\\\@babel\\\\runtime-corejs2/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\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 { getDictDataList, treeDataTranslate } from '@/utils';\nimport debounce from 'lodash/debounce';\nimport Cookies from 'js-cookie';\nexport default {\n data: function data() {\n return {\n dialogVisible: false,\n loading: false,\n uploadLoading: false,\n dataForm: {\n aeMainboard: '',\n aevPackname: '',\n aevVersion: '',\n aevVersioncode: '',\n aevUpdatefilepath: '',\n aevNote: ''\n },\n eightInchesEquipTypeList: getDictDataList('eightInchesEquipType'),\n rules: {\n aeMainboard: [{\n required: true,\n message: '请选择',\n trigger: ['blur', 'change']\n }],\n aevPackname: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n aevVersion: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n aevVersioncode: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }, {\n validator: function validator(rule, value, callback) {\n if (!/^[0-9]+$/.test(value)) {\n return callback(new Error(\"版本号必须全部为数字\"));\n }\n\n callback();\n },\n trigger: ['blur', 'change']\n }],\n aevUpdatefilepath: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n aevNote: [{\n required: true,\n message: '请选择',\n trigger: ['blur', 'change']\n }]\n },\n baseUrl: window.SITE_CONFIG['apiURL'],\n uploadUrl: '/system/scaidooreightversion/uploadapkfile',\n uploadHeaders: {}\n };\n },\n created: function created() {\n this.uploadHeaders = {\n Authorization: 'Bearer ' + Cookies.get('access_token') || ''\n };\n },\n methods: {\n init: function init(data) {\n var _this = this;\n\n this.dialogVisible = true; // 新增\n\n this.dataForm = {\n aeMainboard: '',\n aevPackname: '',\n aevVersion: '',\n aevVersioncode: '',\n aevUpdatefilepath: '',\n aevNote: ''\n };\n this.$nextTick(function () {\n _this.$refs['dataForm'].clearValidate();\n });\n },\n submitInfo: debounce(function () {\n var _this2 = this;\n\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n\n _this2.loading = true;\n\n var submitData = _objectSpread({}, _this2.dataForm);\n\n _this2.$http({\n url: \"/system/scaidooreightversion\",\n method: 'post',\n data: submitData\n }).then(function (_ref) {\n var data = _ref.data;\n\n if (data.code != 0) {\n return _this2.$message.error(data.msg);\n }\n\n _this2.dialogVisible = false;\n\n if (_this2.type == 'post') {\n _this2.$parent.$parent.resetForm('ruleForm');\n } else {\n _this2.$parent.$parent.search();\n }\n\n _this2.$message.success(data.msg || '操作成功');\n }).finally(function () {\n _this2.loading = false;\n });\n });\n }, 1000),\n beforeUpload: function beforeUpload(file) {\n this.uploadLoading = true;\n return true;\n },\n handleError: function handleError(err, file) {\n this.uploadLoading = false;\n this.$message.error(err);\n },\n handleSuccess: function handleSuccess(res) {\n this.uploadLoading = false;\n\n if (res.code != 0) {\n return this.$message.error(res.msg);\n }\n\n this.dataForm.aevUpdatefilepath = res.data;\n this.$message.success(res.msg || '上传成功');\n }\n }\n};",{"version":3,"sources":["access-version-add.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,S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uDA,IAAA,aAvDA,yBAuDA,GAvDA,EAuDA;AACA,WAAA,aAAA,GAAA,KAAA;;AACA,UAAA,GAAA,CAAA,IAAA,IAAA,CAAA,EAAA;AACA,eAAA,KAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA;AACA;;AACA,WAAA,QAAA,CAAA,iBAAA,GAAA,GAAA,CAAA,IAAA;AACA,WAAA,QAAA,CAAA,OAAA,CAAA,GAAA,CAAA,GAAA,IAAA,MAAA;AACA;AA9DA;AAnDA,CAAA","sourcesContent":["<template>\n <el-dialog\n title=\"新建\"\n :visible.sync=\"dialogVisible\"\n :close-on-click-modal=\"false\"\n >\n <div>\n <el-form ref=\"dataForm\" :model=\"dataForm\" :rules=\"rules\" label-width=\"120px\">\n <el-row>\n <el-col :span=\"12\">\n <el-form-item label=\"设备主板芯片\" prop=\"aeMainboard\">\n <el-select v-model=\"dataForm.aeMainboard\" placeholder=\"请选择\">\n <el-option\n v-for=\"item in eightInchesEquipTypeList\"\n :key=\"item.dictValue\"\n :label=\"item.dictLabel\"\n :value=\"item.dictValue\">\n </el-option>\n </el-select>\n </el-form-item>\n </el-col>\n <el-col :span=\"11\" :offset=\"1\">\n <el-form-item label=\"程序包名称\" prop=\"aevPackname\">\n <el-input v-model=\"dataForm.aevPackname\" placeholder=\"请输入\"></el-input>\n </el-form-item>\n </el-col>\n </el-row>\n <el-row>\n <el-col :span=\"12\">\n <el-form-item label=\"程序版本号\" prop=\"aevVersion\">\n <el-input v-model=\"dataForm.aevVersion\" placeholder=\"请输入\"></el-input>\n </el-form-item>\n </el-col>\n <el-col :span=\"11\" :offset=\"1\">\n <el-form-item label=\"程序版本code\" prop=\"aevVersioncode\">\n <el-input v-model=\"dataForm.aevVersioncode\" placeholder=\"请输入\"></el-input>\n </el-form-item>\n </el-col>\n </el-row>\n <el-row>\n <el-col :span=\"12\">\n <el-form-item label=\"固件地址\" prop=\"aevUpdatefilepath\">\n <el-input readonly v-model=\"dataForm.aevUpdatefilepath\" placeholder=\"请点击右侧按钮上传\"></el-input>\n </el-form-item>\n \n </el-col>\n <el-col :span=\"11\" :offset=\"1\">\n <el-upload\n ref=\"upload\"\n class=\"upload-box\"\n accept=\"application/vnd.android.package-archive\"\n :action=\"baseUrl+uploadUrl\"\n :headers=\"uploadHeaders\"\n :before-upload=\"beforeUpload\"\n :on-success=\"handleSuccess\"\n :on-error=\"handleError\"\n :show-file-list=\"false\"\n >\n <el-button type=\"warning\" v-loading=\"uploadLoading\">点击上传</el-button><span>请上传apk文件</span>\n </el-upload>\n </el-col>\n </el-row>\n <el-row>\n <el-col>\n <el-form-item label=\"版本说明\" prop=\"aevNote\">\n <el-input type=\"textarea\" v-model=\"dataForm.aevNote\" :rows=\"3\" resize=\"none\" placeholder=\"请输入\"></el-input>\n </el-form-item>\n </el-col>\n </el-row>\n </el-form>\n </div>\n <div slot=\"footer\">\n <el-button @click=\"dialogVisible = false\">取 消</el-button>\n <el-button type=\"primary\" v-loading=\"loading\" @click=\"submitInfo\">确 定</el-button>\n </div>\n </el-dialog>\n</template>\n<script>\nimport { getDictDataList,treeDataTranslate} from '@/utils'\nimport debounce from 'lodash/debounce';\nimport Cookies from 'js-cookie';\nexport default {\n data(){\n return {\n dialogVisible:false,\n loading:false,\n uploadLoading:false,\n dataForm:{\n aeMainboard:'',\n aevPackname:'',\n aevVersion:'',\n aevVersioncode:'',\n aevUpdatefilepath:'',\n aevNote:'',\n },\n eightInchesEquipTypeList:getDictDataList('eightInchesEquipType'),\n rules:{\n aeMainboard:[\n {required: true, message:'请选择', trigger: ['blur','change']}\n ],\n aevPackname:[\n {required: true, message:'请输入', trigger: ['blur','change']},\n ],\n aevVersion:[\n {required: true, message:'请输入', trigger: ['blur','change']},\n ],\n aevVersioncode:[\n {required: true, message:'请输入', trigger: ['blur','change']},\n {validator: (rule, value, callback)=>{\n if (!/^[0-9]+$/.test(value)) {\n return callback(new Error(\"版本号必须全部为数字\"));\n }\n callback()\n }, trigger: ['blur','change']}\n ],\n aevUpdatefilepath:[\n {required: true, message:'请输入', trigger: ['blur','change']}\n ],\n aevNote:[\n {required: true, message:'请选择', trigger: ['blur','change']}\n ]\n },\n baseUrl: window.SITE_CONFIG['apiURL'],\n uploadUrl:'/system/scaidooreightversion/uploadapkfile',\n uploadHeaders: {},\n }\n },\n created() {\n this.uploadHeaders = {\n Authorization: 'Bearer ' + Cookies.get('access_token') || ''\n }\n },\n methods:{\n init(data){\n this.dialogVisible=true;\n // 新增\n this.dataForm={\n aeMainboard:'',\n aevPackname:'',\n aevVersion:'',\n aevVersioncode:'',\n aevUpdatefilepath:'',\n aevNote:'',\n }\n this.$nextTick(()=>{\n this.$refs['dataForm'].clearValidate()\n })\n },\n submitInfo:debounce(function(){\n this.$refs['dataForm'].validate((valid)=>{\n if(!valid){\n return false\n }\n this.loading=true;\n let submitData={\n ...this.dataForm,\n }\n this.$http({\n url:\"/system/scaidooreightversion\",\n method:'post',\n data:submitData\n }).then(({data})=>{\n if(data.code!=0){\n return this.$message.error(data.msg)\n }\n this.dialogVisible=false;\n if(this.type=='post'){\n this.$parent.$parent.resetForm('ruleForm');\n }\n else{\n this.$parent.$parent.search();\n }\n this.$message.success(data.msg||'操作成功')\n }).finally(()=>{\n this.loading=false;\n })\n })\n \n },1000),\n beforeUpload(file){\n this.uploadLoading=true;\n return true\n },\n handleError(err,file){\n this.uploadLoading=false;\n this.$message.error(err)\n },\n handleSuccess(res) {\n this.uploadLoading=false;\n\t\t\t\tif (res.code != 0) {\n return this.$message.error(res.msg)\n } \n this.dataForm.aevUpdatefilepath=res.data;\n this.$message.success(res.msg||'上传成功')\n\t\t\t},\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n.el-dialog {\n .el-form {\n .el-form-item {\n .el-date-editor--date,\n .el-cascader,\n .el-select {\n width: 100%;\n }\n }\n .el-upload{\n .el-button{\n margin-right: 20px;\n }\n span{\n color: #fff;\n }\n }\n }\n}\n</style>"],"sourceRoot":"src/views/modules/sys"}]} |