system-phone 1.2.80-socket-13 → 1.2.80-socket-14

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.80-socket-13",
3
+ "version": "1.2.80-socket-14",
4
4
  "description": "手机模块 前端组件",
5
5
  "author": "何宁社 <524395609@qq.com>",
6
6
  "license": "ISC",
@@ -1,290 +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
- 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>
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>
@@ -1,90 +1,97 @@
1
- import Vue from 'vue'
2
-
3
- let GetAppDataService = {
4
- install(Vue, options) {
5
- // 给vue增添对话框显示方法
6
- Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
7
- },
8
-
9
- // 开启卡监听
10
- load () {
11
- let result = Vue.androidUtil.bzLogic('httpGetInitData', {url: `${Vue.androidUtil.getProxyUrl()}/rs/logic/getInitData`, data: {f_filialeids: Vue.user.orgid}})
12
- console.log('system加载参数')
13
- console.log(JSON.stringify(result))
14
- result.data.singleValues.forEach((item) => {
15
- this.singleValues[item.name] = item.value
16
- })
17
- result.data.params.forEach((item) => {
18
- let value = []
19
- item.f_paramvalues.forEach((item, index) => {
20
- value[index] = {}
21
- value[index].label = item.name
22
- value[index].value = item.name
23
- })
24
- this.params[item.name] = value
25
- })
26
- // if (result.data.saleParams) {
27
- // this.saleParams = JSON.parse(result.data.saleParams)
28
- // }
29
- // if (result.data.safeCheckParams) {
30
- // this.safeCheckParams = JSON.parse(result.data.safeCheckParams)
31
- // }
32
- let getParams = Vue.androidUtil.bzLogic('httpGetInitData', {url: `${Vue.androidUtil.getProxyUrl()}/rs/logic/getSaleInitData`,data: {f_orgid: Vue.user.orgid}})
33
- console.log('获取营收参数')
34
- console.log(JSON.stringify(getParams))
35
- if (getParams.data) {
36
- getParams.data.gasbrands.forEach((item, index) => {
37
- this.saleParams.gasbrands[index] = {}
38
- this.saleParams.gasbrands[index].label = item.f_meter_brand
39
- this.saleParams.gasbrands[index].value = item.f_meter_brand
40
- let gasmodel = []
41
- item.gasmodel.forEach((item, index) => {
42
- gasmodel[index] = {}
43
- gasmodel[index].label = item.f_meter_style
44
- gasmodel[index].value = item.f_meter_style
45
- })
46
- this.params[item.f_meter_brand] = gasmodel
47
- })
48
- }
49
- /*return Vue.resetpost(`${Vue.androidUtil.getProxyUrl()}/rs/logic/getInitData`, {data: {f_filialeids: Vue.user.f_orgids}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
50
- console.log('system加载参数', res)
51
- res.data.singleValues.forEach((item) => {
52
- this.singleValues[item.name] = item.value
53
- })
54
- res.data.params.forEach((item) => {
55
- let value = []
56
- item.f_paramvalues.forEach((item, index) => {
57
- value[index] = {}
58
- value[index].label = item.name
59
- value[index].value = item.name
60
- })
61
- this.params[item.name] = value
62
- })
63
- if (res.data.saleParams) {
64
- this.saleParams = JSON.parse(res.data.saleParams)
65
- }
66
- if (res.data.safeCheckParams) {
67
- this.safeCheckParams = JSON.parse(res.data.safeCheckParams)
68
- }
69
- })*/
70
- },
71
-
72
- params: {},
73
- singleValues: {},
74
-
75
- // 营收模块参数
76
- saleParams: {
77
- gasbrands:[]
78
- },
79
-
80
- // 安检模块参数
81
- safeCheckParams: {},
82
-
83
- getParam(key) {
84
- return this.params[key]
85
- },
86
- getSingleValue(key) {
87
- return this.singleValues[key]
88
- }
89
- }
90
- export default GetAppDataService
1
+ import Vue from 'vue'
2
+ import {HttpResetClass} from "vue-client";
3
+
4
+ let GetAppDataService = {
5
+ install(Vue, options) {
6
+ // 给vue增添对话框显示方法
7
+ Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
8
+ },
9
+
10
+ // 开启卡监听
11
+ async load() {
12
+ let result = await new HttpResetClass().load('POST', `${Vue.androidUtil.getProxyUrl()}/rs/logic/getInitData`, {data: {f_filialeids: Vue.user.orgid}}, {
13
+ resolveMsg: null,
14
+ rejectMsg: null
15
+ })
16
+ console.log('system加载参数')
17
+ console.log(JSON.stringify(result))
18
+ result.data.singleValues.forEach((item) => {
19
+ this.singleValues[item.name] = item.value
20
+ })
21
+ result.data.params.forEach((item) => {
22
+ let value = []
23
+ item.f_paramvalues.forEach((item, index) => {
24
+ value[index] = {}
25
+ value[index].label = item.name
26
+ value[index].value = item.name
27
+ })
28
+ this.params[item.name] = value
29
+ })
30
+ // if (result.data.saleParams) {
31
+ // this.saleParams = JSON.parse(result.data.saleParams)
32
+ // }
33
+ // if (result.data.safeCheckParams) {
34
+ // this.safeCheckParams = JSON.parse(result.data.safeCheckParams)
35
+ // }
36
+ let getParams = await new HttpResetClass().load('POST', `${Vue.androidUtil.getProxyUrl()}/rs/logic/getSaleInitData`, {data: {f_orgid: Vue.user.orgid}}, {
37
+ resolveMsg: null,
38
+ rejectMsg: null
39
+ })
40
+ console.log('获取营收参数')
41
+ console.log(JSON.stringify(getParams))
42
+ if (getParams.data) {
43
+ getParams.data.gasbrands.forEach((item, index) => {
44
+ this.saleParams.gasbrands[index] = {}
45
+ this.saleParams.gasbrands[index].label = item.f_meter_brand
46
+ this.saleParams.gasbrands[index].value = item.f_meter_brand
47
+ let gasmodel = []
48
+ item.gasmodel.forEach((item, index) => {
49
+ gasmodel[index] = {}
50
+ gasmodel[index].label = item.f_meter_style
51
+ gasmodel[index].value = item.f_meter_style
52
+ })
53
+ this.params[item.f_meter_brand] = gasmodel
54
+ })
55
+ }
56
+ /*return Vue.resetpost(`${Vue.androidUtil.getProxyUrl()}/rs/logic/getInitData`, {data: {f_filialeids: Vue.user.f_orgids}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
57
+ console.log('system加载参数', res)
58
+ res.data.singleValues.forEach((item) => {
59
+ this.singleValues[item.name] = item.value
60
+ })
61
+ res.data.params.forEach((item) => {
62
+ let value = []
63
+ item.f_paramvalues.forEach((item, index) => {
64
+ value[index] = {}
65
+ value[index].label = item.name
66
+ value[index].value = item.name
67
+ })
68
+ this.params[item.name] = value
69
+ })
70
+ if (res.data.saleParams) {
71
+ this.saleParams = JSON.parse(res.data.saleParams)
72
+ }
73
+ if (res.data.safeCheckParams) {
74
+ this.safeCheckParams = JSON.parse(res.data.safeCheckParams)
75
+ }
76
+ })*/
77
+ },
78
+
79
+ params: {},
80
+ singleValues: {},
81
+
82
+ // 营收模块参数
83
+ saleParams: {
84
+ gasbrands:[]
85
+ },
86
+
87
+ // 安检模块参数
88
+ safeCheckParams: {},
89
+
90
+ getParam(key) {
91
+ return this.params[key]
92
+ },
93
+ getSingleValue(key) {
94
+ return this.singleValues[key]
95
+ }
96
+ }
97
+ export default GetAppDataService
File without changes
File without changes
Binary file