| | |
| | | border |
| | | style="width: 100%; margin-top: 20px"> |
| | | <el-table-column |
| | | prop="platform" |
| | | prop="platformName" |
| | | label="平台名称"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="amount1" |
| | | prop="area" |
| | | label="行政区域"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="IP" |
| | | prop="platformIP" |
| | | label="平台IP"> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | }, |
| | | checkDeployList() { |
| | | if (this.addForm.deployList) { |
| | | return |
| | | } else { |
| | | this.addForm.deployList = this.addForm.deployList.filter(item => { |
| | | if (item.platformName && item.platformIp && item.remark && item.area) { |
| | | return true |
| | | } |
| | | return item.platformName || item.platformIp || item.remark || item.area; |
| | | }) |
| | | } |
| | | }, |
| | |
| | | if (valid) { |
| | | this.checkDeployList() |
| | | if (this.addForm.deployList) { |
| | | console.log(this.addForm.deployList[0]) |
| | | this.addForm.deployList.forEach(item => { |
| | | if (!item.platformName || !item.platformIp || !item.area) { |
| | | this.$message.error("请检查平台部署信息是否填写完整") |
| | | return |
| | | } |
| | | }) |
| | | console.log(this.addForm.deployList) |
| | | if (this.addForm.deployList.some(item => !item.platformName || !item.platformIP || !item.area)) { |
| | | this.$message.error("请检查平台部署信息是否填写完整"); |
| | | return; // 退出 validate 回调 |
| | | } |
| | | } |
| | | addPlatform(this.addForm).then(res => { |
| | | this.$message.success("添加成功") |
| | |
| | | this.getList() |
| | | }, |
| | | spanMethod({ row, column, rowIndex, columnIndex }) { |
| | | |
| | | if (columnIndex === 0) { |
| | | if (rowIndex % 2 === 0) { |
| | | return { |
| | | rowspan: 2, |
| | | colspan: 1 |
| | | }; |
| | | } else { |
| | | return { |
| | | rowspan: 0, |
| | | colspan: 0 |
| | | }; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |