system-phone 1.2.94 → 1.2.97

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "system-phone",
3
- "version": "1.2.94",
3
+ "version": "1.2.97",
4
4
  "description": "手机模块 前端组件",
5
5
  "author": "何宁社 <524395609@qq.com>",
6
6
  "license": "ISC",
@@ -15,23 +15,57 @@
15
15
  <!--<zhihuan-first v-show="componentName == 'zhihuan-first'" worktype="置换通气单" :sourcet="sourcet" tabname="置换待办" v-on:changesum="changesum"></zhihuan-first>-->
16
16
  <!--</div>-->
17
17
  </div>
18
+ <validator name="v">
19
+ <modal
20
+ v-if="showModal"
21
+ :show.sync="showModal"
22
+ backdrop="false"
23
+ title="工程类型"
24
+ cancel-text="取消"
25
+ ok-text="确认"
26
+ :callback="apply"
27
+ >
28
+ <div class="form-horizontal" slot="modal-body">
29
+ <div class="row form-group app-input" style="margin: 10px auto">
30
+ <label class="">报建类型:</label>
31
+ <div class="col-sm-8">
32
+ <v-select
33
+ v-model="applyType"
34
+ placeholder='请选择需要发起的工程类型'
35
+ :value.sync="applyType"
36
+ :options='applyTypes'
37
+ :value-single="true"
38
+ class="select select_list"
39
+ :search="false"
40
+ close-on-select ></v-select>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </modal>
45
+ </validator>
18
46
  </div>
19
47
  </template>
20
48
 
21
49
  <script scoped>
22
50
  import Vue from 'vue'
23
51
  import * as Util from '../Util'
