{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\views\\resourceApply\\components\\applyForm.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\resourceApply\\components\\applyForm.vue","mtime":1724436823385},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\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/es6.regexp.split\";\nimport \"core-js/modules/es6.object.keys\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.array.sort\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(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//\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//\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//\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//\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//\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//\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//\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 utils from '@/utils';\nimport _ from 'lodash';\nimport moment from 'moment';\nimport api from \"./../js/api.js\";\nimport applyDetailForm from \"./applyDetailForm.vue\";\nimport applyApproval from \"./applyApproval.vue\";\nimport fileUpload from '@/components/upload/fileListUpload.vue';\nimport applyRecord from \"./applyRecord.vue\";\nexport default {\n name: 'applyForm',\n components: {\n fileUpload: fileUpload,\n applyApproval: applyApproval,\n applyDetailForm: applyDetailForm,\n applyRecord: applyRecord\n },\n data: function data() {\n return {\n dialogVisible: false,\n type: '',\n activeNames: ['1'],\n cloudType: [],\n id: '',\n loading: false,\n applyform: {\n applyDate: moment().format('YYYY-MM-DD'),\n cloudType: null,\n cloudApplyFile: [],\n cloudApplyUseDetailedList: [{\n cloudType: 1,\n useType: 1\n }, {\n cloudType: 1,\n useType: 2\n }, {\n cloudType: 2,\n useType: 1\n }, {\n cloudType: 2,\n useType: 2\n }]\n },\n applyformRules: {\n applyUnitName: [{\n required: true,\n message: '请输入单位名称',\n trigger: ['blur', 'change']\n }],\n applyUnitContacts: [{\n required: true,\n message: '请输入单位联系人',\n trigger: ['blur', 'change']\n }],\n applyUnitContactsPhone: [{\n required: true,\n message: '请输入单位联系人电话',\n trigger: ['blur', 'change']\n }, {\n pattern: /^1[3-9]\\d{9}$/,\n message: '手机格式不正确',\n trigger: ['blur', 'change']\n }],\n applyUnitContactsMail: [{\n required: true,\n message: '请输入邮箱',\n trigger: ['blur', 'change']\n }, {\n type: 'email',\n message: '邮箱格式不正确',\n trigger: ['blur', 'change']\n }],\n applyDate: [{\n required: true,\n message: '请选择申请时间',\n trigger: ['blur', 'change']\n }],\n applyAppName: [{\n required: true,\n message: '请输入应用系统名称',\n trigger: ['blur', 'change']\n }],\n applyAppDevelopUnit: [{\n required: true,\n message: '请输入应用开发单位',\n trigger: ['blur', 'change']\n }],\n cloudType: [{\n required: true,\n message: '请选择资源所属云平台',\n trigger: ['blur', 'change']\n }],\n appPurpose: [{\n required: true,\n message: '请输入软件用途简要说明',\n trigger: ['blur', 'change']\n }],\n applyAppContracts: [{\n required: true,\n message: '请输入应用系统联系人',\n trigger: ['blur', 'change']\n }],\n applyAppContractsPhone: [{\n required: true,\n message: '请输入应用系统联系人电话',\n trigger: ['blur', 'change']\n }, {\n pattern: /^1[3-9]\\d{9}$/,\n message: '手机格式不正确',\n trigger: ['blur', 'change']\n }],\n virtualMachineNum: [{\n required: true,\n message: '请输入虚拟机数量',\n trigger: ['blur', 'change']\n }],\n cpuNum: [{\n required: true,\n message: '请输入CPU核数',\n trigger: ['blur', 'change']\n }],\n memoryCapacity: [{\n required: true,\n message: '请输入内存容量',\n trigger: ['blur', 'change']\n }],\n dataCapacity: [{\n required: true,\n message: '请输入数据量',\n trigger: ['blur', 'change']\n }],\n applyUnitOpinion: [{\n required: true,\n message: '请输入申请单位意见',\n trigger: ['blur', 'change']\n }],\n managerUnitOpinion: [{\n required: true,\n message: '请输入主管单位意见',\n trigger: ['blur', 'change']\n }],\n cpuNumTotal: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }, {\n validator: this.validateCpuNumTotal,\n trigger: ['blur', 'change']\n }],\n cpuNumUse: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }, {\n validator: this.validateCpuNumUse,\n trigger: ['blur', 'change']\n }],\n cpuNumUseRate: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n memoryCapacityTotal: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }, {\n validator: this.validateCapacityTotal,\n trigger: ['blur', 'change']\n }],\n memoryCapacityUse: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }, {\n validator: this.validateCapacityUse,\n trigger: ['blur', 'change']\n }],\n memoryCapacityUseRate: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n storageCapacityTotal: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }, {\n validator: this.validateStorageTotal,\n trigger: ['blur', 'change']\n }],\n storageCapacityUse: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }, {\n validator: this.validateStorageUse,\n trigger: ['blur', 'change']\n }],\n storageCapacityUseRate: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }]\n },\n dadToSon: {\n bizPath: 'resourceApply',\n fileList: []\n },\n saving: false,\n loadingDetail: false,\n detailTableData: [],\n detailDelId: [],\n readOnly: false,\n audit: false,\n finish: false,\n pageType: '',\n originUseData: [{\n cloudType: 1,\n useType: 1\n }, {\n cloudType: 1,\n useType: 2\n }, {\n cloudType: 2,\n useType: 1\n }, {\n cloudType: 2,\n useType: 2\n }] // 资源使用情况原始数据 第一次为空值\n };\n },\n created: function created() {},\n methods: {\n handleInitDict: function handleInitDict() {\n this.cloudType = utils.getDictItemsFromCache('cloud_type');\n if (this.cloudType.length) {\n this.applyform.cloudType = parseInt(this.cloudType[0].value);\n }\n },\n handleOpen: function handleOpen(pageType, type, applyData) {\n this.pageType = pageType;\n this.type = type;\n this.handleInitDict();\n if (type === 'add') {\n this.dialogVisible = true;\n this.getCloudUseage('init');\n } else if (type === 'edit') {\n this.id = applyData.id;\n this.handleQueryApply();\n this.handleQueryApplyDetail();\n this.getCloudUseage();\n }\n },\n // 新增时获取云资源使用情况\n getCloudUseage: function getCloudUseage(type) {\n var _this = this;\n this.loading = true;\n api.getCloudUseage().then(function (res) {\n if (res.state && res.value && res.value.length) {\n var tempData = [];\n res.value.sort(function (a, b) {\n return a.cloudType - b.cloudType;\n });\n res.value.forEach(function (item) {\n var newItem = {\n cloudType: item.cloudType,\n cpuNumTotal: item.cpuNumTotal,\n cpuNumUse: item.cpuNumUse,\n cpuNumUseRate: item.cpuNumUseRate,\n memoryCapacityTotal: item.memoryCapacityTotal,\n memoryCapacityUse: item.memoryCapacityUse,\n memoryCapacityUseRate: item.memoryCapacityUseRate,\n storageCapacityTotal: item.storageCapacityTotal,\n storageCapacityUse: item.storageCapacityUse,\n storageCapacityUseRate: item.storageCapacityUseRate\n };\n tempData.push(_objectSpread(_objectSpread({}, newItem), {}, {\n useType: 1\n }));\n tempData.push(_objectSpread(_objectSpread({}, newItem), {}, {\n useType: 2\n }));\n });\n if (type == 'init') {\n _this.applyform.cloudApplyUseDetailedList = tempData;\n }\n _this.originUseData = _.cloneDeep(tempData);\n }\n }).finally(function () {\n _this.loading = false;\n });\n },\n handleFileChange: function handleFileChange(data) {\n this.applyform.cloudApplyFile = data;\n },\n handleRecord: function handleRecord() {\n var _this2 = this;\n this.$nextTick(function () {\n _this2.$refs.applyRecord.handleOpen(_this2.applyform);\n });\n },\n handleSave: function handleSave() {\n var _this3 = this;\n this.saving = true;\n this.$refs.applyform.validate(function (bool, object) {\n if (bool) {\n var submitData = {};\n var tempData = _.cloneDeep(_this3.applyform);\n submitData.cloudApply = tempData;\n submitData.cloudApplyUseDetailedList = tempData.cloudApplyUseDetailedList;\n delete submitData.cloudApply.cloudApplyUseDetailedList;\n console.log(submitData);\n api.saveApply(submitData).then(function (res) {\n if (res.state) {\n _this3.id = res.value;\n _this3.$message.success('云资源申请基础信息保存成功!');\n } else {\n _this3.$message.warning(res.message);\n }\n }).finally(function () {\n _this3.saving = false;\n });\n } else {\n _this3.$message.warning(\"\\u6709\".concat(Object.keys(object).length, \"\\u4E2A\\u5B57\\u6BB5\\u672A\\u901A\\u8FC7\\u6821\\u9A8C\\uFF0C\\u8BF7\\u6B63\\u786E\\u586B\\u5199\\u8868\\u5355\\u5185\\u5BB9\\u3002\"));\n _this3.saving = false;\n }\n });\n },\n handleQueryApply: function handleQueryApply() {\n var _this4 = this;\n this.loading = true;\n api.getApply(this.id).then(function (res) {\n if (res.cloudApply) _this4.applyform = res.cloudApply;\n if (res.cloudApplyUseDetailedList) {\n _this4.applyform.cloudApplyUseDetailedList = res.cloudApplyUseDetailedList;\n }\n _this4.status = _this4.applyform.status;\n if (_this4.applyform.status === 0 || _this4.applyform.status === 20) {\n _this4.readOnly = false;\n } else {\n _this4.readOnly = true;\n }\n if (_this4.applyform.status === 10) {\n _this4.audit = true;\n } else {\n _this4.audit = false;\n }\n if (_this4.applyform.status === 30) {\n _this4.finish = true;\n _this4.activeNames = ['2'];\n } else {\n _this4.finish = false;\n }\n if (_this4.applyform.cloudApplyFile) {\n _this4.$set(_this4.dadToSon, 'fileList', _this4.applyform.cloudApplyFile);\n } else {\n _this4.$set(_this4.dadToSon, 'fileList', []);\n }\n _this4.dialogVisible = true;\n }).finally(function () {\n _this4.loading = false;\n });\n },\n // 查询资源明细\n handleQueryApplyDetail: function handleQueryApplyDetail() {\n var _this5 = this;\n this.loadingDetail = true;\n api.getApplyDetail(this.id).then(function (res) {\n _this5.detailTableData = res.value || [];\n }).finally(function () {\n _this5.loadingDetail = false;\n });\n },\n handleAddDetail: function handleAddDetail() {\n var _this6 = this;\n if (!this.id) {\n this.$message.warning('请先保存云资源申请基础信息,再添加资源申请明细!');\n return;\n } else {\n this.$nextTick(function () {\n _this6.$refs.applyDetailForm.handleOpen(_this6.pageType, 'add', _this6.id, {\n cloudType: _this6.applyform.cloudType\n });\n });\n }\n },\n handleEditDetail: function handleEditDetail(row) {\n var _this7 = this;\n this.$nextTick(function () {\n var type = 'edit';\n if (_this7.readOnly) {\n type = 'readOnly';\n }\n if (_this7.finish && _this7.readOnly) {\n type = 'excute';\n }\n _this7.$refs.applyDetailForm.handleOpen(_this7.pageType, type, _this7.id, row);\n });\n },\n handleSelectionChange: function handleSelectionChange(selection) {\n this.detailDelId = selection.map(function (item) {\n return item.cloudApplyDetail.id;\n });\n },\n handleDelDetail: function handleDelDetail() {\n var _this8 = this;\n this.$confirm('确定删除吗?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n var ids = _this8.detailDelId.join(',');\n api.deleteApplyDetail(ids).then(function (res) {\n if (res.state) {\n _this8.$message.success('资源申请明细删除成功!');\n _this8.handleQueryApplyDetail();\n } else {\n _this8.$message.warning(res.message);\n }\n });\n });\n },\n // 审核\n handleApproval: function handleApproval(type) {\n var _this9 = this;\n if (!this.id) {\n this.$message.warning('请先填写私有云资源信息,再发起审核!');\n return;\n } else if (!this.detailTableData.length) {\n this.$message.warning('请先填写私有云资源申请明细,再发起审核!');\n return;\n } else {\n this.$nextTick(function () {\n _this9.$refs.applyApproval.handleOpen(type, _this9.id);\n });\n }\n },\n handleClose: function handleClose() {\n this.$set(this.dadToSon, 'fileList', []);\n this.activeNames = ['1'];\n this.type = '';\n this.readOnly = false;\n this.audit = false;\n this.finish = false;\n this.pageType = '';\n this.id = '';\n this.applyform = {\n applyDate: moment().format('YYYY-MM-DD'),\n cloudType: null,\n cloudApplyFile: [],\n cloudApplyUseDetailedList: [{\n cloudType: 1,\n useType: 1\n }, {\n cloudType: 1,\n useType: 2\n }, {\n cloudType: 2,\n useType: 1\n }, {\n cloudType: 2,\n useType: 2\n }]\n };\n this.detailTableData = [];\n this.detailDelId = [];\n this.originUseData = []; // 资源使用情况原始数据\n this.$emit('reload');\n this.dialogVisible = false;\n },\n // 云平台类型变化,清空应用系统规模数据,还原分配后数据\n handleChangeCloudType: function handleChangeCloudType() {\n delete this.applyform.cpuNum;\n delete this.applyform.dataCapacity;\n delete this.applyform.memoryCapacity;\n this.applyform.cloudApplyUseDetailedList = _.cloneDeep(this.originUseData);\n this.$forceUpdate();\n },\n // 申请数据变化,增加使用值\n handleChangeApplyUse: function handleChangeApplyUse(dataType, cloudType, curV) {\n var changeData, originData, index;\n if (cloudType === 1) {\n changeData = this.applyform.cloudApplyUseDetailedList[1];\n originData = this.originUseData[1];\n index = 1;\n } else if (cloudType === 2) {\n changeData = this.applyform.cloudApplyUseDetailedList[3];\n originData = this.originUseData[3];\n index = 3;\n }\n var currentValTans = curV;\n // 内容、储存字段需单位换算 G -> TB 保留2位小数\n if (dataType !== 'cpuNum') {\n currentValTans = parseFloat((curV / 1024).toFixed(2));\n }\n changeData[\"\".concat(dataType, \"Use\")] = parseFloat((originData[\"\".concat(dataType, \"Use\")] + currentValTans).toFixed(2));\n changeData[\"\".concat(dataType, \"UseRate\")] = parseFloat((changeData[\"\".concat(dataType, \"Use\")] / changeData[\"\".concat(dataType, \"Total\")] * 100).toFixed(2));\n this.applyform.cloudApplyUseDetailedList.splice(index, 1, changeData);\n },\n // 总数据变化计算比率\n handleChangeTotal: function handleChangeTotal(dataType, index, curV) {\n var changeData = this.applyform.cloudApplyUseDetailedList[index];\n changeData[\"\".concat(dataType, \"UseRate\")] = parseFloat((changeData[\"\".concat(dataType, \"Use\")] / curV * 100).toFixed(2));\n this.applyform.cloudApplyUseDetailedList.splice(index, 1, changeData);\n },\n // 使用数据变化计算比率\n handleChangeUse: function handleChangeUse(dataType, index, curV) {\n var changeData = this.applyform.cloudApplyUseDetailedList[index];\n changeData[\"\".concat(dataType, \"UseRate\")] = parseFloat((curV / changeData[\"\".concat(dataType, \"Total\")] * 100).toFixed(2));\n this.applyform.cloudApplyUseDetailedList.splice(index, 1, changeData);\n },\n // 数据字段校验\n validateCpuNumTotal: function validateCpuNumTotal(rule, value, callback) {\n var index = rule.field.split('.')[1];\n var target = this.applyform.cloudApplyUseDetailedList[index];\n if (target.cpuNumUse > value) {\n callback(new Error('CPU总核心数小于使用核心数!'));\n } else {\n callback();\n }\n },\n validateCpuNumUse: function validateCpuNumUse(rule, value, callback) {\n var index = rule.field.split('.')[1];\n var target = this.applyform.cloudApplyUseDetailedList[index];\n if (target.cpuNumTotal < value) {\n callback(new Error('CPU使用核心数超过总核心数!'));\n } else {\n callback();\n }\n },\n validateCapacityTotal: function validateCapacityTotal(rule, value, callback) {\n var index = rule.field.split('.')[1];\n var target = this.applyform.cloudApplyUseDetailedList[index];\n if (target.memoryCapacityUse > value) {\n callback(new Error('内存总容量数小于使用容量!'));\n } else {\n callback();\n }\n },\n validateCapacityUse: function validateCapacityUse(rule, value, callback) {\n var index = rule.field.split('.')[1];\n var target = this.applyform.cloudApplyUseDetailedList[index];\n if (target.memoryCapacityTotal < value) {\n callback(new Error('内存使用容量数超过总容量!'));\n } else {\n callback();\n }\n },\n validateStorageTotal: function validateStorageTotal(rule, value, callback) {\n var index = rule.field.split('.')[1];\n var target = this.applyform.cloudApplyUseDetailedList[index];\n if (target.storageCapacityUse > value) {\n callback(new Error('储存总容量小于使用容量!'));\n } else {\n callback();\n }\n },\n validateStorageUse: function validateStorageUse(rule, value, callback) {\n var index = rule.field.split('.')[1];\n var target = this.applyform.cloudApplyUseDetailedList[index];\n if (target.storageCapacityTotal < value) {\n callback(new Error('储存使用容量超过总容量!'));\n } else {\n callback();\n }\n } // 数据字段校验\n }\n};",null]}