| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="led-controller"> |
| | | <div class="title-text">ææ¾å
容设置</div> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <div> |
| | | <div><button class="btn img-btn" :class="{'click': isactive == 0}" @click="click(0)">å¾çä¸ä¼ </button></div> |
| | | <div><button class="btn vid-btn" :class="{'click': isactive == 1}" @click="click(1)">è§é¢ä¸ä¼ </button></div> |
| | | <div><button class="btn sub-btn" :class="{'click': isactive == 2}" @click="click(2)">åå¹ä¸ä¼ </button></div> |
| | | <div><button class="btn sub-btn" :class="{'click': isactive == 3}" @click="click(3)">天æ°ä¸ä¼ </button></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="18"> |
| | | <div class="led-controller-controller"> |
| | | <image-upload v-if="isactive == 0"></image-upload> |
| | | <video-upload v-if="isactive == 1"></video-upload> |
| | | <subtext-upload v-if="isactive == 2"></subtext-upload> |
| | | <weather-upload v-if="isactive == 3"></weather-upload> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ImageUpload from './led-controller/image-upload' |
| | | import VideoUpload from './led-controller/video-upload' |
| | | import SubtextUpload from './led-controller/subtext-upload' |
| | | import WeatherUpload from './led-controller/weather-upload' |
| | | export default { |
| | | data () { |
| | | return { |
| | | isactive: 0 |
| | | } |
| | | }, |
| | | computed: { |
| | | lightemitStateId () { |
| | | return this.$store.state.led.lightemitId |
| | | } |
| | | }, |
| | | watch: { |
| | | lightemitStateId (curVal, oldVal) { |
| | | } |
| | | }, |
| | | components: { |
| | | ImageUpload, |
| | | VideoUpload, |
| | | SubtextUpload, |
| | | WeatherUpload |
| | | }, |
| | | methods: { |
| | | click (val) { |
| | | this.isactive = val |
| | | }, |
| | | // æ¨éå¤©æ°æ°æ® |
| | | pushLED () { |
| | | var ids = [this.lightemitStateId] |
| | | this.$http({ |
| | | url: this.$http.adornUrl(`/pole/polelightemit/pushLED`), |
| | | method: 'post', |
| | | data: this.$http.adornData({ |
| | | lightemitIds: ids |
| | | }) |
| | | }).then(({data}) => { |
| | | if (data && data.code === 0) { |
| | | this.$message({ |
| | | message: 'æä½æå', |
| | | type: 'success', |
| | | duration: 1500, |
| | | onClose: () => { |
| | | this.visible = false |
| | | this.$emit('refreshDataList') |
| | | } |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .led-controller { |
| | | margin-top: 10px; |
| | | // background-image: url(~@/assets/img/led/controller.png); |
| | | // background-size: 100% 100%; |
| | | height: 451px; |
| | | button:focus { |
| | | outline:none; |
| | | }; |
| | | .btn { |
| | | border-style: none; |
| | | width: 156px; |
| | | height: 56px; |
| | | margin: 15px; |
| | | background: url(~@/assets/img/led/btn.png); |
| | | background-repeat:no-repeat; |
| | | background-size: 100%; |
| | | color: #fff; |
| | | font-size: 1.4em; |
| | | font-weight: 550; |
| | | }; |
| | | &-controller { |
| | | border: 1px #d9d9d9 solid; |
| | | display:block; |
| | | margin: 20px; |
| | | height: 345px; |
| | | } |
| | | /deep/ .el-upload-dragger { |
| | | background-color: transparent; |
| | | border: 1px dashed #d9d9d9; |
| | | } |
| | | } |
| | | .click { |
| | | background: url(~@/assets/img/led/btn-click.png) !important; |
| | | background-repeat:no-repeat !important; |
| | | } |
| | | </style> |