safecheck-client 3.0.33-6 → 3.0.33-8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,20 +8,29 @@
8
8
  <div class="panel panel-default auto repair-info-content">
9
9
  <div class="panel-body" style="padding: 0">
10
10
  <!-- 安检项内容 -->
11
- <div class="auto repair-info-content compatible" style="padding: 0">
11
+ <div class="auto repair-info-content compatible" style="padding: 0">
12
12
  <div class="row auto" style="padding: 0">
13
- <div v-show="false" class="{{shuclass}}" v-if=" device.device != '燃气表'">
14
- <button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
13
+ <div v-if=" device.device != '燃气表'" v-show="false" class="{{shuclass}}">
14
+ <button :disabled="issee" class="btn btn-primary" name="button" type="button" @click='adddetails()'>增加
15
+ </button>
15
16
  </div>
16
17
  <!--<div class="{{shuclass}}" v-if="device.device != '燃气表' && candelete">-->
17
18
  <!--<button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>-->
18
19
  <!--</div>-->
19
- <div class="shuclass1" v-show="row.isshow" v-for="(idxs,row) in f_items" style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0" >
20
- <label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'" v-show="row.isshow" class="fivelabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
21
- <label v-if="row.type == 'radio' && row.f_item_name!='连接方式'" v-show="row.isshow" class="radiolabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
22
- <label v-if="row.type == 'text'" v-show="row.isshow" class="textlabel1">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
23
- <label v-if="row.type == 'picture' || (row.type == 'radio' && row.f_item_name=='连接方式')" v-show="row.isshow" class="textlabel1">{{row.f_item_name}}<br/>{{row.remark}}</label>
24
- <label v-if="row.type == 'checkbox'" v-show="row.isshow" class="radiolabel">{{row.f_item_name}}<br/>{{row.remark}}</label>
20
+ <div v-for="(idxs,row) in f_items" v-show="row.isshow" class="shuclass1"
21
+ style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0">
22
+ <label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'"
23
+ v-show="row.isshow" class="fivelabel">{{ row.f_item_name }}<span
24
+ v-if="row.unit">({{ row.unit }})</span><br/>{{ row.remark }}</label>
25
+ <label v-if="row.type == 'radio' && row.f_item_name!='连接方式'" v-show="row.isshow"
26
+ class="radiolabel">{{ row.f_item_name }}<span
27
+ v-if="row.unit">({{ row.unit }})</span><br/>{{ row.remark }}</label>
28
+ <label v-if="row.type == 'text'" v-show="row.isshow" class="textlabel1">{{ row.f_item_name }}<span
29
+ v-if="row.unit">({{ row.unit }})</span><br/>{{ row.remark }}</label>
30
+ <label v-if="row.type == 'picture' || (row.type == 'radio' && row.f_item_name=='连接方式')"
31
+ v-show="row.isshow" class="textlabel1">{{ row.f_item_name }}<br/>{{ row.remark }}</label>
32
+ <label v-if="row.type == 'checkbox'" v-show="row.isshow"
33
+ class="radiolabel">{{ row.f_item_name }}<br/>{{ row.remark }}</label>
25
34
  <!--<span v-if="show" style="font-weight:bold">{{row.f_content}}</span>-->
26
35
  <!--<datepicker placeholder="请选择时间"-->
27
36
  <!--:value.sync="row.f_content"-->
@@ -30,86 +39,101 @@
30
39
  <!--v-if="!show && row.type == 'date'"-->
31
40
  <!--:readonly="true"-->
32
41
  <!--&gt;</datepicker>-->
33
- <div style="clear: both" v-if="row.type == 'picture'" class="form-group col-sm-12" >
34
- <div class="auto" >
42
+ <div v-if="row.type == 'picture'" class="form-group col-sm-12" style="clear: both">
43
+ <div class="auto">
35
44
  <div class="panel">
36
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
45
+ <div class="panel-body panel-self"
46
+ style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
37
47
  <div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
38
- <div class="col-sm-4" v-show="row.f_path">
39
- <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
48
+ <div v-show="row.f_path" class="col-sm-4">
49
+ <img-self :alt="row.f_item_name" :src="row.f_path" height="140" width="140"></img-self>
40
50
  </div>
41
- <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
42
- <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
51
+ <div v-show="!row.f_path" class="col-sm-4" @click="takePic(idxs, row.f_item_name)">
52
+ <img :alt="点击拍摄照片" height="140" src="../../../assets/tackpic.png" width="140"></img>
43
53
  </div>
44
- <img v-show="row.f_path" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
54
+ <img v-if="role!='androidview'" v-show="row.f_path" :class="style__"
55
+ src="../../../assets/remove.png"
56
+ style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"
57
+ @click="delfile(idxs, row.f_path)"></img>
45
58
  </div>
46
59
  </div>
47
60
  </div>
48
61
  </div>
49
62
  </div>
50
- <div style="float: left;width:60%" class="form-group" v-if="row.type == 'string'" v-show="row.isshow">
51
- <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" :readonly="role == 'androidview' || row.readonly">
63
+ <div v-if="row.type == 'string'" v-show="row.isshow" class="form-group" style="float: left;width:60%">
64
+ <input v-model="row.f_item_value" :readonly="role == 'androidview' || row.readonly" class="form-control"
65
+ maxlength="100"
66
+ type="text">
52
67
  </div>
53
- <div style="float: left;width:60%" class="form-group col-sm-12" v-if="row.type == 'date'" v-show="row.isshow">
54
- <datepicker id="f_making_date" :placeholder= row.f_item_name
55
- :value.sync="row.f_item_value"
56
- v-if="row.type == 'date'"
57
- v-show="row.isshow"
68
+ <div v-if="row.type == 'date'" v-show="row.isshow" class="form-group col-sm-12"
69
+ style="float: left;width:60%">
70
+ <datepicker v-if="row.type == 'date'" v-show="row.isshow"
71
+ id="f_making_date"
58
72
  :disabled-days-of-Week="[]"
59
73
  :format="'yyyy-MM-dd 00:00:00'"
60
- :show-reset-button="reset" readonly="readonly">
74
+ :placeholder=row.f_item_name
75
+ :show-reset-button="reset"
76
+ :value.sync="row.f_item_value" readonly="readonly">
61
77
  </datepicker>
62
78
  </div>
63
79
 
64
- <div style="float: left;width:60%" class="form-group" v-if="!show && row.type == 'number'" v-show="row.isshow">
65
- <input type="number" class="form-control" maxlength="100" v-model="row.f_item_value" onkeyup="value=value.replace(/[^\d\.]/g,'')" :readonly="row.readonly">
80
+ <div v-if="!show && row.type == 'number'" v-show="row.isshow" class="form-group"
81
+ style="float: left;width:60%">
82
+ <input v-model="row.f_item_value" :readonly="row.readonly" class="form-control" maxlength="100"
83
+ onkeyup="value=value.replace(/[^\d\.]/g,'')" type="number">
66
84
  </div>
67
85
  <!--<input type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project != '表号'" :disabled="(!(ischecked == '有')) || issee" :readonly="issee">-->
68
86
  <!--<input type="text" class="form-control" v-model="meternum" v-if="!show && row.type == 'string' && row.f_project == '表号' " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >-->
69
87
  <!--<button type="button" name="button" class="btn btn-primary" @click="scan" v-if="!show && row.f_project == '表号' ">扫码</button>-->
70
- <input-select v-if="row.type == 'inputSelector'"
71
- v-show="row.isshow"
72
- :value.sync="row.selected"
73
- v-model="row.selected"
74
- :readonly="false"
75
- :options="row.options"
76
- @change="changse"
77
- @click="transelation(idxs)"></input-select>
78
- <v-select style="float: left" :value.sync="row.selected"
79
- v-model="row.selected"
80
- v-if="row.type == 'selector'"
81
- :search="false"
82
- v-show="row.isshow"
83
- placeholder='请选择'
84
- :options="row.options"
85
- :disabled="role == 'androidview' || row.readonly"
86
- @change="changse"
87
- @click="transelation(idxs)"
88
- :multiple="row.multiple"
89
- :close-on-select="!row.multiple" clear-button></v-select>
90
- <div style="float: left;width: 30%" class="form-group" v-if="!show && row.type == 'radio'">
91
- <div class=" col-sm-6 col-md-6" v-for="item in row.options">
88
+ <input-select v-if="row.type == 'inputSelector'"
89
+ v-show="row.isshow"
90
+ v-model="row.selected"
91
+ :options="row.options"
92
+ :readonly="false"
93
+ :value.sync="row.selected"
94
+ @change="changse"
95
+ @click="transelation(idxs)"></input-select>
96
+ <v-select v-if="row.type == 'selector'" v-show="row.isshow"
97
+ v-model="row.selected"
98
+ :close-on-select="!row.multiple"
99
+ :disabled="role == 'androidview' || row.readonly"
100
+ :multiple="row.multiple"
101
+ :options="row.options"
102
+ :search="false"
103
+ :value.sync="row.selected"
104
+ clear-button
105
+ placeholder='请选择'
106
+ style="float: left"
107
+ @change="changse" @click="transelation(idxs)"></v-select>
108
+ <div v-if="!show && row.type == 'radio'" class="form-group" style="float: left;width: 30%">
109
+ <div v-for="item in row.options" class=" col-sm-6 col-md-6">
92
110
  <!-- <input type="radio" :name="row.f_item_name" @click="disSelect($parent.idxs,item.value)" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >-->
93
- <input type="radio" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >
94
- <span>{{item.label}}</span>
111
+ <input v-model="row.f_item_value" :disabled="(!(ischecked == '有')) || issee" :name="row.f_item_name"
112
+ :value="item.value" type="radio">
113
+ <span>{{ item.label }}</span>
95
114
  </div>
96
115
  </div>
97
- <div v-if="!show && row.type == 'checkbox'" style="white-space: nowrap" >
98
- <div style="" v-for="item in row.options">
99
- <input type="checkbox" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
100
- <span>{{item.label}}</span>
116
+ <div v-if="!show && row.type == 'checkbox'" style="white-space: nowrap">
117
+ <div v-for="item in row.options" style="">
118
+ <input v-model="row.f_item_value" :disabled="(!(ischecked == '有')) || issee" :name="row.f_item_name"
119
+ :value="item.value" type="checkbox">
120
+ <span>{{ item.label }}</span>
101
121
  </div>
102
122
  </div>
103
123
  <div style="clear: both">
104
124
  <label v-if="row.f_item_value.indexOf('其他') >-1" class="fivelabel">其他</label>
105
- <div style="float: left;width:60%" class="form-group" v-if="row.f_item_value.indexOf('其他') >-1">
106
- <input type="text" class="form-control" maxlength="100" v-model="row.f_else" :readonly="role == 'androidview' || row.readonly">
125
+ <div v-if="row.f_item_value.indexOf('其他') >-1" class="form-group" style="float: left;width:60%">
126
+ <input v-model="row.f_else" :readonly="role == 'androidview' || row.readonly" class="form-control"
127
+ maxlength="100"
128
+ type="text">
107
129
  </div>
108
130
  </div>
109
- <div style="clear: both" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')">
110
- <label class="fivelabel">隐患备注</label>
111
- <div style="float: left;width:60%" class="form-group">
112
- <input type="text" class="form-control" maxlength="100" v-model="row.f_defect_remark">
131
+ <div
132
+ v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')"
133
+ style="clear: both">
134
+ <label class="fivelabel">隐患备注</label>
135
+ <div class="form-group" style="float: left;width:60%">
136
+ <input v-model="row.f_defect_remark" class="form-control" maxlength="100" type="text">
113
137
  </div>
114
138
  </div>
115
139
  <div style="clear: both">
