safecheck-client 4.0.2-30 → 4.0.2-32

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.
@@ -1,208 +1,217 @@
1
- <template>
2
- <div>
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
- <div partial>
6
- <ul class="nav nav-tabs">
7
- <li role="presentation" class="active"><a style=" color: #5ac0d9 !important;">安检计划项明细</a></li>
8
- </ul>
9
- <div class="row">
10
- <div class="form-group col-sm-4" >
11
- <label class="font_normal_body">安检状态</label>
12
- <v-select style="width:60% "
13
- class="select select_list"
14
- :value.sync="$parent.$parent.f_state"
15
- v-model="$parent.$parent.f_state"
16
- :options='$parent.$parent.checkState'
17
- placeholder='安检状态'
18
- close-on-select
19
- value-single
20
- >
21
- </v-select>
22
- </div>
23
- <div class="form-group col-sm-4" v-if="$parent.$parent.f_state=='未入户'" >
24
- <v-select style="width:60% "
25
- class="select select_list"
26
- :value.sync="$parent.$parent.f_noruhu"
27
- v-model="$parent.$parent.f_noruhu"
28
- :options='$parent.$parent.noChecks'
29
- placeholder='请选择状态'
30
- :multiple="true"
31
- >
32
- </v-select>
33
- </div>
34
- <div class="form-group col-sm-4" >
35
- <label class="font_normal_body">小区</label>
36
- <input type="text" class="input_search"
37
- v-model="$parent.$parent.f_residential_area"
38
- style="width: 60%" placeholder="小区"
39
- condition="f_residential_area like '%{}%'">
40
- </div>
41
- <div class="form-group col-sm-4" >
42
- <label class="font_normal_body">楼号</label>
43
- <input type="text" class="input_search"
44
- v-model="$parent.$parent.f_building"
45
- style="width: 60%" placeholder="楼号"
46
- condition="f_building like '%{}%'">
47
- </div>
48
- <div class="form-group col-sm-4 button-range" >
49
- <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
50
- <export-excel :data="$parent.$parent.exportParameter"
51
- :field="$parent.$parent.excelHeaders"
52
- sqlurl="api/af-safecheck/logic/exportfile" sql-name="planItem"
53
- template-name='安检计划明细' :choose-col="true">
54
- </export-excel>
55
- <!--<export-excel-->
56
- <!--:data="{condition: $parent.$parent.condition}"-->
57
- <!--:field="$parent.$parent.getfield"-->
58
- <!--sqlurl="api/af-safecheck/logic/saleExport" sql-name="getGasUser" :template-name="$parent.$parent.pricename+'气价使用人'"-->
59
- <!--:choose-col="true"></export-excel>-->
60
-
61
- </div>
62
- </div>
63
- </div>
64
- </criteria>
65
- <data-grid :model="model" partial='list' class="table_sy">
66
-
67
- <template partial='head'>
68
- <tr>
69
- <th><nobr>计划名称</nobr></th>
70
- <th><nobr>用户编号</nobr></th>
71
- <th><nobr>用户名称</nobr></th>
72
- <th><nobr>小区名称</nobr></th>
73
- <th><nobr>地址</nobr></th>
74
- <th><nobr>安检状态</nobr></th>
75
- <th><nobr>是否安检</nobr></th>
76
- </tr>
77
- </template>
78
- <template partial='body'>
79
- <td style="text-align: center"><nobr>{{row.f_plan_name}}</nobr></td>
80
- <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
81
- <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
82
- <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
83
- <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
84
- <td style="text-align: center"><nobr>{{row.f_last_check_state}}</nobr></td>
85
- <td style="text-align: center"><nobr>{{row.f_state}}</nobr></td>
86
- </template>
87
- </data-grid>
88
- </criteria-paged>
89
- </div>
90
- </template>
91
-
92
- <script>
93
- import { PagedList } from 'vue-client'
94
-
95
- export default {
96
- title: '安检计划项列表',
97
- data () {
98
- return {
99
- model: new PagedList('api/af-safecheck/sql/planItemNew', 20),
100
- checkState:[{label:'全部',value:''},{label:'入户',value:'入户'},{label:'未入户',value:'未入户'}],
101
- noChecks:[{label:'未检',value:'未检'},{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'}],
102
- excelHeaders: {
103
- //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
104
-
105
- 'f_userinfo_code': '用户编号',
106
- 'f_user_name': '用户名称',
107
- 'f_user_phone': '用户电话',
108
- //'count_item':'安检次数',
109
- 'f_user_type': '用户类型',
110
- 'f_residential_area': '小区名称',
111
- 'f_address':'地址',
112
- 'f_last_check_date':'安检日期',
113
- 'f_last_check_state': '安检状态',
114
- 'f_state':'是否已检',
115
- 'f_last_check_result':'安检结果'
116
- },
117
- area:[{label:'全部',value:''}],
118
- f_state:'',
119
- f_noruhu:'',
120
- f_residential_area:'',
121
- f_building:'',
122
- }
123
- },
124
- props: [ 'check','checkstatus','checkstart','checkend' ],
125
- watch: {
126
- 'check' (val) {
127
- debugger
128
- let condition
129
- condition = `f_checker='${this.check.f_checker}'`
130
- if(this.checkstart){
131
- condition+= `and f_last_check_date>='${this.checkstart}'`
132
- }
133
- if (this.checkend){
134
- condition += `and f_last_check_date<='${this.f_endcheckend_time}'`
135
- }
136
- this.f_noruhu=[]
137
- this.f_state=''
138
- this.model.search(condition, {})
139
-
140
- }
141
- },
142
-
143
- ready () {
144
- if (this.check) {
145
- let condition
146
- condition = `f_checker='${this.check.f_checker}'`
147
- if(this.checkstart){
148
- condition += `and f_last_check_date>='${this.checkstart}'`
149
- }
150
- if (this.checkend){
151
- condition += ` and f_last_check_date<='${this.f_end_tcheckendime}'`
152
- }
153
- this.model.search(condition, {})
154
- }
155
- },
156
- methods:{
157
- selfSearch(args){
158
- if (this.check) {
159
- args.condition = `f_checker='${this.check.f_checker}'`
160
- if(this.checkstart){
161
- args.condition+= `and f_last_check_date>='${this.checkstart}'`
162
- }
163
- if (this.checkend){
164
- args.condition += `and f_last_check_date<='${this.checkend}'`
165
- }
166
- if( this.f_state){
167
- if(this.f_state=='入户'){
168
- args.condition=args.condition+" and i.f_state='已检' and f_last_check_state='入户'"
169
- }else if(this.f_state=='未入户'){
170
- if(this.f_noruhu && this.f_noruhu.length==1){
171
- args.condition += this.f_noruhu[0]=='未检'?" and i.f_state='未检'":` and i.f_state='已检' and f_last_check_state='${this.f_noruhu[0]}'`
172
- }else if(this.f_noruhu && this.f_noruhu.length==2){
173
- if(this.f_noruhu.indexOf('未检')!=-1){
174
- if(this.f_noruhu.indexOf('到访不遇')!=-1){
175
- args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and f_last_check_state='到访不遇'))"
176
- }else{
177
- args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and f_last_check_state='拒检'))"
178
- }
179
- }else{
180
- args.condition=args.condition+" and (i.f_state='已检' and (f_last_check_state='到访不遇' or f_last_check_state='拒检'))"
181
- }
182
- }else{
183
- args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and (f_last_check_state='到访不遇' or f_last_check_state='拒检')))"
184
- }
185
-
186
- }
187
-
188
- }
189
- if (this.f_residential_area){
190
- args.condition += ` and i.f_residential_area like'%${this.f_residential_area}%'`
191
- }
192
- if (this.f_building){
193
- args.condition += ` and i.f_building='${this.f_building}'`
194
- }
195
- this.model.search(args.condition, args.model)
196
- }
197
- }
198
- },
199
- computed: {
200
- // 导出到Excel的条件构造
201
- exportParameter() {
202
- return {
203
- condition: this.$refs.paged.model.condition
204
- }
205
- }
206
- },
207
- }
208
- </script>
1
+ <template>
2
+ <div>
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <div partial>
6
+ <ul class="nav nav-tabs">
7
+ <li role="presentation" class="active"><a style=" color: #5ac0d9 !important;">安检计划项明细</a></li>
8
+ </ul>
9
+ <div class="row">
10
+ <div class="form-group col-sm-4" >
11
+ <label class="font_normal_body">安检状态</label>
12
+ <v-select style="width:60% "
13
+ class="select select_list"
14
+ :value.sync="$parent.$parent.f_state"
15
+ v-model="$parent.$parent.f_state"
16
+ :options='$parent.$parent.checkState'
17
+ placeholder='安检状态'
18
+ close-on-select
19
+ value-single
20
+ >
21
+ </v-select>
22
+ </div>
23
+ <div class="form-group col-sm-4" >
24
+ <label class="font_normal_body">有无计划</label>
25
+ <v-select style="width:60% "
26
+ class="select select_list"
27
+ :value.sync="$parent.$parent.f_no_checkplan"
28
+ v-model="$parent.$parent.f_no_checkplan"
29
+ :options='$parent.$parent.no_checkplans'
30
+ placeholder='有无计划'
31
+ close-on-select
32
+ value-single
33
+ >
34
+ </v-select>
35
+ </div>
36
+ <div class="form-group col-sm-4" >
37
+ <label class="font_normal_body">入户状态</label>
38
+ <v-select style="width:60% "
39
+ class="select select_list"
40
+ :value.sync="$parent.$parent.f_last_check_state"
41
+ v-model="$parent.$parent.f_last_check_state"
42
+ :options='$parent.$parent.entry_status'
43
+ placeholder='入户状态'
44
+ close-on-select
45
+ value-single
46
+ >
47
+ </v-select>
48
+ </div>
49
+ <div class="form-group col-sm-4" >
50
+ <label class="font_normal_body">小区</label>
51
+ <input type="text" class="input_search"
52
+ v-model="$parent.$parent.f_residential_area"
53
+ style="width: 60%" placeholder="小区"
54
+ condition="f_residential_area like '%{}%'">
55
+ </div>
56
+ <div class="form-group col-sm-4" >
57
+ <label class="font_normal_body">楼号</label>
58
+ <input type="text" class="input_search"
59
+ v-model="$parent.$parent.f_building"
60
+ style="width: 60%" placeholder="楼号"
61
+ condition="f_building like '%{}%'">
62
+ </div>
63
+ <div class="form-group col-sm-4 button-range" >
64
+ <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
65
+ <export-excel :data="$parent.$parent.exportParameter"
66
+ :field="$parent.$parent.excelHeaders"
67
+ sqlurl="api/af-safecheck/logic/exportfile" sql-name="planItem"
68
+ template-name='安检计划明细' :choose-col="true">
69
+ </export-excel>
70
+ <!--<export-excel-->
71
+ <!--:data="{condition: $parent.$parent.condition}"-->
72
+ <!--:field="$parent.$parent.getfield"-->
73
+ <!--sqlurl="api/af-safecheck/logic/saleExport" sql-name="getGasUser" :template-name="$parent.$parent.pricename+'气价使用人'"-->
74
+ <!--:choose-col="true"></export-excel>-->
75
+
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </criteria>
80
+ <data-grid :model="model" partial='list' class="table_sy">
81
+
82
+ <template partial='head'>
83
+ <tr>
84
+ <th><nobr>计划名称</nobr></th>
85
+ <th><nobr>用户编号</nobr></th>
86
+ <th><nobr>用户名称</nobr></th>
87
+ <th><nobr>小区名称</nobr></th>
88
+ <th><nobr>地址</nobr></th>
89
+ <th><nobr>安检状态</nobr></th>
90
+ <th><nobr>是否安检</nobr></th>
91
+ </tr>
92
+ </template>
93
+ <template partial='body'>
94
+ <td style="text-align: center"><nobr>{{row.f_plan_name}}</nobr></td>
95
+ <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
96
+ <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
97
+ <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
98
+ <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
99
+ <td style="text-align: center"><nobr>{{row.f_last_check_state}}</nobr></td>
100
+ <td style="text-align: center"><nobr>{{row.f_state}}</nobr></td>
101
+ </template>
102
+ </data-grid>
103
+ </criteria-paged>
104
+ </div>
105
+ </template>
106
+
107
+ <script>
108
+ import { PagedList } from 'vue-client'
109
+
110
+ export default {
111
+ title: '安检计划项列表',
112
+ data () {
113
+ return {
114
+ model: new PagedList('api/af-safecheck/sql/planItemNew', 20),
115
+ checkState:[{label:'全部',value:''},{label:'已检',value:'已检'},{label:'未检',value:'未检'}],
116
+ entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
117
+ no_checkplans: this.$appdata.getParam('有无计划')?[{label: '全部', value: ''}, ...this.$appdata.getParam('有无计划')]:[{label: '全部', value: ''}],
118
+ noChecks:[{label:'未检',value:'未检'},{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'}],
119
+ excelHeaders: {
120
+ //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
121
+
122
+ 'f_userinfo_code': '用户编号',
123
+ 'f_user_name': '用户名称',
124
+ 'f_user_phone': '用户电话',
125
+ //'count_item':'安检次数',
126
+ 'f_user_type': '用户类型',
127
+ 'f_residential_area': '小区名称',
128
+ 'f_address':'地址',
129
+ 'f_last_check_date':'安检日期',
130
+ 'f_last_check_state': '安检状态',
131
+ 'f_state':'是否已检',
132
+ 'f_last_check_result':'安检结果'
133
+ },
134
+ area:[{label:'全部',value:''}],
135
+ f_state:'',
136
+ f_no_checkplan:'',
137
+ f_last_check_state:'',
138
+ f_noruhu:'',
139
+ f_residential_area:'',
140
+ f_building:'',
141
+ }
142
+ },
143
+ props: [ 'check','checkstatus','checkstart','checkend' ],
144
+ watch: {
145
+ 'check' (val) {
146
+ debugger
147
+ let condition
148
+ condition = `f_checker='${this.check.f_checker}'`
149
+ if(this.checkstart){
150
+ condition+= `and f_last_check_date>='${this.checkstart}'`
151
+ }
152
+ if (this.checkend){
153
+ condition += `and f_last_check_date<='${this.f_endcheckend_time}'`
154
+ }
155
+ this.f_noruhu=[]
156
+ this.f_state=''
157
+ this.model.search(condition, {})
158
+
159
+ }
160
+ },
161
+
162
+ ready () {
163
+ if (this.check) {
164
+ let condition
165
+ condition = `f_checker='${this.check.f_checker}'`
166
+ if(this.checkstart){
167
+ condition += `and f_last_check_date>='${this.checkstart}'`
168
+ }
169
+ if (this.checkend){
170
+ condition += ` and f_last_check_date<='${this.f_end_tcheckendime}'`
171
+ }
172
+ this.model.search(condition, {})
173
+ }
174
+ },
175
+ methods:{
176
+ selfSearch(args){
177
+ if (this.check) {
178
+ args.condition = `f_checker='${this.check.f_checker}'`
179
+ if(this.checkstart){
180
+ args.condition+= `and f_last_check_date>='${this.checkstart}'`
181
+ }
182
+ if (this.checkend){
183
+ args.condition += `and f_last_check_date<='${this.checkend}'`
184
+ }
185
+ if (this.f_residential_area){
186
+ args.condition += ` and i.f_residential_area like'%${this.f_residential_area}%'`
187
+ }
188
+ if (this.f_building){
189
+ args.condition += ` and i.f_building='${this.f_building}'`
190
+ }
191
+ if (this.f_state){
192
+ args.condition += ` and i.f_state='${this.f_state}'`
193
+ }
194
+ if (this.f_last_check_state){
195
+ args.condition += ` and i.f_last_check_state='${this.f_last_check_state}'`
196
+ }
197
+ if (this.f_no_checkplan){
198
+ if (this.f_no_checkplan == '有计划安检'){
199
+ args.condition += ` and i.f_plan_name != '无计划' `
200
+ }else {
201
+ args.condition += ` and i.f_plan_name = '无计划' `
202
+ }
203
+ }
204
+ this.model.search(args.condition, args.model)
205
+ }
206
+ }
207
+ },
208
+ computed: {
209
+ // 导出到Excel的条件构造
210
+ exportParameter() {
211
+ return {
212
+ condition: this.$refs.paged.model.condition
213
+ }
214
+ }
215
+ },
216
+ }
217
+ </script>
package/src/main.js CHANGED
@@ -1,33 +1,33 @@
1
- import Vue from 'vue'
2
- import App from './App'
3
- import { all } from 'vue-client'
4
- import { system } from 'system-clients'
5
- import safecheck from './safecheck'
6
- import echarts from 'echarts'
7
- // import safecheck from './rongcheng'
8
-
9
- all()
10
- // 验证码开关赋值
11
- var Verificationfalg = false
12
- system(Verificationfalg)
13
- // system()
14
- safecheck('jinhong')
15
- // safecheck('rizhao')
16
- require('./bootstrap/less/bootstrap.less')
17
- require('./expandcss.less')
18
-
19
- Vue.prototype.$echarts = echarts
20
- Vue.android = false
21
-
22
- Vue.url = '/SafeCheck/rs/'
23
- if(Vue.android)
24
- Vue.url = Vue.staticUrl
25
- Vue.interval = 1*60*1000
26
- Vue.nopic = 'file:///android_asset/nopic.png'
27
- Vue.mapSetup = false
28
-
29
- /* eslint-disable no-new */
30
- new Vue({
31
- el: 'body',
32
- components: { App }
33
- })
1
+ import Vue from 'vue'
2
+ import App from './App'
3
+ import { all } from 'vue-client'
4
+ import { system } from 'system-clients'
5
+ import safecheck from './safecheck'
6
+ import echarts from 'echarts'
7
+ // import safecheck from './rongcheng'
8
+
9
+ all()
10
+ // 验证码开关赋值
11
+ var Verificationfalg = false
12
+ system(Verificationfalg)
13
+ // system()
14
+ safecheck('meihekou')
15
+ // safecheck('rizhao')
16
+ require('./bootstrap/less/bootstrap.less')
17
+ require('./expandcss.less')
18
+
19
+ Vue.prototype.$echarts = echarts
20
+ Vue.android = false
21
+
22
+ Vue.url = '/SafeCheck/rs/'
23
+ if(Vue.android)
24
+ Vue.url = Vue.staticUrl
25
+ Vue.interval = 1*60*1000
26
+ Vue.nopic = 'file:///android_asset/nopic.png'
27
+ Vue.mapSetup = false
28
+
29
+ /* eslint-disable no-new */
30
+ new Vue({
31
+ el: 'body',
32
+ components: { App }
33
+ })