safecheck-client 3.0.33-103 → 3.0.33-106

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.
@@ -222,6 +222,15 @@
222
222
  style="width:60%">
223
223
  </datepicker>
224
224
  </div>
225
+ <div :class="$parent.$parent.style">
226
+ <label class="font_normal_body">用户类型</label>
227
+ <v-select :value.sync="model.f_check_type" v-model='model.f_check_type'
228
+ :value-single="true" style="width: 60%"
229
+ class="select_list select"
230
+ :options='$parent.$parent.checktype' placeholder='客户类型'
231
+ close-on-select
232
+ condition="f_check_type = '{}'"></v-select>
233
+ </div>
225
234
  </div>
226
235
 
227
236
  <div v-show="$parent.$parent.$parent.showItem" class="row">
@@ -638,6 +647,7 @@ export default {
638
647
  model.f_filialeids = '(' + this.$login.f.orgid + ')'
639
648
  model.f_defect_content = "CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
640
649
  return {
650
+ checktype: this.$appdata.getParam('用户类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]:[{label: '全部', value: ''}],
641
651
  quyus: [{label: '请选择', value: ''}, ...this.$appdata.getParam('区域')],
642
652
  bumens: [{label: '请选择', value: ''}],
643
653
  teams: [{label: '请选择', value: ''}],
@@ -710,14 +720,15 @@ export default {
710
720
  label: '请选择',
711
721
  value: ''
712
722
  }, ...this.$appdata.getParam(`工单-` + val)] : [{label: '请选择', value: ''}]
723
+ }else {
724
+ this.checkers = this.allCheckers
713
725
  }
714
726
  },
715
727
  teamChange(val) {
716
728
  if (val) {
717
- this.checkers = this.$appdata.getParam(val) ? [{
718
- label: '请选择',
719
- value: ''
720
- }, ...this.$appdata.getParam(val)] : [{label: '请选择', value: ''}]
729
+ this.checkers = this.$appdata.getParam(val) ? [...this.$appdata.getParam(val)] : [{label: '请选择', value: ''}]
730
+ }else {
731
+ this.checkers = this.allCheckers
721
732
  }
722
733
  },
723
734
  quyuChange(val) {
@@ -726,6 +737,8 @@ export default {
726
737
  label: '请选择',
727
738
  value: ''
728
739
  }, ...this.$appdata.getParam(val)] : [{label: '请选择', value: ''}]
740
+ }else {
741
+ this.checkers = this.allCheckers
729
742
  }
730
743
  },
