| | |
| | | <template> |
| | | <div> |
| | | <div class="areas"> |
| | | <div class="top-operation"> |
| | | <el-button type="primary" size="small" @click="createArea">新增区域</el-button> |
| | | </div> |
| | | <el-table :data="groups" border> |
| | | <el-table :data="groups" border height="calc(100% - 100px)"> |
| | | <el-table-column type="index" width="50" label="序号" align="center"></el-table-column> |
| | | <el-table-column prop="name" label="区域名称" align="center" sortable></el-table-column> |
| | | <el-table-column prop="id" label="区域ID" align="center" sortable></el-table-column> |
| | |
| | | |
| | | return; |
| | | } |
| | | |
| | | let sameOne = this.groups.findIndex(item => item.id == this.areaForm.id); |
| | | if(sameOne>=0){ |
| | | this.$notify({ |
| | | type: 'error', |
| | | message: '区域ID不能重复' |
| | | }); |
| | | return; |
| | | } |
| | | let tempArr = []; |
| | | let tempIdArr = []; |
| | | this.areaForm.camPolygons = []; |
| | |
| | | .red { |
| | | color: rgb(255, 94, 0); |
| | | } |
| | | .areas{ |
| | | width: 100%; |
| | | height: calc(100% - 60px); |
| | | } |
| | | .top-operation { |
| | | padding: 30px 30px 20px; |
| | | display: flex; |