system-phone 1.2.80-socket-11 → 1.2.80-socket-13

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.
File without changes
@@ -1,2 +1,2 @@
1
- #Wed Oct 13 17:41:52 CST 2021
1
+ #Tue Oct 27 14:57:49 CST 2020
2
2
  gradle.version=6.1
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "system-phone",
3
- "version": "1.2.80-socket-11",
3
+ "version": "1.2.80-socket-13",
4
4
  "description": "手机模块 前端组件",
5
5
  "author": "何宁社 <524395609@qq.com>",
6
6
  "license": "ISC",
@@ -3,8 +3,8 @@
3
3
  <tools-page :need-back="!isMenu" :title="titleName" @back="back('返回')" > </tools-page>
4
4
  </div>
5
5
  <div id="app" :class="{'auto':isMenu,'app-height':!isMenu}">
6
- <div class="row" style="overflow-y: scroll;">
7
- <route v-ref:route> </route>
6
+ <div class="row" :style="isMenu?'overflow-y: scroll;overflow-x: hidden;height:80vh':'overflow-y: scroll;overflow-x: hidden;'">
7
+ <route v-ref:route> </route>
8
8
  </div>
9
9
  <tab-bar @select-item="onClickTabBarItem" v-show="isMenu">
10
10
  </tab-bar>