731
744
  trouble(val) {
@@ -0,0 +1,256 @@
1
+ <template>
2
+ <div id='app' class="basic-main" style="height: 100%">
3
+ <criteria-paged :model="model" :pager='false'>
4
+ <criteria partial='criteria' @condition-changed='search' class="search_area">
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <!-- <div class="col-sm-4 form-group">-->
8
+ <!-- <role-selector-safe-->
9
+ <!-- role-name="安检员"-->
10
+ <!-- role-lable="安&ensp;检&ensp;员"-->
11
+ <!-- @re-res="$parent.$parent.getRes"-->
12
+ <!-- :value.sync="model.f_checker_id"-->
13
+ <!-- v-model="model.f_checker_id"-->
14
+ <!-- condition="f_checker_name like '%{}%'">-->
15
+ <!-- </role-selector-safe>-->
16
+ <!-- </div>-->
17
+ <div class="form-group col-sm-2" >
18
+ <label class="font_normal_body" >区&emsp;&emsp;域</label>
19
+ <v-select :value.sync="model.f_quyu" :value-single="true" v-model="model.f_quyu"
20
+ :options='$parent.$parent.quyus' placeholder='区域' class="select_list select" style="width: 60%"
21
+ @change="$parent.$parent.quyuChange"
22
+ close-on-select>
23
+ </v-select>
24
+ </div>
25
+ <div class="form-group col-sm-2" >
26
+ <label class="font_normal_body" >营&ensp;业&ensp;厅</label>
27
+ <v-select :value.sync="model.f_bumen" :value-single="true" v-model="model.f_bumen"
28
+ :options='$parent.$parent.bumens' placeholder='营业厅'
29
+ @change="$parent.$parent.bumenChange" class="select_list select" style="width: 60%"
30
+ close-on-select>
31
+ </v-select>
32
+ </div>
33
+ <div class="form-group col-sm-2" >
34
+ <label class="font_normal_body">小&emsp;&emsp;组</label>
35
+ <v-select :value.sync="model.f_team" :value-single="true" v-model="model.f_team"
36
+ :options='$parent.$parent.teams' placeholder='小组'
37
+ @change="$parent.$parent.teamChange" class="select_list select" style="width: 60%"
38
+ close-on-select>
39
+ </v-select>
40
+ </div>
41
+ <div class="form-group col-sm-2" >
42
+ <label class="font_normal_body" >安&ensp;检&ensp;员</label>
43
+ <v-select :value.sync="model.f_checker_id" v-model="model.f_checker_id"
44
+ :multiple="true" class="select_list select" style="width: 60%"
45
+ :options='$parent.$parent.checkers' placeholder='安检员' condition="f_checker_name in {}"
46
+ close-on-select>
47
+ </v-select>
48
+ </div>
49
+ <div class="col-sm-2 form-group">
50
+ <label for="startDate" class="font_normal_body">开始日期:</label>
51
+ <datepicker id="startDate" placeholder="开始日期"
52
+ v-model="model.startDate"
53
+ :value.sync="model.startDate"
54
+ style="width: 60%;"
55
+ :disabled-days-of-Week="[]"
56
+ :format="'yyyy-MM-dd 00:00:00'"
57
+ :show-reset-button="reset">
58
+ </datepicker>
59
+ </div>
60
+ <div class="col-sm-2 form-group">
61
+ <label for="endDate" class="font_normal_body">结束日期:</label>
62
+ <datepicker id="endDate" placeholder="结束日期"
63
+ v-model="model.endDate"
64
+ :value.sync="model.endDate"
65
+ :disabled-days-of-Week="[]"
66
+ style="width: 60%;"
67
+ :format="'yyyy-MM-dd 23:59:59'"
68
+ :show-reset-button="reset">
69
+ </datepicker>
70
+ </div>
71
+ <div class="col-sm-2 form-group" >
72
+ <label class="font_normal_body">用气性质</label>
73
+ <v-select
74
+ class="select_list select"
75
+ placeholder='用气性质' style="width: 60%"
76
+ v-model='model.userType'
77
+ :value.sync="model.userType"
78
+ :options='$parent.$parent.userTypes'
79
+ condition="tuf.f_gasproperties in {} "
80
+ :multiple="true"
81
+ ></v-select>
82
+ </div>
83
+ <div class="col-sm-2 form-group" >
84
+ <label class="font_normal_body">气表类型</label>
85
+ <v-select
86
+ class="select_list select"
87
+ placeholder='气表类型' style="width: 60%"
88
+ v-model='model.tableType'
89
+ :value.sync="model.tableType"
90
+ :options='$parent.$parent.tableTypes'
91
+ condition="tuf.f_meter_classify = '{}'"
92
+ :value-single="true"
93
+ close-on-select clear-button></v-select>
94
+ </div>
95
+ <div class="col-sm-2 form-group" >
96
+ <label class="font_normal_body">气表品牌</label>
97
+ <v-select
98
+ class="select_list select"
99
+ placeholder='气表类型' style="width: 60%"
100
+ v-model='model.tableBrand'
101
+ :value.sync="model.tableBrand"
102
+ :options='$parent.$parent.tableBrands'
103
+ condition="gb.f_meter_brand = '{}'"
104
+ :value-single="true"
105
+ close-on-select clear-button></v-select>
106
+ </div>
107
+ <div class="col-sm-2 form-group" >
108
+ <label class="font_normal_body">用户类型</label>
109
+ <v-select :value.sync="model.f_check_type" v-model='model.f_check_type'
110
+ :value-single="true" style="width: 60%"
111
+ class="select_list select"
112
+ :options='$parent.$parent.checktype' placeholder='客户类型'
113
+ close-on-select
114
+ condition="f_check_type = '{}'"></v-select>
115
+ </div>
116
+ <div class="col-sm-4 form-group" style="margin-top: 8px">
117
+ <button class="button_search button_spacing" @click="search()">查询</button>
118
+ <report-print class="button_export button_spacing" style="width:28%" id='shexian'></report-print>
119
+ <report-excel class="button_export button_spacing" style="width:28%" id='shexian'></report-excel>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ </criteria>
124
+ <div partial='list' id='shexian' class="list_area" style="overflow-y: scroll">
125
+ <table class='tableprint' style="margin: 0px auto">
126
+ <thead>
127
+ <tr>
128
+ <th colspan='5' style="font-weight: normal; text-align: left;">
129
+ <h3 style="text-align: center">隐患报表</h3>
130
+ </th>
131
+ </tr>
132
+ <tr>
133
+ <th colspan='5' style="font-weight: normal; text-align: center;">
134
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
135
+ 结束时间:{{ model.model.endDate }}
136
+ </th>
137
+ </tr>
138
+ </thead>
139
+ <tr>
140
+ <th colspan='5' style="font-weight: normal;">
141
+ {{{ model.data.substring(26,model.data.length-8) }}}
142
+ </th>
143
+ </tr>
144
+ </table>
145
+ </div>
146
+ </criteria-paged>
147
+ </div>
148
+
149
+ </template>
150
+
151
+ <script>
152
+ import {DataModel, HttpResetClass} from 'vue-client'
153
+
154
+ export default {
155
+ title: '隐患报表',
156
+ data () {
157
+
158
+ let model = new DataModel('rs/report/hiddensituation', {
159
+ startDate: 'this.model.startDate',
160
+ endDate: 'this.model.endDate',
161
+ f_filialeid: 'this.f_filialeid'
162
+ })
163
+ model.f_filialeid = '(' + this.$login.f.orgid + ')'
164
+ return {
165
+ checktype: this.$appdata.getParam('用户类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]:[{label: '全部', value: ''}],
166
+ allCheckers: [{label: '请选择', value: ''}],
167
+ quyus: [{label: '请选择', value: ''}, ...this.$appdata.getParam('区域')],
168
+ bumens: [{label: '请选择', value: ''}],
169
+ teams: [{label: '请选择', value: ''}],
170
+ checkers:[{label: '请选择', value: ''}],
171
+ userTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
172
+ tableTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')],
173
+ tableBrands: [{label: '全部', value: ''}],
174
+ filialeNameStr: '',
175
+ filialeCodeStr: '',
176
+ userid: this.$login.f.id,
177
+ source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() == $organization$))`,
178
+ model: model
179
+ }
180
+ },
181
+ methods: {
182
+ bumenChange(val) {
183
+ if (val) {
184
+ this.teams = this.$appdata.getParam(`工单-` + val) ? [{
185
+ label: '请选择',
186
+ value: ''
187
+ }, ...this.$appdata.getParam(`工单-` + val)] : [{label: '请选择', value: ''}]
188
+ }else {
189
+ this.checkers = this.allCheckers
190
+ }
191
+ },
192
+ teamChange(val) {
193
+ if (val) {
194
+ this.checkers = this.$appdata.getParam(val) ? [...this.$appdata.getParam(val)] : [{label: '请选择', value: ''}]
195
+ }else {
196
+ this.checkers = this.allCheckers
197
+ }
198
+ },
199
+ quyuChange(val) {
200
+ if (val) {
201
+ this.bumens = this.$appdata.getParam(val) ? [{
202
+ label: '请选择',
203
+ value: ''
204
+ }, ...this.$appdata.getParam(val)] : [{label: '请选择', value: ''}]
205
+ }else {
206
+ this.checkers = this.allCheckers
207
+ }
208
+ },
209
+ getRes (obj) {
210
+ this.model.f_filialeid = this.$login.convertToIn(obj.resids)
211
+ },
212
+ getTableBrands() {
213
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
214
+ {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
215
+ {resolveMsg: null, rejectMsg: null}).then((resp) => {
216
+ resp.data.forEach((result) => {
217
+ this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
218
+ })
219
+ })
220
+ },
221
+ getAllChecker() {
222
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
223
+ data: {
224
+ items: 'name',
225
+ tablename: 't_user',
226
+ condition: `state = '在职' and rolestr like '%安检员%'`,
227
+ orderitem: 'id'
228
+ }
229
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
230
+ res.data.forEach(ress => {
231
+ this.allCheckers.push({
232
+ label: ress.name,
233
+ value: ress.name
234
+ })
235
+ })
236
+ this.checkers = this.allCheckers
237
+ })
238
+ }
239
+ },
240
+ ready () {
241
+ this.getAllChecker()
242
+ this.getTableBrands()
243
+ },
244
+ computed: {
245
+ selected () {
246
+ return this.$refs.grid.selected
247
+ }
248
+ // outlets () {
249
+ // return [{label: '全部', value: ''}, ...AppData.getParam('营业网点')]
250
+ // },
251
+ // operator () {
252
+ // return [{label: '全部', value: ''}, ...AppData.getParam('操作员')]
253
+ // }
254
+ }
255
+ }
256
+ </script>