From 1f0e9a20cd76e21538b4ca77a3ed7ce2a979de90 Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期日, 30 五月 2021 10:46:39 +0800 Subject: [PATCH] 上周忘记提交 --- src/components/base-page/enterprise-emergency/PositionChange.vue | 140 ++++++++++++++++++++++++++++++---------------- 1 files changed, 92 insertions(+), 48 deletions(-) diff --git a/src/components/base-page/enterprise-emergency/PositionChange.vue b/src/components/base-page/enterprise-emergency/PositionChange.vue index af37112..0a48008 100644 --- a/src/components/base-page/enterprise-emergency/PositionChange.vue +++ b/src/components/base-page/enterprise-emergency/PositionChange.vue @@ -4,37 +4,58 @@ <el-tab-pane label="鐐瑰嚮瀹氫綅" name="first"> <div class="click-location"> <el-input v-model="clickLocation"></el-input> - <el-button type="primary">纭</el-button> + <el-button type="primary" @click="confirm">纭</el-button> </div> </el-tab-pane> - <el-tab-pane label="绠$嚎瀹氫綅" name="second"> - <div class="line-pos"> - <el-form :model="linePos" label-width="90px"> - <el-form-item label="绠$嚎鍚嶇О:"> - <el-input v-model="linePos.lineName"></el-input> - </el-form-item> - <el-form-item label="闄勫睘璁炬柦:"> - <el-input v-model="linePos.affFac"></el-input> - </el-form-item> - </el-form> - <el-button type="primary" size="mini">鎼滅储</el-button> - <el-button type="primary">纭</el-button> + <el-tab-pane label="绠℃瀹氫綅" name="second"> + <div class="place"> + <div class="place-top"> + <div class="place-left"> + <el-form :model="linePos" label-width="90px"> + <el-form-item label="绠$嚎鍚嶇О:"> + <el-input v-model="linePos.lineName"></el-input> + </el-form-item> + <el-form-item label="闄勫睘璁炬柦:"> + <el-select v-model="linePos.affFac"> + <el-option + v-for="item in linePos.affFacList" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-form-item> + </el-form> + </div> + <div class="place-right"> + <el-button type="primary" size="small" @click="fileChoose">鎼滅储</el-button> + </div> + </div> + <div class="place-bottom"> + <el-button type="primary" @click="confirm">纭</el-button> + </div> </div> </el-tab-pane> <el-tab-pane label="缁忕含搴﹀畾浣�" name="third"> - <div class="latlng-location"> - <div class="latlng-location-chose"> - <el-form :model="LongLatPos" label-width="90px"> - <el-form-item label="缁忓害:"> - <el-input v-model="LongLatPos.longPos"></el-input> - </el-form-item> - <el-form-item label="绾害:"> - <el-input v-model="LongLatPos.latPos"></el-input> - </el-form-item> - </el-form> - <el-button type="primary" size="mini">瀹氫綅</el-button> + <div class="place"> + <div class="place-top"> + <div class="place-left"> + <el-form :model="LongLatPos" label-width="90px"> + <el-form-item label="缁忓害:"> + <el-input v-model="LongLatPos.longPos"></el-input> + </el-form-item> + <el-form-item label="绾害:"> + <el-input v-model="LongLatPos.latPos"></el-input> + </el-form-item> + </el-form> + </div> + <div class="place-right"> + <el-button type="primary" size="small">鎼滅储</el-button> + </div> </div> - <el-button type="primary">纭</el-button> + <div class="place-bottom"> + <el-button type="primary" @click="confirm">纭</el-button> + </div> </div> </el-tab-pane> </el-tabs> @@ -60,19 +81,41 @@ // 绠℃瀹氫綅 linePos: { lineName: '', - affFac: '' - } + affFac: '', + affFacList: [ + { + label: '闃�闂ˋ', + value: '1' + }, + { + label: '闃�闂˙', + value: '2' + } + ] + }, + fileChoChange: false } }, + mounted () { + // 鎺ユ敹瑙勫畾 姣忔閲嶆柊閫夋嫨瀹氫綅 閮芥寚瀹� 閫夋嫨绗竴涓紑濮� + eventBus.$on('tab-change', (obj) => { + this.activeName = obj + }) + }, methods: { - handleClick (tab, event) { - // console.log(tab) - // console.log(event) - if (tab.label === '绠$嚎瀹氫綅') { - eventBus.$emit('pipelineFile-choose', true) - } else { - eventBus.$emit('pipelineFile-choose', false) - } + // tab 鍒囨崲鐢ㄤ簬鍒ゆ柇 + handleClick (tab) {}, + // 鐐瑰嚮鏂囦欢閫夋嫨 鏄剧ず绗笁绾ч〉闈� 杩涜绠$嚎/娈甸�夋嫨 + fileChoose () { + this.fileChoChange = !this.fileChoChange + eventBus.$emit('pipelineFile-choose', this.fileChoChange) + }, + // 鐐瑰嚮纭鎸夐挳浜嬩欢 + confirm () { + // 瀛愮粍浠堕�氳繃浜嬩欢 浼犻�掓暟鎹� 鎺у埗鑷韩鏄剧ず闅愯棌 + this.$emit('localCation', false) + // 閫氳繃bus 鎺у埗涓夌骇闄勫睘寮规鐨勯殣钘� + eventBus.$emit('pipelineFile-choose', false) } } } @@ -82,8 +125,9 @@ .side-box { min-width: 1.94532rem; - max-height: 1.343213rem; + max-width: 1.94532rem; } + .click-location { margin: 0 auto; text-align: center; @@ -98,25 +142,25 @@ } } - .line-pos { - text-align: center; - .el-input { - width: 85%; - } - } - - .latlng-location { + .place { text-align: center; - .latlng-location-chose { + .place-top { display: flex; - align-content: center; + align-items: center; justify-content: space-around; + .place-right { + .el-button { + margin: 15px; + } + } } - .el-input { - width: 85%; + .place-bottom { + .el-button { + margin: 15px; + } } } </style> -- Gitblit v1.8.0