system-phone 3.0.49-3 → 3.0.49-5

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