gaoshp
2024-01-05 b5db49ce1e4c678ce4a7120928811a9621128b8e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<template>
    <div>
      <el-dialog  title="机床详情" :visible.sync="isShow" custom-class="custom-dialog" @close='cancelDialog()'>
        <div class="mdc-table">
           <div class="mdc-row ">
             <div class="mdc-col mdc-content-v-center mdc-col-30">机床名</div>
             <div class="mdc-col mdc-content-v-center mdc-col-20">{{device.name}}</div>
             <div class="mdc-col mdc-content-v-center mdc-col-30">机床类型</div>
             <div class="mdc-col mdc-content-v-center mdc-col-20">{{device.type}}</div>
           </div>
          <div class="mdc-row">
            <div class="mdc-col mdc-content-v-center mdc-col-30">机床ip</div>
            <div class="mdc-col mdc-content-v-center mdc-col-20">{{device.ip}}</div>
<!--            <div class="mdc-col mdc-content-v-center mdc-col-30">端口号</div>-->
<!--            <div class="mdc-col mdc-content-v-center mdc-col-20">{{device.port}}</div>-->
          </div>
          <div class="mdc-row">
            <div class="mdc-col mdc-content-v-center mdc-col-30">车间名</div>
            <div class="mdc-col mdc-content-v-center mdc-col-20">{{device.workshop}}</div>
          </div>
        </div>
      </el-dialog>
    </div>
</template>
 
<script>
    export default {
      name: 'deviceDetailDialog',
      props: {
        isVisible: {
          type: Boolean,
          default: false
        },
        device: {
          type: Object,
          default: {}
        }
      },
      watch: {
        isVisible(val) {
          this.isShow = val
          if (!val) {
            this.$refs.rpw.resetFields()
          }
          this.isLargeAltering = false
        }
      },
      data() {
        return {
          isShow: this.isVisible,
          showEditPwDialog: false,
          isLargeAltering: false,
          isNewPwPosting: false,
          myRules: {
          }
        }
      },
      methods: {
        /**
         * 取消/关闭对话框
         */
        cancelDialog() {
          this.$emit('submit', { action: 'cancel' })
        },
        showEditPw() {
          if (window.innerWidth > 720) {
            this.isLargeAltering = true
          } else {
            this.showEditPwDialog = true
          }
        }
      }
    }
</script>
 
<style scoped>
  >>>.el-dialog__body{
    padding:20px 5px;
  }
  .mdc-table{}
  .mdc-row{
    display: flex;
    padding: 5px;
    width: 100%;
  }
  .mdc-row + .mdc-row {
    margin-top: -5px;
    padding-top: 0;
  }
  .mdc-col{
    flex: 1;
    display: block;
    padding: 5px;
    width: 100%;
    border: 1px solid #e5e5e5;
    box-sizing: border-box;
  }
  .mdc-content-v-center{
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mdc-col-15 {
    flex: 0 0 15%;
    max-width: 15%; }
  .mdc-col-30 {
    flex: 0 0 30%;
    max-width: 30%; }
  .mdc-col-20 {
    flex: 0 0 20%;
    max-width: 20%; }
  .mdc-col + .mdc-col {
    border-left: none;
  }
  .mdc-row:nth-child(n) .mdc-col{
    border-top: none;
  }
  .mdc-row:first-child .mdc-col {
    border-top: 1px solid #e5e5e5;
  }
  .mdc-col:nth-child(2n+1){
    background-color: #e7f1fd;
  }
  .password-reset-btn{
    position: absolute;right:10px;color:#f56c6c;font-size: 18px;
  }
  .password-reset-btn:hover,.password-reset-btn:active{
     color:#67C23A;
  }
</style>