@@ -123,48 +147,82 @@
123
147
  @click="transelation(idxs)"
124
148
  close-on-select clear-button></v-select>
125
149
  </div>-->
126
- <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (dealdispose == 'true' || dealdispose == true) " >
150
+ <div
151
+ v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (dealdispose == 'true' || dealdispose == true) "
152
+ class="form-group"
153
+ style="display: flex;flex-wrap: wrap">
127
154
  <label class="fivelabel">处理方式</label>
128
- <v-select :value="row.f_deal_dispose"
129
- :value-single="true"
130
- :options="deals"
131
- :disabled="role == 'androidview'"
132
- @change="changdeal"
133
- @click="transelation(idxs)"
134
- close-on-select clear-button></v-select>
155
+ <v-select :disabled="role == 'androidview'"
156
+ :options="deals"
157
+ :value="row.f_deal_dispose"
158
+ :value-single="true"
159
+ clear-button
160
+ close-on-select
161
+ @change="changdeal" @click="transelation(idxs)"></v-select>
135
162
  </div>
136
- <div style="margin-left: 10px" class="form-group col-sm-10" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && row.tooltip != undefined && row.tooltip != '' ">
137
- ☆{{row.tooltip}}
163
+ <div v-if="row.f_deal_dispose == '自行处理' || row.f_deal_dispose == '限时整改'" style="display: flex;flex-wrap: wrap">
164
+ <label class="fivelabel">处理时效:</label>
165
+ <!-- <datepicker-->
166
+ <!-- :value.sync="row.f_handle_date"-->
167
+ <!-- v-model="row.f_handle_date"-->
168
+ <!-- :format="'yyyy-MM-dd 00:00:00'"-->
169
+ <!-- placeholder="请选择"-->
170
+ <!-- style="width: 60%">-->
171
+ <!-- </datepicker>-->
172
+ <div class="form-group" style="float: left;width:60%">
173
+ <input v-model="row.f_lose_efficacy" class="form-control" maxlength="100" placeholder="单位:天"
174
+ type="text">
175
+ </div>
176
+ </div>
177
+ <div
178
+ v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && row.tooltip != undefined && row.tooltip != '' "
179
+ class="form-group col-sm-10"
180
+ style="margin-left: 10px">
181
+ ☆{{ row.tooltip }}
138
182
  </div>
139
- <div class="form-group col-sm-12" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')">
183
+ <div
184
+ v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')"
185
+ class="form-group col-sm-12"
186
+ style="display: flex;flex-wrap: wrap">
140
187
  <div class="auto" style="margin:1px;">
141
188
  <div class="panel">
142
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
189
+ <div class="panel-body panel-self"
190
+ style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
143
191
  <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
144
- <div class="col-sm-4" v-show="row.f_path">
145
- <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
192
+ <div v-show="row.f_path" class="col-sm-4">
193
+ <img-self :alt="row.f_item_name" :src="row.f_path" height="140" width="140"></img-self>
146
194
  </div>
147
- <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
148
- <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
195
+ <div v-show="!row.f_path" class="col-sm-4" @click="takePic(idxs, row.f_item_name)">
196
+ <img :alt="点击拍摄照片" height="140" src="../../../assets/tackpic.png" width="140"></img>
149
197
  </div>
150
- <img v-show="row.f_path" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
198
+ <img v-if="role!='androidview'" v-show="row.f_path" :class="style__"
199
+ src="../../../assets/remove.png"
200
+ style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"
201
+ @click="delfile(idxs, row.f_path)"></img>
151
202
  </div>
152
203
  </div>
153
204
  </div>
154
205
  </div>
155
206
  <!--多张隐患照片-->
156
- <div class="auto" v-for="itemIndex in hiddenDangerImgNumber" style="margin: 1px;">
207
+ <div v-for="itemIndex in hiddenDangerImgNumber" class="auto" style="margin: 1px;">
157
208
  <div class="panel">
158
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
159
- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
160
- <div class="col-sm-4" v-show="row['f_p' + (itemIndex+1) + '_path']">
161
- <img-self :src="row['f_p' + (itemIndex+1) + '_path']" :alt="row.f_item_name" width="140" height="140"></img-self>
209
+ <div class="panel-body panel-self"
210
+ style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
211
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
212
+ <div v-show="row['f_p' + (itemIndex+1) + '_path']" class="col-sm-4">
213
+ <img-self :alt="row.f_item_name" :src="row['f_p' + (itemIndex+1) + '_path']" height="140"
214
+ width="140"></img-self>
162
215
  </div>
163
- <div class="col-sm-4" v-show="!row['f_p' + (itemIndex+1) + '_path']" @click="takePic(idxs, row.f_item_name,'f_p' + (itemIndex+1)+ '_path')">
164
- <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
216
+ <div v-show="!row['f_p' + (itemIndex+1) + '_path']" class="col-sm-4"
217
+ @click="takePic(idxs, row.f_item_name,'f_p' + (itemIndex+1)+ '_path')">
218
+ <img :alt="点击拍摄照片" height="140" src="../../../assets/tackpic.png" width="140"></img>
165
219
  </div>
166
- <img v-show="row['f_p' + (itemIndex+1)+'_path']" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs,row['f_p' + (itemIndex+1)+'_path'],'f_p' + (itemIndex+1)+ '_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
167
- </div >
220
+ <img v-if="role!='androidview'" v-show="row['f_p' + (itemIndex+1)+'_path']"
221
+ :class="style__"
222
+ src="../../../assets/remove.png"
223
+ style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"
224
+ @click="delfile(idxs,row['f_p' + (itemIndex+1)+'_path'],'f_p' + (itemIndex+1)+ '_path')"></img>
225
+ </div>
168
226
  </div>
169
227
  </div>
170
228
  </div>
@@ -191,370 +249,407 @@
191
249
  </div>
192
250
  </template>
193
251
  <script>
