safecheck-client 3.0.34-45 → 3.0.34-47
Sign up to get free protection for your applications and to get access to all the features.
- package/.babelrc +5 -5
- package/.editorconfig +9 -9
- package/android.html +18 -18
- package/config/dev.env.js +6 -6
- package/config/index.js +38 -38
- package/config/prod.env.js +3 -3
- package/config/test.env.js +6 -6
- package/docs/AppBase.md +22 -22
- package/docs/Busy.md +14 -14
- package/docs/CriteriaPaged.md +47 -47
- package/docs/DataGrid.md +54 -54
- package/docs/DataModel.md +22 -22
- package/docs/Dynamic.md +42 -42
- package/docs/GetParams.md +11 -11
- package/docs/HttpBusy.md +13 -13
- package/docs/HttpStore.md +29 -29
- package/docs/MessageBox.md +28 -28
- package/docs/PagedList.md +29 -29
- package/docs/Pager.md +21 -21
- package/docs/Project.md +23 -23
- package/docs/Route.md +105 -105
- package/docs/SafetyCheck/AdjustPlan.md +13 -13
- package/docs/SafetyCheck/CheckerPlan.md +12 -12
- package/docs/Task.md +46 -46
- package/docs/TreeList.md +28 -28
- package/docs/TreeMixin.md +18 -18
- package/docs/all.md +10 -10
- package/docs/list.md +42 -42
- package/docs/partial.md +75 -75
- package/docs/selector.md +82 -82
- package/docs//345/274/200/345/217/221/346/226/207/346/241/243/Snippets.md +28 -28
- package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue-strap/345/217/230/346/233/264/350/256/260/345/275/225.md +7 -7
- package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue/345/217/230/346/233/264/350/256/260/345/275/225.md +13 -13
- package/docs//345/274/200/345/217/221/346/226/207/346/241/243//345/274/200/345/217/221/347/216/257/345/242/203/350/256/276/347/275/256.md +77 -77
- package/docs//347/225/214/351/235/242/345/210/266/344/275/234/350/247/204/350/214/203.md +54 -54
- package/examples/AddressList/App.vue +13 -13
- package/examples/AddressList/index.html +11 -11
- package/examples/DispatchList/App.vue +10 -10
- package/examples/DispatchList/BaseTree.vue +13 -13
- package/examples/DispatchList/Init.vue +22 -22
- package/examples/DispatchList/Test.vue +20 -20
- package/examples/DispatchList/index.html +11 -11
- package/examples/DispatchList/main.js +18 -18
- package/home.html +16 -16
- package/package.json +1 -1
- package/publish.bat +7 -7
- package/release.bat +5 -5
- package/src/Widget.vue +13 -13
- package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
- package/src/android-bootstrap/less/.csscomb.json +304 -304
- package/src/android-bootstrap/less/.csslintrc +19 -19
- package/src/android-bootstrap/less/alerts.less +73 -73
- package/src/android-bootstrap/less/badges.less +66 -66
- package/src/android-bootstrap/less/bootstrap.less +56 -56
- package/src/android-bootstrap/less/breadcrumbs.less +26 -26
- package/src/android-bootstrap/less/button-groups.less +247 -247
- package/src/android-bootstrap/less/buttons.less +173 -173
- package/src/android-bootstrap/less/carousel.less +269 -269
- package/src/android-bootstrap/less/close.less +34 -34
- package/src/android-bootstrap/less/code.less +69 -69
- package/src/android-bootstrap/less/component-animations.less +33 -33
- package/src/android-bootstrap/less/grid.less +84 -84
- package/src/android-bootstrap/less/input-groups.less +167 -167
- package/src/android-bootstrap/less/jumbotron.less +52 -52
- package/src/android-bootstrap/less/labels.less +64 -64
- package/src/android-bootstrap/less/list-group.less +141 -141
- package/src/android-bootstrap/less/media.less +66 -66
- package/src/android-bootstrap/less/mixins/alerts.less +14 -14
- package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
- package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
- package/src/android-bootstrap/less/mixins/buttons.less +69 -69
- package/src/android-bootstrap/less/mixins/center-block.less +7 -7
- package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
- package/src/android-bootstrap/less/mixins/forms.less +90 -90
- package/src/android-bootstrap/less/mixins/gradients.less +59 -59
- package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
- package/src/android-bootstrap/less/mixins/grid.less +122 -122
- package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
- package/src/android-bootstrap/less/mixins/image.less +33 -33
- package/src/android-bootstrap/less/mixins/labels.less +12 -12
- package/src/android-bootstrap/less/mixins/list-group.less +30 -30
- package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
- package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
- package/src/android-bootstrap/less/mixins/opacity.less +8 -8
- package/src/android-bootstrap/less/mixins/pagination.less +24 -24
- package/src/android-bootstrap/less/mixins/panels.less +24 -24
- package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
- package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
- package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
- package/src/android-bootstrap/less/mixins/resize.less +6 -6
- package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
- package/src/android-bootstrap/less/mixins/size.less +10 -10
- package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
- package/src/android-bootstrap/less/mixins/table-row.less +44 -44
- package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
- package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
- package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
- package/src/android-bootstrap/less/mixins.less +40 -40
- package/src/android-bootstrap/less/modals.less +151 -151
- package/src/android-bootstrap/less/navbar.less +660 -660
- package/src/android-bootstrap/less/navs.less +290 -290
- package/src/android-bootstrap/less/normalize.less +424 -424
- package/src/android-bootstrap/less/pager.less +76 -76
- package/src/android-bootstrap/less/pagination.less +89 -89
- package/src/android-bootstrap/less/panels.less +274 -274
- package/src/android-bootstrap/less/popovers.less +131 -131
- package/src/android-bootstrap/less/print.less +101 -101
- package/src/android-bootstrap/less/progress-bars.less +87 -87
- package/src/android-bootstrap/less/responsive-embed.less +35 -35
- package/src/android-bootstrap/less/responsive-utilities.less +194 -194
- package/src/android-bootstrap/less/scaffolding.less +161 -161
- package/src/android-bootstrap/less/tables.less +262 -262
- package/src/android-bootstrap/less/theme.less +291 -291
- package/src/android-bootstrap/less/thumbnails.less +36 -36
- package/src/android-bootstrap/less/tooltip.less +102 -102
- package/src/android-bootstrap/less/type.less +303 -303
- package/src/android-bootstrap/less/utilities.less +55 -55
- package/src/android-bootstrap/less/variables.less +896 -896
- package/src/android-bootstrap/less/wells.less +29 -29
- package/src/androidTest.js +20 -20
- package/src/bootstrap/less/.csscomb.json +304 -304
- package/src/bootstrap/less/.csslintrc +19 -19
- package/src/bootstrap/less/alerts.less +73 -73
- package/src/bootstrap/less/badges.less +66 -66
- package/src/bootstrap/less/breadcrumbs.less +26 -26
- package/src/bootstrap/less/button-groups.less +247 -247
- package/src/bootstrap/less/buttons.less +172 -172
- package/src/bootstrap/less/carousel.less +269 -269
- package/src/bootstrap/less/close.less +34 -34
- package/src/bootstrap/less/code.less +69 -69
- package/src/bootstrap/less/component-animations.less +33 -33
- package/src/bootstrap/less/dropdowns.less +216 -216
- package/src/bootstrap/less/forms.less +626 -626
- package/src/bootstrap/less/grid.less +84 -84
- package/src/bootstrap/less/input-groups.less +167 -167
- package/src/bootstrap/less/jumbotron.less +52 -52
- package/src/bootstrap/less/labels.less +64 -64
- package/src/bootstrap/less/list-group.less +141 -141
- package/src/bootstrap/less/media.less +66 -66
- package/src/bootstrap/less/mixins/alerts.less +14 -14
- package/src/bootstrap/less/mixins/background-variant.less +9 -9
- package/src/bootstrap/less/mixins/border-radius.less +18 -18
- package/src/bootstrap/less/mixins/buttons.less +69 -69
- package/src/bootstrap/less/mixins/center-block.less +7 -7
- package/src/bootstrap/less/mixins/clearfix.less +22 -22
- package/src/bootstrap/less/mixins/forms.less +90 -90
- package/src/bootstrap/less/mixins/gradients.less +59 -59
- package/src/bootstrap/less/mixins/grid-framework.less +92 -92
- package/src/bootstrap/less/mixins/grid.less +122 -122
- package/src/bootstrap/less/mixins/hide-text.less +21 -21
- package/src/bootstrap/less/mixins/image.less +33 -33
- package/src/bootstrap/less/mixins/labels.less +12 -12
- package/src/bootstrap/less/mixins/list-group.less +30 -30
- package/src/bootstrap/less/mixins/nav-divider.less +10 -10
- package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
- package/src/bootstrap/less/mixins/opacity.less +8 -8
- package/src/bootstrap/less/mixins/pagination.less +24 -24
- package/src/bootstrap/less/mixins/panels.less +24 -24
- package/src/bootstrap/less/mixins/progress-bar.less +10 -10
- package/src/bootstrap/less/mixins/reset-filter.less +8 -8
- package/src/bootstrap/less/mixins/reset-text.less +18 -18
- package/src/bootstrap/less/mixins/resize.less +6 -6
- package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
- package/src/bootstrap/less/mixins/size.less +10 -10
- package/src/bootstrap/less/mixins/tab-focus.less +9 -9
- package/src/bootstrap/less/mixins/table-row.less +44 -44
- package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
- package/src/bootstrap/less/mixins/text-overflow.less +8 -8
- package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
- package/src/bootstrap/less/mixins.less +40 -40
- package/src/bootstrap/less/modals.less +151 -151
- package/src/bootstrap/less/navbar.less +660 -660
- package/src/bootstrap/less/normalize.less +424 -424
- package/src/bootstrap/less/pager.less +76 -76
- package/src/bootstrap/less/pagination.less +89 -89
- package/src/bootstrap/less/panels.less +275 -275
- package/src/bootstrap/less/popovers.less +131 -131
- package/src/bootstrap/less/print.less +101 -101
- package/src/bootstrap/less/progress-bars.less +87 -87
- package/src/bootstrap/less/responsive-embed.less +35 -35
- package/src/bootstrap/less/responsive-utilities.less +194 -194
- package/src/bootstrap/less/scaffolding.less +161 -161
- package/src/bootstrap/less/theme.less +291 -291
- package/src/bootstrap/less/thumbnails.less +36 -36
- package/src/bootstrap/less/tooltip.less +102 -102
- package/src/bootstrap/less/type.less +303 -303
- package/src/bootstrap/less/utilities.less +55 -55
- package/src/bootstrap/less/wells.less +29 -29
- package/src/components/FileUpload.vue +696 -696
- package/src/components/Hello.vue +39 -39
- package/src/components/LeftTree.vue +27 -27
- package/src/components/android/AddressList.vue +61 -61
- package/src/components/android/AttendanceTally.vue +116 -116
- package/src/components/android/Blank.vue +10 -10
- package/src/components/android/CheckUnplanPage.vue +56 -56
- package/src/components/android/Checker.vue +12 -12
- package/src/components/android/CheckerAnnual.vue +81 -81
- package/src/components/android/CheckerAvarta.vue +82 -82
- package/src/components/android/EquipmentInspection.vue +348 -348
- package/src/components/android/FootprintMap.vue +120 -120
- package/src/components/android/HiddentroubleInvestigation.vue +192 -192
- package/src/components/android/MasterMain.vue +77 -77
- package/src/components/android/Menu.vue +132 -132
- package/src/components/android/NavBottom.vue +157 -157
- package/src/components/android/PaperAlarm.vue +85 -85
- package/src/components/android/PaperDeviceNoncivil.vue +214 -214
- package/src/components/android/PlumberAnnual.vue +83 -83
- package/src/components/android/PlumberAnnualDetail.vue +65 -65
- package/src/components/android/PlumberMonthly.vue +84 -84
- package/src/components/android/PostMap.vue +83 -83
- package/src/components/android/QRCode/QRCodeBinding.vue +290 -290
- package/src/components/android/QRCode/QRCodePage.vue +212 -212
- package/src/components/android/QueryCheckHistory.vue +122 -122
- package/src/components/android/QueryCheckHistoryItem.vue +62 -62
- package/src/components/android/RepairMain.vue +60 -60
- package/src/components/android/Repairman.vue +12 -12
- package/src/components/android/StationMaster.vue +12 -12
- package/src/components/defects/DefectModal.vue +101 -101
- package/src/components/defects/DevicesAndItem.vue +39 -39
- package/src/components/issueplan/IssuePlanMain.vue +23 -23
- package/src/components/notice/NoticeForm.vue +100 -100
- package/src/components/notice/NoticeIssue.vue +20 -20
- package/src/components/paper/PicViewer.vue +18 -18
- package/src/components/phonestate/MonthlyTraffic.vue +66 -66
- package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
- package/src/components/phonestate/PostMap.vue +82 -82
- package/src/components/querycheckpaper/PaperItem.vue +59 -59
- package/src/components/userfile/MeterFile.vue +145 -145
- package/src/components/userfile/MeterModify.vue +46 -46
- package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
- package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1060 -1060
- package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +720 -722
- package/src/filiale/weinan/pc/checkUserList.vue +34 -113
- package/src/plugins/LoadData.js +10 -10
- package/src/plugins/LoadParams.js +24 -24
- package/src/stores/wxconfig.js +10 -10
- package/src/utils/getNowDate.js +33 -33
- package/test/e2e/custom-assertions/elementCount.js +26 -26
- package/test/e2e/nightwatch.conf.js +40 -40
- package/test/e2e/runner.js +30 -30
- package/test/e2e/specs/test.js +13 -13
- package/test/unit/.eslintrc +5 -5
- package/test/unit/TestUtil.js +62 -62
- package/test/unit/context.html +20 -20
- package/test/unit/index.js +13 -13
@@ -1,290 +1,290 @@
|
|
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" style="width: 30%;">负责人姓名:</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" style="width: 30%;">负责人职务:</label>
|
15
|
-
<v-select v-model="bindingData.f_head_post" :options='headPostTypes' :value.sync="bindingData.f_head_post" :width="'60%'"
|
16
|
-
class="input-font" clear-button close-on-select placeholder='类型' style="margin-left: 5%;"
|
17
|
-
value-single></v-select>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
<div class="panel auto">
|
22
|
-
<div class="panel-body ">
|
23
|
-
<div class="row auto" style="margin: 5px 0">
|
24
|
-
<label class="righttxt" style="width: 30%;">负责人电话:</label>
|
25
|
-
<input v-model="bindingData.f_head_phone" class="form-control rightipt" type="text"/>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
<div class="panel auto">
|
30
|
-
<div class="panel-body ">
|
31
|
-
<div class="row auto" style="margin: 5px 0">
|
32
|
-
<label class="righttxt" style="width: 30%;">绑定类型:</label>
|
33
|
-
<v-select v-model="bindingData.f_type" :options='types' :value.sync="bindingData.f_type" :width="'60%'"
|
34
|
-
class="input-font" clear-button close-on-select placeholder='类型' style="margin-left: 5%;"
|
35
|
-
value-single></v-select>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
<div v-if="bindingData.f_type == '小区'" class="panel auto">
|
40
|
-
<div class="panel-body ">
|
41
|
-
<div class="row auto" style="margin: 5px 0">
|
42
|
-
<label class="righttxt" style="width: 30%;">小区名称:</label>
|
43
|
-
<v-select v-model="bindingData.f_userinfo" :options='residentialAreas' :value.sync="bindingData.f_userinfo" :width="'60%'"
|
44
|
-
class="input-font" clear-button close-on-select placeholder='小区名称'
|
45
|
-
style="margin-left: 5%;" value-single></v-select>
|
46
|
-
</div>
|
47
|
-
</div>
|
48
|
-
</div>
|
49
|
-
<div v-if="bindingData.f_type == '用户'" class="panel auto">
|
50
|
-
<div class="panel-body ">
|
51
|
-
<div class="row auto" style="margin: 5px 0">
|
52
|
-
<label class="righttxt" style="width: 30%;">用户名称:</label>
|
53
|
-
<v-select v-model="bindingData.f_userinfo" :options='userNames' :value.sync="bindingData.f_userinfo" :width="'60%'"
|
54
|
-
class="input-font" clear-button close-on-select placeholder='用户名称' @select-search="refreshUser"
|
55
|
-
style="margin-left: 5%;" menu-mode="align-button"
|
56
|
-
value-single></v-select>
|
57
|
-
</div>
|
58
|
-
</div>
|
59
|
-
</div>
|
60
|
-
<div class="panel auto">
|
61
|
-
<div class="panel-body">
|
62
|
-
<label class="row auto text-left col-md-4 col-xs-4">备注</label>
|
63
|
-
<div class="col-md-12 col-sm-12 col-xs-12">
|
64
|
-
<textarea v-model="bindingData.f_comments" class="form-control"></textarea>
|
65
|
-
</div>
|
66
|
-
</div>
|
67
|
-
</div>
|
68
|
-
<div class="panel auto">
|
69
|
-
<div class="panel-body ">
|
70
|
-
<div class="row auto" style="margin: 5px 0">
|
71
|
-
<label class="righttxt">图片:</label>
|
72
|
-
<div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
|
73
|
-
<img-self v-if="bindingData.f_head_pic" :src="bindingData.f_head_pic" width="140" height="140"></img-self>
|
74
|
-
<button v-if="!bindingData.f_head_pic" type="button" name="button" class="btn btn-primary" @click="takePictures('com.aofeng.hybrid.android.peripheral.CameraActivity')">拍照</button>
|
75
|
-
<button v-if="!bindingData.f_head_pic" type="button" name="button" class="btn btn-primary" @click="takePictures('com.aofeng.hybrid.android.peripheral.ActionMultiplePickActivity')">相册</button>
|
76
|
-
</div>
|
77
|
-
</div>
|
78
|
-
</div>
|
79
|
-
</div>
|
80
|
-
<div class="panel auto">
|
81
|
-
<div class="panel-body">
|
82
|
-
<div style="display: flex;justify-content: center;">
|
83
|
-
<button class="col-sm-3 btn btn-primary" @click="binding()">绑定</button>
|
84
|
-
</div>
|
85
|
-
</div>
|
86
|
-
</div>
|
87
|
-
</div>
|
88
|
-
</template>
|
89
|
-
|
90
|
-
<script>
|
91
|
-
import {HttpResetClass} from 'vue-client'
|
92
|
-
import * as Util from '../../Util'
|
93
|
-
|
94
|
-
|
95
|
-
export default {
|
96
|
-
title: '二维码绑定',
|
97
|
-
data() {
|
98
|
-
return {
|
99
|
-
bindingData: {},
|
100
|
-
residentialAreas: [{label: '请选择', value: ''}],
|
101
|
-
userNames: [{label: '请选择', value: ''}],
|
102
|
-
headPostTypes:[{label: '请选择', value: ''} ,...this.$appdata.getParam('负责人职务')],
|
103
|
-
types: [{label: '请选择', value: ''}, {label: '小区', value: '小区'}, {label: '用户', value: '用户'}]
|
104
|
-
}
|
105
|
-
},
|
106
|
-
props: {
|
107
|
-
row: {
|
108
|
-
type: Object
|
109
|
-
}
|
110
|
-
},
|
111
|
-
methods: {
|
112
|
-
async fetchUsers(condition) {
|
113
|
-
try {
|
114
|
-
const response = await new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
|
115
|
-
data: {
|
116
|
-
items: 'ui.f_user_name,ui.f_userinfo_id,ui.f_userinfo_code',
|
117
|
-
tablename: 't_userinfo ui LEFT JOIN t_userfiles uf on ui.f_userinfo_id = uf.f_userinfo_id',
|
118
|
-
condition: condition,
|
119
|
-
orderitem: '1'
|
120
|
-
}
|
121
|
-
});
|
122
|
-
return response.data;
|
123
|
-
} catch (error) {
|
124
|
-
return [];
|
125
|
-
}
|
126
|
-
},
|
127
|
-
async refreshUser(val) {
|
128
|
-
let condition = `1=1 and f_user_name is not null and uf.f_user_type = '非民用' and uf.f_table_state in ('正常','停用') and (ui.f_user_name like '${val}%' or ui.f_userinfo_code like '${this.bindingData.f_userinfo_code}%')`;
|
129
|
-
const users = await this.fetchUsers(condition);
|
130
|
-
users.forEach(item => {
|
131
|
-
if (!this.userNames.some(user => user.value.f_userinfo_id == item.f_userinfo_id)) {
|
132
|
-
this.userNames.push({ label: `${item.f_user_name}:${item.f_userinfo_code}`, value: item })
|
133
|
-
}
|
134
|
-
})
|
135
|
-
},
|
136
|
-
cameraCallBack(prop,fileName) {
|
137
|
-
this.$set('bindingData.f_head_pic',fileName)
|
138
|
-
},
|
139
|
-
takePictures(page){
|
140
|
-
HostApp.__callback__ = this.cameraCallBack
|
141
|
-
HostApp.__this__ = this
|
142
|
-
let prop = 'QRCode'
|
143
|
-
this.fileName = Util.guid() +'.jpg'
|
144
|
-
HostApp._open_a_page({
|
145
|
-
type: 'boomerang',
|
146
|
-
page: page,
|
147
|
-
param: {
|
148
|
-
file: this.fileName,
|
149
|
-
requestCode: 111,
|
150
|
-
callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
|
151
|
-
watermark: ''
|
152
|
-
}
|
153
|
-
})
|
154
|
-
},
|
155
|
-
async binding() {
|
156
|
-
let tableImages = []
|
157
|
-
if (!this.row.f_head_pic){
|
158
|
-
tableImages.push({
|
159
|
-
path:this.bindingData.f_head_pic
|
160
|
-
})
|
161
|
-
}
|
162
|
-
let data = {
|
163
|
-
tableImages: tableImages
|
164
|
-
}
|
165
|
-
HostApp.__this__ = this
|
166
|
-
HostApp.logicWithHint({
|
167
|
-
'logic': 'imagesUploadAndroid', 'callback': 'javascript: HostApp.__this__.commitCallBack()',
|
168
|
-
'data': data, 'backresult': 1
|
169
|
-
})
|
170
|
-
},
|
171
|
-
async commitCallBack(jo) {
|
172
|
-
if (jo.state == 'ok') {
|
173
|
-
if (this.bindingData.f_userinfo && this.bindingData.f_type == '用户'){
|
174
|
-
this.bindingData.f_user_name = this.bindingData.f_userinfo.split(':')[0].trim()
|
175
|
-
this.bindingData.f_userinfo_id = this.bindingData.f_userinfo.split(':')[1].trim()
|
176
|
-
}else if (this.bindingData.f_userinfo && this.bindingData.f_type == '小区') {
|
177
|
-
this.bindingData.f_user_name = this.bindingData.f_userinfo.split(':')[0].trim()
|
178
|
-
this.bindingData.f_userinfo_id = this.bindingData.f_userinfo.split(':')[1].trim()
|
179
|
-
}
|
180
|
-
const res = JSON.parse(jo.result)
|
181
|
-
let sql = ''
|
182
|
-
if (res.images && res.images.length > 0){
|
183
|
-
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}'`
|
184
|
-
}else {
|
185
|
-
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}' where id = '${this.bindingData.id}'`
|
186
|
-
}
|
187
|
-
new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/runSQL`, {data: {sql: sql}}).then(()=>{
|
188
|
-
this.$showMessage('绑定成功')
|
189
|
-
this.$dispatch('confirm')
|
190
|
-
}).catch(()=>{
|
191
|
-
this.$showMessage('绑定失败')
|
192
|
-
})
|
193
|
-
}else {
|
194
|
-
this.$showMessage('图片上传失败')
|
195
|
-
}
|
196
|
-
},
|
197
|
-
},
|
198
|
-
async ready() {
|
199
|
-
this.bindingData = JSON.parse(JSON.stringify(this.row))
|
200
|
-
if(this.bindingData.f_head_pic){
|
201
|
-
this.bindingData.f_head_pic = `${this.$androidUtil.getProxyUrl()}/rs/image/file/${this.bindingData.f_head_pic}`
|
202
|
-
}
|
203
|
-
let residentialArea = await new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
|
204
|
-
data: {
|
205
|
-
items: 'f_residential_area,id',
|
206
|
-
tablename: 't_area',
|
207
|
-
condition: `1=1 and f_residential_area is not null`,
|
208
|
-
orderitem: '1'
|
209
|
-
}
|
210
|
-
})
|
211
|
-
residentialArea.data.forEach(item => {
|
212
|
-
if (item.f_residential_area.trim() == this.bindingData.f_user_name.trim() && item.id == this.bindingData.f_userinfo_id){
|
213
|
-
this.bindingData.f_userinfo = `${item.f_residential_area}:${item.id}`
|
214
|
-
}
|
215
|
-
this.residentialAreas.push({label: item.f_residential_area, value: `${item.f_residential_area}:${item.id}`});
|
216
|
-
})
|
217
|
-
const users = await this.fetchUsers(`1=1 and f_user_name is not null and uf.f_user_type = '非民用' and uf.f_table_state in ('正常','停用')`)
|
218
|
-
users.forEach(item => {
|
219
|
-
if (this.bindingData.f_userinfo_id.trim() == item.f_userinfo_code.trim() && item.f_user_name.trim() == this.bindingData.f_user_name.trim()){
|
220
|
-
this.bindingData.f_userinfo = `${item.f_user_name}:${item.f_userinfo_code}`
|
221
|
-
}
|
222
|
-
this.userNames.push({ label: `${item.f_user_name}:${item.f_userinfo_code}`, value: `${item.f_user_name}:${item.f_userinfo_code}` })
|
223
|
-
})
|
224
|
-
}
|
225
|
-
}
|
226
|
-
</script>
|
227
|
-
<style lang="less" scoped>
|
228
|
-
.butt3 {
|
229
|
-
float: right;
|
230
|
-
width: 12px;
|
231
|
-
margin: 1% 2% 0 0;
|
232
|
-
}
|
233
|
-
|
234
|
-
.rightipt {
|
235
|
-
width: 60%;
|
236
|
-
float: left;
|
237
|
-
margin-left: 5%;
|
238
|
-
}
|
239
|
-
|
240
|
-
.righttxt {
|
241
|
-
border: none;
|
242
|
-
margin-left: 5px;
|
243
|
-
/*border-left: 5px solid #A2C2EB;*/
|
244
|
-
float: left;
|
245
|
-
width: 25%;
|
246
|
-
margin-bottom: 3px;
|
247
|
-
text-align: left;
|
248
|
-
word-wrap: break-word;
|
249
|
-
white-space: normal;
|
250
|
-
}
|
251
|
-
|
252
|
-
.spanboder {
|
253
|
-
border-bottom: 2px solid #499edf;
|
254
|
-
padding-bottom: 8px
|
255
|
-
}
|
256
|
-
|
257
|
-
#upuserinfo_sel /deep/ ul {
|
258
|
-
width: 100% !important;
|
259
|
-
left: 0 !important;
|
260
|
-
}
|
261
|
-
|
262
|
-
.btn-photo {
|
263
|
-
border: 0;
|
264
|
-
border-radius: 7px;
|
265
|
-
background-color: #7dc1f4;
|
266
|
-
font: 15px PingFang-SC-Bold;
|
267
|
-
height: 20%;
|
268
|
-
}
|
269
|
-
|
270
|
-
.panel-self {
|
271
|
-
border-radius: 10px;
|
272
|
-
border: 1px solid #499EDF;
|
273
|
-
background-color: #F8F8F8;
|
274
|
-
}
|
275
|
-
|
276
|
-
.div-photo {
|
277
|
-
width: auto;
|
278
|
-
height: auto;
|
279
|
-
/* margin-top: 10px; */
|
280
|
-
position: absolute;
|
281
|
-
bottom: 10px;
|
282
|
-
right: 10px;
|
283
|
-
}
|
284
|
-
</style>
|
285
|
-
<style lang="less">
|
286
|
-
#upuserinfo_sel ul {
|
287
|
-
width: 100% !important;
|
288
|
-
left: 0 !important;
|
289
|
-
}
|
290
|
-
</style>
|
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" style="width: 30%;">负责人姓名:</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" style="width: 30%;">负责人职务:</label>
|
15
|
+
<v-select v-model="bindingData.f_head_post" :options='headPostTypes' :value.sync="bindingData.f_head_post" :width="'60%'"
|
16
|
+
class="input-font" clear-button close-on-select placeholder='类型' style="margin-left: 5%;"
|
17
|
+
value-single></v-select>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
<div class="panel auto">
|
22
|
+
<div class="panel-body ">
|
23
|
+
<div class="row auto" style="margin: 5px 0">
|
24
|
+
<label class="righttxt" style="width: 30%;">负责人电话:</label>
|
25
|
+
<input v-model="bindingData.f_head_phone" class="form-control rightipt" type="text"/>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
<div class="panel auto">
|
30
|
+
<div class="panel-body ">
|
31
|
+
<div class="row auto" style="margin: 5px 0">
|
32
|
+
<label class="righttxt" style="width: 30%;">绑定类型:</label>
|
33
|
+
<v-select v-model="bindingData.f_type" :options='types' :value.sync="bindingData.f_type" :width="'60%'"
|
34
|
+
class="input-font" clear-button close-on-select placeholder='类型' style="margin-left: 5%;"
|
35
|
+
value-single></v-select>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<div v-if="bindingData.f_type == '小区'" class="panel auto">
|
40
|
+
<div class="panel-body ">
|
41
|
+
<div class="row auto" style="margin: 5px 0">
|
42
|
+
<label class="righttxt" style="width: 30%;">小区名称:</label>
|
43
|
+
<v-select v-model="bindingData.f_userinfo" :options='residentialAreas' :value.sync="bindingData.f_userinfo" :width="'60%'"
|
44
|
+
class="input-font" clear-button close-on-select placeholder='小区名称'
|
45
|
+
style="margin-left: 5%;" value-single></v-select>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
<div v-if="bindingData.f_type == '用户'" class="panel auto">
|
50
|
+
<div class="panel-body ">
|
51
|
+
<div class="row auto" style="margin: 5px 0">
|
52
|
+
<label class="righttxt" style="width: 30%;">用户名称:</label>
|
53
|
+
<v-select v-model="bindingData.f_userinfo" :options='userNames' :value.sync="bindingData.f_userinfo" :width="'60%'"
|
54
|
+
class="input-font" clear-button close-on-select placeholder='用户名称' @select-search="refreshUser"
|
55
|
+
style="margin-left: 5%;" menu-mode="align-button"
|
56
|
+
value-single></v-select>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
<div class="panel auto">
|
61
|
+
<div class="panel-body">
|
62
|
+
<label class="row auto text-left col-md-4 col-xs-4">备注</label>
|
63
|
+
<div class="col-md-12 col-sm-12 col-xs-12">
|
64
|
+
<textarea v-model="bindingData.f_comments" class="form-control"></textarea>
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
<div class="panel auto">
|
69
|
+
<div class="panel-body ">
|
70
|
+
<div class="row auto" style="margin: 5px 0">
|
71
|
+
<label class="righttxt">图片:</label>
|
72
|
+
<div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
|
73
|
+
<img-self v-if="bindingData.f_head_pic" :src="bindingData.f_head_pic" width="140" height="140"></img-self>
|
74
|
+
<button v-if="!bindingData.f_head_pic" type="button" name="button" class="btn btn-primary" @click="takePictures('com.aofeng.hybrid.android.peripheral.CameraActivity')">拍照</button>
|
75
|
+
<button v-if="!bindingData.f_head_pic" type="button" name="button" class="btn btn-primary" @click="takePictures('com.aofeng.hybrid.android.peripheral.ActionMultiplePickActivity')">相册</button>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
<div class="panel auto">
|
81
|
+
<div class="panel-body">
|
82
|
+
<div style="display: flex;justify-content: center;">
|
83
|
+
<button class="col-sm-3 btn btn-primary" @click="binding()">绑定</button>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
</template>
|
89
|
+
|
90
|
+
<script>
|
91
|
+
import {HttpResetClass} from 'vue-client'
|
92
|
+
import * as Util from '../../Util'
|
93
|
+
|
94
|
+
|
95
|
+
export default {
|
96
|
+
title: '二维码绑定',
|
97
|
+
data() {
|
98
|
+
return {
|
99
|
+
bindingData: {},
|
100
|
+
residentialAreas: [{label: '请选择', value: ''}],
|
101
|
+
userNames: [{label: '请选择', value: ''}],
|
102
|
+
headPostTypes:[{label: '请选择', value: ''} ,...this.$appdata.getParam('负责人职务')],
|
103
|
+
types: [{label: '请选择', value: ''}, {label: '小区', value: '小区'}, {label: '用户', value: '用户'}]
|
104
|
+
}
|
105
|
+
},
|
106
|
+
props: {
|
107
|
+
row: {
|
108
|
+
type: Object
|
109
|
+
}
|
110
|
+
},
|
111
|
+
methods: {
|
112
|
+
async fetchUsers(condition) {
|
113
|
+
try {
|
114
|
+
const response = await new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
|
115
|
+
data: {
|
116
|
+
items: 'ui.f_user_name,ui.f_userinfo_id,ui.f_userinfo_code',
|
117
|
+
tablename: 't_userinfo ui LEFT JOIN t_userfiles uf on ui.f_userinfo_id = uf.f_userinfo_id',
|
118
|
+
condition: condition,
|
119
|
+
orderitem: '1'
|
120
|
+
}
|
121
|
+
});
|
122
|
+
return response.data;
|
123
|
+
} catch (error) {
|
124
|
+
return [];
|
125
|
+
}
|
126
|
+
},
|
127
|
+
async refreshUser(val) {
|
128
|
+
let condition = `1=1 and f_user_name is not null and uf.f_user_type = '非民用' and uf.f_table_state in ('正常','停用') and (ui.f_user_name like '${val}%' or ui.f_userinfo_code like '${this.bindingData.f_userinfo_code}%')`;
|
129
|
+
const users = await this.fetchUsers(condition);
|
130
|
+
users.forEach(item => {
|
131
|
+
if (!this.userNames.some(user => user.value.f_userinfo_id == item.f_userinfo_id)) {
|
132
|
+
this.userNames.push({ label: `${item.f_user_name}:${item.f_userinfo_code}`, value: item })
|
133
|
+
}
|
134
|
+
})
|
135
|
+
},
|
136
|
+
cameraCallBack(prop,fileName) {
|
137
|
+
this.$set('bindingData.f_head_pic',fileName)
|
138
|
+
},
|
139
|
+
takePictures(page){
|
140
|
+
HostApp.__callback__ = this.cameraCallBack
|
141
|
+
HostApp.__this__ = this
|
142
|
+
let prop = 'QRCode'
|
143
|
+
this.fileName = Util.guid() +'.jpg'
|
144
|
+
HostApp._open_a_page({
|
145
|
+
type: 'boomerang',
|
146
|
+
page: page,
|
147
|
+
param: {
|
148
|
+
file: this.fileName,
|
149
|
+
requestCode: 111,
|
150
|
+
callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
|
151
|
+
watermark: ''
|
152
|
+
}
|
153
|
+
})
|
154
|
+
},
|
155
|
+
async binding() {
|
156
|
+
let tableImages = []
|
157
|
+
if (!this.row.f_head_pic){
|
158
|
+
tableImages.push({
|
159
|
+
path:this.bindingData.f_head_pic
|
160
|
+
})
|
161
|
+
}
|
162
|
+
let data = {
|
163
|
+
tableImages: tableImages
|
164
|
+
}
|
165
|
+
HostApp.__this__ = this
|
166
|
+
HostApp.logicWithHint({
|
167
|
+
'logic': 'imagesUploadAndroid', 'callback': 'javascript: HostApp.__this__.commitCallBack()',
|
168
|
+
'data': data, 'backresult': 1
|
169
|
+
})
|
170
|
+
},
|
171
|
+
async commitCallBack(jo) {
|
172
|
+
if (jo.state == 'ok') {
|
173
|
+
if (this.bindingData.f_userinfo && this.bindingData.f_type == '用户'){
|
174
|
+
this.bindingData.f_user_name = this.bindingData.f_userinfo.split(':')[0].trim()
|
175
|
+
this.bindingData.f_userinfo_id = this.bindingData.f_userinfo.split(':')[1].trim()
|
176
|
+
}else if (this.bindingData.f_userinfo && this.bindingData.f_type == '小区') {
|
177
|
+
this.bindingData.f_user_name = this.bindingData.f_userinfo.split(':')[0].trim()
|
178
|
+
this.bindingData.f_userinfo_id = this.bindingData.f_userinfo.split(':')[1].trim()
|
179
|
+
}
|
180
|
+
const res = JSON.parse(jo.result)
|
181
|
+
let sql = ''
|
182
|
+
if (res.images && res.images.length > 0){
|
183
|
+
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}'`
|
184
|
+
}else {
|
185
|
+
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}' where id = '${this.bindingData.id}'`
|
186
|
+
}
|
187
|
+
new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/runSQL`, {data: {sql: sql}}).then(()=>{
|
188
|
+
this.$showMessage('绑定成功')
|
189
|
+
this.$dispatch('confirm')
|
190
|
+
}).catch(()=>{
|
191
|
+
this.$showMessage('绑定失败')
|
192
|
+
})
|
193
|
+
}else {
|
194
|
+
this.$showMessage('图片上传失败')
|
195
|
+
}
|
196
|
+
},
|
197
|
+
},
|
198
|
+
async ready() {
|
199
|
+
this.bindingData = JSON.parse(JSON.stringify(this.row))
|
200
|
+
if(this.bindingData.f_head_pic){
|
201
|
+
this.bindingData.f_head_pic = `${this.$androidUtil.getProxyUrl()}/rs/image/file/${this.bindingData.f_head_pic}`
|
202
|
+
}
|
203
|
+
let residentialArea = await new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
|
204
|
+
data: {
|
205
|
+
items: 'f_residential_area,id',
|
206
|
+
tablename: 't_area',
|
207
|
+
condition: `1=1 and f_residential_area is not null`,
|
208
|
+
orderitem: '1'
|
209
|
+
}
|
210
|
+
})
|
211
|
+
residentialArea.data.forEach(item => {
|
212
|
+
if (item.f_residential_area.trim() == this.bindingData.f_user_name.trim() && item.id == this.bindingData.f_userinfo_id){
|
213
|
+
this.bindingData.f_userinfo = `${item.f_residential_area}:${item.id}`
|
214
|
+
}
|
215
|
+
this.residentialAreas.push({label: item.f_residential_area, value: `${item.f_residential_area}:${item.id}`});
|
216
|
+
})
|
217
|
+
const users = await this.fetchUsers(`1=1 and f_user_name is not null and uf.f_user_type = '非民用' and uf.f_table_state in ('正常','停用')`)
|
218
|
+
users.forEach(item => {
|
219
|
+
if (this.bindingData.f_userinfo_id.trim() == item.f_userinfo_code.trim() && item.f_user_name.trim() == this.bindingData.f_user_name.trim()){
|
220
|
+
this.bindingData.f_userinfo = `${item.f_user_name}:${item.f_userinfo_code}`
|
221
|
+
}
|
222
|
+
this.userNames.push({ label: `${item.f_user_name}:${item.f_userinfo_code}`, value: `${item.f_user_name}:${item.f_userinfo_code}` })
|
223
|
+
})
|
224
|
+
}
|
225
|
+
}
|
226
|
+
</script>
|
227
|
+
<style lang="less" scoped>
|
228
|
+
.butt3 {
|
229
|
+
float: right;
|
230
|
+
width: 12px;
|
231
|
+
margin: 1% 2% 0 0;
|
232
|
+
}
|
233
|
+
|
234
|
+
.rightipt {
|
235
|
+
width: 60%;
|
236
|
+
float: left;
|
237
|
+
margin-left: 5%;
|
238
|
+
}
|
239
|
+
|
240
|
+
.righttxt {
|
241
|
+
border: none;
|
242
|
+
margin-left: 5px;
|
243
|
+
/*border-left: 5px solid #A2C2EB;*/
|
244
|
+
float: left;
|
245
|
+
width: 25%;
|
246
|
+
margin-bottom: 3px;
|
247
|
+
text-align: left;
|
248
|
+
word-wrap: break-word;
|
249
|
+
white-space: normal;
|
250
|
+
}
|
251
|
+
|
252
|
+
.spanboder {
|
253
|
+
border-bottom: 2px solid #499edf;
|
254
|
+
padding-bottom: 8px
|
255
|
+
}
|
256
|
+
|
257
|
+
#upuserinfo_sel /deep/ ul {
|
258
|
+
width: 100% !important;
|
259
|
+
left: 0 !important;
|
260
|
+
}
|
261
|
+
|
262
|
+
.btn-photo {
|
263
|
+
border: 0;
|
264
|
+
border-radius: 7px;
|
265
|
+
background-color: #7dc1f4;
|
266
|
+
font: 15px PingFang-SC-Bold;
|
267
|
+
height: 20%;
|
268
|
+
}
|
269
|
+
|
270
|
+
.panel-self {
|
271
|
+
border-radius: 10px;
|
272
|
+
border: 1px solid #499EDF;
|
273
|
+
background-color: #F8F8F8;
|
274
|
+
}
|
275
|
+
|
276
|
+
.div-photo {
|
277
|
+
width: auto;
|
278
|
+
height: auto;
|
279
|
+
/* margin-top: 10px; */
|
280
|
+
position: absolute;
|
281
|
+
bottom: 10px;
|
282
|
+
right: 10px;
|
283
|
+
}
|
284
|
+
</style>
|
285
|
+
<style lang="less">
|
286
|
+
#upuserinfo_sel ul {
|
287
|
+
width: 100% !important;
|
288
|
+
left: 0 !important;
|
289
|
+
}
|
290
|
+
</style>
|