system-phone 3.1.43 → 3.1.45

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.
Files changed (197) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/.eslintrc.js +16 -16
  4. package/CHANGELOG.md +1 -1
  5. package/Dockerfile +3 -3
  6. package/README.md +36 -36
  7. package/build/css-loaders.js +34 -34
  8. package/build/dev-client.js +8 -8
  9. package/build/example-server.js +80 -80
  10. package/build/release.sh +28 -28
  11. package/build/utils.js +71 -71
  12. package/build/webpack.dev.conf.js +31 -31
  13. package/build/webpack.example.conf.js +49 -49
  14. package/build/webpack.prod.conf.js +60 -60
  15. package/build/webpack.test.conf.js +31 -31
  16. package/config/dev.env.js +6 -6
  17. package/config/index.js +38 -38
  18. package/config/prod.env.js +3 -3
  19. package/config/test.env.js +6 -6
  20. package/nginx.conf +304 -304
  21. package/package.json +1 -1
  22. package/release.bat +5 -5
  23. package/src/App.vue +25 -25
  24. package/src/Util.js +415 -415
  25. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  26. package/src/android-bootstrap/less/.csscomb.json +304 -304
  27. package/src/android-bootstrap/less/.csslintrc +19 -19
  28. package/src/android-bootstrap/less/alerts.less +73 -73
  29. package/src/android-bootstrap/less/badges.less +66 -66
  30. package/src/android-bootstrap/less/bootstrap.less +56 -56
  31. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  32. package/src/android-bootstrap/less/button-groups.less +247 -247
  33. package/src/android-bootstrap/less/buttons.less +173 -173
  34. package/src/android-bootstrap/less/carousel.less +269 -269
  35. package/src/android-bootstrap/less/close.less +34 -34
  36. package/src/android-bootstrap/less/code.less +69 -69
  37. package/src/android-bootstrap/less/component-animations.less +33 -33
  38. package/src/android-bootstrap/less/dropdowns.less +216 -216
  39. package/src/android-bootstrap/less/forms.less +626 -626
  40. package/src/android-bootstrap/less/glyphicons.less +305 -305
  41. package/src/android-bootstrap/less/grid.less +84 -84
  42. package/src/android-bootstrap/less/input-groups.less +167 -167
  43. package/src/android-bootstrap/less/jumbotron.less +52 -52
  44. package/src/android-bootstrap/less/labels.less +64 -64
  45. package/src/android-bootstrap/less/list-group.less +141 -141
  46. package/src/android-bootstrap/less/media.less +66 -66
  47. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  48. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  49. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  50. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  51. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  52. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  53. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  54. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  55. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  56. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  57. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  58. package/src/android-bootstrap/less/mixins/image.less +33 -33
  59. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  60. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  61. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  62. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  63. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  64. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  65. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  66. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  67. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  68. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  69. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  70. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  71. package/src/android-bootstrap/less/mixins/size.less +10 -10
  72. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  73. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  74. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  75. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  76. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  77. package/src/android-bootstrap/less/mixins.less +40 -40
  78. package/src/android-bootstrap/less/modals.less +151 -151
  79. package/src/android-bootstrap/less/navbar.less +660 -660
  80. package/src/android-bootstrap/less/navs.less +290 -290
  81. package/src/android-bootstrap/less/normalize.less +424 -424
  82. package/src/android-bootstrap/less/pager.less +76 -76
  83. package/src/android-bootstrap/less/pagination.less +89 -89
  84. package/src/android-bootstrap/less/panels.less +274 -274
  85. package/src/android-bootstrap/less/popovers.less +131 -131
  86. package/src/android-bootstrap/less/print.less +101 -101
  87. package/src/android-bootstrap/less/progress-bars.less +87 -87
  88. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  89. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  90. package/src/android-bootstrap/less/scaffolding.less +161 -161
  91. package/src/android-bootstrap/less/tables.less +262 -262
  92. package/src/android-bootstrap/less/theme.less +291 -291
  93. package/src/android-bootstrap/less/thumbnails.less +36 -36
  94. package/src/android-bootstrap/less/tooltip.less +102 -102
  95. package/src/android-bootstrap/less/type.less +303 -303
  96. package/src/android-bootstrap/less/utilities.less +55 -55
  97. package/src/android-bootstrap/less/variables.less +896 -896
  98. package/src/android-bootstrap/less/wells.less +29 -29
  99. package/src/bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  100. package/src/bootstrap/less/.csscomb.json +304 -304
  101. package/src/bootstrap/less/.csslintrc +19 -19
  102. package/src/bootstrap/less/alerts.less +73 -73
  103. package/src/bootstrap/less/badges.less +66 -66
  104. package/src/bootstrap/less/bootstrap.less +56 -56
  105. package/src/bootstrap/less/breadcrumbs.less +26 -26
  106. package/src/bootstrap/less/button-groups.less +247 -247
  107. package/src/bootstrap/less/buttons.less +172 -172
  108. package/src/bootstrap/less/carousel.less +269 -269
  109. package/src/bootstrap/less/close.less +34 -34
  110. package/src/bootstrap/less/code.less +69 -69
  111. package/src/bootstrap/less/component-animations.less +33 -33
  112. package/src/bootstrap/less/dropdowns.less +216 -216
  113. package/src/bootstrap/less/forms.less +626 -626
  114. package/src/bootstrap/less/glyphicons.less +305 -305
  115. package/src/bootstrap/less/grid.less +84 -84
  116. package/src/bootstrap/less/input-groups.less +167 -167
  117. package/src/bootstrap/less/jumbotron.less +52 -52
  118. package/src/bootstrap/less/labels.less +64 -64
  119. package/src/bootstrap/less/list-group.less +141 -141
  120. package/src/bootstrap/less/media.less +66 -66
  121. package/src/bootstrap/less/mixins/alerts.less +14 -14
  122. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  123. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  124. package/src/bootstrap/less/mixins/buttons.less +69 -69
  125. package/src/bootstrap/less/mixins/center-block.less +7 -7
  126. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  127. package/src/bootstrap/less/mixins/forms.less +90 -90
  128. package/src/bootstrap/less/mixins/gradients.less +59 -59
  129. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  130. package/src/bootstrap/less/mixins/grid.less +122 -122
  131. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  132. package/src/bootstrap/less/mixins/image.less +33 -33
  133. package/src/bootstrap/less/mixins/labels.less +12 -12
  134. package/src/bootstrap/less/mixins/list-group.less +30 -30
  135. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  136. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  137. package/src/bootstrap/less/mixins/opacity.less +8 -8
  138. package/src/bootstrap/less/mixins/pagination.less +24 -24
  139. package/src/bootstrap/less/mixins/panels.less +24 -24
  140. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  141. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  142. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  143. package/src/bootstrap/less/mixins/resize.less +6 -6
  144. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  145. package/src/bootstrap/less/mixins/size.less +10 -10
  146. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  147. package/src/bootstrap/less/mixins/table-row.less +44 -44
  148. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  149. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  150. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  151. package/src/bootstrap/less/mixins.less +40 -40
  152. package/src/bootstrap/less/modals.less +151 -151
  153. package/src/bootstrap/less/navbar.less +660 -660
  154. package/src/bootstrap/less/navs.less +286 -286
  155. package/src/bootstrap/less/normalize.less +424 -424
  156. package/src/bootstrap/less/pager.less +76 -76
  157. package/src/bootstrap/less/pagination.less +89 -89
  158. package/src/bootstrap/less/panels.less +275 -275
  159. package/src/bootstrap/less/popovers.less +131 -131
  160. package/src/bootstrap/less/print.less +101 -101
  161. package/src/bootstrap/less/progress-bars.less +87 -87
  162. package/src/bootstrap/less/responsive-embed.less +35 -35
  163. package/src/bootstrap/less/responsive-utilities.less +194 -194
  164. package/src/bootstrap/less/scaffolding.less +161 -161
  165. package/src/bootstrap/less/tables.less +262 -262
  166. package/src/bootstrap/less/theme.less +291 -291
  167. package/src/bootstrap/less/thumbnails.less +36 -36
  168. package/src/bootstrap/less/tooltip.less +102 -102
  169. package/src/bootstrap/less/type.less +303 -303
  170. package/src/bootstrap/less/utilities.less +55 -55
  171. package/src/bootstrap/less/variables.less +895 -895
  172. package/src/bootstrap/less/wells.less +29 -29
  173. package/src/components/AloneLoadParams.vue +26 -26
  174. package/src/components/LoadAppdata.vue +38 -38
  175. package/src/components/LoginAppV4.vue +790 -787
  176. package/src/components/ModifyPassWord.vue +219 -216
  177. package/src/components/PhoneSellInfo.vue +148 -148
  178. package/src/components/Test.vue +14 -14
  179. package/src/filiale/liaoyuan/SystemSetUp.vue +352 -352
  180. package/src/filiale/liaoyuan/systemphonegrid.js +7 -7
  181. package/src/plugins/GetStringData.js +18 -18
  182. package/src/plugins/LoadParams.js +24 -24
  183. package/src/plugins/validateStrongPasswordPhone.js +176 -0
  184. package/src/services/ConfigService.js +24 -24
  185. package/static/app.json +4 -4
  186. package/static/globals.txt +74 -74
  187. package/test/unit/.eslintrc +5 -5
  188. package/test/unit/TestUtil.js +35 -35
  189. package/test/unit/context.html +20 -20
  190. package/test/unit/index.js +13 -13
  191. package/test/unit/init.js +13 -13
  192. package/test/unit/karma.conf.js +50 -50
  193. package/test/unit/specs/App.spec.js +17 -17
  194. package/test/unit/specs/Test.spec.js +28 -28
  195. package/test/unit/specs/components/LoginApp.spec.js +21 -21
  196. package/test/unit/specs/sevices/ConfigService.spec.js +23 -23
  197. package/test/unit/specs/sevices/GetDBTest.spec.js +28 -28
@@ -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>