safecheck-client 3.0.30-62-t6 → 3.0.30-62-t8
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 +1 -1
- package/src/components/DefectDealMain/DefectListNew.vue +597 -597
- package/src/components/NewDefectList/DefectListNew.vue +52 -12
- package/src/components/Util/SafecheckUpload.vue +276 -265
- package/src/components/android/CurrentCreate.vue +2 -2
- package/src/components/android/PhoneUpDetail.vue +1040 -1040
- package/src/components/android/PhoneUpUserinfo.vue +1230 -1230
- package/src/components/pc/NewCheckpaperTemp.vue +1295 -1295
- package/src/components/rongcheng/DefectList.vue +560 -560
- package/src/components/rongcheng/PhoneDevicesInfo.vue +248 -248
- package/src/components/rongcheng/PhoneUpUserinfo.vue +1236 -1236
- package/src/components/userfile/SecurityAudit.vue +243 -243
- package/src/components/userfile/UserInfoAudit.vue +316 -316
- package/src/components/userfileNew/UserInfoAuditNew.vue +274 -274
- package/src/filiale/baiyin/pc/DefectListNew.vue +597 -597
- package/src/filiale/bayan/android/PhoneUpUserinfo.vue +1377 -1377
- package/src/filiale/bayan/pc/DefectListNew.vue +597 -597
- package/src/filiale/ganquan/android/PhoneUpUserinfo.vue +986 -986
- package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1229 -1229
- package/src/filiale/jinbin/android/PhoneUpUserinfo.vue +878 -878
- package/src/filiale/jingyang/android/PhoneUpUserinfo.vue +1234 -1234
- package/src/filiale/jingyang/pc/UserInfoAuditNew.vue +272 -272
- package/src/filiale/kelai/android/PhoneUpUserinfo.vue +1053 -1053
- package/src/filiale/kelai/pc/UserInfoAudit.vue +254 -254
- package/src/filiale/minsheng/android/PhoneUpUserinfo.vue +1269 -1269
- package/src/filiale/qianneng/android/PhoneUpUserinfo.vue +1127 -1127
- package/src/filiale/qianneng/pc/UserInfoAudit.vue +286 -286
- package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1270
- package/src/filiale/qingtongxia/android/PhoneUpUserinfo.vue +1230 -1230
- package/src/filiale/shanxian/android/PhoneUpUserinfo.vue +939 -939
- package/src/filiale/shexian/android/PhoneUpUserinfo.vue +1153 -1153
- package/src/filiale/tongchuan/android/PhoneUpDetail.vue +707 -707
- package/src/filiale/tongchuan/android/PhoneUpUserinfo.vue +1323 -1323
- package/src/filiale/weinan/android/PhoneUpDetail.vue +968 -968
- package/src/filiale/weinan/android/PhoneUpUserinfo.vue +1038 -1038
- package/src/filiale/wenxi/android/PhoneUpUserinfo.vue +1076 -1076
- package/src/filiale/wuhai/android/PhoneUpUserinfo.vue +926 -926
- package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -1235
- package/src/filiale/yongzhou/android/PhoneUpUserinfo.vue +1257 -1257
- package/src/filiale/yuansheng/android/PhoneUpUserinfo.vue +942 -942
- package/src/filiale/yunchengminsheng/android/PhoneUpUserinfo.vue +1198 -1198
- package/src/filiale/zhongsheng/android/PhoneUpUserinfo.vue +926 -926
- package/src/filiale/zhongsheng/pc/UserInfoAudit.vue +252 -252
- package/src/filiale/zhongyi/pc/DefectListNew.vue +514 -514
- package/src/filiale/zhoukou/android/PhoneUpUserinfo.vue +957 -957
- package/src/main.js +33 -33
@@ -1,248 +1,248 @@
|
|
1
|
-
<template >
|
2
|
-
<div style="height: 100%;overflow-y: scroll">
|
3
|
-
<div class="panel panel-default auto repair-info-content">
|
4
|
-
<div class="panel-body" >
|
5
|
-
<div class="panel panel-default well" v-for="row in model">
|
6
|
-
<div class="bg-info">
|
7
|
-
<div class="row form-group">
|
8
|
-
<div class="col-xs-12 col-sm-12 col-md-12">
|
9
|
-
<div class="row">
|
10
|
-
<div class="row auto" style="margin: 5px 0">
|
11
|
-
<labe style="line-height: 35px;">设备类型:</labe>
|
12
|
-
<!--<input type="text" style="width: 75%;float:right" class="form-control" v-model="row.f_devices_type" />-->
|
13
|
-
<v-select style="float: right;width: 60%;" :value.sync="row.f_devices_type"
|
14
|
-
v-model="row.f_devices_type"
|
15
|
-
placeholder='请选择'
|
16
|
-
:width='wid'
|
17
|
-
:options="devices_types"
|
18
|
-
close-on-select value-single></v-select>
|
19
|
-
</div>
|
20
|
-
<div class="row auto" style="margin: 5px 0">
|
21
|
-
<labe style="line-height: 35px;">设备编号:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_devices_no" />
|
22
|
-
</div>
|
23
|
-
<div class="row auto" style="margin: 5px 0">
|
24
|
-
<labe style="line-height: 35px;">设备品牌:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_brand" />
|
25
|
-
</div>
|
26
|
-
<div class="row auto" style="margin: 5px 0">
|
27
|
-
<labe style="line-height: 35px;">设备型号:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_devices_model" />
|
28
|
-
</div>
|
29
|
-
<div class="row auto" style="margin: 5px 0">
|
30
|
-
<labe style="line-height: 35px;">安装日期:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_input_date" />
|
31
|
-
</div>
|
32
|
-
<div class="row auto" style="margin: 5px 0">
|
33
|
-
<labe style="line-height: 35px;">设备数量:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_devices_num" />
|
34
|
-
</div>
|
35
|
-
<div class="row auto" style="margin: 5px 0">
|
36
|
-
<labe style="line-height: 35px;">管道类型:</labe>
|
37
|
-
<!--<input type="text" style="width: 75%;float:right" class="form-control" v-model="row.f_pipe_type" />-->
|
38
|
-
<v-select style="width: 60%;float: right" :value.sync="row.f_pipe_type"
|
39
|
-
v-model="row.f_pipe_type"
|
40
|
-
placeholder='请选择'
|
41
|
-
:width="wid"
|
42
|
-
:options="pipe_types"
|
43
|
-
close-on-select value-single></v-select>
|
44
|
-
</div>
|
45
|
-
<div class="row auto" style="margin: 5px 0">
|
46
|
-
<labe style="line-height: 35px;">备 注:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_comments" />
|
47
|
-
</div>
|
48
|
-
<div>
|
49
|
-
<button class="button_search button_spacing" style="margin-left: 40%;margin-top: 10px;" @click="delDevices($index)">删除该设备</button>
|
50
|
-
</div>
|
51
|
-
</div>
|
52
|
-
</div>
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
</div>
|
56
|
-
<p v-show="model.length == 0 ">此用户暂无设备</p>
|
57
|
-
<div style="margin: 0 auto">
|
58
|
-
<button class="button_search button_spacing" @click="addDevices" style="margin-left: 15%;margin-right: 15px;">新增设备</button>
|
59
|
-
<button class="button_search button_spacing" @click="save">保存设备信息</button>
|
60
|
-
</div>
|
61
|
-
</div>
|
62
|
-
</div>
|
63
|
-
</div>
|
64
|
-
</template>
|
65
|
-
|
66
|
-
<script>
|
67
|
-
import { PagedList,HttpResetClass } from 'vue-client'
|
68
|
-
import * as Util from "../Util";
|
69
|
-
import Vue from 'vue'
|
70
|
-
import co from 'co'
|
71
|
-
export default {
|
72
|
-
title: '设备查看',
|
73
|
-
data () {
|
74
|
-
return {
|
75
|
-
model: [],
|
76
|
-
show: false,
|
77
|
-
row: Object,
|
78
|
-
userinfo:Object,
|
79
|
-
wid:"60%",
|
80
|
-
devices_types:Vue.$appdata.getParam('设备类型')?Vue.$appdata.getParam('设备类型'):[{label:'热水器',value:'热水器'},{label:'壁挂炉',value:'壁挂炉'},{label:'灶具',value:'灶具'}],
|
81
|
-
// devices_types:[{label:'热水器',value:'热水器'},{label:'壁挂炉',value:'壁挂炉'},{label:'灶具',value:'灶具'}],
|
82
|
-
pipe_types:[{label:'橡胶管',value:'橡胶管'},{label:'波纹管',value:'波纹管'},{label:'钢管',value:'钢管'}],
|
83
|
-
update:false
|
84
|
-
}
|
85
|
-
},
|
86
|
-
props: {
|
87
|
-
user: {
|
88
|
-
type: Object
|
89
|
-
},
|
90
|
-
f_user_type:'',
|
91
|
-
f_userinfo_id:''
|
92
|
-
},
|
93
|
-
methods: {
|
94
|
-
addDevices(){
|
95
|
-
//Vue.user.name
|
96
|
-
let obj={
|
97
|
-
"f_input_person":'hwq',
|
98
|
-
"f_picture":null,
|
99
|
-
"f_pipe_type":null,
|
100
|
-
"f_pipeinstall_date":null,
|
101
|
-
"f_pipe_connection":null,
|
102
|
-
"f_expire_date":null,
|
103
|
-
"f_pipeexpire_date":null,
|
104
|
-
"f_comments":null,
|
105
|
-
"f_operate_date":Util.toStandardTimeString(),
|
106
|
-
"f_devices_num":null,
|
107
|
-
"f_userfiles_id":this.userinfo.baseinfo.base.f_userfiles_id,
|
108
|
-
"f_process_id":null,
|
109
|
-
"f_devices_type":null,
|
110
|
-
"f_make_date":null,
|
111
|
-
"f_userinfo_id":null,
|
112
|
-
"f_input_date":Util.toStandardTimeString(),
|
113
|
-
"f_state":"有效",
|
114
|
-
"id":null,
|
115
|
-
"f_brand":null,
|
116
|
-
"f_devices_model":null,
|
117
|
-
"f_devices_no":null
|
118
|
-
}
|
119
|
-
this.model.push(obj)
|
120
|
-
},
|
121
|
-
delDevices(idx){
|
122
|
-
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
123
|
-
if (res === 'confirm') {
|
124
|
-
this.model.splice(idx,1)
|
125
|
-
}
|
126
|
-
})
|
127
|
-
},
|
128
|
-
getmodel () {
|
129
|
-
let userinfoid
|
130
|
-
if(this.f_userinfo_id){
|
131
|
-
userinfoid = this.f_userinfo_id
|
132
|
-
}else{
|
133
|
-
userinfoid = this.user.f_userinfo_id
|
134
|
-
//tag
|
135
|
-
}
|
136
|
-
//tag
|
137
|
-
/*new HttpResetClass().load('post',`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/commonSearchByUser`, {data: {items: '*', tablename: 't_devices', orderitem: 'f_input_date desc', condition:`f_userinfo_id = '${userinfoid}'`}}, {resolveMsg: null, rejectMsg: null}).then((row) => {
|
138
|
-
this.model = row.data
|
139
|
-
})*/
|
140
|
-
new HttpResetClass().load('post',`${this.$androidUtil.getProxyUrl()}/api/af-
|
141
|
-
//f_userinfo_code:'12381344',
|
142
|
-
f_userinfo_id:userinfoid
|
143
|
-
}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
144
|
-
//tag
|
145
|
-
this.userinfo = res.data
|
146
|
-
this.model = this.userinfo.meterinfo[0].devicesinfo
|
147
|
-
})
|
148
|
-
},
|
149
|
-
back(){
|
150
|
-
|
151
|
-
},
|
152
|
-
save(){
|
153
|
-
if (this.f_user_type == "非民用") {
|
154
|
-
let hasAlarmOrValve = false;
|
155
|
-
for (let i = 0; i < this.model.length; i++) {
|
156
|
-
if (this.model[i].f_devices_type === '报警器' || this.model[i].f_devices_type === '切断阀') {
|
157
|
-
hasAlarmOrValve = true;
|
158
|
-
break;
|
159
|
-
}
|
160
|
-
}
|
161
|
-
if (!hasAlarmOrValve) {
|
162
|
-
this.$showMessage("请添加报警器或切断阀! ")
|
163
|
-
return;
|
164
|
-
}
|
165
|
-
}
|
166
|
-
if(this.model.length==0){
|
167
|
-
this.$showMessage("请添加设备信息后再点击保存!")
|
168
|
-
return
|
169
|
-
}
|
170
|
-
if(this.update){
|
171
|
-
this.$showMessage("正在保存设备中请稍等...")
|
172
|
-
return
|
173
|
-
}
|
174
|
-
this.update=true
|
175
|
-
let userinfo={}
|
176
|
-
userinfo=this.userinfo.baseinfo.base
|
177
|
-
userinfo=Object.assign(userinfo,{f_operator_record:Vue.user.name,userfiles:this.userinfo.meterinfo})
|
178
|
-
userinfo.userfiles[0].devicesinfo.forEach((r)=>{
|
179
|
-
r.img={content: null, filename: null}
|
180
|
-
})
|
181
|
-
let response=new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/filemanage_fileSave`, {
|
182
|
-
data:{
|
183
|
-
userinfo:userinfo,
|
184
|
-
address:{id:this.userinfo.addressinfo.id,oldid:this.userinfo.addressinfo.id}
|
185
|
-
}
|
186
|
-
}, {resolveMsg: "修改成功!", rejectMsg: "失败,请联系管理员"}).then((res)=>{
|
187
|
-
//tag)
|
188
|
-
this.update=false
|
189
|
-
if(res.data.status==200){
|
190
|
-
//tag
|
191
|
-
//tag
|
192
|
-
this.userinfo.baseinfo.base.version=res.data.result[0].version
|
193
|
-
this.$showMessage("修改设备信息成功!")
|
194
|
-
}else if(res.data.status==505){
|
195
|
-
this.$showMessage("修改设备信息失败!请重新加载数据")
|
196
|
-
}else{
|
197
|
-
this.$showMessage("修改设备信息失败!")
|
198
|
-
}
|
199
|
-
}).catch((mes)=>{
|
200
|
-
this.update=true
|
201
|
-
if(mes.status==505){
|
202
|
-
this.$showMessage(mes.data+'请重新进入当前页面进行操作!')
|
203
|
-
}else{
|
204
|
-
this.$showMessage('网络异常,请重新进入当前页面进行操作!')
|
205
|
-
}
|
206
|
-
})
|
207
|
-
}
|
208
|
-
},
|
209
|
-
/*watch: {
|
210
|
-
'user' (val) {
|
211
|
-
// this.model.search(`card_id = ${this.user.card_id}`)
|
212
|
-
if(this.user){
|
213
|
-
if (!(this.user.isNuN)) {
|
214
|
-
this.model= []
|
215
|
-
this.getmodel()
|
216
|
-
}
|
217
|
-
}
|
218
|
-
},
|
219
|
-
'f_userinfo_id'(){
|
220
|
-
if(this.f_userinfo_id){
|
221
|
-
this.model= []
|
222
|
-
this.getmodel()
|
223
|
-
}
|
224
|
-
}
|
225
|
-
},*/
|
226
|
-
ready () {
|
227
|
-
this.getmodel()
|
228
|
-
/*let response=new HttpResetClass().load("POST", "/api/af-safecheck/logic/getSaleInitData", {
|
229
|
-
f_orgid: '305'
|
230
|
-
}, {resolveMsg: null, rejectMsg: null})*/
|
231
|
-
}
|
232
|
-
}
|
233
|
-
</script>
|
234
|
-
<style>
|
235
|
-
.app-botton {
|
236
|
-
position:fixed;
|
237
|
-
background: #87b2dd;
|
238
|
-
color: #FFF;
|
239
|
-
padding: 8px;
|
240
|
-
text-align: center;
|
241
|
-
font-size: 1.2em;
|
242
|
-
z-index: 10;
|
243
|
-
opacity:0.5;
|
244
|
-
bottom: 50px;
|
245
|
-
margin-top: -10px;
|
246
|
-
height: 40px;
|
247
|
-
}
|
248
|
-
</style>
|
1
|
+
<template >
|
2
|
+
<div style="height: 100%;overflow-y: scroll">
|
3
|
+
<div class="panel panel-default auto repair-info-content">
|
4
|
+
<div class="panel-body" >
|
5
|
+
<div class="panel panel-default well" v-for="row in model">
|
6
|
+
<div class="bg-info">
|
7
|
+
<div class="row form-group">
|
8
|
+
<div class="col-xs-12 col-sm-12 col-md-12">
|
9
|
+
<div class="row">
|
10
|
+
<div class="row auto" style="margin: 5px 0">
|
11
|
+
<labe style="line-height: 35px;">设备类型:</labe>
|
12
|
+
<!--<input type="text" style="width: 75%;float:right" class="form-control" v-model="row.f_devices_type" />-->
|
13
|
+
<v-select style="float: right;width: 60%;" :value.sync="row.f_devices_type"
|
14
|
+
v-model="row.f_devices_type"
|
15
|
+
placeholder='请选择'
|
16
|
+
:width='wid'
|
17
|
+
:options="devices_types"
|
18
|
+
close-on-select value-single></v-select>
|
19
|
+
</div>
|
20
|
+
<div class="row auto" style="margin: 5px 0">
|
21
|
+
<labe style="line-height: 35px;">设备编号:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_devices_no" />
|
22
|
+
</div>
|
23
|
+
<div class="row auto" style="margin: 5px 0">
|
24
|
+
<labe style="line-height: 35px;">设备品牌:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_brand" />
|
25
|
+
</div>
|
26
|
+
<div class="row auto" style="margin: 5px 0">
|
27
|
+
<labe style="line-height: 35px;">设备型号:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_devices_model" />
|
28
|
+
</div>
|
29
|
+
<div class="row auto" style="margin: 5px 0">
|
30
|
+
<labe style="line-height: 35px;">安装日期:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_input_date" />
|
31
|
+
</div>
|
32
|
+
<div class="row auto" style="margin: 5px 0">
|
33
|
+
<labe style="line-height: 35px;">设备数量:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_devices_num" />
|
34
|
+
</div>
|
35
|
+
<div class="row auto" style="margin: 5px 0">
|
36
|
+
<labe style="line-height: 35px;">管道类型:</labe>
|
37
|
+
<!--<input type="text" style="width: 75%;float:right" class="form-control" v-model="row.f_pipe_type" />-->
|
38
|
+
<v-select style="width: 60%;float: right" :value.sync="row.f_pipe_type"
|
39
|
+
v-model="row.f_pipe_type"
|
40
|
+
placeholder='请选择'
|
41
|
+
:width="wid"
|
42
|
+
:options="pipe_types"
|
43
|
+
close-on-select value-single></v-select>
|
44
|
+
</div>
|
45
|
+
<div class="row auto" style="margin: 5px 0">
|
46
|
+
<labe style="line-height: 35px;">备 注:</labe><input type="text" style="width: 60%;float:right" class="form-control" v-model="row.f_comments" />
|
47
|
+
</div>
|
48
|
+
<div>
|
49
|
+
<button class="button_search button_spacing" style="margin-left: 40%;margin-top: 10px;" @click="delDevices($index)">删除该设备</button>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
<p v-show="model.length == 0 ">此用户暂无设备</p>
|
57
|
+
<div style="margin: 0 auto">
|
58
|
+
<button class="button_search button_spacing" @click="addDevices" style="margin-left: 15%;margin-right: 15px;">新增设备</button>
|
59
|
+
<button class="button_search button_spacing" @click="save">保存设备信息</button>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
</template>
|
65
|
+
|
66
|
+
<script>
|
67
|
+
import { PagedList,HttpResetClass } from 'vue-client'
|
68
|
+
import * as Util from "../Util";
|
69
|
+
import Vue from 'vue'
|
70
|
+
import co from 'co'
|
71
|
+
export default {
|
72
|
+
title: '设备查看',
|
73
|
+
data () {
|
74
|
+
return {
|
75
|
+
model: [],
|
76
|
+
show: false,
|
77
|
+
row: Object,
|
78
|
+
userinfo:Object,
|
79
|
+
wid:"60%",
|
80
|
+
devices_types:Vue.$appdata.getParam('设备类型')?Vue.$appdata.getParam('设备类型'):[{label:'热水器',value:'热水器'},{label:'壁挂炉',value:'壁挂炉'},{label:'灶具',value:'灶具'}],
|
81
|
+
// devices_types:[{label:'热水器',value:'热水器'},{label:'壁挂炉',value:'壁挂炉'},{label:'灶具',value:'灶具'}],
|
82
|
+
pipe_types:[{label:'橡胶管',value:'橡胶管'},{label:'波纹管',value:'波纹管'},{label:'钢管',value:'钢管'}],
|
83
|
+
update:false
|
84
|
+
}
|
85
|
+
},
|
86
|
+
props: {
|
87
|
+
user: {
|
88
|
+
type: Object
|
89
|
+
},
|
90
|
+
f_user_type:'',
|
91
|
+
f_userinfo_id:''
|
92
|
+
},
|
93
|
+
methods: {
|
94
|
+
addDevices(){
|
95
|
+
//Vue.user.name
|
96
|
+
let obj={
|
97
|
+
"f_input_person":'hwq',
|
98
|
+
"f_picture":null,
|
99
|
+
"f_pipe_type":null,
|
100
|
+
"f_pipeinstall_date":null,
|
101
|
+
"f_pipe_connection":null,
|
102
|
+
"f_expire_date":null,
|
103
|
+
"f_pipeexpire_date":null,
|
104
|
+
"f_comments":null,
|
105
|
+
"f_operate_date":Util.toStandardTimeString(),
|
106
|
+
"f_devices_num":null,
|
107
|
+
"f_userfiles_id":this.userinfo.baseinfo.base.f_userfiles_id,
|
108
|
+
"f_process_id":null,
|
109
|
+
"f_devices_type":null,
|
110
|
+
"f_make_date":null,
|
111
|
+
"f_userinfo_id":null,
|
112
|
+
"f_input_date":Util.toStandardTimeString(),
|
113
|
+
"f_state":"有效",
|
114
|
+
"id":null,
|
115
|
+
"f_brand":null,
|
116
|
+
"f_devices_model":null,
|
117
|
+
"f_devices_no":null
|
118
|
+
}
|
119
|
+
this.model.push(obj)
|
120
|
+
},
|
121
|
+
delDevices(idx){
|
122
|
+
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
123
|
+
if (res === 'confirm') {
|
124
|
+
this.model.splice(idx,1)
|
125
|
+
}
|
126
|
+
})
|
127
|
+
},
|
128
|
+
getmodel () {
|
129
|
+
let userinfoid
|
130
|
+
if(this.f_userinfo_id){
|
131
|
+
userinfoid = this.f_userinfo_id
|
132
|
+
}else{
|
133
|
+
userinfoid = this.user.f_userinfo_id
|
134
|
+
//tag
|
135
|
+
}
|
136
|
+
//tag
|
137
|
+
/*new HttpResetClass().load('post',`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/commonSearchByUser`, {data: {items: '*', tablename: 't_devices', orderitem: 'f_input_date desc', condition:`f_userinfo_id = '${userinfoid}'`}}, {resolveMsg: null, rejectMsg: null}).then((row) => {
|
138
|
+
this.model = row.data
|
139
|
+
})*/
|
140
|
+
new HttpResetClass().load('post',`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/filemanage_getFilesDetail`, {
|
141
|
+
//f_userinfo_code:'12381344',
|
142
|
+
f_userinfo_id:userinfoid
|
143
|
+
}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
144
|
+
//tag
|
145
|
+
this.userinfo = res.data
|
146
|
+
this.model = this.userinfo.meterinfo[0].devicesinfo
|
147
|
+
})
|
148
|
+
},
|
149
|
+
back(){
|
150
|
+
|
151
|
+
},
|
152
|
+
save(){
|
153
|
+
if (this.f_user_type == "非民用") {
|
154
|
+
let hasAlarmOrValve = false;
|
155
|
+
for (let i = 0; i < this.model.length; i++) {
|
156
|
+
if (this.model[i].f_devices_type === '报警器' || this.model[i].f_devices_type === '切断阀') {
|
157
|
+
hasAlarmOrValve = true;
|
158
|
+
break;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
if (!hasAlarmOrValve) {
|
162
|
+
this.$showMessage("请添加报警器或切断阀! ")
|
163
|
+
return;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
if(this.model.length==0){
|
167
|
+
this.$showMessage("请添加设备信息后再点击保存!")
|
168
|
+
return
|
169
|
+
}
|
170
|
+
if(this.update){
|
171
|
+
this.$showMessage("正在保存设备中请稍等...")
|
172
|
+
return
|
173
|
+
}
|
174
|
+
this.update=true
|
175
|
+
let userinfo={}
|
176
|
+
userinfo=this.userinfo.baseinfo.base
|
177
|
+
userinfo=Object.assign(userinfo,{f_operator_record:Vue.user.name,userfiles:this.userinfo.meterinfo})
|
178
|
+
userinfo.userfiles[0].devicesinfo.forEach((r)=>{
|
179
|
+
r.img={content: null, filename: null}
|
180
|
+
})
|
181
|
+
let response=new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/filemanage_fileSave`, {
|
182
|
+
data:{
|
183
|
+
userinfo:userinfo,
|
184
|
+
address:{id:this.userinfo.addressinfo.id,oldid:this.userinfo.addressinfo.id}
|
185
|
+
}
|
186
|
+
}, {resolveMsg: "修改成功!", rejectMsg: "失败,请联系管理员"}).then((res)=>{
|
187
|
+
//tag)
|
188
|
+
this.update=false
|
189
|
+
if(res.data.status==200){
|
190
|
+
//tag
|
191
|
+
//tag
|
192
|
+
this.userinfo.baseinfo.base.version=res.data.result[0].version
|
193
|
+
this.$showMessage("修改设备信息成功!")
|
194
|
+
}else if(res.data.status==505){
|
195
|
+
this.$showMessage("修改设备信息失败!请重新加载数据")
|
196
|
+
}else{
|
197
|
+
this.$showMessage("修改设备信息失败!")
|
198
|
+
}
|
199
|
+
}).catch((mes)=>{
|
200
|
+
this.update=true
|
201
|
+
if(mes.status==505){
|
202
|
+
this.$showMessage(mes.data+'请重新进入当前页面进行操作!')
|
203
|
+
}else{
|
204
|
+
this.$showMessage('网络异常,请重新进入当前页面进行操作!')
|
205
|
+
}
|
206
|
+
})
|
207
|
+
}
|
208
|
+
},
|
209
|
+
/*watch: {
|
210
|
+
'user' (val) {
|
211
|
+
// this.model.search(`card_id = ${this.user.card_id}`)
|
212
|
+
if(this.user){
|
213
|
+
if (!(this.user.isNuN)) {
|
214
|
+
this.model= []
|
215
|
+
this.getmodel()
|
216
|
+
}
|
217
|
+
}
|
218
|
+
},
|
219
|
+
'f_userinfo_id'(){
|
220
|
+
if(this.f_userinfo_id){
|
221
|
+
this.model= []
|
222
|
+
this.getmodel()
|
223
|
+
}
|
224
|
+
}
|
225
|
+
},*/
|
226
|
+
ready () {
|
227
|
+
this.getmodel()
|
228
|
+
/*let response=new HttpResetClass().load("POST", "/api/af-safecheck/logic/getSaleInitData", {
|
229
|
+
f_orgid: '305'
|
230
|
+
}, {resolveMsg: null, rejectMsg: null})*/
|
231
|
+
}
|
232
|
+
}
|
233
|
+
</script>
|
234
|
+
<style>
|
235
|
+
.app-botton {
|
236
|
+
position:fixed;
|
237
|
+
background: #87b2dd;
|
238
|
+
color: #FFF;
|
239
|
+
padding: 8px;
|
240
|
+
text-align: center;
|
241
|
+
font-size: 1.2em;
|
242
|
+
z-index: 10;
|
243
|
+
opacity:0.5;
|
244
|
+
bottom: 50px;
|
245
|
+
margin-top: -10px;
|
246
|
+
height: 40px;
|
247
|
+
}
|
248
|
+
</style>
|