派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-05-30 a312e0dd96d8f7e96fb3341f1a55561b12394405
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<template>
  <el-dialog :visible.sync="isShow" class="effect-vol-calc" title="事故水有效容积计算" :modal="false" v-dialogDrag
             :before-close="handleClose">
    <div class="container">
      <el-row class="row-style" :span="24">
        <el-col class="label" :span="6">事故水流量(m3/h):</el-col>
        <el-col class="val-input" :span="6">
          <el-input-number @change="calculate" v-model="val.SGSLL" :precision="2" size="mini"></el-input-number>
        </el-col>
        <el-col class="label" :span="6">事故时间(h):</el-col>
        <el-col class="val-input" :span="6">
          <el-input-number @change="calculate" v-model="val.SGSJ" size="mini"></el-input-number>
 
        </el-col>
      </el-row>
      <el-row class="row-style">
        <el-col class="label" :span="6">事故物料量(m³):</el-col>
        <el-col class="val-input" :span="6">
          <el-input-number @change="calculate" v-model="val.SGWLL" :precision="2" size="mini"></el-input-number>
        </el-col>
        <el-col class="label" :span="6">转存量(m³):</el-col>
        <el-col class="val-input" :span="6">
          <el-input-number @change="calculate" v-model="val.ZCL" :precision="2" size="mini"></el-input-number>
        </el-col>
      </el-row>
      <el-row class="row-style">
        <el-col class="label" :span="6">消防水流量(m³):</el-col>
        <el-col class="val-input" :span="6">
          <el-input-number @change="calculate" v-model="val.XFSLL" :precision="2" size="mini"></el-input-number>
 
        </el-col>
        <el-col class="label" :span="6">消防时间(h):</el-col>
        <el-col class="val-input" :span="6">
          <el-input-number @change="calculate" v-model="val.XFSJ" size="mini"></el-input-number>
 
        </el-col>
      </el-row>
      <el-row class="row-style">
        <el-col class="label" :span="6">降雨量(mm):</el-col>
        <el-col class="val-input" :span="6">
          <el-input-number @change="calculate" v-model="val.JYL" :precision="2" size="mini"></el-input-number>
        </el-col>
        <el-col class="label" :span="6">汇水面积(㎡):</el-col>
        <el-col class="val-input" :span="6">
          <el-input-number @change="calculate" v-model="val.HSMJ" :precision="2" size="mini"></el-input-number>
        </el-col>
      </el-row>
      <el-row class="row-style .map-under-line">
        <el-col class="label" :span="6">生产废水量(m³):</el-col>
        <el-col class="val-input" :span="6">
          <el-input-number @change="calculate" v-model="val.SCFSL" :precision="2" size="mini"></el-input-number>
        </el-col>
        <el-col class="label" :span="6">收集池余量(m³):</el-col>
        <el-col class="val-input" :span="6">
          <el-input-number @change="calculate" v-model="val.SJCYL" :precision="2" size="mini"></el-input-number>
        </el-col>
      </el-row>
      <el-row class="row-style">
        <el-col class="label" :span="6">事故水容积(m³):</el-col>
        <el-col class="val-input res-highlight" :span="6"><span>{{ val.SGSRJ }}</span></el-col>
        <el-col class="label" :span="6">是否大于收集池余量:</el-col>
        <el-col class="val-input res-highlight" :span="6"><span>{{ val.SFDYSJCYL }}</span></el-col>
      </el-row>
      <div class="footer">
        <el-button type="primary" size="mini" @click="reSet">重置</el-button>
      </div>
    </div>
  </el-dialog>
</template>
 
<script>
export default {
  name: 'EffectiveVolumeCalc',
  data () {
    return {
      isShow: false,
      val: {}
    }
  },
  mounted () {
    this.reSet()
  },
  methods: {
    handleClose (done) {
      this.isShow = false
    },
    setVisible (s) {
      this.isShow = s
    },
    getVisible () {
      return this.isShow
    },
    reSet () {
      const val = {
        SGSLL: 0, // 事故水流量
        SGSJ: 0, // 事故时间
        SGWLL: 0, // 事故物料量
        ZCL: 0, // 转存量
        XFSLL: 0, // 消费水流量
        XFSJ: 0, // 消防时间
        JYL: 0, // 降雨量
        HSMJ: 0, // 汇水面积
        SCFSL: 0, // 生产废水量
        SJCYL: 0, // 收集池余量
        SGSRJ: 0, // 事故水容积
        SFDYSJCYL: '--'// 是否大于收集池余量
      }
      this.val = val
    },
    calculate () {
      const v = this.val
 
      v.SGSRJ = (v.SGWLL + v.XFSLL * v.XFSJ - v.ZCL) + v.SCFSL + v.JYL
 
      v.SFDYSJCYL = v.SGSRJ > v.SJCYL ? '是' : '否'
    }
 
  }
}
</script>
 
<style lang="less">
.effect-vol-calc {
  width: 20rem;
 
  .container {
    padding: 0.15rem;
 
    .label {
      color: @color;
      text-align: end;
      line-height: 28px;
    }
 
    .val-input {
      text-align: center;
    }
 
    .res-highlight {
      color: @color-highlight;
      line-height: 28px;
    }
  }
 
  /deep/ .el-dialog {
    left: 810px;
  }
 
  .el-dialog__header {
    padding: 4px 10px;
  }
 
  .el-dialog__headerbtn {
    top: 10px;
  }
 
  .row-style {
    padding: 4px 0;
  }
 
  .el-input__inner {
    background: @background-color;
    border-color: @color;
  }
 
  .el-input__inner:focus, .el-input__inner:hover {
    border-color: @color-highlight;
    outline: 0;
  }
 
  .el-input-number span {
    color: @color;
  }
 
  .el-input-number__decrease {
    background: @background-color;
    border-right: 1px solid @color;
 
    &:hover {
      color: @color-highlight;
    }
  }
 
  .el-input-number__increase {
    background: @background-color;
    border-left: 1px solid @color;
 
    &:hover {
      color: @color-highlight;
    }
  }
 
  .el-input-number__decrease:hover:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled),
  .el-input-number__increase:hover:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled) {
    border-color: @color-highlight;
  }
 
  .el-date-table td.today span {
    color: @color-highlight;
  }
 
  .el-picker-panel__footer {
    background: @background-color;
    border-top-color: @color;
  }
 
  .el-date-table th {
    border-bottom-color: @color;
  }
 
  .el-button {
    background: @background-color;
    color: @color;
    border-color: @color;
  }
 
  .el-button--text {
    padding: 7px 15px;
  }
 
  .el-button:hover {
    background: @background-color;
    color: @color-highlight;
    border-color: @color-highlight;
  }
 
  .el-input__inner {
    color: #fff;
    text-align: center;
  }
 
  .el-date-picker__time-header {
    border-bottom-color: @background-color-split;
  }
 
  .el-date-picker__header-label {
    color: #fff
  }
}
</style>