sale-client 3.5.131 → 3.5.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -397,7 +397,8 @@ export default {
|
|
|
397
397
|
}
|
|
398
398
|
},
|
|
399
399
|
closeParam () {
|
|
400
|
-
|
|
400
|
+
this.$refs.form.paramtype = undefined
|
|
401
|
+
this.$refs.form.paramGroup = undefined
|
|
401
402
|
this.showParame = !this.showParame
|
|
402
403
|
// if (this.isCheckAll) {
|
|
403
404
|
this.map.clear()
|
|
@@ -406,7 +407,8 @@ export default {
|
|
|
406
407
|
// this.isCheckAll = false
|
|
407
408
|
},
|
|
408
409
|
clear () {
|
|
409
|
-
this.$refs.form.paramtype =
|
|
410
|
+
this.$refs.form.paramtype = undefined
|
|
411
|
+
this.$refs.form.paramGroup = undefined
|
|
410
412
|
// this.isCheckAll = false
|
|
411
413
|
this.showParame = false
|
|
412
414
|
this.map.clear()
|
|
@@ -4,38 +4,44 @@
|
|
|
4
4
|
<div class="col-sm-4">
|
|
5
5
|
<label class="font_normal_body" style="text-align:left">参数类型</label>
|
|
6
6
|
</div>
|
|
7
|
-
<div class="col-sm-
|
|
7
|
+
<div class="col-sm-4">
|
|
8
|
+
<v-select
|
|
9
|
+
placeholder="请选择参数组别"
|
|
10
|
+
:value.sync="paramGroup"
|
|
11
|
+
style="width:40%"
|
|
12
|
+
width="80%"
|
|
13
|
+
:search="false"
|
|
14
|
+
:value-single="true"
|
|
15
|
+
@change="paramGroupChange"
|
|
16
|
+
v-model="paramGroup"
|
|
17
|
+
:options='paramGroups'
|
|
18
|
+
close-on-select
|
|
19
|
+
></v-select>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="col-sm-4" v-show="['读取','设置'].includes(paramGroup)">
|
|
8
22
|
<v-select
|
|
9
23
|
placeholder="请选择参数类型"
|
|
10
24
|
:value.sync="paramtype"
|
|
11
25
|
style="width:40%"
|
|
12
|
-
width="
|
|
26
|
+
width="80%"
|
|
27
|
+
:search="false"
|
|
13
28
|
:value-single="true"
|
|
14
29
|
v-model="paramtype"
|
|
15
30
|
:options='paramtypes'
|
|
16
31
|
close-on-select
|
|
17
32
|
></v-select>
|
|
18
33
|
</div>
|
|
19
|
-
|
|
20
|
-
-----{{row.overdueMessageValue}}
|
|
21
|
-
<input :type="text" v-model="row.overdueMessageValue" :value.sync="row.overdueMessageValue" style="width:70%" placeholder="" class="input_search">
|
|
22
|
-
</div>-->
|
|
23
|
-
<div v-for="(index,data) in newmeterinfo" style="height: auto">
|
|
34
|
+
<div v-for="(_,data) in newmeterinfo" style="height: auto">
|
|
24
35
|
<div class="col-sm-12" style="height: auto" v-if="data.name===paramtype"
|
|
25
|
-
v-
|
|
36
|
+
v-show="['设置特殊故障是否关阀','设置表功能开关'].includes(paramtype)&&!param.name.startsWith('设置')"
|
|
37
|
+
v-for="(_,param) in data.params">
|
|
26
38
|
<div class="col-sm-4">
|
|
27
39
|
<label class="font_normal_body" style="text-align:left">{{ param.name }}:</label>
|
|
28
40
|
<p class="glyphicon glyphicon-info-sign" style="margin-top:5%;color:#4a7cae"
|
|
29
41
|
:title="param.remark + ',当前系统设置默认值为:'+param.default_value"></p>
|
|
30
42
|
</div>
|
|
31
|
-
<!-- <div class="col-sm-4">-->
|
|
32
|
-
<!-- <label class="font_normal_body"-->
|
|
33
|
-
<!-- style="text-align:left">{{ param.default_value ? `当前默认值为:${param.default_value};` : '当前未设置默认值' }}</label>-->
|
|
34
|
-
<!-- </div>-->
|
|
35
43
|
<div class="col-sm-8" v-if="['设置特殊故障是否关阀','设置表功能开关'].includes(paramtype)">
|
|
36
|
-
<radio-btn v-model="row[param.title]" :value.sync="row[param.title]"></radio-btn>
|
|
37
|
-
<!-- <label>启用<input type="radio" v-model="param.isenbale" @click="reMeterinfo(index,param_index,data.params)" :disabled="!param.default_value" value="启用"/></label>-->
|
|
38
|
-
<!-- <label>保持不变<input type="radio" v-model="param.isenbale" @click="reMeterinfo(index,param_index,data.params)" value="保持不变"/></label>-->
|
|
44
|
+
<radio-btn @toggle="radioBtnToggle" :title="param.title" v-model="row[param.title]" :value.sync="row[param.title]"></radio-btn>
|
|
39
45
|
</div>
|
|
40
46
|
<template v-if="!['设置特殊故障是否关阀','设置表功能开关'].includes(paramtype)">
|
|
41
47
|
<div class="col-sm-8" v-if="param.type!=='option'">
|
|
@@ -196,7 +202,13 @@ export default {
|
|
|
196
202
|
paramtype: '',
|
|
197
203
|
param: {},
|
|
198
204
|
history: [],
|
|
199
|
-
isenbale: false
|
|
205
|
+
isenbale: false,
|
|
206
|
+
paramGroups: [{label: '读取', value: '读取'}, {label: '设置', value: '设置'},
|
|
207
|
+
{label: '设置表功能开关', value: '设置表功能开关'}, {
|
|
208
|
+
label: '设置特殊故障是否关阀',
|
|
209
|
+
value: '设置特殊故障是否关阀'
|
|
210
|
+
}],
|
|
211
|
+
paramGroup: ''
|
|
200
212
|
}
|
|
201
213
|
},
|
|
202
214
|
ready () {
|
|
@@ -222,7 +234,7 @@ export default {
|
|
|
222
234
|
if (temp && temp.params.length > 0) {
|
|
223
235
|
for (let i = 0; i < temp.params.length; i++) {
|
|
224
236
|
if (['设置特殊故障是否关阀', '设置表功能开关'].includes(val)) {
|
|
225
|
-
this.row[temp.params[i].title] = '
|
|
237
|
+
this.row[temp.params[i].title] = ['保持不变']
|
|
226
238
|
} else {
|
|
227
239
|
if (temp.params[i].default_value) {
|
|
228
240
|
this.row[temp.params[i].title] = temp.params[i].default_value
|
|
@@ -231,27 +243,49 @@ export default {
|
|
|
231
243
|
}
|
|
232
244
|
}
|
|
233
245
|
this.row = Object.assign({}, this.row)
|
|
234
|
-
// if (this.user.length === 1) {
|
|
235
|
-
// this.$resetpost('rs/sql/getIotParams', {data: {t_userfiles_id: this.user[0].f_userfiles_id}}, {resolveMsg: null, rejectMsg: null}).then((rat) => {
|
|
236
|
-
// this.row = {}
|
|
237
|
-
// if (rat.data.length > 0) {
|
|
238
|
-
// rat.data.forEach((item) => {
|
|
239
|
-
// console.log('=============>this.paramtype', val)
|
|
240
|
-
// console.log('=============>item', item.f_param_group_name)
|
|
241
|
-
// if (val === item.f_param_group_name) {
|
|
242
|
-
// this.$set('row.' + item.f_param_lname, item.f_param_value)
|
|
243
|
-
// }
|
|
244
|
-
// })
|
|
245
|
-
// // let param = JSON.parse(rat.data[0].f_data)
|
|
246
|
-
// // console.log(param)
|
|
247
|
-
// // this.row= param
|
|
248
|
-
// }
|
|
249
|
-
// })
|
|
250
|
-
// }
|
|
251
246
|
}
|
|
252
247
|
}
|
|
253
248
|
},
|
|
254
249
|
methods: {
|
|
250
|
+
radioBtnToggle (title, value) {
|
|
251
|
+
// 设置表功能开关 -> 启用时操作 -> 设置
|
|
252
|
+
// pzwbit0 -> bzwbit0
|
|
253
|
+
// 设置特殊故障是否关阀 -> 启用时操作 -> 设置
|
|
254
|
+
// pbit0 -> bbit0
|
|
255
|
+
// 当启用 为 ['保持不变']时 设置应为 ['保持不变']
|
|
256
|
+
// 当启用 为 ['启用']时 设置应为 ['启用']
|
|
257
|
+
// 当启用 为 []时 设置应为 ['启用']
|
|
258
|
+
// 获取到设置的title
|
|
259
|
+
// 把第一个p替换成b
|
|
260
|
+
if (!title.startsWith('p')) {
|
|
261
|
+
return
|
|
262
|
+
}
|
|
263
|
+
let _title = title.replace('p', 'b')
|
|
264
|
+
if (value.length === 1) {
|
|
265
|
+
if (value[0] === '保持不变') {
|
|
266
|
+
this.row[_title] = ['保持不变']
|
|
267
|
+
} else {
|
|
268
|
+
this.row[_title] = ['启用']
|
|
269
|
+
}
|
|
270
|
+
} else {
|
|
271
|
+
this.row[_title] = ['启用']
|
|
272
|
+
}
|
|
273
|
+
this.row = Object.assign({}, this.row)
|
|
274
|
+
},
|
|
275
|
+
paramGroupChange (val) {
|
|
276
|
+
const tempArr = ['设置特殊故障是否关阀', '设置表功能开关']
|
|
277
|
+
if (['读取', '设置'].includes(val)) {
|
|
278
|
+
this.paramtypes = this.newmeterinfo
|
|
279
|
+
.filter(item => item.theType === val && !tempArr.includes(item.name))
|
|
280
|
+
.map(item => {
|
|
281
|
+
return {label: item.name, value: item.name}
|
|
282
|
+
})
|
|
283
|
+
.sort((a, b) => a.label.length - b.label.length)
|
|
284
|
+
this.paramtype = undefined
|
|
285
|
+
return
|
|
286
|
+
}
|
|
287
|
+
this.paramtype = val
|
|
288
|
+
},
|
|
255
289
|
close () {
|
|
256
290
|
this.row = {}
|
|
257
291
|
this.$dispatch('close')
|
|
@@ -399,8 +433,8 @@ export default {
|
|
|
399
433
|
this.newmeterinfo = [{}]
|
|
400
434
|
|
|
401
435
|
let res = await this.$resetpost('/webmeter/rs/logic/getParamsByGasBrand', {data: {gasBrandId: val}}, {
|
|
402
|
-
resolveMsg:
|
|
403
|
-
rejectMsg:
|
|
436
|
+
resolveMsg: null,
|
|
437
|
+
rejectMsg: '参数获取失败'
|
|
404
438
|
})
|
|
405
439
|
let allDefaultValue = await this.$resetpost('/rs/sql/getAllDefaultValues', {data: {gasBrandId: val}}, {
|
|
406
440
|
resolveMsg: null,
|
|
@@ -11,6 +11,10 @@ export default {
|
|
|
11
11
|
value: {
|
|
12
12
|
type: Array,
|
|
13
13
|
default: ['保持不变']
|
|
14
|
+
},
|
|
15
|
+
title: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ''
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
20
|
data () {
|
|
@@ -23,10 +27,15 @@ export default {
|
|
|
23
27
|
},
|
|
24
28
|
methods: {
|
|
25
29
|
onChange (e) {
|
|
30
|
+
let _value = []
|
|
26
31
|
this.$emit('input', e)
|
|
32
|
+
// 因为数组元素个数只有1或者0 判断相同的已经存在就是取消操作
|
|
33
|
+
if (!this.value.includes(e)) {
|
|
34
|
+
_value.push(e)
|
|
35
|
+
}
|
|
36
|
+
this.$dispatch('toggle', this.title, _value)
|
|
27
37
|
}
|
|
28
38
|
}
|
|
29
|
-
|
|
30
39
|
}
|
|
31
40
|
</script>
|
|
32
41
|
|