194
- import Vue from 'vue'
195
- import * as Util from '../../Util'
196
-
197
- export default {
198
- title: '维修列表信息',
199
- data() {
200
- return {
201
- // telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
202
- // meterstyle:[],
203
- hiddenDangerImgNumber:0,//隐患图片数
204
- shuclass:'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
205
- shuclass1:'col-xs-12 col-sm-12 col-md-12 mg8',
206
- // labels:[],
207
- meternum:'',
208
- ischecked:'有',
209
- gasmodel:'',
210
- textstyle:'color: red',
211
- paper: this.$parent.$parent.data,
212
- f_items:[],
213
- page:{},
214
- selectindex:null,
215
- lives:[{label: '是', value: '是'},{label: '否', value: '否'}],
216
- deals:[{label: '现场整改', value: '现场整改'},{label: '自行处理', value: '自行处理'},{label: '报修', value: '报修'},{label: '限时整改', value: '限时整改'}],
217
- f_live_dispose:'',
218
- f_deal_dispose:'报修',
219
- // 初始表底
220
- f_initial_base: {},
221
- // 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
222
- f_gas_aberrant_number: {},
223
- // 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
224
- f_fee_aberrant_number: {},
225
- // 气表累购
226
- f_total_gas: {},
227
- // 累购金额
228
- f_total_fee: {},
229
- // 已用气量
230
- f_meter_base: {},
231
- // 表内剩余
232
- f_fee_base: {},
233
- //本次基数
234
- f_bc_jishu:{},
235
- //上次基数
236
- f_metergasnums:{},
237
- //周期用气
238
- f_sy_jishu:{},
239
- // 剩余气量
240
- f_gas_balance: {},
241
- // 系统金额
242
- f_balance_amount: {},
243
- // 气量异常差值允许误差
244
-
245
- //物联网表数据存储
246
- f_balance_amount:{},//物联网表剩余金额
247
- f_meter_base:{},//物联网表读数
248
- f_balance_amount1:{},//物联网表现场录入的表上剩余金额
249
- f_meter_base1:{},//物联网表现场录入的表字轮数
250
- f_meter_aberrant_number1: {},//物联网表 表数异常差值
251
- f_fee_aberrant_number1: {},//物联网 表金额异常差值
252
- gasDeviation: (
253
- function (_this) {
254
- let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
255
- if (deviation && !isNaN(deviation)) {
256
- return deviation
257
- } else {
258
- return 0
259
- }
260
- }
261
- )(this),
262
- // 金额异常差值允许误差
263
- feeDeviation: (
264
- function (_this) {
265
- let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
266
- if (deviation && !isNaN(deviation)) {
267
- return deviation
268
- } else {
269
- return 0
270
- }
271
- }
272
- )(this),
273
- // 字轮异常差值允许误差
274
- meterbase: (
275
- function (_this) {
276
- let deviation = _this.$appdata.getSingleValue('字轮异常差值允许误差')
277
- if (deviation && !isNaN(deviation)) {
278
- return deviation
279
- } else {
280
- return 0
281
- }
252
+ import Vue from 'vue'
253
+ import * as Util from '../../Util'
254
+
255
+ export default {
256
+ title: '维修列表信息',
257
+ data() {
258
+ return {
259
+ // telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
260
+ // meterstyle:[],
261
+ hiddenDangerImgNumber: 0,//隐患图片数
262
+ shuclass: 'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
263
+ shuclass1: 'col-xs-12 col-sm-12 col-md-12 mg8',
264
+ // labels:[],
265
+ meternum: '',
266
+ ischecked: '有',
267
+ gasmodel: '',
268
+ textstyle: 'color: red',
269
+ paper: this.$parent.$parent.data,
270
+ f_items: [],
271
+ page: {},
272
+ selectindex: null,
273
+ lives: [{label: '是', value: '是'}, {label: '否', value: '否'}],
274
+ deals: [{label: '现场整改', value: '现场整改'}, {label: '自行处理', value: '自行处理'}, {
275
+ label: '报修',
276
+ value: '报修'
277
+ }, {label: '限时整改', value: '限时整改'}, {label: '跟踪处置', value: '跟踪处置'}],
278
+ f_live_dispose: '否',
279
+ f_deal_dispose: '报修',
280
+ // 初始表底
281
+ f_initial_base: {},
282
+ // 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
283
+ f_gas_aberrant_number: {},
284
+ // 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
285
+ f_fee_aberrant_number: {},
286
+ // 气表累购
287
+ f_total_gas: {},
288
+ // 累购金额
289
+ f_total_fee: {},
290
+ // 已用气量
291
+ f_meter_base: {},
292
+ // 表内剩余
293
+ f_fee_base: {},
294
+ //本次基数
295
+ f_bc_jishu: {},
296
+ //上次基数
297
+ f_metergasnums: {},
298
+ //周期用气
299
+ f_sy_jishu: {},
300
+ // 剩余气量
301
+ f_gas_balance: {},
302
+ // 系统金额
303
+ f_balance_amount: {},
304
+ f_balance_amount1: {},//物联网表现场录入的表上剩余金额
305
+ f_meter_base1: {},//物联网表现场录入的表字轮数
306
+ f_meter_aberrant_number1: {},//物联网表 表数异常差值
307
+ f_fee_aberrant_number1: {},//物联网 表金额异常差值
308
+ gasDeviation: (
309
+ function (_this) {
310
+ let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
311
+ if (deviation && !isNaN(deviation)) {
312
+ return deviation
313
+ } else {
314
+ return 0
282
315
  }
283
- )(this),
284
- showElse:false, //控制其他选项是否显示
285
- }
286
- },
287
- props: ['config','device','idx','operation','role'],
288
- // props: {
289
- // // 维修对应的用户数据收集
290
- // model: {
291
- // type: Object
292
- // },
293
- // service:{
294
- // type: Object
295
- // },
296
- // show: {
297
- // type: Boolean,
298
- // default: false
299
- // },
300
- // repairitem:{
301
- // type: Object
302
- // },
303
- // shutype:'heng',
304
- // tabs:{
305
- // type: Object
306
- // },
307
- // repairdetails:{
308
- // type: Object
309
- // },
310
- // faultshow:{
311
- // type: Object
312
- // },
313
- // issee:''
314
- // },
315
- methods: {
316
- changse(val){
317
- if(val == undefined){
318
- return
319
316
  }
320
- if(this.selectindex != null) {
321
- if(this.f_items[this.selectindex].type == 'selector'){
322
- this.f_items[this.selectindex].f_item_value = val
323
- }else if(this.f_items[this.selectindex].type == 'inputSelector'){
324
- this.f_items[this.selectindex].f_item_value = val.target.value
317
+ )(this),
318
+ // 金额异常差值允许误差
319
+ feeDeviation: (
320
+ function (_this) {
321
+ let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
322
+ if (deviation && !isNaN(deviation)) {
323
+ return deviation
324
+ } else {
325
+ return 0
325
326
  }
326
327
  }
327
- },
328
- changlive(val){
329
- if(val == undefined){
330
- return
331
- }
332
- if(this.selectindex != null) {
333
- this.f_items[this.selectindex].f_live_dispose = val
334
- }
335
- },
336
- changdeal(val){
337
- if(val == undefined){
338
- return
328
+ )(this),
329
+ // 字轮异常差值允许误差
330
+ meterbase: (
331
+ function (_this) {
332
+ let deviation = _this.$appdata.getSingleValue('字轮异常差值允许误差')
333
+ if (deviation && !isNaN(deviation)) {
334
+ return deviation
335
+ } else {
336
+ return 0
337
+ }
339
338
  }
340
- if(this.selectindex != null) {
341
- this.f_items[this.selectindex].f_deal_dispose = val
339
+ )(this),
340
+ showElse: false, //控制其他选项是否显示
341
+ }
342
+ },
343
+ props: ['config', 'device', 'idx', 'operation', 'role'],
344
+ // props: {
345
+ // // 维修对应的用户数据收集
346
+ // model: {
347
+ // type: Object
348
+ // },
349
+ // service:{
350
+ // type: Object
351
+ // },
352
+ // show: {
353
+ // type: Boolean,
354
+ // default: false
355
+ // },
356
+ // repairitem:{
357
+ // type: Object
358
+ // },
359
+ // shutype:'heng',
360
+ // tabs:{
361
+ // type: Object
362
+ // },
363
+ // repairdetails:{
364
+ // type: Object
365
+ // },
366
+ // faultshow:{
367
+ // type: Object
368
+ // },
369
+ // issee:''
370
+ // },
371
+ methods: {
372
+ changse(val) {
373
+ if (val == undefined) {
374
+ return
375
+ }
376
+ if (this.selectindex != null) {
377
+ if (this.f_items[this.selectindex].type == 'selector') {
378
+ this.f_items[this.selectindex].f_item_value = val
379
+ } else if (this.f_items[this.selectindex].type == 'inputSelector') {
380
+ this.f_items[this.selectindex].f_item_value = val.target.value
342
381
  }
343
- },
344
- switchDetails(detailsType, event){
345
- if (event.srcElement.checked) {
346
- for(var i = 0;i<this.Detail.details.length;i++){
347
- if(this.Detail.details[i].f_project == detailsType){
348
- this.Detail.details[i].f_content = '有'
349
- this.ischecked = '有'
350
- return
351
- }
382
+ }
383
+ },
384
+ changlive(val) {
385
+ if (val == undefined) {
386
+ return
387
+ }
388
+ if (this.selectindex != null) {
389
+ this.f_items[this.selectindex].f_live_dispose = val
390
+ }
391
+ },
392
+ changdeal(val) {
393
+ if (val == undefined) {
394
+ return
395
+ }
396
+ if (this.selectindex != null) {
397
+ this.f_items[this.selectindex].f_deal_dispose = val
398
+ }
399
+ },
400
+ switchDetails(detailsType, event) {
401
+ if (event.srcElement.checked) {
402
+ for (var i = 0; i < this.Detail.details.length; i++) {
403
+ if (this.Detail.details[i].f_project == detailsType) {
404
+ this.Detail.details[i].f_content = '有'
405
+ this.ischecked = '有'
406
+ return
352
407
  }
353
- } else {
354
- this.Detail.imgs = []
355
- for(var i = 0;i<this.Detail.details.length;i++){
356
- if(this.Detail.details[i].f_project == detailsType){
357
- this.Detail.details[i].f_content = '无'
358
- this.ischecked = '无'
359
- }else{
360
- this.Detail.details[i].f_content = ''
361
- }
408
+ }
409
+ } else {
410
+ this.Detail.imgs = []
411
+ for (var i = 0; i < this.Detail.details.length; i++) {
412
+ if (this.Detail.details[i].f_project == detailsType) {
413
+ this.Detail.details[i].f_content = '无'
414
+ this.ischecked = '无'
415
+ } else {
416
+ this.Detail.details[i].f_content = ''
362
417
  }
363
418
  }
364
- },
365
- getgasmodel(val){
366
- this.gasmodel = val
367
- },
368
- getradios(val,flag){
369
- let Reoptions = []
370
- for (let i = 0;i<this.repairdetails.length;i++) {
371
- var t = false
372
- if(this.repairdetails[i].f_type == this.repairitem.header ){
373
- for(var j =0;j<this.repairdetails[i].details.length;j++){
374
- if(this.repairdetails[i].details[j].f_project == val ){
375
- Reoptions = this.repairdetails[i].details[j].options
376
- t = true
377
- break
378
- }
419
+ }
420
+ },
421
+ getgasmodel(val) {
422
+ this.gasmodel = val
423
+ },
424
+ getradios(val, flag) {
425
+ let Reoptions = []
426
+ for (let i = 0; i < this.repairdetails.length; i++) {
427
+ var t = false
428
+ if (this.repairdetails[i].f_type == this.repairitem.header) {
429
+ for (var j = 0; j < this.repairdetails[i].details.length; j++) {
430
+ if (this.repairdetails[i].details[j].f_project == val) {
431
+ Reoptions = this.repairdetails[i].details[j].options
432
+ t = true
433
+ break
379
434
  }
380
435
  }
381
- if(t){
382
- break
383
- }
384
436
  }
385
- for(let j = 0;j<Reoptions.length;j++){
386
- if(Reoptions[j].data == flag){
387
- for(var e = 0;e<this.Detail.details.length;e++){
388
- if(this.Detail.details[e].f_project == val){
389
- this.Detail.details[e].f_status = Reoptions[j].f_status
390
- return
391
- }
437
+ if (t) {
438
+ break
439
+ }
440
+ }
441
+ for (let j = 0; j < Reoptions.length; j++) {
442
+ if (Reoptions[j].data == flag) {
443
+ for (var e = 0; e < this.Detail.details.length; e++) {
444
+ if (this.Detail.details[e].f_project == val) {
445
+ this.Detail.details[e].f_status = Reoptions[j].f_status
446
+ return
392
447
  }
393
- break
394
448
  }
449
+ break
395
450
  }
396
- },
397
- deletedetails(){
398
- this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
399
- if (res === 'confirm') {
400
- for(var i = 0;i<this.tabs.length;i++){
401
- if(this.tabs[i].number == this.repairitem.number){
402
- this.tabs.splice(i, 1)
403
- this.model.servicerepair.splice(this.repairitem.number, 1)
404
- for(let t = i;t < this.tabs.length;t++ ) {
405
- this.tabs[t].number -= 1
406
- }
407
- return
451
+ }
452
+ },
453
+ deletedetails() {
454
+ this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
455
+ if (res === 'confirm') {
456
+ for (var i = 0; i < this.tabs.length; i++) {
457
+ if (this.tabs[i].number == this.repairitem.number) {
458
+ this.tabs.splice(i, 1)
459
+ this.model.servicerepair.splice(this.repairitem.number, 1)
460
+ for (let t = i; t < this.tabs.length; t++) {
461
+ this.tabs[t].number -= 1
408
462
  }
463
+ return
409
464
  }
410
465
  }
411
- })
412
- },
413
- takePic(prop, title, pathname='null') {
414
- if (this.role == 'androidview') {
415
- return
416
466
  }
417
- HostApp.__callback__ = this.cameraCallBack
418
- HostApp.__this__ = this
419
- //tag
420
- let fileName
421
- if (pathname == 'null') {
422
- if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
423
- fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
424
- } else {
425
- fileName = Util.getFileName(this.f_items[prop].f_path)
426
- }
467
+ })
468
+ },
469
+ takePic(prop, title, pathname = 'null') {
470
+ if (this.role == 'androidview') {
471
+ return
472
+ }
473
+ HostApp.__callback__ = this.cameraCallBack
474
+ HostApp.__this__ = this
475
+ //tag
476
+ let fileName
477
+ if (pathname == 'null') {
478
+ if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
479
+ fileName = Util.guid() + '-' + 'device' + this.device.n + '-' + this.idx + '-' + 'f_items' + prop + '.jpg'
427
480
  } else {
428
- if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
429
- fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
430
- } else {
431
- fileName = Util.getFileName(this.f_items[prop][pathname])
432
- }
481
+ fileName = Util.getFileName(this.f_items[prop].f_path)
482
+ }
483
+ } else {
484
+ if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
485
+ fileName = Util.guid() + '-' + 'device' + this.device.n + '-' + this.idx + '-' + 'f_items' + prop + '.jpg'
486
+ } else {
487
+ fileName = Util.getFileName(this.f_items[prop][pathname])
433
488
  }
434
- console.log('fileName === >' + fileName)
435
- console.log('prop === >' + prop)
436
- let addressA = "未获取到地址";
437
- try {
438
- let posaddress= HostApp.getGpsDetailAddress(); //获取当前地址信息
439
- console.log("---------地址:"+JSON.stringify(addressA))
440
- addressA = posaddress.address
441
- this.f_items[prop].f_longitude=posaddress.longitude
442
- this.f_items[prop].f_latitude=posaddress.latitude
443
- } catch (e) {
444
- console.error('拍照时调用android端获取地址信息错误')
489
+ }
490
+ console.log('fileName === >' + fileName)
491
+ console.log('prop === >' + prop)
492
+ let addressA = "未获取到地址";
493
+ try {
494
+ let posaddress = HostApp.getGpsDetailAddress(); //获取当前地址信息
495
+ console.log("---------地址:" + JSON.stringify(addressA))
496
+ addressA = posaddress.address
497
+ this.f_items[prop].f_longitude = posaddress.longitude
498
+ this.f_items[prop].f_latitude = posaddress.latitude
499
+ } catch (e) {
500
+ console.error('拍照时调用android端获取地址信息错误')
501
+ }
502
+ HostApp._open_a_page({
503
+ type: 'boomerang',
504
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
505
+ param: {
506
+ file: fileName,
507
+ requestCode: 111,
508
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s","' + pathname + '");',
509
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
445
510
  }
446
- HostApp._open_a_page({type: 'boomerang',
447
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
448
- param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'", "%s","'+pathname+'");', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name}
449
- })
450
- },
451
- cameraCallBack(prop, fileName,pathname) {
511
+ })
512
+ },
513
+ cameraCallBack(prop, fileName, pathname) {
514
+ //tag
515
+ if (pathname == 'null') {
516
+ //tag
517
+ HostApp.__this__.$set('f_items[' + prop + '].f_path', fileName + '?' + Math.random())
518
+ //tag
519
+ HostApp.__callback__ = null
520
+ HostApp.__this__ = null
521
+ } else {
522
+ //tag
523
+
524
+ HostApp.__this__.$set('f_items[' + prop + '].' + pathname + '', fileName + '?' + Math.random())
525
+ HostApp.__callback__ = null
526
+ HostApp.__this__ = null
527
+ }
528
+ },
529
+ delfile(prop, fileName, pathname = 'null') {
530
+ if (pathname == 'null') {
452
531
  //tag
453
- if (pathname == 'null') {
454
- //tag
455
- HostApp.__this__.$set( 'f_items['+prop+'].f_path', fileName + '?' + Math.random())
456
- //tag
457
- HostApp.__callback__ = null
458
- HostApp.__this__ = null
532
+
533
+ if (fileName == Vue.nopic) {
534
+
459
535
  } else {
460
- //tag
461
- //tag)
462
- HostApp.__this__.$set( 'f_items['+prop+'].'+pathname+'', fileName + '?' + Math.random())
463
- HostApp.__callback__ = null
464
- HostApp.__this__ = null
536
+ HostApp.delfile(fileName)
537
+ this.f_items[prop].f_path = Vue.nopic
465
538
  }
466
- },
467
- delfile(prop, fileName, pathname='null') {
468
- if (pathname == 'null') {
469
- //tag
470
- //tag)
471
- if(fileName == Vue.nopic){
472
- return
473
- } else {
474
- HostApp.delfile(fileName)
475
- this.f_items[prop].f_path = Vue.nopic
476
- }
477
- }else {
478
- //tag
479
- //tag)
480
- if(fileName == Vue.nopic){
481
- return
482
- } else {
483
- HostApp.delfile(fileName)
484
- this.f_items[prop][pathname] = Vue.nopic
485
- }
539
+ } else {
540
+ //tag
541
+
542
+ if (fileName == Vue.nopic) {
543
+
544
+ } else {
545
+ HostApp.delfile(fileName)
546
+ this.f_items[prop][pathname] = Vue.nopic
486
547
  }
487
- },
488
- adddetails(){
489
- // 下标作为序号,取值用。 增加 序号得依次增加
490
- if(this.tabs.length > 0){
491
- for(let i = this.tabs.length-1;i > 0 ;i-- ){
492
- if(this.tabs[i].header == this.repairitem.header){
493
- if(this.model.servicerepair.length > 0){
494
- for(let j = this.model.servicerepair.length -1;j > -1;j-- ){
495
- if(this.model.servicerepair[j].f_type == this.repairitem.header){
496
- this.model.servicerepair.splice(j+1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
497
- this.tabs.splice(i+1, 0, {header: `${this.repairitem.header}`,details:this.tabs[i].details,complete:'repair-details',class:'repair-details-class',number:j+1,items:this.tabs[i].items})
498
- for(let t = i+2;t < this.tabs.length;t++ ) {
499
- this.tabs[t].number += 1
500
- }
501
- this.faultshow.number += this.faultshow.number + 1
502
- return
548
+ }
549
+ },
550
+ adddetails() {
551
+ // 下标作为序号,取值用。 增加 序号得依次增加
552
+ if (this.tabs.length > 0) {
553
+ for (let i = this.tabs.length - 1; i > 0; i--) {
554
+ if (this.tabs[i].header == this.repairitem.header) {
555
+ if (this.model.servicerepair.length > 0) {
556
+ for (let j = this.model.servicerepair.length - 1; j > -1; j--) {
557
+ if (this.model.servicerepair[j].f_type == this.repairitem.header) {
558
+ this.model.servicerepair.splice(j + 1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
559
+ this.tabs.splice(i + 1, 0, {
560
+ header: `${this.repairitem.header}`,
561
+ details: this.tabs[i].details,
562
+ complete: 'repair-details',
563
+ class: 'repair-details-class',
564
+ number: j + 1,
565
+ items: this.tabs[i].items
566
+ })
567
+ for (let t = i + 2; t < this.tabs.length; t++) {
568
+ this.tabs[t].number += 1
503
569
  }
570
+ this.faultshow.number += this.faultshow.number + 1
571
+ return
504
572
  }
505
573
  }
506
574
  }
507
575
  }
508
576
  }
509
- },
510
- transelation(val){
511
- this.selectindex = val
512
- },
513
- towatch(){
514
- for(let n in this.f_items){
515
- if(typeof this.f_items[n]=='function'){
516
- continue
517
- }
518
- if(this.f_items[n].type == 'selector' || this.f_items[n].type == 'inputSelector'){
519
- // 监听下拉框,如果有隐患,需要拍照
520
- this.$watch('f_items['+n+'].selected',function(val) {
521
- // 下拉框值
522
- //tag)
523
- // 下拉框所属设备
524
- //tag
525
- // 下拉框所属项
526
- //tag
527
- let shImage = false
528
- if(val.indexOf('其他') == -1){
529
- this.f_items[n].f_else = ''
577
+ }
578
+ },
579
+ transelation(val) {
580
+ this.selectindex = val
581
+ },
582
+ towatch() {
583
+ for (let n in this.f_items) {
584
+ if (typeof this.f_items[n] == 'function') {
585
+ continue
586
+ }
587
+ if (this.f_items[n].type == 'selector' || this.f_items[n].type == 'inputSelector') {
588
+ // 监听下拉框,如果有隐患,需要拍照
589
+ this.$watch('f_items[' + n + '].selected', function (val) {
590
+ // 下拉框值
591
+
592
+ // 下拉框所属设备
593
+ //tag
594
+ // 下拉框所属项
595
+ //tag
596
+ let shImage = false
597
+ if (val.indexOf('其他') == -1) {
598
+ this.f_items[n].f_else = ''
599
+ }
600
+ // if(this.config[this.device.device].items[item].type == 'selector'){
601
+ // this.f_items[n].f_item_value = val
602
+ // }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
603
+ // this.f_items[n].f_item_value = val[0]
604
+ // }
605
+ // 在配置中查找该项
606
+ for (let item in this.config[this.device.device].items) {
607
+ if (typeof this.config[this.device.device].items[item] == 'function') {
608
+ continue
530
609
  }
531
- // if(this.config[this.device.device].items[item].type == 'selector'){
532
- // this.f_items[n].f_item_value = val
533
- // }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
534
- // this.f_items[n].f_item_value = val[0]
535
- // }
536
- // 在配置中查找该项
537
- for (let item in this.config[this.device.device].items) {
538
- if(typeof this.config[this.device.device].items[item]=='function'){
539
- continue
540
- }
541
- let type = this.config[this.device.device].items[item].type
542
- let multiple = this.config[this.device.device].items[item].multiple?this.config[this.device.device].items[item].multiple:false
543
- let options = this.config[this.device.device].items[item].options
544
- if ((this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'inputSelector') && item == this.f_items[n].f_item_name) {
545
- for (let i in options) {
546
- if(typeof options[i]=='function'){
547
- continue
610
+ let type = this.config[this.device.device].items[item].type
611
+ let multiple = this.config[this.device.device].items[item].multiple ? this.config[this.device.device].items[item].multiple : false
612
+ let options = this.config[this.device.device].items[item].options
613
+ if ((this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'inputSelector') && item == this.f_items[n].f_item_name) {
614
+ for (let i in options) {
615
+ if (typeof options[i] == 'function') {
616
+ continue
617
+ }
618
+ let value
619
+ if (this.config[this.device.device].items[item].type == 'selector' && this.config[this.device.device].items[item].multiple == false) {
620
+ value = val[0]
621
+ } else if (this.config[this.device.device].items[item].type == 'inputSelector') {
622
+ value = val
623
+ }
624
+
625
+ // 如果未选择,清空图片、隐患信息等
626
+ if ((type == 'selector' && val.length == 0) || (type == 'inputSelector' && val == '')) {
627
+ this.f_items[n].f_path = ''
628
+ this.f_items[n].f_is_defect = ''
629
+ this.f_items[n].f_defect_level = ''
630
+ this.f_items[n].f_live_dispose = ''
631
+ this.f_items[n].f_deal_dispose = ''
632
+ this.f_items[n].tooltip = ''
633
+ }
634
+ if ((type == 'selector' && multiple == false && options[i].data == val[0]) || (type == 'inputSelector' && options[i].data == val) || (type == 'selector' && multiple == true && val.indexOf(options[i].data) > -1)) {
635
+ // 找到选中的项了
636
+ //tag
637
+ if (options[i].isdefect == true) {
638
+ shImage = true
548
639
  }
549
- let value
550
- if(this.config[this.device.device].items[item].type == 'selector' && this.config[this.device.device].items[item].multiple == false){
551
- value = val[0]
552
- }else if (this.config[this.device.device].items[item].type == 'inputSelector'){
553
- value = val
640
+ if (options[i].isdefect == false || this.f_items[n].f_item_value == '') {
641
+ shImage = false
554
642
  }
555
- //tag)
556
- // 如果未选择,清空图片、隐患信息等
557
- if((type == 'selector' && val.length == 0) || (type == 'inputSelector' && val == '')){
643
+ //tag
644
+ if (shImage) {
645
+ this.f_items[n].f_is_defect = true
646
+ this.f_items[n].f_defect_level = options[i].level
647
+ this.f_items[n].f_path = Vue.nopic
648
+ this.f_items[n].f_live_dispose = '否'
649
+ this.f_items[n].f_deal_dispose = options[i].deal ? options[i].deal : '报修'
650
+ //tag
651
+ this.f_items[n].tooltip = options[i].tooltip
652
+ } else {
558
653
  this.f_items[n].f_path = ''
559
654
  this.f_items[n].f_is_defect = ''
560
655
  this.f_items[n].f_defect_level = ''
@@ -562,673 +657,635 @@
562
657
  this.f_items[n].f_deal_dispose = ''
563
658
  this.f_items[n].tooltip = ''
564
659
  }
565
- if((type == 'selector' && multiple == false && options[i].data == val[0]) || (type == 'inputSelector' && options[i].data == val) || (type == 'selector' && multiple == true && val.indexOf(options[i].data) > -1)){
566
- // 找到选中的项了
567
- //tag
568
- if(options[i].isdefect == true ){
569
- shImage = true
570
- }
571
- if(options[i].isdefect == false || this.f_items[n].f_item_value == ''){
572
- shImage = false
573
- }
574
- //tag
575
- if(shImage){
576
- this.f_items[n].f_is_defect =true
577
- this.f_items[n].f_defect_level = options[i].level
578
- this.f_items[n].f_path = Vue.nopic
579
- this.f_items[n].f_live_dispose = '否'
580
- this.f_items[n].f_deal_dispose = options[i].deal ? options[i].deal:'报修'
581
- //tag
582
- this.f_items[n].tooltip= options[i].tooltip
583
- }else{
584
- this.f_items[n].f_path = ''
585
- this.f_items[n].f_is_defect = ''
586
- this.f_items[n].f_defect_level = ''
587
- this.f_items[n].f_live_dispose = ''
588
- this.f_items[n].f_deal_dispose = ''
589
- this.f_items[n].tooltip = ''
590
- }
591
- }
592
660
  }
593
661
  }
594
662
  }
595
663
  }
596
- )
597
- // this.$watch('other',function(val){
598
- // //tag
599
- // if(this.selectindex != null) {
600
- // let index = this.f_items[this.selectindex].f_item_value.indexOf('其他')
601
- // if(index > -1){
602
- // this.f_items[this.selectindex].f_item_value.splice(index,1,this.other)
603
- // }
604
- // }
605
- //
606
- // })
607
- }else if(this.f_items[n].type == 'radio') {
608
- // 监听单选框,如果有隐患,需要拍照
609
- this.$watch('f_items[' + n + '].f_item_value', function (val) {
610
- //tag)
611
- let options = this.f_items[n].options
612
- //tag)
613
- for (let i = 0; i < options.length; i++) {
614
- //tag)
615
- // 找到选中的项了
616
- if (options[i].value == val) {
617
- // 如果有隐患,拍图片
618
- if (options[i].isdefect) {
619
- this.f_items[n].f_is_defect = true
620
- this.f_items[n].f_defect_level = options[i].level
621
- this.f_items[n].f_path = Vue.nopic
622
- this.f_items[n].f_live_dispose = '否'
623
- this.f_items[n].f_deal_dispose = options[i].deal ? options[i].deal:'报修'
624
- this.f_items[n].tooltip = options[i].tooltip
625
- //tag)
626
- return
627
- }
628
- }
629
- }
630
- this.f_items[n].f_path = ''
631
- this.f_items[n].f_is_defect = ''
632
- this.f_items[n].f_defect_level = ''
633
- this.f_items[n].f_live_dispose = ''
634
- this.f_items[n].f_deal_dispose = ''
635
- this.f_items[n].tooltip = ''
636
- })
637
- }else if(this.f_items[n].type == 'checkbox') {
638
- // 监听单选框,如果有隐患,需要拍照
639
- this.$watch('f_items[' + n + '].f_item_value', function (val) {
640
- //tag)
641
- // 如果是手动赋值,不执行下面逻辑
642
- if (this.f_items[n].isReSet) {
643
- this.f_items[n].isReSet = false
644
- return
645
- }
646
- let options = this.f_items[n].options
647
- //tag)
648
- // 取出选中项中有隐患的详细信息
649
- let selected = options.filter(item => { return val.indexOf(item.value) != -1 && item.isdefect })
650
-
651
- if(selected.length > 0){
652
- // 防止赋值无限调用
653
- this.f_items[n].isReSet = true
654
- let selectList = selected.map(item => {return item.value})
655
- // 如果选中的是非隐患项,取消选中isdefect为true的
656
- if (selectList.indexOf(val[val.length - 1]) == -1) {
657
- this.f_items[n].f_item_value = val.filter(item => {return selectList.indexOf(item) == -1})
658
- this.f_items[n].f_path = ''
659
- this.f_items[n].f_is_defect = ''
660
- this.f_items[n].f_defect_level = ''
661
- this.f_items[n].f_live_dispose = ''
662
- this.f_items[n].f_deal_dispose = ''
663
- this.f_items[n].tooltip = ''
664
- return
665
- }
666
- // 如果选中的是隐患项,取消选中isdefect为false的
667
- this.f_items[n].f_item_value = selectList
668
- // 如果第一次选择隐患项,初始化
669
- if (!this.f_items[n].f_is_defect) {
664
+ }
665
+ )
666
+ // this.$watch('other',function(val){
667
+ // //tag
668
+ // if(this.selectindex != null) {
669
+ // let index = this.f_items[this.selectindex].f_item_value.indexOf('其他')
670
+ // if(index > -1){
671
+ // this.f_items[this.selectindex].f_item_value.splice(index,1,this.other)
672
+ // }
673
+ // }
674
+ //
675
+ // })
676
+ } else if (this.f_items[n].type == 'radio') {
677
+ // 监听单选框,如果有隐患,需要拍照
678
+ this.$watch('f_items[' + n + '].f_item_value', function (val) {
679
+
680
+ let options = this.f_items[n].options
681
+
682
+ for (let i = 0; i < options.length; i++) {
683
+
684
+ // 找到选中的项了
685
+ if (options[i].value == val) {
686
+ // 如果有隐患,拍图片
687
+ if (options[i].isdefect) {
670
688
  this.f_items[n].f_is_defect = true
671
- this.f_items[n].f_defect_level = selected[0].level
689
+ this.f_items[n].f_defect_level = options[i].level
672
690
  this.f_items[n].f_path = Vue.nopic
673
691
  this.f_items[n].f_live_dispose = '否'
674
- this.f_items[n].f_deal_dispose = selected[0].deal ? selected[0].deal:'报修'
675
- //tag
676
- this.f_items[n].tooltip = selected[0].tooltip
692
+ this.f_items[n].f_deal_dispose = options[i].deal ? options[i].deal : '报修'
693
+ this.f_items[n].tooltip = options[i].tooltip
694
+
695
+ return
677
696
  }
678
- //tag)
679
- return
680
697
  }
681
- this.f_items[n].f_path = ''
682
- this.f_items[n].f_is_defect = ''
683
- this.f_items[n].f_defect_level = ''
684
- this.f_items[n].f_live_dispose = ''
685
- this.f_items[n].f_deal_dispose = ''
686
- this.f_items[n].tooltip = ''
698
+ }
699
+ this.f_items[n].f_path = ''
700
+ this.f_items[n].f_is_defect = ''
701
+ this.f_items[n].f_defect_level = ''
702
+ this.f_items[n].f_live_dispose = ''
703
+ this.f_items[n].f_deal_dispose = ''
704
+ this.f_items[n].tooltip = ''
705
+ })
706
+ } else if (this.f_items[n].type == 'checkbox') {
707
+ // 监听单选框,如果有隐患,需要拍照
708
+ this.$watch('f_items[' + n + '].f_item_value', function (val) {
709
+
710
+ // 如果是手动赋值,不执行下面逻辑
711
+ if (this.f_items[n].isReSet) {
712
+ this.f_items[n].isReSet = false
713
+ return
714
+ }
715
+ let options = this.f_items[n].options
716
+
717
+ // 取出选中项中有隐患的详细信息
718
+ let selected = options.filter(item => {
719
+ return val.indexOf(item.value) != -1 && item.isdefect
687
720
  })
688
- }
689
- }
690
- //tag)
691
- },
692
- getjishuNumber(val){
693
- if(!this.f_bc_jishu.index || !this.f_metergasnums.index){
694
- return
721
+
722
+ if (selected.length > 0) {
723
+ // 防止赋值无限调用
724
+ this.f_items[n].isReSet = true
725
+ let selectList = selected.map(item => {
726
+ return item.value
727
+ })
728
+ // 如果选中的是非隐患项,取消选中isdefect为true的
729
+ if (selectList.indexOf(val[val.length - 1]) == -1) {
730
+ this.f_items[n].f_item_value = val.filter(item => {
731
+ return selectList.indexOf(item) == -1
732
+ })
733
+ this.f_items[n].f_path = ''
734
+ this.f_items[n].f_is_defect = ''
735
+ this.f_items[n].f_defect_level = ''
736
+ this.f_items[n].f_live_dispose = ''
737
+ this.f_items[n].f_deal_dispose = ''
738
+ this.f_items[n].tooltip = ''
739
+ return
740
+ }
741
+ // 如果选中的是隐患项,取消选中isdefect为false的
742
+ this.f_items[n].f_item_value = selectList
743
+ // 如果第一次选择隐患项,初始化
744
+ if (!this.f_items[n].f_is_defect) {
745
+ this.f_items[n].f_is_defect = true
746
+ this.f_items[n].f_defect_level = selected[0].level
747
+ this.f_items[n].f_path = Vue.nopic
748
+ this.f_items[n].f_live_dispose = '否'
749
+ this.f_items[n].f_deal_dispose = selected[0].deal ? selected[0].deal : '报修'
750
+ //tag
751
+ this.f_items[n].tooltip = selected[0].tooltip
752
+ }
753
+
754
+ return
755
+ }
756
+ this.f_items[n].f_path = ''
757
+ this.f_items[n].f_is_defect = ''
758
+ this.f_items[n].f_defect_level = ''
759
+ this.f_items[n].f_live_dispose = ''
760
+ this.f_items[n].f_deal_dispose = ''
761
+ this.f_items[n].tooltip = ''
762
+ })
695
763
  }
696
- // 先清空
697
- this.f_items[this.f_sy_jishu.index].f_item_value = null
698
- if(val=='本次基数'){
699
- //周期用气 = 本次基数-上次基数
700
- this.f_items[this.f_sy_jishu.index].f_item_value= this.f_items[this.f_bc_jishu.index].f_item_value-this.f_items[this.f_metergasnums.index].f_item_value
701
- if (isNaN(this.f_items[this.f_sy_jishu.index].f_item_value)) {
702
- this.f_items[this.f_sy_jishu.index].f_item_value = null
703
- }
764
+ }
765
+
766
+ },
767
+ getjishuNumber(val) {
768
+ if (!this.f_bc_jishu.index || !this.f_metergasnums.index) {
769
+ return
770
+ }
771
+ // 先清空
772
+ this.f_items[this.f_sy_jishu.index].f_item_value = null
773
+ if (val == '本次基数') {
774
+ //周期用气 = 本次基数-上次基数
775
+ this.f_items[this.f_sy_jishu.index].f_item_value = this.f_items[this.f_bc_jishu.index].f_item_value - this.f_items[this.f_metergasnums.index].f_item_value
776
+ if (isNaN(this.f_items[this.f_sy_jishu.index].f_item_value)) {
777
+ this.f_items[this.f_sy_jishu.index].f_item_value = null
704
778
  }
705
- },
706
- getGasAberrantNumber(val) {
779
+ }
780
+ },
781
+ getGasAberrantNumber(val) {
782
+ //tag
783
+ if (!this.f_meter_base.index || !this.f_gas_balance.index) {
707
784
  //tag
708
- if(!this.f_meter_base.index || !this.f_gas_balance.index){
709
- //tag
710
- return
711
- }
712
- // 先清空
713
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
714
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
715
- if(val=='已用气量'){
716
- //剩余气量 = 累购-已用
717
- this.f_items[this.f_gas_balance.index].f_item_value= this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_meter_base.index].f_item_value
718
- if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
719
- this.f_items[this.f_gas_balance.index].f_item_value = null
720
- }
785
+ return
786
+ }
787
+ // 先清空
788
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
789
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
790
+ if (val == '已用气量') {
791
+ //剩余气量 = 累购-已用
792
+ this.f_items[this.f_gas_balance.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value - this.f_items[this.f_meter_base.index].f_item_value
793
+ if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
794
+ this.f_items[this.f_gas_balance.index].f_item_value = null
721
795
  }
796
+ }
722
797
 
723
- // 只有两个值都填了才会计算
724
- if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
725
- return
726
- }
727
- //tag)
728
- //tag
729
- //tag
798
+ // 只有两个值都填了才会计算
799
+ if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
800
+ return
801
+ }
730
802
 
731
- // 计算公式 => 气量异常差值 = 剩余气量 - 表内剩余
732
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_balance.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
733
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_aberrant_number.index].f_item_value.toFixed(3)
734
- // 如果数值有误,清空结果s
735
- if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
736
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
737
- }
738
- //tag ===> ' + Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value))
739
- //tag ===> ' + JSON.stringify(Number(this.gasDeviation)))
740
- // 计算差值是否在范围内
741
- // if (Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) > Number(this.gasDeviation)) {
742
- // this.f_items[this.f_gas_aberrant_number.index].f_is_defect = true
743
- // }
803
+ //tag
804
+ //tag
805
+
806
+ // 计算公式 => 气量异常差值 = 剩余气量 - 表内剩余
807
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_balance.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
808
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_aberrant_number.index].f_item_value.toFixed(3)
809
+ // 如果数值有误,清空结果s
810
+ if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
811
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
812
+ }
813
+ //tag ===> ' + Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value))
814
+ //tag ===> ' + JSON.stringify(Number(this.gasDeviation)))
815
+ // 计算差值是否在范围内
816
+ // if (Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) > Number(this.gasDeviation)) {
817
+ // this.f_items[this.f_gas_aberrant_number.index].f_is_defect = true
818
+ // }
744
819
 
745
- //tag)
746
- },
747
- getFeeAberrantNumber(val) {
820
+
821
+ },
822
+ getFeeAberrantNumber(val) {
823
+ //tag
824
+ // 只有两个值都填了才会计算
825
+ if (!this.f_fee_base.index || !this.f_balance_amount.index) {
748
826
  //tag
749
- // 只有两个值都填了才会计算
750
- if(!this.f_fee_base.index || !this.f_balance_amount.index ){
751
- //tag
752
- if(this.f_meter_base.index || this.f_gas_balance.index || this.f_fee_base.index){
827
+ if (this.f_meter_base.index || this.f_gas_balance.index || this.f_fee_base.index) {
828
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
829
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
830
+ // if(val=='已用气量'){
831
+ // //剩余气量 = 累购-已用
832
+ // this.f_items[this.f_gas_balance.index].f_item_value= this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_prior_reading.index].f_item_value
833
+ // if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
834
+ // this.f_items[this.f_gas_balance.index].f_item_value = null
835
+ // }
836
+ // }
837
+ // 只有两个值都填了才会计算
838
+ // if (!this.f_items[this.f_table_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
839
+ // return
840
+ // }
841
+ // 计算公式 => 气量异常差值 = 剩余气量 - 表内剩余
842
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value - this.f_items[this.f_meter_base.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
843
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_aberrant_number.index].f_item_value.toFixed(3)
844
+ // 如果数值有误,清空结果s
845
+ if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
753
846
  this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
754
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
755
- // if(val=='已用气量'){
756
- // //剩余气量 = 累购-已用
757
- // this.f_items[this.f_gas_balance.index].f_item_value= this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_prior_reading.index].f_item_value
758
- // if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
759
- // this.f_items[this.f_gas_balance.index].f_item_value = null
760
- // }
761
- // }
762
- // 只有两个值都填了才会计算
763
- // if (!this.f_items[this.f_table_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
764
- // return
765
- // }
766
- // 计算公式 => 气量异常差值 = 剩余气量 - 表内剩余
767
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_meter_base.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
768
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_aberrant_number.index].f_item_value.toFixed(3)
769
- // 如果数值有误,清空结果s
770
- if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
771
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
772
- }
773
- return
774
- }else{
775
- return
776
847
  }
848
+ return
849
+ } else {
850
+ return
777
851
  }
778
- // 先清空
852
+ }
853
+ // 先清空
854
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
855
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
856
+ //
857
+ // if(val=='表内剩余'){
858
+ // this.f_items[this.f_fee_balance.index].f_item_value=this.f_items[this.f_total_fee.index].f_item_value-this.f_items[this.f_fee_base.index].f_item_value
859
+ // if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
860
+ // this.f_items[this.f_fee_balance.index].f_item_value = null
861
+ // }
862
+ // }
863
+ //
864
+ // if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_fee_balance.index].f_item_value) {
865
+ // return
866
+ // }
867
+
868
+ // 计算公式 => 金额异常差值 = 系统金额 (f_balance_amount 系统已有)- 表内剩余(f_fee_base 客户填)
869
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_balance_amount.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
870
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
871
+ if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
779
872
  this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
780
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
781
- //
782
- // if(val=='表内剩余'){
783
- // this.f_items[this.f_fee_balance.index].f_item_value=this.f_items[this.f_total_fee.index].f_item_value-this.f_items[this.f_fee_base.index].f_item_value
784
- // if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
785
- // this.f_items[this.f_fee_balance.index].f_item_value = null
786
- // }
787
- // }
788
- //
789
- // if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_fee_balance.index].f_item_value) {
790
- // return
791
- // }
873
+ }
874
+ //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
875
+ //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
876
+ // 计算差值是否在范围内
877
+ // if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
878
+ // this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
879
+ // }
792
880
 
793
- // 计算公式 => 金额异常差值 = 系统金额 (f_balance_amount 系统已有)- 表内剩余(f_fee_base 客户填)
794
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_balance_amount.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
795
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
796
- if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
797
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
798
- }
799
- //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
800
- //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
801
- // 计算差值是否在范围内
802
- // if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
803
- // this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
804
- // }
805
881
 
806
- //tag)
807
- },
808
- //物联网表字轮数改变触发
809
- getmeteraberrantnumber() {
810
- //tag
882
+ },
883
+ //物联网表字轮数改变触发
884
+ getmeteraberrantnumber() {
885
+ //tag
811
886
 
812
- // 先清空
887
+ // 先清空
888
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
889
+ this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = false
890
+ //tag
891
+ // 只有两个值都填了才会计算
892
+ if (!this.f_items[this.f_meter_base.index].f_item_value || !this.f_items[this.f_meter_base1.index].f_item_value) {
893
+ return
894
+ }
895
+ //tag
896
+ // 计算公式 => 表数异常差值= - 字轮数 - 后台表读数
897
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_base1.index].f_item_value - this.f_items[this.f_meter_base.index].f_item_value
898
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_aberrant_number1.index].f_item_value.toFixed(3)
899
+ if (isNaN(this.f_items[this.f_meter_aberrant_number1.index].f_item_value)) {
813
900
  this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
814
- this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = false
815
- //tag
816
- // 只有两个值都填了才会计算
817
- if (!this.f_items[this.f_meter_base.index].f_item_value || !this.f_items[this.f_meter_base1.index].f_item_value) {
818
- return
819
- }
820
- //tag
821
- // 计算公式 => 表数异常差值= - 字轮数 - 后台表读数
822
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_base1.index].f_item_value - this.f_items[this.f_meter_base.index].f_item_value
823
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_aberrant_number1.index].f_item_value.toFixed(3)
824
- if (isNaN(this.f_items[this.f_meter_aberrant_number1.index].f_item_value)) {
825
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
826
- }
827
- //tag ===> ' + Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value))
828
- // 计算差值是否在范围内
829
- //tag)
830
- if (Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value) > Number(this.meterbase)){
831
- this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = true
832
- }
901
+ }
902
+ //tag ===> ' + Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value))
903
+ // 计算差值是否在范围内
904
+
905
+ if (Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value) > Number(this.meterbase)) {
906
+ this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = true
907
+ }
833
908
 
834
- //tag)
835
- },
836
909
 
837
- disSelect(index, itemValue) {
838
- //tag)
839
- //tag)
840
- if (this.f_items[index].f_item_value == itemValue) {
841
- this.$set(`f_items[${index}].f_item_value`, '')
910
+ },
911
+
912
+ disSelect(index, itemValue) {
913
+
914
+
915
+ if (this.f_items[index].f_item_value == itemValue) {
916
+ this.$set(`f_items[${index}].f_item_value`, '')
917
+ }
918
+ }
919
+ },
920
+ ready() {
921
+ //tag
922
+ //tag
923
+ if (Vue.config.safecheck != undefined) {
924
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
925
+ if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
926
+ this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
927
+ }
928
+ if (Vue.config.safecheck.ApproveConfig.dealdispose != undefined) {
929
+ this.dealdispose = Vue.config.safecheck.ApproveConfig.dealdispose
930
+ }
931
+ if (Vue.config.safecheck.ApproveConfig.hiddendanger != undefined) {
932
+ if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 3) {
933
+ this.hiddenDangerImgNumber = 3
934
+ } else {
935
+ this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
936
+ }
842
937
  }
843
938
  }
844
- },
845
- ready() {
846
- //tag
847
- //tag
848
- if(Vue.config.safecheck != undefined){
849
- if(Vue.config.safecheck.ApproveConfig != undefined){
850
- if(Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
851
- this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
939
+ }
940
+ //创建页面所需数据
941
+ this.$set('piece', this.paper['device' + this.device.n][this.idx])
942
+ let n = 0
943
+ for (let item in this.config[this.device.device].items) {
944
+ if (typeof this.config[this.device.device].items[item] == 'function') {
945
+ continue
946
+ }
947
+ let index = this.config[this.device.device].items[item].index - 1
948
+ this.$set('page.options' + index, [])
949
+ // 先根据配置组接页面
950
+ let f_item_value
951
+ if (this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox') {
952
+ f_item_value = []
953
+ // 判断选项的默认值
954
+ for (let defitem in this.config[this.device.device].items[item].options) {
955
+ if (typeof this.config[this.device.device].items[item].options[defitem] == 'function') {
956
+ continue
852
957
  }
853
- if(Vue.config.safecheck.ApproveConfig.dealdispose != undefined) {
854
- this.dealdispose = Vue.config.safecheck.ApproveConfig.dealdispose
958
+ let defopt = this.config[this.device.device].items[item].options[defitem]
959
+ if (defopt.isdefault) {
960
+ //tag
961
+ f_item_value[0] = defopt.data
855
962
  }
856
- if(Vue.config.safecheck.ApproveConfig.hiddendanger != undefined) {
857
- if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 3) {
858
- this.hiddenDangerImgNumber = 3
859
- }else {
860
- this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
861
- }
963
+ }
964
+ // if(this.config[this.device.device].items[item].data){
965
+ // f_item_value.push(this.config[this.device.device].items[item].data)
966
+ // }
967
+ } else if (this.config[this.device.device].items[item].type == 'radio') {
968
+ //为radio添加默认值
969
+ f_item_value = ''
970
+
971
+ for (let defitem in this.config[this.device.device].items[item].options) {
972
+ if (typeof this.config[this.device.device].items[item].options[defitem] == 'function') {
973
+ continue
974
+ }
975
+
976
+ let defopt = this.config[this.device.device].items[item].options[defitem]
977
+ if (defopt.isdefault) {
978
+
979
+ f_item_value = defopt.data
862
980
  }
863
981
  }
982
+ } else {
983
+ f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
864
984
  }
865
- //tag
866
- //tag)
867
- //tag)
868
- //tag)
869
- //创建页面所需数据
870
- this.$set('piece', this.paper['device'+this.device.n][this.idx])
871
- //tag)
872
- //tag)
873
- let n = 0
874
- for (let item in this.config[this.device.device].items) {
875
- if(typeof this.config[this.device.device].items[item]=='function'){
876
- continue
985
+
986
+ let it = {
987
+ type: this.config[this.device.device].items[item].type,
988
+ f_item_name: item,
989
+ checkmust: this.config[this.device.device].items[item].checkmust,
990
+ f_item_value: f_item_value,
991
+ f_is_defect: '',
992
+ multiple: this.config[this.device.device].items[item].multiple == true ? this.config[this.device.device].items[item].multiple : false,
993
+ f_repair_department: this.config[this.device.device].items[item].repairDepartment ? this.config[this.device.device].items[item].repairDepartment : '',
994
+ f_deal_dispose: this.config[this.device.device].items[item].dealDispose ? this.config[this.device.device].items[item].dealDispose : '',
995
+ f_handle_date: '',
996
+ f_block_pitfall: this.config[this.device.device].items[item].blockPitfall ? this.config[this.device.device].items[item].blockPitfall : false,
997
+ f_lose_efficacy: this.config[this.device.device].items[item].loseEfficacy ? this.config[this.device.device].items[item].loseEfficacy : '',
998
+ isshow: this.config[this.device.device].items[item].isshow == false ? this.config[this.device.device].items[item].isshow : true,
999
+ readonly: this.config[this.device.device].items[item].readonly == true ? true : false,
1000
+ remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
1001
+ f_path: '',
1002
+ unit: this.config[this.device.device].items[item].unit ? this.config[this.device.device].items[item].unit : '',
1003
+ tooltip: '',
1004
+ f_live_dispose: '',
1005
+ f_else: '',
1006
+ f_p1_path: '',
1007
+ f_p2_path: '',
1008
+ f_p3_path: '',
1009
+ f_longitude: '',
1010
+ f_defect_remark: '',
1011
+ f_latitude: ''
1012
+ }
1013
+ this.$set('f_items[' + index + ']', it)
1014
+ if (this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'inputSelector') {
1015
+ if (this.config[this.device.device].items[item].type == 'selector') {
1016
+ this.page['options' + index].push({
1017
+ label: "请选择",
1018
+ value: ''
1019
+ })
877
1020
  }
878
- let index = this.config[this.device.device].items[item].index-1
879
- this.$set('page.options' + index, [])
880
- //tag)
881
- //tag)
882
- //tag)
883
- // 先根据配置组接页面
884
- let f_item_value
885
- if(this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox'){
886
- f_item_value = []
887
- // 判断选项的默认值
888
- for (let defitem in this.config[this.device.device].items[item].options) {
889
- if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
890
- continue
891
- }
892
- let defopt = this.config[this.device.device].items[item].options[defitem]
893
- if (defopt.isdefault) {
894
- //tag
895
- f_item_value[0] = defopt.data
896
- }
1021
+ for (let i in this.config[this.device.device].items[item].options) {
1022
+ if (typeof this.config[this.device.device].items[item].options[i] == 'function') {
1023
+ continue
897
1024
  }
898
- // if(this.config[this.device.device].items[item].data){
899
- // f_item_value.push(this.config[this.device.device].items[item].data)
900
- // }
901
- }else if(this.config[this.device.device].items[item].type == 'radio'){
902
- //为radio添加默认值
903
- f_item_value=''
904
- //tag)
905
- for (let defitem in this.config[this.device.device].items[item].options) {
906
- if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
907
- continue
908
- }
909
- //tag)
910
- let defopt = this.config[this.device.device].items[item].options[defitem]
911
- if (defopt.isdefault) {
912
- //tag)
913
- f_item_value = defopt.data
914
- }
1025
+ this.page['options' + index].push({
1026
+ label: this.config[this.device.device].items[item].options[i].data,
1027
+ value: this.config[this.device.device].items[item].options[i].data,
1028
+ tooltip: this.config[this.device.device].items[item].options[i].tooltip,
1029
+ deal: this.config[this.device.device].items[item].options[i].deal
1030
+ })
1031
+ }
1032
+ if (this.config[this.device.device].items[item].type == 'selector') {
1033
+ this.$set('f_items[' + index + '].selected', f_item_value)
1034
+ } else if (this.config[this.device.device].items[item].type == 'inputSelector') {
1035
+ this.$set('f_items[' + index + '].selected', f_item_value)
1036
+ }
1037
+ this.$set('f_items[' + index + '].options', this.page['options' + index])
1038
+ } else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
1039
+ for (let i in this.config[this.device.device].items[item].options) {
1040
+ if (typeof this.config[this.device.device].items[item].options[i] == 'function') {
1041
+ continue
915
1042
  }
916
- }else{
917
- f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
1043
+ this.page['options' + index].push({
1044
+ label: this.config[this.device.device].items[item].options[i].data,
1045
+ value: this.config[this.device.device].items[item].options[i].data,
1046
+ isdefect: this.config[this.device.device].items[item].options[i].isdefect,
1047
+ level: this.config[this.device.device].items[item].options[i].level,
1048
+ tooltip: this.config[this.device.device].items[item].options[i].tooltip,
1049
+ deal: this.config[this.device.device].items[item].options[i].deal
1050
+ })
918
1051
  }
919
- //tag)
920
- let it = {
921
- type: this.config[this.device.device].items[item].type,
922
- f_item_name: item,
923
- checkmust: this.config[this.device.device].items[item].checkmust,
924
- f_item_value: f_item_value,
925
- f_is_defect: '',
926
- multiple:this.config[this.device.device].items[item].multiple == true?this.config[this.device.device].items[item].multiple:false,
927
- isshow:this.config[this.device.device].items[item].isshow == false?this.config[this.device.device].items[item].isshow:true,
928
- readonly: this.config[this.device.device].items[item].readonly == true?true:false,
929
- remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
930
- f_path: '',
931
- unit: this.config[this.device.device].items[item].unit ? this.config[this.device.device].items[item].unit : '',
932
- tooltip:'',
933
- f_live_dispose:'',
934
- f_deal_dispose:'',
935
- f_else: '',
936
- f_p1_path: '',
937
- f_p2_path: '',
938
- f_p3_path: '',
939
- f_longitude:'',
940
- f_defect_remark:'',
941
- f_latitude:''
1052
+ this.$set('f_items[' + index + '].options', this.page['options' + index])
1053
+ this.$set('f_items[' + index + '].f_item_value', f_item_value)
1054
+ }
1055
+ n = n + 1
1056
+ }
1057
+ if (JSON.stringify(this.piece) == '{}') {
1058
+ // 如果没有,则新建
1059
+ this.$set('piece.f_items', this.f_items)
1060
+ this.$set('piece.f_device_type', this.device.device)
1061
+ } else {
1062
+ // 已经存在,把之前的数据重新填入
1063
+ for (let f in this.f_items) {
1064
+ if (typeof this.f_items[f] == 'function') {
1065
+ continue
942
1066
  }
943
- //tag)
944
- //tag)
945
- this.$set('f_items['+index+']',it)
946
- if (this.config[this.device.device].items[item].type == 'selector' ||this.config[this.device.device].items[item].type == 'inputSelector') {
947
- if(this.config[this.device.device].items[item].type == 'selector'){
948
- this.page['options' + index].push({
949
- label: "请选择",
950
- value: ''
951
- })
1067
+ for (let p in this.piece.f_items) {
1068
+ if (typeof this.piece.f_items[p] == 'function') {
1069
+ continue
952
1070
  }
953
- for (let i in this.config[this.device.device].items[item].options) {
954
- if(typeof this.config[this.device.device].items[item].options[i]=='function'){
955
- continue
1071
+ if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
1072
+ this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
1073
+ if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
1074
+ this.f_items[f].selected = this.piece.f_items[p].f_item_value
956
1075
  }
957
- this.page['options' + index].push({
958
- label: this.config[this.device.device].items[item].options[i].data,
959
- value: this.config[this.device.device].items[item].options[i].data,
960
- tooltip: this.config[this.device.device].items[item].options[i].tooltip,
961
- deal:this.config[this.device.device].items[item].options[i].deal
962
- })
963
- }
964
- if(this.config[this.device.device].items[item].type == 'selector'){
965
- this.$set('f_items['+index+'].selected', f_item_value)
966
- }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
967
- this.$set('f_items['+index+'].selected', f_item_value)
968
- }
1076
+ // 取出特殊值
1077
+ if (this.f_items[f].f_item_name == '初始表底') {
1078
+
1079
+ this.f_initial_base.index = f
1080
+ } else if (this.f_items[f].f_item_name == '气表累购') {
1081
+
1082
+ this.f_total_gas.index = f
1083
+ } else if (this.f_items[f].f_item_name == '上次基数') {
1084
+
1085
+ this.f_metergasnums.index = f
1086
+ } else if (this.f_items[f].f_item_name == '本次基数') {
1087
+
1088
+ this.f_bc_jishu.index = f
1089
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1090
+ this.getjishuNumber('本次基数')
1091
+ })
1092
+ } else if (this.f_items[f].f_item_name == '周期用气') {
1093
+
1094
+ this.f_sy_jishu.index = f
1095
+ } else if (this.f_items[f].f_item_name == '已用气量') {
1096
+
1097
+ this.f_meter_base.index = f
1098
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1099
+ this.getGasAberrantNumber('已用气量')
1100
+ })
1101
+ } else if (this.f_items[f].f_item_name == '剩余气量') {
1102
+
1103
+ this.f_gas_balance.index = f
1104
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1105
+ this.getGasAberrantNumber('')
1106
+ })
1107
+ } else if (this.f_items[f].f_item_name == '气量异常差值') {
1108
+
1109
+ this.f_gas_aberrant_number.index = f
1110
+ } else if (this.f_items[f].f_item_name == '累购金额') {
969
1111
 
970
- this.$set('f_items['+index+'].options',this.page['options' + index])
1112
+ this.f_total_fee.index = f
1113
+ } else if (this.f_items[f].f_item_name == '表内剩余') {
971
1114
 
972
- //tag)
973
- } else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
974
- //tag)
975
- //tag
976
- //tag)
977
- for (let i in this.config[this.device.device].items[item].options) {
978
- if(typeof this.config[this.device.device].items[item].options[i]=='function'){
979
- continue
1115
+ this.f_fee_base.index = f
1116
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1117
+ this.getFeeAberrantNumber('表内剩余')
1118
+ })
1119
+ } else if (this.f_items[f].f_item_name == '系统金额') {
1120
+
1121
+ this.f_balance_amount.index = f
1122
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1123
+ this.getFeeAberrantNumber('')
1124
+ })
1125
+ } else if (this.f_items[f].f_item_name == '金额异常差值') {
1126
+
1127
+ this.f_fee_aberrant_number.index = f
1128
+ } else if (this.f_items[f].f_item_name == '表读数') {
1129
+
1130
+ this.f_meter_base.index = f
1131
+ } else if (this.f_items[f].f_item_name == '表剩余金额') {
1132
+
1133
+ this.f_balance_amount.index = f
1134
+ } else if (this.f_items[f].f_item_name == '字轮数') {
1135
+
1136
+ this.f_meter_base1.index = f
1137
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1138
+ this.getmeteraberrantnumber()
1139
+ })
1140
+ } else if (this.f_items[f].f_item_name == '表余额') {
1141
+
1142
+ this.f_balance_amount1.index = f
1143
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1144
+ this.getfeeaberrantnumber1()
1145
+ })
1146
+ } else if (this.f_items[f].f_item_name == '表数异常差值') {
1147
+
1148
+ this.f_meter_aberrant_number1.index = f
1149
+ } else if (this.f_items[f].f_item_name == '表金额异常差值') {
1150
+
1151
+ this.f_fee_aberrant_number1.index = f
980
1152
  }
981
- //tag
982
- this.page['options' + index].push({
983
- label: this.config[this.device.device].items[item].options[i].data,
984
- value: this.config[this.device.device].items[item].options[i].data,
985
- isdefect: this.config[this.device.device].items[item].options[i].isdefect,
986
- level: this.config[this.device.device].items[item].options[i].level,
987
- tooltip: this.config[this.device.device].items[item].options[i].tooltip,
988
- deal:this.config[this.device.device].items[item].options[i].deal
989
- })
990
- //tag)
991
1153
  }
992
- //tag)
993
- this.$set('f_items[' + index + '].options', this.page['options' + index])
994
- this.$set('f_items[' + index + '].f_item_value', f_item_value)
995
- //tag)
996
1154
  }
997
- n = n + 1
998
- }
999
- if(JSON.stringify(this.piece) == '{}') {
1000
- // 如果没有,则新建
1001
- this.$set('piece.f_items',this.f_items)
1002
- this.$set('piece.f_device_type',this.device.device)
1003
- } else {
1004
- // 已经存在,把之前的数据重新填入
1005
- for (let f in this.f_items){
1006
- if(typeof this.f_items[f]=='function'){
1155
+ for (let em in this.config[this.device.device].items) {
1156
+ if (typeof this.config[this.device.device].items[em] == 'function') {
1007
1157
  continue
1008
1158
  }
1009
- for(let p in this.piece.f_items) {
1010
- if(typeof this.piece.f_items[p]=='function'){
1011
- continue
1012
- }
1013
- if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
1014
- //tag)
1015
- //tag)
1016
- this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
1017
- //tag)
1018
- if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
1019
- //tag)
1020
- //tag)
1021
- this.f_items[f].selected = this.piece.f_items[p].f_item_value
1022
- //tag)
1023
- }
1024
- // 取出特殊值
1025
- if (this.f_items[f].f_item_name == '初始表底') {
1026
- //tag)
1027
- this.f_initial_base.index = f
1028
- } else if (this.f_items[f].f_item_name == '气表累购') {
1029
- //tag)
1030
- this.f_total_gas.index = f
1031
- } else if (this.f_items[f].f_item_name == '上次基数') {
1032
- //tag)
1033
- this.f_metergasnums.index = f
1034
- } else if (this.f_items[f].f_item_name == '本次基数') {
1035
- //tag)
1036
- this.f_bc_jishu.index = f
1037
- this.$watch('f_items[' + f + '].f_item_value', function () {
1038
- this.getjishuNumber('本次基数')
1039
- })
1040
- } else if (this.f_items[f].f_item_name == '周期用气') {
1041
- //tag)
1042
- this.f_sy_jishu.index = f
1043
- } else if (this.f_items[f].f_item_name == '已用气量') {
1044
- //tag)
1045
- this.f_meter_base.index = f
1046
- this.$watch('f_items[' + f + '].f_item_value', function () {
1047
- this.getGasAberrantNumber('已用气量')
1048
- })
1049
- } else if (this.f_items[f].f_item_name == '剩余气量') {
1050
- //tag)
1051
- this.f_gas_balance.index = f
1052
- this.$watch('f_items[' + f + '].f_item_value', function () {
1053
- this.getGasAberrantNumber('')
1054
- })
1055
- } else if (this.f_items[f].f_item_name == '气量异常差值') {
1056
- //tag)
1057
- this.f_gas_aberrant_number.index = f
1058
- } else if (this.f_items[f].f_item_name == '累购金额') {
1059
- //tag)
1060
- this.f_total_fee.index = f
1061
- } else if (this.f_items[f].f_item_name == '表内剩余') {
1062
- //tag)
1063
- this.f_fee_base.index = f
1064
- this.$watch('f_items[' + f + '].f_item_value', function () {
1065
- this.getFeeAberrantNumber('表内剩余')
1066
- })
1067
- } else if (this.f_items[f].f_item_name == '系统金额') {
1068
- //tag)
1069
- this.f_balance_amount.index = f
1070
- this.$watch('f_items[' + f + '].f_item_value', function () {
1071
- this.getFeeAberrantNumber('')
1072
- })
1073
- } else if (this.f_items[f].f_item_name == '金额异常差值') {
1074
- //tag)
1075
- this.f_fee_aberrant_number.index = f
1076
- }else if (this.f_items[f].f_item_name == '表读数') {
1077
- //tag)
1078
- this.f_meter_base.index = f
1079
- }else if (this.f_items[f].f_item_name == '表剩余金额') {
1080
- //tag)
1081
- this.f_balance_amount.index = f
1082
- }else if (this.f_items[f].f_item_name == '字轮数') {
1083
- //tag)
1084
- this.f_meter_base1.index = f
1085
- this.$watch('f_items[' + f + '].f_item_value', function () {
1086
- this.getmeteraberrantnumber()
1087
- })
1088
- }else if (this.f_items[f].f_item_name == '表余额') {
1089
- //tag)
1090
- this.f_balance_amount1.index = f
1091
- this.$watch('f_items[' + f + '].f_item_value', function () {
1092
- this.getfeeaberrantnumber1()
1093
- })
1094
- }else if (this.f_items[f].f_item_name == '表数异常差值') {
1095
- //tag)
1096
- this.f_meter_aberrant_number1.index = f
1097
- }else if (this.f_items[f].f_item_name == '表金额异常差值') {
1098
- //tag)
1099
- this.f_fee_aberrant_number1.index = f
1100
- }
1101
- }
1102
- }
1103
- for (let em in this.config[this.device.device].items) {
1104
- if(typeof this.config[this.device.device].items[em]=='function'){
1105
- continue
1106
- }
1107
- if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
1108
- this.f_items[f].options =[]
1109
- for (let k in this.config[this.device.device].items[em].options) {
1110
- if(typeof this.config[this.device.device].items[em].options[k]=='function'){
1111
- continue
1112
- }
1113
- this.f_items[f].options.push({
1114
- label: this.config[this.device.device].items[em].options[k].data,
1115
- value: this.config[this.device.device].items[em].options[k].data
1116
- })
1159
+ if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
1160
+ this.f_items[f].options = []
1161
+ for (let k in this.config[this.device.device].items[em].options) {
1162
+ if (typeof this.config[this.device.device].items[em].options[k] == 'function') {
1163
+ continue
1117
1164
  }
1165
+ this.f_items[f].options.push({
1166
+ label: this.config[this.device.device].items[em].options[k].data,
1167
+ value: this.config[this.device.device].items[em].options[k].data
1168
+ })
1118
1169
  }
1119
1170
  }
1120
1171
  }
1121
- //tag)
1122
- this.$set('piece.f_items',this.f_items)
1123
1172
  }
1124
- this.towatch()
1125
- // for (let i = 0; i < this.f_items.length; i++) {
1126
- // if (this.f_items[i].f_item_name == '连接方式'){
1127
- // this.f_items[i].type = 'radio'
1128
- // }
1129
- // }
1130
- },
1131
- destroyed(){
1132
- let nullCount = 0
1133
- let metertitles
1134
- //判断当前是否有选中项
1135
- for (let row in this.f_items){
1136
- if(typeof this.f_items[row]=='function'){
1137
- continue
1138
- }
1139
- if(this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array){
1140
- //tag
1141
- this.f_items[row].f_item_value = this.f_items[row].selected
1142
- }else if(this.f_items[row].selected && this.f_items[row].selected != ''){
1143
- //tag
1144
- this.f_items[row].f_item_value = this.f_items[row].selected
1145
- }
1146
- // if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
1147
- // nullCount = nullCount+1
1148
- // }else if(this.f_items[row].f_item_value != ''){
1149
- // nullCount = nullCount+1
1150
- // }
1173
+
1174
+ this.$set('piece.f_items', this.f_items)
1175
+ }
1176
+ this.towatch()
1177
+ // for (let i = 0; i < this.f_items.length; i++) {
1178
+ // if (this.f_items[i].f_item_name == '连接方式'){
1179
+ // this.f_items[i].type = 'radio'
1180
+ // }
1181
+ // }
1182
+ },
1183
+ destroyed() {
1184
+ let nullCount = 0
1185
+ let metertitles
1186
+ //判断当前是否有选中项
1187
+ for (let row in this.f_items) {
1188
+ if (typeof this.f_items[row] == 'function') {
1189
+ continue
1151
1190
  }
1152
- let picture = []
1153
- // for (let row in this.f_items){
1154
- // let a={}
1155
- // a.f_path = this.f_items[row].f_path
1156
- // a.name = this.f_items[row].f_item_name
1191
+ if (this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array) {
1192
+ //tag
1193
+ this.f_items[row].f_item_value = this.f_items[row].selected
1194
+ } else if (this.f_items[row].selected && this.f_items[row].selected != '') {
1195
+ //tag
1196
+ this.f_items[row].f_item_value = this.f_items[row].selected
1197
+ }
1198
+ // if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
1199
+ // nullCount = nullCount+1
1200
+ // }else if(this.f_items[row].f_item_value != ''){
1201
+ // nullCount = nullCount+1
1157
1202
  // }
1158
- // picture.push(a)
1159
- this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
1160
- //tag
1161
- },
1162
- computed:{
1163
-
1164
1203
  }
1165
- }
1204
+ let picture = []
1205
+ // for (let row in this.f_items){
1206
+ // let a={}
1207
+ // a.f_path = this.f_items[row].f_path
1208
+ // a.name = this.f_items[row].f_item_name
1209
+ // }
1210
+ // picture.push(a)
1211
+ this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
1212
+ //tag
1213
+ },
1214
+ computed: {}
1215
+ }
1166
1216
  </script>
1167
1217
  <style lang="less" scoped>
1168
- .class-erro {
1169
- color: #a94442;
1170
- }
1171
- .fivelabel{
1172
- border: none;
1173
- border-left: 5px solid #A2C2EB;
1174
- float: left;
1175
- width: 35%;
1176
- margin-bottom: 3px;
1177
- text-align: left;
1178
- word-wrap: break-word;
1179
- white-space: normal;
1180
- }
1181
- .radiolabel{
1182
- border: none;
1183
- border-left: 5px solid #A2C2EB;
1184
- float: left;
1185
- width: 65%;
1186
- margin-bottom: 3px;
1187
- text-align: left;
1188
- word-wrap: break-word;
1189
- white-space: normal;
1190
- }
1191
-
1192
- .textlabel {
1193
- border: none;
1194
- border-left: 5px solid #A2C2EB;
1195
- width: 100%;
1196
- margin-bottom: 3px;
1197
- text-align: left;
1198
- word-wrap: break-word;
1199
- white-space: normal;
1200
- }
1201
- .textlabel1 {
1202
- border: none;
1203
- border-left: 5px solid #f7cb32;
1204
- width: 100%;
1205
- margin-bottom: 3px;
1206
- text-align: left;
1207
- word-wrap: break-word;
1208
- white-space: normal;
1209
- }
1210
- .spanrodio{
1211
- margin-right: 10px;
1212
- }
1213
- .div-photo{
1214
- width: auto;
1215
- height: auto;
1216
- /* margin-top: 10px; */
1217
- position: absolute;
1218
- bottom: 10px;
1219
- right: 10px;
1220
- }
1221
- .panel-self{
1222
- border-radius: 5px;
1223
- border:1px solid #c5e1f7;
1224
- //background-color: #F2F6FA;
1225
- }
1226
- .btn-photo{
1227
- border: 0;
1228
- border-radius: 7px;
1229
- background-color: #7dc1f4;
1230
- font: 15px PingFang-SC-Bold;
1231
- height: 20%;
1232
- }
1218
+ .class-erro {
1219
+ color: #a94442;
1220
+ }
1221
+
1222
+ .fivelabel {
1223
+ border: none;
1224
+ border-left: 5px solid #A2C2EB;
1225
+ float: left;
1226
+ width: 35%;
1227
+ margin-bottom: 3px;
1228
+ text-align: left;
1229
+ word-wrap: break-word;
1230
+ white-space: normal;
1231
+ }
1232
+
1233
+ .radiolabel {
1234
+ border: none;
1235
+ border-left: 5px solid #A2C2EB;
1236
+ float: left;
1237
+ width: 65%;
1238
+ margin-bottom: 3px;
1239
+ text-align: left;
1240
+ word-wrap: break-word;
1241
+ white-space: normal;
1242
+ }
1243
+
1244
+ .textlabel {
1245
+ border: none;
1246
+ border-left: 5px solid #A2C2EB;
1247
+ width: 100%;
1248
+ margin-bottom: 3px;
1249
+ text-align: left;
1250
+ word-wrap: break-word;
1251
+ white-space: normal;
1252
+ }
1253
+
1254
+ .textlabel1 {
1255
+ border: none;
1256
+ border-left: 5px solid #f7cb32;
1257
+ width: 100%;
1258
+ margin-bottom: 3px;
1259
+ text-align: left;
1260
+ word-wrap: break-word;
1261
+ white-space: normal;
1262
+ }
1263
+
1264
+ .spanrodio {
1265
+ margin-right: 10px;
1266
+ }
1267
+
1268
+ .div-photo {
1269
+ width: auto;
1270
+ height: auto;
1271
+ /* margin-top: 10px; */
1272
+ position: absolute;
1273
+ bottom: 10px;
1274
+ right: 10px;
1275
+ }
1276
+
1277
+ .panel-self {
1278
+ border-radius: 5px;
1279
+ border: 1px solid #c5e1f7;
1280
+ //background-color: #F2F6FA;
1281
+ }
1282
+
1283
+ .btn-photo {
1284
+ border: 0;
1285
+ border-radius: 7px;
1286
+ background-color: #7dc1f4;
1287
+ font: 15px PingFang-SC-Bold;
1288
+ height: 20%;
1289
+ }
1233
1290
  </style>
1234
1291