system-phone 3.1.43 → 3.1.44
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/AlreadyService.vue +210 -210
- package/src/components/AttendManage.vue +591 -591
- package/src/components/OnlineManage.vue +278 -278
- package/src/filiale/liaoyuan/LoginApp.vue +734 -734
- package/src/filiale/liaoyuan/SystemSetUp.vue +352 -352
- package/src/filiale/liaoyuan/systemphonegrid.js +7 -7
|
@@ -1,352 +1,352 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="nav-bgcolor">
|
|
3
|
-
<div class="auto">
|
|
4
|
-
<div class="row nav-bgcolor">
|
|
5
|
-
<div class="col-xs-6 manbiankuang" v-for="tab in tabs" @click="gotopage(tab.link,tab.name)">
|
|
6
|
-
<img class="imgs" :src="imgback(tab.name)">
|
|
7
|
-
<p></p>
|
|
8
|
-
<p class="pagesfoot">{{ tab.name }}</p>
|
|
9
|
-
<p></p>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
<modal :show.sync="show" v-ref:modal backdrop="false">
|
|
14
|
-
<header slot="modal-header" class="modal-header text-center">
|
|
15
|
-
<h4 class="modal-title">清除项选择</h4>
|
|
16
|
-
<input type="checkbox" class="" id="f_operator" v-model="all">
|
|
17
|
-
<label for="f_operator" class="font-size">全选</label>
|
|
18
|
-
</header>
|
|
19
|
-
<article slot="modal-body" v-if="show">
|
|
20
|
-
<div class="auto col-sm-11 col-xs-11 col-xs-offset-1 col-md-offset-1" style="margin-top: 10px;">
|
|
21
|
-
<div class="col-sm-4 col-xs-4" v-for="f in fields">
|
|
22
|
-
<input type="checkbox" class="" :id="'export-col-'+$index" v-model="modelval" :value="$key">
|
|
23
|
-
<label :for="'export-col-'+$index" class="font-size">{{ f }}</label>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</article>
|
|
27
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
28
|
-
<center>
|
|
29
|
-
<button v-show="show" type="button" class="btn btn-default" @click='close()'>取消</button>
|
|
30
|
-
<button v-show="show" type="button" class="btn btn-success" @click='clear()'>确定</button>
|
|
31
|
-
</center>
|
|
32
|
-
</footer>
|
|
33
|
-
</modal>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<script>
|
|
38
|
-
import Vue from 'vue'
|
|
39
|
-
|
|
40
|
-
export default {
|
|
41
|
-
title: '系统设置',
|
|
42
|
-
data() {
|
|
43
|
-
return {
|
|
44
|
-
version: '1.0',
|
|
45
|
-
titleName: '系统设置',
|
|
46
|
-
all: false,
|
|
47
|
-
flag: true,
|
|
48
|
-
show: false,
|
|
49
|
-
fields: {},
|
|
50
|
-
dataclear: [],
|
|
51
|
-
tabs: this.getTabs(),
|
|
52
|
-
//tabs:[{name:"清空数据"}],
|
|
53
|
-
modelval: [],
|
|
54
|
-
text: '导航组件this',
|
|
55
|
-
beforeName: '系统设置',
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
ready() {
|
|
59
|
-
this.version = HostApp.getAppVersion().data
|
|
60
|
-
// if(Vue.config.safecheck.clearPhone){
|
|
61
|
-
// let cleartable=Vue.config.safecheck.clearPhone.cleardata
|
|
62
|
-
// for (let i = 0; i < cleartable.length; i++) {
|
|
63
|
-
// this.fields[cleartable[i].module]=cleartable[i].module
|
|
64
|
-
// }
|
|
65
|
-
// }
|
|
66
|
-
},
|
|
67
|
-
methods: {
|
|
68
|
-
versionShow() {
|
|
69
|
-
this.$showMessage('系统版本:' + this.version)
|
|
70
|
-
},
|
|
71
|
-
// clear(){
|
|
72
|
-
// let cleartable=Vue.config.safecheck.clearPhone.cleardata
|
|
73
|
-
// console.log(this.modelval)
|
|
74
|
-
// for (let i = 0; i < cleartable.length; i++) {
|
|
75
|
-
// for (let j = 0; j < this.modelval.length; j++) {
|
|
76
|
-
// if (cleartable[i].module==this.modelval[i]){
|
|
77
|
-
// this.dataclear=Object.assign([],this.dataclear,cleartable[i].tables)
|
|
78
|
-
// }
|
|
79
|
-
// }
|
|
80
|
-
// }
|
|
81
|
-
// console.log(this.dataclear)
|
|
82
|
-
// this.cleandata()
|
|
83
|
-
// },
|
|
84
|
-
close() {
|
|
85
|
-
this.show = false
|
|
86
|
-
this.all = false
|
|
87
|
-
this.flag = true
|
|
88
|
-
this.modelval = []
|
|
89
|
-
},
|
|
90
|
-
sortModelval() {
|
|
91
|
-
let sortModel = []
|
|
92
|
-
Object.keys(this.fields).forEach((key) => {
|
|
93
|
-
if (this.modelval.includes(key)) {
|
|
94
|
-
sortModel.push(key)
|
|
95
|
-
}
|
|
96
|
-
})
|
|
97
|
-
console.log('看看选择的顺序。。。', sortModel)
|
|
98
|
-
console.log('看看选择的顺序。。。', this.modelval)
|
|
99
|
-
if (sortModel.length == this.modelval.length - 1) {
|
|
100
|
-
this.flag = false
|
|
101
|
-
console.log("66666666666666")
|
|
102
|
-
this.all = false
|
|
103
|
-
}
|
|
104
|
-
console.log(Object.keys(this.fields).length)
|
|
105
|
-
if (sortModel.length == Object.keys(this.fields).length) {
|
|
106
|
-
this.all = true
|
|
107
|
-
}
|
|
108
|
-
this.modelval = sortModel
|
|
109
|
-
},
|
|
110
|
-
imgback(val) {
|
|
111
|
-
return require('../../assets/' + val + '.png')
|
|
112
|
-
},
|
|
113
|
-
getTabs() {
|
|
114
|
-
for (let funs in Vue.user.functions) {
|
|
115
|
-
if (Vue.user.functions[funs].link == 'system-setup') {
|
|
116
|
-
return Vue.user.functions[funs].children
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
gotopage(link, name) {
|
|
121
|
-
if (name == '清空数据') {
|
|
122
|
-
this.cleanalldata()
|
|
123
|
-
return
|
|
124
|
-
}
|
|
125
|
-
if (name == '系统版本') {
|
|
126
|
-
this.versionShow()
|
|
127
|
-
return
|
|
128
|
-
}
|
|
129
|
-
// else if (name == '清除数据'){
|
|
130
|
-
// this.openclear()
|
|
131
|
-
// }
|
|
132
|
-
else if (name == '声音开关') {
|
|
133
|
-
this.voiceSwitch()
|
|
134
|
-
} else if (name == '导出数据') {
|
|
135
|
-
this.outdata()
|
|
136
|
-
} else if (name == '退出系统') {
|
|
137
|
-
HostApp.back_home()
|
|
138
|
-
} else if (name == '删除照片') {
|
|
139
|
-
const result = HostApp.deletePic()
|
|
140
|
-
if (result){
|
|
141
|
-
this.$showMessage('删除成功!共删除照片'+result.delete_pic_ok+'张!')
|
|
142
|
-
}
|
|
143
|
-
} else if (name == '返回桌面') {
|
|
144
|
-
HostApp.back_home()
|
|
145
|
-
} else if (name == '退出登录') {
|
|
146
|
-
this.$showMessage('即将返回登陆界面!', ['confirm', 'cancel']).then(async (res) => {
|
|
147
|
-
if (res === 'confirm') {
|
|
148
|
-
try {
|
|
149
|
-
let ip = '';
|
|
150
|
-
const rest = await fetch(`${this.$androidUtil.getProxyUrl()}/rs/systemUrl/getIp`);
|
|
151
|
-
const ipData = await rest.json();
|
|
152
|
-
ip = ipData.ip;
|
|
153
|
-
let data = {
|
|
154
|
-
userid: Vue.user.id,
|
|
155
|
-
username: Vue.user.name,
|
|
156
|
-
usertelephone: Vue.user.f_user_telephone,
|
|
157
|
-
ip: ip?ip:'未知',
|
|
158
|
-
device_type: 'PHONE'
|
|
159
|
-
}
|
|
160
|
-
ress = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/logout`, data, {
|
|
161
|
-
resolveMsg: null,
|
|
162
|
-
rejectMsg: null
|
|
163
|
-
})
|
|
164
|
-
}catch (e) {
|
|
165
|
-
return
|
|
166
|
-
}finally {
|
|
167
|
-
this.$androidUtil.setPreference('f_repairman_id', 'x')
|
|
168
|
-
this.$androidUtil.setPreference('f_repairman_name', 'x')
|
|
169
|
-
this.$androidUtil.setPreference('f_orgid', '')
|
|
170
|
-
this.$androidUtil.setPreference('f_role_name', '')
|
|
171
|
-
this.$dispatch('gologin')
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
})
|
|
175
|
-
} else {
|
|
176
|
-
console.log('进入子组件')
|
|
177
|
-
let safe = true
|
|
178
|
-
if (name == '打卡'){
|
|
179
|
-
safe = false
|
|
180
|
-
}
|
|
181
|
-
var prpdata = {
|
|
182
|
-
_this:this,
|
|
183
|
-
title:name,
|
|
184
|
-
safe
|
|
185
|
-
}
|
|
186
|
-
this.$dispatch('gotoson',prpdata)
|
|
187
|
-
this.$goto(link)
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
cleanalldata() {
|
|
191
|
-
this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
|
|
192
|
-
if (res === 'confirm') {
|
|
193
|
-
let result = this.$androidUtil.bzLogic('clearPhoneData', {flag: 0})
|
|
194
|
-
console.log((result.result))
|
|
195
|
-
if (result.result == '成功') {
|
|
196
|
-
this.$showMessage('清除数据完成!')
|
|
197
|
-
} else {
|
|
198
|
-
this.$showMessage('清除数据失败!')
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
})
|
|
202
|
-
},
|
|
203
|
-
// 清空数据
|
|
204
|
-
cleandata() {
|
|
205
|
-
console.log("88888888888")
|
|
206
|
-
this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
|
|
207
|
-
if (res === 'confirm') {
|
|
208
|
-
let result = this.$androidUtil.bzLogic('clearPhoneDataNew', {tables: this.dataclear})
|
|
209
|
-
console.log((result.result))
|
|
210
|
-
if (result.result == '成功') {
|
|
211
|
-
this.$showMessage('清除数据完成!')
|
|
212
|
-
} else {
|
|
213
|
-
this.$showMessage('清除数据失败!')
|
|
214
|
-
}
|
|
215
|
-
this.close()
|
|
216
|
-
}
|
|
217
|
-
})
|
|
218
|
-
},
|
|
219
|
-
// 导出数据
|
|
220
|
-
openclear() {
|
|
221
|
-
this.show = true
|
|
222
|
-
},
|
|
223
|
-
voiceSwitch() {
|
|
224
|
-
console.log("进入声音开关")
|
|
225
|
-
let voicedata = this.$androidUtil.getPreference('f_voiceSwitch')
|
|
226
|
-
console.log(voicedata)
|
|
227
|
-
let voicechange = '开启'
|
|
228
|
-
if (voicedata == "true") {
|
|
229
|
-
console.log("进入判断")
|
|
230
|
-
voicechange = '关闭'
|
|
231
|
-
}
|
|
232
|
-
this.$showMessage('此操作为' + voicechange + '提示音,请再次确认!', ['confirm', 'cancel']).then((res) => {
|
|
233
|
-
if (res == 'confirm') {
|
|
234
|
-
if (voicechange == '关闭') {
|
|
235
|
-
this.$androidUtil.setPreference('f_voiceSwitch', "false")
|
|
236
|
-
this.$showMessage('提示音关闭成功!')
|
|
237
|
-
} else {
|
|
238
|
-
this.$androidUtil.setPreference('f_voiceSwitch', "true")
|
|
239
|
-
this.$showMessage('提示音开启成功!')
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
})
|
|
243
|
-
},
|
|
244
|
-
outdata() {
|
|
245
|
-
HostApp.backupDatabase()
|
|
246
|
-
this.$showMessage('数据导出成功!')
|
|
247
|
-
},
|
|
248
|
-
//取消自动登录
|
|
249
|
-
cancelAutoLogin() {
|
|
250
|
-
let auto = this.$androidUtil.getPreference('autoLogin')
|
|
251
|
-
if (auto) {
|
|
252
|
-
this.$androidUtil.setPreference('autoLogin', false)
|
|
253
|
-
this.$showMessage('已取消自动登录!')
|
|
254
|
-
} else {
|
|
255
|
-
this.$showMessage('当前已处于非自动登录!')
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
watch: {
|
|
260
|
-
'all'(val) {
|
|
261
|
-
if (val) {
|
|
262
|
-
this.modelval = Object.keys(this.fields)
|
|
263
|
-
} else {
|
|
264
|
-
console.log(this.flag)
|
|
265
|
-
if (this.flag) {
|
|
266
|
-
this.modelval = []
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
this.flag = true
|
|
270
|
-
},
|
|
271
|
-
'modelval.length'() {
|
|
272
|
-
this.sortModelval()
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
</script>
|
|
278
|
-
<style scoped>
|
|
279
|
-
.flex-between {
|
|
280
|
-
display: flex;
|
|
281
|
-
justify-content: space-between;
|
|
282
|
-
align-items: center;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.flex-between span {
|
|
286
|
-
padding-right: 10px;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.flex-full {
|
|
290
|
-
flex: 1;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.name {
|
|
294
|
-
font: 15px PingFang-SC-Medium;
|
|
295
|
-
color: #666666;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.imgs {
|
|
299
|
-
width: 35px;
|
|
300
|
-
margin-top: 15px;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.plan {
|
|
304
|
-
border-bottom: 0.5px solid #EAEAEA;
|
|
305
|
-
border-right: 0.5px solid #EAEAEA;
|
|
306
|
-
height: 120px;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.manbiankuang {
|
|
310
|
-
width: 44%;
|
|
311
|
-
margin-top: 15px;
|
|
312
|
-
margin-left: 4%;
|
|
313
|
-
border: 1px solid #e3e3e3;
|
|
314
|
-
border-radius: 10px 10px 10px 10px;
|
|
315
|
-
text-align: center;
|
|
316
|
-
background-color: #ffffff;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.user {
|
|
320
|
-
border-bottom: 0.5px solid #EAEAEA;
|
|
321
|
-
border-right: 0.5px solid #EAEAEA;
|
|
322
|
-
border-left: 0.5px solid #EAEAEA;
|
|
323
|
-
height: 120px;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.safecheck {
|
|
327
|
-
border-bottom: 0.5px solid #EAEAEA;
|
|
328
|
-
border-left: 0.5px solid #EAEAEA;
|
|
329
|
-
height: 120px;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.appointment {
|
|
333
|
-
border-top: 0.5px solid #EAEAEA;
|
|
334
|
-
border-right: 0.5px solid #EAEAEA;
|
|
335
|
-
height: 120px;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.search {
|
|
339
|
-
border-top: 0.5px solid #EAEAEA;
|
|
340
|
-
border-right: 0.5px solid #EAEAEA;
|
|
341
|
-
border-left: 0.5px solid #EAEAEA;
|
|
342
|
-
height: 120px;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.upload {
|
|
346
|
-
border-top: 0.5px solid #EAEAEA;
|
|
347
|
-
border-left: 0.5px solid #EAEAEA;
|
|
348
|
-
height: 120px;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="nav-bgcolor">
|
|
3
|
+
<div class="auto">
|
|
4
|
+
<div class="row nav-bgcolor">
|
|
5
|
+
<div class="col-xs-6 manbiankuang" v-for="tab in tabs" @click="gotopage(tab.link,tab.name)">
|
|
6
|
+
<img class="imgs" :src="imgback(tab.name)">
|
|
7
|
+
<p></p>
|
|
8
|
+
<p class="pagesfoot">{{ tab.name }}</p>
|
|
9
|
+
<p></p>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<modal :show.sync="show" v-ref:modal backdrop="false">
|
|
14
|
+
<header slot="modal-header" class="modal-header text-center">
|
|
15
|
+
<h4 class="modal-title">清除项选择</h4>
|
|
16
|
+
<input type="checkbox" class="" id="f_operator" v-model="all">
|
|
17
|
+
<label for="f_operator" class="font-size">全选</label>
|
|
18
|
+
</header>
|
|
19
|
+
<article slot="modal-body" v-if="show">
|
|
20
|
+
<div class="auto col-sm-11 col-xs-11 col-xs-offset-1 col-md-offset-1" style="margin-top: 10px;">
|
|
21
|
+
<div class="col-sm-4 col-xs-4" v-for="f in fields">
|
|
22
|
+
<input type="checkbox" class="" :id="'export-col-'+$index" v-model="modelval" :value="$key">
|
|
23
|
+
<label :for="'export-col-'+$index" class="font-size">{{ f }}</label>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</article>
|
|
27
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
28
|
+
<center>
|
|
29
|
+
<button v-show="show" type="button" class="btn btn-default" @click='close()'>取消</button>
|
|
30
|
+
<button v-show="show" type="button" class="btn btn-success" @click='clear()'>确定</button>
|
|
31
|
+
</center>
|
|
32
|
+
</footer>
|
|
33
|
+
</modal>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import Vue from 'vue'
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
title: '系统设置',
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
version: '1.0',
|
|
45
|
+
titleName: '系统设置',
|
|
46
|
+
all: false,
|
|
47
|
+
flag: true,
|
|
48
|
+
show: false,
|
|
49
|
+
fields: {},
|
|
50
|
+
dataclear: [],
|
|
51
|
+
tabs: this.getTabs(),
|
|
52
|
+
//tabs:[{name:"清空数据"}],
|
|
53
|
+
modelval: [],
|
|
54
|
+
text: '导航组件this',
|
|
55
|
+
beforeName: '系统设置',
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
ready() {
|
|
59
|
+
this.version = HostApp.getAppVersion().data
|
|
60
|
+
// if(Vue.config.safecheck.clearPhone){
|
|
61
|
+
// let cleartable=Vue.config.safecheck.clearPhone.cleardata
|
|
62
|
+
// for (let i = 0; i < cleartable.length; i++) {
|
|
63
|
+
// this.fields[cleartable[i].module]=cleartable[i].module
|
|
64
|
+
// }
|
|
65
|
+
// }
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
versionShow() {
|
|
69
|
+
this.$showMessage('系统版本:' + this.version)
|
|
70
|
+
},
|
|
71
|
+
// clear(){
|
|
72
|
+
// let cleartable=Vue.config.safecheck.clearPhone.cleardata
|
|
73
|
+
// console.log(this.modelval)
|
|
74
|
+
// for (let i = 0; i < cleartable.length; i++) {
|
|
75
|
+
// for (let j = 0; j < this.modelval.length; j++) {
|
|
76
|
+
// if (cleartable[i].module==this.modelval[i]){
|
|
77
|
+
// this.dataclear=Object.assign([],this.dataclear,cleartable[i].tables)
|
|
78
|
+
// }
|
|
79
|
+
// }
|
|
80
|
+
// }
|
|
81
|
+
// console.log(this.dataclear)
|
|
82
|
+
// this.cleandata()
|
|
83
|
+
// },
|
|
84
|
+
close() {
|
|
85
|
+
this.show = false
|
|
86
|
+
this.all = false
|
|
87
|
+
this.flag = true
|
|
88
|
+
this.modelval = []
|
|
89
|
+
},
|
|
90
|
+
sortModelval() {
|
|
91
|
+
let sortModel = []
|
|
92
|
+
Object.keys(this.fields).forEach((key) => {
|
|
93
|
+
if (this.modelval.includes(key)) {
|
|
94
|
+
sortModel.push(key)
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
console.log('看看选择的顺序。。。', sortModel)
|
|
98
|
+
console.log('看看选择的顺序。。。', this.modelval)
|
|
99
|
+
if (sortModel.length == this.modelval.length - 1) {
|
|
100
|
+
this.flag = false
|
|
101
|
+
console.log("66666666666666")
|
|
102
|
+
this.all = false
|
|
103
|
+
}
|
|
104
|
+
console.log(Object.keys(this.fields).length)
|
|
105
|
+
if (sortModel.length == Object.keys(this.fields).length) {
|
|
106
|
+
this.all = true
|
|
107
|
+
}
|
|
108
|
+
this.modelval = sortModel
|
|
109
|
+
},
|
|
110
|
+
imgback(val) {
|
|
111
|
+
return require('../../assets/' + val + '.png')
|
|
112
|
+
},
|
|
113
|
+
getTabs() {
|
|
114
|
+
for (let funs in Vue.user.functions) {
|
|
115
|
+
if (Vue.user.functions[funs].link == 'system-setup') {
|
|
116
|
+
return Vue.user.functions[funs].children
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
gotopage(link, name) {
|
|
121
|
+
if (name == '清空数据') {
|
|
122
|
+
this.cleanalldata()
|
|
123
|
+
return
|
|
124
|
+
}
|
|
125
|
+
if (name == '系统版本') {
|
|
126
|
+
this.versionShow()
|
|
127
|
+
return
|
|
128
|
+
}
|
|
129
|
+
// else if (name == '清除数据'){
|
|
130
|
+
// this.openclear()
|
|
131
|
+
// }
|
|
132
|
+
else if (name == '声音开关') {
|
|
133
|
+
this.voiceSwitch()
|
|
134
|
+
} else if (name == '导出数据') {
|
|
135
|
+
this.outdata()
|
|
136
|
+
} else if (name == '退出系统') {
|
|
137
|
+
HostApp.back_home()
|
|
138
|
+
} else if (name == '删除照片') {
|
|
139
|
+
const result = HostApp.deletePic()
|
|
140
|
+
if (result){
|
|
141
|
+
this.$showMessage('删除成功!共删除照片'+result.delete_pic_ok+'张!')
|
|
142
|
+
}
|
|
143
|
+
} else if (name == '返回桌面') {
|
|
144
|
+
HostApp.back_home()
|
|
145
|
+
} else if (name == '退出登录') {
|
|
146
|
+
this.$showMessage('即将返回登陆界面!', ['confirm', 'cancel']).then(async (res) => {
|
|
147
|
+
if (res === 'confirm') {
|
|
148
|
+
try {
|
|
149
|
+
let ip = '';
|
|
150
|
+
const rest = await fetch(`${this.$androidUtil.getProxyUrl()}/rs/systemUrl/getIp`);
|
|
151
|
+
const ipData = await rest.json();
|
|
152
|
+
ip = ipData.ip;
|
|
153
|
+
let data = {
|
|
154
|
+
userid: Vue.user.id,
|
|
155
|
+
username: Vue.user.name,
|
|
156
|
+
usertelephone: Vue.user.f_user_telephone,
|
|
157
|
+
ip: ip?ip:'未知',
|
|
158
|
+
device_type: 'PHONE'
|
|
159
|
+
}
|
|
160
|
+
ress = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/logout`, data, {
|
|
161
|
+
resolveMsg: null,
|
|
162
|
+
rejectMsg: null
|
|
163
|
+
})
|
|
164
|
+
}catch (e) {
|
|
165
|
+
return
|
|
166
|
+
}finally {
|
|
167
|
+
this.$androidUtil.setPreference('f_repairman_id', 'x')
|
|
168
|
+
this.$androidUtil.setPreference('f_repairman_name', 'x')
|
|
169
|
+
this.$androidUtil.setPreference('f_orgid', '')
|
|
170
|
+
this.$androidUtil.setPreference('f_role_name', '')
|
|
171
|
+
this.$dispatch('gologin')
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
})
|
|
175
|
+
} else {
|
|
176
|
+
console.log('进入子组件')
|
|
177
|
+
let safe = true
|
|
178
|
+
if (name == '打卡'){
|
|
179
|
+
safe = false
|
|
180
|
+
}
|
|
181
|
+
var prpdata = {
|
|
182
|
+
_this:this,
|
|
183
|
+
title:name,
|
|
184
|
+
safe
|
|
185
|
+
}
|
|
186
|
+
this.$dispatch('gotoson',prpdata)
|
|
187
|
+
this.$goto(link)
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
cleanalldata() {
|
|
191
|
+
this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
|
|
192
|
+
if (res === 'confirm') {
|
|
193
|
+
let result = this.$androidUtil.bzLogic('clearPhoneData', {flag: 0})
|
|
194
|
+
console.log((result.result))
|
|
195
|
+
if (result.result == '成功') {
|
|
196
|
+
this.$showMessage('清除数据完成!')
|
|
197
|
+
} else {
|
|
198
|
+
this.$showMessage('清除数据失败!')
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
})
|
|
202
|
+
},
|
|
203
|
+
// 清空数据
|
|
204
|
+
cleandata() {
|
|
205
|
+
console.log("88888888888")
|
|
206
|
+
this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
|
|
207
|
+
if (res === 'confirm') {
|
|
208
|
+
let result = this.$androidUtil.bzLogic('clearPhoneDataNew', {tables: this.dataclear})
|
|
209
|
+
console.log((result.result))
|
|
210
|
+
if (result.result == '成功') {
|
|
211
|
+
this.$showMessage('清除数据完成!')
|
|
212
|
+
} else {
|
|
213
|
+
this.$showMessage('清除数据失败!')
|
|
214
|
+
}
|
|
215
|
+
this.close()
|
|
216
|
+
}
|
|
217
|
+
})
|
|
218
|
+
},
|
|
219
|
+
// 导出数据
|
|
220
|
+
openclear() {
|
|
221
|
+
this.show = true
|
|
222
|
+
},
|
|
223
|
+
voiceSwitch() {
|
|
224
|
+
console.log("进入声音开关")
|
|
225
|
+
let voicedata = this.$androidUtil.getPreference('f_voiceSwitch')
|
|
226
|
+
console.log(voicedata)
|
|
227
|
+
let voicechange = '开启'
|
|
228
|
+
if (voicedata == "true") {
|
|
229
|
+
console.log("进入判断")
|
|
230
|
+
voicechange = '关闭'
|
|
231
|
+
}
|
|
232
|
+
this.$showMessage('此操作为' + voicechange + '提示音,请再次确认!', ['confirm', 'cancel']).then((res) => {
|
|
233
|
+
if (res == 'confirm') {
|
|
234
|
+
if (voicechange == '关闭') {
|
|
235
|
+
this.$androidUtil.setPreference('f_voiceSwitch', "false")
|
|
236
|
+
this.$showMessage('提示音关闭成功!')
|
|
237
|
+
} else {
|
|
238
|
+
this.$androidUtil.setPreference('f_voiceSwitch', "true")
|
|
239
|
+
this.$showMessage('提示音开启成功!')
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
},
|
|
244
|
+
outdata() {
|
|
245
|
+
HostApp.backupDatabase()
|
|
246
|
+
this.$showMessage('数据导出成功!')
|
|
247
|
+
},
|
|
248
|
+
//取消自动登录
|
|
249
|
+
cancelAutoLogin() {
|
|
250
|
+
let auto = this.$androidUtil.getPreference('autoLogin')
|
|
251
|
+
if (auto) {
|
|
252
|
+
this.$androidUtil.setPreference('autoLogin', false)
|
|
253
|
+
this.$showMessage('已取消自动登录!')
|
|
254
|
+
} else {
|
|
255
|
+
this.$showMessage('当前已处于非自动登录!')
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
watch: {
|
|
260
|
+
'all'(val) {
|
|
261
|
+
if (val) {
|
|
262
|
+
this.modelval = Object.keys(this.fields)
|
|
263
|
+
} else {
|
|
264
|
+
console.log(this.flag)
|
|
265
|
+
if (this.flag) {
|
|
266
|
+
this.modelval = []
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
this.flag = true
|
|
270
|
+
},
|
|
271
|
+
'modelval.length'() {
|
|
272
|
+
this.sortModelval()
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
</script>
|
|
278
|
+
<style scoped>
|
|
279
|
+
.flex-between {
|
|
280
|
+
display: flex;
|
|
281
|
+
justify-content: space-between;
|
|
282
|
+
align-items: center;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.flex-between span {
|
|
286
|
+
padding-right: 10px;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.flex-full {
|
|
290
|
+
flex: 1;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.name {
|
|
294
|
+
font: 15px PingFang-SC-Medium;
|
|
295
|
+
color: #666666;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.imgs {
|
|
299
|
+
width: 35px;
|
|
300
|
+
margin-top: 15px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.plan {
|
|
304
|
+
border-bottom: 0.5px solid #EAEAEA;
|
|
305
|
+
border-right: 0.5px solid #EAEAEA;
|
|
306
|
+
height: 120px;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.manbiankuang {
|
|
310
|
+
width: 44%;
|
|
311
|
+
margin-top: 15px;
|
|
312
|
+
margin-left: 4%;
|
|
313
|
+
border: 1px solid #e3e3e3;
|
|
314
|
+
border-radius: 10px 10px 10px 10px;
|
|
315
|
+
text-align: center;
|
|
316
|
+
background-color: #ffffff;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.user {
|
|
320
|
+
border-bottom: 0.5px solid #EAEAEA;
|
|
321
|
+
border-right: 0.5px solid #EAEAEA;
|
|
322
|
+
border-left: 0.5px solid #EAEAEA;
|
|
323
|
+
height: 120px;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.safecheck {
|
|
327
|
+
border-bottom: 0.5px solid #EAEAEA;
|
|
328
|
+
border-left: 0.5px solid #EAEAEA;
|
|
329
|
+
height: 120px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.appointment {
|
|
333
|
+
border-top: 0.5px solid #EAEAEA;
|
|
334
|
+
border-right: 0.5px solid #EAEAEA;
|
|
335
|
+
height: 120px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.search {
|
|
339
|
+
border-top: 0.5px solid #EAEAEA;
|
|
340
|
+
border-right: 0.5px solid #EAEAEA;
|
|
341
|
+
border-left: 0.5px solid #EAEAEA;
|
|
342
|
+
height: 120px;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.upload {
|
|
346
|
+
border-top: 0.5px solid #EAEAEA;
|
|
347
|
+
border-left: 0.5px solid #EAEAEA;
|
|
348
|
+
height: 120px;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
</style>
|