safecheck-client 3.0.34-3 → 3.0.34-30
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 +1 -1
- package/src/App-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.vue +55 -0
- package/src/App.vue +31 -31
- package/src/assets/123.png +0 -0
- package/src/assets/f8632d3c8c4c1cb68e99da754cab1a7.png +0 -0
- package/src/components/LoadData.vue +62 -0
- package/src/components/android/AndroidDefectDeal.vue +1 -0
- package/src/components/android/AreaPlan.vue +1 -7
- package/src/components/android/ImgSelfAndroid.vue +181 -181
- package/src/components/android/PaperFeedback.vue +1 -1
- package/src/components/android/PaperFeedbackTemp.vue +1 -1
- package/src/components/android/QRCode/QRCodeBinding.vue +247 -0
- package/src/components/android/QRCode/QRCodePage.vue +199 -0
- package/src/components/android/SafePlanItem.vue +509 -509
- package/src/components/android/SafecheckDevices.vue +1298 -1298
- package/src/components/android/SafecheckDevicesTemp.vue +1 -1
- package/src/components/android/examples/SafeListExamples.vue +95 -0
- package/src/components/android/examples/UserExamples.vue +125 -0
- package/src/components/android/userinfo/SafecheckUserInfo.vue +1 -1
- package/src/components/safecheckNew/android/SafecheckOrderV.vue +2731 -2731
- package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -633
- package/src/filiale/baiyin/android/SafecheckOrderV.vue +2798 -0
- package/src/filiale/baiyin/android.js +1 -0
- package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -485
- package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -1067
- package/src/filiale/baiyin/pc/DefectListNew.vue +597 -597
- package/src/filiale/baiyin/pc/DefectMainNew.vue +63 -63
- package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -1052
- package/src/filiale/baiyin/pc/PaperList.vue +790 -790
- package/src/filiale/baiyin/pc/PlanChooser.vue +167 -167
- package/src/filiale/baiyin/pc/PlanManage.vue +834 -834
- package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -348
- package/src/filiale/baiyin/pc/RoleSelector.vue +160 -160
- package/src/filiale/bayan/android/PaperFeedback.vue +1 -1
- package/src/filiale/bayan/android/SafecheckDevices.vue +1 -1
- package/src/filiale/bayan/android/SafecheckOrderV.vue +1 -1
- package/src/filiale/bayan/android/SafecheckUserInfo.vue +1 -1
- package/src/filiale/dexin/android/SafecheckDevices.vue +1 -1
- package/src/filiale/fugou/pc/CheckBookSearchUser.vue +35 -15
- package/src/filiale/hanzhong/android/PaperFeedback.vue +1 -1
- package/src/filiale/hanzhong/android/SafecheckDevices.vue +1 -1
- package/src/filiale/hanzhong/android/SafecheckUserInfo.vue +1 -1
- package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -0
- package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1231 -0
- package/src/filiale/jiaxian/android/SafecheckDevices.vue +1298 -1298
- package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2811 -0
- package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -0
- package/src/filiale/jiaxian/android.js +14 -10
- package/src/filiale/jiaxian/pc.js +12 -12
- package/src/filiale/jingyang/android/PaperFeedback.vue +1 -1
- package/src/filiale/jingyang/android/SafecheckUserInfo.vue +1 -1
- package/src/filiale/kelai/pc/CheckPlanAreaList.vue +476 -468
- package/src/filiale/pingxiang/android/PaperFeedback.vue +1 -1
- package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1270
- package/src/filiale/qingjian/android/SafecheckDevices.vue +1 -1
- package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2844
- package/src/filiale/qingjian/android/SafecheckUserInfo.vue +1 -1
- package/src/filiale/rongchuang/android/SafecheckOrderV.vue +2696 -2696
- package/src/filiale/shiquan/android/SafecheckDevices.vue +1 -1
- package/src/filiale/siyang/android/SafecheckUserInfo.vue +1 -1
- package/src/filiale/siyang/pc/NewCheckpaper.vue +1938 -1938
- package/src/filiale/siyang/pc/checkUserList.vue +786 -786
- package/src/filiale/siyang/pc.js +16 -16
- package/src/filiale/weinan/android/SafecheckDevices.vue +1307 -1295
- package/src/filiale/weinan/android/SafecheckOrderV.vue +11 -1
- package/src/filiale/weinan/pc/DefectPaperNew.vue +31 -0
- package/src/filiale/wuan/android/SafecheckOrderV.vue +2240 -2240
- package/src/filiale/wuan/android/SafecheckUserInfo.vue +592 -592
- package/src/filiale/yangchunboneng/android/CurrentCreate.vue +8 -11
- package/src/filiale/yangchunboneng/android/DailyworkloadQuery.vue +8 -13
- package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
- package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1 -1
- package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -1235
- package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +2 -2
- package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2845 -2845
- package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +1 -1
- package/src/filiale/yangchunboneng/android/safeHistoryLook.vue +8 -13
- package/src/filiale/yangchunboneng/pc/CheckBookSearchUser.vue +9 -7
- package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +269 -269
- package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1192
- package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +1128 -1128
- package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +972 -972
- package/src/filiale/yangchunboneng/pc/PaperList.vue +773 -773
- package/src/filiale/yongzhou/android/PaperFeedback.vue +1 -1
- package/src/filiale/yongzhou/android/SafecheckDevices.vue +1 -1
- package/src/filiale/yongzhou/android/SafecheckUserInfo.vue +1 -1
- package/src/filiale/yuansheng/android/SwitchValve.vue +322 -322
- package/src/filiale/yuansheng/android.js +17 -17
- package/src/filiale/yunchengminsheng/android/PaperFeedback.vue +1 -1
- package/src/filiale/yunchengminsheng/android/SafecheckDevices.vue +1 -1
- package/src/filiale/yunchengminsheng/android/SafecheckUserInfo.vue +1 -1
- package/src/main-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.js +24 -0
- package/src/main.js +1 -1
- package/src/safecheck-android.js +4 -0
@@ -1,181 +1,181 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<img :src="src" :alt="alt" @click="open()" :width="width" :height="height"title="点击查看图片" :id="'vc-imgself-img-'+attach">
|
4
|
-
<div class="full-img" v-if="show">
|
5
|
-
<div @click="on" draggable="false" >
|
6
|
-
<img :src="src" id="image" alt="" style="width: 100%" class="img-state" :alt="alt || ''">
|
7
|
-
</div>
|
8
|
-
<div class="btns">
|
9
|
-
<button type="button" name="button" class="btn btn-primary" @click="close()" :id="'vc-imgself-close-'+attach">关闭</button>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
</div>
|
13
|
-
</template>
|
14
|
-
|
15
|
-
<script>
|
16
|
-
import $ from 'jquery'
|
17
|
-
|
18
|
-
|
19
|
-
export default {
|
20
|
-
props: {
|
21
|
-
src: {
|
22
|
-
type: String
|
23
|
-
},
|
24
|
-
width: {
|
25
|
-
default: 60
|
26
|
-
},
|
27
|
-
height: {
|
28
|
-
default: 60
|
29
|
-
},
|
30
|
-
alt: {
|
31
|
-
default: '图片加载失败'
|
32
|
-
},
|
33
|
-
attach: {
|
34
|
-
type: String,
|
35
|
-
default: 'name'
|
36
|
-
}
|
37
|
-
},
|
38
|
-
data () {
|
39
|
-
return {
|
40
|
-
show: false,
|
41
|
-
deg: 0,
|
42
|
-
power: 1
|
43
|
-
}
|
44
|
-
},
|
45
|
-
methods: {
|
46
|
-
open () {
|
47
|
-
this.deg = 0
|
48
|
-
this.power = 0.5
|
49
|
-
this.show = true
|
50
|
-
},
|
51
|
-
close () {
|
52
|
-
this.show = false
|
53
|
-
},
|
54
|
-
on(){
|
55
|
-
$(function (){
|
56
|
-
let result = {}
|
57
|
-
var eleImg = document.querySelector('#image');
|
58
|
-
var store = {
|
59
|
-
scale: 1
|
60
|
-
};
|
61
|
-
// 缩放处理
|
62
|
-
eleImg.addEventListener('touchstart', function (event) {
|
63
|
-
var touches = event.touches;
|
64
|
-
var events = touches[0];
|
65
|
-
var events2 = touches[1];
|
66
|
-
|
67
|
-
var x = eleImg.offsetLeft;
|
68
|
-
var y = eleImg.offsetTop;
|
69
|
-
|
70
|
-
if (!events) {
|
71
|
-
return;
|
72
|
-
}
|
73
|
-
event.preventDefault();
|
74
|
-
// 第一个触摸点的坐标
|
75
|
-
store.pageX = events.pageX;
|
76
|
-
store.pageY = events.pageY;
|
77
|
-
store.x = x;
|
78
|
-
store.y = y;
|
79
|
-
store.moveable = true;
|
80
|
-
if (events2) {
|
81
|
-
store.pageX2 = events2.pageX;
|
82
|
-
store.pageY2 = events2.pageY;
|
83
|
-
}
|
84
|
-
store.originScale = store.scale || 1;
|
85
|
-
},{ passive: false });
|
86
|
-
document.addEventListener('touchmove', function (event) {
|
87
|
-
if (!store.moveable) {
|
88
|
-
return;
|
89
|
-
}
|
90
|
-
event.preventDefault();
|
91
|
-
var touches = event.touches;
|
92
|
-
var events = touches[0];
|
93
|
-
var events2 = touches[1];
|
94
|
-
result.textContent = '触摸点数量:' + touches.length;
|
95
|
-
if (events2) {
|
96
|
-
if (!store.pageX2) {
|
97
|
-
store.pageX2 = events2.pageX;
|
98
|
-
}
|
99
|
-
if (!store.pageY2) {
|
100
|
-
store.pageY2 = events2.pageY;
|
101
|
-
}
|
102
|
-
var getDistance = function (start, stop) {
|
103
|
-
return Math.hypot(stop.x - start.x, stop.y - start.y);
|
104
|
-
};
|
105
|
-
var zoom = getDistance({
|
106
|
-
x: events.pageX,
|
107
|
-
y: events.pageY
|
108
|
-
}, {
|
109
|
-
x: events2.pageX,
|
110
|
-
y: events2.pageY
|
111
|
-
}) /
|
112
|
-
getDistance({
|
113
|
-
x: store.pageX,
|
114
|
-
y: store.pageY
|
115
|
-
}, {
|
116
|
-
x: store.pageX2,
|
117
|
-
y: store.pageY2
|
118
|
-
});
|
119
|
-
var newScale = store.originScale * zoom;
|
120
|
-
if (newScale > 4) {
|
121
|
-
newScale = 4;
|
122
|
-
}
|
123
|
-
store.scale = newScale;
|
124
|
-
eleImg.style.transform = 'scale('+ newScale +')';
|
125
|
-
result.textContent = 'zoom: '+ zoom + ', apply scale: ' + newScale;
|
126
|
-
}else{
|
127
|
-
var moveX = events.pageX - store.pageX;
|
128
|
-
var moveY = events.pageY - store.pageY;
|
129
|
-
var imagetop = store.x + moveX;
|
130
|
-
var imageleft = store.y + moveY;
|
131
|
-
eleImg.style.transform = `translate(${imagetop}px, ${imageleft}px) scale(${store.scale})`;
|
132
|
-
}
|
133
|
-
},{ passive: false });
|
134
|
-
|
135
|
-
document.addEventListener('touchend', function () {
|
136
|
-
store.moveable = false;
|
137
|
-
|
138
|
-
delete store.pageX2;
|
139
|
-
delete store.pageY2;
|
140
|
-
},{ passive: false });
|
141
|
-
document.addEventListener('touchcancel', function () {
|
142
|
-
store.moveable = false;
|
143
|
-
delete store.pageX2;
|
144
|
-
delete store.pageY2;
|
145
|
-
},{ passive: false });
|
146
|
-
});
|
147
|
-
}
|
148
|
-
|
149
|
-
},
|
150
|
-
ready(){
|
151
|
-
}
|
152
|
-
}
|
153
|
-
</script>
|
154
|
-
<style media="screen">
|
155
|
-
.full-img {
|
156
|
-
position: fixed;
|
157
|
-
top: 0;
|
158
|
-
bottom: 0;
|
159
|
-
left: 0;
|
160
|
-
right: 0;
|
161
|
-
z-index: 20;
|
162
|
-
background: rgba(0,0,0,0.8);
|
163
|
-
display: flex;
|
164
|
-
overflow: auto;
|
165
|
-
flex-direction: column;
|
166
|
-
justify-content: center;
|
167
|
-
align-items: center;
|
168
|
-
color: #fff;
|
169
|
-
}
|
170
|
-
.btns {
|
171
|
-
position: fixed;
|
172
|
-
bottom: 100px;
|
173
|
-
height: auto;
|
174
|
-
}
|
175
|
-
.btns button {
|
176
|
-
margin-right: 20px;
|
177
|
-
}
|
178
|
-
.img-state {
|
179
|
-
|
180
|
-
}
|
181
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<img :src="src" :alt="alt" @click="open()" :width="width" :height="height"title="点击查看图片" :id="'vc-imgself-img-'+attach">
|
4
|
+
<div class="full-img" v-if="show">
|
5
|
+
<div @click="on" draggable="false" >
|
6
|
+
<img :src="src" id="image" alt="" style="width: 100%" class="img-state" :alt="alt || ''">
|
7
|
+
</div>
|
8
|
+
<div class="btns">
|
9
|
+
<button type="button" name="button" class="btn btn-primary" @click="close()" :id="'vc-imgself-close-'+attach">关闭</button>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</template>
|
14
|
+
|
15
|
+
<script>
|
16
|
+
import $ from 'jquery'
|
17
|
+
|
18
|
+
|
19
|
+
export default {
|
20
|
+
props: {
|
21
|
+
src: {
|
22
|
+
type: String
|
23
|
+
},
|
24
|
+
width: {
|
25
|
+
default: 60
|
26
|
+
},
|
27
|
+
height: {
|
28
|
+
default: 60
|
29
|
+
},
|
30
|
+
alt: {
|
31
|
+
default: '图片加载失败'
|
32
|
+
},
|
33
|
+
attach: {
|
34
|
+
type: String,
|
35
|
+
default: 'name'
|
36
|
+
}
|
37
|
+
},
|
38
|
+
data () {
|
39
|
+
return {
|
40
|
+
show: false,
|
41
|
+
deg: 0,
|
42
|
+
power: 1
|
43
|
+
}
|
44
|
+
},
|
45
|
+
methods: {
|
46
|
+
open () {
|
47
|
+
this.deg = 0
|
48
|
+
this.power = 0.5
|
49
|
+
this.show = true
|
50
|
+
},
|
51
|
+
close () {
|
52
|
+
this.show = false
|
53
|
+
},
|
54
|
+
on(){
|
55
|
+
$(function (){
|
56
|
+
let result = {}
|
57
|
+
var eleImg = document.querySelector('#image');
|
58
|
+
var store = {
|
59
|
+
scale: 1
|
60
|
+
};
|
61
|
+
// 缩放处理
|
62
|
+
eleImg.addEventListener('touchstart', function (event) {
|
63
|
+
var touches = event.touches;
|
64
|
+
var events = touches[0];
|
65
|
+
var events2 = touches[1];
|
66
|
+
|
67
|
+
var x = eleImg.offsetLeft;
|
68
|
+
var y = eleImg.offsetTop;
|
69
|
+
|
70
|
+
if (!events) {
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
event.preventDefault();
|
74
|
+
// 第一个触摸点的坐标
|
75
|
+
store.pageX = events.pageX;
|
76
|
+
store.pageY = events.pageY;
|
77
|
+
store.x = x;
|
78
|
+
store.y = y;
|
79
|
+
store.moveable = true;
|
80
|
+
if (events2) {
|
81
|
+
store.pageX2 = events2.pageX;
|
82
|
+
store.pageY2 = events2.pageY;
|
83
|
+
}
|
84
|
+
store.originScale = store.scale || 1;
|
85
|
+
},{ passive: false });
|
86
|
+
document.addEventListener('touchmove', function (event) {
|
87
|
+
if (!store.moveable) {
|
88
|
+
return;
|
89
|
+
}
|
90
|
+
event.preventDefault();
|
91
|
+
var touches = event.touches;
|
92
|
+
var events = touches[0];
|
93
|
+
var events2 = touches[1];
|
94
|
+
result.textContent = '触摸点数量:' + touches.length;
|
95
|
+
if (events2) {
|
96
|
+
if (!store.pageX2) {
|
97
|
+
store.pageX2 = events2.pageX;
|
98
|
+
}
|
99
|
+
if (!store.pageY2) {
|
100
|
+
store.pageY2 = events2.pageY;
|
101
|
+
}
|
102
|
+
var getDistance = function (start, stop) {
|
103
|
+
return Math.hypot(stop.x - start.x, stop.y - start.y);
|
104
|
+
};
|
105
|
+
var zoom = getDistance({
|
106
|
+
x: events.pageX,
|
107
|
+
y: events.pageY
|
108
|
+
}, {
|
109
|
+
x: events2.pageX,
|
110
|
+
y: events2.pageY
|
111
|
+
}) /
|
112
|
+
getDistance({
|
113
|
+
x: store.pageX,
|
114
|
+
y: store.pageY
|
115
|
+
}, {
|
116
|
+
x: store.pageX2,
|
117
|
+
y: store.pageY2
|
118
|
+
});
|
119
|
+
var newScale = store.originScale * zoom;
|
120
|
+
if (newScale > 4) {
|
121
|
+
newScale = 4;
|
122
|
+
}
|
123
|
+
store.scale = newScale;
|
124
|
+
eleImg.style.transform = 'scale('+ newScale +')';
|
125
|
+
result.textContent = 'zoom: '+ zoom + ', apply scale: ' + newScale;
|
126
|
+
}else{
|
127
|
+
var moveX = events.pageX - store.pageX;
|
128
|
+
var moveY = events.pageY - store.pageY;
|
129
|
+
var imagetop = store.x + moveX;
|
130
|
+
var imageleft = store.y + moveY;
|
131
|
+
eleImg.style.transform = `translate(${imagetop}px, ${imageleft}px) scale(${store.scale})`;
|
132
|
+
}
|
133
|
+
},{ passive: false });
|
134
|
+
|
135
|
+
document.addEventListener('touchend', function () {
|
136
|
+
store.moveable = false;
|
137
|
+
|
138
|
+
delete store.pageX2;
|
139
|
+
delete store.pageY2;
|
140
|
+
},{ passive: false });
|
141
|
+
document.addEventListener('touchcancel', function () {
|
142
|
+
store.moveable = false;
|
143
|
+
delete store.pageX2;
|
144
|
+
delete store.pageY2;
|
145
|
+
},{ passive: false });
|
146
|
+
});
|
147
|
+
}
|
148
|
+
|
149
|
+
},
|
150
|
+
ready(){
|
151
|
+
}
|
152
|
+
}
|
153
|
+
</script>
|
154
|
+
<style media="screen">
|
155
|
+
.full-img {
|
156
|
+
position: fixed;
|
157
|
+
top: 0;
|
158
|
+
bottom: 0;
|
159
|
+
left: 0;
|
160
|
+
right: 0;
|
161
|
+
z-index: 20;
|
162
|
+
background: rgba(0,0,0,0.8);
|
163
|
+
display: flex;
|
164
|
+
overflow: auto;
|
165
|
+
flex-direction: column;
|
166
|
+
justify-content: center;
|
167
|
+
align-items: center;
|
168
|
+
color: #fff;
|
169
|
+
}
|
170
|
+
.btns {
|
171
|
+
position: fixed;
|
172
|
+
bottom: 100px;
|
173
|
+
height: auto;
|
174
|
+
}
|
175
|
+
.btns button {
|
176
|
+
margin-right: 20px;
|
177
|
+
}
|
178
|
+
.img-state {
|
179
|
+
|
180
|
+
}
|
181
|
+
</style>
|
@@ -610,7 +610,6 @@ export default {
|
|
610
610
|
HostApp.__this__ = null
|
611
611
|
},
|
612
612
|
takePic(prop, title, index) {
|
613
|
-
const obj = HostApp.getGpsDetailAddress()
|
614
613
|
HostApp.__callback__ = this.cameraCallBack
|
615
614
|
HostApp.__this__ = this
|
616
615
|
////tag
|
@@ -631,6 +630,7 @@ export default {
|
|
631
630
|
}
|
632
631
|
let jingweidu = ''
|
633
632
|
if (this.$parent.$parent.is_has_jingweidu == 'true'){
|
633
|
+
const obj = HostApp.getGpsDetailAddress()
|
634
634
|
jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
|
635
635
|
}
|
636
636
|
HostApp._open_a_page({
|
@@ -610,7 +610,6 @@
|
|
610
610
|
HostApp.__this__ = null
|
611
611
|
},
|
612
612
|
takePic(prop, title, index) {
|
613
|
-
const obj = HostApp.getGpsDetailAddress()
|
614
613
|
HostApp.__callback__ = this.cameraCallBack
|
615
614
|
HostApp.__this__ = this
|
616
615
|
////tag
|
@@ -631,6 +630,7 @@
|
|
631
630
|
}
|
632
631
|
let jingweidu = ''
|
633
632
|
if (this.$parent.$parent.is_has_jingweidu == 'true'){
|
633
|
+
const obj = HostApp.getGpsDetailAddress()
|
634
634
|
jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
|
635
635
|
}
|
636
636
|
HostApp._open_a_page({
|
@@ -0,0 +1,247 @@
|
|
1
|
+
<template>
|
2
|
+
<div style="height: 100%">
|
3
|
+
<div class="panel auto">
|
4
|
+
<div class="panel-body ">
|
5
|
+
<div class="row auto" style="margin: 5px 0">
|
6
|
+
<label class="righttxt">负责人姓名:</label>
|
7
|
+
<input v-model="bindingData.f_head_name" class="form-control rightipt" type="text"/>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<div class="panel auto">
|
12
|
+
<div class="panel-body ">
|
13
|
+
<div class="row auto" style="margin: 5px 0">
|
14
|
+
<label class="righttxt">负责人职务:</label>
|
15
|
+
<input v-model="bindingData.f_head_post" class="form-control rightipt" type="text"/>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div class="panel auto">
|
20
|
+
<div class="panel-body ">
|
21
|
+
<div class="row auto" style="margin: 5px 0">
|
22
|
+
<label class="righttxt">负责人电话:</label>
|
23
|
+
<input v-model="bindingData.f_head_phone" class="form-control rightipt" type="text"/>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<div class="panel auto">
|
28
|
+
<div class="panel-body ">
|
29
|
+
<div class="row auto" style="margin: 5px 0">
|
30
|
+
<label class="righttxt">绑定类型:</label>
|
31
|
+
<v-select v-model="bindingData.f_type" :options='types' :value.sync="bindingData.f_type" :width="'60%'"
|
32
|
+
class="input-font" clear-button close-on-select placeholder='类型' style="margin-left: 5%;"
|
33
|
+
value-single></v-select>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
<div v-if="bindingData.f_type == '小区'" class="panel auto">
|
38
|
+
<div class="panel-body ">
|
39
|
+
<div class="row auto" style="margin: 5px 0">
|
40
|
+
<label class="righttxt">小区名称:</label>
|
41
|
+
<v-select v-model="bindingData.f_user_name" :options='residentialAreas' :value.sync="bindingData.f_user_name" :width="'60%'"
|
42
|
+
class="input-font" clear-button close-on-select placeholder='小区名称'
|
43
|
+
style="margin-left: 5%;" value-single></v-select>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<div v-if="bindingData.f_type == '用户'" class="panel auto">
|
48
|
+
<div class="panel-body ">
|
49
|
+
<div class="row auto" style="margin: 5px 0">
|
50
|
+
<label class="righttxt">用户名称:</label>
|
51
|
+
<v-select v-model="bindingData.f_user_name" :options='userNames' :value.sync="bindingData.f_user_name" :width="'60%'"
|
52
|
+
class="input-font" clear-button close-on-select placeholder='用户名称'
|
53
|
+
style="margin-left: 5%;"
|
54
|
+
value-single></v-select>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
<div class="panel auto">
|
59
|
+
<div class="panel-body">
|
60
|
+
<label class="row auto text-left col-md-4 col-xs-4">备注</label>
|
61
|
+
<div class="col-md-12 col-sm-12 col-xs-12">
|
62
|
+
<textarea v-model="bindingData.f_comments" class="form-control"></textarea>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
<div class="panel auto">
|
67
|
+
<div class="panel-body ">
|
68
|
+
<div class="row auto" style="margin: 5px 0">
|
69
|
+
<label class="righttxt">图片:</label>
|
70
|
+
<div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
|
71
|
+
<img-self v-if="bindingData.f_head_pic" :src="bindingData.f_head_pic" width="140" height="140"></img-self>
|
72
|
+
<button v-if="!bindingData.f_head_pic" type="button" name="button" class="btn btn-primary" @click="takePictures('com.aofeng.hybrid.android.peripheral.CameraActivity')">拍照</button>
|
73
|
+
<button v-if="!bindingData.f_head_pic" type="button" name="button" class="btn btn-primary" @click="takePictures('com.aofeng.hybrid.android.peripheral.ActionMultiplePickActivity')">相册</button>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
<div class="panel auto">
|
79
|
+
<div class="panel-body">
|
80
|
+
<div style="display: flex;justify-content: center;">
|
81
|
+
<button class="col-sm-3 btn btn-primary" @click="binding()">绑定</button>
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
</template>
|
87
|
+
|
88
|
+
<script>
|
89
|
+
import {HttpResetClass} from 'vue-client'
|
90
|
+
import * as Util from '../../Util'
|
91
|
+
|
92
|
+
|
93
|
+
export default {
|
94
|
+
title: '二维码绑定',
|
95
|
+
data() {
|
96
|
+
return {
|
97
|
+
bindingData: {},
|
98
|
+
residentialAreas: [{label: '请选择', value: ''}],
|
99
|
+
userNames: [{label: '请选择', value: ''}],
|
100
|
+
types: [{label: '请选择', value: ''}, {label: '小区', value: '小区'}, {label: '用户', value: '用户'}]
|
101
|
+
}
|
102
|
+
},
|
103
|
+
props: {
|
104
|
+
row: {
|
105
|
+
type: Object
|
106
|
+
}
|
107
|
+
},
|
108
|
+
methods: {
|
109
|
+
cameraCallBack(prop,fileName) {
|
110
|
+
this.$set('bindingData.f_head_pic',fileName)
|
111
|
+
},
|
112
|
+
takePictures(page){
|
113
|
+
HostApp.__callback__ = this.cameraCallBack
|
114
|
+
HostApp.__this__ = this
|
115
|
+
let prop = 'QRCode'
|
116
|
+
this.fileName = Util.guid() +'.jpg'
|
117
|
+
HostApp._open_a_page({
|
118
|
+
type: 'boomerang',
|
119
|
+
page: page,
|
120
|
+
param: {
|
121
|
+
file: this.fileName,
|
122
|
+
requestCode: 111,
|
123
|
+
callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
|
124
|
+
watermark: ''
|
125
|
+
}
|
126
|
+
})
|
127
|
+
},
|
128
|
+
async binding() {
|
129
|
+
let tableImages = []
|
130
|
+
tableImages.push({
|
131
|
+
path:this.bindingData.f_head_pic
|
132
|
+
})
|
133
|
+
let data = {
|
134
|
+
tableImages: tableImages
|
135
|
+
}
|
136
|
+
HostApp.__this__ = this
|
137
|
+
HostApp.logicWithHint({
|
138
|
+
'logic': 'imagesUploadAndroid', 'callback': 'javascript: HostApp.__this__.commitCallBack()',
|
139
|
+
'data': data, 'backresult': 1
|
140
|
+
})
|
141
|
+
},
|
142
|
+
async commitCallBack(jo) {
|
143
|
+
if (jo.state == 'ok') {
|
144
|
+
const res = JSON.parse(jo.result)
|
145
|
+
let sql = `update t_qr_code set f_head_name = '${this.bindingData.f_head_name}',f_head_post = '${this.bindingData.f_head_post}',f_head_phone = '${this.bindingData.f_head_phone}',f_type = '${this.bindingData.f_type}',f_user_name = '${this.bindingData.f_user_name}',f_userinfo_id = '${this.bindingData.f_userinfo_id}',f_comments = '${this.bindingData.f_comments}',f_head_pic='${res.images[0].imgfileName}' where id = '${this.bindingData.id}'`
|
146
|
+
new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/runSQL`, {data: {sql: sql}}).then(res=>{
|
147
|
+
this.$showMessage('绑定成功')
|
148
|
+
this.$dispatch('confirm')
|
149
|
+
}).catch(e=>{
|
150
|
+
this.$showMessage('绑定失败')
|
151
|
+
})
|
152
|
+
}else {
|
153
|
+
this.$showMessage('图片上传失败')
|
154
|
+
}
|
155
|
+
},
|
156
|
+
},
|
157
|
+
async ready() {
|
158
|
+
this.bindingData = JSON.parse(JSON.stringify(this.row))
|
159
|
+
let residentialArea = await new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
|
160
|
+
data: {
|
161
|
+
items: 'f_residential_area,id',
|
162
|
+
tablename: 't_area',
|
163
|
+
condition: `1=1 and f_residential_area is not null`,
|
164
|
+
orderitem: '1'
|
165
|
+
}
|
166
|
+
})
|
167
|
+
residentialArea.data.forEach(item => {
|
168
|
+
this.residentialAreas.push({label: item.f_residential_area, value: `${item.f_residential_area}:${item.id}`});
|
169
|
+
})
|
170
|
+
let users = await new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
|
171
|
+
data: {
|
172
|
+
items: 'ui.f_user_name,ui.f_userinfo_id',
|
173
|
+
tablename: 't_userinfo ui LEFT JOIN t_userfiles uf on ui.f_userinfo_id = uf.f_userinfo_id',
|
174
|
+
condition: `1=1 and f_user_name is not null and uf.f_user_type = '非民用' and uf.f_table_state in ('正常','停用')`,
|
175
|
+
orderitem: '1'
|
176
|
+
}
|
177
|
+
})
|
178
|
+
users.data.forEach(item => {
|
179
|
+
this.userNames.push({label: item.f_user_name, value: `${item.f_user_name}:${item.f_userinfo_id}`});
|
180
|
+
})
|
181
|
+
}
|
182
|
+
}
|
183
|
+
</script>
|
184
|
+
<style lang="less" scoped>
|
185
|
+
.butt3 {
|
186
|
+
float: right;
|
187
|
+
width: 12px;
|
188
|
+
margin: 1% 2% 0 0;
|
189
|
+
}
|
190
|
+
|
191
|
+
.rightipt {
|
192
|
+
width: 60%;
|
193
|
+
float: left;
|
194
|
+
margin-left: 5%;
|
195
|
+
}
|
196
|
+
|
197
|
+
.righttxt {
|
198
|
+
border: none;
|
199
|
+
margin-left: 5px;
|
200
|
+
/*border-left: 5px solid #A2C2EB;*/
|
201
|
+
float: left;
|
202
|
+
width: 25%;
|
203
|
+
margin-bottom: 3px;
|
204
|
+
text-align: left;
|
205
|
+
word-wrap: break-word;
|
206
|
+
white-space: normal;
|
207
|
+
}
|
208
|
+
|
209
|
+
.spanboder {
|
210
|
+
border-bottom: 2px solid #499edf;
|
211
|
+
padding-bottom: 8px
|
212
|
+
}
|
213
|
+
|
214
|
+
#upuserinfo_sel /deep/ ul {
|
215
|
+
width: 100% !important;
|
216
|
+
left: 0 !important;
|
217
|
+
}
|
218
|
+
|
219
|
+
.btn-photo {
|
220
|
+
border: 0;
|
221
|
+
border-radius: 7px;
|
222
|
+
background-color: #7dc1f4;
|
223
|
+
font: 15px PingFang-SC-Bold;
|
224
|
+
height: 20%;
|
225
|
+
}
|
226
|
+
|
227
|
+
.panel-self {
|
228
|
+
border-radius: 10px;
|
229
|
+
border: 1px solid #499EDF;
|
230
|
+
background-color: #F8F8F8;
|
231
|
+
}
|
232
|
+
|
233
|
+
.div-photo {
|
234
|
+
width: auto;
|
235
|
+
height: auto;
|
236
|
+
/* margin-top: 10px; */
|
237
|
+
position: absolute;
|
238
|
+
bottom: 10px;
|
239
|
+
right: 10px;
|
240
|
+
}
|
241
|
+
</style>
|
242
|
+
<style lang="less">
|
243
|
+
#upuserinfo_sel ul {
|
244
|
+
width: 100% !important;
|
245
|
+
left: 0 !important;
|
246
|
+
}
|
247
|
+
</style>
|