safecheck-client 3.0.33-15 → 3.0.33-150
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/index.html +6 -2
- package/package.json +133 -133
- package/src/App.vue +2 -2
- package/src/components/Util/ImgSelfSafePlus.vue +19 -10
- package/src/components/Util.js +7 -0
- package/src/components/android/AreaPlan.vue +2 -1
- package/src/components/android/CurrentCreate.vue +1 -1
- package/src/components/android/ImgSelfAndroid.vue +181 -181
- package/src/components/android/SafecheckDevices.vue +5 -1
- package/src/components/android/SafecheckOrderV.vue +18 -12
- package/src/components/map/checkScreen.vue +27 -21
- package/src/components/paper/PlanChooser.vue +4 -2
- package/src/components/pc/NewCheckpaper.vue +11 -8
- package/src/components/planmanage/PlanManage.vue +14 -4
- package/src/components/planmanage/checkPlanList.vue +2 -1
- package/src/components/planmanage/checkUserList.vue +2 -0
- package/src/components/report/HiddenSituation.vue +3 -3
- package/src/components/rongcheng/AspiratedPaperFeedbackm.vue +28 -2
- package/src/components/rongcheng/AspiratedPaperMessage.vue +1 -1
- package/src/components/rongcheng/DefectPaper.vue +1 -1
- package/src/components/rongcheng/PaperListNPSQ.vue +36 -1
- package/src/components/rongcheng/PaperListSQ.vue +32 -11
- package/src/components/rongcheng/PhoneUpUserinfo.vue +939 -802
- package/src/components/rongcheng/SafecheckOrderV.vue +1 -1
- package/src/components/rongcheng/report/CheckPlanAreaList.vue +1 -3
- package/src/components/safecheckNew/PaperList.vue +785 -0
- package/src/components/safecheckNew/android/AddPlanItem.vue +419 -0
- package/src/components/safecheckNew/android/AreaPlan.vue +561 -0
- package/src/components/safecheckNew/android/CurrentCreate.vue +1050 -0
- package/src/components/safecheckNew/android/Recheck.vue +379 -0
- package/src/components/safecheckNew/android/SafecheckDevices.vue +1400 -0
- package/src/components/safecheckNew/android/SafecheckOrderV.vue +2692 -0
- package/src/filiale/Util.js +5 -0
- package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -0
- package/src/filiale/baiyin/android.js +10 -0
- package/src/filiale/baiyin/pc/PaperList.vue +790 -0
- package/src/filiale/baiyin/pc/PlanChooser.vue +167 -0
- package/src/filiale/baiyin/pc/PlanManage.vue +834 -0
- package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -0
- package/src/filiale/baiyin/pc/RoleSelector.vue +160 -0
- package/src/filiale/baiyin/pc.js +17 -0
- package/src/filiale/bayan/android/AddPlanItem.vue +7 -2
- package/src/filiale/bayan/android/CheckPlanDown.vue +249 -0
- package/src/filiale/bayan/android/SafecheckOrderV.vue +21 -8
- package/src/filiale/bayan/android/SafecheckUserInfo.vue +566 -514
- package/src/filiale/bayan/android.js +1 -0
- package/src/filiale/bayan/pc/CheckDetail.vue +205 -0
- package/src/filiale/bayan/pc/CheckPlan.vue +59 -0
- package/src/filiale/bayan/pc/CheckPlanAreaList.vue +565 -0
- package/src/filiale/bayan/pc/CheckSearchUser.vue +1110 -0
- package/src/filiale/bayan/pc/DefectListNew.vue +597 -0
- package/src/filiale/bayan/pc/DefectMainNew.vue +63 -0
- package/src/filiale/bayan/pc/DefectPaperNew.vue +1218 -0
- package/src/filiale/bayan/pc/HiddenSituation.vue +256 -0
- package/src/filiale/bayan/pc/NewCheckpaper.vue +31 -1
- package/src/filiale/bayan/pc/PaperList.vue +119 -12
- package/src/filiale/bayan/pc/PlanManage.vue +29 -8
- package/src/filiale/bayan/pc/SelectCheckPlan.vue +333 -0
- package/src/filiale/bayan/pc.js +6 -0
- package/src/filiale/dexin/android/SafecheckOrderV.vue +123 -24
- package/src/filiale/fugou/android/SafecheckOrderV.vue +2796 -0
- package/src/filiale/fugou/android.js +2 -1
- package/src/filiale/fugou/pc/AddToCheckBook.vue +56 -119
- package/src/filiale/fugou/pc/CheckBook.vue +303 -301
- package/src/filiale/fugou/pc/CheckBookDetails.vue +161 -161
- package/src/filiale/fugou/pc/CheckBookEntry.vue +94 -66
- package/src/filiale/fugou/pc/CheckBookList.vue +366 -366
- package/src/filiale/fugou/pc/CheckBookSearchArea.vue +560 -560
- package/src/filiale/fugou/pc/CheckBookSearchUser.vue +810 -685
- package/src/filiale/fugou/pc/CheckBookUser.vue +102 -45
- package/src/filiale/fugou/pc/DefectPaperNew.vue +10 -6
- package/src/filiale/fugou/pc/PaperDefectMain.vue +12 -6
- package/src/filiale/fugou/pc/PaperList.vue +14 -6
- package/src/filiale/fugou/pc/PlanManage.vue +62 -8
- package/src/filiale/fugou/pc/checkPlanList.vue +371 -371
- package/src/filiale/fugou/pc/checkUserList.vue +222 -42
- package/src/filiale/hanzhong/pc/CheckHiddenDanger.vue +15 -5
- package/src/filiale/hanzhong/pc/CheckSafeDetail.vue +12 -2
- package/src/filiale/hanzhong/pc/CheckSafeStatus.vue +12 -3
- package/src/filiale/hanzhong/pc/CheckSearchUser.vue +13 -0
- package/src/filiale/hanzhong/pc/CheckUserList.vue +30 -11
- package/src/filiale/hanzhong/pc/CheckerSafeDetail.vue +11 -2
- package/src/filiale/jingyang/pc/ReportCheckItemList.vue +543 -0
- package/src/filiale/jingyang/pc.js +1 -0
- package/src/filiale/kelai/pc/CheckPlanAreaList.vue +2 -22
- package/src/filiale/liaoyuan/pc/checkPlanList.vue +373 -0
- package/src/filiale/liaoyuan/pc.js +2 -1
- package/src/filiale/qianneng/pc/PaperList.vue +31 -1
- package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1268
- package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2779
- package/src/filiale/rongchuang/android/SafecheckDevices.vue +468 -748
- package/src/filiale/rongchuang/android/SafecheckOrderV.vue +984 -1234
- package/src/filiale/rongchuang/android.js +1 -0
- package/src/filiale/rongchuang/pc/NewCheckpaper.vue +294 -305
- package/src/filiale/rongchuang/pc/PaperList.vue +812 -0
- package/src/filiale/rongchuang/pc.js +1 -0
- package/src/filiale/siyang/android/PhoneRecordInfo.vue +214 -0
- package/src/filiale/siyang/android/SafecheckOrderV.vue +2796 -0
- package/src/filiale/siyang/android/SafecheckUserInfo.vue +789 -0
- package/src/filiale/siyang/android.js +11 -0
- package/src/filiale/siyang/pc/PaperDefectMain.vue +864 -0
- package/src/filiale/siyang/pc/PaperList.vue +834 -0
- package/src/filiale/siyang/pc/PlanManage.vue +839 -0
- package/src/filiale/siyang/pc/checkUserList.vue +781 -0
- package/src/filiale/siyang/pc.js +15 -0
- package/src/filiale/tianke/pc/checkScreen.vue +36 -31
- package/src/filiale/tongchuan/android/PhoneUpUserinfo.vue +60 -2
- package/src/filiale/tongchuan/android/SafecheckOrderV.vue +2 -3
- package/src/filiale/tongchuan/pc/NewCheckpaper.vue +1 -1
- package/src/filiale/tongchuan/pc/checkUserList.vue +2 -2
- package/src/filiale/weinan/android/PaperFeedback.vue +8 -8
- package/src/filiale/weinan/android/SafecheckDevices.vue +6 -2
- package/src/filiale/weinan/android/SafecheckOrderV.vue +16 -2
- package/src/filiale/weinan/android/SafecheckUserInfo.vue +7 -2
- package/src/filiale/weinan/pc/CheckSearchUser.vue +1078 -0
- package/src/filiale/weinan/pc/DefectListNew.vue +617 -0
- package/src/filiale/weinan/pc/DefectMainNew.vue +1 -1
- package/src/filiale/weinan/pc/DefectPaperNew.vue +7 -1
- package/src/filiale/weinan/pc.js +2 -0
- package/src/filiale/wenxi/android/PhoneUpUserinfo.vue +1 -1
- package/src/filiale/wenxi/android/SafecheckUserInfo.vue +85 -63
- package/src/filiale/wenxi/pc/NewCheckpaper.vue +1 -1
- package/src/filiale/yangchunboneng/android/AddPlanItem.vue +46 -1
- package/src/filiale/yangchunboneng/android/CurrentCreate.vue +45 -4
- package/src/filiale/yangchunboneng/android/DailyworkloadQuery.vue +2 -2
- package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
- package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1731 -1731
- package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -0
- package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +1332 -1332
- package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2845 -2832
- package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +887 -869
- package/src/filiale/yangchunboneng/android/safeHistoryLook.vue +2 -1
- package/src/filiale/yangchunboneng/android.js +1 -0
- package/src/filiale/yangchunboneng/pc/CheckBookList.vue +4 -4
- package/src/filiale/yangchunboneng/pc/CheckBookSearchUser.vue +76 -32
- package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +72 -1
- package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1018
- package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +944 -849
- package/src/filiale/yangchunboneng/pc/PaperList.vue +17 -0
- package/src/filiale/yongzhou/android/SafecheckOrderV.vue +221 -256
- package/src/filiale/yongzhou/pc/CheckPlan.vue +59 -0
- package/src/filiale/yongzhou/pc/CheckSearchUser.vue +1 -1
- package/src/filiale/yongzhou/pc/DefectPaperNew.vue +1105 -0
- package/src/filiale/yongzhou/pc/NoCheckplanSafecheck.vue +412 -107
- package/src/filiale/yongzhou/pc/PaperDefectMain.vue +872 -0
- package/src/filiale/yongzhou/pc/PaperList.vue +1 -1
- package/src/filiale/yongzhou/pc/SelectCheckPlan.vue +364 -0
- package/src/filiale/yongzhou/pc/communityTypeDetailG.vue +56 -125
- package/src/filiale/yongzhou/pc/communityTypeDetailM.vue +94 -187
- package/src/filiale/yongzhou/pc/safeDetail.vue +311 -20
- package/src/filiale/yongzhou/pc/safeStatistics.vue +74 -24
- package/src/filiale/yongzhou/pc/safeStatisticsDay.vue +2 -2
- package/src/filiale/yongzhou/pc/safeStatisticsMonth.vue +2 -2
- package/src/filiale/yongzhou/pc/safeStatisticsYear.vue +47 -23
- package/src/filiale/yongzhou/pc/safeTable.vue +3 -3
- package/src/filiale/yongzhou/pc.js +4 -0
- package/src/filiale/zhongsheng/android/CurrentCreate.vue +7 -2
- package/src/filiale/zhongsheng/pc/DefectPaperWeiXiu.vue +6 -2
- package/src/main.js +33 -33
- package/src/rongcheng.js +3 -1
- package/src/safecheck-android.js +6 -0
- package/src/safecheck.js +3 -0
@@ -1,560 +1,560 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="flex-row">
|
3
|
-
<div class="basic-main">
|
4
|
-
<criteria-paged :model="model" v-ref:paged>
|
5
|
-
<criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
|
6
|
-
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
7
|
-
<div class="row">
|
8
|
-
|
9
|
-
<div class="col-sm-3 form-group" style="margin-bottom: 0px">
|
10
|
-
<label class="font_normal_body">公  司</label>
|
11
|
-
<right-tree-safe @re-res="$parent.$parent.getResm" v-model="model.f_orgid" condition="ta.f_orgid in {}"></right-tree-safe>
|
12
|
-
</div>
|
13
|
-
<div class="form-group col-sm-3">
|
14
|
-
<label class="font_normal_body">小区名称</label>
|
15
|
-
<input type="text" class="input_search" v-model="model.f_residential_area"
|
16
|
-
style="width: 60%" placeholder="小区名称" condition="f_residential_area like '%{}%'">
|
17
|
-
</div>
|
18
|
-
<div class="form-group col-sm-3">
|
19
|
-
<label class="font_normal_body">是否在册</label>
|
20
|
-
<v-select :value.sync="model.f_is_checkbook" v-model='model.f_is_checkbook'
|
21
|
-
:value-single="true" style="width: 60%"
|
22
|
-
class="select_list select"
|
23
|
-
@change="$parent.$parent.changeState"
|
24
|
-
:options='$parent.$parent.isCheckBook' placeholder='有无所属安检册'
|
25
|
-
close-on-select
|
26
|
-
condition="{}"></v-select>
|
27
|
-
</div>
|
28
|
-
<div class="form-group col-sm-3">
|
29
|
-
<button class="button_spacing button_search" @click="search()">查询</button>
|
30
|
-
<!-- <div style="float: right" class="button_spacing"
|
31
|
-
:class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
|
32
|
-
@click="$parent.$parent.hidden()"></div>-->
|
33
|
-
</div>
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
</div>
|
39
|
-
</div>
|
40
|
-
</criteria>
|
41
|
-
<data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
|
42
|
-
<template partial='head'>
|
43
|
-
<tr @dblclick.stop="">
|
44
|
-
<th>
|
45
|
-
<nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookAll"></input>全选</nobr>
|
46
|
-
</th>
|
47
|
-
<th>
|
48
|
-
<nobr>区/县</nobr>
|
49
|
-
</th>
|
50
|
-
<th>
|
51
|
-
<nobr>街道/乡镇</nobr>
|
52
|
-
</th>
|
53
|
-
<th>
|
54
|
-
<nobr>片区/行政村</nobr>
|
55
|
-
</th>
|
56
|
-
<th>
|
57
|
-
<nobr>小区/自然村</nobr>
|
58
|
-
</th>
|
59
|
-
<th>
|
60
|
-
<nobr>所属安检册</nobr>
|
61
|
-
</th>
|
62
|
-
</tr>
|
63
|
-
</template>
|
64
|
-
<template partial='body'>
|
65
|
-
<td style="text-align: center">
|
66
|
-
<nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
|
67
|
-
@change="$parent.$parent.$parent.checkChange(row, $event)"></input>
|
68
|
-
</nobr>
|
69
|
-
</td>
|
70
|
-
<td style="text-align: center">{{ row.f_pcd }}</td>
|
71
|
-
<td style="text-align: center">{{ row.f_street }}</td>
|
72
|
-
<td style="text-align: center">{{ row.f_community_name }}</td>
|
73
|
-
<td style="text-align: center">{{ row.f_residential_area }}</td>
|
74
|
-
<td style="text-align: center">{{ row.f_check_book_name }}</td>
|
75
|
-
</template>
|
76
|
-
</data-grid>
|
77
|
-
</criteria-paged>
|
78
|
-
</div>
|
79
|
-
<modal :show.sync="showModal" :backdrop="false">
|
80
|
-
<div slot="modal-header" class="modal-header">
|
81
|
-
<h4 class="modal-title">
|
82
|
-
创建安检册
|
83
|
-
</h4>
|
84
|
-
</div>
|
85
|
-
<div slot="modal-body" class="modal-body">
|
86
|
-
<div v-if="true">
|
87
|
-
<div class="row" style="margin-top: 10px">
|
88
|
-
|
89
|
-
<div class="col-sm-12 form-group" style="margin: 0">
|
90
|
-
<role-selector-safe
|
91
|
-
@re-res="getRes"
|
92
|
-
role-name="安检员"
|
93
|
-
role-lable="安 检 员 "
|
94
|
-
:value.sync="checkBook.f_checker_name"
|
95
|
-
v-model="checkBook.f_checker_name">
|
96
|
-
</role-selector-safe>
|
97
|
-
</div>
|
98
|
-
<div class="form-group col-sm-6" style="margin-top: 20px">
|
99
|
-
<label class="font_normal_body">安检册名</label>
|
100
|
-
<input type="text" class="input_search" v-model="checkBook.f_check_book_name"
|
101
|
-
style="width: 60%" >
|
102
|
-
</div>
|
103
|
-
<div class="form-group col-sm-6" style="margin-top: 20px">
|
104
|
-
<label class="font_normal_body">执行日期</label>
|
105
|
-
<datepicker
|
106
|
-
:value.sync="checkBook.f_run_date"
|
107
|
-
style="width: 60%"
|
108
|
-
:format="'yyyy-MM-dd'"
|
109
|
-
v-model="checkBook.f_run_date"
|
110
|
-
>
|
111
|
-
</datepicker>
|
112
|
-
</div>
|
113
|
-
<div class="form-group col-sm-6" style="margin-top: 20px">
|
114
|
-
<label class="font_normal_body">执行周期</label>
|
115
|
-
<input type="number" class="input_search" v-model="checkBook.f_around_time"
|
116
|
-
style="width: 60%" >
|
117
|
-
</div>
|
118
|
-
<div class="form-group col-sm-6" style="margin-top: 20px">
|
119
|
-
<label class="font_normal_body">周期单位</label>
|
120
|
-
<v-select :value.sync="checkBook.f_around_unit" v-model='checkBook.f_around_unit'
|
121
|
-
:value-single="true" style="width: 60%"
|
122
|
-
class="select_list select"
|
123
|
-
:options='aroundUnit' placeholder=''
|
124
|
-
close-on-select></v-select>
|
125
|
-
</div>
|
126
|
-
</div>
|
127
|
-
</div>
|
128
|
-
</div>
|
129
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
130
|
-
<button class="button_search" style="margin-right: 20px" @click="ok">确认</button>
|
131
|
-
<button class="button_search" @click="cancel">取消</button>
|
132
|
-
</div>
|
133
|
-
</modal>
|
134
|
-
<modal :show.sync="showModal2" :backdrop="false">
|
135
|
-
<div slot="modal-header" class="modal-header">
|
136
|
-
<h4 class="modal-title">
|
137
|
-
添加用户
|
138
|
-
</h4>
|
139
|
-
</div>
|
140
|
-
<div slot="modal-body" class="modal-body">
|
141
|
-
<div v-if="true">
|
142
|
-
<div class="row" style="margin-top: 10px">
|
143
|
-
<div class="form-group col-sm-12" style="margin-top: 20px">
|
144
|
-
<label class="font_normal_body">安 检 册</label>
|
145
|
-
<v-select :value.sync="selectBook" v-model='selectBook'
|
146
|
-
:value-single="true" style="width: 80%"
|
147
|
-
class="select_list select"
|
148
|
-
:options='checkBooks' placeholder=''
|
149
|
-
close-on-select></v-select>
|
150
|
-
</div>
|
151
|
-
</div>
|
152
|
-
</div>
|
153
|
-
</div>
|
154
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
155
|
-
<button class="button_search" style="margin-right: 20px" @click="ok2">确认</button>
|
156
|
-
<button class="button_search" @click="cancel2">取消</button>
|
157
|
-
</div>
|
158
|
-
</modal>
|
159
|
-
<modal :show.sync="showModal3" :backdrop="false">
|
160
|
-
<div slot="modal-header" class="modal-header">
|
161
|
-
<h4 class="modal-title">
|
162
|
-
调整用户
|
163
|
-
</h4>
|
164
|
-
</div>
|
165
|
-
<div slot="modal-body" class="modal-body">
|
166
|
-
<div v-if="true">
|
167
|
-
<div class="row" style="margin-top: 10px;text-align: center">
|
168
|
-
<div class="form-group col-sm-12" style="margin-top: 20px">
|
169
|
-
<label class="font_normal_body">安 检 册</label>
|
170
|
-
<v-select :value.sync="selectBook" v-model='selectBook'
|
171
|
-
:value-single="true" style="width: 80%"
|
172
|
-
class="select_list select"
|
173
|
-
:options='checkBooks' placeholder=''
|
174
|
-
close-on-select></v-select>
|
175
|
-
</div>
|
176
|
-
</div>
|
177
|
-
</div>
|
178
|
-
</div>
|
179
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
180
|
-
<button class="button_search" style="margin-right: 20px" @click="ok3">确认</button>
|
181
|
-
<button class="button_search" @click="cancel3">取消</button>
|
182
|
-
</div>
|
183
|
-
</modal>
|
184
|
-
|
185
|
-
</div>
|
186
|
-
</template>
|
187
|
-
|
188
|
-
<script>
|
189
|
-
import {PagedList, HttpResetClass} from 'vue-client'
|
190
|
-
import * as Util from '../../../components/Util'
|
191
|
-
import bus from "../../../bus";
|
192
|
-
|
193
|
-
export default {
|
194
|
-
title: '安检册管理',
|
195
|
-
data () {
|
196
|
-
let model = new PagedList('rs/sql/safe_singleTable_OrderBy', 20,{
|
197
|
-
items: "'ta.f_residential_area,ta.id,tcb.f_check_book_name,tcm.f_community_name,tcm.f_street'",
|
198
|
-
tablename: "'t_area ta left join t_check_book tcb on ta.f_check_book_id=tcb.id left join t_community tcm on ta.f_community_id = tcm.id'",
|
199
|
-
orderitem: "'id desc'"
|
200
|
-
})
|
201
|
-
return {
|
202
|
-
model: model,
|
203
|
-
criteriaShow: false,
|
204
|
-
excelHeaders: {},
|
205
|
-
checkBooks: [],
|
206
|
-
f_orgid: '',
|
207
|
-
bookAll: false,
|
208
|
-
bookList: [],
|
209
|
-
selectBook:'',
|
210
|
-
// init:false,
|
211
|
-
aroundUnit: [{label: '年', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '月'}],
|
212
|
-
isCheckBook: [{label: '全部', value: ''}, {label: '是', value: 'f_check_book_id is not null'}, {label: '否', value: 'f_check_book_id is null'}],
|
213
|
-
isSearch: false,
|
214
|
-
checkBook: {
|
215
|
-
f_check_book_name: '',
|
216
|
-
f_run_date: '',
|
217
|
-
f_around_time: '',
|
218
|
-
f_around_unit: '',
|
219
|
-
f_create_date: Util.toStandardDateString(),
|
220
|
-
f_create_person: this.$login.f.name,
|
221
|
-
f_orgid: '',
|
222
|
-
f_checker_name: ''
|
223
|
-
},
|
224
|
-
showModal: false,
|
225
|
-
showModal2: false,
|
226
|
-
showModal3: false
|
227
|
-
}
|
228
|
-
},
|
229
|
-
beforeDestroy() {
|
230
|
-
//tag
|
231
|
-
bus.$off('fresh-area')
|
232
|
-
},
|
233
|
-
computed: {
|
234
|
-
searchData () {
|
235
|
-
return {condition: this.model.condition}
|
236
|
-
},
|
237
|
-
bookCondition () {
|
238
|
-
return this.model.condition
|
239
|
-
},
|
240
|
-
isCreateBook () {
|
241
|
-
return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is null'
|
242
|
-
},
|
243
|
-
isChangeBook () {
|
244
|
-
return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is not null'
|
245
|
-
}
|
246
|
-
},
|
247
|
-
watch:{
|
248
|
-
'bookList'(){
|
249
|
-
this.$emit('book-list',this.bookList)
|
250
|
-
},
|
251
|
-
'bookAll'(val){
|
252
|
-
if(!val){
|
253
|
-
this.bookList=[]
|
254
|
-
}
|
255
|
-
this.$emit('book-all',this.bookAll)
|
256
|
-
}
|
257
|
-
},
|
258
|
-
methods: {
|
259
|
-
async ok2() {
|
260
|
-
if (!this.selectBook) {
|
261
|
-
this.$showMessage('请选择安检册')
|
262
|
-
return
|
263
|
-
}
|
264
|
-
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
265
|
-
let userCondition = ''
|
266
|
-
if (this.bookList.length < 1) {
|
267
|
-
//tag
|
268
|
-
userCondition = this.bookCondition
|
269
|
-
} else {
|
270
|
-
//tag)
|
271
|
-
|
272
|
-
userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
273
|
-
userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
|
274
|
-
//tag
|
275
|
-
}
|
276
|
-
let addUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
|
277
|
-
FROM
|
278
|
-
t_userinfo tui
|
279
|
-
LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
|
280
|
-
LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
|
281
|
-
LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
|
282
|
-
WHERE
|
283
|
-
tui.f_user_state = '正常'
|
284
|
-
AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
|
285
|
-
AND ${userCondition}`
|
286
|
-
await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: addUser}},
|
287
|
-
{resolveMsg: null, rejectMsg: '添加用户失败'})
|
288
|
-
this.$showMessage('添加用户成功')
|
289
|
-
this.selectBook = ''
|
290
|
-
this.bookAll = false
|
291
|
-
this.bookList = []
|
292
|
-
this.showModal2 = false
|
293
|
-
this.$refs.paged.$refs.criteria.search()
|
294
|
-
}
|
295
|
-
},
|
296
|
-
async ok3() {
|
297
|
-
if (!this.selectBook) {
|
298
|
-
this.$showMessage('请选择安检册')
|
299
|
-
return
|
300
|
-
}
|
301
|
-
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
302
|
-
let userCondition = ''
|
303
|
-
if (this.bookList.length < 1) {
|
304
|
-
//tag
|
305
|
-
userCondition = this.bookCondition
|
306
|
-
} else {
|
307
|
-
//tag)
|
308
|
-
|
309
|
-
userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
310
|
-
userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
|
311
|
-
//tag
|
312
|
-
}
|
313
|
-
let upUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
|
314
|
-
FROM
|
315
|
-
t_userinfo tui
|
316
|
-
LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
|
317
|
-
LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
|
318
|
-
LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
|
319
|
-
WHERE
|
320
|
-
tui.f_user_state = '正常'
|
321
|
-
AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
|
322
|
-
AND ${userCondition}`
|
323
|
-
await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: upUser}},
|
324
|
-
{resolveMsg: null, rejectMsg: '调整用户失败'})
|
325
|
-
this.$showMessage('调整用户成功')
|
326
|
-
this.selectBook = ''
|
327
|
-
this.bookAll = false
|
328
|
-
this.bookList = []
|
329
|
-
this.showModal3 = false
|
330
|
-
this.$refs.paged.$refs.criteria.search()
|
331
|
-
}
|
332
|
-
},
|
333
|
-
cancel2(){
|
334
|
-
this.selectBook = ''
|
335
|
-
this.bookAll = false
|
336
|
-
this.bookList = []
|
337
|
-
this.showModal2 = false
|
338
|
-
this.$refs.paged.$refs.criteria.search()
|
339
|
-
},
|
340
|
-
cancel3(){
|
341
|
-
this.selectBook = ''
|
342
|
-
this.bookAll = false
|
343
|
-
this.bookList = []
|
344
|
-
this.showModal3 = false
|
345
|
-
this.$refs.paged.$refs.criteria.search()
|
346
|
-
},
|
347
|
-
addUser () {
|
348
|
-
if (!this.isCreateBook) {
|
349
|
-
this.$showMessage('请选择查询未划分安检册的用户')
|
350
|
-
return
|
351
|
-
}
|
352
|
-
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
353
|
-
this.showModal2 = true
|
354
|
-
this.freshCheckBook()
|
355
|
-
return
|
356
|
-
}
|
357
|
-
this.$showMessage('请选择用户')
|
358
|
-
},
|
359
|
-
upUser () {
|
360
|
-
if (!this.isChangeBook) {
|
361
|
-
this.$showMessage('请选择查询已划分安检册的用户')
|
362
|
-
return
|
363
|
-
}
|
364
|
-
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
365
|
-
this.showModal3 = true
|
366
|
-
this.freshCheckBook()
|
367
|
-
return
|
368
|
-
}
|
369
|
-
this.$showMessage('请选择用户')
|
370
|
-
},
|
371
|
-
async delUser () {
|
372
|
-
if (!this.isChangeBook) {
|
373
|
-
this.$showMessage('请选择查询已划分安检册的用户')
|
374
|
-
return
|
375
|
-
}
|
376
|
-
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
377
|
-
let userCondition= ''
|
378
|
-
if (this.bookList.length < 1) {
|
379
|
-
//tag
|
380
|
-
userCondition = this.bookCondition
|
381
|
-
} else {
|
382
|
-
//tag)
|
383
|
-
|
384
|
-
userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
385
|
-
userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
|
386
|
-
//tag
|
387
|
-
}
|
388
|
-
let delUser= `update t_user_address set f_check_book_id =null
|
389
|
-
FROM
|
390
|
-
t_userinfo tui
|
391
|
-
LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
|
392
|
-
LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
|
393
|
-
LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
|
394
|
-
WHERE
|
395
|
-
tui.f_user_state = '正常'
|
396
|
-
AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
|
397
|
-
AND ${userCondition}`
|
398
|
-
await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: delUser}},
|
399
|
-
{resolveMsg: null, rejectMsg: '删除安检册失败'})
|
400
|
-
this.$showMessage('从安检册删除所选用户成功')
|
401
|
-
this.selectBook = ''
|
402
|
-
this.bookAll = false
|
403
|
-
this.bookList = []
|
404
|
-
this.showModal3 = false
|
405
|
-
this.$refs.paged.$refs.criteria.search()
|
406
|
-
return
|
407
|
-
}
|
408
|
-
this.$showMessage('请选择用户')
|
409
|
-
},
|
410
|
-
beforeCreateBook () {
|
411
|
-
if (!this.isCreateBook) {
|
412
|
-
this.$showMessage('请选择查询未划分安检册的用户')
|
413
|
-
return
|
414
|
-
}
|
415
|
-
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
416
|
-
this.showModal = true
|
417
|
-
return
|
418
|
-
}
|
419
|
-
this.$showMessage('请选择用户')
|
420
|
-
},
|
421
|
-
ok () {
|
422
|
-
//tag)
|
423
|
-
let condition = ''
|
424
|
-
if (!this.checkBook.f_check_book_name) {
|
425
|
-
return this.$showMessage('请填写册名')
|
426
|
-
}
|
427
|
-
if (!this.checkBook.f_checker_name) {
|
428
|
-
return this.$showMessage('请选择安检员')
|
429
|
-
}
|
430
|
-
if (!this.checkBook.f_around_time || !this.checkBook.f_around_unit) {
|
431
|
-
return this.$showMessage('请选填写周期信息')
|
432
|
-
}
|
433
|
-
if (!this.checkBook.f_run_date) {
|
434
|
-
return this.$showMessage('执行日期')
|
435
|
-
}
|
436
|
-
if (this.bookList.length < 1) {
|
437
|
-
//tag
|
438
|
-
condition = this.bookCondition
|
439
|
-
} else {
|
440
|
-
//tag)
|
441
|
-
|
442
|
-
condition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
443
|
-
condition = 'tui.f_userinfo_id in (' + condition + ')'
|
444
|
-
//tag
|
445
|
-
}
|
446
|
-
let data = {
|
447
|
-
checkBook: this.checkBook,
|
448
|
-
sqlStr: condition
|
449
|
-
}
|
450
|
-
new HttpResetClass().load('post', 'rs/logic/AddCheckBook', {data}).then(res => {
|
451
|
-
//tag)
|
452
|
-
if (res.data.id) {
|
453
|
-
this.$showMessage('创建成功')
|
454
|
-
this.showModal = false
|
455
|
-
this.isSearch = false
|
456
|
-
this.bookList = []
|
457
|
-
this.bookAll = false
|
458
|
-
this.freshCheckBook()
|
459
|
-
this.$refs.paged.$refs.criteria.search()
|
460
|
-
}
|
461
|
-
})
|
462
|
-
},
|
463
|
-
changeState (val) {
|
464
|
-
//tag
|
465
|
-
//tag
|
466
|
-
this.bookAll = false
|
467
|
-
this.bookList = []
|
468
|
-
if (this.$refs.paged.$refs.criteria.model.f_orgid){
|
469
|
-
this.$refs.paged.$refs.criteria.search()
|
470
|
-
}
|
471
|
-
},
|
472
|
-
cancel () {
|
473
|
-
this.bookAll = false
|
474
|
-
this.bookList = []
|
475
|
-
this.showModal = false
|
476
|
-
this.$refs.paged.$refs.criteria.search()
|
477
|
-
},
|
478
|
-
checkModel (row) {
|
479
|
-
if (this.bookAll) {
|
480
|
-
//tag)
|
481
|
-
return true
|
482
|
-
} else {
|
483
|
-
if (this.bookList.findIndex(res => res === row.id) !== -1) {
|
484
|
-
return true
|
485
|
-
} else {
|
486
|
-
return false
|
487
|
-
}
|
488
|
-
}
|
489
|
-
},
|
490
|
-
checkChange (row, e) {
|
491
|
-
//tag
|
492
|
-
if (e.target.checked) {
|
493
|
-
this.bookList.push(row.id)
|
494
|
-
} else {
|
495
|
-
this.bookList.splice(this.bookList.findIndex(res => res === row.id), 1)
|
496
|
-
}
|
497
|
-
// //tag)
|
498
|
-
},
|
499
|
-
getRes (obj) {
|
500
|
-
this.checkBook.f_orgid = obj.resids[0]
|
501
|
-
},
|
502
|
-
getResm (obj) {
|
503
|
-
this.$refs.paged.$refs.criteria.model.f_orgid = this.$login.convertToIn(obj.resids)
|
504
|
-
},
|
505
|
-
hidden () {
|
506
|
-
this.criteriaShow = !this.criteriaShow
|
507
|
-
},
|
508
|
-
selfSearch (args) {
|
509
|
-
this.isSearch = true
|
510
|
-
this.bookAll = false
|
511
|
-
this.bookList = []
|
512
|
-
|
513
|
-
console.log("查询66666666666666666")
|
514
|
-
this.$emit('book-condition',args.condition)
|
515
|
-
// if (this.$refs.paged.$refs.criteria.model.f_orgid){
|
516
|
-
// args.condition += `f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`
|
517
|
-
// }
|
518
|
-
this.model.search(args.condition, args.model)
|
519
|
-
},
|
520
|
-
freshCheckBook () {
|
521
|
-
this.checkBooks = []
|
522
|
-
new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
|
523
|
-
data: {
|
524
|
-
items: 'id,f_check_book_name',
|
525
|
-
tablename: 't_check_book',
|
526
|
-
condition: this.$refs.paged.$refs.criteria.model.f_orgid?`f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`:'1=1',
|
527
|
-
orderitem: 'id desc'
|
528
|
-
}
|
529
|
-
}, {resolveMsg: null, rejectMsg: null}).then(res => {
|
530
|
-
this.checkBooks.push({label: '全部', value: ''})
|
531
|
-
res.data.forEach(ress => {
|
532
|
-
this.checkBooks.push({
|
533
|
-
label: ress.f_check_book_name,
|
534
|
-
value: ress.id
|
535
|
-
})
|
536
|
-
})
|
537
|
-
})
|
538
|
-
}
|
539
|
-
},
|
540
|
-
|
541
|
-
ready () {
|
542
|
-
bus.$on('fresh-area',()=>{
|
543
|
-
console.log("进入方法",this.bookAll,this.bookList)
|
544
|
-
this.bookAll = false
|
545
|
-
this.bookList = []
|
546
|
-
this.$refs.paged.$refs.criteria.search()
|
547
|
-
})
|
548
|
-
this.$refs.paged.$refs.criteria.model.f_is_checkbook = 'f_check_book_id is null'
|
549
|
-
//tag
|
550
|
-
// this.init=true
|
551
|
-
this.freshCheckBook()
|
552
|
-
}
|
553
|
-
}
|
554
|
-
</script>
|
555
|
-
<style scoped>
|
556
|
-
/*.btn-group > .btn:first-child {*/
|
557
|
-
/* margin-left: 0;*/
|
558
|
-
/* width: 100%;*/
|
559
|
-
/*}*/
|
560
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div class="flex-row">
|
3
|
+
<div class="basic-main">
|
4
|
+
<criteria-paged :model="model" v-ref:paged>
|
5
|
+
<criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
|
6
|
+
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
7
|
+
<div class="row">
|
8
|
+
|
9
|
+
<div class="col-sm-3 form-group" style="margin-bottom: 0px">
|
10
|
+
<label class="font_normal_body">公  司</label>
|
11
|
+
<right-tree-safe @re-res="$parent.$parent.getResm" v-model="model.f_orgid" condition="ta.f_orgid in {}"></right-tree-safe>
|
12
|
+
</div>
|
13
|
+
<div class="form-group col-sm-3">
|
14
|
+
<label class="font_normal_body">小区名称</label>
|
15
|
+
<input type="text" class="input_search" v-model="model.f_residential_area"
|
16
|
+
style="width: 60%" placeholder="小区名称" condition="f_residential_area like '%{}%'">
|
17
|
+
</div>
|
18
|
+
<div class="form-group col-sm-3">
|
19
|
+
<label class="font_normal_body">是否在册</label>
|
20
|
+
<v-select :value.sync="model.f_is_checkbook" v-model='model.f_is_checkbook'
|
21
|
+
:value-single="true" style="width: 60%"
|
22
|
+
class="select_list select"
|
23
|
+
@change="$parent.$parent.changeState"
|
24
|
+
:options='$parent.$parent.isCheckBook' placeholder='有无所属安检册'
|
25
|
+
close-on-select
|
26
|
+
condition="{}"></v-select>
|
27
|
+
</div>
|
28
|
+
<div class="form-group col-sm-3">
|
29
|
+
<button class="button_spacing button_search" @click="search()">查询</button>
|
30
|
+
<!-- <div style="float: right" class="button_spacing"
|
31
|
+
:class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
|
32
|
+
@click="$parent.$parent.hidden()"></div>-->
|
33
|
+
</div>
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</criteria>
|
41
|
+
<data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
|
42
|
+
<template partial='head'>
|
43
|
+
<tr @dblclick.stop="">
|
44
|
+
<th>
|
45
|
+
<nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookAll"></input>全选</nobr>
|
46
|
+
</th>
|
47
|
+
<th>
|
48
|
+
<nobr>区/县</nobr>
|
49
|
+
</th>
|
50
|
+
<th>
|
51
|
+
<nobr>街道/乡镇</nobr>
|
52
|
+
</th>
|
53
|
+
<th>
|
54
|
+
<nobr>片区/行政村</nobr>
|
55
|
+
</th>
|
56
|
+
<th>
|
57
|
+
<nobr>小区/自然村</nobr>
|
58
|
+
</th>
|
59
|
+
<th>
|
60
|
+
<nobr>所属安检册</nobr>
|
61
|
+
</th>
|
62
|
+
</tr>
|
63
|
+
</template>
|
64
|
+
<template partial='body'>
|
65
|
+
<td style="text-align: center">
|
66
|
+
<nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
|
67
|
+
@change="$parent.$parent.$parent.checkChange(row, $event)"></input>
|
68
|
+
</nobr>
|
69
|
+
</td>
|
70
|
+
<td style="text-align: center">{{ row.f_pcd }}</td>
|
71
|
+
<td style="text-align: center">{{ row.f_street }}</td>
|
72
|
+
<td style="text-align: center">{{ row.f_community_name }}</td>
|
73
|
+
<td style="text-align: center">{{ row.f_residential_area }}</td>
|
74
|
+
<td style="text-align: center">{{ row.f_check_book_name }}</td>
|
75
|
+
</template>
|
76
|
+
</data-grid>
|
77
|
+
</criteria-paged>
|
78
|
+
</div>
|
79
|
+
<modal :show.sync="showModal" :backdrop="false">
|
80
|
+
<div slot="modal-header" class="modal-header">
|
81
|
+
<h4 class="modal-title">
|
82
|
+
创建安检册
|
83
|
+
</h4>
|
84
|
+
</div>
|
85
|
+
<div slot="modal-body" class="modal-body">
|
86
|
+
<div v-if="true">
|
87
|
+
<div class="row" style="margin-top: 10px">
|
88
|
+
|
89
|
+
<div class="col-sm-12 form-group" style="margin: 0">
|
90
|
+
<role-selector-safe
|
91
|
+
@re-res="getRes"
|
92
|
+
role-name="安检员"
|
93
|
+
role-lable="安 检 员 "
|
94
|
+
:value.sync="checkBook.f_checker_name"
|
95
|
+
v-model="checkBook.f_checker_name">
|
96
|
+
</role-selector-safe>
|
97
|
+
</div>
|
98
|
+
<div class="form-group col-sm-6" style="margin-top: 20px">
|
99
|
+
<label class="font_normal_body">安检册名</label>
|
100
|
+
<input type="text" class="input_search" v-model="checkBook.f_check_book_name"
|
101
|
+
style="width: 60%" >
|
102
|
+
</div>
|
103
|
+
<div class="form-group col-sm-6" style="margin-top: 20px">
|
104
|
+
<label class="font_normal_body">执行日期</label>
|
105
|
+
<datepicker
|
106
|
+
:value.sync="checkBook.f_run_date"
|
107
|
+
style="width: 60%"
|
108
|
+
:format="'yyyy-MM-dd'"
|
109
|
+
v-model="checkBook.f_run_date"
|
110
|
+
>
|
111
|
+
</datepicker>
|
112
|
+
</div>
|
113
|
+
<div class="form-group col-sm-6" style="margin-top: 20px">
|
114
|
+
<label class="font_normal_body">执行周期</label>
|
115
|
+
<input type="number" class="input_search" v-model="checkBook.f_around_time"
|
116
|
+
style="width: 60%" >
|
117
|
+
</div>
|
118
|
+
<div class="form-group col-sm-6" style="margin-top: 20px">
|
119
|
+
<label class="font_normal_body">周期单位</label>
|
120
|
+
<v-select :value.sync="checkBook.f_around_unit" v-model='checkBook.f_around_unit'
|
121
|
+
:value-single="true" style="width: 60%"
|
122
|
+
class="select_list select"
|
123
|
+
:options='aroundUnit' placeholder=''
|
124
|
+
close-on-select></v-select>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
130
|
+
<button class="button_search" style="margin-right: 20px" @click="ok">确认</button>
|
131
|
+
<button class="button_search" @click="cancel">取消</button>
|
132
|
+
</div>
|
133
|
+
</modal>
|
134
|
+
<modal :show.sync="showModal2" :backdrop="false">
|
135
|
+
<div slot="modal-header" class="modal-header">
|
136
|
+
<h4 class="modal-title">
|
137
|
+
添加用户
|
138
|
+
</h4>
|
139
|
+
</div>
|
140
|
+
<div slot="modal-body" class="modal-body">
|
141
|
+
<div v-if="true">
|
142
|
+
<div class="row" style="margin-top: 10px">
|
143
|
+
<div class="form-group col-sm-12" style="margin-top: 20px">
|
144
|
+
<label class="font_normal_body">安 检 册</label>
|
145
|
+
<v-select :value.sync="selectBook" v-model='selectBook'
|
146
|
+
:value-single="true" style="width: 80%"
|
147
|
+
class="select_list select"
|
148
|
+
:options='checkBooks' placeholder=''
|
149
|
+
close-on-select></v-select>
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
155
|
+
<button class="button_search" style="margin-right: 20px" @click="ok2">确认</button>
|
156
|
+
<button class="button_search" @click="cancel2">取消</button>
|
157
|
+
</div>
|
158
|
+
</modal>
|
159
|
+
<modal :show.sync="showModal3" :backdrop="false">
|
160
|
+
<div slot="modal-header" class="modal-header">
|
161
|
+
<h4 class="modal-title">
|
162
|
+
调整用户
|
163
|
+
</h4>
|
164
|
+
</div>
|
165
|
+
<div slot="modal-body" class="modal-body">
|
166
|
+
<div v-if="true">
|
167
|
+
<div class="row" style="margin-top: 10px;text-align: center">
|
168
|
+
<div class="form-group col-sm-12" style="margin-top: 20px">
|
169
|
+
<label class="font_normal_body">安 检 册</label>
|
170
|
+
<v-select :value.sync="selectBook" v-model='selectBook'
|
171
|
+
:value-single="true" style="width: 80%"
|
172
|
+
class="select_list select"
|
173
|
+
:options='checkBooks' placeholder=''
|
174
|
+
close-on-select></v-select>
|
175
|
+
</div>
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
180
|
+
<button class="button_search" style="margin-right: 20px" @click="ok3">确认</button>
|
181
|
+
<button class="button_search" @click="cancel3">取消</button>
|
182
|
+
</div>
|
183
|
+
</modal>
|
184
|
+
|
185
|
+
</div>
|
186
|
+
</template>
|
187
|
+
|
188
|
+
<script>
|
189
|
+
import {PagedList, HttpResetClass} from 'vue-client'
|
190
|
+
import * as Util from '../../../components/Util'
|
191
|
+
import bus from "../../../bus";
|
192
|
+
|
193
|
+
export default {
|
194
|
+
title: '安检册管理',
|
195
|
+
data () {
|
196
|
+
let model = new PagedList('rs/sql/safe_singleTable_OrderBy', 20,{
|
197
|
+
items: "'ta.f_residential_area,ta.id,tcb.f_check_book_name,tcm.f_community_name,tcm.f_street'",
|
198
|
+
tablename: "'t_area ta left join t_check_book tcb on ta.f_check_book_id=tcb.id left join t_community tcm on ta.f_community_id = tcm.id'",
|
199
|
+
orderitem: "'id desc'"
|
200
|
+
})
|
201
|
+
return {
|
202
|
+
model: model,
|
203
|
+
criteriaShow: false,
|
204
|
+
excelHeaders: {},
|
205
|
+
checkBooks: [],
|
206
|
+
f_orgid: '',
|
207
|
+
bookAll: false,
|
208
|
+
bookList: [],
|
209
|
+
selectBook:'',
|
210
|
+
// init:false,
|
211
|
+
aroundUnit: [{label: '年', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '月'}],
|
212
|
+
isCheckBook: [{label: '全部', value: ''}, {label: '是', value: 'f_check_book_id is not null'}, {label: '否', value: 'f_check_book_id is null'}],
|
213
|
+
isSearch: false,
|
214
|
+
checkBook: {
|
215
|
+
f_check_book_name: '',
|
216
|
+
f_run_date: '',
|
217
|
+
f_around_time: '',
|
218
|
+
f_around_unit: '',
|
219
|
+
f_create_date: Util.toStandardDateString(),
|
220
|
+
f_create_person: this.$login.f.name,
|
221
|
+
f_orgid: '',
|
222
|
+
f_checker_name: ''
|
223
|
+
},
|
224
|
+
showModal: false,
|
225
|
+
showModal2: false,
|
226
|
+
showModal3: false
|
227
|
+
}
|
228
|
+
},
|
229
|
+
beforeDestroy() {
|
230
|
+
//tag
|
231
|
+
bus.$off('fresh-area')
|
232
|
+
},
|
233
|
+
computed: {
|
234
|
+
searchData () {
|
235
|
+
return {condition: this.model.condition}
|
236
|
+
},
|
237
|
+
bookCondition () {
|
238
|
+
return this.model.condition
|
239
|
+
},
|
240
|
+
isCreateBook () {
|
241
|
+
return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is null'
|
242
|
+
},
|
243
|
+
isChangeBook () {
|
244
|
+
return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is not null'
|
245
|
+
}
|
246
|
+
},
|
247
|
+
watch:{
|
248
|
+
'bookList'(){
|
249
|
+
this.$emit('book-list',this.bookList)
|
250
|
+
},
|
251
|
+
'bookAll'(val){
|
252
|
+
if(!val){
|
253
|
+
this.bookList=[]
|
254
|
+
}
|
255
|
+
this.$emit('book-all',this.bookAll)
|
256
|
+
}
|
257
|
+
},
|
258
|
+
methods: {
|
259
|
+
async ok2() {
|
260
|
+
if (!this.selectBook) {
|
261
|
+
this.$showMessage('请选择安检册')
|
262
|
+
return
|
263
|
+
}
|
264
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
265
|
+
let userCondition = ''
|
266
|
+
if (this.bookList.length < 1) {
|
267
|
+
//tag
|
268
|
+
userCondition = this.bookCondition
|
269
|
+
} else {
|
270
|
+
//tag)
|
271
|
+
|
272
|
+
userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
273
|
+
userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
|
274
|
+
//tag
|
275
|
+
}
|
276
|
+
let addUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
|
277
|
+
FROM
|
278
|
+
t_userinfo tui
|
279
|
+
LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
|
280
|
+
LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
|
281
|
+
LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
|
282
|
+
WHERE
|
283
|
+
tui.f_user_state = '正常'
|
284
|
+
AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
|
285
|
+
AND ${userCondition}`
|
286
|
+
await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: addUser}},
|
287
|
+
{resolveMsg: null, rejectMsg: '添加用户失败'})
|
288
|
+
this.$showMessage('添加用户成功')
|
289
|
+
this.selectBook = ''
|
290
|
+
this.bookAll = false
|
291
|
+
this.bookList = []
|
292
|
+
this.showModal2 = false
|
293
|
+
this.$refs.paged.$refs.criteria.search()
|
294
|
+
}
|
295
|
+
},
|
296
|
+
async ok3() {
|
297
|
+
if (!this.selectBook) {
|
298
|
+
this.$showMessage('请选择安检册')
|
299
|
+
return
|
300
|
+
}
|
301
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
302
|
+
let userCondition = ''
|
303
|
+
if (this.bookList.length < 1) {
|
304
|
+
//tag
|
305
|
+
userCondition = this.bookCondition
|
306
|
+
} else {
|
307
|
+
//tag)
|
308
|
+
|
309
|
+
userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
310
|
+
userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
|
311
|
+
//tag
|
312
|
+
}
|
313
|
+
let upUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
|
314
|
+
FROM
|
315
|
+
t_userinfo tui
|
316
|
+
LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
|
317
|
+
LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
|
318
|
+
LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
|
319
|
+
WHERE
|
320
|
+
tui.f_user_state = '正常'
|
321
|
+
AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
|
322
|
+
AND ${userCondition}`
|
323
|
+
await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: upUser}},
|
324
|
+
{resolveMsg: null, rejectMsg: '调整用户失败'})
|
325
|
+
this.$showMessage('调整用户成功')
|
326
|
+
this.selectBook = ''
|
327
|
+
this.bookAll = false
|
328
|
+
this.bookList = []
|
329
|
+
this.showModal3 = false
|
330
|
+
this.$refs.paged.$refs.criteria.search()
|
331
|
+
}
|
332
|
+
},
|
333
|
+
cancel2(){
|
334
|
+
this.selectBook = ''
|
335
|
+
this.bookAll = false
|
336
|
+
this.bookList = []
|
337
|
+
this.showModal2 = false
|
338
|
+
this.$refs.paged.$refs.criteria.search()
|
339
|
+
},
|
340
|
+
cancel3(){
|
341
|
+
this.selectBook = ''
|
342
|
+
this.bookAll = false
|
343
|
+
this.bookList = []
|
344
|
+
this.showModal3 = false
|
345
|
+
this.$refs.paged.$refs.criteria.search()
|
346
|
+
},
|
347
|
+
addUser () {
|
348
|
+
if (!this.isCreateBook) {
|
349
|
+
this.$showMessage('请选择查询未划分安检册的用户')
|
350
|
+
return
|
351
|
+
}
|
352
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
353
|
+
this.showModal2 = true
|
354
|
+
this.freshCheckBook()
|
355
|
+
return
|
356
|
+
}
|
357
|
+
this.$showMessage('请选择用户')
|
358
|
+
},
|
359
|
+
upUser () {
|
360
|
+
if (!this.isChangeBook) {
|
361
|
+
this.$showMessage('请选择查询已划分安检册的用户')
|
362
|
+
return
|
363
|
+
}
|
364
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
365
|
+
this.showModal3 = true
|
366
|
+
this.freshCheckBook()
|
367
|
+
return
|
368
|
+
}
|
369
|
+
this.$showMessage('请选择用户')
|
370
|
+
},
|
371
|
+
async delUser () {
|
372
|
+
if (!this.isChangeBook) {
|
373
|
+
this.$showMessage('请选择查询已划分安检册的用户')
|
374
|
+
return
|
375
|
+
}
|
376
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
377
|
+
let userCondition= ''
|
378
|
+
if (this.bookList.length < 1) {
|
379
|
+
//tag
|
380
|
+
userCondition = this.bookCondition
|
381
|
+
} else {
|
382
|
+
//tag)
|
383
|
+
|
384
|
+
userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
385
|
+
userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
|
386
|
+
//tag
|
387
|
+
}
|
388
|
+
let delUser= `update t_user_address set f_check_book_id =null
|
389
|
+
FROM
|
390
|
+
t_userinfo tui
|
391
|
+
LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
|
392
|
+
LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
|
393
|
+
LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
|
394
|
+
WHERE
|
395
|
+
tui.f_user_state = '正常'
|
396
|
+
AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
|
397
|
+
AND ${userCondition}`
|
398
|
+
await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: delUser}},
|
399
|
+
{resolveMsg: null, rejectMsg: '删除安检册失败'})
|
400
|
+
this.$showMessage('从安检册删除所选用户成功')
|
401
|
+
this.selectBook = ''
|
402
|
+
this.bookAll = false
|
403
|
+
this.bookList = []
|
404
|
+
this.showModal3 = false
|
405
|
+
this.$refs.paged.$refs.criteria.search()
|
406
|
+
return
|
407
|
+
}
|
408
|
+
this.$showMessage('请选择用户')
|
409
|
+
},
|
410
|
+
beforeCreateBook () {
|
411
|
+
if (!this.isCreateBook) {
|
412
|
+
this.$showMessage('请选择查询未划分安检册的用户')
|
413
|
+
return
|
414
|
+
}
|
415
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
416
|
+
this.showModal = true
|
417
|
+
return
|
418
|
+
}
|
419
|
+
this.$showMessage('请选择用户')
|
420
|
+
},
|
421
|
+
ok () {
|
422
|
+
//tag)
|
423
|
+
let condition = ''
|
424
|
+
if (!this.checkBook.f_check_book_name) {
|
425
|
+
return this.$showMessage('请填写册名')
|
426
|
+
}
|
427
|
+
if (!this.checkBook.f_checker_name) {
|
428
|
+
return this.$showMessage('请选择安检员')
|
429
|
+
}
|
430
|
+
if (!this.checkBook.f_around_time || !this.checkBook.f_around_unit) {
|
431
|
+
return this.$showMessage('请选填写周期信息')
|
432
|
+
}
|
433
|
+
if (!this.checkBook.f_run_date) {
|
434
|
+
return this.$showMessage('执行日期')
|
435
|
+
}
|
436
|
+
if (this.bookList.length < 1) {
|
437
|
+
//tag
|
438
|
+
condition = this.bookCondition
|
439
|
+
} else {
|
440
|
+
//tag)
|
441
|
+
|
442
|
+
condition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
443
|
+
condition = 'tui.f_userinfo_id in (' + condition + ')'
|
444
|
+
//tag
|
445
|
+
}
|
446
|
+
let data = {
|
447
|
+
checkBook: this.checkBook,
|
448
|
+
sqlStr: condition
|
449
|
+
}
|
450
|
+
new HttpResetClass().load('post', 'rs/logic/AddCheckBook', {data}).then(res => {
|
451
|
+
//tag)
|
452
|
+
if (res.data.id) {
|
453
|
+
this.$showMessage('创建成功')
|
454
|
+
this.showModal = false
|
455
|
+
this.isSearch = false
|
456
|
+
this.bookList = []
|
457
|
+
this.bookAll = false
|
458
|
+
this.freshCheckBook()
|
459
|
+
this.$refs.paged.$refs.criteria.search()
|
460
|
+
}
|
461
|
+
})
|
462
|
+
},
|
463
|
+
changeState (val) {
|
464
|
+
//tag
|
465
|
+
//tag
|
466
|
+
this.bookAll = false
|
467
|
+
this.bookList = []
|
468
|
+
if (this.$refs.paged.$refs.criteria.model.f_orgid){
|
469
|
+
this.$refs.paged.$refs.criteria.search()
|
470
|
+
}
|
471
|
+
},
|
472
|
+
cancel () {
|
473
|
+
this.bookAll = false
|
474
|
+
this.bookList = []
|
475
|
+
this.showModal = false
|
476
|
+
this.$refs.paged.$refs.criteria.search()
|
477
|
+
},
|
478
|
+
checkModel (row) {
|
479
|
+
if (this.bookAll) {
|
480
|
+
//tag)
|
481
|
+
return true
|
482
|
+
} else {
|
483
|
+
if (this.bookList.findIndex(res => res === row.id) !== -1) {
|
484
|
+
return true
|
485
|
+
} else {
|
486
|
+
return false
|
487
|
+
}
|
488
|
+
}
|
489
|
+
},
|
490
|
+
checkChange (row, e) {
|
491
|
+
//tag
|
492
|
+
if (e.target.checked) {
|
493
|
+
this.bookList.push(row.id)
|
494
|
+
} else {
|
495
|
+
this.bookList.splice(this.bookList.findIndex(res => res === row.id), 1)
|
496
|
+
}
|
497
|
+
// //tag)
|
498
|
+
},
|
499
|
+
getRes (obj) {
|
500
|
+
this.checkBook.f_orgid = obj.resids[0]
|
501
|
+
},
|
502
|
+
getResm (obj) {
|
503
|
+
this.$refs.paged.$refs.criteria.model.f_orgid = this.$login.convertToIn(obj.resids)
|
504
|
+
},
|
505
|
+
hidden () {
|
506
|
+
this.criteriaShow = !this.criteriaShow
|
507
|
+
},
|
508
|
+
selfSearch (args) {
|
509
|
+
this.isSearch = true
|
510
|
+
this.bookAll = false
|
511
|
+
this.bookList = []
|
512
|
+
|
513
|
+
console.log("查询66666666666666666")
|
514
|
+
this.$emit('book-condition',args.condition)
|
515
|
+
// if (this.$refs.paged.$refs.criteria.model.f_orgid){
|
516
|
+
// args.condition += `f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`
|
517
|
+
// }
|
518
|
+
this.model.search(args.condition, args.model)
|
519
|
+
},
|
520
|
+
freshCheckBook () {
|
521
|
+
this.checkBooks = []
|
522
|
+
new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
|
523
|
+
data: {
|
524
|
+
items: 'id,f_check_book_name',
|
525
|
+
tablename: 't_check_book',
|
526
|
+
condition: this.$refs.paged.$refs.criteria.model.f_orgid?`f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`:'1=1',
|
527
|
+
orderitem: 'id desc'
|
528
|
+
}
|
529
|
+
}, {resolveMsg: null, rejectMsg: null}).then(res => {
|
530
|
+
this.checkBooks.push({label: '全部', value: ''})
|
531
|
+
res.data.forEach(ress => {
|
532
|
+
this.checkBooks.push({
|
533
|
+
label: ress.f_check_book_name,
|
534
|
+
value: ress.id
|
535
|
+
})
|
536
|
+
})
|
537
|
+
})
|
538
|
+
}
|
539
|
+
},
|
540
|
+
|
541
|
+
ready () {
|
542
|
+
bus.$on('fresh-area',()=>{
|
543
|
+
console.log("进入方法",this.bookAll,this.bookList)
|
544
|
+
this.bookAll = false
|
545
|
+
this.bookList = []
|
546
|
+
this.$refs.paged.$refs.criteria.search()
|
547
|
+
})
|
548
|
+
this.$refs.paged.$refs.criteria.model.f_is_checkbook = 'f_check_book_id is null'
|
549
|
+
//tag
|
550
|
+
// this.init=true
|
551
|
+
this.freshCheckBook()
|
552
|
+
}
|
553
|
+
}
|
554
|
+
</script>
|
555
|
+
<style scoped>
|
556
|
+
/*.btn-group > .btn:first-child {*/
|
557
|
+
/* margin-left: 0;*/
|
558
|
+
/* width: 100%;*/
|
559
|
+
/*}*/
|
560
|
+
</style>
|