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