| | |
| | | <!-- |
| | | * @Date: 2024-01-05 22:26:22 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-15 22:09:41 |
| | | * @LastEditTime: 2024-01-17 23:29:15 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/mapPreview/index.vue |
| | | --> |
| | | <template> |
| | | <div class="workshop"> |
| | | <Map v-if="status === 0 || status === 1 && id" :status="status" :currentMap="currentMap" :name="plantName" :id="id" |
| | | @out="out" /> |
| | | <div v-else class="preview"> |
| | | <div class="preview"> |
| | | <LeftStatus class="left" :info="info"> |
| | | <template> |
| | | <!-- <div @click="editMap" class="edit-btn"> |
| | | {{ id ? '进入编辑状态' : '新增' }} |
| | | </div> --> |
| | | <el-select clearable class="left-select" v-model="id" placeholder="请选择"> |
| | | <el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | |
| | | <div class="right"> |
| | | <Status v-show="id" :info="info" /> |
| | | <div class="preview-map"> |
| | | <Map v-if="id" :status="2" :currentMap="currentMap" @out="out" /> |
| | | <Map v-if="id" :id="id" :status="2" :currentMap="currentMap" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | import LeftStatus from './LeftStatus.vue' |
| | | import { getRequest, getUrl } from '@/api/Api' |
| | | import { mapGetters } from 'vuex' |
| | | |
| | | export default { |
| | | components: { |
| | | Map, |
| | |
| | | }, |
| | | methods: { |
| | | getMapList() { |
| | | // this.$store.dispatch('GetPlanList', {}) |
| | | |
| | | this.$store.dispatch('GetPlanList', {}).then(res => { |
| | | try { |
| | | this.mapList = this.workshopList.filter(v => v.gridSetting && v.gridSetting != '{}') |
| | |
| | | console.error(error) |
| | | } |
| | | }) |
| | | }, |
| | | editMap() { |
| | | if (this.id) { |
| | | this.status = 1 |
| | | } else { |
| | | this.status = 0 |
| | | } |
| | | }, |
| | | out() { |
| | | this.status = 2 |
| | | this.getMapList() |
| | | }, |
| | | }, |
| | | mounted() { |