readmeter-changan 1.0.33 → 1.0.34

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 (41) hide show
  1. package/.idea/ReadMeterClient.iml +9 -0
  2. package/.idea/workspace.xml +62 -442
  3. package/.npmignore +7 -0
  4. package/build/dev-server.js +132 -132
  5. package/build/webpack.base.conf.js +75 -75
  6. package/hs_err_pid13284.log +207 -0
  7. package/package.json +1 -1
  8. package/package.json.bak +99 -99
  9. package/src/AndroidPlugin.js +28 -28
  10. package/src/App.vue +74 -74
  11. package/src/components/readingmeter/CheckInfo.vue +618 -618
  12. package/src/components/readingmeter/FinishHandInfo.vue +75 -75
  13. package/src/components/readingmeter/FinishHandInfocopy.vue +99 -99
  14. package/src/components/readingmeter/HandInfo.vue +87 -87
  15. package/src/components/readingmeter/HandMessage.vue +40 -40
  16. package/src/components/readingmeter/HistoryHandInfo.vue +114 -114
  17. package/src/components/readingmeter/MeterInfo.vue +183 -183
  18. package/src/components/readingmeter/PhoneHand.vue +93 -93
  19. package/src/components/readingmeter/PhoneHandHome.vue +2 -0
  20. package/src/components/readingmeter/PhoneHandplanInfo.vue +643 -643
  21. package/src/components/readingmeter/PictureArea.vue +156 -156
  22. package/src/components/readingmeter/PlanDown.vue +232 -232
  23. package/src/components/readingmeter/PlanUpdate.vue +186 -186
  24. package/src/components/readingmeter/ReadMeterCenter.vue +325 -325
  25. package/src/components/readingmeter/ReadMeterInfo.vue +349 -349
  26. package/src/components/readingmeter/ReadMeterInfoChangan.vue +1 -1
  27. package/src/components/readingmeter/SellHistory.vue +36 -36
  28. package/src/components/readingmeter/SellInfo.vue +88 -88
  29. package/src/components/readingmeter/UserInfo.vue +1 -0
  30. package/src/components/server/AppHeader.vue +65 -65
  31. package/src/components/server/ReadMeterHome.vue +192 -192
  32. package/src/components/server/ReadMeterLogin.vue +161 -161
  33. package/src/components/server/ReadMeterNavBottom.vue +119 -119
  34. package/src/components/server/ReadMeterRoute.vue +79 -79
  35. package/src/components/server/ReadMeterTop.vue +61 -61
  36. package/src/components/server/ReadMeterTopcopy.vue +53 -53
  37. package/src/expandcss.less +668 -668
  38. package/src/main.js +23 -23
  39. package/src/readmeter-android.js +34 -34
  40. package/src/readmeter.js +54 -54
  41. package/yarn.lock +7818 -0
