safecheck-client 3.0.33-77 → 3.0.33-79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/rongcheng/PaperListNPSQ.vue +12 -12
- package/src/components/rongcheng/PaperListSQ.vue +10 -13
- package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +225 -225
- package/src/filiale/yongzhou/pc/CheckSearchUser.vue +1092 -1092
- package/src/filiale/yongzhou/pc/NoCheckplanSafecheck.vue +557 -557
- package/src/filiale/yongzhou/pc/PaperList.vue +798 -798
- package/src/filiale/yongzhou/pc/safeDetail.vue +539 -539
- package/src/filiale/yongzhou/pc/safeStatistics.vue +175 -175
- package/src/filiale/yongzhou/pc/safeStatisticsDay.vue +455 -455
- package/src/filiale/yongzhou/pc/safeStatisticsMonth.vue +267 -267
- package/src/filiale/yongzhou/pc/safeStatisticsYear.vue +135 -135
- package/src/main.js +33 -33
- package/src/rongcheng.js +3 -1
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "safecheck-client",
|
3
3
|
"//": "主分支版本别乱升,测试包的版本直接发包(建议使用1.XX.XX-XXX格式作为测试包,不要频繁升级第三位版本号),别提交版本号。切了分支切记把主分支版本升了,保证主分支始终是最高版本!!!!!",
|
4
|
-
"version": "3.0.33-
|
4
|
+
"version": "3.0.33-79",
|
5
5
|
"description": "安检模块 前端组件",
|
6
6
|
"author": "丁新 <417755458@qq.com>",
|
7
7
|
"license": "ISC",
|
@@ -171,19 +171,19 @@
|
|
171
171
|
</div>
|
172
172
|
<modal :show.sync="pic" v-ref:modal backdrop="true">
|
173
173
|
<header slot="modal-header" class="modal-header">
|
174
|
-
上传照片
|
174
|
+
上传照片22
|
175
175
|
</header>
|
176
176
|
<article slot="modal-body" class="modal-body">
|
177
177
|
<div class="from-group">
|
178
|
-
<
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
178
|
+
<safecheck-file-upload
|
179
|
+
:blodid="bolbid"
|
180
|
+
:isupload="true"
|
181
|
+
:isdelete="true"
|
182
|
+
:isusetype="true"
|
183
|
+
:isremark="true"
|
184
|
+
:takeimg="false"
|
185
|
+
isusetype="送气照片"
|
186
|
+
></safecheck-file-upload>
|
187
187
|
</div>
|
188
188
|
</article>
|
189
189
|
<footer slot="modal-footer" class="modal-footer">
|
@@ -201,7 +201,7 @@
|
|
201
201
|
import * as Util from '../Util'
|
202
202
|
import getNowDate from "../../utils/getNowDate";
|
203
203
|
import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
|
204
|
-
import
|
204
|
+
import safecheckUpload from "../Util/SafecheckUpload.vue";
|
205
205
|
|
206
206
|
//获取json配置文件
|
207
207
|
let asyncReady = async function (self) {
|
@@ -233,7 +233,7 @@
|
|
233
233
|
export default {
|
234
234
|
title: '非民用送气结果查看',
|
235
235
|
components: {
|
236
|
-
|
236
|
+
safecheckUpload
|
237
237
|
},
|
238
238
|
data() {
|
239
239
|
let model = new PagedList('rs/sql/查找安检单', 20, {
|
@@ -180,15 +180,14 @@
|
|
180
180
|
</header>
|
181
181
|
<article slot="modal-body" class="modal-body">
|
182
182
|
<div class="from-group">
|
183
|
-
<
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
</apply-upload>
|
183
|
+
<safecheck-file-upload
|
184
|
+
:blodid="bolbid"
|
185
|
+
:isupload="true"
|
186
|
+
:isdelete="true"
|
187
|
+
:isusetype="true"
|
188
|
+
:isremark="true"
|
189
|
+
:takeimg="false"
|
190
|
+
></safecheck-file-upload>
|
192
191
|
</div>
|
193
192
|
</article>
|
194
193
|
<footer slot="modal-footer" class="modal-footer">
|
@@ -206,7 +205,7 @@
|
|
206
205
|
import * as Util from '../Util'
|
207
206
|
import getNowDate from "../../utils/getNowDate";
|
208
207
|
import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
|
209
|
-
import
|
208
|
+
import safecheckUpload from "../Util/SafecheckUpload.vue";
|
210
209
|
|
211
210
|
//获取json配置文件
|
212
211
|
let asyncReady = async function (self) {
|
@@ -237,9 +236,7 @@
|
|
237
236
|
|
238
237
|
export default {
|
239
238
|
title: '民用送气结果查看',
|
240
|
-
|
241
|
-
'apply-upload': ApplyUpload,
|
242
|
-
},
|
239
|
+
components: {safecheckUpload},
|
243
240
|
data() {
|
244
241
|
let model = new PagedList('rs/sql/查找安检单', 20, {
|
245
242
|
f_plan_id: 'this.f_plan_id',
|
@@ -1,225 +1,225 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="auto select-overspread">
|
3
|
-
<criteria-paged :model="model" v-ref:paged>
|
4
|
-
<criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
|
5
|
-
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
6
|
-
<div class="row">
|
7
|
-
<div class="form-group col-sm-3" >
|
8
|
-
<label class="font_normal_body">客户编号</label>
|
9
|
-
<input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
|
10
|
-
condition="tui.f_userinfo_code = '{}'" @keyup.enter="search()">
|
11
|
-
</div>
|
12
|
-
<div class="form-group col-sm-3">
|
13
|
-
<label class="font_normal_body">客户名称</label>
|
14
|
-
<input type="text" class="input_search" v-model="model.f_user_name"
|
15
|
-
style="width: 60%" placeholder="客户名称" condition="tui.f_user_name like '%{}%'">
|
16
|
-
</div>
|
17
|
-
<div class="form-group col-sm-3" >
|
18
|
-
<label class="font_normal_body">地址</label>
|
19
|
-
<input type="text" class="input_search" v-model="model.f_address"
|
20
|
-
style="width: 60%" placeholder="地址" condition="tua.f_address like '%{}%'">
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
<div class="row">
|
24
|
-
<div class="form-group col-sm-3" >
|
25
|
-
<label class="font_normal_body">小区名称</label>
|
26
|
-
<input type="text" class="input_search" v-model="model.f_residential_area"
|
27
|
-
style="width: 60%" placeholder="小区名称" condition="tua.f_residential_area like '%{}%'">
|
28
|
-
</div>
|
29
|
-
<div class="form-group col-sm-3" >
|
30
|
-
<label class="font_normal_body">客户类型</label>
|
31
|
-
<v-select :value.sync="model.f_user_type" v-model='model.f_user_type'
|
32
|
-
:value-single="true" style="width: 60%"
|
33
|
-
class="select_list select"
|
34
|
-
:options='$parent.$parent.userTypes' placeholder='客户类型'
|
35
|
-
close-on-select
|
36
|
-
condition="tuf.f_user_type ='{}'"></v-select>
|
37
|
-
</div>
|
38
|
-
<div class="form-group col-sm-2 button-range" >
|
39
|
-
<button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
|
40
|
-
<button class="button_spacing button_search-1" @click='$parent.$parent.removes()' v-if="$parent.$parent.bookList.length>0" >移出安检册</button>
|
41
|
-
</div>
|
42
|
-
</div>
|
43
|
-
</div>
|
44
|
-
</criteria>
|
45
|
-
<data-grid :model="model" class="table_sy" partial='list' v-ref:grid >
|
46
|
-
<template partial='head' >
|
47
|
-
<tr>
|
48
|
-
<th>
|
49
|
-
<nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll"></input>全选</nobr>
|
50
|
-
</th>
|
51
|
-
<th><nobr>序号</nobr></th>
|
52
|
-
<th><nobr>用户编号</nobr></th>
|
53
|
-
<th><nobr>用户姓名</nobr></th>
|
54
|
-
<th><nobr>用户电话</nobr></th>
|
55
|
-
<th><nobr>用户地址</nobr></th>
|
56
|
-
<th><nobr>操作</nobr></th>
|
57
|
-
</tr>
|
58
|
-
</template>
|
59
|
-
<template partial='body' >
|
60
|
-
<tr >
|
61
|
-
<td style="text-align: center">
|
62
|
-
<nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
|
63
|
-
@change="$parent.$parent.$parent.checkChange(row, $event)"></input>
|
64
|
-
</nobr>
|
65
|
-
</td>
|
66
|
-
<td style="text-align:center;">{{$index+1}}</td>
|
67
|
-
<td style="text-align:center">{{row.f_userinfo_code}}</td>
|
68
|
-
<td style="text-align:center">{{row.f_user_name}}</td>
|
69
|
-
<td style="text-align:center">{{row.f_user_phone}}</td>
|
70
|
-
<td style="text-align:center">{{row.f_address}}</td>
|
71
|
-
<td style="text-align: center">
|
72
|
-
<button class="button_spacing button_search-1" @click='$parent.$parent.$parent.remove(row)'>移出安检册</button>
|
73
|
-
</td>
|
74
|
-
</tr>
|
75
|
-
</template>
|
76
|
-
<template partial='foot'></template>
|
77
|
-
</data-grid>
|
78
|
-
</criteria-paged>
|
79
|
-
</div>
|
80
|
-
</template>
|
81
|
-
|
82
|
-
<script>
|
83
|
-
import {PagedList} from 'vue-client'
|
84
|
-
import bus from "../../../bus";
|
85
|
-
|
86
|
-
export default {
|
87
|
-
title: '安检记录列表',
|
88
|
-
props: ['row'],
|
89
|
-
data () {
|
90
|
-
return {
|
91
|
-
checkAll:false,
|
92
|
-
rowdata: this.row,
|
93
|
-
bookList: [],
|
94
|
-
userTypes: [{label: '全部', value: ''},{label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
|
95
|
-
model: new PagedList('rs/sql/getUserByCheckBook', 50)
|
96
|
-
}
|
97
|
-
},
|
98
|
-
ready(){
|
99
|
-
if(this.row){
|
100
|
-
let condition=''
|
101
|
-
if(this.row.id){
|
102
|
-
|
103
|
-
condition = `tua.f_check_book_id ='${this.row.id}'`
|
104
|
-
}else{
|
105
|
-
condition = `1=1`
|
106
|
-
}
|
107
|
-
|
108
|
-
// if(this.row.f_check_book_type1=='小区'){
|
109
|
-
// this.model.url = 'rs/sql/getUserByCheckBook'
|
110
|
-
// condition = `ta.f_check_book_id =${this.row.f_check_book_id} and ta.id=${this.row.id}`
|
111
|
-
// }else{
|
112
|
-
// this.model.url = 'rs/sql/getUserByCheckBookCompany'
|
113
|
-
// condition = `tc.f_check_book_id =${this.row.f_check_book_id} and tc.id=${this.row.id}`
|
114
|
-
// }
|
115
|
-
this.model.search(condition)
|
116
|
-
//只显示用户页面
|
117
|
-
this.row.f_check_book_type='用户'
|
118
|
-
}
|
119
|
-
},
|
120
|
-
watch: {
|
121
|
-
'checkAll'(val){
|
122
|
-
if(!val){
|
123
|
-
this.bookList=[]
|
124
|
-
}
|
125
|
-
//如果是全选,则查询这个安检册下的用户
|
126
|
-
|
127
|
-
if(val){
|
128
|
-
//遍历this.model.rows
|
129
|
-
this.model.rows.forEach(res=>{
|
130
|
-
this.bookList.push(res.f_userinfo_id)
|
131
|
-
})
|
132
|
-
}
|
133
|
-
},
|
134
|
-
'row' (val) {
|
135
|
-
if (val) {
|
136
|
-
this.rowdata = val
|
137
|
-
let condition=''
|
138
|
-
condition = `tua.f_check_book_id ='${val.id}'`
|
139
|
-
// if(this.row.f_check_book_type1=='小区'){
|
140
|
-
// condition = `ta.f_check_book_id =${val.f_check_book_id} and ta.id=${val.id}`
|
141
|
-
// }else{
|
142
|
-
// condition = `tc.f_check_book_id =${val.f_check_book_id} and tc.id=${val.id}`
|
143
|
-
// }
|
144
|
-
this.model.search(condition)
|
145
|
-
}
|
146
|
-
}
|
147
|
-
},
|
148
|
-
methods: {
|
149
|
-
setCheckAll() {
|
150
|
-
this.checkAll=this.checkAll?false:true;
|
151
|
-
// 全选改变后,清空选中数据
|
152
|
-
this.bookList = []
|
153
|
-
},
|
154
|
-
checkModel (row) {
|
155
|
-
if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
|
156
|
-
return true
|
157
|
-
} else {
|
158
|
-
return false
|
159
|
-
}
|
160
|
-
},
|
161
|
-
checkChange (row, e) {
|
162
|
-
if (e.target.checked) {
|
163
|
-
this.bookList.push(row.f_userinfo_id)
|
164
|
-
} else {
|
165
|
-
this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
|
166
|
-
}
|
167
|
-
},
|
168
|
-
removes(){
|
169
|
-
|
170
|
-
if(this.bookList.length===0){
|
171
|
-
this.$showMessage('请选择用户')
|
172
|
-
return
|
173
|
-
}
|
174
|
-
this.$showMessage("确认将用户移出此安检册?",['confirm']).then(res=>{
|
175
|
-
if(res==='confirm'){
|
176
|
-
//for遍历this.bookList,将每个用户移出安检册
|
177
|
-
var c="("
|
178
|
-
for(var i=0;i<this.bookList.length;i++){
|
179
|
-
c+=`'${this.bookList[i]}'`+","
|
180
|
-
}
|
181
|
-
//去掉最后一个逗号
|
182
|
-
c=c.substring(0,c.length-1)
|
183
|
-
c+=")"
|
184
|
-
let data = {
|
185
|
-
condition: c,
|
186
|
-
f_book_id: this.row.id
|
187
|
-
}
|
188
|
-
this.$http.post('rs/logic/removesCheckBookUser', {data: data}).then(res=>{
|
189
|
-
this.$showMessage('移出成功')
|
190
|
-
this.$refs.paged.$refs.criteria.search()
|
191
|
-
})
|
192
|
-
}
|
193
|
-
})
|
194
|
-
},
|
195
|
-
remove(row){
|
196
|
-
|
197
|
-
this.$showMessage("确认移出此安检册?",['confirm']).then(res=>{
|
198
|
-
if(res==='confirm'){
|
199
|
-
let data = {
|
200
|
-
f_userinfo_id: row.f_userinfo_id,
|
201
|
-
f_book_id: this.row.id
|
202
|
-
}
|
203
|
-
this.$http.post('rs/logic/removeUserByCheckBook', {data: data}).then(res=>{
|
204
|
-
this.$showMessage('移出成功')
|
205
|
-
this.$refs.paged.$refs.criteria.search()
|
206
|
-
})
|
207
|
-
}
|
208
|
-
})
|
209
|
-
},
|
210
|
-
selfSearch (args) {
|
211
|
-
if (this.rowdata.id) {
|
212
|
-
args.condition +=` and tua.f_check_book_id ='${this.rowdata.id}'`
|
213
|
-
// if(this.rowdata.f_check_book_type1=='小区'){
|
214
|
-
// args.condition += `and ta.f_check_book_id =${this.rowdata.f_check_book_id} and ta.id=${this.rowdata.id}`
|
215
|
-
// }else{
|
216
|
-
// args.condition += `and tc.f_check_book_id =${this.rowdata.f_check_book_id} and tc.id=${this.rowdata.id}`
|
217
|
-
// }
|
218
|
-
this.model.search(args.condition)
|
219
|
-
} else {
|
220
|
-
this.$showMessage('请选择片区')
|
221
|
-
}
|
222
|
-
}
|
223
|
-
}
|
224
|
-
}
|
225
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div class="auto select-overspread">
|
3
|
+
<criteria-paged :model="model" v-ref:paged>
|
4
|
+
<criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
|
5
|
+
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
6
|
+
<div class="row">
|
7
|
+
<div class="form-group col-sm-3" >
|
8
|
+
<label class="font_normal_body">客户编号</label>
|
9
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
|
10
|
+
condition="tui.f_userinfo_code = '{}'" @keyup.enter="search()">
|
11
|
+
</div>
|
12
|
+
<div class="form-group col-sm-3">
|
13
|
+
<label class="font_normal_body">客户名称</label>
|
14
|
+
<input type="text" class="input_search" v-model="model.f_user_name"
|
15
|
+
style="width: 60%" placeholder="客户名称" condition="tui.f_user_name like '%{}%'">
|
16
|
+
</div>
|
17
|
+
<div class="form-group col-sm-3" >
|
18
|
+
<label class="font_normal_body">地址</label>
|
19
|
+
<input type="text" class="input_search" v-model="model.f_address"
|
20
|
+
style="width: 60%" placeholder="地址" condition="tua.f_address like '%{}%'">
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
<div class="row">
|
24
|
+
<div class="form-group col-sm-3" >
|
25
|
+
<label class="font_normal_body">小区名称</label>
|
26
|
+
<input type="text" class="input_search" v-model="model.f_residential_area"
|
27
|
+
style="width: 60%" placeholder="小区名称" condition="tua.f_residential_area like '%{}%'">
|
28
|
+
</div>
|
29
|
+
<div class="form-group col-sm-3" >
|
30
|
+
<label class="font_normal_body">客户类型</label>
|
31
|
+
<v-select :value.sync="model.f_user_type" v-model='model.f_user_type'
|
32
|
+
:value-single="true" style="width: 60%"
|
33
|
+
class="select_list select"
|
34
|
+
:options='$parent.$parent.userTypes' placeholder='客户类型'
|
35
|
+
close-on-select
|
36
|
+
condition="tuf.f_user_type ='{}'"></v-select>
|
37
|
+
</div>
|
38
|
+
<div class="form-group col-sm-2 button-range" >
|
39
|
+
<button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
|
40
|
+
<button class="button_spacing button_search-1" @click='$parent.$parent.removes()' v-if="$parent.$parent.bookList.length>0" >移出安检册</button>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
</criteria>
|
45
|
+
<data-grid :model="model" class="table_sy" partial='list' v-ref:grid >
|
46
|
+
<template partial='head' >
|
47
|
+
<tr>
|
48
|
+
<th>
|
49
|
+
<nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll"></input>全选</nobr>
|
50
|
+
</th>
|
51
|
+
<th><nobr>序号</nobr></th>
|
52
|
+
<th><nobr>用户编号</nobr></th>
|
53
|
+
<th><nobr>用户姓名</nobr></th>
|
54
|
+
<th><nobr>用户电话</nobr></th>
|
55
|
+
<th><nobr>用户地址</nobr></th>
|
56
|
+
<th><nobr>操作</nobr></th>
|
57
|
+
</tr>
|
58
|
+
</template>
|
59
|
+
<template partial='body' >
|
60
|
+
<tr >
|
61
|
+
<td style="text-align: center">
|
62
|
+
<nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
|
63
|
+
@change="$parent.$parent.$parent.checkChange(row, $event)"></input>
|
64
|
+
</nobr>
|
65
|
+
</td>
|
66
|
+
<td style="text-align:center;">{{$index+1}}</td>
|
67
|
+
<td style="text-align:center">{{row.f_userinfo_code}}</td>
|
68
|
+
<td style="text-align:center">{{row.f_user_name}}</td>
|
69
|
+
<td style="text-align:center">{{row.f_user_phone}}</td>
|
70
|
+
<td style="text-align:center">{{row.f_address}}</td>
|
71
|
+
<td style="text-align: center">
|
72
|
+
<button class="button_spacing button_search-1" @click='$parent.$parent.$parent.remove(row)'>移出安检册</button>
|
73
|
+
</td>
|
74
|
+
</tr>
|
75
|
+
</template>
|
76
|
+
<template partial='foot'></template>
|
77
|
+
</data-grid>
|
78
|
+
</criteria-paged>
|
79
|
+
</div>
|
80
|
+
</template>
|
81
|
+
|
82
|
+
<script>
|
83
|
+
import {PagedList} from 'vue-client'
|
84
|
+
import bus from "../../../bus";
|
85
|
+
|
86
|
+
export default {
|
87
|
+
title: '安检记录列表',
|
88
|
+
props: ['row'],
|
89
|
+
data () {
|
90
|
+
return {
|
91
|
+
checkAll:false,
|
92
|
+
rowdata: this.row,
|
93
|
+
bookList: [],
|
94
|
+
userTypes: [{label: '全部', value: ''},{label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
|
95
|
+
model: new PagedList('rs/sql/getUserByCheckBook', 50)
|
96
|
+
}
|
97
|
+
},
|
98
|
+
ready(){
|
99
|
+
if(this.row){
|
100
|
+
let condition=''
|
101
|
+
if(this.row.id){
|
102
|
+
|
103
|
+
condition = `tua.f_check_book_id ='${this.row.id}'`
|
104
|
+
}else{
|
105
|
+
condition = `1=1`
|
106
|
+
}
|
107
|
+
|
108
|
+
// if(this.row.f_check_book_type1=='小区'){
|
109
|
+
// this.model.url = 'rs/sql/getUserByCheckBook'
|
110
|
+
// condition = `ta.f_check_book_id =${this.row.f_check_book_id} and ta.id=${this.row.id}`
|
111
|
+
// }else{
|
112
|
+
// this.model.url = 'rs/sql/getUserByCheckBookCompany'
|
113
|
+
// condition = `tc.f_check_book_id =${this.row.f_check_book_id} and tc.id=${this.row.id}`
|
114
|
+
// }
|
115
|
+
this.model.search(condition)
|
116
|
+
//只显示用户页面
|
117
|
+
this.row.f_check_book_type='用户'
|
118
|
+
}
|
119
|
+
},
|
120
|
+
watch: {
|
121
|
+
'checkAll'(val){
|
122
|
+
if(!val){
|
123
|
+
this.bookList=[]
|
124
|
+
}
|
125
|
+
//如果是全选,则查询这个安检册下的用户
|
126
|
+
|
127
|
+
if(val){
|
128
|
+
//遍历this.model.rows
|
129
|
+
this.model.rows.forEach(res=>{
|
130
|
+
this.bookList.push(res.f_userinfo_id)
|
131
|
+
})
|
132
|
+
}
|
133
|
+
},
|
134
|
+
'row' (val) {
|
135
|
+
if (val) {
|
136
|
+
this.rowdata = val
|
137
|
+
let condition=''
|
138
|
+
condition = `tua.f_check_book_id ='${val.id}'`
|
139
|
+
// if(this.row.f_check_book_type1=='小区'){
|
140
|
+
// condition = `ta.f_check_book_id =${val.f_check_book_id} and ta.id=${val.id}`
|
141
|
+
// }else{
|
142
|
+
// condition = `tc.f_check_book_id =${val.f_check_book_id} and tc.id=${val.id}`
|
143
|
+
// }
|
144
|
+
this.model.search(condition)
|
145
|
+
}
|
146
|
+
}
|
147
|
+
},
|
148
|
+
methods: {
|
149
|
+
setCheckAll() {
|
150
|
+
this.checkAll=this.checkAll?false:true;
|
151
|
+
// 全选改变后,清空选中数据
|
152
|
+
this.bookList = []
|
153
|
+
},
|
154
|
+
checkModel (row) {
|
155
|
+
if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
|
156
|
+
return true
|
157
|
+
} else {
|
158
|
+
return false
|
159
|
+
}
|
160
|
+
},
|
161
|
+
checkChange (row, e) {
|
162
|
+
if (e.target.checked) {
|
163
|
+
this.bookList.push(row.f_userinfo_id)
|
164
|
+
} else {
|
165
|
+
this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
|
166
|
+
}
|
167
|
+
},
|
168
|
+
removes(){
|
169
|
+
|
170
|
+
if(this.bookList.length===0){
|
171
|
+
this.$showMessage('请选择用户')
|
172
|
+
return
|
173
|
+
}
|
174
|
+
this.$showMessage("确认将用户移出此安检册?",['confirm']).then(res=>{
|
175
|
+
if(res==='confirm'){
|
176
|
+
//for遍历this.bookList,将每个用户移出安检册
|
177
|
+
var c="("
|
178
|
+
for(var i=0;i<this.bookList.length;i++){
|
179
|
+
c+=`'${this.bookList[i]}'`+","
|
180
|
+
}
|
181
|
+
//去掉最后一个逗号
|
182
|
+
c=c.substring(0,c.length-1)
|
183
|
+
c+=")"
|
184
|
+
let data = {
|
185
|
+
condition: c,
|
186
|
+
f_book_id: this.row.id
|
187
|
+
}
|
188
|
+
this.$http.post('rs/logic/removesCheckBookUser', {data: data}).then(res=>{
|
189
|
+
this.$showMessage('移出成功')
|
190
|
+
this.$refs.paged.$refs.criteria.search()
|
191
|
+
})
|
192
|
+
}
|
193
|
+
})
|
194
|
+
},
|
195
|
+
remove(row){
|
196
|
+
|
197
|
+
this.$showMessage("确认移出此安检册?",['confirm']).then(res=>{
|
198
|
+
if(res==='confirm'){
|
199
|
+
let data = {
|
200
|
+
f_userinfo_id: row.f_userinfo_id,
|
201
|
+
f_book_id: this.row.id
|
202
|
+
}
|
203
|
+
this.$http.post('rs/logic/removeUserByCheckBook', {data: data}).then(res=>{
|
204
|
+
this.$showMessage('移出成功')
|
205
|
+
this.$refs.paged.$refs.criteria.search()
|
206
|
+
})
|
207
|
+
}
|
208
|
+
})
|
209
|
+
},
|
210
|
+
selfSearch (args) {
|
211
|
+
if (this.rowdata.id) {
|
212
|
+
args.condition +=` and tua.f_check_book_id ='${this.rowdata.id}'`
|
213
|
+
// if(this.rowdata.f_check_book_type1=='小区'){
|
214
|
+
// args.condition += `and ta.f_check_book_id =${this.rowdata.f_check_book_id} and ta.id=${this.rowdata.id}`
|
215
|
+
// }else{
|
216
|
+
// args.condition += `and tc.f_check_book_id =${this.rowdata.f_check_book_id} and tc.id=${this.rowdata.id}`
|
217
|
+
// }
|
218
|
+
this.model.search(args.condition)
|
219
|
+
} else {
|
220
|
+
this.$showMessage('请选择片区')
|
221
|
+
}
|
222
|
+
}
|
223
|
+
}
|
224
|
+
}
|
225
|
+
</script>
|