system-phone 3.0.49-2 → 3.0.49-21

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.
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <div class="nav-bgcolor">
3
3
  <div class="auto">
4
- <div class="row nav-bgcolor" >
4
+ <div class="row nav-bgcolor">
5
5
  <div class="col-xs-6 manbiankuang" v-for="tab in tabs" @click="gotopage(tab.link,tab.name)">
6
6
  <img class="imgs" :src="imgback(tab.name)">
7
7
  <p></p>
8
- <p class="pagesfoot">{{tab.name}}</p>
8
+ <p class="pagesfoot">{{ tab.name }}</p>
9
9
  <p></p>
10
10
  </div>
11
11
  </div>
@@ -17,10 +17,10 @@
17
17
  <label for="f_operator" class="font-size">全选</label>
18
18
  </header>
19
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;">
20
+ <div class="auto col-sm-11 col-xs-11 col-xs-offset-1 col-md-offset-1" style="margin-top: 10px;">
21
21
  <div class="col-sm-4 col-xs-4" v-for="f in fields">
22
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>
23
+ <label :for="'export-col-'+$index" class="font-size">{{ f }}</label>
24
24
  </div>
25
25
  </div>
26
26
  </article>
@@ -35,274 +35,296 @@
35
35
  </template>
36
36
 
37
37
  <script>
38
- import Vue from 'vue'
38
+ import Vue from 'vue'
39
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
- }
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: '系统设置',
118
56
  }
119
57
  },
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()
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
+ // }
131
65
  // }
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
- this.$showMessage('即将返回登陆界面!', ['confirm', 'cancel']).then((res) => {
140
- if (res === 'confirm') {
141
- this.$androidUtil.setPreference('f_repairman_id', 'x')
142
- this.$androidUtil.setPreference('f_repairman_name', 'x')
143
- this.$dispatch('gologin')
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)
144
95
  }
145
96
  })
