deviceDialog.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <el-drawer
  3. size="60%"
  4. title="查看"
  5. :visible.sync="innerVisible"
  6. append-to-body>
  7. <el-divider class="dialog-divider"></el-divider>
  8. <!-- <device-tabs
  9. :deviceDetail="detail"
  10. :assetNo="detail.asset_no"
  11. /> -->
  12. </el-drawer>
  13. </template>
  14. <script>
  15. // import deviceTabs from "@/views/devices/deviceTabs";
  16. export default {
  17. props:['deviceVisible','assetNo'],
  18. // components: { deviceTabs },
  19. data() {
  20. return {
  21. detail:{},
  22. };
  23. },
  24. methods: {
  25. },
  26. watch:{
  27. assetNo(newVal){
  28. console.log('deviceDialog',newVal)
  29. var that = this;
  30. var assetNo = newVal;
  31. this.detail={}
  32. this.$http.get("device/getDetailByassetNo/" + assetNo).then(res => {
  33. that.detail = res.data;
  34. });
  35. }
  36. },
  37. computed: {
  38. innerVisible: {
  39. set (val) {
  40. this.$emit('sendVal', val)
  41. },
  42. get () {
  43. return this.deviceVisible
  44. }
  45. },
  46. }
  47. };
  48. </script>
  49. <style scoped>
  50. .el-dialog__body{
  51. padding: 0px!important;
  52. }
  53. .dialog-divider{
  54. margin:0px;
  55. }
  56. .dialog-tabs{
  57. padding:20px;
  58. }
  59. ::v-deep .el-drawer span:focus {
  60. outline: none;
  61. }
  62. </style>