safecheck-client 3.0.33-137 → 3.0.33-139
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 +3 -3
- package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -0
- package/src/filiale/baiyin/android.js +1 -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 +1 -1
- package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -0
- package/src/filiale/baiyin/pc/RoleSelector.vue +160 -0
- package/src/filiale/baiyin/pc.js +4 -0
- package/src/filiale/fugou/pc/CheckBookSearchUser.vue +2 -2
- package/src/filiale/wenxi/android/SafecheckUserInfo.vue +673 -672
@@ -0,0 +1,167 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<form class="form-inline">
|
4
|
+
<div class="row form-group">
|
5
|
+
<div class="col-sm-4">
|
6
|
+
<label class="font_normal_body" for="c_plan_year">计划年份:</label>
|
7
|
+
<v-select id="c_plan_year" :value.sync="c_plan_year"
|
8
|
+
class="select_list select"
|
9
|
+
:width="'55%'"
|
10
|
+
style="width: 55%"
|
11
|
+
:options='c_year_list' close-on-select clear-button></v-select>
|
12
|
+
</div>
|
13
|
+
<div class="col-sm-4">
|
14
|
+
<label class="font_normal_body" for="c_plan_month">计划月份:</label>
|
15
|
+
<v-select id="c_plan_month" :value.sync="c_plan_month"
|
16
|
+
class="select_list select"
|
17
|
+
:width="'55%'"
|
18
|
+
style="width: 55%"
|
19
|
+
:options='c_month_list' close-on-select clear-button></v-select>
|
20
|
+
</div>
|
21
|
+
<div class="col-sm-4">
|
22
|
+
<label class="font_normal_body">安检人员:</label>
|
23
|
+
<v-select id="checker" :value.sync="model.f_checker_id" placeholder='安检员'
|
24
|
+
:value-single="true"
|
25
|
+
class="select_list select"
|
26
|
+
:width="'55%'"
|
27
|
+
style="width: 55%"
|
28
|
+
:options='checkers' close-on-select clear-button> </v-select>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<div class="row form-group">
|
32
|
+
<!--<div style="width: 65%;height:100%; display: inline-block">-->
|
33
|
+
<div class="col-sm-4">
|
34
|
+
<label class="font_normal_body">是否共享:</label>
|
35
|
+
<v-select id="share" :value.sync="model.f_is_share" placeholder='是否共享'
|
36
|
+
:value-single="true"
|
37
|
+
class="select_list select"
|
38
|
+
:width="'55%'"
|
39
|
+
style="width: 55%"
|
40
|
+
:options='shares' close-on-select clear-button> </v-select>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div class="col-sm-4">
|
44
|
+
<label class="font_normal_body">计划名称:</label>
|
45
|
+
<input type="text" class="input_search" v-model="model.f_plan_name"
|
46
|
+
style="width: 60%" placeholder="计划名称" condition="f_plan_name like '%{}%'">
|
47
|
+
</div>
|
48
|
+
<div class="col-sm-4">
|
49
|
+
<button type="button" class="button_search" @click="search()">查询</button>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
</form>
|
53
|
+
<hr>
|
54
|
+
<table class="table table_sy">
|
55
|
+
<thead>
|
56
|
+
<tr>
|
57
|
+
<th></th>
|
58
|
+
<th>计划名称</th>
|
59
|
+
<th>计划类型</th>
|
60
|
+
</tr>
|
61
|
+
</thead>
|
62
|
+
<tbody>
|
63
|
+
<tr v-for="row in model.rows">
|
64
|
+
<td @click="select(row, $index)">{{row.selected ? '☆' : ''}}</td>
|
65
|
+
<td @click="select(row, $index)">{{row.f_plan_name}}</td>
|
66
|
+
<td @click="select(row, $index)">{{row.f_plan_type}}</td>
|
67
|
+
</tr>
|
68
|
+
</tbody>
|
69
|
+
</table>
|
70
|
+
</div>
|
71
|
+
</template>
|
72
|
+
|
73
|
+
<script>
|
74
|
+
import { PagedList } from 'vue-client'
|
75
|
+
import Vue from 'vue'
|
76
|
+
import co from 'co'
|
77
|
+
import { HttpResetClass } from 'vue-client'
|
78
|
+
|
79
|
+
let selectnew = function * (self) {
|
80
|
+
let http = new HttpResetClass()
|
81
|
+
http.load('POST', '/rs/search', {
|
82
|
+
data:{
|
83
|
+
source: `this.getSpecialResByType($user$).where(row.getAttributes().get($rolesnames$)!=null ).where(row.getAttributes().get($rolesnames$).indexOf($安检员$) != -1)`,
|
84
|
+
userid: self.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)
|
85
|
+
}
|
86
|
+
}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
87
|
+
self.checkers = []
|
88
|
+
let arr = []
|
89
|
+
//tag
|
90
|
+
res.data.forEach((resRow) => {
|
91
|
+
if(!arr.includes(resRow.name) && resRow.state == '在职'){
|
92
|
+
arr.push(resRow.name)
|
93
|
+
self.checkers.push({label:resRow.name,value:resRow.id})
|
94
|
+
}
|
95
|
+
})
|
96
|
+
self.checkers.push({label:'全部',value:''})
|
97
|
+
})
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
export default {
|
102
|
+
title: '选择安检计划',
|
103
|
+
props: ['f'],
|
104
|
+
data() {
|
105
|
+
let options = []
|
106
|
+
let year = (new Date()).getFullYear()
|
107
|
+
for(let i = year - 8; i <= year +1; i++ )
|
108
|
+
options.push({label: i+'', value: i+''})
|
109
|
+
let moptions = []
|
110
|
+
for(let i=1; i<=12; i++)
|
111
|
+
moptions.push({label: i + '', value: i + ''})
|
112
|
+
let model = new PagedList('rs/sql/按年月人员提取安检计划', 20,
|
113
|
+
{f_subcompany:'this.f_subcompany',f_plan_name:'this.f_plan_name',f_checker_id: 'this.f_checker_id', f_plan_year: 'this.f_plan_year', f_plan_month: 'this.f_plan_month', f_is_share: 'this.f_is_share',f_filialeid:'this.f_filialeid'})
|
114
|
+
model.f_checker_id = ''
|
115
|
+
model.f_plan_name=''
|
116
|
+
model.f_filialeid = this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)
|
117
|
+
return {
|
118
|
+
checker:'',
|
119
|
+
checkers:[],
|
120
|
+
shares: [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}],
|
121
|
+
c_plan_year: [year + ''],
|
122
|
+
c_year_list: options,
|
123
|
+
c_month_list: moptions,
|
124
|
+
c_plan_month: [moptions[new Date().getMonth()].value],
|
125
|
+
model: model,
|
126
|
+
selectedRow: {}
|
127
|
+
}
|
128
|
+
},
|
129
|
+
ready () {
|
130
|
+
this.model.f_plan_year = this.c_plan_year[0]
|
131
|
+
this.model.f_plan_month = this.c_plan_month[0]
|
132
|
+
this.model.f_subcompany = this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)
|
133
|
+
//tag
|
134
|
+
//tag
|
135
|
+
//tag
|
136
|
+
this.model.f_plan_name=''
|
137
|
+
let gen = selectnew(this)
|
138
|
+
return co(gen)
|
139
|
+
},
|
140
|
+
watch: {
|
141
|
+
'c_plan_year' (val) {
|
142
|
+
this.model.f_plan_year = val[0]
|
143
|
+
},
|
144
|
+
'c_plan_month' (val) {
|
145
|
+
this.model.f_plan_month = val[0]
|
146
|
+
},
|
147
|
+
'checker'(){
|
148
|
+
//tag
|
149
|
+
this.selectedRow = {}
|
150
|
+
}
|
151
|
+
},
|
152
|
+
methods: {
|
153
|
+
search () {
|
154
|
+
//this.model.rows = []
|
155
|
+
this.model.rows = []
|
156
|
+
this.model.search()
|
157
|
+
},
|
158
|
+
select(row, idx) {
|
159
|
+
if(this.selectedRow)
|
160
|
+
this.$set('model.rows[' + this.selectedRow.idx + '].selected', false)
|
161
|
+
this.selectedRow = row
|
162
|
+
this.selectedRow.idx = idx
|
163
|
+
this.$set('model.rows[' + idx + '].selected', true)
|
164
|
+
}
|
165
|
+
}
|
166
|
+
}
|
167
|
+
</script>
|
@@ -450,7 +450,6 @@
|
|
450
450
|
}
|
451
451
|
},
|
452
452
|
async ready(){
|
453
|
-
await this.loadpage()
|
454
453
|
if (!this.userlogin.orgid){
|
455
454
|
if (this.$login.f.f_orgids){
|
456
455
|
this.userlogin.orgid = this.$login.f.f_orgids.endsWith('.')?this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1):this.$login.f.f_orgids
|
@@ -458,6 +457,7 @@
|
|
458
457
|
this.userlogin.orgid = ''
|
459
458
|
}
|
460
459
|
}
|
460
|
+
await this.loadpage()
|
461
461
|
},
|
462
462
|
computed: {
|
463
463
|
ntoway() {
|
@@ -0,0 +1,348 @@
|
|
1
|
+
<template>
|
2
|
+
<dropdown :model='model' class="auto" id="res-tree" v-if="!islist" v-el:dropdown :style="{width:width}">
|
3
|
+
<button type="button" class="btn btn-default dropdown-toggle select-style" data-toggle="dropdown" style="width: 100%">
|
4
|
+
<span class='btn-content' :style="{textOverflow:'ellipsis',overflow: 'hidden'}">{{ orgnames }}</span>
|
5
|
+
<span class="caret"></span>
|
6
|
+
</button>
|
7
|
+
<div class="dropdown-menu auto" style="width:auto;max-height: 500px;overflow: auto" >
|
8
|
+
<input type="text" placeholder="Search"
|
9
|
+
placeholder='请输入'
|
10
|
+
slot="dropdown-menu"
|
11
|
+
v-model="searchText"
|
12
|
+
class="form-control" autocomplete="off"
|
13
|
+
@keydown.enter="buluer(searchText)">
|
14
|
+
<tree :filter="strsign" :model='model' v-ref:tree :is-click="false" role="menu">
|
15
|
+
<span partial>
|
16
|
+
<span class="glyphicon glyphicon-chevron-down" v-show="row.open&&row.data.children.length>0" style="color:balck;"></span>
|
17
|
+
<span class="glyphicon glyphicon-chevron-right" v-show="!row.open&&row.data.children.length>0" style="color:balck;"></span>
|
18
|
+
<span class="RightTreeCanSelect" v-if="row.data.hasright" @click.stop="$parent.$parent.$parent.selectclick(row.data)">{{row.data.name}}</span>
|
19
|
+
<span class="RightTreeCanNotSelect" v-else>{{row.data.name}}</span>
|
20
|
+
<span class="glyphicon glyphicon-ok " v-if="$parent.$parent.$parent.isSelect(row.data.id)" style="color:balck;"></span>
|
21
|
+
</span>
|
22
|
+
</tree>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
</dropdown>
|
26
|
+
<v-select v-if="islist"
|
27
|
+
placeholder='请选择'
|
28
|
+
:options='childrenOptions'
|
29
|
+
@change="selectclick"
|
30
|
+
:value-single="true"
|
31
|
+
close-on-select></v-select>
|
32
|
+
</template>
|
33
|
+
<script>
|
34
|
+
import Vue from 'vue';
|
35
|
+
import co from 'co'
|
36
|
+
import { PagedList, HttpResetClass } from 'vue-client'
|
37
|
+
import * as ldapHelper from '../../../utils/LdapHelper'
|
38
|
+
let saveGen = function * (self) {
|
39
|
+
//获取分公司树
|
40
|
+
let data = {
|
41
|
+
source: self.source,
|
42
|
+
userid: self.userid
|
43
|
+
}
|
44
|
+
// if(self.$treeorg==null || (self.$treeorg!=null&&self.$treeorg.length==0)){
|
45
|
+
let http = new HttpResetClass()
|
46
|
+
let ret = yield http.load('POST', `${self.Url}/rs/search`, data, {resolveMsg: null, rejectMsg: null})
|
47
|
+
// 去掉前面的两层节点
|
48
|
+
ret.data[0].children[0].children.forEach((item) => {
|
49
|
+
self.model.push(item)
|
50
|
+
})
|
51
|
+
Vue.$treeorg = Vue.prototype.$treeorg = self.model;
|
52
|
+
// }
|
53
|
+
//if(self.$treeorg!=null){
|
54
|
+
// self.model = self.$treeorg;
|
55
|
+
//}
|
56
|
+
// 给资源添加父关系
|
57
|
+
ldapHelper.procParent(self.model)
|
58
|
+
// 树转列
|
59
|
+
// if (self.islist) {
|
60
|
+
// self.treetoList(self.model)
|
61
|
+
// }
|
62
|
+
if(self.initresid.length>0){
|
63
|
+
if(self.initresid[0] == ''){
|
64
|
+
self.initresid[0] = self.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1);
|
65
|
+
}
|
66
|
+
}else{
|
67
|
+
self.initresid = [];
|
68
|
+
self.initresid[0] = self.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1);
|
69
|
+
}
|
70
|
+
if(self.initresid&&self.initresid.length>0){
|
71
|
+
self.isselect = false;
|
72
|
+
self.initTreetoList(self.model)
|
73
|
+
self.initregion(self.childrenOptions)
|
74
|
+
self.childrenOptions.forEach((item) => {
|
75
|
+
if(item.id == null && item.value !=null ){
|
76
|
+
item = item.value
|
77
|
+
}
|
78
|
+
if(item.id==self.initresid[0]){
|
79
|
+
//默认加载如果已选中的和传入参数相等会取消选择,这种操作不应该被允许
|
80
|
+
if(self.orgids==item.id){
|
81
|
+
self.initdataone(item);
|
82
|
+
return;
|
83
|
+
}
|
84
|
+
self.selectclick(item);
|
85
|
+
self.isselect = true;
|
86
|
+
return;
|
87
|
+
}
|
88
|
+
})
|
89
|
+
//如果没有找到公司,说明是选择的是大区
|
90
|
+
if(!self.isselect){
|
91
|
+
self.childrenregionOption.forEach((item) => {
|
92
|
+
if(item.id == null && item.value !=null ){
|
93
|
+
item = item.value;
|
94
|
+
}
|
95
|
+
if(item.id==self.initresid[0]){
|
96
|
+
//默认加载如果已选中的和传入参数相等会取消选择,这种操作不应该被允许
|
97
|
+
if(self.orgids==item.id){
|
98
|
+
self.initdataone(item);
|
99
|
+
return;
|
100
|
+
}
|
101
|
+
self.selectclick(item);
|
102
|
+
return;
|
103
|
+
}
|
104
|
+
})
|
105
|
+
}
|
106
|
+
}
|
107
|
+
//self.selectRes()
|
108
|
+
}
|
109
|
+
export default {
|
110
|
+
title: '资源树',
|
111
|
+
props: {
|
112
|
+
searchText:'',
|
113
|
+
strsign:'',
|
114
|
+
source: {
|
115
|
+
type: String,
|
116
|
+
require: true,
|
117
|
+
default:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`
|
118
|
+
},
|
119
|
+
//资源初始化数据
|
120
|
+
initresid: {
|
121
|
+
type: Array,
|
122
|
+
default() { return [] },
|
123
|
+
},
|
124
|
+
resid: {
|
125
|
+
},
|
126
|
+
resobjprop:"",
|
127
|
+
islist: {
|
128
|
+
type: Boolean,
|
129
|
+
default: false
|
130
|
+
},
|
131
|
+
//是否有查看上级的权限
|
132
|
+
Url:{
|
133
|
+
type: String,
|
134
|
+
default:''
|
135
|
+
},
|
136
|
+
width:{
|
137
|
+
type:String,
|
138
|
+
default:'60%'
|
139
|
+
}
|
140
|
+
},
|
141
|
+
data () {
|
142
|
+
return {
|
143
|
+
resobj:{res:this.$login.f.f_fengongsi, resids:this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)},
|
144
|
+
userid: this.$login.f.id,
|
145
|
+
resname:[this.$login.f.f_fengongsi],
|
146
|
+
orgnames : "请选择",
|
147
|
+
//单选点击 返回所有子
|
148
|
+
orgids : null,
|
149
|
+
orgobj:null,
|
150
|
+
model: [
|
151
|
+
|
152
|
+
],
|
153
|
+
childrenOptions: [],
|
154
|
+
childrenregionOption:[],
|
155
|
+
isselect: false
|
156
|
+
}
|
157
|
+
},
|
158
|
+
methods: {
|
159
|
+
selectRes () {
|
160
|
+
let newobj={
|
161
|
+
"res": [this.resname],
|
162
|
+
"resids": [this.orgids],
|
163
|
+
}
|
164
|
+
this.$emit('re-res', newobj)
|
165
|
+
},
|
166
|
+
//树形结构变成list
|
167
|
+
initTreetoList(val) {
|
168
|
+
for (let value of val) {
|
169
|
+
this.initErgodicList(value)
|
170
|
+
}
|
171
|
+
},
|
172
|
+
//找到跟节点
|
173
|
+
initErgodicList (val) {
|
174
|
+
if(val.children.length > 0){
|
175
|
+
this.childrenOptions.push(val)
|
176
|
+
this.treetoList(val.children)
|
177
|
+
}else{
|
178
|
+
this.childrenOptions.push(val)
|
179
|
+
}
|
180
|
+
},
|
181
|
+
initregion(val){
|
182
|
+
if(val ==null ) return;
|
183
|
+
val.forEach((item)=>{
|
184
|
+
if(item.name != null){
|
185
|
+
if(item.name.includes("公司")){
|
186
|
+
return;
|
187
|
+
}else{
|
188
|
+
this.initregion(item.children)
|
189
|
+
this.childrenregionOption.push({label:"",value:item})
|
190
|
+
//return item;
|
191
|
+
}
|
192
|
+
}else{
|
193
|
+
return;
|
194
|
+
}
|
195
|
+
})
|
196
|
+
|
197
|
+
},
|
198
|
+
async buluer (val) {
|
199
|
+
this.strsign=val
|
200
|
+
await new Promise(resolve => {
|
201
|
+
this.$nextTick(() => {
|
202
|
+
resolve()
|
203
|
+
})
|
204
|
+
})
|
205
|
+
},
|
206
|
+
//点击资源的方法
|
207
|
+
selectclick (row) {
|
208
|
+
if(this.orgids==row.id){
|
209
|
+
//取消点击
|
210
|
+
this.orgnames="请选择"
|
211
|
+
this.orgids=null
|
212
|
+
this.orgobj=null
|
213
|
+
let newobj={
|
214
|
+
"res": [],
|
215
|
+
"resids": [],
|
216
|
+
"orgobj": [],
|
217
|
+
}
|
218
|
+
this.$emit('re-res', newobj)
|
219
|
+
}else{
|
220
|
+
//点中点击
|
221
|
+
this.orgnames=row.name
|
222
|
+
this.orgids=row.id
|
223
|
+
this.orgobj=row
|
224
|
+
let objs=[]
|
225
|
+
let objids=[]
|
226
|
+
let objnames=[]
|
227
|
+
this.addResChild(row,objs)
|
228
|
+
objs.forEach((item) => {
|
229
|
+
objids.push(item.id)
|
230
|
+
objnames.push(item.name)
|
231
|
+
})
|
232
|
+
let newobj={
|
233
|
+
"res": objnames,
|
234
|
+
"resids": objids,
|
235
|
+
"orgobj": objs,
|
236
|
+
}
|
237
|
+
this.$emit('re-res', newobj)
|
238
|
+
}
|
239
|
+
},
|
240
|
+
initdataone(row){
|
241
|
+
//点中点击
|
242
|
+
this.orgnames=row.name
|
243
|
+
this.orgids=row.id
|
244
|
+
this.orgobj=row
|
245
|
+
let objs=[]
|
246
|
+
let objids=[]
|
247
|
+
let objnames=[]
|
248
|
+
this.addResChild(row,objs)
|
249
|
+
objs.forEach((item) => {
|
250
|
+
objids.push(item.id)
|
251
|
+
objnames.push(item.name)
|
252
|
+
})
|
253
|
+
let newobj={
|
254
|
+
"res": objnames,
|
255
|
+
"resids": objids,
|
256
|
+
"orgobj": objs,
|
257
|
+
}
|
258
|
+
this.$emit('re-res', newobj)
|
259
|
+
},
|
260
|
+
addResChild(val,objs){
|
261
|
+
objs.push(val)
|
262
|
+
if(val.children && val.children.length>0){
|
263
|
+
Object.keys(val.children).forEach((key) => {
|
264
|
+
this.addResChild(val.children[key],objs)
|
265
|
+
})
|
266
|
+
}
|
267
|
+
return objs
|
268
|
+
},
|
269
|
+
//检查是否显示对勾
|
270
|
+
isSelect(val) {
|
271
|
+
if(this.orgids==val){
|
272
|
+
return true
|
273
|
+
}else{
|
274
|
+
return false
|
275
|
+
}
|
276
|
+
},
|
277
|
+
//树形结构变成list
|
278
|
+
treetoList(val) {
|
279
|
+
for (let value of val) {
|
280
|
+
this.ergodicList(value)
|
281
|
+
}
|
282
|
+
},
|
283
|
+
//找到跟节点
|
284
|
+
ergodicList (val) {
|
285
|
+
val.children.length > 0 ? this.treetoList(val.children) : this.childrenOptions.push({label: val.name, value: val})
|
286
|
+
},
|
287
|
+
//处理显示默认值
|
288
|
+
dealResObj (val) {
|
289
|
+
try{
|
290
|
+
var arr=val.res.split(".")
|
291
|
+
//截取最后一个分公司名字
|
292
|
+
this.resname=arr[arr.length-1].toString()
|
293
|
+
this.orgnames=arr[arr.length-1].toString()
|
294
|
+
this.resid = val.resids
|
295
|
+
this.orgids = val.resids
|
296
|
+
}catch (e){
|
297
|
+
this.resname='请选择组织'
|
298
|
+
}
|
299
|
+
},
|
300
|
+
judgBoundary(){
|
301
|
+
//判断是否超出边界,超出移动
|
302
|
+
if(document.documentElement.offsetWidth< this.$els.dropdown.getBoundingClientRect().right){
|
303
|
+
this.left = document.documentElement.offsetWidth - this.$els.dropdown.getBoundingClientRect().right - 25
|
304
|
+
}
|
305
|
+
}
|
306
|
+
},
|
307
|
+
events: {
|
308
|
+
|
309
|
+
},
|
310
|
+
ready () {
|
311
|
+
this.dealResObj (this.resobj)
|
312
|
+
let gen = saveGen(this)
|
313
|
+
return co(gen)
|
314
|
+
},
|
315
|
+
watch: {
|
316
|
+
'resobjprop'(){
|
317
|
+
//tag
|
318
|
+
this.dealResObj (this.resobjprop)
|
319
|
+
}
|
320
|
+
}
|
321
|
+
}
|
322
|
+
</script>
|
323
|
+
<style lang="less">
|
324
|
+
#res-tree {
|
325
|
+
.list-group-item {
|
326
|
+
background-color: #FFF;
|
327
|
+
color: #000;
|
328
|
+
padding: 5px 10px;
|
329
|
+
border:0px;
|
330
|
+
white-space: nowrap;
|
331
|
+
}
|
332
|
+
}
|
333
|
+
#res-tree .list-group {
|
334
|
+
width: auto;
|
335
|
+
min-width: 100%;
|
336
|
+
}
|
337
|
+
.hide-text-overflow{
|
338
|
+
overflow: hidden;
|
339
|
+
text-overflow: ellipsis
|
340
|
+
}
|
341
|
+
.select-style {
|
342
|
+
border: 0px;
|
343
|
+
/*border-bottom: 2px solid #C9CCCF;*/
|
344
|
+
border: 1px solid #93B2D3;
|
345
|
+
border-radius: 0px;
|
346
|
+
color: #555;
|
347
|
+
}
|
348
|
+
</style>
|
@@ -0,0 +1,160 @@
|
|
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.f_orgids.substring(0,this.$login.f.f_orgids.length-1)}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolesnames$).indexOf($${this.roleName}$) != -1)`,
|
63
|
+
allUsers: [],
|
64
|
+
users: [],
|
65
|
+
selVal: '',
|
66
|
+
organizationname:this.$login.f.f_fengongsi,
|
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 search() {
|
90
|
+
let http = new HttpResetClass()
|
91
|
+
const res = await http.load('POST', '/rs/search', {
|
92
|
+
data: {
|
93
|
+
source: this.source,
|
94
|
+
userid: this.$login.f.id
|
95
|
+
}
|
96
|
+
}, {resolveMsg: null, rejectMsg: null})
|
97
|
+
this.allUsers = res.data
|
98
|
+
},
|
99
|
+
valuechange(val) {
|
100
|
+
console.log(`val instanceof Array======${!val instanceof Array}`)
|
101
|
+
if ((typeof val === 'object' && !val instanceof Array) || (val instanceof Event)) {
|
102
|
+
return
|
103
|
+
}
|
104
|
+
if (this.valueMultiple && Array.isArray(val)) {
|
105
|
+
if (val && val.length > 0) {
|
106
|
+
let valuesele = `(`
|
107
|
+
for (let i = 0; i < val.length; i++) {
|
108
|
+
valuesele += `'${val[i]}',`
|
109
|
+
}
|
110
|
+
this.value = valuesele.substring(0, valuesele.length - 1) + ')'
|
111
|
+
} else {
|
112
|
+
this.value = ''
|
113
|
+
}
|
114
|
+
} else {
|
115
|
+
this.value = val
|
116
|
+
}
|
117
|
+
// this.changeval = val
|
118
|
+
},
|
119
|
+
getRes(obj) {
|
120
|
+
this.resids = obj.resids
|
121
|
+
this.organizationname = obj.res[0]
|
122
|
+
this.filterUser(this.resids)
|
123
|
+
this.$dispatch('re-res', obj)
|
124
|
+
},
|
125
|
+
async filterUser(resids) {
|
126
|
+
// 处理第一次进入页面值异常问题
|
127
|
+
if (resids.length > 0 && typeof resids[0] == "object") {
|
128
|
+
resids = resids[0]
|
129
|
+
}
|
130
|
+
if (resids[0]) {
|
131
|
+
this.source = `tool.getChildrenOfResName($${this.roleName}$)`
|
132
|
+
await this.search()
|
133
|
+
}
|
134
|
+
this.users = []
|
135
|
+
this.allUsers.forEach(user => {
|
136
|
+
if (this.organizationname == user.organizationname || !user.organizationname){
|
137
|
+
this.users.push({label: user.name, value: user.name})
|
138
|
+
}
|
139
|
+
})
|
140
|
+
if (!this.valueMultiple && this.users.length > 0) {
|
141
|
+
this.users = [{label: '全部', value: ''}, ...this.users]
|
142
|
+
}
|
143
|
+
let temp = []
|
144
|
+
this.users = this.users.filter(item => {
|
145
|
+
if (!temp.includes(item.label)) {
|
146
|
+
temp.push(item.label)
|
147
|
+
return true
|
148
|
+
}
|
149
|
+
return false
|
150
|
+
})
|
151
|
+
this.$emit('alluser', this.allUsers)
|
152
|
+
//tag
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
</script>
|
157
|
+
|
158
|
+
<style scoped>
|
159
|
+
|
160
|
+
</style>
|
package/src/filiale/baiyin/pc.js
CHANGED
@@ -5,6 +5,10 @@ import Vue from "vue";
|
|
5
5
|
let specialComp = {
|
6
6
|
// 计划安检
|
7
7
|
'plan-manage': (resolve) => { require(['./pc/PlanManage'], resolve) },
|
8
|
+
'role-selector-safe': (resolve) => { require(['./pc/RoleSelector'], resolve) },
|
9
|
+
'right-tree-safe': (resolve) => { require(['./pc/RightTreeSafe'], resolve) },
|
10
|
+
'plan-chooser': (resolve) => { require(['./pc/PlanChooser'], resolve) },
|
11
|
+
'paper-main': (resolve) => { require(['./pc/PaperList'], resolve) },
|
8
12
|
}
|
9
13
|
exports.specialComp = specialComp
|
10
14
|
|