146
- }else{
147
- console.log('进入子组件')
148
- var prpdata = {
149
- _this:this,
150
- title:name,
151
- safe:true
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
152
103
  }
153
- this.$dispatch('gotoson',prpdata)
154
- this.$goto(link)
155
- }
156
- },
157
- cleanalldata(){
158
- this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
159
- if (res === 'confirm') {
160
- let result = this.$androidUtil.bzLogic('clearPhoneData', {flag: 0})
161
- console.log((result.result))
162
- if(result.result == '成功'){
163
- this.$showMessage('清除数据完成!')
164
- }else{
165
- this.$showMessage('清除数据失败!')
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
166
117
  }
167
118
  }
168
- })
169
- },
170
- // 清空数据
171
- cleandata(){
172
- console.log("88888888888")
173
- this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
174
- if (res === 'confirm') {
175
- let result = this.$androidUtil.bzLogic('clearPhoneDataNew', {tables: this.dataclear})
176
- console.log((result.result))
177
- if(result.result == '成功'){
178
- this.$showMessage('清除数据完成!')
179
- }else{
180
- this.$showMessage('清除数据失败!')
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((res) => {
147
+ if (res === 'confirm') {
148
+ this.$androidUtil.setPreference('f_repairman_id', 'x')
149
+ this.$androidUtil.setPreference('f_repairman_name', 'x')
150
+ this.$dispatch('gologin')
151
+ }
152
+ })
153
+ } else {
154
+ console.log('进入子组件')
155
+ let safe = true
156
+ if (name == '打卡'){
157
+ safe = false
181
158
  }
182
- this.close()
159
+ var prpdata = {
160
+ _this:this,
161
+ title:name,
162
+ safe
163
+ }
164
+ this.$dispatch('gotoson',prpdata)
165
+ this.$goto(link)
183
166
  }
184
- })
185
- },
186
- // 导出数据
187
- openclear(){
188
- this.show=true
189
- },
190
- voiceSwitch(){
191
- console.log("进入声音开关")
192
- let voicedata=this.$androidUtil.getPreference('f_voiceSwitch')
193
- console.log(voicedata)
194
- let voicechange ='开启'
195
- if (voicedata=="true"){
196
- console.log("进入判断")
197
- voicechange = '关闭'
198
- }
199
- this.$showMessage('此操作为'+voicechange+'提示音,请再次确认!', ['confirm', 'cancel']).then((res) => {
200
- if (res=='confirm'){
201
- if (voicechange=='关闭'){
202
- this.$androidUtil.setPreference('f_voiceSwitch', "false")
203
- this.$showMessage('提示音关闭成功!')
204
- }else{
205
- this.$androidUtil.setPreference('f_voiceSwitch', "true")
206
- this.$showMessage('提示音开启成功!')
167
+ },
168
+ cleanalldata() {
169
+ this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
170
+ if (res === 'confirm') {
171
+ let result = this.$androidUtil.bzLogic('clearPhoneData', {flag: 0})
172
+ console.log((result.result))
173
+ if (result.result == '成功') {
174
+ this.$showMessage('清除数据完成!')
175
+ } else {
176
+ this.$showMessage('清除数据失败!')
177
+ }
178
+ }
179
+ })
180
+ },
181
+ // 清空数据
182
+ cleandata() {
183
+ console.log("88888888888")
184
+ this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
185
+ if (res === 'confirm') {
186
+ let result = this.$androidUtil.bzLogic('clearPhoneDataNew', {tables: this.dataclear})
187
+ console.log((result.result))
188
+ if (result.result == '成功') {
189
+ this.$showMessage('清除数据完成!')
190
+ } else {
191
+ this.$showMessage('清除数据失败!')
192
+ }
193
+ this.close()
207
194
  }
195
+ })
196
+ },
197
+ // 导出数据
198
+ openclear() {
199
+ this.show = true
200
+ },
201
+ voiceSwitch() {
202
+ console.log("进入声音开关")
203
+ let voicedata = this.$androidUtil.getPreference('f_voiceSwitch')
204
+ console.log(voicedata)
205
+ let voicechange = '开启'
206
+ if (voicedata == "true") {
207
+ console.log("进入判断")
208
+ voicechange = '关闭'
208
209
  }
209
- })
210
- },
211
- outdata(){
212
- HostApp.backupDatabase()
213
- this.$showMessage('数据导出成功!')
214
- },
215
- //取消自动登录
216
- cancelAutoLogin(){
217
- let auto=this.$androidUtil.getPreference('autoLogin')
218
- if(auto){
219
- this.$androidUtil.setPreference('autoLogin', false)
220
- this.$showMessage('已取消自动登录!')
221
- }else{
222
- this.$showMessage('当前已处于非自动登录!')
223
- }
224
- }
225
- },
226
- watch: {
227
- 'all' (val) {
228
- if (val) {
229
- this.modelval = Object.keys(this.fields)
230
- } else {
231
- console.log(this.flag)
232
- if (this.flag){
233
- this.modelval = []
210
+ this.$showMessage('此操作为' + voicechange + '提示音,请再次确认!', ['confirm', 'cancel']).then((res) => {
211
+ if (res == 'confirm') {
212
+ if (voicechange == '关闭') {
213
+ this.$androidUtil.setPreference('f_voiceSwitch', "false")
214
+ this.$showMessage('提示音关闭成功!')
215
+ } else {
216
+ this.$androidUtil.setPreference('f_voiceSwitch', "true")
217
+ this.$showMessage('提示音开启成功!')
218
+ }
219
+ }
220
+ })
221
+ },
222
+ outdata() {
223
+ HostApp.backupDatabase()
224
+ this.$showMessage('数据导出成功!')
225
+ },
226
+ //取消自动登录
227
+ cancelAutoLogin() {
228
+ let auto = this.$androidUtil.getPreference('autoLogin')
229
+ if (auto) {
230
+ this.$androidUtil.setPreference('autoLogin', false)
231
+ this.$showMessage('已取消自动登录!')
232
+ } else {
233
+ this.$showMessage('当前已处于非自动登录!')
234
234
  }
235
235
  }
236
- this.flag=true
237
236
  },
238
- 'modelval.length' () {
239
- this.sortModelval()
237
+ watch: {
238
+ 'all'(val) {
239
+ if (val) {
240
+ this.modelval = Object.keys(this.fields)
241
+ } else {
242
+ console.log(this.flag)
243
+ if (this.flag) {
244
+ this.modelval = []
245
+ }
246
+ }
247
+ this.flag = true
248
+ },
249
+ 'modelval.length'() {
250
+ this.sortModelval()
251
+ }
240
252
  }
241
253
  }
242
- }
243
254
 
244
255
  </script>
245
256
  <style scoped>
246
- .flex-between {
247
- display: flex;
248
- justify-content: space-between;
249
- align-items: center;
250
- }
251
- .flex-between span {
252
- padding-right: 10px;
253
- }
254
- .flex-full {
255
- flex: 1;
256
- }
257
- .name{
258
- font: 15px PingFang-SC-Medium;
259
- color: #666666;
260
- }
261
- .imgs{
262
- width: 35px;
263
- margin-top: 15px;
264
- }
265
- .plan {
266
- border-bottom: 0.5px solid #EAEAEA;
267
- border-right: 0.5px solid #EAEAEA;
268
- height: 120px;
269
- }
270
- .manbiankuang{
271
- width: 44%;
272
- margin-top: 15px;
273
- margin-left: 4%;
274
- border:1px solid #e3e3e3;
275
- border-radius:10px 10px 10px 10px;
276
- text-align: center;
277
- background-color: #ffffff;
278
- }
279
- .user{
280
- border-bottom: 0.5px solid #EAEAEA;
281
- border-right: 0.5px solid #EAEAEA;
282
- border-left: 0.5px solid #EAEAEA;
283
- height: 120px;
284
- }
285
- .safecheck{
286
- border-bottom: 0.5px solid #EAEAEA;
287
- border-left: 0.5px solid #EAEAEA;
288
- height: 120px;
289
- }
290
- .appointment{
291
- border-top: 0.5px solid #EAEAEA;
292
- border-right: 0.5px solid #EAEAEA;
293
- height: 120px;
294
- }
295
- .search{
296
- border-top: 0.5px solid #EAEAEA;
297
- border-right: 0.5px solid #EAEAEA;
298
- border-left: 0.5px solid #EAEAEA;
299
- height: 120px;
300
- }
301
- .upload{
302
- border-top: 0.5px solid #EAEAEA;
303
- border-left: 0.5px solid #EAEAEA;
304
- height: 120px;
305
- }
257
+ .flex-between {
258
+ display: flex;
259
+ justify-content: space-between;
260
+ align-items: center;
261
+ }
262
+
263
+ .flex-between span {
264
+ padding-right: 10px;
265
+ }
266
+
267
+ .flex-full {
268
+ flex: 1;
269
+ }
270
+
271
+ .name {
272
+ font: 15px PingFang-SC-Medium;
273
+ color: #666666;
274
+ }
275
+
276
+ .imgs {
277
+ width: 35px;
278
+ margin-top: 15px;
279
+ }
280
+
281
+ .plan {
282
+ border-bottom: 0.5px solid #EAEAEA;
283
+ border-right: 0.5px solid #EAEAEA;
284
+ height: 120px;
285
+ }
286
+
287
+ .manbiankuang {
288
+ width: 44%;
289
+ margin-top: 15px;
290
+ margin-left: 4%;
291
+ border: 1px solid #e3e3e3;
292
+ border-radius: 10px 10px 10px 10px;
293
+ text-align: center;
294
+ background-color: #ffffff;
295
+ }
296
+
297
+ .user {
298
+ border-bottom: 0.5px solid #EAEAEA;
299
+ border-right: 0.5px solid #EAEAEA;
300
+ border-left: 0.5px solid #EAEAEA;
301
+ height: 120px;
302
+ }
303
+
304
+ .safecheck {
305
+ border-bottom: 0.5px solid #EAEAEA;
306
+ border-left: 0.5px solid #EAEAEA;
307
+ height: 120px;
308
+ }
309
+
310
+ .appointment {
311
+ border-top: 0.5px solid #EAEAEA;
312
+ border-right: 0.5px solid #EAEAEA;
313
+ height: 120px;
314
+ }
315
+
316
+ .search {
317
+ border-top: 0.5px solid #EAEAEA;
318
+ border-right: 0.5px solid #EAEAEA;
319
+ border-left: 0.5px solid #EAEAEA;
320
+ height: 120px;
321
+ }
322
+
323
+ .upload {
324
+ border-top: 0.5px solid #EAEAEA;
325
+ border-left: 0.5px solid #EAEAEA;
326
+ height: 120px;
327
+ }
306
328
 
307
329
 
308
330
  </style>