| | |
| | | <!-- |
| | | * @Date: 2024-01-05 23:47:53 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-15 23:04:12 |
| | | * @LastEditTime: 2024-01-15 23:13:00 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/Map.vue |
| | | --> |
| | | <template> |
| | |
| | | <div class="table-tool"> |
| | | <slot name="tool"></slot> |
| | | <el-button v-show="!id" class="input" type="primary" size="mini" @click="out">退出</el-button> |
| | | <el-button class="input" type="primary" size="mini" @click="save">保存地图</el-button> |
| | | <el-button class="input" type="primary" size="mini" @click="save">保存</el-button> |
| | | <el-button v-show="id" class="input" type="primary" size="mini" @click="del">删除</el-button> |
| | | <el-button class="input" size="mini" type="primary" v-show="status !==2" @click="createMap">生成地图</el-button> |
| | | <span>行:</span> |
| | | <span>行数:</span> |
| | | <el-input class="input" v-show="status !==2" v-model="rows" /> |
| | | <span>列:</span> |
| | | <span>列数:</span> |
| | | <el-input class="input" v-show="status !==2" v-model="cols" /> |
| | | <div class="plant-name" v-if="status===2">{{plantName}}</div> |
| | | <el-input class="plant-name" v-if="status!==2" v-model="plantName" placeholder="请输入厂名"/> |
| | | |
| | | </div> |
| | | <div class="table" :class="$route.name ==='preview' ? 'active' : ''" > |
| | | <div class="table-action" :style="position" v-show="showAction && status !== 2"> |
| | |
| | | this.addStatus = true |
| | | this.currentAdd = v |
| | | }, |
| | | del () { |
| | | this.$http.postJson('/plant/delete',{ |
| | | ids: [this.id] |
| | | }).then(res => { |
| | | this.$emit('out') |
| | | }) |
| | | }, |
| | | save () { |
| | | if (!this.id) { |
| | | this.$http.postJson('/plant/save',{ |
| | |
| | | font-size: 12px; |
| | | align-items: center; |
| | | &>.input { |
| | | width: 80px; |
| | | min-width: 80px; |
| | | max-width: 200px; |
| | | margin-inline: 10px; |
| | | } |
| | | .plant-name { |