52
+ import {HttpResetClass} from "vue-client";
24
53
  export default {
25
54
  title: '待办工作导航',
26
55
  data () {
27
56
  return {
28
57
  titleName:'待办工作',
58
+ showModal:false,
29
59
  isMenu:true,
30
60
  tabs: this.getTabs(),
31
61
  text: '导航组件this',
32
62
  beforeName:'待办工作',
33
63
  componentName:'repair-first',
34
- sourcet:'竖屏'
64
+ sourcet:'竖屏',
65
+ applyType: '', // 报建类型
66
+ // applyTypes:this.$appdata.getParam("手机报建类型"),
67
+ applyTypes:[{label:'散户报建',value:'散户报建'},{label:'工商户报建',value:'工商户报建'},{label:'团购报建',value:'团购报建'},{label:'改管报建',value:'改管报建'},{label:'增容报建',value:'增容报建'},{label:'退款报建',value:'退款报建'},{label:'团购转散户',value:'团购转散户'},{label:'报警器报建',value:'报警器报建'},{label:'工商业报警器报建',value:'工商业报警器报建'}],
68
+
35
69
  }
36
70
  },
37
71
  ready () {
@@ -39,6 +73,79 @@
39
73
  },
40
74
 
41
75
  methods: {
76
+ click (row) {
77
+ let _this = this
78
+ this.$dispatch('gotoson', {
79
+ _this: _this,
80
+ title: row.defname,
81
+ safe: true
82
+ })
83
+ this.$goto('app-service-control', {selectdata: row})
84
+ },
85
+ async getProcessId(processname) {
86
+ let data = {
87
+ workname: processname
88
+ }
89
+ let http = new HttpResetClass()
90
+ let res = await http.load(
91
+ 'POST',
92
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/getProcessId`,
93
+ {data: data},
94
+ {resolveMsg: null, rejectMsg: '流程标识获取失败!!!'}
95
+ )
96
+
97
+ return res.data
98
+ },
99
+ async apply () {
100
+ if (this.applyType === '' || this.applyType === null) {
101
+ this.$showAlert('请选择需要发起的类型', 'warning', 3000)
102
+ return
103
+ }
104
+ let data = {
105
+ f_apply_type: this.applyType
106
+ }
107
+ if (this.applyType === '散户报建') {
108
+ data.processname = '散户报建流程'
109
+ data.defname = '报装申请'
110
+ } else if (this.applyType === '工商户报建') {
111
+ data.processname = '工商户报建流程'
112
+ data.defname = '报装申请'
113
+ } else if (this.applyType === '改管报建') {
114
+ data.processname = '改管报建流程'
115
+ data.defname = '报装申请'
116
+ } else if (this.applyType === '增容报建') {
117
+ data.processname = '增容报建流程'
118
+ data.defname = '报装申请'
119
+ } else if (this.applyType === '团购报建') {
120
+ data.processname = '团购报建流程'
121
+ data.defname = '报装申请'
122
+ } else if (this.applyType === '退款报建') {
123
+ data.processname = '退款报建流程'
124
+ data.defname = '终止报建'
125
+ } else if (this.applyType === '团购转散户') {
126
+ data.processname = '团购转散户报建流程'
127
+ data.defname = '信息确认'
128
+ }else if (this.applyType === '报警器报建') {
129
+ data.processname = '报警器报建流程'
130
+ data.defname = '报装申请'
131
+ }else if (this.applyType === '工商业报警器报建') {
132
+ data.processname = '工商业报警器报建流程'
133
+ data.defname = '报装申请'
134
+ } else {
135
+ this.$showMessage('暂无此类报装')
136
+ return
137
+ }
138
+
139
+ data.f_sub_state = "新增"
140
+ data.f_apply_source = "线下发起"
141
+ data.f_process_id = await this.getProcessId(data.processname)
142
+
143
+ // 调用ExplorationUser事件
144
+
145
+ this.click(data)
146
+ this.applyType = null
147
+ this.showModal = false
148
+ },
42
149
  // 查询本地所有待办
43
150
  getModelSum(){
44
151
  for(var i = 0;i<this.tabs.length;i++){
@@ -122,14 +229,18 @@
122
229
 
123
230
  },
124
231
  gotopage(param,title) {
125
- console.log('进入子组件')
126
- var prpdata = {
127
- _this:this,
128
- title:title,
129
- safe:false
232
+ if(title === '工程发起'){
233
+ this.showModal = !this.showModal
234
+ }else{
235
+ console.log('进入子组件')
236
+ var prpdata = {
237
+ _this:this,
238
+ title:title,
239
+ safe:false
240
+ }
241
+ this.$dispatch('gotoson',prpdata)
242
+ this.$goto(param,{sourcet:'竖屏',tabname:title})
130
243
  }
131
- this.$dispatch('gotoson',prpdata)
132
- this.$goto(param,{sourcet:'竖屏',tabname:title})
133
244
  },
134
245
  mute () {
135
246
  HostApp.mute()
@@ -138,6 +249,29 @@
138
249
  }
139
250
  </script>
140
251
  <style lang="less">
252
+ .app-input {
253
+ label {
254
+ float: left;
255
+ }
256
+ .select {
257
+ button {
258
+ border: none;
259
+ outline: none;
260
+ text-align: left;
261
+ .btn-placeholder {
262
+ color: #ACA899
263
+ }
264
+ }
265
+ }
266
+ .datepicker {
267
+ .form-control:focus {
268
+ border: none!important;
269
+ outline: none!important;
270
+ -webkit-box-shadow: none;
271
+ box-shadow: none;
272
+ }
273
+ }
274
+ }
141
275
  .tab-befor-img {
142
276
  content: '';
143
277
  background-size: 30px;
@@ -206,9 +206,11 @@
206
206
  }
207
207
  // 设置登录人
208
208
  Vue.user = Util.f = ret.data
209
+ if (ret.data.state != '在职') {
210
+ this.loaderShow=false
211
+ return this.$showMessage("登陆失败,该账号已被注销!")
212
+ }
209
213
  // 对资源菜单进行排序
210
-
211
-
212
214
  let viewDetails = await Vue.resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, {
213
215
  source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
214
216
  userid: Vue.user.id
@@ -1,298 +1,298 @@
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
- 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.clearPhone){
59
- // let cleartable=Vue.config.safecheck.clearPhone.cleardata
60
- // for (let i = 0; i < cleartable.length; i++) {
61
- // this.fields[cleartable[i].module]=cleartable[i].module
62
- // }
63
- // }
64
- },
65
- methods: {
66
- // clear(){
67
- // let cleartable=Vue.config.safecheck.clearPhone.cleardata
68
- // console.log(this.modelval)
69
- // for (let i = 0; i < cleartable.length; i++) {
70
- // for (let j = 0; j < this.modelval.length; j++) {
71
- // if (cleartable[i].module==this.modelval[i]){
72
- // this.dataclear=Object.assign([],this.dataclear,cleartable[i].tables)
73
- // }
74
- // }
75
- // }
76
- // console.log(this.dataclear)
77
- // this.cleandata()
78
- // },
79
- close(){
80
- this.show=false
81
- this.all=false
82
- this.flag=true
83
- this.modelval=[]
84
- },
85
- sortModelval () {
86
- let sortModel = []
87
- Object.keys(this.fields).forEach((key) => {
88
- if (this.modelval.includes(key)) {
89
- sortModel.push(key)
90
- }
91
- })
92
- console.log('看看选择的顺序。。。', sortModel)
93
- console.log('看看选择的顺序。。。', this.modelval)
94
- if (sortModel.length==this.modelval.length-1){
95
- this.flag=false
96
- console.log("66666666666666")
97
- this.all=false
98
- }
99
- console.log(Object.keys(this.fields).length)
100
- if (sortModel.length==Object.keys(this.fields).length){
101
- this.all=true
102
- }
103
- this.modelval = sortModel
104
- },
105
- imgback(val){
106
- return require('../assets/'+val+'.png')
107
- },
108
- getTabs(){
109
- for(let funs in Vue.user.functions){
110
- if(Vue.user.functions[funs].link == 'system-setup'){
111
- return Vue.user.functions[funs].children
112
- }
113
- }
114
- },
115
- gotopage(link,name) {
116
- if(name == '清空数据'){
117
- this.cleanalldata()
118
- }
119
- // else if (name == '清除数据'){
120
- // this.openclear()
121
- // }
122
- else if (name == '声音开关'){
123
- this.voiceSwitch()
124
- } else if(name == '导出数据'){
125
- this.outdata()
126
- }else if(name == '退出系统'){
127
- HostApp.back_home()
128
- }else if(name == '退出登录'){
129
- this.$showMessage('即将返回登陆界面!', ['confirm', 'cancel']).then((res) => {
130
- if (res === 'confirm') {
131
- this.$androidUtil.setPreference('f_repairman_id', 'x')
132
- this.$androidUtil.setPreference('f_repairman_name', 'x')
133
- this.$dispatch('gologin')
134
- }
135
- })
136
- }else{
137
- console.log('进入子组件')
138
- var prpdata = {
139
- _this:this,
140
- title:name,
141
- safe:true
142
- }
143
- this.$dispatch('gotoson',prpdata)
144
- this.$goto(link)
145
- }
146
- },
147
- cleanalldata(){
148
- this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
149
- if (res === 'confirm') {
150
- let result = this.$androidUtil.bzLogic('clearPhoneData', {flag: 0})
151
- console.log((result.result))
152
- if(result.result == '成功'){
153
- this.$showMessage('清除数据完成!')
154
- }else{
155
- this.$showMessage('清除数据失败!')
156
- }
157
- }
158
- })
159
- },
160
- // 清空数据
161
- cleandata(){
162
- console.log("88888888888")
163
- this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
164
- if (res === 'confirm') {
165
- let result = this.$androidUtil.bzLogic('clearPhoneDataNew', {tables: this.dataclear})
166
- console.log((result.result))
167
- if(result.result == '成功'){
168
- this.$showMessage('清除数据完成!')
169
- }else{
170
- this.$showMessage('清除数据失败!')
171
- }
172
- this.close()
173
- }
174
- })
175
- },
176
- // 导出数据
177
- openclear(){
178
- this.show=true
179
- },
180
- voiceSwitch(){
181
- console.log("进入声音开关")
182
- let voicedata=this.$androidUtil.getPreference('f_voiceSwitch')
183
- console.log(voicedata)
184
- let voicechange ='开启'
185
- if (voicedata=="true"){
186
- console.log("进入判断")
187
- voicechange = '关闭'
188
- }
189
- this.$showMessage('此操作为'+voicechange+'提示音,请再次确认!', ['confirm', 'cancel']).then((res) => {
190
- if (res=='confirm'){
191
- if (voicechange=='关闭'){
192
- this.$androidUtil.setPreference('f_voiceSwitch', "false")
193
- this.$showMessage('提示音关闭成功!')
194
- }else{
195
- this.$androidUtil.setPreference('f_voiceSwitch', "true")
196
- this.$showMessage('提示音开启成功!')
197
- }
198
- }
199
- })
200
- },
201
- outdata(){
202
- HostApp.backupDatabase()
203
- this.$showMessage('数据导出成功!')
204
- },
205
- //取消自动登录
206
- cancelAutoLogin(){
207
- let auto=this.$androidUtil.getPreference('autoLogin')
208
- if(auto){
209
- this.$androidUtil.setPreference('autoLogin', false)
210
- this.$showMessage('已取消自动登录!')
211
- }else{
212
- this.$showMessage('当前已处于非自动登录!')
213
- }
214
- }
215
- },
216
- watch: {
217
- 'all' (val) {
218
- if (val) {
219
- this.modelval = Object.keys(this.fields)
220
- } else {
221
- console.log(this.flag)
222
- if (this.flag){
223
- this.modelval = []
224
- }
225
- }
226
- this.flag=true
227
- },
228
- 'modelval.length' () {
229
- this.sortModelval()
230
- }
231
- }
232
- }
233
-
234
- </script>
235
- <style scoped>
236
- .flex-between {
237
- display: flex;
238
- justify-content: space-between;
239
- align-items: center;
240
- }
241
- .flex-between span {
242
- padding-right: 10px;
243
- }
244
- .flex-full {
245
- flex: 1;
246
- }
247
- .name{
248
- font: 15px PingFang-SC-Medium;
249
- color: #666666;
250
- }
251
- .imgs{
252
- width: 35px;
253
- margin-top: 15px;
254
- }
255
- .plan {
256
- border-bottom: 0.5px solid #EAEAEA;
257
- border-right: 0.5px solid #EAEAEA;
258
- height: 120px;
259
- }
260
- .manbiankuang{
261
- width: 44%;
262
- margin-top: 15px;
263
- margin-left: 4%;
264
- border:1px solid #e3e3e3;
265
- border-radius:10px 10px 10px 10px;
266
- text-align: center;
267
- background-color: #ffffff;
268
- }
269
- .user{
270
- border-bottom: 0.5px solid #EAEAEA;
271
- border-right: 0.5px solid #EAEAEA;
272
- border-left: 0.5px solid #EAEAEA;
273
- height: 120px;
274
- }
275
- .safecheck{
276
- border-bottom: 0.5px solid #EAEAEA;
277
- border-left: 0.5px solid #EAEAEA;
278
- height: 120px;
279
- }
280
- .appointment{
281
- border-top: 0.5px solid #EAEAEA;
282
- border-right: 0.5px solid #EAEAEA;
283
- height: 120px;
284
- }
285
- .search{
286
- border-top: 0.5px solid #EAEAEA;
287
- border-right: 0.5px solid #EAEAEA;
288
- border-left: 0.5px solid #EAEAEA;
289
- height: 120px;
290
- }
291
- .upload{
292
- border-top: 0.5px solid #EAEAEA;
293
- border-left: 0.5px solid #EAEAEA;
294
- height: 120px;
295
- }
296
-
297
-
298
- </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
+ 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.clearPhone){
59
+ // let cleartable=Vue.config.safecheck.clearPhone.cleardata
60
+ // for (let i = 0; i < cleartable.length; i++) {
61
+ // this.fields[cleartable[i].module]=cleartable[i].module
62
+ // }
63
+ // }
64
+ },
65
+ methods: {
66
+ // clear(){
67
+ // let cleartable=Vue.config.safecheck.clearPhone.cleardata
68
+ // console.log(this.modelval)
69
+ // for (let i = 0; i < cleartable.length; i++) {
70
+ // for (let j = 0; j < this.modelval.length; j++) {
71
+ // if (cleartable[i].module==this.modelval[i]){
72
+ // this.dataclear=Object.assign([],this.dataclear,cleartable[i].tables)
73
+ // }
74
+ // }
75
+ // }
76
+ // console.log(this.dataclear)
77
+ // this.cleandata()
78
+ // },
79
+ close(){
80
+ this.show=false
81
+ this.all=false
82
+ this.flag=true
83
+ this.modelval=[]
84
+ },
85
+ sortModelval () {
86
+ let sortModel = []
87
+ Object.keys(this.fields).forEach((key) => {
88
+ if (this.modelval.includes(key)) {
89
+ sortModel.push(key)
90
+ }
91
+ })
92
+ console.log('看看选择的顺序。。。', sortModel)
93
+ console.log('看看选择的顺序。。。', this.modelval)
94
+ if (sortModel.length==this.modelval.length-1){
95
+ this.flag=false
96
+ console.log("66666666666666")
97
+ this.all=false
98
+ }
99
+ console.log(Object.keys(this.fields).length)
100
+ if (sortModel.length==Object.keys(this.fields).length){
101
+ this.all=true
102
+ }
103
+ this.modelval = sortModel
104
+ },
105
+ imgback(val){
106
+ return require('../assets/'+val+'.png')
107
+ },
108
+ getTabs(){
109
+ for(let funs in Vue.user.functions){
110
+ if(Vue.user.functions[funs].link == 'system-setup'){
111
+ return Vue.user.functions[funs].children
112
+ }
113
+ }
114
+ },
115
+ gotopage(link,name) {
116
+ if(name == '清空数据'){
117
+ this.cleanalldata()
118
+ }
119
+ // else if (name == '清除数据'){
120
+ // this.openclear()
121
+ // }
122
+ else if (name == '声音开关'){
123
+ this.voiceSwitch()
124
+ } else if(name == '导出数据'){
125
+ this.outdata()
126
+ }else if(name == '退出系统'){
127
+ HostApp.back_home()
128
+ }else if(name == '退出登录'){
129
+ this.$showMessage('即将返回登陆界面!', ['confirm', 'cancel']).then((res) => {
130
+ if (res === 'confirm') {
131
+ this.$androidUtil.setPreference('f_repairman_id', 'x')
132
+ this.$androidUtil.setPreference('f_repairman_name', 'x')
133
+ this.$dispatch('gologin')
134
+ }
135
+ })
136
+ }else{
137
+ console.log('进入子组件')
138
+ var prpdata = {
139
+ _this:this,
140
+ title:name,
141
+ safe:true
142
+ }
143
+ this.$dispatch('gotoson',prpdata)
144
+ this.$goto(link)
145
+ }
146
+ },
147
+ cleanalldata(){
148
+ this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
149
+ if (res === 'confirm') {
150
+ let result = this.$androidUtil.bzLogic('clearPhoneData', {flag: 0})
151
+ console.log((result.result))
152
+ if(result.result == '成功'){
153
+ this.$showMessage('清除数据完成!')
154
+ }else{
155
+ this.$showMessage('清除数据失败!')
156
+ }
157
+ }
158
+ })
159
+ },
160
+ // 清空数据
161
+ cleandata(){
162
+ console.log("88888888888")
163
+ this.$showMessage('此操作为清理数据,无法恢复!', ['confirm', 'cancel']).then((res) => {
164
+ if (res === 'confirm') {
165
+ let result = this.$androidUtil.bzLogic('clearPhoneDataNew', {tables: this.dataclear})
166
+ console.log((result.result))
167
+ if(result.result == '成功'){
168
+ this.$showMessage('清除数据完成!')
169
+ }else{
170
+ this.$showMessage('清除数据失败!')
171
+ }
172
+ this.close()
173
+ }
174
+ })
175
+ },
176
+ // 导出数据
177
+ openclear(){
178
+ this.show=true
179
+ },
180
+ voiceSwitch(){
181
+ console.log("进入声音开关")
182
+ let voicedata=this.$androidUtil.getPreference('f_voiceSwitch')
183
+ console.log(voicedata)
184
+ let voicechange ='开启'
185
+ if (voicedata=="true"){
186
+ console.log("进入判断")
187
+ voicechange = '关闭'
188
+ }
189
+ this.$showMessage('此操作为'+voicechange+'提示音,请再次确认!', ['confirm', 'cancel']).then((res) => {
190
+ if (res=='confirm'){
191
+ if (voicechange=='关闭'){
192
+ this.$androidUtil.setPreference('f_voiceSwitch', "false")
193
+ this.$showMessage('提示音关闭成功!')
194
+ }else{
195
+ this.$androidUtil.setPreference('f_voiceSwitch', "true")
196
+ this.$showMessage('提示音开启成功!')
197
+ }
198
+ }
199
+ })
200
+ },
201
+ outdata(){
202
+ HostApp.backupDatabase()
203
+ this.$showMessage('数据导出成功!')
204
+ },
205
+ //取消自动登录
206
+ cancelAutoLogin(){
207
+ let auto=this.$androidUtil.getPreference('autoLogin')
208
+ if(auto){
209
+ this.$androidUtil.setPreference('autoLogin', false)
210
+ this.$showMessage('已取消自动登录!')
211
+ }else{
212
+ this.$showMessage('当前已处于非自动登录!')
213
+ }
214
+ }
215
+ },
216
+ watch: {
217
+ 'all' (val) {
218
+ if (val) {
219
+ this.modelval = Object.keys(this.fields)
220
+ } else {
221
+ console.log(this.flag)
222
+ if (this.flag){
223
+ this.modelval = []
224
+ }
225
+ }
226
+ this.flag=true
227
+ },
228
+ 'modelval.length' () {
229
+ this.sortModelval()
230
+ }
231
+ }
232
+ }
233
+
234
+ </script>
235
+ <style scoped>
236
+ .flex-between {
237
+ display: flex;
238
+ justify-content: space-between;
239
+ align-items: center;
240
+ }
241
+ .flex-between span {
242
+ padding-right: 10px;
243
+ }
244
+ .flex-full {
245
+ flex: 1;
246
+ }
247
+ .name{
248
+ font: 15px PingFang-SC-Medium;
249
+ color: #666666;
250
+ }
251
+ .imgs{
252
+ width: 35px;
253
+ margin-top: 15px;
254
+ }
255
+ .plan {
256
+ border-bottom: 0.5px solid #EAEAEA;
257
+ border-right: 0.5px solid #EAEAEA;
258
+ height: 120px;
259
+ }
260
+ .manbiankuang{
261
+ width: 44%;
262
+ margin-top: 15px;
263
+ margin-left: 4%;
264
+ border:1px solid #e3e3e3;
265
+ border-radius:10px 10px 10px 10px;
266
+ text-align: center;
267
+ background-color: #ffffff;
268
+ }
269
+ .user{
270
+ border-bottom: 0.5px solid #EAEAEA;
271
+ border-right: 0.5px solid #EAEAEA;
272
+ border-left: 0.5px solid #EAEAEA;
273
+ height: 120px;
274
+ }
275
+ .safecheck{
276
+ border-bottom: 0.5px solid #EAEAEA;
277
+ border-left: 0.5px solid #EAEAEA;
278
+ height: 120px;
279
+ }
280
+ .appointment{
281
+ border-top: 0.5px solid #EAEAEA;
282
+ border-right: 0.5px solid #EAEAEA;
283
+ height: 120px;
284
+ }
285
+ .search{
286
+ border-top: 0.5px solid #EAEAEA;
287
+ border-right: 0.5px solid #EAEAEA;
288
+ border-left: 0.5px solid #EAEAEA;
289
+ height: 120px;
290
+ }
291
+ .upload{
292
+ border-top: 0.5px solid #EAEAEA;
293
+ border-left: 0.5px solid #EAEAEA;
294
+ height: 120px;
295
+ }
296
+
297
+
298
+ </style>
File without changes