safecheck-client 3.0.39-63 → 3.0.39-64
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 +134 -134
- package/src/App.vue +31 -26
- package/src/components/android/rejectInspecCheck.vue +303 -0
- package/src/components/pc/RoleSelector.vue +172 -172
- package/src/components/rongcheng/AddPlanItem.vue +344 -344
- package/src/components/rongcheng/CheckCurrentCreate.vue +1081 -1081
- package/src/components/rongcheng/PaperDefectMain.vue +828 -828
- package/src/filiale/BFshiye/android/AndroidDefectDeal.vue +652 -0
- package/src/filiale/BFshiye/pc/DefectListNew.vue +637 -0
- package/src/filiale/BFshiye/pc/checkUserList.vue +772 -772
- package/src/filiale/BFshiye/pc.js +17 -16
- package/src/filiale/baiyin/android/SafecheckUserInfo.vue +775 -775
- package/src/filiale/baiyin/android.js +12 -12
- package/src/filiale/dexin/pc/PaperList.vue +840 -840
- package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1357 -1357
- package/src/filiale/qingjian/android/SafecheckUserInfo.vue +823 -823
- package/src/filiale/qingjian/pc/NewCheckpaper.vue +1919 -1919
- package/src/filiale/rongchuang/android/PhoneUpUserinfo.vue +1262 -1262
- package/src/filiale/rongchuang/pc/checkPlanList.vue +398 -398
- package/src/filiale/rongchuang/pc.js +18 -18
- package/src/filiale/tongchuan/android/PhoneUpUserinfo.vue +1339 -1343
- package/src/filiale/wensu/android/SafecheckOrderV.vue +2444 -2444
- package/src/filiale/wensu/android/SafecheckUserInfo.vue +712 -712
- package/src/filiale/wensu/pc/CheckSearchUser.vue +1251 -1251
- package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1191 -1191
- package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +913 -913
- package/src/filiale/yangchunboneng/android.js +21 -21
- package/src/filiale/yangchunboneng/pc/CheckBookList.vue +353 -353
- package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1197 -1197
- package/src/filiale/yangchunboneng/pc/HiddenSituation.vue +171 -171
- package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +1112 -1112
- package/src/filiale/yangchunboneng/pc/PaperList.vue +757 -757
- package/src/filiale/yangchunboneng/pc/SelectCheckPlan.vue +331 -331
- package/src/filiale/yangchunboneng/pc.js +29 -29
- package/src/main.js +33 -33
- package/src/rongcheng.js +319 -319
- package/src/safecheck-android.js +316 -315
- package/.trae/.ignore +0 -0
- package/.vscode/settings.json +0 -3
- package/yarn-error.log +0 -140
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
<style scoped>
|
|
2
|
+
.bg {
|
|
3
|
+
background-color: blue;
|
|
4
|
+
height: 1px;
|
|
5
|
+
border: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.app-row {
|
|
9
|
+
background-color: white;
|
|
10
|
+
padding: 10px 10px 0 10px;
|
|
11
|
+
border-bottom: 1px solid rgba(235, 235, 235, 0.5);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.search_input {
|
|
15
|
+
border: 0;
|
|
16
|
+
outline: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.font {
|
|
20
|
+
font: 15px PingFang-SC-Medium;
|
|
21
|
+
color: #666666;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.input-font {
|
|
25
|
+
font: 15px PingFang-SC-Medium;
|
|
26
|
+
color: #333333;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.btn-font {
|
|
30
|
+
font: 600 16px PingFang-SC-Bold;
|
|
31
|
+
color: #499EDF;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.btn-color {
|
|
35
|
+
background-color: #FFFFFF;
|
|
36
|
+
border-radius: 10px;
|
|
37
|
+
border: 1px solid #499EDF;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.app-text {
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.panel-self {
|
|
45
|
+
border-radius: 10px;
|
|
46
|
+
border: 1px solid #499EDF;
|
|
47
|
+
background-color: #F8F8F8;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.yybtn-color {
|
|
51
|
+
background-color: #499edf;
|
|
52
|
+
border-radius: 4px;
|
|
53
|
+
border: 1px solid #499EDF;
|
|
54
|
+
color: #FFFFFF;
|
|
55
|
+
font: 14px PingFang-SC-Bold;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.qxbtn-color {
|
|
59
|
+
background-color: #FFFFFF;
|
|
60
|
+
border-radius: 4px;
|
|
61
|
+
color: #499edf;
|
|
62
|
+
font: 14px PingFang-SC-Bold;
|
|
63
|
+
border: 1px solid #499EDF;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.button_shrink_top {
|
|
67
|
+
width: 35px;
|
|
68
|
+
height: 35px;
|
|
69
|
+
background-size: 100%;
|
|
70
|
+
background-image: url("../../../static/newStyle/stretch_top.png")
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.button_shrink_bottom {
|
|
74
|
+
width: 35px;
|
|
75
|
+
height: 35px;
|
|
76
|
+
background-size: 100%;
|
|
77
|
+
background-image: url("../../../static/newStyle/stretch_bottom.png")
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.button_shrink_left {
|
|
81
|
+
width: 35px;
|
|
82
|
+
height: 35px;
|
|
83
|
+
background-size: 100%;
|
|
84
|
+
background-image: url("../../../static/newStyle/stretch_left.png")
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.button_shrink_right {
|
|
88
|
+
width: 35px;
|
|
89
|
+
height: 35px;
|
|
90
|
+
background-size: 100%;
|
|
91
|
+
background-image: url("../../../static/newStyle/stretch_right.png")
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
94
|
+
<template>
|
|
95
|
+
<div style="height: auto;width: 100%">
|
|
96
|
+
<criteria-paged :model="model" v-ref:paged>
|
|
97
|
+
<criteria partial='criteria' @condition-changed='search' v-ref:cri>
|
|
98
|
+
<div partial>
|
|
99
|
+
<form>
|
|
100
|
+
<div class="row app-row">
|
|
101
|
+
<div class="col-xs-4">
|
|
102
|
+
<img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
103
|
+
<label class="font text-left">用户姓名:</label>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="col-xs-8">
|
|
106
|
+
<input class="search_input input-font" v-model=model.f_user_name
|
|
107
|
+
condition="f_user_name like '%{}%'"/>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="row app-row">
|
|
111
|
+
<div class="col-xs-4">
|
|
112
|
+
<img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
113
|
+
<label for="f_userinfo_code" class="font text-left">用户编号:</label>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="col-xs-8">
|
|
116
|
+
<input id="f_userinfo_code" class="search_input input-font"
|
|
117
|
+
v-model=model.f_userinfo_code condition="f_userinfo_code like '%{}%'"/>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="row app-row">
|
|
121
|
+
<div class="col-xs-4">
|
|
122
|
+
<img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
123
|
+
<label class="font text-left">用户地址:</label>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="col-xs-8">
|
|
126
|
+
<input class="search_input input-font"
|
|
127
|
+
v-model=model.f_address condition="f_address like '%{}%'"/>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
<div class="row text-center" style="margin-top: 20px;">
|
|
131
|
+
<button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;"
|
|
132
|
+
@click="$parent.$parent.selfSearch">查询
|
|
133
|
+
</button>
|
|
134
|
+
<div style="float: right;margin-right: 3% " class="button_spacing"
|
|
135
|
+
:class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
|
|
136
|
+
@click="$parent.$parent.hidden()"></div>
|
|
137
|
+
</div>
|
|
138
|
+
<div style="height:30px;"></div>
|
|
139
|
+
</form>
|
|
140
|
+
</div>
|
|
141
|
+
</criteria>
|
|
142
|
+
<list :model="model" partial='list'>
|
|
143
|
+
<div partial>
|
|
144
|
+
<div class="auto app-text" style="margin-top: 5px;">
|
|
145
|
+
<div class="panel" style="padding: 10px 10px 5px 10px;">
|
|
146
|
+
<div class="panel-body panel-self">
|
|
147
|
+
<div class="col-xs-12">
|
|
148
|
+
<p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
|
|
149
|
+
<p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}</p>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="col-xs-12">
|
|
152
|
+
<p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
|
|
153
|
+
<p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="col-xs-12">
|
|
156
|
+
<p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b></p>
|
|
157
|
+
<p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone }}</p>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="col-xs-12">
|
|
160
|
+
<p class="panel-title text-left font" style="width: 23%;float: left"><b>安检时间:</b></p>
|
|
161
|
+
<p class="panel-title text-left input-font" style="width: 77%">{{ row.f_create_time }}</p>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="col-xs-12">
|
|
164
|
+
<p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
|
|
165
|
+
<p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}</p>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="col-xs-12">
|
|
168
|
+
<p class="panel-title text-left font" style="width: 21%;float: left"><b>所属安检:</b></p>
|
|
169
|
+
<p class="panel-title text-left input-font" style="width: 79%">{{ row.f_checker_name }}</p>
|
|
170
|
+
</div>
|
|
171
|
+
<div class="col-xs-12">
|
|
172
|
+
<p class="panel-title col-xs-5 text-left font"><b>不通过原因:</b></p>
|
|
173
|
+
<p style="color: red" class="panel-title col-xs-7 text-left input-font">{{ row.f_approved_note }}</p>
|
|
174
|
+
</div>
|
|
175
|
+
<div class="col-xs-12">
|
|
176
|
+
<button type="button" name="button" class="btn btn-primary"
|
|
177
|
+
style="background-color:#499edf;float: right;margin-right:10px;"
|
|
178
|
+
@click="$parent.$parent.$parent.Handle(row)">处理
|
|
179
|
+
</button>
|
|
180
|
+
<button type="button" name="button" class="btn btn-primary"
|
|
181
|
+
style="background-color:#499edf;float: right;margin-right:10px;"
|
|
182
|
+
@click="$parent.$parent.$parent.reassign(row)">转单
|
|
183
|
+
</button>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</list>
|
|
190
|
+
</criteria-paged>
|
|
191
|
+
<modal :show.sync="showModal" v-ref:modal :backdrop="false">
|
|
192
|
+
<div slot="modal-header" class="modal-header">
|
|
193
|
+
<h4 class="modal-title">
|
|
194
|
+
选择安检员
|
|
195
|
+
</h4>
|
|
196
|
+
</div>
|
|
197
|
+
<div slot="modal-body" class="modal-body">
|
|
198
|
+
<div class="col-xs-12">
|
|
199
|
+
<div class="col-xs-4">
|
|
200
|
+
<v-select :value.sync="check" v-model='check'
|
|
201
|
+
:value-single="true"
|
|
202
|
+
class="select_list select"
|
|
203
|
+
:options='checkers' placeholder='安检员'
|
|
204
|
+
close-on-select width="100%"></v-select>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
<div slot="modal-footer" class="modal-footer">
|
|
209
|
+
<button class="btn btn-default" @click="iscancel()">取消</button>
|
|
210
|
+
<button class="btn btn-default" @click="manyisok()">确认</button>
|
|
211
|
+
</div>
|
|
212
|
+
</modal>
|
|
213
|
+
</div>
|
|
214
|
+
</template>
|
|
215
|
+
<script>
|
|
216
|
+
import Vue from 'vue'
|
|
217
|
+
import {HttpResetClass, PagedList} from 'vue-client'
|
|
218
|
+
import * as Util from '../Util'
|
|
219
|
+
import co from "co";
|
|
220
|
+
let select = function * (self) {
|
|
221
|
+
let http = new HttpResetClass()
|
|
222
|
+
http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
|
|
223
|
+
source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
|
|
224
|
+
userid: Vue.user.id
|
|
225
|
+
}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
226
|
+
//tag
|
|
227
|
+
self.checkers.push({label:'全部',value:''})
|
|
228
|
+
res.data.forEach((checker)=>{
|
|
229
|
+
self.checkers.push({label:checker.name,value:checker.name})
|
|
230
|
+
})
|
|
231
|
+
})
|
|
232
|
+
}
|
|
233
|
+
export default {
|
|
234
|
+
title: '安检单驳回',
|
|
235
|
+
data() {
|
|
236
|
+
return {
|
|
237
|
+
checkers: [],
|
|
238
|
+
check: '',
|
|
239
|
+
showModal: false,
|
|
240
|
+
f_filialeids: '',
|
|
241
|
+
model: new PagedList(`${this.$androidUtil.getProxyUrl()}/rs/sql/AndroidGetcheckpaper`, 20, {
|
|
242
|
+
condition: 'this.condition',
|
|
243
|
+
f_filialeids: `'${Vue.user.orgid}'`,
|
|
244
|
+
f_checker_id: `'${Vue.user.id}'`
|
|
245
|
+
}),
|
|
246
|
+
criteriaShow: false,
|
|
247
|
+
select: {}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
ready() {
|
|
251
|
+
this.selfSearch()
|
|
252
|
+
let gen = select(this)
|
|
253
|
+
co(gen)
|
|
254
|
+
},
|
|
255
|
+
methods: {
|
|
256
|
+
selfSearch() {
|
|
257
|
+
let condition = "1=1 "
|
|
258
|
+
if (this.$refs.paged.$refs.cri.model.f_user_name) {
|
|
259
|
+
if (this.$refs.paged.$refs.cri.model.f_user_name.toString().trim()) {
|
|
260
|
+
condition += " and f_user_name like '%" + this.$refs.paged.$refs.cri.model.f_user_name + "%'"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (this.$refs.paged.$refs.cri.model.f_userinfo_code) {
|
|
264
|
+
if (this.$refs.paged.$refs.cri.model.f_userinfo_code.toString().trim()) {
|
|
265
|
+
condition += " and f_userinfo_code = '" + this.$refs.paged.$refs.cri.model.f_userinfo_code + "'"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (this.$refs.paged.$refs.cri.model.f_address) {
|
|
269
|
+
if (this.$refs.paged.$refs.cri.model.f_address.toString().trim()) {
|
|
270
|
+
condition += " and f_address like '%" + this.$refs.paged.$refs.cri.model.f_address + "%'"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
condition += `and ( f_checker_name='${Vue.user.name}' and f_checker_reciver is null) or ( f_checker_reciver='${Vue.user.name}' and f_checker_name!='${Vue.user.name}') `
|
|
274
|
+
this.model.search(condition)
|
|
275
|
+
},
|
|
276
|
+
hidden() {
|
|
277
|
+
this.criteriaShow = !this.criteriaShow
|
|
278
|
+
},
|
|
279
|
+
Handle(row) {
|
|
280
|
+
//调转到无计划安检页面重新安检一次
|
|
281
|
+
|
|
282
|
+
},
|
|
283
|
+
reassign(row) {
|
|
284
|
+
this.select = row
|
|
285
|
+
this.showModal = true
|
|
286
|
+
},
|
|
287
|
+
manyisok() {
|
|
288
|
+
let sqlstr=`update t_check_paper set f_checker_reciver='${this.check}' where id='${this.select.id}'`
|
|
289
|
+
let http = new HttpResetClass()
|
|
290
|
+
http.load('POST', 'rs/logic/runSQL', {data: {sql: sqlstr}},
|
|
291
|
+
{resolveMsg: null, rejectMsg: '移出安检册失败'}).then(resp=>{
|
|
292
|
+
this.showModal = false
|
|
293
|
+
this.selfSearch()
|
|
294
|
+
}).catch(error=>{
|
|
295
|
+
this.$showMessage('转单失败',error)
|
|
296
|
+
})
|
|
297
|
+
},
|
|
298
|
+
iscancel() {
|
|
299
|
+
this.showModal = false
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
</script>
|
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="width: 100%;height: 100%">
|
|
3
|
-
<div class="col-sm-6 form-group" style="margin-bottom: 0px">
|
|
4
|
-
<label class="font_normal_body">公  司</label>
|
|
5
|
-
<right-tree-safe :width="leftWidth" @re-res="getRes" :resobjprop.sync="resobjprop"></right-tree-safe>
|
|
6
|
-
</div>
|
|
7
|
-
<div class="col-sm-6 form-group" style="margin-bottom: 0px">
|
|
8
|
-
<label class="font_normal_body">{{ roleLable }}</label>
|
|
9
|
-
<v-select :value="selVal" v-model='selVal'
|
|
10
|
-
:value-single="!valueMultiple"
|
|
11
|
-
class="select_list select"
|
|
12
|
-
:options='users' :placeholder='roleName'
|
|
13
|
-
:close-on-select = 'valueClose'
|
|
14
|
-
:multiple="valueMultiple"
|
|
15
|
-
:width="rightWidth"
|
|
16
|
-
@change="valuechange">
|
|
17
|
-
</v-select>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
import {HttpResetClass} from 'vue-client'
|
|
24
|
-
|
|
25
|
-
export default {
|
|
26
|
-
name: "RoleSelector",
|
|
27
|
-
props: {
|
|
28
|
-
valueMultiple: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: false
|
|
31
|
-
},
|
|
32
|
-
roleName: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: '安检员'
|
|
35
|
-
},
|
|
36
|
-
roleLable: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: '安检员'
|
|
39
|
-
},
|
|
40
|
-
leftWidth: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: '60%'
|
|
43
|
-
},
|
|
44
|
-
rightWidth: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: '60%'
|
|
47
|
-
},
|
|
48
|
-
value: {
|
|
49
|
-
default: ''
|
|
50
|
-
},
|
|
51
|
-
resobjprop: {
|
|
52
|
-
default: {}
|
|
53
|
-
},
|
|
54
|
-
valueClose: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: true
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
data() {
|
|
60
|
-
return {
|
|
61
|
-
// source: `tool.getChildrenOfResName($${this.roleName}$)`,
|
|
62
|
-
source: `root.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($${this.roleName}$) != -1)`,
|
|
63
|
-
allUsers: [],
|
|
64
|
-
users: [],
|
|
65
|
-
selVal: '',
|
|
66
|
-
organizationname:this.$login.f.organizationname,
|
|
67
|
-
resids: [],
|
|
68
|
-
changeval: ''
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
watch: {
|
|
72
|
-
'value'(val) {
|
|
73
|
-
console.log("969696", val)
|
|
74
|
-
if (val) {
|
|
75
|
-
if (this.valueMultiple) {
|
|
76
|
-
|
|
77
|
-
} else {
|
|
78
|
-
this.selVal = val
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
async ready() {
|
|
85
|
-
await this.search()
|
|
86
|
-
await this.filterUser(this.resids)
|
|
87
|
-
},
|
|
88
|
-
methods: {
|
|
89
|
-
async clear() {
|
|
90
|
-
// 根据valueMultiple属性设置适当的空值
|
|
91
|
-
const emptyValue = this.valueMultiple ? [] : '';
|
|
92
|
-
// 设置内部状态
|
|
93
|
-
this.selVal = emptyValue;
|
|
94
|
-
// 调用valuechange方法,确保值同步
|
|
95
|
-
this.valuechange(emptyValue);
|
|
96
|
-
},
|
|
97
|
-
async search() {
|
|
98
|
-
let http = new HttpResetClass()
|
|
99
|
-
const res = await http.load('POST', '/rs/search', {
|
|
100
|
-
data: {
|
|
101
|
-
source: this.source,
|
|
102
|
-
userid: this.$login.f.id
|
|
103
|
-
}
|
|
104
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
105
|
-
this.allUsers = res.data
|
|
106
|
-
},
|
|
107
|
-
valuechange(val) {
|
|
108
|
-
console.log(`val instanceof Array======${!val instanceof Array}`)
|
|
109
|
-
if ((typeof val === 'object' && !val instanceof Array) || (val instanceof Event)) {
|
|
110
|
-
return
|
|
111
|
-
}
|
|
112
|
-
if (this.valueMultiple && Array.isArray(val)) {
|
|
113
|
-
if (val && val.length > 0) {
|
|
114
|
-
let valuesele = `(`
|
|
115
|
-
for (let i = 0; i < val.length; i++) {
|
|
116
|
-
valuesele += `'${val[i]}',`
|
|
117
|
-
}
|
|
118
|
-
this.value = valuesele.substring(0, valuesele.length - 1) + ')'
|
|
119
|
-
} else {
|
|
120
|
-
this.value = ''
|
|
121
|
-
}
|
|
122
|
-
} else {
|
|
123
|
-
this.value = val
|
|
124
|
-
}
|
|
125
|
-
// this.changeval = val
|
|
126
|
-
},
|
|
127
|
-
getRes(obj) {
|
|
128
|
-
this.resids = obj.resids
|
|
129
|
-
this.organizationname = obj.res[0]
|
|
130
|
-
this.filterUser(this.resids)
|
|
131
|
-
this.$dispatch('re-res', obj)
|
|
132
|
-
},
|
|
133
|
-
async filterUser(resids) {
|
|
134
|
-
// 处理第一次进入页面值异常问题
|
|
135
|
-
if (resids.length > 0 && typeof resids[0] == "object") {
|
|
136
|
-
resids = resids[0]
|
|
137
|
-
}
|
|
138
|
-
if (resids[0]) {
|
|
139
|
-
this.source = `root.getResourceById($${resids[0]}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($${this.roleName}$) != -1)`
|
|
140
|
-
await this.search()
|
|
141
|
-
}
|
|
142
|
-
this.users = []
|
|
143
|
-
this.allUsers.forEach(user => {
|
|
144
|
-
if ((this.organizationname == user.organizationname || !user.organizationname) && user.state == '在职') {
|
|
145
|
-
this.users.push({label: user.name, value: user.name})
|
|
146
|
-
}
|
|
147
|
-
})
|
|
148
|
-
if (!this.valueMultiple && this.users.length > 0) {
|
|
149
|
-
this.users = [{label: '全部', value: ''}, ...this.users]
|
|
150
|
-
}
|
|
151
|
-
let temp = []
|
|
152
|
-
this.users = this.users.filter(item => {
|
|
153
|
-
if (!temp.includes(item.label)) {
|
|
154
|
-
temp.push(item.label)
|
|
155
|
-
return true
|
|
156
|
-
}
|
|
157
|
-
return false
|
|
158
|
-
})
|
|
159
|
-
let sort = this.$appdata.getSingleValue('数据排序') || '否'
|
|
160
|
-
if (sort == '是'){
|
|
161
|
-
this.users.sort((a,b)=>a.label.localeCompare(b.label, 'zh-Hans-CN'))
|
|
162
|
-
}
|
|
163
|
-
this.$emit('alluser', this.allUsers)
|
|
164
|
-
//tag
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
</script>
|
|
169
|
-
|
|
170
|
-
<style scoped>
|
|
171
|
-
|
|
172
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div style="width: 100%;height: 100%">
|
|
3
|
+
<div class="col-sm-6 form-group" style="margin-bottom: 0px">
|
|
4
|
+
<label class="font_normal_body">公  司</label>
|
|
5
|
+
<right-tree-safe :width="leftWidth" @re-res="getRes" :resobjprop.sync="resobjprop"></right-tree-safe>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="col-sm-6 form-group" style="margin-bottom: 0px">
|
|
8
|
+
<label class="font_normal_body">{{ roleLable }}</label>
|
|
9
|
+
<v-select :value="selVal" v-model='selVal'
|
|
10
|
+
:value-single="!valueMultiple"
|
|
11
|
+
class="select_list select"
|
|
12
|
+
:options='users' :placeholder='roleName'
|
|
13
|
+
:close-on-select = 'valueClose'
|
|
14
|
+
:multiple="valueMultiple"
|
|
15
|
+
:width="rightWidth"
|
|
16
|
+
@change="valuechange">
|
|
17
|
+
</v-select>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import {HttpResetClass} from 'vue-client'
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
name: "RoleSelector",
|
|
27
|
+
props: {
|
|
28
|
+
valueMultiple: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
roleName: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '安检员'
|
|
35
|
+
},
|
|
36
|
+
roleLable: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: '安检员'
|
|
39
|
+
},
|
|
40
|
+
leftWidth: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: '60%'
|
|
43
|
+
},
|
|
44
|
+
rightWidth: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: '60%'
|
|
47
|
+
},
|
|
48
|
+
value: {
|
|
49
|
+
default: ''
|
|
50
|
+
},
|
|
51
|
+
resobjprop: {
|
|
52
|
+
default: {}
|
|
53
|
+
},
|
|
54
|
+
valueClose: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
data() {
|
|
60
|
+
return {
|
|
61
|
+
// source: `tool.getChildrenOfResName($${this.roleName}$)`,
|
|
62
|
+
source: `root.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($${this.roleName}$) != -1)`,
|
|
63
|
+
allUsers: [],
|
|
64
|
+
users: [],
|
|
65
|
+
selVal: '',
|
|
66
|
+
organizationname:this.$login.f.organizationname,
|
|
67
|
+
resids: [],
|
|
68
|
+
changeval: ''
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
watch: {
|
|
72
|
+
'value'(val) {
|
|
73
|
+
console.log("969696", val)
|
|
74
|
+
if (val) {
|
|
75
|
+
if (this.valueMultiple) {
|
|
76
|
+
|
|
77
|
+
} else {
|
|
78
|
+
this.selVal = val
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
async ready() {
|
|
85
|
+
await this.search()
|
|
86
|
+
await this.filterUser(this.resids)
|
|
87
|
+
},
|
|
88
|
+
methods: {
|
|
89
|
+
async clear() {
|
|
90
|
+
// 根据valueMultiple属性设置适当的空值
|
|
91
|
+
const emptyValue = this.valueMultiple ? [] : '';
|
|
92
|
+
// 设置内部状态
|
|
93
|
+
this.selVal = emptyValue;
|
|
94
|
+
// 调用valuechange方法,确保值同步
|
|
95
|
+
this.valuechange(emptyValue);
|
|
96
|
+
},
|
|
97
|
+
async search() {
|
|
98
|
+
let http = new HttpResetClass()
|
|
99
|
+
const res = await http.load('POST', '/rs/search', {
|
|
100
|
+
data: {
|
|
101
|
+
source: this.source,
|
|
102
|
+
userid: this.$login.f.id
|
|
103
|
+
}
|
|
104
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
105
|
+
this.allUsers = res.data
|
|
106
|
+
},
|
|
107
|
+
valuechange(val) {
|
|
108
|
+
console.log(`val instanceof Array======${!val instanceof Array}`)
|
|
109
|
+
if ((typeof val === 'object' && !val instanceof Array) || (val instanceof Event)) {
|
|
110
|
+
return
|
|
111
|
+
}
|
|
112
|
+
if (this.valueMultiple && Array.isArray(val)) {
|
|
113
|
+
if (val && val.length > 0) {
|
|
114
|
+
let valuesele = `(`
|
|
115
|
+
for (let i = 0; i < val.length; i++) {
|
|
116
|
+
valuesele += `'${val[i]}',`
|
|
117
|
+
}
|
|
118
|
+
this.value = valuesele.substring(0, valuesele.length - 1) + ')'
|
|
119
|
+
} else {
|
|
120
|
+
this.value = ''
|
|
121
|
+
}
|
|
122
|
+
} else {
|
|
123
|
+
this.value = val
|
|
124
|
+
}
|
|
125
|
+
// this.changeval = val
|
|
126
|
+
},
|
|
127
|
+
getRes(obj) {
|
|
128
|
+
this.resids = obj.resids
|
|
129
|
+
this.organizationname = obj.res[0]
|
|
130
|
+
this.filterUser(this.resids)
|
|
131
|
+
this.$dispatch('re-res', obj)
|
|
132
|
+
},
|
|
133
|
+
async filterUser(resids) {
|
|
134
|
+
// 处理第一次进入页面值异常问题
|
|
135
|
+
if (resids.length > 0 && typeof resids[0] == "object") {
|
|
136
|
+
resids = resids[0]
|
|
137
|
+
}
|
|
138
|
+
if (resids[0]) {
|
|
139
|
+
this.source = `root.getResourceById($${resids[0]}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($${this.roleName}$) != -1)`
|
|
140
|
+
await this.search()
|
|
141
|
+
}
|
|
142
|
+
this.users = []
|
|
143
|
+
this.allUsers.forEach(user => {
|
|
144
|
+
if ((this.organizationname == user.organizationname || !user.organizationname) && user.state == '在职') {
|
|
145
|
+
this.users.push({label: user.name, value: user.name})
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
if (!this.valueMultiple && this.users.length > 0) {
|
|
149
|
+
this.users = [{label: '全部', value: ''}, ...this.users]
|
|
150
|
+
}
|
|
151
|
+
let temp = []
|
|
152
|
+
this.users = this.users.filter(item => {
|
|
153
|
+
if (!temp.includes(item.label)) {
|
|
154
|
+
temp.push(item.label)
|
|
155
|
+
return true
|
|
156
|
+
}
|
|
157
|
+
return false
|
|
158
|
+
})
|
|
159
|
+
let sort = this.$appdata.getSingleValue('数据排序') || '否'
|
|
160
|
+
if (sort == '是'){
|
|
161
|
+
this.users.sort((a,b)=>a.label.localeCompare(b.label, 'zh-Hans-CN'))
|
|
162
|
+
}
|
|
163
|
+
this.$emit('alluser', this.allUsers)
|
|
164
|
+
//tag
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
</script>
|
|
169
|
+
|
|
170
|
+
<style scoped>
|
|
171
|
+
|
|
172
|
+
</style>
|