@@ -1,275 +1,290 @@
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
- </div>
14
- <modal :show.sync="show" v-ref:modal backdrop="false">
15
- <header slot="modal-header" class="modal-header text-center">
16
- <h4 class="modal-title">清除项选择</h4>
17
- <input type="checkbox" class="" id="f_operator" v-model="all">
18
- <label for="f_operator" class="font-size">全选</label>
19
- </header>
20
- <article slot="modal-body" v-if="show">
21
- <div class="auto col-sm-11 col-xs-11 col-xs-offset-1 col-md-offset-1" style="margin-top: 10px;">
22
- <div class="col-sm-4 col-xs-4" v-for="f in fields">
23
- <input type="checkbox" class="" :id="'export-col-'+$index" v-model="modelval" :value="$key">
24
- <label :for="'export-col-'+$index" class="font-size">{{f}}</label>
25
- </div>
26
- </div>
27
- </article>
28
- <footer slot="modal-footer" class="modal-footer">
29
- <center>
30
- <button v-show="show" type="button" class="btn btn-default" @click='close()'>取消</button>
31
- <button v-show="show" type="button" class="btn btn-success" @click='clear()'>确定</button>
32
- </center>
33
- </footer>
34
- </modal>
35
- </template>
36
-
37
- <script>
38
- import Vue from 'vue'
39
-
40
- export default {
41
- title: '系统设置',
42
- data() {
43
- return {
44
- titleName:'系统设置',
45
- all: false,
46
- flag:true,
47
- show:false,
48
- fields: {},
49
- dataclear:[],
50
- tabs: this.getTabs(),
51
- //tabs:[{name:"清空数据"}],
52
- modelval: [],
53
- text: '导航组件this',
54
- beforeName:'系统设置',
55
- }
56
- },
57
- ready(){
58
- if(Vue.config.safecheck) {
59
- if (Vue.config.safecheck.clearPhone) {
60
- let aaa = Vue.config.safecheck.clearPhone.cleardata
61
- for (let i = 0; i < aaa.length; i++) {
62
- this.fields[aaa[i].module] = aaa[i].module
63
- }
64
- }
65
- }
66
- },
67
- methods: {
68
- clear(){
69
- let aaa=Vue.config.safecheck.clearPhone.cleardata
70
- console.log(this.modelval)
71
- for (let i = 0; i < aaa.length; i++) {
72
- for (let j = 0; j < this.modelval.length; j++) {
73
- if (aaa[i].module==this.modelval[i]){
74
- this.dataclear=Object.assign([],this.dataclear,aaa[i].tables)
75
- }
76
- }
77
- }
78
- console.log(this.dataclear)
79
- this.cleandata()
80
- },
81
- close(){
82
- this.show=false
83
- this.all=false
84
- this.flag=true
85
- this.modelval=[]
86
- },
87
- sortModelval () {
88
- let sortModel = []
89
- Object.keys(this.fields).forEach((key) => {
90
- if (this.modelval.includes(key)) {
91
- sortModel.push(key)
92
- }
93
- })
94
- console.log('看看选择的顺序。。。', sortModel)
95
- console.log('看看选择的顺序。。。', this.modelval)
96
- if (sortModel.length==this.modelval.length-1){
97
- this.flag=false
98
- console.log("66666666666666")
99
- this.all=false
100
- }
101
- console.log(Object.keys(this.fields).length)
102
- if (sortModel.length==Object.keys(this.fields).length){
103
- this.all=true
104
- }
105
- this.modelval = sortModel
106
- },
107
- imgback(val){
108
- return require('../assets/'+val+'.png')
109
- },
110
- getTabs(){
111
- for(let funs in Vue.user.functions){
112
- if(Vue.user.functions[funs].link == 'system-setup'){
113
- return Vue.user.functions[funs].children
114
- }
115
- }
116
- },
117
- gotopage(link,name) {
118
- if(name == '清空数据'){
119
- this.cleanalldata()
120
- }else if (name == '清除数据'){
121
- this.openclear()
122
- } else if(name == '导出数据'){
123
- this.outdata()
124
- }else if(name == '退出系统'){
125
- this.$showMessage('即将返回登陆界面!', ['confirm', 'cancel']).then((res) => {
126
- if (res === 'confirm') {
127
- Vue.prototype.$connectNumber = 0 // 重连剩余次数
128
- Vue.prototype.$socket.close() // 关闭websocket连接
129
- this.$androidUtil.setPreference('f_repairman_id', 'x')
130
- this.$androidUtil.setPreference('f_repairman_name', 'x')
131
- this.$dispatch('gologin')
132
- }
133
- })
134
- }else{
135
- console.log('进入子组件')
136
- var prpdata = {
137
- _this:this,
138
- title:name,
139
- safe:true
140
- }
141
- this.$dispatch('gotoson',prpdata)
142
- this.$goto(link)
143
- }
144
- },
145
- cleanalldata(){
146
- this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
147
- if (res === 'confirm') {
148
- let result = this.$androidUtil.bzLogic('clearPhoneData', {flag: 0})
149
- console.log((result.result))
150
- if(result.result == '成功'){
151
- this.$showMessage('清除数据完成!')
152
- }else{
153
- this.$showMessage('清除数据失败!')
154
- }
155
- }
156
- })
157
- },
158
- // 清空数据
159
- cleandata(){
160
- console.log("88888888888")
161
- this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
162
- if (res === 'confirm') {
163
- let result = this.$androidUtil.bzLogic('clearPhoneDataNew', {tables: this.dataclear})
164
- console.log((result.result))
165
- if(result.result == '成功'){
166
- this.$showMessage('清除数据完成!')
167
- }else{
168
- this.$showMessage('清除数据失败!')
169
- }
170
- this.close()
171
- }
172
- })
173
- },
174
- // 导出数据
175
- openclear(){
176
- this.show=true
177
- },
178
- outdata(){
179
- HostApp.backupDatabase()
180
- this.$showMessage('数据导出成功!')
181
- },
182
- //取消自动登录
183
- cancelAutoLogin(){
184
- let auto=this.$androidUtil.getPreference('autoLogin')
185
- if(auto){
186
- this.$androidUtil.setPreference('autoLogin', false)
187
- this.$showMessage('已取消自动登录!')
188
- }else{
189
- this.$showMessage('当前已处于非自动登录!')
190
- }
191
- }
192
- },
193
- watch: {
194
- 'all' (val) {
195
- if (val) {
196
- this.modelval = Object.keys(this.fields)
197
- } else {
198
- console.log(this.flag)
199
- if (this.flag){
200
- this.modelval = []
201
- }
202
- }
203
- this.flag=true
204
- },
205
- 'modelval.length' () {
206
- this.sortModelval()
207
- }
208
- }
209
- }
210
-
211
- </script>
212
- <style scoped>
213
- .flex-between {
214
- display: flex;
215
- justify-content: space-between;
216
- align-items: center;
217
- }
218
- .flex-between span {
219
- padding-right: 10px;
220
- }
221
- .flex-full {
222
- flex: 1;
223
- }
224
- .name{
225
- font: 15px PingFang-SC-Medium;
226
- color: #666666;
227
- }
228
- .imgs{
229
- width: 35px;
230
- margin-top: 15px;
231
- }
232
- .plan {
233
- border-bottom: 0.5px solid #EAEAEA;
234
- border-right: 0.5px solid #EAEAEA;
235
- height: 120px;
236
- }
237
- .manbiankuang{
238
- width: 44%;
239
- margin-top: 15px;
240
- margin-left: 4%;
241
- border:1px solid #e3e3e3;
242
- border-radius:10px 10px 10px 10px;
243
- text-align: center;
244
- background-color: #ffffff;
245
- }
246
- .user{
247
- border-bottom: 0.5px solid #EAEAEA;
248
- border-right: 0.5px solid #EAEAEA;
249
- border-left: 0.5px solid #EAEAEA;
250
- height: 120px;
251
- }
252
- .safecheck{
253
- border-bottom: 0.5px solid #EAEAEA;
254
- border-left: 0.5px solid #EAEAEA;
255
- height: 120px;
256
- }
257
- .appointment{
258
- border-top: 0.5px solid #EAEAEA;
259
- border-right: 0.5px solid #EAEAEA;
260
- height: 120px;
261
- }
262
- .search{
263
- border-top: 0.5px solid #EAEAEA;
264
- border-right: 0.5px solid #EAEAEA;
265
- border-left: 0.5px solid #EAEAEA;
266
- height: 120px;
267
- }
268
- .upload{
269
- border-top: 0.5px solid #EAEAEA;
270
- border-left: 0.5px solid #EAEAEA;
271
- height: 120px;
272
- }
273
-
274
-
275
- </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
+ </div>
14
+ <modal :show.sync="show" v-ref:modal backdrop="false">
15
+ <header slot="modal-header" class="modal-header text-center">
16
+ <h4 class="modal-title">清除项选择</h4>
17
+ <input type="checkbox" class="" id="f_operator" v-model="all">
18
+ <label for="f_operator" class="font-size">全选</label>
19
+ </header>
20
+ <article slot="modal-body" v-if="show">
21
+ <div class="auto col-sm-11 col-xs-11 col-xs-offset-1 col-md-offset-1" style="margin-top: 10px;">
22
+ <div class="col-sm-4 col-xs-4" v-for="f in fields">
23
+ <input type="checkbox" class="" :id="'export-col-'+$index" v-model="modelval" :value="$key">
24
+ <label :for="'export-col-'+$index" class="font-size">{{f}}</label>
25
+ </div>
26
+ </div>
27
+ </article>
28
+ <footer slot="modal-footer" class="modal-footer">
29
+ <center>
30
+ <button v-show="show" type="button" class="btn btn-default" @click='close()'>取消</button>
31
+ <button v-show="show" type="button" class="btn btn-success" @click='clear()'>确定</button>
32
+ </center>
33
+ </footer>
34
+ </modal>
35
+ </template>
36
+
37
+ <script>
38
+ import Vue from 'vue'
39
+
40
+ export default {
41
+ title: '系统设置',
42
+ data() {
43
+ return {
44
+ titleName:'系统设置',
45
+ all: false,
46
+ flag:true,
47
+ show:false,
48
+ fields: {},
49
+ dataclear:[],
50
+ tabs: this.getTabs(),
51
+ //tabs:[{name:"清空数据"}],
52
+ modelval: [],
53
+ text: '导航组件this',
54
+ beforeName:'系统设置',
55
+ }
56
+ },
57
+ ready(){
58
+ if(Vue.config.safecheck) {
59
+ if (Vue.config.safecheck.clearPhone) {
60
+ let aaa = Vue.config.safecheck.clearPhone.cleardata
61
+ for (let i = 0; i < aaa.length; i++) {
62
+ this.fields[aaa[i].module] = aaa[i].module
63
+ }
64
+ }
65
+ }
66
+ },
67
+ methods: {
68
+ clear(){
69
+ let aaa=Vue.config.safecheck.clearPhone.cleardata
70
+ console.log(this.modelval)
71
+ for (let i = 0; i < aaa.length; i++) {
72
+ for (let j = 0; j < this.modelval.length; j++) {
73
+ if (aaa[i].module==this.modelval[i]){
74
+ this.dataclear=Object.assign([],this.dataclear,aaa[i].tables)
75
+ }
76
+ }
77
+ }
78
+ console.log(this.dataclear)
79
+ this.cleandata()
80
+ },
81
+ close(){
82
+ this.show=false
83
+ this.all=false
84
+ this.flag=true
85
+ this.modelval=[]
86
+ },
87
+ sortModelval () {
88
+ let sortModel = []
89
+ Object.keys(this.fields).forEach((key) => {
90
+ if (this.modelval.includes(key)) {
91
+ sortModel.push(key)
92
+ }
93
+ })
94
+ console.log('看看选择的顺序。。。', sortModel)
95
+ console.log('看看选择的顺序。。。', this.modelval)
96
+ if (sortModel.length==this.modelval.length-1){
97
+ this.flag=false
98
+ console.log("66666666666666")
99
+ this.all=false
100
+ }
101
+ console.log(Object.keys(this.fields).length)
102
+ if (sortModel.length==Object.keys(this.fields).length){
103
+ this.all=true
104
+ }
105
+ this.modelval = sortModel
106
+ },
107
+ imgback(val){
108
+ return require('../assets/'+val+'.png')
109
+ },
110
+ getTabs(){
111
+ for(let funs in Vue.user.functions){
112
+ if(Vue.user.functions[funs].link == 'system-setup'){
113
+ return Vue.user.functions[funs].children
114
+ }
115
+ }
116
+ },
117
+ gotopage(link,name) {
118
+ if(name == '清空数据'){
119
+ this.cleanalldata()
120
+ }else if (name == '清除数据'){
121
+ this.openclear()
122
+ } else if(name == '导出数据'){
123
+ this.outdata()
124
+ }else if(name == '退出系统'){
125
+ HostApp.back_home()
126
+ // this.$showMessage('即将返回登陆界面!', ['confirm', 'cancel']).then((res) => {
127
+ // if (res === 'confirm') {
128
+ // Vue.prototype.$connectNumber = 0 // 重连剩余次数
129
+ // if (Vue.prototype.$socket){
130
+ // Vue.prototype.$socket.close() // 关闭websocket连接
131
+ // }
132
+ // this.$androidUtil.setPreference('f_repairman_id', 'x')
133
+ // this.$androidUtil.setPreference('f_repairman_name', 'x')
134
+ // this.$dispatch('gologin')
135
+ // }
136
+ // })
137
+ }else if(name == '退出登录'){
138
+ this.$showMessage('即将返回登陆界面!', ['confirm', 'cancel']).then((res) => {
139
+ if (res === 'confirm') {
140
+ Vue.prototype.$connectNumber = 0 // 重连剩余次数
141
+ if (Vue.prototype.$socket){
142
+ Vue.prototype.$socket.close() // 关闭websocket连接
143
+ }
144
+ this.$androidUtil.setPreference('f_repairman_id', 'x')
145
+ this.$androidUtil.setPreference('f_repairman_name', 'x')
146
+ this.$dispatch('gologin')
147
+ }
148
+ })
149
+ }else{
150
+ console.log('进入子组件')
151
+ var prpdata = {
152
+ _this:this,
153
+ title:name,
154
+ safe:true
155
+ }
156
+ this.$dispatch('gotoson',prpdata)
157
+ this.$goto(link)
158
+ }
159
+ },
160
+ cleanalldata(){
161
+ this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
162
+ if (res === 'confirm') {
163
+ let result = this.$androidUtil.bzLogic('clearPhoneData', {flag: 0})
164
+ console.log((result.result))
165
+ if(result.result == '成功'){
166
+ this.$showMessage('清除数据完成!')
167
+ }else{
168
+ this.$showMessage('清除数据失败!')
169
+ }
170
+ }
171
+ })
172
+ },
173
+ // 清空数据
174
+ cleandata(){
175
+ console.log("88888888888")
176
+ this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
177
+ if (res === 'confirm') {
178
+ let result = this.$androidUtil.bzLogic('clearPhoneDataNew', {tables: this.dataclear})
179
+ console.log((result.result))
180
+ if(result.result == '成功'){
181
+ this.$showMessage('清除数据完成!')
182
+ }else{
183
+ this.$showMessage('清除数据失败!')
184
+ }
185
+ this.close()
186
+ }
187
+ })
188
+ },
189
+ // 导出数据
190
+ openclear(){
191
+ this.show=true
192
+ },
193
+ outdata(){
194
+ HostApp.backupDatabase()
195
+ this.$showMessage('数据导出成功!')
196
+ },
197
+ //取消自动登录
198
+ cancelAutoLogin(){
199
+ let auto=this.$androidUtil.getPreference('autoLogin')
200
+ if(auto){
201
+ this.$androidUtil.setPreference('autoLogin', false)
202
+ this.$showMessage('已取消自动登录!')
203
+ }else{
204
+ this.$showMessage('当前已处于非自动登录!')
205
+ }
206
+ }
207
+ },
208
+ watch: {
209
+ 'all' (val) {
210
+ if (val) {
211
+ this.modelval = Object.keys(this.fields)
212
+ } else {
213
+ console.log(this.flag)
214
+ if (this.flag){
215
+ this.modelval = []
216
+ }
217
+ }
218
+ this.flag=true
219
+ },
220
+ 'modelval.length' () {
221
+ this.sortModelval()
222
+ }
223
+ }
224
+ }
225
+
226
+ </script>
227
+ <style scoped>
228
+ .flex-between {
229
+ display: flex;
230
+ justify-content: space-between;
231
+ align-items: center;
232
+ }
233
+ .flex-between span {
234
+ padding-right: 10px;
235
+ }
236
+ .flex-full {
237
+ flex: 1;
238
+ }
239
+ .name{
240
+ font: 15px PingFang-SC-Medium;
241
+ color: #666666;
242
+ }
243
+ .imgs{
244
+ width: 35px;
245
+ margin-top: 15px;
246
+ }
247
+ .plan {
248
+ border-bottom: 0.5px solid #EAEAEA;
249
+ border-right: 0.5px solid #EAEAEA;
250
+ height: 120px;
251
+ }
252
+ .manbiankuang{
253
+ width: 44%;
254
+ margin-top: 15px;
255
+ margin-left: 4%;
256
+ border:1px solid #e3e3e3;
257
+ border-radius:10px 10px 10px 10px;
258
+ text-align: center;
259
+ background-color: #ffffff;
260
+ }
261
+ .user{
262
+ border-bottom: 0.5px solid #EAEAEA;
263
+ border-right: 0.5px solid #EAEAEA;
264
+ border-left: 0.5px solid #EAEAEA;
265
+ height: 120px;
266
+ }
267
+ .safecheck{
268
+ border-bottom: 0.5px solid #EAEAEA;
269
+ border-left: 0.5px solid #EAEAEA;
270
+ height: 120px;
271
+ }
272
+ .appointment{
273
+ border-top: 0.5px solid #EAEAEA;
274
+ border-right: 0.5px solid #EAEAEA;
275
+ height: 120px;
276
+ }
277
+ .search{
278
+ border-top: 0.5px solid #EAEAEA;
279
+ border-right: 0.5px solid #EAEAEA;
280
+ border-left: 0.5px solid #EAEAEA;
281
+ height: 120px;
282
+ }
283
+ .upload{
284
+ border-top: 0.5px solid #EAEAEA;
285
+ border-left: 0.5px solid #EAEAEA;
286
+ height: 120px;
287
+ }
288
+
289
+
290
+ </style>