| | |
| | | <!-- |
| | | * @Date: 2024-01-13 20:46:33 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-31 22:07:47 |
| | | * @LastEditTime: 2024-03-11 19:20:55 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/workshop/device.vue |
| | | --> |
| | | <template> |
| | |
| | | data() { |
| | | return { |
| | | devicePng, |
| | | scale: 1, |
| | | concern: false, |
| | | item: {} |
| | | } |
| | |
| | | }, |
| | | mounted () { |
| | | this.concern = !!this.info.concern |
| | | console.log(this.$el.getBoundingClientRect().width,'/////',this.$el.getBoundingClientRect().width / 200) |
| | | this.$nextTick(() => { |
| | | //if (this.$el.getBoundingClientRect().width < 400) { |
| | | //this.$el.querySelector('.device-item-box').style = `transform:scale(${this.$el.getBoundingClientRect().width / 360})` |
| | | //} |
| | | }) |
| | | |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | toDetail () { |
| | |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .device-item { |
| | | width: 394px; |
| | | height: 321px; |
| | | width: 100%; |
| | | height: 100%; |
| | | max-width: 394px; |
| | | max-height: 394px; |
| | | border-radius: 10px; |
| | | border: 1px solid #3C4249; |
| | | padding: 20px; |
| | |
| | | } |
| | | |
| | | &>div.device-item-box { |
| | | min-width: 100px; |
| | | flex: 1 1 auto; |
| | | margin-top: 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | |
| | | overflow: hidden; |
| | | |
| | | .img { |
| | | width: 50%; |
| | | height: 100%; |
| | | // min-width: 100px; |
| | | width: 60%; |
| | | height: 150px; |
| | | border: 1px solid #444C55; |
| | | border-radius: 10px; |
| | | position: relative; |
| | | |
| | | flex: 0 0 auto; |
| | | overflow: hidden; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | .img-status { |
| | | position: absolute; |
| | | font-size: 12px; |
| | |
| | | } |
| | | |
| | | img { |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | // position: absolute; |
| | | // top: 50%; |
| | | // left: 50%; |
| | | // transform: translate(-50%, -50%); |
| | | height: auto; |
| | | width: 80%; |
| | | } |
| | | } |
| | |
| | | align-items: center; |
| | | |
| | | &>div { |
| | | margin-left: 20px; |
| | | margin-left: 10px; |
| | | ; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | img { |
| | | width: 40px; |
| | | height: 40px; |
| | | width: 25px; |
| | | height: 25px; |
| | | } |
| | | } |
| | | } |