@@ -1,156 +1,156 @@
1
- <template>
2
- <div class="auto" style="margin-top: 5px;" >
3
- <div class="panel" style="padding: 10px 10px 5px 10px;">
4
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
5
- <div class="row" style="height: 240px;overflow: scroll;top: 1px">
6
- <div class="col-xs-4 col-sm-3 col-md-2" v-for="img in model">
7
- <img-self :src="getimgstr(img)" alt="抄表照片" :width="150" :height="200"></img-self>
8
- <img src="../../assets/remove.png" @click="remove(img)" class="imgs" style="width: 30px;" alt="">
9
- </div>
10
- </div>
11
- <div class="row text-right div-photo" >
12
- <button type="button" name="button" class="btn btn-photo" @click="takePic()">拍照</button>
13
- </div>
14
- </div>
15
- </div>
16
- </div>
17
- </template>
18
-
19
- <script>
20
- import Vue from 'vue'
21
- import * as Util from '../Util'
22
-
23
- export default {
24
- props: {
25
- // 存放照片的数组
26
- model: {
27
- type: Array
28
- },
29
- show:true
30
- },
31
- data () {
32
- return {
33
- // 拍照时的文件名
34
- fileName: ''
35
- }
36
- },
37
- methods: {
38
- // 从图片中删除
39
- remove (row) {
40
- this.$androidUtil.delfile(row.android_file)
41
- this.model.$remove(this.model.find(t => t.android_file === row.android_file))
42
- // let pos = this.model.findIndex((value) => {
43
- // return value === row
44
- // });
45
- // this.model.splice(pos, 1)
46
- },
47
- // 拍照后,回传参数获取
48
- // self: 调用时的组件
49
- getCallBack() {
50
- if(navigator.userAgent.match('iPad') || navigator.userAgent.match('iPhone')){
51
- let self = window.iosApp.__this__;
52
- window.iosApp.__callback__ = null;
53
- window.iosApp.__this__ = null;
54
- return self;
55
- } else {
56
- let self = HostApp.__this__;
57
- HostApp.__callback__ = null;
58
- HostApp.__this__ = null;
59
- return self;
60
- }
61
- },
62
- // fileName: 回传文件名,传入的带安卓路径url
63
- // prop: 传入的字段名,没做改动
64
- cameraCallBack(prop, fileName) {
65
- alert("callback!!!!!!!!!!!!!!!!!!--start")
66
- // 当前this只能通过HostApp.__tis__获取
67
- let self = this.getCallBack(this)
68
- // 添加新图片
69
- self.model.push({
70
- android_file: self.fileName,
71
- path: fileName
72
- })
73
- alert("callback!!!!!!!!!!!!!!!!!!--end")
74
- },
75
- // 拍照
76
- // self: 进行拍照的组件
77
- androidTakePic(self, callback, fileName) {
78
- if(navigator.userAgent.match('iPad') || navigator.userAgent.match('iPhone')){
79
- window.iosApp.__callback__ = callback;
80
- window.iosApp.__this__ = self;
81
- // prop代表给那个部分进行拍照
82
- let prop = 'handMeter';
83
- let idx = 'aofeng';
84
- let title = '抄表拍照';
85
- // 维修人名称
86
- let name = Vue.user.name;
87
- window.prompt("_open_a_page",JSON.stringify({type: 'boomerang',
88
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
89
- param: {
90
- file: fileName,
91
- requestCode: 111,
92
- callback:'javascript:this.iosApp.__callback__("' + prop +'", "%s");',
93
- watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + name
94
- }
95
- }));
96
- } else {
97
- HostApp.__callback__ = callback;
98
- HostApp.__this__ = self;
99
- // prop代表给那个部分进行拍照
100
- let prop = 'handMeter';
101
- let idx = 'aofeng';
102
- let title = '抄表拍照';
103
- // 维修人名称
104
- let name = Vue.user.name;
105
- HostApp._open_a_page({type: 'boomerang',
106
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
107
- param: {
108
- file: fileName,
109
- requestCode: 111,
110
- callback:'javascript:HostApp.__callback__("' + prop +'", "%s");',
111
- watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + name
112
- }
113
- })
114
- }
115
- },
116
- takePic() {
117
- let prop = 'handMeter'
118
- let idx = 'aofeng'
119
- this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
120
- this.androidTakePic(this, this.cameraCallBack, this.fileName)
121
- },
122
- getimgstr(val){
123
- if(!val){
124
- return ''
125
- }
126
- if(Vue.android){
127
- let path = val.path + '?' + Math.random()
128
- return path
129
- }
130
- this.$showAlert(`照片`, 'danger')
131
- }
132
- },
133
- }
134
- </script>
135
- <style>
136
- .panel-self{
137
- border-radius: 5px;
138
- border:1px solid #c5e1f7;
139
- background-color: #F2F6FA;
140
- }
141
- .btn-photo{
142
- border-radius: 7px;
143
- background-color: #7dc1f4;
144
- color: #FFFFFF;
145
- font: 15px PingFang-SC-Bold;
146
- height: 20%;
147
- }
148
- .div-photo{
149
- width: auto;
150
- height: auto;
151
- /* margin-top: 10px; */
152
- position: absolute;
153
- bottom: 10px;
154
- right: 10px;
155
- }
156
- </style>
1
+ <template>
2
+ <div class="auto" style="margin-top: 5px;" >
3
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
4
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
5
+ <div class="row" style="height: 240px;overflow: scroll;top: 1px">
6
+ <div class="col-xs-4 col-sm-3 col-md-2" v-for="img in model">
7
+ <img-self :src="getimgstr(img)" alt="抄表照片" :width="150" :height="200"></img-self>
8
+ <img src="../../assets/remove.png" @click="remove(img)" class="imgs" style="width: 30px;" alt="">
9
+ </div>
10
+ </div>
11
+ <div class="row text-right div-photo" >
12
+ <button type="button" name="button" class="btn btn-photo" @click="takePic()">拍照</button>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <script>
20
+ import Vue from 'vue'
21
+ import * as Util from '../Util'
22
+
23
+ export default {
24
+ props: {
25
+ // 存放照片的数组
26
+ model: {
27
+ type: Array
28
+ },
29
+ show:true
30
+ },
31
+ data () {
32
+ return {
33
+ // 拍照时的文件名
34
+ fileName: ''
35
+ }
36
+ },
37
+ methods: {
38
+ // 从图片中删除
39
+ remove (row) {
40
+ this.$androidUtil.delfile(row.android_file)
41
+ this.model.$remove(this.model.find(t => t.android_file === row.android_file))
42
+ // let pos = this.model.findIndex((value) => {
43
+ // return value === row
44
+ // });
45
+ // this.model.splice(pos, 1)
46
+ },
47
+ // 拍照后,回传参数获取
48
+ // self: 调用时的组件
49
+ getCallBack() {
50
+ if(navigator.userAgent.match('iPad') || navigator.userAgent.match('iPhone')){
51
+ let self = window.iosApp.__this__;
52
+ window.iosApp.__callback__ = null;
53
+ window.iosApp.__this__ = null;
54
+ return self;
55
+ } else {
56
+ let self = HostApp.__this__;
57
+ HostApp.__callback__ = null;
58
+ HostApp.__this__ = null;
59
+ return self;
60
+ }
61
+ },
62
+ // fileName: 回传文件名,传入的带安卓路径url
63
+ // prop: 传入的字段名,没做改动
64
+ cameraCallBack(prop, fileName) {
65
+ alert("callback!!!!!!!!!!!!!!!!!!--start")
66
+ // 当前this只能通过HostApp.__tis__获取
67
+ let self = this.getCallBack(this)
68
+ // 添加新图片
69
+ self.model.push({
70
+ android_file: self.fileName,
71
+ path: fileName
72
+ })
73
+ alert("callback!!!!!!!!!!!!!!!!!!--end")
74
+ },
75
+ // 拍照
76
+ // self: 进行拍照的组件
77
+ androidTakePic(self, callback, fileName) {
78
+ if(navigator.userAgent.match('iPad') || navigator.userAgent.match('iPhone')){
79
+ window.iosApp.__callback__ = callback;
80
+ window.iosApp.__this__ = self;
81
+ // prop代表给那个部分进行拍照
82
+ let prop = 'handMeter';
83
+ let idx = 'aofeng';
84
+ let title = '抄表拍照';
85
+ // 维修人名称
86
+ let name = Vue.user.name;
87
+ window.prompt("_open_a_page",JSON.stringify({type: 'boomerang',
88
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
89
+ param: {
90
+ file: fileName,
91
+ requestCode: 111,
92
+ callback:'javascript:this.iosApp.__callback__("' + prop +'", "%s");',
93
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + name
94
+ }
95
+ }));
96
+ } else {
97
+ HostApp.__callback__ = callback;
98
+ HostApp.__this__ = self;
99
+ // prop代表给那个部分进行拍照
100
+ let prop = 'handMeter';
101
+ let idx = 'aofeng';
102
+ let title = '抄表拍照';
103
+ // 维修人名称
104
+ let name = Vue.user.name;
105
+ HostApp._open_a_page({type: 'boomerang',
106
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
107
+ param: {
108
+ file: fileName,
109
+ requestCode: 111,
110
+ callback:'javascript:HostApp.__callback__("' + prop +'", "%s");',
111
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + name
112
+ }
113
+ })
114
+ }
115
+ },
116
+ takePic() {
117
+ let prop = 'handMeter'
118
+ let idx = 'aofeng'
119
+ this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
120
+ this.androidTakePic(this, this.cameraCallBack, this.fileName)
121
+ },
122
+ getimgstr(val){
123
+ if(!val){
124
+ return ''
125
+ }
126
+ if(Vue.android){
127
+ let path = val.path + '?' + Math.random()
128
+ return path
129
+ }
130
+ this.$showAlert(`照片`, 'danger')
131
+ }
132
+ },
133
+ }
134
+ </script>
135
+ <style>
136
+ .panel-self{
137
+ border-radius: 5px;
138
+ border:1px solid #c5e1f7;
139
+ background-color: #F2F6FA;
140
+ }
141
+ .btn-photo{
142
+ border-radius: 7px;
143
+ background-color: #7dc1f4;
144
+ color: #FFFFFF;
145
+ font: 15px PingFang-SC-Bold;
146
+ height: 20%;
147
+ }
148
+ .div-photo{
149
+ width: auto;
150
+ height: auto;
151
+ /* margin-top: 10px; */
152
+ position: absolute;
153
+ bottom: 10px;
154
+ right: 10px;
155
+ }
156
+ </style>